@billgangcom/theme-lib 1.52.2 → 1.53.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/ui.es.js CHANGED
@@ -1,21 +1,21 @@
1
- import { j as t, I as b, c as V, a as rt, S as it, R as vt, B as tt, O as dt, b as ot, u as ut, d as mt, P as ht, D as pt, e as _t, v as gt, f as ft, C as xt, g as U, h as Ct, i as nt, k as St, l as wt, m as $t, n as lt, o as F, L as Bt, p as ct, q as bt, r as Y, t as Pt, M as jt, w as yt, x as Mt, y as Nt, z as Tt } from "./index-B2Rk8_zm.js";
2
- import { H as mi, E as hi, G as pi, A as _i, T as gi, F as fi } from "./index-B2Rk8_zm.js";
3
- import f from "react";
1
+ import { j as t, I as x, c as Y, a as dt, S as ot, b as yt, B as tt, O as ut, d as at, e as mt, f as ht, P as pt, D as _t, g as gt, v as xt, h as ft, C as bt, i as H, k as St, l as it, m as wt, n as Bt, o as $t, p as rt, q as V, L as Pt, r as lt, t as jt, w as G, x as Mt, M as vt, y as Nt, z as Tt, A as kt, E as qt } from "./index-BmN4PZT1.js";
2
+ import { K as hi, G as pi, J as _i, F as gi, T as xi, H as fi } from "./index-BmN4PZT1.js";
3
+ import _ from "react";
4
4
  import "@phosphor-icons/react";
