@billgangcom/theme-lib 1.69.7 → 1.69.9

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