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