@billgangcom/theme-lib 1.49.0 → 1.50.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 (93) hide show
  1. package/dist/App.d.ts +2 -2
  2. package/dist/api/index.d.ts +5 -0
  3. package/dist/api/request.d.ts +13 -0
  4. package/dist/builder/components/AddSections/utils/index.d.ts +1 -0
  5. package/dist/builder/components/AddSectionsBlock/index.d.ts +7 -0
  6. package/dist/builder/components/{Sidebar/AddSections/BlockColors → BlockColors}/index.d.ts +0 -1
  7. package/dist/builder/components/BlockSettings/index.d.ts +2 -0
  8. package/dist/builder/components/{Sidebar/AddSections/RenderBlockSettings/index.d.ts → BlockSettings/settings.d.ts} +2 -1
  9. package/dist/builder/components/BlockSettingsHeader/index.d.ts +8 -0
  10. package/dist/builder/components/{Header/Buttons → HeaderButtons}/index.d.ts +1 -1
  11. package/dist/builder/components/{Header/Devices → HeaderDevices}/index.d.ts +1 -1
  12. package/dist/builder/components/HeaderPreviewButton/index.d.ts +5 -0
  13. package/dist/builder/components/HeaderSaveButton/api/index.d.ts +5 -0
  14. package/dist/builder/components/{Header/SaveButton → HeaderSaveButton}/index.d.ts +1 -1
  15. package/dist/builder/components/HeaderSaveButton/utils/index.d.ts +6 -0
  16. package/dist/builder/components/HeaderSettingsLanguage/index.d.ts +4 -0
  17. package/dist/builder/components/HeaderSettingsPages/api/index.d.ts +4 -0
  18. package/dist/builder/components/HeaderSettingsPages/index.d.ts +5 -0
  19. package/dist/builder/components/{Header/PreviewButton → HeaderSettingsZoom}/index.d.ts +1 -1
  20. package/dist/builder/components/HeaderSwitchTheme/index.d.ts +4 -0
  21. package/dist/builder/components/{Preview/Render → PreviewRender}/index.d.ts +1 -1
  22. package/dist/builder/components/SidebarLayer/index.d.ts +7 -0
  23. package/dist/builder/components/{Sidebar/Layers → SidebarLayers}/index.d.ts +1 -1
  24. package/dist/builder/components/SidebarSettings/index.d.ts +2 -0
  25. package/dist/builder/components/SidebarTheme/index.d.ts +4 -0
  26. package/dist/builder/components/ThemeSettingsBorders/index.d.ts +5 -0
  27. package/dist/builder/components/ThemeSettingsButtons/index.d.ts +5 -0
  28. package/dist/builder/components/ThemeSettingsCategories/index.d.ts +1 -0
  29. package/dist/builder/components/ThemeSettingsColors/index.d.ts +5 -0
  30. package/dist/builder/components/ThemeSettingsColors/utils/getDuplicateColors.d.ts +2 -0
  31. package/dist/builder/components/ThemeSettingsColors/utils/index.d.ts +1 -0
  32. package/dist/builder/components/ThemeSettingsCurrentFont/index.d.ts +5 -0
  33. package/dist/builder/components/ThemeSettingsFonts/index.d.ts +5 -0
  34. package/dist/builder/components/ThemeSettingsHeaderItem/index.d.ts +7 -0
  35. package/dist/builder/components/ThemeSettingsInputs/index.d.ts +5 -0
  36. package/dist/builder/index.d.ts +1 -2
  37. package/dist/builder/store/useSubmodalStore.d.ts +2 -0
  38. package/dist/builder/ui/AnimatedPanel/index.d.ts +7 -0
  39. package/dist/builder/ui/ChooseImage/api/index.d.ts +8 -0
  40. package/dist/builder/ui/Submodal/index.d.ts +1 -0
  41. package/dist/builder/utils/getDisplayName.d.ts +1 -0
  42. package/dist/builder/utils/getModalPosition.d.ts +4 -0
  43. package/dist/builder/utils/index.d.ts +2 -7
  44. package/dist/builder.cjs.js +4 -4
  45. package/dist/builder.es.js +2336 -2341
  46. package/dist/{index-CB2QLMVB.js → index-C87hOfMQ.js} +28258 -27127
  47. package/dist/index-DSOQcy7R.cjs +154 -0
  48. package/dist/index.cjs.js +1 -1
  49. package/dist/index.es.js +1 -1
  50. package/dist/lib/index.d.ts +2 -3
  51. package/dist/pages/dynamic-page/api/index.d.ts +8 -0
  52. package/dist/pages/error-page/api/index.d.ts +10 -0
  53. package/dist/ui.cjs.js +1 -1
  54. package/dist/ui.es.js +1196 -2361
  55. package/package.json +1 -1
  56. package/dist/builder/components/Header/Settings/Language/index.d.ts +0 -4
  57. package/dist/builder/components/Header/Settings/Pages/index.d.ts +0 -5
  58. package/dist/builder/components/Header/Settings/Zoom/index.d.ts +0 -5
  59. package/dist/builder/components/Header/SwitchTheme/index.d.ts +0 -4
  60. package/dist/builder/components/Sidebar/AddSections/RenderBlockSettings/settings.d.ts +0 -7
  61. package/dist/builder/components/Sidebar/Layers/AnnouncementLayer/index.d.ts +0 -1
  62. package/dist/builder/components/Sidebar/Layers/FooterLayer/index.d.ts +0 -1
  63. package/dist/builder/components/Sidebar/Layers/HeaderLayer/index.d.ts +0 -1
  64. package/dist/builder/components/Sidebar/Settings/index.d.ts +0 -2
  65. package/dist/builder/components/Sidebar/Theme/ThemeSettings/Colors/index.d.ts +0 -5
  66. package/dist/builder/components/Sidebar/Theme/ThemeSettings/Fonts/index.d.ts +0 -5
  67. package/dist/builder/components/Sidebar/Theme/ThemeSettings/Inputs/index.d.ts +0 -5
  68. package/dist/builder/components/Sidebar/Theme/ThemeSettings/Item/Border/index.d.ts +0 -5
  69. package/dist/builder/components/Sidebar/Theme/ThemeSettings/Item/Button/index.d.ts +0 -5
  70. package/dist/builder/components/Sidebar/Theme/ThemeSettings/Item/Font/index.d.ts +0 -5
  71. package/dist/builder/components/Sidebar/Theme/ThemeSettings/Item/index.d.ts +0 -4
  72. package/dist/builder/components/Sidebar/Theme/index.d.ts +0 -4
  73. package/dist/builder/components/index.d.ts +0 -5
  74. package/dist/builder/utils/api.d.ts +0 -25
  75. package/dist/index-CTjn8zop.cjs +0 -154
  76. package/dist/lib/api.d.ts +0 -26
  77. package/dist/lib/clearQueryParams.d.ts +0 -1
  78. /package/dist/{builder/utils → api}/fetchAll.d.ts +0 -0
  79. /package/dist/{builder/utils → api}/fetchData.d.ts +0 -0
  80. /package/dist/{builder/utils → api}/fetchFontsData.d.ts +0 -0
  81. /package/dist/{builder/utils → api}/fetchPagesData.d.ts +0 -0
  82. /package/dist/builder/components/{Sidebar/AddSections → AddSections}/index.d.ts +0 -0
  83. /package/dist/builder/components/{Navbar/ExitButton → ExitButton}/index.d.ts +0 -0
  84. /package/dist/builder/components/{Header/Settings → HeaderSettings}/index.d.ts +0 -0
  85. /package/dist/builder/components/{Header/Settings/Pages/ModifyPage → ModifyPage}/index.d.ts +0 -0
  86. /package/dist/builder/components/{Preview/PreviewBlockSidebar → PreviewBlockSidebar}/index.d.ts +0 -0
  87. /package/dist/builder/components/{Preview/PreviewContent → PreviewContent}/index.d.ts +0 -0
  88. /package/dist/builder/components/{Preview/PreviewHeader → PreviewHeader}/index.d.ts +0 -0
  89. /package/dist/builder/components/{Sidebar/Theme/ThemeSettings → ThemeSettings}/index.d.ts +0 -0
  90. /package/dist/builder/{components/layout.d.ts → layout.d.ts} +0 -0
  91. /package/dist/{builder/utils → lib}/hotReload.d.ts +0 -0
  92. /package/dist/{builder/utils → lib}/splitTextIntoSpans.d.ts +0 -0
  93. /package/dist/{lib/checkAuth.d.ts → pages/builder/utils/index.d.ts} +0 -0
package/dist/ui.es.js CHANGED
@@ -1,21 +1,21 @@
1
- import { j as t, I as b, c as Y, a as tt, S as st, T as zt, b as et, C as bt, u as yt, d as kt, D as $t, e as It, v as Nt, B as ot, f as _t, P as wt, g as Ct, h as St, i as Vt, s as Yt, k as Et, l as Bt, m as Ot, M as Mt, n as Ut, o as Dt, p as Gt } from "./index-CB2QLMVB.js";
2
- import { q as uc, L as mc } from "./index-CB2QLMVB.js";
3
- import g from "react";
1
+ import { j as t, I as b, c as H, a as ut, S as at, R as kt, B as et, O as pt, b as ct, u as mt, d as _t, P as ht, D as gt, e as xt, v as ft, f as bt, C as vt, g as F, h as Bt, i as ot, k as Nt, l as Pt, m as dt, s as Mt, n as It, o as rt, p as jt, M as yt, q as $t, r as Tt, t as St, w as qt } from "./index-C87hOfMQ.js";
2
+ import { A as to, y as eo, L as so, x as no, T as io, z as oo } from "./index-C87hOfMQ.js";
3
+ import x from "react";
4
4
  import "@phosphor-icons/react";
