@billgangcom/theme-lib 1.64.0 → 1.65.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ui.es.js CHANGED
@@ -1,8 +1,8 @@
1
- import { j as t, I as v, c as V, a as pt, S as ot, R as St, B as ct, O as _t, d as lt, u as gt, e as ft, P as xt, D as vt, f as jt, v as bt, g as yt, C as Nt, h as H, i as Pt, k as at, l as Tt, m as rt, n as Mt, o as mt, p as G, L as At, r as ut, t as dt, s as It, w as F, x as Ot, M as kt, y as wt, z as Et, A as $t, E as qt, F as Dt, G as Rt } from "./index-Dg3k5gYy.js";
2
- import { Q as Ki, J as Zi, N as ta, H as ea, T as na, K as sa } from "./index-Dg3k5gYy.js";
1
+ import { j as t, I as j, c as V, a as yt, u as ut, d as mt, P as ht, S as ot, R as St, D as pt, e as _t, v as gt, B as ct, O as It, f as rt, g as ft, C as xt, h as H, i as Pt, k as at, l as Tt, m as lt, n as Mt, o as jt, p as G, L as At, r as vt, t as dt, s as Nt, w as F, x as Ot, M as kt, y as $t, z as Et, A as wt, E as qt, F as Dt, G as Rt } from "./index-BPn2qi_o.js";
2
+ import { Q as Zi, J as ta, N as ea, H as na, T as sa, K as ia } from "./index-BPn2qi_o.js";
3
3
  import x from "react";
4
4
  import "@phosphor-icons/react";
