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