@billgangcom/theme-lib 1.44.2 → 1.44.4

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