@billgangcom/theme-lib 1.15.0 → 1.16.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,27 +1,27 @@
1
- import { j as t, c as z, I as h, a as F, S as R, T as ct, C as ot, b as V, D as it, H as at, B as Q, v as K, u as lt, d as rt } from "./index-QsuPYj6C.js";
2
- import { h as un, i as _n, f as mn, L as hn, M as pn, P as gn, R as xn, e as bn, g as fn } from "./index-QsuPYj6C.js";
1
+ import { j as t, c as H, I as h, a as V, S as z, T as it, C as ct, b as G, D as at, H as lt, B as tt, v as Z, u as rt, d as dt, e as ut, f as ht } from "./root-CW3Zha5t.js";
2
+ import { k as fn, l as jn, h as vn, L as kn, M as yn, P as $n, R as Nn, g as wn, i as Cn } from "./root-CW3Zha5t.js";
3
3
  import p from "react";
4
- const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16", pt = "_open_2tiiw_19", gt = "_content_2tiiw_23", X = {
5
- accordion: _t,
6
- header: mt,
7
- icon: ht,
8
- open: pt,
9
- content: gt
10
- }, nn = ({ title: _, content: o }) => {
11
- const [n, c] = p.useState(!1), [i, a] = p.useState(0), e = p.useRef(null), s = () => {
12
- c(!n);
4
+ const pt = "_accordion_2tiiw_1", gt = "_header_2tiiw_9", xt = "_icon_2tiiw_16", bt = "_open_2tiiw_19", ft = "_content_2tiiw_23", K = {
5
+ accordion: pt,
6
+ header: gt,
7
+ icon: xt,
8
+ open: bt,
9
+ content: ft
10
+ }, un = ({ title: u, content: n }) => {
11
+ const [s, o] = p.useState(!1), [i, a] = p.useState(0), e = p.useRef(null), c = () => {
12
+ o(!s);
13
13
  };
14
14
  return p.useEffect(() => {
15
- e.current && a(n ? e.current.scrollHeight : 0);
16
- }, [n]), /* @__PURE__ */ t.jsxs("div", { className: X.accordion, children: [
15
+ e.current && a(s ? e.current.scrollHeight : 0);
16
+ }, [s]), /* @__PURE__ */ t.jsxs("div", { className: K.accordion, children: [
17
17
  /* @__PURE__ */ t.jsxs(
18
18
  "div",
19
19
  {
20
- className: X.header,
21
- onClick: s,
20
+ className: K.header,
21
+ onClick: c,
22
22
  children: [
23
- /* @__PURE__ */ t.jsx("h3", { children: _ }),
24
- /* @__PURE__ */ t.jsx("div", { className: z(X.icon, { [X.open]: n }), children: /* @__PURE__ */ t.jsx(h, { name: "CaretDown" }) })
23
+ /* @__PURE__ */ t.jsx("h3", { children: u }),
24
+ /* @__PURE__ */ t.jsx("div", { className: H(K.icon, { [K.open]: s }), children: /* @__PURE__ */ t.jsx(h, { name: "CaretDown" }) })
25
25
  ]
26
26
  }
27
27
  ),
@@ -29,25 +29,25 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
29
29
  "div",
30
30
  {
31
31
  ref: e,
32
- className: X.content,
32
+ className: K.content,
33
33
  style: { height: `${i}px` },
34
- children: /* @__PURE__ */ t.jsx("p", { children: o })
34
+ children: /* @__PURE__ */ t.jsx("p", { children: n })
35
35
  }
36
36
  )
37
37
  ] });
38
- }, xt = "_wrapper_1g82c_2", bt = "_alignmentBlock_1g82c_8", ft = "_title_1g82c_15", jt = "_subtitle_1g82c_22", vt = "_alignmentContent_1g82c_29", kt = "_alignments_1g82c_35", yt = "_alignment_1g82c_8", $t = "_circle_1g82c_54", Nt = "_paddings_1g82c_61", wt = "_padding_1g82c_61", It = "_input_1g82c_79", O = {
39
- wrapper: xt,
40
- alignmentBlock: bt,
41
- title: ft,
42
- subtitle: jt,
43
- alignmentContent: vt,
44
- alignments: kt,
45
- alignment: yt,
46
- circle: $t,
47
- paddings: Nt,
48
- padding: wt,
49
- input: It
50
- }, Ct = [
38
+ }, jt = "_wrapper_1g82c_2", vt = "_alignmentBlock_1g82c_8", kt = "_title_1g82c_15", yt = "_subtitle_1g82c_22", $t = "_alignmentContent_1g82c_29", Nt = "_alignments_1g82c_35", wt = "_alignment_1g82c_8", Ct = "_circle_1g82c_54", It = "_paddings_1g82c_61", Pt = "_padding_1g82c_61", Bt = "_input_1g82c_79", D = {
39
+ wrapper: jt,
40
+ alignmentBlock: vt,
41
+ title: kt,
42
+ subtitle: yt,
43
+ alignmentContent: $t,
44
+ alignments: Nt,
45
+ alignment: wt,
46
+ circle: Ct,
47
+ paddings: It,
48
+ padding: Pt,
49
+ input: Bt
50
+ }, Tt = [
51
51
  "topLeft",
52
52
  "top",
53
53
  "topRight",
@@ -57,10 +57,10 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
57
57
  "bottomLeft",
58
58
  "bottom",
59
59
  "bottomRight"
60
- ], Pt = ["left", "top", "right", "bottom"], on = (_) => {
61
- const { alignment: o, padding: n, setPadding: c, setAlignment: i } = _;
60
+ ], At = ["left", "top", "right", "bottom"], _n = (u) => {
61
+ const { alignment: n, padding: s, setPadding: o, setAlignment: i } = u;
62
62
  function a() {
63
- switch (o) {
63
+ switch (n) {
64
64
  case "left":
65
65
  case "topLeft":
66
66
  case "bottomLeft":
@@ -77,8 +77,8 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
77
77
  return "TextAlignCenter";
78
78
  }
79
79
  }
80
- function e(s) {
81
- switch (s) {
80
+ function e(c) {
81
+ switch (c) {
82
82
  case "left":
83
83
  return "AlignLeft";
84
84
  case "right":
@@ -89,21 +89,21 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
89
89
  return "AlignBottom";
90
90
  }
91
91
  }
92
- return /* @__PURE__ */ t.jsxs("div", { className: O.layout, children: [
93
- /* @__PURE__ */ t.jsx("h3", { className: O.title, children: "Layout" }),
94
- /* @__PURE__ */ t.jsxs("div", { className: O.alignmentBlock, children: [
95
- /* @__PURE__ */ t.jsx("h5", { className: O.subtitle, children: "Alignment" }),
96
- /* @__PURE__ */ t.jsxs("div", { className: O.alignmentContent, children: [
97
- /* @__PURE__ */ t.jsx("div", { className: O.alignments, children: Ct.map((s) => /* @__PURE__ */ t.jsxs(
92
+ return /* @__PURE__ */ t.jsxs("div", { className: D.layout, children: [
93
+ /* @__PURE__ */ t.jsx("h3", { className: D.title, children: "Layout" }),
94
+ /* @__PURE__ */ t.jsxs("div", { className: D.alignmentBlock, children: [
95
+ /* @__PURE__ */ t.jsx("h5", { className: D.subtitle, children: "Alignment" }),
96
+ /* @__PURE__ */ t.jsxs("div", { className: D.alignmentContent, children: [
97
+ /* @__PURE__ */ t.jsx("div", { className: D.alignments, children: Tt.map((c) => /* @__PURE__ */ t.jsxs(
98
98
  "div",
99
99
  {
100
100
  onClick: () => {
101
- i(s);
101
+ i(c);
102
102
  },
103
- className: O.alignment,
103
+ className: D.alignment,
104
104
  children: [
105
- s !== o && /* @__PURE__ */ t.jsx("div", { className: O.circle }),
106
- s === o && /* @__PURE__ */ t.jsx(
105
+ c !== n && /* @__PURE__ */ t.jsx("div", { className: D.circle }),
106
+ c === n && /* @__PURE__ */ t.jsx(
107
107
  h,
108
108
  {
109
109
  name: a(),
@@ -114,25 +114,25 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
114
114
  )
115
115
  ]
116
116
  },
117
- s
117
+ c
118
118
  )) }),
119
- /* @__PURE__ */ t.jsx("div", { className: O.paddings, children: Pt.map((s) => /* @__PURE__ */ t.jsxs("label", { className: O.padding, children: [
119
+ /* @__PURE__ */ t.jsx("div", { className: D.paddings, children: At.map((c) => /* @__PURE__ */ t.jsxs("label", { className: D.padding, children: [
120
120
  /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
121
121
  h,
122
122
  {
123
- name: e(s),
123
+ name: e(c),
124
124
  width: 20,
125
125
  height: 20
126
126
  }
127
127
  ) }),
128
128
  /* @__PURE__ */ t.jsx(
129
- F,
129
+ V,
130
130
  {
131
131
  type: "text",
132
- value: String(n[s]),
133
- onChange: (r) => c({
134
- ...n,
135
- [s]: Number(r)
132
+ value: String(s[c]),
133
+ onChange: (d) => o({
134
+ ...s,
135
+ [c]: Number(d)
136
136
  }),
137
137
  paddingless: !0,
138
138
  borderless: !0
@@ -142,19 +142,19 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
142
142
  ] })
143
143
  ] })
144
144
  ] });
145
- }, Bt = "_subtitle_2zbxx_1", Tt = "_header_2zbxx_8", At = "_text_2zbxx_9", St = "_top_2zbxx_16", Ot = "_itemsBlock_2zbxx_23", Y = {
146
- subtitle: Bt,
147
- header: Tt,
148
- text: At,
149
- top: St,
150
- itemsBlock: Ot
151
- }, Dt = "_typeTexts_3zlec_1", Lt = "_block_3zlec_7", qt = "_active_3zlec_18", st = {
152
- typeTexts: Dt,
153
- block: Lt,
154
- active: qt
155
- }, Mt = ["bold", "italic", "underline", "strike-through", "code"], dt = (_) => {
156
- const { typesText: o, setTypesText: n } = _;
157
- function c(i) {
145
+ }, St = "_subtitle_2zbxx_1", Ot = "_header_2zbxx_8", Dt = "_text_2zbxx_9", Lt = "_top_2zbxx_16", qt = "_itemsBlock_2zbxx_23", Q = {
146
+ subtitle: St,
147
+ header: Ot,
148
+ text: Dt,
149
+ top: Lt,
150
+ itemsBlock: qt
151
+ }, Rt = "_typeTexts_3zlec_1", Mt = "_block_3zlec_7", Ht = "_active_3zlec_18", nt = {
152
+ typeTexts: Rt,
153
+ block: Mt,
154
+ active: Ht
155
+ }, Et = ["bold", "italic", "underline", "strike-through", "code"], _t = (u) => {
156
+ const { typesText: n, setTypesText: s } = u;
157
+ function o(i) {
158
158
  switch (i) {
159
159
  case "bold":
160
160
  return "TextB";
@@ -168,25 +168,25 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
168
168
  return "TextUnderline";
169
169
  }
170
170
  }
171
- return /* @__PURE__ */ t.jsx("div", { className: st.typeTexts, children: Mt.map((i) => /* @__PURE__ */ t.jsx(
171
+ return /* @__PURE__ */ t.jsx("div", { className: nt.typeTexts, children: Et.map((i) => /* @__PURE__ */ t.jsx(
172
172
  "div",
173
173
  {
174
- className: z(st.block, {
175
- [st.active]: o.includes(i)
174
+ className: H(nt.block, {
175
+ [nt.active]: n.includes(i)
176
176
  }),
177
177
  onClick: () => {
178
- const a = [...o];
178
+ const a = [...n];
179
179
  if (a.includes(i)) {
180
- const e = a.filter((s) => s !== i);
181
- n(e);
180
+ const e = a.filter((c) => c !== i);
181
+ s(e);
182
182
  } else
183
- a.push(i), n(a);
183
+ a.push(i), s(a);
184
184
  },
185
185
  children: /* @__PURE__ */ t.jsx(
186
186
  h,
187
187
  {
188
- name: c(i),
189
- fill: o.includes(i) ? "#252525" : "#757575",
188
+ name: o(i),
189
+ fill: n.includes(i) ? "#252525" : "#757575",
190
190
  width: 20,
191
191
  height: 20
192
192
  }
@@ -194,32 +194,32 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
194
194
  },
195
195
  String(i)
196
196
  )) });
197
- }, Rt = (_) => {
197
+ }, zt = (u) => {
198
198
  const {
199
- typesText: o,
200
- isActiveText: n,
201
- setIsActiveText: c,
199
+ typesText: n,
200
+ isActiveText: s,
201
+ setIsActiveText: o,
202
202
  text: i,
203
203
  setText: a,
204
204
  setTypesText: e,
205
- title: s,
206
- subtitle: r = "Items"
207
- } = _;
208
- return /* @__PURE__ */ t.jsxs("div", { className: Y.text, children: [
209
- (s || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Y.top, children: [
210
- s && /* @__PURE__ */ t.jsx("h3", { className: Y.title, children: s }),
211
- n !== void 0 && c && /* @__PURE__ */ t.jsx(
212
- R,
205
+ title: c,
206
+ subtitle: d = "Items"
207
+ } = u;
208
+ return /* @__PURE__ */ t.jsxs("div", { className: Q.text, children: [
209
+ (c || s !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Q.top, children: [
210
+ c && /* @__PURE__ */ t.jsx("h3", { className: Q.title, children: c }),
211
+ s !== void 0 && o && /* @__PURE__ */ t.jsx(
212
+ z,
213
213
  {
214
- current: n,
215
- onChange: (k) => c(k)
214
+ current: s,
215
+ onChange: (k) => o(k)
216
216
  }
217
217
  )
218
218
  ] }),
219
- /* @__PURE__ */ t.jsxs("div", { className: Y.itemsBlock, children: [
220
- /* @__PURE__ */ t.jsx("h5", { className: Y.subtitle, children: r }),
219
+ /* @__PURE__ */ t.jsxs("div", { className: Q.itemsBlock, children: [
220
+ /* @__PURE__ */ t.jsx("h5", { className: Q.subtitle, children: d }),
221
221
  /* @__PURE__ */ t.jsx(
222
- ct,
222
+ it,
223
223
  {
224
224
  onChange: (k) => a(k),
225
225
  value: i,
@@ -227,51 +227,51 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
227
227
  }
228
228
  ),
229
229
  /* @__PURE__ */ t.jsx(
230
- dt,
230
+ _t,
231
231
  {
232
- typesText: o,
232
+ typesText: n,
233
233
  setTypesText: e
234
234
  }
235
235
  )
236
236
  ] })
237
237
  ] });
238
- }, Ht = "_subtitle_11qr1_1", Et = "_header_11qr1_8", zt = "_text_11qr1_9", Ft = "_productsBlock_11qr1_10", Vt = "_top_11qr1_22", Gt = "_itemsBlock_11qr1_29", Ut = "_typeTexts_11qr1_35", Xt = "_block_11qr1_41", Yt = "_active_11qr1_52", Jt = "_products_11qr1_10", Kt = "_product_11qr1_10", Qt = "_button_11qr1_70", Wt = "_disabled_11qr1_80", Zt = "_image_11qr1_84", te = "_info_11qr1_91", ee = "_name_11qr1_102", se = "_buttons_11qr1_106", ne = "_modal_11qr1_112", oe = "_link_11qr1_130", ce = "_modalOptions_11qr1_136", N = {
239
- subtitle: Ht,
240
- header: Et,
241
- text: zt,
242
- productsBlock: Ft,
243
- top: Vt,
244
- itemsBlock: Gt,
245
- typeTexts: Ut,
246
- block: Xt,
247
- active: Yt,
248
- products: Jt,
249
- product: Kt,
250
- button: Qt,
251
- disabled: Wt,
252
- image: Zt,
253
- info: te,
254
- name: ee,
255
- buttons: se,
256
- modal: ne,
257
- link: oe,
258
- modalOptions: ce
259
- }, ie = (_) => {
260
- const { activeItem: o, setActiveItem: n, popupPosition: c, modalOptions: i, setIsOpenModal: a } = _;
238
+ }, Ut = "_subtitle_11qr1_1", Ft = "_header_11qr1_8", Vt = "_text_11qr1_9", Gt = "_productsBlock_11qr1_10", Xt = "_top_11qr1_22", Yt = "_itemsBlock_11qr1_29", Jt = "_typeTexts_11qr1_35", Kt = "_block_11qr1_41", Qt = "_active_11qr1_52", Wt = "_products_11qr1_10", Zt = "_product_11qr1_10", te = "_button_11qr1_70", ee = "_disabled_11qr1_80", se = "_image_11qr1_84", ne = "_info_11qr1_91", oe = "_name_11qr1_102", ce = "_buttons_11qr1_106", ie = "_modal_11qr1_112", ae = "_link_11qr1_130", le = "_modalOptions_11qr1_136", C = {
239
+ subtitle: Ut,
240
+ header: Ft,
241
+ text: Vt,
242
+ productsBlock: Gt,
243
+ top: Xt,
244
+ itemsBlock: Yt,
245
+ typeTexts: Jt,
246
+ block: Kt,
247
+ active: Qt,
248
+ products: Wt,
249
+ product: Zt,
250
+ button: te,
251
+ disabled: ee,
252
+ image: se,
253
+ info: ne,
254
+ name: oe,
255
+ buttons: ce,
256
+ modal: ie,
257
+ link: ae,
258
+ modalOptions: le
259
+ }, re = (u) => {
260
+ const { activeItem: n, setActiveItem: s, popupPosition: o, modalOptions: i, setIsOpenModal: a } = u;
261
261
  return /* @__PURE__ */ t.jsxs(
262
262
  "div",
263
263
  {
264
- className: N.modal,
264
+ className: C.modal,
265
265
  onClick: (e) => {
266
266
  e.stopPropagation();
267
267
  },
268
268
  style: {
269
- top: `${c.top}px`,
270
- left: `${c.left}px`
269
+ top: `${o.top}px`,
270
+ left: `${o.left}px`
271
271
  },
272
272
  children: [
273
- /* @__PURE__ */ t.jsxs("div", { className: N.top, children: [
274
- /* @__PURE__ */ t.jsx("h3", { children: o.name }),
273
+ /* @__PURE__ */ t.jsxs("div", { className: C.top, children: [
274
+ /* @__PURE__ */ t.jsx("h3", { children: n.name }),
275
275
  /* @__PURE__ */ t.jsx(
276
276
  h,
277
277
  {
@@ -280,108 +280,108 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
280
280
  width: 20,
281
281
  hoverable: !0,
282
282
  onClick: () => {
283
- n(null), a(!1);
283
+ s(null), a(!1);
284
284
  }
285
285
  }
286
286
  )
287
287
  ] }),
288
- /* @__PURE__ */ t.jsx("div", { className: N.modalOptions, children: i.map((e) => {
288
+ /* @__PURE__ */ t.jsx("div", { className: C.modalOptions, children: i.map((e) => {
289
289
  if (e.type === "image")
290
290
  return /* @__PURE__ */ t.jsx(
291
- ot,
291
+ ct,
292
292
  {
293
293
  label: "Put up an attractive image",
294
- onChange: (s) => {
295
- const r = {
296
- ...o,
297
- [e.field]: s
294
+ onChange: (c) => {
295
+ const d = {
296
+ ...n,
297
+ [e.field]: c
298
298
  };
299
- n(r);
299
+ s(d);
300
300
  }
301
301
  }
302
302
  );
303
303
  if (e.type === "text")
304
304
  return /* @__PURE__ */ t.jsx(
305
- Rt,
305
+ zt,
306
306
  {
307
- typesText: o[e.field.type],
308
- setTypesText: (s) => {
309
- const r = {
310
- ...o,
311
- [e.field.type]: s
307
+ typesText: n[e.field.type],
308
+ setTypesText: (c) => {
309
+ const d = {
310
+ ...n,
311
+ [e.field.type]: c
312
312
  };
313
- n(r);
313
+ s(d);
314
314
  },
315
- text: o[e.field.text] || "",
316
- setText: (s) => {
317
- const r = {
318
- ...o,
319
- [e.field.text]: s
315
+ text: n[e.field.text] || "",
316
+ setText: (c) => {
317
+ const d = {
318
+ ...n,
319
+ [e.field.text]: c
320
320
  };
321
- n(r);
321
+ s(d);
322
322
  },
323
323
  subtitle: e.label
324
324
  }
325
325
  );
326
326
  if (e.type === "input")
327
327
  return /* @__PURE__ */ t.jsx(
328
- F,
328
+ V,
329
329
  {
330
- onChange: (s) => {
331
- const r = {
332
- ...o,
333
- [e.field]: s
330
+ onChange: (c) => {
331
+ const d = {
332
+ ...n,
333
+ [e.field]: c
334
334
  };
335
- n(r);
335
+ s(d);
336
336
  },
337
- value: o[e.field] || "",
337
+ value: n[e.field] || "",
338
338
  label: e.label,
339
339
  placeholder: e.placeholder
340
340
  }
341
341
  );
342
342
  if (e.type === "inputSwitch")
343
- return /* @__PURE__ */ t.jsxs("div", { className: N.link, children: [
343
+ return /* @__PURE__ */ t.jsxs("div", { className: C.link, children: [
344
344
  /* @__PURE__ */ t.jsx(
345
- F,
345
+ V,
346
346
  {
347
- onChange: (s) => {
348
- const r = {
349
- ...o,
350
- [e.field.text]: s
347
+ onChange: (c) => {
348
+ const d = {
349
+ ...n,
350
+ [e.field.text]: c
351
351
  };
352
- n(r);
352
+ s(d);
353
353
  },
354
- value: o[e.field.text] || "",
354
+ value: n[e.field.text] || "",
355
355
  label: e.inputLabel,
356
356
  placeholder: e.placeholder
357
357
  }
358
358
  ),
359
359
  /* @__PURE__ */ t.jsx(
360
- R,
360
+ z,
361
361
  {
362
- current: !!o[e.field.switch] || !1,
362
+ current: !!n[e.field.switch] || !1,
363
363
  label: e.switchLabel,
364
- onChange: (s) => {
365
- const r = {
366
- ...o,
367
- [e.field.switch]: s
364
+ onChange: (c) => {
365
+ const d = {
366
+ ...n,
367
+ [e.field.switch]: c
368
368
  };
369
- n(r);
369
+ s(d);
370
370
  }
371
371
  }
372
372
  )
373
373
  ] });
374
374
  if (e.type === "list")
375
375
  return /* @__PURE__ */ t.jsx(
376
- ue,
376
+ he,
377
377
  {
378
- items: o[e.field] || [],
379
- setItems: (s) => {
380
- const r = {
381
- ...o,
382
- [e.field]: s
378
+ items: n[e.field] || [],
379
+ setItems: (c) => {
380
+ const d = {
381
+ ...n,
382
+ [e.field]: c
383
383
  };
384
- n(r);
384
+ s(d);
385
385
  },
386
386
  itemsType: "select",
387
387
  draggable: e.draggable || !1,
@@ -393,117 +393,117 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
393
393
  );
394
394
  if (e.type === "select")
395
395
  return /* @__PURE__ */ t.jsx(
396
- V,
396
+ G,
397
397
  {
398
398
  options: e.itemsOptions,
399
- onChange: (s) => {
400
- const r = {
401
- ...o,
402
- [e.field]: s
399
+ onChange: (c) => {
400
+ const d = {
401
+ ...n,
402
+ [e.field]: c
403
403
  };
404
- n(r);
404
+ s(d);
405
405
  },
406
406
  label: e.label,
407
- value: o[e.field] || "String",
408
- leftAddon: e.leftAddon && e.leftAddon === "icon" && /* @__PURE__ */ t.jsx(h, { name: o[e.field] })
407
+ value: n[e.field] || "String",
408
+ leftAddon: e.leftAddon && e.leftAddon === "icon" && /* @__PURE__ */ t.jsx(h, { name: n[e.field] })
409
409
  }
410
410
  );
411
411
  }) })
412
412
  ]
413
413
  }
414
414
  );
415
- }, ae = "_other_1wtgi_1", le = "_subtitle_1wtgi_7", re = "_items_1wtgi_14", nt = {
416
- other: ae,
417
- subtitle: le,
418
- items: re
419
- }, ut = (_) => {
420
- const { items: o, title: n = "Other" } = _;
421
- return /* @__PURE__ */ t.jsxs("div", { className: nt.other, children: [
422
- /* @__PURE__ */ t.jsx("h5", { className: nt.subtitle, children: n }),
423
- /* @__PURE__ */ t.jsx("div", { className: nt.items, children: o.map((c) => /* @__PURE__ */ t.jsx(
424
- R,
415
+ }, de = "_other_1wtgi_1", ue = "_subtitle_1wtgi_7", _e = "_items_1wtgi_14", ot = {
416
+ other: de,
417
+ subtitle: ue,
418
+ items: _e
419
+ }, mt = (u) => {
420
+ const { items: n, title: s = "Other" } = u;
421
+ return /* @__PURE__ */ t.jsxs("div", { className: ot.other, children: [
422
+ /* @__PURE__ */ t.jsx("h5", { className: ot.subtitle, children: s }),
423
+ /* @__PURE__ */ t.jsx("div", { className: ot.items, children: n.map((o) => /* @__PURE__ */ t.jsx(
424
+ z,
425
425
  {
426
- current: c.isItem,
427
- onChange: (i) => c.setIsItem(i),
428
- label: c.label,
426
+ current: o.isItem,
427
+ onChange: (i) => o.setIsItem(i),
428
+ label: o.label,
429
429
  hasBackground: !0,
430
430
  paddingless: !1
431
431
  }
432
432
  )) })
433
433
  ] });
434
- }, de = (_) => {
435
- const { index: o, moveProduct: n, children: c } = _, [, i] = lt({
434
+ }, me = (u) => {
435
+ const { index: n, moveProduct: s, children: o } = u, [, i] = rt({
436
436
  accept: "product",
437
- hover(s) {
438
- s.index !== o && (n(s.index, o), s.index = o);
437
+ hover(c) {
438
+ c.index !== n && (s(c.index, n), c.index = n);
439
439
  }
440
- }), [{ isDragging: a }, e] = rt({
440
+ }), [{ isDragging: a }, e] = dt({
441
441
  type: "product",
442
- item: { index: o },
443
- collect: (s) => ({
444
- isDragging: s.isDragging()
442
+ item: { index: n },
443
+ collect: (c) => ({
444
+ isDragging: c.isDragging()
445
445
  })
446
446
  });
447
447
  return /* @__PURE__ */ t.jsx(
448
448
  "div",
449
449
  {
450
- ref: (s) => e(i(s)),
451
- className: `${N.product} ${a ? N.dragging : ""}`,
452
- children: c
450
+ ref: (c) => e(i(c)),
451
+ className: `${C.product} ${a ? C.dragging : ""}`,
452
+ children: o
453
453
  }
454
454
  );
455
- }, ue = (_) => {
455
+ }, he = (u) => {
456
456
  const {
457
- isActiveItems: o,
458
- setIsActiveItems: n,
459
- items: c,
457
+ isActiveItems: n,
458
+ setIsActiveItems: s,
459
+ items: o,
460
460
  setItems: i,
461
461
  other: a,
462
462
  title: e,
463
- subtitle: s,
464
- editable: r = !0,
463
+ subtitle: c,
464
+ editable: d = !0,
465
465
  draggable: k = !1,
466
466
  withImage: m = !1,
467
- deletable: v = !0,
468
- addable: u = !0,
469
- itemsType: w,
470
- itemsPlaceholder: b = "",
467
+ deletable: f = !0,
468
+ addable: b = !0,
469
+ itemsType: $,
470
+ itemsPlaceholder: r = "",
471
471
  itemsOptions: g,
472
- hasRangeSelector: P = !1,
473
- rangeSelectorOptions: W,
474
- modalOptions: Z,
475
- addableOptions: G = {},
476
- limit: A
477
- } = _, [L, q] = p.useState(null), [et, tt] = p.useState({
472
+ hasRangeSelector: B = !1,
473
+ rangeSelectorOptions: X,
474
+ modalOptions: Y,
475
+ addableOptions: y = {},
476
+ limit: S
477
+ } = u, [q, R] = p.useState(null), [st, et] = p.useState({
478
478
  top: 0,
479
479
  left: 0
480
- }), [d, f] = p.useState(!1), B = (l, I) => {
481
- const T = [...c], [j] = T.splice(l, 1);
482
- T.splice(I, 0, j), i(T);
480
+ }), [_, j] = p.useState(!1), T = (l, I) => {
481
+ const A = [...o], [v] = A.splice(l, 1);
482
+ A.splice(I, 0, v), i(A);
483
483
  };
484
484
  p.useEffect(() => {
485
485
  const l = () => {
486
- q(null), f(!1);
486
+ R(null), j(!1);
487
487
  };
488
- return document.body.addEventListener("click", l), q(null), f(!1), () => {
489
- q(null), f(!1), document.body.removeEventListener("click", l);
488
+ return document.body.addEventListener("click", l), R(null), j(!1), () => {
489
+ R(null), j(!1), document.body.removeEventListener("click", l);
490
490
  };
491
491
  }, []), p.useEffect(() => {
492
- if (L) {
493
- const l = [...c].map((I) => I.id === L.id ? L : I);
492
+ if (q) {
493
+ const l = [...o].map((I) => I.id === q.id ? q : I);
494
494
  i(l);
495
495
  }
496
- }, [L]);
497
- const y = (l, I) => {
498
- l.stopPropagation(), f(!0);
499
- const T = l.target.getBoundingClientRect(), j = 500, U = window.innerHeight;
500
- let D = T.top + window.scrollY;
501
- D + j > U && (D = U - j - 20), tt({
502
- top: D - 80,
503
- left: T.left - 30
504
- }), q(I);
496
+ }, [q]);
497
+ const N = (l, I) => {
498
+ l.stopPropagation(), j(!0);
499
+ const A = l.target.getBoundingClientRect(), v = 500, J = window.innerHeight;
500
+ let L = A.top + window.scrollY;
501
+ L + v > J && (L = J - v - 20), et({
502
+ top: L - 80,
503
+ left: A.left - 30
504
+ }), R(I);
505
505
  };
506
- function H(l) {
506
+ function U(l) {
507
507
  if (m)
508
508
  return l ? /* @__PURE__ */ t.jsx(
509
509
  "img",
@@ -523,8 +523,8 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
523
523
  }
524
524
  );
525
525
  }
526
- const S = (l, I) => {
527
- const T = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
526
+ const O = (l, I) => {
527
+ const A = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
528
528
  k && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
529
529
  h,
530
530
  {
@@ -534,62 +534,62 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
534
534
  height: 20
535
535
  }
536
536
  ) }),
537
- w === "select" && /* @__PURE__ */ t.jsx(
538
- V,
537
+ $ === "select" && /* @__PURE__ */ t.jsx(
538
+ G,
539
539
  {
540
- onChange: (j) => {
541
- const D = [...c].map((M) => M.id === l.id ? {
540
+ onChange: (v) => {
541
+ const L = [...o].map((M) => M.id === l.id ? {
542
542
  ...l,
543
- name: j
543
+ name: v
544
544
  } : M);
545
- q({
545
+ R({
546
546
  ...l,
547
- name: j
548
- }), i([...D]);
547
+ name: v
548
+ }), i([...L]);
549
549
  },
550
550
  value: l.name,
551
551
  options: g,
552
- leftAddon: H(l.images)
552
+ leftAddon: U(l.images)
553
553
  }
554
554
  ),
555
- w === "input" && /* @__PURE__ */ t.jsx(
556
- F,
555
+ $ === "input" && /* @__PURE__ */ t.jsx(
556
+ V,
557
557
  {
558
- onChange: (j) => {
559
- const D = [...c].map((M) => M.id === l.id ? {
558
+ onChange: (v) => {
559
+ const L = [...o].map((M) => M.id === l.id ? {
560
560
  ...l,
561
- name: j
561
+ name: v
562
562
  } : M);
563
- i([...D]);
563
+ i([...L]);
564
564
  },
565
565
  value: l.name,
566
- placeholder: b
566
+ placeholder: r
567
567
  }
568
568
  ),
569
- w === "image" && /* @__PURE__ */ t.jsx(
570
- ot,
569
+ $ === "image" && /* @__PURE__ */ t.jsx(
570
+ ct,
571
571
  {
572
- onChange: (j) => {
573
- const D = [...c].map((M) => M.id === l.id ? {
572
+ onChange: (v) => {
573
+ const L = [...o].map((M) => M.id === l.id ? {
574
574
  ...l,
575
- images: j
575
+ images: v
576
576
  } : M);
577
- i([...D]);
577
+ i([...L]);
578
578
  }
579
579
  }
580
580
  ),
581
- /* @__PURE__ */ t.jsxs("div", { className: N.buttons, children: [
582
- r && /* @__PURE__ */ t.jsx(
581
+ /* @__PURE__ */ t.jsxs("div", { className: C.buttons, children: [
582
+ d && /* @__PURE__ */ t.jsx(
583
583
  h,
584
584
  {
585
585
  name: "Sliders",
586
586
  hoverable: !0,
587
587
  width: 20,
588
588
  height: 20,
589
- onClick: (j) => y(j, l)
589
+ onClick: (v) => N(v, l)
590
590
  }
591
591
  ),
592
- v && /* @__PURE__ */ t.jsx(
592
+ f && /* @__PURE__ */ t.jsx(
593
593
  h,
594
594
  {
595
595
  name: "Trash",
@@ -597,76 +597,76 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
597
597
  width: 20,
598
598
  height: 20,
599
599
  fill: "#C12A2A",
600
- onClick: () => i(c.filter((j) => j.id !== l.id))
600
+ onClick: () => i(o.filter((v) => v.id !== l.id))
601
601
  }
602
602
  )
603
603
  ] })
604
604
  ] });
605
605
  return k ? /* @__PURE__ */ t.jsx(
606
- de,
606
+ me,
607
607
  {
608
608
  product: l,
609
609
  index: I,
610
- moveProduct: B,
611
- children: T
610
+ moveProduct: T,
611
+ children: A
612
612
  },
613
613
  l.id
614
614
  ) : /* @__PURE__ */ t.jsx(
615
615
  "div",
616
616
  {
617
- className: N.product,
618
- children: T
617
+ className: C.product,
618
+ children: A
619
619
  },
620
620
  l.id
621
621
  );
622
622
  };
623
- return /* @__PURE__ */ t.jsxs("div", { className: N.productsBlock, children: [
624
- (e || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: N.top, children: [
625
- e && /* @__PURE__ */ t.jsx("h3", { className: N.title, children: e }),
626
- o !== void 0 && /* @__PURE__ */ t.jsx(
627
- R,
623
+ return /* @__PURE__ */ t.jsxs("div", { className: C.productsBlock, children: [
624
+ (e || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: C.top, children: [
625
+ e && /* @__PURE__ */ t.jsx("h3", { className: C.title, children: e }),
626
+ n !== void 0 && /* @__PURE__ */ t.jsx(
627
+ z,
628
628
  {
629
- current: o,
630
- onChange: (l) => n == null ? void 0 : n(l)
629
+ current: n,
630
+ onChange: (l) => s == null ? void 0 : s(l)
631
631
  }
632
632
  )
633
633
  ] }),
634
- L && r && Z && d && /* @__PURE__ */ t.jsx(
635
- ie,
634
+ q && d && Y && _ && /* @__PURE__ */ t.jsx(
635
+ re,
636
636
  {
637
- activeItem: L,
638
- setActiveItem: q,
639
- popupPosition: et,
640
- modalOptions: Z,
641
- setIsOpenModal: f
637
+ activeItem: q,
638
+ setActiveItem: R,
639
+ popupPosition: st,
640
+ modalOptions: Y,
641
+ setIsOpenModal: j
642
642
  }
643
643
  ),
644
- P && W && /* @__PURE__ */ t.jsx(hs, { ...W }),
645
- /* @__PURE__ */ t.jsxs("div", { className: N.products, children: [
646
- s && /* @__PURE__ */ t.jsx("h5", { className: N.subtitle, children: s }),
647
- k ? /* @__PURE__ */ t.jsx(it, { backend: at, children: c.map((l, I) => S(l, I)) }) : c.map((l, I) => S(l, I)),
648
- u && /* @__PURE__ */ t.jsxs(
649
- Q,
644
+ B && X && /* @__PURE__ */ t.jsx(xs, { ...X }),
645
+ /* @__PURE__ */ t.jsxs("div", { className: C.products, children: [
646
+ c && /* @__PURE__ */ t.jsx("h5", { className: C.subtitle, children: c }),
647
+ k ? /* @__PURE__ */ t.jsx(at, { backend: lt, children: o.map((l, I) => O(l, I)) }) : o.map((l, I) => O(l, I)),
648
+ b && /* @__PURE__ */ t.jsxs(
649
+ tt,
650
650
  {
651
- className: z(N.button, {
652
- [N.disabled]: !!(A && A <= c.length)
651
+ className: H(C.button, {
652
+ [C.disabled]: !!(S && S <= o.length)
653
653
  }),
654
654
  size: "s",
655
- disabled: !!(A && A <= c.length),
655
+ disabled: !!(S && S <= o.length),
656
656
  onClick: () => {
657
- const l = [...c];
658
- w === "select" ? l.push({
659
- name: g[0] || `Product ${c.length + 1}`,
660
- id: K(),
661
- ...G
662
- }) : w === "input" ? l.push({
657
+ const l = [...o];
658
+ $ === "select" ? l.push({
659
+ name: g[0] || `Product ${o.length + 1}`,
660
+ id: Z(),
661
+ ...y
662
+ }) : $ === "input" ? l.push({
663
663
  name: "",
664
- id: K(),
665
- ...G
664
+ id: Z(),
665
+ ...y
666
666
  }) : l.push({
667
- name: `Image ${c.length + 1}`,
668
- id: K(),
669
- ...G
667
+ name: `Image ${o.length + 1}`,
668
+ id: Z(),
669
+ ...y
670
670
  }), i(l);
671
671
  },
672
672
  children: [
@@ -683,55 +683,55 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
683
683
  }
684
684
  )
685
685
  ] }),
686
- a !== void 0 && /* @__PURE__ */ t.jsx(ut, { items: a })
686
+ a !== void 0 && /* @__PURE__ */ t.jsx(mt, { items: a })
687
687
  ] });
688
- }, _e = "_subtitle_41klp_1", me = "_header_41klp_8", he = "_text_41klp_9", pe = "_productsBlock_41klp_10", ge = "_buttonsBlock_41klp_11", xe = "_top_41klp_21", be = "_itemsBlock_41klp_28", fe = "_typeTexts_41klp_34", je = "_block_41klp_40", ve = "_active_41klp_51", ke = "_products_41klp_10", ye = "_product_41klp_10", $e = "_button_41klp_11", Ne = "_image_41klp_79", we = "_info_41klp_86", Ie = "_name_41klp_97", Ce = "_buttons_41klp_11", Pe = "_modal_41klp_107", Be = "_other_41klp_124", Te = "_options_41klp_130", E = {
689
- subtitle: _e,
690
- header: me,
691
- text: he,
692
- productsBlock: pe,
693
- buttonsBlock: ge,
694
- top: xe,
695
- itemsBlock: be,
696
- typeTexts: fe,
697
- block: je,
698
- active: ve,
699
- products: ke,
700
- product: ye,
701
- button: $e,
702
- image: Ne,
703
- info: we,
704
- name: Ie,
705
- buttons: Ce,
706
- modal: Pe,
707
- other: Be,
708
- options: Te
709
- }, Ae = (_) => {
710
- const { activeButton: o, setActiveButton: n, popupPosition: c } = _, [i, a] = p.useState(o.typesText), [e, s] = p.useState(o.destination), [r, k] = p.useState(o.link || ""), [m, v] = p.useState(o.text || "");
688
+ }, pe = "_subtitle_41klp_1", ge = "_header_41klp_8", xe = "_text_41klp_9", be = "_productsBlock_41klp_10", fe = "_buttonsBlock_41klp_11", je = "_top_41klp_21", ve = "_itemsBlock_41klp_28", ke = "_typeTexts_41klp_34", ye = "_block_41klp_40", $e = "_active_41klp_51", Ne = "_products_41klp_10", we = "_product_41klp_10", Ce = "_button_41klp_11", Ie = "_image_41klp_79", Pe = "_info_41klp_86", Be = "_name_41klp_97", Te = "_buttons_41klp_11", Ae = "_modal_41klp_107", Se = "_other_41klp_124", Oe = "_options_41klp_130", F = {
689
+ subtitle: pe,
690
+ header: ge,
691
+ text: xe,
692
+ productsBlock: be,
693
+ buttonsBlock: fe,
694
+ top: je,
695
+ itemsBlock: ve,
696
+ typeTexts: ke,
697
+ block: ye,
698
+ active: $e,
699
+ products: Ne,
700
+ product: we,
701
+ button: Ce,
702
+ image: Ie,
703
+ info: Pe,
704
+ name: Be,
705
+ buttons: Te,
706
+ modal: Ae,
707
+ other: Se,
708
+ options: Oe
709
+ }, De = (u) => {
710
+ const { activeButton: n, setActiveButton: s, popupPosition: o } = u, [i, a] = p.useState(n.typesText), [e, c] = p.useState(n.destination), [d, k] = p.useState(n.link || ""), [m, f] = p.useState(n.text || "");
711
711
  return p.useEffect(() => {
712
- n({
713
- ...o,
712
+ s({
713
+ ...n,
714
714
  ...{
715
715
  text: m,
716
- link: r,
716
+ link: d,
717
717
  destination: e,
718
718
  typesText: i
719
719
  }
720
720
  });
721
- }, [i, e, r, m]), /* @__PURE__ */ t.jsxs(
721
+ }, [i, e, d, m]), /* @__PURE__ */ t.jsxs(
722
722
  "div",
723
723
  {
724
- className: E.modal,
725
- onClick: (u) => {
726
- u.stopPropagation();
724
+ className: F.modal,
725
+ onClick: (b) => {
726
+ b.stopPropagation();
727
727
  },
728
728
  style: {
729
- top: `${c.top}px`,
730
- left: `${c.left}px`
729
+ top: `${o.top}px`,
730
+ left: `${o.left}px`
731
731
  },
732
732
  children: [
733
- /* @__PURE__ */ t.jsxs("div", { className: E.top, children: [
734
- /* @__PURE__ */ t.jsx("h3", { children: o.type }),
733
+ /* @__PURE__ */ t.jsxs("div", { className: F.top, children: [
734
+ /* @__PURE__ */ t.jsx("h3", { children: n.type }),
735
735
  /* @__PURE__ */ t.jsx(
736
736
  h,
737
737
  {
@@ -739,22 +739,22 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
739
739
  height: 20,
740
740
  width: 20,
741
741
  hoverable: !0,
742
- onClick: () => n(null)
742
+ onClick: () => s(null)
743
743
  }
744
744
  )
745
745
  ] }),
746
- /* @__PURE__ */ t.jsxs("div", { className: E.options, children: [
746
+ /* @__PURE__ */ t.jsxs("div", { className: F.options, children: [
747
747
  /* @__PURE__ */ t.jsx(
748
- V,
748
+ G,
749
749
  {
750
750
  label: "Destination",
751
- onChange: (u) => s(u),
751
+ onChange: (b) => c(b),
752
752
  options: ["Go to Page", "Open Link"],
753
753
  value: e
754
754
  }
755
755
  ),
756
756
  e === "Go to Page" ? /* @__PURE__ */ t.jsx(
757
- V,
757
+ G,
758
758
  {
759
759
  label: "Go to",
760
760
  onChange: () => {
@@ -763,32 +763,32 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
763
763
  value: "Homepage"
764
764
  }
765
765
  ) : /* @__PURE__ */ t.jsx(
766
- F,
766
+ V,
767
767
  {
768
- onChange: (u) => k(u),
769
- value: r,
768
+ onChange: (b) => k(b),
769
+ value: d,
770
770
  placeholder: "https://",
771
771
  label: "Link"
772
772
  }
773
773
  ),
774
774
  /* @__PURE__ */ t.jsx(
775
- R,
775
+ z,
776
776
  {
777
777
  current: !1,
778
778
  label: "Open in new tab"
779
779
  }
780
780
  ),
781
781
  /* @__PURE__ */ t.jsx(
782
- ct,
782
+ it,
783
783
  {
784
- onChange: (u) => v(u),
784
+ onChange: (b) => f(b),
785
785
  value: m,
786
786
  label: "Text",
787
787
  maxLength: 150
788
788
  }
789
789
  ),
790
790
  /* @__PURE__ */ t.jsx(
791
- dt,
791
+ _t,
792
792
  {
793
793
  typesText: i,
794
794
  setTypesText: a
@@ -798,29 +798,29 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
798
798
  ]
799
799
  }
800
800
  );
801
- }, Se = "_subtitle_1y5sw_1", Oe = "_header_1y5sw_8", De = "_text_1y5sw_9", Le = "_productsBlock_1y5sw_10", qe = "_buttonsBlock_1y5sw_11", Me = "_top_1y5sw_22", Re = "_itemsBlock_1y5sw_29", He = "_typeTexts_1y5sw_35", Ee = "_block_1y5sw_41", ze = "_active_1y5sw_52", Fe = "_products_1y5sw_10", Ve = "_product_1y5sw_10", Ge = "_button_1y5sw_11", Ue = "_image_1y5sw_80", Xe = "_info_1y5sw_87", Ye = "_name_1y5sw_98", Je = "_buttons_1y5sw_11", Ke = "_modal_1y5sw_108", Qe = "_other_1y5sw_125", We = "_options_1y5sw_131", J = {
802
- subtitle: Se,
803
- header: Oe,
804
- text: De,
805
- productsBlock: Le,
806
- buttonsBlock: qe,
807
- top: Me,
808
- itemsBlock: Re,
809
- typeTexts: He,
810
- block: Ee,
811
- active: ze,
812
- products: Fe,
813
- product: Ve,
814
- button: Ge,
815
- image: Ue,
816
- info: Xe,
817
- name: Ye,
818
- buttons: Je,
819
- modal: Ke,
820
- other: Qe,
821
- options: We
822
- }, Ze = (_) => {
823
- const { buttons: o, setButtons: n, deletable: c = !0, addable: i = !0 } = _, [a, e] = p.useState(null), [s, r] = p.useState({
801
+ }, Le = "_subtitle_1y5sw_1", qe = "_header_1y5sw_8", Re = "_text_1y5sw_9", Me = "_productsBlock_1y5sw_10", He = "_buttonsBlock_1y5sw_11", Ee = "_top_1y5sw_22", ze = "_itemsBlock_1y5sw_29", Ue = "_typeTexts_1y5sw_35", Fe = "_block_1y5sw_41", Ve = "_active_1y5sw_52", Ge = "_products_1y5sw_10", Xe = "_product_1y5sw_10", Ye = "_button_1y5sw_11", Je = "_image_1y5sw_80", Ke = "_info_1y5sw_87", Qe = "_name_1y5sw_98", We = "_buttons_1y5sw_11", Ze = "_modal_1y5sw_108", ts = "_other_1y5sw_125", es = "_options_1y5sw_131", W = {
802
+ subtitle: Le,
803
+ header: qe,
804
+ text: Re,
805
+ productsBlock: Me,
806
+ buttonsBlock: He,
807
+ top: Ee,
808
+ itemsBlock: ze,
809
+ typeTexts: Ue,
810
+ block: Fe,
811
+ active: Ve,
812
+ products: Ge,
813
+ product: Xe,
814
+ button: Ye,
815
+ image: Je,
816
+ info: Ke,
817
+ name: Qe,
818
+ buttons: We,
819
+ modal: Ze,
820
+ other: ts,
821
+ options: es
822
+ }, ss = (u) => {
823
+ const { buttons: n, setButtons: s, deletable: o = !0, addable: i = !0 } = u, [a, e] = p.useState(null), [c, d] = p.useState({
824
824
  top: 0,
825
825
  left: 0
826
826
  });
@@ -833,41 +833,41 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
833
833
  };
834
834
  }, []), p.useEffect(() => {
835
835
  if (a) {
836
- const m = [...o].map((v) => v.id === a.id ? a : v);
837
- n(m);
836
+ const m = [...n].map((f) => f.id === a.id ? a : f);
837
+ s(m);
838
838
  }
839
839
  }, [a]);
840
- const k = (m, v) => {
840
+ const k = (m, f) => {
841
841
  m.stopPropagation();
842
- const u = m.target.getBoundingClientRect(), w = 490, b = window.innerHeight;
843
- let g = u.top + window.scrollY;
844
- g + w > b && (g = b - w - 20), r({
842
+ const b = m.target.getBoundingClientRect(), $ = 490, r = window.innerHeight;
843
+ let g = b.top + window.scrollY;
844
+ g + $ > r && (g = r - $ - 20), d({
845
845
  top: g,
846
- left: u.left - 30
847
- }), e(v);
846
+ left: b.left - 30
847
+ }), e(f);
848
848
  };
849
- return /* @__PURE__ */ t.jsxs("div", { className: J.products, children: [
850
- /* @__PURE__ */ t.jsx("h5", { className: J.subtitle, children: "Button Type" }),
851
- o.map((m) => /* @__PURE__ */ t.jsxs(
849
+ return /* @__PURE__ */ t.jsxs("div", { className: W.products, children: [
850
+ /* @__PURE__ */ t.jsx("h5", { className: W.subtitle, children: "Button Type" }),
851
+ n.map((m) => /* @__PURE__ */ t.jsxs(
852
852
  "div",
853
853
  {
854
- className: J.product,
854
+ className: W.product,
855
855
  children: [
856
856
  /* @__PURE__ */ t.jsx(
857
- V,
857
+ G,
858
858
  {
859
- onChange: (v) => {
860
- const w = [...o].map((b) => b.id === m.id ? {
859
+ onChange: (f) => {
860
+ const $ = [...n].map((r) => r.id === m.id ? {
861
861
  ...m,
862
- type: v
863
- } : b);
864
- n(w);
862
+ type: f
863
+ } : r);
864
+ s($);
865
865
  },
866
866
  value: m.type,
867
867
  options: ["Primary", "Secondary", "Tertiary"]
868
868
  }
869
869
  ),
870
- /* @__PURE__ */ t.jsxs("div", { className: J.buttons, children: [
870
+ /* @__PURE__ */ t.jsxs("div", { className: W.buttons, children: [
871
871
  /* @__PURE__ */ t.jsx(
872
872
  h,
873
873
  {
@@ -875,19 +875,19 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
875
875
  hoverable: !0,
876
876
  width: 20,
877
877
  height: 20,
878
- onClick: (v) => {
879
- k(v, m);
878
+ onClick: (f) => {
879
+ k(f, m);
880
880
  }
881
881
  }
882
882
  ),
883
- c && /* @__PURE__ */ t.jsx(
883
+ o && /* @__PURE__ */ t.jsx(
884
884
  h,
885
885
  {
886
886
  name: "Trash",
887
887
  hoverable: !0,
888
888
  onClick: () => {
889
- const v = o.filter((u) => u.id !== m.id);
890
- n(v);
889
+ const f = n.filter((b) => b.id !== m.id);
890
+ s(f);
891
891
  },
892
892
  width: 20,
893
893
  height: 20,
@@ -900,27 +900,27 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
900
900
  m.id
901
901
  )),
902
902
  a && /* @__PURE__ */ t.jsx(
903
- Ae,
903
+ De,
904
904
  {
905
905
  activeButton: a,
906
906
  setActiveButton: e,
907
- popupPosition: s
907
+ popupPosition: c
908
908
  }
909
909
  ),
910
910
  i && /* @__PURE__ */ t.jsxs(
911
- Q,
911
+ tt,
912
912
  {
913
- className: J.button,
913
+ className: W.button,
914
914
  size: "s",
915
915
  onClick: () => {
916
- const m = [...o];
916
+ const m = [...n];
917
917
  m.push({
918
918
  type: "Primary",
919
- id: K(),
919
+ id: Z(),
920
920
  typesText: [],
921
921
  destination: "Go to Page",
922
922
  text: ""
923
- }), n(m);
923
+ }), s(m);
924
924
  },
925
925
  children: [
926
926
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
@@ -936,75 +936,75 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
936
936
  }
937
937
  )
938
938
  ] });
939
- }, cn = (_) => {
940
- const { isActiveButtons: o, setIsActiveButtons: n, buttons: c, setButtons: i } = _;
941
- return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: E.buttonsBlock, children: [
942
- /* @__PURE__ */ t.jsxs("div", { className: E.top, children: [
943
- /* @__PURE__ */ t.jsx("h3", { className: E.title, children: "Buttons" }),
939
+ }, mn = (u) => {
940
+ const { isActiveButtons: n, setIsActiveButtons: s, buttons: o, setButtons: i } = u;
941
+ return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: F.buttonsBlock, children: [
942
+ /* @__PURE__ */ t.jsxs("div", { className: F.top, children: [
943
+ /* @__PURE__ */ t.jsx("h3", { className: F.title, children: "Buttons" }),
944
944
  /* @__PURE__ */ t.jsx(
945
- R,
945
+ z,
946
946
  {
947
- current: o,
948
- onChange: (a) => n(a)
947
+ current: n,
948
+ onChange: (a) => s(a)
949
949
  }
950
950
  )
951
951
  ] }),
952
952
  /* @__PURE__ */ t.jsx(
953
- Ze,
953
+ ss,
954
954
  {
955
- buttons: c,
955
+ buttons: o,
956
956
  setButtons: i
957
957
  }
958
958
  )
959
959
  ] }) });
960
- }, ts = "_wrapper_tn7gb_1", es = "_subtitle_tn7gb_7", ss = "_content_tn7gb_14", ns = "_range_tn7gb_21", os = "_track_tn7gb_26", cs = "_progress_tn7gb_35", is = "_dots_tn7gb_45", as = "_dot_tn7gb_45", ls = "_active_tn7gb_62", rs = "_input_tn7gb_74", ds = "_countBlock_tn7gb_88", us = "_count_tn7gb_88", _s = "_controls_tn7gb_103", ms = "_button_tn7gb_108", $ = {
961
- wrapper: ts,
962
- subtitle: es,
963
- content: ss,
964
- range: ns,
965
- track: os,
966
- progress: cs,
967
- dots: is,
968
- dot: as,
969
- active: ls,
970
- input: rs,
971
- countBlock: ds,
972
- count: us,
973
- controls: _s,
974
- button: ms
975
- }, hs = (_) => {
976
- const { label: o, min: n = 1, max: c = 4, step: i = 1, count: a, setCount: e } = _, [s, r] = p.useState(!1), k = Array.from({ length: (c - n) / i + 1 }), m = (a - n) / (c - n) * 100, v = () => {
977
- a < c && e(a + i);
978
- }, u = () => {
979
- a > n && e(a - i);
980
- }, w = (b) => {
981
- const g = n + b * i;
960
+ }, ns = "_wrapper_tn7gb_1", os = "_subtitle_tn7gb_7", cs = "_content_tn7gb_14", is = "_range_tn7gb_21", as = "_track_tn7gb_26", ls = "_progress_tn7gb_35", rs = "_dots_tn7gb_45", ds = "_dot_tn7gb_45", us = "_active_tn7gb_62", _s = "_input_tn7gb_74", ms = "_countBlock_tn7gb_88", hs = "_count_tn7gb_88", ps = "_controls_tn7gb_103", gs = "_button_tn7gb_108", w = {
961
+ wrapper: ns,
962
+ subtitle: os,
963
+ content: cs,
964
+ range: is,
965
+ track: as,
966
+ progress: ls,
967
+ dots: rs,
968
+ dot: ds,
969
+ active: us,
970
+ input: _s,
971
+ countBlock: ms,
972
+ count: hs,
973
+ controls: ps,
974
+ button: gs
975
+ }, xs = (u) => {
976
+ const { label: n, min: s = 1, max: o = 4, step: i = 1, count: a, setCount: e } = u, [c, d] = p.useState(!1), k = Array.from({ length: (o - s) / i + 1 }), m = (a - s) / (o - s) * 100, f = () => {
977
+ a < o && e(a + i);
978
+ }, b = () => {
979
+ a > s && e(a - i);
980
+ }, $ = (r) => {
981
+ const g = s + r * i;
982
982
  e(g);
983
983
  };
984
- return /* @__PURE__ */ t.jsxs("div", { className: $.wrapper, children: [
985
- o && /* @__PURE__ */ t.jsx("h5", { className: $.subtitle, children: o }),
986
- /* @__PURE__ */ t.jsxs("div", { className: $.content, children: [
987
- /* @__PURE__ */ t.jsxs("div", { className: $.range, children: [
988
- /* @__PURE__ */ t.jsx("div", { className: $.track }),
984
+ return /* @__PURE__ */ t.jsxs("div", { className: w.wrapper, children: [
985
+ n && /* @__PURE__ */ t.jsx("h5", { className: w.subtitle, children: n }),
986
+ /* @__PURE__ */ t.jsxs("div", { className: w.content, children: [
987
+ /* @__PURE__ */ t.jsxs("div", { className: w.range, children: [
988
+ /* @__PURE__ */ t.jsx("div", { className: w.track }),
989
989
  /* @__PURE__ */ t.jsx(
990
990
  "div",
991
991
  {
992
- className: $.progress,
992
+ className: w.progress,
993
993
  style: { width: `${m}%` }
994
994
  }
995
995
  ),
996
- /* @__PURE__ */ t.jsx("div", { className: $.dots, children: k.map((b, g) => {
997
- const P = g <= (a - n) / i;
996
+ /* @__PURE__ */ t.jsx("div", { className: w.dots, children: k.map((r, g) => {
997
+ const B = g <= (a - s) / i;
998
998
  return /* @__PURE__ */ t.jsx(
999
999
  "button",
1000
1000
  {
1001
- onClick: () => w(g),
1002
- className: z($.dot, {
1003
- [$.active]: P,
1004
- [$.inactive]: !P,
1005
- [$.dragging]: s
1001
+ onClick: () => $(g),
1002
+ className: H(w.dot, {
1003
+ [w.active]: B,
1004
+ [w.inactive]: !B,
1005
+ [w.dragging]: c
1006
1006
  }),
1007
- "aria-label": `Set value to ${n + g * i}`
1007
+ "aria-label": `Set value to ${s + g * i}`
1008
1008
  },
1009
1009
  g
1010
1010
  );
@@ -1013,41 +1013,41 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
1013
1013
  "input",
1014
1014
  {
1015
1015
  type: "range",
1016
- min: n,
1017
- max: c,
1016
+ min: s,
1017
+ max: o,
1018
1018
  step: i,
1019
1019
  value: a,
1020
- onChange: (b) => e(Number(b.target.value)),
1021
- onMouseDown: () => r(!0),
1022
- onMouseUp: () => r(!1),
1023
- onTouchStart: () => r(!0),
1024
- onTouchEnd: () => r(!1),
1025
- className: $.input
1020
+ onChange: (r) => e(Number(r.target.value)),
1021
+ onMouseDown: () => d(!0),
1022
+ onMouseUp: () => d(!1),
1023
+ onTouchStart: () => d(!0),
1024
+ onTouchEnd: () => d(!1),
1025
+ className: w.input
1026
1026
  }
1027
1027
  )
1028
1028
  ] }),
1029
- /* @__PURE__ */ t.jsxs("div", { className: $.countBlock, children: [
1029
+ /* @__PURE__ */ t.jsxs("div", { className: w.countBlock, children: [
1030
1030
  /* @__PURE__ */ t.jsx(
1031
- F,
1031
+ V,
1032
1032
  {
1033
1033
  type: "number",
1034
- min: n,
1035
- max: c,
1034
+ min: s,
1035
+ max: o,
1036
1036
  paddingless: !0,
1037
- onChange: (b) => {
1038
- const g = Number(b);
1039
- g > c ? e(c) : g < n ? e(n) : e(g);
1037
+ onChange: (r) => {
1038
+ const g = Number(r);
1039
+ g > o ? e(o) : g < s ? e(s) : e(g);
1040
1040
  },
1041
1041
  value: String(a)
1042
1042
  }
1043
1043
  ),
1044
- /* @__PURE__ */ t.jsxs("div", { className: $.controls, children: [
1044
+ /* @__PURE__ */ t.jsxs("div", { className: w.controls, children: [
1045
1045
  /* @__PURE__ */ t.jsx(
1046
1046
  "button",
1047
1047
  {
1048
- onClick: v,
1049
- disabled: a >= c,
1050
- className: $.button,
1048
+ onClick: f,
1049
+ disabled: a >= o,
1050
+ className: w.button,
1051
1051
  "aria-label": "Increment count",
1052
1052
  children: /* @__PURE__ */ t.jsx(
1053
1053
  h,
@@ -1062,9 +1062,9 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
1062
1062
  /* @__PURE__ */ t.jsx(
1063
1063
  "button",
1064
1064
  {
1065
- onClick: u,
1066
- disabled: a <= n,
1067
- className: $.button,
1065
+ onClick: b,
1066
+ disabled: a <= s,
1067
+ className: w.button,
1068
1068
  "aria-label": "Decrement count",
1069
1069
  children: /* @__PURE__ */ t.jsx(
1070
1070
  h,
@@ -1080,42 +1080,42 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
1080
1080
  ] })
1081
1081
  ] })
1082
1082
  ] });
1083
- }, ps = "_subtitle_1nl8x_1", gs = "_header_1nl8x_8", xs = "_text_1nl8x_9", bs = "_productsBlock_1nl8x_10", fs = "_top_1nl8x_22", js = "_itemsBlock_1nl8x_29", vs = "_typeTexts_1nl8x_35", ks = "_block_1nl8x_41", ys = "_active_1nl8x_52", $s = "_products_1nl8x_10", Ns = "_product_1nl8x_10", ws = "_button_1nl8x_70", Is = "_image_1nl8x_80", Cs = "_info_1nl8x_87", Ps = "_name_1nl8x_98", Bs = "_buttons_1nl8x_102", Ts = "_modal_1nl8x_108", As = "_link_1nl8x_126", Ss = "_modalOptions_1nl8x_132", C = {
1084
- subtitle: ps,
1085
- header: gs,
1086
- text: xs,
1087
- productsBlock: bs,
1088
- top: fs,
1089
- itemsBlock: js,
1090
- typeTexts: vs,
1091
- block: ks,
1092
- active: ys,
1093
- products: $s,
1094
- product: Ns,
1095
- button: ws,
1096
- image: Is,
1097
- info: Cs,
1098
- name: Ps,
1099
- buttons: Bs,
1100
- modal: Ts,
1101
- link: As,
1102
- modalOptions: Ss
1103
- }, Os = (_) => {
1104
- const { activeItem: o, setActiveItem: n, popupPosition: c, setIsOpenModal: i } = _;
1083
+ }, bs = "_subtitle_1nl8x_1", fs = "_header_1nl8x_8", js = "_text_1nl8x_9", vs = "_productsBlock_1nl8x_10", ks = "_top_1nl8x_22", ys = "_itemsBlock_1nl8x_29", $s = "_typeTexts_1nl8x_35", Ns = "_block_1nl8x_41", ws = "_active_1nl8x_52", Cs = "_products_1nl8x_10", Is = "_product_1nl8x_10", Ps = "_button_1nl8x_70", Bs = "_image_1nl8x_80", Ts = "_info_1nl8x_87", As = "_name_1nl8x_98", Ss = "_buttons_1nl8x_102", Os = "_modal_1nl8x_108", Ds = "_link_1nl8x_126", Ls = "_modalOptions_1nl8x_132", P = {
1084
+ subtitle: bs,
1085
+ header: fs,
1086
+ text: js,
1087
+ productsBlock: vs,
1088
+ top: ks,
1089
+ itemsBlock: ys,
1090
+ typeTexts: $s,
1091
+ block: Ns,
1092
+ active: ws,
1093
+ products: Cs,
1094
+ product: Is,
1095
+ button: Ps,
1096
+ image: Bs,
1097
+ info: Ts,
1098
+ name: As,
1099
+ buttons: Ss,
1100
+ modal: Os,
1101
+ link: Ds,
1102
+ modalOptions: Ls
1103
+ }, qs = (u) => {
1104
+ const { activeItem: n, setActiveItem: s, popupPosition: o, setIsOpenModal: i } = u;
1105
1105
  return /* @__PURE__ */ t.jsxs(
1106
1106
  "div",
1107
1107
  {
1108
- className: C.modal,
1108
+ className: P.modal,
1109
1109
  onClick: (a) => {
1110
1110
  a.stopPropagation();
1111
1111
  },
1112
1112
  style: {
1113
- top: `${c.top}px`,
1114
- left: `${c.left}px`
1113
+ top: `${o.top}px`,
1114
+ left: `${o.left}px`
1115
1115
  },
1116
1116
  children: [
1117
- /* @__PURE__ */ t.jsxs("div", { className: C.top, children: [
1118
- /* @__PURE__ */ t.jsx("h3", { children: o.name }),
1117
+ /* @__PURE__ */ t.jsxs("div", { className: P.top, children: [
1118
+ /* @__PURE__ */ t.jsx("h3", { children: n.name }),
1119
1119
  /* @__PURE__ */ t.jsx(
1120
1120
  h,
1121
1121
  {
@@ -1124,100 +1124,100 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
1124
1124
  width: 20,
1125
1125
  hoverable: !0,
1126
1126
  onClick: () => {
1127
- i(!1), n(null);
1127
+ i(!1), s(null);
1128
1128
  }
1129
1129
  }
1130
1130
  )
1131
1131
  ] }),
1132
- /* @__PURE__ */ t.jsx("div", { className: C.modalOptions, children: /* @__PURE__ */ t.jsx(
1133
- ot,
1132
+ /* @__PURE__ */ t.jsx("div", { className: P.modalOptions, children: /* @__PURE__ */ t.jsx(
1133
+ ct,
1134
1134
  {
1135
1135
  label: "Put up an attractive image",
1136
1136
  onChange: (a) => {
1137
1137
  const e = {
1138
- ...o,
1138
+ ...n,
1139
1139
  images: a,
1140
1140
  imagePath: a[0]
1141
1141
  };
1142
- n(e);
1142
+ s(e);
1143
1143
  }
1144
1144
  }
1145
1145
  ) })
1146
1146
  ]
1147
1147
  }
1148
1148
  );
1149
- }, Ds = (_) => {
1150
- const { index: o, moveProduct: n, children: c } = _, [, i] = lt({
1149
+ }, Rs = (u) => {
1150
+ const { index: n, moveProduct: s, children: o } = u, [, i] = rt({
1151
1151
  accept: "product",
1152
- hover(s) {
1153
- s.index !== o && (n(s.index, o), s.index = o);
1152
+ hover(c) {
1153
+ c.index !== n && (s(c.index, n), c.index = n);
1154
1154
  }
1155
- }), [{ isDragging: a }, e] = rt({
1155
+ }), [{ isDragging: a }, e] = dt({
1156
1156
  type: "product",
1157
- item: { index: o },
1158
- collect: (s) => ({
1159
- isDragging: s.isDragging()
1157
+ item: { index: n },
1158
+ collect: (c) => ({
1159
+ isDragging: c.isDragging()
1160
1160
  })
1161
1161
  });
1162
1162
  return /* @__PURE__ */ t.jsx(
1163
1163
  "div",
1164
1164
  {
1165
- ref: (s) => e(i(s)),
1166
- className: `${C.product} ${a ? C.dragging : ""}`,
1167
- children: c
1165
+ ref: (c) => e(i(c)),
1166
+ className: `${P.product} ${a ? P.dragging : ""}`,
1167
+ children: o
1168
1168
  }
1169
1169
  );
1170
- }, an = (_) => {
1170
+ }, hn = (u) => {
1171
1171
  const {
1172
- isActiveItems: o,
1173
- setIsActiveItems: n,
1174
- items: c,
1172
+ isActiveItems: n,
1173
+ setIsActiveItems: s,
1174
+ items: o,
1175
1175
  setItems: i,
1176
1176
  other: a,
1177
1177
  title: e,
1178
- subtitle: s,
1179
- editable: r = !0,
1178
+ subtitle: c,
1179
+ editable: d = !0,
1180
1180
  draggable: k = !1,
1181
1181
  withImage: m = !1,
1182
- deletable: v = !0,
1183
- addable: u = !0,
1184
- itemsType: w,
1185
- itemsOptions: b
1186
- } = _, [g, P] = p.useState(null), [W, Z] = p.useState({
1182
+ deletable: f = !0,
1183
+ addable: b = !0,
1184
+ itemsType: $,
1185
+ itemsOptions: r
1186
+ } = u, [g, B] = p.useState(null), [X, Y] = p.useState({
1187
1187
  top: 0,
1188
1188
  left: 0
1189
- }), [G, A] = p.useState(!1), L = (d, f) => {
1190
- const B = [...c], [y] = B.splice(d, 1);
1191
- B.splice(f, 0, y), i(B);
1189
+ }), [y, S] = p.useState(!1), q = (_, j) => {
1190
+ const T = [...o], [N] = T.splice(_, 1);
1191
+ T.splice(j, 0, N), i(T);
1192
1192
  };
1193
1193
  p.useEffect(() => {
1194
- const d = () => {
1195
- P(null), A(!1);
1194
+ const _ = () => {
1195
+ B(null), S(!1);
1196
1196
  };
1197
- return document.body.addEventListener("click", d), P(null), A(!1), () => {
1198
- P(null), A(!1), document.body.removeEventListener("click", d);
1197
+ return document.body.addEventListener("click", _), B(null), S(!1), () => {
1198
+ B(null), S(!1), document.body.removeEventListener("click", _);
1199
1199
  };
1200
1200
  }, []), p.useEffect(() => {
1201
1201
  if (g) {
1202
- const d = [...c].map((f) => f.id === g.id ? g : f);
1203
- i(d);
1202
+ const _ = [...o].map((j) => j.id === g.id ? g : j);
1203
+ i(_);
1204
1204
  }
1205
1205
  }, [g]);
1206
- const q = (d, f) => {
1207
- d.stopPropagation();
1208
- const B = d.target.getBoundingClientRect(), y = 100, H = window.innerHeight;
1209
- let S = B.top + window.scrollY;
1210
- S + y > H && (S = H - y - 20), A(!0), Z({
1211
- top: S - 80,
1212
- left: B.left - 30
1213
- }), P(f);
1206
+ const R = (_, j) => {
1207
+ _.stopPropagation();
1208
+ const T = _.target.getBoundingClientRect(), N = 100, U = window.innerHeight;
1209
+ let O = T.top + window.scrollY;
1210
+ O + N > U && (O = U - N - 20), S(!0), Y({
1211
+ top: O - 80,
1212
+ left: T.left - 30
1213
+ }), B(j);
1214
1214
  };
1215
- function et(d) {
1215
+ function st(_) {
1216
1216
  if (m)
1217
- return d ? /* @__PURE__ */ t.jsx(
1217
+ return _ ? /* @__PURE__ */ t.jsx(
1218
1218
  "img",
1219
1219
  {
1220
- src: `https://imagedelivery.net/${d}/w=1000`,
1220
+ src: `https://imagedelivery.net/${_}/w=1000`,
1221
1221
  alt: "image",
1222
1222
  width: 16,
1223
1223
  height: 16
@@ -1232,8 +1232,8 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
1232
1232
  }
1233
1233
  );
1234
1234
  }
1235
- const tt = (d, f) => {
1236
- const B = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1235
+ const et = (_, j) => {
1236
+ const T = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1237
1237
  k && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1238
1238
  h,
1239
1239
  {
@@ -1243,45 +1243,45 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
1243
1243
  height: 20
1244
1244
  }
1245
1245
  ) }),
1246
- w === "select" && /* @__PURE__ */ t.jsx(
1247
- V,
1246
+ $ === "select" && /* @__PURE__ */ t.jsx(
1247
+ G,
1248
1248
  {
1249
- onChange: (y) => {
1250
- const H = [...c], S = Number(y.split(" ")[1]), l = b.find((j) => j.id === S);
1249
+ onChange: (N) => {
1250
+ const U = [...o], O = Number(N.split(" ")[1]), l = r.find((v) => v.id === O);
1251
1251
  if (!l) return;
1252
1252
  const I = {
1253
1253
  ...l.productData.stats,
1254
1254
  newPrice: l.productData.minPrice.amount,
1255
1255
  oldPrice: l.productData.compareAtPrice.amount
1256
- }, T = H.map((j) => j.id === d.id ? {
1257
- ...d,
1258
- name: y,
1259
- listingId: S,
1256
+ }, A = U.map((v) => v.id === _.id ? {
1257
+ ..._,
1258
+ name: N,
1259
+ listingId: O,
1260
1260
  stats: I
1261
- } : j);
1262
- P({
1263
- ...d,
1264
- name: y,
1265
- listingId: S
1266
- }), i([...T]);
1261
+ } : v);
1262
+ B({
1263
+ ..._,
1264
+ name: N,
1265
+ listingId: O
1266
+ }), i([...A]);
1267
1267
  },
1268
- value: d.name,
1269
- options: [...b.map((y) => `Product ${y.id}`)],
1270
- leftAddon: et(d.images[0])
1268
+ value: _.name,
1269
+ options: [...r.map((N) => `Product ${N.id}`)],
1270
+ leftAddon: st(_.images[0])
1271
1271
  }
1272
1272
  ),
1273
- /* @__PURE__ */ t.jsxs("div", { className: C.buttons, children: [
1274
- r && /* @__PURE__ */ t.jsx(
1273
+ /* @__PURE__ */ t.jsxs("div", { className: P.buttons, children: [
1274
+ d && /* @__PURE__ */ t.jsx(
1275
1275
  h,
1276
1276
  {
1277
1277
  name: "Sliders",
1278
1278
  hoverable: !0,
1279
1279
  width: 20,
1280
1280
  height: 20,
1281
- onClick: (y) => q(y, d)
1281
+ onClick: (N) => R(N, _)
1282
1282
  }
1283
1283
  ),
1284
- v && /* @__PURE__ */ t.jsx(
1284
+ f && /* @__PURE__ */ t.jsx(
1285
1285
  h,
1286
1286
  {
1287
1287
  name: "Trash",
@@ -1289,71 +1289,71 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
1289
1289
  width: 20,
1290
1290
  height: 20,
1291
1291
  fill: "#C12A2A",
1292
- onClick: () => i(c.filter((y) => y.id !== d.id))
1292
+ onClick: () => i(o.filter((N) => N.id !== _.id))
1293
1293
  }
1294
1294
  )
1295
1295
  ] })
1296
1296
  ] });
1297
1297
  return k ? /* @__PURE__ */ t.jsx(
1298
- Ds,
1298
+ Rs,
1299
1299
  {
1300
- product: d,
1301
- index: f,
1302
- moveProduct: L,
1303
- children: B
1300
+ product: _,
1301
+ index: j,
1302
+ moveProduct: q,
1303
+ children: T
1304
1304
  },
1305
- d.id
1305
+ _.id
1306
1306
  ) : /* @__PURE__ */ t.jsx(
1307
1307
  "div",
1308
1308
  {
1309
- className: C.product,
1310
- children: B
1309
+ className: P.product,
1310
+ children: T
1311
1311
  },
1312
- d.id
1312
+ _.id
1313
1313
  );
1314
1314
  };
1315
- return /* @__PURE__ */ t.jsxs("div", { className: C.productsBlock, children: [
1316
- (e || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: C.top, children: [
1317
- e && /* @__PURE__ */ t.jsx("h3", { className: C.title, children: e }),
1318
- o !== void 0 && /* @__PURE__ */ t.jsx(
1319
- R,
1315
+ return /* @__PURE__ */ t.jsxs("div", { className: P.productsBlock, children: [
1316
+ (e || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: P.top, children: [
1317
+ e && /* @__PURE__ */ t.jsx("h3", { className: P.title, children: e }),
1318
+ n !== void 0 && /* @__PURE__ */ t.jsx(
1319
+ z,
1320
1320
  {
1321
- current: o,
1322
- onChange: (d) => n == null ? void 0 : n(d)
1321
+ current: n,
1322
+ onChange: (_) => s == null ? void 0 : s(_)
1323
1323
  }
1324
1324
  )
1325
1325
  ] }),
1326
- G && g && /* @__PURE__ */ t.jsx(
1327
- Os,
1326
+ y && g && /* @__PURE__ */ t.jsx(
1327
+ qs,
1328
1328
  {
1329
1329
  activeItem: g,
1330
- setActiveItem: P,
1331
- setIsOpenModal: A,
1332
- popupPosition: W
1330
+ setActiveItem: B,
1331
+ setIsOpenModal: S,
1332
+ popupPosition: X
1333
1333
  }
1334
1334
  ),
1335
- /* @__PURE__ */ t.jsxs("div", { className: C.products, children: [
1336
- s && /* @__PURE__ */ t.jsx("h5", { className: C.subtitle, children: s }),
1337
- k ? /* @__PURE__ */ t.jsx(it, { backend: at, children: c.map((d, f) => tt(d, f)) }) : c.map((d, f) => tt(d, f)),
1338
- u && /* @__PURE__ */ t.jsxs(
1339
- Q,
1335
+ /* @__PURE__ */ t.jsxs("div", { className: P.products, children: [
1336
+ c && /* @__PURE__ */ t.jsx("h5", { className: P.subtitle, children: c }),
1337
+ k ? /* @__PURE__ */ t.jsx(at, { backend: lt, children: o.map((_, j) => et(_, j)) }) : o.map((_, j) => et(_, j)),
1338
+ b && /* @__PURE__ */ t.jsxs(
1339
+ tt,
1340
1340
  {
1341
- className: C.button,
1341
+ className: P.button,
1342
1342
  size: "s",
1343
1343
  onClick: () => {
1344
- const d = [...c], f = b[0].id;
1345
- d.push({
1346
- name: `Product ${f}`,
1347
- id: K(),
1348
- listingId: f,
1344
+ const _ = [...o], j = r[0].id;
1345
+ _.push({
1346
+ name: `Product ${j}`,
1347
+ id: Z(),
1348
+ listingId: j,
1349
1349
  imagePath: "",
1350
1350
  images: [],
1351
1351
  stats: {
1352
- ...b[0].productData.stats,
1353
- newPrice: b[0].productData.minPrice.amount,
1354
- oldPrice: b[0].productData.compareAtPrice.amount
1352
+ ...r[0].productData.stats,
1353
+ newPrice: r[0].productData.minPrice.amount,
1354
+ oldPrice: r[0].productData.compareAtPrice.amount
1355
1355
  }
1356
- }), i(d);
1356
+ }), i(_);
1357
1357
  },
1358
1358
  children: [
1359
1359
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
@@ -1369,64 +1369,79 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
1369
1369
  }
1370
1370
  )
1371
1371
  ] }),
1372
- a !== void 0 && /* @__PURE__ */ t.jsx(ut, { items: a })
1372
+ a !== void 0 && /* @__PURE__ */ t.jsx(mt, { items: a })
1373
1373
  ] });
1374
- }, Ls = "_options_163bj_1", qs = "_price_163bj_12", Ms = "_oldPrice_163bj_18", Rs = "_newPrice_163bj_26", Hs = "_meta_163bj_33", Es = "_info_163bj_39", zs = "_infoRight_163bj_46", Fs = "_buttons_163bj_52", Vs = "_variants_163bj_59", Gs = "_variant_163bj_59", Us = "_stock_163bj_74", Xs = "_variantInfo_163bj_81", Ys = "_quantity_163bj_87", Js = "_count_163bj_93", Ks = "_button_163bj_52", Qs = "_activeVariant_163bj_110", Ws = "_chargeTypes_163bj_114", Zs = "_charge_163bj_114", tn = "_chargeActive_163bj_131", x = {
1375
- options: Ls,
1376
- price: qs,
1377
- oldPrice: Ms,
1378
- newPrice: Rs,
1379
- meta: Hs,
1380
- info: Es,
1381
- infoRight: zs,
1382
- buttons: Fs,
1383
- variants: Vs,
1384
- variant: Gs,
1385
- stock: Us,
1386
- variantInfo: Xs,
1387
- quantity: Ys,
1388
- count: Js,
1389
- button: Ks,
1390
- activeVariant: Qs,
1391
- chargeTypes: Ws,
1392
- charge: Zs,
1393
- chargeActive: tn
1394
- }, ln = (_) => {
1395
- const { variants: o } = _, [n, c] = p.useState(o[0]), [i, a] = p.useState(1);
1396
- function e(s) {
1397
- if (s >= 864e5) {
1398
- const u = Math.floor(s / 864e5);
1399
- return `${u} ${u === 1 ? "day" : "days"}`;
1400
- } else if (s >= 36e5) {
1401
- const u = Math.floor(s / 36e5);
1402
- return `${u} ${u === 1 ? "hour" : "hours"}`;
1403
- } else if (s >= 6e4) {
1404
- const u = Math.floor(s / 6e4);
1405
- return `${u} ${u === 1 ? "minute" : "minutes"}`;
1374
+ }, Ms = "_options_163bj_1", Hs = "_price_163bj_12", Es = "_oldPrice_163bj_18", zs = "_newPrice_163bj_26", Us = "_meta_163bj_33", Fs = "_info_163bj_39", Vs = "_infoRight_163bj_46", Gs = "_buttons_163bj_52", Xs = "_variants_163bj_59", Ys = "_variant_163bj_59", Js = "_stock_163bj_74", Ks = "_variantInfo_163bj_81", Qs = "_quantity_163bj_87", Ws = "_count_163bj_93", Zs = "_button_163bj_52", tn = "_activeVariant_163bj_110", en = "_chargeTypes_163bj_114", sn = "_charge_163bj_114", nn = "_chargeActive_163bj_131", x = {
1375
+ options: Ms,
1376
+ price: Hs,
1377
+ oldPrice: Es,
1378
+ newPrice: zs,
1379
+ meta: Us,
1380
+ info: Fs,
1381
+ infoRight: Vs,
1382
+ buttons: Gs,
1383
+ variants: Xs,
1384
+ variant: Ys,
1385
+ stock: Js,
1386
+ variantInfo: Ks,
1387
+ quantity: Qs,
1388
+ count: Ws,
1389
+ button: Zs,
1390
+ activeVariant: tn,
1391
+ chargeTypes: en,
1392
+ charge: sn,
1393
+ chargeActive: nn
1394
+ }, pn = (u) => {
1395
+ const { variants: n } = u, [s, o] = p.useState(n[0]), i = ut(), [a, e] = p.useState(1), { reset: c, addProductToCart: d, cart: k, getPages: m } = ht();
1396
+ function f() {
1397
+ if (k.parts.length === 0) {
1398
+ const r = encodeURIComponent("product/subscription-test");
1399
+ m(r).then(() => {
1400
+ console.log(u.id, s.id, a), d({
1401
+ productId: u.id,
1402
+ productVariantId: s.id,
1403
+ quantity: a
1404
+ });
1405
+ });
1406
+ }
1407
+ }
1408
+ function b() {
1409
+ c(), f(), i("/checkout");
1410
+ }
1411
+ function $(r) {
1412
+ if (r >= 864e5) {
1413
+ const y = Math.floor(r / 864e5);
1414
+ return `${y} ${y === 1 ? "day" : "days"}`;
1415
+ } else if (r >= 36e5) {
1416
+ const y = Math.floor(r / 36e5);
1417
+ return `${y} ${y === 1 ? "hour" : "hours"}`;
1418
+ } else if (r >= 6e4) {
1419
+ const y = Math.floor(r / 6e4);
1420
+ return `${y} ${y === 1 ? "minute" : "minutes"}`;
1406
1421
  } else {
1407
- const u = Math.floor(s / 1e3);
1408
- return `${u} ${u === 1 ? "second" : "seconds"}`;
1422
+ const y = Math.floor(r / 1e3);
1423
+ return `${y} ${y === 1 ? "second" : "seconds"}`;
1409
1424
  }
1410
1425
  }
1411
1426
  return /* @__PURE__ */ t.jsxs("div", { className: x.options, children: [
1412
- /* @__PURE__ */ t.jsx("div", { className: x.chargeTypes, children: n.chargeTypes ? n.chargeTypes.map((s) => /* @__PURE__ */ t.jsx("div", { children: s })) : /* @__PURE__ */ t.jsx("div", { className: z(x.charge, x.chargeActive), children: "One-Time" }) }),
1413
- /* @__PURE__ */ t.jsx("div", { className: x.variants, children: o.map((s) => /* @__PURE__ */ t.jsxs(
1427
+ /* @__PURE__ */ t.jsx("div", { className: x.chargeTypes, children: s.chargeTypes ? s.chargeTypes.map((r) => /* @__PURE__ */ t.jsx("div", { children: r })) : /* @__PURE__ */ t.jsx("div", { className: H(x.charge, x.chargeActive), children: "One-Time" }) }),
1428
+ /* @__PURE__ */ t.jsx("div", { className: x.variants, children: n.map((r) => /* @__PURE__ */ t.jsxs(
1414
1429
  "div",
1415
1430
  {
1416
- className: z(x.variant, {
1417
- [x.activeVariant]: n.id === s.id
1431
+ className: H(x.variant, {
1432
+ [x.activeVariant]: s.id === r.id
1418
1433
  }),
1419
- onClick: () => c(s),
1434
+ onClick: () => o(r),
1420
1435
  children: [
1421
1436
  /* @__PURE__ */ t.jsxs("div", { className: x.variantInfo, children: [
1422
- /* @__PURE__ */ t.jsx("span", { className: x.title, children: s.name }),
1437
+ /* @__PURE__ */ t.jsx("span", { className: x.title, children: r.name }),
1423
1438
  /* @__PURE__ */ t.jsxs("span", { children: [
1424
1439
  "$",
1425
- s.price.amount
1440
+ r.price.amount
1426
1441
  ] })
1427
1442
  ] }),
1428
1443
  /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsxs("span", { className: x.stock, children: [
1429
- s.quantity.restrictions.max || 0,
1444
+ r.quantity.restrictions.max || 0,
1430
1445
  " in stock"
1431
1446
  ] }) })
1432
1447
  ]
@@ -1437,17 +1452,17 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
1437
1452
  "div",
1438
1453
  {
1439
1454
  onClick: () => {
1440
- i > 0 ? a((s) => s - 1) : a(0);
1455
+ a > 1 ? e((r) => r - 1) : e(1);
1441
1456
  },
1442
1457
  className: x.button,
1443
1458
  children: /* @__PURE__ */ t.jsx(h, { name: "Minus" })
1444
1459
  }
1445
1460
  ),
1446
- /* @__PURE__ */ t.jsx("div", { className: x.count, children: i }),
1461
+ /* @__PURE__ */ t.jsx("div", { className: x.count, children: a }),
1447
1462
  /* @__PURE__ */ t.jsx(
1448
1463
  "div",
1449
1464
  {
1450
- onClick: () => a((s) => s + 1),
1465
+ onClick: () => e((r) => r + 1),
1451
1466
  className: x.button,
1452
1467
  children: /* @__PURE__ */ t.jsx(h, { name: "Plus" })
1453
1468
  }
@@ -1466,57 +1481,107 @@ const _t = "_accordion_2tiiw_1", mt = "_header_2tiiw_9", ht = "_icon_2tiiw_16",
1466
1481
  height: 20
1467
1482
  }
1468
1483
  ),
1469
- /* @__PURE__ */ t.jsx("span", { children: n.deliveryTime === 0 ? "Instant" : e(n.deliveryTime) })
1484
+ /* @__PURE__ */ t.jsx("span", { children: s.deliveryTime === 0 ? "Instant" : $(s.deliveryTime) })
1470
1485
  ] })
1471
1486
  ] }),
1472
1487
  /* @__PURE__ */ t.jsxs("div", { className: x.info, children: [
1473
1488
  /* @__PURE__ */ t.jsx("span", { children: "Price" }),
1474
- /* @__PURE__ */ t.jsx("div", { className: x.infoRight, children: n.compareAtPrice && (n.compareAtPrice.amount || 0) - (n.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: x.price, children: [
1489
+ /* @__PURE__ */ t.jsx("div", { className: x.infoRight, children: s.compareAtPrice && (s.compareAtPrice.amount || 0) - (s.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: x.price, children: [
1475
1490
  /* @__PURE__ */ t.jsxs("span", { className: x.newPrice, children: [
1476
1491
  "$ ",
1477
- (n.price.amount || 0) * i
1492
+ (s.price.amount || 0) * a
1478
1493
  ] }),
1479
1494
  /* @__PURE__ */ t.jsxs("span", { className: x.oldPrice, children: [
1480
1495
  "$ ",
1481
- (n.compareAtPrice.amount || 0) * i
1496
+ (s.compareAtPrice.amount || 0) * a
1482
1497
  ] })
1483
1498
  ] }) : /* @__PURE__ */ t.jsxs("span", { className: x.newPrice, children: [
1484
1499
  "$ ",
1485
- (n.price.amount || 0) * i
1500
+ (s.price.amount || 0) * a
1486
1501
  ] }) })
1487
1502
  ] })
1488
1503
  ] }),
1489
1504
  /* @__PURE__ */ t.jsxs("div", { className: x.buttons, children: [
1490
- /* @__PURE__ */ t.jsx(Q, { type: "Primary", children: "Buy Now" }),
1491
- /* @__PURE__ */ t.jsx(Q, { type: "Secondary", children: "Add to Cart" })
1505
+ /* @__PURE__ */ t.jsx(
1506
+ tt,
1507
+ {
1508
+ type: "Primary",
1509
+ onClick: () => b(),
1510
+ children: "Buy Now"
1511
+ }
1512
+ ),
1513
+ /* @__PURE__ */ t.jsx(
1514
+ tt,
1515
+ {
1516
+ type: "Secondary",
1517
+ onClick: () => f(),
1518
+ children: "Add to Cart"
1519
+ }
1520
+ )
1492
1521
  ] })
1493
1522
  ] });
1523
+ }, on = "_button_pstfl_1", cn = "_login_pstfl_11", an = "_signUp_pstfl_15", ln = "_buttons_pstfl_20", E = {
1524
+ button: on,
1525
+ login: cn,
1526
+ signUp: an,
1527
+ buttons: ln
1528
+ }, gn = (u) => {
1529
+ const { shopping: n, signUp: s } = u, o = ut();
1530
+ function i(a) {
1531
+ o(a);
1532
+ }
1533
+ return /* @__PURE__ */ t.jsxs("div", { className: E.buttons, children: [
1534
+ n && /* @__PURE__ */ t.jsx("div", { className: E.button, children: /* @__PURE__ */ t.jsx(
1535
+ h,
1536
+ {
1537
+ name: "Handbag",
1538
+ fill: "#252525"
1539
+ }
1540
+ ) }),
1541
+ /* @__PURE__ */ t.jsx(
1542
+ "div",
1543
+ {
1544
+ className: H(E.button, E.login),
1545
+ onClick: () => i("/customer-dash"),
1546
+ children: "Login"
1547
+ }
1548
+ ),
1549
+ s && /* @__PURE__ */ t.jsx(
1550
+ "div",
1551
+ {
1552
+ className: H(E.button, E.login, E.signUp),
1553
+ onClick: () => i("/customer-dash"),
1554
+ children: "Sign Up"
1555
+ }
1556
+ )
1557
+ ] });
1494
1558
  };
1495
1559
  export {
1496
- nn as Accordion,
1497
- Q as Button,
1498
- Ze as ButtonTypeSettings,
1499
- cn as ButtonsSettings,
1500
- un as Checkbox,
1501
- ot as ChooseImage,
1502
- _n as ChooseImageModal,
1503
- mn as ColorPicker,
1560
+ un as Accordion,
1561
+ tt as Button,
1562
+ ss as ButtonTypeSettings,
1563
+ mn as ButtonsSettings,
1564
+ fn as Checkbox,
1565
+ ct as ChooseImage,
1566
+ jn as ChooseImageModal,
1567
+ vn as ColorPicker,
1568
+ gn as HeaderButtons,
1504
1569
  h as Icon,
1505
- F as Input,
1506
- ue as ItemsSettings,
1507
- on as LayoutSettings,
1508
- an as ListingSelector,
1509
- hn as Loader,
1510
- pn as Modal,
1511
- gn as Picker,
1512
- ln as ProductOptions,
1513
- xn as Radio,
1514
- hs as RangeSelector,
1515
- V as Select,
1516
- bn as Submodal,
1517
- R as Switch,
1518
- Rt as TextSettings,
1519
- ct as Textarea,
1520
- fn as Tip,
1521
- dt as TypesText
1570
+ V as Input,
1571
+ he as ItemsSettings,
1572
+ _n as LayoutSettings,
1573
+ hn as ListingSelector,
1574
+ kn as Loader,
1575
+ yn as Modal,
1576
+ $n as Picker,
1577
+ pn as ProductOptions,
1578
+ Nn as Radio,
1579
+ xs as RangeSelector,
1580
+ G as Select,
1581
+ wn as Submodal,
1582
+ z as Switch,
1583
+ zt as TextSettings,
1584
+ it as Textarea,
1585
+ Cn as Tip,
1586
+ _t as TypesText
1522
1587
  };