@billgangcom/theme-lib 1.26.0 → 1.27.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.
Files changed (111) hide show
  1. package/dist/App.d.ts +1 -1
  2. package/dist/abstractions/Variable.d.ts +4 -1
  3. package/dist/{components → builder/components}/Sidebar/AddSections/RenderBlockSettings/settings.d.ts +1 -1
  4. package/dist/{constants → builder/constants}/blocks.d.ts +1 -1
  5. package/dist/{store → builder/store}/useBlocksStore.d.ts +1 -1
  6. package/dist/{store → builder/store}/useDeviceStore.d.ts +1 -1
  7. package/dist/{store → builder/store}/useLayersStore.d.ts +1 -1
  8. package/dist/{store → builder/store}/useLayoutStore.d.ts +1 -1
  9. package/dist/{store → builder/store}/useNavbarStore.d.ts +1 -1
  10. package/dist/{store → builder/store}/useNotificationStore.d.ts +1 -1
  11. package/dist/{store → builder/store}/usePagesStore.d.ts +2 -2
  12. package/dist/{store → builder/store}/useSettingsStore.d.ts +1 -1
  13. package/dist/{store → builder/store}/useThemeSettingsStore.d.ts +1 -1
  14. package/dist/{shared → builder}/ui/Icon/index.d.ts +1 -1
  15. package/dist/{shared → builder}/ui/Picker/index.d.ts +1 -1
  16. package/dist/builder/ui/index.d.ts +6 -0
  17. package/dist/{shared/lib → builder/utils}/api.d.ts +9 -25
  18. package/dist/builder/utils/index.d.ts +2 -0
  19. package/dist/builder.cjs.js +8 -8
  20. package/dist/builder.es.js +1274 -1060
  21. package/dist/{index-CeRgFjoD.js → index-BJq5RiR5.js} +10036 -10260
  22. package/dist/index-BlxXgV9a.cjs +146 -0
  23. package/dist/lib/api.d.ts +16 -0
  24. package/dist/{shared/lib → lib}/index.d.ts +0 -1
  25. package/dist/ui/Button/index.d.ts +13 -0
  26. package/dist/ui/ButtonsSettings/index.d.ts +1 -1
  27. package/dist/ui/Input/index.d.ts +21 -0
  28. package/dist/ui/ListingSelector/index.d.ts +8 -3
  29. package/dist/ui/ListingSelector/popup.d.ts +11 -4
  30. package/dist/ui/Textarea/index.d.ts +11 -0
  31. package/dist/ui/index.d.ts +7 -2
  32. package/dist/ui.cjs.js +1 -1
  33. package/dist/ui.es.js +1038 -880
  34. package/package.json +1 -1
  35. package/dist/index-ChU5WGPr.cjs +0 -146
  36. package/dist/shared/ui/index.d.ts +0 -16
  37. /package/dist/{components → builder/components}/Header/Buttons/index.d.ts +0 -0
  38. /package/dist/{components → builder/components}/Header/Devices/index.d.ts +0 -0
  39. /package/dist/{components → builder/components}/Header/PreviewButton/index.d.ts +0 -0
  40. /package/dist/{components → builder/components}/Header/Settings/Language/index.d.ts +0 -0
  41. /package/dist/{components → builder/components}/Header/Settings/Pages/ModifyPage/index.d.ts +0 -0
  42. /package/dist/{components → builder/components}/Header/Settings/Pages/index.d.ts +0 -0
  43. /package/dist/{components → builder/components}/Header/Settings/Zoom/index.d.ts +0 -0
  44. /package/dist/{components → builder/components}/Header/Settings/index.d.ts +0 -0
  45. /package/dist/{components → builder/components}/Header/SwitchTheme/index.d.ts +0 -0
  46. /package/dist/{components → builder/components}/Header/index.d.ts +0 -0
  47. /package/dist/{components → builder/components}/Navbar/ExitButton/index.d.ts +0 -0
  48. /package/dist/{components → builder/components}/Navbar/index.d.ts +0 -0
  49. /package/dist/{components → builder/components}/Preview/PreviewBlockSidebar/index.d.ts +0 -0
  50. /package/dist/{components → builder/components}/Preview/PreviewContent/index.d.ts +0 -0
  51. /package/dist/{components → builder/components}/Preview/PreviewHeader/index.d.ts +0 -0
  52. /package/dist/{components → builder/components}/Preview/Render/index.d.ts +0 -0
  53. /package/dist/{components → builder/components}/Preview/index.d.ts +0 -0
  54. /package/dist/{components → builder/components}/Sidebar/AddSections/RenderBlockSettings/index.d.ts +0 -0
  55. /package/dist/{components → builder/components}/Sidebar/AddSections/SearchSections/index.d.ts +0 -0
  56. /package/dist/{components → builder/components}/Sidebar/AddSections/index.d.ts +0 -0
  57. /package/dist/{components → builder/components}/Sidebar/Layers/FooterLayer/index.d.ts +0 -0
  58. /package/dist/{components → builder/components}/Sidebar/Layers/HeaderLayer/index.d.ts +0 -0
  59. /package/dist/{components → builder/components}/Sidebar/Layers/index.d.ts +0 -0
  60. /package/dist/{components → builder/components}/Sidebar/Settings/index.d.ts +0 -0
  61. /package/dist/{components → builder/components}/Sidebar/Theme/ThemeSettings/Colors/index.d.ts +0 -0
  62. /package/dist/{components → builder/components}/Sidebar/Theme/ThemeSettings/Fonts/index.d.ts +0 -0
  63. /package/dist/{components → builder/components}/Sidebar/Theme/ThemeSettings/Inputs/index.d.ts +0 -0
  64. /package/dist/{components → builder/components}/Sidebar/Theme/ThemeSettings/Item/Border/index.d.ts +0 -0
  65. /package/dist/{components → builder/components}/Sidebar/Theme/ThemeSettings/Item/Button/index.d.ts +0 -0
  66. /package/dist/{components → builder/components}/Sidebar/Theme/ThemeSettings/Item/Font/index.d.ts +0 -0
  67. /package/dist/{components → builder/components}/Sidebar/Theme/ThemeSettings/Item/index.d.ts +0 -0
  68. /package/dist/{components → builder/components}/Sidebar/Theme/ThemeSettings/index.d.ts +0 -0
  69. /package/dist/{components → builder/components}/Sidebar/Theme/index.d.ts +0 -0
  70. /package/dist/{components → builder/components}/Sidebar/index.d.ts +0 -0
  71. /package/dist/{components → builder/components}/index.d.ts +0 -0
  72. /package/dist/{components → builder/components}/layout.d.ts +0 -0
  73. /package/dist/{constants → builder/constants}/api.d.ts +0 -0
  74. /package/dist/{constants → builder/constants}/device.d.ts +0 -0
  75. /package/dist/{constants → builder/constants}/font.d.ts +0 -0
  76. /package/dist/{constants → builder/constants}/icon.d.ts +0 -0
  77. /package/dist/{constants → builder/constants}/index.d.ts +0 -0
  78. /package/dist/{constants → builder/constants}/navbar.d.ts +0 -0
  79. /package/dist/{constants → builder/constants}/notification.d.ts +0 -0
  80. /package/dist/{constants → builder/constants}/pages.d.ts +0 -0
  81. /package/dist/{constants → builder/constants}/theme-settings.d.ts +0 -0
  82. /package/dist/{store → builder/store}/index.d.ts +0 -0
  83. /package/dist/{store → builder/store}/useChooseImageStore.d.ts +0 -0
  84. /package/dist/{store → builder/store}/useColorPickerStore.d.ts +0 -0
  85. /package/dist/{store → builder/store}/useFontsStore.d.ts +0 -0
  86. /package/dist/{store → builder/store}/useHistoryState.d.ts +0 -0
  87. /package/dist/{store → builder/store}/usePreviewStore.d.ts +0 -0
  88. /package/dist/{store → builder/store}/useShareLinkStore.d.ts +0 -0
  89. /package/dist/{store → builder/store}/useSubmodalStore.d.ts +0 -0
  90. /package/dist/{shared → builder}/ui/Button/index.d.ts +0 -0
  91. /package/dist/{ui → builder/ui}/ChooseImage/index.d.ts +0 -0
  92. /package/dist/{shared → builder}/ui/ColorPicker/index.d.ts +0 -0
  93. /package/dist/{shared → builder}/ui/ColorPicker/modal.d.ts +0 -0
  94. /package/dist/{shared → builder}/ui/ErrorableBlock/index.d.ts +0 -0
  95. /package/dist/{shared → builder}/ui/Input/index.d.ts +0 -0
  96. /package/dist/{shared → builder}/ui/Loader/index.d.ts +0 -0
  97. /package/dist/{shared → builder}/ui/Modal/index.d.ts +0 -0
  98. /package/dist/{shared → builder}/ui/Radio/index.d.ts +0 -0
  99. /package/dist/{shared → builder}/ui/Select/index.d.ts +0 -0
  100. /package/dist/{shared → builder}/ui/Submodal/index.d.ts +0 -0
  101. /package/dist/{shared → builder}/ui/Switch/index.d.ts +0 -0
  102. /package/dist/{shared → builder}/ui/Textarea/index.d.ts +0 -0
  103. /package/dist/{shared → builder}/ui/Tip/index.d.ts +0 -0
  104. /package/dist/{shared/lib → builder/utils}/formatLabel.d.ts +0 -0
  105. /package/dist/{shared/lib → lib}/checkAuth.d.ts +0 -0
  106. /package/dist/{shared/lib → lib}/clearQueryParams.d.ts +0 -0
  107. /package/dist/{shared/lib → lib}/generateDynamicStyles.d.ts +0 -0
  108. /package/dist/{shared/lib → lib}/getDynamicRoutes.d.ts +0 -0
  109. /package/dist/{shared/lib → lib}/injectStylesToDOM.d.ts +0 -0
  110. /package/dist/{shared/ui → ui}/Accordion/index.d.ts +0 -0
  111. /package/dist/{shared/ui → ui}/Checkbox/index.d.ts +0 -0
