@billgangcom/theme-lib 1.71.3 → 1.71.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,6 +1,6 @@
1
- import { j as t, I as b, c as F, d as Nt, e as pt, g as mt, P as gt, S as lt, h as Pt, D as ft, i as xt, v as _t, B as dt, k as at, a as kt, l as wt, O as ht, m as J, n as jt, C as vt, o as V, p as qt, q as At, r as yt, t as Dt, w as bt, x as W, L as Et, y as Ct, z as St, A as ot, s as it, f as Q, E as zt, F as E, G as Rt, M as ut, H as Lt, J as ct, K as Tt, N as Ut, Q as Mt, T as Ht, U as Bt, V as Ft } from "./index-ChzUc1hG.js";
2
- import { a3 as Zn, $ as ti, Z as ei, a2 as si, Y as ni, _ as ii, W as ai, X as oi, a0 as ci, a1 as ri } from "./index-ChzUc1hG.js";
3
- import x from "react";
1
+ import { j as t, I, c as H, d as Nt, e as pt, g as mt, P as gt, S as lt, h as wt, D as ft, i as xt, v as _t, B as dt, k as at, a as Pt, l as kt, O as ht, m as J, n as yt, C as jt, o as V, p as Ot, q as At, r as vt, t as Dt, w as bt, x as W, L as Et, y as Ct, z as St, A as ct, s as it, f as Q, E as Rt, F as R, G as Lt, M as ut, H as Ut, J as rt, K as Tt, N as zt, Q as Mt, T as Ft, U as Bt, V as Ht } from "./index-PIQNHMY6.js";
2
+ import { a4 as ti, $ as ei, Z as si, a3 as ni, a2 as ii, Y as ai, _ as oi, W as ci, X as ri, a0 as li, a1 as di } from "./index-PIQNHMY6.js";
3
+ import y from "react";
4
4
  import "react-dom";