5
- const qt = "_wrapper_1ibay_2", At = "_alignmentBlock_1ibay_8", Ot = "_title_1ibay_15", Et = "_subtitle_1ibay_22", zt = "_alignmentContent_1ibay_29", Rt = "_alignments_1ibay_37", Dt = "_alignment_1ibay_8", Lt = "_circle_1ibay_60", Ht = "_paddings_1ibay_67", Ut = "_padding_1ibay_67", Ft = "_active_1ibay_91", Vt = "_input_1ibay_98", W = {
6
- wrapper: qt,
7
- alignmentBlock: At,
8
- title: Ot,
9
- subtitle: Et,
10
- alignmentContent: zt,
11
- alignments: Rt,
5
+ const At = "_wrapper_1vmyb_2", Ot = "_alignmentBlock_1vmyb_8", Et = "_title_1vmyb_15", zt = "_subtitle_1vmyb_22", Rt = "_alignmentContent_1vmyb_29", Lt = "_alignments_1vmyb_37", Dt = "_alignment_1vmyb_8", Ht = "_circle_1vmyb_60", Ut = "_paddings_1vmyb_67", Ft = "_padding_1vmyb_67", Vt = "_active_1vmyb_91", Yt = "_input_1vmyb_98", W = {
6
+ wrapper: At,
7
+ alignmentBlock: Ot,
8
+ title: Et,
9
+ subtitle: zt,
10
+ alignmentContent: Rt,
11
+ alignments: Lt,
12
12
  alignment: Dt,
13
- circle: Lt,
14
- paddings: Ht,
15
- padding: Ut,
16
- active: Ft,
17
- input: Vt
18
- }, Yt = [
13
+ circle: Ht,
14
+ paddings: Ut,
15
+ padding: Ft,
16
+ active: Vt,
17
+ input: Yt
18
+ }, Gt = [
19
19
  "topLeft",
20
20
  "top",
21
21
  "topRight",
@@ -25,10 +25,10 @@ const qt = "_wrapper_1ibay_2", At = "_alignmentBlock_1ibay_8", Ot = "_title_1iba
25
25
  "bottomLeft",
26
26
  "bottom",
27
27
  "bottomRight"
28
- ], Wt = ["left", "top", "right", "bottom"], Xn = (r) => {
29
- const { alignment: o, padding: e, setPadding: s, setAlignment: n } = r;
30
- function g(d) {
31
- switch (d) {
28
+ ], Wt = ["left", "top", "right", "bottom"], Kn = (r) => {
29
+ const { alignment: i, padding: e, setPadding: s, setAlignment: n } = r;
30
+ function h(c) {
31
+ switch (c) {
32
32
  case "left":
33
33
  case "topLeft":
34
34
  case "bottomLeft":
@@ -45,8 +45,8 @@ const qt = "_wrapper_1ibay_2", At = "_alignmentBlock_1ibay_8", Ot = "_title_1iba
45
45
  return "TextAlignCenter";
46
46
  }
47
47
  }
48
- function h(d) {
49
- switch (d) {
48
+ function u(c) {
49
+ switch (c) {
50
50
  case "left":
51
51
  return "AlignLeft";
52
52
  case "right":
@@ -57,40 +57,40 @@ const qt = "_wrapper_1ibay_2", At = "_alignmentBlock_1ibay_8", Ot = "_title_1iba
57
57
  return "AlignBottom";
58
58
  }
59
59
  }
60
- const [c, p] = f.useState(null), [I, O] = f.useState(null);
60
+ const [o, d] = _.useState(null), [f, $] = _.useState(null);
61
61
  return /* @__PURE__ */ t.jsxs("div", { className: W.layout, children: [
62
62
  /* @__PURE__ */ t.jsx("h3", { className: W.title, children: "Layout" }),
63
63
  /* @__PURE__ */ t.jsxs("div", { className: W.alignmentBlock, children: [
64
64
  /* @__PURE__ */ t.jsx("h5", { className: W.subtitle, children: "Alignment" }),
65
65
  /* @__PURE__ */ t.jsxs("div", { className: W.alignmentContent, children: [
66
- /* @__PURE__ */ t.jsx("div", { className: W.alignments, children: Yt.map((d) => /* @__PURE__ */ t.jsxs(
66
+ /* @__PURE__ */ t.jsx("div", { className: W.alignments, children: Gt.map((c) => /* @__PURE__ */ t.jsxs(
67
67
  "div",
68
68
  {
69
69
  onClick: () => {
70
- n(d);
70
+ n(c);
71
71
  },
72
72
  className: W.alignment,
73
73
  onMouseEnter: () => {
74
- p(d);
74
+ d(c);
75
75
  },
76
76
  onMouseLeave: () => {
77
- p(null);
77
+ d(null);
78
78
  },
79
79
  children: [
80
- d !== o && c !== d && /* @__PURE__ */ t.jsx("div", { className: W.circle }),
81
- d !== o && c === d && /* @__PURE__ */ t.jsx(
82
- b,
80
+ c !== i && o !== c && /* @__PURE__ */ t.jsx("div", { className: W.circle }),
81
+ c !== i && o === c && /* @__PURE__ */ t.jsx(
82
+ x,
83
83
  {
84
- name: g(c),
84
+ name: h(o),
85
85
  fill: "#c2c2c2",
86
86
  width: 22,
87
87
  height: 22
88
88
  }
89
89
  ),
90
- d === o && /* @__PURE__ */ t.jsx(
91
- b,
90
+ c === i && /* @__PURE__ */ t.jsx(
91
+ x,
92
92
  {
93
- name: g(o),
93
+ name: h(i),
94
94
  fill: "#FF3F19",
95
95
  width: 22,
96
96
  height: 22
@@ -98,104 +98,105 @@ const qt = "_wrapper_1ibay_2", At = "_alignmentBlock_1ibay_8", Ot = "_title_1iba
98
98
  )
99
99
  ]
100
100
  },
101
- d
101
+ c
102
102
  )) }),
103
- /* @__PURE__ */ t.jsx("div", { className: W.paddings, children: Wt.map((d) => /* @__PURE__ */ t.jsxs(
103
+ /* @__PURE__ */ t.jsx("div", { className: W.paddings, children: Wt.map((c) => /* @__PURE__ */ t.jsxs(
104
104
  "label",
105
105
  {
106
- className: V(W.padding, {
107
- [W.active]: I === d
106
+ className: Y(W.padding, {
107
+ [W.active]: f === c
108
108
  }),
109
109
  onFocus: () => {
110
- O(d);
110
+ $(c);
111
111
  },
112
112
  onBlur: () => {
113
- O(null);
113
+ $(null);
114
114
  },
115
115
  children: [
116
116
  /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
117
- b,
117
+ x,
118
118
  {
119
- name: h(d),
119
+ name: u(c),
120
120
  width: 20,
121
121
  height: 20
122
122
  }
123
123
  ) }),
124
124
  /* @__PURE__ */ t.jsx(
125
- rt,
125
+ dt,
126
126
  {
127
127
  type: "number",
128
- value: String(e[d]),
129
- onChange: (i) => s({
128
+ value: String(e[c]),
129
+ onChange: (l) => s({
130
130
  ...e,
131
- [d]: Number(i)
131
+ [c]: Math.min(Number(l), 999)
132
132
  }),
133
+ max: 999,
133
134
  paddingless: !0,
134
135
  borderless: !0
135
136
  }
136
137
  )
137
138
  ]
138
139
  },
139
- d
140
+ c
140
141
  )) })
141
142
  ] })
142
143
  ] })
143
144
  ] });
144
- }, Gt = "_title_82zux_1", Qt = "_subtitle_82zux_5", Xt = "_header_82zux_12", Jt = "_text_82zux_13", Kt = "_productsBlock_82zux_14", Zt = "_top_82zux_26", te = "_itemsBlock_82zux_35", ee = "_typeTexts_82zux_41", se = "_block_82zux_48", ne = "_active_82zux_61", ie = "_products_82zux_14", oe = "_product_82zux_14", ae = "_button_82zux_80", ce = "_disabled_82zux_91", le = "_image_82zux_95", re = "_info_82zux_102", de = "_name_82zux_114", ue = "_buttons_82zux_118", me = "_modal_82zux_125", he = "_link_82zux_145", pe = "_modalOptions_82zux_151", _e = "_addButton_82zux_157", ge = "_deleteButton_82zux_179", G = {
145
- title: Gt,
146
- subtitle: Qt,
147
- header: Xt,
148
- text: Jt,
149
- productsBlock: Kt,
150
- top: Zt,
151
- itemsBlock: te,
152
- typeTexts: ee,
153
- block: se,
154
- active: ne,
155
- products: ie,
156
- product: oe,
157
- button: ae,
158
- disabled: ce,
159
- image: le,
160
- info: re,
161
- name: de,
162
- buttons: ue,
163
- modal: me,
164
- link: he,
165
- modalOptions: pe,
166
- addButton: _e,
167
- deleteButton: ge
168
- }, Jn = (r) => {
145
+ }, Jt = "_title_82zux_1", Xt = "_subtitle_82zux_5", Kt = "_header_82zux_12", Qt = "_text_82zux_13", Zt = "_productsBlock_82zux_14", te = "_top_82zux_26", ee = "_itemsBlock_82zux_35", se = "_typeTexts_82zux_41", ne = "_block_82zux_48", ie = "_active_82zux_61", oe = "_products_82zux_14", ae = "_product_82zux_14", ce = "_button_82zux_80", le = "_disabled_82zux_91", re = "_image_82zux_95", de = "_info_82zux_102", ue = "_name_82zux_114", me = "_buttons_82zux_118", he = "_modal_82zux_125", pe = "_link_82zux_145", _e = "_modalOptions_82zux_151", ge = "_addButton_82zux_157", xe = "_deleteButton_82zux_179", J = {
146
+ title: Jt,
147
+ subtitle: Xt,
148
+ header: Kt,
149
+ text: Qt,
150
+ productsBlock: Zt,
151
+ top: te,
152
+ itemsBlock: ee,
153
+ typeTexts: se,
154
+ block: ne,
155
+ active: ie,
156
+ products: oe,
157
+ product: ae,
158
+ button: ce,
159
+ disabled: le,
160
+ image: re,
161
+ info: de,
162
+ name: ue,
163
+ buttons: me,
164
+ modal: he,
165
+ link: pe,
166
+ modalOptions: _e,
167
+ addButton: ge,
168
+ deleteButton: xe
169
+ }, Qn = (r) => {
169
170
  const {
170
- isActiveItems: o,
171
+ isActiveItems: i,
171
172
  setIsActiveItems: e,
172
173
  items: s,
173
174
  setItems: n,
174
- other: g,
175
- title: h,
176
- subtitle: c,
177
- draggable: p = !1,
178
- withImage: I = !1,
179
- addable: O = !0,
180
- itemsOptions: d,
181
- hasRangeSelector: i = !1,
182
- rangeSelectorOptions: x,
183
- limit: v,
184
- autoScrollInterval: _,
185
- deletable: y
175
+ other: h,
176
+ title: u,
177
+ subtitle: o,
178
+ draggable: d = !1,
179
+ withImage: f = !1,
180
+ addable: $ = !0,
181
+ itemsOptions: c,
182
+ hasRangeSelector: l = !1,
183
+ rangeSelectorOptions: M,
184
+ limit: w,
185
+ autoScrollInterval: p,
186
+ deletable: I
186
187
  } = r;
187
- function w(a) {
188
- if (I)
189
- return a ? /* @__PURE__ */ t.jsx(
188
+ function B(v) {
189
+ if (f)
190
+ return v ? /* @__PURE__ */ t.jsx(
190
191
  "img",
191
192
  {
192
- src: `https://imagedelivery.net/${a[0]}/w=1000`,
193
+ src: `https://imagedelivery.net/${v[0]}/w=1000`,
193
194
  alt: "image",
194
195
  width: 16,
195
196
  height: 16
196
197
  }
197
198
  ) : /* @__PURE__ */ t.jsx(
198
- b,
199
+ x,
199
200
  {
200
201
  name: "Image",
201
202
  width: 16,
@@ -204,12 +205,12 @@ const qt = "_wrapper_1ibay_2", At = "_alignmentBlock_1ibay_8", Ot = "_title_1iba
204
205
  }
205
206
  );
206
207
  }
207
- const L = (a, $ = !1) => {
208
- const T = d.find((E) => E.id === a);
209
- if (!T) return;
210
- const Q = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
211
- p && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
212
- b,
208
+ const g = (v, q = !1) => {
209
+ const A = c.find((S) => S.id === v);
210
+ if (!A) return;
211
+ const L = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
212
+ d && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
213
+ x,
213
214
  {
214
215
  name: "DotsSixVertical",
215
216
  hoverable: !0,
@@ -218,56 +219,56 @@ const qt = "_wrapper_1ibay_2", At = "_alignmentBlock_1ibay_8", Ot = "_title_1iba
218
219
  }
219
220
  ) }),
220
221
  /* @__PURE__ */ t.jsx(
221
- ot,
222
+ at,
222
223
  {
223
- onChange: (E) => {
224
- const u = [...s], C = d.find((j) => j.name === E);
225
- if (!C) return;
226
- const M = C.id, l = u.map((j) => j === a ? M : j);
227
- n([...l]);
224
+ onChange: (S) => {
225
+ const b = [...s], N = c.find((j) => j.name === S);
226
+ if (!N) return;
227
+ const O = N.id, a = b.map((j) => j === v ? O : j);
228
+ n([...a]);
228
229
  },
229
- value: T.name,
230
- options: d.filter((E) => !s.find((u) => u === E.id)).map((E) => E.name),
231
- leftAddon: w(T.images)
230
+ value: A.name,
231
+ options: c.filter((S) => !s.find((b) => b === S.id)).map((S) => S.name),
232
+ leftAddon: B(A.images)
232
233
  }
233
234
  ),
234
- $ && /* @__PURE__ */ t.jsx("div", { className: G.buttons, children: /* @__PURE__ */ t.jsx("div", { className: G.deleteButton, children: /* @__PURE__ */ t.jsx(
235
- b,
235
+ q && /* @__PURE__ */ t.jsx("div", { className: J.buttons, children: /* @__PURE__ */ t.jsx("div", { className: J.deleteButton, children: /* @__PURE__ */ t.jsx(
236
+ x,
236
237
  {
237
238
  name: "Trash",
238
239
  hoverable: !0,
239
240
  width: 20,
240
241
  height: 20,
241
242
  fill: "#C12A2A",
242
- onClick: () => n(s.filter((E) => E !== a))
243
+ onClick: () => n(s.filter((S) => S !== v))
243
244
  }
244
245
  ) }) })
245
246
  ] });
246
247
  return /* @__PURE__ */ t.jsx(
247
248
  "div",
248
249
  {
249
- className: G.product,
250
- children: Q
250
+ className: J.product,
251
+ children: L
251
252
  },
252
- a
253
+ v
253
254
  );
254
255
  };
255
- return /* @__PURE__ */ t.jsxs("div", { className: G.productsBlock, children: [
256
- (h || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: G.top, children: [
257
- h && /* @__PURE__ */ t.jsx("h3", { className: G.title, children: h }),
258
- o !== void 0 && /* @__PURE__ */ t.jsx(
259
- it,
256
+ return /* @__PURE__ */ t.jsxs("div", { className: J.productsBlock, children: [
257
+ (u || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: J.top, children: [
258
+ u && /* @__PURE__ */ t.jsx("h3", { className: J.title, children: u }),
259
+ i !== void 0 && /* @__PURE__ */ t.jsx(
260
+ ot,
260
261
  {
261
- current: o,
262
- onChange: (a) => e == null ? void 0 : e(a)
262
+ current: i,
263
+ onChange: (v) => e == null ? void 0 : e(v)
263
264
  }
264
265
  )
265
266
  ] }),
266
- i && x && /* @__PURE__ */ t.jsx(vt, { ...x }),
267
- /* @__PURE__ */ t.jsxs("div", { className: G.products, children: [
268
- c && /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: c }),
269
- s.map((a) => L(a, y)),
270
- O && /* @__PURE__ */ t.jsx(
267
+ l && M && /* @__PURE__ */ t.jsx(yt, { ...M }),
268
+ /* @__PURE__ */ t.jsxs("div", { className: J.products, children: [
269
+ o && /* @__PURE__ */ t.jsx("h5", { className: J.subtitle, children: o }),
270
+ s.map((v) => g(v, I)),
271
+ $ && /* @__PURE__ */ t.jsx(
271
272
  "div",
272
273
  {
273
274
  style: {
@@ -280,30 +281,30 @@ const qt = "_wrapper_1ibay_2", At = "_alignmentBlock_1ibay_8", Ot = "_title_1iba
280
281
  tt,
281
282
  {
282
283
  withoutHover: !0,
283
- className: V(G.button, {
284
- [G.disabled]: !!(v && v <= s.length || s.length === d.length)
284
+ className: Y(J.button, {
285
+ [J.disabled]: !!(w && w <= s.length || s.length === c.length)
285
286
  }),
286
287
  size: "s",
287
- disabled: !!(v && v <= s.length || s.length === d.length),
288
+ disabled: !!(w && w <= s.length || s.length === c.length),
288
289
  onClick: () => {
289
- const a = [...s];
290
- let $ = null;
291
- if (d) {
292
- for (let T = 0; T < d.length; T++)
293
- if (!s.find((Q) => Q === d[T].id)) {
294
- $ = d[T];
290
+ const v = [...s];
291
+ let q = null;
292
+ if (c) {
293
+ for (let A = 0; A < c.length; A++)
294
+ if (!s.find((L) => L === c[A].id)) {
295
+ q = c[A];
295
296
  break;
296
297
  }
297
298
  }
298
- a.push(($ == null ? void 0 : $.id) || d[0].id), n(a);
299
+ v.push((q == null ? void 0 : q.id) || c[0].id), n(v);
299
300
  },
300
301
  style: {
301
302
  width: "fit-content"
302
303
  },
303
- children: /* @__PURE__ */ t.jsxs("div", { className: G.addButton, children: [
304
+ children: /* @__PURE__ */ t.jsxs("div", { className: J.addButton, children: [
304
305
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
305
306
  /* @__PURE__ */ t.jsx(
306
- b,
307
+ x,
307
308
  {
308
309
  name: "Plus",
309
310
  width: 16,
@@ -316,14 +317,14 @@ const qt = "_wrapper_1ibay_2", At = "_alignmentBlock_1ibay_8", Ot = "_title_1iba
316
317
  }
317
318
  )
318
319
  ] }),
319
- g !== void 0 && /* @__PURE__ */ t.jsx(dt, { items: g }),
320
- _ !== void 0 && /* @__PURE__ */ t.jsx(
321
- rt,
320
+ h !== void 0 && /* @__PURE__ */ t.jsx(ut, { items: h }),
321
+ p !== void 0 && /* @__PURE__ */ t.jsx(
322
+ dt,
322
323
  {
323
324
  label: "Auto scroll interval",
324
325
  type: "number",
325
- value: String(_.scrollInterval),
326
- onChange: (a) => _.setScrollInterval(Number(a)),
326
+ value: String(p.scrollInterval),
327
+ onChange: (v) => p.setScrollInterval(Number(v)),
327
328
  min: 0.1,
328
329
  max: 100,
329
330
  style: {
@@ -333,109 +334,109 @@ const qt = "_wrapper_1ibay_2", At = "_alignmentBlock_1ibay_8", Ot = "_title_1iba
333
334
  }
334
335
  )
335
336
  ] });
336
- }, fe = "_title_roi3a_1", xe = "_subtitle_roi3a_5", be = "_header_roi3a_12", je = "_text_roi3a_13", ve = "_productsBlock_roi3a_14", ye = "_top_roi3a_26", Ne = "_itemsBlock_roi3a_35", ke = "_typeTexts_roi3a_41", Ie = "_block_roi3a_48", Ce = "_active_roi3a_61", Se = "_products_roi3a_14", we = "_product_roi3a_14", $e = "_button_roi3a_80", Be = "_disabled_roi3a_91", Pe = "_image_roi3a_95", Me = "_info_roi3a_102", Te = "_name_roi3a_114", qe = "_buttons_roi3a_118", Ae = "_modal_roi3a_125", Oe = "_link_roi3a_145", Ee = "_modalOptions_roi3a_151", ze = "_addButton_roi3a_164", Re = "_deleteButton_roi3a_179", De = "_closeIcon_roi3a_191", D = {
337
+ }, fe = "_title_roi3a_1", be = "_subtitle_roi3a_5", je = "_header_roi3a_12", ve = "_text_roi3a_13", ye = "_productsBlock_roi3a_14", Ne = "_top_roi3a_26", ke = "_itemsBlock_roi3a_35", Ie = "_typeTexts_roi3a_41", Ce = "_block_roi3a_48", Se = "_active_roi3a_61", we = "_products_roi3a_14", Be = "_product_roi3a_14", $e = "_button_roi3a_80", Pe = "_disabled_roi3a_91", Me = "_image_roi3a_95", Te = "_info_roi3a_102", qe = "_name_roi3a_114", Ae = "_buttons_roi3a_118", Oe = "_modal_roi3a_125", Ee = "_link_roi3a_145", ze = "_modalOptions_roi3a_151", Re = "_addButton_roi3a_164", Le = "_deleteButton_roi3a_179", De = "_closeIcon_roi3a_191", U = {
337
338
  title: fe,
338
- subtitle: xe,
339
- header: be,
340
- text: je,
341
- productsBlock: ve,
342
- top: ye,
343
- itemsBlock: Ne,
344
- typeTexts: ke,
345
- block: Ie,
346
- active: Ce,
347
- products: Se,
348
- product: we,
339
+ subtitle: be,
340
+ header: je,
341
+ text: ve,
342
+ productsBlock: ye,
343
+ top: Ne,
344
+ itemsBlock: ke,
345
+ typeTexts: Ie,
346
+ block: Ce,
347
+ active: Se,
348
+ products: we,
349
+ product: Be,
349
350
  button: $e,
350
- disabled: Be,
351
- image: Pe,
352
- info: Me,
353
- name: Te,
354
- buttons: qe,
355
- modal: Ae,
356
- link: Oe,
357
- modalOptions: Ee,
358
- addButton: ze,
359
- deleteButton: Re,
351
+ disabled: Pe,
352
+ image: Me,
353
+ info: Te,
354
+ name: qe,
355
+ buttons: Ae,
356
+ modal: Oe,
357
+ link: Ee,
358
+ modalOptions: ze,
359
+ addButton: Re,
360
+ deleteButton: Le,
360
361
  closeIcon: De
361
362
  };
362
- function Le({ product: r, children: o }) {
363
+ function He({ product: r, children: i }) {
363
364
  const {
364
365
  attributes: e,
365
366
  listeners: s,
366
367
  setNodeRef: n,
367
- transform: g,
368
- transition: h,
369
- isDragging: c
368
+ transform: h,
369
+ transition: u,
370
+ isDragging: o
370
371
  } = ft({
371
372
  id: r.id
372
- }), p = {
373
- transform: xt.Transform.toString(g),
374
- transition: h
373
+ }), d = {
374
+ transform: bt.Transform.toString(h),
375
+ transition: u
375
376
  };
376
377
  return /* @__PURE__ */ t.jsx(
377
378
  "div",
378
379
  {
379
380
  ref: n,
380
- style: p,
381
- className: `${D.product} ${c ? D.dragging : ""}`,
381
+ style: d,
382
+ className: `${U.product} ${o ? U.dragging : ""}`,
382
383
  ...e,
383
384
  ...s,
384
- children: o
385
+ children: i
385
386
  }
386
387
  );
387
388
  }
388
- const Kn = (r) => {
389
+ const Zn = (r) => {
389
390
  const {
390
- isActiveItems: o,
391
+ isActiveItems: i,
391
392
  setIsActiveItems: e,
392
393
  items: s,
393
394
  setItems: n,
394
- title: g,
395
- subtitle: h,
396
- editable: c = !0,
397
- draggable: p = !1,
398
- deletable: I = !0,
399
- addable: O = !0,
400
- itemsType: d,
401
- itemsOptions: i,
402
- addableOptions: x = {},
403
- limit: v
404
- } = r, [_, y] = f.useState(null), [w, L] = f.useState(null), a = f.useRef(null), $ = ut(
405
- mt(ht, {
395
+ title: h,
396
+ subtitle: u,
397
+ editable: o = !0,
398
+ draggable: d = !1,
399
+ deletable: f = !0,
400
+ addable: $ = !0,
401
+ itemsType: c,
402
+ itemsOptions: l,
403
+ addableOptions: M = {},
404
+ limit: w
405
+ } = r, [p, I] = _.useState(null), [B, g] = _.useState(null), v = _.useRef(null), q = mt(
406
+ ht(pt, {
406
407
  activationConstraint: {
407
408
  distance: 5
408
409
  }
409
410
  })
410
411
  );
411
- f.useEffect(() => {
412
- if (_) {
413
- const u = [...s].map((C) => C.id === _.id ? _ : C);
414
- n(u);
412
+ _.useEffect(() => {
413
+ if (p) {
414
+ const b = [...s].map((N) => N.id === p.id ? p : N);
415
+ n(b);
415
416
  }
416
- }, [_]), f.useEffect(() => {
417
- a.current && w && (a.current.getBoundingClientRect().height, w.top);
418
- }, [a.current, w]);
419
- const T = (u, C) => {
420
- u.stopPropagation();
421
- const M = u.target.getBoundingClientRect();
422
- L({
423
- top: M.top + window.scrollY,
424
- left: M.left - 30
425
- }), y(C);
426
- }, Q = (u) => {
427
- const { active: C, over: M } = u;
428
- if (M && C.id !== M.id) {
429
- const l = s.findIndex((S) => S.id === C.id), j = s.findIndex((S) => S.id === M.id);
430
- if (l !== -1 && j !== -1) {
431
- const S = [...s], [R] = S.splice(l, 1);
432
- S.splice(j, 0, R), n(S);
417
+ }, [p]), _.useEffect(() => {
418
+ v.current && B && (v.current.getBoundingClientRect().height, B.top);
419
+ }, [v.current, B]);
420
+ const A = (b, N) => {
421
+ b.stopPropagation();
422
+ const O = b.target.getBoundingClientRect();
423
+ g({
424
+ top: O.top + window.scrollY,
425
+ left: O.left - 30
426
+ }), I(N);
427
+ }, L = (b) => {
428
+ const { active: N, over: O } = b;
429
+ if (O && N.id !== O.id) {
430
+ const a = s.findIndex((C) => C.id === N.id), j = s.findIndex((C) => C.id === O.id);
431
+ if (a !== -1 && j !== -1) {
432
+ const C = [...s], [D] = C.splice(a, 1);
433
+ C.splice(j, 0, D), n(C);
433
434
  }
434
435
  }
435
- }, E = (u, C) => {
436
- const M = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
437
- p && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
438
- b,
436
+ }, S = (b, N) => {
437
+ const O = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
438
+ d && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
439
+ x,
439
440
  {
440
441
  name: "DotsSixVertical",
441
442
  hoverable: !0,
@@ -443,99 +444,99 @@ const Kn = (r) => {
443
444
  height: 20
444
445
  }
445
446
  ) }),
446
- d === "select" && i && /* @__PURE__ */ t.jsx(
447
- ot,
447
+ c === "select" && l && /* @__PURE__ */ t.jsx(
448
+ at,
448
449
  {
449
- onChange: (l) => {
450
- const j = [...s], S = i.find((P) => P.name === l);
451
- if (!S) return;
452
- const R = j.map((P) => P.id === u.id ? {
453
- ...S,
450
+ onChange: (a) => {
451
+ const j = [...s], C = l.find((P) => P.name === a);
452
+ if (!C) return;
453
+ const D = j.map((P) => P.id === b.id ? {
454
+ ...C,
454
455
  name: {
455
- "en-US": l
456
+ "en-US": a
456
457
  }
457
458
  } : P);
458
- y({
459
- ...u,
459
+ I({
460
+ ...b,
460
461
  name: {
461
- "en-US": l
462
+ "en-US": a
462
463
  }
463
- }), n([...R]);
464
+ }), n([...D]);
464
465
  },
465
- value: u.name,
466
- options: i.filter((l) => !s.find((j) => j.name === l.name)).map((l) => l.name)
466
+ value: b.name,
467
+ options: l.filter((a) => !s.find((j) => j.name === a.name)).map((a) => a.name)
467
468
  }
468
469
  ),
469
- /* @__PURE__ */ t.jsxs("div", { className: D.buttons, children: [
470
- c && /* @__PURE__ */ t.jsx("div", { className: D.deleteButton, children: /* @__PURE__ */ t.jsx(
471
- b,
470
+ /* @__PURE__ */ t.jsxs("div", { className: U.buttons, children: [
471
+ o && /* @__PURE__ */ t.jsx("div", { className: U.deleteButton, children: /* @__PURE__ */ t.jsx(
472
+ x,
472
473
  {
473
474
  name: "Sliders",
474
475
  hoverable: !0,
475
476
  width: 20,
476
477
  height: 20,
477
- onClick: (l) => T(l, u)
478
+ onClick: (a) => A(a, b)
478
479
  }
479
480
  ) }),
480
- I && /* @__PURE__ */ t.jsx("div", { className: D.deleteButton, children: /* @__PURE__ */ t.jsx(
481
- b,
481
+ f && /* @__PURE__ */ t.jsx("div", { className: U.deleteButton, children: /* @__PURE__ */ t.jsx(
482
+ x,
482
483
  {
483
484
  name: "Trash",
484
485
  hoverable: !0,
485
486
  width: 20,
486
487
  height: 20,
487
488
  fill: "#C12A2A",
488
- onClick: () => n(s.filter((l) => l.id !== u.id))
489
+ onClick: () => n(s.filter((a) => a.id !== b.id))
489
490
  }
490
491
  ) })
491
492
  ] })
492
493
  ] });
493
- return p ? /* @__PURE__ */ t.jsx(
494
- Le,
494
+ return d ? /* @__PURE__ */ t.jsx(
495
+ He,
495
496
  {
496
- product: u,
497
- index: C,
498
- children: M
497
+ product: b,
498
+ index: N,
499
+ children: O
499
500
  },
500
- u.id
501
+ b.id
501
502
  ) : /* @__PURE__ */ t.jsx(
502
503
  "div",
503
504
  {
504
- className: D.product,
505
- children: M
505
+ className: U.product,
506
+ children: O
506
507
  },
507
- u.id
508
+ b.id
508
509
  );
509
510
  };
510
- return /* @__PURE__ */ t.jsxs("div", { className: D.productsBlock, children: [
511
- (g || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: D.top, children: [
512
- g && /* @__PURE__ */ t.jsx("h3", { className: D.title, children: g }),
513
- o !== void 0 && /* @__PURE__ */ t.jsx(
514
- it,
511
+ return /* @__PURE__ */ t.jsxs("div", { className: U.productsBlock, children: [
512
+ (h || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: U.top, children: [
513
+ h && /* @__PURE__ */ t.jsx("h3", { className: U.title, children: h }),
514
+ i !== void 0 && /* @__PURE__ */ t.jsx(
515
+ ot,
515
516
  {
516
- current: o,
517
- onChange: (u) => e == null ? void 0 : e(u)
517
+ current: i,
518
+ onChange: (b) => e == null ? void 0 : e(b)
518
519
  }
519
520
  )
520
521
  ] }),
521
- /* @__PURE__ */ t.jsxs("div", { className: D.products, children: [
522
- h && /* @__PURE__ */ t.jsx("h5", { className: D.subtitle, children: h }),
523
- p ? /* @__PURE__ */ t.jsx(
524
- pt,
522
+ /* @__PURE__ */ t.jsxs("div", { className: U.products, children: [
523
+ u && /* @__PURE__ */ t.jsx("h5", { className: U.subtitle, children: u }),
524
+ d ? /* @__PURE__ */ t.jsx(
525
+ _t,
525
526
  {
526
- sensors: $,
527
- onDragEnd: Q,
527
+ sensors: q,
528
+ onDragEnd: L,
528
529
  children: /* @__PURE__ */ t.jsx(
529
- _t,
530
+ gt,
530
531
  {
531
- items: s.map((u) => u.id),
532
- strategy: gt,
533
- children: s.map((u, C) => E(u, C))
532
+ items: s.map((b) => b.id),
533
+ strategy: xt,
534
+ children: s.map((b, N) => S(b, N))
534
535
  }
535
536
  )
536
537
  }
537
- ) : s.map((u, C) => E(u, C)),
538
- O && /* @__PURE__ */ t.jsx(
538
+ ) : s.map((b, N) => S(b, N)),
539
+ $ && /* @__PURE__ */ t.jsx(
539
540
  "div",
540
541
  {
541
542
  style: {
@@ -547,34 +548,34 @@ const Kn = (r) => {
547
548
  tt,
548
549
  {
549
550
  withoutHover: !0,
550
- className: V(D.button, {
551
- [D.disabled]: !!(v && v <= s.length || s.length === (i == null ? void 0 : i.length))
551
+ className: Y(U.button, {
552
+ [U.disabled]: !!(w && w <= s.length || s.length === (l == null ? void 0 : l.length))
552
553
  }),
553
554
  size: "s",
554
- disabled: !!(v && v <= s.length || s.length === (i == null ? void 0 : i.length)),
555
+ disabled: !!(w && w <= s.length || s.length === (l == null ? void 0 : l.length)),
555
556
  onClick: () => {
556
- const u = [...s];
557
- let C = null;
558
- if (i) {
559
- for (let M = 0; M < i.length; M++)
560
- if (!s.find((l) => l.id === i[M].id)) {
561
- C = i[M];
557
+ const b = [...s];
558
+ let N = null;
559
+ if (l) {
560
+ for (let O = 0; O < l.length; O++)
561
+ if (!s.find((a) => a.id === l[O].id)) {
562
+ N = l[O];
562
563
  break;
563
564
  }
564
565
  }
565
- d === "select" && i && u.push({
566
- name: C ? C.name : i[0].name,
567
- id: (C == null ? void 0 : C.id) || i[0].id,
568
- ...x
569
- }), n(u);
566
+ c === "select" && l && b.push({
567
+ name: N ? N.name : l[0].name,
568
+ id: (N == null ? void 0 : N.id) || l[0].id,
569
+ ...M
570
+ }), n(b);
570
571
  },
571
572
  style: {
572
573
  width: "fit-content"
573
574
  },
574
- children: /* @__PURE__ */ t.jsxs("div", { className: D.addButton, children: [
575
+ children: /* @__PURE__ */ t.jsxs("div", { className: U.addButton, children: [
575
576
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
576
577
  /* @__PURE__ */ t.jsx(
577
- b,
578
+ x,
578
579
  {
579
580
  name: "Plus",
580
581
  width: 16,
@@ -589,88 +590,89 @@ const Kn = (r) => {
589
590
  ] })
590
591
  ] });
591
592
  };
592
- function He(r) {
593
- const { product: o, children: e } = r, { attributes: s, listeners: n, setNodeRef: g, transform: h, transition: c, isDragging: p } = ft({
594
- id: o.id
595
- }), I = {
596
- transform: xt.Transform.toString(h),
597
- transition: c
593
+ function Ue(r) {
594
+ const { product: i, children: e } = r, { attributes: s, listeners: n, setNodeRef: h, transform: u, transition: o, isDragging: d } = ft({
595
+ id: i.id
596
+ }), f = {
597
+ transform: bt.Transform.toString(u),
598
+ transition: o
598
599
  };
599
600
  return /* @__PURE__ */ t.jsx(
600
601
  "div",
601
602
  {
602
- ref: g,
603
- style: I,
604
- className: `${U.product} ${p ? U.dragging : ""}`,
603
+ ref: h,
604
+ style: f,
605
+ className: `${H.product} ${d ? H.dragging : ""}`,
605
606
  ...s,
606
607
  ...n,
607
608
  children: e
608
609
  }
609
610
  );
610
611
  }
611
- const Zn = (r) => {
612
+ const ti = (r) => {
612
613
  const {
613
- isActiveItems: o,
614
+ isActiveItems: i,
614
615
  setIsActiveItems: e,
615
616
  items: s,
616
617
  setItems: n,
617
- other: g,
618
- title: h,
619
- subtitle: c,
620
- editable: p = !0,
621
- draggable: I = !1,
622
- withImage: O = !1,
623
- deletable: d = !0,
624
- addable: i = !0,
625
- itemsType: x,
626
- itemsPlaceholder: v = "",
627
- itemsOptions: _,
628
- hasRangeSelector: y = !1,
629
- rangeSelectorOptions: w,
630
- modalOptions: L,
631
- addableOptions: a = {}
632
- } = r, [$, T] = f.useState(null), [Q, E] = f.useState({
618
+ other: h,
619
+ title: u,
620
+ subtitle: o,
621
+ editable: d = !0,
622
+ draggable: f = !1,
623
+ withImage: $ = !1,
624
+ deletable: c = !0,
625
+ addable: l = !0,
626
+ itemsType: M,
627
+ itemsPlaceholder: w = "",
628
+ itemsOptions: p,
629
+ hasRangeSelector: I = !1,
630
+ rangeSelectorOptions: B,
631
+ modalOptions: g,
632
+ addableOptions: v = {},
633
+ limit: q
634
+ } = r, [A, L] = _.useState(null), [S, b] = _.useState({
633
635
  top: 0,
634
636
  left: 0
635
- }), [u, C] = f.useState(null), M = f.useRef(null), [l, j] = f.useState(!1), S = ut(
636
- mt(ht, {
637
+ }), [N, O] = _.useState(null), a = _.useRef(null), [j, C] = _.useState(!1), D = mt(
638
+ ht(pt, {
637
639
  activationConstraint: {
638
640
  distance: 5
639
641
  }
640
642
  })
641
643
  );
642
- f.useEffect(() => {
644
+ _.useEffect(() => {
643
645
  const m = () => {
644
- T(null), j(!1);
646
+ L(null), C(!1);
645
647
  };
646
- return document.body.addEventListener("click", m), T(null), j(!1), () => {
647
- T(null), j(!1), document.body.removeEventListener("click", m);
648
+ return document.body.addEventListener("click", m), L(null), C(!1), () => {
649
+ L(null), C(!1), document.body.removeEventListener("click", m);
648
650
  };
649
- }, []), f.useEffect(() => {
650
- if ($) {
651
- const m = [...s].map((q) => q.id === $.id ? $ : q);
651
+ }, []), _.useEffect(() => {
652
+ if (A) {
653
+ const m = [...s].map((T) => T.id === A.id ? A : T);
652
654
  n(m);
653
655
  }
654
- }, [$]), f.useEffect(() => {
655
- if (M.current && u) {
656
- const m = M.current.getBoundingClientRect().height, q = window.innerHeight;
657
- let B = u.top;
658
- B + m > q + window.scrollY - 200 && (B = q + window.scrollY - m - 200), B < 0 && (B = 10), E({
659
- top: B,
660
- left: u.left
656
+ }, [A]), _.useEffect(() => {
657
+ if (a.current && N) {
658
+ const m = a.current.getBoundingClientRect().height, T = window.innerHeight;
659
+ let E = N.top;
660
+ E + m > T + window.scrollY - 200 && (E = T + window.scrollY - m - 200), E < 0 && (E = 10), b({
661
+ top: E,
662
+ left: N.left
661
663
  });
662
664
  }
663
- }, [M.current, u]);
664
- const R = (m, q) => {
665
+ }, [a.current, N]);
666
+ const P = (m, T) => {
665
667
  m.stopPropagation();
666
- const B = m.target.getBoundingClientRect();
667
- C({
668
- top: B.top + window.scrollY,
669
- left: B.left - 30
670
- }), T(q), j(!0);
668
+ const E = m.target.getBoundingClientRect();
669
+ O({
670
+ top: E.top + window.scrollY,
671
+ left: E.left - 30
672
+ }), L(T), C(!0);
671
673
  };
672
- function P(m) {
673
- if (O)
674
+ function R(m) {
675
+ if ($)
674
676
  return m ? /* @__PURE__ */ t.jsx(
675
677
  "img",
676
678
  {
@@ -680,7 +682,7 @@ const Zn = (r) => {
680
682
  height: 16
681
683
  }
682
684
  ) : /* @__PURE__ */ t.jsx(
683
- b,
685
+ x,
684
686
  {
685
687
  name: "Image",
686
688
  width: 16,
@@ -689,20 +691,20 @@ const Zn = (r) => {
689
691
  }
690
692
  );
691
693
  }
692
- const z = (m) => {
693
- const { active: q, over: B } = m;
694
- if (B && q.id !== B.id) {
695
- const A = s.findIndex((H) => H.id === q.id), et = s.findIndex((H) => H.id === B.id);
696
- if (A !== -1 && et !== -1) {
697
- const H = [...s], [X] = H.splice(A, 1);
698
- H.splice(et, 0, X), n(H);
694
+ const K = (m) => {
695
+ const { active: T, over: E } = m;
696
+ if (E && T.id !== E.id) {
697
+ const z = s.findIndex((F) => F.id === T.id), et = s.findIndex((F) => F.id === E.id);
698
+ if (z !== -1 && et !== -1) {
699
+ const F = [...s], [X] = F.splice(z, 1);
700
+ F.splice(et, 0, X), n(F);
699
701
  }
700
702
  }
701
- }, J = (m) => {
702
- var B;
703
- const q = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
704
- I && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
705
- b,
703
+ }, st = (m) => {
704
+ var E;
705
+ const T = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
706
+ f && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
707
+ x,
706
708
  {
707
709
  name: "DotsSixVertical",
708
710
  hoverable: !0,
@@ -710,140 +712,140 @@ const Zn = (r) => {
710
712
  height: 20
711
713
  }
712
714
  ) }),
713
- x === "select" && _ && /* @__PURE__ */ t.jsx(
714
- ot,
715
+ M === "select" && p && /* @__PURE__ */ t.jsx(
716
+ at,
715
717
  {
716
- onChange: (A) => {
717
- const H = [...s].map((X) => X.id === m.id ? {
718
+ onChange: (z) => {
719
+ const F = [...s].map((X) => X.id === m.id ? {
718
720
  ...m,
719
721
  name: {
720
- "en-US": A
722
+ "en-US": z
721
723
  }
722
724
  } : X);
723
- T({
725
+ L({
724
726
  ...m,
725
727
  name: {
726
- "en-US": A
728
+ "en-US": z
727
729
  }
728
- }), n([...H]);
730
+ }), n([...F]);
729
731
  },
730
732
  value: m.name["en-US"],
731
- options: _.filter(
732
- (A) => !s.find((et) => et.name["en-US"] === A)
733
+ options: p.filter(
734
+ (z) => !s.find((et) => et.name["en-US"] === z)
733
735
  ),
734
- leftAddon: P(m.images)
736
+ leftAddon: R(m.images)
735
737
  }
736
738
  ),
737
- x === "input" && /* @__PURE__ */ t.jsx(
738
- rt,
739
+ M === "input" && /* @__PURE__ */ t.jsx(
740
+ dt,
739
741
  {
740
- onChange: (A) => {
741
- const H = [...s].map((X) => X.id === m.id ? {
742
+ onChange: (z) => {
743
+ const F = [...s].map((X) => X.id === m.id ? {
742
744
  ...m,
743
745
  name: {
744
- "en-US": A
746
+ "en-US": z
745
747
  }
746
748
  } : X);
747
- n([...H]);
749
+ n([...F]);
748
750
  },
749
751
  value: m.name["en-US"],
750
- placeholder: v
752
+ placeholder: w
751
753
  }
752
754
  ),
753
- x === "image" && /* @__PURE__ */ t.jsx(
754
- St,
755
+ M === "image" && /* @__PURE__ */ t.jsx(
756
+ wt,
755
757
  {
756
- onChange: (A) => {
757
- const H = [...s].map((X) => X.id === m.id ? {
758
+ onChange: (z) => {
759
+ const F = [...s].map((X) => X.id === m.id ? {
758
760
  ...m,
759
- images: A
761
+ images: z
760
762
  } : X);
761
- n([...H]);
763
+ n([...F]);
762
764
  },
763
- activeImage: (B = s.find((A) => A.id === m.id)) == null ? void 0 : B.images[0]
765
+ activeImage: (E = s.find((z) => z.id === m.id)) == null ? void 0 : E.images[0]
764
766
  }
765
767
  ),
766
- /* @__PURE__ */ t.jsxs("div", { className: U.buttons, children: [
767
- p && /* @__PURE__ */ t.jsx("div", { className: U.deleteButton, children: /* @__PURE__ */ t.jsx(
768
- b,
768
+ /* @__PURE__ */ t.jsxs("div", { className: H.buttons, children: [
769
+ d && /* @__PURE__ */ t.jsx("div", { className: H.deleteButton, children: /* @__PURE__ */ t.jsx(
770
+ x,
769
771
  {
770
772
  name: "Sliders",
771
773
  hoverable: !0,
772
774
  width: 20,
773
775
  height: 20,
774
- onClick: (A) => R(A, m)
776
+ onClick: (z) => P(z, m)
775
777
  }
776
778
  ) }),
777
- d && /* @__PURE__ */ t.jsx("div", { className: U.deleteButton, children: /* @__PURE__ */ t.jsx(
778
- b,
779
+ c && /* @__PURE__ */ t.jsx("div", { className: H.deleteButton, children: /* @__PURE__ */ t.jsx(
780
+ x,
779
781
  {
780
782
  name: "Trash",
781
783
  hoverable: !0,
782
784
  width: 20,
783
785
  height: 20,
784
786
  fill: "#C12A2A",
785
- onClick: () => n(s.filter((A) => A.id !== m.id))
787
+ onClick: () => n(s.filter((z) => z.id !== m.id))
786
788
  }
787
789
  ) })
788
790
  ] })
789
791
  ] });
790
- return I ? /* @__PURE__ */ t.jsx(
791
- He,
792
+ return f ? /* @__PURE__ */ t.jsx(
793
+ Ue,
792
794
  {
793
795
  product: m,
794
- children: q
796
+ children: T
795
797
  },
796
798
  m.id
797
799
  ) : /* @__PURE__ */ t.jsx(
798
800
  "div",
799
801
  {
800
- className: U.product,
801
- children: q
802
+ className: H.product,
803
+ children: T
802
804
  },
803
805
  m.id
804
806
  );
805
807
  };
806
- return /* @__PURE__ */ t.jsxs("div", { className: U.productsBlock, children: [
807
- (h || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: U.top, children: [
808
- h && /* @__PURE__ */ t.jsx("h3", { className: U.title, children: h }),
809
- o !== void 0 && /* @__PURE__ */ t.jsx(
810
- it,
808
+ return /* @__PURE__ */ t.jsxs("div", { className: H.productsBlock, children: [
809
+ (u || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: H.top, children: [
810
+ u && /* @__PURE__ */ t.jsx("h3", { className: H.title, children: u }),
811
+ i !== void 0 && /* @__PURE__ */ t.jsx(
812
+ ot,
811
813
  {
812
- current: o,
814
+ current: i,
813
815
  onChange: (m) => e == null ? void 0 : e(m)
814
816
  }
815
817
  )
816
818
  ] }),
817
- $ && p && L && l && /* @__PURE__ */ t.jsx(
818
- Ct,
819
+ A && d && g && j && /* @__PURE__ */ t.jsx(
820
+ St,
819
821
  {
820
- ref: M,
821
- activeItem: $,
822
- setActiveItem: T,
823
- popupPosition: Q,
824
- modalOptions: L,
825
- setIsOpenModal: j
822
+ ref: a,
823
+ activeItem: A,
824
+ setActiveItem: L,
825
+ popupPosition: S,
826
+ modalOptions: g,
827
+ setIsOpenModal: C
826
828
  }
827
829
  ),
828
- y && w && /* @__PURE__ */ t.jsx(vt, { ...w }),
829
- /* @__PURE__ */ t.jsxs("div", { className: U.products, children: [
830
- c && /* @__PURE__ */ t.jsx("h5", { className: U.subtitle, children: c }),
831
- I ? /* @__PURE__ */ t.jsx(
832
- pt,
830
+ I && B && /* @__PURE__ */ t.jsx(yt, { ...B }),
831
+ /* @__PURE__ */ t.jsxs("div", { className: H.products, children: [
832
+ o && /* @__PURE__ */ t.jsx("h5", { className: H.subtitle, children: o }),
833
+ f ? /* @__PURE__ */ t.jsx(
834
+ _t,
833
835
  {
834
- sensors: S,
835
- onDragEnd: z,
836
+ sensors: D,
837
+ onDragEnd: K,
836
838
  children: /* @__PURE__ */ t.jsx(
837
- _t,
839
+ gt,
838
840
  {
839
841
  items: s.map((m) => m.id),
840
- strategy: gt,
841
- children: s.map((m) => J(m))
842
+ strategy: xt,
843
+ children: s.map((m) => st(m))
842
844
  }
843
845
  )
844
846
  }
845
- ) : s.map((m) => J(m)),
846
- i && /* @__PURE__ */ t.jsx(
847
+ ) : s.map((m) => st(m)),
848
+ l && /* @__PURE__ */ t.jsx(
847
849
  "div",
848
850
  {
849
851
  style: {
@@ -855,49 +857,52 @@ const Zn = (r) => {
855
857
  tt,
856
858
  {
857
859
  withoutHover: !0,
858
- className: U.button,
860
+ className: Y(H.button, {
861
+ [H.disabled]: !!(q && q <= s.length)
862
+ }),
859
863
  size: "s",
864
+ disabled: !!(q && q <= s.length),
860
865
  onClick: () => {
861
866
  const m = [...s];
862
- let q = null;
863
- if (_) {
864
- for (let B = 0; B < _.length; B++)
865
- if (!s.find((A) => A.name["en-US"] === _[B])) {
866
- q = _[B];
867
+ let T = null;
868
+ if (p) {
869
+ for (let E = 0; E < p.length; E++)
870
+ if (!s.find((z) => z.name["en-US"] === p[E])) {
871
+ T = p[E];
867
872
  break;
868
873
  }
869
874
  }
870
- x === "select" && _ ? m.push({
875
+ M === "select" && p ? m.push({
871
876
  name: {
872
- "en-US": q || _[0]
877
+ "en-US": T || p[0]
873
878
  },
874
- id: nt(),
875
- ...a,
879
+ id: it(),
880
+ ...v,
876
881
  maxSymbols: 100
877
882
  // пример значения
878
- }) : x === "input" ? m.push({
883
+ }) : M === "input" ? m.push({
879
884
  name: {
880
885
  "en-US": ""
881
886
  },
882
- id: nt(),
883
- ...a,
887
+ id: it(),
888
+ ...v,
884
889
  maxSymbols: 100
885
890
  }) : m.push({
886
891
  name: {
887
892
  "en-US": `Image ${s.length + 1}`
888
893
  },
889
- id: nt(),
890
- ...a,
894
+ id: it(),
895
+ ...v,
891
896
  maxSymbols: 100
892
897
  }), n(m);
893
898
  },
894
899
  style: {
895
900
  width: "fit-content"
896
901
  },
897
- children: /* @__PURE__ */ t.jsxs("div", { className: U.addButton, children: [
902
+ children: /* @__PURE__ */ t.jsxs("div", { className: H.addButton, children: [
898
903
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
899
904
  /* @__PURE__ */ t.jsx(
900
- b,
905
+ x,
901
906
  {
902
907
  name: "Plus",
903
908
  width: 16,
@@ -910,101 +915,101 @@ const Zn = (r) => {
910
915
  }
911
916
  )
912
917
  ] }),
913
- g !== void 0 && /* @__PURE__ */ t.jsx(dt, { items: g })
918
+ h !== void 0 && /* @__PURE__ */ t.jsx(ut, { items: h })
914
919
  ] });
915
- }, Ue = "_subtitle_jql1y_1", Fe = "_header_jql1y_8", Ve = "_text_jql1y_9", Ye = "_productsBlock_jql1y_10", We = "_buttonsBlock_jql1y_11", Ge = "_top_jql1y_23", Qe = "_itemsBlock_jql1y_32", Xe = "_typeTexts_jql1y_38", Je = "_block_jql1y_45", Ke = "_active_jql1y_58", Ze = "_products_jql1y_10", ts = "_product_jql1y_10", es = "_button_jql1y_11", ss = "_image_jql1y_88", ns = "_info_jql1y_95", is = "_name_jql1y_107", os = "_buttons_jql1y_11", as = "_modal_jql1y_118", cs = "_other_jql1y_138", ls = "_options_jql1y_144", rs = "_addButton_jql1y_150", ds = "_deleteButton_jql1y_165", K = {
916
- subtitle: Ue,
917
- header: Fe,
918
- text: Ve,
919
- productsBlock: Ye,
920
+ }, Fe = "_subtitle_jql1y_1", Ve = "_header_jql1y_8", Ye = "_text_jql1y_9", Ge = "_productsBlock_jql1y_10", We = "_buttonsBlock_jql1y_11", Je = "_top_jql1y_23", Xe = "_itemsBlock_jql1y_32", Ke = "_typeTexts_jql1y_38", Qe = "_block_jql1y_45", Ze = "_active_jql1y_58", ts = "_products_jql1y_10", es = "_product_jql1y_10", ss = "_button_jql1y_11", ns = "_image_jql1y_88", is = "_info_jql1y_95", os = "_name_jql1y_107", as = "_buttons_jql1y_11", cs = "_modal_jql1y_118", ls = "_other_jql1y_138", rs = "_options_jql1y_144", ds = "_addButton_jql1y_150", us = "_deleteButton_jql1y_165", Q = {
921
+ subtitle: Fe,
922
+ header: Ve,
923
+ text: Ye,
924
+ productsBlock: Ge,
920
925
  buttonsBlock: We,
921
- top: Ge,
922
- itemsBlock: Qe,
923
- typeTexts: Xe,
924
- block: Je,
925
- active: Ke,
926
- products: Ze,
927
- product: ts,
928
- button: es,
929
- image: ss,
930
- info: ns,
931
- name: is,
932
- buttons: os,
933
- modal: as,
934
- other: cs,
935
- options: ls,
936
- addButton: rs,
937
- deleteButton: ds
938
- }, us = (r) => {
939
- const { buttons: o, setButtons: e, deletable: s = !0, addable: n = !0, editableLink: g = !0 } = r, { pages: h } = wt(), [c, p] = f.useState(null), [I, O] = f.useState({
926
+ top: Je,
927
+ itemsBlock: Xe,
928
+ typeTexts: Ke,
929
+ block: Qe,
930
+ active: Ze,
931
+ products: ts,
932
+ product: es,
933
+ button: ss,
934
+ image: ns,
935
+ info: is,
936
+ name: os,
937
+ buttons: as,
938
+ modal: cs,
939
+ other: ls,
940
+ options: rs,
941
+ addButton: ds,
942
+ deleteButton: us
943
+ }, ms = (r) => {
944
+ const { buttons: i, setButtons: e, deletable: s = !0, addable: n = !0, editableLink: h = !0 } = r, { pages: u } = Bt(), [o, d] = _.useState(null), [f, $] = _.useState({
940
945
  top: 0,
941
946
  left: 0
942
- }), [d, i] = f.useState(null), x = f.useRef(null);
943
- f.useEffect(() => {
944
- if (c) {
945
- const _ = [...o].map((y) => y.id === c.id ? c : y);
946
- e(_);
947
+ }), [c, l] = _.useState(null), M = _.useRef(null);
948
+ _.useEffect(() => {
949
+ if (o) {
950
+ const p = [...i].map((I) => I.id === o.id ? o : I);
951
+ e(p);
947
952
  }
948
- }, [c]), f.useEffect(() => {
949
- if (x.current && d) {
950
- const _ = x.current.getBoundingClientRect().height, y = window.innerHeight;
951
- let w = d.top;
952
- w + _ > y + window.scrollY - 200 && (w = y + window.scrollY - _ - 200), w < 0 && (w = 10), O({
953
- top: w,
954
- left: d.left
953
+ }, [o]), _.useEffect(() => {
954
+ if (M.current && c) {
955
+ const p = M.current.getBoundingClientRect().height, I = window.innerHeight;
956
+ let B = c.top;
957
+ B + p > I + window.scrollY - 200 && (B = I + window.scrollY - p - 200), B < 0 && (B = 10), $({
958
+ top: B,
959
+ left: c.left
955
960
  });
956
961
  }
957
- }, [x.current, d]);
958
- const v = (_, y) => {
959
- _.stopPropagation();
960
- const w = _.target.getBoundingClientRect();
961
- i({
962
- top: w.top + window.scrollY - 70,
963
- left: w.left - (n ? 30 : 65)
964
- }), p(y);
962
+ }, [M.current, c]);
963
+ const w = (p, I) => {
964
+ p.stopPropagation();
965
+ const B = p.target.getBoundingClientRect();
966
+ l({
967
+ top: B.top + window.scrollY - 70,
968
+ left: B.left - (n ? 30 : 65)
969
+ }), d(I);
965
970
  };
966
- return /* @__PURE__ */ t.jsxs("div", { className: K.products, children: [
967
- /* @__PURE__ */ t.jsx("h5", { className: K.subtitle, children: "Button Type" }),
968
- o.map((_) => /* @__PURE__ */ t.jsxs(
971
+ return /* @__PURE__ */ t.jsxs("div", { className: Q.products, children: [
972
+ /* @__PURE__ */ t.jsx("h5", { className: Q.subtitle, children: "Button Type" }),
973
+ i.map((p) => /* @__PURE__ */ t.jsxs(
969
974
  "div",
970
975
  {
971
- className: K.product,
976
+ className: Q.product,
972
977
  children: [
973
978
  /* @__PURE__ */ t.jsx(
974
- ot,
979
+ at,
975
980
  {
976
- onChange: (y) => {
977
- const L = [...o].map((a) => a.id === _.id ? {
978
- ..._,
979
- type: y
980
- } : a);
981
- e(L);
981
+ onChange: (I) => {
982
+ const g = [...i].map((v) => v.id === p.id ? {
983
+ ...p,
984
+ type: I
985
+ } : v);
986
+ e(g);
982
987
  },
983
- value: _.type,
988
+ value: p.type,
984
989
  options: ["Primary", "Secondary", "Tertiary"]
985
990
  }
986
991
  ),
987
- /* @__PURE__ */ t.jsxs("div", { className: K.buttons, children: [
988
- /* @__PURE__ */ t.jsx("div", { className: K.deleteButton, children: /* @__PURE__ */ t.jsx(
989
- b,
992
+ /* @__PURE__ */ t.jsxs("div", { className: Q.buttons, children: [
993
+ /* @__PURE__ */ t.jsx("div", { className: Q.deleteButton, children: /* @__PURE__ */ t.jsx(
994
+ x,
990
995
  {
991
996
  name: "Sliders",
992
997
  hoverable: !0,
993
998
  width: 20,
994
999
  height: 20,
995
- onClick: (y) => {
996
- v(y, _);
1000
+ onClick: (I) => {
1001
+ w(I, p);
997
1002
  }
998
1003
  }
999
1004
  ) }),
1000
- s && /* @__PURE__ */ t.jsx("div", { className: K.deleteButton, children: /* @__PURE__ */ t.jsx(
1001
- b,
1005
+ s && /* @__PURE__ */ t.jsx("div", { className: Q.deleteButton, children: /* @__PURE__ */ t.jsx(
1006
+ x,
1002
1007
  {
1003
1008
  name: "Trash",
1004
1009
  hoverable: !0,
1005
1010
  onClick: () => {
1006
- const y = o.filter((w) => w.id !== _.id);
1007
- e(y);
1011
+ const I = i.filter((B) => B.id !== p.id);
1012
+ e(I);
1008
1013
  },
1009
1014
  width: 20,
1010
1015
  height: 20,
@@ -1014,16 +1019,16 @@ const Zn = (r) => {
1014
1019
  ] })
1015
1020
  ]
1016
1021
  },
1017
- _.id
1022
+ p.id
1018
1023
  )),
1019
- c && /* @__PURE__ */ t.jsx(
1024
+ o && /* @__PURE__ */ t.jsx(
1020
1025
  $t,
1021
1026
  {
1022
- ref: x,
1023
- activeButton: c,
1024
- setActiveButton: p,
1025
- popupPosition: I,
1026
- editableLink: g
1027
+ ref: M,
1028
+ activeButton: o,
1029
+ setActiveButton: d,
1030
+ popupPosition: f,
1031
+ editableLink: h
1027
1032
  }
1028
1033
  ),
1029
1034
  n && /* @__PURE__ */ t.jsx(
@@ -1038,39 +1043,39 @@ const Zn = (r) => {
1038
1043
  tt,
1039
1044
  {
1040
1045
  withoutHover: !0,
1041
- className: K.button,
1046
+ className: Q.button,
1042
1047
  size: "s",
1043
1048
  onClick: () => {
1044
- const _ = [...o];
1045
- g ? _.push({
1049
+ const p = [...i];
1050
+ h ? p.push({
1046
1051
  type: "Primary",
1047
- id: nt(),
1052
+ id: it(),
1048
1053
  typesText: [],
1049
1054
  text: {
1050
1055
  "en-US": "Button Name"
1051
1056
  },
1052
1057
  destination: "Go to Page",
1053
- page: h ? Object.values(h)[0].name : "Home",
1058
+ page: u ? Object.values(u)[0].name : "Home",
1054
1059
  openInNewTab: !1
1055
- }) : _.push({
1060
+ }) : p.push({
1056
1061
  type: "Primary",
1057
- id: nt(),
1062
+ id: it(),
1058
1063
  typesText: [],
1059
1064
  text: {
1060
1065
  "en-US": "Create Ticket"
1061
1066
  },
1062
1067
  destination: "Go to Page",
1063
- page: h ? Object.values(h)[0].name : "Home",
1068
+ page: u ? Object.values(u)[0].name : "Home",
1064
1069
  openInNewTab: !1
1065
- }), e(_);
1070
+ }), e(p);
1066
1071
  },
1067
1072
  style: {
1068
1073
  width: "fit-content"
1069
1074
  },
1070
- children: /* @__PURE__ */ t.jsxs("div", { className: K.addButton, children: [
1075
+ children: /* @__PURE__ */ t.jsxs("div", { className: Q.addButton, children: [
1071
1076
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
1072
1077
  /* @__PURE__ */ t.jsx(
1073
- b,
1078
+ x,
1074
1079
  {
1075
1080
  name: "Plus",
1076
1081
  width: 16,
@@ -1083,110 +1088,120 @@ const Zn = (r) => {
1083
1088
  }
1084
1089
  )
1085
1090
  ] });
1086
- }, ti = (r) => {
1087
- const { isActiveButtons: o, setIsActiveButtons: e, buttons: s, setButtons: n, editableLink: g = !0 } = r;
1088
- return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: lt.buttonsBlock, children: [
1089
- /* @__PURE__ */ t.jsxs("div", { className: lt.top, children: [
1090
- /* @__PURE__ */ t.jsx("h3", { className: lt.title, children: "Buttons" }),
1091
+ }, ei = (r) => {
1092
+ const {
1093
+ isActiveButtons: i,
1094
+ setIsActiveButtons: e,
1095
+ buttons: s,
1096
+ setButtons: n,
1097
+ editableLink: h = !0,
1098
+ addable: u = !0,
1099
+ deletable: o = !0
1100
+ } = r;
1101
+ return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: rt.buttonsBlock, children: [
1102
+ /* @__PURE__ */ t.jsxs("div", { className: rt.top, children: [
1103
+ /* @__PURE__ */ t.jsx("h3", { className: rt.title, children: "Buttons" }),
1091
1104
  /* @__PURE__ */ t.jsx(
1092
- it,
1105
+ ot,
1093
1106
  {
1094
- current: o,
1095
- onChange: (h) => e(h)
1107
+ current: i,
1108
+ onChange: (d) => e(d)
1096
1109
  }
1097
1110
  )
1098
1111
  ] }),
1099
- o && /* @__PURE__ */ t.jsx(
1100
- us,
1112
+ i && /* @__PURE__ */ t.jsx(
1113
+ ms,
1101
1114
  {
1102
1115
  buttons: s,
1103
1116
  setButtons: n,
1104
- editableLink: g
1117
+ editableLink: h,
1118
+ addable: u,
1119
+ deletable: o
1105
1120
  }
1106
1121
  )
1107
1122
  ] }) });
1108
1123
  };
1109
- function ms(r) {
1110
- const { product: o, children: e } = r, { attributes: s, listeners: n, setNodeRef: g, transform: h, transition: c, isDragging: p } = ft({
1111
- id: String(o.listingId)
1112
- }), I = {
1113
- transform: xt.Transform.toString(h),
1114
- transition: c
1124
+ function hs(r) {
1125
+ const { product: i, children: e } = r, { attributes: s, listeners: n, setNodeRef: h, transform: u, transition: o, isDragging: d } = ft({
1126
+ id: String(i.listingId)
1127
+ }), f = {
1128
+ transform: bt.Transform.toString(u),
1129
+ transition: o
1115
1130
  };
1116
1131
  return /* @__PURE__ */ t.jsx(
1117
1132
  "div",
1118
1133
  {
1119
- ref: g,
1120
- style: I,
1121
- className: `${F.product} ${p ? F.dragging : ""}`,
1134
+ ref: h,
1135
+ style: f,
1136
+ className: `${V.product} ${d ? V.dragging : ""}`,
1122
1137
  ...s,
1123
1138
  ...n,
1124
1139
  children: e
1125
1140
  }
1126
1141
  );
1127
1142
  }
1128
- const ei = (r) => {
1143
+ const si = (r) => {
1129
1144
  const {
1130
- isActiveItems: o,
1145
+ isActiveItems: i,
1131
1146
  setIsActiveItems: e,
1132
1147
  items: s,
1133
1148
  setItems: n,
1134
- other: g,
1135
- title: h,
1136
- subtitle: c,
1137
- editable: p = !0,
1138
- draggable: I = !1,
1139
- withImage: O = !1,
1140
- deletable: d = !0,
1141
- addable: i = !0,
1142
- itemsType: x,
1143
- itemsOptions: v
1144
- } = r, [_, y] = f.useState(
1149
+ other: h,
1150
+ title: u,
1151
+ subtitle: o,
1152
+ editable: d = !0,
1153
+ draggable: f = !1,
1154
+ withImage: $ = !1,
1155
+ deletable: c = !0,
1156
+ addable: l = !0,
1157
+ itemsType: M,
1158
+ itemsOptions: w
1159
+ } = r, [p, I] = _.useState(
1145
1160
  null
1146
- ), [w, L] = f.useState({
1161
+ ), [B, g] = _.useState({
1147
1162
  top: 0,
1148
1163
  left: 0
1149
- }), [a, $] = f.useState(!1), T = ut(
1150
- mt(ht, {
1164
+ }), [v, q] = _.useState(!1), A = mt(
1165
+ ht(pt, {
1151
1166
  activationConstraint: {
1152
1167
  distance: 5
1153
1168
  }
1154
1169
  })
1155
1170
  );
1156
- f.useEffect(() => {
1157
- const l = () => {
1158
- y(null), $(!1);
1171
+ _.useEffect(() => {
1172
+ const a = () => {
1173
+ I(null), q(!1);
1159
1174
  };
1160
- return document.body.addEventListener("click", l), y(null), $(!1), () => {
1161
- y(null), $(!1), document.body.removeEventListener("click", l);
1175
+ return document.body.addEventListener("click", a), I(null), q(!1), () => {
1176
+ I(null), q(!1), document.body.removeEventListener("click", a);
1162
1177
  };
1163
- }, []), f.useEffect(() => {
1164
- if (_) {
1165
- const l = [...s].map((j) => j.listingId === _.listingId ? _ : j);
1166
- n(l);
1178
+ }, []), _.useEffect(() => {
1179
+ if (p) {
1180
+ const a = [...s].map((j) => j.listingId === p.listingId ? p : j);
1181
+ n(a);
1167
1182
  }
1168
- }, [_]);
1169
- const Q = (l, j) => {
1170
- l.stopPropagation();
1171
- const S = l.target.getBoundingClientRect(), R = 100, P = window.innerHeight;
1172
- let z = S.top + window.scrollY;
1173
- z + R > P && (z = P - R - 20), $(!0), L({
1174
- top: z - 80,
1175
- left: S.left - 30
1176
- }), y(j);
1183
+ }, [p]);
1184
+ const L = (a, j) => {
1185
+ a.stopPropagation();
1186
+ const C = a.target.getBoundingClientRect(), D = 100, P = window.innerHeight;
1187
+ let R = C.top + window.scrollY;
1188
+ R + D > P && (R = P - D - 20), q(!0), g({
1189
+ top: R - 80,
1190
+ left: C.left - 30
1191
+ }), I(j);
1177
1192
  };
1178
- function E(l) {
1179
- if (O)
1180
- return l ? /* @__PURE__ */ t.jsx(
1193
+ function S(a) {
1194
+ if ($)
1195
+ return a ? /* @__PURE__ */ t.jsx(
1181
1196
  "img",
1182
1197
  {
1183
- src: `https://imagedelivery.net/${l}/w=1000`,
1198
+ src: `https://imagedelivery.net/${a}/w=1000`,
1184
1199
  alt: "image",
1185
1200
  width: 16,
1186
1201
  height: 16
1187
1202
  }
1188
1203
  ) : /* @__PURE__ */ t.jsx(
1189
- b,
1204
+ x,
1190
1205
  {
1191
1206
  name: "Image",
1192
1207
  width: 16,
@@ -1195,21 +1210,21 @@ const ei = (r) => {
1195
1210
  }
1196
1211
  );
1197
1212
  }
1198
- const u = (l) => {
1199
- const { active: j, over: S } = l;
1200
- if (S && j.id !== S.id) {
1201
- const R = s.findIndex((z) => String(z.listingId) === j.id), P = s.findIndex((z) => String(z.listingId) === S.id);
1202
- if (R !== -1 && P !== -1) {
1203
- const z = [...s], [J] = z.splice(R, 1);
1204
- z.splice(P, 0, J), n(z);
1213
+ const b = (a) => {
1214
+ const { active: j, over: C } = a;
1215
+ if (C && j.id !== C.id) {
1216
+ const D = s.findIndex((R) => String(R.listingId) === j.id), P = s.findIndex((R) => String(R.listingId) === C.id);
1217
+ if (D !== -1 && P !== -1) {
1218
+ const R = [...s], [K] = R.splice(D, 1);
1219
+ R.splice(P, 0, K), n(R);
1205
1220
  }
1206
1221
  }
1207
- }, C = (l, j) => {
1208
- const S = v.find((P) => l.listingId === P.id);
1209
- if (!S) return null;
1210
- const R = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1211
- I && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1212
- b,
1222
+ }, N = (a, j) => {
1223
+ const C = w.find((P) => a.listingId === P.id);
1224
+ if (!C) return null;
1225
+ const D = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1226
+ f && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1227
+ x,
1213
1228
  {
1214
1229
  name: "DotsSixVertical",
1215
1230
  hoverable: !0,
@@ -1217,108 +1232,108 @@ const ei = (r) => {
1217
1232
  height: 20
1218
1233
  }
1219
1234
  ) }),
1220
- x === "select" && /* @__PURE__ */ t.jsx(
1221
- ot,
1235
+ M === "select" && /* @__PURE__ */ t.jsx(
1236
+ at,
1222
1237
  {
1223
1238
  onChange: (P) => {
1224
- const z = [...s], J = v.find((B) => B.productData.name === P);
1225
- if (!J) return;
1226
- const m = {
1227
- listingId: J.id,
1228
- image: J.productData.images.length > 0 ? J.productData.images[0].cfId : ""
1229
- }, q = z.map((B) => B.listingId === l.listingId ? m : B);
1230
- y(m), n([...q]);
1239
+ const R = [...s], K = w.find((T) => T.productData.name === P);
1240
+ if (!K) return;
1241
+ const st = {
1242
+ listingId: K.id,
1243
+ image: K.productData.images.length > 0 ? K.productData.images[0].cfId : ""
1244
+ }, m = R.map((T) => T.listingId === a.listingId ? st : T);
1245
+ I(st), n([...m]);
1231
1246
  },
1232
- value: S.productData.name,
1247
+ value: C.productData.name,
1233
1248
  options: [
1234
- ...v.filter((P) => !s.find((z) => z.listingId === P.id)).map((P) => P.productData.name)
1249
+ ...w.filter((P) => !s.find((R) => R.listingId === P.id)).map((P) => P.productData.name)
1235
1250
  ],
1236
- leftAddon: E(
1237
- l.image || S.productData.images.length > 0 && S.productData.images[0].cfId || ""
1251
+ leftAddon: S(
1252
+ a.image || C.productData.images.length > 0 && C.productData.images[0].cfId || ""
1238
1253
  )
1239
1254
  },
1240
1255
  j
1241
1256
  ),
1242
- /* @__PURE__ */ t.jsxs("div", { className: F.buttons, children: [
1243
- p && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
1244
- b,
1257
+ /* @__PURE__ */ t.jsxs("div", { className: V.buttons, children: [
1258
+ d && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
1259
+ x,
1245
1260
  {
1246
1261
  name: "Sliders",
1247
1262
  hoverable: !0,
1248
1263
  width: 20,
1249
1264
  height: 20,
1250
- onClick: (P) => Q(P, l)
1265
+ onClick: (P) => L(P, a)
1251
1266
  }
1252
1267
  ) }),
1253
- d && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
1254
- b,
1268
+ c && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
1269
+ x,
1255
1270
  {
1256
1271
  name: "Trash",
1257
1272
  hoverable: !0,
1258
1273
  width: 20,
1259
1274
  height: 20,
1260
1275
  fill: "#C12A2A",
1261
- onClick: () => n(s.filter((P) => P !== l))
1276
+ onClick: () => n(s.filter((P) => P !== a))
1262
1277
  }
1263
1278
  ) })
1264
1279
  ] })
1265
1280
  ] });
1266
- return I ? /* @__PURE__ */ t.jsx(
1267
- ms,
1281
+ return f ? /* @__PURE__ */ t.jsx(
1282
+ hs,
1268
1283
  {
1269
- product: l,
1270
- children: R
1284
+ product: a,
1285
+ children: D
1271
1286
  },
1272
- l.listingId
1287
+ a.listingId
1273
1288
  ) : /* @__PURE__ */ t.jsx(
1274
1289
  "div",
1275
1290
  {
1276
- className: F.product,
1277
- children: R
1291
+ className: V.product,
1292
+ children: D
1278
1293
  },
1279
- l.listingId
1294
+ a.listingId
1280
1295
  );
1281
- }, M = f.useRef(null);
1282
- return /* @__PURE__ */ t.jsxs("div", { className: F.productsBlock, children: [
1283
- (h || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: F.top, children: [
1284
- h && /* @__PURE__ */ t.jsx("h3", { className: F.title, children: h }),
1285
- o !== void 0 && /* @__PURE__ */ t.jsx(
1286
- it,
1296
+ }, O = _.useRef(null);
1297
+ return /* @__PURE__ */ t.jsxs("div", { className: V.productsBlock, children: [
1298
+ (u || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
1299
+ u && /* @__PURE__ */ t.jsx("h3", { className: V.title, children: u }),
1300
+ i !== void 0 && /* @__PURE__ */ t.jsx(
1301
+ ot,
1287
1302
  {
1288
- current: o,
1289
- onChange: (l) => e == null ? void 0 : e(l)
1303
+ current: i,
1304
+ onChange: (a) => e == null ? void 0 : e(a)
1290
1305
  }
1291
1306
  )
1292
1307
  ] }),
1293
- a && _ && /* @__PURE__ */ t.jsx(
1294
- Bt,
1308
+ v && p && /* @__PURE__ */ t.jsx(
1309
+ Pt,
1295
1310
  {
1296
- ref: M,
1297
- activeItem: _,
1298
- setActiveItem: y,
1299
- setIsOpenModal: $,
1300
- popupPosition: w,
1301
- itemsOptions: v
1311
+ ref: O,
1312
+ activeItem: p,
1313
+ setActiveItem: I,
1314
+ setIsOpenModal: q,
1315
+ popupPosition: B,
1316
+ itemsOptions: w
1302
1317
  }
1303
1318
  ),
1304
- o && /* @__PURE__ */ t.jsxs("div", { className: F.products, children: [
1305
- c && /* @__PURE__ */ t.jsx("h5", { className: F.subtitle, children: c }),
1306
- I ? /* @__PURE__ */ t.jsx(
1307
- pt,
1319
+ i && /* @__PURE__ */ t.jsxs("div", { className: V.products, children: [
1320
+ o && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: o }),
1321
+ f ? /* @__PURE__ */ t.jsx(
1322
+ _t,
1308
1323
  {
1309
- sensors: T,
1310
- onDragEnd: u,
1324
+ sensors: A,
1325
+ onDragEnd: b,
1311
1326
  children: /* @__PURE__ */ t.jsx(
1312
- _t,
1327
+ gt,
1313
1328
  {
1314
- items: s.map((l) => String(l.listingId)),
1315
- strategy: gt,
1316
- children: s.map((l, j) => C(l, j))
1329
+ items: s.map((a) => String(a.listingId)),
1330
+ strategy: xt,
1331
+ children: s.map((a, j) => N(a, j))
1317
1332
  }
1318
1333
  )
1319
1334
  }
1320
- ) : s.map((l, j) => C(l, j)),
1321
- i && /* @__PURE__ */ t.jsx(
1335
+ ) : s.map((a, j) => N(a, j)),
1336
+ l && /* @__PURE__ */ t.jsx(
1322
1337
  "div",
1323
1338
  {
1324
1339
  style: {
@@ -1330,28 +1345,28 @@ const ei = (r) => {
1330
1345
  tt,
1331
1346
  {
1332
1347
  withoutHover: !0,
1333
- className: F.button,
1348
+ className: V.button,
1334
1349
  size: "s",
1335
1350
  onClick: () => {
1336
- const l = [...s];
1337
- for (let j = 0; j < v.length; j++)
1338
- if (!s.find((S) => S.listingId === v[j].id)) {
1339
- l.push({
1340
- listingId: v[j].id,
1341
- image: v[j].productData.images.length > 0 ? v[j].productData.images[0].cfId : ""
1351
+ const a = [...s];
1352
+ for (let j = 0; j < w.length; j++)
1353
+ if (!s.find((C) => C.listingId === w[j].id)) {
1354
+ a.push({
1355
+ listingId: w[j].id,
1356
+ image: w[j].productData.images.length > 0 ? w[j].productData.images[0].cfId : ""
1342
1357
  });
1343
1358
  break;
1344
1359
  }
1345
- n(l);
1360
+ n(a);
1346
1361
  },
1347
- disabled: s.length === v.length,
1362
+ disabled: s.length === w.length,
1348
1363
  style: {
1349
1364
  width: "fit-content"
1350
1365
  },
1351
- children: /* @__PURE__ */ t.jsxs("div", { className: F.addButton, children: [
1366
+ children: /* @__PURE__ */ t.jsxs("div", { className: V.addButton, children: [
1352
1367
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
1353
1368
  /* @__PURE__ */ t.jsx(
1354
- b,
1369
+ x,
1355
1370
  {
1356
1371
  name: "Plus",
1357
1372
  width: 16,
@@ -1364,142 +1379,142 @@ const ei = (r) => {
1364
1379
  }
1365
1380
  )
1366
1381
  ] }),
1367
- o && g !== void 0 && /* @__PURE__ */ t.jsx(dt, { items: g })
1382
+ i && h !== void 0 && /* @__PURE__ */ t.jsx(ut, { items: h })
1368
1383
  ] });
1369
- }, hs = "_options_6cemk_1", ps = "_price_6cemk_12", _s = "_oldPrice_6cemk_19", gs = "_newPrice_6cemk_27", fs = "_animate_6cemk_34", xs = "_appearAndBounce_6cemk_1", bs = "_meta_6cemk_52", js = "_info_6cemk_58", vs = "_infoRight_6cemk_66", ys = "_buttons_6cemk_73", Ns = "_variants_6cemk_80", ks = "_variant_6cemk_80", Is = "_stock_6cemk_98", Cs = "_variantInfo_6cemk_105", Ss = "_quantity_6cemk_111", ws = "_count_6cemk_118", $s = "_focused_6cemk_135", Bs = "_button_6cemk_73", Ps = "_activeVariant_6cemk_161", Ms = "_chargeTypes_6cemk_165", Ts = "_charge_6cemk_165", qs = "_chargeActive_6cemk_190", As = "_title_6cemk_198", k = {
1370
- options: hs,
1371
- price: ps,
1372
- oldPrice: _s,
1373
- newPrice: gs,
1384
+ }, ps = "_options_6cemk_1", _s = "_price_6cemk_12", gs = "_oldPrice_6cemk_19", xs = "_newPrice_6cemk_27", fs = "_animate_6cemk_34", bs = "_appearAndBounce_6cemk_1", js = "_meta_6cemk_52", vs = "_info_6cemk_58", ys = "_infoRight_6cemk_66", Ns = "_buttons_6cemk_73", ks = "_variants_6cemk_80", Is = "_variant_6cemk_80", Cs = "_stock_6cemk_98", Ss = "_variantInfo_6cemk_105", ws = "_quantity_6cemk_111", Bs = "_count_6cemk_118", $s = "_focused_6cemk_135", Ps = "_button_6cemk_73", Ms = "_activeVariant_6cemk_161", Ts = "_chargeTypes_6cemk_165", qs = "_charge_6cemk_165", As = "_chargeActive_6cemk_190", Os = "_title_6cemk_198", k = {
1385
+ options: ps,
1386
+ price: _s,
1387
+ oldPrice: gs,
1388
+ newPrice: xs,
1374
1389
  animate: fs,
1375
- appearAndBounce: xs,
1376
- meta: bs,
1377
- info: js,
1378
- infoRight: vs,
1379
- buttons: ys,
1380
- variants: Ns,
1381
- variant: ks,
1382
- stock: Is,
1383
- variantInfo: Cs,
1384
- quantity: Ss,
1385
- count: ws,
1390
+ appearAndBounce: bs,
1391
+ meta: js,
1392
+ info: vs,
1393
+ infoRight: ys,
1394
+ buttons: Ns,
1395
+ variants: ks,
1396
+ variant: Is,
1397
+ stock: Cs,
1398
+ variantInfo: Ss,
1399
+ quantity: ws,
1400
+ count: Bs,
1386
1401
  focused: $s,
1387
- button: Bs,
1388
- activeVariant: Ps,
1389
- chargeTypes: Ms,
1390
- charge: Ts,
1391
- chargeActive: qs,
1392
- title: As
1402
+ button: Ps,
1403
+ activeVariant: Ms,
1404
+ chargeTypes: Ts,
1405
+ charge: qs,
1406
+ chargeActive: As,
1407
+ title: Os
1393
1408
  };
1394
- var kt = /* @__PURE__ */ ((r) => (r.ONE_TIME = "One-Time", r.RECURRING = "Subscribe & Save", r))(kt || {});
1395
- const si = (r) => {
1396
- var w, L;
1397
- const { variants: o } = r, [e, s] = f.useState(o[0]), [n, g] = f.useState(e.chargeTypes[0]), h = ct(), [c, p] = f.useState(1), { reset: I, addProductToCart: O, getProducts: d } = bt(), [i, x] = f.useState(!1);
1398
- f.useEffect(() => {
1399
- x(!0);
1400
- const a = setTimeout(() => x(!1), 600);
1401
- return () => clearTimeout(a);
1402
- }, [c]);
1403
- async function v() {
1404
- await d(), await O({
1409
+ var It = /* @__PURE__ */ ((r) => (r.ONE_TIME = "One-Time", r.RECURRING = "Subscribe & Save", r))(It || {});
1410
+ const ni = (r) => {
1411
+ var I, B;
1412
+ const { variants: i } = r, [e, s] = _.useState(i[0]), [n, h] = _.useState(e.chargeTypes[0]), u = lt(), [o, d] = _.useState(1), { reset: f, addProductToCart: $ } = jt(), [c, l] = _.useState(!1);
1413
+ _.useEffect(() => {
1414
+ l(!0);
1415
+ const g = setTimeout(() => l(!1), 600);
1416
+ return () => clearTimeout(g);
1417
+ }, [o]);
1418
+ async function M() {
1419
+ await $({
1405
1420
  productId: r.id,
1406
1421
  productVariantId: e.id,
1407
- quantity: c
1422
+ quantity: o
1408
1423
  });
1409
1424
  }
1410
- function _() {
1411
- I(), v(), h("/checkout");
1425
+ function w() {
1426
+ f(), M(), u("/checkout");
1412
1427
  }
1413
- function y(a) {
1414
- if (a >= 864e5) {
1415
- const u = Math.floor(a / 864e5);
1416
- return `${u} ${u === 1 ? "day" : "days"}`;
1417
- } else if (a >= 36e5) {
1418
- const u = Math.floor(a / 36e5);
1419
- return `${u} ${u === 1 ? "hour" : "hours"}`;
1420
- } else if (a >= 6e4) {
1421
- const u = Math.floor(a / 6e4);
1422
- return `${u} ${u === 1 ? "minute" : "minutes"}`;
1428
+ function p(g) {
1429
+ if (g >= 864e5) {
1430
+ const S = Math.floor(g / 864e5);
1431
+ return `${S} ${S === 1 ? "day" : "days"}`;
1432
+ } else if (g >= 36e5) {
1433
+ const S = Math.floor(g / 36e5);
1434
+ return `${S} ${S === 1 ? "hour" : "hours"}`;
1435
+ } else if (g >= 6e4) {
1436
+ const S = Math.floor(g / 6e4);
1437
+ return `${S} ${S === 1 ? "minute" : "minutes"}`;
1423
1438
  } else {
1424
- const u = Math.floor(a / 1e3);
1425
- return `${u} ${u === 1 ? "second" : "seconds"}`;
1439
+ const S = Math.floor(g / 1e3);
1440
+ return `${S} ${S === 1 ? "second" : "seconds"}`;
1426
1441
  }
1427
1442
  }
1428
- return f.useEffect(() => {
1429
- (e.quantity.available === 0 || !e.quantity.available) && p(0);
1443
+ return _.useEffect(() => {
1444
+ (e.quantity.available === 0 || !e.quantity.available) && d(0);
1430
1445
  }, [e.quantity.available]), /* @__PURE__ */ t.jsxs("div", { className: k.options, children: [
1431
- e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: k.chargeTypes, children: e.chargeTypes.map((a) => /* @__PURE__ */ t.jsx(
1446
+ e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: k.chargeTypes, children: e.chargeTypes.map((g) => /* @__PURE__ */ t.jsx(
1432
1447
  "div",
1433
1448
  {
1434
- className: V(k.charge, {
1435
- [k.chargeActive]: n === a
1449
+ className: Y(k.charge, {
1450
+ [k.chargeActive]: n === g
1436
1451
  }),
1437
- onClick: () => g(a),
1438
- children: kt[a]
1452
+ onClick: () => h(g),
1453
+ children: It[g]
1439
1454
  },
1440
- a
1455
+ g
1441
1456
  )) }),
1442
- /* @__PURE__ */ t.jsx("div", { className: k.variants, children: o.map((a) => {
1443
- var $;
1457
+ /* @__PURE__ */ t.jsx("div", { className: k.variants, children: i.map((g) => {
1458
+ var v;
1444
1459
  return /* @__PURE__ */ t.jsxs(
1445
1460
  "div",
1446
1461
  {
1447
- className: V(k.variant, {
1448
- [k.activeVariant]: e.id === a.id
1462
+ className: Y(k.variant, {
1463
+ [k.activeVariant]: e.id === g.id
1449
1464
  }),
1450
- onClick: () => s(a),
1465
+ onClick: () => s(g),
1451
1466
  children: [
1452
1467
  /* @__PURE__ */ t.jsxs("div", { className: k.variantInfo, children: [
1453
- /* @__PURE__ */ t.jsx("span", { className: k.title, children: a.name }),
1468
+ /* @__PURE__ */ t.jsx("span", { className: k.title, children: g.name }),
1454
1469
  /* @__PURE__ */ t.jsxs("span", { children: [
1455
1470
  "$",
1456
- n === "ONE_TIME" ? a.price.amount : a.subscriptionSettings ? a.subscriptionSettings.price.amount : "Price Not Found"
1471
+ n === "ONE_TIME" ? g.price.amount : g.subscriptionSettings ? g.subscriptionSettings.price.amount : "Price Not Found"
1457
1472
  ] })
1458
1473
  ] }),
1459
1474
  /* @__PURE__ */ t.jsx("div", { children: n === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: k.stock, children: [
1460
- (($ = a.quantity.restrictions) == null ? void 0 : $.max) || a.quantity.available || 0,
1475
+ ((v = g.quantity.restrictions) == null ? void 0 : v.max) || g.quantity.available || 0,
1461
1476
  " in stock"
1462
1477
  ] }) })
1463
1478
  ]
1464
1479
  },
1465
- a.id
1480
+ g.id
1466
1481
  );
1467
1482
  }) }),
1468
1483
  n === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: k.quantity, children: [
1469
1484
  /* @__PURE__ */ t.jsx(
1470
- Y,
1485
+ G,
1471
1486
  {
1472
1487
  type: "Secondary",
1473
1488
  onClick: () => {
1474
- c > 1 ? p((a) => a - 1) : p(1);
1489
+ o > 1 ? d((g) => g - 1) : d(1);
1475
1490
  },
1476
1491
  className: k.button,
1477
- disabled: e.quantity.available === 0 || e.quantity.restrictions && c <= e.quantity.restrictions.min || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
1478
- children: /* @__PURE__ */ t.jsx(b, { name: "Minus" })
1492
+ disabled: e.quantity.available === 0 || e.quantity.restrictions && o <= e.quantity.restrictions.min || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
1493
+ children: /* @__PURE__ */ t.jsx(x, { name: "Minus" })
1479
1494
  }
1480
1495
  ),
1481
1496
  /* @__PURE__ */ t.jsx(
1482
- Pt,
1497
+ Mt,
1483
1498
  {
1484
1499
  type: "number",
1485
- value: String(c),
1486
- onChange: (a) => p(Number(a)),
1487
- max: ((w = e.quantity.restrictions) == null ? void 0 : w.max) || e.quantity.available || 1 / 0,
1488
- min: ((L = e.quantity.restrictions) == null ? void 0 : L.min) || 0,
1500
+ value: String(o),
1501
+ onChange: (g) => d(Number(g)),
1502
+ max: ((I = e.quantity.restrictions) == null ? void 0 : I.max) || e.quantity.available || 1 / 0,
1503
+ min: ((B = e.quantity.restrictions) == null ? void 0 : B.min) || 0,
1489
1504
  centered: !0,
1490
1505
  disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available
1491
1506
  }
1492
1507
  ),
1493
1508
  /* @__PURE__ */ t.jsx(
1494
- Y,
1509
+ G,
1495
1510
  {
1496
1511
  type: "Secondary",
1497
1512
  onClick: () => {
1498
- p((a) => a + 1);
1513
+ d((g) => g + 1);
1499
1514
  },
1500
1515
  className: k.button,
1501
- disabled: !!(e.quantity.restrictions && c >= e.quantity.restrictions.max || e.quantity.available !== void 0 && c >= e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available),
1502
- children: /* @__PURE__ */ t.jsx(b, { name: "Plus" })
1516
+ disabled: !!(e.quantity.restrictions && o >= e.quantity.restrictions.max || e.quantity.available !== void 0 && o >= e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available),
1517
+ children: /* @__PURE__ */ t.jsx(x, { name: "Plus" })
1503
1518
  }
1504
1519
  )
1505
1520
  ] }),
@@ -1508,7 +1523,7 @@ const si = (r) => {
1508
1523
  /* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
1509
1524
  /* @__PURE__ */ t.jsxs("div", { className: k.infoRight, children: [
1510
1525
  /* @__PURE__ */ t.jsx(
1511
- b,
1526
+ x,
1512
1527
  {
1513
1528
  name: "Lightning",
1514
1529
  fill: "#FF3F19",
@@ -1516,25 +1531,25 @@ const si = (r) => {
1516
1531
  height: 20
1517
1532
  }
1518
1533
  ),
1519
- /* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : y(e.deliveryTime) })
1534
+ /* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : p(e.deliveryTime) })
1520
1535
  ] })
1521
1536
  ] }),
1522
1537
  /* @__PURE__ */ t.jsxs("div", { className: k.info, children: [
1523
1538
  /* @__PURE__ */ t.jsx("span", { children: "Price" }),
1524
1539
  /* @__PURE__ */ t.jsx("div", { className: k.infoRight, children: n === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: k.price, children: [
1525
- /* @__PURE__ */ t.jsxs("span", { className: V(k.newPrice, { [k.animate]: i }), children: [
1540
+ /* @__PURE__ */ t.jsxs("span", { className: Y(k.newPrice, { [k.animate]: c }), children: [
1526
1541
  "$ ",
1527
- (e.price.amount || 0) * c
1542
+ (e.price.amount || 0) * o
1528
1543
  ] }),
1529
1544
  /* @__PURE__ */ t.jsxs("span", { className: k.oldPrice, children: [
1530
1545
  "$ ",
1531
- (e.compareAtPrice.amount || 0) * c
1546
+ (e.compareAtPrice.amount || 0) * o
1532
1547
  ] })
1533
- ] }) : /* @__PURE__ */ t.jsxs("span", { className: V(k.newPrice, { [k.animate]: i }), children: [
1548
+ ] }) : /* @__PURE__ */ t.jsxs("span", { className: Y(k.newPrice, { [k.animate]: c }), children: [
1534
1549
  "$ ",
1535
- (e.price.amount || 0) * c
1550
+ (e.price.amount || 0) * o
1536
1551
  ] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: k.price, children: [
1537
- /* @__PURE__ */ t.jsxs("span", { className: V(k.newPrice, { [k.animate]: i }), children: [
1552
+ /* @__PURE__ */ t.jsxs("span", { className: Y(k.newPrice, { [k.animate]: c }), children: [
1538
1553
  "$ ",
1539
1554
  e.subscriptionSettings.price.amount || 0
1540
1555
  ] }),
@@ -1542,7 +1557,7 @@ const si = (r) => {
1542
1557
  "$ ",
1543
1558
  e.subscriptionSettings.compareAtPrice.amount || 0
1544
1559
  ] })
1545
- ] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: V(k.newPrice, { [k.animate]: i }), children: [
1560
+ ] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: Y(k.newPrice, { [k.animate]: c }), children: [
1546
1561
  "$ ",
1547
1562
  e.subscriptionSettings.price.amount || 0
1548
1563
  ] }) })
@@ -1550,222 +1565,200 @@ const si = (r) => {
1550
1565
  ] }),
1551
1566
  /* @__PURE__ */ t.jsxs("div", { className: k.buttons, children: [
1552
1567
  /* @__PURE__ */ t.jsx(
1553
- Y,
1568
+ G,
1554
1569
  {
1555
1570
  type: "Primary",
1556
- onClick: () => _(),
1571
+ onClick: () => w(),
1557
1572
  disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
1558
1573
  children: n === "ONE_TIME" ? "Buy Now" : "Subscribe Now"
1559
1574
  }
1560
1575
  ),
1561
1576
  n === "ONE_TIME" && /* @__PURE__ */ t.jsx(
1562
- Y,
1577
+ G,
1563
1578
  {
1564
1579
  type: "Secondary",
1565
- onClick: () => v(),
1580
+ onClick: () => M(),
1566
1581
  disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
1567
1582
  children: "Add to Cart"
1568
1583
  }
1569
1584
  )
1570
1585
  ] })
1571
1586
  ] });
1572
- }, Os = "_button_1tdo3_1", Es = "_login_1tdo3_14", zs = "_signUp_1tdo3_18", Rs = "_buttons_1tdo3_23", Ds = "_modal_1tdo3_32", Ls = "_closing_1tdo3_64", Hs = "_info_1tdo3_113", Us = "_top_1tdo3_120", Fs = "_title_1tdo3_131", Vs = "_clear_1tdo3_138", Ys = "_activeClear_1tdo3_145", Ws = "_count_1tdo3_149", Gs = "_cart_1tdo3_164", Qs = "_empty_1tdo3_172", Xs = "_product_1tdo3_198", Js = "_products_1tdo3_207", Ks = "_image_1tdo3_215", Zs = "_productInfo_1tdo3_221", tn = "_content_1tdo3_228", en = "_name_1tdo3_234", sn = "_price_1tdo3_240", nn = "_productButtons_1tdo3_246", on = "_productButton_1tdo3_246", an = "_productCount_1tdo3_266", cn = "_bottom_1tdo3_282", ln = "_subtotal_1tdo3_290", rn = "_block_1tdo3_298", dn = "_shoppingCount_1tdo3_305", un = "_total_1tdo3_325", mn = "_link_1tdo3_331", hn = "_userInfo_1tdo3_338", pn = "_pagesMobileModal_1tdo3_349", _n = "_pagesMobileModalContent_1tdo3_363", gn = "_pagesMobileModalHeader_1tdo3_369", fn = "_pagesMobileModalFooter_1tdo3_379", N = {
1573
- button: Os,
1574
- login: Es,
1575
- signUp: zs,
1576
- buttons: Rs,
1587
+ }, Es = "_button_1tdo3_1", zs = "_login_1tdo3_14", Rs = "_signUp_1tdo3_18", Ls = "_buttons_1tdo3_23", Ds = "_modal_1tdo3_32", Hs = "_closing_1tdo3_64", Us = "_info_1tdo3_113", Fs = "_top_1tdo3_120", Vs = "_title_1tdo3_131", Ys = "_clear_1tdo3_138", Gs = "_activeClear_1tdo3_145", Ws = "_count_1tdo3_149", Js = "_cart_1tdo3_164", Xs = "_empty_1tdo3_172", Ks = "_product_1tdo3_198", Qs = "_products_1tdo3_207", Zs = "_image_1tdo3_215", tn = "_productInfo_1tdo3_221", en = "_content_1tdo3_228", sn = "_name_1tdo3_234", nn = "_price_1tdo3_240", on = "_productButtons_1tdo3_246", an = "_productButton_1tdo3_246", cn = "_productCount_1tdo3_266", ln = "_bottom_1tdo3_282", rn = "_subtotal_1tdo3_290", dn = "_block_1tdo3_298", un = "_shoppingCount_1tdo3_305", mn = "_total_1tdo3_325", hn = "_link_1tdo3_331", pn = "_userInfo_1tdo3_338", _n = "_pagesMobileModal_1tdo3_349", gn = "_pagesMobileModalContent_1tdo3_363", xn = "_pagesMobileModalHeader_1tdo3_369", fn = "_pagesMobileModalFooter_1tdo3_379", y = {
1588
+ button: Es,
1589
+ login: zs,
1590
+ signUp: Rs,
1591
+ buttons: Ls,
1577
1592
  modal: Ds,
1578
1593
  "slide-in-fade": "_slide-in-fade_1tdo3_1",
1579
1594
  "mobile-slide-in-fade": "_mobile-slide-in-fade_1tdo3_1",
1580
- closing: Ls,
1595
+ closing: Hs,
1581
1596
  "mobile-slide-out-fade": "_mobile-slide-out-fade_1tdo3_1",
1582
1597
  "slide-out-fade": "_slide-out-fade_1tdo3_1",
1583
- info: Hs,
1584
- top: Us,
1585
- title: Fs,
1586
- clear: Vs,
1587
- activeClear: Ys,
1598
+ info: Us,
1599
+ top: Fs,
1600
+ title: Vs,
1601
+ clear: Ys,
1602
+ activeClear: Gs,
1588
1603
  count: Ws,
1589
- cart: Gs,
1590
- empty: Qs,
1591
- product: Xs,
1592
- products: Js,
1593
- image: Ks,
1594
- productInfo: Zs,
1595
- content: tn,
1596
- name: en,
1597
- price: sn,
1598
- productButtons: nn,
1599
- productButton: on,
1600
- productCount: an,
1601
- bottom: cn,
1602
- subtotal: ln,
1603
- block: rn,
1604
- shoppingCount: dn,
1605
- total: un,
1606
- link: mn,
1607
- userInfo: hn,
1608
- pagesMobileModal: pn,
1609
- pagesMobileModalContent: _n,
1610
- pagesMobileModalHeader: gn,
1604
+ cart: Js,
1605
+ empty: Xs,
1606
+ product: Ks,
1607
+ products: Qs,
1608
+ image: Zs,
1609
+ productInfo: tn,
1610
+ content: en,
1611
+ name: sn,
1612
+ price: nn,
1613
+ productButtons: on,
1614
+ productButton: an,
1615
+ productCount: cn,
1616
+ bottom: ln,
1617
+ subtotal: rn,
1618
+ block: dn,
1619
+ shoppingCount: un,
1620
+ total: mn,
1621
+ link: hn,
1622
+ userInfo: pn,
1623
+ pagesMobileModal: _n,
1624
+ pagesMobileModalContent: gn,
1625
+ pagesMobileModalHeader: xn,
1611
1626
  pagesMobileModalFooter: fn
1612
- }, ni = (r) => {
1613
- const { shopping: o, signUp: e, isShowUserInfo: s = !0 } = r;
1614
- return /* @__PURE__ */ t.jsxs("div", { className: N.buttons, children: [
1615
- o && /* @__PURE__ */ t.jsx(xn, {}),
1616
- s && /* @__PURE__ */ t.jsx(It, { signUp: e })
1627
+ }, ii = (r) => {
1628
+ const { shopping: i, signUp: e, isShowUserInfo: s = !0 } = r;
1629
+ return /* @__PURE__ */ t.jsxs("div", { className: y.buttons, children: [
1630
+ i && /* @__PURE__ */ t.jsx(bn, {}),
1631
+ s && /* @__PURE__ */ t.jsx(Ct, { signUp: e })
1617
1632
  ] });
1618
- }, xn = () => {
1619
- const [r, o] = f.useState(!1), [e, s] = f.useState([]), { cart: n, getProducts: g } = bt();
1620
- function h(i) {
1621
- for (let x = 0; x < n.parts.length; x++)
1622
- for (let v = 0; v < i.variants.length; v++)
1623
- if (n.parts[x].productVariantId === i.variants[x].id)
1624
- return n.parts[x].productVariantId;
1625
- }
1626
- function c(i) {
1627
- for (let x = 0; x < n.parts.length; x++)
1628
- for (let v = 0; v < i.variants.length; v++)
1629
- if (n.parts[x].productVariantId === i.variants[x].id)
1630
- return n.parts[x].quantity;
1633
+ }, bn = () => {
1634
+ const [r, i] = _.useState(!1), [e, s] = _.useState([]), { cart: n } = jt();
1635
+ function h(f) {
1636
+ var $;
1637
+ return !f || !(f != null && f.variants) ? !1 : ($ = f.variants.find((c) => c.id === f.activeVariantId)) == null ? void 0 : $.subscriptionSettings;
1631
1638
  }
1632
- f.useEffect(() => {
1633
- (async () => {
1634
- const x = n.parts.map((y) => String(y.productId)), _ = (await g([...x])).map((y) => ({
1635
- ...y,
1636
- activeVariantId: h(y),
1637
- quantity: c(y)
1638
- }));
1639
- s(_);
1640
- })();
1641
- }, [n.parts.length]);
1642
- function p(i) {
1643
- var x;
1644
- return !i || !(i != null && i.variants) ? !1 : (x = i.variants.find((v) => v.id === i.activeVariantId)) == null ? void 0 : x.subscriptionSettings;
1645
- }
1646
- const I = n.parts.length > 0 && e.length > 0 && !p(e[0]), [O, d] = f.useState(!1);
1639
+ const u = n.parts.length > 0 && e.length > 0 && !h(e[0]), [o, d] = _.useState(!1);
1647
1640
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1648
1641
  /* @__PURE__ */ t.jsxs(
1649
- Y,
1642
+ G,
1650
1643
  {
1651
1644
  type: "Secondary",
1652
1645
  style: {
1653
1646
  padding: 10
1654
1647
  },
1655
- onClick: (i) => {
1656
- i.stopPropagation(), window.location.pathname.includes("/admin/builder") || (o(!0), d(!0));
1648
+ onClick: (f) => {
1649
+ f.stopPropagation(), window.location.pathname.includes("/admin/builder") || (i(!0), d(!0));
1657
1650
  },
1658
1651
  children: [
1659
1652
  /* @__PURE__ */ t.jsx(
1660
- b,
1653
+ x,
1661
1654
  {
1662
1655
  name: "Handbag",
1663
1656
  fill: "var(--icon-primary)"
1664
1657
  }
1665
1658
  ),
1666
- I && /* @__PURE__ */ t.jsx("div", { className: N.shoppingCount, children: n.parts.length })
1659
+ u && /* @__PURE__ */ t.jsx("div", { className: y.shoppingCount, children: n.parts.length })
1667
1660
  ]
1668
1661
  }
1669
1662
  ),
1670
1663
  r && /* @__PURE__ */ t.jsx(
1671
- jt,
1664
+ vt,
1672
1665
  {
1673
1666
  close: () => {
1674
1667
  d(!1), setTimeout(() => {
1675
- o(!1);
1668
+ i(!1);
1676
1669
  }, 300);
1677
1670
  },
1678
1671
  withAnimation: !1,
1679
1672
  children: /* @__PURE__ */ t.jsx(
1680
- bn,
1673
+ jn,
1681
1674
  {
1682
1675
  activeProducts: e,
1683
- isCartNotEmpty: I,
1684
- isOpen: O
1676
+ isCartNotEmpty: u,
1677
+ isOpen: o
1685
1678
  }
1686
1679
  )
1687
1680
  }
1688
1681
  )
1689
1682
  ] });
1690
- }, bn = (r) => {
1691
- const { activeProducts: o, isCartNotEmpty: e, isOpen: s } = r, { cart: n, reset: g, getTotalAndDiscount: h, updateQuantityOfProduct: c } = bt(), p = ct();
1692
- function I(i) {
1693
- p(i);
1683
+ }, jn = (r) => {
1684
+ const { activeProducts: i, isCartNotEmpty: e, isOpen: s } = r, { cart: n, reset: h, getTotalAndDiscount: u, updateQuantityOfProduct: o } = jt(), d = lt();
1685
+ function f(l) {
1686
+ d(l);
1694
1687
  }
1695
- function O(i) {
1696
- c({
1697
- productId: i.id,
1698
- productVariantId: i.activeVariantId,
1699
- quantity: i.quantity + 1
1688
+ function $(l) {
1689
+ o({
1690
+ productId: l.id,
1691
+ productVariantId: l.activeVariantId,
1692
+ quantity: l.quantity + 1
1700
1693
  });
1701
1694
  }
1702
- function d(i) {
1703
- c({
1704
- productId: i.id,
1705
- productVariantId: i.activeVariantId,
1706
- quantity: i.quantity - 1
1695
+ function c(l) {
1696
+ o({
1697
+ productId: l.id,
1698
+ productVariantId: l.activeVariantId,
1699
+ quantity: l.quantity - 1
1707
1700
  });
1708
1701
  }
1709
1702
  return /* @__PURE__ */ t.jsxs(
1710
1703
  "div",
1711
1704
  {
1712
- className: V(N.modal, {
1713
- [N.closing]: !s
1705
+ className: Y(y.modal, {
1706
+ [y.closing]: !s
1714
1707
  }),
1715
- onClick: (i) => i.stopPropagation(),
1708
+ onClick: (l) => l.stopPropagation(),
1716
1709
  children: [
1717
- /* @__PURE__ */ t.jsxs("div", { className: N.top, children: [
1718
- /* @__PURE__ */ t.jsxs("div", { className: N.info, children: [
1719
- /* @__PURE__ */ t.jsx("span", { className: N.title, children: "Cart" }),
1720
- e && /* @__PURE__ */ t.jsx("div", { className: N.count, children: n.parts.length })
1710
+ /* @__PURE__ */ t.jsxs("div", { className: y.top, children: [
1711
+ /* @__PURE__ */ t.jsxs("div", { className: y.info, children: [
1712
+ /* @__PURE__ */ t.jsx("span", { className: y.title, children: "Cart" }),
1713
+ e && /* @__PURE__ */ t.jsx("div", { className: y.count, children: n.parts.length })
1721
1714
  ] }),
1722
1715
  /* @__PURE__ */ t.jsx(
1723
1716
  "button",
1724
1717
  {
1725
- className: V(N.clear, {
1726
- [N.activeClear]: e
1718
+ className: Y(y.clear, {
1719
+ [y.activeClear]: e
1727
1720
  }),
1728
1721
  disabled: !e,
1729
- onClick: g,
1722
+ onClick: h,
1730
1723
  children: "Clear all"
1731
1724
  }
1732
1725
  )
1733
1726
  ] }),
1734
- e ? /* @__PURE__ */ t.jsxs("div", { className: N.cart, children: [
1735
- /* @__PURE__ */ t.jsx("div", { className: N.products, children: o.map((i) => /* @__PURE__ */ t.jsxs(
1727
+ e ? /* @__PURE__ */ t.jsxs("div", { className: y.cart, children: [
1728
+ /* @__PURE__ */ t.jsx("div", { className: y.products, children: i.map((l) => /* @__PURE__ */ t.jsxs(
1736
1729
  "div",
1737
1730
  {
1738
- className: N.product,
1731
+ className: y.product,
1739
1732
  children: [
1740
- /* @__PURE__ */ t.jsxs("div", { className: N.productInfo, children: [
1733
+ /* @__PURE__ */ t.jsxs("div", { className: y.productInfo, children: [
1741
1734
  /* @__PURE__ */ t.jsx(
1742
1735
  "img",
1743
1736
  {
1744
- src: `https://imagedelivery.net/${i.images[0].cfId}/w=500`,
1737
+ src: `https://imagedelivery.net/${l.images[0].cfId}/w=500`,
1745
1738
  alt: "image",
1746
1739
  width: "100%",
1747
1740
  height: "100%",
1748
- className: N.image
1741
+ className: y.image
1749
1742
  }
1750
1743
  ),
1751
- /* @__PURE__ */ t.jsxs("div", { className: N.content, children: [
1752
- /* @__PURE__ */ t.jsx("div", { className: N.name, children: i.name }),
1753
- /* @__PURE__ */ t.jsxs("div", { className: N.price, children: [
1744
+ /* @__PURE__ */ t.jsxs("div", { className: y.content, children: [
1745
+ /* @__PURE__ */ t.jsx("div", { className: y.name, children: l.name }),
1746
+ /* @__PURE__ */ t.jsxs("div", { className: y.price, children: [
1754
1747
  "$",
1755
- i.variants.find((x) => x.id === i.activeVariantId).price.amount * ((i == null ? void 0 : i.quantity) || 1)
1748
+ l.variants.find((M) => M.id === l.activeVariantId).price.amount * ((l == null ? void 0 : l.quantity) || 1)
1756
1749
  ] })
1757
1750
  ] })
1758
1751
  ] }),
1759
- /* @__PURE__ */ t.jsxs("div", { className: N.productButtons, children: [
1752
+ /* @__PURE__ */ t.jsxs("div", { className: y.productButtons, children: [
1760
1753
  /* @__PURE__ */ t.jsx(
1761
1754
  "div",
1762
1755
  {
1763
1756
  onClick: () => {
1764
- i.quantity !== 1 && d(i);
1757
+ l.quantity !== 1 && c(l);
1765
1758
  },
1766
- className: N.productButton,
1759
+ className: y.productButton,
1767
1760
  children: /* @__PURE__ */ t.jsx(
1768
- b,
1761
+ x,
1769
1762
  {
1770
1763
  name: "Minus",
1771
1764
  fill: "#757575",
@@ -1775,14 +1768,14 @@ const si = (r) => {
1775
1768
  )
1776
1769
  }
1777
1770
  ),
1778
- /* @__PURE__ */ t.jsx("div", { className: N.productCount, children: i.quantity }),
1771
+ /* @__PURE__ */ t.jsx("div", { className: y.productCount, children: l.quantity }),
1779
1772
  /* @__PURE__ */ t.jsx(
1780
1773
  "div",
1781
1774
  {
1782
- onClick: () => O(i),
1783
- className: N.productButton,
1775
+ onClick: () => $(l),
1776
+ className: y.productButton,
1784
1777
  children: /* @__PURE__ */ t.jsx(
1785
- b,
1778
+ x,
1786
1779
  {
1787
1780
  name: "Plus",
1788
1781
  fill: "#757575",
@@ -1795,14 +1788,14 @@ const si = (r) => {
1795
1788
  ] })
1796
1789
  ]
1797
1790
  },
1798
- i.id
1791
+ l.id
1799
1792
  )) }),
1800
- /* @__PURE__ */ t.jsxs("div", { className: N.bottom, children: [
1801
- /* @__PURE__ */ t.jsxs("div", { className: N.subtotal, children: [
1802
- /* @__PURE__ */ t.jsxs("div", { className: N.block, children: [
1793
+ /* @__PURE__ */ t.jsxs("div", { className: y.bottom, children: [
1794
+ /* @__PURE__ */ t.jsxs("div", { className: y.subtotal, children: [
1795
+ /* @__PURE__ */ t.jsxs("div", { className: y.block, children: [
1803
1796
  /* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
1804
1797
  /* @__PURE__ */ t.jsx(
1805
- b,
1798
+ x,
1806
1799
  {
1807
1800
  name: "Info",
1808
1801
  width: 20,
@@ -1811,20 +1804,20 @@ const si = (r) => {
1811
1804
  }
1812
1805
  )
1813
1806
  ] }),
1814
- /* @__PURE__ */ t.jsxs("div", { className: N.total, children: [
1807
+ /* @__PURE__ */ t.jsxs("div", { className: y.total, children: [
1815
1808
  "$",
1816
- h().total
1809
+ u().total
1817
1810
  ] })
1818
1811
  ] }),
1819
- /* @__PURE__ */ t.jsx(Y, { onClick: () => I("/checkout"), children: "Checkout" })
1812
+ /* @__PURE__ */ t.jsx(G, { onClick: () => f("/checkout"), children: "Checkout" })
1820
1813
  ] })
1821
- ] }) : /* @__PURE__ */ t.jsx(jn, {})
1814
+ ] }) : /* @__PURE__ */ t.jsx(vn, {})
1822
1815
  ]
1823
1816
  }
1824
1817
  );
1825
- }, jn = () => /* @__PURE__ */ t.jsxs("div", { className: N.empty, children: [
1818
+ }, vn = () => /* @__PURE__ */ t.jsxs("div", { className: y.empty, children: [
1826
1819
  /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1827
- b,
1820
+ x,
1828
1821
  {
1829
1822
  name: "Handbag",
1830
1823
  fill: "var(--icon-secondary)"
@@ -1838,20 +1831,20 @@ const si = (r) => {
1838
1831
  "a",
1839
1832
  {
1840
1833
  href: "/products",
1841
- className: N.link,
1834
+ className: y.link,
1842
1835
  children: "view products"
1843
1836
  }
1844
1837
  )
1845
1838
  ] })
1846
- ] }), It = ({ signUp: r }) => {
1847
- const o = JSON.parse(localStorage.getItem("token") || "{}"), { data: e } = o, s = ct();
1848
- function n(c) {
1849
- window.location.pathname.includes("/admin/builder") || s(c);
1839
+ ] }), Ct = ({ signUp: r }) => {
1840
+ const i = JSON.parse(localStorage.getItem("token") || "{}"), { data: e } = i, s = lt();
1841
+ function n(o) {
1842
+ window.location.pathname.includes("/admin/builder") || s(o);
1850
1843
  }
1851
1844
  if (!e)
1852
1845
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1853
1846
  /* @__PURE__ */ t.jsx(
1854
- Y,
1847
+ G,
1855
1848
  {
1856
1849
  onClick: () => n("/customer-dash"),
1857
1850
  type: "Secondary",
@@ -1862,7 +1855,7 @@ const si = (r) => {
1862
1855
  }
1863
1856
  ),
1864
1857
  r && /* @__PURE__ */ t.jsx(
1865
- Y,
1858
+ G,
1866
1859
  {
1867
1860
  onClick: () => n("/customer-dash"),
1868
1861
  type: "Primary",
@@ -1874,27 +1867,27 @@ const si = (r) => {
1874
1867
  }
1875
1868
  )
1876
1869
  ] });
1877
- const [g, h] = f.useState("test-email@gmail.com");
1878
- return f.useEffect(() => {
1870
+ const [h, u] = _.useState("test-email@gmail.com");
1871
+ return _.useEffect(() => {
1879
1872
  (async () => {
1880
- const p = Mt(e);
1881
- h(p.email);
1873
+ const d = Tt(e);
1874
+ u(d.email);
1882
1875
  })();
1883
1876
  }, [e]), /* @__PURE__ */ t.jsx(
1884
1877
  "div",
1885
1878
  {
1886
- className: N.userInfo,
1879
+ className: y.userInfo,
1887
1880
  onClick: () => n("/customer-dash"),
1888
- children: /* @__PURE__ */ t.jsx("div", { children: g || "test-email@gmail.com" })
1881
+ children: /* @__PURE__ */ t.jsx("div", { children: h || "test-email@gmail.com" })
1889
1882
  }
1890
1883
  );
1891
- }, vn = ({
1884
+ }, yn = ({
1892
1885
  children: r,
1893
- logo: o,
1886
+ logo: i,
1894
1887
  setIsOpen: e,
1895
1888
  signUp: s
1896
1889
  }) => {
1897
- const { setIsOpen: n } = yt(), g = () => {
1890
+ const { setIsOpen: n } = Nt(), h = () => {
1898
1891
  n(!1), setTimeout(() => {
1899
1892
  e(!1), n(!0);
1900
1893
  }, 300);
@@ -1902,18 +1895,18 @@ const si = (r) => {
1902
1895
  return /* @__PURE__ */ t.jsxs(
1903
1896
  "div",
1904
1897
  {
1905
- className: N.pagesMobileModal,
1906
- onClick: (h) => h.stopPropagation(),
1898
+ className: y.pagesMobileModal,
1899
+ onClick: (u) => u.stopPropagation(),
1907
1900
  children: [
1908
- /* @__PURE__ */ t.jsxs("div", { className: N.pagesMobileModalHeader, children: [
1909
- /* @__PURE__ */ t.jsx("div", { children: o }),
1901
+ /* @__PURE__ */ t.jsxs("div", { className: y.pagesMobileModalHeader, children: [
1902
+ /* @__PURE__ */ t.jsx("div", { children: i }),
1910
1903
  /* @__PURE__ */ t.jsx(
1911
- Y,
1904
+ G,
1912
1905
  {
1913
1906
  type: "Secondary",
1914
- onClick: g,
1907
+ onClick: h,
1915
1908
  children: /* @__PURE__ */ t.jsx(
1916
- b,
1909
+ x,
1917
1910
  {
1918
1911
  name: "X",
1919
1912
  fill: "var(--icon-primary)"
@@ -1922,43 +1915,43 @@ const si = (r) => {
1922
1915
  }
1923
1916
  )
1924
1917
  ] }),
1925
- /* @__PURE__ */ t.jsx("div", { className: N.pagesMobileModalContent, children: r }),
1926
- /* @__PURE__ */ t.jsx("div", { className: N.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(It, { signUp: s }) })
1918
+ /* @__PURE__ */ t.jsx("div", { className: y.pagesMobileModalContent, children: r }),
1919
+ /* @__PURE__ */ t.jsx("div", { className: y.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(Ct, { signUp: s }) })
1927
1920
  ]
1928
1921
  }
1929
1922
  );
1930
- }, ii = ({
1923
+ }, oi = ({
1931
1924
  children: r,
1932
- logo: o,
1925
+ logo: i,
1933
1926
  signUp: e
1934
1927
  }) => {
1935
- const [s, n] = f.useState(!1);
1928
+ const [s, n] = _.useState(!1);
1936
1929
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1937
- /* @__PURE__ */ t.jsx(yn, { setIsOpenModal: n }),
1938
- s && /* @__PURE__ */ t.jsx(jt, { close: () => n(!1), children: /* @__PURE__ */ t.jsx(
1939
- vn,
1930
+ /* @__PURE__ */ t.jsx(Nn, { setIsOpenModal: n }),
1931
+ s && /* @__PURE__ */ t.jsx(vt, { close: () => n(!1), children: /* @__PURE__ */ t.jsx(
1932
+ yn,
1940
1933
  {
1941
- logo: o,
1934
+ logo: i,
1942
1935
  setIsOpen: n,
1943
1936
  signUp: e,
1944
1937
  children: r
1945
1938
  }
1946
1939
  ) })
1947
1940
  ] });
1948
- }, yn = (r) => {
1949
- const { setIsOpenModal: o } = r;
1941
+ }, Nn = (r) => {
1942
+ const { setIsOpenModal: i } = r;
1950
1943
  return /* @__PURE__ */ t.jsx(
1951
- Y,
1944
+ G,
1952
1945
  {
1953
1946
  type: "Secondary",
1954
1947
  style: {
1955
1948
  padding: 10
1956
1949
  },
1957
1950
  onClick: (e) => {
1958
- e.stopPropagation(), o(!0);
1951
+ e.stopPropagation(), i(!0);
1959
1952
  },
1960
1953
  children: /* @__PURE__ */ t.jsx(
1961
- b,
1954
+ x,
1962
1955
  {
1963
1956
  name: "List",
1964
1957
  fill: "var(--icon-primary)"
@@ -1966,22 +1959,22 @@ const si = (r) => {
1966
1959
  )
1967
1960
  }
1968
1961
  );
1969
- }, Nn = "_share_xddz7_1", kn = "_modal_xddz7_8", In = "_header_xddz7_20", Cn = "_socials_xddz7_30", Sn = "_social_xddz7_30", wn = "_copy_xddz7_40", $n = "_title_xddz7_47", Bn = "_copyWrapper_xddz7_53", Pn = "_copyText_xddz7_62", Mn = "_copyTextMobile_xddz7_75", Tn = "_copyTextMiniMobile_xddz7_94", Z = {
1970
- share: Nn,
1971
- modal: kn,
1972
- header: In,
1973
- socials: Cn,
1974
- social: Sn,
1975
- copy: wn,
1962
+ }, kn = "_share_xddz7_1", In = "_modal_xddz7_8", Cn = "_header_xddz7_20", Sn = "_socials_xddz7_30", wn = "_social_xddz7_30", Bn = "_copy_xddz7_40", $n = "_title_xddz7_47", Pn = "_copyWrapper_xddz7_53", Mn = "_copyText_xddz7_62", Tn = "_copyTextMobile_xddz7_75", qn = "_copyTextMiniMobile_xddz7_94", Z = {
1963
+ share: kn,
1964
+ modal: In,
1965
+ header: Cn,
1966
+ socials: Sn,
1967
+ social: wn,
1968
+ copy: Bn,
1976
1969
  title: $n,
1977
- copyWrapper: Bn,
1978
- copyText: Pn,
1979
- copyTextMobile: Mn,
1980
- copyTextMiniMobile: Tn
1981
- }, oi = () => {
1982
- const { isOpenModal: r, setIsOpenModal: o } = Nt();
1970
+ copyWrapper: Pn,
1971
+ copyText: Mn,
1972
+ copyTextMobile: Tn,
1973
+ copyTextMiniMobile: qn
1974
+ }, ai = () => {
1975
+ const { isOpenModal: r, setIsOpenModal: i } = kt();
1983
1976
  function e() {
1984
- o(!0);
1977
+ i(!0);
1985
1978
  }
1986
1979
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1987
1980
  /* @__PURE__ */ t.jsx(
@@ -1993,7 +1986,7 @@ const si = (r) => {
1993
1986
  },
1994
1987
  type: "Secondary",
1995
1988
  children: /* @__PURE__ */ t.jsx(
1996
- b,
1989
+ x,
1997
1990
  {
1998
1991
  name: "Share",
1999
1992
  fill: "#757575",
@@ -2002,38 +1995,38 @@ const si = (r) => {
2002
1995
  )
2003
1996
  }
2004
1997
  ),
2005
- r && /* @__PURE__ */ t.jsx(jt, { close: o, children: /* @__PURE__ */ t.jsx(qn, {}) })
1998
+ r && /* @__PURE__ */ t.jsx(vt, { close: i, children: /* @__PURE__ */ t.jsx(An, {}) })
2006
1999
  ] });
2007
- }, qn = () => {
2008
- const { setIsOpenModal: r } = Nt(), { notification: o, setNotification: e } = Tt(), { setIsOpen: s } = yt(), n = window.location.href;
2009
- function g() {
2000
+ }, An = () => {
2001
+ const { setIsOpenModal: r } = kt(), { notification: i, setNotification: e } = qt(), { setIsOpen: s } = Nt(), n = window.location.href;
2002
+ function h() {
2010
2003
  navigator.clipboard.writeText(n), e({
2011
2004
  message: "Link copied to clipboard",
2012
2005
  status: "success"
2013
2006
  });
2014
2007
  }
2015
- function h() {
2008
+ function u() {
2016
2009
  s(!1), setTimeout(() => {
2017
2010
  r(!1), s(!0);
2018
2011
  }, 300);
2019
2012
  }
2020
- function c(p, I) {
2021
- return p.length > I ? p.slice(0, I) + "..." : p;
2013
+ function o(d, f) {
2014
+ return d.length > f ? d.slice(0, f) + "..." : d;
2022
2015
  }
2023
2016
  return /* @__PURE__ */ t.jsxs(
2024
2017
  "div",
2025
2018
  {
2026
2019
  className: Z.modal,
2027
- onClick: (p) => p.stopPropagation(),
2020
+ onClick: (d) => d.stopPropagation(),
2028
2021
  children: [
2029
2022
  /* @__PURE__ */ t.jsxs("div", { className: Z.header, children: [
2030
2023
  /* @__PURE__ */ t.jsx("div", { className: Z.title, children: "Copy Product Link" }),
2031
2024
  /* @__PURE__ */ t.jsx(
2032
- b,
2025
+ x,
2033
2026
  {
2034
2027
  name: "X",
2035
2028
  fill: "#757575",
2036
- onClick: h,
2029
+ onClick: u,
2037
2030
  hoverable: !0
2038
2031
  }
2039
2032
  )
@@ -2043,14 +2036,14 @@ const si = (r) => {
2043
2036
  tt,
2044
2037
  {
2045
2038
  type: "Secondary",
2046
- onClick: g,
2039
+ onClick: h,
2047
2040
  style: {
2048
2041
  flex: 1
2049
2042
  },
2050
2043
  children: [
2051
- /* @__PURE__ */ t.jsx("div", { className: Z.copyText, children: c(n, 100) }),
2052
- /* @__PURE__ */ t.jsx("div", { className: Z.copyTextMobile, children: c(n, 40) }),
2053
- /* @__PURE__ */ t.jsx("div", { className: Z.copyTextMiniMobile, children: c(n, 20) })
2044
+ /* @__PURE__ */ t.jsx("div", { className: Z.copyText, children: o(n, 100) }),
2045
+ /* @__PURE__ */ t.jsx("div", { className: Z.copyTextMobile, children: o(n, 40) }),
2046
+ /* @__PURE__ */ t.jsx("div", { className: Z.copyTextMiniMobile, children: o(n, 20) })
2054
2047
  ]
2055
2048
  }
2056
2049
  ),
@@ -2058,49 +2051,49 @@ const si = (r) => {
2058
2051
  tt,
2059
2052
  {
2060
2053
  type: "Secondary",
2061
- onClick: g,
2062
- children: o ? /* @__PURE__ */ t.jsx(b, { name: "Check" }) : /* @__PURE__ */ t.jsx(b, { name: "Copy" })
2054
+ onClick: h,
2055
+ children: i ? /* @__PURE__ */ t.jsx(x, { name: "Check" }) : /* @__PURE__ */ t.jsx(x, { name: "Copy" })
2063
2056
  }
2064
2057
  )
2065
2058
  ] })
2066
2059
  ]
2067
2060
  }
2068
2061
  );
2069
- }, An = "_accordion_1s1lq_1", On = "_header_1s1lq_9", En = "_icon_1s1lq_18", zn = "_open_1s1lq_21", Rn = "_content_1s1lq_25", st = {
2070
- accordion: An,
2071
- header: On,
2072
- icon: En,
2073
- open: zn,
2074
- content: Rn
2075
- }, ai = ({ title: r, content: o, defaultOpen: e = !1 }) => {
2076
- const [s, n] = f.useState(e), [g, h] = f.useState(0), c = f.useRef(null), p = () => {
2062
+ }, On = "_accordion_1s1lq_1", En = "_header_1s1lq_9", zn = "_icon_1s1lq_18", Rn = "_open_1s1lq_21", Ln = "_content_1s1lq_25", nt = {
2063
+ accordion: On,
2064
+ header: En,
2065
+ icon: zn,
2066
+ open: Rn,
2067
+ content: Ln
2068
+ }, ci = ({ title: r, content: i, defaultOpen: e = !1 }) => {
2069
+ const [s, n] = _.useState(e), [h, u] = _.useState(0), o = _.useRef(null), d = () => {
2077
2070
  n(!s);
2078
2071
  };
2079
- return f.useEffect(() => {
2080
- c.current && h(s ? c.current.scrollHeight : 0);
2081
- }, [s]), /* @__PURE__ */ t.jsxs("div", { className: st.accordion, children: [
2072
+ return _.useEffect(() => {
2073
+ o.current && u(s ? o.current.scrollHeight : 0);
2074
+ }, [s]), /* @__PURE__ */ t.jsxs("div", { className: nt.accordion, children: [
2082
2075
  /* @__PURE__ */ t.jsxs(
2083
2076
  "div",
2084
2077
  {
2085
- className: st.header,
2086
- onClick: p,
2078
+ className: nt.header,
2079
+ onClick: d,
2087
2080
  children: [
2088
2081
  /* @__PURE__ */ t.jsx("h5", { id: "h5", children: r }),
2089
- /* @__PURE__ */ t.jsx("div", { className: V(st.icon, { [st.open]: s }), children: /* @__PURE__ */ t.jsx(b, { name: "CaretDown" }) })
2082
+ /* @__PURE__ */ t.jsx("div", { className: Y(nt.icon, { [nt.open]: s }), children: /* @__PURE__ */ t.jsx(x, { name: "CaretDown" }) })
2090
2083
  ]
2091
2084
  }
2092
2085
  ),
2093
2086
  /* @__PURE__ */ t.jsx(
2094
2087
  "div",
2095
2088
  {
2096
- ref: c,
2097
- className: st.content,
2098
- style: { height: `${g}px` },
2099
- children: /* @__PURE__ */ t.jsx("p", { id: "p", children: o })
2089
+ ref: o,
2090
+ className: nt.content,
2091
+ style: { height: `${h}px` },
2092
+ children: /* @__PURE__ */ t.jsx("p", { id: "p", children: i })
2100
2093
  }
2101
2094
  )
2102
2095
  ] });
2103
- }, ci = ({ children: r, path: o, className: e, target: s = "_self", id: n }) => {
2096
+ }, li = ({ children: r, path: i, className: e, target: s = "_self", id: n }) => {
2104
2097
  if (window.location.pathname.includes("/admin/builder"))
2105
2098
  return /* @__PURE__ */ t.jsx(
2106
2099
  "div",
@@ -2112,13 +2105,13 @@ const si = (r) => {
2112
2105
  children: r
2113
2106
  }
2114
2107
  );
2115
- const g = ct(), h = /^https?:\/\//.test(o), c = (p) => {
2116
- h || s === "_blank" ? s === "_blank" ? window.open(o, "_blank") : window.location.href = o : (p.preventDefault(), g(o, { replace: !0 }));
2108
+ const h = lt(), u = /^https?:\/\//.test(i), o = (d) => {
2109
+ u || s === "_blank" ? s === "_blank" ? window.open(i, "_blank") : window.location.href = i : (d.preventDefault(), h(i, { replace: !0 }));
2117
2110
  };
2118
2111
  return /* @__PURE__ */ t.jsx(
2119
2112
  "div",
2120
2113
  {
2121
- onClick: c,
2114
+ onClick: o,
2122
2115
  className: e,
2123
2116
  role: "link",
2124
2117
  style: { cursor: "pointer" },
@@ -2126,12 +2119,12 @@ const si = (r) => {
2126
2119
  children: r
2127
2120
  }
2128
2121
  );
2129
- }, Dn = "_buttonsBlock_1b2rb_1", Ln = "_slideUp_1b2rb_1", Hn = {
2122
+ }, Dn = "_buttonsBlock_1b2rb_1", Hn = "_slideUp_1b2rb_1", Un = {
2130
2123
  buttonsBlock: Dn,
2131
- slideUp: Ln
2132
- }, li = () => /* @__PURE__ */ t.jsxs("div", { className: Hn.buttonsBlock, children: [
2124
+ slideUp: Hn
2125
+ }, ri = () => /* @__PURE__ */ t.jsxs("div", { className: Un.buttonsBlock, children: [
2133
2126
  /* @__PURE__ */ t.jsx(
2134
- Y,
2127
+ G,
2135
2128
  {
2136
2129
  type: "Primary",
2137
2130
  style: {
@@ -2140,19 +2133,29 @@ const si = (r) => {
2140
2133
  children: "Add to Cart"
2141
2134
  }
2142
2135
  ),
2143
- /* @__PURE__ */ t.jsx(Y, { type: "Secondary", children: "Buy" })
2144
- ] }), Un = "_wrapper_st58d_1", Fn = "_label_st58d_10", Vn = "_textarea_st58d_18", Yn = "_length_st58d_33", at = {
2145
- wrapper: Un,
2146
- label: Fn,
2147
- textarea: Vn,
2148
- length: Yn
2149
- }, ri = (r) => {
2150
- const { onChange: o, label: e, value: s, maxLength: n, placeholder: g = "Type something..." } = r, [h, c] = f.useState(s.length);
2151
- return /* @__PURE__ */ t.jsxs("div", { className: at.wrapper, children: [
2136
+ /* @__PURE__ */ t.jsx(G, { type: "Secondary", children: "Buy" })
2137
+ ] }), Fn = "_wrapper_st58d_1", Vn = "_label_st58d_10", Yn = "_textarea_st58d_18", Gn = "_length_st58d_33", ct = {
2138
+ wrapper: Fn,
2139
+ label: Vn,
2140
+ textarea: Yn,
2141
+ length: Gn
2142
+ }, di = (r) => {
2143
+ const {
2144
+ onChange: i,
2145
+ label: e,
2146
+ value: s,
2147
+ maxLength: n,
2148
+ placeholder: h = "Type something...",
2149
+ type: u = "text"
2150
+ } = r, [o, d] = _.useState(s.length);
2151
+ function f($) {
2152
+ return u === "number" ? $.replace(/[^\d\n]+/g, "") : $;
2153
+ }
2154
+ return /* @__PURE__ */ t.jsxs("div", { className: ct.wrapper, children: [
2152
2155
  e && /* @__PURE__ */ t.jsx(
2153
2156
  "label",
2154
2157
  {
2155
- className: at.label,
2158
+ className: ct.label,
2156
2159
  htmlFor: e,
2157
2160
  children: e
2158
2161
  }
@@ -2161,57 +2164,58 @@ const si = (r) => {
2161
2164
  "textarea",
2162
2165
  {
2163
2166
  id: e,
2164
- defaultValue: s,
2165
- onChange: (p) => {
2166
- c(p.target.value.length), o(p.target.value);
2167
+ value: s,
2168
+ onChange: ($) => {
2169
+ const c = f($.target.value);
2170
+ d(c.length), i(c);
2167
2171
  },
2168
- placeholder: g,
2169
- className: at.textarea,
2172
+ placeholder: h,
2173
+ className: ct.textarea,
2170
2174
  maxLength: n
2171
2175
  }
2172
2176
  ),
2173
- n && /* @__PURE__ */ t.jsxs("div", { className: at.length, children: [
2174
- h,
2177
+ n && /* @__PURE__ */ t.jsxs("div", { className: ct.length, children: [
2178
+ o,
2175
2179
  "/",
2176
2180
  n
2177
2181
  ] })
2178
2182
  ] });
2179
2183
  };
2180
2184
  export {
2181
- ai as Accordion,
2182
- yn as BurgerMenuButton,
2183
- Y as Button,
2184
- us as ButtonTypeSettings,
2185
- ti as ButtonsSettings,
2186
- Jn as CategorySettings,
2187
- St as ChooseImage,
2188
- mi as ChooseImageModal,
2189
- jn as EmptyCart,
2190
- Zn as FormSettings,
2191
- ni as HeaderButtons,
2192
- b as Icon,
2193
- rt as InputSettings,
2194
- Pt as InputUI,
2195
- hi as ItemsSettings,
2196
- Xn as LayoutSettings,
2197
- ci as Link,
2198
- ei as ListingSelector,
2199
- pi as Loader,
2200
- jt as Modal,
2201
- ii as PagesMobileMenu,
2202
- vn as PagesMobileModal,
2203
- Kn as PagesSettings,
2204
- li as ProductCardButtons,
2205
- si as ProductOptions,
2206
- vt as RangeSelector,
2207
- ot as Select,
2208
- oi as ShareLink,
2209
- xn as ShoppingButton,
2210
- bn as ShoppingModalCart,
2211
- it as Switch,
2212
- _i as TextSettings,
2213
- gi as TextareaSettings,
2214
- ri as TextareaUI,
2185
+ ci as Accordion,
2186
+ Nn as BurgerMenuButton,
2187
+ G as Button,
2188
+ ms as ButtonTypeSettings,
2189
+ ei as ButtonsSettings,
2190
+ Qn as CategorySettings,
2191
+ wt as ChooseImage,
2192
+ hi as ChooseImageModal,
2193
+ vn as EmptyCart,
2194
+ ti as FormSettings,
2195
+ ii as HeaderButtons,
2196
+ x as Icon,
2197
+ dt as InputSettings,
2198
+ Mt as InputUI,
2199
+ pi as ItemsSettings,
2200
+ Kn as LayoutSettings,
2201
+ li as Link,
2202
+ si as ListingSelector,
2203
+ _i as Loader,
2204
+ vt as Modal,
2205
+ oi as PagesMobileMenu,
2206
+ yn as PagesMobileModal,
2207
+ Zn as PagesSettings,
2208
+ ri as ProductCardButtons,
2209
+ ni as ProductOptions,
2210
+ yt as RangeSelector,
2211
+ at as Select,
2212
+ ai as ShareLink,
2213
+ bn as ShoppingButton,
2214
+ jn as ShoppingModalCart,
2215
+ ot as Switch,
2216
+ gi as TextSettings,
2217
+ xi as TextareaSettings,
2218
+ di as TextareaUI,
2215
2219
  fi as TypesText,
2216
- It as UserInfo
2220
+ Ct as UserInfo
2217
2221
  };