5
- const Xt = "_wrapper_1ibay_2", Wt = "_alignmentBlock_1ibay_8", Jt = "_title_1ibay_15", Qt = "_subtitle_1ibay_22", Kt = "_alignmentContent_1ibay_29", Zt = "_alignments_1ibay_37", te = "_alignment_1ibay_8", ee = "_circle_1ibay_60", se = "_paddings_1ibay_67", ne = "_padding_1ibay_67", ie = "_active_1ibay_91", oe = "_input_1ibay_98", K = {
6
- wrapper: Xt,
7
- alignmentBlock: Wt,
8
- title: Jt,
9
- subtitle: Qt,
10
- alignmentContent: Kt,
11
- alignments: Zt,
12
- alignment: te,
13
- circle: ee,
14
- paddings: se,
15
- padding: ne,
16
- active: ie,
17
- input: oe
18
- }, ae = [
5
+ const At = "_wrapper_1ibay_2", Ot = "_alignmentBlock_1ibay_8", Et = "_title_1ibay_15", zt = "_subtitle_1ibay_22", Dt = "_alignmentContent_1ibay_29", Rt = "_alignments_1ibay_37", Ht = "_alignment_1ibay_8", Lt = "_circle_1ibay_60", Ut = "_paddings_1ibay_67", Ft = "_padding_1ibay_67", Vt = "_active_1ibay_91", Yt = "_input_1ibay_98", W = {
6
+ wrapper: At,
7
+ alignmentBlock: Ot,
8
+ title: Et,
9
+ subtitle: zt,
10
+ alignmentContent: Dt,
11
+ alignments: Rt,
12
+ alignment: Ht,
13
+ circle: Lt,
14
+ paddings: Ut,
15
+ padding: Ft,
16
+ active: Vt,
17
+ input: Yt
18
+ }, Wt = [
19
19
  "topLeft",
20
20
  "top",
21
21
  "topRight",
@@ -25,10 +25,10 @@ const Xt = "_wrapper_1ibay_2", Wt = "_alignmentBlock_1ibay_8", Jt = "_title_1iba
25
25
  "bottomLeft",
26
26
  "bottom",
27
27
  "bottomRight"
28
- ], ce = ["left", "top", "right", "bottom"], Wa = (d) => {
29
- const { alignment: a, padding: e, setPadding: s, setAlignment: i } = d;
30
- function c(f) {
31
- switch (f) {
28
+ ], Gt = ["left", "top", "right", "bottom"], zi = (u) => {
29
+ const { alignment: o, padding: e, setPadding: s, setAlignment: n } = u;
30
+ function r(h) {
31
+ switch (h) {
32
32
  case "left":
33
33
  case "topLeft":
34
34
  case "bottomLeft":
@@ -45,8 +45,8 @@ const Xt = "_wrapper_1ibay_2", Wt = "_alignmentBlock_1ibay_8", Jt = "_title_1iba
45
45
  return "TextAlignCenter";
46
46
  }
47
47
  }
48
- function l(f) {
49
- switch (f) {
48
+ function c(h) {
49
+ switch (h) {
50
50
  case "left":
51
51
  return "AlignLeft";
52
52
  case "right":
@@ -57,40 +57,40 @@ const Xt = "_wrapper_1ibay_2", Wt = "_alignmentBlock_1ibay_8", Jt = "_title_1iba
57
57
  return "AlignBottom";
58
58
  }
59
59
  }
60
- const [o, n] = g.useState(null), [m, v] = g.useState(null);
61
- return /* @__PURE__ */ t.jsxs("div", { className: K.layout, children: [
62
- /* @__PURE__ */ t.jsx("h3", { className: K.title, children: "Layout" }),
63
- /* @__PURE__ */ t.jsxs("div", { className: K.alignmentBlock, children: [
64
- /* @__PURE__ */ t.jsx("h5", { className: K.subtitle, children: "Alignment" }),
65
- /* @__PURE__ */ t.jsxs("div", { className: K.alignmentContent, children: [
66
- /* @__PURE__ */ t.jsx("div", { className: K.alignments, children: ae.map((f) => /* @__PURE__ */ t.jsxs(
60
+ const [a, _] = x.useState(null), [N, B] = x.useState(null);
61
+ return /* @__PURE__ */ t.jsxs("div", { className: W.layout, children: [
62
+ /* @__PURE__ */ t.jsx("h3", { className: W.title, children: "Layout" }),
63
+ /* @__PURE__ */ t.jsxs("div", { className: W.alignmentBlock, children: [
64
+ /* @__PURE__ */ t.jsx("h5", { className: W.subtitle, children: "Alignment" }),
65
+ /* @__PURE__ */ t.jsxs("div", { className: W.alignmentContent, children: [
66
+ /* @__PURE__ */ t.jsx("div", { className: W.alignments, children: Wt.map((h) => /* @__PURE__ */ t.jsxs(
67
67
  "div",
68
68
  {
69
69
  onClick: () => {
70
- i(f);
70
+ n(h);
71
71
  },
72
- className: K.alignment,
72
+ className: W.alignment,
73
73
  onMouseEnter: () => {
74
- n(f);
74
+ _(h);
75
75
  },
76
76
  onMouseLeave: () => {
77
- n(null);
77
+ _(null);
78
78
  },
79
79
  children: [
80
- f !== a && o !== f && /* @__PURE__ */ t.jsx("div", { className: K.circle }),
81
- f !== a && o === f && /* @__PURE__ */ t.jsx(
80
+ h !== o && a !== h && /* @__PURE__ */ t.jsx("div", { className: W.circle }),
81
+ h !== o && a === h && /* @__PURE__ */ t.jsx(
82
82
  b,
83
83
  {
84
- name: c(o),
84
+ name: r(a),
85
85
  fill: "#c2c2c2",
86
86
  width: 22,
87
87
  height: 22
88
88
  }
89
89
  ),
90
- f === a && /* @__PURE__ */ t.jsx(
90
+ h === o && /* @__PURE__ */ t.jsx(
91
91
  b,
92
92
  {
93
- name: c(a),
93
+ name: r(o),
94
94
  fill: "#FF3F19",
95
95
  width: 22,
96
96
  height: 22
@@ -98,37 +98,37 @@ const Xt = "_wrapper_1ibay_2", Wt = "_alignmentBlock_1ibay_8", Jt = "_title_1iba
98
98
  )
99
99
  ]
100
100
  },
101
- f
101
+ h
102
102
  )) }),
103
- /* @__PURE__ */ t.jsx("div", { className: K.paddings, children: ce.map((f) => /* @__PURE__ */ t.jsxs(
103
+ /* @__PURE__ */ t.jsx("div", { className: W.paddings, children: Gt.map((h) => /* @__PURE__ */ t.jsxs(
104
104
  "label",
105
105
  {
106
- className: Y(K.padding, {
107
- [K.active]: m === f
106
+ className: H(W.padding, {
107
+ [W.active]: N === h
108
108
  }),
109
109
  onFocus: () => {
110
- v(f);
110
+ B(h);
111
111
  },
112
112
  onBlur: () => {
113
- v(null);
113
+ B(null);
114
114
  },
115
115
  children: [
116
116
  /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
117
117
  b,
118
118
  {
119
- name: l(f),
119
+ name: c(h),
120
120
  width: 20,
121
121
  height: 20
122
122
  }
123
123
  ) }),
124
124
  /* @__PURE__ */ t.jsx(
125
- tt,
125
+ ut,
126
126
  {
127
127
  type: "number",
128
- value: String(e[f]),
129
- onChange: (r) => s({
128
+ value: String(e[h]),
129
+ onChange: (i) => s({
130
130
  ...e,
131
- [f]: Number(r)
131
+ [h]: Number(i)
132
132
  }),
133
133
  paddingless: !0,
134
134
  borderless: !0
@@ -136,759 +136,60 @@ const Xt = "_wrapper_1ibay_2", Wt = "_alignmentBlock_1ibay_8", Jt = "_title_1iba
136
136
  )
137
137
  ]
138
138
  },
139
- f
139
+ h
140
140
  )) })
141
141
  ] })
142
142
  ] })
143
143
  ] });
144
- }, le = "_title_1jkiw_1", re = "_subtitle_1jkiw_5", de = "_header_1jkiw_12", ue = "_text_1jkiw_13", me = "_top_1jkiw_20", _e = "_itemsBlock_1jkiw_29", ht = {
145
- title: le,
146
- subtitle: re,
147
- header: de,
148
- text: ue,
149
- top: me,
150
- itemsBlock: _e
151
- }, pe = "_typeTexts_167ez_1", he = "_block_167ez_8", ge = "_active_167ez_25", Pt = {
152
- typeTexts: pe,
153
- block: he,
154
- active: ge
155
- }, fe = ["bold", "italic", "underline", "strike-through", "code"], Lt = (d) => {
156
- const { typesText: a, setTypesText: e } = d;
157
- function s(i) {
158
- switch (i) {
159
- case "bold":
160
- return "TextB";
161
- case "italic":
162
- return "TextItalic";
163
- case "code":
164
- return "CodeSimple";
165
- case "strike-through":
166
- return "TextStrikethrough";
167
- case "underline":
168
- return "TextUnderline";
169
- }
170
- }
171
- return /* @__PURE__ */ t.jsx("div", { className: Pt.typeTexts, children: fe.map((i) => /* @__PURE__ */ t.jsx(
172
- "div",
173
- {
174
- className: Y(Pt.block, {
175
- [Pt.active]: a.includes(i)
176
- }),
177
- onClick: () => {
178
- const c = [...a];
179
- if (c.includes(i)) {
180
- const l = c.filter((o) => o !== i);
181
- e(l);
182
- } else
183
- c.push(i), e(c);
184
- },
185
- children: /* @__PURE__ */ t.jsx(
186
- b,
187
- {
188
- name: s(i),
189
- fill: a.includes(i) ? "#252525" : "#757575",
190
- width: 20,
191
- height: 20
192
- }
193
- )
194
- },
195
- String(i)
196
- )) });
197
- }, gt = {
198
- h1: "Heading 1",
199
- h2: "Heading 2",
200
- h3: "Heading 3",
201
- h4: "Heading 4",
202
- h5: "Heading 5",
203
- h6: "Heading 6",
204
- p: "Paragraph"
205
- }, Ht = (d) => {
206
- const {
207
- typesText: a,
208
- isActiveText: e,
209
- setIsActiveText: s,
210
- text: i,
211
- setText: c,
212
- setTypesText: l,
213
- title: o,
214
- subtitle: n = "Items",
215
- typeFont: m,
216
- setTypeFont: v
217
- } = d;
218
- return /* @__PURE__ */ t.jsxs("div", { className: ht.text, children: [
219
- (o || e !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: ht.top, children: [
220
- o && /* @__PURE__ */ t.jsx("h3", { className: ht.title, children: o }),
221
- e !== void 0 && s && /* @__PURE__ */ t.jsx(
222
- st,
223
- {
224
- current: e,
225
- onChange: (f) => s(f)
226
- }
227
- )
228
- ] }),
229
- /* @__PURE__ */ t.jsxs("div", { className: ht.itemsBlock, children: [
230
- /* @__PURE__ */ t.jsx("h5", { className: ht.subtitle, children: n }),
231
- /* @__PURE__ */ t.jsx(
232
- zt,
233
- {
234
- onChange: (f) => c(f),
235
- value: i,
236
- maxLength: 150
237
- }
238
- ),
239
- /* @__PURE__ */ t.jsx(
240
- Lt,
241
- {
242
- typesText: a,
243
- setTypesText: l
244
- }
245
- ),
246
- /* @__PURE__ */ t.jsx(
247
- et,
248
- {
249
- label: "Type Text",
250
- options: Object.values(gt).filter(
251
- (f) => f !== gt[m]
252
- ),
253
- onChange: (f) => v(
254
- Object.keys(gt).find(
255
- (r) => gt[r] === f
256
- )
257
- ),
258
- value: gt[m]
259
- }
260
- )
261
- ] })
262
- ] });
263
- }, xe = "_title_1fz6i_1", be = "_subtitle_1fz6i_5", ve = "_header_1fz6i_12", je = "_text_1fz6i_13", ye = "_productsBlock_1fz6i_14", ke = "_top_1fz6i_26", $e = "_itemsBlock_1fz6i_35", Ie = "_typeTexts_1fz6i_41", Ne = "_block_1fz6i_48", we = "_active_1fz6i_61", Ce = "_products_1fz6i_14", Se = "_product_1fz6i_14", Be = "_button_1fz6i_80", Te = "_disabled_1fz6i_91", Pe = "_image_1fz6i_95", Ae = "_info_1fz6i_102", Oe = "_name_1fz6i_114", Me = "_buttons_1fz6i_118", qe = "_modal_1fz6i_125", ze = "_link_1fz6i_146", Ee = "_modalOptions_1fz6i_152", Ue = "_addButton_1fz6i_165", De = "_deleteButton_1fz6i_180", Le = "_closeIcon_1fz6i_192", R = {
264
- title: xe,
265
- subtitle: be,
266
- header: ve,
267
- text: je,
268
- productsBlock: ye,
269
- top: ke,
270
- itemsBlock: $e,
271
- typeTexts: Ie,
272
- block: Ne,
273
- active: we,
274
- products: Ce,
275
- product: Se,
276
- button: Be,
277
- disabled: Te,
278
- image: Pe,
279
- info: Ae,
280
- name: Oe,
281
- buttons: Me,
282
- modal: qe,
283
- link: ze,
284
- modalOptions: Ee,
285
- addButton: Ue,
286
- deleteButton: De,
287
- closeIcon: Le
288
- }, He = g.forwardRef(
289
- (d, a) => {
290
- const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: c, setIsOpenModal: l } = d;
291
- function o(n, m) {
292
- return n.length > m ? `${n.slice(0, m)}...` : n;
293
- }
294
- return /* @__PURE__ */ t.jsxs(
295
- "div",
296
- {
297
- ref: a,
298
- className: R.modal,
299
- onClick: (n) => {
300
- n.stopPropagation();
301
- },
302
- style: {
303
- top: `${i.top}px`,
304
- left: `${i.left}px`
305
- },
306
- children: [
307
- /* @__PURE__ */ t.jsxs("div", { className: R.top, children: [
308
- /* @__PURE__ */ t.jsx("h3", { className: R.title, children: o(e.name["en-US"], 20) }),
309
- /* @__PURE__ */ t.jsx("div", { className: R.closeIcon, children: /* @__PURE__ */ t.jsx(
310
- b,
311
- {
312
- name: "X",
313
- height: 20,
314
- width: 20,
315
- onClick: () => {
316
- s(null), l(!1);
317
- }
318
- }
319
- ) })
320
- ] }),
321
- /* @__PURE__ */ t.jsx("div", { className: R.modalOptions, children: c.map((n) => {
322
- if (n.type === "image")
323
- return /* @__PURE__ */ t.jsx(
324
- bt,
325
- {
326
- label: "Put up an attractive image",
327
- activeImage: e[n.field],
328
- onChange: (m) => {
329
- const v = {
330
- ...e,
331
- [n.field]: m
332
- };
333
- s(v);
334
- }
335
- },
336
- String(n.field)
337
- );
338
- if (n.type === "text")
339
- return /* @__PURE__ */ t.jsx(
340
- Ht,
341
- {
342
- typesText: e[n.field.type],
343
- setTypesText: (m) => {
344
- const v = {
345
- ...e,
346
- [n.field.type]: m
347
- };
348
- s(v);
349
- },
350
- text: e[n.field.text]["en-US"] || "",
351
- setText: (m) => {
352
- const v = {
353
- ...e,
354
- [n.field.text]: {
355
- "en-US": m
356
- }
357
- };
358
- s(v);
359
- },
360
- typeFont: e[n.field.typeFont],
361
- setTypeFont: (m) => {
362
- const v = {
363
- ...e,
364
- [n.field.typeFont]: m
365
- };
366
- s(v);
367
- },
368
- subtitle: n.label
369
- }
370
- );
371
- if (n.type === "input")
372
- return /* @__PURE__ */ t.jsx(
373
- tt,
374
- {
375
- onChange: (m) => {
376
- const v = {
377
- ...e,
378
- [n.field]: m
379
- };
380
- s(v);
381
- },
382
- value: e[n.field] || "",
383
- label: n.label,
384
- placeholder: n.placeholder
385
- }
386
- );
387
- if (n.type === "inputSwitch")
388
- return /* @__PURE__ */ t.jsxs("div", { className: R.link, children: [
389
- /* @__PURE__ */ t.jsx(
390
- tt,
391
- {
392
- onChange: (m) => {
393
- const v = {
394
- ...e,
395
- [n.field.text]: m
396
- };
397
- s(v);
398
- },
399
- value: e[n.field.text] || "",
400
- label: n.inputLabel,
401
- placeholder: n.placeholder
402
- }
403
- ),
404
- /* @__PURE__ */ t.jsx(
405
- st,
406
- {
407
- current: !!e[n.field.switch] || !1,
408
- label: n.switchLabel,
409
- onChange: (m) => {
410
- const v = {
411
- ...e,
412
- [n.field.switch]: m
413
- };
414
- s(v);
415
- }
416
- }
417
- )
418
- ] });
419
- if (n.type === "list")
420
- return /* @__PURE__ */ t.jsx(
421
- Ge,
422
- {
423
- items: e[n.field] || [],
424
- setItems: (m) => {
425
- const v = {
426
- ...e,
427
- [n.field]: m
428
- };
429
- s(v);
430
- },
431
- itemsType: "select",
432
- draggable: n.draggable || !1,
433
- itemsOptions: n.itemsOptions,
434
- deletable: n.deletable || !1,
435
- editable: n.editable || !1,
436
- subtitle: n.label,
437
- addableOptions: n.addableOptions,
438
- modalOptions: n.modalOptions
439
- }
440
- );
441
- if (n.type === "select")
442
- return /* @__PURE__ */ t.jsx(
443
- et,
444
- {
445
- options: n.itemsOptions,
446
- onChange: (m) => {
447
- const v = {
448
- ...e,
449
- [n.field]: m
450
- };
451
- s(v);
452
- },
453
- label: n.label,
454
- value: e[n.field] || "String",
455
- leftAddon: n.leftAddon && n.leftAddon === "icon" && /* @__PURE__ */ t.jsx(b, { name: e[n.field] }),
456
- switcher: n.switcher ? {
457
- value: !!e[n.switcher],
458
- onChange: (m) => {
459
- if (n.switcher === "isActive") {
460
- const v = {
461
- ...e,
462
- [n.switcher]: m
463
- };
464
- s(v);
465
- }
466
- }
467
- } : void 0
468
- }
469
- );
470
- }) })
471
- ]
472
- }
473
- );
474
- }
475
- ), Re = "_other_g74jx_1", Fe = "_subtitle_g74jx_7", Ve = "_items_g74jx_14", At = {
476
- other: Re,
477
- subtitle: Fe,
478
- items: Ve
479
- }, Tt = (d) => {
480
- const { items: a, title: e = "Other" } = d;
481
- return /* @__PURE__ */ t.jsxs("div", { className: At.other, children: [
482
- /* @__PURE__ */ t.jsx("h5", { className: At.subtitle, children: e }),
483
- /* @__PURE__ */ t.jsx("div", { className: At.items, children: a.map((s, i) => /* @__PURE__ */ t.jsx(
484
- st,
485
- {
486
- current: s.isItem,
487
- onChange: (c) => s.setIsItem(c),
488
- label: s.label,
489
- hasBackground: !0,
490
- paddingless: !1
491
- },
492
- i
493
- )) })
494
- ] });
495
- };
496
- function Ye({ product: d, children: a }) {
497
- const {
498
- attributes: e,
499
- listeners: s,
500
- setNodeRef: i,
501
- transform: c,
502
- transition: l,
503
- isDragging: o
504
- } = Ct({
505
- id: d.id
506
- }), n = {
507
- transform: St.Transform.toString(c),
508
- transition: l
509
- };
510
- return /* @__PURE__ */ t.jsx(
511
- "div",
512
- {
513
- ref: i,
514
- style: n,
515
- className: `${R.product} ${o ? R.dragging : ""}`,
516
- ...e,
517
- ...s,
518
- children: a
519
- }
520
- );
521
- }
522
- const Ge = (d) => {
523
- const {
524
- isActiveItems: a,
525
- setIsActiveItems: e,
526
- items: s,
527
- setItems: i,
528
- other: c,
529
- title: l,
530
- subtitle: o,
531
- editable: n = !0,
532
- draggable: m = !1,
533
- withImage: v = !1,
534
- deletable: f = !0,
535
- addable: r = !0,
536
- itemsType: k,
537
- itemsPlaceholder: p = "",
538
- itemsOptions: _,
539
- hasRangeSelector: $ = !1,
540
- rangeSelectorOptions: L,
541
- modalOptions: M,
542
- addableOptions: u = {},
543
- limit: S,
544
- autoInterval: q
545
- } = d, [F, B] = g.useState(null), [j, P] = g.useState({
546
- top: 0,
547
- left: 0
548
- }), [x, I] = g.useState(null), w = g.useRef(null), [D, A] = g.useState(!1), U = yt(
549
- kt(wt, {
550
- activationConstraint: {
551
- distance: 5
552
- }
553
- })
554
- );
555
- g.useEffect(() => {
556
- const h = () => {
557
- B(null), A(!1);
558
- };
559
- return document.body.addEventListener("click", h), B(null), A(!1), () => {
560
- B(null), A(!1), document.body.removeEventListener("click", h);
561
- };
562
- }, []), g.useEffect(() => {
563
- if (F) {
564
- const h = [...s].map((N) => N.id === F.id ? F : N);
565
- i(h);
566
- }
567
- }, [F]), g.useEffect(() => {
568
- if (w.current && x) {
569
- const h = w.current.getBoundingClientRect().height, N = window.innerHeight;
570
- let O = x.top;
571
- O + h > N + window.scrollY - 200 && (O = N + window.scrollY - h - 200), O < 0 && (O = 10), P({
572
- top: O,
573
- left: x.left
574
- });
575
- }
576
- }, [w.current, x]);
577
- const nt = (h, N) => {
578
- h.stopPropagation();
579
- const O = h.target.getBoundingClientRect();
580
- I({
581
- top: O.top + window.scrollY - 70,
582
- left: O.left - (r ? 30 : 65)
583
- }), B(N), A(!0);
584
- };
585
- function dt(h) {
586
- if (v)
587
- return h ? /* @__PURE__ */ t.jsx(
588
- "img",
589
- {
590
- src: `https://imagedelivery.net/${h[0]}/w=1000`,
591
- alt: "image",
592
- width: 16,
593
- height: 16
594
- }
595
- ) : /* @__PURE__ */ t.jsx(
596
- b,
597
- {
598
- name: "Image",
599
- width: 16,
600
- height: 16,
601
- fill: "#757575"
602
- }
603
- );
604
- }
605
- const y = (h) => {
606
- const { active: N, over: O } = h;
607
- if (O && N.id !== O.id) {
608
- const H = s.findIndex((z) => z.id === N.id), X = s.findIndex((z) => z.id === O.id);
609
- if (H !== -1 && X !== -1) {
610
- const z = [...s], [ut] = z.splice(H, 1);
611
- z.splice(X, 0, ut), i(z);
612
- }
613
- }
614
- }, E = (h, N) => {
615
- var H, X;
616
- const O = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
617
- m && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
618
- b,
619
- {
620
- name: "DotsSixVertical",
621
- hoverable: !0,
622
- width: 20,
623
- height: 20
624
- }
625
- ) }),
626
- k === "select" && _ && /* @__PURE__ */ t.jsx(
627
- et,
628
- {
629
- onChange: (z) => {
630
- const ut = [...s], pt = _.find((vt) => vt.name["en-US"] === z);
631
- if (!pt) return;
632
- const mt = ut.map((vt) => vt.id === h.id ? {
633
- ...pt,
634
- name: {
635
- "en-US": z
636
- }
637
- } : vt);
638
- B({
639
- ...h,
640
- name: {
641
- "en-US": z
642
- }
643
- }), i([...mt]);
644
- },
645
- value: h.name["en-US"],
646
- options: _.filter((z) => !s.find((ut) => ut.name["en-US"] === z.name["en-US"])).map((z) => z.name["en-US"]),
647
- leftAddon: dt(h.images)
648
- }
649
- ),
650
- k === "input" && /* @__PURE__ */ t.jsx(
651
- tt,
652
- {
653
- onChange: (z) => {
654
- const pt = [...s].map((mt) => mt.id === h.id ? {
655
- ...h,
656
- name: {
657
- "en-US": z
658
- }
659
- } : mt);
660
- i([...pt]);
661
- },
662
- value: h.name["en-US"],
663
- placeholder: p
664
- }
665
- ),
666
- k === "image" && /* @__PURE__ */ t.jsx(
667
- bt,
668
- {
669
- onChange: (z) => {
670
- const pt = [...s].map((mt) => mt.id === h.id ? {
671
- ...h,
672
- images: z
673
- } : mt);
674
- i([...pt]);
675
- },
676
- activeImage: (H = s.find((z) => z.id === h.id)) != null && H.images ? (X = s.find((z) => z.id === h.id)) == null ? void 0 : X.images[0] : void 0
677
- }
678
- ),
679
- /* @__PURE__ */ t.jsxs("div", { className: R.buttons, children: [
680
- n && /* @__PURE__ */ t.jsx("div", { className: R.deleteButton, children: /* @__PURE__ */ t.jsx(
681
- b,
682
- {
683
- name: "Sliders",
684
- hoverable: !0,
685
- width: 20,
686
- height: 20,
687
- onClick: (z) => {
688
- nt(z, h);
689
- }
690
- }
691
- ) }),
692
- f && /* @__PURE__ */ t.jsx("div", { className: R.deleteButton, children: /* @__PURE__ */ t.jsx(
693
- b,
694
- {
695
- name: "Trash",
696
- hoverable: !0,
697
- width: 20,
698
- height: 20,
699
- fill: "#C12A2A",
700
- onClick: () => i(s.filter((z) => z.id !== h.id))
701
- }
702
- ) })
703
- ] })
704
- ] });
705
- return m ? /* @__PURE__ */ t.jsx(
706
- Ye,
707
- {
708
- product: h,
709
- index: N,
710
- children: O
711
- },
712
- h.id
713
- ) : /* @__PURE__ */ t.jsx(
714
- "div",
715
- {
716
- className: R.product,
717
- children: O
718
- },
719
- h.id
720
- );
721
- };
722
- return /* @__PURE__ */ t.jsxs("div", { className: R.productsBlock, children: [
723
- (l || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: R.top, children: [
724
- l && /* @__PURE__ */ t.jsx("h3", { className: R.title, children: l }),
725
- a !== void 0 && /* @__PURE__ */ t.jsx(
726
- st,
727
- {
728
- current: a,
729
- onChange: (h) => e == null ? void 0 : e(h)
730
- }
731
- )
732
- ] }),
733
- F && n && M && D && /* @__PURE__ */ t.jsx(
734
- He,
735
- {
736
- ref: w,
737
- activeItem: F,
738
- setActiveItem: B,
739
- popupPosition: j,
740
- modalOptions: M,
741
- setIsOpenModal: A
742
- }
743
- ),
744
- $ && L && /* @__PURE__ */ t.jsx(qt, { ...L }),
745
- /* @__PURE__ */ t.jsxs("div", { className: R.products, children: [
746
- o && /* @__PURE__ */ t.jsx("h5", { className: R.subtitle, children: o }),
747
- m ? /* @__PURE__ */ t.jsx(
748
- $t,
749
- {
750
- sensors: U,
751
- onDragEnd: y,
752
- children: /* @__PURE__ */ t.jsx(
753
- It,
754
- {
755
- items: s.map((h) => h.id),
756
- strategy: Nt,
757
- children: s.map((h, N) => E(h, N))
758
- }
759
- )
760
- }
761
- ) : s.map((h, N) => E(h, N)),
762
- r && /* @__PURE__ */ t.jsx(
763
- "div",
764
- {
765
- style: {
766
- width: "100%",
767
- display: "flex",
768
- justifyContent: "center"
769
- },
770
- children: /* @__PURE__ */ t.jsx(
771
- ot,
772
- {
773
- withoutHover: !0,
774
- className: Y(R.button, {
775
- [R.disabled]: !!(S && S <= s.length || s.length === (_ == null ? void 0 : _.length))
776
- }),
777
- size: "s",
778
- disabled: !!(S && S <= s.length || s.length === (_ == null ? void 0 : _.length)),
779
- onClick: () => {
780
- const h = [...s];
781
- let N = null;
782
- if (_) {
783
- for (let O = 0; O < _.length; O++)
784
- if (!s.find((H) => H.id === _[O].id)) {
785
- N = _[O];
786
- break;
787
- }
788
- }
789
- k === "select" && _ ? h.push({
790
- name: N ? N.name : _[0].name,
791
- id: (N == null ? void 0 : N.id) || _[0].id,
792
- ...u
793
- }) : k === "input" ? h.push({
794
- name: {
795
- "en-US": ""
796
- },
797
- id: _t(),
798
- ...u
799
- }) : h.push({
800
- name: {
801
- "en-US": `Image ${s.length + 1}`
802
- },
803
- id: _t(),
804
- ...u
805
- }), i(h);
806
- },
807
- style: {
808
- width: "fit-content"
809
- },
810
- children: /* @__PURE__ */ t.jsxs("div", { className: R.addButton, children: [
811
- /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
812
- /* @__PURE__ */ t.jsx(
813
- b,
814
- {
815
- name: "Plus",
816
- width: 16,
817
- height: 16
818
- }
819
- )
820
- ] })
821
- }
822
- )
823
- }
824
- )
825
- ] }),
826
- c !== void 0 && /* @__PURE__ */ t.jsx(Tt, { items: c }),
827
- q !== void 0 && /* @__PURE__ */ t.jsx(
828
- tt,
829
- {
830
- label: q.title || "Auto scroll interval",
831
- type: "number",
832
- value: String(q.autoInterval),
833
- onChange: (h) => q.setAutoInterval(Number(h)),
834
- min: 0.1,
835
- max: 100,
836
- style: {
837
- width: "100%"
838
- },
839
- postfix: "sec."
840
- }
841
- )
842
- ] });
843
- }, Xe = "_title_82zux_1", We = "_subtitle_82zux_5", Je = "_header_82zux_12", Qe = "_text_82zux_13", Ke = "_productsBlock_82zux_14", Ze = "_top_82zux_26", ts = "_itemsBlock_82zux_35", es = "_typeTexts_82zux_41", ss = "_block_82zux_48", ns = "_active_82zux_61", is = "_products_82zux_14", os = "_product_82zux_14", as = "_button_82zux_80", cs = "_disabled_82zux_91", ls = "_image_82zux_95", rs = "_info_82zux_102", ds = "_name_82zux_114", us = "_buttons_82zux_118", ms = "_modal_82zux_125", _s = "_link_82zux_145", ps = "_modalOptions_82zux_151", hs = "_addButton_82zux_157", gs = "_deleteButton_82zux_179", Z = {
844
- title: Xe,
845
- subtitle: We,
846
- header: Je,
847
- text: Qe,
848
- productsBlock: Ke,
849
- top: Ze,
850
- itemsBlock: ts,
851
- typeTexts: es,
852
- block: ss,
853
- active: ns,
854
- products: is,
855
- product: os,
856
- button: as,
857
- disabled: cs,
858
- image: ls,
859
- info: rs,
860
- name: ds,
861
- buttons: us,
862
- modal: ms,
863
- link: _s,
864
- modalOptions: ps,
865
- addButton: hs,
866
- deleteButton: gs
867
- }, Ja = (d) => {
144
+ }, Xt = "_title_82zux_1", Qt = "_subtitle_82zux_5", Jt = "_header_82zux_12", Kt = "_text_82zux_13", Zt = "_productsBlock_82zux_14", te = "_top_82zux_26", ee = "_itemsBlock_82zux_35", se = "_typeTexts_82zux_41", ne = "_block_82zux_48", ie = "_active_82zux_61", oe = "_products_82zux_14", ae = "_product_82zux_14", ce = "_button_82zux_80", le = "_disabled_82zux_91", re = "_image_82zux_95", de = "_info_82zux_102", ue = "_name_82zux_114", pe = "_buttons_82zux_118", me = "_modal_82zux_125", _e = "_link_82zux_145", he = "_modalOptions_82zux_151", ge = "_addButton_82zux_157", xe = "_deleteButton_82zux_179", G = {
145
+ title: Xt,
146
+ subtitle: Qt,
147
+ header: Jt,
148
+ text: Kt,
149
+ productsBlock: Zt,
150
+ top: te,
151
+ itemsBlock: ee,
152
+ typeTexts: se,
153
+ block: ne,
154
+ active: ie,
155
+ products: oe,
156
+ product: ae,
157
+ button: ce,
158
+ disabled: le,
159
+ image: re,
160
+ info: de,
161
+ name: ue,
162
+ buttons: pe,
163
+ modal: me,
164
+ link: _e,
165
+ modalOptions: he,
166
+ addButton: ge,
167
+ deleteButton: xe
168
+ }, Di = (u) => {
868
169
  const {
869
- isActiveItems: a,
170
+ isActiveItems: o,
870
171
  setIsActiveItems: e,
871
172
  items: s,
872
- setItems: i,
873
- other: c,
874
- title: l,
875
- subtitle: o,
876
- draggable: n = !1,
877
- withImage: m = !1,
878
- addable: v = !0,
879
- itemsOptions: f,
880
- hasRangeSelector: r = !1,
881
- rangeSelectorOptions: k,
882
- limit: p,
883
- autoScrollInterval: _,
884
- deletable: $
885
- } = d;
886
- function L(u) {
887
- if (m)
888
- return u ? /* @__PURE__ */ t.jsx(
173
+ setItems: n,
174
+ other: r,
175
+ title: c,
176
+ subtitle: a,
177
+ draggable: _ = !1,
178
+ withImage: N = !1,
179
+ addable: B = !0,
180
+ itemsOptions: h,
181
+ hasRangeSelector: i = !1,
182
+ rangeSelectorOptions: j,
183
+ limit: d,
184
+ autoScrollInterval: f,
185
+ deletable: y
186
+ } = u;
187
+ function D(l) {
188
+ if (N)
189
+ return l ? /* @__PURE__ */ t.jsx(
889
190
  "img",
890
191
  {
891
- src: `https://imagedelivery.net/${u[0]}/w=1000`,
192
+ src: `https://imagedelivery.net/${l[0]}/w=1000`,
892
193
  alt: "image",
893
194
  width: 16,
894
195
  height: 16
@@ -903,11 +204,11 @@ const Ge = (d) => {
903
204
  }
904
205
  );
905
206
  }
906
- const M = (u, S = !1) => {
907
- const q = f.find((B) => B.id === u);
908
- if (!q) return;
909
- const F = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
910
- n && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
207
+ const A = (l, C = !1) => {
208
+ const M = h.find((w) => w.id === l);
209
+ if (!M) return;
210
+ const V = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
211
+ _ && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
911
212
  b,
912
213
  {
913
214
  name: "DotsSixVertical",
@@ -917,20 +218,20 @@ const Ge = (d) => {
917
218
  }
918
219
  ) }),
919
220
  /* @__PURE__ */ t.jsx(
920
- et,
221
+ ct,
921
222
  {
922
- onChange: (B) => {
923
- const j = [...s], P = f.find((w) => w.name === B);
924
- if (!P) return;
925
- const x = P.id, I = j.map((w) => w === u ? x : w);
926
- i([...I]);
223
+ onChange: (w) => {
224
+ const m = [...s], S = h.find((I) => I.name === w);
225
+ if (!S) return;
226
+ const p = S.id, v = m.map((I) => I === l ? p : I);
227
+ n([...v]);
927
228
  },
928
- value: q.name,
929
- options: f.filter((B) => !s.find((j) => j === B.id)).map((B) => B.name),
930
- leftAddon: L(q.images)
229
+ value: M.name,
230
+ options: h.filter((w) => !s.find((m) => m === w.id)).map((w) => w.name),
231
+ leftAddon: D(M.images)
931
232
  }
932
233
  ),
933
- S && /* @__PURE__ */ t.jsx("div", { className: Z.buttons, children: /* @__PURE__ */ t.jsx("div", { className: Z.deleteButton, children: /* @__PURE__ */ t.jsx(
234
+ C && /* @__PURE__ */ t.jsx("div", { className: G.buttons, children: /* @__PURE__ */ t.jsx("div", { className: G.deleteButton, children: /* @__PURE__ */ t.jsx(
934
235
  b,
935
236
  {
936
237
  name: "Trash",
@@ -938,35 +239,35 @@ const Ge = (d) => {
938
239
  width: 20,
939
240
  height: 20,
940
241
  fill: "#C12A2A",
941
- onClick: () => i(s.filter((B) => B !== u))
242
+ onClick: () => n(s.filter((w) => w !== l))
942
243
  }
943
244
  ) }) })
944
245
  ] });
945
246
  return /* @__PURE__ */ t.jsx(
946
247
  "div",
947
248
  {
948
- className: Z.product,
949
- children: F
249
+ className: G.product,
250
+ children: V
950
251
  },
951
- u
252
+ l
952
253
  );
953
254
  };
954
- return /* @__PURE__ */ t.jsxs("div", { className: Z.productsBlock, children: [
955
- (l || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Z.top, children: [
956
- l && /* @__PURE__ */ t.jsx("h3", { className: Z.title, children: l }),
957
- a !== void 0 && /* @__PURE__ */ t.jsx(
958
- st,
255
+ return /* @__PURE__ */ t.jsxs("div", { className: G.productsBlock, children: [
256
+ (c || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: G.top, children: [
257
+ c && /* @__PURE__ */ t.jsx("h3", { className: G.title, children: c }),
258
+ o !== void 0 && /* @__PURE__ */ t.jsx(
259
+ at,
959
260
  {
960
- current: a,
961
- onChange: (u) => e == null ? void 0 : e(u)
261
+ current: o,
262
+ onChange: (l) => e == null ? void 0 : e(l)
962
263
  }
963
264
  )
964
265
  ] }),
965
- r && k && /* @__PURE__ */ t.jsx(qt, { ...k }),
966
- /* @__PURE__ */ t.jsxs("div", { className: Z.products, children: [
967
- o && /* @__PURE__ */ t.jsx("h5", { className: Z.subtitle, children: o }),
968
- s.map((u) => M(u, $)),
969
- v && /* @__PURE__ */ t.jsx(
266
+ i && j && /* @__PURE__ */ t.jsx(kt, { ...j }),
267
+ /* @__PURE__ */ t.jsxs("div", { className: G.products, children: [
268
+ a && /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: a }),
269
+ s.map((l) => A(l, y)),
270
+ B && /* @__PURE__ */ t.jsx(
970
271
  "div",
971
272
  {
972
273
  style: {
@@ -976,30 +277,30 @@ const Ge = (d) => {
976
277
  gap: 5
977
278
  },
978
279
  children: /* @__PURE__ */ t.jsx(
979
- ot,
280
+ et,
980
281
  {
981
282
  withoutHover: !0,
982
- className: Y(Z.button, {
983
- [Z.disabled]: !!(p && p <= s.length || s.length === f.length)
283
+ className: H(G.button, {
284
+ [G.disabled]: !!(d && d <= s.length || s.length === h.length)
984
285
  }),
985
286
  size: "s",
986
- disabled: !!(p && p <= s.length || s.length === f.length),
287
+ disabled: !!(d && d <= s.length || s.length === h.length),
987
288
  onClick: () => {
988
- const u = [...s];
989
- let S = null;
990
- if (f) {
991
- for (let q = 0; q < f.length; q++)
992
- if (!s.find((F) => F === f[q].id)) {
993
- S = f[q];
289
+ const l = [...s];
290
+ let C = null;
291
+ if (h) {
292
+ for (let M = 0; M < h.length; M++)
293
+ if (!s.find((V) => V === h[M].id)) {
294
+ C = h[M];
994
295
  break;
995
296
  }
996
297
  }
997
- u.push((S == null ? void 0 : S.id) || f[0].id), i(u);
298
+ l.push((C == null ? void 0 : C.id) || h[0].id), n(l);
998
299
  },
999
300
  style: {
1000
301
  width: "fit-content"
1001
302
  },
1002
- children: /* @__PURE__ */ t.jsxs("div", { className: Z.addButton, children: [
303
+ children: /* @__PURE__ */ t.jsxs("div", { className: G.addButton, children: [
1003
304
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
1004
305
  /* @__PURE__ */ t.jsx(
1005
306
  b,
@@ -1015,14 +316,14 @@ const Ge = (d) => {
1015
316
  }
1016
317
  )
1017
318
  ] }),
1018
- c !== void 0 && /* @__PURE__ */ t.jsx(Tt, { items: c }),
1019
- _ !== void 0 && /* @__PURE__ */ t.jsx(
1020
- tt,
319
+ r !== void 0 && /* @__PURE__ */ t.jsx(pt, { items: r }),
320
+ f !== void 0 && /* @__PURE__ */ t.jsx(
321
+ ut,
1021
322
  {
1022
323
  label: "Auto scroll interval",
1023
324
  type: "number",
1024
- value: String(_.scrollInterval),
1025
- onChange: (u) => _.setScrollInterval(Number(u)),
325
+ value: String(f.scrollInterval),
326
+ onChange: (l) => f.setScrollInterval(Number(l)),
1026
327
  min: 0.1,
1027
328
  max: 100,
1028
329
  style: {
@@ -1032,108 +333,108 @@ const Ge = (d) => {
1032
333
  }
1033
334
  )
1034
335
  ] });
1035
- }, fs = "_title_roi3a_1", xs = "_subtitle_roi3a_5", bs = "_header_roi3a_12", vs = "_text_roi3a_13", js = "_productsBlock_roi3a_14", ys = "_top_roi3a_26", ks = "_itemsBlock_roi3a_35", $s = "_typeTexts_roi3a_41", Is = "_block_roi3a_48", Ns = "_active_roi3a_61", ws = "_products_roi3a_14", Cs = "_product_roi3a_14", Ss = "_button_roi3a_80", Bs = "_disabled_roi3a_91", Ts = "_image_roi3a_95", Ps = "_info_roi3a_102", As = "_name_roi3a_114", Os = "_buttons_roi3a_118", Ms = "_modal_roi3a_125", qs = "_link_roi3a_145", zs = "_modalOptions_roi3a_151", Es = "_addButton_roi3a_164", Us = "_deleteButton_roi3a_179", Ds = "_closeIcon_roi3a_191", J = {
1036
- title: fs,
1037
- subtitle: xs,
1038
- header: bs,
1039
- text: vs,
1040
- productsBlock: js,
1041
- top: ys,
1042
- itemsBlock: ks,
1043
- typeTexts: $s,
1044
- block: Is,
1045
- active: Ns,
1046
- products: ws,
1047
- product: Cs,
1048
- button: Ss,
1049
- disabled: Bs,
1050
- image: Ts,
1051
- info: Ps,
1052
- name: As,
1053
- buttons: Os,
1054
- modal: Ms,
1055
- link: qs,
1056
- modalOptions: zs,
1057
- addButton: Es,
1058
- deleteButton: Us,
1059
- closeIcon: Ds
336
+ }, fe = "_title_roi3a_1", be = "_subtitle_roi3a_5", ve = "_header_roi3a_12", je = "_text_roi3a_13", ye = "_productsBlock_roi3a_14", ke = "_top_roi3a_26", Ne = "_itemsBlock_roi3a_35", Ie = "_typeTexts_roi3a_41", $e = "_block_roi3a_48", Se = "_active_roi3a_61", Ce = "_products_roi3a_14", we = "_product_roi3a_14", Be = "_button_roi3a_80", Pe = "_disabled_roi3a_91", Me = "_image_roi3a_95", Te = "_info_roi3a_102", qe = "_name_roi3a_114", Ae = "_buttons_roi3a_118", Oe = "_modal_roi3a_125", Ee = "_link_roi3a_145", ze = "_modalOptions_roi3a_151", De = "_addButton_roi3a_164", Re = "_deleteButton_roi3a_179", He = "_closeIcon_roi3a_191", L = {
337
+ title: fe,
338
+ subtitle: be,
339
+ header: ve,
340
+ text: je,
341
+ productsBlock: ye,
342
+ top: ke,
343
+ itemsBlock: Ne,
344
+ typeTexts: Ie,
345
+ block: $e,
346
+ active: Se,
347
+ products: Ce,
348
+ product: we,
349
+ button: Be,
350
+ disabled: Pe,
351
+ image: Me,
352
+ info: Te,
353
+ name: qe,
354
+ buttons: Ae,
355
+ modal: Oe,
356
+ link: Ee,
357
+ modalOptions: ze,
358
+ addButton: De,
359
+ deleteButton: Re,
360
+ closeIcon: He
1060
361
  };
1061
- function Ls({ product: d, children: a }) {
362
+ function Le({ product: u, children: o }) {
1062
363
  const {
1063
364
  attributes: e,
1064
365
  listeners: s,
1065
- setNodeRef: i,
1066
- transform: c,
1067
- transition: l,
1068
- isDragging: o
1069
- } = Ct({
1070
- id: d.id
1071
- }), n = {
1072
- transform: St.Transform.toString(c),
1073
- transition: l
366
+ setNodeRef: n,
367
+ transform: r,
368
+ transition: c,
369
+ isDragging: a
370
+ } = bt({
371
+ id: u.id
372
+ }), _ = {
373
+ transform: vt.Transform.toString(r),
374
+ transition: c
1074
375
  };
1075
376
  return /* @__PURE__ */ t.jsx(
1076
377
  "div",
1077
378
  {
1078
- ref: i,
1079
- style: n,
1080
- className: `${J.product} ${o ? J.dragging : ""}`,
379
+ ref: n,
380
+ style: _,
381
+ className: `${L.product} ${a ? L.dragging : ""}`,
1081
382
  ...e,
1082
383
  ...s,
1083
- children: a
384
+ children: o
1084
385
  }
1085
386
  );
1086
387
  }
1087
- const Qa = (d) => {
388
+ const Ri = (u) => {
1088
389
  const {
1089
- isActiveItems: a,
390
+ isActiveItems: o,
1090
391
  setIsActiveItems: e,
1091
392
  items: s,
1092
- setItems: i,
1093
- title: c,
1094
- subtitle: l,
1095
- editable: o = !0,
1096
- draggable: n = !1,
1097
- deletable: m = !0,
1098
- addable: v = !0,
1099
- itemsType: f,
1100
- itemsOptions: r,
1101
- addableOptions: k = {},
1102
- limit: p
1103
- } = d, [_, $] = g.useState(null), [L, M] = g.useState(null), u = g.useRef(null), S = yt(
1104
- kt(wt, {
393
+ setItems: n,
394
+ title: r,
395
+ subtitle: c,
396
+ editable: a = !0,
397
+ draggable: _ = !1,
398
+ deletable: N = !0,
399
+ addable: B = !0,
400
+ itemsType: h,
401
+ itemsOptions: i,
402
+ addableOptions: j = {},
403
+ limit: d
404
+ } = u, [f, y] = x.useState(null), [D, A] = x.useState(null), l = x.useRef(null), C = mt(
405
+ _t(ht, {
1105
406
  activationConstraint: {
1106
407
  distance: 5
1107
408
  }
1108
409
  })
1109
410
  );
1110
- g.useEffect(() => {
1111
- if (_) {
1112
- const j = [...s].map((P) => P.id === _.id ? _ : P);
1113
- i(j);
411
+ x.useEffect(() => {
412
+ if (f) {
413
+ const m = [...s].map((S) => S.id === f.id ? f : S);
414
+ n(m);
1114
415
  }
1115
- }, [_]), g.useEffect(() => {
1116
- u.current && L && (u.current.getBoundingClientRect().height, L.top);
1117
- }, [u.current, L]);
1118
- const q = (j, P) => {
1119
- j.stopPropagation();
1120
- const x = j.target.getBoundingClientRect();
1121
- M({
1122
- top: x.top + window.scrollY,
1123
- left: x.left - 30
1124
- }), $(P);
1125
- }, F = (j) => {
1126
- const { active: P, over: x } = j;
1127
- if (x && P.id !== x.id) {
1128
- const I = s.findIndex((D) => D.id === P.id), w = s.findIndex((D) => D.id === x.id);
1129
- if (I !== -1 && w !== -1) {
1130
- const D = [...s], [A] = D.splice(I, 1);
1131
- D.splice(w, 0, A), i(D);
416
+ }, [f]), x.useEffect(() => {
417
+ l.current && D && (l.current.getBoundingClientRect().height, D.top);
418
+ }, [l.current, D]);
419
+ const M = (m, S) => {
420
+ m.stopPropagation();
421
+ const p = m.target.getBoundingClientRect();
422
+ A({
423
+ top: p.top + window.scrollY,
424
+ left: p.left - 30
425
+ }), y(S);
426
+ }, V = (m) => {
427
+ const { active: S, over: p } = m;
428
+ if (p && S.id !== p.id) {
429
+ const v = s.findIndex((O) => O.id === S.id), I = s.findIndex((O) => O.id === p.id);
430
+ if (v !== -1 && I !== -1) {
431
+ const O = [...s], [P] = O.splice(v, 1);
432
+ O.splice(I, 0, P), n(O);
1132
433
  }
1133
434
  }
1134
- }, B = (j, P) => {
1135
- const x = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1136
- n && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
435
+ }, w = (m, S) => {
436
+ const p = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
437
+ _ && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1137
438
  b,
1138
439
  {
1139
440
  name: "DotsSixVertical",
@@ -1142,41 +443,41 @@ const Qa = (d) => {
1142
443
  height: 20
1143
444
  }
1144
445
  ) }),
1145
- f === "select" && r && /* @__PURE__ */ t.jsx(
1146
- et,
446
+ h === "select" && i && /* @__PURE__ */ t.jsx(
447
+ ct,
1147
448
  {
1148
- onChange: (I) => {
1149
- const w = [...s], D = r.find((U) => U.name === I);
1150
- if (!D) return;
1151
- const A = w.map((U) => U.id === j.id ? {
1152
- ...D,
449
+ onChange: (v) => {
450
+ const I = [...s], O = i.find((T) => T.name === v);
451
+ if (!O) return;
452
+ const P = I.map((T) => T.id === m.id ? {
453
+ ...O,
1153
454
  name: {
1154
- "en-US": I
455
+ "en-US": v
1155
456
  }
1156
- } : U);
1157
- $({
1158
- ...j,
457
+ } : T);
458
+ y({
459
+ ...m,
1159
460
  name: {
1160
- "en-US": I
461
+ "en-US": v
1161
462
  }
1162
- }), i([...A]);
463
+ }), n([...P]);
1163
464
  },
1164
- value: j.name,
1165
- options: r.filter((I) => !s.find((w) => w.name === I.name)).map((I) => I.name)
465
+ value: m.name,
466
+ options: i.filter((v) => !s.find((I) => I.name === v.name)).map((v) => v.name)
1166
467
  }
1167
468
  ),
1168
- /* @__PURE__ */ t.jsxs("div", { className: J.buttons, children: [
1169
- o && /* @__PURE__ */ t.jsx("div", { className: J.deleteButton, children: /* @__PURE__ */ t.jsx(
469
+ /* @__PURE__ */ t.jsxs("div", { className: L.buttons, children: [
470
+ a && /* @__PURE__ */ t.jsx("div", { className: L.deleteButton, children: /* @__PURE__ */ t.jsx(
1170
471
  b,
1171
472
  {
1172
473
  name: "Sliders",
1173
474
  hoverable: !0,
1174
475
  width: 20,
1175
476
  height: 20,
1176
- onClick: (I) => q(I, j)
477
+ onClick: (v) => M(v, m)
1177
478
  }
1178
479
  ) }),
1179
- m && /* @__PURE__ */ t.jsx("div", { className: J.deleteButton, children: /* @__PURE__ */ t.jsx(
480
+ N && /* @__PURE__ */ t.jsx("div", { className: L.deleteButton, children: /* @__PURE__ */ t.jsx(
1180
481
  b,
1181
482
  {
1182
483
  name: "Trash",
@@ -1184,57 +485,57 @@ const Qa = (d) => {
1184
485
  width: 20,
1185
486
  height: 20,
1186
487
  fill: "#C12A2A",
1187
- onClick: () => i(s.filter((I) => I.id !== j.id))
488
+ onClick: () => n(s.filter((v) => v.id !== m.id))
1188
489
  }
1189
490
  ) })
1190
491
  ] })
1191
492
  ] });
1192
- return n ? /* @__PURE__ */ t.jsx(
1193
- Ls,
493
+ return _ ? /* @__PURE__ */ t.jsx(
494
+ Le,
1194
495
  {
1195
- product: j,
1196
- index: P,
1197
- children: x
496
+ product: m,
497
+ index: S,
498
+ children: p
1198
499
  },
1199
- j.id
500
+ m.id
1200
501
  ) : /* @__PURE__ */ t.jsx(
1201
502
  "div",
1202
503
  {
1203
- className: J.product,
1204
- children: x
504
+ className: L.product,
505
+ children: p
1205
506
  },
1206
- j.id
507
+ m.id
1207
508
  );
1208
509
  };
1209
- return /* @__PURE__ */ t.jsxs("div", { className: J.productsBlock, children: [
1210
- (c || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: J.top, children: [
1211
- c && /* @__PURE__ */ t.jsx("h3", { className: J.title, children: c }),
1212
- a !== void 0 && /* @__PURE__ */ t.jsx(
1213
- st,
510
+ return /* @__PURE__ */ t.jsxs("div", { className: L.productsBlock, children: [
511
+ (r || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: L.top, children: [
512
+ r && /* @__PURE__ */ t.jsx("h3", { className: L.title, children: r }),
513
+ o !== void 0 && /* @__PURE__ */ t.jsx(
514
+ at,
1214
515
  {
1215
- current: a,
1216
- onChange: (j) => e == null ? void 0 : e(j)
516
+ current: o,
517
+ onChange: (m) => e == null ? void 0 : e(m)
1217
518
  }
1218
519
  )
1219
520
  ] }),
1220
- /* @__PURE__ */ t.jsxs("div", { className: J.products, children: [
1221
- l && /* @__PURE__ */ t.jsx("h5", { className: J.subtitle, children: l }),
1222
- n ? /* @__PURE__ */ t.jsx(
1223
- $t,
521
+ /* @__PURE__ */ t.jsxs("div", { className: L.products, children: [
522
+ c && /* @__PURE__ */ t.jsx("h5", { className: L.subtitle, children: c }),
523
+ _ ? /* @__PURE__ */ t.jsx(
524
+ gt,
1224
525
  {
1225
- sensors: S,
1226
- onDragEnd: F,
526
+ sensors: C,
527
+ onDragEnd: V,
1227
528
  children: /* @__PURE__ */ t.jsx(
1228
- It,
529
+ xt,
1229
530
  {
1230
- items: s.map((j) => j.id),
1231
- strategy: Nt,
1232
- children: s.map((j, P) => B(j, P))
531
+ items: s.map((m) => m.id),
532
+ strategy: ft,
533
+ children: s.map((m, S) => w(m, S))
1233
534
  }
1234
535
  )
1235
536
  }
1236
- ) : s.map((j, P) => B(j, P)),
1237
- v && /* @__PURE__ */ t.jsx(
537
+ ) : s.map((m, S) => w(m, S)),
538
+ B && /* @__PURE__ */ t.jsx(
1238
539
  "div",
1239
540
  {
1240
541
  style: {
@@ -1243,34 +544,34 @@ const Qa = (d) => {
1243
544
  justifyContent: "center"
1244
545
  },
1245
546
  children: /* @__PURE__ */ t.jsx(
1246
- ot,
547
+ et,
1247
548
  {
1248
549
  withoutHover: !0,
1249
- className: Y(J.button, {
1250
- [J.disabled]: !!(p && p <= s.length || s.length === (r == null ? void 0 : r.length))
550
+ className: H(L.button, {
551
+ [L.disabled]: !!(d && d <= s.length || s.length === (i == null ? void 0 : i.length))
1251
552
  }),
1252
553
  size: "s",
1253
- disabled: !!(p && p <= s.length || s.length === (r == null ? void 0 : r.length)),
554
+ disabled: !!(d && d <= s.length || s.length === (i == null ? void 0 : i.length)),
1254
555
  onClick: () => {
1255
- const j = [...s];
1256
- let P = null;
1257
- if (r) {
1258
- for (let x = 0; x < r.length; x++)
1259
- if (!s.find((I) => I.id === r[x].id)) {
1260
- P = r[x];
556
+ const m = [...s];
557
+ let S = null;
558
+ if (i) {
559
+ for (let p = 0; p < i.length; p++)
560
+ if (!s.find((v) => v.id === i[p].id)) {
561
+ S = i[p];
1261
562
  break;
1262
563
  }
1263
564
  }
1264
- f === "select" && r && j.push({
1265
- name: P ? P.name : r[0].name,
1266
- id: (P == null ? void 0 : P.id) || r[0].id,
1267
- ...k
1268
- }), i(j);
565
+ h === "select" && i && m.push({
566
+ name: S ? S.name : i[0].name,
567
+ id: (S == null ? void 0 : S.id) || i[0].id,
568
+ ...j
569
+ }), n(m);
1269
570
  },
1270
571
  style: {
1271
572
  width: "fit-content"
1272
573
  },
1273
- children: /* @__PURE__ */ t.jsxs("div", { className: J.addButton, children: [
574
+ children: /* @__PURE__ */ t.jsxs("div", { className: L.addButton, children: [
1274
575
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
1275
576
  /* @__PURE__ */ t.jsx(
1276
577
  b,
@@ -1287,269 +588,93 @@ const Qa = (d) => {
1287
588
  )
1288
589
  ] })
1289
590
  ] });
1290
- }, Hs = "_title_5iipd_1", Rs = "_subtitle_5iipd_5", Fs = "_header_5iipd_12", Vs = "_text_5iipd_13", Ys = "_productsBlock_5iipd_14", Gs = "_top_5iipd_26", Xs = "_itemsBlock_5iipd_35", Ws = "_typeTexts_5iipd_41", Js = "_block_5iipd_48", Qs = "_active_5iipd_61", Ks = "_products_5iipd_14", Zs = "_product_5iipd_14", tn = "_button_5iipd_80", en = "_disabled_5iipd_91", sn = "_image_5iipd_95", nn = "_info_5iipd_102", on = "_name_5iipd_114", an = "_buttons_5iipd_118", cn = "_modal_5iipd_125", ln = "_link_5iipd_146", rn = "_modalOptions_5iipd_152", dn = "_addButton_5iipd_165", un = "_deleteButton_5iipd_180", mn = "_closeIcon_5iipd_192", V = {
1291
- title: Hs,
1292
- subtitle: Rs,
1293
- header: Fs,
1294
- text: Vs,
1295
- productsBlock: Ys,
1296
- top: Gs,
1297
- itemsBlock: Xs,
1298
- typeTexts: Ws,
1299
- block: Js,
1300
- active: Qs,
1301
- products: Ks,
1302
- product: Zs,
1303
- button: tn,
1304
- disabled: en,
1305
- image: sn,
1306
- info: nn,
1307
- name: on,
1308
- buttons: an,
1309
- modal: cn,
1310
- link: ln,
1311
- modalOptions: rn,
1312
- addButton: dn,
1313
- deleteButton: un,
1314
- closeIcon: mn
1315
- }, _n = g.forwardRef(
1316
- (d, a) => {
1317
- const { activeItem: e, setActiveItem: s, popupPosition: i, modalOptions: c, setIsOpenModal: l } = d;
1318
- return /* @__PURE__ */ t.jsxs(
1319
- "div",
1320
- {
1321
- ref: a,
1322
- className: V.modal,
1323
- onClick: (o) => {
1324
- o.stopPropagation();
1325
- },
1326
- style: {
1327
- top: `${i.top}px`,
1328
- left: `${i.left}px`
1329
- },
1330
- children: [
1331
- /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
1332
- /* @__PURE__ */ t.jsx("h3", { className: V.title, children: e.name["en-US"] }),
1333
- /* @__PURE__ */ t.jsx("div", { className: V.closeIcon, children: /* @__PURE__ */ t.jsx(
1334
- b,
1335
- {
1336
- name: "X",
1337
- height: 20,
1338
- width: 20,
1339
- hoverable: !0,
1340
- onClick: () => {
1341
- s(null), l(!1);
1342
- }
1343
- }
1344
- ) })
1345
- ] }),
1346
- /* @__PURE__ */ t.jsx("div", { className: V.modalOptions, children: c.map((o) => {
1347
- if (o.type === "image")
1348
- return /* @__PURE__ */ t.jsx(
1349
- bt,
1350
- {
1351
- label: "Put up an attractive image",
1352
- activeImage: e[o.field],
1353
- onChange: (n) => {
1354
- const m = {
1355
- ...e,
1356
- [o.field]: n
1357
- };
1358
- s(m);
1359
- }
1360
- },
1361
- String(o.field)
1362
- );
1363
- if (o.type === "text")
1364
- return /* @__PURE__ */ t.jsx(
1365
- Ht,
1366
- {
1367
- typesText: e[o.field.type],
1368
- setTypesText: (n) => {
1369
- const m = {
1370
- ...e,
1371
- [o.field.type]: n
1372
- };
1373
- s(m);
1374
- },
1375
- text: e[o.field.text]["en-US"] || "",
1376
- setText: (n) => {
1377
- const m = {
1378
- ...e,
1379
- [o.field.text]: {
1380
- "en-US": n
1381
- }
1382
- };
1383
- s(m);
1384
- },
1385
- typeFont: e[o.field.type],
1386
- setTypeFont: (n) => {
1387
- const m = {
1388
- ...e,
1389
- [o.field.type]: n
1390
- };
1391
- s(m);
1392
- },
1393
- subtitle: o.label
1394
- }
1395
- );
1396
- if (o.type === "input")
1397
- return /* @__PURE__ */ t.jsx(
1398
- tt,
1399
- {
1400
- onChange: (n) => {
1401
- const m = {
1402
- ...e,
1403
- [o.field]: n
1404
- };
1405
- s(m);
1406
- },
1407
- value: e[o.field] || "",
1408
- label: o.label,
1409
- placeholder: o.placeholder
1410
- }
1411
- );
1412
- if (o.type === "inputSwitch")
1413
- return /* @__PURE__ */ t.jsxs("div", { className: V.link, children: [
1414
- /* @__PURE__ */ t.jsx(
1415
- tt,
1416
- {
1417
- onChange: (n) => {
1418
- const m = {
1419
- ...e,
1420
- [o.field.text]: n
1421
- };
1422
- s(m);
1423
- },
1424
- value: e[o.field.text] || "",
1425
- label: o.inputLabel,
1426
- placeholder: o.placeholder
1427
- }
1428
- ),
1429
- /* @__PURE__ */ t.jsx(
1430
- st,
1431
- {
1432
- current: !!e[o.field.switch] || !1,
1433
- label: o.switchLabel,
1434
- onChange: (n) => {
1435
- const m = {
1436
- ...e,
1437
- [o.field.switch]: n
1438
- };
1439
- s(m);
1440
- }
1441
- }
1442
- )
1443
- ] });
1444
- if (o.type === "select")
1445
- return /* @__PURE__ */ t.jsx(
1446
- et,
1447
- {
1448
- options: o.itemsOptions,
1449
- onChange: (n) => {
1450
- const m = {
1451
- ...e,
1452
- [o.field]: n
1453
- };
1454
- s(m);
1455
- },
1456
- label: o.label,
1457
- value: e[o.field] || "String",
1458
- leftAddon: o.leftAddon && o.leftAddon === "icon" && /* @__PURE__ */ t.jsx(b, { name: e[o.field] })
1459
- }
1460
- );
1461
- }) })
1462
- ]
1463
- }
1464
- );
1465
- }
1466
- );
1467
- function pn(d) {
1468
- const { product: a, children: e } = d, { attributes: s, listeners: i, setNodeRef: c, transform: l, transition: o, isDragging: n } = Ct({
1469
- id: a.id
1470
- }), m = {
1471
- transform: St.Transform.toString(l),
1472
- transition: o
591
+ };
592
+ function Ue(u) {
593
+ const { product: o, children: e } = u, { attributes: s, listeners: n, setNodeRef: r, transform: c, transition: a, isDragging: _ } = bt({
594
+ id: o.id
595
+ }), N = {
596
+ transform: vt.Transform.toString(c),
597
+ transition: a
1473
598
  };
1474
599
  return /* @__PURE__ */ t.jsx(
1475
600
  "div",
1476
601
  {
1477
- ref: c,
1478
- style: m,
1479
- className: `${V.product} ${n ? V.dragging : ""}`,
602
+ ref: r,
603
+ style: N,
604
+ className: `${F.product} ${_ ? F.dragging : ""}`,
1480
605
  ...s,
1481
- ...i,
606
+ ...n,
1482
607
  children: e
1483
608
  }
1484
609
  );
1485
610
  }
1486
- const Ka = (d) => {
611
+ const Hi = (u) => {
1487
612
  const {
1488
- isActiveItems: a,
613
+ isActiveItems: o,
1489
614
  setIsActiveItems: e,
1490
615
  items: s,
1491
- setItems: i,
1492
- other: c,
1493
- title: l,
1494
- subtitle: o,
1495
- editable: n = !0,
1496
- draggable: m = !1,
1497
- withImage: v = !1,
1498
- deletable: f = !0,
1499
- addable: r = !0,
1500
- itemsType: k,
1501
- itemsPlaceholder: p = "",
1502
- itemsOptions: _,
1503
- hasRangeSelector: $ = !1,
1504
- rangeSelectorOptions: L,
1505
- modalOptions: M,
1506
- addableOptions: u = {}
1507
- } = d, [S, q] = g.useState(null), [F, B] = g.useState({
616
+ setItems: n,
617
+ other: r,
618
+ title: c,
619
+ subtitle: a,
620
+ editable: _ = !0,
621
+ draggable: N = !1,
622
+ withImage: B = !1,
623
+ deletable: h = !0,
624
+ addable: i = !0,
625
+ itemsType: j,
626
+ itemsPlaceholder: d = "",
627
+ itemsOptions: f,
628
+ hasRangeSelector: y = !1,
629
+ rangeSelectorOptions: D,
630
+ modalOptions: A,
631
+ addableOptions: l = {}
632
+ } = u, [C, M] = x.useState(null), [V, w] = x.useState({
1508
633
  top: 0,
1509
634
  left: 0
1510
- }), [j, P] = g.useState(null), x = g.useRef(null), [I, w] = g.useState(!1), D = yt(
1511
- kt(wt, {
635
+ }), [m, S] = x.useState(null), p = x.useRef(null), [v, I] = x.useState(!1), O = mt(
636
+ _t(ht, {
1512
637
  activationConstraint: {
1513
638
  distance: 5
1514
639
  }
1515
640
  })
1516
641
  );
1517
- g.useEffect(() => {
1518
- const y = () => {
1519
- q(null), w(!1);
642
+ x.useEffect(() => {
643
+ const g = () => {
644
+ M(null), I(!1);
1520
645
  };
1521
- return document.body.addEventListener("click", y), q(null), w(!1), () => {
1522
- q(null), w(!1), document.body.removeEventListener("click", y);
646
+ return document.body.addEventListener("click", g), M(null), I(!1), () => {
647
+ M(null), I(!1), document.body.removeEventListener("click", g);
1523
648
  };
1524
- }, []), g.useEffect(() => {
1525
- if (S) {
1526
- const y = [...s].map((E) => E.id === S.id ? S : E);
1527
- i(y);
649
+ }, []), x.useEffect(() => {
650
+ if (C) {
651
+ const g = [...s].map((q) => q.id === C.id ? C : q);
652
+ n(g);
1528
653
  }
1529
- }, [S]), g.useEffect(() => {
1530
- if (x.current && j) {
1531
- const y = x.current.getBoundingClientRect().height, E = window.innerHeight;
1532
- let h = j.top;
1533
- h + y > E + window.scrollY - 200 && (h = E + window.scrollY - y - 200), h < 0 && (h = 10), B({
1534
- top: h,
1535
- left: j.left
654
+ }, [C]), x.useEffect(() => {
655
+ if (p.current && m) {
656
+ const g = p.current.getBoundingClientRect().height, q = window.innerHeight;
657
+ let E = m.top;
658
+ E + g > q + window.scrollY - 200 && (E = q + window.scrollY - g - 200), E < 0 && (E = 10), w({
659
+ top: E,
660
+ left: m.left
1536
661
  });
1537
662
  }
1538
- }, [x.current, j]);
1539
- const A = (y, E) => {
1540
- y.stopPropagation();
1541
- const h = y.target.getBoundingClientRect();
1542
- P({
1543
- top: h.top + window.scrollY,
1544
- left: h.left - 30
1545
- }), q(E), w(!0);
663
+ }, [p.current, m]);
664
+ const P = (g, q) => {
665
+ g.stopPropagation();
666
+ const E = g.target.getBoundingClientRect();
667
+ S({
668
+ top: E.top + window.scrollY,
669
+ left: E.left - 30
670
+ }), M(q), I(!0);
1546
671
  };
1547
- function U(y) {
1548
- if (v)
1549
- return y ? /* @__PURE__ */ t.jsx(
672
+ function T(g) {
673
+ if (B)
674
+ return g ? /* @__PURE__ */ t.jsx(
1550
675
  "img",
1551
676
  {
1552
- src: `https://imagedelivery.net/${y[0]}/w=1000`,
677
+ src: `https://imagedelivery.net/${g[0]}/w=1000`,
1553
678
  alt: "image",
1554
679
  width: 16,
1555
680
  height: 16
@@ -1564,19 +689,19 @@ const Ka = (d) => {
1564
689
  }
1565
690
  );
1566
691
  }
1567
- const nt = (y) => {
1568
- const { active: E, over: h } = y;
1569
- if (h && E.id !== h.id) {
1570
- const N = s.findIndex((H) => H.id === E.id), O = s.findIndex((H) => H.id === h.id);
1571
- if (N !== -1 && O !== -1) {
1572
- const H = [...s], [X] = H.splice(N, 1);
1573
- H.splice(O, 0, X), i(H);
692
+ const J = (g) => {
693
+ const { active: q, over: E } = g;
694
+ if (E && q.id !== E.id) {
695
+ const z = s.findIndex((U) => U.id === q.id), st = s.findIndex((U) => U.id === E.id);
696
+ if (z !== -1 && st !== -1) {
697
+ const U = [...s], [X] = U.splice(z, 1);
698
+ U.splice(st, 0, X), n(U);
1574
699
  }
1575
700
  }
1576
- }, dt = (y) => {
1577
- var h;
1578
- const E = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1579
- m && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
701
+ }, nt = (g) => {
702
+ var E;
703
+ const q = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
704
+ N && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1580
705
  b,
1581
706
  {
1582
707
  name: "DotsSixVertical",
@@ -1585,71 +710,71 @@ const Ka = (d) => {
1585
710
  height: 20
1586
711
  }
1587
712
  ) }),
1588
- k === "select" && _ && /* @__PURE__ */ t.jsx(
1589
- et,
713
+ j === "select" && f && /* @__PURE__ */ t.jsx(
714
+ ct,
1590
715
  {
1591
- onChange: (N) => {
1592
- const H = [...s].map((X) => X.id === y.id ? {
1593
- ...y,
716
+ onChange: (z) => {
717
+ const U = [...s].map((X) => X.id === g.id ? {
718
+ ...g,
1594
719
  name: {
1595
- "en-US": N
720
+ "en-US": z
1596
721
  }
1597
722
  } : X);
1598
- q({
1599
- ...y,
723
+ M({
724
+ ...g,
1600
725
  name: {
1601
- "en-US": N
726
+ "en-US": z
1602
727
  }
1603
- }), i([...H]);
728
+ }), n([...U]);
1604
729
  },
1605
- value: y.name["en-US"],
1606
- options: _.filter(
1607
- (N) => !s.find((O) => O.name["en-US"] === N)
730
+ value: g.name["en-US"],
731
+ options: f.filter(
732
+ (z) => !s.find((st) => st.name["en-US"] === z)
1608
733
  ),
1609
- leftAddon: U(y.images)
734
+ leftAddon: T(g.images)
1610
735
  }
1611
736
  ),
1612
- k === "input" && /* @__PURE__ */ t.jsx(
1613
- tt,
737
+ j === "input" && /* @__PURE__ */ t.jsx(
738
+ ut,
1614
739
  {
1615
- onChange: (N) => {
1616
- const H = [...s].map((X) => X.id === y.id ? {
1617
- ...y,
740
+ onChange: (z) => {
741
+ const U = [...s].map((X) => X.id === g.id ? {
742
+ ...g,
1618
743
  name: {
1619
- "en-US": N
744
+ "en-US": z
1620
745
  }
1621
746
  } : X);
1622
- i([...H]);
747
+ n([...U]);
1623
748
  },
1624
- value: y.name["en-US"],
1625
- placeholder: p
749
+ value: g.name["en-US"],
750
+ placeholder: d
1626
751
  }
1627
752
  ),
1628
- k === "image" && /* @__PURE__ */ t.jsx(
1629
- bt,
753
+ j === "image" && /* @__PURE__ */ t.jsx(
754
+ Nt,
1630
755
  {
1631
- onChange: (N) => {
1632
- const H = [...s].map((X) => X.id === y.id ? {
1633
- ...y,
1634
- images: N
756
+ onChange: (z) => {
757
+ const U = [...s].map((X) => X.id === g.id ? {
758
+ ...g,
759
+ images: z
1635
760
  } : X);
1636
- i([...H]);
761
+ n([...U]);
1637
762
  },
1638
- activeImage: (h = s.find((N) => N.id === y.id)) == null ? void 0 : h.images[0]
763
+ activeImage: (E = s.find((z) => z.id === g.id)) == null ? void 0 : E.images[0]
1639
764
  }
1640
765
  ),
1641
- /* @__PURE__ */ t.jsxs("div", { className: V.buttons, children: [
1642
- n && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
766
+ /* @__PURE__ */ t.jsxs("div", { className: F.buttons, children: [
767
+ _ && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
1643
768
  b,
1644
769
  {
1645
770
  name: "Sliders",
1646
771
  hoverable: !0,
1647
772
  width: 20,
1648
773
  height: 20,
1649
- onClick: (N) => A(N, y)
774
+ onClick: (z) => P(z, g)
1650
775
  }
1651
776
  ) }),
1652
- f && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
777
+ h && /* @__PURE__ */ t.jsx("div", { className: F.deleteButton, children: /* @__PURE__ */ t.jsx(
1653
778
  b,
1654
779
  {
1655
780
  name: "Trash",
@@ -1657,68 +782,68 @@ const Ka = (d) => {
1657
782
  width: 20,
1658
783
  height: 20,
1659
784
  fill: "#C12A2A",
1660
- onClick: () => i(s.filter((N) => N.id !== y.id))
785
+ onClick: () => n(s.filter((z) => z.id !== g.id))
1661
786
  }
1662
787
  ) })
1663
788
  ] })
1664
789
  ] });
1665
- return m ? /* @__PURE__ */ t.jsx(
1666
- pn,
790
+ return N ? /* @__PURE__ */ t.jsx(
791
+ Ue,
1667
792
  {
1668
- product: y,
1669
- children: E
793
+ product: g,
794
+ children: q
1670
795
  },
1671
- y.id
796
+ g.id
1672
797
  ) : /* @__PURE__ */ t.jsx(
1673
798
  "div",
1674
799
  {
1675
- className: V.product,
1676
- children: E
800
+ className: F.product,
801
+ children: q
1677
802
  },
1678
- y.id
803
+ g.id
1679
804
  );
1680
805
  };
1681
- return /* @__PURE__ */ t.jsxs("div", { className: V.productsBlock, children: [
1682
- (l || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
1683
- l && /* @__PURE__ */ t.jsx("h3", { className: V.title, children: l }),
1684
- a !== void 0 && /* @__PURE__ */ t.jsx(
1685
- st,
806
+ return /* @__PURE__ */ t.jsxs("div", { className: F.productsBlock, children: [
807
+ (c || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: F.top, children: [
808
+ c && /* @__PURE__ */ t.jsx("h3", { className: F.title, children: c }),
809
+ o !== void 0 && /* @__PURE__ */ t.jsx(
810
+ at,
1686
811
  {
1687
- current: a,
1688
- onChange: (y) => e == null ? void 0 : e(y)
812
+ current: o,
813
+ onChange: (g) => e == null ? void 0 : e(g)
1689
814
  }
1690
815
  )
1691
816
  ] }),
1692
- S && n && M && I && /* @__PURE__ */ t.jsx(
1693
- _n,
817
+ C && _ && A && v && /* @__PURE__ */ t.jsx(
818
+ Bt,
1694
819
  {
1695
- ref: x,
1696
- activeItem: S,
1697
- setActiveItem: q,
1698
- popupPosition: F,
1699
- modalOptions: M,
1700
- setIsOpenModal: w
820
+ ref: p,
821
+ activeItem: C,
822
+ setActiveItem: M,
823
+ popupPosition: V,
824
+ modalOptions: A,
825
+ setIsOpenModal: I
1701
826
  }
1702
827
  ),
1703
- $ && L && /* @__PURE__ */ t.jsx(qt, { ...L }),
1704
- /* @__PURE__ */ t.jsxs("div", { className: V.products, children: [
1705
- o && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: o }),
1706
- m ? /* @__PURE__ */ t.jsx(
1707
- $t,
828
+ y && D && /* @__PURE__ */ t.jsx(kt, { ...D }),
829
+ /* @__PURE__ */ t.jsxs("div", { className: F.products, children: [
830
+ a && /* @__PURE__ */ t.jsx("h5", { className: F.subtitle, children: a }),
831
+ N ? /* @__PURE__ */ t.jsx(
832
+ gt,
1708
833
  {
1709
- sensors: D,
1710
- onDragEnd: nt,
834
+ sensors: O,
835
+ onDragEnd: J,
1711
836
  children: /* @__PURE__ */ t.jsx(
1712
- It,
837
+ xt,
1713
838
  {
1714
- items: s.map((y) => y.id),
1715
- strategy: Nt,
1716
- children: s.map((y) => dt(y))
839
+ items: s.map((g) => g.id),
840
+ strategy: ft,
841
+ children: s.map((g) => nt(g))
1717
842
  }
1718
843
  )
1719
844
  }
1720
- ) : s.map((y) => dt(y)),
1721
- r && /* @__PURE__ */ t.jsx(
845
+ ) : s.map((g) => nt(g)),
846
+ i && /* @__PURE__ */ t.jsx(
1722
847
  "div",
1723
848
  {
1724
849
  style: {
@@ -1727,49 +852,49 @@ const Ka = (d) => {
1727
852
  justifyContent: "center"
1728
853
  },
1729
854
  children: /* @__PURE__ */ t.jsx(
1730
- ot,
855
+ et,
1731
856
  {
1732
857
  withoutHover: !0,
1733
- className: V.button,
858
+ className: F.button,
1734
859
  size: "s",
1735
860
  onClick: () => {
1736
- const y = [...s];
1737
- let E = null;
1738
- if (_) {
1739
- for (let h = 0; h < _.length; h++)
1740
- if (!s.find((N) => N.name["en-US"] === _[h])) {
1741
- E = _[h];
861
+ const g = [...s];
862
+ let q = null;
863
+ if (f) {
864
+ for (let E = 0; E < f.length; E++)
865
+ if (!s.find((z) => z.name["en-US"] === f[E])) {
866
+ q = f[E];
1742
867
  break;
1743
868
  }
1744
869
  }
1745
- k === "select" && _ ? y.push({
870
+ j === "select" && f ? g.push({
1746
871
  name: {
1747
- "en-US": E || _[0]
872
+ "en-US": q || f[0]
1748
873
  },
1749
- id: _t(),
1750
- ...u,
874
+ id: ot(),
875
+ ...l,
1751
876
  maxSymbols: 100
1752
877
  // пример значения
1753
- }) : k === "input" ? y.push({
878
+ }) : j === "input" ? g.push({
1754
879
  name: {
1755
880
  "en-US": ""
1756
881
  },
1757
- id: _t(),
1758
- ...u,
882
+ id: ot(),
883
+ ...l,
1759
884
  maxSymbols: 100
1760
- }) : y.push({
885
+ }) : g.push({
1761
886
  name: {
1762
887
  "en-US": `Image ${s.length + 1}`
1763
888
  },
1764
- id: _t(),
1765
- ...u,
889
+ id: ot(),
890
+ ...l,
1766
891
  maxSymbols: 100
1767
- }), i(y);
892
+ }), n(g);
1768
893
  },
1769
894
  style: {
1770
895
  width: "fit-content"
1771
896
  },
1772
- children: /* @__PURE__ */ t.jsxs("div", { className: V.addButton, children: [
897
+ children: /* @__PURE__ */ t.jsxs("div", { className: F.addButton, children: [
1773
898
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
1774
899
  /* @__PURE__ */ t.jsx(
1775
900
  b,
@@ -1785,226 +910,108 @@ const Ka = (d) => {
1785
910
  }
1786
911
  )
1787
912
  ] }),
1788
- c !== void 0 && /* @__PURE__ */ t.jsx(Tt, { items: c })
913
+ r !== void 0 && /* @__PURE__ */ t.jsx(pt, { items: r })
1789
914
  ] });
1790
- }, hn = "_title_hvj8m_1", gn = "_subtitle_hvj8m_5", fn = "_header_hvj8m_12", xn = "_text_hvj8m_13", bn = "_productsBlock_hvj8m_14", vn = "_buttonsBlock_hvj8m_15", jn = "_top_hvj8m_26", yn = "_itemsBlock_hvj8m_35", kn = "_typeTexts_hvj8m_41", $n = "_block_hvj8m_48", In = "_active_hvj8m_60", Nn = "_products_hvj8m_14", wn = "_product_hvj8m_14", Cn = "_button_hvj8m_15", Sn = "_image_hvj8m_90", Bn = "_info_hvj8m_97", Tn = "_name_hvj8m_109", Pn = "_buttons_hvj8m_15", An = "_modal_hvj8m_120", On = "_other_hvj8m_140", Mn = "_options_hvj8m_146", qn = "_closeIcon_hvj8m_154", rt = {
1791
- title: hn,
1792
- subtitle: gn,
1793
- header: fn,
1794
- text: xn,
1795
- productsBlock: bn,
1796
- buttonsBlock: vn,
1797
- top: jn,
1798
- itemsBlock: yn,
1799
- typeTexts: kn,
1800
- block: $n,
1801
- active: In,
1802
- products: Nn,
1803
- product: wn,
1804
- button: Cn,
1805
- image: Sn,
1806
- info: Bn,
1807
- name: Tn,
1808
- buttons: Pn,
1809
- modal: An,
1810
- other: On,
1811
- options: Mn,
1812
- closeIcon: qn
1813
- }, zn = g.forwardRef((d, a) => {
1814
- const { activeButton: e, setActiveButton: s, popupPosition: i, editableLink: c = !0 } = d, [l, o] = g.useState(e.typesText), [n, m] = g.useState(e.destination), [v, f] = g.useState(e.page), [r, k] = g.useState(e.link || ""), [p, _] = g.useState(e.text || { "en-US": "" }), [$, L] = g.useState(e.openInNewTab), { pages: M } = Vt();
1815
- return g.useEffect(() => {
1816
- s({
1817
- ...e,
1818
- ...{
1819
- text: p,
1820
- link: r,
1821
- destination: n,
1822
- typesText: l,
1823
- page: v,
1824
- openInNewTab: $
1825
- }
1826
- });
1827
- }, [l, n, r, p, v, $]), /* @__PURE__ */ t.jsxs(
1828
- "div",
1829
- {
1830
- className: rt.modal,
1831
- onClick: (u) => {
1832
- u.stopPropagation();
1833
- },
1834
- style: {
1835
- top: `${i.top}px`,
1836
- left: `${i.left}px`
1837
- },
1838
- ref: a,
1839
- children: [
1840
- /* @__PURE__ */ t.jsxs("div", { className: rt.top, children: [
1841
- /* @__PURE__ */ t.jsx("h3", { className: rt.title, children: e.type }),
1842
- /* @__PURE__ */ t.jsx("div", { className: rt.closeIcon, children: /* @__PURE__ */ t.jsx(
1843
- b,
1844
- {
1845
- name: "X",
1846
- height: 20,
1847
- width: 20,
1848
- hoverable: !0,
1849
- onClick: () => s(null)
1850
- }
1851
- ) })
1852
- ] }),
1853
- /* @__PURE__ */ t.jsxs("div", { className: rt.options, children: [
1854
- c && /* @__PURE__ */ t.jsx(
1855
- et,
1856
- {
1857
- label: "Destination",
1858
- onChange: (u) => m(u),
1859
- options: ["Go to Page", "Open Link"].filter((u) => u !== n),
1860
- value: n
1861
- }
1862
- ),
1863
- c && (n === "Go to Page" ? /* @__PURE__ */ t.jsx(
1864
- et,
1865
- {
1866
- label: "Go to",
1867
- onChange: (u) => f(u),
1868
- options: M ? Object.values(M).filter((u) => u.name !== v).map((u) => u.name) : [],
1869
- value: v
1870
- }
1871
- ) : /* @__PURE__ */ t.jsx(
1872
- tt,
1873
- {
1874
- onChange: (u) => k(u),
1875
- value: r,
1876
- placeholder: "https://",
1877
- label: "Link"
1878
- }
1879
- )),
1880
- c && /* @__PURE__ */ t.jsx(
1881
- st,
1882
- {
1883
- current: e.openInNewTab,
1884
- label: "Open in new tab",
1885
- onChange: (u) => L(u)
1886
- }
1887
- ),
1888
- /* @__PURE__ */ t.jsx(
1889
- zt,
1890
- {
1891
- onChange: (u) => _({ "en-US": u }),
1892
- value: p["en-US"],
1893
- label: "Text",
1894
- maxLength: 150
1895
- }
1896
- ),
1897
- /* @__PURE__ */ t.jsx(
1898
- Lt,
1899
- {
1900
- typesText: l,
1901
- setTypesText: o
1902
- }
1903
- )
1904
- ] })
1905
- ]
1906
- }
1907
- );
1908
- }), En = "_subtitle_jql1y_1", Un = "_header_jql1y_8", Dn = "_text_jql1y_9", Ln = "_productsBlock_jql1y_10", Hn = "_buttonsBlock_jql1y_11", Rn = "_top_jql1y_23", Fn = "_itemsBlock_jql1y_32", Vn = "_typeTexts_jql1y_38", Yn = "_block_jql1y_45", Gn = "_active_jql1y_58", Xn = "_products_jql1y_10", Wn = "_product_jql1y_10", Jn = "_button_jql1y_11", Qn = "_image_jql1y_88", Kn = "_info_jql1y_95", Zn = "_name_jql1y_107", ti = "_buttons_jql1y_11", ei = "_modal_jql1y_118", si = "_other_jql1y_138", ni = "_options_jql1y_144", ii = "_addButton_jql1y_150", oi = "_deleteButton_jql1y_165", at = {
1909
- subtitle: En,
1910
- header: Un,
1911
- text: Dn,
1912
- productsBlock: Ln,
1913
- buttonsBlock: Hn,
1914
- top: Rn,
1915
- itemsBlock: Fn,
1916
- typeTexts: Vn,
1917
- block: Yn,
1918
- active: Gn,
1919
- products: Xn,
1920
- product: Wn,
1921
- button: Jn,
1922
- image: Qn,
1923
- info: Kn,
1924
- name: Zn,
1925
- buttons: ti,
1926
- modal: ei,
1927
- other: si,
1928
- options: ni,
1929
- addButton: ii,
1930
- deleteButton: oi
1931
- }, ai = (d) => {
1932
- const { buttons: a, setButtons: e, deletable: s = !0, addable: i = !0, editableLink: c = !0 } = d, [l, o] = g.useState(null), [n, m] = g.useState({
915
+ }, Fe = "_subtitle_jql1y_1", Ve = "_header_jql1y_8", Ye = "_text_jql1y_9", We = "_productsBlock_jql1y_10", Ge = "_buttonsBlock_jql1y_11", Xe = "_top_jql1y_23", Qe = "_itemsBlock_jql1y_32", Je = "_typeTexts_jql1y_38", Ke = "_block_jql1y_45", Ze = "_active_jql1y_58", ts = "_products_jql1y_10", es = "_product_jql1y_10", ss = "_button_jql1y_11", ns = "_image_jql1y_88", is = "_info_jql1y_95", os = "_name_jql1y_107", as = "_buttons_jql1y_11", cs = "_modal_jql1y_118", ls = "_other_jql1y_138", rs = "_options_jql1y_144", ds = "_addButton_jql1y_150", us = "_deleteButton_jql1y_165", K = {
916
+ subtitle: Fe,
917
+ header: Ve,
918
+ text: Ye,
919
+ productsBlock: We,
920
+ buttonsBlock: Ge,
921
+ top: Xe,
922
+ itemsBlock: Qe,
923
+ typeTexts: Je,
924
+ block: Ke,
925
+ active: Ze,
926
+ products: ts,
927
+ product: es,
928
+ button: ss,
929
+ image: ns,
930
+ info: is,
931
+ name: os,
932
+ buttons: as,
933
+ modal: cs,
934
+ other: ls,
935
+ options: rs,
936
+ addButton: ds,
937
+ deleteButton: us
938
+ }, ps = (u) => {
939
+ const { buttons: o, setButtons: e, deletable: s = !0, addable: n = !0, editableLink: r = !0 } = u, [c, a] = x.useState(null), [_, N] = x.useState({
1933
940
  top: 0,
1934
941
  left: 0
1935
- }), [v, f] = g.useState(null), r = g.useRef(null);
1936
- g.useEffect(() => {
1937
- const p = () => {
1938
- o(null);
942
+ }), [B, h] = x.useState(null), i = x.useRef(null);
943
+ x.useEffect(() => {
944
+ const d = () => {
945
+ a(null);
1939
946
  };
1940
- return document.body.addEventListener("click", p), o(null), () => {
1941
- o(null), document.body.removeEventListener("click", p);
947
+ return document.body.addEventListener("click", d), a(null), () => {
948
+ a(null), document.body.removeEventListener("click", d);
1942
949
  };
1943
- }, []), g.useEffect(() => {
1944
- if (l) {
1945
- const p = [...a].map((_) => _.id === l.id ? l : _);
1946
- e(p);
950
+ }, []), x.useEffect(() => {
951
+ if (c) {
952
+ const d = [...o].map((f) => f.id === c.id ? c : f);
953
+ e(d);
1947
954
  }
1948
- }, [l]), g.useEffect(() => {
1949
- if (r.current && v) {
1950
- const p = r.current.getBoundingClientRect().height, _ = window.innerHeight;
1951
- let $ = v.top;
1952
- $ + p > _ + window.scrollY - 200 && ($ = _ + window.scrollY - p - 200), $ < 0 && ($ = 10), m({
1953
- top: $,
1954
- left: v.left
955
+ }, [c]), x.useEffect(() => {
956
+ if (i.current && B) {
957
+ const d = i.current.getBoundingClientRect().height, f = window.innerHeight;
958
+ let y = B.top;
959
+ y + d > f + window.scrollY - 200 && (y = f + window.scrollY - d - 200), y < 0 && (y = 10), N({
960
+ top: y,
961
+ left: B.left
1955
962
  });
1956
963
  }
1957
- }, [r.current, v]);
1958
- const k = (p, _) => {
1959
- p.stopPropagation();
1960
- const $ = p.target.getBoundingClientRect();
1961
- f({
1962
- top: $.top + window.scrollY - 70,
1963
- left: $.left - (i ? 30 : 65)
1964
- }), o(_);
964
+ }, [i.current, B]);
965
+ const j = (d, f) => {
966
+ d.stopPropagation();
967
+ const y = d.target.getBoundingClientRect();
968
+ h({
969
+ top: y.top + window.scrollY - 70,
970
+ left: y.left - (n ? 30 : 65)
971
+ }), a(f);
1965
972
  };
1966
- return /* @__PURE__ */ t.jsxs("div", { className: at.products, children: [
1967
- /* @__PURE__ */ t.jsx("h5", { className: at.subtitle, children: "Button Type" }),
1968
- a.map((p) => /* @__PURE__ */ t.jsxs(
973
+ return /* @__PURE__ */ t.jsxs("div", { className: K.products, children: [
974
+ /* @__PURE__ */ t.jsx("h5", { className: K.subtitle, children: "Button Type" }),
975
+ o.map((d) => /* @__PURE__ */ t.jsxs(
1969
976
  "div",
1970
977
  {
1971
- className: at.product,
978
+ className: K.product,
1972
979
  children: [
1973
980
  /* @__PURE__ */ t.jsx(
1974
- et,
981
+ ct,
1975
982
  {
1976
- onChange: (_) => {
1977
- const L = [...a].map((M) => M.id === p.id ? {
1978
- ...p,
1979
- type: _
1980
- } : M);
1981
- e(L);
983
+ onChange: (f) => {
984
+ const D = [...o].map((A) => A.id === d.id ? {
985
+ ...d,
986
+ type: f
987
+ } : A);
988
+ e(D);
1982
989
  },
1983
- value: p.type,
990
+ value: d.type,
1984
991
  options: ["Primary", "Secondary", "Tertiary"]
1985
992
  }
1986
993
  ),
1987
- /* @__PURE__ */ t.jsxs("div", { className: at.buttons, children: [
1988
- /* @__PURE__ */ t.jsx("div", { className: at.deleteButton, children: /* @__PURE__ */ t.jsx(
994
+ /* @__PURE__ */ t.jsxs("div", { className: K.buttons, children: [
995
+ /* @__PURE__ */ t.jsx("div", { className: K.deleteButton, children: /* @__PURE__ */ t.jsx(
1989
996
  b,
1990
997
  {
1991
998
  name: "Sliders",
1992
999
  hoverable: !0,
1993
1000
  width: 20,
1994
1001
  height: 20,
1995
- onClick: (_) => {
1996
- k(_, p);
1002
+ onClick: (f) => {
1003
+ j(f, d);
1997
1004
  }
1998
1005
  }
1999
1006
  ) }),
2000
- s && /* @__PURE__ */ t.jsx("div", { className: at.deleteButton, children: /* @__PURE__ */ t.jsx(
1007
+ s && /* @__PURE__ */ t.jsx("div", { className: K.deleteButton, children: /* @__PURE__ */ t.jsx(
2001
1008
  b,
2002
1009
  {
2003
1010
  name: "Trash",
2004
1011
  hoverable: !0,
2005
1012
  onClick: () => {
2006
- const _ = a.filter(($) => $.id !== p.id);
2007
- e(_);
1013
+ const f = o.filter((y) => y.id !== d.id);
1014
+ e(f);
2008
1015
  },
2009
1016
  width: 20,
2010
1017
  height: 20,
@@ -2014,19 +1021,19 @@ const Ka = (d) => {
2014
1021
  ] })
2015
1022
  ]
2016
1023
  },
2017
- p.id
1024
+ d.id
2018
1025
  )),
2019
- l && /* @__PURE__ */ t.jsx(
2020
- zn,
1026
+ c && /* @__PURE__ */ t.jsx(
1027
+ Pt,
2021
1028
  {
2022
- ref: r,
2023
- activeButton: l,
2024
- setActiveButton: o,
2025
- popupPosition: n,
2026
- editableLink: c
1029
+ ref: i,
1030
+ activeButton: c,
1031
+ setActiveButton: a,
1032
+ popupPosition: _,
1033
+ editableLink: r
2027
1034
  }
2028
1035
  ),
2029
- i && /* @__PURE__ */ t.jsx(
1036
+ n && /* @__PURE__ */ t.jsx(
2030
1037
  "div",
2031
1038
  {
2032
1039
  style: {
@@ -2035,16 +1042,16 @@ const Ka = (d) => {
2035
1042
  justifyContent: "center"
2036
1043
  },
2037
1044
  children: /* @__PURE__ */ t.jsx(
2038
- ot,
1045
+ et,
2039
1046
  {
2040
1047
  withoutHover: !0,
2041
- className: at.button,
1048
+ className: K.button,
2042
1049
  size: "s",
2043
1050
  onClick: () => {
2044
- const p = [...a];
2045
- c ? p.push({
1051
+ const d = [...o];
1052
+ r ? d.push({
2046
1053
  type: "Primary",
2047
- id: _t(),
1054
+ id: ot(),
2048
1055
  typesText: [],
2049
1056
  text: {
2050
1057
  "en-US": "Button Name"
@@ -2052,9 +1059,9 @@ const Ka = (d) => {
2052
1059
  destination: "Go to Page",
2053
1060
  page: "",
2054
1061
  openInNewTab: !1
2055
- }) : p.push({
1062
+ }) : d.push({
2056
1063
  type: "Primary",
2057
- id: _t(),
1064
+ id: ot(),
2058
1065
  typesText: [],
2059
1066
  text: {
2060
1067
  "en-US": "Create Ticket"
@@ -2062,12 +1069,12 @@ const Ka = (d) => {
2062
1069
  destination: "Go to Page",
2063
1070
  page: "",
2064
1071
  openInNewTab: !1
2065
- }), e(p);
1072
+ }), e(d);
2066
1073
  },
2067
1074
  style: {
2068
1075
  width: "fit-content"
2069
1076
  },
2070
- children: /* @__PURE__ */ t.jsxs("div", { className: at.addButton, children: [
1077
+ children: /* @__PURE__ */ t.jsxs("div", { className: K.addButton, children: [
2071
1078
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
2072
1079
  /* @__PURE__ */ t.jsx(
2073
1080
  b,
@@ -2083,214 +1090,91 @@ const Ka = (d) => {
2083
1090
  }
2084
1091
  )
2085
1092
  ] });
2086
- }, Za = (d) => {
2087
- const { isActiveButtons: a, setIsActiveButtons: e, buttons: s, setButtons: i, editableLink: c = !0 } = d;
2088
- return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: rt.buttonsBlock, children: [
2089
- /* @__PURE__ */ t.jsxs("div", { className: rt.top, children: [
2090
- /* @__PURE__ */ t.jsx("h3", { className: rt.title, children: "Buttons" }),
1093
+ }, Li = (u) => {
1094
+ const { isActiveButtons: o, setIsActiveButtons: e, buttons: s, setButtons: n, editableLink: r = !0 } = u;
1095
+ return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: dt.buttonsBlock, children: [
1096
+ /* @__PURE__ */ t.jsxs("div", { className: dt.top, children: [
1097
+ /* @__PURE__ */ t.jsx("h3", { className: dt.title, children: "Buttons" }),
2091
1098
  /* @__PURE__ */ t.jsx(
2092
- st,
1099
+ at,
2093
1100
  {
2094
- current: a,
2095
- onChange: (l) => e(l)
1101
+ current: o,
1102
+ onChange: (c) => e(c)
2096
1103
  }
2097
1104
  )
2098
1105
  ] }),
2099
1106
  /* @__PURE__ */ t.jsx(
2100
- ai,
1107
+ ps,
2101
1108
  {
2102
1109
  buttons: s,
2103
- setButtons: i,
2104
- editableLink: c
1110
+ setButtons: n,
1111
+ editableLink: r
2105
1112
  }
2106
1113
  )
2107
1114
  ] }) });
2108
- }, ci = "_wrapper_m18qi_1", li = "_subtitle_m18qi_7", ri = "_content_m18qi_14", di = "_range_m18qi_22", ui = "_track_m18qi_27", mi = "_progress_m18qi_36", _i = "_dots_m18qi_46", pi = "_dot_m18qi_46", hi = "_active_m18qi_65", gi = "_input_m18qi_77", fi = "_countBlock_m18qi_91", xi = "_count_m18qi_91", bi = "_controls_m18qi_107", vi = "_button_m18qi_113", W = {
2109
- wrapper: ci,
2110
- subtitle: li,
2111
- content: ri,
2112
- range: di,
2113
- track: ui,
2114
- progress: mi,
2115
- dots: _i,
2116
- dot: pi,
2117
- active: hi,
2118
- input: gi,
2119
- countBlock: fi,
2120
- count: xi,
2121
- controls: bi,
2122
- button: vi
2123
- }, qt = (d) => {
2124
- const { label: a, min: e = 1, max: s = 4, step: i = 1, count: c, setCount: l } = d, [o, n] = g.useState(!1), m = Array.from({ length: (s - e) / i + 1 }), v = (c - e) / (s - e) * 100, f = () => {
2125
- c < s && l(c + i);
2126
- }, r = () => {
2127
- c > e && l(c - i);
2128
- }, k = (p) => {
2129
- const _ = e + p * i;
2130
- l(_);
2131
- };
2132
- return /* @__PURE__ */ t.jsxs("div", { className: W.wrapper, children: [
2133
- a && /* @__PURE__ */ t.jsx("h5", { className: W.subtitle, children: a }),
2134
- /* @__PURE__ */ t.jsxs("div", { className: W.content, children: [
2135
- /* @__PURE__ */ t.jsxs("div", { className: W.range, children: [
2136
- /* @__PURE__ */ t.jsx("div", { className: W.track }),
2137
- /* @__PURE__ */ t.jsx(
2138
- "div",
2139
- {
2140
- className: W.progress,
2141
- style: { width: `${v}%` }
2142
- }
2143
- ),
2144
- /* @__PURE__ */ t.jsx("div", { className: W.dots, children: m.map((p, _) => {
2145
- const $ = _ <= (c - e) / i;
2146
- return /* @__PURE__ */ t.jsx(
2147
- "button",
2148
- {
2149
- onClick: () => k(_),
2150
- className: Y(W.dot, {
2151
- [W.active]: $,
2152
- [W.inactive]: !$,
2153
- [W.dragging]: o
2154
- }),
2155
- "aria-label": `Set value to ${e + _ * i}`
2156
- },
2157
- _
2158
- );
2159
- }) }),
2160
- /* @__PURE__ */ t.jsx(
2161
- "input",
2162
- {
2163
- type: "range",
2164
- min: e,
2165
- max: s,
2166
- step: i,
2167
- value: c,
2168
- onChange: (p) => l(Number(p.target.value)),
2169
- onMouseDown: () => n(!0),
2170
- onMouseUp: () => n(!1),
2171
- onTouchStart: () => n(!0),
2172
- onTouchEnd: () => n(!1),
2173
- className: W.input
2174
- }
2175
- )
2176
- ] }),
2177
- /* @__PURE__ */ t.jsxs("div", { className: W.countBlock, children: [
2178
- /* @__PURE__ */ t.jsx(
2179
- tt,
2180
- {
2181
- type: "number",
2182
- min: e,
2183
- max: s,
2184
- paddingless: !0,
2185
- onChange: (p) => {
2186
- const _ = Number(p);
2187
- _ > s ? l(s) : _ < e ? l(e) : l(_);
2188
- },
2189
- value: String(c)
2190
- }
2191
- ),
2192
- /* @__PURE__ */ t.jsxs("div", { className: W.controls, children: [
2193
- /* @__PURE__ */ t.jsx(
2194
- "button",
2195
- {
2196
- onClick: f,
2197
- disabled: c >= s,
2198
- className: W.button,
2199
- "aria-label": "Increment count",
2200
- children: /* @__PURE__ */ t.jsx(
2201
- b,
2202
- {
2203
- name: "CaretUp",
2204
- width: 15,
2205
- height: 15
2206
- }
2207
- )
2208
- }
2209
- ),
2210
- /* @__PURE__ */ t.jsx(
2211
- "button",
2212
- {
2213
- onClick: r,
2214
- disabled: c <= e,
2215
- className: W.button,
2216
- "aria-label": "Decrement count",
2217
- children: /* @__PURE__ */ t.jsx(
2218
- b,
2219
- {
2220
- name: "CaretDown",
2221
- width: 15,
2222
- height: 15
2223
- }
2224
- )
2225
- }
2226
- )
2227
- ] })
2228
- ] })
2229
- ] })
2230
- ] });
2231
- }, ji = "_title_1ropb_1", yi = "_subtitle_1ropb_5", ki = "_header_1ropb_12", $i = "_text_1ropb_13", Ii = "_productsBlock_1ropb_14", Ni = "_top_1ropb_26", wi = "_itemsBlock_1ropb_35", Ci = "_typeTexts_1ropb_41", Si = "_block_1ropb_48", Bi = "_active_1ropb_61", Ti = "_products_1ropb_14", Pi = "_product_1ropb_14", Ai = "_button_1ropb_80", Oi = "_image_1ropb_91", Mi = "_info_1ropb_98", qi = "_name_1ropb_110", zi = "_buttons_1ropb_114", Ei = "_modal_1ropb_121", Ui = "_link_1ropb_142", Di = "_modalOptions_1ropb_148", Li = "_addButton_1ropb_161", Hi = "_deleteButton_1ropb_176", Ri = "_closeIcon_1ropb_188", G = {
2232
- title: ji,
2233
- subtitle: yi,
2234
- header: ki,
2235
- text: $i,
2236
- productsBlock: Ii,
2237
- top: Ni,
2238
- itemsBlock: wi,
2239
- typeTexts: Ci,
2240
- block: Si,
2241
- active: Bi,
2242
- products: Ti,
2243
- product: Pi,
2244
- button: Ai,
2245
- image: Oi,
2246
- info: Mi,
2247
- name: qi,
2248
- buttons: zi,
2249
- modal: Ei,
2250
- link: Ui,
2251
- modalOptions: Di,
2252
- addButton: Li,
2253
- deleteButton: Hi,
2254
- closeIcon: Ri
2255
- }, Fi = (d) => {
2256
- const { activeItem: a, setActiveItem: e, popupPosition: s, setIsOpenModal: i, itemsOptions: c } = d, l = c.find((o) => o.id === a.listingId);
2257
- return l ? /* @__PURE__ */ t.jsxs(
1115
+ }, ms = "_title_1ropb_1", _s = "_subtitle_1ropb_5", hs = "_header_1ropb_12", gs = "_text_1ropb_13", xs = "_productsBlock_1ropb_14", fs = "_top_1ropb_26", bs = "_itemsBlock_1ropb_35", vs = "_typeTexts_1ropb_41", js = "_block_1ropb_48", ys = "_active_1ropb_61", ks = "_products_1ropb_14", Ns = "_product_1ropb_14", Is = "_button_1ropb_80", $s = "_image_1ropb_91", Ss = "_info_1ropb_98", Cs = "_name_1ropb_110", ws = "_buttons_1ropb_114", Bs = "_modal_1ropb_121", Ps = "_link_1ropb_142", Ms = "_modalOptions_1ropb_148", Ts = "_addButton_1ropb_161", qs = "_deleteButton_1ropb_176", As = "_closeIcon_1ropb_188", R = {
1116
+ title: ms,
1117
+ subtitle: _s,
1118
+ header: hs,
1119
+ text: gs,
1120
+ productsBlock: xs,
1121
+ top: fs,
1122
+ itemsBlock: bs,
1123
+ typeTexts: vs,
1124
+ block: js,
1125
+ active: ys,
1126
+ products: ks,
1127
+ product: Ns,
1128
+ button: Is,
1129
+ image: $s,
1130
+ info: Ss,
1131
+ name: Cs,
1132
+ buttons: ws,
1133
+ modal: Bs,
1134
+ link: Ps,
1135
+ modalOptions: Ms,
1136
+ addButton: Ts,
1137
+ deleteButton: qs,
1138
+ closeIcon: As
1139
+ }, Os = (u) => {
1140
+ const { activeItem: o, setActiveItem: e, popupPosition: s, setIsOpenModal: n, itemsOptions: r } = u, c = r.find((a) => a.id === o.listingId);
1141
+ return c ? /* @__PURE__ */ t.jsxs(
2258
1142
  "div",
2259
1143
  {
2260
- className: G.modal,
2261
- onClick: (o) => {
2262
- o.stopPropagation();
1144
+ className: R.modal,
1145
+ onClick: (a) => {
1146
+ a.stopPropagation();
2263
1147
  },
2264
1148
  style: {
2265
1149
  top: `${s.top}px`,
2266
1150
  left: `${s.left}px`
2267
1151
  },
2268
1152
  children: [
2269
- /* @__PURE__ */ t.jsxs("div", { className: G.top, children: [
2270
- /* @__PURE__ */ t.jsx("h3", { children: Yt(l.productData.name) }),
2271
- /* @__PURE__ */ t.jsx("div", { className: G.closeIcon, children: /* @__PURE__ */ t.jsx(
1153
+ /* @__PURE__ */ t.jsxs("div", { className: R.top, children: [
1154
+ /* @__PURE__ */ t.jsx("h3", { children: Mt(c.productData.name) }),
1155
+ /* @__PURE__ */ t.jsx("div", { className: R.closeIcon, children: /* @__PURE__ */ t.jsx(
2272
1156
  b,
2273
1157
  {
2274
1158
  name: "X",
2275
1159
  height: 20,
2276
1160
  width: 20,
2277
1161
  onClick: () => {
2278
- i(!1), e(null);
1162
+ n(!1), e(null);
2279
1163
  }
2280
1164
  }
2281
1165
  ) })
2282
1166
  ] }),
2283
- /* @__PURE__ */ t.jsx("div", { className: G.modalOptions, children: /* @__PURE__ */ t.jsx(
2284
- bt,
1167
+ /* @__PURE__ */ t.jsx("div", { className: R.modalOptions, children: /* @__PURE__ */ t.jsx(
1168
+ Nt,
2285
1169
  {
2286
1170
  label: "Put up an attractive image",
2287
- activeImage: l.productData.images.length > 0 ? l.productData.images[0].cfId : void 0,
2288
- onChange: (o) => {
2289
- const n = {
2290
- ...a,
2291
- image: o[0]
1171
+ activeImage: c.productData.images.length > 0 ? c.productData.images[0].cfId : void 0,
1172
+ onChange: (a) => {
1173
+ const _ = {
1174
+ ...o,
1175
+ image: a[0]
2292
1176
  };
2293
- e(n);
1177
+ e(_);
2294
1178
  }
2295
1179
  }
2296
1180
  ) })
@@ -2298,81 +1182,81 @@ const Ka = (d) => {
2298
1182
  }
2299
1183
  ) : null;
2300
1184
  };
2301
- function Vi(d) {
2302
- const { product: a, children: e } = d, { attributes: s, listeners: i, setNodeRef: c, transform: l, transition: o, isDragging: n } = Ct({
2303
- id: String(a.listingId)
2304
- }), m = {
2305
- transform: St.Transform.toString(l),
2306
- transition: o
1185
+ function Es(u) {
1186
+ const { product: o, children: e } = u, { attributes: s, listeners: n, setNodeRef: r, transform: c, transition: a, isDragging: _ } = bt({
1187
+ id: String(o.listingId)
1188
+ }), N = {
1189
+ transform: vt.Transform.toString(c),
1190
+ transition: a
2307
1191
  };
2308
1192
  return /* @__PURE__ */ t.jsx(
2309
1193
  "div",
2310
1194
  {
2311
- ref: c,
2312
- style: m,
2313
- className: `${G.product} ${n ? G.dragging : ""}`,
1195
+ ref: r,
1196
+ style: N,
1197
+ className: `${R.product} ${_ ? R.dragging : ""}`,
2314
1198
  ...s,
2315
- ...i,
1199
+ ...n,
2316
1200
  children: e
2317
1201
  }
2318
1202
  );
2319
1203
  }
2320
- const tc = (d) => {
1204
+ const Ui = (u) => {
2321
1205
  const {
2322
- isActiveItems: a,
1206
+ isActiveItems: o,
2323
1207
  setIsActiveItems: e,
2324
1208
  items: s,
2325
- setItems: i,
2326
- other: c,
2327
- title: l,
2328
- subtitle: o,
2329
- editable: n = !0,
2330
- draggable: m = !1,
2331
- withImage: v = !1,
2332
- deletable: f = !0,
2333
- addable: r = !0,
2334
- itemsType: k,
2335
- itemsOptions: p
2336
- } = d, [_, $] = g.useState(
1209
+ setItems: n,
1210
+ other: r,
1211
+ title: c,
1212
+ subtitle: a,
1213
+ editable: _ = !0,
1214
+ draggable: N = !1,
1215
+ withImage: B = !1,
1216
+ deletable: h = !0,
1217
+ addable: i = !0,
1218
+ itemsType: j,
1219
+ itemsOptions: d
1220
+ } = u, [f, y] = x.useState(
2337
1221
  null
2338
- ), [L, M] = g.useState({
1222
+ ), [D, A] = x.useState({
2339
1223
  top: 0,
2340
1224
  left: 0
2341
- }), [u, S] = g.useState(!1), q = yt(
2342
- kt(wt, {
1225
+ }), [l, C] = x.useState(!1), M = mt(
1226
+ _t(ht, {
2343
1227
  activationConstraint: {
2344
1228
  distance: 5
2345
1229
  }
2346
1230
  })
2347
1231
  );
2348
- g.useEffect(() => {
2349
- const x = () => {
2350
- $(null), S(!1);
1232
+ x.useEffect(() => {
1233
+ const p = () => {
1234
+ y(null), C(!1);
2351
1235
  };
2352
- return document.body.addEventListener("click", x), $(null), S(!1), () => {
2353
- $(null), S(!1), document.body.removeEventListener("click", x);
1236
+ return document.body.addEventListener("click", p), y(null), C(!1), () => {
1237
+ y(null), C(!1), document.body.removeEventListener("click", p);
2354
1238
  };
2355
- }, []), g.useEffect(() => {
2356
- if (_) {
2357
- const x = [...s].map((I) => I.listingId === _.listingId ? _ : I);
2358
- i(x);
1239
+ }, []), x.useEffect(() => {
1240
+ if (f) {
1241
+ const p = [...s].map((v) => v.listingId === f.listingId ? f : v);
1242
+ n(p);
2359
1243
  }
2360
- }, [_]);
2361
- const F = (x, I) => {
2362
- x.stopPropagation();
2363
- const w = x.target.getBoundingClientRect(), D = 100, A = window.innerHeight;
2364
- let U = w.top + window.scrollY;
2365
- U + D > A && (U = A - D - 20), S(!0), M({
2366
- top: U - 80,
2367
- left: w.left - 30
2368
- }), $(I);
1244
+ }, [f]);
1245
+ const V = (p, v) => {
1246
+ p.stopPropagation();
1247
+ const I = p.target.getBoundingClientRect(), O = 100, P = window.innerHeight;
1248
+ let T = I.top + window.scrollY;
1249
+ T + O > P && (T = P - O - 20), C(!0), A({
1250
+ top: T - 80,
1251
+ left: I.left - 30
1252
+ }), y(v);
2369
1253
  };
2370
- function B(x) {
2371
- if (v)
2372
- return x ? /* @__PURE__ */ t.jsx(
1254
+ function w(p) {
1255
+ if (B)
1256
+ return p ? /* @__PURE__ */ t.jsx(
2373
1257
  "img",
2374
1258
  {
2375
- src: `https://imagedelivery.net/${x}/w=1000`,
1259
+ src: `https://imagedelivery.net/${p}/w=1000`,
2376
1260
  alt: "image",
2377
1261
  width: 16,
2378
1262
  height: 16
@@ -2387,20 +1271,20 @@ const tc = (d) => {
2387
1271
  }
2388
1272
  );
2389
1273
  }
2390
- const j = (x) => {
2391
- const { active: I, over: w } = x;
2392
- if (w && I.id !== w.id) {
2393
- const D = s.findIndex((U) => String(U.listingId) === I.id), A = s.findIndex((U) => String(U.listingId) === w.id);
2394
- if (D !== -1 && A !== -1) {
2395
- const U = [...s], [nt] = U.splice(D, 1);
2396
- U.splice(A, 0, nt), i(U);
1274
+ const m = (p) => {
1275
+ const { active: v, over: I } = p;
1276
+ if (I && v.id !== I.id) {
1277
+ const O = s.findIndex((T) => String(T.listingId) === v.id), P = s.findIndex((T) => String(T.listingId) === I.id);
1278
+ if (O !== -1 && P !== -1) {
1279
+ const T = [...s], [J] = T.splice(O, 1);
1280
+ T.splice(P, 0, J), n(T);
2397
1281
  }
2398
1282
  }
2399
- }, P = (x, I) => {
2400
- const w = p.find((A) => x.listingId === A.id);
2401
- if (!w) return null;
2402
- const D = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2403
- m && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1283
+ }, S = (p, v) => {
1284
+ const I = d.find((P) => p.listingId === P.id);
1285
+ if (!I) return null;
1286
+ const O = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1287
+ N && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
2404
1288
  b,
2405
1289
  {
2406
1290
  name: "DotsSixVertical",
@@ -2409,40 +1293,40 @@ const tc = (d) => {
2409
1293
  height: 20
2410
1294
  }
2411
1295
  ) }),
2412
- k === "select" && /* @__PURE__ */ t.jsx(
2413
- et,
1296
+ j === "select" && /* @__PURE__ */ t.jsx(
1297
+ ct,
2414
1298
  {
2415
- onChange: (A) => {
2416
- const U = [...s], nt = p.find((E) => E.productData.name === A);
2417
- if (!nt) return;
2418
- const dt = {
2419
- listingId: nt.id,
2420
- image: nt.productData.images.length > 0 ? nt.productData.images[0].cfId : ""
2421
- }, y = U.map((E) => E.listingId === x.listingId ? dt : E);
2422
- $(dt), i([...y]);
1299
+ onChange: (P) => {
1300
+ const T = [...s], J = d.find((q) => q.productData.name === P);
1301
+ if (!J) return;
1302
+ const nt = {
1303
+ listingId: J.id,
1304
+ image: J.productData.images.length > 0 ? J.productData.images[0].cfId : ""
1305
+ }, g = T.map((q) => q.listingId === p.listingId ? nt : q);
1306
+ y(nt), n([...g]);
2423
1307
  },
2424
- value: w.productData.name,
1308
+ value: I.productData.name,
2425
1309
  options: [
2426
- ...p.filter((A) => !s.find((U) => U.listingId === A.id)).map((A) => A.productData.name)
1310
+ ...d.filter((P) => !s.find((T) => T.listingId === P.id)).map((P) => P.productData.name)
2427
1311
  ],
2428
- leftAddon: B(
2429
- x.image || w.productData.images.length > 0 && w.productData.images[0].cfId || ""
1312
+ leftAddon: w(
1313
+ p.image || I.productData.images.length > 0 && I.productData.images[0].cfId || ""
2430
1314
  )
2431
1315
  },
2432
- I
1316
+ v
2433
1317
  ),
2434
- /* @__PURE__ */ t.jsxs("div", { className: G.buttons, children: [
2435
- n && /* @__PURE__ */ t.jsx("div", { className: G.deleteButton, children: /* @__PURE__ */ t.jsx(
1318
+ /* @__PURE__ */ t.jsxs("div", { className: R.buttons, children: [
1319
+ _ && /* @__PURE__ */ t.jsx("div", { className: R.deleteButton, children: /* @__PURE__ */ t.jsx(
2436
1320
  b,
2437
1321
  {
2438
1322
  name: "Sliders",
2439
1323
  hoverable: !0,
2440
1324
  width: 20,
2441
1325
  height: 20,
2442
- onClick: (A) => F(A, x)
1326
+ onClick: (P) => V(P, p)
2443
1327
  }
2444
1328
  ) }),
2445
- f && /* @__PURE__ */ t.jsx("div", { className: G.deleteButton, children: /* @__PURE__ */ t.jsx(
1329
+ h && /* @__PURE__ */ t.jsx("div", { className: R.deleteButton, children: /* @__PURE__ */ t.jsx(
2446
1330
  b,
2447
1331
  {
2448
1332
  name: "Trash",
@@ -2450,66 +1334,66 @@ const tc = (d) => {
2450
1334
  width: 20,
2451
1335
  height: 20,
2452
1336
  fill: "#C12A2A",
2453
- onClick: () => i(s.filter((A) => A !== x))
1337
+ onClick: () => n(s.filter((P) => P !== p))
2454
1338
  }
2455
1339
  ) })
2456
1340
  ] })
2457
1341
  ] });
2458
- return m ? /* @__PURE__ */ t.jsx(
2459
- Vi,
1342
+ return N ? /* @__PURE__ */ t.jsx(
1343
+ Es,
2460
1344
  {
2461
- product: x,
2462
- children: D
1345
+ product: p,
1346
+ children: O
2463
1347
  },
2464
- x.listingId
1348
+ p.listingId
2465
1349
  ) : /* @__PURE__ */ t.jsx(
2466
1350
  "div",
2467
1351
  {
2468
- className: G.product,
2469
- children: D
1352
+ className: R.product,
1353
+ children: O
2470
1354
  },
2471
- x.listingId
1355
+ p.listingId
2472
1356
  );
2473
1357
  };
2474
- return /* @__PURE__ */ t.jsxs("div", { className: G.productsBlock, children: [
2475
- (l || a !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: G.top, children: [
2476
- l && /* @__PURE__ */ t.jsx("h3", { className: G.title, children: l }),
2477
- a !== void 0 && /* @__PURE__ */ t.jsx(
2478
- st,
1358
+ return /* @__PURE__ */ t.jsxs("div", { className: R.productsBlock, children: [
1359
+ (c || o !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: R.top, children: [
1360
+ c && /* @__PURE__ */ t.jsx("h3", { className: R.title, children: c }),
1361
+ o !== void 0 && /* @__PURE__ */ t.jsx(
1362
+ at,
2479
1363
  {
2480
- current: a,
2481
- onChange: (x) => e == null ? void 0 : e(x)
1364
+ current: o,
1365
+ onChange: (p) => e == null ? void 0 : e(p)
2482
1366
  }
2483
1367
  )
2484
1368
  ] }),
2485
- u && _ && /* @__PURE__ */ t.jsx(
2486
- Fi,
1369
+ l && f && /* @__PURE__ */ t.jsx(
1370
+ Os,
2487
1371
  {
2488
- activeItem: _,
2489
- setActiveItem: $,
2490
- setIsOpenModal: S,
2491
- popupPosition: L,
2492
- itemsOptions: p
1372
+ activeItem: f,
1373
+ setActiveItem: y,
1374
+ setIsOpenModal: C,
1375
+ popupPosition: D,
1376
+ itemsOptions: d
2493
1377
  }
2494
1378
  ),
2495
- /* @__PURE__ */ t.jsxs("div", { className: G.products, children: [
2496
- o && /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: o }),
2497
- m ? /* @__PURE__ */ t.jsx(
2498
- $t,
1379
+ /* @__PURE__ */ t.jsxs("div", { className: R.products, children: [
1380
+ a && /* @__PURE__ */ t.jsx("h5", { className: R.subtitle, children: a }),
1381
+ N ? /* @__PURE__ */ t.jsx(
1382
+ gt,
2499
1383
  {
2500
- sensors: q,
2501
- onDragEnd: j,
1384
+ sensors: M,
1385
+ onDragEnd: m,
2502
1386
  children: /* @__PURE__ */ t.jsx(
2503
- It,
1387
+ xt,
2504
1388
  {
2505
- items: s.map((x) => String(x.listingId)),
2506
- strategy: Nt,
2507
- children: s.map((x, I) => P(x, I))
1389
+ items: s.map((p) => String(p.listingId)),
1390
+ strategy: ft,
1391
+ children: s.map((p, v) => S(p, v))
2508
1392
  }
2509
1393
  )
2510
1394
  }
2511
- ) : s.map((x, I) => P(x, I)),
2512
- r && /* @__PURE__ */ t.jsx(
1395
+ ) : s.map((p, v) => S(p, v)),
1396
+ i && /* @__PURE__ */ t.jsx(
2513
1397
  "div",
2514
1398
  {
2515
1399
  style: {
@@ -2518,28 +1402,28 @@ const tc = (d) => {
2518
1402
  justifyContent: "center"
2519
1403
  },
2520
1404
  children: /* @__PURE__ */ t.jsx(
2521
- ot,
1405
+ et,
2522
1406
  {
2523
1407
  withoutHover: !0,
2524
- className: G.button,
1408
+ className: R.button,
2525
1409
  size: "s",
2526
1410
  onClick: () => {
2527
- const x = [...s];
2528
- for (let I = 0; I < p.length; I++)
2529
- if (!s.find((w) => w.listingId === p[I].id)) {
2530
- x.push({
2531
- listingId: p[I].id,
2532
- image: p[I].productData.images.length > 0 ? p[I].productData.images[0].cfId : ""
1411
+ const p = [...s];
1412
+ for (let v = 0; v < d.length; v++)
1413
+ if (!s.find((I) => I.listingId === d[v].id)) {
1414
+ p.push({
1415
+ listingId: d[v].id,
1416
+ image: d[v].productData.images.length > 0 ? d[v].productData.images[0].cfId : ""
2533
1417
  });
2534
1418
  break;
2535
1419
  }
2536
- i(x);
1420
+ n(p);
2537
1421
  },
2538
- disabled: s.length === p.length,
1422
+ disabled: s.length === d.length,
2539
1423
  style: {
2540
1424
  width: "fit-content"
2541
1425
  },
2542
- children: /* @__PURE__ */ t.jsxs("div", { className: G.addButton, children: [
1426
+ children: /* @__PURE__ */ t.jsxs("div", { className: R.addButton, children: [
2543
1427
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
2544
1428
  /* @__PURE__ */ t.jsx(
2545
1429
  b,
@@ -2555,71 +1439,71 @@ const tc = (d) => {
2555
1439
  }
2556
1440
  )
2557
1441
  ] }),
2558
- c !== void 0 && /* @__PURE__ */ t.jsx(Tt, { items: c })
1442
+ r !== void 0 && /* @__PURE__ */ t.jsx(pt, { items: r })
2559
1443
  ] });
2560
- }, Yi = "_options_6cemk_1", Gi = "_price_6cemk_12", Xi = "_oldPrice_6cemk_19", Wi = "_newPrice_6cemk_27", Ji = "_animate_6cemk_34", Qi = "_appearAndBounce_6cemk_1", Ki = "_meta_6cemk_52", Zi = "_info_6cemk_58", to = "_infoRight_6cemk_66", eo = "_buttons_6cemk_73", so = "_variants_6cemk_80", no = "_variant_6cemk_80", io = "_stock_6cemk_98", oo = "_variantInfo_6cemk_105", ao = "_quantity_6cemk_111", co = "_count_6cemk_118", lo = "_focused_6cemk_135", ro = "_button_6cemk_73", uo = "_activeVariant_6cemk_161", mo = "_chargeTypes_6cemk_165", _o = "_charge_6cemk_165", po = "_chargeActive_6cemk_190", ho = "_title_6cemk_198", T = {
2561
- options: Yi,
2562
- price: Gi,
2563
- oldPrice: Xi,
2564
- newPrice: Wi,
2565
- animate: Ji,
2566
- appearAndBounce: Qi,
2567
- meta: Ki,
2568
- info: Zi,
2569
- infoRight: to,
2570
- buttons: eo,
2571
- variants: so,
2572
- variant: no,
2573
- stock: io,
2574
- variantInfo: oo,
2575
- quantity: ao,
2576
- count: co,
2577
- focused: lo,
2578
- button: ro,
2579
- activeVariant: uo,
2580
- chargeTypes: mo,
2581
- charge: _o,
2582
- chargeActive: po,
2583
- title: ho
2584
- }, go = "_wrapper_c1dht_1", fo = "_label_c1dht_9", xo = "_input_c1dht_18", bo = "_paddingless_c1dht_31", vo = "_content_c1dht_35", jo = "_contentBorder_c1dht_47", yo = "_borderless_c1dht_52", ko = "_rightIcon_c1dht_57", it = {
2585
- wrapper: go,
2586
- label: fo,
2587
- input: xo,
2588
- paddingless: bo,
2589
- content: vo,
2590
- contentBorder: jo,
2591
- borderless: yo,
2592
- rightIcon: ko
2593
- }, $o = (d) => {
1444
+ }, zs = "_options_6cemk_1", Ds = "_price_6cemk_12", Rs = "_oldPrice_6cemk_19", Hs = "_newPrice_6cemk_27", Ls = "_animate_6cemk_34", Us = "_appearAndBounce_6cemk_1", Fs = "_meta_6cemk_52", Vs = "_info_6cemk_58", Ys = "_infoRight_6cemk_66", Ws = "_buttons_6cemk_73", Gs = "_variants_6cemk_80", Xs = "_variant_6cemk_80", Qs = "_stock_6cemk_98", Js = "_variantInfo_6cemk_105", Ks = "_quantity_6cemk_111", Zs = "_count_6cemk_118", tn = "_focused_6cemk_135", en = "_button_6cemk_73", sn = "_activeVariant_6cemk_161", nn = "_chargeTypes_6cemk_165", on = "_charge_6cemk_165", an = "_chargeActive_6cemk_190", cn = "_title_6cemk_198", $ = {
1445
+ options: zs,
1446
+ price: Ds,
1447
+ oldPrice: Rs,
1448
+ newPrice: Hs,
1449
+ animate: Ls,
1450
+ appearAndBounce: Us,
1451
+ meta: Fs,
1452
+ info: Vs,
1453
+ infoRight: Ys,
1454
+ buttons: Ws,
1455
+ variants: Gs,
1456
+ variant: Xs,
1457
+ stock: Qs,
1458
+ variantInfo: Js,
1459
+ quantity: Ks,
1460
+ count: Zs,
1461
+ focused: tn,
1462
+ button: en,
1463
+ activeVariant: sn,
1464
+ chargeTypes: nn,
1465
+ charge: on,
1466
+ chargeActive: an,
1467
+ title: cn
1468
+ }, ln = "_wrapper_c1dht_1", rn = "_label_c1dht_9", dn = "_input_c1dht_18", un = "_paddingless_c1dht_31", pn = "_content_c1dht_35", mn = "_contentBorder_c1dht_47", _n = "_borderless_c1dht_52", hn = "_rightIcon_c1dht_57", Q = {
1469
+ wrapper: ln,
1470
+ label: rn,
1471
+ input: dn,
1472
+ paddingless: un,
1473
+ content: pn,
1474
+ contentBorder: mn,
1475
+ borderless: _n,
1476
+ rightIcon: hn
1477
+ }, gn = (u) => {
2594
1478
  const {
2595
- onChange: a,
1479
+ onChange: o,
2596
1480
  style: e,
2597
1481
  label: s,
2598
- value: i,
2599
- type: c,
2600
- min: l,
2601
- max: o,
2602
- placeholder: n,
2603
- disabled: m = !1,
2604
- required: v = !1,
2605
- regex: f,
2606
- paddingless: r = !1,
2607
- borderless: k = !1,
2608
- editable: p = !1,
2609
- isSearch: _ = !1,
2610
- centered: $ = !1
2611
- } = d, { themeSettings: L } = Et(), { inputs: M } = L, [u, S] = g.useState(!1);
2612
- function q(B) {
2613
- return Number(B) < 0 ? String(l) : B;
1482
+ value: n,
1483
+ type: r,
1484
+ min: c,
1485
+ max: a,
1486
+ placeholder: _,
1487
+ disabled: N = !1,
1488
+ required: B = !1,
1489
+ regex: h,
1490
+ paddingless: i = !1,
1491
+ borderless: j = !1,
1492
+ editable: d = !1,
1493
+ isSearch: f = !1,
1494
+ centered: y = !1
1495
+ } = u, { themeSettings: D } = It(), { inputs: A } = D, [l, C] = x.useState(!1);
1496
+ function M(w) {
1497
+ return Number(w) < 0 ? String(c) : w;
2614
1498
  }
2615
- function F(B) {
2616
- return !v || !f ? !0 : new RegExp(f).test(B);
1499
+ function V(w) {
1500
+ return !B || !h ? !0 : new RegExp(h).test(w);
2617
1501
  }
2618
- return /* @__PURE__ */ t.jsxs("div", { className: it.wrapper, children: [
1502
+ return /* @__PURE__ */ t.jsxs("div", { className: Q.wrapper, children: [
2619
1503
  s && /* @__PURE__ */ t.jsx(
2620
1504
  "label",
2621
1505
  {
2622
- className: it.label,
1506
+ className: Q.label,
2623
1507
  htmlFor: s,
2624
1508
  children: s
2625
1509
  }
@@ -2627,8 +1511,8 @@ const tc = (d) => {
2627
1511
  /* @__PURE__ */ t.jsxs(
2628
1512
  "div",
2629
1513
  {
2630
- className: Y(it.content, {
2631
- [it.contentBorder]: M.border.active
1514
+ className: H(Q.content, {
1515
+ [Q.contentBorder]: A.border.active
2632
1516
  }),
2633
1517
  style: {
2634
1518
  ...e
@@ -2638,43 +1522,43 @@ const tc = (d) => {
2638
1522
  "input",
2639
1523
  {
2640
1524
  id: s,
2641
- type: c || "text",
2642
- onChange: (B) => {
2643
- if (c === "text") a(B.target.value);
1525
+ type: r || "text",
1526
+ onChange: (w) => {
1527
+ if (r === "text") o(w.target.value);
2644
1528
  else {
2645
- const j = q(B.target.value);
2646
- a(j);
1529
+ const m = M(w.target.value);
1530
+ o(m);
2647
1531
  }
2648
1532
  },
2649
- value: i,
1533
+ value: n,
2650
1534
  autoComplete: "off",
2651
- placeholder: n || "Type something...",
2652
- className: Y(it.input, {
2653
- [it.required]: u && v && !F(i),
2654
- [it.paddingless]: r,
2655
- [it.borderless]: k
1535
+ placeholder: _ || "Type something...",
1536
+ className: H(Q.input, {
1537
+ [Q.required]: l && B && !V(n),
1538
+ [Q.paddingless]: i,
1539
+ [Q.borderless]: j
2656
1540
  }),
2657
- min: c === "number" ? l : void 0,
2658
- max: c === "number" ? o : void 0,
2659
- disabled: m,
2660
- onFocus: () => S(!0),
1541
+ min: r === "number" ? c : void 0,
1542
+ max: r === "number" ? a : void 0,
1543
+ disabled: N,
1544
+ onFocus: () => C(!0),
2661
1545
  style: {
2662
- textAlign: $ ? "center" : "left",
2663
- background: M.field.active ? M.field.color : "transparent",
2664
- padding: _ ? `7px ${Number(M.general.size) + 20}px 7px 11px` : "7px 11px"
1546
+ textAlign: y ? "center" : "left",
1547
+ background: A.field.active ? A.field.color : "transparent",
1548
+ padding: f ? `7px ${Number(A.general.size) + 20}px 7px 11px` : "7px 11px"
2665
1549
  }
2666
1550
  }
2667
1551
  ),
2668
- _ && /* @__PURE__ */ t.jsx("div", { className: it.rightIcon, children: /* @__PURE__ */ t.jsx(
1552
+ f && /* @__PURE__ */ t.jsx("div", { className: Q.rightIcon, children: /* @__PURE__ */ t.jsx(
2669
1553
  b,
2670
1554
  {
2671
1555
  name: "MagnifyingGlass",
2672
1556
  fill: "var(--icon-secondary)",
2673
- width: M.general.size,
2674
- height: M.general.size
1557
+ width: A.general.size,
1558
+ height: A.general.size
2675
1559
  }
2676
1560
  ) }),
2677
- p && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1561
+ d && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
2678
1562
  b,
2679
1563
  {
2680
1564
  name: "Sliders",
@@ -2687,35 +1571,35 @@ const tc = (d) => {
2687
1571
  }
2688
1572
  )
2689
1573
  ] });
2690
- }, Io = "_button_85085_1", No = "_primary_85085_20", wo = "_primaryHovered_85085_30", Co = "_secondary_85085_34", So = "_secondaryHovered_85085_44", Bo = "_tertiary_85085_48", To = "_tertiaryHovered_85085_58", Po = "_content_85085_62", ct = {
2691
- button: Io,
2692
- primary: No,
2693
- primaryHovered: wo,
2694
- secondary: Co,
2695
- secondaryHovered: So,
2696
- tertiary: Bo,
2697
- tertiaryHovered: To,
2698
- content: Po
2699
- }, Q = (d) => {
2700
- const { children: a, onClick: e, style: s, className: i, disabled: c = !1, type: l = "Primary" } = d, { themeSettings: o } = Et();
1574
+ }, xn = "_button_85085_1", fn = "_primary_85085_20", bn = "_primaryHovered_85085_30", vn = "_secondary_85085_34", jn = "_secondaryHovered_85085_44", yn = "_tertiary_85085_48", kn = "_tertiaryHovered_85085_58", Nn = "_content_85085_62", Z = {
1575
+ button: xn,
1576
+ primary: fn,
1577
+ primaryHovered: bn,
1578
+ secondary: vn,
1579
+ secondaryHovered: jn,
1580
+ tertiary: yn,
1581
+ tertiaryHovered: kn,
1582
+ content: Nn
1583
+ }, Y = (u) => {
1584
+ const { children: o, onClick: e, style: s, className: n, disabled: r = !1, type: c = "Primary" } = u, { themeSettings: a } = It();
2701
1585
  return /* @__PURE__ */ t.jsx(
2702
1586
  "button",
2703
1587
  {
2704
- className: Y(ct.button, i, {
2705
- [ct.primary]: l === "Primary",
2706
- [ct.secondary]: l === "Secondary",
2707
- [ct.tertiary]: l === "Tertiary",
2708
- [ct.primaryHovered]: l === "Primary" && !c && o.buttons.primary.hover,
2709
- [ct.secondaryHovered]: l === "Secondary" && !c && o.buttons.secondary.hover,
2710
- [ct.tertiaryHovered]: l === "Tertiary" && !c && o.buttons.tertiary.hover
1588
+ className: H(Z.button, n, {
1589
+ [Z.primary]: c === "Primary",
1590
+ [Z.secondary]: c === "Secondary",
1591
+ [Z.tertiary]: c === "Tertiary",
1592
+ [Z.primaryHovered]: c === "Primary" && !r && a.buttons.primary.hover,
1593
+ [Z.secondaryHovered]: c === "Secondary" && !r && a.buttons.secondary.hover,
1594
+ [Z.tertiaryHovered]: c === "Tertiary" && !r && a.buttons.tertiary.hover
2711
1595
  }),
2712
1596
  onClick: e,
2713
1597
  style: {
2714
1598
  ...s
2715
1599
  },
2716
- disabled: c,
2717
- children: l === "Tertiary" ? /* @__PURE__ */ t.jsxs("div", { className: ct.content, children: [
2718
- a,
1600
+ disabled: r,
1601
+ children: c === "Tertiary" ? /* @__PURE__ */ t.jsxs("div", { className: Z.content, children: [
1602
+ o,
2719
1603
  /* @__PURE__ */ t.jsx(
2720
1604
  b,
2721
1605
  {
@@ -2725,126 +1609,126 @@ const tc = (d) => {
2725
1609
  height: 20
2726
1610
  }
2727
1611
  )
2728
- ] }) : /* @__PURE__ */ t.jsx(t.Fragment, { children: a })
1612
+ ] }) : /* @__PURE__ */ t.jsx(t.Fragment, { children: o })
2729
1613
  }
2730
1614
  );
2731
1615
  };
2732
- var Rt = /* @__PURE__ */ ((d) => (d.ONE_TIME = "One-Time", d.RECURRING = "Subscribe & Save", d))(Rt || {});
2733
- const ec = (d) => {
2734
- var L, M;
2735
- const { variants: a } = d, [e, s] = g.useState(a[0]), [i, c] = g.useState(e.chargeTypes[0]), l = Bt(), [o, n] = g.useState(1), { reset: m, addProductToCart: v, getProducts: f } = Ot(), [r, k] = g.useState(!1);
2736
- g.useEffect(() => {
2737
- k(!0);
2738
- const u = setTimeout(() => k(!1), 600);
2739
- return () => clearTimeout(u);
2740
- }, [o]);
2741
- async function p() {
2742
- await f(), await v({
2743
- productId: d.id,
1616
+ var Ct = /* @__PURE__ */ ((u) => (u.ONE_TIME = "One-Time", u.RECURRING = "Subscribe & Save", u))(Ct || {});
1617
+ const Fi = (u) => {
1618
+ var D, A;
1619
+ const { variants: o } = u, [e, s] = x.useState(o[0]), [n, r] = x.useState(e.chargeTypes[0]), c = rt(), [a, _] = x.useState(1), { reset: N, addProductToCart: B, getProducts: h } = jt(), [i, j] = x.useState(!1);
1620
+ x.useEffect(() => {
1621
+ j(!0);
1622
+ const l = setTimeout(() => j(!1), 600);
1623
+ return () => clearTimeout(l);
1624
+ }, [a]);
1625
+ async function d() {
1626
+ await h(), await B({
1627
+ productId: u.id,
2744
1628
  productVariantId: e.id,
2745
- quantity: o
1629
+ quantity: a
2746
1630
  });
2747
1631
  }
2748
- function _() {
2749
- m(), p(), l("/checkout");
1632
+ function f() {
1633
+ N(), d(), c("/checkout");
2750
1634
  }
2751
- function $(u) {
2752
- if (u >= 864e5) {
2753
- const j = Math.floor(u / 864e5);
2754
- return `${j} ${j === 1 ? "day" : "days"}`;
2755
- } else if (u >= 36e5) {
2756
- const j = Math.floor(u / 36e5);
2757
- return `${j} ${j === 1 ? "hour" : "hours"}`;
2758
- } else if (u >= 6e4) {
2759
- const j = Math.floor(u / 6e4);
2760
- return `${j} ${j === 1 ? "minute" : "minutes"}`;
1635
+ function y(l) {
1636
+ if (l >= 864e5) {
1637
+ const m = Math.floor(l / 864e5);
1638
+ return `${m} ${m === 1 ? "day" : "days"}`;
1639
+ } else if (l >= 36e5) {
1640
+ const m = Math.floor(l / 36e5);
1641
+ return `${m} ${m === 1 ? "hour" : "hours"}`;
1642
+ } else if (l >= 6e4) {
1643
+ const m = Math.floor(l / 6e4);
1644
+ return `${m} ${m === 1 ? "minute" : "minutes"}`;
2761
1645
  } else {
2762
- const j = Math.floor(u / 1e3);
2763
- return `${j} ${j === 1 ? "second" : "seconds"}`;
1646
+ const m = Math.floor(l / 1e3);
1647
+ return `${m} ${m === 1 ? "second" : "seconds"}`;
2764
1648
  }
2765
1649
  }
2766
- return g.useEffect(() => {
2767
- (e.quantity.available === 0 || !e.quantity.available) && n(0);
2768
- }, [e.quantity.available]), /* @__PURE__ */ t.jsxs("div", { className: T.options, children: [
2769
- e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: T.chargeTypes, children: e.chargeTypes.map((u) => /* @__PURE__ */ t.jsx(
1650
+ return x.useEffect(() => {
1651
+ (e.quantity.available === 0 || !e.quantity.available) && _(0);
1652
+ }, [e.quantity.available]), /* @__PURE__ */ t.jsxs("div", { className: $.options, children: [
1653
+ e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: $.chargeTypes, children: e.chargeTypes.map((l) => /* @__PURE__ */ t.jsx(
2770
1654
  "div",
2771
1655
  {
2772
- className: Y(T.charge, {
2773
- [T.chargeActive]: i === u
1656
+ className: H($.charge, {
1657
+ [$.chargeActive]: n === l
2774
1658
  }),
2775
- onClick: () => c(u),
2776
- children: Rt[u]
1659
+ onClick: () => r(l),
1660
+ children: Ct[l]
2777
1661
  },
2778
- u
1662
+ l
2779
1663
  )) }),
2780
- /* @__PURE__ */ t.jsx("div", { className: T.variants, children: a.map((u) => {
2781
- var S;
1664
+ /* @__PURE__ */ t.jsx("div", { className: $.variants, children: o.map((l) => {
1665
+ var C;
2782
1666
  return /* @__PURE__ */ t.jsxs(
2783
1667
  "div",
2784
1668
  {
2785
- className: Y(T.variant, {
2786
- [T.activeVariant]: e.id === u.id
1669
+ className: H($.variant, {
1670
+ [$.activeVariant]: e.id === l.id
2787
1671
  }),
2788
- onClick: () => s(u),
1672
+ onClick: () => s(l),
2789
1673
  children: [
2790
- /* @__PURE__ */ t.jsxs("div", { className: T.variantInfo, children: [
2791
- /* @__PURE__ */ t.jsx("span", { className: T.title, children: u.name }),
1674
+ /* @__PURE__ */ t.jsxs("div", { className: $.variantInfo, children: [
1675
+ /* @__PURE__ */ t.jsx("span", { className: $.title, children: l.name }),
2792
1676
  /* @__PURE__ */ t.jsxs("span", { children: [
2793
1677
  "$",
2794
- i === "ONE_TIME" ? u.price.amount : u.subscriptionSettings ? u.subscriptionSettings.price.amount : "Price Not Found"
1678
+ n === "ONE_TIME" ? l.price.amount : l.subscriptionSettings ? l.subscriptionSettings.price.amount : "Price Not Found"
2795
1679
  ] })
2796
1680
  ] }),
2797
- /* @__PURE__ */ t.jsx("div", { children: i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: T.stock, children: [
2798
- ((S = u.quantity.restrictions) == null ? void 0 : S.max) || u.quantity.available || 0,
1681
+ /* @__PURE__ */ t.jsx("div", { children: n === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: $.stock, children: [
1682
+ ((C = l.quantity.restrictions) == null ? void 0 : C.max) || l.quantity.available || 0,
2799
1683
  " in stock"
2800
1684
  ] }) })
2801
1685
  ]
2802
1686
  },
2803
- u.id
1687
+ l.id
2804
1688
  );
2805
1689
  }) }),
2806
- i === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: T.quantity, children: [
1690
+ n === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: $.quantity, children: [
2807
1691
  /* @__PURE__ */ t.jsx(
2808
- Q,
1692
+ Y,
2809
1693
  {
2810
1694
  type: "Secondary",
2811
1695
  onClick: () => {
2812
- o > 1 ? n((u) => u - 1) : n(1);
1696
+ a > 1 ? _((l) => l - 1) : _(1);
2813
1697
  },
2814
- className: T.button,
2815
- disabled: e.quantity.available === 0 || e.quantity.restrictions && o <= e.quantity.restrictions.min || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
1698
+ className: $.button,
1699
+ disabled: e.quantity.available === 0 || e.quantity.restrictions && a <= e.quantity.restrictions.min || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
2816
1700
  children: /* @__PURE__ */ t.jsx(b, { name: "Minus" })
2817
1701
  }
2818
1702
  ),
2819
1703
  /* @__PURE__ */ t.jsx(
2820
- $o,
1704
+ gn,
2821
1705
  {
2822
1706
  type: "number",
2823
- value: String(o),
2824
- onChange: (u) => n(Number(u)),
2825
- max: ((L = e.quantity.restrictions) == null ? void 0 : L.max) || e.quantity.available || 1 / 0,
2826
- min: ((M = e.quantity.restrictions) == null ? void 0 : M.min) || 0,
1707
+ value: String(a),
1708
+ onChange: (l) => _(Number(l)),
1709
+ max: ((D = e.quantity.restrictions) == null ? void 0 : D.max) || e.quantity.available || 1 / 0,
1710
+ min: ((A = e.quantity.restrictions) == null ? void 0 : A.min) || 0,
2827
1711
  centered: !0,
2828
1712
  disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available
2829
1713
  }
2830
1714
  ),
2831
1715
  /* @__PURE__ */ t.jsx(
2832
- Q,
1716
+ Y,
2833
1717
  {
2834
1718
  type: "Secondary",
2835
1719
  onClick: () => {
2836
- n((u) => u + 1);
1720
+ _((l) => l + 1);
2837
1721
  },
2838
- className: T.button,
2839
- disabled: !!(e.quantity.restrictions && o >= e.quantity.restrictions.max || e.quantity.available !== void 0 && o >= e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available),
1722
+ className: $.button,
1723
+ disabled: !!(e.quantity.restrictions && a >= e.quantity.restrictions.max || e.quantity.available !== void 0 && a >= e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available),
2840
1724
  children: /* @__PURE__ */ t.jsx(b, { name: "Plus" })
2841
1725
  }
2842
1726
  )
2843
1727
  ] }),
2844
- /* @__PURE__ */ t.jsxs("div", { className: T.meta, children: [
2845
- /* @__PURE__ */ t.jsxs("div", { className: T.info, children: [
1728
+ /* @__PURE__ */ t.jsxs("div", { className: $.meta, children: [
1729
+ /* @__PURE__ */ t.jsxs("div", { className: $.info, children: [
2846
1730
  /* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
2847
- /* @__PURE__ */ t.jsxs("div", { className: T.infoRight, children: [
1731
+ /* @__PURE__ */ t.jsxs("div", { className: $.infoRight, children: [
2848
1732
  /* @__PURE__ */ t.jsx(
2849
1733
  b,
2850
1734
  {
@@ -2854,193 +1738,144 @@ const ec = (d) => {
2854
1738
  height: 20
2855
1739
  }
2856
1740
  ),
2857
- /* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : $(e.deliveryTime) })
1741
+ /* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : y(e.deliveryTime) })
2858
1742
  ] })
2859
1743
  ] }),
2860
- /* @__PURE__ */ t.jsxs("div", { className: T.info, children: [
1744
+ /* @__PURE__ */ t.jsxs("div", { className: $.info, children: [
2861
1745
  /* @__PURE__ */ t.jsx("span", { children: "Price" }),
2862
- /* @__PURE__ */ t.jsx("div", { className: T.infoRight, children: i === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: T.price, children: [
2863
- /* @__PURE__ */ t.jsxs("span", { className: Y(T.newPrice, { [T.animate]: r }), children: [
1746
+ /* @__PURE__ */ t.jsx("div", { className: $.infoRight, children: n === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: $.price, children: [
1747
+ /* @__PURE__ */ t.jsxs("span", { className: H($.newPrice, { [$.animate]: i }), children: [
2864
1748
  "$ ",
2865
- (e.price.amount || 0) * o
1749
+ (e.price.amount || 0) * a
2866
1750
  ] }),
2867
- /* @__PURE__ */ t.jsxs("span", { className: T.oldPrice, children: [
1751
+ /* @__PURE__ */ t.jsxs("span", { className: $.oldPrice, children: [
2868
1752
  "$ ",
2869
- (e.compareAtPrice.amount || 0) * o
1753
+ (e.compareAtPrice.amount || 0) * a
2870
1754
  ] })
2871
- ] }) : /* @__PURE__ */ t.jsxs("span", { className: Y(T.newPrice, { [T.animate]: r }), children: [
1755
+ ] }) : /* @__PURE__ */ t.jsxs("span", { className: H($.newPrice, { [$.animate]: i }), children: [
2872
1756
  "$ ",
2873
- (e.price.amount || 0) * o
2874
- ] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: T.price, children: [
2875
- /* @__PURE__ */ t.jsxs("span", { className: Y(T.newPrice, { [T.animate]: r }), children: [
1757
+ (e.price.amount || 0) * a
1758
+ ] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: $.price, children: [
1759
+ /* @__PURE__ */ t.jsxs("span", { className: H($.newPrice, { [$.animate]: i }), children: [
2876
1760
  "$ ",
2877
1761
  e.subscriptionSettings.price.amount || 0
2878
1762
  ] }),
2879
- /* @__PURE__ */ t.jsxs("span", { className: T.oldPrice, children: [
1763
+ /* @__PURE__ */ t.jsxs("span", { className: $.oldPrice, children: [
2880
1764
  "$ ",
2881
1765
  e.subscriptionSettings.compareAtPrice.amount || 0
2882
1766
  ] })
2883
- ] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: Y(T.newPrice, { [T.animate]: r }), children: [
1767
+ ] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: H($.newPrice, { [$.animate]: i }), children: [
2884
1768
  "$ ",
2885
1769
  e.subscriptionSettings.price.amount || 0
2886
1770
  ] }) })
2887
1771
  ] })
2888
1772
  ] }),
2889
- /* @__PURE__ */ t.jsxs("div", { className: T.buttons, children: [
1773
+ /* @__PURE__ */ t.jsxs("div", { className: $.buttons, children: [
2890
1774
  /* @__PURE__ */ t.jsx(
2891
- Q,
1775
+ Y,
2892
1776
  {
2893
1777
  type: "Primary",
2894
- onClick: () => _(),
1778
+ onClick: () => f(),
2895
1779
  disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
2896
- children: i === "ONE_TIME" ? "Buy Now" : "Subscribe Now"
1780
+ children: n === "ONE_TIME" ? "Buy Now" : "Subscribe Now"
2897
1781
  }
2898
1782
  ),
2899
- i === "ONE_TIME" && /* @__PURE__ */ t.jsx(
2900
- Q,
1783
+ n === "ONE_TIME" && /* @__PURE__ */ t.jsx(
1784
+ Y,
2901
1785
  {
2902
1786
  type: "Secondary",
2903
- onClick: () => p(),
1787
+ onClick: () => d(),
2904
1788
  disabled: e.quantity.available === 0 || !e.quantity.available || Object.keys(e.quantity.restrictions || {}).length === 0 && !e.quantity.available,
2905
1789
  children: "Add to Cart"
2906
1790
  }
2907
1791
  )
2908
1792
  ] })
2909
1793
  ] });
2910
- }, Ao = "_button_1tdo3_1", Oo = "_login_1tdo3_14", Mo = "_signUp_1tdo3_18", qo = "_buttons_1tdo3_23", zo = "_modal_1tdo3_32", Eo = "_closing_1tdo3_64", Uo = "_info_1tdo3_113", Do = "_top_1tdo3_120", Lo = "_title_1tdo3_131", Ho = "_clear_1tdo3_138", Ro = "_activeClear_1tdo3_145", Fo = "_count_1tdo3_149", Vo = "_cart_1tdo3_164", Yo = "_empty_1tdo3_172", Go = "_product_1tdo3_198", Xo = "_products_1tdo3_207", Wo = "_image_1tdo3_215", Jo = "_productInfo_1tdo3_221", Qo = "_content_1tdo3_228", Ko = "_name_1tdo3_234", Zo = "_price_1tdo3_240", ta = "_productButtons_1tdo3_246", ea = "_productButton_1tdo3_246", sa = "_productCount_1tdo3_266", na = "_bottom_1tdo3_282", ia = "_subtotal_1tdo3_290", oa = "_block_1tdo3_298", aa = "_shoppingCount_1tdo3_305", ca = "_total_1tdo3_325", la = "_link_1tdo3_331", ra = "_userInfo_1tdo3_338", da = "_pagesMobileModal_1tdo3_349", ua = "_pagesMobileModalContent_1tdo3_363", ma = "_pagesMobileModalHeader_1tdo3_369", _a = "_pagesMobileModalFooter_1tdo3_379", C = {
2911
- button: Ao,
2912
- login: Oo,
2913
- signUp: Mo,
2914
- buttons: qo,
2915
- modal: zo,
1794
+ }, In = "_button_1tdo3_1", $n = "_login_1tdo3_14", Sn = "_signUp_1tdo3_18", Cn = "_buttons_1tdo3_23", wn = "_modal_1tdo3_32", Bn = "_closing_1tdo3_64", Pn = "_info_1tdo3_113", Mn = "_top_1tdo3_120", Tn = "_title_1tdo3_131", qn = "_clear_1tdo3_138", An = "_activeClear_1tdo3_145", On = "_count_1tdo3_149", En = "_cart_1tdo3_164", zn = "_empty_1tdo3_172", Dn = "_product_1tdo3_198", Rn = "_products_1tdo3_207", Hn = "_image_1tdo3_215", Ln = "_productInfo_1tdo3_221", Un = "_content_1tdo3_228", Fn = "_name_1tdo3_234", Vn = "_price_1tdo3_240", Yn = "_productButtons_1tdo3_246", Wn = "_productButton_1tdo3_246", Gn = "_productCount_1tdo3_266", Xn = "_bottom_1tdo3_282", Qn = "_subtotal_1tdo3_290", Jn = "_block_1tdo3_298", Kn = "_shoppingCount_1tdo3_305", Zn = "_total_1tdo3_325", ti = "_link_1tdo3_331", ei = "_userInfo_1tdo3_338", si = "_pagesMobileModal_1tdo3_349", ni = "_pagesMobileModalContent_1tdo3_363", ii = "_pagesMobileModalHeader_1tdo3_369", oi = "_pagesMobileModalFooter_1tdo3_379", k = {
1795
+ button: In,
1796
+ login: $n,
1797
+ signUp: Sn,
1798
+ buttons: Cn,
1799
+ modal: wn,
2916
1800
  "slide-in-fade": "_slide-in-fade_1tdo3_1",
2917
1801
  "mobile-slide-in-fade": "_mobile-slide-in-fade_1tdo3_1",
2918
- closing: Eo,
1802
+ closing: Bn,
2919
1803
  "mobile-slide-out-fade": "_mobile-slide-out-fade_1tdo3_1",
2920
1804
  "slide-out-fade": "_slide-out-fade_1tdo3_1",
2921
- info: Uo,
2922
- top: Do,
2923
- title: Lo,
2924
- clear: Ho,
2925
- activeClear: Ro,
2926
- count: Fo,
2927
- cart: Vo,
2928
- empty: Yo,
2929
- product: Go,
2930
- products: Xo,
2931
- image: Wo,
2932
- productInfo: Jo,
2933
- content: Qo,
2934
- name: Ko,
2935
- price: Zo,
2936
- productButtons: ta,
2937
- productButton: ea,
2938
- productCount: sa,
2939
- bottom: na,
2940
- subtotal: ia,
2941
- block: oa,
2942
- shoppingCount: aa,
2943
- total: ca,
2944
- link: la,
2945
- userInfo: ra,
2946
- pagesMobileModal: da,
2947
- pagesMobileModalContent: ua,
2948
- pagesMobileModalHeader: ma,
2949
- pagesMobileModalFooter: _a
2950
- };
2951
- class xt extends Error {
2952
- }
2953
- xt.prototype.name = "InvalidTokenError";
2954
- function pa(d) {
2955
- return decodeURIComponent(atob(d).replace(/(.)/g, (a, e) => {
2956
- let s = e.charCodeAt(0).toString(16).toUpperCase();
2957
- return s.length < 2 && (s = "0" + s), "%" + s;
2958
- }));
2959
- }
2960
- function ha(d) {
2961
- let a = d.replace(/-/g, "+").replace(/_/g, "/");
2962
- switch (a.length % 4) {
2963
- case 0:
2964
- break;
2965
- case 2:
2966
- a += "==";
2967
- break;
2968
- case 3:
2969
- a += "=";
2970
- break;
2971
- default:
2972
- throw new Error("base64 string is not of the correct length");
2973
- }
2974
- try {
2975
- return pa(a);
2976
- } catch {
2977
- return atob(a);
2978
- }
2979
- }
2980
- function ga(d, a) {
2981
- if (typeof d != "string")
2982
- throw new xt("Invalid token specified: must be a string");
2983
- a || (a = {});
2984
- const e = a.header === !0 ? 0 : 1, s = d.split(".")[e];
2985
- if (typeof s != "string")
2986
- throw new xt(`Invalid token specified: missing part #${e + 1}`);
2987
- let i;
2988
- try {
2989
- i = ha(s);
2990
- } catch (c) {
2991
- throw new xt(`Invalid token specified: invalid base64 for part #${e + 1} (${c.message})`);
2992
- }
2993
- try {
2994
- return JSON.parse(i);
2995
- } catch (c) {
2996
- throw new xt(`Invalid token specified: invalid json for part #${e + 1} (${c.message})`);
2997
- }
2998
- }
2999
- const sc = (d) => {
3000
- const { shopping: a, signUp: e, isShowUserInfo: s = !0 } = d;
3001
- return /* @__PURE__ */ t.jsxs("div", { className: C.buttons, children: [
3002
- a && /* @__PURE__ */ t.jsx(fa, {}),
3003
- s && /* @__PURE__ */ t.jsx(Ft, { signUp: e })
1805
+ info: Pn,
1806
+ top: Mn,
1807
+ title: Tn,
1808
+ clear: qn,
1809
+ activeClear: An,
1810
+ count: On,
1811
+ cart: En,
1812
+ empty: zn,
1813
+ product: Dn,
1814
+ products: Rn,
1815
+ image: Hn,
1816
+ productInfo: Ln,
1817
+ content: Un,
1818
+ name: Fn,
1819
+ price: Vn,
1820
+ productButtons: Yn,
1821
+ productButton: Wn,
1822
+ productCount: Gn,
1823
+ bottom: Xn,
1824
+ subtotal: Qn,
1825
+ block: Jn,
1826
+ shoppingCount: Kn,
1827
+ total: Zn,
1828
+ link: ti,
1829
+ userInfo: ei,
1830
+ pagesMobileModal: si,
1831
+ pagesMobileModalContent: ni,
1832
+ pagesMobileModalHeader: ii,
1833
+ pagesMobileModalFooter: oi
1834
+ }, Vi = (u) => {
1835
+ const { shopping: o, signUp: e, isShowUserInfo: s = !0 } = u;
1836
+ return /* @__PURE__ */ t.jsxs("div", { className: k.buttons, children: [
1837
+ o && /* @__PURE__ */ t.jsx(ai, {}),
1838
+ s && /* @__PURE__ */ t.jsx(wt, { signUp: e })
3004
1839
  ] });
3005
- }, fa = () => {
3006
- const [d, a] = g.useState(!1), [e, s] = g.useState([]), { cart: i, getProducts: c } = Ot();
3007
- function l(r) {
3008
- for (let k = 0; k < i.parts.length; k++)
3009
- for (let p = 0; p < r.variants.length; p++)
3010
- if (i.parts[k].productVariantId === r.variants[k].id)
3011
- return i.parts[k].productVariantId;
1840
+ }, ai = () => {
1841
+ const [u, o] = x.useState(!1), [e, s] = x.useState([]), { cart: n, getProducts: r } = jt();
1842
+ function c(i) {
1843
+ for (let j = 0; j < n.parts.length; j++)
1844
+ for (let d = 0; d < i.variants.length; d++)
1845
+ if (n.parts[j].productVariantId === i.variants[j].id)
1846
+ return n.parts[j].productVariantId;
3012
1847
  }
3013
- function o(r) {
3014
- for (let k = 0; k < i.parts.length; k++)
3015
- for (let p = 0; p < r.variants.length; p++)
3016
- if (i.parts[k].productVariantId === r.variants[k].id)
3017
- return i.parts[k].quantity;
1848
+ function a(i) {
1849
+ for (let j = 0; j < n.parts.length; j++)
1850
+ for (let d = 0; d < i.variants.length; d++)
1851
+ if (n.parts[j].productVariantId === i.variants[j].id)
1852
+ return n.parts[j].quantity;
3018
1853
  }
3019
- g.useEffect(() => {
1854
+ x.useEffect(() => {
3020
1855
  (async () => {
3021
- const k = i.parts.map(($) => String($.productId)), _ = (await c([...k])).map(($) => ({
3022
- ...$,
3023
- activeVariantId: l($),
3024
- quantity: o($)
1856
+ const j = n.parts.map((y) => String(y.productId)), f = (await r([...j])).map((y) => ({
1857
+ ...y,
1858
+ activeVariantId: c(y),
1859
+ quantity: a(y)
3025
1860
  }));
3026
- s(_);
1861
+ s(f);
3027
1862
  })();
3028
- }, [i.parts.length]);
3029
- function n(r) {
3030
- var k;
3031
- return !r || !(r != null && r.variants) ? !1 : (k = r.variants.find((p) => p.id === r.activeVariantId)) == null ? void 0 : k.subscriptionSettings;
1863
+ }, [n.parts.length]);
1864
+ function _(i) {
1865
+ var j;
1866
+ return !i || !(i != null && i.variants) ? !1 : (j = i.variants.find((d) => d.id === i.activeVariantId)) == null ? void 0 : j.subscriptionSettings;
3032
1867
  }
3033
- const m = i.parts.length > 0 && e.length > 0 && !n(e[0]), [v, f] = g.useState(!1);
1868
+ const N = n.parts.length > 0 && e.length > 0 && !_(e[0]), [B, h] = x.useState(!1);
3034
1869
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
3035
1870
  /* @__PURE__ */ t.jsxs(
3036
- Q,
1871
+ Y,
3037
1872
  {
3038
1873
  type: "Secondary",
3039
1874
  style: {
3040
1875
  padding: 10
3041
1876
  },
3042
- onClick: (r) => {
3043
- r.stopPropagation(), window.location.pathname.includes("/admin/builder") || (a(!0), f(!0));
1877
+ onClick: (i) => {
1878
+ i.stopPropagation(), window.location.pathname.includes("/admin/builder") || (o(!0), h(!0));
3044
1879
  },
3045
1880
  children: [
3046
1881
  /* @__PURE__ */ t.jsx(
@@ -3050,107 +1885,107 @@ const sc = (d) => {
3050
1885
  fill: "var(--icon-primary)"
3051
1886
  }
3052
1887
  ),
3053
- m && /* @__PURE__ */ t.jsx("div", { className: C.shoppingCount, children: i.parts.length })
1888
+ N && /* @__PURE__ */ t.jsx("div", { className: k.shoppingCount, children: n.parts.length })
3054
1889
  ]
3055
1890
  }
3056
1891
  ),
3057
- d && /* @__PURE__ */ t.jsx(
3058
- Mt,
1892
+ u && /* @__PURE__ */ t.jsx(
1893
+ yt,
3059
1894
  {
3060
1895
  close: () => {
3061
- f(!1), setTimeout(() => {
3062
- a(!1);
1896
+ h(!1), setTimeout(() => {
1897
+ o(!1);
3063
1898
  }, 300);
3064
1899
  },
3065
1900
  withAnimation: !1,
3066
1901
  children: /* @__PURE__ */ t.jsx(
3067
- xa,
1902
+ ci,
3068
1903
  {
3069
1904
  activeProducts: e,
3070
- isCartNotEmpty: m,
3071
- isOpen: v
1905
+ isCartNotEmpty: N,
1906
+ isOpen: B
3072
1907
  }
3073
1908
  )
3074
1909
  }
3075
1910
  )
3076
1911
  ] });
3077
- }, xa = (d) => {
3078
- const { activeProducts: a, isCartNotEmpty: e, isOpen: s } = d, { cart: i, reset: c, getTotalAndDiscount: l, updateQuantityOfProduct: o } = Ot(), n = Bt();
3079
- function m(r) {
3080
- n(r);
1912
+ }, ci = (u) => {
1913
+ const { activeProducts: o, isCartNotEmpty: e, isOpen: s } = u, { cart: n, reset: r, getTotalAndDiscount: c, updateQuantityOfProduct: a } = jt(), _ = rt();
1914
+ function N(i) {
1915
+ _(i);
3081
1916
  }
3082
- function v(r) {
3083
- o({
3084
- productId: r.id,
3085
- productVariantId: r.activeVariantId,
3086
- quantity: r.quantity + 1
1917
+ function B(i) {
1918
+ a({
1919
+ productId: i.id,
1920
+ productVariantId: i.activeVariantId,
1921
+ quantity: i.quantity + 1
3087
1922
  });
3088
1923
  }
3089
- function f(r) {
3090
- o({
3091
- productId: r.id,
3092
- productVariantId: r.activeVariantId,
3093
- quantity: r.quantity - 1
1924
+ function h(i) {
1925
+ a({
1926
+ productId: i.id,
1927
+ productVariantId: i.activeVariantId,
1928
+ quantity: i.quantity - 1
3094
1929
  });
3095
1930
  }
3096
1931
  return /* @__PURE__ */ t.jsxs(
3097
1932
  "div",
3098
1933
  {
3099
- className: Y(C.modal, {
3100
- [C.closing]: !s
1934
+ className: H(k.modal, {
1935
+ [k.closing]: !s
3101
1936
  }),
3102
- onClick: (r) => r.stopPropagation(),
1937
+ onClick: (i) => i.stopPropagation(),
3103
1938
  children: [
3104
- /* @__PURE__ */ t.jsxs("div", { className: C.top, children: [
3105
- /* @__PURE__ */ t.jsxs("div", { className: C.info, children: [
3106
- /* @__PURE__ */ t.jsx("span", { className: C.title, children: "Cart" }),
3107
- e && /* @__PURE__ */ t.jsx("div", { className: C.count, children: i.parts.length })
1939
+ /* @__PURE__ */ t.jsxs("div", { className: k.top, children: [
1940
+ /* @__PURE__ */ t.jsxs("div", { className: k.info, children: [
1941
+ /* @__PURE__ */ t.jsx("span", { className: k.title, children: "Cart" }),
1942
+ e && /* @__PURE__ */ t.jsx("div", { className: k.count, children: n.parts.length })
3108
1943
  ] }),
3109
1944
  /* @__PURE__ */ t.jsx(
3110
1945
  "button",
3111
1946
  {
3112
- className: Y(C.clear, {
3113
- [C.activeClear]: e
1947
+ className: H(k.clear, {
1948
+ [k.activeClear]: e
3114
1949
  }),
3115
1950
  disabled: !e,
3116
- onClick: c,
1951
+ onClick: r,
3117
1952
  children: "Clear all"
3118
1953
  }
3119
1954
  )
3120
1955
  ] }),
3121
- e ? /* @__PURE__ */ t.jsxs("div", { className: C.cart, children: [
3122
- /* @__PURE__ */ t.jsx("div", { className: C.products, children: a.map((r) => /* @__PURE__ */ t.jsxs(
1956
+ e ? /* @__PURE__ */ t.jsxs("div", { className: k.cart, children: [
1957
+ /* @__PURE__ */ t.jsx("div", { className: k.products, children: o.map((i) => /* @__PURE__ */ t.jsxs(
3123
1958
  "div",
3124
1959
  {
3125
- className: C.product,
1960
+ className: k.product,
3126
1961
  children: [
3127
- /* @__PURE__ */ t.jsxs("div", { className: C.productInfo, children: [
1962
+ /* @__PURE__ */ t.jsxs("div", { className: k.productInfo, children: [
3128
1963
  /* @__PURE__ */ t.jsx(
3129
1964
  "img",
3130
1965
  {
3131
- src: `https://imagedelivery.net/${r.images[0].cfId}/w=500`,
1966
+ src: `https://imagedelivery.net/${i.images[0].cfId}/w=500`,
3132
1967
  alt: "image",
3133
1968
  width: "100%",
3134
1969
  height: "100%",
3135
- className: C.image
1970
+ className: k.image
3136
1971
  }
3137
1972
  ),
3138
- /* @__PURE__ */ t.jsxs("div", { className: C.content, children: [
3139
- /* @__PURE__ */ t.jsx("div", { className: C.name, children: r.name }),
3140
- /* @__PURE__ */ t.jsxs("div", { className: C.price, children: [
1973
+ /* @__PURE__ */ t.jsxs("div", { className: k.content, children: [
1974
+ /* @__PURE__ */ t.jsx("div", { className: k.name, children: i.name }),
1975
+ /* @__PURE__ */ t.jsxs("div", { className: k.price, children: [
3141
1976
  "$",
3142
- r.variants.find((k) => k.id === r.activeVariantId).price.amount * ((r == null ? void 0 : r.quantity) || 1)
1977
+ i.variants.find((j) => j.id === i.activeVariantId).price.amount * ((i == null ? void 0 : i.quantity) || 1)
3143
1978
  ] })
3144
1979
  ] })
3145
1980
  ] }),
3146
- /* @__PURE__ */ t.jsxs("div", { className: C.productButtons, children: [
1981
+ /* @__PURE__ */ t.jsxs("div", { className: k.productButtons, children: [
3147
1982
  /* @__PURE__ */ t.jsx(
3148
1983
  "div",
3149
1984
  {
3150
1985
  onClick: () => {
3151
- r.quantity !== 1 && f(r);
1986
+ i.quantity !== 1 && h(i);
3152
1987
  },
3153
- className: C.productButton,
1988
+ className: k.productButton,
3154
1989
  children: /* @__PURE__ */ t.jsx(
3155
1990
  b,
3156
1991
  {
@@ -3162,12 +1997,12 @@ const sc = (d) => {
3162
1997
  )
3163
1998
  }
3164
1999
  ),
3165
- /* @__PURE__ */ t.jsx("div", { className: C.productCount, children: r.quantity }),
2000
+ /* @__PURE__ */ t.jsx("div", { className: k.productCount, children: i.quantity }),
3166
2001
  /* @__PURE__ */ t.jsx(
3167
2002
  "div",
3168
2003
  {
3169
- onClick: () => v(r),
3170
- className: C.productButton,
2004
+ onClick: () => B(i),
2005
+ className: k.productButton,
3171
2006
  children: /* @__PURE__ */ t.jsx(
3172
2007
  b,
3173
2008
  {
@@ -3182,11 +2017,11 @@ const sc = (d) => {
3182
2017
  ] })
3183
2018
  ]
3184
2019
  },
3185
- r.id
2020
+ i.id
3186
2021
  )) }),
3187
- /* @__PURE__ */ t.jsxs("div", { className: C.bottom, children: [
3188
- /* @__PURE__ */ t.jsxs("div", { className: C.subtotal, children: [
3189
- /* @__PURE__ */ t.jsxs("div", { className: C.block, children: [
2022
+ /* @__PURE__ */ t.jsxs("div", { className: k.bottom, children: [
2023
+ /* @__PURE__ */ t.jsxs("div", { className: k.subtotal, children: [
2024
+ /* @__PURE__ */ t.jsxs("div", { className: k.block, children: [
3190
2025
  /* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
3191
2026
  /* @__PURE__ */ t.jsx(
3192
2027
  b,
@@ -3198,18 +2033,18 @@ const sc = (d) => {
3198
2033
  }
3199
2034
  )
3200
2035
  ] }),
3201
- /* @__PURE__ */ t.jsxs("div", { className: C.total, children: [
2036
+ /* @__PURE__ */ t.jsxs("div", { className: k.total, children: [
3202
2037
  "$",
3203
- l().total
2038
+ c().total
3204
2039
  ] })
3205
2040
  ] }),
3206
- /* @__PURE__ */ t.jsx(Q, { onClick: () => m("/checkout"), children: "Checkout" })
2041
+ /* @__PURE__ */ t.jsx(Y, { onClick: () => N("/checkout"), children: "Checkout" })
3207
2042
  ] })
3208
- ] }) : /* @__PURE__ */ t.jsx(ba, {})
2043
+ ] }) : /* @__PURE__ */ t.jsx(li, {})
3209
2044
  ]
3210
2045
  }
3211
2046
  );
3212
- }, ba = () => /* @__PURE__ */ t.jsxs("div", { className: C.empty, children: [
2047
+ }, li = () => /* @__PURE__ */ t.jsxs("div", { className: k.empty, children: [
3213
2048
  /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
3214
2049
  b,
3215
2050
  {
@@ -3225,22 +2060,22 @@ const sc = (d) => {
3225
2060
  "a",
3226
2061
  {
3227
2062
  href: "/products",
3228
- className: C.link,
2063
+ className: k.link,
3229
2064
  children: "view products"
3230
2065
  }
3231
2066
  )
3232
2067
  ] })
3233
- ] }), Ft = ({ signUp: d }) => {
3234
- const a = JSON.parse(localStorage.getItem("token") || "{}"), { data: e } = a, s = Bt();
3235
- function i(o) {
3236
- window.location.pathname.includes("/admin/builder") || s(o);
2068
+ ] }), wt = ({ signUp: u }) => {
2069
+ const o = JSON.parse(localStorage.getItem("token") || "{}"), { data: e } = o, s = rt();
2070
+ function n(a) {
2071
+ window.location.pathname.includes("/admin/builder") || s(a);
3237
2072
  }
3238
2073
  if (!e)
3239
2074
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
3240
2075
  /* @__PURE__ */ t.jsx(
3241
- Q,
2076
+ Y,
3242
2077
  {
3243
- onClick: () => i("/customer-dash"),
2078
+ onClick: () => n("/customer-dash"),
3244
2079
  type: "Secondary",
3245
2080
  style: {
3246
2081
  padding: 10
@@ -3248,10 +2083,10 @@ const sc = (d) => {
3248
2083
  children: "Login"
3249
2084
  }
3250
2085
  ),
3251
- d && /* @__PURE__ */ t.jsx(
3252
- Q,
2086
+ u && /* @__PURE__ */ t.jsx(
2087
+ Y,
3253
2088
  {
3254
- onClick: () => i("/customer-dash"),
2089
+ onClick: () => n("/customer-dash"),
3255
2090
  type: "Primary",
3256
2091
  style: {
3257
2092
  padding: 10
@@ -3260,44 +2095,44 @@ const sc = (d) => {
3260
2095
  }
3261
2096
  )
3262
2097
  ] });
3263
- const [c, l] = g.useState("test-email@gmail.com");
3264
- return g.useEffect(() => {
2098
+ const [r, c] = x.useState("test-email@gmail.com");
2099
+ return x.useEffect(() => {
3265
2100
  (async () => {
3266
- const n = ga(e);
3267
- l(n.email);
2101
+ const _ = Tt(e);
2102
+ c(_.email);
3268
2103
  })();
3269
2104
  }, [e]), /* @__PURE__ */ t.jsx(
3270
2105
  "div",
3271
2106
  {
3272
- className: C.userInfo,
3273
- onClick: () => i("/customer-dash"),
3274
- children: /* @__PURE__ */ t.jsx("div", { children: c || "test-email@gmail.com" })
2107
+ className: k.userInfo,
2108
+ onClick: () => n("/customer-dash"),
2109
+ children: /* @__PURE__ */ t.jsx("div", { children: r || "test-email@gmail.com" })
3275
2110
  }
3276
2111
  );
3277
- }, va = ({
3278
- children: d,
3279
- logo: a,
2112
+ }, ri = ({
2113
+ children: u,
2114
+ logo: o,
3280
2115
  setIsOpen: e,
3281
2116
  signUp: s
3282
2117
  }) => {
3283
- const { setIsOpen: i } = Ut(), c = () => {
3284
- i(!1), setTimeout(() => {
3285
- e(!1), i(!0);
2118
+ const { setIsOpen: n } = $t(), r = () => {
2119
+ n(!1), setTimeout(() => {
2120
+ e(!1), n(!0);
3286
2121
  }, 300);
3287
2122
  };
3288
2123
  return /* @__PURE__ */ t.jsxs(
3289
2124
  "div",
3290
2125
  {
3291
- className: C.pagesMobileModal,
3292
- onClick: (l) => l.stopPropagation(),
2126
+ className: k.pagesMobileModal,
2127
+ onClick: (c) => c.stopPropagation(),
3293
2128
  children: [
3294
- /* @__PURE__ */ t.jsxs("div", { className: C.pagesMobileModalHeader, children: [
3295
- /* @__PURE__ */ t.jsx("div", { children: a }),
2129
+ /* @__PURE__ */ t.jsxs("div", { className: k.pagesMobileModalHeader, children: [
2130
+ /* @__PURE__ */ t.jsx("div", { children: o }),
3296
2131
  /* @__PURE__ */ t.jsx(
3297
- Q,
2132
+ Y,
3298
2133
  {
3299
2134
  type: "Secondary",
3300
- onClick: c,
2135
+ onClick: r,
3301
2136
  children: /* @__PURE__ */ t.jsx(
3302
2137
  b,
3303
2138
  {
@@ -3308,40 +2143,40 @@ const sc = (d) => {
3308
2143
  }
3309
2144
  )
3310
2145
  ] }),
3311
- /* @__PURE__ */ t.jsx("div", { className: C.pagesMobileModalContent, children: d }),
3312
- /* @__PURE__ */ t.jsx("div", { className: C.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(Ft, { signUp: s }) })
2146
+ /* @__PURE__ */ t.jsx("div", { className: k.pagesMobileModalContent, children: u }),
2147
+ /* @__PURE__ */ t.jsx("div", { className: k.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(wt, { signUp: s }) })
3313
2148
  ]
3314
2149
  }
3315
2150
  );
3316
- }, nc = ({
3317
- children: d,
3318
- logo: a,
2151
+ }, Yi = ({
2152
+ children: u,
2153
+ logo: o,
3319
2154
  signUp: e
3320
2155
  }) => {
3321
- const [s, i] = g.useState(!1);
2156
+ const [s, n] = x.useState(!1);
3322
2157
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
3323
- /* @__PURE__ */ t.jsx(ja, { setIsOpenModal: i }),
3324
- s && /* @__PURE__ */ t.jsx(Mt, { close: () => i(!1), children: /* @__PURE__ */ t.jsx(
3325
- va,
2158
+ /* @__PURE__ */ t.jsx(di, { setIsOpenModal: n }),
2159
+ s && /* @__PURE__ */ t.jsx(yt, { close: () => n(!1), children: /* @__PURE__ */ t.jsx(
2160
+ ri,
3326
2161
  {
3327
- logo: a,
3328
- setIsOpen: i,
2162
+ logo: o,
2163
+ setIsOpen: n,
3329
2164
  signUp: e,
3330
- children: d
2165
+ children: u
3331
2166
  }
3332
2167
  ) })
3333
2168
  ] });
3334
- }, ja = (d) => {
3335
- const { setIsOpenModal: a } = d;
2169
+ }, di = (u) => {
2170
+ const { setIsOpenModal: o } = u;
3336
2171
  return /* @__PURE__ */ t.jsx(
3337
- Q,
2172
+ Y,
3338
2173
  {
3339
2174
  type: "Secondary",
3340
2175
  style: {
3341
2176
  padding: 10
3342
2177
  },
3343
2178
  onClick: (e) => {
3344
- e.stopPropagation(), a(!0);
2179
+ e.stopPropagation(), o(!0);
3345
2180
  },
3346
2181
  children: /* @__PURE__ */ t.jsx(
3347
2182
  b,
@@ -3352,28 +2187,28 @@ const sc = (d) => {
3352
2187
  )
3353
2188
  }
3354
2189
  );
3355
- }, ya = "_share_xddz7_1", ka = "_modal_xddz7_8", $a = "_header_xddz7_20", Ia = "_socials_xddz7_30", Na = "_social_xddz7_30", wa = "_copy_xddz7_40", Ca = "_title_xddz7_47", Sa = "_copyWrapper_xddz7_53", Ba = "_copyText_xddz7_62", Ta = "_copyTextMobile_xddz7_75", Pa = "_copyTextMiniMobile_xddz7_94", lt = {
3356
- share: ya,
3357
- modal: ka,
3358
- header: $a,
3359
- socials: Ia,
3360
- social: Na,
3361
- copy: wa,
3362
- title: Ca,
3363
- copyWrapper: Sa,
3364
- copyText: Ba,
3365
- copyTextMobile: Ta,
3366
- copyTextMiniMobile: Pa
3367
- }, ic = () => {
3368
- const { isOpenModal: d, setIsOpenModal: a } = Dt();
2190
+ }, ui = "_share_xddz7_1", pi = "_modal_xddz7_8", mi = "_header_xddz7_20", _i = "_socials_xddz7_30", hi = "_social_xddz7_30", gi = "_copy_xddz7_40", xi = "_title_xddz7_47", fi = "_copyWrapper_xddz7_53", bi = "_copyText_xddz7_62", vi = "_copyTextMobile_xddz7_75", ji = "_copyTextMiniMobile_xddz7_94", tt = {
2191
+ share: ui,
2192
+ modal: pi,
2193
+ header: mi,
2194
+ socials: _i,
2195
+ social: hi,
2196
+ copy: gi,
2197
+ title: xi,
2198
+ copyWrapper: fi,
2199
+ copyText: bi,
2200
+ copyTextMobile: vi,
2201
+ copyTextMiniMobile: ji
2202
+ }, Wi = () => {
2203
+ const { isOpenModal: u, setIsOpenModal: o } = St();
3369
2204
  function e() {
3370
- a(!0);
2205
+ o(!0);
3371
2206
  }
3372
2207
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
3373
2208
  /* @__PURE__ */ t.jsx(
3374
- ot,
2209
+ et,
3375
2210
  {
3376
- className: lt.share,
2211
+ className: tt.share,
3377
2212
  onClick: (s) => {
3378
2213
  s.stopPropagation(), e();
3379
2214
  },
@@ -3388,105 +2223,105 @@ const sc = (d) => {
3388
2223
  )
3389
2224
  }
3390
2225
  ),
3391
- d && /* @__PURE__ */ t.jsx(Mt, { close: a, children: /* @__PURE__ */ t.jsx(Aa, {}) })
2226
+ u && /* @__PURE__ */ t.jsx(yt, { close: o, children: /* @__PURE__ */ t.jsx(yi, {}) })
3392
2227
  ] });
3393
- }, Aa = () => {
3394
- const { setIsOpenModal: d } = Dt(), { notification: a, setNotification: e } = Gt(), { setIsOpen: s } = Ut(), i = window.location.href;
3395
- function c() {
3396
- navigator.clipboard.writeText(i), e({
2228
+ }, yi = () => {
2229
+ const { setIsOpenModal: u } = St(), { notification: o, setNotification: e } = qt(), { setIsOpen: s } = $t(), n = window.location.href;
2230
+ function r() {
2231
+ navigator.clipboard.writeText(n), e({
3397
2232
  message: "Link copied to clipboard",
3398
2233
  status: "success"
3399
2234
  });
3400
2235
  }
3401
- function l() {
2236
+ function c() {
3402
2237
  s(!1), setTimeout(() => {
3403
- d(!1), s(!0);
2238
+ u(!1), s(!0);
3404
2239
  }, 300);
3405
2240
  }
3406
- function o(n, m) {
3407
- return n.length > m ? n.slice(0, m) + "..." : n;
2241
+ function a(_, N) {
2242
+ return _.length > N ? _.slice(0, N) + "..." : _;
3408
2243
  }
3409
2244
  return /* @__PURE__ */ t.jsxs(
3410
2245
  "div",
3411
2246
  {
3412
- className: lt.modal,
3413
- onClick: (n) => n.stopPropagation(),
2247
+ className: tt.modal,
2248
+ onClick: (_) => _.stopPropagation(),
3414
2249
  children: [
3415
- /* @__PURE__ */ t.jsxs("div", { className: lt.header, children: [
3416
- /* @__PURE__ */ t.jsx("div", { className: lt.title, children: "Copy Product Link" }),
2250
+ /* @__PURE__ */ t.jsxs("div", { className: tt.header, children: [
2251
+ /* @__PURE__ */ t.jsx("div", { className: tt.title, children: "Copy Product Link" }),
3417
2252
  /* @__PURE__ */ t.jsx(
3418
2253
  b,
3419
2254
  {
3420
2255
  name: "X",
3421
2256
  fill: "#757575",
3422
- onClick: l,
2257
+ onClick: c,
3423
2258
  hoverable: !0
3424
2259
  }
3425
2260
  )
3426
2261
  ] }),
3427
- /* @__PURE__ */ t.jsxs("div", { className: lt.copyWrapper, children: [
2262
+ /* @__PURE__ */ t.jsxs("div", { className: tt.copyWrapper, children: [
3428
2263
  /* @__PURE__ */ t.jsxs(
3429
- ot,
2264
+ et,
3430
2265
  {
3431
2266
  type: "Secondary",
3432
- onClick: c,
2267
+ onClick: r,
3433
2268
  style: {
3434
2269
  flex: 1
3435
2270
  },
3436
2271
  children: [
3437
- /* @__PURE__ */ t.jsx("div", { className: lt.copyText, children: o(i, 100) }),
3438
- /* @__PURE__ */ t.jsx("div", { className: lt.copyTextMobile, children: o(i, 40) }),
3439
- /* @__PURE__ */ t.jsx("div", { className: lt.copyTextMiniMobile, children: o(i, 20) })
2272
+ /* @__PURE__ */ t.jsx("div", { className: tt.copyText, children: a(n, 100) }),
2273
+ /* @__PURE__ */ t.jsx("div", { className: tt.copyTextMobile, children: a(n, 40) }),
2274
+ /* @__PURE__ */ t.jsx("div", { className: tt.copyTextMiniMobile, children: a(n, 20) })
3440
2275
  ]
3441
2276
  }
3442
2277
  ),
3443
2278
  /* @__PURE__ */ t.jsx(
3444
- ot,
2279
+ et,
3445
2280
  {
3446
2281
  type: "Secondary",
3447
- onClick: c,
3448
- children: a ? /* @__PURE__ */ t.jsx(b, { name: "Check" }) : /* @__PURE__ */ t.jsx(b, { name: "Copy" })
2282
+ onClick: r,
2283
+ children: o ? /* @__PURE__ */ t.jsx(b, { name: "Check" }) : /* @__PURE__ */ t.jsx(b, { name: "Copy" })
3449
2284
  }
3450
2285
  )
3451
2286
  ] })
3452
2287
  ]
3453
2288
  }
3454
2289
  );
3455
- }, Oa = "_accordion_1s1lq_1", Ma = "_header_1s1lq_9", qa = "_icon_1s1lq_18", za = "_open_1s1lq_21", Ea = "_content_1s1lq_25", ft = {
3456
- accordion: Oa,
3457
- header: Ma,
3458
- icon: qa,
3459
- open: za,
3460
- content: Ea
3461
- }, oc = ({ title: d, content: a, defaultOpen: e = !1 }) => {
3462
- const [s, i] = g.useState(e), [c, l] = g.useState(0), o = g.useRef(null), n = () => {
3463
- i(!s);
2290
+ }, ki = "_accordion_1s1lq_1", Ni = "_header_1s1lq_9", Ii = "_icon_1s1lq_18", $i = "_open_1s1lq_21", Si = "_content_1s1lq_25", it = {
2291
+ accordion: ki,
2292
+ header: Ni,
2293
+ icon: Ii,
2294
+ open: $i,
2295
+ content: Si
2296
+ }, Gi = ({ title: u, content: o, defaultOpen: e = !1 }) => {
2297
+ const [s, n] = x.useState(e), [r, c] = x.useState(0), a = x.useRef(null), _ = () => {
2298
+ n(!s);
3464
2299
  };
3465
- return g.useEffect(() => {
3466
- o.current && l(s ? o.current.scrollHeight : 0);
3467
- }, [s]), /* @__PURE__ */ t.jsxs("div", { className: ft.accordion, children: [
2300
+ return x.useEffect(() => {
2301
+ a.current && c(s ? a.current.scrollHeight : 0);
2302
+ }, [s]), /* @__PURE__ */ t.jsxs("div", { className: it.accordion, children: [
3468
2303
  /* @__PURE__ */ t.jsxs(
3469
2304
  "div",
3470
2305
  {
3471
- className: ft.header,
3472
- onClick: n,
2306
+ className: it.header,
2307
+ onClick: _,
3473
2308
  children: [
3474
- /* @__PURE__ */ t.jsx("h5", { id: "h5", children: d }),
3475
- /* @__PURE__ */ t.jsx("div", { className: Y(ft.icon, { [ft.open]: s }), children: /* @__PURE__ */ t.jsx(b, { name: "CaretDown" }) })
2309
+ /* @__PURE__ */ t.jsx("h5", { id: "h5", children: u }),
2310
+ /* @__PURE__ */ t.jsx("div", { className: H(it.icon, { [it.open]: s }), children: /* @__PURE__ */ t.jsx(b, { name: "CaretDown" }) })
3476
2311
  ]
3477
2312
  }
3478
2313
  ),
3479
2314
  /* @__PURE__ */ t.jsx(
3480
2315
  "div",
3481
2316
  {
3482
- ref: o,
3483
- className: ft.content,
3484
- style: { height: `${c}px` },
3485
- children: /* @__PURE__ */ t.jsx("p", { id: "p", children: a })
2317
+ ref: a,
2318
+ className: it.content,
2319
+ style: { height: `${r}px` },
2320
+ children: /* @__PURE__ */ t.jsx("p", { id: "p", children: o })
3486
2321
  }
3487
2322
  )
3488
2323
  ] });
3489
- }, ac = ({ children: d, path: a, className: e, target: s = "_self", id: i }) => {
2324
+ }, Xi = ({ children: u, path: o, className: e, target: s = "_self", id: n }) => {
3490
2325
  if (window.location.pathname.includes("/admin/builder"))
3491
2326
  return /* @__PURE__ */ t.jsx(
3492
2327
  "div",
@@ -3494,30 +2329,30 @@ const sc = (d) => {
3494
2329
  className: e,
3495
2330
  role: "link",
3496
2331
  style: { cursor: "pointer" },
3497
- id: i,
3498
- children: d
2332
+ id: n,
2333
+ children: u
3499
2334
  }
3500
2335
  );
3501
- const c = Bt(), l = /^https?:\/\//.test(a), o = (n) => {
3502
- l || s === "_blank" ? s === "_blank" ? window.open(a, "_blank") : window.location.href = a : (n.preventDefault(), c(a, { replace: !0 }));
2336
+ const r = rt(), c = /^https?:\/\//.test(o), a = (_) => {
2337
+ c || s === "_blank" ? s === "_blank" ? window.open(o, "_blank") : window.location.href = o : (_.preventDefault(), r(o, { replace: !0 }));
3503
2338
  };
3504
2339
  return /* @__PURE__ */ t.jsx(
3505
2340
  "div",
3506
2341
  {
3507
- onClick: o,
2342
+ onClick: a,
3508
2343
  className: e,
3509
2344
  role: "link",
3510
2345
  style: { cursor: "pointer" },
3511
- id: i,
3512
- children: d
2346
+ id: n,
2347
+ children: u
3513
2348
  }
3514
2349
  );
3515
- }, Ua = "_buttonsBlock_1b2rb_1", Da = "_slideUp_1b2rb_1", La = {
3516
- buttonsBlock: Ua,
3517
- slideUp: Da
3518
- }, cc = () => /* @__PURE__ */ t.jsxs("div", { className: La.buttonsBlock, children: [
2350
+ }, Ci = "_buttonsBlock_1b2rb_1", wi = "_slideUp_1b2rb_1", Bi = {
2351
+ buttonsBlock: Ci,
2352
+ slideUp: wi
2353
+ }, Qi = () => /* @__PURE__ */ t.jsxs("div", { className: Bi.buttonsBlock, children: [
3519
2354
  /* @__PURE__ */ t.jsx(
3520
- Q,
2355
+ Y,
3521
2356
  {
3522
2357
  type: "Primary",
3523
2358
  style: {
@@ -3526,19 +2361,19 @@ const sc = (d) => {
3526
2361
  children: "Add to Cart"
3527
2362
  }
3528
2363
  ),
3529
- /* @__PURE__ */ t.jsx(Q, { type: "Secondary", children: "Buy" })
3530
- ] }), Ha = "_wrapper_st58d_1", Ra = "_label_st58d_10", Fa = "_textarea_st58d_18", Va = "_length_st58d_33", jt = {
3531
- wrapper: Ha,
3532
- label: Ra,
3533
- textarea: Fa,
3534
- length: Va
3535
- }, lc = (d) => {
3536
- const { onChange: a, label: e, value: s, maxLength: i, placeholder: c = "Type something..." } = d, [l, o] = g.useState(s.length);
3537
- return /* @__PURE__ */ t.jsxs("div", { className: jt.wrapper, children: [
2364
+ /* @__PURE__ */ t.jsx(Y, { type: "Secondary", children: "Buy" })
2365
+ ] }), Pi = "_wrapper_st58d_1", Mi = "_label_st58d_10", Ti = "_textarea_st58d_18", qi = "_length_st58d_33", lt = {
2366
+ wrapper: Pi,
2367
+ label: Mi,
2368
+ textarea: Ti,
2369
+ length: qi
2370
+ }, Ji = (u) => {
2371
+ const { onChange: o, label: e, value: s, maxLength: n, placeholder: r = "Type something..." } = u, [c, a] = x.useState(s.length);
2372
+ return /* @__PURE__ */ t.jsxs("div", { className: lt.wrapper, children: [
3538
2373
  e && /* @__PURE__ */ t.jsx(
3539
2374
  "label",
3540
2375
  {
3541
- className: jt.label,
2376
+ className: lt.label,
3542
2377
  htmlFor: e,
3543
2378
  children: e
3544
2379
  }
@@ -3548,56 +2383,56 @@ const sc = (d) => {
3548
2383
  {
3549
2384
  id: e,
3550
2385
  defaultValue: s,
3551
- onChange: (n) => {
3552
- o(n.target.value.length), a(n.target.value);
2386
+ onChange: (_) => {
2387
+ a(_.target.value.length), o(_.target.value);
3553
2388
  },
3554
- placeholder: c,
3555
- className: jt.textarea,
3556
- maxLength: i
2389
+ placeholder: r,
2390
+ className: lt.textarea,
2391
+ maxLength: n
3557
2392
  }
3558
2393
  ),
3559
- i && /* @__PURE__ */ t.jsxs("div", { className: jt.length, children: [
3560
- l,
2394
+ n && /* @__PURE__ */ t.jsxs("div", { className: lt.length, children: [
2395
+ c,
3561
2396
  "/",
3562
- i
2397
+ n
3563
2398
  ] })
3564
2399
  ] });
3565
2400
  };
3566
2401
  export {
3567
- oc as Accordion,
3568
- ja as BurgerMenuButton,
3569
- Q as Button,
3570
- ai as ButtonTypeSettings,
3571
- Za as ButtonsSettings,
3572
- Ja as CategorySettings,
3573
- bt as ChooseImage,
3574
- uc as ChooseImageModal,
3575
- ba as EmptyCart,
3576
- Ka as FormSettings,
3577
- sc as HeaderButtons,
2402
+ Gi as Accordion,
2403
+ di as BurgerMenuButton,
2404
+ Y as Button,
2405
+ ps as ButtonTypeSettings,
2406
+ Li as ButtonsSettings,
2407
+ Di as CategorySettings,
2408
+ Nt as ChooseImage,
2409
+ to as ChooseImageModal,
2410
+ li as EmptyCart,
2411
+ Hi as FormSettings,
2412
+ Vi as HeaderButtons,
3578
2413
  b as Icon,
3579
- tt as InputSettings,
3580
- $o as InputUI,
3581
- Ge as ItemsSettings,
3582
- Wa as LayoutSettings,
3583
- ac as Link,
3584
- tc as ListingSelector,
3585
- mc as Loader,
3586
- Mt as Modal,
3587
- nc as PagesMobileMenu,
3588
- va as PagesMobileModal,
3589
- Qa as PagesSettings,
3590
- cc as ProductCardButtons,
3591
- ec as ProductOptions,
3592
- qt as RangeSelector,
3593
- et as Select,
3594
- ic as ShareLink,
3595
- fa as ShoppingButton,
3596
- xa as ShoppingModalCart,
3597
- st as Switch,
3598
- Ht as TextSettings,
3599
- zt as TextareaSettings,
3600
- lc as TextareaUI,
3601
- Lt as TypesText,
3602
- Ft as UserInfo
2414
+ ut as InputSettings,
2415
+ gn as InputUI,
2416
+ eo as ItemsSettings,
2417
+ zi as LayoutSettings,
2418
+ Xi as Link,
2419
+ Ui as ListingSelector,
2420
+ so as Loader,
2421
+ yt as Modal,
2422
+ Yi as PagesMobileMenu,
2423
+ ri as PagesMobileModal,
2424
+ Ri as PagesSettings,
2425
+ Qi as ProductCardButtons,
2426
+ Fi as ProductOptions,
2427
+ kt as RangeSelector,
2428
+ ct as Select,
2429
+ Wi as ShareLink,
2430
+ ai as ShoppingButton,
2431
+ ci as ShoppingModalCart,
2432
+ at as Switch,
2433
+ no as TextSettings,
2434
+ io as TextareaSettings,
2435
+ Ji as TextareaUI,
2436
+ oo as TypesText,
2437
+ wt as UserInfo
3603
2438
  };