5
- const Lt = "_wrapper_1vmyb_2", zt = "_alignmentBlock_1vmyb_8", Ft = "_title_1vmyb_15", Vt = "_subtitle_1vmyb_22", Ut = "_alignmentContent_1vmyb_29", Ht = "_alignments_1vmyb_37", Yt = "_alignment_1vmyb_8", Wt = "_circle_1vmyb_60", Gt = "_paddings_1vmyb_67", Qt = "_padding_1vmyb_67", Xt = "_active_1vmyb_91", Jt = "_input_1vmyb_98", X = {
5
+ const Lt = "_wrapper_1vmyb_2", zt = "_alignmentBlock_1vmyb_8", Ft = "_title_1vmyb_15", Vt = "_subtitle_1vmyb_22", Ut = "_alignmentContent_1vmyb_29", Ht = "_alignments_1vmyb_37", Yt = "_alignment_1vmyb_8", Wt = "_circle_1vmyb_60", Gt = "_paddings_1vmyb_67", Qt = "_padding_1vmyb_67", Xt = "_active_1vmyb_91", Jt = "_input_1vmyb_98", J = {
6
6
  wrapper: Lt,
7
7
  alignmentBlock: zt,
8
8
  title: Ft,
@@ -25,10 +25,10 @@ const Lt = "_wrapper_1vmyb_2", zt = "_alignmentBlock_1vmyb_8", Ft = "_title_1vmy
25
25
  "bottomLeft",
26
26
  "bottom",
27
27
  "bottomRight"
28
- ], Zt = ["left", "top", "right", "bottom"], Ai = (o) => {
28
+ ], Zt = ["left", "top", "right", "bottom"], Oi = (o) => {
29
29
  const { alignment: s, padding: e, setPadding: n, setAlignment: i } = o;
30
- function c(r) {
31
- switch (r) {
30
+ function c(l) {
31
+ switch (l) {
32
32
  case "left":
33
33
  case "topLeft":
34
34
  case "bottomLeft":
@@ -45,8 +45,8 @@ const Lt = "_wrapper_1vmyb_2", zt = "_alignmentBlock_1vmyb_8", Ft = "_title_1vmy
45
45
  return "TextAlignCenter";
46
46
  }
47
47
  }
48
- function u(r) {
49
- switch (r) {
48
+ function u(l) {
49
+ switch (l) {
50
50
  case "left":
51
51
  return "AlignLeft";
52
52
  case "right":
@@ -57,38 +57,38 @@ const Lt = "_wrapper_1vmyb_2", zt = "_alignmentBlock_1vmyb_8", Ft = "_title_1vmy
57
57
  return "AlignBottom";
58
58
  }
59
59
  }
60
- const [l, m] = x.useState(null), [p, B] = x.useState(null);
61
- return /* @__PURE__ */ t.jsxs("div", { className: X.layout, children: [
62
- /* @__PURE__ */ t.jsx("h3", { className: X.title, children: "Layout (for Desktop version)" }),
63
- /* @__PURE__ */ t.jsxs("div", { className: X.alignmentBlock, children: [
64
- /* @__PURE__ */ t.jsx("h5", { className: X.subtitle, children: "Alignment" }),
65
- /* @__PURE__ */ t.jsxs("div", { className: X.alignmentContent, children: [
66
- /* @__PURE__ */ t.jsx("div", { className: X.alignments, children: Kt.map((r) => /* @__PURE__ */ t.jsxs(
60
+ const [r, m] = x.useState(null), [p, B] = x.useState(null);
61
+ return /* @__PURE__ */ t.jsxs("div", { className: J.layout, children: [
62
+ /* @__PURE__ */ t.jsx("h3", { className: J.title, children: "Layout (for Desktop version)" }),
63
+ /* @__PURE__ */ t.jsxs("div", { className: J.alignmentBlock, children: [
64
+ /* @__PURE__ */ t.jsx("h5", { className: J.subtitle, children: "Alignment" }),
65
+ /* @__PURE__ */ t.jsxs("div", { className: J.alignmentContent, children: [
66
+ /* @__PURE__ */ t.jsx("div", { className: J.alignments, children: Kt.map((l) => /* @__PURE__ */ t.jsxs(
67
67
  "div",
68
68
  {
69
69
  onClick: () => {
70
- i(r);
70
+ i(l);
71
71
  },
72
- className: X.alignment,
72
+ className: J.alignment,
73
73
  onMouseEnter: () => {
74
- m(r);
74
+ m(l);
75
75
  },
76
76
  onMouseLeave: () => {
77
77
  m(null);
78
78
  },
79
79
  children: [
80
- r !== s && l !== r && /* @__PURE__ */ t.jsx("div", { className: X.circle }),
81
- r !== s && l === r && /* @__PURE__ */ t.jsx(
82
- v,
80
+ l !== s && r !== l && /* @__PURE__ */ t.jsx("div", { className: J.circle }),
81
+ l !== s && r === l && /* @__PURE__ */ t.jsx(
82
+ j,
83
83
  {
84
- name: c(l),
84
+ name: c(r),
85
85
  fill: "#c2c2c2",
86
86
  width: 22,
87
87
  height: 22
88
88
  }
89
89
  ),
90
- r === s && /* @__PURE__ */ t.jsx(
91
- v,
90
+ l === s && /* @__PURE__ */ t.jsx(
91
+ j,
92
92
  {
93
93
  name: c(s),
94
94
  fill: "#FF3F19",
@@ -98,37 +98,37 @@ const Lt = "_wrapper_1vmyb_2", zt = "_alignmentBlock_1vmyb_8", Ft = "_title_1vmy
98
98
  )
99
99
  ]
100
100
  },
101
- r
101
+ l
102
102
  )) }),
103
- /* @__PURE__ */ t.jsx("div", { className: X.paddings, children: Zt.map((r) => /* @__PURE__ */ t.jsxs(
103
+ /* @__PURE__ */ t.jsx("div", { className: J.paddings, children: Zt.map((l) => /* @__PURE__ */ t.jsxs(
104
104
  "label",
105
105
  {
106
- className: V(X.padding, {
107
- [X.active]: p === r
106
+ className: V(J.padding, {
107
+ [J.active]: p === l
108
108
  }),
109
109
  onFocus: () => {
110
- B(r);
110
+ B(l);
111
111
  },
112
112
  onBlur: () => {
113
113
  B(null);
114
114
  },
115
115
  children: [
116
116
  /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
117
- v,
117
+ j,
118
118
  {
119
- name: u(r),
119
+ name: u(l),
120
120
  width: 20,
121
121
  height: 20
122
122
  }
123
123
  ) }),
124
124
  /* @__PURE__ */ t.jsx(
125
- pt,
125
+ yt,
126
126
  {
127
127
  type: "number",
128
- value: String(e[r]),
128
+ value: String(e[l]),
129
129
  onChange: (a) => n({
130
130
  ...e,
131
- [r]: Math.min(Number(a), 999)
131
+ [l]: Math.min(Number(a), 999)
132
132
  }),
133
133
  max: 999,
134
134
  paddingless: !0,
@@ -137,12 +137,12 @@ const Lt = "_wrapper_1vmyb_2", zt = "_alignmentBlock_1vmyb_8", Ft = "_title_1vmy
137
137
  )
138
138
  ]
139
139
  },
140
- r
140
+ l
141
141
  )) })
142
142
  ] })
143
143
  ] })
144
144
  ] });
145
- }, te = "_title_82zux_1", ee = "_subtitle_82zux_5", ne = "_header_82zux_12", se = "_text_82zux_13", ie = "_productsBlock_82zux_14", ae = "_top_82zux_26", oe = "_itemsBlock_82zux_35", ce = "_typeTexts_82zux_41", le = "_block_82zux_48", re = "_active_82zux_61", de = "_products_82zux_14", ue = "_product_82zux_14", me = "_button_82zux_80", he = "_disabled_82zux_91", pe = "_image_82zux_95", _e = "_info_82zux_102", ge = "_name_82zux_114", fe = "_buttons_82zux_118", xe = "_modal_82zux_125", ve = "_link_82zux_145", je = "_modalOptions_82zux_151", be = "_addButton_82zux_157", ye = "_deleteButton_82zux_179", J = {
145
+ }, te = "_title_82zux_1", ee = "_subtitle_82zux_5", ne = "_header_82zux_12", se = "_text_82zux_13", ie = "_productsBlock_82zux_14", ae = "_top_82zux_26", oe = "_itemsBlock_82zux_35", ce = "_typeTexts_82zux_41", re = "_block_82zux_48", le = "_active_82zux_61", de = "_products_82zux_14", ue = "_product_82zux_14", me = "_button_82zux_80", he = "_disabled_82zux_91", pe = "_image_82zux_95", _e = "_info_82zux_102", ge = "_name_82zux_114", fe = "_buttons_82zux_118", xe = "_modal_82zux_125", ve = "_link_82zux_145", je = "_modalOptions_82zux_151", be = "_addButton_82zux_157", ye = "_deleteButton_82zux_179", Q = {
146
146
  title: te,
147
147
  subtitle: ee,
148
148
  header: ne,
@@ -151,8 +151,8 @@ const Lt = "_wrapper_1vmyb_2", zt = "_alignmentBlock_1vmyb_8", Ft = "_title_1vmy
151
151
  top: ae,
152
152
  itemsBlock: oe,
153
153
  typeTexts: ce,
154
- block: le,
155
- active: re,
154
+ block: re,
155
+ active: le,
156
156
  products: de,
157
157
  product: ue,
158
158
  button: me,
@@ -166,7 +166,34 @@ const Lt = "_wrapper_1vmyb_2", zt = "_alignmentBlock_1vmyb_8", Ft = "_title_1vmy
166
166
  modalOptions: je,
167
167
  addButton: be,
168
168
  deleteButton: ye
169
- }, Oi = (o) => {
169
+ };
170
+ function Ie({ id: o, children: s }) {
171
+ const {
172
+ attributes: e,
173
+ listeners: n,
174
+ setNodeRef: i,
175
+ transform: c,
176
+ transition: u,
177
+ isDragging: r
178
+ } = ft({
179
+ id: o
180
+ }), m = {
181
+ transform: xt.Transform.toString(c),
182
+ transition: u
183
+ };
184
+ return /* @__PURE__ */ t.jsx(
185
+ "div",
186
+ {
187
+ ref: i,
188
+ style: m,
189
+ className: `${Q.product} ${r ? Q.dragging : ""}`,
190
+ ...e,
191
+ ...n,
192
+ children: s
193
+ }
194
+ );
195
+ }
196
+ const Ei = (o) => {
170
197
  const {
171
198
  isActiveItems: s,
172
199
  setIsActiveItems: e,
@@ -174,29 +201,45 @@ const Lt = "_wrapper_1vmyb_2", zt = "_alignmentBlock_1vmyb_8", Ft = "_title_1vmy
174
201
  setItems: i,
175
202
  other: c,
176
203
  title: u,
177
- subtitle: l,
204
+ subtitle: r,
178
205
  draggable: m = !1,
179
206
  withImage: p = !1,
180
207
  addable: B = !0,
181
- itemsOptions: r,
208
+ itemsOptions: l,
182
209
  hasRangeSelector: a = !1,
183
- rangeSelectorOptions: j,
210
+ rangeSelectorOptions: b,
184
211
  limit: d,
185
212
  autoScrollInterval: S,
186
213
  deletable: g
187
- } = o;
188
- function y(k) {
214
+ } = o, k = ut(
215
+ mt(ht, {
216
+ activationConstraint: {
217
+ distance: 5
218
+ }
219
+ })
220
+ ), q = (v) => {
221
+ console.log("Trigger?");
222
+ const { active: M, over: O } = v;
223
+ if (O && M.id !== O.id) {
224
+ const I = n.findIndex(($) => $ === M.id), h = n.findIndex(($) => $ === O.id);
225
+ if (I !== -1 && h !== -1) {
226
+ const $ = [...n], [P] = $.splice(I, 1);
227
+ $.splice(h, 0, P), i($);
228
+ }
229
+ }
230
+ };
231
+ function E(v) {
189
232
  if (p)
190
- return k ? /* @__PURE__ */ t.jsx(
233
+ return v ? /* @__PURE__ */ t.jsx(
191
234
  "img",
192
235
  {
193
- src: `https://imagedelivery.net/${k[0]}/w=1000`,
236
+ src: `https://imagedelivery.net/${v[0]}/w=1000`,
194
237
  alt: "image",
195
238
  width: 16,
196
239
  height: 16
197
240
  }
198
241
  ) : /* @__PURE__ */ t.jsx(
199
- v,
242
+ j,
200
243
  {
201
244
  name: "Image",
202
245
  width: 16,
@@ -205,12 +248,12 @@ const Lt = "_wrapper_1vmyb_2", zt = "_alignmentBlock_1vmyb_8", Ft = "_title_1vmy
205
248
  }
206
249
  );
207
250
  }
208
- const q = (k, h = !1) => {
209
- const $ = r.find((L) => L.id === k);
210
- if (!$) return;
211
- const R = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
251
+ const f = (v, M = !1) => {
252
+ const O = l.find((h) => h.id === v);
253
+ if (!O) return;
254
+ const I = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
212
255
  m && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
213
- v,
256
+ j,
214
257
  {
215
258
  name: "DotsSixVertical",
216
259
  hoverable: !0,
@@ -219,55 +262,76 @@ const Lt = "_wrapper_1vmyb_2", zt = "_alignmentBlock_1vmyb_8", Ft = "_title_1vmy
219
262
  }
220
263
  ) }),
221
264
  /* @__PURE__ */ t.jsx(
222
- lt,
265
+ rt,
223
266
  {
224
- onChange: (L) => {
225
- const I = [...n], b = r.find((f) => f.name === L);
226
- if (!b) return;
227
- const M = b.id, P = I.map((f) => f === k ? M : f);
228
- i([...P]);
267
+ onChange: (h) => {
268
+ const $ = [...n], P = l.find((A) => A.name === h);
269
+ if (!P) return;
270
+ const y = P.id, N = $.map((A) => A === v ? y : A);
271
+ i([...N]);
229
272
  },
230
- value: $.name,
231
- options: r.filter((L) => !n.find((I) => I === L.id)).map((L) => L.name),
232
- leftAddon: y($.images)
273
+ value: O.name,
274
+ options: l.filter((h) => !n.find(($) => $ === h.id)).map((h) => h.name),
275
+ leftAddon: E(O.images)
233
276
  }
234
277
  ),
235
- h && /* @__PURE__ */ t.jsx("div", { className: J.buttons, children: /* @__PURE__ */ t.jsx("div", { className: J.deleteButton, children: /* @__PURE__ */ t.jsx(
236
- v,
278
+ M && /* @__PURE__ */ t.jsx("div", { className: Q.buttons, children: /* @__PURE__ */ t.jsx("div", { className: Q.deleteButton, children: /* @__PURE__ */ t.jsx(
279
+ j,
237
280
  {
238
281
  name: "Trash",
239
282
  hoverable: !0,
240
283
  width: 20,
241
284
  height: 20,
242
285
  fill: "#C12A2A",
243
- onClick: () => i(n.filter((L) => L !== k))
286
+ onClick: () => i(n.filter((h) => h !== v))
244
287
  }
245
288
  ) }) })
246
289
  ] });
247
- return /* @__PURE__ */ t.jsx(
290
+ return m ? /* @__PURE__ */ t.jsx(
291
+ Ie,
292
+ {
293
+ id: v,
294
+ children: I
295
+ },
296
+ v
297
+ ) : /* @__PURE__ */ t.jsx(
248
298
  "div",
249
299
  {
250
- className: J.product,
251
- children: R
300
+ className: Q.product,
301
+ children: I
252
302
  },
253
- k
303
+ v
254
304
  );
255
305
  };
256
- return /* @__PURE__ */ t.jsxs("div", { className: J.productsBlock, children: [
257
- (u || s !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: J.top, children: [
258
- u && /* @__PURE__ */ t.jsx("h3", { className: J.title, children: u }),
306
+ return /* @__PURE__ */ t.jsxs("div", { className: Q.productsBlock, children: [
307
+ (u || s !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Q.top, children: [
308
+ u && /* @__PURE__ */ t.jsx("h3", { className: Q.title, children: u }),
259
309
  s !== void 0 && /* @__PURE__ */ t.jsx(
260
310
  ot,
261
311
  {
262
312
  current: s,
263
- onChange: (k) => e == null ? void 0 : e(k)
313
+ onChange: (v) => e == null ? void 0 : e(v)
264
314
  }
265
315
  )
266
316
  ] }),
267
- a && j && /* @__PURE__ */ t.jsx(St, { ...j }),
268
- /* @__PURE__ */ t.jsxs("div", { className: J.products, children: [
269
- l && /* @__PURE__ */ t.jsx("h5", { className: J.subtitle, children: l }),
270
- n.map((k) => q(k, g)),
317
+ a && b && /* @__PURE__ */ t.jsx(St, { ...b }),
318
+ /* @__PURE__ */ t.jsxs("div", { className: Q.products, children: [
319
+ r && /* @__PURE__ */ t.jsx("h5", { className: Q.subtitle, children: r }),
320
+ m ? /* @__PURE__ */ t.jsx(
321
+ pt,
322
+ {
323
+ sensors: k,
324
+ onDragEnd: q,
325
+ children: /* @__PURE__ */ t.jsx(
326
+ _t,
327
+ {
328
+ items: n,
329
+ strategy: gt,
330
+ children: n.map((v) => f(v, g))
331
+ }
332
+ )
333
+ }
334
+ ) : n.map((v) => f(v, g)),
271
335
  B && /* @__PURE__ */ t.jsx(
272
336
  "div",
273
337
  {
@@ -281,30 +345,30 @@ const Lt = "_wrapper_1vmyb_2", zt = "_alignmentBlock_1vmyb_8", Ft = "_title_1vmy
281
345
  ct,
282
346
  {
283
347
  withoutHover: !0,
284
- className: V(J.button, {
285
- [J.disabled]: !!(d && d <= n.length || n.length === r.length)
348
+ className: V(Q.button, {
349
+ [Q.disabled]: !!(d && d <= n.length || n.length === l.length)
286
350
  }),
287
351
  size: "s",
288
- disabled: !!(d && d <= n.length || n.length === r.length),
352
+ disabled: !!(d && d <= n.length || n.length === l.length),
289
353
  onClick: () => {
290
- const k = [...n];
291
- let h = null;
292
- if (r) {
293
- for (let $ = 0; $ < r.length; $++)
294
- if (!n.find((R) => R === r[$].id)) {
295
- h = r[$];
354
+ const v = [...n];
355
+ let M = null;
356
+ if (l) {
357
+ for (let O = 0; O < l.length; O++)
358
+ if (!n.find((I) => I === l[O].id)) {
359
+ M = l[O];
296
360
  break;
297
361
  }
298
362
  }
299
- k.push((h == null ? void 0 : h.id) || r[0].id), i(k);
363
+ v.push((M == null ? void 0 : M.id) || l[0].id), i(v);
300
364
  },
301
365
  style: {
302
366
  width: "fit-content"
303
367
  },
304
- children: /* @__PURE__ */ t.jsxs("div", { className: J.addButton, children: [
368
+ children: /* @__PURE__ */ t.jsxs("div", { className: Q.addButton, children: [
305
369
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
306
370
  /* @__PURE__ */ t.jsx(
307
- v,
371
+ j,
308
372
  {
309
373
  name: "Plus",
310
374
  width: 16,
@@ -317,14 +381,14 @@ const Lt = "_wrapper_1vmyb_2", zt = "_alignmentBlock_1vmyb_8", Ft = "_title_1vmy
317
381
  }
318
382
  )
319
383
  ] }),
320
- c !== void 0 && /* @__PURE__ */ t.jsx(_t, { items: c }),
384
+ c !== void 0 && /* @__PURE__ */ t.jsx(It, { items: c }),
321
385
  S !== void 0 && /* @__PURE__ */ t.jsx(
322
- pt,
386
+ yt,
323
387
  {
324
388
  label: "Auto scroll interval",
325
389
  type: "number",
326
390
  value: String(S.scrollInterval),
327
- onChange: (k) => S.setScrollInterval(Number(k)),
391
+ onChange: (v) => S.setScrollInterval(Number(v)),
328
392
  min: 0.1,
329
393
  max: 100,
330
394
  style: {
@@ -334,44 +398,44 @@ const Lt = "_wrapper_1vmyb_2", zt = "_alignmentBlock_1vmyb_8", Ft = "_title_1vmy
334
398
  }
335
399
  )
336
400
  ] });
337
- }, Ne = "_title_roi3a_1", Ie = "_subtitle_roi3a_5", ke = "_header_roi3a_12", Ce = "_text_roi3a_13", Se = "_productsBlock_roi3a_14", we = "_top_roi3a_26", $e = "_itemsBlock_roi3a_35", qe = "_typeTexts_roi3a_41", Be = "_block_roi3a_48", Pe = "_active_roi3a_61", Te = "_products_roi3a_14", Me = "_product_roi3a_14", Ae = "_button_roi3a_80", Oe = "_disabled_roi3a_91", Ee = "_image_roi3a_95", De = "_info_roi3a_102", Re = "_name_roi3a_114", Le = "_buttons_roi3a_118", ze = "_modal_roi3a_125", Fe = "_link_roi3a_145", Ve = "_modalOptions_roi3a_151", Ue = "_addButton_roi3a_164", He = "_deleteButton_roi3a_179", Ye = "_closeIcon_roi3a_191", Y = {
401
+ }, Ne = "_title_roi3a_1", ke = "_subtitle_roi3a_5", Ce = "_header_roi3a_12", Se = "_text_roi3a_13", $e = "_productsBlock_roi3a_14", we = "_top_roi3a_26", qe = "_itemsBlock_roi3a_35", Be = "_typeTexts_roi3a_41", Pe = "_block_roi3a_48", Te = "_active_roi3a_61", Me = "_products_roi3a_14", Ae = "_product_roi3a_14", Oe = "_button_roi3a_80", Ee = "_disabled_roi3a_91", De = "_image_roi3a_95", Re = "_info_roi3a_102", Le = "_name_roi3a_114", ze = "_buttons_roi3a_118", Fe = "_modal_roi3a_125", Ve = "_link_roi3a_145", Ue = "_modalOptions_roi3a_151", He = "_addButton_roi3a_164", Ye = "_deleteButton_roi3a_179", We = "_closeIcon_roi3a_191", Y = {
338
402
  title: Ne,
339
- subtitle: Ie,
340
- header: ke,
341
- text: Ce,
342
- productsBlock: Se,
403
+ subtitle: ke,
404
+ header: Ce,
405
+ text: Se,
406
+ productsBlock: $e,
343
407
  top: we,
344
- itemsBlock: $e,
345
- typeTexts: qe,
346
- block: Be,
347
- active: Pe,
348
- products: Te,
349
- product: Me,
350
- button: Ae,
351
- disabled: Oe,
352
- image: Ee,
353
- info: De,
354
- name: Re,
355
- buttons: Le,
356
- modal: ze,
357
- link: Fe,
358
- modalOptions: Ve,
359
- addButton: Ue,
360
- deleteButton: He,
361
- closeIcon: Ye
408
+ itemsBlock: qe,
409
+ typeTexts: Be,
410
+ block: Pe,
411
+ active: Te,
412
+ products: Me,
413
+ product: Ae,
414
+ button: Oe,
415
+ disabled: Ee,
416
+ image: De,
417
+ info: Re,
418
+ name: Le,
419
+ buttons: ze,
420
+ modal: Fe,
421
+ link: Ve,
422
+ modalOptions: Ue,
423
+ addButton: He,
424
+ deleteButton: Ye,
425
+ closeIcon: We
362
426
  };
363
- function We({ product: o, children: s }) {
427
+ function Ge({ product: o, children: s }) {
364
428
  const {
365
429
  attributes: e,
366
430
  listeners: n,
367
431
  setNodeRef: i,
368
432
  transform: c,
369
433
  transition: u,
370
- isDragging: l
371
- } = yt({
434
+ isDragging: r
435
+ } = ft({
372
436
  id: o.id
373
437
  }), m = {
374
- transform: Nt.Transform.toString(c),
438
+ transform: xt.Transform.toString(c),
375
439
  transition: u
376
440
  };
377
441
  return /* @__PURE__ */ t.jsx(
@@ -379,14 +443,14 @@ function We({ product: o, children: s }) {
379
443
  {
380
444
  ref: i,
381
445
  style: m,
382
- className: `${Y.product} ${l ? Y.dragging : ""}`,
446
+ className: `${Y.product} ${r ? Y.dragging : ""}`,
383
447
  ...e,
384
448
  ...n,
385
449
  children: s
386
450
  }
387
451
  );
388
452
  }
389
- const Ei = (o) => {
453
+ const Di = (o) => {
390
454
  const {
391
455
  isActiveItems: s,
392
456
  setIsActiveItems: e,
@@ -394,16 +458,16 @@ const Ei = (o) => {
394
458
  setItems: i,
395
459
  title: c,
396
460
  subtitle: u,
397
- editable: l = !0,
461
+ editable: r = !0,
398
462
  draggable: m = !1,
399
463
  deletable: p = !0,
400
464
  addable: B = !0,
401
- itemsType: r,
465
+ itemsType: l,
402
466
  itemsOptions: a,
403
- addableOptions: j = {},
467
+ addableOptions: b = {},
404
468
  limit: d
405
- } = o, [S, g] = x.useState(null), [y, q] = x.useState(null), k = x.useRef(null), h = gt(
406
- ft(xt, {
469
+ } = o, [S, g] = x.useState(null), [k, q] = x.useState(null), E = x.useRef(null), f = ut(
470
+ mt(ht, {
407
471
  activationConstraint: {
408
472
  distance: 5
409
473
  }
@@ -411,32 +475,32 @@ const Ei = (o) => {
411
475
  );
412
476
  x.useEffect(() => {
413
477
  if (S) {
414
- const I = [...n].map((b) => b.id === S.id ? S : b);
478
+ const I = [...n].map((h) => h.id === S.id ? S : h);
415
479
  i(I);
416
480
  }
417
481
  }, [S]), x.useEffect(() => {
418
- k.current && y && (k.current.getBoundingClientRect().height, y.top);
419
- }, [k.current, y]);
420
- const $ = (I, b) => {
482
+ E.current && k && (E.current.getBoundingClientRect().height, k.top);
483
+ }, [E.current, k]);
484
+ const v = (I, h) => {
421
485
  I.stopPropagation();
422
- const M = I.target.getBoundingClientRect();
486
+ const $ = I.target.getBoundingClientRect();
423
487
  q({
424
- top: M.top + window.scrollY,
425
- left: M.left - 30
426
- }), g(b);
427
- }, R = (I) => {
428
- const { active: b, over: M } = I;
429
- if (M && b.id !== M.id) {
430
- const P = n.findIndex((N) => N.id === b.id), f = n.findIndex((N) => N.id === M.id);
431
- if (P !== -1 && f !== -1) {
488
+ top: $.top + window.scrollY,
489
+ left: $.left - 30
490
+ }), g(h);
491
+ }, M = (I) => {
492
+ const { active: h, over: $ } = I;
493
+ if ($ && h.id !== $.id) {
494
+ const P = n.findIndex((N) => N.id === h.id), y = n.findIndex((N) => N.id === $.id);
495
+ if (P !== -1 && y !== -1) {
432
496
  const N = [...n], [A] = N.splice(P, 1);
433
- N.splice(f, 0, A), i(N);
497
+ N.splice(y, 0, A), i(N);
434
498
  }
435
499
  }
436
- }, L = (I, b) => {
437
- const M = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
500
+ }, O = (I, h) => {
501
+ const $ = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
438
502
  m && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
439
- v,
503
+ j,
440
504
  {
441
505
  name: "DotsSixVertical",
442
506
  hoverable: !0,
@@ -444,13 +508,13 @@ const Ei = (o) => {
444
508
  height: 20
445
509
  }
446
510
  ) }),
447
- r === "select" && a && /* @__PURE__ */ t.jsx(
448
- lt,
511
+ l === "select" && a && /* @__PURE__ */ t.jsx(
512
+ rt,
449
513
  {
450
514
  onChange: (P) => {
451
- const f = [...n], N = a.find((U) => U.name === P);
515
+ const y = [...n], N = a.find((U) => U.name === P);
452
516
  if (!N) return;
453
- const A = f.map((U) => U.id === I.id ? {
517
+ const A = y.map((U) => U.id === I.id ? {
454
518
  ...N,
455
519
  name: {
456
520
  "en-US": P
@@ -464,22 +528,22 @@ const Ei = (o) => {
464
528
  }), i([...A]);
465
529
  },
466
530
  value: I.name,
467
- options: a.filter((P) => !n.find((f) => f.name === P.name)).map((P) => P.name)
531
+ options: a.filter((P) => !n.find((y) => y.name === P.name)).map((P) => P.name)
468
532
  }
469
533
  ),
470
534
  /* @__PURE__ */ t.jsxs("div", { className: Y.buttons, children: [
471
- l && /* @__PURE__ */ t.jsx("div", { className: Y.deleteButton, children: /* @__PURE__ */ t.jsx(
472
- v,
535
+ r && /* @__PURE__ */ t.jsx("div", { className: Y.deleteButton, children: /* @__PURE__ */ t.jsx(
536
+ j,
473
537
  {
474
538
  name: "Sliders",
475
539
  hoverable: !0,
476
540
  width: 20,
477
541
  height: 20,
478
- onClick: (P) => $(P, I)
542
+ onClick: (P) => v(P, I)
479
543
  }
480
544
  ) }),
481
545
  p && /* @__PURE__ */ t.jsx("div", { className: Y.deleteButton, children: /* @__PURE__ */ t.jsx(
482
- v,
546
+ j,
483
547
  {
484
548
  name: "Trash",
485
549
  hoverable: !0,
@@ -492,18 +556,18 @@ const Ei = (o) => {
492
556
  ] })
493
557
  ] });
494
558
  return m ? /* @__PURE__ */ t.jsx(
495
- We,
559
+ Ge,
496
560
  {
497
561
  product: I,
498
- index: b,
499
- children: M
562
+ index: h,
563
+ children: $
500
564
  },
501
565
  I.id
502
566
  ) : /* @__PURE__ */ t.jsx(
503
567
  "div",
504
568
  {
505
569
  className: Y.product,
506
- children: M
570
+ children: $
507
571
  },
508
572
  I.id
509
573
  );
@@ -522,20 +586,20 @@ const Ei = (o) => {
522
586
  /* @__PURE__ */ t.jsxs("div", { className: Y.products, children: [
523
587
  u && /* @__PURE__ */ t.jsx("h5", { className: Y.subtitle, children: u }),
524
588
  m ? /* @__PURE__ */ t.jsx(
525
- vt,
589
+ pt,
526
590
  {
527
- sensors: h,
528
- onDragEnd: R,
591
+ sensors: f,
592
+ onDragEnd: M,
529
593
  children: /* @__PURE__ */ t.jsx(
530
- jt,
594
+ _t,
531
595
  {
532
596
  items: n.map((I) => I.id),
533
- strategy: bt,
534
- children: n.map((I, b) => L(I, b))
597
+ strategy: gt,
598
+ children: n.map((I, h) => O(I, h))
535
599
  }
536
600
  )
537
601
  }
538
- ) : n.map((I, b) => L(I, b)),
602
+ ) : n.map((I, h) => O(I, h)),
539
603
  B && /* @__PURE__ */ t.jsx(
540
604
  "div",
541
605
  {
@@ -555,18 +619,18 @@ const Ei = (o) => {
555
619
  disabled: !!(d && d <= n.length || n.length === (a == null ? void 0 : a.length)),
556
620
  onClick: () => {
557
621
  const I = [...n];
558
- let b = null;
622
+ let h = null;
559
623
  if (a) {
560
- for (let M = 0; M < a.length; M++)
561
- if (!n.find((P) => P.id === a[M].id)) {
562
- b = a[M];
624
+ for (let $ = 0; $ < a.length; $++)
625
+ if (!n.find((P) => P.id === a[$].id)) {
626
+ h = a[$];
563
627
  break;
564
628
  }
565
629
  }
566
- r === "select" && a && I.push({
567
- name: b ? b.name : a[0].name,
568
- id: (b == null ? void 0 : b.id) || a[0].id,
569
- ...j
630
+ l === "select" && a && I.push({
631
+ name: h ? h.name : a[0].name,
632
+ id: (h == null ? void 0 : h.id) || a[0].id,
633
+ ...b
570
634
  }), i(I);
571
635
  },
572
636
  style: {
@@ -575,7 +639,7 @@ const Ei = (o) => {
575
639
  children: /* @__PURE__ */ t.jsxs("div", { className: Y.addButton, children: [
576
640
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
577
641
  /* @__PURE__ */ t.jsx(
578
- v,
642
+ j,
579
643
  {
580
644
  name: "Plus",
581
645
  width: 16,
@@ -590,12 +654,12 @@ const Ei = (o) => {
590
654
  ] })
591
655
  ] });
592
656
  };
593
- function Ge(o) {
594
- const { product: s, children: e } = o, { attributes: n, listeners: i, setNodeRef: c, transform: u, transition: l, isDragging: m } = yt({
657
+ function Qe(o) {
658
+ const { product: s, children: e } = o, { attributes: n, listeners: i, setNodeRef: c, transform: u, transition: r, isDragging: m } = ft({
595
659
  id: s.id
596
660
  }), p = {
597
- transform: Nt.Transform.toString(u),
598
- transition: l
661
+ transform: xt.Transform.toString(u),
662
+ transition: r
599
663
  };
600
664
  return /* @__PURE__ */ t.jsx(
601
665
  "div",
@@ -609,7 +673,7 @@ function Ge(o) {
609
673
  }
610
674
  );
611
675
  }
612
- const Di = (o) => {
676
+ const Ri = (o) => {
613
677
  const {
614
678
  isActiveItems: s,
615
679
  setIsActiveItems: e,
@@ -617,25 +681,25 @@ const Di = (o) => {
617
681
  setItems: i,
618
682
  other: c,
619
683
  title: u,
620
- subtitle: l,
684
+ subtitle: r,
621
685
  editable: m = !0,
622
686
  draggable: p = !1,
623
687
  withImage: B = !1,
624
- deletable: r = !0,
688
+ deletable: l = !0,
625
689
  addable: a = !0,
626
- itemsType: j,
690
+ itemsType: b,
627
691
  itemsPlaceholder: d = "",
628
692
  itemsOptions: S,
629
693
  hasRangeSelector: g = !1,
630
- rangeSelectorOptions: y,
694
+ rangeSelectorOptions: k,
631
695
  modalOptions: q,
632
- addableOptions: k = {},
633
- limit: h
634
- } = o, [$, R] = x.useState(null), [L, I] = x.useState({
696
+ addableOptions: E = {},
697
+ limit: f
698
+ } = o, [v, M] = x.useState(null), [O, I] = x.useState({
635
699
  top: 0,
636
700
  left: 0
637
- }), [b, M] = x.useState(null), P = x.useRef(null), [f, N] = x.useState(!1), A = gt(
638
- ft(xt, {
701
+ }), [h, $] = x.useState(null), P = x.useRef(null), [y, N] = x.useState(!1), A = ut(
702
+ mt(ht, {
639
703
  activationConstraint: {
640
704
  distance: 5
641
705
  }
@@ -643,35 +707,35 @@ const Di = (o) => {
643
707
  );
644
708
  x.useEffect(() => {
645
709
  const _ = () => {
646
- R(null), N(!1);
710
+ M(null), N(!1);
647
711
  };
648
- return document.body.addEventListener("click", _), R(null), N(!1), () => {
649
- R(null), N(!1), document.body.removeEventListener("click", _);
712
+ return document.body.addEventListener("click", _), M(null), N(!1), () => {
713
+ M(null), N(!1), document.body.removeEventListener("click", _);
650
714
  };
651
715
  }, []), x.useEffect(() => {
652
- if ($) {
653
- const _ = [...n].map((E) => E.id === $.id ? $ : E);
716
+ if (v) {
717
+ const _ = [...n].map((R) => R.id === v.id ? v : R);
654
718
  i(_);
655
719
  }
656
- }, [$]), x.useEffect(() => {
657
- if (P.current && b) {
658
- const _ = P.current.getBoundingClientRect().height, E = window.innerHeight;
659
- let T = b.top;
660
- T + _ > E + window.scrollY - 200 && (T = E + window.scrollY - _ - 200), T < 0 && (T = 10), I({
720
+ }, [v]), x.useEffect(() => {
721
+ if (P.current && h) {
722
+ const _ = P.current.getBoundingClientRect().height, R = window.innerHeight;
723
+ let T = h.top;
724
+ T + _ > R + window.scrollY - 200 && (T = R + window.scrollY - _ - 200), T < 0 && (T = 10), I({
661
725
  top: T,
662
- left: b.left
726
+ left: h.left
663
727
  });
664
728
  }
665
- }, [P.current, b]);
666
- const U = (_, E) => {
729
+ }, [P.current, h]);
730
+ const U = (_, R) => {
667
731
  _.stopPropagation();
668
732
  const T = _.target.getBoundingClientRect();
669
- M({
733
+ $({
670
734
  top: T.top + window.scrollY,
671
735
  left: T.left - 30
672
- }), R(E), N(!0);
736
+ }), M(R), N(!0);
673
737
  };
674
- function O(_) {
738
+ function D(_) {
675
739
  if (B)
676
740
  return _ ? /* @__PURE__ */ t.jsx(
677
741
  "img",
@@ -682,7 +746,7 @@ const Di = (o) => {
682
746
  height: 16
683
747
  }
684
748
  ) : /* @__PURE__ */ t.jsx(
685
- v,
749
+ j,
686
750
  {
687
751
  name: "Image",
688
752
  width: 16,
@@ -692,19 +756,19 @@ const Di = (o) => {
692
756
  );
693
757
  }
694
758
  const z = (_) => {
695
- const { active: E, over: T } = _;
696
- if (T && E.id !== T.id) {
697
- const D = n.findIndex((W) => W.id === E.id), nt = n.findIndex((W) => W.id === T.id);
698
- if (D !== -1 && nt !== -1) {
699
- const W = [...n], [K] = W.splice(D, 1);
759
+ const { active: R, over: T } = _;
760
+ if (T && R.id !== T.id) {
761
+ const L = n.findIndex((W) => W.id === R.id), nt = n.findIndex((W) => W.id === T.id);
762
+ if (L !== -1 && nt !== -1) {
763
+ const W = [...n], [K] = W.splice(L, 1);
700
764
  W.splice(nt, 0, K), i(W);
701
765
  }
702
766
  }
703
767
  }, Z = (_) => {
704
768
  var T;
705
- const E = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
769
+ const R = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
706
770
  p && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
707
- v,
771
+ j,
708
772
  {
709
773
  name: "DotsSixVertical",
710
774
  hoverable: !0,
@@ -712,38 +776,38 @@ const Di = (o) => {
712
776
  height: 20
713
777
  }
714
778
  ) }),
715
- j === "select" && S && /* @__PURE__ */ t.jsx(
716
- lt,
779
+ b === "select" && S && /* @__PURE__ */ t.jsx(
780
+ rt,
717
781
  {
718
- onChange: (D) => {
782
+ onChange: (L) => {
719
783
  const W = [...n].map((K) => K.id === _.id ? {
720
784
  ..._,
721
785
  name: {
722
- "en-US": D
786
+ "en-US": L
723
787
  }
724
788
  } : K);
725
- R({
789
+ M({
726
790
  ..._,
727
791
  name: {
728
- "en-US": D
792
+ "en-US": L
729
793
  }
730
794
  }), i([...W]);
731
795
  },
732
796
  value: _.name["en-US"],
733
797
  options: S.filter(
734
- (D) => !n.find((nt) => nt.name["en-US"] === D)
798
+ (L) => !n.find((nt) => nt.name["en-US"] === L)
735
799
  ),
736
- leftAddon: O(_.images)
800
+ leftAddon: D(_.images)
737
801
  }
738
802
  ),
739
- j === "input" && /* @__PURE__ */ t.jsx(
740
- pt,
803
+ b === "input" && /* @__PURE__ */ t.jsx(
804
+ yt,
741
805
  {
742
- onChange: (D) => {
806
+ onChange: (L) => {
743
807
  const W = [...n].map((K) => K.id === _.id ? {
744
808
  ..._,
745
809
  name: {
746
- "en-US": D
810
+ "en-US": L
747
811
  }
748
812
  } : K);
749
813
  i([...W]);
@@ -752,55 +816,55 @@ const Di = (o) => {
752
816
  placeholder: d
753
817
  }
754
818
  ),
755
- j === "image" && /* @__PURE__ */ t.jsx(
819
+ b === "image" && /* @__PURE__ */ t.jsx(
756
820
  Tt,
757
821
  {
758
- onChange: (D) => {
822
+ onChange: (L) => {
759
823
  const W = [...n].map((K) => K.id === _.id ? {
760
824
  ..._,
761
- images: D
825
+ images: L
762
826
  } : K);
763
827
  i([...W]);
764
828
  },
765
- activeImage: (T = n.find((D) => D.id === _.id)) == null ? void 0 : T.images[0]
829
+ activeImage: (T = n.find((L) => L.id === _.id)) == null ? void 0 : T.images[0]
766
830
  }
767
831
  ),
768
832
  /* @__PURE__ */ t.jsxs("div", { className: H.buttons, children: [
769
833
  m && /* @__PURE__ */ t.jsx("div", { className: H.deleteButton, children: /* @__PURE__ */ t.jsx(
770
- v,
834
+ j,
771
835
  {
772
836
  name: "Sliders",
773
837
  hoverable: !0,
774
838
  width: 20,
775
839
  height: 20,
776
- onClick: (D) => U(D, _)
840
+ onClick: (L) => U(L, _)
777
841
  }
778
842
  ) }),
779
- r && /* @__PURE__ */ t.jsx("div", { className: H.deleteButton, children: /* @__PURE__ */ t.jsx(
780
- v,
843
+ l && /* @__PURE__ */ t.jsx("div", { className: H.deleteButton, children: /* @__PURE__ */ t.jsx(
844
+ j,
781
845
  {
782
846
  name: "Trash",
783
847
  hoverable: !0,
784
848
  width: 20,
785
849
  height: 20,
786
850
  fill: "#C12A2A",
787
- onClick: () => i(n.filter((D) => D.id !== _.id))
851
+ onClick: () => i(n.filter((L) => L.id !== _.id))
788
852
  }
789
853
  ) })
790
854
  ] })
791
855
  ] });
792
856
  return p ? /* @__PURE__ */ t.jsx(
793
- Ge,
857
+ Qe,
794
858
  {
795
859
  product: _,
796
- children: E
860
+ children: R
797
861
  },
798
862
  _.id
799
863
  ) : /* @__PURE__ */ t.jsx(
800
864
  "div",
801
865
  {
802
866
  className: H.product,
803
- children: E
867
+ children: R
804
868
  },
805
869
  _.id
806
870
  );
@@ -816,30 +880,30 @@ const Di = (o) => {
816
880
  }
817
881
  )
818
882
  ] }),
819
- $ && m && q && f && /* @__PURE__ */ t.jsx(
883
+ v && m && q && y && /* @__PURE__ */ t.jsx(
820
884
  Pt,
821
885
  {
822
886
  ref: P,
823
- activeItem: $,
824
- setActiveItem: R,
825
- popupPosition: L,
887
+ activeItem: v,
888
+ setActiveItem: M,
889
+ popupPosition: O,
826
890
  modalOptions: q,
827
891
  setIsOpenModal: N
828
892
  }
829
893
  ),
830
- g && y && /* @__PURE__ */ t.jsx(St, { ...y }),
894
+ g && k && /* @__PURE__ */ t.jsx(St, { ...k }),
831
895
  /* @__PURE__ */ t.jsxs("div", { className: H.products, children: [
832
- l && /* @__PURE__ */ t.jsx("h5", { className: H.subtitle, children: l }),
896
+ r && /* @__PURE__ */ t.jsx("h5", { className: H.subtitle, children: r }),
833
897
  p ? /* @__PURE__ */ t.jsx(
834
- vt,
898
+ pt,
835
899
  {
836
900
  sensors: A,
837
901
  onDragEnd: z,
838
902
  children: /* @__PURE__ */ t.jsx(
839
- jt,
903
+ _t,
840
904
  {
841
905
  items: n.map((_) => _.id),
842
- strategy: bt,
906
+ strategy: gt,
843
907
  children: n.map((_) => Z(_))
844
908
  }
845
909
  )
@@ -858,41 +922,41 @@ const Di = (o) => {
858
922
  {
859
923
  withoutHover: !0,
860
924
  className: V(H.button, {
861
- [H.disabled]: !!(h && h <= n.length)
925
+ [H.disabled]: !!(f && f <= n.length)
862
926
  }),
863
927
  size: "s",
864
- disabled: !!(h && h <= n.length),
928
+ disabled: !!(f && f <= n.length),
865
929
  onClick: () => {
866
930
  const _ = [...n];
867
- let E = null;
931
+ let R = null;
868
932
  if (S) {
869
933
  for (let T = 0; T < S.length; T++)
870
- if (!n.find((D) => D.name["en-US"] === S[T])) {
871
- E = S[T];
934
+ if (!n.find((L) => L.name["en-US"] === S[T])) {
935
+ R = S[T];
872
936
  break;
873
937
  }
874
938
  }
875
- j === "select" && S ? _.push({
939
+ b === "select" && S ? _.push({
876
940
  name: {
877
- "en-US": E || S[0]
941
+ "en-US": R || S[0]
878
942
  },
879
943
  id: at(),
880
- ...k,
944
+ ...E,
881
945
  maxSymbols: 100
882
946
  // пример значения
883
- }) : j === "input" ? _.push({
947
+ }) : b === "input" ? _.push({
884
948
  name: {
885
949
  "en-US": ""
886
950
  },
887
951
  id: at(),
888
- ...k,
952
+ ...E,
889
953
  maxSymbols: 100
890
954
  }) : _.push({
891
955
  name: {
892
956
  "en-US": `Image ${n.length + 1}`
893
957
  },
894
958
  id: at(),
895
- ...k,
959
+ ...E,
896
960
  maxSymbols: 100
897
961
  }), i(_);
898
962
  },
@@ -902,7 +966,7 @@ const Di = (o) => {
902
966
  children: /* @__PURE__ */ t.jsxs("div", { className: H.addButton, children: [
903
967
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
904
968
  /* @__PURE__ */ t.jsx(
905
- v,
969
+ j,
906
970
  {
907
971
  name: "Plus",
908
972
  width: 16,
@@ -915,82 +979,82 @@ const Di = (o) => {
915
979
  }
916
980
  )
917
981
  ] }),
918
- c !== void 0 && /* @__PURE__ */ t.jsx(_t, { items: c })
982
+ c !== void 0 && /* @__PURE__ */ t.jsx(It, { items: c })
919
983
  ] });
920
- }, Qe = "_subtitle_jql1y_1", Xe = "_header_jql1y_8", Je = "_text_jql1y_9", Ke = "_productsBlock_jql1y_10", Ze = "_buttonsBlock_jql1y_11", tn = "_top_jql1y_23", en = "_itemsBlock_jql1y_32", nn = "_typeTexts_jql1y_38", sn = "_block_jql1y_45", an = "_active_jql1y_58", on = "_products_jql1y_10", cn = "_product_jql1y_10", ln = "_button_jql1y_11", rn = "_image_jql1y_88", dn = "_info_jql1y_95", un = "_name_jql1y_107", mn = "_buttons_jql1y_11", hn = "_modal_jql1y_118", pn = "_other_jql1y_138", _n = "_options_jql1y_144", gn = "_addButton_jql1y_150", fn = "_deleteButton_jql1y_165", tt = {
921
- subtitle: Qe,
922
- header: Xe,
923
- text: Je,
924
- productsBlock: Ke,
925
- buttonsBlock: Ze,
926
- top: tn,
927
- itemsBlock: en,
928
- typeTexts: nn,
929
- block: sn,
930
- active: an,
931
- products: on,
932
- product: cn,
984
+ }, Xe = "_subtitle_jql1y_1", Je = "_header_jql1y_8", Ke = "_text_jql1y_9", Ze = "_productsBlock_jql1y_10", tn = "_buttonsBlock_jql1y_11", en = "_top_jql1y_23", nn = "_itemsBlock_jql1y_32", sn = "_typeTexts_jql1y_38", an = "_block_jql1y_45", on = "_active_jql1y_58", cn = "_products_jql1y_10", rn = "_product_jql1y_10", ln = "_button_jql1y_11", dn = "_image_jql1y_88", un = "_info_jql1y_95", mn = "_name_jql1y_107", hn = "_buttons_jql1y_11", pn = "_modal_jql1y_118", _n = "_other_jql1y_138", gn = "_options_jql1y_144", fn = "_addButton_jql1y_150", xn = "_deleteButton_jql1y_165", tt = {
985
+ subtitle: Xe,
986
+ header: Je,
987
+ text: Ke,
988
+ productsBlock: Ze,
989
+ buttonsBlock: tn,
990
+ top: en,
991
+ itemsBlock: nn,
992
+ typeTexts: sn,
993
+ block: an,
994
+ active: on,
995
+ products: cn,
996
+ product: rn,
933
997
  button: ln,
934
- image: rn,
935
- info: dn,
936
- name: un,
937
- buttons: mn,
938
- modal: hn,
939
- other: pn,
940
- options: _n,
941
- addButton: gn,
942
- deleteButton: fn
943
- }, xn = (o) => {
944
- const { buttons: s, setButtons: e, deletable: n = !0, addable: i = !0, editableLink: c = !0 } = o, { pages: u } = rt(), [l, m] = x.useState(null), [p, B] = x.useState({
998
+ image: dn,
999
+ info: un,
1000
+ name: mn,
1001
+ buttons: hn,
1002
+ modal: pn,
1003
+ other: _n,
1004
+ options: gn,
1005
+ addButton: fn,
1006
+ deleteButton: xn
1007
+ }, vn = (o) => {
1008
+ const { buttons: s, setButtons: e, deletable: n = !0, addable: i = !0, editableLink: c = !0 } = o, { pages: u } = lt(), [r, m] = x.useState(null), [p, B] = x.useState({
945
1009
  top: 0,
946
1010
  left: 0
947
- }), [r, a] = x.useState(null), j = x.useRef(null);
1011
+ }), [l, a] = x.useState(null), b = x.useRef(null);
948
1012
  x.useEffect(() => {
949
- if (l) {
950
- const g = [...s].map((y) => y.id === l.id ? l : y);
1013
+ if (r) {
1014
+ const g = [...s].map((k) => k.id === r.id ? r : k);
951
1015
  e(g);
952
1016
  }
953
- }, [l]), x.useEffect(() => {
954
- if (j.current && r) {
955
- const g = j.current.getBoundingClientRect().height, y = window.innerHeight;
956
- let q = r.top;
957
- q + g > y + window.scrollY - 200 && (q = y + window.scrollY - g - 200), q < 0 && (q = 10), B({
1017
+ }, [r]), x.useEffect(() => {
1018
+ if (b.current && l) {
1019
+ const g = b.current.getBoundingClientRect().height, k = window.innerHeight;
1020
+ let q = l.top;
1021
+ q + g > k + window.scrollY - 200 && (q = k + window.scrollY - g - 200), q < 0 && (q = 10), B({
958
1022
  top: q,
959
- left: r.left
1023
+ left: l.left
960
1024
  });
961
1025
  }
962
- }, [j.current, r]);
963
- const d = (g, y) => {
1026
+ }, [b.current, l]);
1027
+ const d = (g, k) => {
964
1028
  g.stopPropagation();
965
1029
  const q = g.target.getBoundingClientRect();
966
1030
  a({
967
1031
  top: q.top + window.scrollY - 70,
968
1032
  left: q.left - (i ? 30 : 65)
969
- }), m(y);
970
- }, S = (g, y) => {
971
- const q = [...s], k = {
1033
+ }), m(k);
1034
+ }, S = (g, k) => {
1035
+ const q = [...s], E = {
972
1036
  ...g,
973
1037
  id: Math.random().toString(36).substr(2, 9)
974
1038
  // Генерируем новый уникальный ID
975
1039
  };
976
- q.splice(y + 1, 0, k), e(q);
1040
+ q.splice(k + 1, 0, E), e(q);
977
1041
  };
978
1042
  return /* @__PURE__ */ t.jsxs("div", { className: tt.products, children: [
979
1043
  /* @__PURE__ */ t.jsx("h5", { className: tt.subtitle, children: "Button Type" }),
980
- s.map((g, y) => /* @__PURE__ */ t.jsxs(
1044
+ s.map((g, k) => /* @__PURE__ */ t.jsxs(
981
1045
  "div",
982
1046
  {
983
1047
  className: tt.product,
984
1048
  children: [
985
1049
  /* @__PURE__ */ t.jsx(
986
- lt,
1050
+ rt,
987
1051
  {
988
1052
  onChange: (q) => {
989
- const h = [...s].map(($) => $.id === g.id ? {
1053
+ const f = [...s].map((v) => v.id === g.id ? {
990
1054
  ...g,
991
1055
  type: q
992
- } : $);
993
- e(h);
1056
+ } : v);
1057
+ e(f);
994
1058
  },
995
1059
  value: g.type,
996
1060
  options: ["Primary", "Secondary", "Tertiary"]
@@ -998,19 +1062,19 @@ const Di = (o) => {
998
1062
  ),
999
1063
  /* @__PURE__ */ t.jsxs("div", { className: tt.buttons, children: [
1000
1064
  /* @__PURE__ */ t.jsx("div", { className: tt.deleteButton, children: /* @__PURE__ */ t.jsx(
1001
- v,
1065
+ j,
1002
1066
  {
1003
1067
  name: "Copy",
1004
1068
  hoverable: !0,
1005
1069
  width: 20,
1006
1070
  height: 20,
1007
1071
  onClick: () => {
1008
- S(g, y);
1072
+ S(g, k);
1009
1073
  }
1010
1074
  }
1011
1075
  ) }),
1012
1076
  /* @__PURE__ */ t.jsx("div", { className: tt.deleteButton, children: /* @__PURE__ */ t.jsx(
1013
- v,
1077
+ j,
1014
1078
  {
1015
1079
  name: "Sliders",
1016
1080
  hoverable: !0,
@@ -1022,12 +1086,12 @@ const Di = (o) => {
1022
1086
  }
1023
1087
  ) }),
1024
1088
  n && /* @__PURE__ */ t.jsx("div", { className: tt.deleteButton, children: /* @__PURE__ */ t.jsx(
1025
- v,
1089
+ j,
1026
1090
  {
1027
1091
  name: "Trash",
1028
1092
  hoverable: !0,
1029
1093
  onClick: () => {
1030
- const q = s.filter((k) => k.id !== g.id);
1094
+ const q = s.filter((E) => E.id !== g.id);
1031
1095
  e(q);
1032
1096
  },
1033
1097
  width: 20,
@@ -1040,11 +1104,11 @@ const Di = (o) => {
1040
1104
  },
1041
1105
  g.id
1042
1106
  )),
1043
- l && /* @__PURE__ */ t.jsx(
1107
+ r && /* @__PURE__ */ t.jsx(
1044
1108
  Mt,
1045
1109
  {
1046
- ref: j,
1047
- activeButton: l,
1110
+ ref: b,
1111
+ activeButton: r,
1048
1112
  setActiveButton: m,
1049
1113
  popupPosition: p,
1050
1114
  editableLink: c
@@ -1094,7 +1158,7 @@ const Di = (o) => {
1094
1158
  children: /* @__PURE__ */ t.jsxs("div", { className: tt.addButton, children: [
1095
1159
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
1096
1160
  /* @__PURE__ */ t.jsx(
1097
- v,
1161
+ j,
1098
1162
  {
1099
1163
  name: "Plus",
1100
1164
  width: 16,
@@ -1107,7 +1171,7 @@ const Di = (o) => {
1107
1171
  }
1108
1172
  )
1109
1173
  ] });
1110
- }, Ri = (o) => {
1174
+ }, Li = (o) => {
1111
1175
  const {
1112
1176
  isActiveButtons: s,
1113
1177
  setIsActiveButtons: e,
@@ -1115,11 +1179,11 @@ const Di = (o) => {
1115
1179
  setButtons: i,
1116
1180
  editableLink: c = !0,
1117
1181
  addable: u = !0,
1118
- deletable: l = !0
1182
+ deletable: r = !0
1119
1183
  } = o;
1120
- return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: mt.buttonsBlock, children: [
1121
- /* @__PURE__ */ t.jsxs("div", { className: mt.top, children: [
1122
- /* @__PURE__ */ t.jsx("h3", { className: mt.title, children: "Buttons" }),
1184
+ return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: jt.buttonsBlock, children: [
1185
+ /* @__PURE__ */ t.jsxs("div", { className: jt.top, children: [
1186
+ /* @__PURE__ */ t.jsx("h3", { className: jt.title, children: "Buttons" }),
1123
1187
  /* @__PURE__ */ t.jsx(
1124
1188
  ot,
1125
1189
  {
@@ -1129,23 +1193,23 @@ const Di = (o) => {
1129
1193
  )
1130
1194
  ] }),
1131
1195
  s && /* @__PURE__ */ t.jsx(
1132
- xn,
1196
+ vn,
1133
1197
  {
1134
1198
  buttons: n,
1135
1199
  setButtons: i,
1136
1200
  editableLink: c,
1137
1201
  addable: u,
1138
- deletable: l
1202
+ deletable: r
1139
1203
  }
1140
1204
  )
1141
1205
  ] }) });
1142
1206
  };
1143
- function vn(o) {
1144
- const { product: s, children: e } = o, { attributes: n, listeners: i, setNodeRef: c, transform: u, transition: l, isDragging: m } = yt({
1207
+ function jn(o) {
1208
+ const { product: s, children: e } = o, { attributes: n, listeners: i, setNodeRef: c, transform: u, transition: r, isDragging: m } = ft({
1145
1209
  id: String(s.listingId)
1146
1210
  }), p = {
1147
- transform: Nt.Transform.toString(u),
1148
- transition: l
1211
+ transform: xt.Transform.toString(u),
1212
+ transition: r
1149
1213
  };
1150
1214
  return /* @__PURE__ */ t.jsx(
1151
1215
  "div",
@@ -1159,7 +1223,7 @@ function vn(o) {
1159
1223
  }
1160
1224
  );
1161
1225
  }
1162
- const Li = (o) => {
1226
+ const zi = (o) => {
1163
1227
  const {
1164
1228
  isActiveItems: s,
1165
1229
  setIsActiveItems: e,
@@ -1167,61 +1231,61 @@ const Li = (o) => {
1167
1231
  setItems: i,
1168
1232
  other: c,
1169
1233
  title: u,
1170
- subtitle: l,
1234
+ subtitle: r,
1171
1235
  editable: m = !0,
1172
1236
  draggable: p = !1,
1173
1237
  withImage: B = !1,
1174
- deletable: r = !0,
1238
+ deletable: l = !0,
1175
1239
  addable: a = !0,
1176
- itemsType: j,
1240
+ itemsType: b,
1177
1241
  itemsOptions: d,
1178
1242
  limit: S
1179
- } = o, [g, y] = x.useState(
1243
+ } = o, [g, k] = x.useState(
1180
1244
  null
1181
- ), [q, k] = x.useState({
1245
+ ), [q, E] = x.useState({
1182
1246
  top: 0,
1183
1247
  left: 0
1184
- }), [h, $] = x.useState(!1), R = gt(
1185
- ft(xt, {
1248
+ }), [f, v] = x.useState(!1), M = ut(
1249
+ mt(ht, {
1186
1250
  activationConstraint: {
1187
1251
  distance: 5
1188
1252
  }
1189
1253
  })
1190
1254
  );
1191
1255
  x.useEffect(() => {
1192
- const f = () => {
1193
- y(null), $(!1);
1256
+ const y = () => {
1257
+ k(null), v(!1);
1194
1258
  };
1195
- return document.body.addEventListener("click", f), y(null), $(!1), () => {
1196
- y(null), $(!1), document.body.removeEventListener("click", f);
1259
+ return document.body.addEventListener("click", y), k(null), v(!1), () => {
1260
+ k(null), v(!1), document.body.removeEventListener("click", y);
1197
1261
  };
1198
1262
  }, []), x.useEffect(() => {
1199
1263
  if (g) {
1200
- const f = [...n].map((N) => N.listingId === g.listingId ? g : N);
1201
- i(f);
1264
+ const y = [...n].map((N) => N.listingId === g.listingId ? g : N);
1265
+ i(y);
1202
1266
  }
1203
1267
  }, [g]);
1204
- const L = (f, N) => {
1205
- f.stopPropagation();
1206
- const A = f.target.getBoundingClientRect(), U = 100, O = window.innerHeight;
1268
+ const O = (y, N) => {
1269
+ y.stopPropagation();
1270
+ const A = y.target.getBoundingClientRect(), U = 100, D = window.innerHeight;
1207
1271
  let z = A.top + window.scrollY;
1208
- z + U > O && (z = O - U - 20), $(!0), k({
1272
+ z + U > D && (z = D - U - 20), v(!0), E({
1209
1273
  top: z - 80,
1210
1274
  left: A.left - 30
1211
- }), y(N);
1275
+ }), k(N);
1212
1276
  };
1213
- function I(f) {
1277
+ function I(y) {
1214
1278
  if (B)
1215
- return f ? /* @__PURE__ */ t.jsx(
1279
+ return y ? /* @__PURE__ */ t.jsx(
1216
1280
  "img",
1217
1281
  {
1218
- src: `https://imagedelivery.net/${f}/w=1000`,
1282
+ src: `https://imagedelivery.net/${y}/w=1000`,
1219
1283
  alt: "image",
1220
1284
  width: 16,
1221
1285
  height: 16
1222
1286
  }
1223
1287
  ) : /* @__PURE__ */ t.jsx(
1224
- v,
1288
+ j,
1225
1289
  {
1226
1290
  name: "Image",
1227
1291
  width: 16,
@@ -1230,21 +1294,21 @@ const Li = (o) => {
1230
1294
  }
1231
1295
  );
1232
1296
  }
1233
- const b = (f) => {
1234
- const { active: N, over: A } = f;
1297
+ const h = (y) => {
1298
+ const { active: N, over: A } = y;
1235
1299
  if (A && N.id !== A.id) {
1236
- const U = n.findIndex((z) => String(z.listingId) === N.id), O = n.findIndex((z) => String(z.listingId) === A.id);
1237
- if (U !== -1 && O !== -1) {
1300
+ const U = n.findIndex((z) => String(z.listingId) === N.id), D = n.findIndex((z) => String(z.listingId) === A.id);
1301
+ if (U !== -1 && D !== -1) {
1238
1302
  const z = [...n], [Z] = z.splice(U, 1);
1239
- z.splice(O, 0, Z), i(z);
1303
+ z.splice(D, 0, Z), i(z);
1240
1304
  }
1241
1305
  }
1242
- }, M = (f, N) => {
1243
- const A = d.find((O) => f.listingId === O.id);
1306
+ }, $ = (y, N) => {
1307
+ const A = d.find((D) => y.listingId === D.id);
1244
1308
  if (!A) return null;
1245
1309
  const U = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1246
1310
  p && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1247
- v,
1311
+ j,
1248
1312
  {
1249
1313
  name: "DotsSixVertical",
1250
1314
  hoverable: !0,
@@ -1252,66 +1316,66 @@ const Li = (o) => {
1252
1316
  height: 20
1253
1317
  }
1254
1318
  ) }),
1255
- j === "select" && /* @__PURE__ */ t.jsx(
1256
- lt,
1319
+ b === "select" && /* @__PURE__ */ t.jsx(
1320
+ rt,
1257
1321
  {
1258
- onChange: (O) => {
1259
- const z = [...n], Z = d.find((T) => T.productData.name === O);
1322
+ onChange: (D) => {
1323
+ const z = [...n], Z = d.find((T) => T.productData.name === D);
1260
1324
  if (!Z) return;
1261
1325
  const _ = {
1262
1326
  listingId: Z.id,
1263
1327
  image: Z.productData.images.length > 0 ? Z.productData.images[0].cfId : ""
1264
- }, E = z.map((T) => T.listingId === f.listingId ? _ : T);
1265
- y(_), i([...E]);
1328
+ }, R = z.map((T) => T.listingId === y.listingId ? _ : T);
1329
+ k(_), i([...R]);
1266
1330
  },
1267
1331
  value: A.productData.name,
1268
1332
  options: [
1269
- ...d.filter((O) => !n.find((z) => z.listingId === O.id)).map((O) => O.productData.name)
1333
+ ...d.filter((D) => !n.find((z) => z.listingId === D.id)).map((D) => D.productData.name)
1270
1334
  ],
1271
1335
  leftAddon: I(
1272
- f.image || A.productData.images.length > 0 && A.productData.images[0].cfId || ""
1336
+ y.image || A.productData.images.length > 0 && A.productData.images[0].cfId || ""
1273
1337
  )
1274
1338
  },
1275
1339
  N
1276
1340
  ),
1277
1341
  /* @__PURE__ */ t.jsxs("div", { className: G.buttons, children: [
1278
1342
  m && /* @__PURE__ */ t.jsx("div", { className: G.deleteButton, children: /* @__PURE__ */ t.jsx(
1279
- v,
1343
+ j,
1280
1344
  {
1281
1345
  name: "Sliders",
1282
1346
  hoverable: !0,
1283
1347
  width: 20,
1284
1348
  height: 20,
1285
- onClick: (O) => L(O, f)
1349
+ onClick: (D) => O(D, y)
1286
1350
  }
1287
1351
  ) }),
1288
- r && /* @__PURE__ */ t.jsx("div", { className: G.deleteButton, children: /* @__PURE__ */ t.jsx(
1289
- v,
1352
+ l && /* @__PURE__ */ t.jsx("div", { className: G.deleteButton, children: /* @__PURE__ */ t.jsx(
1353
+ j,
1290
1354
  {
1291
1355
  name: "Trash",
1292
1356
  hoverable: !0,
1293
1357
  width: 20,
1294
1358
  height: 20,
1295
1359
  fill: "#C12A2A",
1296
- onClick: () => i(n.filter((O) => O !== f))
1360
+ onClick: () => i(n.filter((D) => D !== y))
1297
1361
  }
1298
1362
  ) })
1299
1363
  ] })
1300
1364
  ] });
1301
1365
  return p ? /* @__PURE__ */ t.jsx(
1302
- vn,
1366
+ jn,
1303
1367
  {
1304
- product: f,
1368
+ product: y,
1305
1369
  children: U
1306
1370
  },
1307
- f.listingId
1371
+ y.listingId
1308
1372
  ) : /* @__PURE__ */ t.jsx(
1309
1373
  "div",
1310
1374
  {
1311
1375
  className: G.product,
1312
1376
  children: U
1313
1377
  },
1314
- f.listingId
1378
+ y.listingId
1315
1379
  );
1316
1380
  }, P = x.useRef(null);
1317
1381
  return /* @__PURE__ */ t.jsxs("div", { className: G.productsBlock, children: [
@@ -1321,38 +1385,38 @@ const Li = (o) => {
1321
1385
  ot,
1322
1386
  {
1323
1387
  current: s,
1324
- onChange: (f) => e == null ? void 0 : e(f)
1388
+ onChange: (y) => e == null ? void 0 : e(y)
1325
1389
  }
1326
1390
  )
1327
1391
  ] }),
1328
- h && g && /* @__PURE__ */ t.jsx(
1392
+ f && g && /* @__PURE__ */ t.jsx(
1329
1393
  At,
1330
1394
  {
1331
1395
  ref: P,
1332
1396
  activeItem: g,
1333
- setActiveItem: y,
1334
- setIsOpenModal: $,
1397
+ setActiveItem: k,
1398
+ setIsOpenModal: v,
1335
1399
  popupPosition: q,
1336
1400
  itemsOptions: d
1337
1401
  }
1338
1402
  ),
1339
1403
  s && /* @__PURE__ */ t.jsxs("div", { className: G.products, children: [
1340
- l && /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: l }),
1404
+ r && /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: r }),
1341
1405
  p ? /* @__PURE__ */ t.jsx(
1342
- vt,
1406
+ pt,
1343
1407
  {
1344
- sensors: R,
1345
- onDragEnd: b,
1408
+ sensors: M,
1409
+ onDragEnd: h,
1346
1410
  children: /* @__PURE__ */ t.jsx(
1347
- jt,
1411
+ _t,
1348
1412
  {
1349
- items: n.map((f) => String(f.listingId)),
1350
- strategy: bt,
1351
- children: n.map((f, N) => M(f, N))
1413
+ items: n.map((y) => String(y.listingId)),
1414
+ strategy: gt,
1415
+ children: n.map((y, N) => $(y, N))
1352
1416
  }
1353
1417
  )
1354
1418
  }
1355
- ) : n.map((f, N) => M(f, N)),
1419
+ ) : n.map((y, N) => $(y, N)),
1356
1420
  a && /* @__PURE__ */ t.jsx(
1357
1421
  "div",
1358
1422
  {
@@ -1368,16 +1432,16 @@ const Li = (o) => {
1368
1432
  className: G.button,
1369
1433
  size: "s",
1370
1434
  onClick: () => {
1371
- const f = [...n];
1435
+ const y = [...n];
1372
1436
  for (let N = 0; N < d.length; N++)
1373
1437
  if (!n.find((A) => A.listingId === d[N].id)) {
1374
- f.push({
1438
+ y.push({
1375
1439
  listingId: d[N].id,
1376
1440
  image: d[N].productData.images.length > 0 ? d[N].productData.images[0].cfId : ""
1377
1441
  });
1378
1442
  break;
1379
1443
  }
1380
- i(f);
1444
+ i(y);
1381
1445
  },
1382
1446
  disabled: n.length === (S || d.length),
1383
1447
  style: {
@@ -1386,7 +1450,7 @@ const Li = (o) => {
1386
1450
  children: /* @__PURE__ */ t.jsxs("div", { className: G.addButton, children: [
1387
1451
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
1388
1452
  /* @__PURE__ */ t.jsx(
1389
- v,
1453
+ j,
1390
1454
  {
1391
1455
  name: "Plus",
1392
1456
  width: 16,
@@ -1399,108 +1463,108 @@ const Li = (o) => {
1399
1463
  }
1400
1464
  )
1401
1465
  ] }),
1402
- s && c !== void 0 && /* @__PURE__ */ t.jsx(_t, { items: c })
1466
+ s && c !== void 0 && /* @__PURE__ */ t.jsx(It, { items: c })
1403
1467
  ] });
1404
- }, jn = "_options_1vlf9_1", bn = "_price_1vlf9_13", yn = "_oldPrice_1vlf9_20", Nn = "_newPrice_1vlf9_28", In = "_animate_1vlf9_35", kn = "_appearAndBounce_1vlf9_1", Cn = "_meta_1vlf9_53", Sn = "_info_1vlf9_59", wn = "_infoRight_1vlf9_67", $n = "_buttons_1vlf9_74", qn = "_variants_1vlf9_81", Bn = "_variant_1vlf9_81", Pn = "_stock_1vlf9_99", Tn = "_variantInfo_1vlf9_106", Mn = "_quantity_1vlf9_112", An = "_count_1vlf9_119", On = "_focused_1vlf9_136", En = "_button_1vlf9_74", Dn = "_activeVariant_1vlf9_162", Rn = "_chargeTypes_1vlf9_166", Ln = "_charge_1vlf9_166", zn = "_chargeActive_1vlf9_191", Fn = "_title_1vlf9_199", w = {
1405
- options: jn,
1406
- price: bn,
1407
- oldPrice: yn,
1468
+ }, bn = "_options_1vlf9_1", yn = "_price_1vlf9_13", In = "_oldPrice_1vlf9_20", Nn = "_newPrice_1vlf9_28", kn = "_animate_1vlf9_35", Cn = "_appearAndBounce_1vlf9_1", Sn = "_meta_1vlf9_53", $n = "_info_1vlf9_59", wn = "_infoRight_1vlf9_67", qn = "_buttons_1vlf9_74", Bn = "_variants_1vlf9_81", Pn = "_variant_1vlf9_81", Tn = "_stock_1vlf9_99", Mn = "_variantInfo_1vlf9_106", An = "_quantity_1vlf9_112", On = "_count_1vlf9_119", En = "_focused_1vlf9_136", Dn = "_button_1vlf9_74", Rn = "_activeVariant_1vlf9_162", Ln = "_chargeTypes_1vlf9_166", zn = "_charge_1vlf9_166", Fn = "_chargeActive_1vlf9_191", Vn = "_title_1vlf9_199", w = {
1469
+ options: bn,
1470
+ price: yn,
1471
+ oldPrice: In,
1408
1472
  newPrice: Nn,
1409
- animate: In,
1410
- appearAndBounce: kn,
1411
- meta: Cn,
1412
- info: Sn,
1473
+ animate: kn,
1474
+ appearAndBounce: Cn,
1475
+ meta: Sn,
1476
+ info: $n,
1413
1477
  infoRight: wn,
1414
- buttons: $n,
1415
- variants: qn,
1416
- variant: Bn,
1417
- stock: Pn,
1418
- variantInfo: Tn,
1419
- quantity: Mn,
1420
- count: An,
1421
- focused: On,
1422
- button: En,
1423
- activeVariant: Dn,
1424
- chargeTypes: Rn,
1425
- charge: Ln,
1426
- chargeActive: zn,
1427
- title: Fn
1478
+ buttons: qn,
1479
+ variants: Bn,
1480
+ variant: Pn,
1481
+ stock: Tn,
1482
+ variantInfo: Mn,
1483
+ quantity: An,
1484
+ count: On,
1485
+ focused: En,
1486
+ button: Dn,
1487
+ activeVariant: Rn,
1488
+ chargeTypes: Ln,
1489
+ charge: zn,
1490
+ chargeActive: Fn,
1491
+ title: Vn
1428
1492
  };
1429
1493
  var Ct = /* @__PURE__ */ ((o) => (o.ONE_TIME = "One-Time", o.RECURRING = "Subscribe & Save", o))(Ct || {});
1430
- const Vn = (o) => {
1431
- var q, k;
1494
+ const Un = (o) => {
1495
+ var q, E;
1432
1496
  const { variants: s } = o, [e, n] = x.useState(s[0]), [i, c] = x.useState(
1433
1497
  e.chargeTypes ? e.chargeTypes[0] : "ONE_TIME"
1434
- ), u = ut(), [l, m] = x.useState(1), { products: p, cart: B, reset: r, addProductToCart: a } = dt(), [j, d] = x.useState(!1);
1498
+ ), u = vt(), [r, m] = x.useState(1), { products: p, cart: B, reset: l, addProductToCart: a } = dt(), [b, d] = x.useState(!1);
1435
1499
  console.log(B), x.useEffect(() => {
1436
1500
  d(!0);
1437
- const h = setTimeout(() => d(!1), 600);
1438
- return () => clearTimeout(h);
1439
- }, [l]);
1501
+ const f = setTimeout(() => d(!1), 600);
1502
+ return () => clearTimeout(f);
1503
+ }, [r]);
1440
1504
  async function S() {
1441
1505
  console.log("Products P", p), await a({
1442
1506
  productId: o.id,
1443
1507
  productVariantId: e.id,
1444
- quantity: l
1508
+ quantity: r
1445
1509
  });
1446
1510
  }
1447
1511
  function g() {
1448
- r(), S(), u("/checkout");
1512
+ l(), S(), u("/checkout");
1449
1513
  }
1450
- function y(h) {
1451
- if (h >= 864e5) {
1452
- const b = Math.floor(h / 864e5);
1453
- return `${b} ${b === 1 ? "day" : "days"}`;
1454
- } else if (h >= 36e5) {
1455
- const b = Math.floor(h / 36e5);
1456
- return `${b} ${b === 1 ? "hour" : "hours"}`;
1457
- } else if (h >= 6e4) {
1458
- const b = Math.floor(h / 6e4);
1459
- return `${b} ${b === 1 ? "minute" : "minutes"}`;
1514
+ function k(f) {
1515
+ if (f >= 864e5) {
1516
+ const h = Math.floor(f / 864e5);
1517
+ return `${h} ${h === 1 ? "day" : "days"}`;
1518
+ } else if (f >= 36e5) {
1519
+ const h = Math.floor(f / 36e5);
1520
+ return `${h} ${h === 1 ? "hour" : "hours"}`;
1521
+ } else if (f >= 6e4) {
1522
+ const h = Math.floor(f / 6e4);
1523
+ return `${h} ${h === 1 ? "minute" : "minutes"}`;
1460
1524
  } else {
1461
- const b = Math.floor(h / 1e3);
1462
- return `${b} ${b === 1 ? "second" : "seconds"}`;
1525
+ const h = Math.floor(f / 1e3);
1526
+ return `${h} ${h === 1 ? "second" : "seconds"}`;
1463
1527
  }
1464
1528
  }
1465
1529
  return x.useEffect(() => {
1466
1530
  e.quantity && e.quantity.available === 0 && m(0);
1467
1531
  }, [e.quantity.available]), /* @__PURE__ */ t.jsxs("div", { className: w.options, children: [
1468
- e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: w.chargeTypes, children: e.chargeTypes.map((h) => /* @__PURE__ */ t.jsx(
1532
+ e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: w.chargeTypes, children: e.chargeTypes.map((f) => /* @__PURE__ */ t.jsx(
1469
1533
  "div",
1470
1534
  {
1471
1535
  className: V(w.charge, {
1472
- [w.chargeActive]: i === h
1536
+ [w.chargeActive]: i === f
1473
1537
  }),
1474
- onClick: () => c(h),
1475
- children: Ct[h]
1538
+ onClick: () => c(f),
1539
+ children: Ct[f]
1476
1540
  },
1477
- h
1541
+ f
1478
1542
  )) }),
1479
- /* @__PURE__ */ t.jsx("div", { className: w.variants, children: s.map((h) => {
1480
- var $, R;
1543
+ /* @__PURE__ */ t.jsx("div", { className: w.variants, children: s.map((f) => {
1544
+ var v, M;
1481
1545
  return /* @__PURE__ */ t.jsxs(
1482
1546
  "div",
1483
1547
  {
1484
1548
  className: V(w.variant, {
1485
- [w.activeVariant]: e.id === h.id
1549
+ [w.activeVariant]: e.id === f.id
1486
1550
  }),
1487
- onClick: () => n(h),
1551
+ onClick: () => n(f),
1488
1552
  children: [
1489
1553
  /* @__PURE__ */ t.jsxs("div", { className: w.variantInfo, children: [
1490
- /* @__PURE__ */ t.jsx("span", { className: w.title, children: It(h.name) }),
1554
+ /* @__PURE__ */ t.jsx("span", { className: w.title, children: Nt(f.name) }),
1491
1555
  /* @__PURE__ */ t.jsxs("span", { children: [
1492
1556
  "$",
1493
- i === "ONE_TIME" ? h.price.amount : h.subscriptionSettings ? h.subscriptionSettings.price.amount : "Price Not Found"
1557
+ i === "ONE_TIME" ? f.price.amount : f.subscriptionSettings ? f.subscriptionSettings.price.amount : "Price Not Found"
1494
1558
  ] })
1495
1559
  ] }),
1496
1560
  /* @__PURE__ */ t.jsx("div", { children: i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: w.stock, children: [
1497
- ($ = h.quantity.restrictions) != null && $.max || h.quantity.available !== void 0 ? ((R = h.quantity.restrictions) == null ? void 0 : R.max) || h.quantity.available : "∞",
1561
+ (v = f.quantity.restrictions) != null && v.max || f.quantity.available !== void 0 ? ((M = f.quantity.restrictions) == null ? void 0 : M.max) || f.quantity.available : "∞",
1498
1562
  " ",
1499
1563
  "in stock"
1500
1564
  ] }) })
1501
1565
  ]
1502
1566
  },
1503
- h.id
1567
+ f.id
1504
1568
  );
1505
1569
  }) }),
1506
1570
  i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: w.quantity, children: [
@@ -1509,23 +1573,23 @@ const Vn = (o) => {
1509
1573
  {
1510
1574
  type: "Secondary",
1511
1575
  onClick: () => {
1512
- l > 1 ? m((h) => h - 1) : m(1);
1576
+ r > 1 ? m((f) => f - 1) : m(1);
1513
1577
  },
1514
1578
  className: w.button,
1515
- disabled: e.quantity.available && e.quantity.restrictions && l <= e.quantity.restrictions.min || e.quantity.available === 0,
1516
- children: /* @__PURE__ */ t.jsx(v, { name: "Minus" })
1579
+ disabled: e.quantity.available && e.quantity.restrictions && r <= e.quantity.restrictions.min || e.quantity.available === 0,
1580
+ children: /* @__PURE__ */ t.jsx(j, { name: "Minus" })
1517
1581
  }
1518
1582
  ),
1519
1583
  /* @__PURE__ */ t.jsx(
1520
1584
  Ot,
1521
1585
  {
1522
1586
  type: "number",
1523
- value: String(l),
1524
- onChange: (h) => m(Number(h)),
1587
+ value: String(r),
1588
+ onChange: (f) => m(Number(f)),
1525
1589
  max: ((q = e.quantity.restrictions) == null ? void 0 : q.max) || e.quantity.available || Number.POSITIVE_INFINITY,
1526
- min: ((k = e.quantity.restrictions) == null ? void 0 : k.min) || 0,
1590
+ min: ((E = e.quantity.restrictions) == null ? void 0 : E.min) || 0,
1527
1591
  centered: !0,
1528
- disabled: e.quantity && e.quantity.available === 0 || Object.keys(e.quantity.restrictions || {}).length !== 0 && l >= e.quantity.restrictions.max
1592
+ disabled: e.quantity && e.quantity.available === 0 || Object.keys(e.quantity.restrictions || {}).length !== 0 && r >= e.quantity.restrictions.max
1529
1593
  }
1530
1594
  ),
1531
1595
  /* @__PURE__ */ t.jsx(
@@ -1533,11 +1597,11 @@ const Vn = (o) => {
1533
1597
  {
1534
1598
  type: "Secondary",
1535
1599
  onClick: () => {
1536
- m((h) => h + 1);
1600
+ m((f) => f + 1);
1537
1601
  },
1538
1602
  className: w.button,
1539
- disabled: !!(e.quantity.available && e.quantity.restrictions && l >= e.quantity.restrictions.max || e.quantity.available === 0),
1540
- children: /* @__PURE__ */ t.jsx(v, { name: "Plus" })
1603
+ disabled: !!(e.quantity.available && e.quantity.restrictions && r >= e.quantity.restrictions.max || e.quantity.available === 0),
1604
+ children: /* @__PURE__ */ t.jsx(j, { name: "Plus" })
1541
1605
  }
1542
1606
  )
1543
1607
  ] }),
@@ -1546,7 +1610,7 @@ const Vn = (o) => {
1546
1610
  /* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
1547
1611
  /* @__PURE__ */ t.jsxs("div", { className: w.infoRight, children: [
1548
1612
  /* @__PURE__ */ t.jsx(
1549
- v,
1613
+ j,
1550
1614
  {
1551
1615
  name: "Lightning",
1552
1616
  fill: "#FF3F19",
@@ -1554,25 +1618,25 @@ const Vn = (o) => {
1554
1618
  height: 20
1555
1619
  }
1556
1620
  ),
1557
- /* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : y(e.deliveryTime) })
1621
+ /* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : k(e.deliveryTime) })
1558
1622
  ] })
1559
1623
  ] }),
1560
1624
  /* @__PURE__ */ t.jsxs("div", { className: w.info, children: [
1561
1625
  /* @__PURE__ */ t.jsx("span", { children: "Price" }),
1562
1626
  /* @__PURE__ */ t.jsx("div", { className: w.infoRight, children: i === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: w.price, children: [
1563
- /* @__PURE__ */ t.jsxs("span", { className: V(w.newPrice, { [w.animate]: j }), children: [
1627
+ /* @__PURE__ */ t.jsxs("span", { className: V(w.newPrice, { [w.animate]: b }), children: [
1564
1628
  "$ ",
1565
- (e.price.amount || 0) * l
1629
+ (e.price.amount || 0) * r
1566
1630
  ] }),
1567
1631
  /* @__PURE__ */ t.jsxs("span", { className: w.oldPrice, children: [
1568
1632
  "$ ",
1569
- (e.compareAtPrice.amount || 0) * l
1633
+ (e.compareAtPrice.amount || 0) * r
1570
1634
  ] })
1571
- ] }) : /* @__PURE__ */ t.jsxs("span", { className: V(w.newPrice, { [w.animate]: j }), children: [
1635
+ ] }) : /* @__PURE__ */ t.jsxs("span", { className: V(w.newPrice, { [w.animate]: b }), children: [
1572
1636
  "$ ",
1573
- (e.price.amount || 0) * l
1637
+ (e.price.amount || 0) * r
1574
1638
  ] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: w.price, children: [
1575
- /* @__PURE__ */ t.jsxs("span", { className: V(w.newPrice, { [w.animate]: j }), children: [
1639
+ /* @__PURE__ */ t.jsxs("span", { className: V(w.newPrice, { [w.animate]: b }), children: [
1576
1640
  "$ ",
1577
1641
  e.subscriptionSettings.price.amount || 0
1578
1642
  ] }),
@@ -1580,7 +1644,7 @@ const Vn = (o) => {
1580
1644
  "$ ",
1581
1645
  e.subscriptionSettings.compareAtPrice.amount || 0
1582
1646
  ] })
1583
- ] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: V(w.newPrice, { [w.animate]: j }), children: [
1647
+ ] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: V(w.newPrice, { [w.animate]: b }), children: [
1584
1648
  "$ ",
1585
1649
  e.subscriptionSettings.price.amount || 0
1586
1650
  ] }) })
@@ -1607,85 +1671,85 @@ const Vn = (o) => {
1607
1671
  )
1608
1672
  ] })
1609
1673
  ] });
1610
- }, Un = "_button_14q75_1", Hn = "_login_14q75_14", Yn = "_signUp_14q75_18", Wn = "_buttons_14q75_23", Gn = "_modal_14q75_32", Qn = "_closing_14q75_64", Xn = "_info_14q75_113", Jn = "_top_14q75_120", Kn = "_title_14q75_131", Zn = "_clear_14q75_138", ts = "_activeClear_14q75_145", es = "_count_14q75_149", ns = "_cart_14q75_164", ss = "_empty_14q75_172", is = "_product_14q75_198", as = "_products_14q75_207", os = "_image_14q75_215", cs = "_productInfo_14q75_230", ls = "_content_14q75_237", rs = "_name_14q75_243", ds = "_price_14q75_249", us = "_productButtons_14q75_255", ms = "_productButton_14q75_255", hs = "_productCount_14q75_272", ps = "_bottom_14q75_289", _s = "_subtotal_14q75_297", gs = "_block_14q75_305", fs = "_shoppingCount_14q75_312", xs = "_total_14q75_332", vs = "_link_14q75_338", js = "_userInfo_14q75_345", bs = "_pagesMobileModal_14q75_356", ys = "_pagesMobileModalContent_14q75_370", Ns = "_pagesMobileModalHeader_14q75_376", Is = "_pagesMobileModalFooter_14q75_386", C = {
1611
- button: Un,
1612
- login: Hn,
1613
- signUp: Yn,
1614
- buttons: Wn,
1615
- modal: Gn,
1674
+ }, Hn = "_button_14q75_1", Yn = "_login_14q75_14", Wn = "_signUp_14q75_18", Gn = "_buttons_14q75_23", Qn = "_modal_14q75_32", Xn = "_closing_14q75_64", Jn = "_info_14q75_113", Kn = "_top_14q75_120", Zn = "_title_14q75_131", ts = "_clear_14q75_138", es = "_activeClear_14q75_145", ns = "_count_14q75_149", ss = "_cart_14q75_164", is = "_empty_14q75_172", as = "_product_14q75_198", os = "_products_14q75_207", cs = "_image_14q75_215", rs = "_productInfo_14q75_230", ls = "_content_14q75_237", ds = "_name_14q75_243", us = "_price_14q75_249", ms = "_productButtons_14q75_255", hs = "_productButton_14q75_255", ps = "_productCount_14q75_272", _s = "_bottom_14q75_289", gs = "_subtotal_14q75_297", fs = "_block_14q75_305", xs = "_shoppingCount_14q75_312", vs = "_total_14q75_332", js = "_link_14q75_338", bs = "_userInfo_14q75_345", ys = "_pagesMobileModal_14q75_356", Is = "_pagesMobileModalContent_14q75_370", Ns = "_pagesMobileModalHeader_14q75_376", ks = "_pagesMobileModalFooter_14q75_386", C = {
1675
+ button: Hn,
1676
+ login: Yn,
1677
+ signUp: Wn,
1678
+ buttons: Gn,
1679
+ modal: Qn,
1616
1680
  "slide-in-fade": "_slide-in-fade_14q75_1",
1617
1681
  "mobile-slide-in-fade": "_mobile-slide-in-fade_14q75_1",
1618
- closing: Qn,
1682
+ closing: Xn,
1619
1683
  "mobile-slide-out-fade": "_mobile-slide-out-fade_14q75_1",
1620
1684
  "slide-out-fade": "_slide-out-fade_14q75_1",
1621
- info: Xn,
1622
- top: Jn,
1623
- title: Kn,
1624
- clear: Zn,
1625
- activeClear: ts,
1626
- count: es,
1627
- cart: ns,
1628
- empty: ss,
1629
- product: is,
1630
- products: as,
1631
- image: os,
1632
- productInfo: cs,
1685
+ info: Jn,
1686
+ top: Kn,
1687
+ title: Zn,
1688
+ clear: ts,
1689
+ activeClear: es,
1690
+ count: ns,
1691
+ cart: ss,
1692
+ empty: is,
1693
+ product: as,
1694
+ products: os,
1695
+ image: cs,
1696
+ productInfo: rs,
1633
1697
  content: ls,
1634
- name: rs,
1635
- price: ds,
1636
- productButtons: us,
1637
- productButton: ms,
1638
- productCount: hs,
1639
- bottom: ps,
1640
- subtotal: _s,
1641
- block: gs,
1642
- shoppingCount: fs,
1643
- total: xs,
1644
- link: vs,
1645
- userInfo: js,
1646
- pagesMobileModal: bs,
1647
- pagesMobileModalContent: ys,
1698
+ name: ds,
1699
+ price: us,
1700
+ productButtons: ms,
1701
+ productButton: hs,
1702
+ productCount: ps,
1703
+ bottom: _s,
1704
+ subtotal: gs,
1705
+ block: fs,
1706
+ shoppingCount: xs,
1707
+ total: vs,
1708
+ link: js,
1709
+ userInfo: bs,
1710
+ pagesMobileModal: ys,
1711
+ pagesMobileModalContent: Is,
1648
1712
  pagesMobileModalHeader: Ns,
1649
- pagesMobileModalFooter: Is
1650
- }, zi = (o) => {
1713
+ pagesMobileModalFooter: ks
1714
+ }, Fi = (o) => {
1651
1715
  const { shopping: s, signUp: e, isShowUserInfo: n = !0 } = o;
1652
1716
  return /* @__PURE__ */ t.jsxs("div", { className: C.buttons, children: [
1653
- s && /* @__PURE__ */ t.jsx(ks, {}),
1717
+ s && /* @__PURE__ */ t.jsx(Cs, {}),
1654
1718
  n && /* @__PURE__ */ t.jsx(Bt, { signUp: e })
1655
1719
  ] });
1656
- }, ks = () => {
1657
- const [o, s] = x.useState(!1), [e, n] = x.useState([]), { cart: i } = dt(), { pageContext: c } = rt();
1720
+ }, Cs = () => {
1721
+ const [o, s] = x.useState(!1), [e, n] = x.useState([]), { cart: i } = dt(), { pageContext: c } = lt();
1658
1722
  function u(a) {
1659
1723
  if (a.variants.length > 0) {
1660
- for (let j = 0; j < i.parts.length; j++)
1724
+ for (let b = 0; b < i.parts.length; b++)
1661
1725
  for (let d = 0; d < a.variants.length; d++)
1662
- if (a.variants[d] && i.parts[j].productVariantId === a.variants[d].id)
1663
- return i.parts[j].productVariantId;
1726
+ if (a.variants[d] && i.parts[b].productVariantId === a.variants[d].id)
1727
+ return i.parts[b].productVariantId;
1664
1728
  }
1665
1729
  return a.variants[0].id;
1666
1730
  }
1667
- function l(a) {
1668
- for (let j = 0; j < i.parts.length; j++)
1731
+ function r(a) {
1732
+ for (let b = 0; b < i.parts.length; b++)
1669
1733
  for (let d = 0; d < a.variants.length; d++)
1670
- if (a.variants[d] && i.parts[j].productVariantId === a.variants[d].id)
1671
- return i.parts[j].quantity;
1734
+ if (a.variants[d] && i.parts[b].productVariantId === a.variants[d].id)
1735
+ return i.parts[b].quantity;
1672
1736
  }
1673
1737
  x.useEffect(() => {
1674
1738
  (async () => {
1675
1739
  var g;
1676
- const j = i.parts.map((y) => String(y.productId)), S = (((g = c == null ? void 0 : c.products) == null ? void 0 : g.filter((y) => j.includes(String(y.id)))) || []).map((y) => ({
1677
- ...y,
1678
- activeVariantId: u(y),
1679
- quantity: l(y)
1740
+ const b = i.parts.map((k) => String(k.productId)), S = (((g = c == null ? void 0 : c.products) == null ? void 0 : g.filter((k) => b.includes(String(k.id)))) || []).map((k) => ({
1741
+ ...k,
1742
+ activeVariantId: u(k),
1743
+ quantity: r(k)
1680
1744
  }));
1681
1745
  n(S);
1682
1746
  })();
1683
1747
  }, [i.parts]);
1684
1748
  function m(a) {
1685
- var j;
1686
- return !a || !(a != null && a.variants) ? !1 : (j = a.variants.find((d) => d.id === a.activeVariantId)) == null ? void 0 : j.subscriptionSettings;
1749
+ var b;
1750
+ return !a || !(a != null && a.variants) ? !1 : (b = a.variants.find((d) => d.id === a.activeVariantId)) == null ? void 0 : b.subscriptionSettings;
1687
1751
  }
1688
- const p = i.parts.length > 0 && e.length > 0 && !m(e[0]), [B, r] = x.useState(!1);
1752
+ const p = i.parts.length > 0 && e.length > 0 && !m(e[0]), [B, l] = x.useState(!1);
1689
1753
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1690
1754
  /* @__PURE__ */ t.jsxs(
1691
1755
  F,
@@ -1696,11 +1760,11 @@ const Vn = (o) => {
1696
1760
  position: "relative"
1697
1761
  },
1698
1762
  onClick: (a) => {
1699
- a.stopPropagation(), window.location.pathname.includes("/admin/builder") || (s(!0), r(!0));
1763
+ a.stopPropagation(), window.location.pathname.includes("/admin/builder") || (s(!0), l(!0));
1700
1764
  },
1701
1765
  children: [
1702
1766
  /* @__PURE__ */ t.jsx(
1703
- v,
1767
+ j,
1704
1768
  {
1705
1769
  name: "Handbag",
1706
1770
  fill: "var(--text-primary)"
@@ -1714,13 +1778,13 @@ const Vn = (o) => {
1714
1778
  kt,
1715
1779
  {
1716
1780
  close: () => {
1717
- r(!1), setTimeout(() => {
1781
+ l(!1), setTimeout(() => {
1718
1782
  s(!1);
1719
1783
  }, 300);
1720
1784
  },
1721
1785
  withAnimation: !1,
1722
1786
  children: /* @__PURE__ */ t.jsx(
1723
- Cs,
1787
+ Ss,
1724
1788
  {
1725
1789
  activeProducts: e,
1726
1790
  isCartNotEmpty: p,
@@ -1730,20 +1794,20 @@ const Vn = (o) => {
1730
1794
  }
1731
1795
  )
1732
1796
  ] });
1733
- }, Cs = (o) => {
1734
- const { activeProducts: s, isCartNotEmpty: e, isOpen: n } = o, { cart: i, reset: c, getTotalAndDiscount: u, updateQuantityOfProduct: l } = dt(), m = ut();
1797
+ }, Ss = (o) => {
1798
+ const { activeProducts: s, isCartNotEmpty: e, isOpen: n } = o, { cart: i, reset: c, getTotalAndDiscount: u, updateQuantityOfProduct: r } = dt(), m = vt();
1735
1799
  function p(a) {
1736
1800
  m(a);
1737
1801
  }
1738
1802
  function B(a) {
1739
- a.quantity && l({
1803
+ a.quantity && r({
1740
1804
  productId: a.id,
1741
1805
  productVariantId: a.activeVariantId,
1742
1806
  quantity: a.quantity + 1
1743
1807
  });
1744
1808
  }
1745
- function r(a) {
1746
- a.quantity && l({
1809
+ function l(a) {
1810
+ a.quantity && r({
1747
1811
  productId: a.id,
1748
1812
  productVariantId: a.activeVariantId,
1749
1813
  quantity: a.quantity - 1
@@ -1791,17 +1855,17 @@ const Vn = (o) => {
1791
1855
  className: C.image
1792
1856
  }
1793
1857
  ) : /* @__PURE__ */ t.jsx("div", { className: C.image, children: /* @__PURE__ */ t.jsx(
1794
- v,
1858
+ j,
1795
1859
  {
1796
1860
  name: "Image",
1797
1861
  fill: "var(--text-secondary)"
1798
1862
  }
1799
1863
  ) }),
1800
1864
  /* @__PURE__ */ t.jsxs("div", { className: C.content, children: [
1801
- /* @__PURE__ */ t.jsx("div", { className: C.name, children: It(a.name) }),
1865
+ /* @__PURE__ */ t.jsx("div", { className: C.name, children: Nt(a.name) }),
1802
1866
  /* @__PURE__ */ t.jsxs("div", { className: C.price, children: [
1803
1867
  "$",
1804
- a.variants.find((j) => j.id === a.activeVariantId).price.amount * ((a == null ? void 0 : a.quantity) || 1)
1868
+ a.variants.find((b) => b.id === a.activeVariantId).price.amount * ((a == null ? void 0 : a.quantity) || 1)
1805
1869
  ] })
1806
1870
  ] })
1807
1871
  ] }),
@@ -1811,12 +1875,12 @@ const Vn = (o) => {
1811
1875
  {
1812
1876
  type: "Secondary",
1813
1877
  onClick: () => {
1814
- a.quantity !== 1 && r(a);
1878
+ a.quantity !== 1 && l(a);
1815
1879
  },
1816
1880
  className: C.productButton,
1817
1881
  disabled: a.quantity === 1,
1818
1882
  children: /* @__PURE__ */ t.jsx(
1819
- v,
1883
+ j,
1820
1884
  {
1821
1885
  name: "Minus",
1822
1886
  fill: "#757575",
@@ -1833,9 +1897,9 @@ const Vn = (o) => {
1833
1897
  type: "Secondary",
1834
1898
  onClick: () => B(a),
1835
1899
  className: C.productButton,
1836
- disabled: a.quantity === a.variants.find((j) => j.id === a.activeVariantId).quantity.available,
1900
+ disabled: a.quantity === a.variants.find((b) => b.id === a.activeVariantId).quantity.available,
1837
1901
  children: /* @__PURE__ */ t.jsx(
1838
- v,
1902
+ j,
1839
1903
  {
1840
1904
  name: "Plus",
1841
1905
  fill: "#757575",
@@ -1855,7 +1919,7 @@ const Vn = (o) => {
1855
1919
  /* @__PURE__ */ t.jsxs("div", { className: C.block, children: [
1856
1920
  /* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
1857
1921
  /* @__PURE__ */ t.jsx(
1858
- v,
1922
+ j,
1859
1923
  {
1860
1924
  name: "Info",
1861
1925
  width: 20,
@@ -1871,13 +1935,13 @@ const Vn = (o) => {
1871
1935
  ] }),
1872
1936
  /* @__PURE__ */ t.jsx(F, { onClick: () => p("/checkout"), children: "Checkout" })
1873
1937
  ] })
1874
- ] }) : /* @__PURE__ */ t.jsx(Ss, {})
1938
+ ] }) : /* @__PURE__ */ t.jsx($s, {})
1875
1939
  ]
1876
1940
  }
1877
1941
  );
1878
- }, Ss = () => /* @__PURE__ */ t.jsxs("div", { className: C.empty, children: [
1942
+ }, $s = () => /* @__PURE__ */ t.jsxs("div", { className: C.empty, children: [
1879
1943
  /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1880
- v,
1944
+ j,
1881
1945
  {
1882
1946
  name: "Handbag",
1883
1947
  fill: "var(--text-secondary)"
@@ -1897,7 +1961,7 @@ const Vn = (o) => {
1897
1961
  )
1898
1962
  ] })
1899
1963
  ] }), Bt = ({ signUp: o, close: s }) => {
1900
- const e = JSON.parse(localStorage.getItem("token") || "{}"), { data: n } = e, i = ut();
1964
+ const e = JSON.parse(localStorage.getItem("token") || "{}"), { data: n } = e, i = vt();
1901
1965
  function c(m) {
1902
1966
  window.location.pathname.includes("/admin/builder") || i(m);
1903
1967
  }
@@ -1931,11 +1995,11 @@ const Vn = (o) => {
1931
1995
  }
1932
1996
  )
1933
1997
  ] });
1934
- const [u, l] = x.useState("test-email@gmail.com");
1998
+ const [u, r] = x.useState("test-email@gmail.com");
1935
1999
  return x.useEffect(() => {
1936
2000
  (async () => {
1937
2001
  const p = Et(n);
1938
- l(p.email);
2002
+ r(p.email);
1939
2003
  })();
1940
2004
  }, [n]), /* @__PURE__ */ t.jsx(
1941
2005
  "div",
@@ -1953,7 +2017,7 @@ const Vn = (o) => {
1953
2017
  setIsOpen: e,
1954
2018
  signUp: n
1955
2019
  }) => {
1956
- const { setIsOpen: i } = wt(), c = () => {
2020
+ const { setIsOpen: i } = $t(), c = () => {
1957
2021
  i(!1), setTimeout(() => {
1958
2022
  e(!1), i(!0);
1959
2023
  }, 300);
@@ -1972,7 +2036,7 @@ const Vn = (o) => {
1972
2036
  type: "Secondary",
1973
2037
  onClick: c,
1974
2038
  children: /* @__PURE__ */ t.jsx(
1975
- v,
2039
+ j,
1976
2040
  {
1977
2041
  name: "X",
1978
2042
  fill: "var(--text-primary)"
@@ -1992,14 +2056,14 @@ const Vn = (o) => {
1992
2056
  ]
1993
2057
  }
1994
2058
  );
1995
- }, Fi = ({
2059
+ }, Vi = ({
1996
2060
  children: o,
1997
2061
  logo: s,
1998
2062
  signUp: e
1999
2063
  }) => {
2000
2064
  const [n, i] = x.useState(!1);
2001
2065
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2002
- /* @__PURE__ */ t.jsx($s, { setIsOpenModal: i }),
2066
+ /* @__PURE__ */ t.jsx(qs, { setIsOpenModal: i }),
2003
2067
  n && /* @__PURE__ */ t.jsx(kt, { close: () => i(!1), children: /* @__PURE__ */ t.jsx(
2004
2068
  ws,
2005
2069
  {
@@ -2010,7 +2074,7 @@ const Vn = (o) => {
2010
2074
  }
2011
2075
  ) })
2012
2076
  ] });
2013
- }, $s = (o) => {
2077
+ }, qs = (o) => {
2014
2078
  const { setIsOpenModal: s } = o;
2015
2079
  return /* @__PURE__ */ t.jsx(
2016
2080
  F,
@@ -2023,7 +2087,7 @@ const Vn = (o) => {
2023
2087
  e.stopPropagation(), window.location.pathname.includes("/admin/builder") || s(!0);
2024
2088
  },
2025
2089
  children: /* @__PURE__ */ t.jsx(
2026
- v,
2090
+ j,
2027
2091
  {
2028
2092
  name: "List",
2029
2093
  fill: "var(--text-primary)"
@@ -2031,20 +2095,20 @@ const Vn = (o) => {
2031
2095
  )
2032
2096
  }
2033
2097
  );
2034
- }, qs = "_share_10urc_1", Bs = "_modal_10urc_9", Ps = "_header_10urc_21", Ts = "_socials_10urc_31", Ms = "_social_10urc_31", As = "_copy_10urc_41", Os = "_title_10urc_48", Es = "_copyWrapper_10urc_54", Ds = "_copyText_10urc_63", Rs = "_copyTextMobile_10urc_76", Ls = "_copyTextMiniMobile_10urc_95", et = {
2035
- share: qs,
2036
- modal: Bs,
2037
- header: Ps,
2038
- socials: Ts,
2039
- social: Ms,
2040
- copy: As,
2041
- title: Os,
2042
- copyWrapper: Es,
2043
- copyText: Ds,
2044
- copyTextMobile: Rs,
2045
- copyTextMiniMobile: Ls
2046
- }, Vi = ({ title: o = "Copy Product Link" }) => {
2047
- const { isOpenModal: s, setIsOpenModal: e } = $t();
2098
+ }, Bs = "_share_10urc_1", Ps = "_modal_10urc_9", Ts = "_header_10urc_21", Ms = "_socials_10urc_31", As = "_social_10urc_31", Os = "_copy_10urc_41", Es = "_title_10urc_48", Ds = "_copyWrapper_10urc_54", Rs = "_copyText_10urc_63", Ls = "_copyTextMobile_10urc_76", zs = "_copyTextMiniMobile_10urc_95", et = {
2099
+ share: Bs,
2100
+ modal: Ps,
2101
+ header: Ts,
2102
+ socials: Ms,
2103
+ social: As,
2104
+ copy: Os,
2105
+ title: Es,
2106
+ copyWrapper: Ds,
2107
+ copyText: Rs,
2108
+ copyTextMobile: Ls,
2109
+ copyTextMiniMobile: zs
2110
+ }, Ui = ({ title: o = "Copy Product Link" }) => {
2111
+ const { isOpenModal: s, setIsOpenModal: e } = wt();
2048
2112
  function n() {
2049
2113
  e(!0);
2050
2114
  }
@@ -2058,7 +2122,7 @@ const Vn = (o) => {
2058
2122
  },
2059
2123
  type: "Secondary",
2060
2124
  children: /* @__PURE__ */ t.jsx(
2061
- v,
2125
+ j,
2062
2126
  {
2063
2127
  name: "Share",
2064
2128
  fill: "#757575",
@@ -2067,17 +2131,17 @@ const Vn = (o) => {
2067
2131
  )
2068
2132
  }
2069
2133
  ),
2070
- s && /* @__PURE__ */ t.jsx(kt, { close: e, children: /* @__PURE__ */ t.jsx(zs, { title: o }) })
2134
+ s && /* @__PURE__ */ t.jsx(kt, { close: e, children: /* @__PURE__ */ t.jsx(Fs, { title: o }) })
2071
2135
  ] });
2072
- }, zs = ({ title: o = "Copy Product Link" }) => {
2073
- const { setIsOpenModal: s } = $t(), { notification: e, setNotification: n } = qt(), { setIsOpen: i } = wt(), c = window.location.href;
2136
+ }, Fs = ({ title: o = "Copy Product Link" }) => {
2137
+ const { setIsOpenModal: s } = wt(), { notification: e, setNotification: n } = qt(), { setIsOpen: i } = $t(), c = window.location.href;
2074
2138
  function u() {
2075
2139
  navigator.clipboard.writeText(c), n({
2076
2140
  message: "Link copied to clipboard",
2077
2141
  status: "success"
2078
2142
  });
2079
2143
  }
2080
- function l() {
2144
+ function r() {
2081
2145
  i(!1), setTimeout(() => {
2082
2146
  s(!1), i(!0);
2083
2147
  }, 300);
@@ -2094,11 +2158,11 @@ const Vn = (o) => {
2094
2158
  /* @__PURE__ */ t.jsxs("div", { className: et.header, children: [
2095
2159
  /* @__PURE__ */ t.jsx("div", { className: et.title, children: o }),
2096
2160
  /* @__PURE__ */ t.jsx(
2097
- v,
2161
+ j,
2098
2162
  {
2099
2163
  name: "X",
2100
2164
  fill: "#757575",
2101
- onClick: l,
2165
+ onClick: r,
2102
2166
  hoverable: !0
2103
2167
  }
2104
2168
  )
@@ -2124,25 +2188,25 @@ const Vn = (o) => {
2124
2188
  {
2125
2189
  type: "Secondary",
2126
2190
  onClick: u,
2127
- children: e ? /* @__PURE__ */ t.jsx(v, { name: "Check" }) : /* @__PURE__ */ t.jsx(v, { name: "Copy" })
2191
+ children: e ? /* @__PURE__ */ t.jsx(j, { name: "Check" }) : /* @__PURE__ */ t.jsx(j, { name: "Copy" })
2128
2192
  }
2129
2193
  )
2130
2194
  ] })
2131
2195
  ]
2132
2196
  }
2133
2197
  );
2134
- }, Fs = "_accordion_1s1lq_1", Vs = "_header_1s1lq_9", Us = "_icon_1s1lq_18", Hs = "_open_1s1lq_21", Ys = "_content_1s1lq_25", it = {
2135
- accordion: Fs,
2136
- header: Vs,
2137
- icon: Us,
2138
- open: Hs,
2139
- content: Ys
2140
- }, Ui = ({ title: o, content: s, defaultOpen: e = !1 }) => {
2141
- const [n, i] = x.useState(e), [c, u] = x.useState(0), l = x.useRef(null), m = () => {
2198
+ }, Vs = "_accordion_1s1lq_1", Us = "_header_1s1lq_9", Hs = "_icon_1s1lq_18", Ys = "_open_1s1lq_21", Ws = "_content_1s1lq_25", it = {
2199
+ accordion: Vs,
2200
+ header: Us,
2201
+ icon: Hs,
2202
+ open: Ys,
2203
+ content: Ws
2204
+ }, Hi = ({ title: o, content: s, defaultOpen: e = !1 }) => {
2205
+ const [n, i] = x.useState(e), [c, u] = x.useState(0), r = x.useRef(null), m = () => {
2142
2206
  i(!n);
2143
2207
  };
2144
2208
  return x.useEffect(() => {
2145
- l.current && u(n ? l.current.scrollHeight : 0);
2209
+ r.current && u(n ? r.current.scrollHeight : 0);
2146
2210
  }, [n]), /* @__PURE__ */ t.jsxs("div", { className: it.accordion, children: [
2147
2211
  /* @__PURE__ */ t.jsxs(
2148
2212
  "div",
@@ -2151,21 +2215,21 @@ const Vn = (o) => {
2151
2215
  onClick: m,
2152
2216
  children: [
2153
2217
  /* @__PURE__ */ t.jsx("h5", { id: "h5", children: o }),
2154
- /* @__PURE__ */ t.jsx("div", { className: V(it.icon, { [it.open]: n }), children: /* @__PURE__ */ t.jsx(v, { name: "CaretDown" }) })
2218
+ /* @__PURE__ */ t.jsx("div", { className: V(it.icon, { [it.open]: n }), children: /* @__PURE__ */ t.jsx(j, { name: "CaretDown" }) })
2155
2219
  ]
2156
2220
  }
2157
2221
  ),
2158
2222
  /* @__PURE__ */ t.jsx(
2159
2223
  "div",
2160
2224
  {
2161
- ref: l,
2225
+ ref: r,
2162
2226
  className: it.content,
2163
2227
  style: { height: `${c}px` },
2164
2228
  children: /* @__PURE__ */ t.jsx("p", { id: "p", children: s })
2165
2229
  }
2166
2230
  )
2167
2231
  ] });
2168
- }, Hi = ({ children: o, path: s, className: e, target: n = "_self", id: i }) => {
2232
+ }, Yi = ({ children: o, path: s, className: e, target: n = "_self", id: i }) => {
2169
2233
  if (window.location.pathname.includes("/admin/builder"))
2170
2234
  return /* @__PURE__ */ t.jsx(
2171
2235
  "div",
@@ -2177,13 +2241,13 @@ const Vn = (o) => {
2177
2241
  children: o
2178
2242
  }
2179
2243
  );
2180
- const c = ut(), u = /^https?:\/\//.test(s), l = (m) => {
2244
+ const c = vt(), u = /^https?:\/\//.test(s), r = (m) => {
2181
2245
  u || n === "_blank" ? n === "_blank" ? window.open(s, "_blank") : window.open(s, "_self") : (m.preventDefault(), c(s));
2182
2246
  };
2183
2247
  return /* @__PURE__ */ t.jsx(
2184
2248
  "div",
2185
2249
  {
2186
- onClick: l,
2250
+ onClick: r,
2187
2251
  className: e,
2188
2252
  role: "link",
2189
2253
  style: { cursor: "pointer" },
@@ -2191,25 +2255,25 @@ const Vn = (o) => {
2191
2255
  children: o
2192
2256
  }
2193
2257
  );
2194
- }, Ws = "_buttonsBlock_1b2rb_1", Gs = "_slideUp_1b2rb_1", Qs = {
2195
- buttonsBlock: Ws,
2196
- slideUp: Gs
2197
- }, Yi = (o) => {
2258
+ }, Gs = "_buttonsBlock_1b2rb_1", Qs = "_slideUp_1b2rb_1", Xs = {
2259
+ buttonsBlock: Gs,
2260
+ slideUp: Qs
2261
+ }, Wi = (o) => {
2198
2262
  var p, B;
2199
- const { setIsOpen: s, setModalType: e, productId: n } = o, { cart: i } = dt(), { pageContext: c } = rt(), u = (p = c == null ? void 0 : c.listings) == null ? void 0 : p.find((r) => r.id === n);
2263
+ const { setIsOpen: s, setModalType: e, productId: n } = o, { cart: i } = dt(), { pageContext: c } = lt(), u = (p = c == null ? void 0 : c.listings) == null ? void 0 : p.find((l) => l.id === n);
2200
2264
  if (!u)
2201
2265
  return null;
2202
- const l = (B = c == null ? void 0 : c.products) == null ? void 0 : B.find(
2203
- (r) => r.uniquePath === u.productData.uniquePath
2266
+ const r = (B = c == null ? void 0 : c.products) == null ? void 0 : B.find(
2267
+ (l) => l.uniquePath === u.productData.uniquePath
2204
2268
  );
2205
- if (!l)
2269
+ if (!r)
2206
2270
  return null;
2207
- const m = i.parts.find((r) => r.productId === l.id);
2271
+ const m = i.parts.find((l) => l.productId === r.id);
2208
2272
  return /* @__PURE__ */ t.jsxs(
2209
2273
  "div",
2210
2274
  {
2211
- className: Qs.buttonsBlock,
2212
- onClick: (r) => r.stopPropagation(),
2275
+ className: Xs.buttonsBlock,
2276
+ onClick: (l) => l.stopPropagation(),
2213
2277
  children: [
2214
2278
  /* @__PURE__ */ t.jsx(
2215
2279
  F,
@@ -2237,11 +2301,11 @@ const Vn = (o) => {
2237
2301
  ]
2238
2302
  }
2239
2303
  );
2240
- }, Xs = "_wrapper_27wzz_1", Js = "_logo_27wzz_8", Ks = "_info_27wzz_12", ht = {
2241
- wrapper: Xs,
2242
- logo: Js,
2243
- info: Ks
2244
- }, Wi = ({ date: o }) => {
2304
+ }, Js = "_wrapper_27wzz_1", Ks = "_logo_27wzz_8", Zs = "_info_27wzz_12", bt = {
2305
+ wrapper: Js,
2306
+ logo: Ks,
2307
+ info: Zs
2308
+ }, Gi = ({ date: o }) => {
2245
2309
  const { general: s } = Dt();
2246
2310
  if (!s) return /* @__PURE__ */ t.jsx(t.Fragment, {});
2247
2311
  function e(n) {
@@ -2255,8 +2319,8 @@ const Vn = (o) => {
2255
2319
  };
2256
2320
  return i.toLocaleDateString("en-US", c);
2257
2321
  }
2258
- return /* @__PURE__ */ t.jsxs("div", { className: ht.wrapper, children: [
2259
- /* @__PURE__ */ t.jsx("div", { className: ht.logo, children: s.info.logo ? /* @__PURE__ */ t.jsx(
2322
+ return /* @__PURE__ */ t.jsxs("div", { className: bt.wrapper, children: [
2323
+ /* @__PURE__ */ t.jsx("div", { className: bt.logo, children: s.info.logo ? /* @__PURE__ */ t.jsx(
2260
2324
  "img",
2261
2325
  {
2262
2326
  src: `https://imagedelivery.net/${s.info.logo.cfId}/w=500,h=500`,
@@ -2264,47 +2328,47 @@ const Vn = (o) => {
2264
2328
  style: { objectFit: "contain", width: "48px", height: "48px" }
2265
2329
  }
2266
2330
  ) : /* @__PURE__ */ t.jsx(
2267
- v,
2331
+ j,
2268
2332
  {
2269
2333
  name: "Image",
2270
2334
  width: 48,
2271
2335
  height: 48
2272
2336
  }
2273
2337
  ) }),
2274
- /* @__PURE__ */ t.jsxs("div", { className: ht.info, children: [
2338
+ /* @__PURE__ */ t.jsxs("div", { className: bt.info, children: [
2275
2339
  /* @__PURE__ */ t.jsx("h3", { id: "h4", children: s.info.name }),
2276
2340
  /* @__PURE__ */ t.jsx("p", { id: "p", children: e(o) })
2277
2341
  ] })
2278
2342
  ] });
2279
- }, Zs = "_options_mju90_1", ti = "_price_mju90_12", ei = "_oldPrice_mju90_19", ni = "_newPrice_mju90_27", si = "_animate_mju90_34", ii = "_appearAndBounce_mju90_1", ai = "_meta_mju90_52", oi = "_info_mju90_58", ci = "_infoRight_mju90_66", li = "_buttons_mju90_73", ri = "_variants_mju90_80", di = "_variant_mju90_80", ui = "_stock_mju90_98", mi = "_variantInfo_mju90_105", hi = "_quantity_mju90_111", pi = "_count_mju90_118", _i = "_focused_mju90_135", gi = "_button_mju90_73", fi = "_activeVariant_mju90_161", xi = "_chargeTypes_mju90_165", vi = "_charge_mju90_165", ji = "_chargeActive_mju90_190", bi = "_title_mju90_198", yi = "_modal_mju90_204", Ni = "_header_mju90_218", Q = {
2280
- options: Zs,
2281
- price: ti,
2282
- oldPrice: ei,
2283
- newPrice: ni,
2284
- animate: si,
2285
- appearAndBounce: ii,
2286
- meta: ai,
2287
- info: oi,
2288
- infoRight: ci,
2343
+ }, ti = "_options_mju90_1", ei = "_price_mju90_12", ni = "_oldPrice_mju90_19", si = "_newPrice_mju90_27", ii = "_animate_mju90_34", ai = "_appearAndBounce_mju90_1", oi = "_meta_mju90_52", ci = "_info_mju90_58", ri = "_infoRight_mju90_66", li = "_buttons_mju90_73", di = "_variants_mju90_80", ui = "_variant_mju90_80", mi = "_stock_mju90_98", hi = "_variantInfo_mju90_105", pi = "_quantity_mju90_111", _i = "_count_mju90_118", gi = "_focused_mju90_135", fi = "_button_mju90_73", xi = "_activeVariant_mju90_161", vi = "_chargeTypes_mju90_165", ji = "_charge_mju90_165", bi = "_chargeActive_mju90_190", yi = "_title_mju90_198", Ii = "_modal_mju90_204", Ni = "_header_mju90_218", X = {
2344
+ options: ti,
2345
+ price: ei,
2346
+ oldPrice: ni,
2347
+ newPrice: si,
2348
+ animate: ii,
2349
+ appearAndBounce: ai,
2350
+ meta: oi,
2351
+ info: ci,
2352
+ infoRight: ri,
2289
2353
  buttons: li,
2290
- variants: ri,
2291
- variant: di,
2292
- stock: ui,
2293
- variantInfo: mi,
2294
- quantity: hi,
2295
- count: pi,
2296
- focused: _i,
2297
- button: gi,
2298
- activeVariant: fi,
2299
- chargeTypes: xi,
2300
- charge: vi,
2301
- chargeActive: ji,
2302
- title: bi,
2303
- modal: yi,
2354
+ variants: di,
2355
+ variant: ui,
2356
+ stock: mi,
2357
+ variantInfo: hi,
2358
+ quantity: pi,
2359
+ count: _i,
2360
+ focused: gi,
2361
+ button: fi,
2362
+ activeVariant: xi,
2363
+ chargeTypes: vi,
2364
+ charge: ji,
2365
+ chargeActive: bi,
2366
+ title: yi,
2367
+ modal: Ii,
2304
2368
  header: Ni
2305
- }, Gi = (o) => {
2306
- var l, m;
2307
- const { pageContext: s } = rt(), e = (l = s == null ? void 0 : s.listings) == null ? void 0 : l.find((p) => p.id === o.productId);
2369
+ }, Qi = (o) => {
2370
+ var r, m;
2371
+ const { pageContext: s } = lt(), e = (r = s == null ? void 0 : s.listings) == null ? void 0 : r.find((p) => p.id === o.productId);
2308
2372
  if (!e)
2309
2373
  return;
2310
2374
  const n = (m = s == null ? void 0 : s.products) == null ? void 0 : m.find(
@@ -2318,11 +2382,11 @@ const Vn = (o) => {
2318
2382
  return /* @__PURE__ */ t.jsxs(
2319
2383
  "div",
2320
2384
  {
2321
- className: Q.modal,
2385
+ className: X.modal,
2322
2386
  onClick: (p) => p.stopPropagation(),
2323
2387
  children: [
2324
2388
  o.type === "Add To Cart" && /* @__PURE__ */ t.jsx(
2325
- Ii,
2389
+ ki,
2326
2390
  {
2327
2391
  variants: n.variants,
2328
2392
  activeVariant: i,
@@ -2333,7 +2397,7 @@ const Vn = (o) => {
2333
2397
  }
2334
2398
  ),
2335
2399
  o.type === "Buy Now" && /* @__PURE__ */ t.jsx(
2336
- ki,
2400
+ Ci,
2337
2401
  {
2338
2402
  product: n,
2339
2403
  setIsOpen: o.setIsOpen
@@ -2342,10 +2406,10 @@ const Vn = (o) => {
2342
2406
  ]
2343
2407
  }
2344
2408
  );
2345
- }, Ii = (o) => {
2346
- const { variants: s, activeChargeType: e, setActiveChargeType: n, activeVariant: i, productId: c, setIsOpen: u } = o, { cart: l, addProductToCart: m, addProducts: p, updateQuantityOfProduct: B } = dt(), { setNotification: r } = qt(), { pageContext: a } = rt();
2347
- async function j(d) {
2348
- const S = l.parts.find(
2409
+ }, ki = (o) => {
2410
+ const { variants: s, activeChargeType: e, setActiveChargeType: n, activeVariant: i, productId: c, setIsOpen: u } = o, { cart: r, addProductToCart: m, addProducts: p, updateQuantityOfProduct: B } = dt(), { setNotification: l } = qt(), { pageContext: a } = lt();
2411
+ async function b(d) {
2412
+ const S = r.parts.find(
2349
2413
  (g) => g.productId === o.productId && g.productVariantId === d
2350
2414
  );
2351
2415
  S ? B({
@@ -2356,16 +2420,16 @@ const Vn = (o) => {
2356
2420
  productId: c,
2357
2421
  productVariantId: d,
2358
2422
  quantity: 1
2359
- })), r({
2423
+ })), l({
2360
2424
  message: "Product added to cart",
2361
2425
  status: "success"
2362
2426
  });
2363
2427
  }
2364
- return /* @__PURE__ */ t.jsxs("div", { className: Q.modal, children: [
2365
- /* @__PURE__ */ t.jsxs("div", { className: Q.header, children: [
2428
+ return /* @__PURE__ */ t.jsxs("div", { className: X.modal, children: [
2429
+ /* @__PURE__ */ t.jsxs("div", { className: X.header, children: [
2366
2430
  /* @__PURE__ */ t.jsx("div", { id: "h3", children: "Choose a variant" }),
2367
2431
  /* @__PURE__ */ t.jsx(
2368
- v,
2432
+ j,
2369
2433
  {
2370
2434
  name: "X",
2371
2435
  width: 24,
@@ -2376,35 +2440,35 @@ const Vn = (o) => {
2376
2440
  }
2377
2441
  )
2378
2442
  ] }),
2379
- i.chargeTypes && i.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: Q.chargeTypes, children: i.chargeTypes.map((d) => /* @__PURE__ */ t.jsx(
2443
+ i.chargeTypes && i.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: X.chargeTypes, children: i.chargeTypes.map((d) => /* @__PURE__ */ t.jsx(
2380
2444
  "div",
2381
2445
  {
2382
- className: V(Q.charge, {
2383
- [Q.chargeActive]: e === d
2446
+ className: V(X.charge, {
2447
+ [X.chargeActive]: e === d
2384
2448
  }),
2385
2449
  onClick: () => n(d),
2386
2450
  children: Ct[d]
2387
2451
  },
2388
2452
  d
2389
2453
  )) }),
2390
- /* @__PURE__ */ t.jsx("div", { className: Q.variants, children: s.map((d) => {
2454
+ /* @__PURE__ */ t.jsx("div", { className: X.variants, children: s.map((d) => {
2391
2455
  var S, g;
2392
2456
  return /* @__PURE__ */ t.jsxs(
2393
2457
  "div",
2394
2458
  {
2395
- className: V(Q.variant),
2459
+ className: V(X.variant),
2396
2460
  onClick: () => {
2397
- j(d.id), u(!1);
2461
+ b(d.id), u(!1);
2398
2462
  },
2399
2463
  children: [
2400
- /* @__PURE__ */ t.jsxs("div", { className: Q.variantInfo, children: [
2401
- /* @__PURE__ */ t.jsx("span", { className: Q.title, children: d.name }),
2464
+ /* @__PURE__ */ t.jsxs("div", { className: X.variantInfo, children: [
2465
+ /* @__PURE__ */ t.jsx("span", { className: X.title, children: d.name }),
2402
2466
  /* @__PURE__ */ t.jsxs("span", { children: [
2403
2467
  "$",
2404
2468
  e === "ONE_TIME" ? d.price.amount : d.subscriptionSettings ? d.subscriptionSettings.price.amount : "Price Not Found"
2405
2469
  ] })
2406
2470
  ] }),
2407
- /* @__PURE__ */ t.jsx("div", { children: e === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: Q.stock, children: [
2471
+ /* @__PURE__ */ t.jsx("div", { children: e === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: X.stock, children: [
2408
2472
  (S = d.quantity.restrictions) != null && S.max || d.quantity.available !== void 0 ? ((g = d.quantity.restrictions) == null ? void 0 : g.max) || d.quantity.available : "∞",
2409
2473
  " ",
2410
2474
  "in stock"
@@ -2415,16 +2479,16 @@ const Vn = (o) => {
2415
2479
  );
2416
2480
  }) })
2417
2481
  ] });
2418
- }, ki = (o) => {
2482
+ }, Ci = (o) => {
2419
2483
  const { product: s, setIsOpen: e } = o;
2420
- return /* @__PURE__ */ t.jsxs("div", { className: Q.modal, children: [
2421
- /* @__PURE__ */ t.jsxs("div", { className: Q.header, children: [
2484
+ return /* @__PURE__ */ t.jsxs("div", { className: X.modal, children: [
2485
+ /* @__PURE__ */ t.jsxs("div", { className: X.header, children: [
2422
2486
  /* @__PURE__ */ t.jsxs("div", { id: "h3", children: [
2423
2487
  "Buy ",
2424
- It(s.name)
2488
+ Nt(s.name)
2425
2489
  ] }),
2426
2490
  /* @__PURE__ */ t.jsx(
2427
- v,
2491
+ j,
2428
2492
  {
2429
2493
  name: "X",
2430
2494
  width: 24,
@@ -2439,16 +2503,16 @@ const Vn = (o) => {
2439
2503
  }
2440
2504
  )
2441
2505
  ] }),
2442
- /* @__PURE__ */ t.jsx(Vn, { ...s })
2506
+ /* @__PURE__ */ t.jsx(Un, { ...s })
2443
2507
  ] });
2444
- }, Ci = "_wrapper_1efqk_1", Si = "_label_1efqk_10", wi = "_contentBorder_1efqk_19", $i = "_contentField_1efqk_23", qi = "_textarea_1efqk_27", Bi = "_length_1efqk_42", st = {
2445
- wrapper: Ci,
2446
- label: Si,
2508
+ }, Si = "_wrapper_1efqk_1", $i = "_label_1efqk_10", wi = "_contentBorder_1efqk_19", qi = "_contentField_1efqk_23", Bi = "_textarea_1efqk_27", Pi = "_length_1efqk_42", st = {
2509
+ wrapper: Si,
2510
+ label: $i,
2447
2511
  contentBorder: wi,
2448
- contentField: $i,
2449
- textarea: qi,
2450
- length: Bi
2451
- }, Qi = (o) => {
2512
+ contentField: qi,
2513
+ textarea: Bi,
2514
+ length: Pi
2515
+ }, Xi = (o) => {
2452
2516
  const {
2453
2517
  onChange: s,
2454
2518
  label: e,
@@ -2456,9 +2520,9 @@ const Vn = (o) => {
2456
2520
  maxLength: i,
2457
2521
  placeholder: c = "Type something...",
2458
2522
  type: u = "text"
2459
- } = o, [l, m] = x.useState(n.length), { themeSettings: p } = Rt();
2460
- function B(r) {
2461
- return u === "number" ? r.replace(/[^\d\n]+/g, "") : r;
2523
+ } = o, [r, m] = x.useState(n.length), { themeSettings: p } = Rt();
2524
+ function B(l) {
2525
+ return u === "number" ? l.replace(/[^\d\n]+/g, "") : l;
2462
2526
  }
2463
2527
  return /* @__PURE__ */ t.jsxs("div", { className: st.wrapper, children: [
2464
2528
  e && /* @__PURE__ */ t.jsx(
@@ -2474,8 +2538,8 @@ const Vn = (o) => {
2474
2538
  {
2475
2539
  id: e,
2476
2540
  value: n,
2477
- onChange: (r) => {
2478
- const a = B(r.target.value);
2541
+ onChange: (l) => {
2542
+ const a = B(l.target.value);
2479
2543
  m(a.length), s(a);
2480
2544
  },
2481
2545
  placeholder: c,
@@ -2487,50 +2551,50 @@ const Vn = (o) => {
2487
2551
  }
2488
2552
  ),
2489
2553
  i && /* @__PURE__ */ t.jsxs("div", { className: st.length, children: [
2490
- l,
2554
+ r,
2491
2555
  "/",
2492
2556
  i
2493
2557
  ] })
2494
2558
  ] });
2495
2559
  };
2496
2560
  export {
2497
- Ui as Accordion,
2498
- $s as BurgerMenuButton,
2561
+ Hi as Accordion,
2562
+ qs as BurgerMenuButton,
2499
2563
  F as Button,
2500
- xn as ButtonTypeSettings,
2501
- Ri as ButtonsSettings,
2502
- Oi as CategorySettings,
2564
+ vn as ButtonTypeSettings,
2565
+ Li as ButtonsSettings,
2566
+ Ei as CategorySettings,
2503
2567
  Ct as ChargeTypes,
2504
2568
  Tt as ChooseImage,
2505
- Ki as ChooseImageModal,
2506
- Ss as EmptyCart,
2507
- Di as FormSettings,
2508
- zi as HeaderButtons,
2509
- v as Icon,
2510
- pt as InputSettings,
2569
+ Zi as ChooseImageModal,
2570
+ $s as EmptyCart,
2571
+ Ri as FormSettings,
2572
+ Fi as HeaderButtons,
2573
+ j as Icon,
2574
+ yt as InputSettings,
2511
2575
  Ot as InputUI,
2512
- Zi as ItemsSettings,
2513
- Ai as LayoutSettings,
2514
- Hi as Link,
2515
- Li as ListingSelector,
2516
- ta as Loader,
2517
- Wi as MetaInfoPost,
2576
+ ta as ItemsSettings,
2577
+ Oi as LayoutSettings,
2578
+ Yi as Link,
2579
+ zi as ListingSelector,
2580
+ ea as Loader,
2581
+ Gi as MetaInfoPost,
2518
2582
  kt as Modal,
2519
- Fi as PagesMobileMenu,
2583
+ Vi as PagesMobileMenu,
2520
2584
  ws as PagesMobileModal,
2521
- Ei as PagesSettings,
2522
- Yi as ProductCardButtons,
2523
- Gi as ProductCardModal,
2524
- Vn as ProductOptions,
2585
+ Di as PagesSettings,
2586
+ Wi as ProductCardButtons,
2587
+ Qi as ProductCardModal,
2588
+ Un as ProductOptions,
2525
2589
  St as RangeSelector,
2526
- lt as Select,
2527
- Vi as ShareLink,
2528
- ks as ShoppingButton,
2529
- Cs as ShoppingModalCart,
2590
+ rt as Select,
2591
+ Ui as ShareLink,
2592
+ Cs as ShoppingButton,
2593
+ Ss as ShoppingModalCart,
2530
2594
  ot as Switch,
2531
- ea as TextSettings,
2532
- na as TextareaSettings,
2533
- Qi as TextareaUI,
2534
- sa as TypesText,
2595
+ na as TextSettings,
2596
+ sa as TextareaSettings,
2597
+ Xi as TextareaUI,
2598
+ ia as TypesText,
2535
2599
  Bt as UserInfo
2536
2600
  };