@billgangcom/theme-lib 1.44.2 → 1.44.4
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/App.d.ts +1 -0
- package/dist/builder/components/Preview/Render/index.d.ts +5 -0
- package/dist/builder/components/Sidebar/Layers/AnnouncementLayer/index.d.ts +1 -0
- package/dist/builder/components/Sidebar/Layers/index.d.ts +1 -0
- package/dist/builder/constants/block-icons.d.ts +1 -0
- package/dist/builder/constants/blocks.d.ts +24 -0
- package/dist/builder/index.d.ts +1 -0
- package/dist/builder/store/useLayersStore.d.ts +2 -0
- package/dist/builder/ui/Select/index.d.ts +4 -0
- package/dist/builder.cjs.js +49 -49
- package/dist/builder.es.js +1992 -1917
- package/dist/{index-X-Olyqgp.cjs → index-B7M_zl3r.cjs} +30 -30
- package/dist/{index-CbgVRiD5.js → index-_swnDkZg.js} +8177 -8165
- package/dist/index.cjs.js +1 -1
- package/dist/index.es.js +1 -1
- package/dist/pages/builder/index.d.ts +1 -0
- package/dist/ui/ButtonTypeSettings/index.d.ts +1 -0
- package/dist/ui/ButtonsSettings/index.d.ts +1 -0
- package/dist/ui/ButtonsSettings/popup.d.ts +1 -0
- package/dist/ui/FormSettings/popup.d.ts +1 -0
- package/dist/ui/ItemsSettings/index.d.ts +4 -3
- package/dist/ui/ItemsSettings/popup.d.ts +3 -0
- package/dist/ui/PagesSettings/index.d.ts +26 -0
- package/dist/ui/index.d.ts +1 -0
- package/dist/ui.cjs.js +1 -1
- package/dist/ui.es.js +1779 -1496
- package/package.json +1 -1
package/dist/ui.es.js
CHANGED
|
@@ -1,21 +1,21 @@
|
|
|
1
|
-
import { j as t, I as b, c as
|
|
2
|
-
import { q as
|
|
3
|
-
import
|
|
1
|
+
import { j as t, I as b, c as Y, a as tt, S as st, T as Et, b as et, C as bt, u as yt, d as kt, D as $t, e as It, v as Nt, B as ot, f as mt, P as wt, g as Ct, h as St, i as Vt, s as Yt, k as Ut, l as Bt, m as Ot, M as Mt, n as Dt, o as Lt, p as Gt } from "./index-_swnDkZg.js";
|
|
2
|
+
import { q as uc, L as _c } from "./index-_swnDkZg.js";
|
|
3
|
+
import f from "react";
|
|
4
4
|
import "@phosphor-icons/react";
|
|
5
|
-
const
|
|
6
|
-
wrapper:
|
|
7
|
-
alignmentBlock:
|
|
8
|
-
title:
|
|
9
|
-
subtitle:
|
|
10
|
-
alignmentContent:
|
|
11
|
-
alignments:
|
|
12
|
-
alignment:
|
|
13
|
-
circle:
|
|
14
|
-
paddings:
|
|
15
|
-
padding:
|
|
16
|
-
active:
|
|
17
|
-
input:
|
|
18
|
-
},
|
|
5
|
+
const Xt = "_wrapper_1ibay_2", Wt = "_alignmentBlock_1ibay_8", Jt = "_title_1ibay_15", Qt = "_subtitle_1ibay_22", Kt = "_alignmentContent_1ibay_29", Zt = "_alignments_1ibay_37", te = "_alignment_1ibay_8", ee = "_circle_1ibay_60", se = "_paddings_1ibay_67", ne = "_padding_1ibay_67", ie = "_active_1ibay_91", oe = "_input_1ibay_98", K = {
|
|
6
|
+
wrapper: Xt,
|
|
7
|
+
alignmentBlock: Wt,
|
|
8
|
+
title: Jt,
|
|
9
|
+
subtitle: Qt,
|
|
10
|
+
alignmentContent: Kt,
|
|
11
|
+
alignments: Zt,
|
|
12
|
+
alignment: te,
|
|
13
|
+
circle: ee,
|
|
14
|
+
paddings: se,
|
|
15
|
+
padding: ne,
|
|
16
|
+
active: ie,
|
|
17
|
+
input: oe
|
|
18
|
+
}, ae = [
|
|
19
19
|
"topLeft",
|
|
20
20
|
"top",
|
|
21
21
|
"topRight",
|
|
@@ -25,10 +25,10 @@ const Gt = "_wrapper_1ibay_2", Xt = "_alignmentBlock_1ibay_8", Wt = "_title_1iba
|
|
|
25
25
|
"bottomLeft",
|
|
26
26
|
"bottom",
|
|
27
27
|
"bottomRight"
|
|
28
|
-
],
|
|
29
|
-
const { alignment: a, padding: e, setPadding: s, setAlignment:
|
|
30
|
-
function c(
|
|
31
|
-
switch (
|
|
28
|
+
], ce = ["left", "top", "right", "bottom"], Wa = (d) => {
|
|
29
|
+
const { alignment: a, padding: e, setPadding: s, setAlignment: i } = d;
|
|
30
|
+
function c(g) {
|
|
31
|
+
switch (g) {
|
|
32
32
|
case "left":
|
|
33
33
|
case "topLeft":
|
|
34
34
|
case "bottomLeft":
|
|
@@ -45,8 +45,8 @@ const Gt = "_wrapper_1ibay_2", Xt = "_alignmentBlock_1ibay_8", Wt = "_title_1iba
|
|
|
45
45
|
return "TextAlignCenter";
|
|
46
46
|
}
|
|
47
47
|
}
|
|
48
|
-
function
|
|
49
|
-
switch (
|
|
48
|
+
function l(g) {
|
|
49
|
+
switch (g) {
|
|
50
50
|
case "left":
|
|
51
51
|
return "AlignLeft";
|
|
52
52
|
case "right":
|
|
@@ -57,28 +57,28 @@ const Gt = "_wrapper_1ibay_2", Xt = "_alignmentBlock_1ibay_8", Wt = "_title_1iba
|
|
|
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, n] = f.useState(null), [_, v] = f.useState(null);
|
|
61
|
+
return /* @__PURE__ */ t.jsxs("div", { className: K.layout, children: [
|
|
62
|
+
/* @__PURE__ */ t.jsx("h3", { className: K.title, children: "Layout" }),
|
|
63
|
+
/* @__PURE__ */ t.jsxs("div", { className: K.alignmentBlock, children: [
|
|
64
|
+
/* @__PURE__ */ t.jsx("h5", { className: K.subtitle, children: "Alignment" }),
|
|
65
|
+
/* @__PURE__ */ t.jsxs("div", { className: K.alignmentContent, children: [
|
|
66
|
+
/* @__PURE__ */ t.jsx("div", { className: K.alignments, children: ae.map((g) => /* @__PURE__ */ t.jsxs(
|
|
67
67
|
"div",
|
|
68
68
|
{
|
|
69
69
|
onClick: () => {
|
|
70
|
-
|
|
70
|
+
i(g);
|
|
71
71
|
},
|
|
72
|
-
className:
|
|
72
|
+
className: K.alignment,
|
|
73
73
|
onMouseEnter: () => {
|
|
74
|
-
|
|
74
|
+
n(g);
|
|
75
75
|
},
|
|
76
76
|
onMouseLeave: () => {
|
|
77
|
-
|
|
77
|
+
n(null);
|
|
78
78
|
},
|
|
79
79
|
children: [
|
|
80
|
-
|
|
81
|
-
|
|
80
|
+
g !== a && o !== g && /* @__PURE__ */ t.jsx("div", { className: K.circle }),
|
|
81
|
+
g !== a && o === g && /* @__PURE__ */ t.jsx(
|
|
82
82
|
b,
|
|
83
83
|
{
|
|
84
84
|
name: c(o),
|
|
@@ -87,7 +87,7 @@ const Gt = "_wrapper_1ibay_2", Xt = "_alignmentBlock_1ibay_8", Wt = "_title_1iba
|
|
|
87
87
|
height: 22
|
|
88
88
|
}
|
|
89
89
|
),
|
|
90
|
-
|
|
90
|
+
g === a && /* @__PURE__ */ t.jsx(
|
|
91
91
|
b,
|
|
92
92
|
{
|
|
93
93
|
name: c(a),
|
|
@@ -98,37 +98,37 @@ const Gt = "_wrapper_1ibay_2", Xt = "_alignmentBlock_1ibay_8", Wt = "_title_1iba
|
|
|
98
98
|
)
|
|
99
99
|
]
|
|
100
100
|
},
|
|
101
|
-
|
|
101
|
+
g
|
|
102
102
|
)) }),
|
|
103
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
103
|
+
/* @__PURE__ */ t.jsx("div", { className: K.paddings, children: ce.map((g) => /* @__PURE__ */ t.jsxs(
|
|
104
104
|
"label",
|
|
105
105
|
{
|
|
106
|
-
className:
|
|
107
|
-
[
|
|
106
|
+
className: Y(K.padding, {
|
|
107
|
+
[K.active]: _ === g
|
|
108
108
|
}),
|
|
109
109
|
onFocus: () => {
|
|
110
|
-
|
|
110
|
+
v(g);
|
|
111
111
|
},
|
|
112
112
|
onBlur: () => {
|
|
113
|
-
|
|
113
|
+
v(null);
|
|
114
114
|
},
|
|
115
115
|
children: [
|
|
116
116
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
117
117
|
b,
|
|
118
118
|
{
|
|
119
|
-
name:
|
|
119
|
+
name: l(g),
|
|
120
120
|
width: 20,
|
|
121
121
|
height: 20
|
|
122
122
|
}
|
|
123
123
|
) }),
|
|
124
124
|
/* @__PURE__ */ t.jsx(
|
|
125
|
-
|
|
125
|
+
tt,
|
|
126
126
|
{
|
|
127
127
|
type: "number",
|
|
128
|
-
value: String(e[
|
|
129
|
-
onChange: (
|
|
128
|
+
value: String(e[g]),
|
|
129
|
+
onChange: (r) => s({
|
|
130
130
|
...e,
|
|
131
|
-
[
|
|
131
|
+
[g]: Number(r)
|
|
132
132
|
}),
|
|
133
133
|
paddingless: !0,
|
|
134
134
|
borderless: !0
|
|
@@ -136,26 +136,26 @@ const Gt = "_wrapper_1ibay_2", Xt = "_alignmentBlock_1ibay_8", Wt = "_title_1iba
|
|
|
136
136
|
)
|
|
137
137
|
]
|
|
138
138
|
},
|
|
139
|
-
|
|
139
|
+
g
|
|
140
140
|
)) })
|
|
141
141
|
] })
|
|
142
142
|
] })
|
|
143
143
|
] });
|
|
144
|
-
},
|
|
145
|
-
title:
|
|
146
|
-
subtitle:
|
|
147
|
-
header:
|
|
148
|
-
text:
|
|
149
|
-
top:
|
|
150
|
-
itemsBlock:
|
|
151
|
-
},
|
|
152
|
-
typeTexts:
|
|
144
|
+
}, le = "_title_1jkiw_1", re = "_subtitle_1jkiw_5", de = "_header_1jkiw_12", ue = "_text_1jkiw_13", _e = "_top_1jkiw_20", me = "_itemsBlock_1jkiw_29", ht = {
|
|
145
|
+
title: le,
|
|
146
|
+
subtitle: re,
|
|
147
|
+
header: de,
|
|
148
|
+
text: ue,
|
|
149
|
+
top: _e,
|
|
150
|
+
itemsBlock: me
|
|
151
|
+
}, pe = "_typeTexts_167ez_1", he = "_block_167ez_8", fe = "_active_167ez_25", Pt = {
|
|
152
|
+
typeTexts: pe,
|
|
153
153
|
block: he,
|
|
154
|
-
active:
|
|
155
|
-
},
|
|
154
|
+
active: fe
|
|
155
|
+
}, ge = ["bold", "italic", "underline", "strike-through", "code"], Ht = (d) => {
|
|
156
156
|
const { typesText: a, setTypesText: e } = d;
|
|
157
|
-
function s(
|
|
158
|
-
switch (
|
|
157
|
+
function s(i) {
|
|
158
|
+
switch (i) {
|
|
159
159
|
case "bold":
|
|
160
160
|
return "TextB";
|
|
161
161
|
case "italic":
|
|
@@ -168,33 +168,33 @@ const Gt = "_wrapper_1ibay_2", Xt = "_alignmentBlock_1ibay_8", Wt = "_title_1iba
|
|
|
168
168
|
return "TextUnderline";
|
|
169
169
|
}
|
|
170
170
|
}
|
|
171
|
-
return /* @__PURE__ */ t.jsx("div", { className:
|
|
171
|
+
return /* @__PURE__ */ t.jsx("div", { className: Pt.typeTexts, children: ge.map((i) => /* @__PURE__ */ t.jsx(
|
|
172
172
|
"div",
|
|
173
173
|
{
|
|
174
|
-
className:
|
|
175
|
-
[
|
|
174
|
+
className: Y(Pt.block, {
|
|
175
|
+
[Pt.active]: a.includes(i)
|
|
176
176
|
}),
|
|
177
177
|
onClick: () => {
|
|
178
178
|
const c = [...a];
|
|
179
|
-
if (c.includes(
|
|
180
|
-
const
|
|
181
|
-
e(
|
|
179
|
+
if (c.includes(i)) {
|
|
180
|
+
const l = c.filter((o) => o !== i);
|
|
181
|
+
e(l);
|
|
182
182
|
} else
|
|
183
|
-
c.push(
|
|
183
|
+
c.push(i), e(c);
|
|
184
184
|
},
|
|
185
185
|
children: /* @__PURE__ */ t.jsx(
|
|
186
186
|
b,
|
|
187
187
|
{
|
|
188
|
-
name: s(
|
|
189
|
-
fill: a.includes(
|
|
188
|
+
name: s(i),
|
|
189
|
+
fill: a.includes(i) ? "#252525" : "#757575",
|
|
190
190
|
width: 20,
|
|
191
191
|
height: 20
|
|
192
192
|
}
|
|
193
193
|
)
|
|
194
194
|
},
|
|
195
|
-
String(
|
|
195
|
+
String(i)
|
|
196
196
|
)) });
|
|
197
|
-
},
|
|
197
|
+
}, ft = {
|
|
198
198
|
h1: "Heading 1",
|
|
199
199
|
h2: "Heading 2",
|
|
200
200
|
h3: "Heading 3",
|
|
@@ -202,37 +202,37 @@ const Gt = "_wrapper_1ibay_2", Xt = "_alignmentBlock_1ibay_8", Wt = "_title_1iba
|
|
|
202
202
|
h5: "Heading 5",
|
|
203
203
|
h6: "Heading 6",
|
|
204
204
|
p: "Paragraph"
|
|
205
|
-
},
|
|
205
|
+
}, Rt = (d) => {
|
|
206
206
|
const {
|
|
207
207
|
typesText: a,
|
|
208
208
|
isActiveText: e,
|
|
209
209
|
setIsActiveText: s,
|
|
210
|
-
text:
|
|
210
|
+
text: i,
|
|
211
211
|
setText: c,
|
|
212
|
-
setTypesText:
|
|
212
|
+
setTypesText: l,
|
|
213
213
|
title: o,
|
|
214
|
-
subtitle:
|
|
215
|
-
typeFont:
|
|
216
|
-
setTypeFont:
|
|
214
|
+
subtitle: n = "Items",
|
|
215
|
+
typeFont: _,
|
|
216
|
+
setTypeFont: v
|
|
217
217
|
} = d;
|
|
218
218
|
return /* @__PURE__ */ t.jsxs("div", { className: ht.text, children: [
|
|
219
219
|
(o || e !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: ht.top, children: [
|
|
220
220
|
o && /* @__PURE__ */ t.jsx("h3", { className: ht.title, children: o }),
|
|
221
221
|
e !== void 0 && s && /* @__PURE__ */ t.jsx(
|
|
222
|
-
|
|
222
|
+
st,
|
|
223
223
|
{
|
|
224
224
|
current: e,
|
|
225
|
-
onChange: (
|
|
225
|
+
onChange: (g) => s(g)
|
|
226
226
|
}
|
|
227
227
|
)
|
|
228
228
|
] }),
|
|
229
229
|
/* @__PURE__ */ t.jsxs("div", { className: ht.itemsBlock, children: [
|
|
230
|
-
/* @__PURE__ */ t.jsx("h5", { className: ht.subtitle, children:
|
|
230
|
+
/* @__PURE__ */ t.jsx("h5", { className: ht.subtitle, children: n }),
|
|
231
231
|
/* @__PURE__ */ t.jsx(
|
|
232
|
-
|
|
232
|
+
Et,
|
|
233
233
|
{
|
|
234
|
-
onChange: (
|
|
235
|
-
value:
|
|
234
|
+
onChange: (g) => c(g),
|
|
235
|
+
value: i,
|
|
236
236
|
maxLength: 150
|
|
237
237
|
}
|
|
238
238
|
),
|
|
@@ -240,218 +240,231 @@ const Gt = "_wrapper_1ibay_2", Xt = "_alignmentBlock_1ibay_8", Wt = "_title_1iba
|
|
|
240
240
|
Ht,
|
|
241
241
|
{
|
|
242
242
|
typesText: a,
|
|
243
|
-
setTypesText:
|
|
243
|
+
setTypesText: l
|
|
244
244
|
}
|
|
245
245
|
),
|
|
246
246
|
/* @__PURE__ */ t.jsx(
|
|
247
|
-
|
|
247
|
+
et,
|
|
248
248
|
{
|
|
249
249
|
label: "Type Text",
|
|
250
|
-
options: Object.values(
|
|
251
|
-
(
|
|
250
|
+
options: Object.values(ft).filter(
|
|
251
|
+
(g) => g !== ft[_]
|
|
252
252
|
),
|
|
253
|
-
onChange: (
|
|
254
|
-
Object.keys(
|
|
255
|
-
(
|
|
253
|
+
onChange: (g) => v(
|
|
254
|
+
Object.keys(ft).find(
|
|
255
|
+
(r) => ft[r] === g
|
|
256
256
|
)
|
|
257
257
|
),
|
|
258
|
-
value:
|
|
258
|
+
value: ft[_]
|
|
259
259
|
}
|
|
260
260
|
)
|
|
261
261
|
] })
|
|
262
262
|
] });
|
|
263
|
-
},
|
|
264
|
-
title:
|
|
265
|
-
subtitle:
|
|
266
|
-
header:
|
|
267
|
-
text:
|
|
268
|
-
productsBlock:
|
|
269
|
-
top:
|
|
270
|
-
itemsBlock:
|
|
263
|
+
}, xe = "_title_pef24_1", be = "_subtitle_pef24_5", ve = "_header_pef24_12", je = "_text_pef24_13", ye = "_productsBlock_pef24_14", ke = "_top_pef24_26", $e = "_itemsBlock_pef24_35", Ie = "_typeTexts_pef24_41", Ne = "_block_pef24_48", we = "_active_pef24_61", Ce = "_products_pef24_14", Se = "_product_pef24_14", Be = "_button_pef24_80", Te = "_disabled_pef24_91", Pe = "_image_pef24_95", Ae = "_info_pef24_102", Oe = "_name_pef24_114", Me = "_buttons_pef24_118", qe = "_modal_pef24_125", Ee = "_link_pef24_145", Ue = "_modalOptions_pef24_151", De = "_addButton_pef24_164", Le = "_deleteButton_pef24_179", He = "_closeIcon_pef24_191", z = {
|
|
264
|
+
title: xe,
|
|
265
|
+
subtitle: be,
|
|
266
|
+
header: ve,
|
|
267
|
+
text: je,
|
|
268
|
+
productsBlock: ye,
|
|
269
|
+
top: ke,
|
|
270
|
+
itemsBlock: $e,
|
|
271
271
|
typeTexts: Ie,
|
|
272
|
-
block:
|
|
273
|
-
active:
|
|
274
|
-
products:
|
|
272
|
+
block: Ne,
|
|
273
|
+
active: we,
|
|
274
|
+
products: Ce,
|
|
275
275
|
product: Se,
|
|
276
|
-
button:
|
|
277
|
-
disabled:
|
|
278
|
-
image:
|
|
279
|
-
info:
|
|
280
|
-
name:
|
|
276
|
+
button: Be,
|
|
277
|
+
disabled: Te,
|
|
278
|
+
image: Pe,
|
|
279
|
+
info: Ae,
|
|
280
|
+
name: Oe,
|
|
281
281
|
buttons: Me,
|
|
282
|
-
modal:
|
|
283
|
-
link:
|
|
284
|
-
modalOptions:
|
|
285
|
-
addButton:
|
|
286
|
-
deleteButton:
|
|
282
|
+
modal: qe,
|
|
283
|
+
link: Ee,
|
|
284
|
+
modalOptions: Ue,
|
|
285
|
+
addButton: De,
|
|
286
|
+
deleteButton: Le,
|
|
287
287
|
closeIcon: He
|
|
288
|
-
},
|
|
288
|
+
}, Re = f.forwardRef(
|
|
289
289
|
(d, a) => {
|
|
290
|
-
const { activeItem: e, setActiveItem: s, popupPosition:
|
|
291
|
-
function o(
|
|
292
|
-
return
|
|
290
|
+
const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: c, setIsOpenModal: l } = d;
|
|
291
|
+
function o(n, _) {
|
|
292
|
+
return n.length > _ ? `${n.slice(0, _)}...` : n;
|
|
293
293
|
}
|
|
294
294
|
return /* @__PURE__ */ t.jsxs(
|
|
295
295
|
"div",
|
|
296
296
|
{
|
|
297
297
|
ref: a,
|
|
298
|
-
className:
|
|
299
|
-
onClick: (
|
|
300
|
-
|
|
298
|
+
className: z.modal,
|
|
299
|
+
onClick: (n) => {
|
|
300
|
+
n.stopPropagation();
|
|
301
301
|
},
|
|
302
302
|
style: {
|
|
303
|
-
top: `${
|
|
304
|
-
left: `${
|
|
303
|
+
top: `${i.top}px`,
|
|
304
|
+
left: `${i.left}px`
|
|
305
305
|
},
|
|
306
306
|
children: [
|
|
307
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
308
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
309
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
307
|
+
/* @__PURE__ */ t.jsxs("div", { className: z.top, children: [
|
|
308
|
+
/* @__PURE__ */ t.jsx("h3", { className: z.title, children: o(e.name["en-US"], 20) }),
|
|
309
|
+
/* @__PURE__ */ t.jsx("div", { className: z.closeIcon, children: /* @__PURE__ */ t.jsx(
|
|
310
310
|
b,
|
|
311
311
|
{
|
|
312
312
|
name: "X",
|
|
313
313
|
height: 20,
|
|
314
314
|
width: 20,
|
|
315
315
|
onClick: () => {
|
|
316
|
-
s(null),
|
|
316
|
+
s(null), l(!1);
|
|
317
317
|
}
|
|
318
318
|
}
|
|
319
319
|
) })
|
|
320
320
|
] }),
|
|
321
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
322
|
-
if (
|
|
321
|
+
/* @__PURE__ */ t.jsx("div", { className: z.modalOptions, children: c.map((n) => {
|
|
322
|
+
if (n.type === "image")
|
|
323
323
|
return /* @__PURE__ */ t.jsx(
|
|
324
|
-
|
|
324
|
+
bt,
|
|
325
325
|
{
|
|
326
326
|
label: "Put up an attractive image",
|
|
327
|
-
activeImage: e[
|
|
328
|
-
onChange: (
|
|
329
|
-
const
|
|
327
|
+
activeImage: e[n.field],
|
|
328
|
+
onChange: (_) => {
|
|
329
|
+
const v = {
|
|
330
330
|
...e,
|
|
331
|
-
[
|
|
331
|
+
[n.field]: _
|
|
332
332
|
};
|
|
333
|
-
s(
|
|
333
|
+
s(v);
|
|
334
334
|
}
|
|
335
335
|
},
|
|
336
|
-
String(
|
|
336
|
+
String(n.field)
|
|
337
337
|
);
|
|
338
|
-
if (
|
|
338
|
+
if (n.type === "text")
|
|
339
339
|
return /* @__PURE__ */ t.jsx(
|
|
340
|
-
|
|
340
|
+
Rt,
|
|
341
341
|
{
|
|
342
|
-
typesText: e[
|
|
343
|
-
setTypesText: (
|
|
344
|
-
const
|
|
342
|
+
typesText: e[n.field.type],
|
|
343
|
+
setTypesText: (_) => {
|
|
344
|
+
const v = {
|
|
345
345
|
...e,
|
|
346
|
-
[
|
|
346
|
+
[n.field.type]: _
|
|
347
347
|
};
|
|
348
|
-
s(
|
|
348
|
+
s(v);
|
|
349
349
|
},
|
|
350
|
-
text: e[
|
|
351
|
-
setText: (
|
|
352
|
-
const
|
|
350
|
+
text: e[n.field.text]["en-US"] || "",
|
|
351
|
+
setText: (_) => {
|
|
352
|
+
const v = {
|
|
353
353
|
...e,
|
|
354
|
-
[
|
|
355
|
-
"en-US":
|
|
354
|
+
[n.field.text]: {
|
|
355
|
+
"en-US": _
|
|
356
356
|
}
|
|
357
357
|
};
|
|
358
|
-
s(
|
|
358
|
+
s(v);
|
|
359
359
|
},
|
|
360
|
-
typeFont: e[
|
|
361
|
-
setTypeFont: (
|
|
362
|
-
const
|
|
360
|
+
typeFont: e[n.field.typeFont],
|
|
361
|
+
setTypeFont: (_) => {
|
|
362
|
+
const v = {
|
|
363
363
|
...e,
|
|
364
|
-
[
|
|
364
|
+
[n.field.typeFont]: _
|
|
365
365
|
};
|
|
366
|
-
s(
|
|
366
|
+
s(v);
|
|
367
367
|
},
|
|
368
|
-
subtitle:
|
|
368
|
+
subtitle: n.label
|
|
369
369
|
}
|
|
370
370
|
);
|
|
371
|
-
if (
|
|
371
|
+
if (n.type === "input")
|
|
372
372
|
return /* @__PURE__ */ t.jsx(
|
|
373
|
-
|
|
373
|
+
tt,
|
|
374
374
|
{
|
|
375
|
-
onChange: (
|
|
376
|
-
const
|
|
375
|
+
onChange: (_) => {
|
|
376
|
+
const v = {
|
|
377
377
|
...e,
|
|
378
|
-
[
|
|
378
|
+
[n.field]: _
|
|
379
379
|
};
|
|
380
|
-
s(
|
|
380
|
+
s(v);
|
|
381
381
|
},
|
|
382
|
-
value: e[
|
|
383
|
-
label:
|
|
384
|
-
placeholder:
|
|
382
|
+
value: e[n.field] || "",
|
|
383
|
+
label: n.label,
|
|
384
|
+
placeholder: n.placeholder
|
|
385
385
|
}
|
|
386
386
|
);
|
|
387
|
-
if (
|
|
388
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
387
|
+
if (n.type === "inputSwitch")
|
|
388
|
+
return /* @__PURE__ */ t.jsxs("div", { className: z.link, children: [
|
|
389
389
|
/* @__PURE__ */ t.jsx(
|
|
390
|
-
|
|
390
|
+
tt,
|
|
391
391
|
{
|
|
392
|
-
onChange: (
|
|
393
|
-
const
|
|
392
|
+
onChange: (_) => {
|
|
393
|
+
const v = {
|
|
394
394
|
...e,
|
|
395
|
-
[
|
|
395
|
+
[n.field.text]: _
|
|
396
396
|
};
|
|
397
|
-
s(
|
|
397
|
+
s(v);
|
|
398
398
|
},
|
|
399
|
-
value: e[
|
|
400
|
-
label:
|
|
401
|
-
placeholder:
|
|
399
|
+
value: e[n.field.text] || "",
|
|
400
|
+
label: n.inputLabel,
|
|
401
|
+
placeholder: n.placeholder
|
|
402
402
|
}
|
|
403
403
|
),
|
|
404
404
|
/* @__PURE__ */ t.jsx(
|
|
405
|
-
|
|
405
|
+
st,
|
|
406
406
|
{
|
|
407
|
-
current: !!e[
|
|
408
|
-
label:
|
|
409
|
-
onChange: (
|
|
410
|
-
const
|
|
407
|
+
current: !!e[n.field.switch] || !1,
|
|
408
|
+
label: n.switchLabel,
|
|
409
|
+
onChange: (_) => {
|
|
410
|
+
const v = {
|
|
411
411
|
...e,
|
|
412
|
-
[
|
|
412
|
+
[n.field.switch]: _
|
|
413
413
|
};
|
|
414
|
-
s(
|
|
414
|
+
s(v);
|
|
415
415
|
}
|
|
416
416
|
}
|
|
417
417
|
)
|
|
418
418
|
] });
|
|
419
|
-
if (
|
|
419
|
+
if (n.type === "list")
|
|
420
420
|
return /* @__PURE__ */ t.jsx(
|
|
421
|
-
|
|
421
|
+
Ge,
|
|
422
422
|
{
|
|
423
|
-
items: e[
|
|
424
|
-
setItems: (
|
|
425
|
-
const
|
|
423
|
+
items: e[n.field] || [],
|
|
424
|
+
setItems: (_) => {
|
|
425
|
+
const v = {
|
|
426
426
|
...e,
|
|
427
|
-
[
|
|
427
|
+
[n.field]: _
|
|
428
428
|
};
|
|
429
|
-
s(
|
|
429
|
+
s(v);
|
|
430
430
|
},
|
|
431
431
|
itemsType: "select",
|
|
432
|
-
draggable:
|
|
433
|
-
itemsOptions:
|
|
434
|
-
deletable:
|
|
435
|
-
editable: !1,
|
|
436
|
-
subtitle:
|
|
437
|
-
addableOptions:
|
|
432
|
+
draggable: n.draggable || !1,
|
|
433
|
+
itemsOptions: n.itemsOptions,
|
|
434
|
+
deletable: n.deletable || !1,
|
|
435
|
+
editable: n.editable || !1,
|
|
436
|
+
subtitle: n.label,
|
|
437
|
+
addableOptions: n.addableOptions,
|
|
438
|
+
modalOptions: n.modalOptions
|
|
438
439
|
}
|
|
439
440
|
);
|
|
440
|
-
if (
|
|
441
|
+
if (n.type === "select")
|
|
441
442
|
return /* @__PURE__ */ t.jsx(
|
|
442
|
-
|
|
443
|
+
et,
|
|
443
444
|
{
|
|
444
|
-
options:
|
|
445
|
-
onChange: (
|
|
446
|
-
const
|
|
445
|
+
options: n.itemsOptions,
|
|
446
|
+
onChange: (_) => {
|
|
447
|
+
const v = {
|
|
447
448
|
...e,
|
|
448
|
-
[
|
|
449
|
+
[n.field]: _
|
|
449
450
|
};
|
|
450
|
-
s(
|
|
451
|
+
s(v);
|
|
451
452
|
},
|
|
452
|
-
label:
|
|
453
|
-
value: e[
|
|
454
|
-
leftAddon:
|
|
453
|
+
label: n.label,
|
|
454
|
+
value: e[n.field] || "String",
|
|
455
|
+
leftAddon: n.leftAddon && n.leftAddon === "icon" && /* @__PURE__ */ t.jsx(b, { name: e[n.field] }),
|
|
456
|
+
switcher: n.switcher ? {
|
|
457
|
+
value: !!e[n.switcher],
|
|
458
|
+
onChange: (_) => {
|
|
459
|
+
if (n.switcher === "isActive") {
|
|
460
|
+
const v = {
|
|
461
|
+
...e,
|
|
462
|
+
[n.switcher]: _
|
|
463
|
+
};
|
|
464
|
+
s(v);
|
|
465
|
+
}
|
|
466
|
+
}
|
|
467
|
+
} : void 0
|
|
455
468
|
}
|
|
456
469
|
);
|
|
457
470
|
}) })
|
|
@@ -459,16 +472,16 @@ const Gt = "_wrapper_1ibay_2", Xt = "_alignmentBlock_1ibay_8", Wt = "_title_1iba
|
|
|
459
472
|
}
|
|
460
473
|
);
|
|
461
474
|
}
|
|
462
|
-
), ze = "_other_g74jx_1",
|
|
475
|
+
), ze = "_other_g74jx_1", Fe = "_subtitle_g74jx_7", Ve = "_items_g74jx_14", At = {
|
|
463
476
|
other: ze,
|
|
464
|
-
subtitle:
|
|
465
|
-
items:
|
|
466
|
-
},
|
|
477
|
+
subtitle: Fe,
|
|
478
|
+
items: Ve
|
|
479
|
+
}, Tt = (d) => {
|
|
467
480
|
const { items: a, title: e = "Other" } = d;
|
|
468
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
469
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
470
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
471
|
-
|
|
481
|
+
return /* @__PURE__ */ t.jsxs("div", { className: At.other, children: [
|
|
482
|
+
/* @__PURE__ */ t.jsx("h5", { className: At.subtitle, children: e }),
|
|
483
|
+
/* @__PURE__ */ t.jsx("div", { className: At.items, children: a.map((s, i) => /* @__PURE__ */ t.jsx(
|
|
484
|
+
st,
|
|
472
485
|
{
|
|
473
486
|
current: s.isItem,
|
|
474
487
|
onChange: (c) => s.setIsItem(c),
|
|
@@ -476,105 +489,105 @@ const Gt = "_wrapper_1ibay_2", Xt = "_alignmentBlock_1ibay_8", Wt = "_title_1iba
|
|
|
476
489
|
hasBackground: !0,
|
|
477
490
|
paddingless: !1
|
|
478
491
|
},
|
|
479
|
-
|
|
492
|
+
i
|
|
480
493
|
)) })
|
|
481
494
|
] });
|
|
482
495
|
};
|
|
483
|
-
function
|
|
496
|
+
function Ye({ product: d, children: a }) {
|
|
484
497
|
const {
|
|
485
498
|
attributes: e,
|
|
486
499
|
listeners: s,
|
|
487
|
-
setNodeRef:
|
|
500
|
+
setNodeRef: i,
|
|
488
501
|
transform: c,
|
|
489
|
-
transition:
|
|
502
|
+
transition: l,
|
|
490
503
|
isDragging: o
|
|
491
|
-
} =
|
|
504
|
+
} = Ct({
|
|
492
505
|
id: d.id
|
|
493
|
-
}),
|
|
494
|
-
transform:
|
|
495
|
-
transition:
|
|
506
|
+
}), n = {
|
|
507
|
+
transform: St.Transform.toString(c),
|
|
508
|
+
transition: l
|
|
496
509
|
};
|
|
497
510
|
return /* @__PURE__ */ t.jsx(
|
|
498
511
|
"div",
|
|
499
512
|
{
|
|
500
|
-
ref:
|
|
501
|
-
style:
|
|
502
|
-
className: `${
|
|
513
|
+
ref: i,
|
|
514
|
+
style: n,
|
|
515
|
+
className: `${z.product} ${o ? z.dragging : ""}`,
|
|
503
516
|
...e,
|
|
504
517
|
...s,
|
|
505
518
|
children: a
|
|
506
519
|
}
|
|
507
520
|
);
|
|
508
521
|
}
|
|
509
|
-
const
|
|
522
|
+
const Ge = (d) => {
|
|
510
523
|
const {
|
|
511
524
|
isActiveItems: a,
|
|
512
525
|
setIsActiveItems: e,
|
|
513
526
|
items: s,
|
|
514
|
-
setItems:
|
|
527
|
+
setItems: i,
|
|
515
528
|
other: c,
|
|
516
|
-
title:
|
|
529
|
+
title: l,
|
|
517
530
|
subtitle: o,
|
|
518
|
-
editable:
|
|
519
|
-
draggable:
|
|
520
|
-
withImage:
|
|
521
|
-
deletable:
|
|
522
|
-
addable:
|
|
523
|
-
itemsType:
|
|
524
|
-
itemsPlaceholder:
|
|
525
|
-
itemsOptions:
|
|
526
|
-
hasRangeSelector:
|
|
527
|
-
rangeSelectorOptions:
|
|
528
|
-
modalOptions:
|
|
529
|
-
addableOptions:
|
|
530
|
-
limit:
|
|
531
|
-
|
|
532
|
-
} = d, [
|
|
531
|
+
editable: n = !0,
|
|
532
|
+
draggable: _ = !1,
|
|
533
|
+
withImage: v = !1,
|
|
534
|
+
deletable: g = !0,
|
|
535
|
+
addable: r = !0,
|
|
536
|
+
itemsType: k,
|
|
537
|
+
itemsPlaceholder: p = "",
|
|
538
|
+
itemsOptions: m,
|
|
539
|
+
hasRangeSelector: $ = !1,
|
|
540
|
+
rangeSelectorOptions: H,
|
|
541
|
+
modalOptions: q,
|
|
542
|
+
addableOptions: u = {},
|
|
543
|
+
limit: S,
|
|
544
|
+
autoInterval: E
|
|
545
|
+
} = d, [F, B] = f.useState(null), [j, P] = f.useState({
|
|
533
546
|
top: 0,
|
|
534
547
|
left: 0
|
|
535
|
-
}), [
|
|
536
|
-
|
|
548
|
+
}), [x, I] = f.useState(null), w = f.useRef(null), [L, A] = f.useState(!1), D = yt(
|
|
549
|
+
kt(wt, {
|
|
537
550
|
activationConstraint: {
|
|
538
551
|
distance: 5
|
|
539
552
|
}
|
|
540
553
|
})
|
|
541
554
|
);
|
|
542
|
-
|
|
543
|
-
const
|
|
544
|
-
|
|
555
|
+
f.useEffect(() => {
|
|
556
|
+
const h = () => {
|
|
557
|
+
B(null), A(!1);
|
|
545
558
|
};
|
|
546
|
-
return document.body.addEventListener("click",
|
|
547
|
-
|
|
559
|
+
return document.body.addEventListener("click", h), B(null), A(!1), () => {
|
|
560
|
+
B(null), A(!1), document.body.removeEventListener("click", h);
|
|
548
561
|
};
|
|
549
|
-
}, []),
|
|
550
|
-
if (
|
|
551
|
-
const
|
|
552
|
-
|
|
562
|
+
}, []), f.useEffect(() => {
|
|
563
|
+
if (F) {
|
|
564
|
+
const h = [...s].map((N) => N.id === F.id ? F : N);
|
|
565
|
+
i(h);
|
|
553
566
|
}
|
|
554
|
-
}, [
|
|
555
|
-
if (
|
|
556
|
-
const
|
|
557
|
-
let
|
|
558
|
-
|
|
559
|
-
top:
|
|
560
|
-
left:
|
|
567
|
+
}, [F]), f.useEffect(() => {
|
|
568
|
+
if (w.current && x) {
|
|
569
|
+
const h = w.current.getBoundingClientRect().height, N = window.innerHeight;
|
|
570
|
+
let O = x.top;
|
|
571
|
+
O + h > N + window.scrollY - 200 && (O = N + window.scrollY - h - 200), O < 0 && (O = 10), P({
|
|
572
|
+
top: O,
|
|
573
|
+
left: x.left
|
|
561
574
|
});
|
|
562
575
|
}
|
|
563
|
-
}, [
|
|
564
|
-
const
|
|
565
|
-
|
|
566
|
-
const
|
|
567
|
-
|
|
568
|
-
top:
|
|
569
|
-
left:
|
|
570
|
-
}),
|
|
576
|
+
}, [w.current, x]);
|
|
577
|
+
const nt = (h, N) => {
|
|
578
|
+
h.stopPropagation();
|
|
579
|
+
const O = h.target.getBoundingClientRect();
|
|
580
|
+
I({
|
|
581
|
+
top: O.top + window.scrollY - 70,
|
|
582
|
+
left: O.left - (r ? 30 : 65)
|
|
583
|
+
}), B(N), A(!0);
|
|
571
584
|
};
|
|
572
|
-
function
|
|
573
|
-
if (
|
|
574
|
-
return
|
|
585
|
+
function dt(h) {
|
|
586
|
+
if (v)
|
|
587
|
+
return h ? /* @__PURE__ */ t.jsx(
|
|
575
588
|
"img",
|
|
576
589
|
{
|
|
577
|
-
src: `https://imagedelivery.net/${
|
|
590
|
+
src: `https://imagedelivery.net/${h[0]}/w=1000`,
|
|
578
591
|
alt: "image",
|
|
579
592
|
width: 16,
|
|
580
593
|
height: 16
|
|
@@ -589,19 +602,19 @@ const Ye = (d) => {
|
|
|
589
602
|
}
|
|
590
603
|
);
|
|
591
604
|
}
|
|
592
|
-
const
|
|
593
|
-
const { active:
|
|
594
|
-
if (
|
|
595
|
-
const
|
|
596
|
-
if (
|
|
597
|
-
const
|
|
598
|
-
|
|
605
|
+
const y = (h) => {
|
|
606
|
+
const { active: N, over: O } = h;
|
|
607
|
+
if (O && N.id !== O.id) {
|
|
608
|
+
const R = s.findIndex((M) => M.id === N.id), X = s.findIndex((M) => M.id === O.id);
|
|
609
|
+
if (R !== -1 && X !== -1) {
|
|
610
|
+
const M = [...s], [ut] = M.splice(R, 1);
|
|
611
|
+
M.splice(X, 0, ut), i(M);
|
|
599
612
|
}
|
|
600
613
|
}
|
|
601
|
-
},
|
|
602
|
-
var
|
|
603
|
-
const
|
|
604
|
-
|
|
614
|
+
}, U = (h, N) => {
|
|
615
|
+
var R, X;
|
|
616
|
+
const O = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
617
|
+
_ && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
605
618
|
b,
|
|
606
619
|
{
|
|
607
620
|
name: "DotsSixVertical",
|
|
@@ -610,71 +623,73 @@ const Ye = (d) => {
|
|
|
610
623
|
height: 20
|
|
611
624
|
}
|
|
612
625
|
) }),
|
|
613
|
-
|
|
614
|
-
|
|
626
|
+
k === "select" && m && /* @__PURE__ */ t.jsx(
|
|
627
|
+
et,
|
|
615
628
|
{
|
|
616
|
-
onChange: (
|
|
617
|
-
const
|
|
618
|
-
if (!
|
|
619
|
-
const
|
|
620
|
-
...
|
|
629
|
+
onChange: (M) => {
|
|
630
|
+
const ut = [...s], pt = m.find((vt) => vt.name["en-US"] === M);
|
|
631
|
+
if (!pt) return;
|
|
632
|
+
const _t = ut.map((vt) => vt.id === h.id ? {
|
|
633
|
+
...pt,
|
|
621
634
|
name: {
|
|
622
|
-
"en-US":
|
|
635
|
+
"en-US": M
|
|
623
636
|
}
|
|
624
|
-
} :
|
|
625
|
-
|
|
626
|
-
...
|
|
637
|
+
} : vt);
|
|
638
|
+
B({
|
|
639
|
+
...h,
|
|
627
640
|
name: {
|
|
628
|
-
"en-US":
|
|
641
|
+
"en-US": M
|
|
629
642
|
}
|
|
630
|
-
}),
|
|
643
|
+
}), i([..._t]);
|
|
631
644
|
},
|
|
632
|
-
value:
|
|
633
|
-
options:
|
|
634
|
-
leftAddon:
|
|
645
|
+
value: h.name["en-US"],
|
|
646
|
+
options: m.filter((M) => !s.find((ut) => ut.name["en-US"] === M.name["en-US"])).map((M) => M.name["en-US"]),
|
|
647
|
+
leftAddon: dt(h.images)
|
|
635
648
|
}
|
|
636
649
|
),
|
|
637
|
-
|
|
638
|
-
|
|
650
|
+
k === "input" && /* @__PURE__ */ t.jsx(
|
|
651
|
+
tt,
|
|
639
652
|
{
|
|
640
|
-
onChange: (
|
|
641
|
-
const
|
|
642
|
-
...
|
|
653
|
+
onChange: (M) => {
|
|
654
|
+
const pt = [...s].map((_t) => _t.id === h.id ? {
|
|
655
|
+
...h,
|
|
643
656
|
name: {
|
|
644
|
-
"en-US":
|
|
657
|
+
"en-US": M
|
|
645
658
|
}
|
|
646
|
-
} :
|
|
647
|
-
|
|
659
|
+
} : _t);
|
|
660
|
+
i([...pt]);
|
|
648
661
|
},
|
|
649
|
-
value:
|
|
650
|
-
placeholder:
|
|
662
|
+
value: h.name["en-US"],
|
|
663
|
+
placeholder: p
|
|
651
664
|
}
|
|
652
665
|
),
|
|
653
|
-
|
|
654
|
-
|
|
666
|
+
k === "image" && /* @__PURE__ */ t.jsx(
|
|
667
|
+
bt,
|
|
655
668
|
{
|
|
656
|
-
onChange: (
|
|
657
|
-
const
|
|
658
|
-
...
|
|
659
|
-
images:
|
|
660
|
-
} :
|
|
661
|
-
|
|
669
|
+
onChange: (M) => {
|
|
670
|
+
const pt = [...s].map((_t) => _t.id === h.id ? {
|
|
671
|
+
...h,
|
|
672
|
+
images: M
|
|
673
|
+
} : _t);
|
|
674
|
+
i([...pt]);
|
|
662
675
|
},
|
|
663
|
-
activeImage: (
|
|
676
|
+
activeImage: (R = s.find((M) => M.id === h.id)) != null && R.images ? (X = s.find((M) => M.id === h.id)) == null ? void 0 : X.images[0] : void 0
|
|
664
677
|
}
|
|
665
678
|
),
|
|
666
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
667
|
-
|
|
679
|
+
/* @__PURE__ */ t.jsxs("div", { className: z.buttons, children: [
|
|
680
|
+
n && /* @__PURE__ */ t.jsx("div", { className: z.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
668
681
|
b,
|
|
669
682
|
{
|
|
670
683
|
name: "Sliders",
|
|
671
684
|
hoverable: !0,
|
|
672
685
|
width: 20,
|
|
673
686
|
height: 20,
|
|
674
|
-
onClick: (
|
|
687
|
+
onClick: (M) => {
|
|
688
|
+
console.log(M, h), nt(M, h);
|
|
689
|
+
}
|
|
675
690
|
}
|
|
676
691
|
) }),
|
|
677
|
-
|
|
692
|
+
g && /* @__PURE__ */ t.jsx("div", { className: z.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
678
693
|
b,
|
|
679
694
|
{
|
|
680
695
|
name: "Trash",
|
|
@@ -682,69 +697,69 @@ const Ye = (d) => {
|
|
|
682
697
|
width: 20,
|
|
683
698
|
height: 20,
|
|
684
699
|
fill: "#C12A2A",
|
|
685
|
-
onClick: () =>
|
|
700
|
+
onClick: () => i(s.filter((M) => M.id !== h.id))
|
|
686
701
|
}
|
|
687
702
|
) })
|
|
688
703
|
] })
|
|
689
704
|
] });
|
|
690
|
-
return
|
|
691
|
-
|
|
705
|
+
return _ ? /* @__PURE__ */ t.jsx(
|
|
706
|
+
Ye,
|
|
692
707
|
{
|
|
693
|
-
product:
|
|
694
|
-
index:
|
|
695
|
-
children:
|
|
708
|
+
product: h,
|
|
709
|
+
index: N,
|
|
710
|
+
children: O
|
|
696
711
|
},
|
|
697
|
-
|
|
712
|
+
h.id
|
|
698
713
|
) : /* @__PURE__ */ t.jsx(
|
|
699
714
|
"div",
|
|
700
715
|
{
|
|
701
|
-
className:
|
|
702
|
-
children:
|
|
716
|
+
className: z.product,
|
|
717
|
+
children: O
|
|
703
718
|
},
|
|
704
|
-
|
|
719
|
+
h.id
|
|
705
720
|
);
|
|
706
721
|
};
|
|
707
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
708
|
-
(
|
|
709
|
-
|
|
722
|
+
return /* @__PURE__ */ t.jsxs("div", { className: z.productsBlock, children: [
|
|
723
|
+
(l || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: z.top, children: [
|
|
724
|
+
l && /* @__PURE__ */ t.jsx("h3", { className: z.title, children: l }),
|
|
710
725
|
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
711
|
-
|
|
726
|
+
st,
|
|
712
727
|
{
|
|
713
728
|
current: a,
|
|
714
|
-
onChange: (
|
|
729
|
+
onChange: (h) => e == null ? void 0 : e(h)
|
|
715
730
|
}
|
|
716
731
|
)
|
|
717
732
|
] }),
|
|
718
|
-
|
|
719
|
-
|
|
733
|
+
F && n && q && L && /* @__PURE__ */ t.jsx(
|
|
734
|
+
Re,
|
|
720
735
|
{
|
|
721
|
-
ref:
|
|
722
|
-
activeItem:
|
|
723
|
-
setActiveItem:
|
|
724
|
-
popupPosition:
|
|
725
|
-
modalOptions:
|
|
726
|
-
setIsOpenModal:
|
|
736
|
+
ref: w,
|
|
737
|
+
activeItem: F,
|
|
738
|
+
setActiveItem: B,
|
|
739
|
+
popupPosition: j,
|
|
740
|
+
modalOptions: q,
|
|
741
|
+
setIsOpenModal: A
|
|
727
742
|
}
|
|
728
743
|
),
|
|
729
|
-
|
|
730
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
731
|
-
o && /* @__PURE__ */ t.jsx("h5", { className:
|
|
732
|
-
|
|
733
|
-
|
|
744
|
+
$ && H && /* @__PURE__ */ t.jsx(qt, { ...H }),
|
|
745
|
+
/* @__PURE__ */ t.jsxs("div", { className: z.products, children: [
|
|
746
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: z.subtitle, children: o }),
|
|
747
|
+
_ ? /* @__PURE__ */ t.jsx(
|
|
748
|
+
$t,
|
|
734
749
|
{
|
|
735
|
-
sensors:
|
|
736
|
-
onDragEnd:
|
|
750
|
+
sensors: D,
|
|
751
|
+
onDragEnd: y,
|
|
737
752
|
children: /* @__PURE__ */ t.jsx(
|
|
738
|
-
|
|
753
|
+
It,
|
|
739
754
|
{
|
|
740
|
-
items: s.map((
|
|
741
|
-
strategy:
|
|
742
|
-
children: s.map((
|
|
755
|
+
items: s.map((h) => h.id),
|
|
756
|
+
strategy: Nt,
|
|
757
|
+
children: s.map((h, N) => U(h, N))
|
|
743
758
|
}
|
|
744
759
|
)
|
|
745
760
|
}
|
|
746
|
-
) : s.map((
|
|
747
|
-
|
|
761
|
+
) : s.map((h, N) => U(h, N)),
|
|
762
|
+
r && /* @__PURE__ */ t.jsx(
|
|
748
763
|
"div",
|
|
749
764
|
{
|
|
750
765
|
style: {
|
|
@@ -753,46 +768,46 @@ const Ye = (d) => {
|
|
|
753
768
|
justifyContent: "center"
|
|
754
769
|
},
|
|
755
770
|
children: /* @__PURE__ */ t.jsx(
|
|
756
|
-
|
|
771
|
+
ot,
|
|
757
772
|
{
|
|
758
773
|
withoutHover: !0,
|
|
759
|
-
className:
|
|
760
|
-
[
|
|
774
|
+
className: Y(z.button, {
|
|
775
|
+
[z.disabled]: !!(S && S <= s.length || s.length === (m == null ? void 0 : m.length))
|
|
761
776
|
}),
|
|
762
777
|
size: "s",
|
|
763
|
-
disabled: !!(
|
|
778
|
+
disabled: !!(S && S <= s.length || s.length === (m == null ? void 0 : m.length)),
|
|
764
779
|
onClick: () => {
|
|
765
|
-
const
|
|
766
|
-
let
|
|
767
|
-
if (
|
|
768
|
-
for (let
|
|
769
|
-
if (!s.find((
|
|
770
|
-
|
|
780
|
+
const h = [...s];
|
|
781
|
+
let N = null;
|
|
782
|
+
if (m) {
|
|
783
|
+
for (let O = 0; O < m.length; O++)
|
|
784
|
+
if (!s.find((R) => R.id === m[O].id)) {
|
|
785
|
+
N = m[O];
|
|
771
786
|
break;
|
|
772
787
|
}
|
|
773
788
|
}
|
|
774
|
-
|
|
775
|
-
name:
|
|
776
|
-
id: (
|
|
777
|
-
...
|
|
778
|
-
}) :
|
|
789
|
+
k === "select" && m ? h.push({
|
|
790
|
+
name: N ? N.name : m[0].name,
|
|
791
|
+
id: (N == null ? void 0 : N.id) || m[0].id,
|
|
792
|
+
...u
|
|
793
|
+
}) : k === "input" ? h.push({
|
|
779
794
|
name: {
|
|
780
795
|
"en-US": ""
|
|
781
796
|
},
|
|
782
797
|
id: mt(),
|
|
783
|
-
...
|
|
784
|
-
}) :
|
|
798
|
+
...u
|
|
799
|
+
}) : h.push({
|
|
785
800
|
name: {
|
|
786
801
|
"en-US": `Image ${s.length + 1}`
|
|
787
802
|
},
|
|
788
803
|
id: mt(),
|
|
789
|
-
...
|
|
790
|
-
}),
|
|
804
|
+
...u
|
|
805
|
+
}), i(h);
|
|
791
806
|
},
|
|
792
807
|
style: {
|
|
793
808
|
width: "fit-content"
|
|
794
809
|
},
|
|
795
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
810
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: z.addButton, children: [
|
|
796
811
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
797
812
|
/* @__PURE__ */ t.jsx(
|
|
798
813
|
b,
|
|
@@ -808,14 +823,14 @@ const Ye = (d) => {
|
|
|
808
823
|
}
|
|
809
824
|
)
|
|
810
825
|
] }),
|
|
811
|
-
c !== void 0 && /* @__PURE__ */ t.jsx(
|
|
826
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(Tt, { items: c }),
|
|
812
827
|
E !== void 0 && /* @__PURE__ */ t.jsx(
|
|
813
|
-
|
|
828
|
+
tt,
|
|
814
829
|
{
|
|
815
|
-
label: "Auto scroll interval",
|
|
830
|
+
label: E.title || "Auto scroll interval",
|
|
816
831
|
type: "number",
|
|
817
|
-
value: String(E.
|
|
818
|
-
onChange: (
|
|
832
|
+
value: String(E.autoInterval),
|
|
833
|
+
onChange: (h) => E.setAutoInterval(Number(h)),
|
|
819
834
|
min: 0.1,
|
|
820
835
|
max: 100,
|
|
821
836
|
style: {
|
|
@@ -825,55 +840,55 @@ const Ye = (d) => {
|
|
|
825
840
|
}
|
|
826
841
|
)
|
|
827
842
|
] });
|
|
828
|
-
},
|
|
829
|
-
title:
|
|
830
|
-
subtitle:
|
|
831
|
-
header:
|
|
832
|
-
text:
|
|
833
|
-
productsBlock:
|
|
834
|
-
top:
|
|
835
|
-
itemsBlock:
|
|
836
|
-
typeTexts:
|
|
837
|
-
block:
|
|
838
|
-
active:
|
|
839
|
-
products:
|
|
840
|
-
product:
|
|
841
|
-
button:
|
|
842
|
-
disabled:
|
|
843
|
-
image:
|
|
844
|
-
info:
|
|
845
|
-
name:
|
|
846
|
-
buttons:
|
|
847
|
-
modal:
|
|
848
|
-
link:
|
|
849
|
-
modalOptions:
|
|
843
|
+
}, Xe = "_title_82zux_1", We = "_subtitle_82zux_5", Je = "_header_82zux_12", Qe = "_text_82zux_13", Ke = "_productsBlock_82zux_14", Ze = "_top_82zux_26", ts = "_itemsBlock_82zux_35", es = "_typeTexts_82zux_41", ss = "_block_82zux_48", ns = "_active_82zux_61", is = "_products_82zux_14", os = "_product_82zux_14", as = "_button_82zux_80", cs = "_disabled_82zux_91", ls = "_image_82zux_95", rs = "_info_82zux_102", ds = "_name_82zux_114", us = "_buttons_82zux_118", _s = "_modal_82zux_125", ms = "_link_82zux_145", ps = "_modalOptions_82zux_151", hs = "_addButton_82zux_157", fs = "_deleteButton_82zux_179", Z = {
|
|
844
|
+
title: Xe,
|
|
845
|
+
subtitle: We,
|
|
846
|
+
header: Je,
|
|
847
|
+
text: Qe,
|
|
848
|
+
productsBlock: Ke,
|
|
849
|
+
top: Ze,
|
|
850
|
+
itemsBlock: ts,
|
|
851
|
+
typeTexts: es,
|
|
852
|
+
block: ss,
|
|
853
|
+
active: ns,
|
|
854
|
+
products: is,
|
|
855
|
+
product: os,
|
|
856
|
+
button: as,
|
|
857
|
+
disabled: cs,
|
|
858
|
+
image: ls,
|
|
859
|
+
info: rs,
|
|
860
|
+
name: ds,
|
|
861
|
+
buttons: us,
|
|
862
|
+
modal: _s,
|
|
863
|
+
link: ms,
|
|
864
|
+
modalOptions: ps,
|
|
850
865
|
addButton: hs,
|
|
851
|
-
deleteButton:
|
|
852
|
-
},
|
|
866
|
+
deleteButton: fs
|
|
867
|
+
}, Ja = (d) => {
|
|
853
868
|
const {
|
|
854
869
|
isActiveItems: a,
|
|
855
870
|
setIsActiveItems: e,
|
|
856
871
|
items: s,
|
|
857
|
-
setItems:
|
|
872
|
+
setItems: i,
|
|
858
873
|
other: c,
|
|
859
|
-
title:
|
|
874
|
+
title: l,
|
|
860
875
|
subtitle: o,
|
|
861
|
-
draggable:
|
|
862
|
-
withImage:
|
|
863
|
-
addable:
|
|
864
|
-
itemsOptions:
|
|
865
|
-
hasRangeSelector:
|
|
866
|
-
rangeSelectorOptions:
|
|
867
|
-
limit:
|
|
868
|
-
autoScrollInterval:
|
|
869
|
-
deletable:
|
|
876
|
+
draggable: n = !1,
|
|
877
|
+
withImage: _ = !1,
|
|
878
|
+
addable: v = !0,
|
|
879
|
+
itemsOptions: g,
|
|
880
|
+
hasRangeSelector: r = !1,
|
|
881
|
+
rangeSelectorOptions: k,
|
|
882
|
+
limit: p,
|
|
883
|
+
autoScrollInterval: m,
|
|
884
|
+
deletable: $
|
|
870
885
|
} = d;
|
|
871
|
-
function
|
|
872
|
-
if (
|
|
873
|
-
return
|
|
886
|
+
function H(u) {
|
|
887
|
+
if (_)
|
|
888
|
+
return u ? /* @__PURE__ */ t.jsx(
|
|
874
889
|
"img",
|
|
875
890
|
{
|
|
876
|
-
src: `https://imagedelivery.net/${
|
|
891
|
+
src: `https://imagedelivery.net/${u[0]}/w=1000`,
|
|
877
892
|
alt: "image",
|
|
878
893
|
width: 16,
|
|
879
894
|
height: 16
|
|
@@ -888,11 +903,11 @@ const Ye = (d) => {
|
|
|
888
903
|
}
|
|
889
904
|
);
|
|
890
905
|
}
|
|
891
|
-
const
|
|
892
|
-
const E =
|
|
906
|
+
const q = (u, S = !1) => {
|
|
907
|
+
const E = g.find((B) => B.id === u);
|
|
893
908
|
if (!E) return;
|
|
894
|
-
const
|
|
895
|
-
|
|
909
|
+
const F = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
910
|
+
n && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
896
911
|
b,
|
|
897
912
|
{
|
|
898
913
|
name: "DotsSixVertical",
|
|
@@ -902,20 +917,20 @@ const Ye = (d) => {
|
|
|
902
917
|
}
|
|
903
918
|
) }),
|
|
904
919
|
/* @__PURE__ */ t.jsx(
|
|
905
|
-
|
|
920
|
+
et,
|
|
906
921
|
{
|
|
907
|
-
onChange: (
|
|
908
|
-
const
|
|
909
|
-
if (!
|
|
910
|
-
const
|
|
911
|
-
|
|
922
|
+
onChange: (B) => {
|
|
923
|
+
const j = [...s], P = g.find((w) => w.name === B);
|
|
924
|
+
if (!P) return;
|
|
925
|
+
const x = P.id, I = j.map((w) => w === u ? x : w);
|
|
926
|
+
i([...I]);
|
|
912
927
|
},
|
|
913
928
|
value: E.name,
|
|
914
|
-
options:
|
|
915
|
-
leftAddon:
|
|
929
|
+
options: g.filter((B) => !s.find((j) => j === B.id)).map((B) => B.name),
|
|
930
|
+
leftAddon: H(E.images)
|
|
916
931
|
}
|
|
917
932
|
),
|
|
918
|
-
|
|
933
|
+
S && /* @__PURE__ */ t.jsx("div", { className: Z.buttons, children: /* @__PURE__ */ t.jsx("div", { className: Z.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
919
934
|
b,
|
|
920
935
|
{
|
|
921
936
|
name: "Trash",
|
|
@@ -923,35 +938,35 @@ const Ye = (d) => {
|
|
|
923
938
|
width: 20,
|
|
924
939
|
height: 20,
|
|
925
940
|
fill: "#C12A2A",
|
|
926
|
-
onClick: () =>
|
|
941
|
+
onClick: () => i(s.filter((B) => B !== u))
|
|
927
942
|
}
|
|
928
943
|
) }) })
|
|
929
944
|
] });
|
|
930
945
|
return /* @__PURE__ */ t.jsx(
|
|
931
946
|
"div",
|
|
932
947
|
{
|
|
933
|
-
className:
|
|
934
|
-
children:
|
|
948
|
+
className: Z.product,
|
|
949
|
+
children: F
|
|
935
950
|
},
|
|
936
|
-
|
|
951
|
+
u
|
|
937
952
|
);
|
|
938
953
|
};
|
|
939
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
940
|
-
(
|
|
941
|
-
|
|
954
|
+
return /* @__PURE__ */ t.jsxs("div", { className: Z.productsBlock, children: [
|
|
955
|
+
(l || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Z.top, children: [
|
|
956
|
+
l && /* @__PURE__ */ t.jsx("h3", { className: Z.title, children: l }),
|
|
942
957
|
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
943
|
-
|
|
958
|
+
st,
|
|
944
959
|
{
|
|
945
960
|
current: a,
|
|
946
|
-
onChange: (
|
|
961
|
+
onChange: (u) => e == null ? void 0 : e(u)
|
|
947
962
|
}
|
|
948
963
|
)
|
|
949
964
|
] }),
|
|
950
|
-
|
|
951
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
952
|
-
o && /* @__PURE__ */ t.jsx("h5", { className:
|
|
953
|
-
s.map((
|
|
954
|
-
|
|
965
|
+
r && k && /* @__PURE__ */ t.jsx(qt, { ...k }),
|
|
966
|
+
/* @__PURE__ */ t.jsxs("div", { className: Z.products, children: [
|
|
967
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: Z.subtitle, children: o }),
|
|
968
|
+
s.map((u) => q(u, $)),
|
|
969
|
+
v && /* @__PURE__ */ t.jsx(
|
|
955
970
|
"div",
|
|
956
971
|
{
|
|
957
972
|
style: {
|
|
@@ -961,30 +976,30 @@ const Ye = (d) => {
|
|
|
961
976
|
gap: 5
|
|
962
977
|
},
|
|
963
978
|
children: /* @__PURE__ */ t.jsx(
|
|
964
|
-
|
|
979
|
+
ot,
|
|
965
980
|
{
|
|
966
981
|
withoutHover: !0,
|
|
967
|
-
className:
|
|
968
|
-
[
|
|
982
|
+
className: Y(Z.button, {
|
|
983
|
+
[Z.disabled]: !!(p && p <= s.length || s.length === g.length)
|
|
969
984
|
}),
|
|
970
985
|
size: "s",
|
|
971
|
-
disabled: !!(
|
|
986
|
+
disabled: !!(p && p <= s.length || s.length === g.length),
|
|
972
987
|
onClick: () => {
|
|
973
|
-
const
|
|
974
|
-
let
|
|
975
|
-
if (
|
|
976
|
-
for (let E = 0; E <
|
|
977
|
-
if (!s.find((
|
|
978
|
-
|
|
988
|
+
const u = [...s];
|
|
989
|
+
let S = null;
|
|
990
|
+
if (g) {
|
|
991
|
+
for (let E = 0; E < g.length; E++)
|
|
992
|
+
if (!s.find((F) => F === g[E].id)) {
|
|
993
|
+
S = g[E];
|
|
979
994
|
break;
|
|
980
995
|
}
|
|
981
996
|
}
|
|
982
|
-
|
|
997
|
+
u.push((S == null ? void 0 : S.id) || g[0].id), i(u);
|
|
983
998
|
},
|
|
984
999
|
style: {
|
|
985
1000
|
width: "fit-content"
|
|
986
1001
|
},
|
|
987
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
1002
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: Z.addButton, children: [
|
|
988
1003
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
989
1004
|
/* @__PURE__ */ t.jsx(
|
|
990
1005
|
b,
|
|
@@ -1000,14 +1015,14 @@ const Ye = (d) => {
|
|
|
1000
1015
|
}
|
|
1001
1016
|
)
|
|
1002
1017
|
] }),
|
|
1003
|
-
c !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1004
|
-
|
|
1005
|
-
|
|
1018
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(Tt, { items: c }),
|
|
1019
|
+
m !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1020
|
+
tt,
|
|
1006
1021
|
{
|
|
1007
1022
|
label: "Auto scroll interval",
|
|
1008
1023
|
type: "number",
|
|
1009
|
-
value: String(
|
|
1010
|
-
onChange: (
|
|
1024
|
+
value: String(m.scrollInterval),
|
|
1025
|
+
onChange: (u) => m.setScrollInterval(Number(u)),
|
|
1011
1026
|
min: 0.1,
|
|
1012
1027
|
max: 100,
|
|
1013
1028
|
style: {
|
|
@@ -1017,50 +1032,305 @@ const Ye = (d) => {
|
|
|
1017
1032
|
}
|
|
1018
1033
|
)
|
|
1019
1034
|
] });
|
|
1020
|
-
},
|
|
1021
|
-
title:
|
|
1022
|
-
subtitle:
|
|
1023
|
-
header:
|
|
1024
|
-
text:
|
|
1025
|
-
productsBlock:
|
|
1026
|
-
top:
|
|
1027
|
-
itemsBlock:
|
|
1028
|
-
typeTexts:
|
|
1035
|
+
}, gs = "_title_roi3a_1", xs = "_subtitle_roi3a_5", bs = "_header_roi3a_12", vs = "_text_roi3a_13", js = "_productsBlock_roi3a_14", ys = "_top_roi3a_26", ks = "_itemsBlock_roi3a_35", $s = "_typeTexts_roi3a_41", Is = "_block_roi3a_48", Ns = "_active_roi3a_61", ws = "_products_roi3a_14", Cs = "_product_roi3a_14", Ss = "_button_roi3a_80", Bs = "_disabled_roi3a_91", Ts = "_image_roi3a_95", Ps = "_info_roi3a_102", As = "_name_roi3a_114", Os = "_buttons_roi3a_118", Ms = "_modal_roi3a_125", qs = "_link_roi3a_145", Es = "_modalOptions_roi3a_151", Us = "_addButton_roi3a_164", Ds = "_deleteButton_roi3a_179", Ls = "_closeIcon_roi3a_191", J = {
|
|
1036
|
+
title: gs,
|
|
1037
|
+
subtitle: xs,
|
|
1038
|
+
header: bs,
|
|
1039
|
+
text: vs,
|
|
1040
|
+
productsBlock: js,
|
|
1041
|
+
top: ys,
|
|
1042
|
+
itemsBlock: ks,
|
|
1043
|
+
typeTexts: $s,
|
|
1029
1044
|
block: Is,
|
|
1030
|
-
active:
|
|
1031
|
-
products:
|
|
1032
|
-
product:
|
|
1045
|
+
active: Ns,
|
|
1046
|
+
products: ws,
|
|
1047
|
+
product: Cs,
|
|
1033
1048
|
button: Ss,
|
|
1034
|
-
disabled:
|
|
1035
|
-
image:
|
|
1036
|
-
info:
|
|
1037
|
-
name:
|
|
1038
|
-
buttons:
|
|
1049
|
+
disabled: Bs,
|
|
1050
|
+
image: Ts,
|
|
1051
|
+
info: Ps,
|
|
1052
|
+
name: As,
|
|
1053
|
+
buttons: Os,
|
|
1039
1054
|
modal: Ms,
|
|
1040
|
-
link:
|
|
1041
|
-
modalOptions:
|
|
1042
|
-
addButton:
|
|
1043
|
-
deleteButton:
|
|
1044
|
-
closeIcon:
|
|
1045
|
-
}
|
|
1055
|
+
link: qs,
|
|
1056
|
+
modalOptions: Es,
|
|
1057
|
+
addButton: Us,
|
|
1058
|
+
deleteButton: Ds,
|
|
1059
|
+
closeIcon: Ls
|
|
1060
|
+
};
|
|
1061
|
+
function Hs({ product: d, children: a }) {
|
|
1062
|
+
const {
|
|
1063
|
+
attributes: e,
|
|
1064
|
+
listeners: s,
|
|
1065
|
+
setNodeRef: i,
|
|
1066
|
+
transform: c,
|
|
1067
|
+
transition: l,
|
|
1068
|
+
isDragging: o
|
|
1069
|
+
} = Ct({
|
|
1070
|
+
id: d.id
|
|
1071
|
+
}), n = {
|
|
1072
|
+
transform: St.Transform.toString(c),
|
|
1073
|
+
transition: l
|
|
1074
|
+
};
|
|
1075
|
+
return /* @__PURE__ */ t.jsx(
|
|
1076
|
+
"div",
|
|
1077
|
+
{
|
|
1078
|
+
ref: i,
|
|
1079
|
+
style: n,
|
|
1080
|
+
className: `${J.product} ${o ? J.dragging : ""}`,
|
|
1081
|
+
...e,
|
|
1082
|
+
...s,
|
|
1083
|
+
children: a
|
|
1084
|
+
}
|
|
1085
|
+
);
|
|
1086
|
+
}
|
|
1087
|
+
const Qa = (d) => {
|
|
1088
|
+
const {
|
|
1089
|
+
isActiveItems: a,
|
|
1090
|
+
setIsActiveItems: e,
|
|
1091
|
+
items: s,
|
|
1092
|
+
setItems: i,
|
|
1093
|
+
title: c,
|
|
1094
|
+
subtitle: l,
|
|
1095
|
+
editable: o = !0,
|
|
1096
|
+
draggable: n = !1,
|
|
1097
|
+
deletable: _ = !0,
|
|
1098
|
+
addable: v = !0,
|
|
1099
|
+
itemsType: g,
|
|
1100
|
+
itemsOptions: r,
|
|
1101
|
+
addableOptions: k = {},
|
|
1102
|
+
limit: p
|
|
1103
|
+
} = d, [m, $] = f.useState(null), [H, q] = f.useState(null), u = f.useRef(null), S = yt(
|
|
1104
|
+
kt(wt, {
|
|
1105
|
+
activationConstraint: {
|
|
1106
|
+
distance: 5
|
|
1107
|
+
}
|
|
1108
|
+
})
|
|
1109
|
+
);
|
|
1110
|
+
f.useEffect(() => {
|
|
1111
|
+
if (m) {
|
|
1112
|
+
const j = [...s].map((P) => P.id === m.id ? m : P);
|
|
1113
|
+
i(j);
|
|
1114
|
+
}
|
|
1115
|
+
}, [m]), f.useEffect(() => {
|
|
1116
|
+
u.current && H && (u.current.getBoundingClientRect().height, H.top);
|
|
1117
|
+
}, [u.current, H]);
|
|
1118
|
+
const E = (j, P) => {
|
|
1119
|
+
j.stopPropagation();
|
|
1120
|
+
const x = j.target.getBoundingClientRect();
|
|
1121
|
+
q({
|
|
1122
|
+
top: x.top + window.scrollY,
|
|
1123
|
+
left: x.left - 30
|
|
1124
|
+
}), $(P);
|
|
1125
|
+
}, F = (j) => {
|
|
1126
|
+
const { active: P, over: x } = j;
|
|
1127
|
+
if (x && P.id !== x.id) {
|
|
1128
|
+
const I = s.findIndex((L) => L.id === P.id), w = s.findIndex((L) => L.id === x.id);
|
|
1129
|
+
if (I !== -1 && w !== -1) {
|
|
1130
|
+
const L = [...s], [A] = L.splice(I, 1);
|
|
1131
|
+
L.splice(w, 0, A), i(L);
|
|
1132
|
+
}
|
|
1133
|
+
}
|
|
1134
|
+
}, B = (j, P) => {
|
|
1135
|
+
const x = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1136
|
+
n && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1137
|
+
b,
|
|
1138
|
+
{
|
|
1139
|
+
name: "DotsSixVertical",
|
|
1140
|
+
hoverable: !0,
|
|
1141
|
+
width: 20,
|
|
1142
|
+
height: 20
|
|
1143
|
+
}
|
|
1144
|
+
) }),
|
|
1145
|
+
g === "select" && r && /* @__PURE__ */ t.jsx(
|
|
1146
|
+
et,
|
|
1147
|
+
{
|
|
1148
|
+
onChange: (I) => {
|
|
1149
|
+
const w = [...s], L = r.find((D) => D.name === I);
|
|
1150
|
+
if (!L) return;
|
|
1151
|
+
const A = w.map((D) => D.id === j.id ? {
|
|
1152
|
+
...L,
|
|
1153
|
+
name: {
|
|
1154
|
+
"en-US": I
|
|
1155
|
+
}
|
|
1156
|
+
} : D);
|
|
1157
|
+
$({
|
|
1158
|
+
...j,
|
|
1159
|
+
name: {
|
|
1160
|
+
"en-US": I
|
|
1161
|
+
}
|
|
1162
|
+
}), i([...A]);
|
|
1163
|
+
},
|
|
1164
|
+
value: j.name,
|
|
1165
|
+
options: r.filter((I) => !s.find((w) => w.name === I.name)).map((I) => I.name)
|
|
1166
|
+
}
|
|
1167
|
+
),
|
|
1168
|
+
/* @__PURE__ */ t.jsxs("div", { className: J.buttons, children: [
|
|
1169
|
+
o && /* @__PURE__ */ t.jsx("div", { className: J.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1170
|
+
b,
|
|
1171
|
+
{
|
|
1172
|
+
name: "Sliders",
|
|
1173
|
+
hoverable: !0,
|
|
1174
|
+
width: 20,
|
|
1175
|
+
height: 20,
|
|
1176
|
+
onClick: (I) => E(I, j)
|
|
1177
|
+
}
|
|
1178
|
+
) }),
|
|
1179
|
+
_ && /* @__PURE__ */ t.jsx("div", { className: J.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1180
|
+
b,
|
|
1181
|
+
{
|
|
1182
|
+
name: "Trash",
|
|
1183
|
+
hoverable: !0,
|
|
1184
|
+
width: 20,
|
|
1185
|
+
height: 20,
|
|
1186
|
+
fill: "#C12A2A",
|
|
1187
|
+
onClick: () => i(s.filter((I) => I.id !== j.id))
|
|
1188
|
+
}
|
|
1189
|
+
) })
|
|
1190
|
+
] })
|
|
1191
|
+
] });
|
|
1192
|
+
return n ? /* @__PURE__ */ t.jsx(
|
|
1193
|
+
Hs,
|
|
1194
|
+
{
|
|
1195
|
+
product: j,
|
|
1196
|
+
index: P,
|
|
1197
|
+
children: x
|
|
1198
|
+
},
|
|
1199
|
+
j.id
|
|
1200
|
+
) : /* @__PURE__ */ t.jsx(
|
|
1201
|
+
"div",
|
|
1202
|
+
{
|
|
1203
|
+
className: J.product,
|
|
1204
|
+
children: x
|
|
1205
|
+
},
|
|
1206
|
+
j.id
|
|
1207
|
+
);
|
|
1208
|
+
};
|
|
1209
|
+
return /* @__PURE__ */ t.jsxs("div", { className: J.productsBlock, children: [
|
|
1210
|
+
(c || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: J.top, children: [
|
|
1211
|
+
c && /* @__PURE__ */ t.jsx("h3", { className: J.title, children: c }),
|
|
1212
|
+
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1213
|
+
st,
|
|
1214
|
+
{
|
|
1215
|
+
current: a,
|
|
1216
|
+
onChange: (j) => e == null ? void 0 : e(j)
|
|
1217
|
+
}
|
|
1218
|
+
)
|
|
1219
|
+
] }),
|
|
1220
|
+
/* @__PURE__ */ t.jsxs("div", { className: J.products, children: [
|
|
1221
|
+
l && /* @__PURE__ */ t.jsx("h5", { className: J.subtitle, children: l }),
|
|
1222
|
+
n ? /* @__PURE__ */ t.jsx(
|
|
1223
|
+
$t,
|
|
1224
|
+
{
|
|
1225
|
+
sensors: S,
|
|
1226
|
+
onDragEnd: F,
|
|
1227
|
+
children: /* @__PURE__ */ t.jsx(
|
|
1228
|
+
It,
|
|
1229
|
+
{
|
|
1230
|
+
items: s.map((j) => j.id),
|
|
1231
|
+
strategy: Nt,
|
|
1232
|
+
children: s.map((j, P) => B(j, P))
|
|
1233
|
+
}
|
|
1234
|
+
)
|
|
1235
|
+
}
|
|
1236
|
+
) : s.map((j, P) => B(j, P)),
|
|
1237
|
+
v && /* @__PURE__ */ t.jsx(
|
|
1238
|
+
"div",
|
|
1239
|
+
{
|
|
1240
|
+
style: {
|
|
1241
|
+
width: "100%",
|
|
1242
|
+
display: "flex",
|
|
1243
|
+
justifyContent: "center"
|
|
1244
|
+
},
|
|
1245
|
+
children: /* @__PURE__ */ t.jsx(
|
|
1246
|
+
ot,
|
|
1247
|
+
{
|
|
1248
|
+
withoutHover: !0,
|
|
1249
|
+
className: Y(J.button, {
|
|
1250
|
+
[J.disabled]: !!(p && p <= s.length || s.length === (r == null ? void 0 : r.length))
|
|
1251
|
+
}),
|
|
1252
|
+
size: "s",
|
|
1253
|
+
disabled: !!(p && p <= s.length || s.length === (r == null ? void 0 : r.length)),
|
|
1254
|
+
onClick: () => {
|
|
1255
|
+
const j = [...s];
|
|
1256
|
+
let P = null;
|
|
1257
|
+
if (r) {
|
|
1258
|
+
for (let x = 0; x < r.length; x++)
|
|
1259
|
+
if (!s.find((I) => I.id === r[x].id)) {
|
|
1260
|
+
P = r[x];
|
|
1261
|
+
break;
|
|
1262
|
+
}
|
|
1263
|
+
}
|
|
1264
|
+
g === "select" && r && j.push({
|
|
1265
|
+
name: P ? P.name : r[0].name,
|
|
1266
|
+
id: (P == null ? void 0 : P.id) || r[0].id,
|
|
1267
|
+
...k
|
|
1268
|
+
}), i(j);
|
|
1269
|
+
},
|
|
1270
|
+
style: {
|
|
1271
|
+
width: "fit-content"
|
|
1272
|
+
},
|
|
1273
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: J.addButton, children: [
|
|
1274
|
+
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1275
|
+
/* @__PURE__ */ t.jsx(
|
|
1276
|
+
b,
|
|
1277
|
+
{
|
|
1278
|
+
name: "Plus",
|
|
1279
|
+
width: 16,
|
|
1280
|
+
height: 16
|
|
1281
|
+
}
|
|
1282
|
+
)
|
|
1283
|
+
] })
|
|
1284
|
+
}
|
|
1285
|
+
)
|
|
1286
|
+
}
|
|
1287
|
+
)
|
|
1288
|
+
] })
|
|
1289
|
+
] });
|
|
1290
|
+
}, Rs = "_title_1vfw9_1", zs = "_subtitle_1vfw9_5", Fs = "_header_1vfw9_12", Vs = "_text_1vfw9_13", Ys = "_productsBlock_1vfw9_14", Gs = "_top_1vfw9_26", Xs = "_itemsBlock_1vfw9_35", Ws = "_typeTexts_1vfw9_41", Js = "_block_1vfw9_48", Qs = "_active_1vfw9_61", Ks = "_products_1vfw9_14", Zs = "_product_1vfw9_14", tn = "_button_1vfw9_80", en = "_disabled_1vfw9_91", sn = "_image_1vfw9_95", nn = "_info_1vfw9_102", on = "_name_1vfw9_114", an = "_buttons_1vfw9_118", cn = "_modal_1vfw9_125", ln = "_link_1vfw9_145", rn = "_modalOptions_1vfw9_151", dn = "_addButton_1vfw9_164", un = "_deleteButton_1vfw9_179", _n = "_closeIcon_1vfw9_191", V = {
|
|
1291
|
+
title: Rs,
|
|
1292
|
+
subtitle: zs,
|
|
1293
|
+
header: Fs,
|
|
1294
|
+
text: Vs,
|
|
1295
|
+
productsBlock: Ys,
|
|
1296
|
+
top: Gs,
|
|
1297
|
+
itemsBlock: Xs,
|
|
1298
|
+
typeTexts: Ws,
|
|
1299
|
+
block: Js,
|
|
1300
|
+
active: Qs,
|
|
1301
|
+
products: Ks,
|
|
1302
|
+
product: Zs,
|
|
1303
|
+
button: tn,
|
|
1304
|
+
disabled: en,
|
|
1305
|
+
image: sn,
|
|
1306
|
+
info: nn,
|
|
1307
|
+
name: on,
|
|
1308
|
+
buttons: an,
|
|
1309
|
+
modal: cn,
|
|
1310
|
+
link: ln,
|
|
1311
|
+
modalOptions: rn,
|
|
1312
|
+
addButton: dn,
|
|
1313
|
+
deleteButton: un,
|
|
1314
|
+
closeIcon: _n
|
|
1315
|
+
}, mn = f.forwardRef(
|
|
1046
1316
|
(d, a) => {
|
|
1047
|
-
const { activeItem: e, setActiveItem: s, popupPosition:
|
|
1317
|
+
const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: c, setIsOpenModal: l } = d;
|
|
1048
1318
|
return /* @__PURE__ */ t.jsxs(
|
|
1049
1319
|
"div",
|
|
1050
1320
|
{
|
|
1051
1321
|
ref: a,
|
|
1052
|
-
className:
|
|
1322
|
+
className: V.modal,
|
|
1053
1323
|
onClick: (o) => {
|
|
1054
1324
|
o.stopPropagation();
|
|
1055
1325
|
},
|
|
1056
1326
|
style: {
|
|
1057
|
-
top: `${
|
|
1058
|
-
left: `${
|
|
1327
|
+
top: `${i.top}px`,
|
|
1328
|
+
left: `${i.left}px`
|
|
1059
1329
|
},
|
|
1060
1330
|
children: [
|
|
1061
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1062
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
1063
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1331
|
+
/* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
|
|
1332
|
+
/* @__PURE__ */ t.jsx("h3", { className: V.title, children: e.name["en-US"] }),
|
|
1333
|
+
/* @__PURE__ */ t.jsx("div", { className: V.closeIcon, children: /* @__PURE__ */ t.jsx(
|
|
1064
1334
|
b,
|
|
1065
1335
|
{
|
|
1066
1336
|
name: "X",
|
|
@@ -1068,71 +1338,71 @@ const Ye = (d) => {
|
|
|
1068
1338
|
width: 20,
|
|
1069
1339
|
hoverable: !0,
|
|
1070
1340
|
onClick: () => {
|
|
1071
|
-
s(null),
|
|
1341
|
+
s(null), l(!1);
|
|
1072
1342
|
}
|
|
1073
1343
|
}
|
|
1074
1344
|
) })
|
|
1075
1345
|
] }),
|
|
1076
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1346
|
+
/* @__PURE__ */ t.jsx("div", { className: V.modalOptions, children: c.map((o) => {
|
|
1077
1347
|
if (o.type === "image")
|
|
1078
1348
|
return /* @__PURE__ */ t.jsx(
|
|
1079
|
-
|
|
1349
|
+
bt,
|
|
1080
1350
|
{
|
|
1081
1351
|
label: "Put up an attractive image",
|
|
1082
1352
|
activeImage: e[o.field],
|
|
1083
|
-
onChange: (
|
|
1084
|
-
const
|
|
1353
|
+
onChange: (n) => {
|
|
1354
|
+
const _ = {
|
|
1085
1355
|
...e,
|
|
1086
|
-
[o.field]:
|
|
1356
|
+
[o.field]: n
|
|
1087
1357
|
};
|
|
1088
|
-
s(
|
|
1358
|
+
s(_);
|
|
1089
1359
|
}
|
|
1090
1360
|
},
|
|
1091
1361
|
String(o.field)
|
|
1092
1362
|
);
|
|
1093
1363
|
if (o.type === "text")
|
|
1094
1364
|
return /* @__PURE__ */ t.jsx(
|
|
1095
|
-
|
|
1365
|
+
Rt,
|
|
1096
1366
|
{
|
|
1097
1367
|
typesText: e[o.field.type],
|
|
1098
|
-
setTypesText: (
|
|
1099
|
-
const
|
|
1368
|
+
setTypesText: (n) => {
|
|
1369
|
+
const _ = {
|
|
1100
1370
|
...e,
|
|
1101
|
-
[o.field.type]:
|
|
1371
|
+
[o.field.type]: n
|
|
1102
1372
|
};
|
|
1103
|
-
s(
|
|
1373
|
+
s(_);
|
|
1104
1374
|
},
|
|
1105
1375
|
text: e[o.field.text]["en-US"] || "",
|
|
1106
|
-
setText: (
|
|
1107
|
-
const
|
|
1376
|
+
setText: (n) => {
|
|
1377
|
+
const _ = {
|
|
1108
1378
|
...e,
|
|
1109
1379
|
[o.field.text]: {
|
|
1110
|
-
"en-US":
|
|
1380
|
+
"en-US": n
|
|
1111
1381
|
}
|
|
1112
1382
|
};
|
|
1113
|
-
s(
|
|
1383
|
+
s(_);
|
|
1114
1384
|
},
|
|
1115
1385
|
typeFont: e[o.field.type],
|
|
1116
|
-
setTypeFont: (
|
|
1117
|
-
const
|
|
1386
|
+
setTypeFont: (n) => {
|
|
1387
|
+
const _ = {
|
|
1118
1388
|
...e,
|
|
1119
|
-
[o.field.type]:
|
|
1389
|
+
[o.field.type]: n
|
|
1120
1390
|
};
|
|
1121
|
-
s(
|
|
1391
|
+
s(_);
|
|
1122
1392
|
},
|
|
1123
1393
|
subtitle: o.label
|
|
1124
1394
|
}
|
|
1125
1395
|
);
|
|
1126
1396
|
if (o.type === "input")
|
|
1127
1397
|
return /* @__PURE__ */ t.jsx(
|
|
1128
|
-
|
|
1398
|
+
tt,
|
|
1129
1399
|
{
|
|
1130
|
-
onChange: (
|
|
1131
|
-
const
|
|
1400
|
+
onChange: (n) => {
|
|
1401
|
+
const _ = {
|
|
1132
1402
|
...e,
|
|
1133
|
-
[o.field]:
|
|
1403
|
+
[o.field]: n
|
|
1134
1404
|
};
|
|
1135
|
-
s(
|
|
1405
|
+
s(_);
|
|
1136
1406
|
},
|
|
1137
1407
|
value: e[o.field] || "",
|
|
1138
1408
|
label: o.label,
|
|
@@ -1140,16 +1410,16 @@ const Ye = (d) => {
|
|
|
1140
1410
|
}
|
|
1141
1411
|
);
|
|
1142
1412
|
if (o.type === "inputSwitch")
|
|
1143
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1413
|
+
return /* @__PURE__ */ t.jsxs("div", { className: V.link, children: [
|
|
1144
1414
|
/* @__PURE__ */ t.jsx(
|
|
1145
|
-
|
|
1415
|
+
tt,
|
|
1146
1416
|
{
|
|
1147
|
-
onChange: (
|
|
1148
|
-
const
|
|
1417
|
+
onChange: (n) => {
|
|
1418
|
+
const _ = {
|
|
1149
1419
|
...e,
|
|
1150
|
-
[o.field.text]:
|
|
1420
|
+
[o.field.text]: n
|
|
1151
1421
|
};
|
|
1152
|
-
s(
|
|
1422
|
+
s(_);
|
|
1153
1423
|
},
|
|
1154
1424
|
value: e[o.field.text] || "",
|
|
1155
1425
|
label: o.inputLabel,
|
|
@@ -1157,31 +1427,31 @@ const Ye = (d) => {
|
|
|
1157
1427
|
}
|
|
1158
1428
|
),
|
|
1159
1429
|
/* @__PURE__ */ t.jsx(
|
|
1160
|
-
|
|
1430
|
+
st,
|
|
1161
1431
|
{
|
|
1162
1432
|
current: !!e[o.field.switch] || !1,
|
|
1163
1433
|
label: o.switchLabel,
|
|
1164
|
-
onChange: (
|
|
1165
|
-
const
|
|
1434
|
+
onChange: (n) => {
|
|
1435
|
+
const _ = {
|
|
1166
1436
|
...e,
|
|
1167
|
-
[o.field.switch]:
|
|
1437
|
+
[o.field.switch]: n
|
|
1168
1438
|
};
|
|
1169
|
-
s(
|
|
1439
|
+
s(_);
|
|
1170
1440
|
}
|
|
1171
1441
|
}
|
|
1172
1442
|
)
|
|
1173
1443
|
] });
|
|
1174
1444
|
if (o.type === "select")
|
|
1175
1445
|
return /* @__PURE__ */ t.jsx(
|
|
1176
|
-
|
|
1446
|
+
et,
|
|
1177
1447
|
{
|
|
1178
1448
|
options: o.itemsOptions,
|
|
1179
|
-
onChange: (
|
|
1180
|
-
const
|
|
1449
|
+
onChange: (n) => {
|
|
1450
|
+
const _ = {
|
|
1181
1451
|
...e,
|
|
1182
|
-
[o.field]:
|
|
1452
|
+
[o.field]: n
|
|
1183
1453
|
};
|
|
1184
|
-
s(
|
|
1454
|
+
s(_);
|
|
1185
1455
|
},
|
|
1186
1456
|
label: o.label,
|
|
1187
1457
|
value: e[o.field] || "String",
|
|
@@ -1194,92 +1464,92 @@ const Ye = (d) => {
|
|
|
1194
1464
|
);
|
|
1195
1465
|
}
|
|
1196
1466
|
);
|
|
1197
|
-
function
|
|
1198
|
-
const { product: a, children: e } = d, { attributes: s, listeners:
|
|
1467
|
+
function pn(d) {
|
|
1468
|
+
const { product: a, children: e } = d, { attributes: s, listeners: i, setNodeRef: c, transform: l, transition: o, isDragging: n } = Ct({
|
|
1199
1469
|
id: a.id
|
|
1200
|
-
}),
|
|
1201
|
-
transform:
|
|
1470
|
+
}), _ = {
|
|
1471
|
+
transform: St.Transform.toString(l),
|
|
1202
1472
|
transition: o
|
|
1203
1473
|
};
|
|
1204
1474
|
return /* @__PURE__ */ t.jsx(
|
|
1205
1475
|
"div",
|
|
1206
1476
|
{
|
|
1207
1477
|
ref: c,
|
|
1208
|
-
style:
|
|
1209
|
-
className: `${
|
|
1478
|
+
style: _,
|
|
1479
|
+
className: `${V.product} ${n ? V.dragging : ""}`,
|
|
1210
1480
|
...s,
|
|
1211
|
-
...
|
|
1481
|
+
...i,
|
|
1212
1482
|
children: e
|
|
1213
1483
|
}
|
|
1214
1484
|
);
|
|
1215
1485
|
}
|
|
1216
|
-
const
|
|
1486
|
+
const Ka = (d) => {
|
|
1217
1487
|
const {
|
|
1218
1488
|
isActiveItems: a,
|
|
1219
1489
|
setIsActiveItems: e,
|
|
1220
1490
|
items: s,
|
|
1221
|
-
setItems:
|
|
1491
|
+
setItems: i,
|
|
1222
1492
|
other: c,
|
|
1223
|
-
title:
|
|
1493
|
+
title: l,
|
|
1224
1494
|
subtitle: o,
|
|
1225
|
-
editable:
|
|
1226
|
-
draggable:
|
|
1227
|
-
withImage:
|
|
1228
|
-
deletable:
|
|
1229
|
-
addable:
|
|
1230
|
-
itemsType:
|
|
1231
|
-
itemsPlaceholder:
|
|
1232
|
-
itemsOptions:
|
|
1233
|
-
hasRangeSelector:
|
|
1234
|
-
rangeSelectorOptions:
|
|
1235
|
-
modalOptions:
|
|
1236
|
-
addableOptions:
|
|
1237
|
-
} = d, [
|
|
1495
|
+
editable: n = !0,
|
|
1496
|
+
draggable: _ = !1,
|
|
1497
|
+
withImage: v = !1,
|
|
1498
|
+
deletable: g = !0,
|
|
1499
|
+
addable: r = !0,
|
|
1500
|
+
itemsType: k,
|
|
1501
|
+
itemsPlaceholder: p = "",
|
|
1502
|
+
itemsOptions: m,
|
|
1503
|
+
hasRangeSelector: $ = !1,
|
|
1504
|
+
rangeSelectorOptions: H,
|
|
1505
|
+
modalOptions: q,
|
|
1506
|
+
addableOptions: u = {}
|
|
1507
|
+
} = d, [S, E] = f.useState(null), [F, B] = f.useState({
|
|
1238
1508
|
top: 0,
|
|
1239
1509
|
left: 0
|
|
1240
|
-
}), [
|
|
1241
|
-
|
|
1510
|
+
}), [j, P] = f.useState(null), x = f.useRef(null), [I, w] = f.useState(!1), L = yt(
|
|
1511
|
+
kt(wt, {
|
|
1242
1512
|
activationConstraint: {
|
|
1243
1513
|
distance: 5
|
|
1244
1514
|
}
|
|
1245
1515
|
})
|
|
1246
1516
|
);
|
|
1247
|
-
|
|
1248
|
-
const
|
|
1249
|
-
E(null),
|
|
1517
|
+
f.useEffect(() => {
|
|
1518
|
+
const y = () => {
|
|
1519
|
+
E(null), w(!1);
|
|
1250
1520
|
};
|
|
1251
|
-
return document.body.addEventListener("click",
|
|
1252
|
-
E(null),
|
|
1521
|
+
return document.body.addEventListener("click", y), E(null), w(!1), () => {
|
|
1522
|
+
E(null), w(!1), document.body.removeEventListener("click", y);
|
|
1253
1523
|
};
|
|
1254
|
-
}, []),
|
|
1255
|
-
if (
|
|
1256
|
-
const
|
|
1257
|
-
|
|
1524
|
+
}, []), f.useEffect(() => {
|
|
1525
|
+
if (S) {
|
|
1526
|
+
const y = [...s].map((U) => U.id === S.id ? S : U);
|
|
1527
|
+
i(y);
|
|
1258
1528
|
}
|
|
1259
|
-
}, [
|
|
1260
|
-
if (
|
|
1261
|
-
const
|
|
1262
|
-
let
|
|
1263
|
-
|
|
1264
|
-
top:
|
|
1265
|
-
left:
|
|
1529
|
+
}, [S]), f.useEffect(() => {
|
|
1530
|
+
if (x.current && j) {
|
|
1531
|
+
const y = x.current.getBoundingClientRect().height, U = window.innerHeight;
|
|
1532
|
+
let h = j.top;
|
|
1533
|
+
h + y > U + window.scrollY - 200 && (h = U + window.scrollY - y - 200), h < 0 && (h = 10), B({
|
|
1534
|
+
top: h,
|
|
1535
|
+
left: j.left
|
|
1266
1536
|
});
|
|
1267
1537
|
}
|
|
1268
|
-
}, [
|
|
1269
|
-
const
|
|
1270
|
-
|
|
1271
|
-
const
|
|
1272
|
-
|
|
1273
|
-
top:
|
|
1274
|
-
left:
|
|
1275
|
-
}), E(
|
|
1538
|
+
}, [x.current, j]);
|
|
1539
|
+
const A = (y, U) => {
|
|
1540
|
+
y.stopPropagation();
|
|
1541
|
+
const h = y.target.getBoundingClientRect();
|
|
1542
|
+
P({
|
|
1543
|
+
top: h.top + window.scrollY,
|
|
1544
|
+
left: h.left - 30
|
|
1545
|
+
}), E(U), w(!0);
|
|
1276
1546
|
};
|
|
1277
|
-
function
|
|
1278
|
-
if (
|
|
1279
|
-
return
|
|
1547
|
+
function D(y) {
|
|
1548
|
+
if (v)
|
|
1549
|
+
return y ? /* @__PURE__ */ t.jsx(
|
|
1280
1550
|
"img",
|
|
1281
1551
|
{
|
|
1282
|
-
src: `https://imagedelivery.net/${
|
|
1552
|
+
src: `https://imagedelivery.net/${y[0]}/w=1000`,
|
|
1283
1553
|
alt: "image",
|
|
1284
1554
|
width: 16,
|
|
1285
1555
|
height: 16
|
|
@@ -1294,19 +1564,19 @@ const $a = (d) => {
|
|
|
1294
1564
|
}
|
|
1295
1565
|
);
|
|
1296
1566
|
}
|
|
1297
|
-
const
|
|
1298
|
-
const { active:
|
|
1299
|
-
if (
|
|
1300
|
-
const
|
|
1301
|
-
if (
|
|
1302
|
-
const
|
|
1303
|
-
|
|
1567
|
+
const nt = (y) => {
|
|
1568
|
+
const { active: U, over: h } = y;
|
|
1569
|
+
if (h && U.id !== h.id) {
|
|
1570
|
+
const N = s.findIndex((R) => R.id === U.id), O = s.findIndex((R) => R.id === h.id);
|
|
1571
|
+
if (N !== -1 && O !== -1) {
|
|
1572
|
+
const R = [...s], [X] = R.splice(N, 1);
|
|
1573
|
+
R.splice(O, 0, X), i(R);
|
|
1304
1574
|
}
|
|
1305
1575
|
}
|
|
1306
|
-
},
|
|
1307
|
-
var
|
|
1308
|
-
const
|
|
1309
|
-
|
|
1576
|
+
}, dt = (y) => {
|
|
1577
|
+
var h;
|
|
1578
|
+
const U = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
1579
|
+
_ && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
1310
1580
|
b,
|
|
1311
1581
|
{
|
|
1312
1582
|
name: "DotsSixVertical",
|
|
@@ -1315,71 +1585,71 @@ const $a = (d) => {
|
|
|
1315
1585
|
height: 20
|
|
1316
1586
|
}
|
|
1317
1587
|
) }),
|
|
1318
|
-
|
|
1319
|
-
|
|
1588
|
+
k === "select" && m && /* @__PURE__ */ t.jsx(
|
|
1589
|
+
et,
|
|
1320
1590
|
{
|
|
1321
|
-
onChange: (
|
|
1322
|
-
const
|
|
1323
|
-
...
|
|
1591
|
+
onChange: (N) => {
|
|
1592
|
+
const R = [...s].map((X) => X.id === y.id ? {
|
|
1593
|
+
...y,
|
|
1324
1594
|
name: {
|
|
1325
|
-
"en-US":
|
|
1595
|
+
"en-US": N
|
|
1326
1596
|
}
|
|
1327
|
-
} :
|
|
1597
|
+
} : X);
|
|
1328
1598
|
E({
|
|
1329
|
-
...
|
|
1599
|
+
...y,
|
|
1330
1600
|
name: {
|
|
1331
|
-
"en-US":
|
|
1601
|
+
"en-US": N
|
|
1332
1602
|
}
|
|
1333
|
-
}),
|
|
1603
|
+
}), i([...R]);
|
|
1334
1604
|
},
|
|
1335
|
-
value:
|
|
1336
|
-
options:
|
|
1337
|
-
(
|
|
1605
|
+
value: y.name["en-US"],
|
|
1606
|
+
options: m.filter(
|
|
1607
|
+
(N) => !s.find((O) => O.name["en-US"] === N)
|
|
1338
1608
|
),
|
|
1339
|
-
leftAddon:
|
|
1609
|
+
leftAddon: D(y.images)
|
|
1340
1610
|
}
|
|
1341
1611
|
),
|
|
1342
|
-
|
|
1343
|
-
|
|
1612
|
+
k === "input" && /* @__PURE__ */ t.jsx(
|
|
1613
|
+
tt,
|
|
1344
1614
|
{
|
|
1345
|
-
onChange: (
|
|
1346
|
-
const
|
|
1347
|
-
...
|
|
1615
|
+
onChange: (N) => {
|
|
1616
|
+
const R = [...s].map((X) => X.id === y.id ? {
|
|
1617
|
+
...y,
|
|
1348
1618
|
name: {
|
|
1349
|
-
"en-US":
|
|
1619
|
+
"en-US": N
|
|
1350
1620
|
}
|
|
1351
|
-
} :
|
|
1352
|
-
|
|
1621
|
+
} : X);
|
|
1622
|
+
i([...R]);
|
|
1353
1623
|
},
|
|
1354
|
-
value:
|
|
1355
|
-
placeholder:
|
|
1624
|
+
value: y.name["en-US"],
|
|
1625
|
+
placeholder: p
|
|
1356
1626
|
}
|
|
1357
1627
|
),
|
|
1358
|
-
|
|
1359
|
-
|
|
1628
|
+
k === "image" && /* @__PURE__ */ t.jsx(
|
|
1629
|
+
bt,
|
|
1360
1630
|
{
|
|
1361
|
-
onChange: (
|
|
1362
|
-
const
|
|
1363
|
-
...
|
|
1364
|
-
images:
|
|
1365
|
-
} :
|
|
1366
|
-
|
|
1631
|
+
onChange: (N) => {
|
|
1632
|
+
const R = [...s].map((X) => X.id === y.id ? {
|
|
1633
|
+
...y,
|
|
1634
|
+
images: N
|
|
1635
|
+
} : X);
|
|
1636
|
+
i([...R]);
|
|
1367
1637
|
},
|
|
1368
|
-
activeImage: (
|
|
1638
|
+
activeImage: (h = s.find((N) => N.id === y.id)) == null ? void 0 : h.images[0]
|
|
1369
1639
|
}
|
|
1370
1640
|
),
|
|
1371
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1372
|
-
|
|
1641
|
+
/* @__PURE__ */ t.jsxs("div", { className: V.buttons, children: [
|
|
1642
|
+
n && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1373
1643
|
b,
|
|
1374
1644
|
{
|
|
1375
1645
|
name: "Sliders",
|
|
1376
1646
|
hoverable: !0,
|
|
1377
1647
|
width: 20,
|
|
1378
1648
|
height: 20,
|
|
1379
|
-
onClick: (
|
|
1649
|
+
onClick: (N) => A(N, y)
|
|
1380
1650
|
}
|
|
1381
1651
|
) }),
|
|
1382
|
-
|
|
1652
|
+
g && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1383
1653
|
b,
|
|
1384
1654
|
{
|
|
1385
1655
|
name: "Trash",
|
|
@@ -1387,68 +1657,68 @@ const $a = (d) => {
|
|
|
1387
1657
|
width: 20,
|
|
1388
1658
|
height: 20,
|
|
1389
1659
|
fill: "#C12A2A",
|
|
1390
|
-
onClick: () =>
|
|
1660
|
+
onClick: () => i(s.filter((N) => N.id !== y.id))
|
|
1391
1661
|
}
|
|
1392
1662
|
) })
|
|
1393
1663
|
] })
|
|
1394
1664
|
] });
|
|
1395
|
-
return
|
|
1396
|
-
|
|
1665
|
+
return _ ? /* @__PURE__ */ t.jsx(
|
|
1666
|
+
pn,
|
|
1397
1667
|
{
|
|
1398
|
-
product:
|
|
1399
|
-
children:
|
|
1668
|
+
product: y,
|
|
1669
|
+
children: U
|
|
1400
1670
|
},
|
|
1401
|
-
|
|
1671
|
+
y.id
|
|
1402
1672
|
) : /* @__PURE__ */ t.jsx(
|
|
1403
1673
|
"div",
|
|
1404
1674
|
{
|
|
1405
|
-
className:
|
|
1406
|
-
children:
|
|
1675
|
+
className: V.product,
|
|
1676
|
+
children: U
|
|
1407
1677
|
},
|
|
1408
|
-
|
|
1678
|
+
y.id
|
|
1409
1679
|
);
|
|
1410
1680
|
};
|
|
1411
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1412
|
-
(
|
|
1413
|
-
|
|
1681
|
+
return /* @__PURE__ */ t.jsxs("div", { className: V.productsBlock, children: [
|
|
1682
|
+
(l || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
|
|
1683
|
+
l && /* @__PURE__ */ t.jsx("h3", { className: V.title, children: l }),
|
|
1414
1684
|
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1415
|
-
|
|
1685
|
+
st,
|
|
1416
1686
|
{
|
|
1417
1687
|
current: a,
|
|
1418
|
-
onChange: (
|
|
1688
|
+
onChange: (y) => e == null ? void 0 : e(y)
|
|
1419
1689
|
}
|
|
1420
1690
|
)
|
|
1421
1691
|
] }),
|
|
1422
|
-
|
|
1423
|
-
|
|
1692
|
+
S && n && q && I && /* @__PURE__ */ t.jsx(
|
|
1693
|
+
mn,
|
|
1424
1694
|
{
|
|
1425
|
-
ref:
|
|
1426
|
-
activeItem:
|
|
1695
|
+
ref: x,
|
|
1696
|
+
activeItem: S,
|
|
1427
1697
|
setActiveItem: E,
|
|
1428
|
-
popupPosition:
|
|
1429
|
-
modalOptions:
|
|
1430
|
-
setIsOpenModal:
|
|
1698
|
+
popupPosition: F,
|
|
1699
|
+
modalOptions: q,
|
|
1700
|
+
setIsOpenModal: w
|
|
1431
1701
|
}
|
|
1432
1702
|
),
|
|
1433
|
-
|
|
1434
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1435
|
-
o && /* @__PURE__ */ t.jsx("h5", { className:
|
|
1436
|
-
|
|
1437
|
-
|
|
1703
|
+
$ && H && /* @__PURE__ */ t.jsx(qt, { ...H }),
|
|
1704
|
+
/* @__PURE__ */ t.jsxs("div", { className: V.products, children: [
|
|
1705
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: o }),
|
|
1706
|
+
_ ? /* @__PURE__ */ t.jsx(
|
|
1707
|
+
$t,
|
|
1438
1708
|
{
|
|
1439
|
-
sensors:
|
|
1440
|
-
onDragEnd:
|
|
1709
|
+
sensors: L,
|
|
1710
|
+
onDragEnd: nt,
|
|
1441
1711
|
children: /* @__PURE__ */ t.jsx(
|
|
1442
|
-
|
|
1712
|
+
It,
|
|
1443
1713
|
{
|
|
1444
|
-
items: s.map((
|
|
1445
|
-
strategy:
|
|
1446
|
-
children: s.map((
|
|
1714
|
+
items: s.map((y) => y.id),
|
|
1715
|
+
strategy: Nt,
|
|
1716
|
+
children: s.map((y) => dt(y))
|
|
1447
1717
|
}
|
|
1448
1718
|
)
|
|
1449
1719
|
}
|
|
1450
|
-
) : s.map((
|
|
1451
|
-
|
|
1720
|
+
) : s.map((y) => dt(y)),
|
|
1721
|
+
r && /* @__PURE__ */ t.jsx(
|
|
1452
1722
|
"div",
|
|
1453
1723
|
{
|
|
1454
1724
|
style: {
|
|
@@ -1457,49 +1727,49 @@ const $a = (d) => {
|
|
|
1457
1727
|
justifyContent: "center"
|
|
1458
1728
|
},
|
|
1459
1729
|
children: /* @__PURE__ */ t.jsx(
|
|
1460
|
-
|
|
1730
|
+
ot,
|
|
1461
1731
|
{
|
|
1462
1732
|
withoutHover: !0,
|
|
1463
|
-
className:
|
|
1733
|
+
className: V.button,
|
|
1464
1734
|
size: "s",
|
|
1465
1735
|
onClick: () => {
|
|
1466
|
-
const
|
|
1467
|
-
let
|
|
1468
|
-
if (
|
|
1469
|
-
for (let
|
|
1470
|
-
if (!s.find((
|
|
1471
|
-
|
|
1736
|
+
const y = [...s];
|
|
1737
|
+
let U = null;
|
|
1738
|
+
if (m) {
|
|
1739
|
+
for (let h = 0; h < m.length; h++)
|
|
1740
|
+
if (!s.find((N) => N.name["en-US"] === m[h])) {
|
|
1741
|
+
U = m[h];
|
|
1472
1742
|
break;
|
|
1473
1743
|
}
|
|
1474
1744
|
}
|
|
1475
|
-
|
|
1745
|
+
k === "select" && m ? y.push({
|
|
1476
1746
|
name: {
|
|
1477
|
-
"en-US":
|
|
1747
|
+
"en-US": U || m[0]
|
|
1478
1748
|
},
|
|
1479
1749
|
id: mt(),
|
|
1480
|
-
...
|
|
1750
|
+
...u,
|
|
1481
1751
|
maxSymbols: 100
|
|
1482
1752
|
// пример значения
|
|
1483
|
-
}) :
|
|
1753
|
+
}) : k === "input" ? y.push({
|
|
1484
1754
|
name: {
|
|
1485
1755
|
"en-US": ""
|
|
1486
1756
|
},
|
|
1487
1757
|
id: mt(),
|
|
1488
|
-
...
|
|
1758
|
+
...u,
|
|
1489
1759
|
maxSymbols: 100
|
|
1490
|
-
}) :
|
|
1760
|
+
}) : y.push({
|
|
1491
1761
|
name: {
|
|
1492
1762
|
"en-US": `Image ${s.length + 1}`
|
|
1493
1763
|
},
|
|
1494
1764
|
id: mt(),
|
|
1495
|
-
...
|
|
1765
|
+
...u,
|
|
1496
1766
|
maxSymbols: 100
|
|
1497
|
-
}),
|
|
1767
|
+
}), i(y);
|
|
1498
1768
|
},
|
|
1499
1769
|
style: {
|
|
1500
1770
|
width: "fit-content"
|
|
1501
1771
|
},
|
|
1502
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
1772
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: V.addButton, children: [
|
|
1503
1773
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1504
1774
|
/* @__PURE__ */ t.jsx(
|
|
1505
1775
|
b,
|
|
@@ -1515,61 +1785,61 @@ const $a = (d) => {
|
|
|
1515
1785
|
}
|
|
1516
1786
|
)
|
|
1517
1787
|
] }),
|
|
1518
|
-
c !== void 0 && /* @__PURE__ */ t.jsx(
|
|
1788
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(Tt, { items: c })
|
|
1519
1789
|
] });
|
|
1520
|
-
},
|
|
1521
|
-
title:
|
|
1522
|
-
subtitle:
|
|
1523
|
-
header:
|
|
1524
|
-
text:
|
|
1525
|
-
productsBlock:
|
|
1526
|
-
buttonsBlock:
|
|
1527
|
-
top:
|
|
1528
|
-
itemsBlock:
|
|
1529
|
-
typeTexts:
|
|
1530
|
-
block:
|
|
1531
|
-
active:
|
|
1532
|
-
products:
|
|
1533
|
-
product:
|
|
1534
|
-
button:
|
|
1535
|
-
image:
|
|
1536
|
-
info:
|
|
1537
|
-
name:
|
|
1538
|
-
buttons:
|
|
1539
|
-
modal:
|
|
1540
|
-
other:
|
|
1541
|
-
options:
|
|
1542
|
-
closeIcon:
|
|
1543
|
-
},
|
|
1544
|
-
const { activeButton: e, setActiveButton: s, popupPosition:
|
|
1545
|
-
return
|
|
1790
|
+
}, hn = "_title_bn7sv_1", fn = "_subtitle_bn7sv_5", gn = "_header_bn7sv_12", xn = "_text_bn7sv_13", bn = "_productsBlock_bn7sv_14", vn = "_buttonsBlock_bn7sv_15", jn = "_top_bn7sv_26", yn = "_itemsBlock_bn7sv_35", kn = "_typeTexts_bn7sv_41", $n = "_block_bn7sv_48", In = "_active_bn7sv_60", Nn = "_products_bn7sv_14", wn = "_product_bn7sv_14", Cn = "_button_bn7sv_15", Sn = "_image_bn7sv_90", Bn = "_info_bn7sv_97", Tn = "_name_bn7sv_109", Pn = "_buttons_bn7sv_15", An = "_modal_bn7sv_120", On = "_other_bn7sv_139", Mn = "_options_bn7sv_145", qn = "_closeIcon_bn7sv_153", rt = {
|
|
1791
|
+
title: hn,
|
|
1792
|
+
subtitle: fn,
|
|
1793
|
+
header: gn,
|
|
1794
|
+
text: xn,
|
|
1795
|
+
productsBlock: bn,
|
|
1796
|
+
buttonsBlock: vn,
|
|
1797
|
+
top: jn,
|
|
1798
|
+
itemsBlock: yn,
|
|
1799
|
+
typeTexts: kn,
|
|
1800
|
+
block: $n,
|
|
1801
|
+
active: In,
|
|
1802
|
+
products: Nn,
|
|
1803
|
+
product: wn,
|
|
1804
|
+
button: Cn,
|
|
1805
|
+
image: Sn,
|
|
1806
|
+
info: Bn,
|
|
1807
|
+
name: Tn,
|
|
1808
|
+
buttons: Pn,
|
|
1809
|
+
modal: An,
|
|
1810
|
+
other: On,
|
|
1811
|
+
options: Mn,
|
|
1812
|
+
closeIcon: qn
|
|
1813
|
+
}, En = f.forwardRef((d, a) => {
|
|
1814
|
+
const { activeButton: e, setActiveButton: s, popupPosition: i, editableLink: c = !0 } = d, [l, o] = f.useState(e.typesText), [n, _] = f.useState(e.destination), [v, g] = f.useState(e.page), [r, k] = f.useState(e.link || ""), [p, m] = f.useState(e.text || { "en-US": "" }), [$, H] = f.useState(e.openInNewTab), { pages: q } = Vt();
|
|
1815
|
+
return f.useEffect(() => {
|
|
1546
1816
|
s({
|
|
1547
1817
|
...e,
|
|
1548
1818
|
...{
|
|
1549
|
-
text:
|
|
1550
|
-
link:
|
|
1551
|
-
destination:
|
|
1552
|
-
typesText:
|
|
1553
|
-
page:
|
|
1554
|
-
openInNewTab:
|
|
1819
|
+
text: p,
|
|
1820
|
+
link: r,
|
|
1821
|
+
destination: n,
|
|
1822
|
+
typesText: l,
|
|
1823
|
+
page: v,
|
|
1824
|
+
openInNewTab: $
|
|
1555
1825
|
}
|
|
1556
1826
|
});
|
|
1557
|
-
}, [
|
|
1827
|
+
}, [l, n, r, p, v, $]), console.log(p), /* @__PURE__ */ t.jsxs(
|
|
1558
1828
|
"div",
|
|
1559
1829
|
{
|
|
1560
|
-
className:
|
|
1561
|
-
onClick: (
|
|
1562
|
-
|
|
1830
|
+
className: rt.modal,
|
|
1831
|
+
onClick: (u) => {
|
|
1832
|
+
u.stopPropagation();
|
|
1563
1833
|
},
|
|
1564
1834
|
style: {
|
|
1565
|
-
top: `${
|
|
1566
|
-
left: `${
|
|
1835
|
+
top: `${i.top}px`,
|
|
1836
|
+
left: `${i.left}px`
|
|
1567
1837
|
},
|
|
1568
1838
|
ref: a,
|
|
1569
1839
|
children: [
|
|
1570
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1571
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
1572
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1840
|
+
/* @__PURE__ */ t.jsxs("div", { className: rt.top, children: [
|
|
1841
|
+
/* @__PURE__ */ t.jsx("h3", { className: rt.title, children: e.type }),
|
|
1842
|
+
/* @__PURE__ */ t.jsx("div", { className: rt.closeIcon, children: /* @__PURE__ */ t.jsx(
|
|
1573
1843
|
b,
|
|
1574
1844
|
{
|
|
1575
1845
|
name: "X",
|
|
@@ -1580,46 +1850,46 @@ const $a = (d) => {
|
|
|
1580
1850
|
}
|
|
1581
1851
|
) })
|
|
1582
1852
|
] }),
|
|
1583
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1584
|
-
/* @__PURE__ */ t.jsx(
|
|
1585
|
-
|
|
1853
|
+
/* @__PURE__ */ t.jsxs("div", { className: rt.options, children: [
|
|
1854
|
+
c && /* @__PURE__ */ t.jsx(
|
|
1855
|
+
et,
|
|
1586
1856
|
{
|
|
1587
1857
|
label: "Destination",
|
|
1588
|
-
onChange: (
|
|
1589
|
-
options: ["Go to Page", "Open Link"].filter((
|
|
1590
|
-
value:
|
|
1858
|
+
onChange: (u) => _(u),
|
|
1859
|
+
options: ["Go to Page", "Open Link"].filter((u) => u !== n),
|
|
1860
|
+
value: n
|
|
1591
1861
|
}
|
|
1592
1862
|
),
|
|
1593
|
-
|
|
1594
|
-
|
|
1863
|
+
c && (n === "Go to Page" ? /* @__PURE__ */ t.jsx(
|
|
1864
|
+
et,
|
|
1595
1865
|
{
|
|
1596
1866
|
label: "Go to",
|
|
1597
|
-
onChange: (
|
|
1598
|
-
options:
|
|
1599
|
-
value:
|
|
1867
|
+
onChange: (u) => g(u),
|
|
1868
|
+
options: q ? Object.values(q).filter((u) => u.name !== v).map((u) => u.name) : [],
|
|
1869
|
+
value: v
|
|
1600
1870
|
}
|
|
1601
1871
|
) : /* @__PURE__ */ t.jsx(
|
|
1602
|
-
|
|
1872
|
+
tt,
|
|
1603
1873
|
{
|
|
1604
|
-
onChange: (
|
|
1605
|
-
value:
|
|
1874
|
+
onChange: (u) => k(u),
|
|
1875
|
+
value: r,
|
|
1606
1876
|
placeholder: "https://",
|
|
1607
1877
|
label: "Link"
|
|
1608
1878
|
}
|
|
1609
|
-
),
|
|
1610
|
-
/* @__PURE__ */ t.jsx(
|
|
1611
|
-
|
|
1879
|
+
)),
|
|
1880
|
+
c && /* @__PURE__ */ t.jsx(
|
|
1881
|
+
st,
|
|
1612
1882
|
{
|
|
1613
1883
|
current: e.openInNewTab,
|
|
1614
1884
|
label: "Open in new tab",
|
|
1615
|
-
onChange: (
|
|
1885
|
+
onChange: (u) => H(u)
|
|
1616
1886
|
}
|
|
1617
1887
|
),
|
|
1618
1888
|
/* @__PURE__ */ t.jsx(
|
|
1619
|
-
|
|
1889
|
+
Et,
|
|
1620
1890
|
{
|
|
1621
|
-
onChange: (
|
|
1622
|
-
value:
|
|
1891
|
+
onChange: (u) => m({ "en-US": u }),
|
|
1892
|
+
value: p["en-US"],
|
|
1623
1893
|
label: "Text",
|
|
1624
1894
|
maxLength: 150
|
|
1625
1895
|
}
|
|
@@ -1627,114 +1897,114 @@ const $a = (d) => {
|
|
|
1627
1897
|
/* @__PURE__ */ t.jsx(
|
|
1628
1898
|
Ht,
|
|
1629
1899
|
{
|
|
1630
|
-
typesText:
|
|
1631
|
-
setTypesText:
|
|
1900
|
+
typesText: l,
|
|
1901
|
+
setTypesText: o
|
|
1632
1902
|
}
|
|
1633
1903
|
)
|
|
1634
1904
|
] })
|
|
1635
1905
|
]
|
|
1636
1906
|
}
|
|
1637
1907
|
);
|
|
1638
|
-
}),
|
|
1639
|
-
subtitle:
|
|
1640
|
-
header:
|
|
1641
|
-
text:
|
|
1642
|
-
productsBlock:
|
|
1643
|
-
buttonsBlock:
|
|
1644
|
-
top:
|
|
1645
|
-
itemsBlock:
|
|
1646
|
-
typeTexts:
|
|
1647
|
-
block:
|
|
1648
|
-
active:
|
|
1649
|
-
products:
|
|
1650
|
-
product:
|
|
1651
|
-
button:
|
|
1652
|
-
image:
|
|
1653
|
-
info:
|
|
1654
|
-
name:
|
|
1655
|
-
buttons:
|
|
1656
|
-
modal:
|
|
1657
|
-
other:
|
|
1658
|
-
options:
|
|
1659
|
-
addButton:
|
|
1660
|
-
deleteButton:
|
|
1661
|
-
},
|
|
1662
|
-
const { buttons: a, setButtons: e, deletable: s = !0, addable:
|
|
1908
|
+
}), Un = "_subtitle_jql1y_1", Dn = "_header_jql1y_8", Ln = "_text_jql1y_9", Hn = "_productsBlock_jql1y_10", Rn = "_buttonsBlock_jql1y_11", zn = "_top_jql1y_23", Fn = "_itemsBlock_jql1y_32", Vn = "_typeTexts_jql1y_38", Yn = "_block_jql1y_45", Gn = "_active_jql1y_58", Xn = "_products_jql1y_10", Wn = "_product_jql1y_10", Jn = "_button_jql1y_11", Qn = "_image_jql1y_88", Kn = "_info_jql1y_95", Zn = "_name_jql1y_107", ti = "_buttons_jql1y_11", ei = "_modal_jql1y_118", si = "_other_jql1y_138", ni = "_options_jql1y_144", ii = "_addButton_jql1y_150", oi = "_deleteButton_jql1y_165", at = {
|
|
1909
|
+
subtitle: Un,
|
|
1910
|
+
header: Dn,
|
|
1911
|
+
text: Ln,
|
|
1912
|
+
productsBlock: Hn,
|
|
1913
|
+
buttonsBlock: Rn,
|
|
1914
|
+
top: zn,
|
|
1915
|
+
itemsBlock: Fn,
|
|
1916
|
+
typeTexts: Vn,
|
|
1917
|
+
block: Yn,
|
|
1918
|
+
active: Gn,
|
|
1919
|
+
products: Xn,
|
|
1920
|
+
product: Wn,
|
|
1921
|
+
button: Jn,
|
|
1922
|
+
image: Qn,
|
|
1923
|
+
info: Kn,
|
|
1924
|
+
name: Zn,
|
|
1925
|
+
buttons: ti,
|
|
1926
|
+
modal: ei,
|
|
1927
|
+
other: si,
|
|
1928
|
+
options: ni,
|
|
1929
|
+
addButton: ii,
|
|
1930
|
+
deleteButton: oi
|
|
1931
|
+
}, ai = (d) => {
|
|
1932
|
+
const { buttons: a, setButtons: e, deletable: s = !0, addable: i = !0, editableLink: c = !0 } = d, [l, o] = f.useState(null), [n, _] = f.useState({
|
|
1663
1933
|
top: 0,
|
|
1664
1934
|
left: 0
|
|
1665
|
-
}), [
|
|
1666
|
-
|
|
1667
|
-
const
|
|
1668
|
-
|
|
1935
|
+
}), [v, g] = f.useState(null), r = f.useRef(null);
|
|
1936
|
+
f.useEffect(() => {
|
|
1937
|
+
const p = () => {
|
|
1938
|
+
o(null);
|
|
1669
1939
|
};
|
|
1670
|
-
return document.body.addEventListener("click",
|
|
1671
|
-
|
|
1940
|
+
return document.body.addEventListener("click", p), o(null), () => {
|
|
1941
|
+
o(null), document.body.removeEventListener("click", p);
|
|
1672
1942
|
};
|
|
1673
|
-
}, []),
|
|
1674
|
-
if (
|
|
1675
|
-
const
|
|
1676
|
-
e(
|
|
1943
|
+
}, []), f.useEffect(() => {
|
|
1944
|
+
if (l) {
|
|
1945
|
+
const p = [...a].map((m) => m.id === l.id ? l : m);
|
|
1946
|
+
e(p);
|
|
1677
1947
|
}
|
|
1678
|
-
}, [
|
|
1679
|
-
if (
|
|
1680
|
-
const
|
|
1681
|
-
let
|
|
1682
|
-
|
|
1683
|
-
top:
|
|
1684
|
-
left:
|
|
1948
|
+
}, [l]), f.useEffect(() => {
|
|
1949
|
+
if (r.current && v) {
|
|
1950
|
+
const p = r.current.getBoundingClientRect().height, m = window.innerHeight;
|
|
1951
|
+
let $ = v.top;
|
|
1952
|
+
$ + p > m + window.scrollY - 200 && ($ = m + window.scrollY - p - 200), $ < 0 && ($ = 10), _({
|
|
1953
|
+
top: $,
|
|
1954
|
+
left: v.left
|
|
1685
1955
|
});
|
|
1686
1956
|
}
|
|
1687
|
-
}, [
|
|
1688
|
-
const
|
|
1689
|
-
|
|
1690
|
-
const
|
|
1691
|
-
|
|
1692
|
-
top:
|
|
1693
|
-
left:
|
|
1694
|
-
}),
|
|
1957
|
+
}, [r.current, v]);
|
|
1958
|
+
const k = (p, m) => {
|
|
1959
|
+
p.stopPropagation();
|
|
1960
|
+
const $ = p.target.getBoundingClientRect();
|
|
1961
|
+
g({
|
|
1962
|
+
top: $.top + window.scrollY - 70,
|
|
1963
|
+
left: $.left - (i ? 30 : 65)
|
|
1964
|
+
}), o(m);
|
|
1695
1965
|
};
|
|
1696
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1697
|
-
/* @__PURE__ */ t.jsx("h5", { className:
|
|
1698
|
-
a.map((
|
|
1966
|
+
return /* @__PURE__ */ t.jsxs("div", { className: at.products, children: [
|
|
1967
|
+
/* @__PURE__ */ t.jsx("h5", { className: at.subtitle, children: "Button Type" }),
|
|
1968
|
+
a.map((p) => /* @__PURE__ */ t.jsxs(
|
|
1699
1969
|
"div",
|
|
1700
1970
|
{
|
|
1701
|
-
className:
|
|
1971
|
+
className: at.product,
|
|
1702
1972
|
children: [
|
|
1703
1973
|
/* @__PURE__ */ t.jsx(
|
|
1704
|
-
|
|
1974
|
+
et,
|
|
1705
1975
|
{
|
|
1706
|
-
onChange: (
|
|
1707
|
-
const
|
|
1708
|
-
...
|
|
1709
|
-
type:
|
|
1710
|
-
} :
|
|
1711
|
-
e(
|
|
1976
|
+
onChange: (m) => {
|
|
1977
|
+
const H = [...a].map((q) => q.id === p.id ? {
|
|
1978
|
+
...p,
|
|
1979
|
+
type: m
|
|
1980
|
+
} : q);
|
|
1981
|
+
e(H);
|
|
1712
1982
|
},
|
|
1713
|
-
value:
|
|
1983
|
+
value: p.type,
|
|
1714
1984
|
options: ["Primary", "Secondary", "Tertiary"]
|
|
1715
1985
|
}
|
|
1716
1986
|
),
|
|
1717
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1718
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1987
|
+
/* @__PURE__ */ t.jsxs("div", { className: at.buttons, children: [
|
|
1988
|
+
/* @__PURE__ */ t.jsx("div", { className: at.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1719
1989
|
b,
|
|
1720
1990
|
{
|
|
1721
1991
|
name: "Sliders",
|
|
1722
1992
|
hoverable: !0,
|
|
1723
1993
|
width: 20,
|
|
1724
1994
|
height: 20,
|
|
1725
|
-
onClick: (
|
|
1726
|
-
|
|
1995
|
+
onClick: (m) => {
|
|
1996
|
+
k(m, p);
|
|
1727
1997
|
}
|
|
1728
1998
|
}
|
|
1729
1999
|
) }),
|
|
1730
|
-
s && /* @__PURE__ */ t.jsx("div", { className:
|
|
2000
|
+
s && /* @__PURE__ */ t.jsx("div", { className: at.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
1731
2001
|
b,
|
|
1732
2002
|
{
|
|
1733
2003
|
name: "Trash",
|
|
1734
2004
|
hoverable: !0,
|
|
1735
2005
|
onClick: () => {
|
|
1736
|
-
const
|
|
1737
|
-
e(
|
|
2006
|
+
const m = a.filter(($) => $.id !== p.id);
|
|
2007
|
+
e(m);
|
|
1738
2008
|
},
|
|
1739
2009
|
width: 20,
|
|
1740
2010
|
height: 20,
|
|
@@ -1744,18 +2014,19 @@ const $a = (d) => {
|
|
|
1744
2014
|
] })
|
|
1745
2015
|
]
|
|
1746
2016
|
},
|
|
1747
|
-
|
|
2017
|
+
p.id
|
|
1748
2018
|
)),
|
|
1749
|
-
|
|
1750
|
-
|
|
2019
|
+
l && /* @__PURE__ */ t.jsx(
|
|
2020
|
+
En,
|
|
1751
2021
|
{
|
|
1752
|
-
ref:
|
|
1753
|
-
activeButton:
|
|
1754
|
-
setActiveButton:
|
|
1755
|
-
popupPosition:
|
|
2022
|
+
ref: r,
|
|
2023
|
+
activeButton: l,
|
|
2024
|
+
setActiveButton: o,
|
|
2025
|
+
popupPosition: n,
|
|
2026
|
+
editableLink: c
|
|
1756
2027
|
}
|
|
1757
2028
|
),
|
|
1758
|
-
|
|
2029
|
+
i && /* @__PURE__ */ t.jsx(
|
|
1759
2030
|
"div",
|
|
1760
2031
|
{
|
|
1761
2032
|
style: {
|
|
@@ -1764,29 +2035,39 @@ const $a = (d) => {
|
|
|
1764
2035
|
justifyContent: "center"
|
|
1765
2036
|
},
|
|
1766
2037
|
children: /* @__PURE__ */ t.jsx(
|
|
1767
|
-
|
|
2038
|
+
ot,
|
|
1768
2039
|
{
|
|
1769
2040
|
withoutHover: !0,
|
|
1770
|
-
className:
|
|
2041
|
+
className: at.button,
|
|
1771
2042
|
size: "s",
|
|
1772
2043
|
onClick: () => {
|
|
1773
|
-
const
|
|
1774
|
-
|
|
2044
|
+
const p = [...a];
|
|
2045
|
+
c ? p.push({
|
|
1775
2046
|
type: "Primary",
|
|
1776
2047
|
id: mt(),
|
|
1777
2048
|
typesText: [],
|
|
1778
|
-
destination: "Go to Page",
|
|
1779
2049
|
text: {
|
|
1780
2050
|
"en-US": "Button Name"
|
|
1781
2051
|
},
|
|
1782
|
-
|
|
1783
|
-
|
|
1784
|
-
|
|
2052
|
+
destination: "Go to Page",
|
|
2053
|
+
page: "",
|
|
2054
|
+
openInNewTab: !1
|
|
2055
|
+
}) : p.push({
|
|
2056
|
+
type: "Primary",
|
|
2057
|
+
id: mt(),
|
|
2058
|
+
typesText: [],
|
|
2059
|
+
text: {
|
|
2060
|
+
"en-US": "Create Ticket"
|
|
2061
|
+
},
|
|
2062
|
+
destination: "Go to Page",
|
|
2063
|
+
page: "",
|
|
2064
|
+
openInNewTab: !1
|
|
2065
|
+
}), e(p);
|
|
1785
2066
|
},
|
|
1786
2067
|
style: {
|
|
1787
2068
|
width: "fit-content"
|
|
1788
2069
|
},
|
|
1789
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
2070
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: at.addButton, children: [
|
|
1790
2071
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
1791
2072
|
/* @__PURE__ */ t.jsx(
|
|
1792
2073
|
b,
|
|
@@ -1802,77 +2083,78 @@ const $a = (d) => {
|
|
|
1802
2083
|
}
|
|
1803
2084
|
)
|
|
1804
2085
|
] });
|
|
1805
|
-
},
|
|
1806
|
-
const { isActiveButtons: a, setIsActiveButtons: e, buttons: s, setButtons:
|
|
1807
|
-
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
1808
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1809
|
-
/* @__PURE__ */ t.jsx("h3", { className:
|
|
2086
|
+
}, Za = (d) => {
|
|
2087
|
+
const { isActiveButtons: a, setIsActiveButtons: e, buttons: s, setButtons: i, editableLink: c = !0 } = d;
|
|
2088
|
+
return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: rt.buttonsBlock, children: [
|
|
2089
|
+
/* @__PURE__ */ t.jsxs("div", { className: rt.top, children: [
|
|
2090
|
+
/* @__PURE__ */ t.jsx("h3", { className: rt.title, children: "Buttons" }),
|
|
1810
2091
|
/* @__PURE__ */ t.jsx(
|
|
1811
|
-
|
|
2092
|
+
st,
|
|
1812
2093
|
{
|
|
1813
2094
|
current: a,
|
|
1814
|
-
onChange: (
|
|
2095
|
+
onChange: (l) => e(l)
|
|
1815
2096
|
}
|
|
1816
2097
|
)
|
|
1817
2098
|
] }),
|
|
1818
2099
|
/* @__PURE__ */ t.jsx(
|
|
1819
|
-
|
|
2100
|
+
ai,
|
|
1820
2101
|
{
|
|
1821
2102
|
buttons: s,
|
|
1822
|
-
setButtons:
|
|
2103
|
+
setButtons: i,
|
|
2104
|
+
editableLink: c
|
|
1823
2105
|
}
|
|
1824
2106
|
)
|
|
1825
2107
|
] }) });
|
|
1826
|
-
},
|
|
1827
|
-
wrapper:
|
|
1828
|
-
subtitle:
|
|
1829
|
-
content:
|
|
1830
|
-
range:
|
|
1831
|
-
track:
|
|
1832
|
-
progress:
|
|
1833
|
-
dots:
|
|
1834
|
-
dot:
|
|
1835
|
-
active:
|
|
1836
|
-
input:
|
|
1837
|
-
countBlock:
|
|
1838
|
-
count:
|
|
1839
|
-
controls:
|
|
1840
|
-
button:
|
|
1841
|
-
},
|
|
1842
|
-
const { label: a, min: e = 1, max: s = 4, step:
|
|
1843
|
-
c < s &&
|
|
1844
|
-
},
|
|
1845
|
-
c > e &&
|
|
1846
|
-
},
|
|
1847
|
-
const
|
|
1848
|
-
|
|
2108
|
+
}, ci = "_wrapper_m18qi_1", li = "_subtitle_m18qi_7", ri = "_content_m18qi_14", di = "_range_m18qi_22", ui = "_track_m18qi_27", _i = "_progress_m18qi_36", mi = "_dots_m18qi_46", pi = "_dot_m18qi_46", hi = "_active_m18qi_65", fi = "_input_m18qi_77", gi = "_countBlock_m18qi_91", xi = "_count_m18qi_91", bi = "_controls_m18qi_107", vi = "_button_m18qi_113", W = {
|
|
2109
|
+
wrapper: ci,
|
|
2110
|
+
subtitle: li,
|
|
2111
|
+
content: ri,
|
|
2112
|
+
range: di,
|
|
2113
|
+
track: ui,
|
|
2114
|
+
progress: _i,
|
|
2115
|
+
dots: mi,
|
|
2116
|
+
dot: pi,
|
|
2117
|
+
active: hi,
|
|
2118
|
+
input: fi,
|
|
2119
|
+
countBlock: gi,
|
|
2120
|
+
count: xi,
|
|
2121
|
+
controls: bi,
|
|
2122
|
+
button: vi
|
|
2123
|
+
}, qt = (d) => {
|
|
2124
|
+
const { label: a, min: e = 1, max: s = 4, step: i = 1, count: c, setCount: l } = d, [o, n] = f.useState(!1), _ = Array.from({ length: (s - e) / i + 1 }), v = (c - e) / (s - e) * 100, g = () => {
|
|
2125
|
+
c < s && l(c + i);
|
|
2126
|
+
}, r = () => {
|
|
2127
|
+
c > e && l(c - i);
|
|
2128
|
+
}, k = (p) => {
|
|
2129
|
+
const m = e + p * i;
|
|
2130
|
+
l(m);
|
|
1849
2131
|
};
|
|
1850
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
1851
|
-
a && /* @__PURE__ */ t.jsx("h5", { className:
|
|
1852
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1853
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1854
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2132
|
+
return /* @__PURE__ */ t.jsxs("div", { className: W.wrapper, children: [
|
|
2133
|
+
a && /* @__PURE__ */ t.jsx("h5", { className: W.subtitle, children: a }),
|
|
2134
|
+
/* @__PURE__ */ t.jsxs("div", { className: W.content, children: [
|
|
2135
|
+
/* @__PURE__ */ t.jsxs("div", { className: W.range, children: [
|
|
2136
|
+
/* @__PURE__ */ t.jsx("div", { className: W.track }),
|
|
1855
2137
|
/* @__PURE__ */ t.jsx(
|
|
1856
2138
|
"div",
|
|
1857
2139
|
{
|
|
1858
|
-
className:
|
|
1859
|
-
style: { width: `${
|
|
2140
|
+
className: W.progress,
|
|
2141
|
+
style: { width: `${v}%` }
|
|
1860
2142
|
}
|
|
1861
2143
|
),
|
|
1862
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
1863
|
-
const
|
|
2144
|
+
/* @__PURE__ */ t.jsx("div", { className: W.dots, children: _.map((p, m) => {
|
|
2145
|
+
const $ = m <= (c - e) / i;
|
|
1864
2146
|
return /* @__PURE__ */ t.jsx(
|
|
1865
2147
|
"button",
|
|
1866
2148
|
{
|
|
1867
|
-
onClick: () => m
|
|
1868
|
-
className:
|
|
1869
|
-
[
|
|
1870
|
-
[
|
|
1871
|
-
[
|
|
2149
|
+
onClick: () => k(m),
|
|
2150
|
+
className: Y(W.dot, {
|
|
2151
|
+
[W.active]: $,
|
|
2152
|
+
[W.inactive]: !$,
|
|
2153
|
+
[W.dragging]: o
|
|
1872
2154
|
}),
|
|
1873
|
-
"aria-label": `Set value to ${e +
|
|
2155
|
+
"aria-label": `Set value to ${e + m * i}`
|
|
1874
2156
|
},
|
|
1875
|
-
|
|
2157
|
+
m
|
|
1876
2158
|
);
|
|
1877
2159
|
}) }),
|
|
1878
2160
|
/* @__PURE__ */ t.jsx(
|
|
@@ -1881,39 +2163,39 @@ const $a = (d) => {
|
|
|
1881
2163
|
type: "range",
|
|
1882
2164
|
min: e,
|
|
1883
2165
|
max: s,
|
|
1884
|
-
step:
|
|
2166
|
+
step: i,
|
|
1885
2167
|
value: c,
|
|
1886
|
-
onChange: (
|
|
1887
|
-
onMouseDown: () =>
|
|
1888
|
-
onMouseUp: () =>
|
|
1889
|
-
onTouchStart: () =>
|
|
1890
|
-
onTouchEnd: () =>
|
|
1891
|
-
className:
|
|
2168
|
+
onChange: (p) => l(Number(p.target.value)),
|
|
2169
|
+
onMouseDown: () => n(!0),
|
|
2170
|
+
onMouseUp: () => n(!1),
|
|
2171
|
+
onTouchStart: () => n(!0),
|
|
2172
|
+
onTouchEnd: () => n(!1),
|
|
2173
|
+
className: W.input
|
|
1892
2174
|
}
|
|
1893
2175
|
)
|
|
1894
2176
|
] }),
|
|
1895
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2177
|
+
/* @__PURE__ */ t.jsxs("div", { className: W.countBlock, children: [
|
|
1896
2178
|
/* @__PURE__ */ t.jsx(
|
|
1897
|
-
|
|
2179
|
+
tt,
|
|
1898
2180
|
{
|
|
1899
2181
|
type: "number",
|
|
1900
2182
|
min: e,
|
|
1901
2183
|
max: s,
|
|
1902
2184
|
paddingless: !0,
|
|
1903
|
-
onChange: (
|
|
1904
|
-
const
|
|
1905
|
-
|
|
2185
|
+
onChange: (p) => {
|
|
2186
|
+
const m = Number(p);
|
|
2187
|
+
m > s ? l(s) : m < e ? l(e) : l(m);
|
|
1906
2188
|
},
|
|
1907
2189
|
value: String(c)
|
|
1908
2190
|
}
|
|
1909
2191
|
),
|
|
1910
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2192
|
+
/* @__PURE__ */ t.jsxs("div", { className: W.controls, children: [
|
|
1911
2193
|
/* @__PURE__ */ t.jsx(
|
|
1912
2194
|
"button",
|
|
1913
2195
|
{
|
|
1914
|
-
onClick:
|
|
2196
|
+
onClick: g,
|
|
1915
2197
|
disabled: c >= s,
|
|
1916
|
-
className:
|
|
2198
|
+
className: W.button,
|
|
1917
2199
|
"aria-label": "Increment count",
|
|
1918
2200
|
children: /* @__PURE__ */ t.jsx(
|
|
1919
2201
|
b,
|
|
@@ -1928,9 +2210,9 @@ const $a = (d) => {
|
|
|
1928
2210
|
/* @__PURE__ */ t.jsx(
|
|
1929
2211
|
"button",
|
|
1930
2212
|
{
|
|
1931
|
-
onClick:
|
|
2213
|
+
onClick: r,
|
|
1932
2214
|
disabled: c <= e,
|
|
1933
|
-
className:
|
|
2215
|
+
className: W.button,
|
|
1934
2216
|
"aria-label": "Decrement count",
|
|
1935
2217
|
children: /* @__PURE__ */ t.jsx(
|
|
1936
2218
|
b,
|
|
@@ -1946,36 +2228,36 @@ const $a = (d) => {
|
|
|
1946
2228
|
] })
|
|
1947
2229
|
] })
|
|
1948
2230
|
] });
|
|
1949
|
-
},
|
|
1950
|
-
title:
|
|
1951
|
-
subtitle:
|
|
1952
|
-
header:
|
|
1953
|
-
text:
|
|
1954
|
-
productsBlock:
|
|
1955
|
-
top:
|
|
1956
|
-
itemsBlock:
|
|
1957
|
-
typeTexts:
|
|
1958
|
-
block:
|
|
1959
|
-
active:
|
|
1960
|
-
products:
|
|
1961
|
-
product:
|
|
1962
|
-
button:
|
|
1963
|
-
image:
|
|
1964
|
-
info:
|
|
1965
|
-
name:
|
|
1966
|
-
buttons:
|
|
1967
|
-
modal:
|
|
1968
|
-
link:
|
|
1969
|
-
modalOptions:
|
|
1970
|
-
addButton:
|
|
1971
|
-
deleteButton:
|
|
1972
|
-
closeIcon:
|
|
1973
|
-
},
|
|
1974
|
-
const { activeItem: a, setActiveItem: e, popupPosition: s, setIsOpenModal:
|
|
1975
|
-
return
|
|
2231
|
+
}, ji = "_title_ix5ax_1", yi = "_subtitle_ix5ax_5", ki = "_header_ix5ax_12", $i = "_text_ix5ax_13", Ii = "_productsBlock_ix5ax_14", Ni = "_top_ix5ax_26", wi = "_itemsBlock_ix5ax_35", Ci = "_typeTexts_ix5ax_41", Si = "_block_ix5ax_48", Bi = "_active_ix5ax_61", Ti = "_products_ix5ax_14", Pi = "_product_ix5ax_14", Ai = "_button_ix5ax_80", Oi = "_image_ix5ax_91", Mi = "_info_ix5ax_98", qi = "_name_ix5ax_110", Ei = "_buttons_ix5ax_114", Ui = "_modal_ix5ax_121", Di = "_link_ix5ax_141", Li = "_modalOptions_ix5ax_147", Hi = "_addButton_ix5ax_160", Ri = "_deleteButton_ix5ax_175", zi = "_closeIcon_ix5ax_187", G = {
|
|
2232
|
+
title: ji,
|
|
2233
|
+
subtitle: yi,
|
|
2234
|
+
header: ki,
|
|
2235
|
+
text: $i,
|
|
2236
|
+
productsBlock: Ii,
|
|
2237
|
+
top: Ni,
|
|
2238
|
+
itemsBlock: wi,
|
|
2239
|
+
typeTexts: Ci,
|
|
2240
|
+
block: Si,
|
|
2241
|
+
active: Bi,
|
|
2242
|
+
products: Ti,
|
|
2243
|
+
product: Pi,
|
|
2244
|
+
button: Ai,
|
|
2245
|
+
image: Oi,
|
|
2246
|
+
info: Mi,
|
|
2247
|
+
name: qi,
|
|
2248
|
+
buttons: Ei,
|
|
2249
|
+
modal: Ui,
|
|
2250
|
+
link: Di,
|
|
2251
|
+
modalOptions: Li,
|
|
2252
|
+
addButton: Hi,
|
|
2253
|
+
deleteButton: Ri,
|
|
2254
|
+
closeIcon: zi
|
|
2255
|
+
}, Fi = (d) => {
|
|
2256
|
+
const { activeItem: a, setActiveItem: e, popupPosition: s, setIsOpenModal: i, itemsOptions: c } = d, l = c.find((o) => o.id === a.listingId);
|
|
2257
|
+
return l ? /* @__PURE__ */ t.jsxs(
|
|
1976
2258
|
"div",
|
|
1977
2259
|
{
|
|
1978
|
-
className:
|
|
2260
|
+
className: G.modal,
|
|
1979
2261
|
onClick: (o) => {
|
|
1980
2262
|
o.stopPropagation();
|
|
1981
2263
|
},
|
|
@@ -1984,31 +2266,31 @@ const $a = (d) => {
|
|
|
1984
2266
|
left: `${s.left}px`
|
|
1985
2267
|
},
|
|
1986
2268
|
children: [
|
|
1987
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
1988
|
-
/* @__PURE__ */ t.jsx("h3", { children:
|
|
1989
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2269
|
+
/* @__PURE__ */ t.jsxs("div", { className: G.top, children: [
|
|
2270
|
+
/* @__PURE__ */ t.jsx("h3", { children: Yt(l.productData.name) }),
|
|
2271
|
+
/* @__PURE__ */ t.jsx("div", { className: G.closeIcon, children: /* @__PURE__ */ t.jsx(
|
|
1990
2272
|
b,
|
|
1991
2273
|
{
|
|
1992
2274
|
name: "X",
|
|
1993
2275
|
height: 20,
|
|
1994
2276
|
width: 20,
|
|
1995
2277
|
onClick: () => {
|
|
1996
|
-
|
|
2278
|
+
i(!1), e(null);
|
|
1997
2279
|
}
|
|
1998
2280
|
}
|
|
1999
2281
|
) })
|
|
2000
2282
|
] }),
|
|
2001
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2002
|
-
|
|
2283
|
+
/* @__PURE__ */ t.jsx("div", { className: G.modalOptions, children: /* @__PURE__ */ t.jsx(
|
|
2284
|
+
bt,
|
|
2003
2285
|
{
|
|
2004
2286
|
label: "Put up an attractive image",
|
|
2005
|
-
activeImage:
|
|
2287
|
+
activeImage: l.productData.images.length > 0 ? l.productData.images[0].cfId : void 0,
|
|
2006
2288
|
onChange: (o) => {
|
|
2007
|
-
const
|
|
2289
|
+
const n = {
|
|
2008
2290
|
...a,
|
|
2009
2291
|
image: o[0]
|
|
2010
2292
|
};
|
|
2011
|
-
e(
|
|
2293
|
+
e(n);
|
|
2012
2294
|
}
|
|
2013
2295
|
}
|
|
2014
2296
|
) })
|
|
@@ -2016,81 +2298,81 @@ const $a = (d) => {
|
|
|
2016
2298
|
}
|
|
2017
2299
|
) : null;
|
|
2018
2300
|
};
|
|
2019
|
-
function
|
|
2020
|
-
const { product: a, children: e } = d, { attributes: s, listeners:
|
|
2301
|
+
function Vi(d) {
|
|
2302
|
+
const { product: a, children: e } = d, { attributes: s, listeners: i, setNodeRef: c, transform: l, transition: o, isDragging: n } = Ct({
|
|
2021
2303
|
id: String(a.listingId)
|
|
2022
|
-
}),
|
|
2023
|
-
transform:
|
|
2304
|
+
}), _ = {
|
|
2305
|
+
transform: St.Transform.toString(l),
|
|
2024
2306
|
transition: o
|
|
2025
2307
|
};
|
|
2026
2308
|
return /* @__PURE__ */ t.jsx(
|
|
2027
2309
|
"div",
|
|
2028
2310
|
{
|
|
2029
2311
|
ref: c,
|
|
2030
|
-
style:
|
|
2031
|
-
className: `${
|
|
2312
|
+
style: _,
|
|
2313
|
+
className: `${G.product} ${n ? G.dragging : ""}`,
|
|
2032
2314
|
...s,
|
|
2033
|
-
...
|
|
2315
|
+
...i,
|
|
2034
2316
|
children: e
|
|
2035
2317
|
}
|
|
2036
2318
|
);
|
|
2037
2319
|
}
|
|
2038
|
-
const
|
|
2320
|
+
const tc = (d) => {
|
|
2039
2321
|
const {
|
|
2040
2322
|
isActiveItems: a,
|
|
2041
2323
|
setIsActiveItems: e,
|
|
2042
2324
|
items: s,
|
|
2043
|
-
setItems:
|
|
2325
|
+
setItems: i,
|
|
2044
2326
|
other: c,
|
|
2045
|
-
title:
|
|
2327
|
+
title: l,
|
|
2046
2328
|
subtitle: o,
|
|
2047
|
-
editable:
|
|
2048
|
-
draggable:
|
|
2049
|
-
withImage:
|
|
2050
|
-
deletable:
|
|
2051
|
-
addable:
|
|
2052
|
-
itemsType:
|
|
2053
|
-
itemsOptions:
|
|
2054
|
-
} = d, [
|
|
2329
|
+
editable: n = !0,
|
|
2330
|
+
draggable: _ = !1,
|
|
2331
|
+
withImage: v = !1,
|
|
2332
|
+
deletable: g = !0,
|
|
2333
|
+
addable: r = !0,
|
|
2334
|
+
itemsType: k,
|
|
2335
|
+
itemsOptions: p
|
|
2336
|
+
} = d, [m, $] = f.useState(
|
|
2055
2337
|
null
|
|
2056
|
-
), [
|
|
2338
|
+
), [H, q] = f.useState({
|
|
2057
2339
|
top: 0,
|
|
2058
2340
|
left: 0
|
|
2059
|
-
}), [
|
|
2060
|
-
|
|
2341
|
+
}), [u, S] = f.useState(!1), E = yt(
|
|
2342
|
+
kt(wt, {
|
|
2061
2343
|
activationConstraint: {
|
|
2062
2344
|
distance: 5
|
|
2063
2345
|
}
|
|
2064
2346
|
})
|
|
2065
2347
|
);
|
|
2066
|
-
|
|
2067
|
-
const
|
|
2068
|
-
|
|
2348
|
+
f.useEffect(() => {
|
|
2349
|
+
const x = () => {
|
|
2350
|
+
$(null), S(!1);
|
|
2069
2351
|
};
|
|
2070
|
-
return document.body.addEventListener("click",
|
|
2071
|
-
|
|
2352
|
+
return document.body.addEventListener("click", x), $(null), S(!1), () => {
|
|
2353
|
+
$(null), S(!1), document.body.removeEventListener("click", x);
|
|
2072
2354
|
};
|
|
2073
|
-
}, []),
|
|
2074
|
-
if (
|
|
2075
|
-
const
|
|
2076
|
-
|
|
2355
|
+
}, []), f.useEffect(() => {
|
|
2356
|
+
if (m) {
|
|
2357
|
+
const x = [...s].map((I) => I.listingId === m.listingId ? m : I);
|
|
2358
|
+
i(x);
|
|
2077
2359
|
}
|
|
2078
|
-
}, [
|
|
2079
|
-
const
|
|
2080
|
-
|
|
2081
|
-
const
|
|
2082
|
-
let
|
|
2083
|
-
|
|
2084
|
-
top:
|
|
2085
|
-
left:
|
|
2086
|
-
}),
|
|
2360
|
+
}, [m]);
|
|
2361
|
+
const F = (x, I) => {
|
|
2362
|
+
x.stopPropagation();
|
|
2363
|
+
const w = x.target.getBoundingClientRect(), L = 100, A = window.innerHeight;
|
|
2364
|
+
let D = w.top + window.scrollY;
|
|
2365
|
+
D + L > A && (D = A - L - 20), S(!0), q({
|
|
2366
|
+
top: D - 80,
|
|
2367
|
+
left: w.left - 30
|
|
2368
|
+
}), $(I);
|
|
2087
2369
|
};
|
|
2088
|
-
function
|
|
2089
|
-
if (
|
|
2090
|
-
return
|
|
2370
|
+
function B(x) {
|
|
2371
|
+
if (v)
|
|
2372
|
+
return x ? /* @__PURE__ */ t.jsx(
|
|
2091
2373
|
"img",
|
|
2092
2374
|
{
|
|
2093
|
-
src: `https://imagedelivery.net/${
|
|
2375
|
+
src: `https://imagedelivery.net/${x}/w=1000`,
|
|
2094
2376
|
alt: "image",
|
|
2095
2377
|
width: 16,
|
|
2096
2378
|
height: 16
|
|
@@ -2105,20 +2387,20 @@ const wa = (d) => {
|
|
|
2105
2387
|
}
|
|
2106
2388
|
);
|
|
2107
2389
|
}
|
|
2108
|
-
const
|
|
2109
|
-
const { active:
|
|
2110
|
-
if (
|
|
2111
|
-
const
|
|
2112
|
-
if (
|
|
2113
|
-
const
|
|
2114
|
-
|
|
2390
|
+
const j = (x) => {
|
|
2391
|
+
const { active: I, over: w } = x;
|
|
2392
|
+
if (w && I.id !== w.id) {
|
|
2393
|
+
const L = s.findIndex((D) => String(D.listingId) === I.id), A = s.findIndex((D) => String(D.listingId) === w.id);
|
|
2394
|
+
if (L !== -1 && A !== -1) {
|
|
2395
|
+
const D = [...s], [nt] = D.splice(L, 1);
|
|
2396
|
+
D.splice(A, 0, nt), i(D);
|
|
2115
2397
|
}
|
|
2116
2398
|
}
|
|
2117
|
-
},
|
|
2118
|
-
const
|
|
2119
|
-
if (!
|
|
2120
|
-
const
|
|
2121
|
-
|
|
2399
|
+
}, P = (x, I) => {
|
|
2400
|
+
const w = p.find((A) => x.listingId === A.id);
|
|
2401
|
+
if (!w) return null;
|
|
2402
|
+
const L = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2403
|
+
_ && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
2122
2404
|
b,
|
|
2123
2405
|
{
|
|
2124
2406
|
name: "DotsSixVertical",
|
|
@@ -2127,40 +2409,40 @@ const wa = (d) => {
|
|
|
2127
2409
|
height: 20
|
|
2128
2410
|
}
|
|
2129
2411
|
) }),
|
|
2130
|
-
|
|
2131
|
-
|
|
2412
|
+
k === "select" && /* @__PURE__ */ t.jsx(
|
|
2413
|
+
et,
|
|
2132
2414
|
{
|
|
2133
|
-
onChange: (
|
|
2134
|
-
const
|
|
2135
|
-
if (!
|
|
2136
|
-
const
|
|
2137
|
-
listingId:
|
|
2138
|
-
image:
|
|
2139
|
-
},
|
|
2140
|
-
|
|
2415
|
+
onChange: (A) => {
|
|
2416
|
+
const D = [...s], nt = p.find((U) => U.productData.name === A);
|
|
2417
|
+
if (!nt) return;
|
|
2418
|
+
const dt = {
|
|
2419
|
+
listingId: nt.id,
|
|
2420
|
+
image: nt.productData.images.length > 0 ? nt.productData.images[0].cfId : ""
|
|
2421
|
+
}, y = D.map((U) => U.listingId === x.listingId ? dt : U);
|
|
2422
|
+
$(dt), i([...y]);
|
|
2141
2423
|
},
|
|
2142
|
-
value:
|
|
2424
|
+
value: w.productData.name,
|
|
2143
2425
|
options: [
|
|
2144
|
-
...
|
|
2426
|
+
...p.filter((A) => !s.find((D) => D.listingId === A.id)).map((A) => A.productData.name)
|
|
2145
2427
|
],
|
|
2146
|
-
leftAddon:
|
|
2147
|
-
|
|
2428
|
+
leftAddon: B(
|
|
2429
|
+
x.image || w.productData.images.length > 0 && w.productData.images[0].cfId || ""
|
|
2148
2430
|
)
|
|
2149
2431
|
},
|
|
2150
|
-
|
|
2432
|
+
I
|
|
2151
2433
|
),
|
|
2152
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2153
|
-
|
|
2434
|
+
/* @__PURE__ */ t.jsxs("div", { className: G.buttons, children: [
|
|
2435
|
+
n && /* @__PURE__ */ t.jsx("div", { className: G.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
2154
2436
|
b,
|
|
2155
2437
|
{
|
|
2156
2438
|
name: "Sliders",
|
|
2157
2439
|
hoverable: !0,
|
|
2158
2440
|
width: 20,
|
|
2159
2441
|
height: 20,
|
|
2160
|
-
onClick: (
|
|
2442
|
+
onClick: (A) => F(A, x)
|
|
2161
2443
|
}
|
|
2162
2444
|
) }),
|
|
2163
|
-
|
|
2445
|
+
g && /* @__PURE__ */ t.jsx("div", { className: G.deleteButton, children: /* @__PURE__ */ t.jsx(
|
|
2164
2446
|
b,
|
|
2165
2447
|
{
|
|
2166
2448
|
name: "Trash",
|
|
@@ -2168,66 +2450,66 @@ const wa = (d) => {
|
|
|
2168
2450
|
width: 20,
|
|
2169
2451
|
height: 20,
|
|
2170
2452
|
fill: "#C12A2A",
|
|
2171
|
-
onClick: () =>
|
|
2453
|
+
onClick: () => i(s.filter((A) => A !== x))
|
|
2172
2454
|
}
|
|
2173
2455
|
) })
|
|
2174
2456
|
] })
|
|
2175
2457
|
] });
|
|
2176
|
-
return
|
|
2177
|
-
|
|
2458
|
+
return _ ? /* @__PURE__ */ t.jsx(
|
|
2459
|
+
Vi,
|
|
2178
2460
|
{
|
|
2179
|
-
product:
|
|
2180
|
-
children:
|
|
2461
|
+
product: x,
|
|
2462
|
+
children: L
|
|
2181
2463
|
},
|
|
2182
|
-
|
|
2464
|
+
x.listingId
|
|
2183
2465
|
) : /* @__PURE__ */ t.jsx(
|
|
2184
2466
|
"div",
|
|
2185
2467
|
{
|
|
2186
|
-
className:
|
|
2187
|
-
children:
|
|
2468
|
+
className: G.product,
|
|
2469
|
+
children: L
|
|
2188
2470
|
},
|
|
2189
|
-
|
|
2471
|
+
x.listingId
|
|
2190
2472
|
);
|
|
2191
2473
|
};
|
|
2192
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2193
|
-
(
|
|
2194
|
-
|
|
2474
|
+
return /* @__PURE__ */ t.jsxs("div", { className: G.productsBlock, children: [
|
|
2475
|
+
(l || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: G.top, children: [
|
|
2476
|
+
l && /* @__PURE__ */ t.jsx("h3", { className: G.title, children: l }),
|
|
2195
2477
|
a !== void 0 && /* @__PURE__ */ t.jsx(
|
|
2196
|
-
|
|
2478
|
+
st,
|
|
2197
2479
|
{
|
|
2198
2480
|
current: a,
|
|
2199
|
-
onChange: (
|
|
2481
|
+
onChange: (x) => e == null ? void 0 : e(x)
|
|
2200
2482
|
}
|
|
2201
2483
|
)
|
|
2202
2484
|
] }),
|
|
2203
|
-
|
|
2204
|
-
|
|
2485
|
+
u && m && /* @__PURE__ */ t.jsx(
|
|
2486
|
+
Fi,
|
|
2205
2487
|
{
|
|
2206
|
-
activeItem:
|
|
2207
|
-
setActiveItem:
|
|
2208
|
-
setIsOpenModal:
|
|
2209
|
-
popupPosition:
|
|
2210
|
-
itemsOptions:
|
|
2488
|
+
activeItem: m,
|
|
2489
|
+
setActiveItem: $,
|
|
2490
|
+
setIsOpenModal: S,
|
|
2491
|
+
popupPosition: H,
|
|
2492
|
+
itemsOptions: p
|
|
2211
2493
|
}
|
|
2212
2494
|
),
|
|
2213
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2214
|
-
o && /* @__PURE__ */ t.jsx("h5", { className:
|
|
2215
|
-
|
|
2216
|
-
|
|
2495
|
+
/* @__PURE__ */ t.jsxs("div", { className: G.products, children: [
|
|
2496
|
+
o && /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: o }),
|
|
2497
|
+
_ ? /* @__PURE__ */ t.jsx(
|
|
2498
|
+
$t,
|
|
2217
2499
|
{
|
|
2218
2500
|
sensors: E,
|
|
2219
|
-
onDragEnd:
|
|
2501
|
+
onDragEnd: j,
|
|
2220
2502
|
children: /* @__PURE__ */ t.jsx(
|
|
2221
|
-
|
|
2503
|
+
It,
|
|
2222
2504
|
{
|
|
2223
|
-
items: s.map((
|
|
2224
|
-
strategy:
|
|
2225
|
-
children: s.map((
|
|
2505
|
+
items: s.map((x) => String(x.listingId)),
|
|
2506
|
+
strategy: Nt,
|
|
2507
|
+
children: s.map((x, I) => P(x, I))
|
|
2226
2508
|
}
|
|
2227
2509
|
)
|
|
2228
2510
|
}
|
|
2229
|
-
) : s.map((
|
|
2230
|
-
|
|
2511
|
+
) : s.map((x, I) => P(x, I)),
|
|
2512
|
+
r && /* @__PURE__ */ t.jsx(
|
|
2231
2513
|
"div",
|
|
2232
2514
|
{
|
|
2233
2515
|
style: {
|
|
@@ -2236,28 +2518,28 @@ const wa = (d) => {
|
|
|
2236
2518
|
justifyContent: "center"
|
|
2237
2519
|
},
|
|
2238
2520
|
children: /* @__PURE__ */ t.jsx(
|
|
2239
|
-
|
|
2521
|
+
ot,
|
|
2240
2522
|
{
|
|
2241
2523
|
withoutHover: !0,
|
|
2242
|
-
className:
|
|
2524
|
+
className: G.button,
|
|
2243
2525
|
size: "s",
|
|
2244
2526
|
onClick: () => {
|
|
2245
|
-
const
|
|
2246
|
-
for (let
|
|
2247
|
-
if (!s.find((
|
|
2248
|
-
|
|
2249
|
-
listingId:
|
|
2250
|
-
image:
|
|
2527
|
+
const x = [...s];
|
|
2528
|
+
for (let I = 0; I < p.length; I++)
|
|
2529
|
+
if (!s.find((w) => w.listingId === p[I].id)) {
|
|
2530
|
+
x.push({
|
|
2531
|
+
listingId: p[I].id,
|
|
2532
|
+
image: p[I].productData.images.length > 0 ? p[I].productData.images[0].cfId : ""
|
|
2251
2533
|
});
|
|
2252
2534
|
break;
|
|
2253
2535
|
}
|
|
2254
|
-
|
|
2536
|
+
i(x);
|
|
2255
2537
|
},
|
|
2256
|
-
disabled: s.length ===
|
|
2538
|
+
disabled: s.length === p.length,
|
|
2257
2539
|
style: {
|
|
2258
2540
|
width: "fit-content"
|
|
2259
2541
|
},
|
|
2260
|
-
children: /* @__PURE__ */ t.jsxs("div", { className:
|
|
2542
|
+
children: /* @__PURE__ */ t.jsxs("div", { className: G.addButton, children: [
|
|
2261
2543
|
/* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
|
|
2262
2544
|
/* @__PURE__ */ t.jsx(
|
|
2263
2545
|
b,
|
|
@@ -2273,71 +2555,71 @@ const wa = (d) => {
|
|
|
2273
2555
|
}
|
|
2274
2556
|
)
|
|
2275
2557
|
] }),
|
|
2276
|
-
c !== void 0 && /* @__PURE__ */ t.jsx(
|
|
2558
|
+
c !== void 0 && /* @__PURE__ */ t.jsx(Tt, { items: c })
|
|
2277
2559
|
] });
|
|
2278
|
-
},
|
|
2279
|
-
options:
|
|
2280
|
-
price:
|
|
2281
|
-
oldPrice:
|
|
2282
|
-
newPrice:
|
|
2283
|
-
animate:
|
|
2284
|
-
appearAndBounce:
|
|
2285
|
-
meta:
|
|
2286
|
-
info:
|
|
2287
|
-
infoRight:
|
|
2288
|
-
buttons:
|
|
2289
|
-
variants:
|
|
2290
|
-
variant:
|
|
2291
|
-
stock:
|
|
2292
|
-
variantInfo:
|
|
2293
|
-
quantity:
|
|
2294
|
-
count:
|
|
2295
|
-
focused:
|
|
2296
|
-
button:
|
|
2297
|
-
activeVariant:
|
|
2298
|
-
chargeTypes:
|
|
2299
|
-
charge:
|
|
2300
|
-
chargeActive:
|
|
2301
|
-
title:
|
|
2302
|
-
},
|
|
2303
|
-
wrapper:
|
|
2304
|
-
label:
|
|
2305
|
-
input:
|
|
2306
|
-
paddingless:
|
|
2307
|
-
content:
|
|
2308
|
-
contentBorder:
|
|
2309
|
-
borderless:
|
|
2310
|
-
rightIcon:
|
|
2311
|
-
},
|
|
2560
|
+
}, Yi = "_options_6cemk_1", Gi = "_price_6cemk_12", Xi = "_oldPrice_6cemk_19", Wi = "_newPrice_6cemk_27", Ji = "_animate_6cemk_34", Qi = "_appearAndBounce_6cemk_1", Ki = "_meta_6cemk_52", Zi = "_info_6cemk_58", to = "_infoRight_6cemk_66", eo = "_buttons_6cemk_73", so = "_variants_6cemk_80", no = "_variant_6cemk_80", io = "_stock_6cemk_98", oo = "_variantInfo_6cemk_105", ao = "_quantity_6cemk_111", co = "_count_6cemk_118", lo = "_focused_6cemk_135", ro = "_button_6cemk_73", uo = "_activeVariant_6cemk_161", _o = "_chargeTypes_6cemk_165", mo = "_charge_6cemk_165", po = "_chargeActive_6cemk_190", ho = "_title_6cemk_198", T = {
|
|
2561
|
+
options: Yi,
|
|
2562
|
+
price: Gi,
|
|
2563
|
+
oldPrice: Xi,
|
|
2564
|
+
newPrice: Wi,
|
|
2565
|
+
animate: Ji,
|
|
2566
|
+
appearAndBounce: Qi,
|
|
2567
|
+
meta: Ki,
|
|
2568
|
+
info: Zi,
|
|
2569
|
+
infoRight: to,
|
|
2570
|
+
buttons: eo,
|
|
2571
|
+
variants: so,
|
|
2572
|
+
variant: no,
|
|
2573
|
+
stock: io,
|
|
2574
|
+
variantInfo: oo,
|
|
2575
|
+
quantity: ao,
|
|
2576
|
+
count: co,
|
|
2577
|
+
focused: lo,
|
|
2578
|
+
button: ro,
|
|
2579
|
+
activeVariant: uo,
|
|
2580
|
+
chargeTypes: _o,
|
|
2581
|
+
charge: mo,
|
|
2582
|
+
chargeActive: po,
|
|
2583
|
+
title: ho
|
|
2584
|
+
}, fo = "_wrapper_c1dht_1", go = "_label_c1dht_9", xo = "_input_c1dht_18", bo = "_paddingless_c1dht_31", vo = "_content_c1dht_35", jo = "_contentBorder_c1dht_47", yo = "_borderless_c1dht_52", ko = "_rightIcon_c1dht_57", it = {
|
|
2585
|
+
wrapper: fo,
|
|
2586
|
+
label: go,
|
|
2587
|
+
input: xo,
|
|
2588
|
+
paddingless: bo,
|
|
2589
|
+
content: vo,
|
|
2590
|
+
contentBorder: jo,
|
|
2591
|
+
borderless: yo,
|
|
2592
|
+
rightIcon: ko
|
|
2593
|
+
}, $o = (d) => {
|
|
2312
2594
|
const {
|
|
2313
2595
|
onChange: a,
|
|
2314
2596
|
style: e,
|
|
2315
2597
|
label: s,
|
|
2316
|
-
value:
|
|
2598
|
+
value: i,
|
|
2317
2599
|
type: c,
|
|
2318
|
-
min:
|
|
2600
|
+
min: l,
|
|
2319
2601
|
max: o,
|
|
2320
|
-
placeholder:
|
|
2321
|
-
disabled:
|
|
2322
|
-
required:
|
|
2323
|
-
regex:
|
|
2324
|
-
paddingless:
|
|
2325
|
-
borderless:
|
|
2326
|
-
editable:
|
|
2327
|
-
isSearch:
|
|
2328
|
-
centered:
|
|
2329
|
-
} = d, { themeSettings:
|
|
2330
|
-
function E(
|
|
2331
|
-
return Number(
|
|
2602
|
+
placeholder: n,
|
|
2603
|
+
disabled: _ = !1,
|
|
2604
|
+
required: v = !1,
|
|
2605
|
+
regex: g,
|
|
2606
|
+
paddingless: r = !1,
|
|
2607
|
+
borderless: k = !1,
|
|
2608
|
+
editable: p = !1,
|
|
2609
|
+
isSearch: m = !1,
|
|
2610
|
+
centered: $ = !1
|
|
2611
|
+
} = d, { themeSettings: H } = Ut(), { inputs: q } = H, [u, S] = f.useState(!1);
|
|
2612
|
+
function E(B) {
|
|
2613
|
+
return Number(B) < 0 ? String(l) : B;
|
|
2332
2614
|
}
|
|
2333
|
-
function
|
|
2334
|
-
return !
|
|
2615
|
+
function F(B) {
|
|
2616
|
+
return !v || !g ? !0 : new RegExp(g).test(B);
|
|
2335
2617
|
}
|
|
2336
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2618
|
+
return /* @__PURE__ */ t.jsxs("div", { className: it.wrapper, children: [
|
|
2337
2619
|
s && /* @__PURE__ */ t.jsx(
|
|
2338
2620
|
"label",
|
|
2339
2621
|
{
|
|
2340
|
-
className:
|
|
2622
|
+
className: it.label,
|
|
2341
2623
|
htmlFor: s,
|
|
2342
2624
|
children: s
|
|
2343
2625
|
}
|
|
@@ -2345,13 +2627,13 @@ const wa = (d) => {
|
|
|
2345
2627
|
/* @__PURE__ */ t.jsxs(
|
|
2346
2628
|
"div",
|
|
2347
2629
|
{
|
|
2348
|
-
className:
|
|
2349
|
-
[
|
|
2630
|
+
className: Y(it.content, {
|
|
2631
|
+
[it.contentBorder]: q.border.active
|
|
2350
2632
|
}),
|
|
2351
2633
|
style: {
|
|
2352
2634
|
...e,
|
|
2353
|
-
background:
|
|
2354
|
-
padding:
|
|
2635
|
+
background: q.field.active ? q.field.color : "transparent",
|
|
2636
|
+
padding: m ? `7px ${Number(q.general.size) + 20}px 7px 11px` : "7px 11px"
|
|
2355
2637
|
},
|
|
2356
2638
|
children: [
|
|
2357
2639
|
/* @__PURE__ */ t.jsx(
|
|
@@ -2359,40 +2641,40 @@ const wa = (d) => {
|
|
|
2359
2641
|
{
|
|
2360
2642
|
id: s,
|
|
2361
2643
|
type: c || "text",
|
|
2362
|
-
onChange: (
|
|
2363
|
-
if (c === "text") a(
|
|
2644
|
+
onChange: (B) => {
|
|
2645
|
+
if (c === "text") a(B.target.value);
|
|
2364
2646
|
else {
|
|
2365
|
-
const
|
|
2366
|
-
a(
|
|
2647
|
+
const j = E(B.target.value);
|
|
2648
|
+
a(j);
|
|
2367
2649
|
}
|
|
2368
2650
|
},
|
|
2369
|
-
value:
|
|
2651
|
+
value: i,
|
|
2370
2652
|
autoComplete: "off",
|
|
2371
|
-
placeholder:
|
|
2372
|
-
className:
|
|
2373
|
-
[
|
|
2374
|
-
[
|
|
2375
|
-
[
|
|
2653
|
+
placeholder: n || "Type something...",
|
|
2654
|
+
className: Y(it.input, {
|
|
2655
|
+
[it.required]: u && v && !F(i),
|
|
2656
|
+
[it.paddingless]: r,
|
|
2657
|
+
[it.borderless]: k
|
|
2376
2658
|
}),
|
|
2377
|
-
min: c === "number" ?
|
|
2659
|
+
min: c === "number" ? l : void 0,
|
|
2378
2660
|
max: c === "number" ? o : void 0,
|
|
2379
|
-
disabled:
|
|
2380
|
-
onFocus: () =>
|
|
2661
|
+
disabled: _,
|
|
2662
|
+
onFocus: () => S(!0),
|
|
2381
2663
|
style: {
|
|
2382
|
-
textAlign:
|
|
2664
|
+
textAlign: $ ? "center" : "left"
|
|
2383
2665
|
}
|
|
2384
2666
|
}
|
|
2385
2667
|
),
|
|
2386
|
-
|
|
2668
|
+
m && /* @__PURE__ */ t.jsx("div", { className: it.rightIcon, children: /* @__PURE__ */ t.jsx(
|
|
2387
2669
|
b,
|
|
2388
2670
|
{
|
|
2389
2671
|
name: "MagnifyingGlass",
|
|
2390
2672
|
fill: "var(--icon-secondary)",
|
|
2391
|
-
width:
|
|
2392
|
-
height:
|
|
2673
|
+
width: q.general.size,
|
|
2674
|
+
height: q.general.size
|
|
2393
2675
|
}
|
|
2394
2676
|
) }),
|
|
2395
|
-
|
|
2677
|
+
p && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
2396
2678
|
b,
|
|
2397
2679
|
{
|
|
2398
2680
|
name: "Sliders",
|
|
@@ -2405,34 +2687,34 @@ const wa = (d) => {
|
|
|
2405
2687
|
}
|
|
2406
2688
|
)
|
|
2407
2689
|
] });
|
|
2408
|
-
},
|
|
2409
|
-
button:
|
|
2410
|
-
primary:
|
|
2411
|
-
primaryHovered:
|
|
2412
|
-
secondary:
|
|
2413
|
-
secondaryHovered:
|
|
2414
|
-
tertiary:
|
|
2415
|
-
tertiaryHovered:
|
|
2416
|
-
content:
|
|
2417
|
-
},
|
|
2418
|
-
const { children: a, onClick: e, style: s, className:
|
|
2690
|
+
}, Io = "_button_85085_1", No = "_primary_85085_20", wo = "_primaryHovered_85085_30", Co = "_secondary_85085_34", So = "_secondaryHovered_85085_44", Bo = "_tertiary_85085_48", To = "_tertiaryHovered_85085_58", Po = "_content_85085_62", ct = {
|
|
2691
|
+
button: Io,
|
|
2692
|
+
primary: No,
|
|
2693
|
+
primaryHovered: wo,
|
|
2694
|
+
secondary: Co,
|
|
2695
|
+
secondaryHovered: So,
|
|
2696
|
+
tertiary: Bo,
|
|
2697
|
+
tertiaryHovered: To,
|
|
2698
|
+
content: Po
|
|
2699
|
+
}, Q = (d) => {
|
|
2700
|
+
const { children: a, onClick: e, style: s, className: i, disabled: c = !1, type: l = "Primary" } = d, { themeSettings: o } = Ut();
|
|
2419
2701
|
return /* @__PURE__ */ t.jsx(
|
|
2420
2702
|
"button",
|
|
2421
2703
|
{
|
|
2422
|
-
className:
|
|
2423
|
-
[
|
|
2424
|
-
[
|
|
2425
|
-
[
|
|
2426
|
-
[
|
|
2427
|
-
[
|
|
2428
|
-
[
|
|
2704
|
+
className: Y(ct.button, i, {
|
|
2705
|
+
[ct.primary]: l === "Primary",
|
|
2706
|
+
[ct.secondary]: l === "Secondary",
|
|
2707
|
+
[ct.tertiary]: l === "Tertiary",
|
|
2708
|
+
[ct.primaryHovered]: l === "Primary" && !c && o.buttons.primary.hover,
|
|
2709
|
+
[ct.secondaryHovered]: l === "Secondary" && !c && o.buttons.secondary.hover,
|
|
2710
|
+
[ct.tertiaryHovered]: l === "Tertiary" && !c && o.buttons.tertiary.hover
|
|
2429
2711
|
}),
|
|
2430
2712
|
onClick: e,
|
|
2431
2713
|
style: {
|
|
2432
2714
|
...s
|
|
2433
2715
|
},
|
|
2434
2716
|
disabled: c,
|
|
2435
|
-
children:
|
|
2717
|
+
children: l === "Tertiary" ? /* @__PURE__ */ t.jsxs("div", { className: ct.content, children: [
|
|
2436
2718
|
a,
|
|
2437
2719
|
/* @__PURE__ */ t.jsx(
|
|
2438
2720
|
b,
|
|
@@ -2448,121 +2730,121 @@ const wa = (d) => {
|
|
|
2448
2730
|
);
|
|
2449
2731
|
};
|
|
2450
2732
|
var zt = /* @__PURE__ */ ((d) => (d.ONE_TIME = "One-Time", d.RECURRING = "Subscribe & Save", d))(zt || {});
|
|
2451
|
-
const
|
|
2452
|
-
var
|
|
2453
|
-
const { variants: a } = d, [e, s] =
|
|
2454
|
-
|
|
2455
|
-
|
|
2456
|
-
const
|
|
2457
|
-
return () => clearTimeout(
|
|
2733
|
+
const ec = (d) => {
|
|
2734
|
+
var H, q;
|
|
2735
|
+
const { variants: a } = d, [e, s] = f.useState(a[0]), [i, c] = f.useState(e.chargeTypes[0]), l = Bt(), [o, n] = f.useState(1), { reset: _, addProductToCart: v, getProducts: g } = Ot(), [r, k] = f.useState(!1);
|
|
2736
|
+
f.useEffect(() => {
|
|
2737
|
+
k(!0);
|
|
2738
|
+
const u = setTimeout(() => k(!1), 600);
|
|
2739
|
+
return () => clearTimeout(u);
|
|
2458
2740
|
}, [o]);
|
|
2459
|
-
async function
|
|
2460
|
-
await
|
|
2741
|
+
async function p() {
|
|
2742
|
+
await g(), await v({
|
|
2461
2743
|
productId: d.id,
|
|
2462
2744
|
productVariantId: e.id,
|
|
2463
2745
|
quantity: o
|
|
2464
2746
|
});
|
|
2465
2747
|
}
|
|
2466
|
-
function
|
|
2467
|
-
|
|
2748
|
+
function m() {
|
|
2749
|
+
_(), p(), l("/checkout");
|
|
2468
2750
|
}
|
|
2469
|
-
function
|
|
2470
|
-
if (
|
|
2471
|
-
const
|
|
2472
|
-
return `${
|
|
2473
|
-
} else if (
|
|
2474
|
-
const
|
|
2475
|
-
return `${
|
|
2476
|
-
} else if (
|
|
2477
|
-
const
|
|
2478
|
-
return `${
|
|
2751
|
+
function $(u) {
|
|
2752
|
+
if (u >= 864e5) {
|
|
2753
|
+
const j = Math.floor(u / 864e5);
|
|
2754
|
+
return `${j} ${j === 1 ? "day" : "days"}`;
|
|
2755
|
+
} else if (u >= 36e5) {
|
|
2756
|
+
const j = Math.floor(u / 36e5);
|
|
2757
|
+
return `${j} ${j === 1 ? "hour" : "hours"}`;
|
|
2758
|
+
} else if (u >= 6e4) {
|
|
2759
|
+
const j = Math.floor(u / 6e4);
|
|
2760
|
+
return `${j} ${j === 1 ? "minute" : "minutes"}`;
|
|
2479
2761
|
} else {
|
|
2480
|
-
const
|
|
2481
|
-
return `${
|
|
2762
|
+
const j = Math.floor(u / 1e3);
|
|
2763
|
+
return `${j} ${j === 1 ? "second" : "seconds"}`;
|
|
2482
2764
|
}
|
|
2483
2765
|
}
|
|
2484
|
-
return
|
|
2485
|
-
(e.quantity.available === 0 || !e.quantity.available) &&
|
|
2486
|
-
}, [e.quantity.available]), console.log(e.quantity), /* @__PURE__ */ t.jsxs("div", { className:
|
|
2487
|
-
e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className:
|
|
2766
|
+
return f.useEffect(() => {
|
|
2767
|
+
(e.quantity.available === 0 || !e.quantity.available) && n(0);
|
|
2768
|
+
}, [e.quantity.available]), console.log(e.quantity), /* @__PURE__ */ t.jsxs("div", { className: T.options, children: [
|
|
2769
|
+
e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: T.chargeTypes, children: e.chargeTypes.map((u) => /* @__PURE__ */ t.jsx(
|
|
2488
2770
|
"div",
|
|
2489
2771
|
{
|
|
2490
|
-
className:
|
|
2491
|
-
[
|
|
2772
|
+
className: Y(T.charge, {
|
|
2773
|
+
[T.chargeActive]: i === u
|
|
2492
2774
|
}),
|
|
2493
|
-
onClick: () => c(
|
|
2494
|
-
children: zt[
|
|
2775
|
+
onClick: () => c(u),
|
|
2776
|
+
children: zt[u]
|
|
2495
2777
|
},
|
|
2496
|
-
|
|
2778
|
+
u
|
|
2497
2779
|
)) }),
|
|
2498
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2499
|
-
var
|
|
2780
|
+
/* @__PURE__ */ t.jsx("div", { className: T.variants, children: a.map((u) => {
|
|
2781
|
+
var S;
|
|
2500
2782
|
return /* @__PURE__ */ t.jsxs(
|
|
2501
2783
|
"div",
|
|
2502
2784
|
{
|
|
2503
|
-
className:
|
|
2504
|
-
[
|
|
2785
|
+
className: Y(T.variant, {
|
|
2786
|
+
[T.activeVariant]: e.id === u.id
|
|
2505
2787
|
}),
|
|
2506
|
-
onClick: () => s(
|
|
2788
|
+
onClick: () => s(u),
|
|
2507
2789
|
children: [
|
|
2508
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2509
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
2790
|
+
/* @__PURE__ */ t.jsxs("div", { className: T.variantInfo, children: [
|
|
2791
|
+
/* @__PURE__ */ t.jsx("span", { className: T.title, children: u.name }),
|
|
2510
2792
|
/* @__PURE__ */ t.jsxs("span", { children: [
|
|
2511
2793
|
"$",
|
|
2512
|
-
|
|
2794
|
+
i === "ONE_TIME" ? u.price.amount : u.subscriptionSettings ? u.subscriptionSettings.price.amount : "Price Not Found"
|
|
2513
2795
|
] })
|
|
2514
2796
|
] }),
|
|
2515
|
-
/* @__PURE__ */ t.jsx("div", { children:
|
|
2516
|
-
((
|
|
2797
|
+
/* @__PURE__ */ t.jsx("div", { children: i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: T.stock, children: [
|
|
2798
|
+
((S = u.quantity.restrictions) == null ? void 0 : S.max) || u.quantity.available || 0,
|
|
2517
2799
|
" in stock"
|
|
2518
2800
|
] }) })
|
|
2519
2801
|
]
|
|
2520
2802
|
},
|
|
2521
|
-
|
|
2803
|
+
u.id
|
|
2522
2804
|
);
|
|
2523
2805
|
}) }),
|
|
2524
|
-
|
|
2806
|
+
i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: T.quantity, children: [
|
|
2525
2807
|
/* @__PURE__ */ t.jsx(
|
|
2526
|
-
|
|
2808
|
+
Q,
|
|
2527
2809
|
{
|
|
2528
2810
|
type: "Secondary",
|
|
2529
2811
|
onClick: () => {
|
|
2530
|
-
o > 1 ?
|
|
2812
|
+
o > 1 ? n((u) => u - 1) : n(1);
|
|
2531
2813
|
},
|
|
2532
|
-
className:
|
|
2814
|
+
className: T.button,
|
|
2533
2815
|
disabled: e.quantity.available === 0 || e.quantity.restrictions && o <= e.quantity.restrictions.min || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
|
|
2534
2816
|
children: /* @__PURE__ */ t.jsx(b, { name: "Minus" })
|
|
2535
2817
|
}
|
|
2536
2818
|
),
|
|
2537
2819
|
/* @__PURE__ */ t.jsx(
|
|
2538
|
-
|
|
2820
|
+
$o,
|
|
2539
2821
|
{
|
|
2540
2822
|
type: "number",
|
|
2541
2823
|
value: String(o),
|
|
2542
|
-
onChange: (
|
|
2543
|
-
max: ((
|
|
2544
|
-
min: ((
|
|
2824
|
+
onChange: (u) => n(Number(u)),
|
|
2825
|
+
max: ((H = e.quantity.restrictions) == null ? void 0 : H.max) || e.quantity.available || 1 / 0,
|
|
2826
|
+
min: ((q = e.quantity.restrictions) == null ? void 0 : q.min) || 0,
|
|
2545
2827
|
centered: !0,
|
|
2546
2828
|
disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available
|
|
2547
2829
|
}
|
|
2548
2830
|
),
|
|
2549
2831
|
/* @__PURE__ */ t.jsx(
|
|
2550
|
-
|
|
2832
|
+
Q,
|
|
2551
2833
|
{
|
|
2552
2834
|
type: "Secondary",
|
|
2553
2835
|
onClick: () => {
|
|
2554
|
-
|
|
2836
|
+
n((u) => u + 1);
|
|
2555
2837
|
},
|
|
2556
|
-
className:
|
|
2838
|
+
className: T.button,
|
|
2557
2839
|
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),
|
|
2558
2840
|
children: /* @__PURE__ */ t.jsx(b, { name: "Plus" })
|
|
2559
2841
|
}
|
|
2560
2842
|
)
|
|
2561
2843
|
] }),
|
|
2562
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2563
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2844
|
+
/* @__PURE__ */ t.jsxs("div", { className: T.meta, children: [
|
|
2845
|
+
/* @__PURE__ */ t.jsxs("div", { className: T.info, children: [
|
|
2564
2846
|
/* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
|
|
2565
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2847
|
+
/* @__PURE__ */ t.jsxs("div", { className: T.infoRight, children: [
|
|
2566
2848
|
/* @__PURE__ */ t.jsx(
|
|
2567
2849
|
b,
|
|
2568
2850
|
{
|
|
@@ -2572,110 +2854,110 @@ const Sa = (d) => {
|
|
|
2572
2854
|
height: 20
|
|
2573
2855
|
}
|
|
2574
2856
|
),
|
|
2575
|
-
/* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" :
|
|
2857
|
+
/* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : $(e.deliveryTime) })
|
|
2576
2858
|
] })
|
|
2577
2859
|
] }),
|
|
2578
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2860
|
+
/* @__PURE__ */ t.jsxs("div", { className: T.info, children: [
|
|
2579
2861
|
/* @__PURE__ */ t.jsx("span", { children: "Price" }),
|
|
2580
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2581
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2862
|
+
/* @__PURE__ */ t.jsx("div", { className: T.infoRight, children: i === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: T.price, children: [
|
|
2863
|
+
/* @__PURE__ */ t.jsxs("span", { className: Y(T.newPrice, { [T.animate]: r }), children: [
|
|
2582
2864
|
"$ ",
|
|
2583
2865
|
(e.price.amount || 0) * o
|
|
2584
2866
|
] }),
|
|
2585
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2867
|
+
/* @__PURE__ */ t.jsxs("span", { className: T.oldPrice, children: [
|
|
2586
2868
|
"$ ",
|
|
2587
2869
|
(e.compareAtPrice.amount || 0) * o
|
|
2588
2870
|
] })
|
|
2589
|
-
] }) : /* @__PURE__ */ t.jsxs("span", { className:
|
|
2871
|
+
] }) : /* @__PURE__ */ t.jsxs("span", { className: Y(T.newPrice, { [T.animate]: r }), children: [
|
|
2590
2872
|
"$ ",
|
|
2591
2873
|
(e.price.amount || 0) * o
|
|
2592
|
-
] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
2593
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2874
|
+
] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: T.price, children: [
|
|
2875
|
+
/* @__PURE__ */ t.jsxs("span", { className: Y(T.newPrice, { [T.animate]: r }), children: [
|
|
2594
2876
|
"$ ",
|
|
2595
2877
|
e.subscriptionSettings.price.amount || 0
|
|
2596
2878
|
] }),
|
|
2597
|
-
/* @__PURE__ */ t.jsxs("span", { className:
|
|
2879
|
+
/* @__PURE__ */ t.jsxs("span", { className: T.oldPrice, children: [
|
|
2598
2880
|
"$ ",
|
|
2599
2881
|
e.subscriptionSettings.compareAtPrice.amount || 0
|
|
2600
2882
|
] })
|
|
2601
|
-
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className:
|
|
2883
|
+
] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: Y(T.newPrice, { [T.animate]: r }), children: [
|
|
2602
2884
|
"$ ",
|
|
2603
2885
|
e.subscriptionSettings.price.amount || 0
|
|
2604
2886
|
] }) })
|
|
2605
2887
|
] })
|
|
2606
2888
|
] }),
|
|
2607
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2889
|
+
/* @__PURE__ */ t.jsxs("div", { className: T.buttons, children: [
|
|
2608
2890
|
/* @__PURE__ */ t.jsx(
|
|
2609
|
-
|
|
2891
|
+
Q,
|
|
2610
2892
|
{
|
|
2611
2893
|
type: "Primary",
|
|
2612
|
-
onClick: () =>
|
|
2894
|
+
onClick: () => m(),
|
|
2613
2895
|
disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
|
|
2614
|
-
children:
|
|
2896
|
+
children: i === "ONE_TIME" ? "Buy Now" : "Subscribe Now"
|
|
2615
2897
|
}
|
|
2616
2898
|
),
|
|
2617
|
-
|
|
2618
|
-
|
|
2899
|
+
i === "ONE_TIME" && /* @__PURE__ */ t.jsx(
|
|
2900
|
+
Q,
|
|
2619
2901
|
{
|
|
2620
2902
|
type: "Secondary",
|
|
2621
|
-
onClick: () =>
|
|
2903
|
+
onClick: () => p(),
|
|
2622
2904
|
disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
|
|
2623
2905
|
children: "Add to Cart"
|
|
2624
2906
|
}
|
|
2625
2907
|
)
|
|
2626
2908
|
] })
|
|
2627
2909
|
] });
|
|
2628
|
-
},
|
|
2629
|
-
button:
|
|
2630
|
-
login:
|
|
2631
|
-
signUp:
|
|
2632
|
-
buttons:
|
|
2633
|
-
modal:
|
|
2910
|
+
}, Ao = "_button_1tdo3_1", Oo = "_login_1tdo3_14", Mo = "_signUp_1tdo3_18", qo = "_buttons_1tdo3_23", Eo = "_modal_1tdo3_32", Uo = "_closing_1tdo3_64", Do = "_info_1tdo3_113", Lo = "_top_1tdo3_120", Ho = "_title_1tdo3_131", Ro = "_clear_1tdo3_138", zo = "_activeClear_1tdo3_145", Fo = "_count_1tdo3_149", Vo = "_cart_1tdo3_164", Yo = "_empty_1tdo3_172", Go = "_product_1tdo3_198", Xo = "_products_1tdo3_207", Wo = "_image_1tdo3_215", Jo = "_productInfo_1tdo3_221", Qo = "_content_1tdo3_228", Ko = "_name_1tdo3_234", Zo = "_price_1tdo3_240", ta = "_productButtons_1tdo3_246", ea = "_productButton_1tdo3_246", sa = "_productCount_1tdo3_266", na = "_bottom_1tdo3_282", ia = "_subtotal_1tdo3_290", oa = "_block_1tdo3_298", aa = "_shoppingCount_1tdo3_305", ca = "_total_1tdo3_325", la = "_link_1tdo3_331", ra = "_userInfo_1tdo3_338", da = "_pagesMobileModal_1tdo3_349", ua = "_pagesMobileModalContent_1tdo3_363", _a = "_pagesMobileModalHeader_1tdo3_369", ma = "_pagesMobileModalFooter_1tdo3_379", C = {
|
|
2911
|
+
button: Ao,
|
|
2912
|
+
login: Oo,
|
|
2913
|
+
signUp: Mo,
|
|
2914
|
+
buttons: qo,
|
|
2915
|
+
modal: Eo,
|
|
2634
2916
|
"slide-in-fade": "_slide-in-fade_1tdo3_1",
|
|
2635
2917
|
"mobile-slide-in-fade": "_mobile-slide-in-fade_1tdo3_1",
|
|
2636
|
-
closing:
|
|
2918
|
+
closing: Uo,
|
|
2637
2919
|
"mobile-slide-out-fade": "_mobile-slide-out-fade_1tdo3_1",
|
|
2638
2920
|
"slide-out-fade": "_slide-out-fade_1tdo3_1",
|
|
2639
|
-
info:
|
|
2640
|
-
top:
|
|
2641
|
-
title:
|
|
2642
|
-
clear:
|
|
2643
|
-
activeClear:
|
|
2644
|
-
count:
|
|
2645
|
-
cart:
|
|
2646
|
-
empty:
|
|
2647
|
-
product:
|
|
2648
|
-
products:
|
|
2649
|
-
image:
|
|
2650
|
-
productInfo:
|
|
2651
|
-
content:
|
|
2652
|
-
name:
|
|
2653
|
-
price:
|
|
2654
|
-
productButtons:
|
|
2655
|
-
productButton:
|
|
2656
|
-
productCount:
|
|
2657
|
-
bottom:
|
|
2658
|
-
subtotal:
|
|
2659
|
-
block:
|
|
2660
|
-
shoppingCount:
|
|
2661
|
-
total:
|
|
2662
|
-
link:
|
|
2663
|
-
userInfo:
|
|
2664
|
-
pagesMobileModal:
|
|
2665
|
-
pagesMobileModalContent:
|
|
2666
|
-
pagesMobileModalHeader:
|
|
2667
|
-
pagesMobileModalFooter:
|
|
2921
|
+
info: Do,
|
|
2922
|
+
top: Lo,
|
|
2923
|
+
title: Ho,
|
|
2924
|
+
clear: Ro,
|
|
2925
|
+
activeClear: zo,
|
|
2926
|
+
count: Fo,
|
|
2927
|
+
cart: Vo,
|
|
2928
|
+
empty: Yo,
|
|
2929
|
+
product: Go,
|
|
2930
|
+
products: Xo,
|
|
2931
|
+
image: Wo,
|
|
2932
|
+
productInfo: Jo,
|
|
2933
|
+
content: Qo,
|
|
2934
|
+
name: Ko,
|
|
2935
|
+
price: Zo,
|
|
2936
|
+
productButtons: ta,
|
|
2937
|
+
productButton: ea,
|
|
2938
|
+
productCount: sa,
|
|
2939
|
+
bottom: na,
|
|
2940
|
+
subtotal: ia,
|
|
2941
|
+
block: oa,
|
|
2942
|
+
shoppingCount: aa,
|
|
2943
|
+
total: ca,
|
|
2944
|
+
link: la,
|
|
2945
|
+
userInfo: ra,
|
|
2946
|
+
pagesMobileModal: da,
|
|
2947
|
+
pagesMobileModalContent: ua,
|
|
2948
|
+
pagesMobileModalHeader: _a,
|
|
2949
|
+
pagesMobileModalFooter: ma
|
|
2668
2950
|
};
|
|
2669
|
-
class
|
|
2951
|
+
class xt extends Error {
|
|
2670
2952
|
}
|
|
2671
|
-
|
|
2672
|
-
function
|
|
2953
|
+
xt.prototype.name = "InvalidTokenError";
|
|
2954
|
+
function pa(d) {
|
|
2673
2955
|
return decodeURIComponent(atob(d).replace(/(.)/g, (a, e) => {
|
|
2674
2956
|
let s = e.charCodeAt(0).toString(16).toUpperCase();
|
|
2675
2957
|
return s.length < 2 && (s = "0" + s), "%" + s;
|
|
2676
2958
|
}));
|
|
2677
2959
|
}
|
|
2678
|
-
function
|
|
2960
|
+
function ha(d) {
|
|
2679
2961
|
let a = d.replace(/-/g, "+").replace(/_/g, "/");
|
|
2680
2962
|
switch (a.length % 4) {
|
|
2681
2963
|
case 0:
|
|
@@ -2690,75 +2972,75 @@ function Ro(d) {
|
|
|
2690
2972
|
throw new Error("base64 string is not of the correct length");
|
|
2691
2973
|
}
|
|
2692
2974
|
try {
|
|
2693
|
-
return
|
|
2975
|
+
return pa(a);
|
|
2694
2976
|
} catch {
|
|
2695
2977
|
return atob(a);
|
|
2696
2978
|
}
|
|
2697
2979
|
}
|
|
2698
|
-
function
|
|
2980
|
+
function fa(d, a) {
|
|
2699
2981
|
if (typeof d != "string")
|
|
2700
|
-
throw new
|
|
2982
|
+
throw new xt("Invalid token specified: must be a string");
|
|
2701
2983
|
a || (a = {});
|
|
2702
2984
|
const e = a.header === !0 ? 0 : 1, s = d.split(".")[e];
|
|
2703
2985
|
if (typeof s != "string")
|
|
2704
|
-
throw new
|
|
2705
|
-
let
|
|
2986
|
+
throw new xt(`Invalid token specified: missing part #${e + 1}`);
|
|
2987
|
+
let i;
|
|
2706
2988
|
try {
|
|
2707
|
-
|
|
2989
|
+
i = ha(s);
|
|
2708
2990
|
} catch (c) {
|
|
2709
|
-
throw new
|
|
2991
|
+
throw new xt(`Invalid token specified: invalid base64 for part #${e + 1} (${c.message})`);
|
|
2710
2992
|
}
|
|
2711
2993
|
try {
|
|
2712
|
-
return JSON.parse(
|
|
2994
|
+
return JSON.parse(i);
|
|
2713
2995
|
} catch (c) {
|
|
2714
|
-
throw new
|
|
2996
|
+
throw new xt(`Invalid token specified: invalid json for part #${e + 1} (${c.message})`);
|
|
2715
2997
|
}
|
|
2716
2998
|
}
|
|
2717
|
-
const
|
|
2999
|
+
const sc = (d) => {
|
|
2718
3000
|
const { shopping: a, signUp: e, isShowUserInfo: s = !0 } = d;
|
|
2719
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
2720
|
-
a && /* @__PURE__ */ t.jsx(
|
|
2721
|
-
s && /* @__PURE__ */ t.jsx(
|
|
3001
|
+
return /* @__PURE__ */ t.jsxs("div", { className: C.buttons, children: [
|
|
3002
|
+
a && /* @__PURE__ */ t.jsx(ga, {}),
|
|
3003
|
+
s && /* @__PURE__ */ t.jsx(Ft, { signUp: e })
|
|
2722
3004
|
] });
|
|
2723
|
-
},
|
|
2724
|
-
const [d, a] =
|
|
2725
|
-
function r
|
|
2726
|
-
for (let
|
|
2727
|
-
for (let
|
|
2728
|
-
if (
|
|
2729
|
-
return
|
|
3005
|
+
}, ga = () => {
|
|
3006
|
+
const [d, a] = f.useState(!1), [e, s] = f.useState([]), { cart: i, getProducts: c } = Ot();
|
|
3007
|
+
function l(r) {
|
|
3008
|
+
for (let k = 0; k < i.parts.length; k++)
|
|
3009
|
+
for (let p = 0; p < r.variants.length; p++)
|
|
3010
|
+
if (i.parts[k].productVariantId === r.variants[k].id)
|
|
3011
|
+
return i.parts[k].productVariantId;
|
|
2730
3012
|
}
|
|
2731
|
-
function o(
|
|
2732
|
-
for (let
|
|
2733
|
-
for (let
|
|
2734
|
-
if (
|
|
2735
|
-
return
|
|
3013
|
+
function o(r) {
|
|
3014
|
+
for (let k = 0; k < i.parts.length; k++)
|
|
3015
|
+
for (let p = 0; p < r.variants.length; p++)
|
|
3016
|
+
if (i.parts[k].productVariantId === r.variants[k].id)
|
|
3017
|
+
return i.parts[k].quantity;
|
|
2736
3018
|
}
|
|
2737
|
-
|
|
3019
|
+
f.useEffect(() => {
|
|
2738
3020
|
(async () => {
|
|
2739
|
-
const
|
|
2740
|
-
|
|
2741
|
-
activeVariantId:
|
|
2742
|
-
quantity: o(
|
|
3021
|
+
const k = i.parts.map(($) => String($.productId)), m = (await c([...k])).map(($) => ({
|
|
3022
|
+
...$,
|
|
3023
|
+
activeVariantId: l($),
|
|
3024
|
+
quantity: o($)
|
|
2743
3025
|
}));
|
|
2744
|
-
s(
|
|
3026
|
+
s(m);
|
|
2745
3027
|
})();
|
|
2746
|
-
}, [
|
|
2747
|
-
function
|
|
2748
|
-
var
|
|
2749
|
-
return !
|
|
3028
|
+
}, [i.parts.length]);
|
|
3029
|
+
function n(r) {
|
|
3030
|
+
var k;
|
|
3031
|
+
return !r || !(r != null && r.variants) ? !1 : (k = r.variants.find((p) => p.id === r.activeVariantId)) == null ? void 0 : k.subscriptionSettings;
|
|
2750
3032
|
}
|
|
2751
|
-
const
|
|
3033
|
+
const _ = i.parts.length > 0 && e.length > 0 && !n(e[0]), [v, g] = f.useState(!1);
|
|
2752
3034
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2753
3035
|
/* @__PURE__ */ t.jsxs(
|
|
2754
|
-
|
|
3036
|
+
Q,
|
|
2755
3037
|
{
|
|
2756
3038
|
type: "Secondary",
|
|
2757
3039
|
style: {
|
|
2758
3040
|
padding: 10
|
|
2759
3041
|
},
|
|
2760
|
-
onClick: (
|
|
2761
|
-
|
|
3042
|
+
onClick: (r) => {
|
|
3043
|
+
r.stopPropagation(), window.location.pathname !== "/admin/builder" && (a(!0), g(!0));
|
|
2762
3044
|
},
|
|
2763
3045
|
children: [
|
|
2764
3046
|
/* @__PURE__ */ t.jsx(
|
|
@@ -2768,7 +3050,7 @@ const Ca = (d) => {
|
|
|
2768
3050
|
fill: "var(--icon-primary)"
|
|
2769
3051
|
}
|
|
2770
3052
|
),
|
|
2771
|
-
|
|
3053
|
+
_ && /* @__PURE__ */ t.jsx("div", { className: C.shoppingCount, children: i.parts.length })
|
|
2772
3054
|
]
|
|
2773
3055
|
}
|
|
2774
3056
|
),
|
|
@@ -2776,59 +3058,59 @@ const Ca = (d) => {
|
|
|
2776
3058
|
Mt,
|
|
2777
3059
|
{
|
|
2778
3060
|
close: () => {
|
|
2779
|
-
|
|
3061
|
+
g(!1), setTimeout(() => {
|
|
2780
3062
|
a(!1);
|
|
2781
3063
|
}, 300);
|
|
2782
3064
|
},
|
|
2783
3065
|
withAnimation: !1,
|
|
2784
3066
|
children: /* @__PURE__ */ t.jsx(
|
|
2785
|
-
|
|
3067
|
+
xa,
|
|
2786
3068
|
{
|
|
2787
3069
|
activeProducts: e,
|
|
2788
|
-
isCartNotEmpty:
|
|
2789
|
-
isOpen:
|
|
3070
|
+
isCartNotEmpty: _,
|
|
3071
|
+
isOpen: v
|
|
2790
3072
|
}
|
|
2791
3073
|
)
|
|
2792
3074
|
}
|
|
2793
3075
|
)
|
|
2794
3076
|
] });
|
|
2795
|
-
},
|
|
2796
|
-
const { activeProducts: a, isCartNotEmpty: e, isOpen: s } = d, { cart:
|
|
2797
|
-
function
|
|
2798
|
-
|
|
3077
|
+
}, xa = (d) => {
|
|
3078
|
+
const { activeProducts: a, isCartNotEmpty: e, isOpen: s } = d, { cart: i, reset: c, getTotalAndDiscount: l, updateQuantityOfProduct: o } = Ot(), n = Bt();
|
|
3079
|
+
function _(r) {
|
|
3080
|
+
n(r);
|
|
2799
3081
|
}
|
|
2800
|
-
function
|
|
3082
|
+
function v(r) {
|
|
2801
3083
|
o({
|
|
2802
|
-
productId:
|
|
2803
|
-
productVariantId:
|
|
2804
|
-
quantity:
|
|
3084
|
+
productId: r.id,
|
|
3085
|
+
productVariantId: r.activeVariantId,
|
|
3086
|
+
quantity: r.quantity + 1
|
|
2805
3087
|
});
|
|
2806
3088
|
}
|
|
2807
|
-
function
|
|
3089
|
+
function g(r) {
|
|
2808
3090
|
o({
|
|
2809
|
-
productId:
|
|
2810
|
-
productVariantId:
|
|
2811
|
-
quantity:
|
|
3091
|
+
productId: r.id,
|
|
3092
|
+
productVariantId: r.activeVariantId,
|
|
3093
|
+
quantity: r.quantity - 1
|
|
2812
3094
|
});
|
|
2813
3095
|
}
|
|
2814
3096
|
return /* @__PURE__ */ t.jsxs(
|
|
2815
3097
|
"div",
|
|
2816
3098
|
{
|
|
2817
|
-
className:
|
|
2818
|
-
[
|
|
3099
|
+
className: Y(C.modal, {
|
|
3100
|
+
[C.closing]: !s
|
|
2819
3101
|
}),
|
|
2820
|
-
onClick: (
|
|
3102
|
+
onClick: (r) => r.stopPropagation(),
|
|
2821
3103
|
children: [
|
|
2822
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2823
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2824
|
-
/* @__PURE__ */ t.jsx("span", { className:
|
|
2825
|
-
e && /* @__PURE__ */ t.jsx("div", { className:
|
|
3104
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.top, children: [
|
|
3105
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.info, children: [
|
|
3106
|
+
/* @__PURE__ */ t.jsx("span", { className: C.title, children: "Cart" }),
|
|
3107
|
+
e && /* @__PURE__ */ t.jsx("div", { className: C.count, children: i.parts.length })
|
|
2826
3108
|
] }),
|
|
2827
3109
|
/* @__PURE__ */ t.jsx(
|
|
2828
3110
|
"button",
|
|
2829
3111
|
{
|
|
2830
|
-
className:
|
|
2831
|
-
[
|
|
3112
|
+
className: Y(C.clear, {
|
|
3113
|
+
[C.activeClear]: e
|
|
2832
3114
|
}),
|
|
2833
3115
|
disabled: !e,
|
|
2834
3116
|
onClick: c,
|
|
@@ -2836,39 +3118,39 @@ const Ca = (d) => {
|
|
|
2836
3118
|
}
|
|
2837
3119
|
)
|
|
2838
3120
|
] }),
|
|
2839
|
-
e ? /* @__PURE__ */ t.jsxs("div", { className:
|
|
2840
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3121
|
+
e ? /* @__PURE__ */ t.jsxs("div", { className: C.cart, children: [
|
|
3122
|
+
/* @__PURE__ */ t.jsx("div", { className: C.products, children: a.map((r) => /* @__PURE__ */ t.jsxs(
|
|
2841
3123
|
"div",
|
|
2842
3124
|
{
|
|
2843
|
-
className:
|
|
3125
|
+
className: C.product,
|
|
2844
3126
|
children: [
|
|
2845
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3127
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.productInfo, children: [
|
|
2846
3128
|
/* @__PURE__ */ t.jsx(
|
|
2847
3129
|
"img",
|
|
2848
3130
|
{
|
|
2849
|
-
src: `https://imagedelivery.net/${
|
|
3131
|
+
src: `https://imagedelivery.net/${r.images[0].cfId}/w=500`,
|
|
2850
3132
|
alt: "image",
|
|
2851
3133
|
width: "100%",
|
|
2852
3134
|
height: "100%",
|
|
2853
|
-
className:
|
|
3135
|
+
className: C.image
|
|
2854
3136
|
}
|
|
2855
3137
|
),
|
|
2856
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2857
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
2858
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3138
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.content, children: [
|
|
3139
|
+
/* @__PURE__ */ t.jsx("div", { className: C.name, children: r.name }),
|
|
3140
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.price, children: [
|
|
2859
3141
|
"$",
|
|
2860
|
-
|
|
3142
|
+
r.variants.find((k) => k.id === r.activeVariantId).price.amount * ((r == null ? void 0 : r.quantity) || 1)
|
|
2861
3143
|
] })
|
|
2862
3144
|
] })
|
|
2863
3145
|
] }),
|
|
2864
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3146
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.productButtons, children: [
|
|
2865
3147
|
/* @__PURE__ */ t.jsx(
|
|
2866
3148
|
"div",
|
|
2867
3149
|
{
|
|
2868
3150
|
onClick: () => {
|
|
2869
|
-
|
|
3151
|
+
r.quantity !== 1 && g(r);
|
|
2870
3152
|
},
|
|
2871
|
-
className:
|
|
3153
|
+
className: C.productButton,
|
|
2872
3154
|
children: /* @__PURE__ */ t.jsx(
|
|
2873
3155
|
b,
|
|
2874
3156
|
{
|
|
@@ -2880,12 +3162,12 @@ const Ca = (d) => {
|
|
|
2880
3162
|
)
|
|
2881
3163
|
}
|
|
2882
3164
|
),
|
|
2883
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3165
|
+
/* @__PURE__ */ t.jsx("div", { className: C.productCount, children: r.quantity }),
|
|
2884
3166
|
/* @__PURE__ */ t.jsx(
|
|
2885
3167
|
"div",
|
|
2886
3168
|
{
|
|
2887
|
-
onClick: () =>
|
|
2888
|
-
className:
|
|
3169
|
+
onClick: () => v(r),
|
|
3170
|
+
className: C.productButton,
|
|
2889
3171
|
children: /* @__PURE__ */ t.jsx(
|
|
2890
3172
|
b,
|
|
2891
3173
|
{
|
|
@@ -2900,11 +3182,11 @@ const Ca = (d) => {
|
|
|
2900
3182
|
] })
|
|
2901
3183
|
]
|
|
2902
3184
|
},
|
|
2903
|
-
|
|
3185
|
+
r.id
|
|
2904
3186
|
)) }),
|
|
2905
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2906
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
2907
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3187
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.bottom, children: [
|
|
3188
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.subtotal, children: [
|
|
3189
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.block, children: [
|
|
2908
3190
|
/* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
|
|
2909
3191
|
/* @__PURE__ */ t.jsx(
|
|
2910
3192
|
b,
|
|
@@ -2916,18 +3198,18 @@ const Ca = (d) => {
|
|
|
2916
3198
|
}
|
|
2917
3199
|
)
|
|
2918
3200
|
] }),
|
|
2919
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3201
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.total, children: [
|
|
2920
3202
|
"$",
|
|
2921
|
-
|
|
3203
|
+
l().total
|
|
2922
3204
|
] })
|
|
2923
3205
|
] }),
|
|
2924
|
-
/* @__PURE__ */ t.jsx(
|
|
3206
|
+
/* @__PURE__ */ t.jsx(Q, { onClick: () => _("/checkout"), children: "Checkout" })
|
|
2925
3207
|
] })
|
|
2926
|
-
] }) : /* @__PURE__ */ t.jsx(
|
|
3208
|
+
] }) : /* @__PURE__ */ t.jsx(ba, {})
|
|
2927
3209
|
]
|
|
2928
3210
|
}
|
|
2929
3211
|
);
|
|
2930
|
-
},
|
|
3212
|
+
}, ba = () => /* @__PURE__ */ t.jsxs("div", { className: C.empty, children: [
|
|
2931
3213
|
/* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
|
|
2932
3214
|
b,
|
|
2933
3215
|
{
|
|
@@ -2943,22 +3225,22 @@ const Ca = (d) => {
|
|
|
2943
3225
|
"a",
|
|
2944
3226
|
{
|
|
2945
3227
|
href: "/products",
|
|
2946
|
-
className:
|
|
3228
|
+
className: C.link,
|
|
2947
3229
|
children: "view products"
|
|
2948
3230
|
}
|
|
2949
3231
|
)
|
|
2950
3232
|
] })
|
|
2951
|
-
] }),
|
|
2952
|
-
const a = JSON.parse(localStorage.getItem("token") || "{}"), { data: e } = a, s =
|
|
2953
|
-
function
|
|
3233
|
+
] }), Ft = ({ signUp: d }) => {
|
|
3234
|
+
const a = JSON.parse(localStorage.getItem("token") || "{}"), { data: e } = a, s = Bt();
|
|
3235
|
+
function i(o) {
|
|
2954
3236
|
s(o);
|
|
2955
3237
|
}
|
|
2956
3238
|
if (!e)
|
|
2957
3239
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
2958
3240
|
/* @__PURE__ */ t.jsx(
|
|
2959
|
-
|
|
3241
|
+
Q,
|
|
2960
3242
|
{
|
|
2961
|
-
onClick: () =>
|
|
3243
|
+
onClick: () => i("/customer-dash"),
|
|
2962
3244
|
type: "Secondary",
|
|
2963
3245
|
style: {
|
|
2964
3246
|
padding: 10
|
|
@@ -2967,9 +3249,9 @@ const Ca = (d) => {
|
|
|
2967
3249
|
}
|
|
2968
3250
|
),
|
|
2969
3251
|
d && /* @__PURE__ */ t.jsx(
|
|
2970
|
-
|
|
3252
|
+
Q,
|
|
2971
3253
|
{
|
|
2972
|
-
onClick: () =>
|
|
3254
|
+
onClick: () => i("/customer-dash"),
|
|
2973
3255
|
type: "Primary",
|
|
2974
3256
|
style: {
|
|
2975
3257
|
padding: 10
|
|
@@ -2978,41 +3260,41 @@ const Ca = (d) => {
|
|
|
2978
3260
|
}
|
|
2979
3261
|
)
|
|
2980
3262
|
] });
|
|
2981
|
-
const [c,
|
|
2982
|
-
return
|
|
3263
|
+
const [c, l] = f.useState("test-email@gmail.com");
|
|
3264
|
+
return f.useEffect(() => {
|
|
2983
3265
|
(async () => {
|
|
2984
|
-
const
|
|
2985
|
-
|
|
3266
|
+
const n = fa(e);
|
|
3267
|
+
l(n.email);
|
|
2986
3268
|
})();
|
|
2987
3269
|
}, [e]), /* @__PURE__ */ t.jsx(
|
|
2988
3270
|
"div",
|
|
2989
3271
|
{
|
|
2990
|
-
className:
|
|
2991
|
-
onClick: () =>
|
|
3272
|
+
className: C.userInfo,
|
|
3273
|
+
onClick: () => i("/customer-dash"),
|
|
2992
3274
|
children: /* @__PURE__ */ t.jsx("div", { children: c || "test-email@gmail.com" })
|
|
2993
3275
|
}
|
|
2994
3276
|
);
|
|
2995
|
-
},
|
|
3277
|
+
}, va = ({
|
|
2996
3278
|
children: d,
|
|
2997
3279
|
logo: a,
|
|
2998
3280
|
setIsOpen: e,
|
|
2999
3281
|
signUp: s
|
|
3000
3282
|
}) => {
|
|
3001
|
-
const { setIsOpen:
|
|
3002
|
-
|
|
3003
|
-
e(!1),
|
|
3283
|
+
const { setIsOpen: i } = Dt(), c = () => {
|
|
3284
|
+
i(!1), setTimeout(() => {
|
|
3285
|
+
e(!1), i(!0);
|
|
3004
3286
|
}, 300);
|
|
3005
3287
|
};
|
|
3006
3288
|
return /* @__PURE__ */ t.jsxs(
|
|
3007
3289
|
"div",
|
|
3008
3290
|
{
|
|
3009
|
-
className:
|
|
3010
|
-
onClick: (
|
|
3291
|
+
className: C.pagesMobileModal,
|
|
3292
|
+
onClick: (l) => l.stopPropagation(),
|
|
3011
3293
|
children: [
|
|
3012
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3294
|
+
/* @__PURE__ */ t.jsxs("div", { className: C.pagesMobileModalHeader, children: [
|
|
3013
3295
|
/* @__PURE__ */ t.jsx("div", { children: a }),
|
|
3014
3296
|
/* @__PURE__ */ t.jsx(
|
|
3015
|
-
|
|
3297
|
+
Q,
|
|
3016
3298
|
{
|
|
3017
3299
|
type: "Secondary",
|
|
3018
3300
|
onClick: c,
|
|
@@ -3026,33 +3308,33 @@ const Ca = (d) => {
|
|
|
3026
3308
|
}
|
|
3027
3309
|
)
|
|
3028
3310
|
] }),
|
|
3029
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3030
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3311
|
+
/* @__PURE__ */ t.jsx("div", { className: C.pagesMobileModalContent, children: d }),
|
|
3312
|
+
/* @__PURE__ */ t.jsx("div", { className: C.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(Ft, { signUp: s }) })
|
|
3031
3313
|
]
|
|
3032
3314
|
}
|
|
3033
3315
|
);
|
|
3034
|
-
},
|
|
3316
|
+
}, nc = ({
|
|
3035
3317
|
children: d,
|
|
3036
3318
|
logo: a,
|
|
3037
3319
|
signUp: e
|
|
3038
3320
|
}) => {
|
|
3039
|
-
const [s,
|
|
3321
|
+
const [s, i] = f.useState(!1);
|
|
3040
3322
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
3041
|
-
/* @__PURE__ */ t.jsx(
|
|
3042
|
-
s && /* @__PURE__ */ t.jsx(Mt, { close: () =>
|
|
3043
|
-
|
|
3323
|
+
/* @__PURE__ */ t.jsx(ja, { setIsOpenModal: i }),
|
|
3324
|
+
s && /* @__PURE__ */ t.jsx(Mt, { close: () => i(!1), children: /* @__PURE__ */ t.jsx(
|
|
3325
|
+
va,
|
|
3044
3326
|
{
|
|
3045
3327
|
logo: a,
|
|
3046
|
-
setIsOpen:
|
|
3328
|
+
setIsOpen: i,
|
|
3047
3329
|
signUp: e,
|
|
3048
3330
|
children: d
|
|
3049
3331
|
}
|
|
3050
3332
|
) })
|
|
3051
3333
|
] });
|
|
3052
|
-
},
|
|
3334
|
+
}, ja = (d) => {
|
|
3053
3335
|
const { setIsOpenModal: a } = d;
|
|
3054
3336
|
return /* @__PURE__ */ t.jsx(
|
|
3055
|
-
|
|
3337
|
+
Q,
|
|
3056
3338
|
{
|
|
3057
3339
|
type: "Secondary",
|
|
3058
3340
|
style: {
|
|
@@ -3070,28 +3352,28 @@ const Ca = (d) => {
|
|
|
3070
3352
|
)
|
|
3071
3353
|
}
|
|
3072
3354
|
);
|
|
3073
|
-
},
|
|
3074
|
-
share:
|
|
3075
|
-
modal:
|
|
3076
|
-
header:
|
|
3077
|
-
socials:
|
|
3078
|
-
social:
|
|
3079
|
-
copy:
|
|
3080
|
-
title:
|
|
3081
|
-
copyWrapper:
|
|
3082
|
-
copyText:
|
|
3083
|
-
copyTextMobile:
|
|
3084
|
-
copyTextMiniMobile:
|
|
3085
|
-
},
|
|
3086
|
-
const { isOpenModal: d, setIsOpenModal: a } =
|
|
3355
|
+
}, ya = "_share_xddz7_1", ka = "_modal_xddz7_8", $a = "_header_xddz7_20", Ia = "_socials_xddz7_30", Na = "_social_xddz7_30", wa = "_copy_xddz7_40", Ca = "_title_xddz7_47", Sa = "_copyWrapper_xddz7_53", Ba = "_copyText_xddz7_62", Ta = "_copyTextMobile_xddz7_75", Pa = "_copyTextMiniMobile_xddz7_94", lt = {
|
|
3356
|
+
share: ya,
|
|
3357
|
+
modal: ka,
|
|
3358
|
+
header: $a,
|
|
3359
|
+
socials: Ia,
|
|
3360
|
+
social: Na,
|
|
3361
|
+
copy: wa,
|
|
3362
|
+
title: Ca,
|
|
3363
|
+
copyWrapper: Sa,
|
|
3364
|
+
copyText: Ba,
|
|
3365
|
+
copyTextMobile: Ta,
|
|
3366
|
+
copyTextMiniMobile: Pa
|
|
3367
|
+
}, ic = () => {
|
|
3368
|
+
const { isOpenModal: d, setIsOpenModal: a } = Lt();
|
|
3087
3369
|
function e() {
|
|
3088
3370
|
a(!0);
|
|
3089
3371
|
}
|
|
3090
3372
|
return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
|
|
3091
3373
|
/* @__PURE__ */ t.jsx(
|
|
3092
|
-
|
|
3374
|
+
ot,
|
|
3093
3375
|
{
|
|
3094
|
-
className:
|
|
3376
|
+
className: lt.share,
|
|
3095
3377
|
onClick: (s) => {
|
|
3096
3378
|
s.stopPropagation(), e();
|
|
3097
3379
|
},
|
|
@@ -3106,45 +3388,45 @@ const Ca = (d) => {
|
|
|
3106
3388
|
)
|
|
3107
3389
|
}
|
|
3108
3390
|
),
|
|
3109
|
-
d && /* @__PURE__ */ t.jsx(Mt, { close: a, children: /* @__PURE__ */ t.jsx(
|
|
3391
|
+
d && /* @__PURE__ */ t.jsx(Mt, { close: a, children: /* @__PURE__ */ t.jsx(Aa, {}) })
|
|
3110
3392
|
] });
|
|
3111
|
-
},
|
|
3112
|
-
const { setIsOpenModal: d } =
|
|
3393
|
+
}, Aa = () => {
|
|
3394
|
+
const { setIsOpenModal: d } = Lt(), { notification: a, setNotification: e } = Gt(), { setIsOpen: s } = Dt(), i = window.location.href;
|
|
3113
3395
|
function c() {
|
|
3114
|
-
navigator.clipboard.writeText(
|
|
3396
|
+
navigator.clipboard.writeText(i), e({
|
|
3115
3397
|
message: "Link copied to clipboard",
|
|
3116
3398
|
status: "success"
|
|
3117
3399
|
});
|
|
3118
3400
|
}
|
|
3119
|
-
function
|
|
3401
|
+
function l() {
|
|
3120
3402
|
s(!1), setTimeout(() => {
|
|
3121
3403
|
d(!1), s(!0);
|
|
3122
3404
|
}, 300);
|
|
3123
3405
|
}
|
|
3124
|
-
function o(
|
|
3125
|
-
return
|
|
3406
|
+
function o(n, _) {
|
|
3407
|
+
return n.length > _ ? n.slice(0, _) + "..." : n;
|
|
3126
3408
|
}
|
|
3127
3409
|
return /* @__PURE__ */ t.jsxs(
|
|
3128
3410
|
"div",
|
|
3129
3411
|
{
|
|
3130
|
-
className:
|
|
3131
|
-
onClick: (
|
|
3412
|
+
className: lt.modal,
|
|
3413
|
+
onClick: (n) => n.stopPropagation(),
|
|
3132
3414
|
children: [
|
|
3133
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3134
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3415
|
+
/* @__PURE__ */ t.jsxs("div", { className: lt.header, children: [
|
|
3416
|
+
/* @__PURE__ */ t.jsx("div", { className: lt.title, children: "Copy Product Link" }),
|
|
3135
3417
|
/* @__PURE__ */ t.jsx(
|
|
3136
3418
|
b,
|
|
3137
3419
|
{
|
|
3138
3420
|
name: "X",
|
|
3139
3421
|
fill: "#757575",
|
|
3140
|
-
onClick:
|
|
3422
|
+
onClick: l,
|
|
3141
3423
|
hoverable: !0
|
|
3142
3424
|
}
|
|
3143
3425
|
)
|
|
3144
3426
|
] }),
|
|
3145
|
-
/* @__PURE__ */ t.jsxs("div", { className:
|
|
3427
|
+
/* @__PURE__ */ t.jsxs("div", { className: lt.copyWrapper, children: [
|
|
3146
3428
|
/* @__PURE__ */ t.jsxs(
|
|
3147
|
-
|
|
3429
|
+
ot,
|
|
3148
3430
|
{
|
|
3149
3431
|
type: "Secondary",
|
|
3150
3432
|
onClick: c,
|
|
@@ -3152,14 +3434,14 @@ const Ca = (d) => {
|
|
|
3152
3434
|
flex: 1
|
|
3153
3435
|
},
|
|
3154
3436
|
children: [
|
|
3155
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3156
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3157
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3437
|
+
/* @__PURE__ */ t.jsx("div", { className: lt.copyText, children: o(i, 100) }),
|
|
3438
|
+
/* @__PURE__ */ t.jsx("div", { className: lt.copyTextMobile, children: o(i, 40) }),
|
|
3439
|
+
/* @__PURE__ */ t.jsx("div", { className: lt.copyTextMiniMobile, children: o(i, 20) })
|
|
3158
3440
|
]
|
|
3159
3441
|
}
|
|
3160
3442
|
),
|
|
3161
3443
|
/* @__PURE__ */ t.jsx(
|
|
3162
|
-
|
|
3444
|
+
ot,
|
|
3163
3445
|
{
|
|
3164
3446
|
type: "Secondary",
|
|
3165
3447
|
onClick: c,
|
|
@@ -3170,27 +3452,27 @@ const Ca = (d) => {
|
|
|
3170
3452
|
]
|
|
3171
3453
|
}
|
|
3172
3454
|
);
|
|
3173
|
-
},
|
|
3174
|
-
accordion:
|
|
3175
|
-
header:
|
|
3176
|
-
icon:
|
|
3177
|
-
open:
|
|
3178
|
-
content:
|
|
3179
|
-
},
|
|
3180
|
-
const [s,
|
|
3181
|
-
|
|
3455
|
+
}, Oa = "_accordion_1s1lq_1", Ma = "_header_1s1lq_9", qa = "_icon_1s1lq_18", Ea = "_open_1s1lq_21", Ua = "_content_1s1lq_25", gt = {
|
|
3456
|
+
accordion: Oa,
|
|
3457
|
+
header: Ma,
|
|
3458
|
+
icon: qa,
|
|
3459
|
+
open: Ea,
|
|
3460
|
+
content: Ua
|
|
3461
|
+
}, oc = ({ title: d, content: a, defaultOpen: e = !1 }) => {
|
|
3462
|
+
const [s, i] = f.useState(e), [c, l] = f.useState(0), o = f.useRef(null), n = () => {
|
|
3463
|
+
i(!s);
|
|
3182
3464
|
};
|
|
3183
|
-
return
|
|
3184
|
-
o.current &&
|
|
3185
|
-
}, [s]), /* @__PURE__ */ t.jsxs("div", { className:
|
|
3465
|
+
return f.useEffect(() => {
|
|
3466
|
+
o.current && l(s ? o.current.scrollHeight : 0);
|
|
3467
|
+
}, [s]), /* @__PURE__ */ t.jsxs("div", { className: gt.accordion, children: [
|
|
3186
3468
|
/* @__PURE__ */ t.jsxs(
|
|
3187
3469
|
"div",
|
|
3188
3470
|
{
|
|
3189
|
-
className:
|
|
3190
|
-
onClick:
|
|
3471
|
+
className: gt.header,
|
|
3472
|
+
onClick: n,
|
|
3191
3473
|
children: [
|
|
3192
3474
|
/* @__PURE__ */ t.jsx("h5", { id: "h5", children: d }),
|
|
3193
|
-
/* @__PURE__ */ t.jsx("div", { className:
|
|
3475
|
+
/* @__PURE__ */ t.jsx("div", { className: Y(gt.icon, { [gt.open]: s }), children: /* @__PURE__ */ t.jsx(b, { name: "CaretDown" }) })
|
|
3194
3476
|
]
|
|
3195
3477
|
}
|
|
3196
3478
|
),
|
|
@@ -3198,15 +3480,15 @@ const Ca = (d) => {
|
|
|
3198
3480
|
"div",
|
|
3199
3481
|
{
|
|
3200
3482
|
ref: o,
|
|
3201
|
-
className:
|
|
3483
|
+
className: gt.content,
|
|
3202
3484
|
style: { height: `${c}px` },
|
|
3203
3485
|
children: /* @__PURE__ */ t.jsx("p", { id: "p", children: a })
|
|
3204
3486
|
}
|
|
3205
3487
|
)
|
|
3206
3488
|
] });
|
|
3207
|
-
},
|
|
3208
|
-
const c =
|
|
3209
|
-
|
|
3489
|
+
}, ac = ({ children: d, path: a, className: e, target: s = "_self", id: i }) => {
|
|
3490
|
+
const c = Bt(), l = /^https?:\/\//.test(a), o = (n) => {
|
|
3491
|
+
l || s === "_blank" ? s === "_blank" ? window.open(a, "_blank") : window.location.href = a : (n.preventDefault(), c(a, { replace: !0 }));
|
|
3210
3492
|
};
|
|
3211
3493
|
return /* @__PURE__ */ t.jsx(
|
|
3212
3494
|
"div",
|
|
@@ -3215,16 +3497,16 @@ const Ca = (d) => {
|
|
|
3215
3497
|
className: e,
|
|
3216
3498
|
role: "link",
|
|
3217
3499
|
style: { cursor: "pointer" },
|
|
3218
|
-
id:
|
|
3500
|
+
id: i,
|
|
3219
3501
|
children: d
|
|
3220
3502
|
}
|
|
3221
3503
|
);
|
|
3222
|
-
},
|
|
3223
|
-
buttonsBlock:
|
|
3224
|
-
slideUp:
|
|
3225
|
-
},
|
|
3504
|
+
}, Da = "_buttonsBlock_1b2rb_1", La = "_slideUp_1b2rb_1", Ha = {
|
|
3505
|
+
buttonsBlock: Da,
|
|
3506
|
+
slideUp: La
|
|
3507
|
+
}, cc = () => /* @__PURE__ */ t.jsxs("div", { className: Ha.buttonsBlock, children: [
|
|
3226
3508
|
/* @__PURE__ */ t.jsx(
|
|
3227
|
-
|
|
3509
|
+
Q,
|
|
3228
3510
|
{
|
|
3229
3511
|
type: "Primary",
|
|
3230
3512
|
style: {
|
|
@@ -3236,19 +3518,19 @@ const Ca = (d) => {
|
|
|
3236
3518
|
children: "Add to Cart"
|
|
3237
3519
|
}
|
|
3238
3520
|
),
|
|
3239
|
-
/* @__PURE__ */ t.jsx(
|
|
3240
|
-
] }),
|
|
3241
|
-
wrapper:
|
|
3242
|
-
label:
|
|
3243
|
-
textarea:
|
|
3244
|
-
length:
|
|
3245
|
-
},
|
|
3246
|
-
const { onChange: a, label: e, value: s, maxLength:
|
|
3247
|
-
return /* @__PURE__ */ t.jsxs("div", { className:
|
|
3521
|
+
/* @__PURE__ */ t.jsx(Q, { type: "Secondary", children: "Buy" })
|
|
3522
|
+
] }), Ra = "_wrapper_st58d_1", za = "_label_st58d_10", Fa = "_textarea_st58d_18", Va = "_length_st58d_33", jt = {
|
|
3523
|
+
wrapper: Ra,
|
|
3524
|
+
label: za,
|
|
3525
|
+
textarea: Fa,
|
|
3526
|
+
length: Va
|
|
3527
|
+
}, lc = (d) => {
|
|
3528
|
+
const { onChange: a, label: e, value: s, maxLength: i, placeholder: c = "Type something..." } = d, [l, o] = f.useState(s.length);
|
|
3529
|
+
return /* @__PURE__ */ t.jsxs("div", { className: jt.wrapper, children: [
|
|
3248
3530
|
e && /* @__PURE__ */ t.jsx(
|
|
3249
3531
|
"label",
|
|
3250
3532
|
{
|
|
3251
|
-
className:
|
|
3533
|
+
className: jt.label,
|
|
3252
3534
|
htmlFor: e,
|
|
3253
3535
|
children: e
|
|
3254
3536
|
}
|
|
@@ -3258,55 +3540,56 @@ const Ca = (d) => {
|
|
|
3258
3540
|
{
|
|
3259
3541
|
id: e,
|
|
3260
3542
|
defaultValue: s,
|
|
3261
|
-
onChange: (
|
|
3262
|
-
o(
|
|
3543
|
+
onChange: (n) => {
|
|
3544
|
+
o(n.target.value.length), a(n.target.value);
|
|
3263
3545
|
},
|
|
3264
3546
|
placeholder: c,
|
|
3265
|
-
className:
|
|
3266
|
-
maxLength:
|
|
3547
|
+
className: jt.textarea,
|
|
3548
|
+
maxLength: i
|
|
3267
3549
|
}
|
|
3268
3550
|
),
|
|
3269
|
-
|
|
3270
|
-
|
|
3551
|
+
i && /* @__PURE__ */ t.jsxs("div", { className: jt.length, children: [
|
|
3552
|
+
l,
|
|
3271
3553
|
"/",
|
|
3272
|
-
|
|
3554
|
+
i
|
|
3273
3555
|
] })
|
|
3274
3556
|
] });
|
|
3275
3557
|
};
|
|
3276
3558
|
export {
|
|
3277
|
-
|
|
3278
|
-
|
|
3279
|
-
|
|
3280
|
-
|
|
3281
|
-
|
|
3282
|
-
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3559
|
+
oc as Accordion,
|
|
3560
|
+
ja as BurgerMenuButton,
|
|
3561
|
+
Q as Button,
|
|
3562
|
+
ai as ButtonTypeSettings,
|
|
3563
|
+
Za as ButtonsSettings,
|
|
3564
|
+
Ja as CategorySettings,
|
|
3565
|
+
bt as ChooseImage,
|
|
3566
|
+
uc as ChooseImageModal,
|
|
3567
|
+
ba as EmptyCart,
|
|
3568
|
+
Ka as FormSettings,
|
|
3569
|
+
sc as HeaderButtons,
|
|
3288
3570
|
b as Icon,
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3292
|
-
|
|
3293
|
-
|
|
3294
|
-
|
|
3295
|
-
|
|
3571
|
+
tt as InputSettings,
|
|
3572
|
+
$o as InputUI,
|
|
3573
|
+
Ge as ItemsSettings,
|
|
3574
|
+
Wa as LayoutSettings,
|
|
3575
|
+
ac as Link,
|
|
3576
|
+
tc as ListingSelector,
|
|
3577
|
+
_c as Loader,
|
|
3296
3578
|
Mt as Modal,
|
|
3297
|
-
|
|
3298
|
-
|
|
3299
|
-
|
|
3300
|
-
|
|
3301
|
-
|
|
3302
|
-
|
|
3303
|
-
|
|
3304
|
-
|
|
3305
|
-
|
|
3306
|
-
|
|
3307
|
-
|
|
3308
|
-
|
|
3309
|
-
|
|
3579
|
+
nc as PagesMobileMenu,
|
|
3580
|
+
va as PagesMobileModal,
|
|
3581
|
+
Qa as PagesSettings,
|
|
3582
|
+
cc as ProductCardButtons,
|
|
3583
|
+
ec as ProductOptions,
|
|
3584
|
+
qt as RangeSelector,
|
|
3585
|
+
et as Select,
|
|
3586
|
+
ic as ShareLink,
|
|
3587
|
+
ga as ShoppingButton,
|
|
3588
|
+
xa as ShoppingModalCart,
|
|
3589
|
+
st as Switch,
|
|
3590
|
+
Rt as TextSettings,
|
|
3591
|
+
Et as TextareaSettings,
|
|
3592
|
+
lc as TextareaUI,
|
|
3310
3593
|
Ht as TypesText,
|
|
3311
|
-
|
|
3594
|
+
Ft as UserInfo
|
|
3312
3595
|
};
|