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