@billgangcom/theme-lib 1.33.1 → 1.34.0

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