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