5
5
  const Vt = "_block_kh9z8_8", Yt = "_title_kh9z8_16", Gt = "_subtitle_kh9z8_23", Wt = "_alignmentContent_kh9z8_30", Xt = "_alignments_kh9z8_39", Qt = "_alignment_kh9z8_30", Jt = "_circle_kh9z8_64", Kt = "_paddings_kh9z8_71", Zt = "_padding_kh9z8_71", te = "_active_kh9z8_97", G = {
6
6
  block: Vt,
@@ -23,16 +23,16 @@ const Vt = "_block_kh9z8_8", Yt = "_title_kh9z8_16", Gt = "_subtitle_kh9z8_23",
23
23
  "bottomLeft",
24
24
  "bottom",
25
25
  "bottomRight"
26
- ], se = ["left", "top", "right", "bottom"], Dn = (h) => {
26
+ ], se = ["left", "top", "right", "bottom"], En = (h) => {
27
27
  const {
28
- alignment: i,
28
+ alignment: n,
29
29
  padding: a,
30
30
  setPadding: s,
31
31
  setAlignment: e,
32
32
  isAlignment: r = !0,
33
- isPadding: c = !0
33
+ isPadding: o = !0
34
34
  } = h;
35
- function f(d) {
35
+ function x(d) {
36
36
  switch (d) {
37
37
  case "left":
38
38
  case "topLeft":
@@ -50,7 +50,7 @@ const Vt = "_block_kh9z8_8", Yt = "_title_kh9z8_16", Gt = "_subtitle_kh9z8_23",
50
50
  return "TextAlignCenter";
51
51
  }
52
52
  }
53
- function j(d) {
53
+ function v(d) {
54
54
  switch (d) {
55
55
  case "left":
56
56
  return "AlignLeft";
@@ -62,7 +62,7 @@ const Vt = "_block_kh9z8_8", Yt = "_title_kh9z8_16", Gt = "_subtitle_kh9z8_23",
62
62
  return "AlignBottom";
63
63
  }
64
64
  }
65
- const [v, T] = x.useState(null), [_, m] = x.useState(null);
65
+ const [b, M] = y.useState(null), [j, m] = y.useState(null);
66
66
  return /* @__PURE__ */ t.jsxs("div", { className: G.layout, children: [
67
67
  /* @__PURE__ */ t.jsx("h3", { className: G.title, children: "Layout (for Desktop version)" }),
68
68
  /* @__PURE__ */ t.jsxs("div", { className: G.alignmentContent, children: [
@@ -76,26 +76,26 @@ const Vt = "_block_kh9z8_8", Yt = "_title_kh9z8_16", Gt = "_subtitle_kh9z8_23",
76
76
  },
77
77
  className: G.alignment,
78
78
  onMouseEnter: () => {
79
- T(d);
79
+ M(d);
80
80
  },
81
81
  onMouseLeave: () => {
82
- T(null);
82
+ M(null);
83
83
  },
84
84
  children: [
85
- d !== i && v !== d && /* @__PURE__ */ t.jsx("div", { className: G.circle }),
86
- d !== i && v === d && /* @__PURE__ */ t.jsx(
87
- b,
85
+ d !== n && b !== d && /* @__PURE__ */ t.jsx("div", { className: G.circle }),
86
+ d !== n && b === d && /* @__PURE__ */ t.jsx(
87
+ I,
88
88
  {
89
- name: f(v),
89
+ name: x(b),
90
90
  fill: "#c2c2c2",
91
91
  width: 22,
92
92
  height: 22
93
93
  }
94
94
  ),
95
- d === i && /* @__PURE__ */ t.jsx(
96
- b,
95
+ d === n && /* @__PURE__ */ t.jsx(
96
+ I,
97
97
  {
98
- name: f(i),
98
+ name: x(n),
99
99
  fill: "#FF3F19",
100
100
  width: 22,
101
101
  height: 22
@@ -106,13 +106,13 @@ const Vt = "_block_kh9z8_8", Yt = "_title_kh9z8_16", Gt = "_subtitle_kh9z8_23",
106
106
  d
107
107
  )) })
108
108
  ] }),
109
- c && /* @__PURE__ */ t.jsxs("div", { className: G.block, children: [
109
+ o && /* @__PURE__ */ t.jsxs("div", { className: G.block, children: [
110
110
  /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: "Paddings" }),
111
111
  /* @__PURE__ */ t.jsx("div", { className: G.paddings, children: se.map((d) => /* @__PURE__ */ t.jsxs(
112
112
  "label",
113
113
  {
114
- className: F(G.padding, {
115
- [G.active]: _ === d
114
+ className: H(G.padding, {
115
+ [G.active]: j === d
116
116
  }),
117
117
  onFocus: () => {
118
118
  m(d);
@@ -122,9 +122,9 @@ const Vt = "_block_kh9z8_8", Yt = "_title_kh9z8_16", Gt = "_subtitle_kh9z8_23",
122
122
  },
123
123
  children: [
124
124
  /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
125
- b,
125
+ I,
126
126
  {
127
- name: j(d),
127
+ name: v(d),
128
128
  width: 20,
129
129
  height: 20
130
130
  }
@@ -163,71 +163,71 @@ const Vt = "_block_kh9z8_8", Yt = "_title_kh9z8_16", Gt = "_subtitle_kh9z8_23",
163
163
  addButton: he,
164
164
  deleteButton: pe
165
165
  };
166
- function me({ id: h, children: i }) {
166
+ function me({ id: h, children: n }) {
167
167
  const {
168
168
  attributes: a,
169
169
  listeners: s,
170
170
  setNodeRef: e,
171
171
  transform: r,
172
- transition: c,
173
- isDragging: f
174
- } = jt({
172
+ transition: o,
173
+ isDragging: x
174
+ } = yt({
175
175
  id: h
176
- }), j = {
177
- transform: vt.Transform.toString(r),
178
- transition: c
176
+ }), v = {
177
+ transform: jt.Transform.toString(r),
178
+ transition: o
179
179
  };
180
180
  return /* @__PURE__ */ t.jsx(
181
181
  "div",
182
182
  {
183
183
  ref: e,
184
- style: j,
185
- className: `${X.product} ${f ? X.dragging : ""}`,
184
+ style: v,
185
+ className: `${X.product} ${x ? X.dragging : ""}`,
186
186
  ...a,
187
187
  ...s,
188
- children: i
188
+ children: n
189
189
  }
190
190
  );
191
191
  }
192
- const En = (h) => {
192
+ const Rn = (h) => {
193
193
  const {
194
- isActiveItems: i,
194
+ isActiveItems: n,
195
195
  setIsActiveItems: a,
196
196
  items: s,
197
197
  setItems: e,
198
198
  other: r,
199
- tags: c,
200
- title: f,
201
- subtitle: j,
202
- draggable: v = !1,
203
- withImage: T = !1,
204
- addable: _ = !0,
199
+ tags: o,
200
+ title: x,
201
+ subtitle: v,
202
+ draggable: b = !1,
203
+ withImage: M = !1,
204
+ addable: j = !0,
205
205
  itemsOptions: m,
206
206
  hasRangeSelector: d = !1,
207
207
  rangeSelectorOptions: l,
208
- limit: n,
209
- autoScrollInterval: o,
210
- deletable: C,
211
- aspectRatio: y,
212
- setAspectRatio: M
213
- } = h, U = pt(
208
+ limit: g,
209
+ autoScrollInterval: c,
210
+ deletable: i,
211
+ aspectRatio: _,
212
+ setAspectRatio: S
213
+ } = h, L = pt(
214
214
  mt(gt, {
215
215
  activationConstraint: {
216
216
  distance: 5
217
217
  }
218
218
  })
219
- ), z = (p) => {
220
- const { active: S, over: w } = p;
221
- if (w && S.id !== w.id) {
222
- const O = s.findIndex((q) => q === S.id), N = s.findIndex((q) => q === w.id);
223
- if (O !== -1 && N !== -1) {
224
- const q = [...s], [I] = q.splice(O, 1);
225
- q.splice(N, 0, I), e(q);
219
+ ), E = (p) => {
220
+ const { active: w, over: T } = p;
221
+ if (T && w.id !== T.id) {
222
+ const $ = s.findIndex((O) => O === w.id), C = s.findIndex((O) => O === T.id);
223
+ if ($ !== -1 && C !== -1) {
224
+ const O = [...s], [N] = O.splice($, 1);
225
+ O.splice(C, 0, N), e(O);
226
226
  }
227
227
  }
228
228
  };
229
229
  function K(p) {
230
- if (T)
230
+ if (M)
231
231
  return p ? /* @__PURE__ */ t.jsx(
232
232
  "img",
233
233
  {
@@ -237,7 +237,7 @@ const En = (h) => {
237
237
  height: 16
238
238
  }
239
239
  ) : /* @__PURE__ */ t.jsx(
240
- b,
240
+ I,
241
241
  {
242
242
  name: "Image",
243
243
  width: 16,
@@ -246,12 +246,12 @@ const En = (h) => {
246
246
  }
247
247
  );
248
248
  }
249
- const g = (p, S = !1) => {
250
- const w = m.find((N) => N.id === p);
251
- if (!w) return;
252
- const O = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
253
- v && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
254
- b,
249
+ const f = (p, w = !1) => {
250
+ const T = m.find((C) => C.id === p);
251
+ if (!T) return;
252
+ const $ = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
253
+ b && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
254
+ I,
255
255
  {
256
256
  name: "DotsSixVertical",
257
257
  hoverable: !0,
@@ -262,78 +262,78 @@ const En = (h) => {
262
262
  /* @__PURE__ */ t.jsx(
263
263
  at,
264
264
  {
265
- onChange: (N) => {
266
- const q = [...s], I = m.find((u) => u.name === N);
267
- if (!I) return;
268
- const A = I.id, H = q.map((u) => u === p ? A : u);
269
- e([...H]);
265
+ onChange: (C) => {
266
+ const O = [...s], N = m.find((u) => u.name === C);
267
+ if (!N) return;
268
+ const A = N.id, F = O.map((u) => u === p ? A : u);
269
+ e([...F]);
270
270
  },
271
- value: w.name,
272
- options: m.filter((N) => !s.find((q) => q === N.id)).map((N) => N.name),
273
- leftAddonOptions: m.map((N) => ({
274
- value: N.name,
275
- addon: K(N.images)
271
+ value: T.name,
272
+ options: m.filter((C) => !s.find((O) => O === C.id)).map((C) => C.name),
273
+ leftAddonOptions: m.map((C) => ({
274
+ value: C.name,
275
+ addon: K(C.images)
276
276
  }))
277
277
  }
278
278
  ),
279
- S && /* @__PURE__ */ t.jsx("div", { className: X.buttons, children: /* @__PURE__ */ t.jsx("div", { className: X.deleteButton, children: /* @__PURE__ */ t.jsx(
280
- b,
279
+ w && /* @__PURE__ */ t.jsx("div", { className: X.buttons, children: /* @__PURE__ */ t.jsx("div", { className: X.deleteButton, children: /* @__PURE__ */ t.jsx(
280
+ I,
281
281
  {
282
282
  name: "Trash",
283
283
  hoverable: !0,
284
284
  width: 20,
285
285
  height: 20,
286
286
  fill: "#C12A2A",
287
- onClick: () => e(s.filter((N) => N !== p))
287
+ onClick: () => e(s.filter((C) => C !== p))
288
288
  }
289
289
  ) }) })
290
290
  ] });
291
- return v ? /* @__PURE__ */ t.jsx(
291
+ return b ? /* @__PURE__ */ t.jsx(
292
292
  me,
293
293
  {
294
294
  id: p,
295
- children: O
295
+ children: $
296
296
  },
297
297
  J()
298
298
  ) : /* @__PURE__ */ t.jsx(
299
299
  "div",
300
300
  {
301
301
  className: X.product,
302
- children: O
302
+ children: $
303
303
  },
304
304
  J()
305
305
  );
306
306
  };
307
307
  return /* @__PURE__ */ t.jsxs("div", { className: X.productsBlock, children: [
308
- (f || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: X.top, children: [
309
- f && /* @__PURE__ */ t.jsx("h3", { className: X.title, children: f }),
310
- i !== void 0 && /* @__PURE__ */ t.jsx(
308
+ (x || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: X.top, children: [
309
+ x && /* @__PURE__ */ t.jsx("h3", { className: X.title, children: x }),
310
+ n !== void 0 && /* @__PURE__ */ t.jsx(
311
311
  lt,
312
312
  {
313
- current: i,
313
+ current: n,
314
314
  onChange: (p) => a == null ? void 0 : a(p)
315
315
  }
316
316
  )
317
317
  ] }),
318
- d && l && /* @__PURE__ */ t.jsx(Pt, { ...l }),
318
+ d && l && /* @__PURE__ */ t.jsx(wt, { ...l }),
319
319
  /* @__PURE__ */ t.jsxs("div", { className: X.products, children: [
320
- j && /* @__PURE__ */ t.jsx("h5", { className: X.subtitle, children: j }),
321
- v ? /* @__PURE__ */ t.jsx(
320
+ v && /* @__PURE__ */ t.jsx("h5", { className: X.subtitle, children: v }),
321
+ b ? /* @__PURE__ */ t.jsx(
322
322
  ft,
323
323
  {
324
- sensors: U,
325
- onDragEnd: z,
324
+ sensors: L,
325
+ onDragEnd: E,
326
326
  children: /* @__PURE__ */ t.jsx(
327
327
  xt,
328
328
  {
329
329
  items: s,
330
330
  strategy: _t,
331
- children: s.map((p) => g(p, C))
331
+ children: s.map((p) => f(p, i))
332
332
  }
333
333
  )
334
334
  }
335
- ) : s.map((p) => g(p, C)),
336
- _ && /* @__PURE__ */ t.jsx(
335
+ ) : s.map((p) => f(p, i)),
336
+ j && /* @__PURE__ */ t.jsx(
337
337
  "div",
338
338
  {
339
339
  style: {
@@ -346,22 +346,22 @@ const En = (h) => {
346
346
  dt,
347
347
  {
348
348
  withoutHover: !0,
349
- className: F(X.button, {
350
- [X.disabled]: !!(n && n <= s.length || s.length === m.length)
349
+ className: H(X.button, {
350
+ [X.disabled]: !!(g && g <= s.length || s.length === m.length)
351
351
  }),
352
352
  size: "s",
353
- disabled: !!(n && n <= s.length || s.length === m.length),
353
+ disabled: !!(g && g <= s.length || s.length === m.length),
354
354
  onClick: () => {
355
355
  const p = [...s];
356
- let S = null;
356
+ let w = null;
357
357
  if (m) {
358
- for (let w = 0; w < m.length; w++)
359
- if (!s.find((O) => O === m[w].id)) {
360
- S = m[w];
358
+ for (let T = 0; T < m.length; T++)
359
+ if (!s.find(($) => $ === m[T].id)) {
360
+ w = m[T];
361
361
  break;
362
362
  }
363
363
  }
364
- p.push((S == null ? void 0 : S.id) || m[0].id), e(p);
364
+ p.push((w == null ? void 0 : w.id) || m[0].id), e(p);
365
365
  },
366
366
  style: {
367
367
  width: "fit-content"
@@ -369,7 +369,7 @@ const En = (h) => {
369
369
  children: /* @__PURE__ */ t.jsxs("div", { className: X.addButton, children: [
370
370
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
371
371
  /* @__PURE__ */ t.jsx(
372
- b,
372
+ I,
373
373
  {
374
374
  name: "Plus",
375
375
  width: 16,
@@ -382,21 +382,21 @@ const En = (h) => {
382
382
  }
383
383
  )
384
384
  ] }),
385
- y && M && /* @__PURE__ */ t.jsx(
385
+ _ && S && /* @__PURE__ */ t.jsx(
386
386
  at,
387
387
  {
388
- value: y,
388
+ value: _,
389
389
  label: "Aspect Ratio",
390
- options: Object.keys(wt),
391
- onChange: (p) => M(p),
392
- leftAddonOptions: kt
390
+ options: Object.keys(kt),
391
+ onChange: (p) => S(p),
392
+ leftAddonOptions: Pt
393
393
  }
394
394
  ),
395
- c !== void 0 && /* @__PURE__ */ t.jsx(
395
+ o !== void 0 && /* @__PURE__ */ t.jsx(
396
396
  ht,
397
397
  {
398
398
  tagsTitle: "Tags",
399
- items: c
399
+ items: o
400
400
  }
401
401
  ),
402
402
  r !== void 0 && /* @__PURE__ */ t.jsx(
@@ -406,13 +406,13 @@ const En = (h) => {
406
406
  items: r
407
407
  }
408
408
  ),
409
- o !== void 0 && /* @__PURE__ */ t.jsx(
409
+ c !== void 0 && /* @__PURE__ */ t.jsx(
410
410
  Nt,
411
411
  {
412
412
  label: "Auto scroll interval",
413
413
  type: "number",
414
- value: String(o.scrollInterval),
415
- onChange: (p) => o.setScrollInterval(Number(p)),
414
+ value: String(c.scrollInterval),
415
+ onChange: (p) => c.setScrollInterval(Number(p)),
416
416
  min: 0.1,
417
417
  max: 100,
418
418
  style: {
@@ -422,96 +422,96 @@ const En = (h) => {
422
422
  }
423
423
  )
424
424
  ] });
425
- }, ge = "_title_roi3a_1", fe = "_subtitle_roi3a_5", xe = "_productsBlock_roi3a_14", _e = "_top_roi3a_26", je = "_products_roi3a_14", ve = "_product_roi3a_14", ye = "_button_roi3a_80", be = "_disabled_roi3a_91", Ie = "_buttons_roi3a_118", Ne = "_addButton_roi3a_164", Ce = "_deleteButton_roi3a_179", Y = {
425
+ }, ge = "_title_roi3a_1", fe = "_subtitle_roi3a_5", xe = "_productsBlock_roi3a_14", _e = "_top_roi3a_26", ye = "_products_roi3a_14", je = "_product_roi3a_14", ve = "_button_roi3a_80", be = "_disabled_roi3a_91", Ie = "_buttons_roi3a_118", Ne = "_addButton_roi3a_164", Ce = "_deleteButton_roi3a_179", Y = {
426
426
  title: ge,
427
427
  subtitle: fe,
428
428
  productsBlock: xe,
429
429
  top: _e,
430
- products: je,
431
- product: ve,
432
- button: ye,
430
+ products: ye,
431
+ product: je,
432
+ button: ve,
433
433
  disabled: be,
434
434
  buttons: Ie,
435
435
  addButton: Ne,
436
436
  deleteButton: Ce
437
437
  };
438
- function Se({ product: h, children: i }) {
438
+ function Se({ product: h, children: n }) {
439
439
  const {
440
440
  attributes: a,
441
441
  listeners: s,
442
442
  setNodeRef: e,
443
443
  transform: r,
444
- transition: c,
445
- isDragging: f
446
- } = jt({
444
+ transition: o,
445
+ isDragging: x
446
+ } = yt({
447
447
  id: h.id
448
- }), j = {
449
- transform: vt.Transform.toString(r),
450
- transition: c
448
+ }), v = {
449
+ transform: jt.Transform.toString(r),
450
+ transition: o
451
451
  };
452
452
  return /* @__PURE__ */ t.jsx(
453
453
  "div",
454
454
  {
455
455
  ref: e,
456
- style: j,
457
- className: `${Y.product} ${f ? Y.dragging : ""}`,
456
+ style: v,
457
+ className: `${Y.product} ${x ? Y.dragging : ""}`,
458
458
  ...a,
459
459
  ...s,
460
- children: i
460
+ children: n
461
461
  }
462
462
  );
463
463
  }
464
- const zn = (h) => {
464
+ const Ln = (h) => {
465
465
  const {
466
- isActiveItems: i,
466
+ isActiveItems: n,
467
467
  setIsActiveItems: a,
468
468
  items: s,
469
469
  setItems: e,
470
470
  title: r,
471
- subtitle: c,
472
- editable: f = !0,
473
- draggable: j = !1,
474
- deletable: v = !0,
475
- addable: T = !0,
476
- itemsType: _,
471
+ subtitle: o,
472
+ editable: x = !0,
473
+ draggable: v = !1,
474
+ deletable: b = !0,
475
+ addable: M = !0,
476
+ itemsType: j,
477
477
  itemsOptions: m,
478
478
  addableOptions: d = {},
479
479
  limit: l
480
- } = h, [n, o] = x.useState(null), [C, y] = x.useState(null), M = x.useRef(null), U = pt(
480
+ } = h, [g, c] = y.useState(null), [i, _] = y.useState(null), S = y.useRef(null), L = pt(
481
481
  mt(gt, {
482
482
  activationConstraint: {
483
483
  distance: 5
484
484
  }
485
485
  })
486
486
  );
487
- x.useEffect(() => {
488
- if (n) {
489
- const p = [...s].map((S) => S.id === n.id ? n : S);
487
+ y.useEffect(() => {
488
+ if (g) {
489
+ const p = [...s].map((w) => w.id === g.id ? g : w);
490
490
  e(p);
491
491
  }
492
- }, [n]), x.useEffect(() => {
493
- M.current && C && (M.current.getBoundingClientRect().height, C.top);
494
- }, [M.current, C]);
495
- const z = (p, S) => {
492
+ }, [g]), y.useEffect(() => {
493
+ S.current && i && (S.current.getBoundingClientRect().height, i.top);
494
+ }, [S.current, i]);
495
+ const E = (p, w) => {
496
496
  p.stopPropagation();
497
- const w = p.target.getBoundingClientRect();
498
- y({
499
- top: w.top + window.scrollY,
500
- left: w.left - 30
501
- }), o(S);
497
+ const T = p.target.getBoundingClientRect();
498
+ _({
499
+ top: T.top + window.scrollY,
500
+ left: T.left - 30
501
+ }), c(w);
502
502
  }, K = (p) => {
503
- const { active: S, over: w } = p;
504
- if (w && S.id !== w.id) {
505
- const O = s.findIndex((q) => q.id === S.id), N = s.findIndex((q) => q.id === w.id);
506
- if (O !== -1 && N !== -1) {
507
- const q = [...s], [I] = q.splice(O, 1);
508
- q.splice(N, 0, I), e(q);
503
+ const { active: w, over: T } = p;
504
+ if (T && w.id !== T.id) {
505
+ const $ = s.findIndex((O) => O.id === w.id), C = s.findIndex((O) => O.id === T.id);
506
+ if ($ !== -1 && C !== -1) {
507
+ const O = [...s], [N] = O.splice($, 1);
508
+ O.splice(C, 0, N), e(O);
509
509
  }
510
510
  }
511
- }, g = (p, S) => {
512
- const w = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
513
- j && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
514
- b,
511
+ }, f = (p, w) => {
512
+ const T = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
513
+ v && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
514
+ I,
515
515
  {
516
516
  name: "DotsSixVertical",
517
517
  hoverable: !0,
@@ -519,99 +519,99 @@ const zn = (h) => {
519
519
  height: 20
520
520
  }
521
521
  ) }),
522
- _ === "select" && m && /* @__PURE__ */ t.jsx(
522
+ j === "select" && m && /* @__PURE__ */ t.jsx(
523
523
  at,
524
524
  {
525
- onChange: (O) => {
526
- const N = [...s], q = m.find((A) => A.name === O);
527
- if (!q) return;
528
- const I = N.map((A) => A.id === p.id ? {
529
- ...q,
525
+ onChange: ($) => {
526
+ const C = [...s], O = m.find((A) => A.name === $);
527
+ if (!O) return;
528
+ const N = C.map((A) => A.id === p.id ? {
529
+ ...O,
530
530
  name: {
531
- "en-US": O
531
+ "en-US": $
532
532
  }
533
533
  } : A);
534
- o({
534
+ c({
535
535
  ...p,
536
536
  name: {
537
- "en-US": O
537
+ "en-US": $
538
538
  }
539
- }), e([...I]);
539
+ }), e([...N]);
540
540
  },
541
541
  value: p.name,
542
- options: m.filter((O) => !s.find((N) => N.name === O.name)).map((O) => O.name)
542
+ options: m.filter(($) => !s.find((C) => C.name === $.name)).map(($) => $.name)
543
543
  }
544
544
  ),
545
545
  /* @__PURE__ */ t.jsxs("div", { className: Y.buttons, children: [
546
- f && /* @__PURE__ */ t.jsx("div", { className: Y.deleteButton, children: /* @__PURE__ */ t.jsx(
547
- b,
546
+ x && /* @__PURE__ */ t.jsx("div", { className: Y.deleteButton, children: /* @__PURE__ */ t.jsx(
547
+ I,
548
548
  {
549
549
  name: "Sliders",
550
550
  hoverable: !0,
551
551
  width: 20,
552
552
  height: 20,
553
- onClick: (O) => z(O, p)
553
+ onClick: ($) => E($, p)
554
554
  }
555
555
  ) }),
556
- v && /* @__PURE__ */ t.jsx("div", { className: Y.deleteButton, children: /* @__PURE__ */ t.jsx(
557
- b,
556
+ b && /* @__PURE__ */ t.jsx("div", { className: Y.deleteButton, children: /* @__PURE__ */ t.jsx(
557
+ I,
558
558
  {
559
559
  name: "Trash",
560
560
  hoverable: !0,
561
561
  width: 20,
562
562
  height: 20,
563
563
  fill: "#C12A2A",
564
- onClick: () => e(s.filter((O) => O.id !== p.id))
564
+ onClick: () => e(s.filter(($) => $.id !== p.id))
565
565
  }
566
566
  ) })
567
567
  ] })
568
568
  ] });
569
- return j ? /* @__PURE__ */ t.jsx(
569
+ return v ? /* @__PURE__ */ t.jsx(
570
570
  Se,
571
571
  {
572
572
  product: p,
573
- index: S,
574
- children: w
573
+ index: w,
574
+ children: T
575
575
  },
576
576
  p.id
577
577
  ) : /* @__PURE__ */ t.jsx(
578
578
  "div",
579
579
  {
580
580
  className: Y.product,
581
- children: w
581
+ children: T
582
582
  },
583
583
  p.id
584
584
  );
585
585
  };
586
586
  return /* @__PURE__ */ t.jsxs("div", { className: Y.productsBlock, children: [
587
- (r || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Y.top, children: [
587
+ (r || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Y.top, children: [
588
588
  r && /* @__PURE__ */ t.jsx("h3", { className: Y.title, children: r }),
589
- i !== void 0 && /* @__PURE__ */ t.jsx(
589
+ n !== void 0 && /* @__PURE__ */ t.jsx(
590
590
  lt,
591
591
  {
592
- current: i,
592
+ current: n,
593
593
  onChange: (p) => a == null ? void 0 : a(p)
594
594
  }
595
595
  )
596
596
  ] }),
597
597
  /* @__PURE__ */ t.jsxs("div", { className: Y.products, children: [
598
- c && /* @__PURE__ */ t.jsx("h5", { className: Y.subtitle, children: c }),
599
- j ? /* @__PURE__ */ t.jsx(
598
+ o && /* @__PURE__ */ t.jsx("h5", { className: Y.subtitle, children: o }),
599
+ v ? /* @__PURE__ */ t.jsx(
600
600
  ft,
601
601
  {
602
- sensors: U,
602
+ sensors: L,
603
603
  onDragEnd: K,
604
604
  children: /* @__PURE__ */ t.jsx(
605
605
  xt,
606
606
  {
607
607
  items: s.map((p) => p.id),
608
608
  strategy: _t,
609
- children: s.map((p, S) => g(p, S))
609
+ children: s.map((p, w) => f(p, w))
610
610
  }
611
611
  )
612
612
  }
613
- ) : s.map((p, S) => g(p, S)),
614
- T && /* @__PURE__ */ t.jsx(
613
+ ) : s.map((p, w) => f(p, w)),
614
+ M && /* @__PURE__ */ t.jsx(
615
615
  "div",
616
616
  {
617
617
  style: {
@@ -623,24 +623,24 @@ const zn = (h) => {
623
623
  dt,
624
624
  {
625
625
  withoutHover: !0,
626
- className: F(Y.button, {
626
+ className: H(Y.button, {
627
627
  [Y.disabled]: !!(l && l <= s.length || s.length === (m == null ? void 0 : m.length))
628
628
  }),
629
629
  size: "s",
630
630
  disabled: !!(l && l <= s.length || s.length === (m == null ? void 0 : m.length)),
631
631
  onClick: () => {
632
632
  const p = [...s];
633
- let S = null;
633
+ let w = null;
634
634
  if (m) {
635
- for (let w = 0; w < m.length; w++)
636
- if (!s.find((O) => O.id === m[w].id)) {
637
- S = m[w];
635
+ for (let T = 0; T < m.length; T++)
636
+ if (!s.find(($) => $.id === m[T].id)) {
637
+ w = m[T];
638
638
  break;
639
639
  }
640
640
  }
641
- _ === "select" && m && p.push({
642
- name: S ? S.name : m[0].name,
643
- id: (S == null ? void 0 : S.id) || m[0].id,
641
+ j === "select" && m && p.push({
642
+ name: w ? w.name : m[0].name,
643
+ id: (w == null ? void 0 : w.id) || m[0].id,
644
644
  ...d
645
645
  }), e(p);
646
646
  },
@@ -650,7 +650,7 @@ const zn = (h) => {
650
650
  children: /* @__PURE__ */ t.jsxs("div", { className: Y.addButton, children: [
651
651
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
652
652
  /* @__PURE__ */ t.jsx(
653
- b,
653
+ I,
654
654
  {
655
655
  name: "Plus",
656
656
  width: 16,
@@ -665,99 +665,99 @@ const zn = (h) => {
665
665
  ] })
666
666
  ] });
667
667
  };
668
- function Pe(h) {
669
- const { product: i, children: a } = h, { attributes: s, listeners: e, setNodeRef: r, transform: c, transition: f, isDragging: j } = jt({
670
- id: i.id
671
- }), v = {
672
- transform: vt.Transform.toString(c),
673
- transition: f
668
+ function we(h) {
669
+ const { product: n, children: a } = h, { attributes: s, listeners: e, setNodeRef: r, transform: o, transition: x, isDragging: v } = yt({
670
+ id: n.id
671
+ }), b = {
672
+ transform: jt.Transform.toString(o),
673
+ transition: x
674
674
  };
675
675
  return /* @__PURE__ */ t.jsx(
676
676
  "div",
677
677
  {
678
678
  ref: r,
679
- style: v,
680
- className: `${V.product} ${j ? V.dragging : ""}`,
679
+ style: b,
680
+ className: `${V.product} ${v ? V.dragging : ""}`,
681
681
  ...s,
682
682
  ...e,
683
683
  children: a
684
684
  }
685
685
  );
686
686
  }
687
- const Rn = (h) => {
687
+ const Un = (h) => {
688
688
  const {
689
- isActiveItems: i,
689
+ isActiveItems: n,
690
690
  setIsActiveItems: a,
691
691
  items: s,
692
692
  setItems: e,
693
693
  other: r,
694
- title: c,
695
- subtitle: f,
696
- editable: j = !0,
697
- draggable: v = !1,
698
- deletable: T = !0,
699
- addable: _ = !0,
694
+ title: o,
695
+ subtitle: x,
696
+ editable: v = !0,
697
+ draggable: b = !1,
698
+ deletable: M = !0,
699
+ addable: j = !0,
700
700
  itemsType: m,
701
701
  itemsPlaceholder: d = "",
702
702
  itemsOptions: l,
703
- hasRangeSelector: n = !1,
704
- rangeSelectorOptions: o,
705
- modalOptions: C,
706
- addableOptions: y = {},
707
- limit: M
708
- } = h, [U, z] = x.useState(null), [K, g] = x.useState({
703
+ hasRangeSelector: g = !1,
704
+ rangeSelectorOptions: c,
705
+ modalOptions: i,
706
+ addableOptions: _ = {},
707
+ limit: S
708
+ } = h, [L, E] = y.useState(null), [K, f] = y.useState({
709
709
  top: 0,
710
710
  left: 0
711
- }), [p, S] = x.useState(null), w = x.useRef(null), [O, N] = x.useState(!1), q = pt(
711
+ }), [p, w] = y.useState(null), T = y.useRef(null), [$, C] = y.useState(!1), O = pt(
712
712
  mt(gt, {
713
713
  activationConstraint: {
714
714
  distance: 5
715
715
  }
716
716
  })
717
717
  );
718
- x.useEffect(() => {
718
+ y.useEffect(() => {
719
719
  const u = () => {
720
- z(null), N(!1);
720
+ E(null), C(!1);
721
721
  };
722
- return document.body.addEventListener("click", u), z(null), N(!1), () => {
723
- z(null), N(!1), document.body.removeEventListener("click", u);
722
+ return document.body.addEventListener("click", u), E(null), C(!1), () => {
723
+ E(null), C(!1), document.body.removeEventListener("click", u);
724
724
  };
725
- }, []), x.useEffect(() => {
726
- if (U) {
727
- const u = [...s].map(($) => $.id === U.id ? U : $);
725
+ }, []), y.useEffect(() => {
726
+ if (L) {
727
+ const u = [...s].map((q) => q.id === L.id ? L : q);
728
728
  e(u);
729
729
  }
730
- }, [U]), x.useEffect(() => {
731
- if (w.current && p) {
732
- const u = w.current.getBoundingClientRect().height, $ = window.innerHeight;
730
+ }, [L]), y.useEffect(() => {
731
+ if (T.current && p) {
732
+ const u = T.current.getBoundingClientRect().height, q = window.innerHeight;
733
733
  let P = p.top;
734
- P + u > $ + window.scrollY - 200 && (P = $ + window.scrollY - u - 200), P < 0 && (P = 10), g({
734
+ P + u > q + window.scrollY - 200 && (P = q + window.scrollY - u - 200), P < 0 && (P = 10), f({
735
735
  top: P,
736
736
  left: p.left
737
737
  });
738
738
  }
739
- }, [w.current, p]);
740
- const I = (u, $) => {
739
+ }, [T.current, p]);
740
+ const N = (u, q) => {
741
741
  u.stopPropagation();
742
742
  const P = u.target.getBoundingClientRect();
743
- S({
743
+ w({
744
744
  top: P.top + window.scrollY,
745
745
  left: P.left - 30
746
- }), z($), N(!0);
746
+ }), E(q), C(!0);
747
747
  }, A = (u) => {
748
- const { active: $, over: P } = u;
749
- if (P && $.id !== P.id) {
750
- const D = s.findIndex((R) => R.id === $.id), et = s.findIndex((R) => R.id === P.id);
748
+ const { active: q, over: P } = u;
749
+ if (P && q.id !== P.id) {
750
+ const D = s.findIndex((U) => U.id === q.id), et = s.findIndex((U) => U.id === P.id);
751
751
  if (D !== -1 && et !== -1) {
752
- const R = [...s], [Z] = R.splice(D, 1);
753
- R.splice(et, 0, Z), e(R);
752
+ const U = [...s], [Z] = U.splice(D, 1);
753
+ U.splice(et, 0, Z), e(U);
754
754
  }
755
755
  }
756
- }, H = (u) => {
756
+ }, F = (u) => {
757
757
  var P;
758
- const $ = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
759
- v && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
760
- b,
758
+ const q = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
759
+ b && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
760
+ I,
761
761
  {
762
762
  name: "DotsSixVertical",
763
763
  hoverable: !0,
@@ -769,18 +769,18 @@ const Rn = (h) => {
769
769
  at,
770
770
  {
771
771
  onChange: (D) => {
772
- const R = [...s].map((Z) => Z.id === u.id ? {
772
+ const U = [...s].map((Z) => Z.id === u.id ? {
773
773
  ...u,
774
774
  name: {
775
775
  "en-US": D
776
776
  }
777
777
  } : Z);
778
- z({
778
+ E({
779
779
  ...u,
780
780
  name: {
781
781
  "en-US": D
782
782
  }
783
- }), e([...R]);
783
+ }), e([...U]);
784
784
  },
785
785
  value: u.name["en-US"],
786
786
  options: l.filter(
@@ -792,13 +792,13 @@ const Rn = (h) => {
792
792
  Nt,
793
793
  {
794
794
  onChange: (D) => {
795
- const R = [...s].map((Z) => Z.id === u.id ? {
795
+ const U = [...s].map((Z) => Z.id === u.id ? {
796
796
  ...u,
797
797
  name: {
798
798
  "en-US": D
799
799
  }
800
800
  } : Z);
801
- e([...R]);
801
+ e([...U]);
802
802
  },
803
803
  value: u.name["en-US"],
804
804
  placeholder: d
@@ -808,28 +808,28 @@ const Rn = (h) => {
808
808
  At,
809
809
  {
810
810
  onChange: (D) => {
811
- const R = [...s].map((Z) => Z.id === u.id ? {
811
+ const U = [...s].map((Z) => Z.id === u.id ? {
812
812
  ...u,
813
813
  images: D
814
814
  } : Z);
815
- e([...R]);
815
+ e([...U]);
816
816
  },
817
817
  activeImage: (P = s.find((D) => D.id === u.id)) == null ? void 0 : P.images[0]
818
818
  }
819
819
  ),
820
820
  /* @__PURE__ */ t.jsxs("div", { className: V.buttons, children: [
821
- j && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
822
- b,
821
+ v && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
822
+ I,
823
823
  {
824
824
  name: "Sliders",
825
825
  hoverable: !0,
826
826
  width: 20,
827
827
  height: 20,
828
- onClick: (D) => I(D, u)
828
+ onClick: (D) => N(D, u)
829
829
  }
830
830
  ) }),
831
- T && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
832
- b,
831
+ M && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
832
+ I,
833
833
  {
834
834
  name: "Trash",
835
835
  hoverable: !0,
@@ -841,63 +841,63 @@ const Rn = (h) => {
841
841
  ) })
842
842
  ] })
843
843
  ] });
844
- return v ? /* @__PURE__ */ t.jsx(
845
- Pe,
844
+ return b ? /* @__PURE__ */ t.jsx(
845
+ we,
846
846
  {
847
847
  product: u,
848
- children: $
848
+ children: q
849
849
  },
850
850
  u.id
851
851
  ) : /* @__PURE__ */ t.jsx(
852
852
  "div",
853
853
  {
854
854
  className: V.product,
855
- children: $
855
+ children: q
856
856
  },
857
857
  u.id
858
858
  );
859
859
  };
860
860
  return /* @__PURE__ */ t.jsxs("div", { className: V.productsBlock, children: [
861
- (c || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
862
- c && /* @__PURE__ */ t.jsx("h3", { className: V.title, children: c }),
863
- i !== void 0 && /* @__PURE__ */ t.jsx(
861
+ (o || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
862
+ o && /* @__PURE__ */ t.jsx("h3", { className: V.title, children: o }),
863
+ n !== void 0 && /* @__PURE__ */ t.jsx(
864
864
  lt,
865
865
  {
866
- current: i,
866
+ current: n,
867
867
  onChange: (u) => a == null ? void 0 : a(u)
868
868
  }
869
869
  )
870
870
  ] }),
871
- U && j && C && O && /* @__PURE__ */ t.jsx(
872
- qt,
871
+ L && v && i && $ && /* @__PURE__ */ t.jsx(
872
+ Ot,
873
873
  {
874
- ref: w,
875
- activeItem: U,
876
- setActiveItem: z,
874
+ ref: T,
875
+ activeItem: L,
876
+ setActiveItem: E,
877
877
  popupPosition: K,
878
- modalOptions: C,
879
- setIsOpenModal: N
878
+ modalOptions: i,
879
+ setIsOpenModal: C
880
880
  }
881
881
  ),
882
- n && o && /* @__PURE__ */ t.jsx(Pt, { ...o }),
882
+ g && c && /* @__PURE__ */ t.jsx(wt, { ...c }),
883
883
  /* @__PURE__ */ t.jsxs("div", { className: V.products, children: [
884
- f && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: f }),
885
- v ? /* @__PURE__ */ t.jsx(
884
+ x && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: x }),
885
+ b ? /* @__PURE__ */ t.jsx(
886
886
  ft,
887
887
  {
888
- sensors: q,
888
+ sensors: O,
889
889
  onDragEnd: A,
890
890
  children: /* @__PURE__ */ t.jsx(
891
891
  xt,
892
892
  {
893
893
  items: s.map((u) => u.id),
894
894
  strategy: _t,
895
- children: s.map((u) => H(u))
895
+ children: s.map((u) => F(u))
896
896
  }
897
897
  )
898
898
  }
899
- ) : s.map((u) => H(u)),
900
- _ && /* @__PURE__ */ t.jsx(
899
+ ) : s.map((u) => F(u)),
900
+ j && /* @__PURE__ */ t.jsx(
901
901
  "div",
902
902
  {
903
903
  style: {
@@ -909,27 +909,27 @@ const Rn = (h) => {
909
909
  dt,
910
910
  {
911
911
  withoutHover: !0,
912
- className: F(V.button, {
913
- [V.disabled]: !!(M && M <= s.length)
912
+ className: H(V.button, {
913
+ [V.disabled]: !!(S && S <= s.length)
914
914
  }),
915
915
  size: "s",
916
- disabled: !!(M && M <= s.length),
916
+ disabled: !!(S && S <= s.length),
917
917
  onClick: () => {
918
918
  const u = [...s];
919
- let $ = null;
919
+ let q = null;
920
920
  if (l) {
921
921
  for (let P = 0; P < l.length; P++)
922
922
  if (!s.find((D) => D.name["en-US"] === l[P])) {
923
- $ = l[P];
923
+ q = l[P];
924
924
  break;
925
925
  }
926
926
  }
927
927
  m === "select" && l ? u.push({
928
928
  name: {
929
- "en-US": $ || l[0]
929
+ "en-US": q || l[0]
930
930
  },
931
931
  id: J(),
932
- ...y,
932
+ ..._,
933
933
  maxSymbols: 100
934
934
  // пример значения
935
935
  }) : m === "input" ? u.push({
@@ -937,14 +937,14 @@ const Rn = (h) => {
937
937
  "en-US": ""
938
938
  },
939
939
  id: J(),
940
- ...y,
940
+ ..._,
941
941
  maxSymbols: 100
942
942
  }) : u.push({
943
943
  name: {
944
944
  "en-US": `Image ${s.length + 1}`
945
945
  },
946
946
  id: J(),
947
- ...y,
947
+ ..._,
948
948
  maxSymbols: 100
949
949
  }), e(u);
950
950
  },
@@ -954,7 +954,7 @@ const Rn = (h) => {
954
954
  children: /* @__PURE__ */ t.jsxs("div", { className: V.addButton, children: [
955
955
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
956
956
  /* @__PURE__ */ t.jsx(
957
- b,
957
+ I,
958
958
  {
959
959
  name: "Plus",
960
960
  width: 16,
@@ -975,52 +975,52 @@ const Rn = (h) => {
975
975
  }
976
976
  )
977
977
  ] });
978
- }, ke = "_subtitle_jql1y_1", we = "_products_jql1y_10", Te = "_product_jql1y_10", Me = "_button_jql1y_11", Be = "_buttons_jql1y_11", $e = "_addButton_jql1y_150", Oe = "_deleteButton_jql1y_165", st = {
979
- subtitle: ke,
980
- products: we,
978
+ }, Pe = "_subtitle_jql1y_1", ke = "_products_jql1y_10", Te = "_product_jql1y_10", Me = "_button_jql1y_11", Be = "_buttons_jql1y_11", qe = "_addButton_jql1y_150", $e = "_deleteButton_jql1y_165", st = {
979
+ subtitle: Pe,
980
+ products: ke,
981
981
  product: Te,
982
982
  button: Me,
983
983
  buttons: Be,
984
- addButton: $e,
985
- deleteButton: Oe
986
- }, qe = (h) => {
987
- const { buttons: i, setButtons: a, deletable: s = !0, addable: e = !0, editableLink: r = !0 } = h, { pages: c } = yt(), [f, j] = x.useState(null), [v, T] = x.useState({
984
+ addButton: qe,
985
+ deleteButton: $e
986
+ }, Oe = (h) => {
987
+ const { buttons: n, setButtons: a, deletable: s = !0, addable: e = !0, editableLink: r = !0 } = h, { pages: o } = vt(), [x, v] = y.useState(null), [b, M] = y.useState({
988
988
  top: 0,
989
989
  left: 0
990
- }), [_, m] = x.useState(null), d = x.useRef(null);
991
- x.useEffect(() => {
992
- if (f) {
993
- const o = [...i].map((C) => C.id === f.id ? f : C);
994
- a(o);
990
+ }), [j, m] = y.useState(null), d = y.useRef(null);
991
+ y.useEffect(() => {
992
+ if (x) {
993
+ const c = [...n].map((i) => i.id === x.id ? x : i);
994
+ a(c);
995
995
  }
996
- }, [f]), x.useEffect(() => {
997
- if (d.current && _) {
998
- const o = d.current.getBoundingClientRect().height, C = window.innerHeight;
999
- let y = _.top;
1000
- y + o > C + window.scrollY - 200 && (y = C + window.scrollY - o - 200), y < 0 && (y = 10), T({
1001
- top: y,
1002
- left: _.left
996
+ }, [x]), y.useEffect(() => {
997
+ if (d.current && j) {
998
+ const c = d.current.getBoundingClientRect().height, i = window.innerHeight;
999
+ let _ = j.top;
1000
+ _ + c > i + window.scrollY - 200 && (_ = i + window.scrollY - c - 200), _ < 0 && (_ = 10), M({
1001
+ top: _,
1002
+ left: j.left
1003
1003
  });
1004
1004
  }
1005
- }, [d.current, _]);
1006
- const l = (o, C) => {
1007
- o.stopPropagation();
1008
- const y = o.target.getBoundingClientRect();
1005
+ }, [d.current, j]);
1006
+ const l = (c, i) => {
1007
+ c.stopPropagation();
1008
+ const _ = c.target.getBoundingClientRect();
1009
1009
  m({
1010
- top: y.top + window.scrollY - 70,
1011
- left: y.left - (e ? 30 : 65)
1012
- }), j(C);
1013
- }, n = (o, C) => {
1014
- const y = [...i], M = {
1015
- ...o,
1010
+ top: _.top + window.scrollY - 70,
1011
+ left: _.left - (e ? 30 : 65)
1012
+ }), v(i);
1013
+ }, g = (c, i) => {
1014
+ const _ = [...n], S = {
1015
+ ...c,
1016
1016
  id: Math.random().toString(36).substr(2, 9)
1017
1017
  // Генерируем новый уникальный ID
1018
1018
  };
1019
- y.splice(C + 1, 0, M), a(y);
1019
+ _.splice(i + 1, 0, S), a(_);
1020
1020
  };
1021
1021
  return /* @__PURE__ */ t.jsxs("div", { className: st.products, children: [
1022
1022
  /* @__PURE__ */ t.jsx("h5", { className: st.subtitle, children: "Button Type" }),
1023
- i.map((o, C) => /* @__PURE__ */ t.jsxs(
1023
+ n.map((c, i) => /* @__PURE__ */ t.jsxs(
1024
1024
  "div",
1025
1025
  {
1026
1026
  className: st.product,
@@ -1028,50 +1028,50 @@ const Rn = (h) => {
1028
1028
  /* @__PURE__ */ t.jsx(
1029
1029
  at,
1030
1030
  {
1031
- onChange: (y) => {
1032
- const U = [...i].map((z) => z.id === o.id ? {
1033
- ...o,
1034
- type: y
1035
- } : z);
1036
- a(U);
1031
+ onChange: (_) => {
1032
+ const L = [...n].map((E) => E.id === c.id ? {
1033
+ ...c,
1034
+ type: _
1035
+ } : E);
1036
+ a(L);
1037
1037
  },
1038
- value: o.type,
1038
+ value: c.type,
1039
1039
  options: ["Primary", "Secondary", "Tertiary"]
1040
1040
  }
1041
1041
  ),
1042
1042
  /* @__PURE__ */ t.jsxs("div", { className: st.buttons, children: [
1043
1043
  /* @__PURE__ */ t.jsx("div", { className: st.deleteButton, children: /* @__PURE__ */ t.jsx(
1044
- b,
1044
+ I,
1045
1045
  {
1046
1046
  name: "Copy",
1047
1047
  hoverable: !0,
1048
1048
  width: 20,
1049
1049
  height: 20,
1050
1050
  onClick: () => {
1051
- n(o, C);
1051
+ g(c, i);
1052
1052
  }
1053
1053
  }
1054
1054
  ) }),
1055
1055
  /* @__PURE__ */ t.jsx("div", { className: st.deleteButton, children: /* @__PURE__ */ t.jsx(
1056
- b,
1056
+ I,
1057
1057
  {
1058
1058
  name: "Sliders",
1059
1059
  hoverable: !0,
1060
1060
  width: 20,
1061
1061
  height: 20,
1062
- onClick: (y) => {
1063
- l(y, o);
1062
+ onClick: (_) => {
1063
+ l(_, c);
1064
1064
  }
1065
1065
  }
1066
1066
  ) }),
1067
1067
  s && /* @__PURE__ */ t.jsx("div", { className: st.deleteButton, children: /* @__PURE__ */ t.jsx(
1068
- b,
1068
+ I,
1069
1069
  {
1070
1070
  name: "Trash",
1071
1071
  hoverable: !0,
1072
1072
  onClick: () => {
1073
- const y = i.filter((M) => M.id !== o.id);
1074
- a(y);
1073
+ const _ = n.filter((S) => S.id !== c.id);
1074
+ a(_);
1075
1075
  },
1076
1076
  width: 20,
1077
1077
  height: 20,
@@ -1081,15 +1081,15 @@ const Rn = (h) => {
1081
1081
  ] })
1082
1082
  ]
1083
1083
  },
1084
- o.id
1084
+ c.id
1085
1085
  )),
1086
- f && /* @__PURE__ */ t.jsx(
1086
+ x && /* @__PURE__ */ t.jsx(
1087
1087
  Dt,
1088
1088
  {
1089
1089
  ref: d,
1090
- activeButton: f,
1091
- setActiveButton: j,
1092
- popupPosition: v,
1090
+ activeButton: x,
1091
+ setActiveButton: v,
1092
+ popupPosition: b,
1093
1093
  editableLink: r
1094
1094
  }
1095
1095
  ),
@@ -1108,8 +1108,8 @@ const Rn = (h) => {
1108
1108
  className: st.button,
1109
1109
  size: "s",
1110
1110
  onClick: () => {
1111
- const o = [...i];
1112
- r ? o.push({
1111
+ const c = [...n];
1112
+ r ? c.push({
1113
1113
  type: "Primary",
1114
1114
  id: J(),
1115
1115
  typesText: [],
@@ -1117,9 +1117,9 @@ const Rn = (h) => {
1117
1117
  "en-US": "Button Name"
1118
1118
  },
1119
1119
  destination: "Go to Page",
1120
- page: c ? Object.values(c)[0].path : "/",
1120
+ page: o ? Object.values(o)[0].path : "/",
1121
1121
  openInNewTab: !1
1122
- }) : o.push({
1122
+ }) : c.push({
1123
1123
  type: "Primary",
1124
1124
  id: J(),
1125
1125
  typesText: [],
@@ -1127,9 +1127,9 @@ const Rn = (h) => {
1127
1127
  "en-US": "Create Ticket"
1128
1128
  },
1129
1129
  destination: "Go to Page",
1130
- page: c ? Object.values(c)[0].path : "/",
1130
+ page: o ? Object.values(o)[0].path : "/",
1131
1131
  openInNewTab: !1
1132
- }), a(o);
1132
+ }), a(c);
1133
1133
  },
1134
1134
  style: {
1135
1135
  width: "fit-content"
@@ -1137,7 +1137,7 @@ const Rn = (h) => {
1137
1137
  children: /* @__PURE__ */ t.jsxs("div", { className: st.addButton, children: [
1138
1138
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
1139
1139
  /* @__PURE__ */ t.jsx(
1140
- b,
1140
+ I,
1141
1141
  {
1142
1142
  name: "Plus",
1143
1143
  width: 16,
@@ -1150,15 +1150,15 @@ const Rn = (h) => {
1150
1150
  }
1151
1151
  )
1152
1152
  ] });
1153
- }, Ln = (h) => {
1153
+ }, zn = (h) => {
1154
1154
  const {
1155
- isActiveButtons: i,
1155
+ isActiveButtons: n,
1156
1156
  setIsActiveButtons: a,
1157
1157
  buttons: s,
1158
1158
  setButtons: e,
1159
1159
  editableLink: r = !0,
1160
- addable: c = !0,
1161
- deletable: f = !0
1160
+ addable: o = !0,
1161
+ deletable: x = !0
1162
1162
  } = h;
1163
1163
  return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: bt.buttonsBlock, children: [
1164
1164
  /* @__PURE__ */ t.jsxs("div", { className: bt.top, children: [
@@ -1166,107 +1166,107 @@ const Rn = (h) => {
1166
1166
  /* @__PURE__ */ t.jsx(
1167
1167
  lt,
1168
1168
  {
1169
- current: i,
1170
- onChange: (j) => a(j)
1169
+ current: n,
1170
+ onChange: (v) => a(v)
1171
1171
  }
1172
1172
  )
1173
1173
  ] }),
1174
- i && /* @__PURE__ */ t.jsx(
1175
- qe,
1174
+ n && /* @__PURE__ */ t.jsx(
1175
+ Oe,
1176
1176
  {
1177
1177
  buttons: s,
1178
1178
  setButtons: e,
1179
1179
  editableLink: r,
1180
- addable: c,
1181
- deletable: f
1180
+ addable: o,
1181
+ deletable: x
1182
1182
  }
1183
1183
  )
1184
1184
  ] }) });
1185
1185
  };
1186
1186
  function Ae(h) {
1187
- const { product: i, children: a } = h, { attributes: s, listeners: e, setNodeRef: r, transform: c, transition: f, isDragging: j } = jt({
1188
- id: String(i.listingId)
1189
- }), v = {
1190
- transform: vt.Transform.toString(c),
1191
- transition: f
1187
+ const { product: n, children: a } = h, { attributes: s, listeners: e, setNodeRef: r, transform: o, transition: x, isDragging: v } = yt({
1188
+ id: String(n.listingId)
1189
+ }), b = {
1190
+ transform: jt.Transform.toString(o),
1191
+ transition: x
1192
1192
  };
1193
1193
  return /* @__PURE__ */ t.jsx(
1194
1194
  "div",
1195
1195
  {
1196
1196
  ref: r,
1197
- style: v,
1198
- className: `${W.product} ${j ? W.dragging : ""}`,
1197
+ style: b,
1198
+ className: `${W.product} ${v ? W.dragging : ""}`,
1199
1199
  ...s,
1200
1200
  ...e,
1201
1201
  children: a
1202
1202
  }
1203
1203
  );
1204
1204
  }
1205
- const Un = (h) => {
1205
+ const Fn = (h) => {
1206
1206
  const {
1207
- isActiveItems: i,
1207
+ isActiveItems: n,
1208
1208
  setIsActiveItems: a,
1209
1209
  items: s,
1210
1210
  setItems: e,
1211
1211
  other: r,
1212
- title: c,
1213
- subtitle: f,
1214
- editable: j = !0,
1215
- draggable: v = !1,
1216
- withImage: T = !1,
1217
- deletable: _ = !0,
1212
+ title: o,
1213
+ subtitle: x,
1214
+ editable: v = !0,
1215
+ draggable: b = !1,
1216
+ withImage: M = !1,
1217
+ deletable: j = !0,
1218
1218
  addable: m = !0,
1219
1219
  itemsType: d,
1220
1220
  itemsOptions: l,
1221
- limit: n,
1222
- aspectRatio: o,
1223
- setAspectRatio: C
1224
- } = h, [y, M] = x.useState(
1221
+ limit: g,
1222
+ aspectRatio: c,
1223
+ setAspectRatio: i
1224
+ } = h, [_, S] = y.useState(
1225
1225
  null
1226
- ), [U, z] = x.useState({
1226
+ ), [L, E] = y.useState({
1227
1227
  top: 0,
1228
1228
  left: 0
1229
- }), [K, g] = x.useState(!1), p = pt(
1229
+ }), [K, f] = y.useState(!1), p = pt(
1230
1230
  mt(gt, {
1231
1231
  activationConstraint: {
1232
1232
  distance: 5
1233
1233
  }
1234
1234
  })
1235
1235
  );
1236
- x.useEffect(() => {
1237
- const I = () => {
1238
- M(null), g(!1);
1236
+ y.useEffect(() => {
1237
+ const N = () => {
1238
+ S(null), f(!1);
1239
1239
  };
1240
- return document.body.addEventListener("click", I), M(null), g(!1), () => {
1241
- M(null), g(!1), document.body.removeEventListener("click", I);
1240
+ return document.body.addEventListener("click", N), S(null), f(!1), () => {
1241
+ S(null), f(!1), document.body.removeEventListener("click", N);
1242
1242
  };
1243
- }, []), x.useEffect(() => {
1244
- if (y) {
1245
- const I = [...s].map((A) => A.listingId === y.listingId ? y : A);
1246
- e(I);
1243
+ }, []), y.useEffect(() => {
1244
+ if (_) {
1245
+ const N = [...s].map((A) => A.listingId === _.listingId ? _ : A);
1246
+ e(N);
1247
1247
  }
1248
- }, [y]);
1249
- const S = (I, A) => {
1250
- I.stopPropagation();
1251
- const H = I.target.getBoundingClientRect(), u = 100, $ = window.innerHeight;
1252
- let P = H.top + window.scrollY;
1253
- P + u > $ && (P = $ - u - 20), g(!0), z({
1248
+ }, [_]);
1249
+ const w = (N, A) => {
1250
+ N.stopPropagation();
1251
+ const F = N.target.getBoundingClientRect(), u = 100, q = window.innerHeight;
1252
+ let P = F.top + window.scrollY;
1253
+ P + u > q && (P = q - u - 20), f(!0), E({
1254
1254
  top: P - 80,
1255
- left: H.left - 30
1256
- }), M(A);
1255
+ left: F.left - 30
1256
+ }), S(A);
1257
1257
  };
1258
- function w(I) {
1259
- if (T)
1260
- return I ? /* @__PURE__ */ t.jsx(
1258
+ function T(N) {
1259
+ if (M)
1260
+ return N ? /* @__PURE__ */ t.jsx(
1261
1261
  "img",
1262
1262
  {
1263
- src: `https://imagedelivery.net/${I}/w=1000`,
1263
+ src: `https://imagedelivery.net/${N}/w=1000`,
1264
1264
  alt: "image",
1265
1265
  width: 16,
1266
1266
  height: 16
1267
1267
  }
1268
1268
  ) : /* @__PURE__ */ t.jsx(
1269
- b,
1269
+ I,
1270
1270
  {
1271
1271
  name: "Image",
1272
1272
  width: 16,
@@ -1275,21 +1275,21 @@ const Un = (h) => {
1275
1275
  }
1276
1276
  );
1277
1277
  }
1278
- const O = (I) => {
1279
- const { active: A, over: H } = I;
1280
- if (H && A.id !== H.id) {
1281
- const u = s.findIndex((P) => String(P.listingId) === A.id), $ = s.findIndex((P) => String(P.listingId) === H.id);
1282
- if (u !== -1 && $ !== -1) {
1278
+ const $ = (N) => {
1279
+ const { active: A, over: F } = N;
1280
+ if (F && A.id !== F.id) {
1281
+ const u = s.findIndex((P) => String(P.listingId) === A.id), q = s.findIndex((P) => String(P.listingId) === F.id);
1282
+ if (u !== -1 && q !== -1) {
1283
1283
  const P = [...s], [D] = P.splice(u, 1);
1284
- P.splice($, 0, D), e(P);
1284
+ P.splice(q, 0, D), e(P);
1285
1285
  }
1286
1286
  }
1287
- }, N = (I) => {
1288
- const A = l.find((u) => I.listingId === u.id);
1287
+ }, C = (N) => {
1288
+ const A = l.find((u) => N.listingId === u.id);
1289
1289
  if (!A) return null;
1290
- const H = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1291
- v && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1292
- b,
1290
+ const F = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1291
+ b && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1292
+ I,
1293
1293
  {
1294
1294
  name: "DotsSixVertical",
1295
1295
  hoverable: !0,
@@ -1301,106 +1301,106 @@ const Un = (h) => {
1301
1301
  at,
1302
1302
  {
1303
1303
  onChange: (u) => {
1304
- const $ = [...s], P = l.find((R) => R.productData.name === u);
1304
+ const q = [...s], P = l.find((U) => U.productData.name === u);
1305
1305
  if (!P) return;
1306
1306
  const D = {
1307
1307
  listingId: P.id,
1308
1308
  image: P.productData.images.length > 0 ? P.productData.images[0].cfId : ""
1309
- }, et = $.map((R) => R.listingId === I.listingId ? D : R);
1310
- M(D), e([...et]);
1309
+ }, et = q.map((U) => U.listingId === N.listingId ? D : U);
1310
+ S(D), e([...et]);
1311
1311
  },
1312
1312
  value: A.productData.name,
1313
1313
  options: [
1314
- ...l.filter((u) => !s.find(($) => $.listingId === u.id)).map((u) => u.productData.name)
1314
+ ...l.filter((u) => !s.find((q) => q.listingId === u.id)).map((u) => u.productData.name)
1315
1315
  ],
1316
1316
  leftAddonOptions: l.map((u) => {
1317
- var $;
1317
+ var q;
1318
1318
  return {
1319
1319
  value: u.productData.name,
1320
- addon: w((($ = u.productData.images[0]) == null ? void 0 : $.cfId) || "")
1320
+ addon: T(((q = u.productData.images[0]) == null ? void 0 : q.cfId) || "")
1321
1321
  };
1322
1322
  })
1323
1323
  }
1324
1324
  ),
1325
1325
  /* @__PURE__ */ t.jsxs("div", { className: W.buttons, children: [
1326
- j && /* @__PURE__ */ t.jsx("div", { className: W.deleteButton, children: /* @__PURE__ */ t.jsx(
1327
- b,
1326
+ v && /* @__PURE__ */ t.jsx("div", { className: W.deleteButton, children: /* @__PURE__ */ t.jsx(
1327
+ I,
1328
1328
  {
1329
1329
  name: "Sliders",
1330
1330
  hoverable: !0,
1331
1331
  width: 20,
1332
1332
  height: 20,
1333
- onClick: (u) => S(u, I)
1333
+ onClick: (u) => w(u, N)
1334
1334
  }
1335
1335
  ) }),
1336
- _ && /* @__PURE__ */ t.jsx("div", { className: W.deleteButton, children: /* @__PURE__ */ t.jsx(
1337
- b,
1336
+ j && /* @__PURE__ */ t.jsx("div", { className: W.deleteButton, children: /* @__PURE__ */ t.jsx(
1337
+ I,
1338
1338
  {
1339
1339
  name: "Trash",
1340
1340
  hoverable: !0,
1341
1341
  width: 20,
1342
1342
  height: 20,
1343
1343
  fill: "#C12A2A",
1344
- onClick: () => e(s.filter((u) => u !== I))
1344
+ onClick: () => e(s.filter((u) => u !== N))
1345
1345
  }
1346
1346
  ) })
1347
1347
  ] })
1348
1348
  ] });
1349
- return v ? /* @__PURE__ */ t.jsx(
1349
+ return b ? /* @__PURE__ */ t.jsx(
1350
1350
  Ae,
1351
1351
  {
1352
- product: I,
1353
- children: H
1352
+ product: N,
1353
+ children: F
1354
1354
  },
1355
- I.listingId
1355
+ N.listingId
1356
1356
  ) : /* @__PURE__ */ t.jsx(
1357
1357
  "div",
1358
1358
  {
1359
1359
  className: W.product,
1360
- children: H
1360
+ children: F
1361
1361
  },
1362
- I.listingId
1362
+ N.listingId
1363
1363
  );
1364
- }, q = x.useRef(null);
1364
+ }, O = y.useRef(null);
1365
1365
  return /* @__PURE__ */ t.jsxs("div", { className: W.productsBlock, children: [
1366
- (c || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: W.top, children: [
1367
- c && /* @__PURE__ */ t.jsx("h3", { className: W.title, children: c }),
1368
- i !== void 0 && /* @__PURE__ */ t.jsx(
1366
+ (o || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: W.top, children: [
1367
+ o && /* @__PURE__ */ t.jsx("h3", { className: W.title, children: o }),
1368
+ n !== void 0 && /* @__PURE__ */ t.jsx(
1369
1369
  lt,
1370
1370
  {
1371
- current: i,
1372
- onChange: (I) => a == null ? void 0 : a(I)
1371
+ current: n,
1372
+ onChange: (N) => a == null ? void 0 : a(N)
1373
1373
  }
1374
1374
  )
1375
1375
  ] }),
1376
- K && y && /* @__PURE__ */ t.jsx(
1376
+ K && _ && /* @__PURE__ */ t.jsx(
1377
1377
  Et,
1378
1378
  {
1379
- ref: q,
1380
- activeItem: y,
1381
- setActiveItem: M,
1382
- setIsOpenModal: g,
1383
- popupPosition: U,
1379
+ ref: O,
1380
+ activeItem: _,
1381
+ setActiveItem: S,
1382
+ setIsOpenModal: f,
1383
+ popupPosition: L,
1384
1384
  itemsOptions: l
1385
1385
  }
1386
1386
  ),
1387
- i && /* @__PURE__ */ t.jsxs("div", { className: W.products, children: [
1388
- f && /* @__PURE__ */ t.jsx("h5", { className: W.subtitle, children: f }),
1389
- v ? /* @__PURE__ */ t.jsx(
1387
+ n && /* @__PURE__ */ t.jsxs("div", { className: W.products, children: [
1388
+ x && /* @__PURE__ */ t.jsx("h5", { className: W.subtitle, children: x }),
1389
+ b ? /* @__PURE__ */ t.jsx(
1390
1390
  ft,
1391
1391
  {
1392
1392
  sensors: p,
1393
- onDragEnd: O,
1393
+ onDragEnd: $,
1394
1394
  children: /* @__PURE__ */ t.jsx(
1395
1395
  xt,
1396
1396
  {
1397
- items: s.map((I) => String(I.listingId)),
1397
+ items: s.map((N) => String(N.listingId)),
1398
1398
  strategy: _t,
1399
- children: s.map((I) => N(I))
1399
+ children: s.map((N) => C(N))
1400
1400
  }
1401
1401
  )
1402
1402
  }
1403
- ) : s.map((I) => N(I)),
1403
+ ) : s.map((N) => C(N)),
1404
1404
  m && /* @__PURE__ */ t.jsx(
1405
1405
  "div",
1406
1406
  {
@@ -1416,25 +1416,25 @@ const Un = (h) => {
1416
1416
  className: W.button,
1417
1417
  size: "s",
1418
1418
  onClick: () => {
1419
- const I = [...s];
1419
+ const N = [...s];
1420
1420
  for (let A = 0; A < l.length; A++)
1421
- if (!s.find((H) => H.listingId === l[A].id)) {
1422
- I.push({
1421
+ if (!s.find((F) => F.listingId === l[A].id)) {
1422
+ N.push({
1423
1423
  listingId: l[A].id,
1424
1424
  image: l[A].productData.images.length > 0 ? l[A].productData.images[0].cfId : ""
1425
1425
  });
1426
1426
  break;
1427
1427
  }
1428
- e(I);
1428
+ e(N);
1429
1429
  },
1430
- disabled: s.length === (n || l.length),
1430
+ disabled: s.length === (g || l.length),
1431
1431
  style: {
1432
1432
  width: "fit-content"
1433
1433
  },
1434
1434
  children: /* @__PURE__ */ t.jsxs("div", { className: W.addButton, children: [
1435
1435
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
1436
1436
  /* @__PURE__ */ t.jsx(
1437
- b,
1437
+ I,
1438
1438
  {
1439
1439
  name: "Plus",
1440
1440
  width: 16,
@@ -1447,16 +1447,16 @@ const Un = (h) => {
1447
1447
  }
1448
1448
  )
1449
1449
  ] }),
1450
- o && C && /* @__PURE__ */ t.jsx(
1450
+ c && i && /* @__PURE__ */ t.jsx(
1451
1451
  at,
1452
1452
  {
1453
- value: o,
1454
- options: Object.keys(wt),
1455
- onChange: (I) => C(I),
1456
- leftAddonOptions: kt
1453
+ value: c,
1454
+ options: Object.keys(kt),
1455
+ onChange: (N) => i(N),
1456
+ leftAddonOptions: Pt
1457
1457
  }
1458
1458
  ),
1459
- i && r !== void 0 && /* @__PURE__ */ t.jsx(
1459
+ n && r !== void 0 && /* @__PURE__ */ t.jsx(
1460
1460
  ht,
1461
1461
  {
1462
1462
  otherTitle: "Other",
@@ -1464,15 +1464,15 @@ const Un = (h) => {
1464
1464
  }
1465
1465
  )
1466
1466
  ] });
1467
- }, De = "_options_167h8_1", Ee = "_price_167h8_18", ze = "_oldPrice_167h8_25", Re = "_newPrice_167h8_33", Le = "_animate_167h8_40", Ue = "_meta_167h8_58", He = "_info_167h8_64", Fe = "_infoRight_167h8_73", Ve = "_buttons_167h8_80", Ye = "_variants_167h8_87", Ge = "_variant_167h8_87", We = "_stock_167h8_105", Xe = "_variantInfo_167h8_112", Qe = "_quantity_167h8_119", Je = "_button_167h8_80", Ke = "_activeVariant_167h8_165", Ze = "_chargeTypes_167h8_169", ts = "_charge_167h8_169", es = "_chargeActive_167h8_194", ss = "_title_167h8_202", B = {
1467
+ }, De = "_options_wqtfh_1", Ee = "_price_wqtfh_18", Re = "_oldPrice_wqtfh_25", Le = "_newPrice_wqtfh_34", Ue = "_animate_wqtfh_42", ze = "_meta_wqtfh_60", Fe = "_info_wqtfh_66", He = "_infoRight_wqtfh_75", Ve = "_buttons_wqtfh_82", Ye = "_variants_wqtfh_89", Ge = "_variant_wqtfh_89", We = "_stock_wqtfh_107", Xe = "_variantInfo_wqtfh_114", Qe = "_quantity_wqtfh_121", Je = "_button_wqtfh_82", Ke = "_activeVariant_wqtfh_167", Ze = "_chargeTypes_wqtfh_171", ts = "_charge_wqtfh_171", es = "_chargeActive_wqtfh_196", ss = "_title_wqtfh_204", B = {
1468
1468
  options: De,
1469
1469
  price: Ee,
1470
- oldPrice: ze,
1471
- newPrice: Re,
1472
- animate: Le,
1473
- meta: Ue,
1474
- info: He,
1475
- infoRight: Fe,
1470
+ oldPrice: Re,
1471
+ newPrice: Le,
1472
+ animate: Ue,
1473
+ meta: ze,
1474
+ info: Fe,
1475
+ infoRight: He,
1476
1476
  buttons: Ve,
1477
1477
  variants: Ye,
1478
1478
  variant: Ge,
@@ -1486,160 +1486,181 @@ const Un = (h) => {
1486
1486
  chargeActive: es,
1487
1487
  title: ss
1488
1488
  };
1489
- var $t = /* @__PURE__ */ ((h) => (h.ONE_TIME = "One-Time", h.RECURRING = "Subscribe & Save", h))($t || {});
1489
+ var qt = /* @__PURE__ */ ((h) => (h.ONE_TIME = "One-Time", h.RECURRING = "Subscribe & Save", h))(qt || {});
1490
1490
  const ns = (h) => {
1491
- var z, K;
1492
- const { product: i, setIsOpen: a } = h, { variants: s } = i, [e, r] = x.useState(s[0]), [c, f] = x.useState(
1491
+ var E, K;
1492
+ const { product: n, setIsOpen: a } = h, { variants: s } = n, [e, r] = y.useState(s[0]), [o, x] = y.useState(
1493
1493
  e.chargeTypes ? e.chargeTypes[0] : "ONE_TIME"
1494
- ), { notifications: j, setNotifications: v } = Ct(), T = St(), [_, m] = x.useState(1), { cart: d, reset: l, addProductToCart: n } = ot(), [o, C] = x.useState(!1);
1495
- x.useEffect(() => {
1496
- C(!0);
1497
- const g = setTimeout(() => C(!1), 600);
1498
- return () => clearTimeout(g);
1499
- }, [_]);
1500
- async function y() {
1494
+ ), { notifications: v, setNotifications: b } = Ct(), M = St(), [j, m] = y.useState(1), { cart: d, reset: l, addProductToCart: g } = ct(), [c, i] = y.useState(!1);
1495
+ y.useEffect(() => {
1496
+ i(!0);
1497
+ const f = setTimeout(() => i(!1), 600);
1498
+ return () => clearTimeout(f);
1499
+ }, [j]);
1500
+ async function _() {
1501
1501
  try {
1502
- n({
1503
- productId: i.id,
1502
+ g({
1503
+ productId: n.id,
1504
1504
  productVariantId: e.id,
1505
- chargeType: c,
1506
- quantity: _
1507
- }), v([
1508
- ...j,
1505
+ chargeType: o,
1506
+ quantity: j
1507
+ }), b([
1508
+ ...v,
1509
1509
  {
1510
1510
  id: J(),
1511
1511
  message: "Product added to cart",
1512
1512
  status: "success"
1513
1513
  }
1514
1514
  ]);
1515
- } catch (g) {
1516
- v([
1517
- ...j,
1515
+ } catch (f) {
1516
+ b([
1517
+ ...v,
1518
1518
  {
1519
1519
  id: J(),
1520
- message: `Product failed to add to cart: ${g}`,
1520
+ message: `Product failed to add to cart: ${f}`,
1521
1521
  status: "error"
1522
1522
  }
1523
1523
  ]);
1524
1524
  }
1525
1525
  a == null || a(!1);
1526
1526
  }
1527
- function M() {
1528
- l(), y(), T("/checkout");
1527
+ function S() {
1528
+ l(), _(), M("/checkout");
1529
1529
  }
1530
- function U(g) {
1531
- if (g >= 864e5) {
1532
- const N = Math.floor(g / 864e5);
1533
- return `${N} ${N === 1 ? "day" : "days"}`;
1534
- } else if (g >= 36e5) {
1535
- const N = Math.floor(g / 36e5);
1536
- return `${N} ${N === 1 ? "hour" : "hours"}`;
1537
- } else if (g >= 6e4) {
1538
- const N = Math.floor(g / 6e4);
1539
- return `${N} ${N === 1 ? "minute" : "minutes"}`;
1530
+ function L(f) {
1531
+ if (f >= 864e5) {
1532
+ const C = Math.floor(f / 864e5);
1533
+ return `${C} ${C === 1 ? "day" : "days"}`;
1534
+ } else if (f >= 36e5) {
1535
+ const C = Math.floor(f / 36e5);
1536
+ return `${C} ${C === 1 ? "hour" : "hours"}`;
1537
+ } else if (f >= 6e4) {
1538
+ const C = Math.floor(f / 6e4);
1539
+ return `${C} ${C === 1 ? "minute" : "minutes"}`;
1540
1540
  } else {
1541
- const N = Math.floor(g / 1e3);
1542
- return `${N} ${N === 1 ? "second" : "seconds"}`;
1541
+ const C = Math.floor(f / 1e3);
1542
+ return `${C} ${C === 1 ? "second" : "seconds"}`;
1543
1543
  }
1544
1544
  }
1545
- return x.useEffect(() => {
1545
+ return y.useEffect(() => {
1546
1546
  e.quantity && e.quantity.available === 0 ? m(0) : m(1);
1547
- }, [e.quantity.available]), x.useEffect(() => {
1548
- e.chargeTypes && f(
1549
- e.chargeTypes.includes(c) ? c : e.chargeTypes[0]
1547
+ }, [e.quantity.available]), y.useEffect(() => {
1548
+ e.chargeTypes && x(
1549
+ e.chargeTypes.includes(o) ? o : e.chargeTypes[0]
1550
1550
  );
1551
1551
  }, [e.chargeTypes]), /* @__PURE__ */ t.jsxs("div", { className: B.options, children: [
1552
- e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: B.chargeTypes, children: e.chargeTypes.map((g) => /* @__PURE__ */ t.jsx(
1552
+ e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: B.chargeTypes, children: e.chargeTypes.map((f) => /* @__PURE__ */ t.jsx(
1553
1553
  "div",
1554
1554
  {
1555
- className: F(B.charge, {
1556
- [B.chargeActive]: c === g
1555
+ className: H(B.charge, {
1556
+ [B.chargeActive]: o === f
1557
1557
  }),
1558
- onClick: () => f(g),
1559
- children: $t[g]
1558
+ onClick: () => x(f),
1559
+ children: qt[f]
1560
1560
  },
1561
- g
1561
+ f
1562
1562
  )) }),
1563
- /* @__PURE__ */ t.jsx("div", { className: B.variants, children: s.filter((g) => {
1563
+ /* @__PURE__ */ t.jsx("div", { className: B.variants, children: s.filter((f) => {
1564
1564
  var p;
1565
- return (p = g.chargeTypes) == null ? void 0 : p.includes(c);
1566
- }).map((g) => {
1567
- var p, S;
1565
+ return (p = f.chargeTypes) == null ? void 0 : p.includes(o);
1566
+ }).map((f) => {
1567
+ var p, w;
1568
1568
  return /* @__PURE__ */ t.jsxs(
1569
1569
  "div",
1570
1570
  {
1571
- className: F(B.variant, {
1572
- [B.activeVariant]: e.id === g.id
1571
+ className: H(B.variant, {
1572
+ [B.activeVariant]: e.id === f.id
1573
1573
  }),
1574
- onClick: () => r(g),
1574
+ onClick: () => r(f),
1575
1575
  children: [
1576
1576
  /* @__PURE__ */ t.jsxs("div", { className: B.variantInfo, children: [
1577
- /* @__PURE__ */ t.jsx("span", { className: B.title, children: it(g.name) }),
1578
- /* @__PURE__ */ t.jsxs("span", { children: [
1577
+ /* @__PURE__ */ t.jsx(
1578
+ "span",
1579
+ {
1580
+ className: B.title,
1581
+ id: "h4",
1582
+ children: it(f.name)
1583
+ }
1584
+ ),
1585
+ /* @__PURE__ */ t.jsxs("span", { id: "md", children: [
1579
1586
  Q({
1580
- amount: c === "ONE_TIME" ? g.price.amount : g.subscriptionSettings ? g.subscriptionSettings.price.amount : 0,
1581
- currency: c === "ONE_TIME" ? g.price.currency : g.subscriptionSettings ? g.subscriptionSettings.price.currency : "USD"
1587
+ amount: o === "ONE_TIME" ? f.price.amount : f.subscriptionSettings ? f.subscriptionSettings.price.amount : 0,
1588
+ currency: o === "ONE_TIME" ? f.price.currency : f.subscriptionSettings ? f.subscriptionSettings.price.currency : "USD"
1582
1589
  }),
1583
1590
  " ",
1584
- c === "RECURRING" && g.subscriptionSettings && ` / ${zt(g.subscriptionSettings.recurringIntervalDays || 0)}`
1591
+ o === "RECURRING" && f.subscriptionSettings && ` / ${Rt(f.subscriptionSettings.recurringIntervalDays || 0)}`
1585
1592
  ] })
1586
1593
  ] }),
1587
- /* @__PURE__ */ t.jsx("div", { children: c === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: B.stock, children: [
1588
- (p = g.quantity.restrictions) != null && p.max || g.quantity.available !== void 0 ? ((S = g.quantity.restrictions) == null ? void 0 : S.max) || g.quantity.available : "",
1589
- " ",
1590
- "in stock"
1591
- ] }) })
1594
+ /* @__PURE__ */ t.jsx("div", { id: "md", children: o === "ONE_TIME" && /* @__PURE__ */ t.jsxs(
1595
+ "span",
1596
+ {
1597
+ className: B.stock,
1598
+ id: "md",
1599
+ children: [
1600
+ (p = f.quantity.restrictions) != null && p.max || f.quantity.available !== void 0 ? ((w = f.quantity.restrictions) == null ? void 0 : w.max) || f.quantity.available : "∞",
1601
+ " ",
1602
+ "in stock"
1603
+ ]
1604
+ }
1605
+ ) })
1592
1606
  ]
1593
1607
  },
1594
- g.id
1608
+ f.id
1595
1609
  );
1596
1610
  }) }),
1597
- c === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: B.quantity, children: [
1598
- /* @__PURE__ */ t.jsx(
1599
- E,
1600
- {
1601
- type: "Secondary",
1602
- onClick: () => {
1603
- _ > 1 ? m((g) => g - 1) : m(1);
1604
- },
1605
- className: B.button,
1606
- disabled: e.quantity.available && e.quantity.restrictions && _ <= e.quantity.restrictions.min || e.quantity.available === 0,
1607
- children: /* @__PURE__ */ t.jsx(b, { name: "Minus" })
1608
- }
1609
- ),
1610
- /* @__PURE__ */ t.jsx(
1611
- Rt,
1612
- {
1613
- type: "number",
1614
- value: String(_),
1615
- onChange: (g) => {
1616
- e.quantity.available && Number(g) > e.quantity.available ? m(e.quantity.available) : m(Number(g));
1617
- },
1618
- max: ((z = e.quantity.restrictions) == null ? void 0 : z.max) || e.quantity.available || Number.POSITIVE_INFINITY,
1619
- min: ((K = e.quantity.restrictions) == null ? void 0 : K.min) || 0,
1620
- centered: !0,
1621
- disabled: e.quantity && e.quantity.available === 0 || Object.keys(e.quantity.restrictions || {}).length !== 0 && _ >= e.quantity.restrictions.max
1622
- }
1623
- ),
1624
- /* @__PURE__ */ t.jsx(
1625
- E,
1626
- {
1627
- type: "Secondary",
1628
- onClick: () => {
1629
- m((g) => g + 1);
1630
- },
1631
- className: B.button,
1632
- disabled: !!(e.quantity.available && e.quantity.restrictions && _ >= e.quantity.restrictions.max || e.quantity.available === 0 || e.quantity.available && _ >= e.quantity.available),
1633
- children: /* @__PURE__ */ t.jsx(b, { name: "Plus" })
1634
- }
1635
- )
1636
- ] }),
1611
+ o === "ONE_TIME" && /* @__PURE__ */ t.jsxs(
1612
+ "div",
1613
+ {
1614
+ className: B.quantity,
1615
+ id: "md",
1616
+ children: [
1617
+ /* @__PURE__ */ t.jsx(
1618
+ R,
1619
+ {
1620
+ type: "Secondary",
1621
+ onClick: () => {
1622
+ j > 1 ? m((f) => f - 1) : m(1);
1623
+ },
1624
+ className: B.button,
1625
+ disabled: e.quantity.available && e.quantity.restrictions && j <= e.quantity.restrictions.min || e.quantity.available === 0,
1626
+ children: /* @__PURE__ */ t.jsx(I, { name: "Minus" })
1627
+ }
1628
+ ),
1629
+ /* @__PURE__ */ t.jsx(
1630
+ Lt,
1631
+ {
1632
+ type: "number",
1633
+ value: String(j),
1634
+ onChange: (f) => {
1635
+ e.quantity.available && Number(f) > e.quantity.available ? m(e.quantity.available) : m(Number(f));
1636
+ },
1637
+ max: ((E = e.quantity.restrictions) == null ? void 0 : E.max) || e.quantity.available || Number.POSITIVE_INFINITY,
1638
+ min: ((K = e.quantity.restrictions) == null ? void 0 : K.min) || 0,
1639
+ centered: !0,
1640
+ disabled: e.quantity && e.quantity.available === 0 || Object.keys(e.quantity.restrictions || {}).length !== 0 && j >= e.quantity.restrictions.max
1641
+ }
1642
+ ),
1643
+ /* @__PURE__ */ t.jsx(
1644
+ R,
1645
+ {
1646
+ type: "Secondary",
1647
+ onClick: () => {
1648
+ m((f) => f + 1);
1649
+ },
1650
+ className: B.button,
1651
+ disabled: !!(e.quantity.available && e.quantity.restrictions && j >= e.quantity.restrictions.max || e.quantity.available === 0 || e.quantity.available && j >= e.quantity.available),
1652
+ children: /* @__PURE__ */ t.jsx(I, { name: "Plus" })
1653
+ }
1654
+ )
1655
+ ]
1656
+ }
1657
+ ),
1637
1658
  /* @__PURE__ */ t.jsxs("div", { className: B.meta, children: [
1638
1659
  /* @__PURE__ */ t.jsxs("div", { className: B.info, children: [
1639
- /* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
1660
+ /* @__PURE__ */ t.jsx("span", { id: "md", children: "Delivery" }),
1640
1661
  /* @__PURE__ */ t.jsxs("div", { className: B.infoRight, children: [
1641
1662
  /* @__PURE__ */ t.jsx(
1642
- b,
1663
+ I,
1643
1664
  {
1644
1665
  name: "Lightning",
1645
1666
  fill: "var(--text-action)",
@@ -1647,62 +1668,111 @@ const ns = (h) => {
1647
1668
  height: 20
1648
1669
  }
1649
1670
  ),
1650
- /* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : U(e.deliveryTime) })
1671
+ /* @__PURE__ */ t.jsx("span", { id: "md", children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : L(e.deliveryTime) })
1651
1672
  ] })
1652
1673
  ] }),
1653
1674
  /* @__PURE__ */ t.jsxs("div", { className: B.info, children: [
1654
- /* @__PURE__ */ t.jsx("span", { children: "Price" }),
1655
- /* @__PURE__ */ t.jsx("div", { className: B.infoRight, children: c === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: B.price, children: [
1656
- /* @__PURE__ */ t.jsx("span", { className: F(B.newPrice, { [B.animate]: o }), children: Q({
1657
- amount: e.price.amount * _,
1658
- currency: e.price.currency
1659
- }) }),
1660
- /* @__PURE__ */ t.jsx("span", { className: B.oldPrice, children: Q({
1661
- amount: e.compareAtPrice.amount * _,
1662
- currency: e.compareAtPrice.currency
1663
- }) })
1664
- ] }) : /* @__PURE__ */ t.jsx("span", { className: F(B.newPrice, { [B.animate]: o }), children: Q({
1665
- amount: e.price.amount * _,
1666
- currency: e.price.currency
1667
- }) }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: B.price, children: [
1668
- /* @__PURE__ */ t.jsx("span", { className: F(B.newPrice, { [B.animate]: o }), children: Q({
1669
- amount: e.subscriptionSettings.price.amount * _,
1670
- currency: e.subscriptionSettings.price.currency
1671
- }) }),
1672
- /* @__PURE__ */ t.jsx("span", { className: B.oldPrice, children: Q({
1673
- amount: e.subscriptionSettings.compareAtPrice.amount * _,
1674
- currency: e.subscriptionSettings.compareAtPrice.currency
1675
- }) })
1676
- ] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsx("span", { className: F(B.newPrice, { [B.animate]: o }), children: Q({
1677
- amount: e.subscriptionSettings.price.amount * _,
1678
- currency: e.subscriptionSettings.price.currency
1679
- }) }) })
1675
+ /* @__PURE__ */ t.jsx("span", { id: "md", children: "Price" }),
1676
+ /* @__PURE__ */ t.jsx("div", { className: B.infoRight, children: o === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs(
1677
+ "div",
1678
+ {
1679
+ className: B.price,
1680
+ id: "md",
1681
+ children: [
1682
+ /* @__PURE__ */ t.jsx("span", { className: H(B.newPrice, { [B.animate]: c }), children: Q({
1683
+ amount: e.price.amount * j,
1684
+ currency: e.price.currency
1685
+ }) }),
1686
+ /* @__PURE__ */ t.jsx(
1687
+ "span",
1688
+ {
1689
+ className: B.oldPrice,
1690
+ id: "md",
1691
+ children: Q({
1692
+ amount: e.compareAtPrice.amount * j,
1693
+ currency: e.compareAtPrice.currency
1694
+ })
1695
+ }
1696
+ )
1697
+ ]
1698
+ }
1699
+ ) : /* @__PURE__ */ t.jsx(
1700
+ "span",
1701
+ {
1702
+ className: H(B.newPrice, { [B.animate]: c }),
1703
+ id: "md",
1704
+ children: Q({
1705
+ amount: e.price.amount * j,
1706
+ currency: e.price.currency
1707
+ })
1708
+ }
1709
+ ) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs(
1710
+ "div",
1711
+ {
1712
+ className: B.price,
1713
+ id: "md",
1714
+ children: [
1715
+ /* @__PURE__ */ t.jsx(
1716
+ "span",
1717
+ {
1718
+ className: H(B.newPrice, { [B.animate]: c }),
1719
+ id: "md",
1720
+ children: Q({
1721
+ amount: e.subscriptionSettings.price.amount * j,
1722
+ currency: e.subscriptionSettings.price.currency
1723
+ })
1724
+ }
1725
+ ),
1726
+ /* @__PURE__ */ t.jsx(
1727
+ "span",
1728
+ {
1729
+ className: B.oldPrice,
1730
+ id: "md",
1731
+ children: Q({
1732
+ amount: e.subscriptionSettings.compareAtPrice.amount * j,
1733
+ currency: e.subscriptionSettings.compareAtPrice.currency
1734
+ })
1735
+ }
1736
+ )
1737
+ ]
1738
+ }
1739
+ ) : e.subscriptionSettings && /* @__PURE__ */ t.jsx(
1740
+ "span",
1741
+ {
1742
+ className: H(B.newPrice, { [B.animate]: c }),
1743
+ id: "md",
1744
+ children: Q({
1745
+ amount: e.subscriptionSettings.price.amount * j,
1746
+ currency: e.subscriptionSettings.price.currency
1747
+ })
1748
+ }
1749
+ ) })
1680
1750
  ] })
1681
1751
  ] }),
1682
1752
  /* @__PURE__ */ t.jsxs("div", { className: B.buttons, children: [
1683
1753
  /* @__PURE__ */ t.jsx(
1684
- E,
1754
+ R,
1685
1755
  {
1686
1756
  type: "Primary",
1687
- onClick: () => M(),
1757
+ onClick: () => S(),
1688
1758
  disabled: e.quantity && e.quantity.available === 0,
1689
- children: c === "ONE_TIME" ? "Buy Now" : "Subscribe Now"
1759
+ children: o === "ONE_TIME" ? "Buy Now" : "Subscribe Now"
1690
1760
  }
1691
1761
  ),
1692
- c === "ONE_TIME" && /* @__PURE__ */ t.jsx(
1693
- E,
1762
+ o === "ONE_TIME" && /* @__PURE__ */ t.jsx(
1763
+ R,
1694
1764
  {
1695
1765
  type: "Secondary",
1696
- onClick: () => y(),
1766
+ onClick: () => _(),
1697
1767
  disabled: e.quantity && e.quantity.available === 0,
1698
1768
  children: d.parts.some(
1699
- (g) => g.productId === i.id && g.productVariantId === e.id
1769
+ (f) => f.productId === n.id && f.productVariantId === e.id
1700
1770
  ) ? "Add More" : "Add to Cart"
1701
1771
  }
1702
1772
  )
1703
1773
  ] })
1704
1774
  ] });
1705
- }, is = "_buttons_3z0t7_23", as = "_modal_3z0t7_32", os = "_closing_3z0t7_65", cs = "_info_3z0t7_114", rs = "_top_3z0t7_121", ls = "_title_3z0t7_132", ds = "_clear_3z0t7_139", us = "_activeClear_3z0t7_146", hs = "_count_3z0t7_150", ps = "_cart_3z0t7_165", ms = "_empty_3z0t7_173", gs = "_product_3z0t7_199", fs = "_products_3z0t7_208", xs = "_image_3z0t7_216", _s = "_productInfo_3z0t7_233", js = "_content_3z0t7_240", vs = "_name_3z0t7_246", ys = "_price_3z0t7_252", bs = "_productButtons_3z0t7_258", Is = "_productButton_3z0t7_258", Ns = "_productCount_3z0t7_275", Cs = "_bottom_3z0t7_292", Ss = "_subtotal_3z0t7_300", Ps = "_block_3z0t7_308", ks = "_shoppingCount_3z0t7_315", ws = "_total_3z0t7_335", Ts = "_link_3z0t7_341", Ms = "_userInfo_3z0t7_348", Bs = "_pagesMobileModal_3z0t7_360", $s = "_pagesMobileModalContent_3z0t7_374", Os = "_pagesMobileModalHeader_3z0t7_380", qs = "_pagesMobileModalFooter_3z0t7_390", As = "_pageLink_3z0t7_397", Ds = "_rightButtons_3z0t7_406", k = {
1775
+ }, is = "_buttons_1uy6y_23", as = "_modal_1uy6y_32", os = "_closing_1uy6y_65", cs = "_info_1uy6y_114", rs = "_top_1uy6y_121", ls = "_title_1uy6y_132", ds = "_clear_1uy6y_139", us = "_activeClear_1uy6y_146", hs = "_count_1uy6y_150", ps = "_cart_1uy6y_165", ms = "_empty_1uy6y_173", gs = "_product_1uy6y_199", fs = "_products_1uy6y_208", xs = "_image_1uy6y_216", _s = "_productInfo_1uy6y_233", ys = "_content_1uy6y_240", js = "_name_1uy6y_246", vs = "_price_1uy6y_252", bs = "_productButtons_1uy6y_258", Is = "_productButton_1uy6y_258", Ns = "_productCount_1uy6y_275", Cs = "_bottom_1uy6y_292", Ss = "_subtotal_1uy6y_300", ws = "_block_1uy6y_308", Ps = "_shoppingCount_1uy6y_315", ks = "_total_1uy6y_335", Ts = "_link_1uy6y_341", Ms = "_userInfo_1uy6y_348", Bs = "_pagesMobileModal_1uy6y_360", qs = "_pagesMobileModalContent_1uy6y_374", $s = "_pagesMobileModalHeader_1uy6y_380", Os = "_pagesMobileModalFooter_1uy6y_390", As = "_pageLink_1uy6y_397", Ds = "_rightButtons_1uy6y_406", k = {
1706
1776
  buttons: is,
1707
1777
  modal: as,
1708
1778
  closing: os,
@@ -1718,78 +1788,79 @@ const ns = (h) => {
1718
1788
  products: fs,
1719
1789
  image: xs,
1720
1790
  productInfo: _s,
1721
- content: js,
1722
- name: vs,
1723
- price: ys,
1791
+ content: ys,
1792
+ name: js,
1793
+ price: vs,
1724
1794
  productButtons: bs,
1725
1795
  productButton: Is,
1726
1796
  productCount: Ns,
1727
1797
  bottom: Cs,
1728
1798
  subtotal: Ss,
1729
- block: Ps,
1730
- shoppingCount: ks,
1731
- total: ws,
1799
+ block: ws,
1800
+ shoppingCount: Ps,
1801
+ total: ks,
1732
1802
  link: Ts,
1733
1803
  userInfo: Ms,
1734
1804
  pagesMobileModal: Bs,
1735
- pagesMobileModalContent: $s,
1736
- pagesMobileModalHeader: Os,
1737
- pagesMobileModalFooter: qs,
1805
+ pagesMobileModalContent: qs,
1806
+ pagesMobileModalHeader: $s,
1807
+ pagesMobileModalFooter: Os,
1738
1808
  pageLink: As,
1739
- rightButtons: Ds
1809
+ rightButtons: Ds,
1810
+ delete: "_delete_1uy6y_413"
1740
1811
  }, Hn = (h) => {
1741
- const { shopping: i, signUp: a, isShowUserInfo: s = !0 } = h;
1742
- return /* @__PURE__ */ t.jsxs("div", { className: k.buttons, children: [
1743
- i && /* @__PURE__ */ t.jsx(Es, {}),
1744
- s && /* @__PURE__ */ t.jsx(Ot, { signUp: a })
1745
- ] });
1812
+ const { shopping: n, signUp: a, isShowUserInfo: s = !0 } = h;
1813
+ return /* @__PURE__ */ t.jsx(t.Fragment, { children: (n || s) && /* @__PURE__ */ t.jsxs("div", { className: k.buttons, children: [
1814
+ n && /* @__PURE__ */ t.jsx(Es, {}),
1815
+ s && /* @__PURE__ */ t.jsx($t, { signUp: a })
1816
+ ] }) });
1746
1817
  }, Es = () => {
1747
- const [h, i] = x.useState(!1), [a, s] = x.useState([]), [e, r] = x.useState(!1), { cart: c, products: f } = ot();
1748
- function j(l) {
1818
+ const [h, n] = y.useState(!1), [a, s] = y.useState([]), [e, r] = y.useState(!1), { cart: o, products: x } = ct();
1819
+ function v(l) {
1749
1820
  if (l.variants.length > 0) {
1750
- for (let n = 0; n < c.parts.length; n++)
1751
- for (let o = 0; o < l.variants.length; o++)
1752
- if (l.variants[o] && c.parts[n].productVariantId === l.variants[o].id)
1753
- return c.parts[n].productVariantId;
1821
+ for (let g = 0; g < o.parts.length; g++)
1822
+ for (let c = 0; c < l.variants.length; c++)
1823
+ if (l.variants[c] && o.parts[g].productVariantId === l.variants[c].id)
1824
+ return o.parts[g].productVariantId;
1754
1825
  }
1755
1826
  return l.variants[0].id;
1756
1827
  }
1757
- function v(l) {
1758
- for (let n = 0; n < c.parts.length; n++)
1759
- for (let o = 0; o < l.variants.length; o++)
1760
- if (l.variants[o] && c.parts[n].productVariantId === l.variants[o].id)
1761
- return c.parts[n].quantity;
1828
+ function b(l) {
1829
+ for (let g = 0; g < o.parts.length; g++)
1830
+ for (let c = 0; c < l.variants.length; c++)
1831
+ if (l.variants[c] && o.parts[g].productVariantId === l.variants[c].id)
1832
+ return o.parts[g].quantity;
1762
1833
  }
1763
- const T = (l) => {
1764
- for (let n = 0; n < c.parts.length; n++)
1765
- for (let o = 0; o < l.variants.length; o++)
1766
- if (l.variants[o] && c.parts[n].productVariantId === l.variants[o].id)
1767
- return c.parts[n].chargeType;
1834
+ const M = (l) => {
1835
+ for (let g = 0; g < o.parts.length; g++)
1836
+ for (let c = 0; c < l.variants.length; c++)
1837
+ if (l.variants[c] && o.parts[g].productVariantId === l.variants[c].id)
1838
+ return o.parts[g].chargeType;
1768
1839
  return "ONE_TIME";
1769
1840
  };
1770
- x.useEffect(() => {
1841
+ y.useEffect(() => {
1771
1842
  (async () => {
1772
- const n = c.parts.map((y) => String(y.productId)), C = (f.filter((y) => n.includes(String(y.id))) || []).map((y) => ({
1773
- ...y,
1774
- activeVariantId: j(y),
1775
- quantity: v(y),
1776
- chargeType: T(y)
1843
+ const g = o.parts.map((_) => String(_.productId)), i = (x.filter((_) => g.includes(String(_.id))) || []).map((_) => ({
1844
+ ..._,
1845
+ activeVariantId: v(_),
1846
+ quantity: b(_),
1847
+ chargeType: M(_)
1777
1848
  }));
1778
- s(C);
1849
+ s(i);
1779
1850
  })();
1780
- }, [c.parts]);
1781
- function _(l) {
1851
+ }, [o.parts]);
1852
+ function j(l) {
1782
1853
  return !l || !(l != null && l.variants) ? !1 : l.chargeType === "RECURRING";
1783
1854
  }
1784
- const m = c.parts.length > 0 && a.length > 0 && !_(a[0]);
1855
+ const m = o.parts.length > 0 && a.length > 0 && !j(a[0]);
1785
1856
  function d() {
1786
1857
  r(!1), setTimeout(() => {
1787
- i(!1);
1858
+ n(!1);
1788
1859
  }, 300);
1789
1860
  }
1790
1861
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1791
1862
  /* @__PURE__ */ t.jsxs(
1792
- E,
1863
+ R,
1793
1864
  {
1794
1865
  type: "Secondary",
1795
1866
  style: {
@@ -1797,16 +1868,16 @@ const ns = (h) => {
1797
1868
  position: "relative"
1798
1869
  },
1799
1870
  onClick: (l) => {
1800
- l.stopPropagation(), window.location.pathname.includes("/admin/builder") || (i(!0), r(!0));
1871
+ l.stopPropagation(), window.location.pathname.includes("/admin/builder") || (n(!0), r(!0));
1801
1872
  },
1802
1873
  children: [
1803
1874
  /* @__PURE__ */ t.jsx(
1804
- b,
1875
+ I,
1805
1876
  {
1806
1877
  name: "Handbag"
1807
1878
  }
1808
1879
  ),
1809
- m && /* @__PURE__ */ t.jsx("div", { className: k.shoppingCount, children: c.parts.length })
1880
+ m && /* @__PURE__ */ t.jsx("div", { className: k.shoppingCount, children: o.parts.length })
1810
1881
  ]
1811
1882
  }
1812
1883
  ),
@@ -1816,7 +1887,7 @@ const ns = (h) => {
1816
1887
  close: d,
1817
1888
  withAnimation: !1,
1818
1889
  children: /* @__PURE__ */ t.jsx(
1819
- zs,
1890
+ Rs,
1820
1891
  {
1821
1892
  activeProducts: a,
1822
1893
  isCartNotEmpty: m,
@@ -1827,55 +1898,78 @@ const ns = (h) => {
1827
1898
  }
1828
1899
  )
1829
1900
  ] });
1830
- }, zs = (h) => {
1831
- var d, l;
1832
- const { activeProducts: i, isCartNotEmpty: a, isOpen: s, close: e } = h, { cart: r, reset: c, getTotalAndDiscount: f, updateQuantityOfProduct: j } = ot(), v = St();
1833
- function T(n, o) {
1834
- v(n, { replace: o });
1901
+ }, Rs = (h) => {
1902
+ var g, c;
1903
+ const { activeProducts: n, isCartNotEmpty: a, isOpen: s, close: e } = h, { cart: r, reset: o, getTotalAndDiscount: x, updateQuantityOfProduct: v, removeProduct: b } = ct(), M = St();
1904
+ function j(i, _) {
1905
+ M(i, { replace: _ });
1835
1906
  }
1836
- function _(n) {
1837
- n.quantity && j({
1838
- productId: n.id,
1839
- productVariantId: n.activeVariantId,
1840
- quantity: n.quantity + 1,
1841
- chargeType: n.chargeType
1907
+ function m(i) {
1908
+ i.quantity && v({
1909
+ productId: i.id,
1910
+ productVariantId: i.activeVariantId,
1911
+ quantity: i.quantity + 1,
1912
+ chargeType: i.chargeType
1842
1913
  });
1843
1914
  }
1844
- function m(n) {
1845
- n.quantity && j({
1846
- productId: n.id,
1847
- productVariantId: n.activeVariantId,
1848
- quantity: n.quantity - 1,
1849
- chargeType: n.chargeType
1915
+ function d(i) {
1916
+ i.quantity && v({
1917
+ productId: i.id,
1918
+ productVariantId: i.activeVariantId,
1919
+ quantity: i.quantity - 1,
1920
+ chargeType: i.chargeType
1921
+ });
1922
+ }
1923
+ function l(i) {
1924
+ b({
1925
+ productId: i.id,
1926
+ productVariantId: i.activeVariantId,
1927
+ quantity: i.quantity || 1,
1928
+ chargeType: i.chargeType
1850
1929
  });
1851
1930
  }
1852
1931
  return /* @__PURE__ */ t.jsxs(
1853
1932
  "div",
1854
1933
  {
1855
- className: F(k.modal, {
1934
+ className: H(k.modal, {
1856
1935
  [k.closing]: !s
1857
1936
  }),
1858
- onClick: (n) => n.stopPropagation(),
1937
+ onClick: (i) => i.stopPropagation(),
1859
1938
  children: [
1860
1939
  /* @__PURE__ */ t.jsxs("div", { className: k.top, children: [
1861
1940
  /* @__PURE__ */ t.jsxs("div", { className: k.info, children: [
1862
- /* @__PURE__ */ t.jsx("span", { className: k.title, children: "Cart" }),
1863
- a && /* @__PURE__ */ t.jsx("div", { className: k.count, children: r.parts.length })
1941
+ /* @__PURE__ */ t.jsx(
1942
+ "span",
1943
+ {
1944
+ className: k.title,
1945
+ id: "h4",
1946
+ children: "Cart"
1947
+ }
1948
+ ),
1949
+ a && /* @__PURE__ */ t.jsx(
1950
+ "div",
1951
+ {
1952
+ className: k.count,
1953
+ id: "md",
1954
+ children: r.parts.length
1955
+ }
1956
+ )
1864
1957
  ] }),
1865
1958
  /* @__PURE__ */ t.jsxs("div", { className: k.rightButtons, children: [
1866
1959
  a && /* @__PURE__ */ t.jsx(
1867
1960
  "button",
1868
1961
  {
1869
- className: F(k.clear, {
1962
+ className: H(k.clear, {
1870
1963
  [k.activeClear]: a
1871
1964
  }),
1872
1965
  disabled: !a,
1873
- onClick: c,
1966
+ onClick: o,
1967
+ id: "md",
1874
1968
  children: "Clear all"
1875
1969
  }
1876
1970
  ),
1877
1971
  /* @__PURE__ */ t.jsx(
1878
- b,
1972
+ I,
1879
1973
  {
1880
1974
  name: "X",
1881
1975
  onClick: e,
@@ -1888,91 +1982,126 @@ const ns = (h) => {
1888
1982
  ] })
1889
1983
  ] }),
1890
1984
  a ? /* @__PURE__ */ t.jsxs("div", { className: k.cart, children: [
1891
- /* @__PURE__ */ t.jsx("div", { className: k.products, children: [...new Map(i.map((n) => [n.id, n])).values()].map((n) => /* @__PURE__ */ t.jsxs(
1892
- "div",
1893
- {
1894
- className: k.product,
1895
- children: [
1896
- /* @__PURE__ */ t.jsxs("div", { className: k.productInfo, children: [
1897
- n.images.length > 0 ? /* @__PURE__ */ t.jsx(
1898
- "img",
1899
- {
1900
- src: `https://imagedelivery.net/${n.images[0].cfId}/w=500`,
1901
- alt: "image",
1902
- width: "100%",
1903
- height: "100%",
1904
- className: k.image
1905
- }
1906
- ) : /* @__PURE__ */ t.jsx("div", { className: k.image, children: /* @__PURE__ */ t.jsx(
1907
- b,
1908
- {
1909
- name: "Image",
1910
- fill: "var(--text-secondary)"
1911
- }
1912
- ) }),
1913
- /* @__PURE__ */ t.jsxs("div", { className: k.content, children: [
1914
- /* @__PURE__ */ t.jsx("div", { className: k.name, children: it(n.name) }),
1915
- /* @__PURE__ */ t.jsx("div", { className: k.price, children: Q({
1916
- amount: n.variants.find(
1917
- (o) => o.id === n.activeVariantId
1918
- ).price.amount * ((n == null ? void 0 : n.quantity) || 1),
1919
- currency: n.variants.find(
1920
- (o) => o.id === n.activeVariantId
1921
- ).price.currency
1922
- }) })
1985
+ /* @__PURE__ */ t.jsx("div", { className: k.products, children: [...new Map(n.map((i) => [i.id, i])).values()].map((i) => {
1986
+ var _;
1987
+ return /* @__PURE__ */ t.jsxs(
1988
+ "div",
1989
+ {
1990
+ className: k.product,
1991
+ children: [
1992
+ /* @__PURE__ */ t.jsxs("div", { className: k.productInfo, children: [
1993
+ i.images.length > 0 ? /* @__PURE__ */ t.jsx(
1994
+ "img",
1995
+ {
1996
+ src: `https://imagedelivery.net/${i.images[0].cfId}/w=500`,
1997
+ alt: "image",
1998
+ width: "100%",
1999
+ height: "100%",
2000
+ className: k.image
2001
+ }
2002
+ ) : /* @__PURE__ */ t.jsx("div", { className: k.image, children: /* @__PURE__ */ t.jsx(
2003
+ I,
2004
+ {
2005
+ name: "Image",
2006
+ fill: "var(--text-secondary)"
2007
+ }
2008
+ ) }),
2009
+ /* @__PURE__ */ t.jsxs("div", { className: k.content, children: [
2010
+ /* @__PURE__ */ t.jsx("div", { className: k.name, children: it(i.name) }),
2011
+ /* @__PURE__ */ t.jsx("div", { className: k.price, children: Q({
2012
+ amount: i.variants.find(
2013
+ (S) => S.id === i.activeVariantId
2014
+ ).price.amount * ((i == null ? void 0 : i.quantity) || 1),
2015
+ currency: i.variants.find(
2016
+ (S) => S.id === i.activeVariantId
2017
+ ).price.currency
2018
+ }) })
2019
+ ] })
2020
+ ] }),
2021
+ /* @__PURE__ */ t.jsxs("div", { className: k.productButtons, children: [
2022
+ /* @__PURE__ */ t.jsx(
2023
+ R,
2024
+ {
2025
+ type: "Secondary",
2026
+ onClick: () => {
2027
+ i.quantity !== 1 && d(i);
2028
+ },
2029
+ className: k.productButton,
2030
+ disabled: i.quantity === 1,
2031
+ children: /* @__PURE__ */ t.jsx(
2032
+ I,
2033
+ {
2034
+ name: "Minus",
2035
+ fill: "#757575",
2036
+ width: 20,
2037
+ height: 20
2038
+ }
2039
+ )
2040
+ }
2041
+ ),
2042
+ /* @__PURE__ */ t.jsx(
2043
+ "input",
2044
+ {
2045
+ className: k.productCount,
2046
+ type: "number",
2047
+ value: ((_ = i.quantity) == null ? void 0 : _.toString()) || "",
2048
+ onChange: (S) => {
2049
+ const L = Math.min(
2050
+ Number(S.target.value),
2051
+ i.variants.find((E) => E.id === i.activeVariantId).quantity.available || 1 / 0
2052
+ );
2053
+ L < 1 || v({
2054
+ productId: i.id,
2055
+ productVariantId: i.activeVariantId,
2056
+ quantity: L,
2057
+ chargeType: i.chargeType
2058
+ });
2059
+ },
2060
+ min: 1,
2061
+ max: i.variants.find((S) => S.id === i.activeVariantId).quantity.available || 1 / 0
2062
+ }
2063
+ ),
2064
+ /* @__PURE__ */ t.jsx(
2065
+ R,
2066
+ {
2067
+ type: "Secondary",
2068
+ onClick: () => m(i),
2069
+ className: k.productButton,
2070
+ disabled: i.quantity === i.variants.find((S) => S.id === i.activeVariantId).quantity.available,
2071
+ children: /* @__PURE__ */ t.jsx(
2072
+ I,
2073
+ {
2074
+ name: "Plus",
2075
+ fill: "#757575",
2076
+ width: 20,
2077
+ height: 20
2078
+ }
2079
+ )
2080
+ }
2081
+ ),
2082
+ /* @__PURE__ */ t.jsx("div", { className: k.delete, children: /* @__PURE__ */ t.jsx(
2083
+ I,
2084
+ {
2085
+ name: "Trash",
2086
+ fill: "var(--text-action)",
2087
+ width: 20,
2088
+ height: 20,
2089
+ onClick: () => l(i),
2090
+ hoverable: !0
2091
+ }
2092
+ ) })
1923
2093
  ] })
1924
- ] }),
1925
- /* @__PURE__ */ t.jsxs("div", { className: k.productButtons, children: [
1926
- /* @__PURE__ */ t.jsx(
1927
- E,
1928
- {
1929
- type: "Secondary",
1930
- onClick: () => {
1931
- n.quantity !== 1 && m(n);
1932
- },
1933
- className: k.productButton,
1934
- disabled: n.quantity === 1,
1935
- children: /* @__PURE__ */ t.jsx(
1936
- b,
1937
- {
1938
- name: "Minus",
1939
- fill: "#757575",
1940
- width: 20,
1941
- height: 20
1942
- }
1943
- )
1944
- }
1945
- ),
1946
- /* @__PURE__ */ t.jsx("div", { className: k.productCount, children: n.quantity }),
1947
- /* @__PURE__ */ t.jsx(
1948
- E,
1949
- {
1950
- type: "Secondary",
1951
- onClick: () => _(n),
1952
- className: k.productButton,
1953
- disabled: n.quantity === n.variants.find((o) => o.id === n.activeVariantId).quantity.available,
1954
- children: /* @__PURE__ */ t.jsx(
1955
- b,
1956
- {
1957
- name: "Plus",
1958
- fill: "#757575",
1959
- width: 20,
1960
- height: 20
1961
- }
1962
- )
1963
- }
1964
- )
1965
- ] })
1966
- ]
1967
- },
1968
- n.id
1969
- )) }),
2094
+ ]
2095
+ },
2096
+ i.id
2097
+ );
2098
+ }) }),
1970
2099
  /* @__PURE__ */ t.jsxs("div", { className: k.bottom, children: [
1971
2100
  /* @__PURE__ */ t.jsxs("div", { className: k.subtotal, children: [
1972
2101
  /* @__PURE__ */ t.jsxs("div", { className: k.block, children: [
1973
2102
  /* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
1974
2103
  /* @__PURE__ */ t.jsx(
1975
- b,
2104
+ I,
1976
2105
  {
1977
2106
  name: "Info",
1978
2107
  width: 20,
@@ -1982,26 +2111,26 @@ const ns = (h) => {
1982
2111
  )
1983
2112
  ] }),
1984
2113
  /* @__PURE__ */ t.jsx("div", { className: k.total, children: Q({
1985
- amount: f().total,
1986
- currency: r.parts.length > 0 && ((l = (d = i.find((n) => n.id === r.parts[0].productId)) == null ? void 0 : d.variants.find((n) => n.id === r.parts[0].productVariantId)) == null ? void 0 : l.price.currency) || "USD"
2114
+ amount: x().total,
2115
+ currency: r.parts.length > 0 && ((c = (g = n.find((i) => i.id === r.parts[0].productId)) == null ? void 0 : g.variants.find((i) => i.id === r.parts[0].productVariantId)) == null ? void 0 : c.price.currency) || "USD"
1987
2116
  }) })
1988
2117
  ] }),
1989
- /* @__PURE__ */ t.jsx(E, { onClick: () => T("/checkout", !1), children: "Checkout" })
2118
+ /* @__PURE__ */ t.jsx(R, { onClick: () => j("/checkout", !1), children: "Checkout" })
1990
2119
  ] })
1991
- ] }) : /* @__PURE__ */ t.jsx(Rs, {})
2120
+ ] }) : /* @__PURE__ */ t.jsx(Ls, {})
1992
2121
  ]
1993
2122
  }
1994
2123
  );
1995
- }, Rs = () => /* @__PURE__ */ t.jsxs("div", { className: k.empty, children: [
2124
+ }, Ls = () => /* @__PURE__ */ t.jsxs("div", { className: k.empty, children: [
1996
2125
  /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1997
- b,
2126
+ I,
1998
2127
  {
1999
2128
  name: "Handbag",
2000
2129
  fill: "var(--text-secondary)"
2001
2130
  }
2002
2131
  ) }),
2003
- /* @__PURE__ */ t.jsx("span", { children: "Empty Cart" }),
2004
- /* @__PURE__ */ t.jsxs("span", { children: [
2132
+ /* @__PURE__ */ t.jsx("span", { id: "h5", children: "Empty Cart" }),
2133
+ /* @__PURE__ */ t.jsxs("span", { id: "md", children: [
2005
2134
  "You don’t have any items in your shopping cart yet,",
2006
2135
  " ",
2007
2136
  /* @__PURE__ */ t.jsx(
@@ -2009,38 +2138,39 @@ const ns = (h) => {
2009
2138
  {
2010
2139
  href: "/products",
2011
2140
  className: k.link,
2141
+ id: "md",
2012
2142
  children: "view products"
2013
2143
  }
2014
2144
  )
2015
2145
  ] })
2016
- ] }), Ot = ({ signUp: h, close: i }) => {
2017
- const { token: a } = Lt(), s = St(), [e, r] = x.useState("test-email@gmail.com");
2018
- x.useEffect(() => {
2146
+ ] }), $t = ({ signUp: h, close: n }) => {
2147
+ const { token: a } = Ut(), s = St(), [e, r] = y.useState("test-email@gmail.com");
2148
+ y.useEffect(() => {
2019
2149
  a && (async () => {
2020
2150
  if (!a) return;
2021
- const j = Ut(a);
2022
- r(j.email);
2151
+ const v = zt(a);
2152
+ r(v.email);
2023
2153
  })();
2024
2154
  }, [a]);
2025
- function c(f) {
2026
- window.location.pathname.includes("/admin/builder") || s(f);
2155
+ function o(x) {
2156
+ window.location.pathname.includes("/admin/builder") || s(x);
2027
2157
  }
2028
2158
  return a ? /* @__PURE__ */ t.jsx(
2029
- E,
2159
+ R,
2030
2160
  {
2031
2161
  type: "Secondary",
2032
2162
  className: k.userInfo,
2033
2163
  onClick: () => {
2034
- c("/customer-dash"), i == null || i();
2164
+ o("/customer-dash"), n == null || n();
2035
2165
  },
2036
2166
  children: /* @__PURE__ */ t.jsx("div", { children: e || "test-email@gmail.com" })
2037
2167
  }
2038
2168
  ) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2039
2169
  /* @__PURE__ */ t.jsx(
2040
- E,
2170
+ R,
2041
2171
  {
2042
2172
  onClick: () => {
2043
- c("/customer-dash"), i == null || i();
2173
+ o("/customer-dash"), n == null || n();
2044
2174
  },
2045
2175
  type: "Secondary",
2046
2176
  style: {
@@ -2050,10 +2180,10 @@ const ns = (h) => {
2050
2180
  }
2051
2181
  ),
2052
2182
  h && /* @__PURE__ */ t.jsx(
2053
- E,
2183
+ R,
2054
2184
  {
2055
2185
  onClick: () => {
2056
- c("/customer-dash"), i == null || i();
2186
+ o("/customer-dash"), n == null || n();
2057
2187
  },
2058
2188
  type: "Primary",
2059
2189
  style: {
@@ -2064,35 +2194,35 @@ const ns = (h) => {
2064
2194
  }
2065
2195
  )
2066
2196
  ] });
2067
- }, Ls = ({
2197
+ }, Us = ({
2068
2198
  logo: h,
2069
- setIsOpen: i,
2199
+ setIsOpen: n,
2070
2200
  signUp: a,
2071
2201
  pages: s
2072
2202
  }) => {
2073
- const { setIsOpen: e } = ct(), r = () => {
2203
+ const { setIsOpen: e } = rt(), r = () => {
2074
2204
  e(!1), setTimeout(() => {
2075
- i(!1), e(!0);
2205
+ n(!1), e(!0);
2076
2206
  }, 300);
2077
2207
  };
2078
2208
  return /* @__PURE__ */ t.jsxs(
2079
2209
  "div",
2080
2210
  {
2081
2211
  className: k.pagesMobileModal,
2082
- onClick: (c) => c.stopPropagation(),
2212
+ onClick: (o) => o.stopPropagation(),
2083
2213
  children: [
2084
2214
  /* @__PURE__ */ t.jsxs("div", { className: k.pagesMobileModalHeader, children: [
2085
2215
  /* @__PURE__ */ t.jsx("div", { children: h }),
2086
2216
  /* @__PURE__ */ t.jsx(
2087
- E,
2217
+ R,
2088
2218
  {
2089
2219
  type: "Secondary",
2090
2220
  onClick: r,
2091
- children: /* @__PURE__ */ t.jsx(b, { name: "X" })
2221
+ children: /* @__PURE__ */ t.jsx(I, { name: "X" })
2092
2222
  }
2093
2223
  )
2094
2224
  ] }),
2095
- /* @__PURE__ */ t.jsx("div", { className: k.pagesMobileModalContent, children: s.length > 0 && s.map((c) => /* @__PURE__ */ t.jsx(
2225
+ /* @__PURE__ */ t.jsx("div", { className: k.pagesMobileModalContent, children: s.length > 0 && s.map((o) => /* @__PURE__ */ t.jsx(
2096
2226
  "div",
2097
2227
  {
2098
2228
  className: k.pageLink,
@@ -2100,15 +2230,15 @@ const ns = (h) => {
2100
2230
  children: /* @__PURE__ */ t.jsx(
2101
2231
  Tt,
2102
2232
  {
2103
- path: c.path,
2104
- children: c.name["en-US"]
2233
+ path: o.path,
2234
+ children: o.name["en-US"]
2105
2235
  },
2106
- c.id
2236
+ o.id
2107
2237
  )
2108
2238
  }
2109
2239
  )) }),
2110
2240
  /* @__PURE__ */ t.jsx("div", { className: k.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(
2111
- Ot,
2241
+ $t,
2112
2242
  {
2113
2243
  signUp: a,
2114
2244
  close: r
@@ -2117,59 +2247,59 @@ const ns = (h) => {
2117
2247
  ]
2118
2248
  }
2119
2249
  );
2120
- }, Fn = ({ logo: h, signUp: i, pages: a }) => {
2121
- const [s, e] = x.useState(!1);
2250
+ }, Vn = ({ logo: h, signUp: n, pages: a }) => {
2251
+ const [s, e] = y.useState(!1);
2122
2252
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2123
- /* @__PURE__ */ t.jsx(Us, { setIsOpenModal: e }),
2253
+ /* @__PURE__ */ t.jsx(zs, { setIsOpenModal: e }),
2124
2254
  s && /* @__PURE__ */ t.jsx(
2125
2255
  ut,
2126
2256
  {
2127
2257
  close: () => e(!1),
2128
2258
  hasPadding: !1,
2129
2259
  children: /* @__PURE__ */ t.jsx(
2130
- Ls,
2260
+ Us,
2131
2261
  {
2132
2262
  logo: h,
2133
2263
  setIsOpen: e,
2134
- signUp: i,
2264
+ signUp: n,
2135
2265
  pages: a
2136
2266
  }
2137
2267
  )
2138
2268
  }
2139
2269
  )
2140
2270
  ] });
2141
- }, Us = (h) => {
2142
- const { setIsOpenModal: i } = h;
2271
+ }, zs = (h) => {
2272
+ const { setIsOpenModal: n } = h;
2143
2273
  return /* @__PURE__ */ t.jsx(
2144
- E,
2274
+ R,
2145
2275
  {
2146
2276
  type: "Secondary",
2147
2277
  style: {
2148
2278
  padding: 10
2149
2279
  },
2150
2280
  onClick: (a) => {
2151
- a.stopPropagation(), window.location.pathname.includes("/admin/builder") || i(!0);
2281
+ a.stopPropagation(), window.location.pathname.includes("/admin/builder") || n(!0);
2152
2282
  },
2153
- children: /* @__PURE__ */ t.jsx(b, { name: "List" })
2283
+ children: /* @__PURE__ */ t.jsx(I, { name: "List" })
2154
2284
  }
2155
2285
  );
2156
- }, Hs = "_share_onabp_1", Fs = "_modal_onabp_8", Vs = "_header_onabp_20", Ys = "_title_onabp_46", Gs = "_copyWrapper_onabp_53", Ws = "_copyText_onabp_62", Xs = "_copyTextMobile_onabp_75", Qs = "_copyTextMiniMobile_onabp_94", nt = {
2157
- share: Hs,
2158
- modal: Fs,
2286
+ }, Fs = "_share_onabp_1", Hs = "_modal_onabp_8", Vs = "_header_onabp_20", Ys = "_title_onabp_46", Gs = "_copyWrapper_onabp_53", Ws = "_copyText_onabp_62", Xs = "_copyTextMobile_onabp_75", Qs = "_copyTextMiniMobile_onabp_94", nt = {
2287
+ share: Fs,
2288
+ modal: Hs,
2159
2289
  header: Vs,
2160
2290
  title: Ys,
2161
2291
  copyWrapper: Gs,
2162
2292
  copyText: Ws,
2163
2293
  copyTextMobile: Xs,
2164
2294
  copyTextMiniMobile: Qs
2165
- }, Vn = ({ title: h = "Copy Product Link" }) => {
2166
- const { isOpenModal: i, setIsOpenModal: a } = Mt();
2295
+ }, Yn = ({ title: h = "Copy Product Link" }) => {
2296
+ const { isOpenModal: n, setIsOpenModal: a } = Mt();
2167
2297
  function s() {
2168
2298
  a(!0);
2169
2299
  }
2170
2300
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2171
2301
  /* @__PURE__ */ t.jsx(
2172
- E,
2302
+ R,
2173
2303
  {
2174
2304
  className: nt.share,
2175
2305
  onClick: (e) => {
@@ -2177,7 +2307,7 @@ const ns = (h) => {
2177
2307
  },
2178
2308
  type: "Secondary",
2179
2309
  children: /* @__PURE__ */ t.jsx(
2180
- b,
2310
+ I,
2181
2311
  {
2182
2312
  name: "Share",
2183
2313
  fill: "#757575",
@@ -2186,11 +2316,11 @@ const ns = (h) => {
2186
2316
  )
2187
2317
  }
2188
2318
  ),
2189
- i && /* @__PURE__ */ t.jsx(ut, { close: a, children: /* @__PURE__ */ t.jsx(Js, { title: h }) })
2319
+ n && /* @__PURE__ */ t.jsx(ut, { close: a, children: /* @__PURE__ */ t.jsx(Js, { title: h }) })
2190
2320
  ] });
2191
2321
  }, Js = ({ title: h = "Copy Product Link" }) => {
2192
- const { setIsOpenModal: i } = Mt(), { notifications: a, setNotifications: s } = Ct(), { setIsOpen: e } = ct(), r = window.location.href;
2193
- function c() {
2322
+ const { setIsOpenModal: n } = Mt(), { notifications: a, setNotifications: s } = Ct(), { setIsOpen: e } = rt(), r = window.location.href;
2323
+ function o() {
2194
2324
  navigator.clipboard.writeText(r), s([
2195
2325
  ...a,
2196
2326
  {
@@ -2200,134 +2330,163 @@ const ns = (h) => {
2200
2330
  }
2201
2331
  ]);
2202
2332
  }
2203
- function f() {
2333
+ function x() {
2204
2334
  e(!1), setTimeout(() => {
2205
- i(!1), e(!0);
2335
+ n(!1), e(!0);
2206
2336
  }, 300);
2207
2337
  }
2208
- function j(v, T) {
2209
- return v.length > T ? v.slice(0, T) + "..." : v;
2338
+ function v(b, M) {
2339
+ return b.length > M ? b.slice(0, M) + "..." : b;
2210
2340
  }
2211
2341
  return /* @__PURE__ */ t.jsxs(
2212
2342
  "div",
2213
2343
  {
2214
2344
  className: nt.modal,
2215
- onClick: (v) => v.stopPropagation(),
2345
+ onClick: (b) => b.stopPropagation(),
2216
2346
  children: [
2217
2347
  /* @__PURE__ */ t.jsxs("div", { className: nt.header, children: [
2218
- /* @__PURE__ */ t.jsx("div", { className: nt.title, children: h }),
2219
2348
  /* @__PURE__ */ t.jsx(
2220
- b,
2349
+ "div",
2350
+ {
2351
+ className: nt.title,
2352
+ id: "h4",
2353
+ children: h
2354
+ }
2355
+ ),
2356
+ /* @__PURE__ */ t.jsx(
2357
+ I,
2221
2358
  {
2222
2359
  name: "X",
2223
2360
  fill: "#757575",
2224
- onClick: f,
2361
+ onClick: x,
2225
2362
  hoverable: !0
2226
2363
  }
2227
2364
  )
2228
2365
  ] }),
2229
2366
  /* @__PURE__ */ t.jsxs("div", { className: nt.copyWrapper, children: [
2230
2367
  /* @__PURE__ */ t.jsxs(
2231
- E,
2368
+ R,
2232
2369
  {
2233
2370
  type: "Secondary",
2234
- onClick: c,
2371
+ onClick: o,
2235
2372
  style: {
2236
2373
  flex: 1
2237
2374
  },
2238
2375
  children: [
2239
- /* @__PURE__ */ t.jsx("div", { className: nt.copyText, children: j(r, 100) }),
2240
- /* @__PURE__ */ t.jsx("div", { className: nt.copyTextMobile, children: j(r, 40) }),
2241
- /* @__PURE__ */ t.jsx("div", { className: nt.copyTextMiniMobile, children: j(r, 20) })
2376
+ /* @__PURE__ */ t.jsx(
2377
+ "div",
2378
+ {
2379
+ className: nt.copyText,
2380
+ id: "md",
2381
+ children: v(r, 100)
2382
+ }
2383
+ ),
2384
+ /* @__PURE__ */ t.jsx(
2385
+ "div",
2386
+ {
2387
+ className: nt.copyTextMobile,
2388
+ id: "md",
2389
+ children: v(r, 40)
2390
+ }
2391
+ ),
2392
+ /* @__PURE__ */ t.jsx(
2393
+ "div",
2394
+ {
2395
+ className: nt.copyTextMiniMobile,
2396
+ id: "md",
2397
+ children: v(r, 20)
2398
+ }
2399
+ )
2242
2400
  ]
2243
2401
  }
2244
2402
  ),
2245
2403
  /* @__PURE__ */ t.jsx(
2246
- E,
2404
+ R,
2247
2405
  {
2248
2406
  type: "Secondary",
2249
- onClick: c,
2407
+ onClick: o,
2250
2408
  children: a.find(
2251
- (v) => v.message === "Link copied to clipboard"
2252
- ) ? /* @__PURE__ */ t.jsx(b, { name: "Check" }) : /* @__PURE__ */ t.jsx(b, { name: "Copy" })
2409
+ (b) => b.message === "Link copied to clipboard"
2410
+ ) ? /* @__PURE__ */ t.jsx(I, { name: "Check" }) : /* @__PURE__ */ t.jsx(I, { name: "Copy" })
2253
2411
  }
2254
2412
  )
2255
2413
  ] })
2256
2414
  ]
2257
2415
  }
2258
2416
  );
2259
- }, Ks = "_accordion_1to77_1", Zs = "_header_1to77_9", tn = "_icon_1to77_18", en = "_open_1to77_21", sn = "_content_1to77_25", rt = {
2417
+ }, Ks = "_accordion_mdmvg_1", Zs = "_header_mdmvg_12", tn = "_icon_mdmvg_21", en = "_open_mdmvg_24", sn = "_content_mdmvg_28", nn = "_contentOpen_mdmvg_36", ot = {
2260
2418
  accordion: Ks,
2261
2419
  header: Zs,
2262
2420
  icon: tn,
2263
2421
  open: en,
2264
- content: sn
2265
- }, Yn = ({ title: h, content: i, defaultOpen: a = !1 }) => {
2266
- const [s, e] = x.useState(a), [r, c] = x.useState(0), f = x.useRef(null), j = () => {
2422
+ content: sn,
2423
+ contentOpen: nn
2424
+ }, Gn = ({ title: h, content: n, defaultOpen: a = !1 }) => {
2425
+ const [s, e] = y.useState(a), [r, o] = y.useState(0), x = y.useRef(null), v = () => {
2267
2426
  e(!s);
2268
2427
  };
2269
- return x.useEffect(() => {
2270
- f.current && c(s ? f.current.scrollHeight : 0);
2271
- }, [s]), /* @__PURE__ */ t.jsxs("div", { className: rt.accordion, children: [
2428
+ return y.useEffect(() => {
2429
+ x.current && o(s ? x.current.scrollHeight + 30 : 0);
2430
+ }, [s]), /* @__PURE__ */ t.jsxs("div", { className: ot.accordion, children: [
2272
2431
  /* @__PURE__ */ t.jsxs(
2273
2432
  "div",
2274
2433
  {
2275
- className: rt.header,
2276
- onClick: j,
2434
+ className: ot.header,
2435
+ onClick: v,
2277
2436
  children: [
2278
2437
  /* @__PURE__ */ t.jsx("h5", { id: "h5", children: h }),
2279
- /* @__PURE__ */ t.jsx("div", { className: F(rt.icon, { [rt.open]: s }), children: /* @__PURE__ */ t.jsx(b, { name: "CaretDown" }) })
2438
+ /* @__PURE__ */ t.jsx("div", { className: H(ot.icon, { [ot.open]: s }), children: /* @__PURE__ */ t.jsx(I, { name: "CaretDown" }) })
2280
2439
  ]
2281
2440
  }
2282
2441
  ),
2283
2442
  /* @__PURE__ */ t.jsx(
2284
2443
  "div",
2285
2444
  {
2286
- ref: f,
2287
- className: rt.content,
2445
+ ref: x,
2446
+ className: H(ot.content, { [ot.contentOpen]: s }),
2288
2447
  style: { height: `${r}px` },
2289
- children: /* @__PURE__ */ t.jsx("p", { id: "p", children: i })
2448
+ children: /* @__PURE__ */ t.jsx("p", { id: "md", children: n })
2290
2449
  }
2291
2450
  )
2292
2451
  ] });
2293
- }, nn = "_buttonsBlock_1b2rb_1", an = {
2294
- buttonsBlock: nn
2295
- }, Gn = (h) => {
2296
- var v, T;
2297
- const { setIsOpen: i, setModalType: a, productId: s } = h, { cart: e } = ot(), { pageContext: r } = yt(), c = (v = r == null ? void 0 : r.listings) == null ? void 0 : v.find((_) => _.id === s);
2298
- if (!c)
2452
+ }, an = "_buttonsBlock_1b2rb_1", on = {
2453
+ buttonsBlock: an
2454
+ }, Wn = (h) => {
2455
+ var b, M;
2456
+ const { setIsOpen: n, setModalType: a, productId: s } = h, { cart: e } = ct(), { pageContext: r } = vt(), o = (b = r == null ? void 0 : r.listings) == null ? void 0 : b.find((j) => j.id === s);
2457
+ if (!o)
2299
2458
  return null;
2300
- const f = (T = r == null ? void 0 : r.products) == null ? void 0 : T.find(
2301
- (_) => _.uniquePath === c.productData.uniquePath
2459
+ const x = (M = r == null ? void 0 : r.products) == null ? void 0 : M.find(
2460
+ (j) => j.uniquePath === o.productData.uniquePath
2302
2461
  );
2303
- if (!f)
2462
+ if (!x)
2304
2463
  return null;
2305
- const j = e.parts.find((_) => _.productId === f.id);
2464
+ const v = e.parts.find((j) => j.productId === x.id);
2306
2465
  return /* @__PURE__ */ t.jsxs(
2307
2466
  "div",
2308
2467
  {
2309
- className: an.buttonsBlock,
2310
- onClick: (_) => _.stopPropagation(),
2468
+ className: on.buttonsBlock,
2469
+ onClick: (j) => j.stopPropagation(),
2311
2470
  children: [
2312
2471
  /* @__PURE__ */ t.jsx(
2313
- E,
2472
+ R,
2314
2473
  {
2315
2474
  type: "Secondary",
2316
2475
  style: {
2317
2476
  width: "100%"
2318
2477
  },
2319
2478
  onClick: () => {
2320
- a("Add To Cart"), i(!0);
2479
+ a("Add To Cart"), n(!0);
2321
2480
  },
2322
- children: j ? "Add More" : "Add To Cart"
2481
+ children: v ? "Add More" : "Add To Cart"
2323
2482
  }
2324
2483
  ),
2325
2484
  /* @__PURE__ */ t.jsx(
2326
- E,
2485
+ R,
2327
2486
  {
2328
2487
  type: "Primary",
2329
2488
  onClick: () => {
2330
- a("Buy Now"), i(!0);
2489
+ a("Buy Now"), n(!0);
2331
2490
  },
2332
2491
  children: "Buy"
2333
2492
  }
@@ -2335,13 +2494,13 @@ const ns = (h) => {
2335
2494
  ]
2336
2495
  }
2337
2496
  );
2338
- }, on = "_wrapper_27wzz_1", cn = "_logo_27wzz_8", rn = "_info_27wzz_12", It = {
2339
- wrapper: on,
2340
- logo: cn,
2341
- info: rn
2342
- }, Wn = ({ date: h }) => {
2343
- const { general: i } = Ht();
2344
- if (!i) return /* @__PURE__ */ t.jsx(t.Fragment, {});
2497
+ }, cn = "_wrapper_27wzz_1", rn = "_logo_27wzz_8", ln = "_info_27wzz_12", It = {
2498
+ wrapper: cn,
2499
+ logo: rn,
2500
+ info: ln
2501
+ }, Xn = ({ date: h }) => {
2502
+ const { general: n } = Ft();
2503
+ if (!n) return /* @__PURE__ */ t.jsx(t.Fragment, {});
2345
2504
  function a(s) {
2346
2505
  const e = new Date(s), r = {
2347
2506
  month: "short",
@@ -2354,15 +2513,15 @@ const ns = (h) => {
2354
2513
  return e.toLocaleDateString("en-US", r);
2355
2514
  }
2356
2515
  return /* @__PURE__ */ t.jsxs("div", { className: It.wrapper, children: [
2357
- /* @__PURE__ */ t.jsx("div", { className: It.logo, children: i.info.logo ? /* @__PURE__ */ t.jsx(
2516
+ /* @__PURE__ */ t.jsx("div", { className: It.logo, children: n.info.logo ? /* @__PURE__ */ t.jsx(
2358
2517
  "img",
2359
2518
  {
2360
- src: `https://imagedelivery.net/${i.info.logo.cfId}/w=500,h=500`,
2519
+ src: `https://imagedelivery.net/${n.info.logo.cfId}/w=500,h=500`,
2361
2520
  alt: "image",
2362
2521
  style: { objectFit: "contain", width: "48px", height: "48px" }
2363
2522
  }
2364
2523
  ) : /* @__PURE__ */ t.jsx(
2365
- b,
2524
+ I,
2366
2525
  {
2367
2526
  name: "Image",
2368
2527
  width: 48,
@@ -2370,37 +2529,37 @@ const ns = (h) => {
2370
2529
  }
2371
2530
  ) }),
2372
2531
  /* @__PURE__ */ t.jsxs("div", { className: It.info, children: [
2373
- /* @__PURE__ */ t.jsx("h3", { id: "h4", children: i.info.name }),
2532
+ /* @__PURE__ */ t.jsx("h3", { id: "h4", children: n.info.name }),
2374
2533
  /* @__PURE__ */ t.jsx("p", { id: "p", children: a(h) })
2375
2534
  ] })
2376
2535
  ] });
2377
- }, ln = "_variants_hphv8_80", dn = "_variant_hphv8_80", un = "_stock_hphv8_98", hn = "_variantInfo_hphv8_105", pn = "_title_hphv8_199", mn = "_modal_hphv8_205", gn = "_header_hphv8_225", fn = "_productOptions_hphv8_233", xn = "_loading_hphv8_237", tt = {
2378
- variants: ln,
2379
- variant: dn,
2380
- stock: un,
2381
- variantInfo: hn,
2382
- title: pn,
2383
- modal: mn,
2384
- header: gn,
2385
- productOptions: fn,
2386
- loading: xn
2387
- }, Xn = (h) => {
2536
+ }, dn = "_variants_pwm2c_82", un = "_variant_pwm2c_82", hn = "_stock_pwm2c_100", pn = "_variantInfo_pwm2c_107", mn = "_title_pwm2c_201", gn = "_modal_pwm2c_207", fn = "_header_pwm2c_227", xn = "_productOptions_pwm2c_235", _n = "_loading_pwm2c_239", tt = {
2537
+ variants: dn,
2538
+ variant: un,
2539
+ stock: hn,
2540
+ variantInfo: pn,
2541
+ title: mn,
2542
+ modal: gn,
2543
+ header: fn,
2544
+ productOptions: xn,
2545
+ loading: _n
2546
+ }, Qn = (h) => {
2388
2547
  var m;
2389
- const { pageContext: i } = yt(), a = (m = i == null ? void 0 : i.listings) == null ? void 0 : m.find((d) => d.id === h.productId), [s, e] = x.useState(!0), [r, c] = x.useState(null), f = (r == null ? void 0 : r.variants[0]) || null, [j, v] = x.useState(
2548
+ const { pageContext: n } = vt(), a = (m = n == null ? void 0 : n.listings) == null ? void 0 : m.find((d) => d.id === h.productId), [s, e] = y.useState(!0), [r, o] = y.useState(null), x = (r == null ? void 0 : r.variants[0]) || null, [v, b] = y.useState(
2390
2549
  "ONE_TIME"
2391
- ), { addProducts: T } = ot(), { setIsOpen: _ } = ct();
2392
- return x.useEffect(() => {
2550
+ ), { addProducts: M } = ct(), { setIsOpen: j } = rt();
2551
+ return y.useEffect(() => {
2393
2552
  (async () => {
2394
2553
  e(!0);
2395
- const l = await Ft(
2554
+ const l = await Ht(
2396
2555
  encodeURIComponent(
2397
2556
  `/product/${a.productData.uniquePath}`
2398
2557
  )
2399
2558
  );
2400
- T(l == null ? void 0 : l.data.products), c(l == null ? void 0 : l.data.products[0]), e(!1);
2559
+ M(l == null ? void 0 : l.data.products), o(l == null ? void 0 : l.data.products[0]), e(!1);
2401
2560
  })();
2402
- }, []), x.useEffect(() => {
2403
- _(!0);
2561
+ }, []), y.useEffect(() => {
2562
+ j(!0);
2404
2563
  }, []), /* @__PURE__ */ t.jsx(ut, { close: h.setIsOpen, children: /* @__PURE__ */ t.jsxs(
2405
2564
  "div",
2406
2565
  {
@@ -2408,13 +2567,13 @@ const ns = (h) => {
2408
2567
  onClick: (d) => d.stopPropagation(),
2409
2568
  children: [
2410
2569
  s && /* @__PURE__ */ t.jsx("div", { className: tt.loading, children: /* @__PURE__ */ t.jsx(Bt, {}) }),
2411
- h.type === "Add To Cart" && r && f && !s && /* @__PURE__ */ t.jsx(
2412
- _n,
2570
+ h.type === "Add To Cart" && r && x && !s && /* @__PURE__ */ t.jsx(
2571
+ yn,
2413
2572
  {
2414
2573
  variants: r.variants,
2415
- activeVariant: f,
2416
- activeChargeType: j,
2417
- setActiveChargeType: v,
2574
+ activeVariant: x,
2575
+ activeChargeType: v,
2576
+ setActiveChargeType: b,
2418
2577
  productId: r.id,
2419
2578
  setIsOpen: h.setIsOpen
2420
2579
  }
@@ -2429,52 +2588,52 @@ const ns = (h) => {
2429
2588
  ]
2430
2589
  }
2431
2590
  ) });
2432
- }, _n = (h) => {
2433
- const { variants: i, activeChargeType: a, productId: s, setIsOpen: e } = h, { cart: r, addProductToCart: c, addProducts: f, updateQuantityOfProduct: j } = ot(), { notifications: v, setNotifications: T } = Ct(), { pageContext: _ } = yt(), { setIsOpen: m } = ct(), d = () => {
2591
+ }, yn = (h) => {
2592
+ const { variants: n, activeChargeType: a, productId: s, setIsOpen: e } = h, { cart: r, addProductToCart: o, addProducts: x, updateQuantityOfProduct: v } = ct(), { notifications: b, setNotifications: M } = Ct(), { pageContext: j } = vt(), { setIsOpen: m } = rt(), d = () => {
2434
2593
  m(!1), setTimeout(() => {
2435
2594
  e(!1);
2436
2595
  }, 300);
2437
2596
  };
2438
- async function l(n) {
2439
- const o = i.find((M) => M.id === n), C = r.parts.find(
2440
- (M) => M.productId === h.productId && M.productVariantId === n
2597
+ async function l(g) {
2598
+ const c = n.find((S) => S.id === g), i = r.parts.find(
2599
+ (S) => S.productId === h.productId && S.productVariantId === g
2441
2600
  );
2442
- if ((o == null ? void 0 : o.quantity.available) && (o == null ? void 0 : o.quantity.restrictions) && ((C == null ? void 0 : C.quantity) || 0) + 1 > (o == null ? void 0 : o.quantity.restrictions.max) || (o == null ? void 0 : o.quantity.available) === 0 || (o == null ? void 0 : o.quantity.available) && ((C == null ? void 0 : C.quantity) || 0) + 1 > (o == null ? void 0 : o.quantity.available)) {
2443
- T([
2444
- ...v,
2601
+ if ((c == null ? void 0 : c.quantity.available) && (c == null ? void 0 : c.quantity.restrictions) && ((i == null ? void 0 : i.quantity) || 0) + 1 > (c == null ? void 0 : c.quantity.restrictions.max) || (c == null ? void 0 : c.quantity.available) === 0 || (c == null ? void 0 : c.quantity.available) && ((i == null ? void 0 : i.quantity) || 0) + 1 > (c == null ? void 0 : c.quantity.available)) {
2602
+ M([
2603
+ ...b,
2445
2604
  { id: J(), message: "Product is out of stock", status: "error" }
2446
2605
  ]);
2447
2606
  return;
2448
2607
  }
2449
- if (C)
2450
- j({
2608
+ if (i)
2609
+ v({
2451
2610
  productId: s,
2452
- productVariantId: n,
2453
- quantity: C.quantity + 1,
2611
+ productVariantId: g,
2612
+ quantity: i.quantity + 1,
2454
2613
  chargeType: a
2455
2614
  });
2456
2615
  else {
2457
- _ != null && _.products && f(_.products);
2616
+ j != null && j.products && x(j.products);
2458
2617
  try {
2459
- c({
2618
+ o({
2460
2619
  productId: s,
2461
- productVariantId: n,
2620
+ productVariantId: g,
2462
2621
  quantity: 1,
2463
2622
  chargeType: a
2464
- }), T([
2465
- ...v,
2623
+ }), M([
2624
+ ...b,
2466
2625
  {
2467
2626
  id: J(),
2468
2627
  message: "Product added to cart",
2469
2628
  status: "success"
2470
2629
  }
2471
2630
  ]);
2472
- } catch (M) {
2473
- T([
2474
- ...v,
2631
+ } catch (S) {
2632
+ M([
2633
+ ...b,
2475
2634
  {
2476
2635
  id: J(),
2477
- message: `Product failed to add to cart: ${M}`,
2636
+ message: `Product failed to add to cart: ${S}`,
2478
2637
  status: "error"
2479
2638
  }
2480
2639
  ]);
@@ -2485,7 +2644,7 @@ const ns = (h) => {
2485
2644
  /* @__PURE__ */ t.jsxs("div", { className: tt.header, children: [
2486
2645
  /* @__PURE__ */ t.jsx("div", { id: "h3", children: "Choose a Variant" }),
2487
2646
  /* @__PURE__ */ t.jsx(
2488
- b,
2647
+ I,
2489
2648
  {
2490
2649
  name: "X",
2491
2650
  width: 24,
@@ -2496,39 +2655,53 @@ const ns = (h) => {
2496
2655
  }
2497
2656
  )
2498
2657
  ] }),
2499
- /* @__PURE__ */ t.jsx("div", { className: tt.variants, children: i.filter((n) => {
2500
- var o;
2501
- return (o = n.chargeTypes) == null ? void 0 : o.includes(a);
2502
- }).map((n) => {
2503
- var o, C, y;
2658
+ /* @__PURE__ */ t.jsx("div", { className: tt.variants, children: n.filter((g) => {
2659
+ var c;
2660
+ return (c = g.chargeTypes) == null ? void 0 : c.includes(a);
2661
+ }).map((g) => {
2662
+ var c, i, _;
2504
2663
  return /* @__PURE__ */ t.jsxs(
2505
2664
  "div",
2506
2665
  {
2507
- className: F(tt.variant),
2666
+ className: H(tt.variant),
2508
2667
  onClick: () => {
2509
- l(n.id), e(!1);
2668
+ l(g.id), e(!1);
2510
2669
  },
2511
2670
  children: [
2512
2671
  /* @__PURE__ */ t.jsxs("div", { className: tt.variantInfo, children: [
2513
- /* @__PURE__ */ t.jsx("span", { className: tt.title, children: n.name }),
2514
- /* @__PURE__ */ t.jsx("span", { children: Q({
2515
- amount: a === "ONE_TIME" ? n.price.amount : n.subscriptionSettings ? n.subscriptionSettings.price.amount : 0,
2516
- currency: a === "ONE_TIME" ? n.price.currency : ((o = n.subscriptionSettings) == null ? void 0 : o.price.currency) || "USD"
2672
+ /* @__PURE__ */ t.jsx(
2673
+ "span",
2674
+ {
2675
+ className: tt.title,
2676
+ id: "h4",
2677
+ children: g.name
2678
+ }
2679
+ ),
2680
+ /* @__PURE__ */ t.jsx("span", { id: "md", children: Q({
2681
+ amount: a === "ONE_TIME" ? g.price.amount : g.subscriptionSettings ? g.subscriptionSettings.price.amount : 0,
2682
+ currency: a === "ONE_TIME" ? g.price.currency : ((c = g.subscriptionSettings) == null ? void 0 : c.price.currency) || "USD"
2517
2683
  }) })
2518
2684
  ] }),
2519
- /* @__PURE__ */ t.jsx("div", { children: a === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: tt.stock, children: [
2520
- (C = n.quantity.restrictions) != null && C.max || n.quantity.available !== void 0 ? ((y = n.quantity.restrictions) == null ? void 0 : y.max) || n.quantity.available : "",
2521
- " ",
2522
- "in stock"
2523
- ] }) })
2685
+ /* @__PURE__ */ t.jsx("div", { id: "md", children: a === "ONE_TIME" && /* @__PURE__ */ t.jsxs(
2686
+ "span",
2687
+ {
2688
+ className: tt.stock,
2689
+ id: "md",
2690
+ children: [
2691
+ (i = g.quantity.restrictions) != null && i.max || g.quantity.available !== void 0 ? ((_ = g.quantity.restrictions) == null ? void 0 : _.max) || g.quantity.available : "∞",
2692
+ " ",
2693
+ "in stock"
2694
+ ]
2695
+ }
2696
+ ) })
2524
2697
  ]
2525
2698
  },
2526
- n.id
2699
+ g.id
2527
2700
  );
2528
2701
  }) })
2529
2702
  ] });
2530
2703
  }, jn = (h) => {
2531
- const { product: i, setIsOpen: a } = h, { setIsOpen: s } = ct(), e = () => {
2704
+ const { product: n, setIsOpen: a } = h, { setIsOpen: s } = rt(), e = () => {
2532
2705
  s(!1), setTimeout(() => {
2533
2706
  a(!1);
2534
2707
  }, 300);
@@ -2537,10 +2710,10 @@ const ns = (h) => {
2537
2710
  /* @__PURE__ */ t.jsxs("div", { className: tt.header, children: [
2538
2711
  /* @__PURE__ */ t.jsxs("div", { id: "h3", children: [
2539
2712
  "Buy ",
2540
- it(i.name)
2713
+ it(n.name)
2541
2714
  ] }),
2542
2715
  /* @__PURE__ */ t.jsx(
2543
- b,
2716
+ I,
2544
2717
  {
2545
2718
  name: "X",
2546
2719
  width: 24,
@@ -2558,67 +2731,67 @@ const ns = (h) => {
2558
2731
  /* @__PURE__ */ t.jsx("div", { className: tt.productOptions, children: /* @__PURE__ */ t.jsx(
2559
2732
  ns,
2560
2733
  {
2561
- product: i,
2734
+ product: n,
2562
2735
  setIsOpen: a
2563
2736
  }
2564
2737
  ) })
2565
2738
  ] });
2566
- }, vn = "_contentModal_1q42e_1", yn = "_modalTop_1q42e_13", bn = "_loading_1q42e_19", In = "_modalCards_1q42e_27", Nn = "_modalImage_1q42e_32", Cn = "_card_1q42e_37", Sn = "_cardInfo_1q42e_49", Pn = "_cardButtons_1q42e_56", kn = "_title_1q42e_62", wn = "_blockImage_1q42e_69", Tn = "_short_1q42e_78", Mn = "_price_1q42e_82", Bn = "_oldPrice_1q42e_89", $n = "_newPrice_1q42e_97", L = {
2739
+ }, vn = "_contentModal_1ptti_1", bn = "_modalTop_1ptti_13", In = "_loading_1ptti_19", Nn = "_modalCards_1ptti_27", Cn = "_modalImage_1ptti_32", Sn = "_card_1ptti_37", wn = "_cardInfo_1ptti_49", Pn = "_cardButtons_1ptti_56", kn = "_title_1ptti_62", Tn = "_blockImage_1ptti_69", Mn = "_short_1ptti_78", Bn = "_price_1ptti_82", qn = "_oldPrice_1ptti_89", $n = "_newPrice_1ptti_98", z = {
2567
2740
  contentModal: vn,
2568
- modalTop: yn,
2569
- loading: bn,
2570
- modalCards: In,
2571
- modalImage: Nn,
2572
- card: Cn,
2573
- cardInfo: Sn,
2741
+ modalTop: bn,
2742
+ loading: In,
2743
+ modalCards: Nn,
2744
+ modalImage: Cn,
2745
+ card: Sn,
2746
+ cardInfo: wn,
2574
2747
  cardButtons: Pn,
2575
2748
  title: kn,
2576
- blockImage: wn,
2577
- short: Tn,
2578
- price: Mn,
2579
- oldPrice: Bn,
2749
+ blockImage: Tn,
2750
+ short: Mn,
2751
+ price: Bn,
2752
+ oldPrice: qn,
2580
2753
  newPrice: $n
2581
- }, Qn = (h) => {
2754
+ }, Jn = (h) => {
2582
2755
  const {
2583
- setIsOpen: i,
2756
+ setIsOpen: n,
2584
2757
  pageContext: a,
2585
2758
  groupData: s,
2586
2759
  setProductId: e,
2587
2760
  setIsProductModalOpen: r,
2588
- setShowDropdown: c
2589
- } = h, [f, j] = x.useState(null), [v, T] = x.useState(!0), { setIsOpen: _ } = ct();
2590
- x.useEffect(() => {
2761
+ setShowDropdown: o
2762
+ } = h, [x, v] = y.useState(null), [b, M] = y.useState(!0), { setIsOpen: j } = rt();
2763
+ y.useEffect(() => {
2591
2764
  var l;
2592
- T(!0);
2765
+ M(!0);
2593
2766
  const d = (l = a.listings) == null ? void 0 : l.filter(
2594
- (n) => s.listingIdList.includes(n.id)
2767
+ (g) => s.listingIdList.includes(g.id)
2595
2768
  );
2596
- d && j([...d]), T(!1);
2597
- }, [a]), x.useEffect(() => {
2598
- _(!0);
2769
+ d && v([...d]), M(!1);
2770
+ }, [a]), y.useEffect(() => {
2771
+ j(!0);
2599
2772
  }, []);
2600
2773
  const m = () => {
2601
- _(!1), setTimeout(() => {
2602
- i(!1);
2774
+ j(!1), setTimeout(() => {
2775
+ n(!1);
2603
2776
  }, 300);
2604
2777
  };
2605
- return /* @__PURE__ */ t.jsx(ut, { close: () => i(!1), children: /* @__PURE__ */ t.jsxs(
2778
+ return /* @__PURE__ */ t.jsx(ut, { close: () => n(!1), children: /* @__PURE__ */ t.jsxs(
2606
2779
  "div",
2607
2780
  {
2608
- className: L.contentModal,
2781
+ className: z.contentModal,
2609
2782
  onClick: (d) => d.stopPropagation(),
2610
2783
  children: [
2611
- /* @__PURE__ */ t.jsxs("div", { className: L.modalTop, children: [
2784
+ /* @__PURE__ */ t.jsxs("div", { className: z.modalTop, children: [
2612
2785
  /* @__PURE__ */ t.jsx(
2613
2786
  "span",
2614
2787
  {
2615
- className: L.title,
2788
+ className: z.title,
2616
2789
  id: "h4",
2617
2790
  children: it(s.name)
2618
2791
  }
2619
2792
  ),
2620
2793
  /* @__PURE__ */ t.jsx(
2621
- b,
2794
+ I,
2622
2795
  {
2623
2796
  name: "X",
2624
2797
  hoverable: !0,
@@ -2627,10 +2800,10 @@ const ns = (h) => {
2627
2800
  }
2628
2801
  )
2629
2802
  ] }),
2630
- !v && f && /* @__PURE__ */ t.jsx("div", { className: L.modalCards, children: f.map((d) => /* @__PURE__ */ t.jsxs(
2803
+ !b && x && /* @__PURE__ */ t.jsx("div", { className: z.modalCards, children: x.map((d) => /* @__PURE__ */ t.jsxs(
2631
2804
  "div",
2632
2805
  {
2633
- className: L.card,
2806
+ className: z.card,
2634
2807
  children: [
2635
2808
  /* @__PURE__ */ t.jsx("div", { children: d.productData.images[0] ? /* @__PURE__ */ t.jsx(
2636
2809
  "img",
@@ -2639,63 +2812,91 @@ const ns = (h) => {
2639
2812
  alt: "",
2640
2813
  width: 64,
2641
2814
  height: 64,
2642
- className: L.modalImage
2815
+ className: z.modalImage
2643
2816
  }
2644
- ) : /* @__PURE__ */ t.jsx("div", { className: F(L.blockImage, L.modalImage), children: /* @__PURE__ */ t.jsx(b, { name: "Image" }) }) }),
2645
- /* @__PURE__ */ t.jsxs("div", { className: L.cardInfo, children: [
2817
+ ) : /* @__PURE__ */ t.jsx("div", { className: H(z.blockImage, z.modalImage), children: /* @__PURE__ */ t.jsx(I, { name: "Image" }) }) }),
2818
+ /* @__PURE__ */ t.jsxs("div", { className: z.cardInfo, children: [
2646
2819
  /* @__PURE__ */ t.jsx(
2647
2820
  "div",
2648
2821
  {
2649
- className: L.name,
2822
+ className: z.name,
2650
2823
  id: "h5",
2651
2824
  children: d.productData.compareAtPrice && (d.productData.compareAtPrice.amount || 0) - (d.productData.minPrice.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2652
2825
  it(d.productData.name),
2653
- /* @__PURE__ */ t.jsxs("span", { className: L.price, children: [
2654
- /* @__PURE__ */ t.jsx("span", { className: L.newPrice, children: Q({
2655
- amount: d.productData.minPrice.amount,
2656
- currency: d.productData.minPrice.currency
2657
- }) }),
2658
- /* @__PURE__ */ t.jsx("span", { className: L.oldPrice, children: Q({
2659
- amount: d.productData.compareAtPrice.amount,
2660
- currency: d.productData.compareAtPrice.currency
2661
- }) })
2662
- ] })
2826
+ /* @__PURE__ */ t.jsxs(
2827
+ "span",
2828
+ {
2829
+ className: z.price,
2830
+ id: "md",
2831
+ children: [
2832
+ /* @__PURE__ */ t.jsx(
2833
+ "span",
2834
+ {
2835
+ className: z.newPrice,
2836
+ id: "md",
2837
+ children: Q({
2838
+ amount: d.productData.minPrice.amount,
2839
+ currency: d.productData.minPrice.currency
2840
+ })
2841
+ }
2842
+ ),
2843
+ /* @__PURE__ */ t.jsx(
2844
+ "span",
2845
+ {
2846
+ className: z.oldPrice,
2847
+ id: "md",
2848
+ children: Q({
2849
+ amount: d.productData.compareAtPrice.amount,
2850
+ currency: d.productData.compareAtPrice.currency
2851
+ })
2852
+ }
2853
+ )
2854
+ ]
2855
+ }
2856
+ )
2663
2857
  ] }) : /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2664
2858
  it(d.productData.name),
2665
- /* @__PURE__ */ t.jsx("span", { className: L.newPrice, children: Q({
2666
- amount: d.productData.minPrice.amount,
2667
- currency: d.productData.minPrice.currency
2668
- }) })
2859
+ /* @__PURE__ */ t.jsx(
2860
+ "span",
2861
+ {
2862
+ className: z.newPrice,
2863
+ id: "md",
2864
+ children: Q({
2865
+ amount: d.productData.minPrice.amount,
2866
+ currency: d.productData.minPrice.currency
2867
+ })
2868
+ }
2869
+ )
2669
2870
  ] })
2670
2871
  }
2671
2872
  ),
2672
2873
  d.productData.shortDescription && /* @__PURE__ */ t.jsx(
2673
2874
  "span",
2674
2875
  {
2675
- className: L.short,
2876
+ className: z.short,
2676
2877
  id: "md",
2677
2878
  children: it(d.productData.shortDescription)
2678
2879
  }
2679
2880
  )
2680
2881
  ] }),
2681
- /* @__PURE__ */ t.jsxs("div", { className: L.cardButtons, children: [
2882
+ /* @__PURE__ */ t.jsxs("div", { className: z.cardButtons, children: [
2682
2883
  /* @__PURE__ */ t.jsx(
2683
- E,
2884
+ R,
2684
2885
  {
2685
2886
  type: "Secondary",
2686
2887
  onClick: () => {
2687
- e(d.id), i(!1), r(!0);
2888
+ e(d.id), n(!1), r(!0);
2688
2889
  },
2689
2890
  children: "Buy"
2690
2891
  }
2691
2892
  ),
2692
2893
  /* @__PURE__ */ t.jsx(Tt, { path: `/product/${d.productData.uniquePath}`, children: /* @__PURE__ */ t.jsx(
2693
- E,
2894
+ R,
2694
2895
  {
2695
2896
  type: "Primary",
2696
2897
  style: { whiteSpace: "nowrap" },
2697
2898
  onClick: () => {
2698
- c(!1), m();
2899
+ o(!1), m();
2699
2900
  },
2700
2901
  children: "View Details"
2701
2902
  }
@@ -2705,54 +2906,55 @@ const ns = (h) => {
2705
2906
  },
2706
2907
  d.id
2707
2908
  )) }),
2708
- v && /* @__PURE__ */ t.jsx("div", { className: L.loading, children: /* @__PURE__ */ t.jsx(Bt, {}) })
2909
+ b && /* @__PURE__ */ t.jsx("div", { className: z.loading, children: /* @__PURE__ */ t.jsx(Bt, {}) })
2709
2910
  ]
2710
2911
  }
2711
2912
  ) });
2712
2913
  };
2713
2914
  export {
2714
- Yn as Accordion,
2715
- Us as BurgerMenuButton,
2716
- E as Button,
2717
- qe as ButtonTypeSettings,
2718
- Ln as ButtonsSettings,
2719
- En as CategorySettings,
2720
- $t as ChargeTypes,
2915
+ Gn as Accordion,
2916
+ zs as BurgerMenuButton,
2917
+ R as Button,
2918
+ Oe as ButtonTypeSettings,
2919
+ zn as ButtonsSettings,
2920
+ Rn as CategorySettings,
2921
+ qt as ChargeTypes,
2721
2922
  At as ChooseImage,
2722
- Zn as ChooseImageModal,
2723
- Rs as EmptyCart,
2724
- Rn as FormSettings,
2725
- Qn as GroupCardModal,
2923
+ ti as ChooseImageModal,
2924
+ Ls as EmptyCart,
2925
+ Un as FormSettings,
2926
+ Jn as GroupCardModal,
2726
2927
  Hn as HeaderButtons,
2727
- b as Icon,
2928
+ I as Icon,
2728
2929
  Nt as InputSettings,
2729
- Rt as InputUI,
2730
- ti as ItemsSettings,
2731
- Dn as LayoutSettings,
2930
+ Lt as InputUI,
2931
+ ei as ItemsSettings,
2932
+ En as LayoutSettings,
2732
2933
  Tt as Link,
2733
- Un as ListingSelector,
2934
+ Fn as ListingSelector,
2734
2935
  Bt as Loader,
2735
- Wn as MetaInfoPost,
2936
+ Xn as MetaInfoPost,
2736
2937
  ut as Modal,
2737
- Fn as PagesMobileMenu,
2738
- Ls as PagesMobileModal,
2739
- zn as PagesSettings,
2740
- Gn as ProductCardButtons,
2741
- Xn as ProductCardModal,
2938
+ Vn as PagesMobileMenu,
2939
+ Us as PagesMobileModal,
2940
+ Ln as PagesSettings,
2941
+ Wn as ProductCardButtons,
2942
+ Qn as ProductCardModal,
2742
2943
  ns as ProductOptions,
2743
- ei as RadioUI,
2744
- Pt as RangeSelector,
2944
+ si as RadioUI,
2945
+ wt as RangeSelector,
2745
2946
  at as Select,
2746
- si as SelectInfiniteList,
2747
- ni as SelectUI,
2748
- Vn as ShareLink,
2947
+ ni as SelectInfiniteList,
2948
+ ii as SelectTypeText,
2949
+ ai as SelectUI,
2950
+ Yn as ShareLink,
2749
2951
  Es as ShoppingButton,
2750
- zs as ShoppingModalCart,
2952
+ Rs as ShoppingModalCart,
2751
2953
  lt as Switch,
2752
- ii as TextSettings,
2753
- ai as TextareaSettings,
2754
- oi as TextareaUI,
2755
- ci as TypesText,
2756
- Ot as UserInfo,
2757
- ri as Wrapper
2954
+ oi as TextSettings,
2955
+ ci as TextareaSettings,
2956
+ ri as TextareaUI,
2957
+ li as TypesText,
2958
+ $t as UserInfo,
2959
+ di as Wrapper
2758
2960
  };