package/dist/ui.es.js CHANGED
@@ -1,53 +1,19 @@
1
- import { j as t, c as D, I as p, a as G, S as H, T as dt, C as it, b as W, D as ut, H as _t, B as X, v as et, u as mt, d as pt, e as at, f as lt, M as ht, g as gt } from "./index-CeRgFjoD.js";
2
- import { l as dc, m as uc, i as _c, E as mc, L as pc, P as hc, R as gc, h as xc, k as fc } from "./index-CeRgFjoD.js";
3
- import f from "react";
4
- const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18", yt = "_open_9e4oa_21", Nt = "_content_9e4oa_25", K = {
5
- accordion: jt,
6
- header: vt,
7
- icon: kt,
8
- open: yt,
9
- content: Nt
10
- }, ec = ({ title: d, content: n }) => {
11
- const [e, o] = f.useState(!1), [c, l] = f.useState(0), s = f.useRef(null), i = () => {
12
- o(!e);
13
- };
14
- return f.useEffect(() => {
15
- s.current && l(e ? s.current.scrollHeight : 0);
16
- }, [e]), /* @__PURE__ */ t.jsxs("div", { className: K.accordion, children: [
17
- /* @__PURE__ */ t.jsxs(
18
- "div",
19
- {
20
- className: K.header,
21
- onClick: i,
22
- children: [
23
- /* @__PURE__ */ t.jsx("h3", { children: d }),
24
- /* @__PURE__ */ t.jsx("div", { className: D(K.icon, { [K.open]: e }), children: /* @__PURE__ */ t.jsx(p, { name: "CaretDown" }) })
25
- ]
26
- }
27
- ),
28
- /* @__PURE__ */ t.jsx(
29
- "div",
30
- {
31
- ref: s,
32
- className: K.content,
33
- style: { height: `${c}px` },
34
- children: /* @__PURE__ */ t.jsx("p", { children: n })
35
- }
36
- )
37
- ] });
38
- }, $t = "_wrapper_9rr5j_2", Ct = "_alignmentBlock_9rr5j_8", It = "_title_9rr5j_15", Pt = "_subtitle_9rr5j_22", Tt = "_alignmentContent_9rr5j_29", wt = "_alignments_9rr5j_37", Bt = "_alignment_9rr5j_8", St = "_circle_9rr5j_58", qt = "_paddings_9rr5j_65", At = "_padding_9rr5j_65", Ot = "_input_9rr5j_84", O = {
39
- wrapper: $t,
40
- alignmentBlock: Ct,
1
+ import { j as t, I as p, a as Y, c as q, S as W, T as pt, C as rt, b as Q, D as ht, H as gt, B as dt, v as ct, u as xt, d as ft, e as ut, f as _t, M as bt, g as jt } from "./index-BJq5RiR5.js";
2
+ import { h as qc, L as Ac } from "./index-BJq5RiR5.js";
3
+ import b from "react";
4
+ const Nt = "_wrapper_9rr5j_2", $t = "_alignmentBlock_9rr5j_8", It = "_title_9rr5j_15", Ct = "_subtitle_9rr5j_22", wt = "_alignmentContent_9rr5j_29", Tt = "_alignments_9rr5j_37", Bt = "_alignment_9rr5j_8", Pt = "_circle_9rr5j_58", St = "_paddings_9rr5j_65", qt = "_padding_9rr5j_65", At = "_input_9rr5j_84", D = {
5
+ wrapper: Nt,
6
+ alignmentBlock: $t,
41
7
  title: It,
42
- subtitle: Pt,
43
- alignmentContent: Tt,
44
- alignments: wt,
8
+ subtitle: Ct,
9
+ alignmentContent: wt,
10
+ alignments: Tt,
45
11
  alignment: Bt,
46
- circle: St,
47
- paddings: qt,
48
- padding: At,
49
- input: Ot
50
- }, Lt = [
12
+ circle: Pt,
13
+ paddings: St,
14
+ padding: qt,
15
+ input: At
16
+ }, Ot = [
51
17
  "topLeft",
52
18
  "top",
53
19
  "topRight",
@@ -57,9 +23,9 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
57
23
  "bottomLeft",
58
24
  "bottom",
59
25
  "bottomRight"
60
- ], Dt = ["left", "top", "right", "bottom"], sc = (d) => {
61
- const { alignment: n, padding: e, setPadding: o, setAlignment: c } = d;
62
- function l() {
26
+ ], Lt = ["left", "top", "right", "bottom"], kc = (r) => {
27
+ const { alignment: n, padding: e, setPadding: o, setAlignment: i } = r;
28
+ function a() {
63
29
  switch (n) {
64
30
  case "left":
65
31
  case "topLeft":
@@ -77,8 +43,8 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
77
43
  return "TextAlignCenter";
78
44
  }
79
45
  }
80
- function s(i) {
81
- switch (i) {
46
+ function s(c) {
47
+ switch (c) {
82
48
  case "left":
83
49
  return "AlignLeft";
84
50
  case "right":
@@ -89,24 +55,24 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
89
55
  return "AlignBottom";
90
56
  }
91
57
  }
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: Lt.map((i) => /* @__PURE__ */ t.jsxs(
58
+ return /* @__PURE__ */ t.jsxs("div", { className: D.layout, children: [
59
+ /* @__PURE__ */ t.jsx("h3", { className: D.title, children: "Layout" }),
60
+ /* @__PURE__ */ t.jsxs("div", { className: D.alignmentBlock, children: [
61
+ /* @__PURE__ */ t.jsx("h5", { className: D.subtitle, children: "Alignment" }),
62
+ /* @__PURE__ */ t.jsxs("div", { className: D.alignmentContent, children: [
63
+ /* @__PURE__ */ t.jsx("div", { className: D.alignments, children: Ot.map((c) => /* @__PURE__ */ t.jsxs(
98
64
  "div",
99
65
  {
100
66
  onClick: () => {
101
- c(i);
67
+ i(c);
102
68
  },
103
- className: O.alignment,
69
+ className: D.alignment,
104
70
  children: [
105
- i !== n && /* @__PURE__ */ t.jsx("div", { className: O.circle }),
106
- i === n && /* @__PURE__ */ t.jsx(
71
+ c !== n && /* @__PURE__ */ t.jsx("div", { className: D.circle }),
72
+ c === n && /* @__PURE__ */ t.jsx(
107
73
  p,
108
74
  {
109
- name: l(),
75
+ name: a(),
110
76
  fill: "#FF3F19",
111
77
  width: 22,
112
78
  height: 22
@@ -114,29 +80,29 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
114
80
  )
115
81
  ]
116
82
  },
117
- i
83
+ c
118
84
  )) }),
119
- /* @__PURE__ */ t.jsx("div", { className: O.paddings, children: Dt.map((i) => /* @__PURE__ */ t.jsxs(
85
+ /* @__PURE__ */ t.jsx("div", { className: D.paddings, children: Lt.map((c) => /* @__PURE__ */ t.jsxs(
120
86
  "label",
121
87
  {
122
- className: O.padding,
88
+ className: D.padding,
123
89
  children: [
124
90
  /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
125
91
  p,
126
92
  {
127
- name: s(i),
93
+ name: s(c),
128
94
  width: 20,
129
95
  height: 20
130
96
  }
131
97
  ) }),
132
98
  /* @__PURE__ */ t.jsx(
133
- G,
99
+ Y,
134
100
  {
135
101
  type: "text",
136
- value: String(e[i]),
137
- onChange: (m) => o({
102
+ value: String(e[c]),
103
+ onChange: (u) => o({
138
104
  ...e,
139
- [i]: Number(m)
105
+ [c]: Number(u)
140
106
  }),
141
107
  paddingless: !0,
142
108
  borderless: !0
@@ -144,25 +110,25 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
144
110
  )
145
111
  ]
146
112
  },
147
- i
113
+ c
148
114
  )) })
149
115
  ] })
150
116
  ] })
151
117
  ] });
152
- }, zt = "_subtitle_1qrz9_1", Et = "_header_1qrz9_8", Mt = "_text_1qrz9_9", Rt = "_top_1qrz9_17", Ht = "_itemsBlock_1qrz9_26", Z = {
153
- subtitle: zt,
154
- header: Et,
118
+ }, Dt = "_subtitle_1qrz9_1", zt = "_header_1qrz9_8", Mt = "_text_1qrz9_9", Et = "_top_1qrz9_17", Rt = "_itemsBlock_1qrz9_26", K = {
119
+ subtitle: Dt,
120
+ header: zt,
155
121
  text: Mt,
156
- top: Rt,
157
- itemsBlock: Ht
158
- }, Vt = "_typeTexts_rcw8p_1", Ft = "_block_rcw8p_8", Ut = "_active_rcw8p_21", ct = {
122
+ top: Et,
123
+ itemsBlock: Rt
124
+ }, Vt = "_typeTexts_rcw8p_1", Ht = "_block_rcw8p_8", Ft = "_active_rcw8p_21", ot = {
159
125
  typeTexts: Vt,
160
- block: Ft,
161
- active: Ut
162
- }, Gt = ["bold", "italic", "underline", "strike-through", "code"], xt = (d) => {
163
- const { typesText: n, setTypesText: e } = d;
164
- function o(c) {
165
- switch (c) {
126
+ block: Ht,
127
+ active: Ft
128
+ }, Ut = ["bold", "italic", "underline", "strike-through", "code"], vt = (r) => {
129
+ const { typesText: n, setTypesText: e } = r;
130
+ function o(i) {
131
+ switch (i) {
166
132
  case "bold":
167
133
  return "TextB";
168
134
  case "italic":
@@ -175,66 +141,66 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
175
141
  return "TextUnderline";
176
142
  }
177
143
  }
178
- return /* @__PURE__ */ t.jsx("div", { className: ct.typeTexts, children: Gt.map((c) => /* @__PURE__ */ t.jsx(
144
+ return /* @__PURE__ */ t.jsx("div", { className: ot.typeTexts, children: Ut.map((i) => /* @__PURE__ */ t.jsx(
179
145
  "div",
180
146
  {
181
- className: D(ct.block, {
182
- [ct.active]: n.includes(c)
147
+ className: q(ot.block, {
148
+ [ot.active]: n.includes(i)
183
149
  }),
184
150
  onClick: () => {
185
- const l = [...n];
186
- if (l.includes(c)) {
187
- const s = l.filter((i) => i !== c);
151
+ const a = [...n];
152
+ if (a.includes(i)) {
153
+ const s = a.filter((c) => c !== i);
188
154
  e(s);
189
155
  } else
190
- l.push(c), e(l);
156
+ a.push(i), e(a);
191
157
  },
192
158
  children: /* @__PURE__ */ t.jsx(
193
159
  p,
194
160
  {
195
- name: o(c),
196
- fill: n.includes(c) ? "#252525" : "#757575",
161
+ name: o(i),
162
+ fill: n.includes(i) ? "#252525" : "#757575",
197
163
  width: 20,
198
164
  height: 20
199
165
  }
200
166
  )
201
167
  },
202
- String(c)
168
+ String(i)
203
169
  )) });
204
- }, Wt = (d) => {
170
+ }, Gt = (r) => {
205
171
  const {
206
172
  typesText: n,
207
173
  isActiveText: e,
208
174
  setIsActiveText: o,
209
- text: c,
210
- setText: l,
175
+ text: i,
176
+ setText: a,
211
177
  setTypesText: s,
212
- title: i,
213
- subtitle: m = "Items"
214
- } = d;
215
- return /* @__PURE__ */ t.jsxs("div", { className: Z.text, children: [
216
- (i || e !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Z.top, children: [
217
- i && /* @__PURE__ */ t.jsx("h3", { className: Z.title, children: i }),
178
+ title: c,
179
+ subtitle: u = "Items"
180
+ } = r;
181
+ return /* @__PURE__ */ t.jsxs("div", { className: K.text, children: [
182
+ (c || e !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: K.top, children: [
183
+ c && /* @__PURE__ */ t.jsx("h3", { className: K.title, children: c }),
218
184
  e !== void 0 && o && /* @__PURE__ */ t.jsx(
219
- H,
185
+ W,
220
186
  {
221
187
  current: e,
222
- onChange: (v) => o(v)
188
+ onChange: (y) => o(y)
223
189
  }
224
190
  )
225
191
  ] }),
226
- /* @__PURE__ */ t.jsxs("div", { className: Z.itemsBlock, children: [
227
- /* @__PURE__ */ t.jsx("h5", { className: Z.subtitle, children: m }),
192
+ /* @__PURE__ */ t.jsxs("div", { className: K.itemsBlock, children: [
193
+ /* @__PURE__ */ t.jsx("h5", { className: K.subtitle, children: u }),
228
194
  /* @__PURE__ */ t.jsx(
229
- dt,
195
+ pt,
230
196
  {
231
- onChange: (v) => l(v),
232
- value: c,
197
+ onChange: (y) => a(y),
198
+ value: i,
233
199
  maxLength: 150
234
200
  }
235
201
  ),
236
202
  /* @__PURE__ */ t.jsx(
237
- xt,
203
+ vt,
238
204
  {
239
205
  typesText: n,
240
206
  setTypesText: s
@@ -242,33 +208,33 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
242
208
  )
243
209
  ] })
244
210
  ] });
245
- }, Xt = "_subtitle_cuny2_1", Yt = "_header_cuny2_8", Qt = "_text_cuny2_9", Jt = "_productsBlock_cuny2_10", Kt = "_top_cuny2_22", Zt = "_itemsBlock_cuny2_31", te = "_typeTexts_cuny2_37", ee = "_block_cuny2_44", se = "_active_cuny2_57", ne = "_products_cuny2_10", ce = "_product_cuny2_10", oe = "_button_cuny2_76", ie = "_disabled_cuny2_87", ae = "_image_cuny2_91", le = "_info_cuny2_98", re = "_name_cuny2_110", de = "_buttons_cuny2_114", ue = "_modal_cuny2_121", _e = "_link_cuny2_141", me = "_modalOptions_cuny2_147", P = {
246
- subtitle: Xt,
247
- header: Yt,
248
- text: Qt,
249
- productsBlock: Jt,
250
- top: Kt,
251
- itemsBlock: Zt,
252
- typeTexts: te,
253
- block: ee,
254
- active: se,
255
- products: ne,
256
- product: ce,
257
- button: oe,
211
+ }, Wt = "_subtitle_cuny2_1", Xt = "_header_cuny2_8", Yt = "_text_cuny2_9", Qt = "_productsBlock_cuny2_10", Jt = "_top_cuny2_22", Kt = "_itemsBlock_cuny2_31", Zt = "_typeTexts_cuny2_37", te = "_block_cuny2_44", ee = "_active_cuny2_57", se = "_products_cuny2_10", ne = "_product_cuny2_10", ce = "_button_cuny2_76", ie = "_disabled_cuny2_87", oe = "_image_cuny2_91", ae = "_info_cuny2_98", le = "_name_cuny2_110", re = "_buttons_cuny2_114", de = "_modal_cuny2_121", ue = "_link_cuny2_141", _e = "_modalOptions_cuny2_147", B = {
212
+ subtitle: Wt,
213
+ header: Xt,
214
+ text: Yt,
215
+ productsBlock: Qt,
216
+ top: Jt,
217
+ itemsBlock: Kt,
218
+ typeTexts: Zt,
219
+ block: te,
220
+ active: ee,
221
+ products: se,
222
+ product: ne,
223
+ button: ce,
258
224
  disabled: ie,
259
- image: ae,
260
- info: le,
261
- name: re,
262
- buttons: de,
263
- modal: ue,
264
- link: _e,
265
- modalOptions: me
266
- }, pe = (d) => {
267
- const { activeItem: n, setActiveItem: e, popupPosition: o, modalOptions: c, setIsOpenModal: l } = d;
225
+ image: oe,
226
+ info: ae,
227
+ name: le,
228
+ buttons: re,
229
+ modal: de,
230
+ link: ue,
231
+ modalOptions: _e
232
+ }, me = (r) => {
233
+ const { activeItem: n, setActiveItem: e, popupPosition: o, modalOptions: i, setIsOpenModal: a } = r;
268
234
  return /* @__PURE__ */ t.jsxs(
269
235
  "div",
270
236
  {
271
- className: P.modal,
237
+ className: B.modal,
272
238
  onClick: (s) => {
273
239
  s.stopPropagation();
274
240
  },
@@ -277,7 +243,7 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
277
243
  left: `${o.left}px`
278
244
  },
279
245
  children: [
280
- /* @__PURE__ */ t.jsxs("div", { className: P.top, children: [
246
+ /* @__PURE__ */ t.jsxs("div", { className: B.top, children: [
281
247
  /* @__PURE__ */ t.jsx("h3", { children: n.name }),
282
248
  /* @__PURE__ */ t.jsx(
283
249
  p,
@@ -287,60 +253,60 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
287
253
  width: 20,
288
254
  hoverable: !0,
289
255
  onClick: () => {
290
- e(null), l(!1);
256
+ e(null), a(!1);
291
257
  }
292
258
  }
293
259
  )
294
260
  ] }),
295
- /* @__PURE__ */ t.jsx("div", { className: P.modalOptions, children: c.map((s) => {
261
+ /* @__PURE__ */ t.jsx("div", { className: B.modalOptions, children: i.map((s) => {
296
262
  if (s.type === "image")
297
263
  return /* @__PURE__ */ t.jsx(
298
- it,
264
+ rt,
299
265
  {
300
266
  label: "Put up an attractive image",
301
- onChange: (i) => {
302
- const m = {
267
+ onChange: (c) => {
268
+ const u = {
303
269
  ...n,
304
- [s.field]: i
270
+ [s.field]: c
305
271
  };
306
- e(m);
272
+ e(u);
307
273
  }
308
274
  },
309
275
  String(s.field)
310
276
  );
311
277
  if (s.type === "text")
312
278
  return /* @__PURE__ */ t.jsx(
313
- Wt,
279
+ Gt,
314
280
  {
315
281
  typesText: n[s.field.type],
316
- setTypesText: (i) => {
317
- const m = {
282
+ setTypesText: (c) => {
283
+ const u = {
318
284
  ...n,
319
- [s.field.type]: i
285
+ [s.field.type]: c
320
286
  };
321
- e(m);
287
+ e(u);
322
288
  },
323
289
  text: n[s.field.text] || "",
324
- setText: (i) => {
325
- const m = {
290
+ setText: (c) => {
291
+ const u = {
326
292
  ...n,
327
- [s.field.text]: i
293
+ [s.field.text]: c
328
294
  };
329
- e(m);
295
+ e(u);
330
296
  },
331
297
  subtitle: s.label
332
298
  }
333
299
  );
334
300
  if (s.type === "input")
335
301
  return /* @__PURE__ */ t.jsx(
336
- G,
302
+ Y,
337
303
  {
338
- onChange: (i) => {
339
- const m = {
304
+ onChange: (c) => {
305
+ const u = {
340
306
  ...n,
341
- [s.field]: i
307
+ [s.field]: c
342
308
  };
343
- e(m);
309
+ e(u);
344
310
  },
345
311
  value: n[s.field] || "",
346
312
  label: s.label,
@@ -348,16 +314,16 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
348
314
  }
349
315
  );
350
316
  if (s.type === "inputSwitch")
351
- return /* @__PURE__ */ t.jsxs("div", { className: P.link, children: [
317
+ return /* @__PURE__ */ t.jsxs("div", { className: B.link, children: [
352
318
  /* @__PURE__ */ t.jsx(
353
- G,
319
+ Y,
354
320
  {
355
- onChange: (i) => {
356
- const m = {
321
+ onChange: (c) => {
322
+ const u = {
357
323
  ...n,
358
- [s.field.text]: i
324
+ [s.field.text]: c
359
325
  };
360
- e(m);
326
+ e(u);
361
327
  },
362
328
  value: n[s.field.text] || "",
363
329
  label: s.inputLabel,
@@ -365,31 +331,31 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
365
331
  }
366
332
  ),
367
333
  /* @__PURE__ */ t.jsx(
368
- H,
334
+ W,
369
335
  {
370
336
  current: !!n[s.field.switch] || !1,
371
337
  label: s.switchLabel,
372
- onChange: (i) => {
373
- const m = {
338
+ onChange: (c) => {
339
+ const u = {
374
340
  ...n,
375
- [s.field.switch]: i
341
+ [s.field.switch]: c
376
342
  };
377
- e(m);
343
+ e(u);
378
344
  }
379
345
  }
380
346
  )
381
347
  ] });
382
348
  if (s.type === "list")
383
349
  return /* @__PURE__ */ t.jsx(
384
- be,
350
+ fe,
385
351
  {
386
352
  items: n[s.field] || [],
387
- setItems: (i) => {
388
- const m = {
353
+ setItems: (c) => {
354
+ const u = {
389
355
  ...n,
390
- [s.field]: i
356
+ [s.field]: c
391
357
  };
392
- e(m);
358
+ e(u);
393
359
  },
394
360
  itemsType: "select",
395
361
  draggable: s.draggable || !1,
@@ -401,15 +367,15 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
401
367
  );
402
368
  if (s.type === "select")
403
369
  return /* @__PURE__ */ t.jsx(
404
- W,
370
+ Q,
405
371
  {
406
372
  options: s.itemsOptions,
407
- onChange: (i) => {
408
- const m = {
373
+ onChange: (c) => {
374
+ const u = {
409
375
  ...n,
410
- [s.field]: i
376
+ [s.field]: c
411
377
  };
412
- e(m);
378
+ e(u);
413
379
  },
414
380
  label: s.label,
415
381
  value: n[s.field] || "String",
@@ -420,104 +386,104 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
420
386
  ]
421
387
  }
422
388
  );
423
- }, he = "_other_g74jx_1", ge = "_subtitle_g74jx_7", xe = "_items_g74jx_14", ot = {
424
- other: he,
425
- subtitle: ge,
426
- items: xe
427
- }, ft = (d) => {
428
- const { items: n, title: e = "Other" } = d;
429
- return /* @__PURE__ */ t.jsxs("div", { className: ot.other, children: [
430
- /* @__PURE__ */ t.jsx("h5", { className: ot.subtitle, children: e }),
431
- /* @__PURE__ */ t.jsx("div", { className: ot.items, children: n.map((o, c) => /* @__PURE__ */ t.jsx(
432
- H,
389
+ }, pe = "_other_g74jx_1", he = "_subtitle_g74jx_7", ge = "_items_g74jx_14", at = {
390
+ other: pe,
391
+ subtitle: he,
392
+ items: ge
393
+ }, kt = (r) => {
394
+ const { items: n, title: e = "Other" } = r;
395
+ return /* @__PURE__ */ t.jsxs("div", { className: at.other, children: [
396
+ /* @__PURE__ */ t.jsx("h5", { className: at.subtitle, children: e }),
397
+ /* @__PURE__ */ t.jsx("div", { className: at.items, children: n.map((o, i) => /* @__PURE__ */ t.jsx(
398
+ W,
433
399
  {
434
400
  current: o.isItem,
435
- onChange: (l) => o.setIsItem(l),
401
+ onChange: (a) => o.setIsItem(a),
436
402
  label: o.label,
437
403
  hasBackground: !0,
438
404
  paddingless: !1
439
405
  },
440
- c
406
+ i
441
407
  )) })
442
408
  ] });
443
- }, fe = (d) => {
444
- const { index: n, moveProduct: e, children: o } = d, [, c] = mt({
409
+ }, xe = (r) => {
410
+ const { index: n, moveProduct: e, children: o } = r, [, i] = xt({
445
411
  accept: "product",
446
- hover(i) {
447
- i.index !== n && (e(i.index, n), i.index = n);
412
+ hover(c) {
413
+ c.index !== n && (e(c.index, n), c.index = n);
448
414
  }
449
- }), [{ isDragging: l }, s] = pt({
415
+ }), [{ isDragging: a }, s] = ft({
450
416
  type: "product",
451
417
  item: { index: n },
452
- collect: (i) => ({
453
- isDragging: i.isDragging()
418
+ collect: (c) => ({
419
+ isDragging: c.isDragging()
454
420
  })
455
421
  });
456
422
  return /* @__PURE__ */ t.jsx(
457
423
  "div",
458
424
  {
459
- ref: (i) => s(c(i)),
460
- className: `${P.product} ${l ? P.dragging : ""}`,
425
+ ref: (c) => s(i(c)),
426
+ className: `${B.product} ${a ? B.dragging : ""}`,
461
427
  children: o
462
428
  }
463
429
  );
464
- }, be = (d) => {
430
+ }, fe = (r) => {
465
431
  const {
466
432
  isActiveItems: n,
467
433
  setIsActiveItems: e,
468
434
  items: o,
469
- setItems: c,
470
- other: l,
435
+ setItems: i,
436
+ other: a,
471
437
  title: s,
472
- subtitle: i,
473
- editable: m = !0,
474
- draggable: v = !1,
475
- withImage: u = !1,
476
- deletable: a = !0,
438
+ subtitle: c,
439
+ editable: u = !0,
440
+ draggable: y = !1,
441
+ withImage: _ = !1,
442
+ deletable: l = !0,
477
443
  addable: h = !0,
478
- itemsType: $,
479
- itemsPlaceholder: b = "",
480
- itemsOptions: r,
481
- hasRangeSelector: B = !1,
482
- rangeSelectorOptions: Y,
483
- modalOptions: Q,
484
- addableOptions: V = {},
485
- limit: y
486
- } = d, [E, M] = f.useState(null), [nt, st] = f.useState({
444
+ itemsType: N,
445
+ itemsPlaceholder: g = "",
446
+ itemsOptions: d,
447
+ hasRangeSelector: P = !1,
448
+ rangeSelectorOptions: U,
449
+ modalOptions: G,
450
+ addableOptions: R = {},
451
+ limit: j
452
+ } = r, [A, V] = b.useState(null), [it, st] = b.useState({
487
453
  top: 0,
488
454
  left: 0
489
- }), [g, k] = f.useState(!1), S = (_, T) => {
490
- const q = [...o], [N] = q.splice(_, 1);
491
- q.splice(T, 0, N), c(q);
455
+ }), [f, k] = b.useState(!1), w = (m, T) => {
456
+ const O = [...o], [$] = O.splice(m, 1);
457
+ O.splice(T, 0, $), i(O);
492
458
  };
493
- f.useEffect(() => {
494
- const _ = () => {
495
- M(null), k(!1);
459
+ b.useEffect(() => {
460
+ const m = () => {
461
+ V(null), k(!1);
496
462
  };
497
- return document.body.addEventListener("click", _), M(null), k(!1), () => {
498
- M(null), k(!1), document.body.removeEventListener("click", _);
463
+ return document.body.addEventListener("click", m), V(null), k(!1), () => {
464
+ V(null), k(!1), document.body.removeEventListener("click", m);
499
465
  };
500
- }, []), f.useEffect(() => {
501
- if (E) {
502
- const _ = [...o].map((T) => T.id === E.id ? E : T);
503
- c(_);
466
+ }, []), b.useEffect(() => {
467
+ if (A) {
468
+ const m = [...o].map((T) => T.id === A.id ? A : T);
469
+ i(m);
504
470
  }
505
- }, [E]);
506
- const C = (_, T) => {
507
- _.stopPropagation(), k(!0);
508
- const q = _.target.getBoundingClientRect(), N = 500, J = window.innerHeight;
509
- let z = q.top + window.scrollY;
510
- z + N > J && (z = J - N - 20), st({
511
- top: z - 80,
512
- left: q.left - 30
513
- }), M(T);
471
+ }, [A]);
472
+ const M = (m, T) => {
473
+ m.stopPropagation(), k(!0);
474
+ const O = m.target.getBoundingClientRect(), $ = 500, J = window.innerHeight;
475
+ let E = O.top + window.scrollY;
476
+ E + $ > J && (E = J - $ - 20), st({
477
+ top: E - 80,
478
+ left: O.left - 30
479
+ }), V(T);
514
480
  };
515
- function F(_) {
516
- if (u)
517
- return _ ? /* @__PURE__ */ t.jsx(
481
+ function I(m) {
482
+ if (_)
483
+ return m ? /* @__PURE__ */ t.jsx(
518
484
  "img",
519
485
  {
520
- src: `https://imagedelivery.net/${_[0]}/w=1000`,
486
+ src: `https://imagedelivery.net/${m[0]}/w=1000`,
521
487
  alt: "image",
522
488
  width: 16,
523
489
  height: 16
@@ -532,9 +498,9 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
532
498
  }
533
499
  );
534
500
  }
535
- const A = (_, T) => {
536
- const q = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
537
- v && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
501
+ const L = (m, T) => {
502
+ const O = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
503
+ y && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
538
504
  p,
539
505
  {
540
506
  name: "DotsSixVertical",
@@ -543,62 +509,62 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
543
509
  height: 20
544
510
  }
545
511
  ) }),
546
- $ === "select" && /* @__PURE__ */ t.jsx(
547
- W,
512
+ N === "select" && /* @__PURE__ */ t.jsx(
513
+ Q,
548
514
  {
549
- onChange: (N) => {
550
- const z = [...o].map((R) => R.id === _.id ? {
551
- ..._,
552
- name: N
553
- } : R);
554
- M({
555
- ..._,
556
- name: N
557
- }), c([...z]);
515
+ onChange: ($) => {
516
+ const E = [...o].map((H) => H.id === m.id ? {
517
+ ...m,
518
+ name: $
519
+ } : H);
520
+ V({
521
+ ...m,
522
+ name: $
523
+ }), i([...E]);
558
524
  },
559
- value: _.name,
560
- options: r,
561
- leftAddon: F(_.images)
525
+ value: m.name,
526
+ options: d,
527
+ leftAddon: I(m.images)
562
528
  }
563
529
  ),
564
- $ === "input" && /* @__PURE__ */ t.jsx(
565
- G,
530
+ N === "input" && /* @__PURE__ */ t.jsx(
531
+ Y,
566
532
  {
567
- onChange: (N) => {
568
- const z = [...o].map((R) => R.id === _.id ? {
569
- ..._,
570
- name: N
571
- } : R);
572
- c([...z]);
533
+ onChange: ($) => {
534
+ const E = [...o].map((H) => H.id === m.id ? {
535
+ ...m,
536
+ name: $
537
+ } : H);
538
+ i([...E]);
573
539
  },
574
- value: _.name,
575
- placeholder: b
540
+ value: m.name,
541
+ placeholder: g
576
542
  }
577
543
  ),
578
- $ === "image" && /* @__PURE__ */ t.jsx(
579
- it,
544
+ N === "image" && /* @__PURE__ */ t.jsx(
545
+ rt,
580
546
  {
581
- onChange: (N) => {
582
- const z = [...o].map((R) => R.id === _.id ? {
583
- ..._,
584
- images: N
585
- } : R);
586
- c([...z]);
547
+ onChange: ($) => {
548
+ const E = [...o].map((H) => H.id === m.id ? {
549
+ ...m,
550
+ images: $
551
+ } : H);
552
+ i([...E]);
587
553
  }
588
554
  }
589
555
  ),
590
- /* @__PURE__ */ t.jsxs("div", { className: P.buttons, children: [
591
- m && /* @__PURE__ */ t.jsx(
556
+ /* @__PURE__ */ t.jsxs("div", { className: B.buttons, children: [
557
+ u && /* @__PURE__ */ t.jsx(
592
558
  p,
593
559
  {
594
560
  name: "Sliders",
595
561
  hoverable: !0,
596
562
  width: 20,
597
563
  height: 20,
598
- onClick: (N) => C(N, _)
564
+ onClick: ($) => M($, m)
599
565
  }
600
566
  ),
601
- a && /* @__PURE__ */ t.jsx(
567
+ l && /* @__PURE__ */ t.jsx(
602
568
  p,
603
569
  {
604
570
  name: "Trash",
@@ -606,77 +572,77 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
606
572
  width: 20,
607
573
  height: 20,
608
574
  fill: "#C12A2A",
609
- onClick: () => c(o.filter((N) => N.id !== _.id))
575
+ onClick: () => i(o.filter(($) => $.id !== m.id))
610
576
  }
611
577
  )
612
578
  ] })
613
579
  ] });
614
- return v ? /* @__PURE__ */ t.jsx(
615
- fe,
580
+ return y ? /* @__PURE__ */ t.jsx(
581
+ xe,
616
582
  {
617
- product: _,
583
+ product: m,
618
584
  index: T,
619
- moveProduct: S,
620
- children: q
585
+ moveProduct: w,
586
+ children: O
621
587
  },
622
- _.id
588
+ m.id
623
589
  ) : /* @__PURE__ */ t.jsx(
624
590
  "div",
625
591
  {
626
- className: P.product,
627
- children: q
592
+ className: B.product,
593
+ children: O
628
594
  },
629
- _.id
595
+ m.id
630
596
  );
631
597
  };
632
- return /* @__PURE__ */ t.jsxs("div", { className: P.productsBlock, children: [
633
- (s || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: P.top, children: [
634
- s && /* @__PURE__ */ t.jsx("h3", { className: P.title, children: s }),
598
+ return /* @__PURE__ */ t.jsxs("div", { className: B.productsBlock, children: [
599
+ (s || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: B.top, children: [
600
+ s && /* @__PURE__ */ t.jsx("h3", { className: B.title, children: s }),
635
601
  n !== void 0 && /* @__PURE__ */ t.jsx(
636
- H,
602
+ W,
637
603
  {
638
604
  current: n,
639
- onChange: (_) => e == null ? void 0 : e(_)
605
+ onChange: (m) => e == null ? void 0 : e(m)
640
606
  }
641
607
  )
642
608
  ] }),
643
- E && m && Q && g && /* @__PURE__ */ t.jsx(
644
- pe,
609
+ A && u && G && f && /* @__PURE__ */ t.jsx(
610
+ me,
645
611
  {
646
- activeItem: E,
647
- setActiveItem: M,
648
- popupPosition: nt,
649
- modalOptions: Q,
612
+ activeItem: A,
613
+ setActiveItem: V,
614
+ popupPosition: it,
615
+ modalOptions: G,
650
616
  setIsOpenModal: k
651
617
  }
652
618
  ),
653
- B && Y && /* @__PURE__ */ t.jsx(ks, { ...Y }),
654
- /* @__PURE__ */ t.jsxs("div", { className: P.products, children: [
655
- i && /* @__PURE__ */ t.jsx("h5", { className: P.subtitle, children: i }),
656
- v ? /* @__PURE__ */ t.jsx(ut, { backend: _t, children: o.map((_, T) => A(_, T)) }) : o.map((_, T) => A(_, T)),
619
+ P && U && /* @__PURE__ */ t.jsx(vs, { ...U }),
620
+ /* @__PURE__ */ t.jsxs("div", { className: B.products, children: [
621
+ c && /* @__PURE__ */ t.jsx("h5", { className: B.subtitle, children: c }),
622
+ y ? /* @__PURE__ */ t.jsx(ht, { backend: gt, children: o.map((m, T) => L(m, T)) }) : o.map((m, T) => L(m, T)),
657
623
  h && /* @__PURE__ */ t.jsxs(
658
- X,
624
+ dt,
659
625
  {
660
- className: D(P.button, {
661
- [P.disabled]: !!(y && y <= o.length)
626
+ className: q(B.button, {
627
+ [B.disabled]: !!(j && j <= o.length)
662
628
  }),
663
629
  size: "s",
664
- disabled: !!(y && y <= o.length),
630
+ disabled: !!(j && j <= o.length),
665
631
  onClick: () => {
666
- const _ = [...o];
667
- $ === "select" ? _.push({
668
- name: r[0] || `Product ${o.length + 1}`,
669
- id: et(),
670
- ...V
671
- }) : $ === "input" ? _.push({
632
+ const m = [...o];
633
+ N === "select" ? m.push({
634
+ name: d[0] || `Product ${o.length + 1}`,
635
+ id: ct(),
636
+ ...R
637
+ }) : N === "input" ? m.push({
672
638
  name: "",
673
- id: et(),
674
- ...V
675
- }) : _.push({
639
+ id: ct(),
640
+ ...R
641
+ }) : m.push({
676
642
  name: `Image ${o.length + 1}`,
677
- id: et(),
678
- ...V
679
- }), c(_);
643
+ id: ct(),
644
+ ...R
645
+ }), i(m);
680
646
  },
681
647
  children: [
682
648
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
@@ -692,45 +658,45 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
692
658
  }
693
659
  )
694
660
  ] }),
695
- l !== void 0 && /* @__PURE__ */ t.jsx(ft, { items: l })
661
+ a !== void 0 && /* @__PURE__ */ t.jsx(kt, { items: a })
696
662
  ] });
697
- }, je = "_subtitle_1fb9q_1", ve = "_header_1fb9q_8", ke = "_text_1fb9q_9", ye = "_productsBlock_1fb9q_10", Ne = "_buttonsBlock_1fb9q_11", $e = "_top_1fb9q_22", Ce = "_itemsBlock_1fb9q_31", Ie = "_typeTexts_1fb9q_37", Pe = "_block_1fb9q_44", Te = "_active_1fb9q_56", we = "_products_1fb9q_10", Be = "_product_1fb9q_10", Se = "_button_1fb9q_11", qe = "_image_1fb9q_86", Ae = "_info_1fb9q_93", Oe = "_name_1fb9q_105", Le = "_buttons_1fb9q_11", De = "_modal_1fb9q_116", ze = "_other_1fb9q_135", Ee = "_options_1fb9q_141", U = {
698
- subtitle: je,
699
- header: ve,
700
- text: ke,
701
- productsBlock: ye,
702
- buttonsBlock: Ne,
703
- top: $e,
704
- itemsBlock: Ce,
663
+ }, be = "_subtitle_1fb9q_1", je = "_header_1fb9q_8", ve = "_text_1fb9q_9", ke = "_productsBlock_1fb9q_10", ye = "_buttonsBlock_1fb9q_11", Ne = "_top_1fb9q_22", $e = "_itemsBlock_1fb9q_31", Ie = "_typeTexts_1fb9q_37", Ce = "_block_1fb9q_44", we = "_active_1fb9q_56", Te = "_products_1fb9q_10", Be = "_product_1fb9q_10", Pe = "_button_1fb9q_11", Se = "_image_1fb9q_86", qe = "_info_1fb9q_93", Ae = "_name_1fb9q_105", Oe = "_buttons_1fb9q_11", Le = "_modal_1fb9q_116", De = "_other_1fb9q_135", ze = "_options_1fb9q_141", X = {
664
+ subtitle: be,
665
+ header: je,
666
+ text: ve,
667
+ productsBlock: ke,
668
+ buttonsBlock: ye,
669
+ top: Ne,
670
+ itemsBlock: $e,
705
671
  typeTexts: Ie,
706
- block: Pe,
707
- active: Te,
708
- products: we,
672
+ block: Ce,
673
+ active: we,
674
+ products: Te,
709
675
  product: Be,
710
- button: Se,
711
- image: qe,
712
- info: Ae,
713
- name: Oe,
714
- buttons: Le,
715
- modal: De,
716
- other: ze,
717
- options: Ee
718
- }, Me = (d) => {
719
- const { activeButton: n, setActiveButton: e, popupPosition: o } = d, [c, l] = f.useState(n.typesText), [s, i] = f.useState(n.destination), [m, v] = f.useState(n.link || ""), [u, a] = f.useState(n.text || "");
720
- return f.useEffect(() => {
676
+ button: Pe,
677
+ image: Se,
678
+ info: qe,
679
+ name: Ae,
680
+ buttons: Oe,
681
+ modal: Le,
682
+ other: De,
683
+ options: ze
684
+ }, Me = (r) => {
685
+ const { activeButton: n, setActiveButton: e, popupPosition: o } = r, [i, a] = b.useState(n.typesText), [s, c] = b.useState(n.destination), [u, y] = b.useState(n.link || ""), [_, l] = b.useState(n.text || "");
686
+ return b.useEffect(() => {
721
687
  e({
722
688
  ...n,
723
689
  ...{
724
- text: u,
725
- link: m,
690
+ text: _,
691
+ link: u,
726
692
  destination: s,
727
- typesText: c
693
+ typesText: i
728
694
  }
729
695
  });
730
- }, [c, s, m, u]), /* @__PURE__ */ t.jsxs(
696
+ }, [i, s, u, _]), /* @__PURE__ */ t.jsxs(
731
697
  "div",
732
698
  {
733
- className: U.modal,
699
+ className: X.modal,
734
700
  onClick: (h) => {
735
701
  h.stopPropagation();
736
702
  },
@@ -739,7 +705,7 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
739
705
  left: `${o.left}px`
740
706
  },
741
707
  children: [
742
- /* @__PURE__ */ t.jsxs("div", { className: U.top, children: [
708
+ /* @__PURE__ */ t.jsxs("div", { className: X.top, children: [
743
709
  /* @__PURE__ */ t.jsx("h3", { children: n.type }),
744
710
  /* @__PURE__ */ t.jsx(
745
711
  p,
@@ -752,18 +718,18 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
752
718
  }
753
719
  )
754
720
  ] }),
755
- /* @__PURE__ */ t.jsxs("div", { className: U.options, children: [
721
+ /* @__PURE__ */ t.jsxs("div", { className: X.options, children: [
756
722
  /* @__PURE__ */ t.jsx(
757
- W,
723
+ Q,
758
724
  {
759
725
  label: "Destination",
760
- onChange: (h) => i(h),
726
+ onChange: (h) => c(h),
761
727
  options: ["Go to Page", "Open Link"],
762
728
  value: s
763
729
  }
764
730
  ),
765
731
  s === "Go to Page" ? /* @__PURE__ */ t.jsx(
766
- W,
732
+ Q,
767
733
  {
768
734
  label: "Go to",
769
735
  onChange: () => {
@@ -772,111 +738,111 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
772
738
  value: "Homepage"
773
739
  }
774
740
  ) : /* @__PURE__ */ t.jsx(
775
- G,
741
+ Y,
776
742
  {
777
- onChange: (h) => v(h),
778
- value: m,
743
+ onChange: (h) => y(h),
744
+ value: u,
779
745
  placeholder: "https://",
780
746
  label: "Link"
781
747
  }
782
748
  ),
783
749
  /* @__PURE__ */ t.jsx(
784
- H,
750
+ W,
785
751
  {
786
752
  current: !1,
787
753
  label: "Open in new tab"
788
754
  }
789
755
  ),
790
756
  /* @__PURE__ */ t.jsx(
791
- dt,
757
+ pt,
792
758
  {
793
- onChange: (h) => a(h),
794
- value: u,
759
+ onChange: (h) => l(h),
760
+ value: _,
795
761
  label: "Text",
796
762
  maxLength: 150
797
763
  }
798
764
  ),
799
765
  /* @__PURE__ */ t.jsx(
800
- xt,
766
+ vt,
801
767
  {
802
- typesText: c,
803
- setTypesText: l
768
+ typesText: i,
769
+ setTypesText: a
804
770
  }
805
771
  )
806
772
  ] })
807
773
  ]
808
774
  }
809
775
  );
810
- }, Re = "_subtitle_m8qel_1", He = "_header_m8qel_8", Ve = "_text_m8qel_9", Fe = "_productsBlock_m8qel_10", Ue = "_buttonsBlock_m8qel_11", Ge = "_top_m8qel_23", We = "_itemsBlock_m8qel_32", Xe = "_typeTexts_m8qel_38", Ye = "_block_m8qel_45", Qe = "_active_m8qel_58", Je = "_products_m8qel_10", Ke = "_product_m8qel_10", Ze = "_button_m8qel_11", ts = "_image_m8qel_88", es = "_info_m8qel_95", ss = "_name_m8qel_107", ns = "_buttons_m8qel_11", cs = "_modal_m8qel_118", os = "_other_m8qel_137", is = "_options_m8qel_143", tt = {
811
- subtitle: Re,
812
- header: He,
776
+ }, Ee = "_subtitle_m8qel_1", Re = "_header_m8qel_8", Ve = "_text_m8qel_9", He = "_productsBlock_m8qel_10", Fe = "_buttonsBlock_m8qel_11", Ue = "_top_m8qel_23", Ge = "_itemsBlock_m8qel_32", We = "_typeTexts_m8qel_38", Xe = "_block_m8qel_45", Ye = "_active_m8qel_58", Qe = "_products_m8qel_10", Je = "_product_m8qel_10", Ke = "_button_m8qel_11", Ze = "_image_m8qel_88", ts = "_info_m8qel_95", es = "_name_m8qel_107", ss = "_buttons_m8qel_11", ns = "_modal_m8qel_118", cs = "_other_m8qel_137", is = "_options_m8qel_143", Z = {
777
+ subtitle: Ee,
778
+ header: Re,
813
779
  text: Ve,
814
- productsBlock: Fe,
815
- buttonsBlock: Ue,
816
- top: Ge,
817
- itemsBlock: We,
818
- typeTexts: Xe,
819
- block: Ye,
820
- active: Qe,
821
- products: Je,
822
- product: Ke,
823
- button: Ze,
824
- image: ts,
825
- info: es,
826
- name: ss,
827
- buttons: ns,
828
- modal: cs,
829
- other: os,
780
+ productsBlock: He,
781
+ buttonsBlock: Fe,
782
+ top: Ue,
783
+ itemsBlock: Ge,
784
+ typeTexts: We,
785
+ block: Xe,
786
+ active: Ye,
787
+ products: Qe,
788
+ product: Je,
789
+ button: Ke,
790
+ image: Ze,
791
+ info: ts,
792
+ name: es,
793
+ buttons: ss,
794
+ modal: ns,
795
+ other: cs,
830
796
  options: is
831
- }, as = (d) => {
832
- const { buttons: n, setButtons: e, deletable: o = !0, addable: c = !0 } = d, [l, s] = f.useState(null), [i, m] = f.useState({
797
+ }, os = (r) => {
798
+ const { buttons: n, setButtons: e, deletable: o = !0, addable: i = !0 } = r, [a, s] = b.useState(null), [c, u] = b.useState({
833
799
  top: 0,
834
800
  left: 0
835
801
  });
836
- f.useEffect(() => {
837
- const u = () => {
802
+ b.useEffect(() => {
803
+ const _ = () => {
838
804
  s(null);
839
805
  };
840
- return document.body.addEventListener("click", u), s(null), () => {
841
- s(null), document.body.removeEventListener("click", u);
806
+ return document.body.addEventListener("click", _), s(null), () => {
807
+ s(null), document.body.removeEventListener("click", _);
842
808
  };
843
- }, []), f.useEffect(() => {
844
- if (l) {
845
- const u = [...n].map((a) => a.id === l.id ? l : a);
846
- e(u);
809
+ }, []), b.useEffect(() => {
810
+ if (a) {
811
+ const _ = [...n].map((l) => l.id === a.id ? a : l);
812
+ e(_);
847
813
  }
848
- }, [l]);
849
- const v = (u, a) => {
850
- u.stopPropagation();
851
- const h = u.target.getBoundingClientRect(), $ = 490, b = window.innerHeight;
852
- let r = h.top + window.scrollY;
853
- r + $ > b && (r = b - $ - 20), m({
854
- top: r,
814
+ }, [a]);
815
+ const y = (_, l) => {
816
+ _.stopPropagation();
817
+ const h = _.target.getBoundingClientRect(), N = 490, g = window.innerHeight;
818
+ let d = h.top + window.scrollY;
819
+ d + N > g && (d = g - N - 20), u({
820
+ top: d,
855
821
  left: h.left - 30
856
- }), s(a);
822
+ }), s(l);
857
823
  };
858
- return /* @__PURE__ */ t.jsxs("div", { className: tt.products, children: [
859
- /* @__PURE__ */ t.jsx("h5", { className: tt.subtitle, children: "Button Type" }),
860
- n.map((u) => /* @__PURE__ */ t.jsxs(
824
+ return /* @__PURE__ */ t.jsxs("div", { className: Z.products, children: [
825
+ /* @__PURE__ */ t.jsx("h5", { className: Z.subtitle, children: "Button Type" }),
826
+ n.map((_) => /* @__PURE__ */ t.jsxs(
861
827
  "div",
862
828
  {
863
- className: tt.product,
829
+ className: Z.product,
864
830
  children: [
865
831
  /* @__PURE__ */ t.jsx(
866
- W,
832
+ Q,
867
833
  {
868
- onChange: (a) => {
869
- const $ = [...n].map((b) => b.id === u.id ? {
870
- ...u,
871
- type: a
872
- } : b);
873
- e($);
834
+ onChange: (l) => {
835
+ const N = [...n].map((g) => g.id === _.id ? {
836
+ ..._,
837
+ type: l
838
+ } : g);
839
+ e(N);
874
840
  },
875
- value: u.type,
841
+ value: _.type,
876
842
  options: ["Primary", "Secondary", "Tertiary"]
877
843
  }
878
844
  ),
879
- /* @__PURE__ */ t.jsxs("div", { className: tt.buttons, children: [
845
+ /* @__PURE__ */ t.jsxs("div", { className: Z.buttons, children: [
880
846
  /* @__PURE__ */ t.jsx(
881
847
  p,
882
848
  {
@@ -884,8 +850,8 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
884
850
  hoverable: !0,
885
851
  width: 20,
886
852
  height: 20,
887
- onClick: (a) => {
888
- v(a, u);
853
+ onClick: (l) => {
854
+ y(l, _);
889
855
  }
890
856
  }
891
857
  ),
@@ -895,8 +861,8 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
895
861
  name: "Trash",
896
862
  hoverable: !0,
897
863
  onClick: () => {
898
- const a = n.filter((h) => h.id !== u.id);
899
- e(a);
864
+ const l = n.filter((h) => h.id !== _.id);
865
+ e(l);
900
866
  },
901
867
  width: 20,
902
868
  height: 20,
@@ -906,30 +872,30 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
906
872
  ] })
907
873
  ]
908
874
  },
909
- u.id
875
+ _.id
910
876
  )),
911
- l && /* @__PURE__ */ t.jsx(
877
+ a && /* @__PURE__ */ t.jsx(
912
878
  Me,
913
879
  {
914
- activeButton: l,
880
+ activeButton: a,
915
881
  setActiveButton: s,
916
- popupPosition: i
882
+ popupPosition: c
917
883
  }
918
884
  ),
919
- c && /* @__PURE__ */ t.jsxs(
920
- X,
885
+ i && /* @__PURE__ */ t.jsxs(
886
+ dt,
921
887
  {
922
- className: tt.button,
888
+ className: Z.button,
923
889
  size: "s",
924
890
  onClick: () => {
925
- const u = [...n];
926
- u.push({
891
+ const _ = [...n];
892
+ _.push({
927
893
  type: "Primary",
928
- id: et(),
894
+ id: ct(),
929
895
  typesText: [],
930
896
  destination: "Go to Page",
931
897
  text: "Button Name"
932
- }), e(u);
898
+ }), e(_);
933
899
  },
934
900
  children: [
935
901
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
@@ -945,77 +911,77 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
945
911
  }
946
912
  )
947
913
  ] });
948
- }, nc = (d) => {
949
- const { isActiveButtons: n, setIsActiveButtons: e, buttons: o, setButtons: c } = d;
950
- return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: U.buttonsBlock, children: [
951
- /* @__PURE__ */ t.jsxs("div", { className: U.top, children: [
952
- /* @__PURE__ */ t.jsx("h3", { className: U.title, children: "Buttons" }),
914
+ }, yc = (r) => {
915
+ const { isActiveButtons: n, setIsActiveButtons: e, buttons: o, setButtons: i } = r;
916
+ return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: X.buttonsBlock, children: [
917
+ /* @__PURE__ */ t.jsxs("div", { className: X.top, children: [
918
+ /* @__PURE__ */ t.jsx("h3", { className: X.title, children: "Buttons" }),
953
919
  /* @__PURE__ */ t.jsx(
954
- H,
920
+ W,
955
921
  {
956
922
  current: n,
957
- onChange: (l) => e(l)
923
+ onChange: (a) => e(a)
958
924
  }
959
925
  )
960
926
  ] }),
961
927
  /* @__PURE__ */ t.jsx(
962
- as,
928
+ os,
963
929
  {
964
930
  buttons: o,
965
- setButtons: c
931
+ setButtons: i
966
932
  }
967
933
  )
968
934
  ] }) });
969
- }, ls = "_wrapper_m18qi_1", rs = "_subtitle_m18qi_7", ds = "_content_m18qi_14", us = "_range_m18qi_22", _s = "_track_m18qi_27", ms = "_progress_m18qi_36", ps = "_dots_m18qi_46", hs = "_dot_m18qi_46", gs = "_active_m18qi_65", xs = "_input_m18qi_77", fs = "_countBlock_m18qi_91", bs = "_count_m18qi_91", js = "_controls_m18qi_107", vs = "_button_m18qi_113", I = {
970
- wrapper: ls,
971
- subtitle: rs,
972
- content: ds,
973
- range: us,
974
- track: _s,
975
- progress: ms,
976
- dots: ps,
977
- dot: hs,
978
- active: gs,
979
- input: xs,
980
- countBlock: fs,
981
- count: bs,
982
- controls: js,
983
- button: vs
984
- }, ks = (d) => {
985
- const { label: n, min: e = 1, max: o = 4, step: c = 1, count: l, setCount: s } = d, [i, m] = f.useState(!1), v = Array.from({ length: (o - e) / c + 1 }), u = (l - e) / (o - e) * 100, a = () => {
986
- l < o && s(l + c);
935
+ }, as = "_wrapper_m18qi_1", ls = "_subtitle_m18qi_7", rs = "_content_m18qi_14", ds = "_range_m18qi_22", us = "_track_m18qi_27", _s = "_progress_m18qi_36", ms = "_dots_m18qi_46", ps = "_dot_m18qi_46", hs = "_active_m18qi_65", gs = "_input_m18qi_77", xs = "_countBlock_m18qi_91", fs = "_count_m18qi_91", bs = "_controls_m18qi_107", js = "_button_m18qi_113", C = {
936
+ wrapper: as,
937
+ subtitle: ls,
938
+ content: rs,
939
+ range: ds,
940
+ track: us,
941
+ progress: _s,
942
+ dots: ms,
943
+ dot: ps,
944
+ active: hs,
945
+ input: gs,
946
+ countBlock: xs,
947
+ count: fs,
948
+ controls: bs,
949
+ button: js
950
+ }, vs = (r) => {
951
+ const { label: n, min: e = 1, max: o = 4, step: i = 1, count: a, setCount: s } = r, [c, u] = b.useState(!1), y = Array.from({ length: (o - e) / i + 1 }), _ = (a - e) / (o - e) * 100, l = () => {
952
+ a < o && s(a + i);
987
953
  }, h = () => {
988
- l > e && s(l - c);
989
- }, $ = (b) => {
990
- const r = e + b * c;
991
- s(r);
954
+ a > e && s(a - i);
955
+ }, N = (g) => {
956
+ const d = e + g * i;
957
+ s(d);
992
958
  };
993
- return /* @__PURE__ */ t.jsxs("div", { className: I.wrapper, children: [
994
- n && /* @__PURE__ */ t.jsx("h5", { className: I.subtitle, children: n }),
995
- /* @__PURE__ */ t.jsxs("div", { className: I.content, children: [
996
- /* @__PURE__ */ t.jsxs("div", { className: I.range, children: [
997
- /* @__PURE__ */ t.jsx("div", { className: I.track }),
959
+ return /* @__PURE__ */ t.jsxs("div", { className: C.wrapper, children: [
960
+ n && /* @__PURE__ */ t.jsx("h5", { className: C.subtitle, children: n }),
961
+ /* @__PURE__ */ t.jsxs("div", { className: C.content, children: [
962
+ /* @__PURE__ */ t.jsxs("div", { className: C.range, children: [
963
+ /* @__PURE__ */ t.jsx("div", { className: C.track }),
998
964
  /* @__PURE__ */ t.jsx(
999
965
  "div",
1000
966
  {
1001
- className: I.progress,
1002
- style: { width: `${u}%` }
967
+ className: C.progress,
968
+ style: { width: `${_}%` }
1003
969
  }
1004
970
  ),
1005
- /* @__PURE__ */ t.jsx("div", { className: I.dots, children: v.map((b, r) => {
1006
- const B = r <= (l - e) / c;
971
+ /* @__PURE__ */ t.jsx("div", { className: C.dots, children: y.map((g, d) => {
972
+ const P = d <= (a - e) / i;
1007
973
  return /* @__PURE__ */ t.jsx(
1008
974
  "button",
1009
975
  {
1010
- onClick: () => $(r),
1011
- className: D(I.dot, {
1012
- [I.active]: B,
1013
- [I.inactive]: !B,
1014
- [I.dragging]: i
976
+ onClick: () => N(d),
977
+ className: q(C.dot, {
978
+ [C.active]: P,
979
+ [C.inactive]: !P,
980
+ [C.dragging]: c
1015
981
  }),
1016
- "aria-label": `Set value to ${e + r * c}`
982
+ "aria-label": `Set value to ${e + d * i}`
1017
983
  },
1018
- r
984
+ d
1019
985
  );
1020
986
  }) }),
1021
987
  /* @__PURE__ */ t.jsx(
@@ -1024,39 +990,39 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
1024
990
  type: "range",
1025
991
  min: e,
1026
992
  max: o,
1027
- step: c,
1028
- value: l,
1029
- onChange: (b) => s(Number(b.target.value)),
1030
- onMouseDown: () => m(!0),
1031
- onMouseUp: () => m(!1),
1032
- onTouchStart: () => m(!0),
1033
- onTouchEnd: () => m(!1),
1034
- className: I.input
993
+ step: i,
994
+ value: a,
995
+ onChange: (g) => s(Number(g.target.value)),
996
+ onMouseDown: () => u(!0),
997
+ onMouseUp: () => u(!1),
998
+ onTouchStart: () => u(!0),
999
+ onTouchEnd: () => u(!1),
1000
+ className: C.input
1035
1001
  }
1036
1002
  )
1037
1003
  ] }),
1038
- /* @__PURE__ */ t.jsxs("div", { className: I.countBlock, children: [
1004
+ /* @__PURE__ */ t.jsxs("div", { className: C.countBlock, children: [
1039
1005
  /* @__PURE__ */ t.jsx(
1040
- G,
1006
+ Y,
1041
1007
  {
1042
1008
  type: "number",
1043
1009
  min: e,
1044
1010
  max: o,
1045
1011
  paddingless: !0,
1046
- onChange: (b) => {
1047
- const r = Number(b);
1048
- r > o ? s(o) : r < e ? s(e) : s(r);
1012
+ onChange: (g) => {
1013
+ const d = Number(g);
1014
+ d > o ? s(o) : d < e ? s(e) : s(d);
1049
1015
  },
1050
- value: String(l)
1016
+ value: String(a)
1051
1017
  }
1052
1018
  ),
1053
- /* @__PURE__ */ t.jsxs("div", { className: I.controls, children: [
1019
+ /* @__PURE__ */ t.jsxs("div", { className: C.controls, children: [
1054
1020
  /* @__PURE__ */ t.jsx(
1055
1021
  "button",
1056
1022
  {
1057
- onClick: a,
1058
- disabled: l >= o,
1059
- className: I.button,
1023
+ onClick: l,
1024
+ disabled: a >= o,
1025
+ className: C.button,
1060
1026
  "aria-label": "Increment count",
1061
1027
  children: /* @__PURE__ */ t.jsx(
1062
1028
  p,
@@ -1072,8 +1038,8 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
1072
1038
  "button",
1073
1039
  {
1074
1040
  onClick: h,
1075
- disabled: l <= e,
1076
- className: I.button,
1041
+ disabled: a <= e,
1042
+ className: C.button,
1077
1043
  "aria-label": "Decrement count",
1078
1044
  children: /* @__PURE__ */ t.jsx(
1079
1045
  p,
@@ -1089,42 +1055,42 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
1089
1055
  ] })
1090
1056
  ] })
1091
1057
  ] });
1092
- }, ys = "_subtitle_16rdk_1", Ns = "_header_16rdk_8", $s = "_text_16rdk_9", Cs = "_productsBlock_16rdk_10", Is = "_top_16rdk_22", Ps = "_itemsBlock_16rdk_31", Ts = "_typeTexts_16rdk_37", ws = "_block_16rdk_44", Bs = "_active_16rdk_57", Ss = "_products_16rdk_10", qs = "_product_16rdk_10", As = "_button_16rdk_76", Os = "_image_16rdk_87", Ls = "_info_16rdk_94", Ds = "_name_16rdk_106", zs = "_buttons_16rdk_110", Es = "_modal_16rdk_117", Ms = "_link_16rdk_137", Rs = "_modalOptions_16rdk_143", w = {
1093
- subtitle: ys,
1094
- header: Ns,
1095
- text: $s,
1096
- productsBlock: Cs,
1058
+ }, ks = "_subtitle_16rdk_1", ys = "_header_16rdk_8", Ns = "_text_16rdk_9", $s = "_productsBlock_16rdk_10", Is = "_top_16rdk_22", Cs = "_itemsBlock_16rdk_31", ws = "_typeTexts_16rdk_37", Ts = "_block_16rdk_44", Bs = "_active_16rdk_57", Ps = "_products_16rdk_10", Ss = "_product_16rdk_10", qs = "_button_16rdk_76", As = "_image_16rdk_87", Os = "_info_16rdk_94", Ls = "_name_16rdk_106", Ds = "_buttons_16rdk_110", zs = "_modal_16rdk_117", Ms = "_link_16rdk_137", Es = "_modalOptions_16rdk_143", S = {
1059
+ subtitle: ks,
1060
+ header: ys,
1061
+ text: Ns,
1062
+ productsBlock: $s,
1097
1063
  top: Is,
1098
- itemsBlock: Ps,
1099
- typeTexts: Ts,
1100
- block: ws,
1064
+ itemsBlock: Cs,
1065
+ typeTexts: ws,
1066
+ block: Ts,
1101
1067
  active: Bs,
1102
- products: Ss,
1103
- product: qs,
1104
- button: As,
1105
- image: Os,
1106
- info: Ls,
1107
- name: Ds,
1108
- buttons: zs,
1109
- modal: Es,
1068
+ products: Ps,
1069
+ product: Ss,
1070
+ button: qs,
1071
+ image: As,
1072
+ info: Os,
1073
+ name: Ls,
1074
+ buttons: Ds,
1075
+ modal: zs,
1110
1076
  link: Ms,
1111
- modalOptions: Rs
1112
- }, Hs = (d) => {
1113
- const { activeItem: n, setActiveItem: e, popupPosition: o, setIsOpenModal: c } = d;
1114
- return /* @__PURE__ */ t.jsxs(
1077
+ modalOptions: Es
1078
+ }, Rs = (r) => {
1079
+ const { activeItem: n, setActiveItem: e, popupPosition: o, setIsOpenModal: i, itemsOptions: a } = r, s = a.find((c) => c.id === n.listingId);
1080
+ return s ? /* @__PURE__ */ t.jsxs(
1115
1081
  "div",
1116
1082
  {
1117
- className: w.modal,
1118
- onClick: (l) => {
1119
- l.stopPropagation();
1083
+ className: S.modal,
1084
+ onClick: (c) => {
1085
+ c.stopPropagation();
1120
1086
  },
1121
1087
  style: {
1122
1088
  top: `${o.top}px`,
1123
1089
  left: `${o.left}px`
1124
1090
  },
1125
1091
  children: [
1126
- /* @__PURE__ */ t.jsxs("div", { className: w.top, children: [
1127
- /* @__PURE__ */ t.jsx("h3", { children: n.name }),
1092
+ /* @__PURE__ */ t.jsxs("div", { className: S.top, children: [
1093
+ /* @__PURE__ */ t.jsx("h3", { children: s.productData.name }),
1128
1094
  /* @__PURE__ */ t.jsx(
1129
1095
  p,
1130
1096
  {
@@ -1133,100 +1099,99 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
1133
1099
  width: 20,
1134
1100
  hoverable: !0,
1135
1101
  onClick: () => {
1136
- c(!1), e(null);
1102
+ i(!1), e(null);
1137
1103
  }
1138
1104
  }
1139
1105
  )
1140
1106
  ] }),
1141
- /* @__PURE__ */ t.jsx("div", { className: w.modalOptions, children: /* @__PURE__ */ t.jsx(
1142
- it,
1107
+ /* @__PURE__ */ t.jsx("div", { className: S.modalOptions, children: /* @__PURE__ */ t.jsx(
1108
+ rt,
1143
1109
  {
1144
1110
  label: "Put up an attractive image",
1145
- onChange: (l) => {
1146
- const s = {
1111
+ onChange: (c) => {
1112
+ const u = {
1147
1113
  ...n,
1148
- images: l,
1149
- imagePath: l[0]
1114
+ image: c[0]
1150
1115
  };
1151
- e(s);
1116
+ e(u);
1152
1117
  }
1153
1118
  }
1154
1119
  ) })
1155
1120
  ]
1156
1121
  }
1157
- );
1158
- }, Vs = (d) => {
1159
- const { index: n, moveProduct: e, children: o } = d, [, c] = mt({
1122
+ ) : null;
1123
+ }, Vs = (r) => {
1124
+ const { index: n, moveProduct: e, children: o } = r, [, i] = xt({
1160
1125
  accept: "product",
1161
- hover(i) {
1162
- i.index !== n && (e(i.index, n), i.index = n);
1126
+ hover(c) {
1127
+ c.index !== n && (e(c.index, n), c.index = n);
1163
1128
  }
1164
- }), [{ isDragging: l }, s] = pt({
1129
+ }), [{ isDragging: a }, s] = ft({
1165
1130
  type: "product",
1166
1131
  item: { index: n },
1167
- collect: (i) => ({
1168
- isDragging: i.isDragging()
1132
+ collect: (c) => ({
1133
+ isDragging: c.isDragging()
1169
1134
  })
1170
1135
  });
1171
1136
  return /* @__PURE__ */ t.jsx(
1172
1137
  "div",
1173
1138
  {
1174
- ref: (i) => s(c(i)),
1175
- className: `${w.product} ${l ? w.dragging : ""}`,
1139
+ ref: (c) => s(i(c)),
1140
+ className: `${S.product} ${a ? S.dragging : ""}`,
1176
1141
  children: o
1177
1142
  }
1178
1143
  );
1179
- }, cc = (d) => {
1144
+ }, Nc = (r) => {
1180
1145
  const {
1181
1146
  isActiveItems: n,
1182
1147
  setIsActiveItems: e,
1183
1148
  items: o,
1184
- setItems: c,
1185
- other: l,
1149
+ setItems: i,
1150
+ other: a,
1186
1151
  title: s,
1187
- subtitle: i,
1188
- editable: m = !0,
1189
- draggable: v = !1,
1190
- withImage: u = !1,
1191
- deletable: a = !0,
1152
+ subtitle: c,
1153
+ editable: u = !0,
1154
+ draggable: y = !1,
1155
+ withImage: _ = !1,
1156
+ deletable: l = !0,
1192
1157
  addable: h = !0,
1193
- itemsType: $,
1194
- itemsOptions: b
1195
- } = d, [r, B] = f.useState(null), [Y, Q] = f.useState({
1158
+ itemsType: N,
1159
+ itemsOptions: g
1160
+ } = r, [d, P] = b.useState(null), [U, G] = b.useState({
1196
1161
  top: 0,
1197
1162
  left: 0
1198
- }), [V, y] = f.useState(!1), E = (g, k) => {
1199
- const S = [...o], [C] = S.splice(g, 1);
1200
- S.splice(k, 0, C), c(S);
1163
+ }), [R, j] = b.useState(!1), A = (f, k) => {
1164
+ const w = [...o], [M] = w.splice(f, 1);
1165
+ w.splice(k, 0, M), i(w);
1201
1166
  };
1202
- f.useEffect(() => {
1203
- const g = () => {
1204
- B(null), y(!1);
1167
+ b.useEffect(() => {
1168
+ const f = () => {
1169
+ P(null), j(!1);
1205
1170
  };
1206
- return document.body.addEventListener("click", g), B(null), y(!1), () => {
1207
- B(null), y(!1), document.body.removeEventListener("click", g);
1171
+ return document.body.addEventListener("click", f), P(null), j(!1), () => {
1172
+ P(null), j(!1), document.body.removeEventListener("click", f);
1208
1173
  };
1209
- }, []), f.useEffect(() => {
1210
- if (r) {
1211
- const g = [...o].map((k) => k.id === r.id ? r : k);
1212
- c(g);
1174
+ }, []), b.useEffect(() => {
1175
+ if (d) {
1176
+ const f = [...o].map((k) => k.listingId === d.listingId ? d : k);
1177
+ i(f);
1213
1178
  }
1214
- }, [r]);
1215
- const M = (g, k) => {
1216
- g.stopPropagation();
1217
- const S = g.target.getBoundingClientRect(), C = 100, F = window.innerHeight;
1218
- let A = S.top + window.scrollY;
1219
- A + C > F && (A = F - C - 20), y(!0), Q({
1220
- top: A - 80,
1221
- left: S.left - 30
1222
- }), B(k);
1179
+ }, [d]);
1180
+ const V = (f, k) => {
1181
+ f.stopPropagation();
1182
+ const w = f.target.getBoundingClientRect(), M = 100, I = window.innerHeight;
1183
+ let L = w.top + window.scrollY;
1184
+ L + M > I && (L = I - M - 20), j(!0), G({
1185
+ top: L - 80,
1186
+ left: w.left - 30
1187
+ }), P(k);
1223
1188
  };
1224
- function nt(g) {
1225
- if (u)
1226
- return g ? /* @__PURE__ */ t.jsx(
1189
+ function it(f) {
1190
+ if (_)
1191
+ return f ? /* @__PURE__ */ t.jsx(
1227
1192
  "img",
1228
1193
  {
1229
- src: `https://imagedelivery.net/${g}/w=1000`,
1194
+ src: `https://imagedelivery.net/${f}/w=1000`,
1230
1195
  alt: "image",
1231
1196
  width: 16,
1232
1197
  height: 16
@@ -1241,9 +1206,11 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
1241
1206
  }
1242
1207
  );
1243
1208
  }
1244
- const st = (g, k) => {
1245
- const S = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1246
- v && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1209
+ const st = (f, k) => {
1210
+ const w = g.find((I) => f.listingId === I.id);
1211
+ if (!w) return null;
1212
+ const M = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1213
+ y && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1247
1214
  p,
1248
1215
  {
1249
1216
  name: "DotsSixVertical",
@@ -1252,46 +1219,40 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
1252
1219
  height: 20
1253
1220
  }
1254
1221
  ) }, k),
1255
- $ === "select" && /* @__PURE__ */ t.jsx(
1256
- W,
1222
+ N === "select" && /* @__PURE__ */ t.jsx(
1223
+ Q,
1257
1224
  {
1258
- onChange: (C) => {
1259
- const F = [...o], A = Number(C.split(" ")[1]), _ = b.find((N) => N.id === A);
1260
- if (!_) return;
1225
+ onChange: (I) => {
1226
+ const L = [...o], m = g.find(($) => $.productData.name === I);
1227
+ if (!m) return;
1261
1228
  const T = {
1262
- ..._.productData.stats,
1263
- newPrice: _.productData.minPrice.amount,
1264
- oldPrice: _.productData.compareAtPrice.amount
1265
- }, q = F.map((N) => N.id === g.id ? {
1266
- ...g,
1267
- name: C,
1268
- listingId: A,
1269
- stats: T
1270
- } : N);
1271
- B({
1272
- ...g,
1273
- name: C,
1274
- listingId: A
1275
- }), c([...q]);
1229
+ listingId: m.id,
1230
+ image: m.productData.images.length > 0 ? m.productData.images[0].cfId : ""
1231
+ }, O = L.map(($) => $.listingId === f.listingId ? T : $);
1232
+ P(T), i([...O]);
1276
1233
  },
1277
- value: g.name,
1278
- options: [...b.map((C) => `Product ${C.id}`)],
1279
- leftAddon: nt(g.images[0])
1234
+ value: w.productData.name,
1235
+ options: [
1236
+ ...g.filter((I) => !o.find((L) => L.listingId === I.id)).map((I) => I.productData.name)
1237
+ ],
1238
+ leftAddon: it(
1239
+ f.image || w.productData.images.length > 0 && w.productData.images[0].cfId || ""
1240
+ )
1280
1241
  },
1281
1242
  k
1282
1243
  ),
1283
- /* @__PURE__ */ t.jsxs("div", { className: w.buttons, children: [
1284
- m && /* @__PURE__ */ t.jsx(
1244
+ /* @__PURE__ */ t.jsxs("div", { className: S.buttons, children: [
1245
+ u && /* @__PURE__ */ t.jsx(
1285
1246
  p,
1286
1247
  {
1287
1248
  name: "Sliders",
1288
1249
  hoverable: !0,
1289
1250
  width: 20,
1290
1251
  height: 20,
1291
- onClick: (C) => M(C, g)
1252
+ onClick: (I) => V(I, f)
1292
1253
  }
1293
1254
  ),
1294
- a && /* @__PURE__ */ t.jsx(
1255
+ l && /* @__PURE__ */ t.jsx(
1295
1256
  p,
1296
1257
  {
1297
1258
  name: "Trash",
@@ -1299,72 +1260,71 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
1299
1260
  width: 20,
1300
1261
  height: 20,
1301
1262
  fill: "#C12A2A",
1302
- onClick: () => c(o.filter((C) => C.id !== g.id))
1263
+ onClick: () => i(o.filter((I) => I !== f))
1303
1264
  }
1304
1265
  )
1305
1266
  ] })
1306
1267
  ] });
1307
- return v ? /* @__PURE__ */ t.jsx(
1268
+ return y ? /* @__PURE__ */ t.jsx(
1308
1269
  Vs,
1309
1270
  {
1310
- product: g,
1271
+ product: f,
1311
1272
  index: k,
1312
- moveProduct: E,
1313
- children: S
1273
+ moveProduct: A,
1274
+ children: M
1314
1275
  },
1315
- g.id
1276
+ f.listingId
1316
1277
  ) : /* @__PURE__ */ t.jsx(
1317
1278
  "div",
1318
1279
  {
1319
- className: w.product,
1320
- children: S
1280
+ className: S.product,
1281
+ children: M
1321
1282
  },
1322
- g.id
1283
+ f.listingId
1323
1284
  );
1324
1285
  };
1325
- return /* @__PURE__ */ t.jsxs("div", { className: w.productsBlock, children: [
1326
- (s || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: w.top, children: [
1327
- s && /* @__PURE__ */ t.jsx("h3", { className: w.title, children: s }),
1286
+ return /* @__PURE__ */ t.jsxs("div", { className: S.productsBlock, children: [
1287
+ (s || n !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: S.top, children: [
1288
+ s && /* @__PURE__ */ t.jsx("h3", { className: S.title, children: s }),
1328
1289
  n !== void 0 && /* @__PURE__ */ t.jsx(
1329
- H,
1290
+ W,
1330
1291
  {
1331
1292
  current: n,
1332
- onChange: (g) => e == null ? void 0 : e(g)
1293
+ onChange: (f) => e == null ? void 0 : e(f)
1333
1294
  }
1334
1295
  )
1335
1296
  ] }),
1336
- V && r && /* @__PURE__ */ t.jsx(
1337
- Hs,
1297
+ R && d && /* @__PURE__ */ t.jsx(
1298
+ Rs,
1338
1299
  {
1339
- activeItem: r,
1340
- setActiveItem: B,
1341
- setIsOpenModal: y,
1342
- popupPosition: Y
1300
+ activeItem: d,
1301
+ setActiveItem: P,
1302
+ setIsOpenModal: j,
1303
+ popupPosition: U,
1304
+ itemsOptions: g
1343
1305
  }
1344
1306
  ),
1345
- /* @__PURE__ */ t.jsxs("div", { className: w.products, children: [
1346
- i && /* @__PURE__ */ t.jsx("h5", { className: w.subtitle, children: i }),
1347
- v ? /* @__PURE__ */ t.jsx(ut, { backend: _t, children: o.map((g, k) => st(g, k)) }) : o.map((g, k) => st(g, k)),
1307
+ /* @__PURE__ */ t.jsxs("div", { className: S.products, children: [
1308
+ c && /* @__PURE__ */ t.jsx("h5", { className: S.subtitle, children: c }),
1309
+ y ? /* @__PURE__ */ t.jsx(ht, { backend: gt, children: o.map((f, k) => st(f, k)) }) : o.map((f, k) => st(f, k)),
1348
1310
  h && /* @__PURE__ */ t.jsxs(
1349
- X,
1311
+ dt,
1350
1312
  {
1351
- className: w.button,
1313
+ className: S.button,
1352
1314
  size: "s",
1353
1315
  onClick: () => {
1354
- const g = [...o], k = b[0].id;
1355
- g.push({
1356
- name: `Product ${k}`,
1357
- id: et(),
1358
- listingId: k,
1359
- imagePath: "",
1360
- images: [],
1361
- stats: {
1362
- ...b[0].productData.stats,
1363
- newPrice: b[0].productData.minPrice.amount,
1364
- oldPrice: b[0].productData.compareAtPrice.amount
1316
+ const f = [...o];
1317
+ for (let k = 0; k < g.length; k++)
1318
+ if (!o.find((w) => w.listingId === g[k].id)) {
1319
+ f.push({
1320
+ listingId: g[k].id,
1321
+ image: g[k].productData.images.length > 0 ? g[k].productData.images[0].cfId : ""
1322
+ });
1323
+ break;
1365
1324
  }
1366
- }), c(g);
1325
+ i(f);
1367
1326
  },
1327
+ disabled: o.length === g.length,
1368
1328
  children: [
1369
1329
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
1370
1330
  /* @__PURE__ */ t.jsx(
@@ -1379,120 +1339,164 @@ const jt = "_accordion_9e4oa_1", vt = "_header_9e4oa_9", kt = "_icon_9e4oa_18",
1379
1339
  }
1380
1340
  )
1381
1341
  ] }),
1382
- l !== void 0 && /* @__PURE__ */ t.jsx(ft, { items: l })
1342
+ a !== void 0 && /* @__PURE__ */ t.jsx(kt, { items: a })
1383
1343
  ] });
1384
- }, Fs = "_options_11lki_1", Us = "_price_11lki_12", Gs = "_oldPrice_11lki_19", Ws = "_newPrice_11lki_27", Xs = "_meta_11lki_34", Ys = "_info_11lki_40", Qs = "_infoRight_11lki_48", Js = "_buttons_11lki_55", Ks = "_variants_11lki_62", Zs = "_variant_11lki_62", tn = "_stock_11lki_79", en = "_variantInfo_11lki_86", sn = "_quantity_11lki_92", nn = "_count_11lki_99", cn = "_button_11lki_55", on = "_activeVariant_11lki_120", an = "_chargeTypes_11lki_124", ln = "_charge_11lki_124", rn = "_chargeActive_11lki_145", dn = "_title_11lki_150", j = {
1385
- options: Fs,
1386
- price: Us,
1387
- oldPrice: Gs,
1388
- newPrice: Ws,
1389
- meta: Xs,
1390
- info: Ys,
1391
- infoRight: Qs,
1392
- buttons: Js,
1393
- variants: Ks,
1394
- variant: Zs,
1395
- stock: tn,
1396
- variantInfo: en,
1397
- quantity: sn,
1398
- count: nn,
1399
- button: cn,
1400
- activeVariant: on,
1401
- chargeTypes: an,
1402
- charge: ln,
1403
- chargeActive: rn,
1404
- title: dn
1344
+ }, Hs = "_options_11lki_1", Fs = "_price_11lki_12", Us = "_oldPrice_11lki_19", Gs = "_newPrice_11lki_27", Ws = "_meta_11lki_34", Xs = "_info_11lki_40", Ys = "_infoRight_11lki_48", Qs = "_buttons_11lki_55", Js = "_variants_11lki_62", Ks = "_variant_11lki_62", Zs = "_stock_11lki_79", tn = "_variantInfo_11lki_86", en = "_quantity_11lki_92", sn = "_count_11lki_99", nn = "_button_11lki_55", cn = "_activeVariant_11lki_120", on = "_chargeTypes_11lki_124", an = "_charge_11lki_124", ln = "_chargeActive_11lki_145", rn = "_title_11lki_150", v = {
1345
+ options: Hs,
1346
+ price: Fs,
1347
+ oldPrice: Us,
1348
+ newPrice: Gs,
1349
+ meta: Ws,
1350
+ info: Xs,
1351
+ infoRight: Ys,
1352
+ buttons: Qs,
1353
+ variants: Js,
1354
+ variant: Ks,
1355
+ stock: Zs,
1356
+ variantInfo: tn,
1357
+ quantity: en,
1358
+ count: sn,
1359
+ button: nn,
1360
+ activeVariant: cn,
1361
+ chargeTypes: on,
1362
+ charge: an,
1363
+ chargeActive: ln,
1364
+ title: rn
1365
+ }, dn = "_button_143au_1", un = "_primary_143au_13", _n = "_secondary_143au_18", mn = "_tertiary_143au_23", pn = "_content_143au_28", tt = {
1366
+ button: dn,
1367
+ primary: un,
1368
+ secondary: _n,
1369
+ tertiary: mn,
1370
+ content: pn
1371
+ }, lt = (r) => {
1372
+ const {
1373
+ children: n,
1374
+ onClick: e,
1375
+ style: o,
1376
+ className: i,
1377
+ disabled: a = !1,
1378
+ size: s = "m",
1379
+ type: c = "Primary"
1380
+ } = r;
1381
+ return /* @__PURE__ */ t.jsx(
1382
+ "button",
1383
+ {
1384
+ className: q(tt.button, i, {
1385
+ [tt.primary]: c === "Primary",
1386
+ [tt.secondary]: c === "Secondary",
1387
+ [tt.tertiary]: c === "Tertiary"
1388
+ }),
1389
+ onClick: e,
1390
+ style: {
1391
+ ...o,
1392
+ fontSize: s === "m" ? 14 : s === "s" ? 12 : 16
1393
+ },
1394
+ disabled: a,
1395
+ children: c === "Tertiary" ? /* @__PURE__ */ t.jsxs("div", { className: tt.content, children: [
1396
+ /* @__PURE__ */ t.jsx(
1397
+ p,
1398
+ {
1399
+ name: "ArrowRight",
1400
+ fill: "#757575",
1401
+ width: 20,
1402
+ height: 20
1403
+ }
1404
+ ),
1405
+ n
1406
+ ] }) : /* @__PURE__ */ t.jsx(t.Fragment, { children: n })
1407
+ }
1408
+ );
1405
1409
  };
1406
- var bt = /* @__PURE__ */ ((d) => (d.ONE_TIME = "One-Time", d.RECURRING = "Subscribe & Save", d))(bt || {});
1407
- const oc = (d) => {
1408
- const { variants: n } = d, [e, o] = f.useState(n[0]), [c, l] = f.useState(e.chargeTypes[0]), s = at(), [i, m] = f.useState(1), { reset: v, addProductToCart: u, getProducts: a } = lt();
1410
+ var yt = /* @__PURE__ */ ((r) => (r.ONE_TIME = "One-Time", r.RECURRING = "Subscribe & Save", r))(yt || {});
1411
+ const $c = (r) => {
1412
+ const { variants: n } = r, [e, o] = b.useState(n[0]), [i, a] = b.useState(e.chargeTypes[0]), s = ut(), [c, u] = b.useState(1), { reset: y, addProductToCart: _, getProducts: l } = _t();
1409
1413
  async function h() {
1410
- await a(), await u({
1411
- productId: d.id,
1414
+ await l(), await _({
1415
+ productId: r.id,
1412
1416
  productVariantId: e.id,
1413
- quantity: i
1417
+ quantity: c
1414
1418
  });
1415
1419
  }
1416
- function $() {
1417
- v(), h(), s("/checkout");
1420
+ function N() {
1421
+ y(), h(), s("/checkout");
1418
1422
  }
1419
- function b(r) {
1420
- if (r >= 864e5) {
1421
- const y = Math.floor(r / 864e5);
1422
- return `${y} ${y === 1 ? "day" : "days"}`;
1423
- } else if (r >= 36e5) {
1424
- const y = Math.floor(r / 36e5);
1425
- return `${y} ${y === 1 ? "hour" : "hours"}`;
1426
- } else if (r >= 6e4) {
1427
- const y = Math.floor(r / 6e4);
1428
- return `${y} ${y === 1 ? "minute" : "minutes"}`;
1423
+ function g(d) {
1424
+ if (d >= 864e5) {
1425
+ const j = Math.floor(d / 864e5);
1426
+ return `${j} ${j === 1 ? "day" : "days"}`;
1427
+ } else if (d >= 36e5) {
1428
+ const j = Math.floor(d / 36e5);
1429
+ return `${j} ${j === 1 ? "hour" : "hours"}`;
1430
+ } else if (d >= 6e4) {
1431
+ const j = Math.floor(d / 6e4);
1432
+ return `${j} ${j === 1 ? "minute" : "minutes"}`;
1429
1433
  } else {
1430
- const y = Math.floor(r / 1e3);
1431
- return `${y} ${y === 1 ? "second" : "seconds"}`;
1434
+ const j = Math.floor(d / 1e3);
1435
+ return `${j} ${j === 1 ? "second" : "seconds"}`;
1432
1436
  }
1433
1437
  }
1434
- return /* @__PURE__ */ t.jsxs("div", { className: j.options, children: [
1435
- e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: j.chargeTypes, children: e.chargeTypes.map((r) => /* @__PURE__ */ t.jsx(
1438
+ return /* @__PURE__ */ t.jsxs("div", { className: v.options, children: [
1439
+ e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: v.chargeTypes, children: e.chargeTypes.map((d) => /* @__PURE__ */ t.jsx(
1436
1440
  "div",
1437
1441
  {
1438
- className: D(j.charge, {
1439
- [j.chargeActive]: c === r
1442
+ className: q(v.charge, {
1443
+ [v.chargeActive]: i === d
1440
1444
  }),
1441
- onClick: () => l(r),
1442
- children: bt[r]
1445
+ onClick: () => a(d),
1446
+ children: yt[d]
1443
1447
  },
1444
- r
1448
+ d
1445
1449
  )) }),
1446
- /* @__PURE__ */ t.jsx("div", { className: j.variants, children: n.map((r) => /* @__PURE__ */ t.jsxs(
1450
+ /* @__PURE__ */ t.jsx("div", { className: v.variants, children: n.map((d) => /* @__PURE__ */ t.jsxs(
1447
1451
  "div",
1448
1452
  {
1449
- className: D(j.variant, {
1450
- [j.activeVariant]: e.id === r.id
1453
+ className: q(v.variant, {
1454
+ [v.activeVariant]: e.id === d.id
1451
1455
  }),
1452
- onClick: () => o(r),
1456
+ onClick: () => o(d),
1453
1457
  children: [
1454
- /* @__PURE__ */ t.jsxs("div", { className: j.variantInfo, children: [
1455
- /* @__PURE__ */ t.jsx("span", { className: j.title, children: r.name }),
1458
+ /* @__PURE__ */ t.jsxs("div", { className: v.variantInfo, children: [
1459
+ /* @__PURE__ */ t.jsx("span", { className: v.title, children: d.name }),
1456
1460
  /* @__PURE__ */ t.jsxs("span", { children: [
1457
1461
  "$",
1458
- c === "ONE_TIME" ? r.price.amount : r.subscriptionSettings.price.amount
1462
+ i === "ONE_TIME" ? d.price.amount : d.subscriptionSettings.price.amount
1459
1463
  ] })
1460
1464
  ] }),
1461
- /* @__PURE__ */ t.jsx("div", { children: c === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: j.stock, children: [
1462
- r.quantity.restrictions.max || 0,
1465
+ /* @__PURE__ */ t.jsx("div", { children: i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: v.stock, children: [
1466
+ d.quantity.restrictions.max || 0,
1463
1467
  " in stock"
1464
1468
  ] }) })
1465
1469
  ]
1466
1470
  },
1467
- r.id
1471
+ d.id
1468
1472
  )) }),
1469
- c === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: j.quantity, children: [
1473
+ i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: v.quantity, children: [
1470
1474
  /* @__PURE__ */ t.jsx(
1471
1475
  "div",
1472
1476
  {
1473
1477
  onClick: () => {
1474
- i > 1 ? m((r) => r - 1) : m(1);
1478
+ c > 1 ? u((d) => d - 1) : u(1);
1475
1479
  },
1476
- className: j.button,
1480
+ className: v.button,
1477
1481
  children: /* @__PURE__ */ t.jsx(p, { name: "Minus" })
1478
1482
  }
1479
1483
  ),
1480
- /* @__PURE__ */ t.jsx("div", { className: j.count, children: i }),
1484
+ /* @__PURE__ */ t.jsx("div", { className: v.count, children: c }),
1481
1485
  /* @__PURE__ */ t.jsx(
1482
1486
  "div",
1483
1487
  {
1484
1488
  onClick: () => {
1485
- m((r) => r + 1);
1489
+ u((d) => d + 1);
1486
1490
  },
1487
- className: j.button,
1491
+ className: v.button,
1488
1492
  children: /* @__PURE__ */ t.jsx(p, { name: "Plus" })
1489
1493
  }
1490
1494
  )
1491
1495
  ] }),
1492
- /* @__PURE__ */ t.jsxs("div", { className: j.meta, children: [
1493
- /* @__PURE__ */ t.jsxs("div", { className: j.info, children: [
1496
+ /* @__PURE__ */ t.jsxs("div", { className: v.meta, children: [
1497
+ /* @__PURE__ */ t.jsxs("div", { className: v.info, children: [
1494
1498
  /* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
1495
- /* @__PURE__ */ t.jsxs("div", { className: j.infoRight, children: [
1499
+ /* @__PURE__ */ t.jsxs("div", { className: v.infoRight, children: [
1496
1500
  /* @__PURE__ */ t.jsx(
1497
1501
  p,
1498
1502
  {
@@ -1502,49 +1506,49 @@ const oc = (d) => {
1502
1506
  height: 20
1503
1507
  }
1504
1508
  ),
1505
- /* @__PURE__ */ t.jsx("span", { children: e.deliveryTime === 0 ? "Instant" : b(e.deliveryTime) })
1509
+ /* @__PURE__ */ t.jsx("span", { children: e.deliveryTime === 0 ? "Instant" : g(e.deliveryTime) })
1506
1510
  ] })
1507
1511
  ] }),
1508
- /* @__PURE__ */ t.jsxs("div", { className: j.info, children: [
1512
+ /* @__PURE__ */ t.jsxs("div", { className: v.info, children: [
1509
1513
  /* @__PURE__ */ t.jsx("span", { children: "Price" }),
1510
- /* @__PURE__ */ t.jsx("div", { className: j.infoRight, children: c === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: j.price, children: [
1511
- /* @__PURE__ */ t.jsxs("span", { className: j.newPrice, children: [
1514
+ /* @__PURE__ */ t.jsx("div", { className: v.infoRight, children: i === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: v.price, children: [
1515
+ /* @__PURE__ */ t.jsxs("span", { className: v.newPrice, children: [
1512
1516
  "$ ",
1513
- (e.price.amount || 0) * i
1517
+ (e.price.amount || 0) * c
1514
1518
  ] }),
1515
- /* @__PURE__ */ t.jsxs("span", { className: j.oldPrice, children: [
1519
+ /* @__PURE__ */ t.jsxs("span", { className: v.oldPrice, children: [
1516
1520
  "$ ",
1517
- (e.compareAtPrice.amount || 0) * i
1521
+ (e.compareAtPrice.amount || 0) * c
1518
1522
  ] })
1519
- ] }) : /* @__PURE__ */ t.jsxs("span", { className: j.newPrice, children: [
1523
+ ] }) : /* @__PURE__ */ t.jsxs("span", { className: v.newPrice, children: [
1520
1524
  "$ ",
1521
- (e.price.amount || 0) * i
1522
- ] }) : e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: j.price, children: [
1523
- /* @__PURE__ */ t.jsxs("span", { className: j.newPrice, children: [
1525
+ (e.price.amount || 0) * c
1526
+ ] }) : e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: v.price, children: [
1527
+ /* @__PURE__ */ t.jsxs("span", { className: v.newPrice, children: [
1524
1528
  "$ ",
1525
1529
  e.subscriptionSettings.price.amount || 0
1526
1530
  ] }),
1527
- /* @__PURE__ */ t.jsxs("span", { className: j.oldPrice, children: [
1531
+ /* @__PURE__ */ t.jsxs("span", { className: v.oldPrice, children: [
1528
1532
  "$ ",
1529
1533
  e.subscriptionSettings.compareAtPrice.amount || 0
1530
1534
  ] })
1531
- ] }) : /* @__PURE__ */ t.jsxs("span", { className: j.newPrice, children: [
1535
+ ] }) : /* @__PURE__ */ t.jsxs("span", { className: v.newPrice, children: [
1532
1536
  "$ ",
1533
1537
  e.subscriptionSettings.price.amount || 0
1534
1538
  ] }) })
1535
1539
  ] })
1536
1540
  ] }),
1537
- /* @__PURE__ */ t.jsxs("div", { className: j.buttons, children: [
1541
+ /* @__PURE__ */ t.jsxs("div", { className: v.buttons, children: [
1538
1542
  /* @__PURE__ */ t.jsx(
1539
- X,
1543
+ lt,
1540
1544
  {
1541
1545
  type: "Primary",
1542
- onClick: () => $(),
1543
- children: /* @__PURE__ */ t.jsx("span", { children: c === "ONE_TIME" ? "Buy Now" : "Subscribe Now" })
1546
+ onClick: () => N(),
1547
+ children: /* @__PURE__ */ t.jsx("span", { children: i === "ONE_TIME" ? "Buy Now" : "Subscribe Now" })
1544
1548
  }
1545
1549
  ),
1546
- c === "ONE_TIME" && /* @__PURE__ */ t.jsx(
1547
- X,
1550
+ i === "ONE_TIME" && /* @__PURE__ */ t.jsx(
1551
+ lt,
1548
1552
  {
1549
1553
  type: "Secondary",
1550
1554
  onClick: () => h(),
@@ -1553,96 +1557,96 @@ const oc = (d) => {
1553
1557
  )
1554
1558
  ] })
1555
1559
  ] });
1556
- }, un = "_button_1kcpz_1", _n = "_login_1kcpz_14", mn = "_signUp_1kcpz_18", pn = "_buttons_1kcpz_23", hn = "_modal_1kcpz_32", gn = "_info_1kcpz_48", xn = "_top_1kcpz_55", fn = "_title_1kcpz_66", bn = "_clear_1kcpz_72", jn = "_activeClear_1kcpz_79", vn = "_count_1kcpz_83", kn = "_cart_1kcpz_98", yn = "_empty_1kcpz_106", Nn = "_product_1kcpz_132", $n = "_products_1kcpz_141", Cn = "_image_1kcpz_149", In = "_productInfo_1kcpz_155", Pn = "_content_1kcpz_162", Tn = "_name_1kcpz_168", wn = "_price_1kcpz_174", Bn = "_productButtons_1kcpz_180", Sn = "_productButton_1kcpz_180", qn = "_productCount_1kcpz_200", An = "_bottom_1kcpz_216", On = "_subtotal_1kcpz_224", Ln = "_block_1kcpz_232", Dn = "_shoppingCount_1kcpz_239", zn = "_total_1kcpz_259", En = "_link_1kcpz_265", x = {
1557
- button: un,
1558
- login: _n,
1559
- signUp: mn,
1560
- buttons: pn,
1561
- modal: hn,
1562
- info: gn,
1563
- top: xn,
1564
- title: fn,
1565
- clear: bn,
1566
- activeClear: jn,
1567
- count: vn,
1568
- cart: kn,
1569
- empty: yn,
1570
- product: Nn,
1571
- products: $n,
1572
- image: Cn,
1573
- productInfo: In,
1574
- content: Pn,
1575
- name: Tn,
1576
- price: wn,
1577
- productButtons: Bn,
1578
- productButton: Sn,
1579
- productCount: qn,
1580
- bottom: An,
1581
- subtotal: On,
1582
- block: Ln,
1583
- shoppingCount: Dn,
1584
- total: zn,
1585
- link: En
1586
- }, ic = (d) => {
1587
- const { shopping: n, signUp: e } = d, o = at();
1588
- function c(l) {
1589
- o(l);
1560
+ }, hn = "_button_1kcpz_1", gn = "_login_1kcpz_14", xn = "_signUp_1kcpz_18", fn = "_buttons_1kcpz_23", bn = "_modal_1kcpz_32", jn = "_info_1kcpz_48", vn = "_top_1kcpz_55", kn = "_title_1kcpz_66", yn = "_clear_1kcpz_72", Nn = "_activeClear_1kcpz_79", $n = "_count_1kcpz_83", In = "_cart_1kcpz_98", Cn = "_empty_1kcpz_106", wn = "_product_1kcpz_132", Tn = "_products_1kcpz_141", Bn = "_image_1kcpz_149", Pn = "_productInfo_1kcpz_155", Sn = "_content_1kcpz_162", qn = "_name_1kcpz_168", An = "_price_1kcpz_174", On = "_productButtons_1kcpz_180", Ln = "_productButton_1kcpz_180", Dn = "_productCount_1kcpz_200", zn = "_bottom_1kcpz_216", Mn = "_subtotal_1kcpz_224", En = "_block_1kcpz_232", Rn = "_shoppingCount_1kcpz_239", Vn = "_total_1kcpz_259", Hn = "_link_1kcpz_265", x = {
1561
+ button: hn,
1562
+ login: gn,
1563
+ signUp: xn,
1564
+ buttons: fn,
1565
+ modal: bn,
1566
+ info: jn,
1567
+ top: vn,
1568
+ title: kn,
1569
+ clear: yn,
1570
+ activeClear: Nn,
1571
+ count: $n,
1572
+ cart: In,
1573
+ empty: Cn,
1574
+ product: wn,
1575
+ products: Tn,
1576
+ image: Bn,
1577
+ productInfo: Pn,
1578
+ content: Sn,
1579
+ name: qn,
1580
+ price: An,
1581
+ productButtons: On,
1582
+ productButton: Ln,
1583
+ productCount: Dn,
1584
+ bottom: zn,
1585
+ subtotal: Mn,
1586
+ block: En,
1587
+ shoppingCount: Rn,
1588
+ total: Vn,
1589
+ link: Hn
1590
+ }, Ic = (r) => {
1591
+ const { shopping: n, signUp: e } = r, o = ut();
1592
+ function i(a) {
1593
+ o(a);
1590
1594
  }
1591
1595
  return /* @__PURE__ */ t.jsxs("div", { className: x.buttons, children: [
1592
- n && /* @__PURE__ */ t.jsx(Mn, {}),
1596
+ n && /* @__PURE__ */ t.jsx(Fn, {}),
1593
1597
  /* @__PURE__ */ t.jsx(
1594
1598
  "div",
1595
1599
  {
1596
- className: D(x.button, x.login),
1597
- onClick: () => c("/customer-dash"),
1600
+ className: q(x.button, x.login),
1601
+ onClick: () => i("/customer-dash"),
1598
1602
  children: "Login"
1599
1603
  }
1600
1604
  ),
1601
1605
  e && /* @__PURE__ */ t.jsx(
1602
1606
  "div",
1603
1607
  {
1604
- className: D(x.button, x.login, x.signUp),
1605
- onClick: () => c("/customer-dash"),
1608
+ className: q(x.button, x.login, x.signUp),
1609
+ onClick: () => i("/customer-dash"),
1606
1610
  children: "Sign Up"
1607
1611
  }
1608
1612
  )
1609
1613
  ] });
1610
- }, Mn = () => {
1611
- const [d, n] = f.useState(!1), [e, o] = f.useState([]), { cart: c, getProducts: l } = lt();
1612
- function s(u) {
1613
- for (let a = 0; a < c.parts.length; a++)
1614
- for (let h = 0; h < u.variants.length; h++)
1615
- if (c.parts[a].productVariantId === u.variants[a].id)
1616
- return c.parts[a].productVariantId;
1614
+ }, Fn = () => {
1615
+ const [r, n] = b.useState(!1), [e, o] = b.useState([]), { cart: i, getProducts: a } = _t();
1616
+ function s(_) {
1617
+ for (let l = 0; l < i.parts.length; l++)
1618
+ for (let h = 0; h < _.variants.length; h++)
1619
+ if (i.parts[l].productVariantId === _.variants[l].id)
1620
+ return i.parts[l].productVariantId;
1617
1621
  }
1618
- function i(u) {
1619
- for (let a = 0; a < c.parts.length; a++)
1620
- for (let h = 0; h < u.variants.length; h++)
1621
- if (c.parts[a].productVariantId === u.variants[a].id)
1622
- return c.parts[a].quantity;
1622
+ function c(_) {
1623
+ for (let l = 0; l < i.parts.length; l++)
1624
+ for (let h = 0; h < _.variants.length; h++)
1625
+ if (i.parts[l].productVariantId === _.variants[l].id)
1626
+ return i.parts[l].quantity;
1623
1627
  }
1624
- f.useEffect(() => {
1628
+ b.useEffect(() => {
1625
1629
  (async () => {
1626
- const a = c.parts.map((b) => String(b.productId)), $ = (await l([...a])).map((b) => ({
1627
- ...b,
1628
- activeVariantId: s(b),
1629
- quantity: i(b)
1630
+ const l = i.parts.map((g) => String(g.productId)), N = (await a([...l])).map((g) => ({
1631
+ ...g,
1632
+ activeVariantId: s(g),
1633
+ quantity: c(g)
1630
1634
  }));
1631
- o($);
1635
+ o(N);
1632
1636
  })();
1633
- }, [c]);
1634
- function m(u) {
1635
- var a;
1636
- return !u || !(u != null && u.variants) ? !1 : (a = u.variants.find((h) => h.id === u.activeVariantId)) == null ? void 0 : a.subscriptionSettings;
1637
+ }, [i]);
1638
+ function u(_) {
1639
+ var l;
1640
+ return !_ || !(_ != null && _.variants) ? !1 : (l = _.variants.find((h) => h.id === _.activeVariantId)) == null ? void 0 : l.subscriptionSettings;
1637
1641
  }
1638
- const v = c.parts.length > 0 && e.length > 0 && !m(e[0]);
1642
+ const y = i.parts.length > 0 && e.length > 0 && !u(e[0]);
1639
1643
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1640
1644
  /* @__PURE__ */ t.jsxs(
1641
1645
  "div",
1642
1646
  {
1643
1647
  className: x.button,
1644
- onClick: (u) => {
1645
- u.stopPropagation(), n(!0);
1648
+ onClick: (_) => {
1649
+ _.stopPropagation(), n(!0);
1646
1650
  },
1647
1651
  children: [
1648
1652
  /* @__PURE__ */ t.jsx(
@@ -1652,42 +1656,42 @@ const oc = (d) => {
1652
1656
  fill: "var(--icon-primary)"
1653
1657
  }
1654
1658
  ),
1655
- v && /* @__PURE__ */ t.jsx("div", { className: x.shoppingCount, children: c.parts.length })
1659
+ y && /* @__PURE__ */ t.jsx("div", { className: x.shoppingCount, children: i.parts.length })
1656
1660
  ]
1657
1661
  }
1658
1662
  ),
1659
- d && /* @__PURE__ */ t.jsx(ht, { close: n, children: /* @__PURE__ */ t.jsx(
1660
- Rn,
1663
+ r && /* @__PURE__ */ t.jsx(bt, { close: n, children: /* @__PURE__ */ t.jsx(
1664
+ Un,
1661
1665
  {
1662
1666
  activeProducts: e,
1663
- isCartNotEmpty: v
1667
+ isCartNotEmpty: y
1664
1668
  }
1665
1669
  ) })
1666
1670
  ] });
1667
- }, Rn = (d) => {
1668
- const { activeProducts: n, isCartNotEmpty: e } = d, { cart: o, reset: c, getTotalAndDiscount: l, updateQuantityOfProduct: s } = lt(), i = at();
1669
- function m(a) {
1670
- i(a);
1671
+ }, Un = (r) => {
1672
+ const { activeProducts: n, isCartNotEmpty: e } = r, { cart: o, reset: i, getTotalAndDiscount: a, updateQuantityOfProduct: s } = _t(), c = ut();
1673
+ function u(l) {
1674
+ c(l);
1671
1675
  }
1672
- function v(a) {
1676
+ function y(l) {
1673
1677
  s({
1674
- productId: a.id,
1675
- productVariantId: a.activeVariantId,
1676
- quantity: a.quantity + 1
1678
+ productId: l.id,
1679
+ productVariantId: l.activeVariantId,
1680
+ quantity: l.quantity + 1
1677
1681
  });
1678
1682
  }
1679
- function u(a) {
1683
+ function _(l) {
1680
1684
  s({
1681
- productId: a.id,
1682
- productVariantId: a.activeVariantId,
1683
- quantity: a.quantity - 1
1685
+ productId: l.id,
1686
+ productVariantId: l.activeVariantId,
1687
+ quantity: l.quantity - 1
1684
1688
  });
1685
1689
  }
1686
1690
  return /* @__PURE__ */ t.jsxs(
1687
1691
  "div",
1688
1692
  {
1689
1693
  className: x.modal,
1690
- onClick: (a) => a.stopPropagation(),
1694
+ onClick: (l) => l.stopPropagation(),
1691
1695
  children: [
1692
1696
  /* @__PURE__ */ t.jsxs("div", { className: x.top, children: [
1693
1697
  /* @__PURE__ */ t.jsxs("div", { className: x.info, children: [
@@ -1697,17 +1701,17 @@ const oc = (d) => {
1697
1701
  /* @__PURE__ */ t.jsx(
1698
1702
  "button",
1699
1703
  {
1700
- className: D(x.clear, {
1704
+ className: q(x.clear, {
1701
1705
  [x.activeClear]: e
1702
1706
  }),
1703
1707
  disabled: !e,
1704
- onClick: () => c(),
1708
+ onClick: () => i(),
1705
1709
  children: "Clear all"
1706
1710
  }
1707
1711
  )
1708
1712
  ] }),
1709
1713
  e ? /* @__PURE__ */ t.jsxs("div", { className: x.cart, children: [
1710
- /* @__PURE__ */ t.jsx("div", { className: x.products, children: n.map((a) => /* @__PURE__ */ t.jsxs(
1714
+ /* @__PURE__ */ t.jsx("div", { className: x.products, children: n.map((l) => /* @__PURE__ */ t.jsxs(
1711
1715
  "div",
1712
1716
  {
1713
1717
  className: x.product,
@@ -1716,7 +1720,7 @@ const oc = (d) => {
1716
1720
  /* @__PURE__ */ t.jsx(
1717
1721
  "img",
1718
1722
  {
1719
- src: `https://imagedelivery.net/${a.images[0].cfId}/w=500`,
1723
+ src: `https://imagedelivery.net/${l.images[0].cfId}/w=500`,
1720
1724
  alt: "image",
1721
1725
  width: "100%",
1722
1726
  height: "100%",
@@ -1724,10 +1728,10 @@ const oc = (d) => {
1724
1728
  }
1725
1729
  ),
1726
1730
  /* @__PURE__ */ t.jsxs("div", { className: x.content, children: [
1727
- /* @__PURE__ */ t.jsx("div", { className: x.name, children: a.name }),
1731
+ /* @__PURE__ */ t.jsx("div", { className: x.name, children: l.name }),
1728
1732
  /* @__PURE__ */ t.jsxs("div", { className: x.price, children: [
1729
1733
  "$",
1730
- a.variants.find((h) => h.id === a.activeVariantId).price.amount * ((a == null ? void 0 : a.quantity) || 1)
1734
+ l.variants.find((h) => h.id === l.activeVariantId).price.amount * ((l == null ? void 0 : l.quantity) || 1)
1731
1735
  ] })
1732
1736
  ] })
1733
1737
  ] }),
@@ -1736,7 +1740,7 @@ const oc = (d) => {
1736
1740
  "div",
1737
1741
  {
1738
1742
  onClick: () => {
1739
- a.quantity !== 1 && u(a);
1743
+ l.quantity !== 1 && _(l);
1740
1744
  },
1741
1745
  className: x.productButton,
1742
1746
  children: /* @__PURE__ */ t.jsx(
@@ -1750,11 +1754,11 @@ const oc = (d) => {
1750
1754
  )
1751
1755
  }
1752
1756
  ),
1753
- /* @__PURE__ */ t.jsx("div", { className: x.productCount, children: a.quantity }),
1757
+ /* @__PURE__ */ t.jsx("div", { className: x.productCount, children: l.quantity }),
1754
1758
  /* @__PURE__ */ t.jsx(
1755
1759
  "div",
1756
1760
  {
1757
- onClick: () => v(a),
1761
+ onClick: () => y(l),
1758
1762
  className: x.productButton,
1759
1763
  children: /* @__PURE__ */ t.jsx(
1760
1764
  p,
@@ -1770,7 +1774,7 @@ const oc = (d) => {
1770
1774
  ] })
1771
1775
  ]
1772
1776
  },
1773
- a.id
1777
+ l.id
1774
1778
  )) }),
1775
1779
  /* @__PURE__ */ t.jsxs("div", { className: x.bottom, children: [
1776
1780
  /* @__PURE__ */ t.jsxs("div", { className: x.subtotal, children: [
@@ -1788,16 +1792,16 @@ const oc = (d) => {
1788
1792
  ] }),
1789
1793
  /* @__PURE__ */ t.jsxs("div", { className: x.total, children: [
1790
1794
  "$",
1791
- l().total
1795
+ a().total
1792
1796
  ] })
1793
1797
  ] }),
1794
- /* @__PURE__ */ t.jsx(X, { onClick: () => m("/checkout"), children: "Checkout" })
1798
+ /* @__PURE__ */ t.jsx(lt, { onClick: () => u("/checkout"), children: "Checkout" })
1795
1799
  ] })
1796
- ] }) : /* @__PURE__ */ t.jsx(Hn, {})
1800
+ ] }) : /* @__PURE__ */ t.jsx(Gn, {})
1797
1801
  ]
1798
1802
  }
1799
1803
  );
1800
- }, Hn = () => /* @__PURE__ */ t.jsxs("div", { className: x.empty, children: [
1804
+ }, Gn = () => /* @__PURE__ */ t.jsxs("div", { className: x.empty, children: [
1801
1805
  /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(p, { name: "Handbag" }) }),
1802
1806
  /* @__PURE__ */ t.jsx("span", { children: "Your cart is empty" }),
1803
1807
  /* @__PURE__ */ t.jsxs("span", { children: [
@@ -1812,26 +1816,26 @@ const oc = (d) => {
1812
1816
  }
1813
1817
  )
1814
1818
  ] })
1815
- ] }), Vn = "_share_9g414_1", Fn = "_modal_9g414_8", Un = "_header_9g414_14", Gn = "_socials_9g414_24", Wn = "_social_9g414_24", Xn = "_copy_9g414_34", Yn = "_title_9g414_41", Qn = "_copyWrapper_9g414_47", Jn = "_copyText_9g414_56", L = {
1816
- share: Vn,
1817
- modal: Fn,
1818
- header: Un,
1819
- socials: Gn,
1820
- social: Wn,
1821
- copy: Xn,
1822
- title: Yn,
1823
- copyWrapper: Qn,
1824
- copyText: Jn
1825
- }, ac = () => {
1826
- const { isOpenModal: d, setIsOpenModal: n } = gt();
1819
+ ] }), Wn = "_share_9g414_1", Xn = "_modal_9g414_8", Yn = "_header_9g414_14", Qn = "_socials_9g414_24", Jn = "_social_9g414_24", Kn = "_copy_9g414_34", Zn = "_title_9g414_41", tc = "_copyWrapper_9g414_47", ec = "_copyText_9g414_56", z = {
1820
+ share: Wn,
1821
+ modal: Xn,
1822
+ header: Yn,
1823
+ socials: Qn,
1824
+ social: Jn,
1825
+ copy: Kn,
1826
+ title: Zn,
1827
+ copyWrapper: tc,
1828
+ copyText: ec
1829
+ }, Cc = () => {
1830
+ const { isOpenModal: r, setIsOpenModal: n } = jt();
1827
1831
  function e() {
1828
1832
  n(!0);
1829
1833
  }
1830
- return console.log(d), /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1834
+ return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1831
1835
  /* @__PURE__ */ t.jsx(
1832
1836
  "div",
1833
1837
  {
1834
- className: L.share,
1838
+ className: z.share,
1835
1839
  onClick: (o) => {
1836
1840
  o.stopPropagation(), e();
1837
1841
  },
@@ -1844,43 +1848,43 @@ const oc = (d) => {
1844
1848
  )
1845
1849
  }
1846
1850
  ),
1847
- d && /* @__PURE__ */ t.jsx(ht, { close: n, children: /* @__PURE__ */ t.jsx(Kn, {}) })
1851
+ r && /* @__PURE__ */ t.jsx(bt, { close: n, children: /* @__PURE__ */ t.jsx(sc, {}) })
1848
1852
  ] });
1849
- }, rt = {
1853
+ }, mt = {
1850
1854
  facebook: "FacebookLogo",
1851
1855
  "x.com": "TwitterLogo",
1852
1856
  telegram: "TelegramLogo",
1853
1857
  instagram: "InstagramLogo",
1854
1858
  discord: "MessengerLogo",
1855
1859
  tiktok: "TiktokLogo"
1856
- }, Kn = () => {
1857
- const { setIsOpenModal: d } = gt(), n = window.location.href;
1860
+ }, sc = () => {
1861
+ const { setIsOpenModal: r } = jt(), n = window.location.href;
1858
1862
  function e() {
1859
1863
  navigator.clipboard.writeText(n);
1860
1864
  }
1861
1865
  return /* @__PURE__ */ t.jsxs(
1862
1866
  "div",
1863
1867
  {
1864
- className: L.modal,
1868
+ className: z.modal,
1865
1869
  onClick: (o) => o.stopPropagation(),
1866
1870
  children: [
1867
- /* @__PURE__ */ t.jsxs("div", { className: L.header, children: [
1868
- /* @__PURE__ */ t.jsx("div", { className: L.title, children: "Share this Post" }),
1871
+ /* @__PURE__ */ t.jsxs("div", { className: z.header, children: [
1872
+ /* @__PURE__ */ t.jsx("div", { className: z.title, children: "Share this Post" }),
1869
1873
  /* @__PURE__ */ t.jsx(
1870
1874
  p,
1871
1875
  {
1872
1876
  name: "X",
1873
1877
  fill: "#757575",
1874
- onClick: () => d(!1)
1878
+ onClick: () => r(!1)
1875
1879
  }
1876
1880
  )
1877
1881
  ] }),
1878
- /* @__PURE__ */ t.jsx("div", { className: L.socials, children: Object.keys(rt).map((o) => /* @__PURE__ */ t.jsx("div", { className: L.social, children: /* @__PURE__ */ t.jsx(p, { name: rt[o] }) })) }),
1879
- /* @__PURE__ */ t.jsxs("div", { className: L.copyWrapper, children: [
1882
+ /* @__PURE__ */ t.jsx("div", { className: z.socials, children: Object.keys(mt).map((o) => /* @__PURE__ */ t.jsx("div", { className: z.social, children: /* @__PURE__ */ t.jsx(p, { name: mt[o] }) })) }),
1883
+ /* @__PURE__ */ t.jsxs("div", { className: z.copyWrapper, children: [
1880
1884
  /* @__PURE__ */ t.jsx(
1881
1885
  "div",
1882
1886
  {
1883
- className: D(L.copy, L.copyText),
1887
+ className: q(z.copy, z.copyText),
1884
1888
  onClick: e,
1885
1889
  children: n
1886
1890
  }
@@ -1889,7 +1893,7 @@ const oc = (d) => {
1889
1893
  "div",
1890
1894
  {
1891
1895
  onClick: e,
1892
- className: L.copy,
1896
+ className: z.copy,
1893
1897
  children: /* @__PURE__ */ t.jsx(p, { name: "Copy" })
1894
1898
  }
1895
1899
  )
@@ -1897,38 +1901,192 @@ const oc = (d) => {
1897
1901
  ]
1898
1902
  }
1899
1903
  );
1904
+ }, nc = "_accordion_9e4oa_1", cc = "_header_9e4oa_9", ic = "_icon_9e4oa_18", oc = "_open_9e4oa_21", ac = "_content_9e4oa_25", et = {
1905
+ accordion: nc,
1906
+ header: cc,
1907
+ icon: ic,
1908
+ open: oc,
1909
+ content: ac
1910
+ }, wc = ({ title: r, content: n }) => {
1911
+ const [e, o] = b.useState(!1), [i, a] = b.useState(0), s = b.useRef(null), c = () => {
1912
+ o(!e);
1913
+ };
1914
+ return b.useEffect(() => {
1915
+ s.current && a(e ? s.current.scrollHeight : 0);
1916
+ }, [e]), /* @__PURE__ */ t.jsxs("div", { className: et.accordion, children: [
1917
+ /* @__PURE__ */ t.jsxs(
1918
+ "div",
1919
+ {
1920
+ className: et.header,
1921
+ onClick: c,
1922
+ children: [
1923
+ /* @__PURE__ */ t.jsx("h3", { children: r }),
1924
+ /* @__PURE__ */ t.jsx("div", { className: q(et.icon, { [et.open]: e }), children: /* @__PURE__ */ t.jsx(p, { name: "CaretDown" }) })
1925
+ ]
1926
+ }
1927
+ ),
1928
+ /* @__PURE__ */ t.jsx(
1929
+ "div",
1930
+ {
1931
+ ref: s,
1932
+ className: et.content,
1933
+ style: { height: `${i}px` },
1934
+ children: /* @__PURE__ */ t.jsx("p", { children: n })
1935
+ }
1936
+ )
1937
+ ] });
1938
+ }, lc = "_wrapper_1mken_1", rc = "_label_1mken_9", dc = "_input_1mken_17", uc = "_required_1mken_36", _c = "_paddingless_1mken_40", mc = "_content_1mken_44", pc = "_borderless_1mken_52", hc = "_rightIcon_1mken_57", F = {
1939
+ wrapper: lc,
1940
+ label: rc,
1941
+ input: dc,
1942
+ required: uc,
1943
+ paddingless: _c,
1944
+ content: mc,
1945
+ borderless: pc,
1946
+ rightIcon: hc
1947
+ }, Tc = (r) => {
1948
+ const {
1949
+ onChange: n,
1950
+ style: e,
1951
+ label: o,
1952
+ value: i,
1953
+ type: a,
1954
+ min: s,
1955
+ max: c,
1956
+ placeholder: u,
1957
+ disabled: y = !1,
1958
+ required: _ = !1,
1959
+ regex: l,
1960
+ paddingless: h = !1,
1961
+ borderless: N = !1,
1962
+ editable: g = !1,
1963
+ isSearch: d = !1
1964
+ } = r, [P, U] = b.useState(!1);
1965
+ function G(j) {
1966
+ return Number(j) < 0 ? String(s) : j;
1967
+ }
1968
+ function R(j) {
1969
+ return !_ || !l ? !0 : new RegExp(l).test(j);
1970
+ }
1971
+ return /* @__PURE__ */ t.jsxs("div", { className: F.wrapper, children: [
1972
+ o && /* @__PURE__ */ t.jsx(
1973
+ "label",
1974
+ {
1975
+ className: F.label,
1976
+ htmlFor: o,
1977
+ children: o
1978
+ }
1979
+ ),
1980
+ /* @__PURE__ */ t.jsxs("div", { className: F.content, children: [
1981
+ /* @__PURE__ */ t.jsx(
1982
+ "input",
1983
+ {
1984
+ id: o,
1985
+ type: a || "text",
1986
+ onChange: (j) => {
1987
+ if (a === "text") n(j.target.value);
1988
+ else {
1989
+ const A = G(j.target.value);
1990
+ n(A);
1991
+ }
1992
+ },
1993
+ value: i,
1994
+ autoComplete: "off",
1995
+ placeholder: u || "Type something...",
1996
+ className: q(F.input, {
1997
+ [F.required]: P && _ && !R(i),
1998
+ [F.paddingless]: h,
1999
+ [F.borderless]: N
2000
+ }),
2001
+ min: a === "number" ? s : void 0,
2002
+ max: a === "number" ? c : void 0,
2003
+ disabled: y,
2004
+ onFocus: () => U(!0),
2005
+ style: e
2006
+ }
2007
+ ),
2008
+ d && /* @__PURE__ */ t.jsx("div", { className: F.rightIcon, children: /* @__PURE__ */ t.jsx(
2009
+ p,
2010
+ {
2011
+ name: "MagnifyingGlass",
2012
+ fill: "var(--icon-secondary)",
2013
+ width: 20,
2014
+ height: 20
2015
+ }
2016
+ ) }),
2017
+ g && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
2018
+ p,
2019
+ {
2020
+ name: "Sliders",
2021
+ width: 20,
2022
+ height: 20,
2023
+ hoverable: !0
2024
+ }
2025
+ ) })
2026
+ ] })
2027
+ ] });
2028
+ }, gc = "_wrapper_st58d_1", xc = "_label_st58d_10", fc = "_textarea_st58d_18", bc = "_length_st58d_33", nt = {
2029
+ wrapper: gc,
2030
+ label: xc,
2031
+ textarea: fc,
2032
+ length: bc
2033
+ }, Bc = (r) => {
2034
+ const { onChange: n, label: e, value: o, maxLength: i, placeholder: a = "Type something..." } = r, [s, c] = b.useState(o.length);
2035
+ return /* @__PURE__ */ t.jsxs("div", { className: nt.wrapper, children: [
2036
+ e && /* @__PURE__ */ t.jsx(
2037
+ "label",
2038
+ {
2039
+ className: nt.label,
2040
+ htmlFor: e,
2041
+ children: e
2042
+ }
2043
+ ),
2044
+ /* @__PURE__ */ t.jsx(
2045
+ "textarea",
2046
+ {
2047
+ id: e,
2048
+ defaultValue: o,
2049
+ onChange: (u) => {
2050
+ c(u.target.value.length), n(u.target.value);
2051
+ },
2052
+ placeholder: a,
2053
+ className: nt.textarea,
2054
+ maxLength: i
2055
+ }
2056
+ ),
2057
+ i && /* @__PURE__ */ t.jsxs("div", { className: nt.length, children: [
2058
+ s,
2059
+ "/",
2060
+ i
2061
+ ] })
2062
+ ] });
1900
2063
  };
1901
2064
  export {
1902
- ec as Accordion,
1903
- X as Button,
1904
- as as ButtonTypeSettings,
1905
- nc as ButtonsSettings,
1906
- dc as Checkbox,
1907
- it as ChooseImage,
1908
- uc as ChooseImageModal,
1909
- _c as ColorPicker,
1910
- Hn as EmptyCart,
1911
- mc as ErrorableBlock,
1912
- ic as HeaderButtons,
2065
+ wc as Accordion,
2066
+ lt as Button,
2067
+ os as ButtonTypeSettings,
2068
+ yc as ButtonsSettings,
2069
+ rt as ChooseImage,
2070
+ qc as ChooseImageModal,
2071
+ Gn as EmptyCart,
2072
+ Ic as HeaderButtons,
1913
2073
  p as Icon,
1914
- G as Input,
1915
- be as ItemsSettings,
1916
- sc as LayoutSettings,
1917
- cc as ListingSelector,
1918
- pc as Loader,
1919
- ht as Modal,
1920
- hc as Picker,
1921
- oc as ProductOptions,
1922
- gc as Radio,
1923
- ks as RangeSelector,
1924
- W as Select,
1925
- ac as ShareLink,
1926
- Mn as ShoppingButton,
1927
- Rn as ShoppingModalCart,
1928
- xc as Submodal,
1929
- H as Switch,
1930
- Wt as TextSettings,
1931
- dt as Textarea,
1932
- fc as Tip,
1933
- xt as TypesText
2074
+ Y as InputSettings,
2075
+ Tc as InputUI,
2076
+ fe as ItemsSettings,
2077
+ kc as LayoutSettings,
2078
+ Nc as ListingSelector,
2079
+ Ac as Loader,
2080
+ bt as Modal,
2081
+ $c as ProductOptions,
2082
+ vs as RangeSelector,
2083
+ Q as Select,
2084
+ Cc as ShareLink,
2085
+ Fn as ShoppingButton,
2086
+ Un as ShoppingModalCart,
2087
+ W as Switch,
2088
+ Gt as TextSettings,
2089
+ pt as TextareaSettings,
2090
+ Bc as TextareaUI,
2091
+ vt as TypesText
1934
2092
  };