@billgangcom/theme-lib 1.68.0 → 1.69.1

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 (199) hide show
  1. package/dist/App.d.ts +2 -3
  2. package/dist/abstractions/IBlock.d.ts +1 -1
  3. package/dist/abstractions/PageContext.d.ts +73 -69
  4. package/dist/{builder/constants/api.d.ts → api/constants.d.ts} +2 -0
  5. package/dist/api/index.d.ts +1 -6
  6. package/dist/api/request.d.ts +8 -4
  7. package/dist/assets/storefront-icons/index.d.ts +73 -0
  8. package/dist/builder/api/index.d.ts +4 -0
  9. package/dist/builder/components/BlockColors/index.d.ts +1 -1
  10. package/dist/builder/components/BlockSettings/settings.d.ts +1 -1
  11. package/dist/builder/components/HeaderSaveButton/api/index.d.ts +1 -4
  12. package/dist/builder/components/HeaderSaveButton/utils/index.d.ts +1 -1
  13. package/dist/builder/components/HeaderSettingsPages/api/index.d.ts +1 -4
  14. package/dist/builder/components/ThemeSettingsColors/utils/getDuplicateColors.d.ts +1 -1
  15. package/dist/builder/constants/index.d.ts +0 -2
  16. package/dist/builder/constants/notification.d.ts +1 -0
  17. package/dist/builder/store/useGeneralStore.d.ts +3 -3
  18. package/dist/builder/store/useNotificationStore.d.ts +2 -2
  19. package/dist/builder/ui/ChooseImage/api/index.d.ts +2 -8
  20. package/dist/builder/ui/Notification/index.d.ts +11 -0
  21. package/dist/builder/ui/index.d.ts +0 -1
  22. package/dist/builder.cjs.js +123 -49
  23. package/dist/builder.es.js +18334 -2840
  24. package/dist/index-C1GpRLwI.js +15866 -0
  25. package/dist/index-CtyrP2GR.cjs +80 -0
  26. package/dist/index.cjs.js +1 -1
  27. package/dist/index.es.js +8 -8
  28. package/dist/lib/createTicket.d.ts +1 -4
  29. package/dist/lib/generateDynamicStyles.d.ts +1 -1
  30. package/dist/lib/setupDynamicFonts.d.ts +1 -1
  31. package/dist/pages/balance/balance-modal.d.ts +7 -0
  32. package/dist/pages/balance/index.d.ts +1 -0
  33. package/dist/pages/balance/model.d.ts +6 -0
  34. package/dist/pages/charge/index.d.ts +1 -0
  35. package/dist/pages/checkout/index.d.ts +1 -0
  36. package/dist/pages/checkout/model.d.ts +1 -0
  37. package/dist/pages/dynamic-page/api/index.d.ts +1 -4
  38. package/dist/pages/error-page/api/index.d.ts +1 -4
  39. package/dist/pages/home/index.d.ts +1 -0
  40. package/dist/pages/home/model.d.ts +26 -0
  41. package/dist/pages/order/index.d.ts +1 -0
  42. package/dist/pages/order/model.d.ts +91 -0
  43. package/dist/pages/orders/index.d.ts +1 -0
  44. package/dist/pages/orders/model.d.ts +4 -0
  45. package/dist/pages/rewards/index.d.ts +1 -0
  46. package/dist/pages/rewards/model.d.ts +71 -0
  47. package/dist/pages/subscription/index.d.ts +1 -0
  48. package/dist/pages/subscription/model.d.ts +1 -0
  49. package/dist/pages/subscriptions/index.d.ts +1 -0
  50. package/dist/pages/subscriptions/model.d.ts +6 -0
  51. package/dist/pages/ticket/index.d.ts +1 -0
  52. package/dist/pages/ticket/model.d.ts +24 -0
  53. package/dist/pages/tickets/index.d.ts +1 -0
  54. package/dist/pages/tickets/model.d.ts +21 -0
  55. package/dist/pages/top-up-balance/index.d.ts +1 -0
  56. package/dist/storefront/api/auth.d.ts +20 -0
  57. package/dist/storefront/api/charge.d.ts +1 -0
  58. package/dist/storefront/api/coupon.d.ts +2 -0
  59. package/dist/storefront/api/customer.d.ts +6 -0
  60. package/dist/storefront/api/discord.d.ts +7 -0
  61. package/dist/storefront/api/fetchGatewaysDetail.d.ts +1 -0
  62. package/dist/storefront/api/fetchThemeAndSettings.d.ts +1 -0
  63. package/dist/storefront/api/fetchWithPages.d.ts +11 -0
  64. package/dist/storefront/api/index.d.ts +18 -0
  65. package/dist/storefront/api/order.d.ts +14 -0
  66. package/dist/storefront/api/postBalanceTopUp.d.ts +2 -0
  67. package/dist/storefront/api/postCashappLink.d.ts +3 -0
  68. package/dist/storefront/api/referral.d.ts +3 -0
  69. package/dist/storefront/api/reviews.d.ts +2 -0
  70. package/dist/storefront/api/signUpReferral.d.ts +2 -0
  71. package/dist/storefront/api/store.d.ts +6 -0
  72. package/dist/storefront/api/subscription.d.ts +22 -0
  73. package/dist/storefront/api/ticket.d.ts +7 -0
  74. package/dist/storefront/api/transactions.d.ts +5 -0
  75. package/dist/storefront/components/ActivePaymentMethod/index.d.ts +2 -0
  76. package/dist/storefront/components/ActiveSubscriptionProduct/index.d.ts +9 -0
  77. package/dist/storefront/components/Auth/index.d.ts +11 -0
  78. package/dist/storefront/components/Auth/otp-input.d.ts +7 -0
  79. package/dist/storefront/components/AuthModal/index.d.ts +6 -0
  80. package/dist/storefront/components/CancelSubscription/index.d.ts +8 -0
  81. package/dist/storefront/components/CashAppVerify/index.d.ts +7 -0
  82. package/dist/storefront/components/ChangePaymentMethod/index.d.ts +7 -0
  83. package/dist/storefront/components/ChangeSubscriptionPlan/index.d.ts +10 -0
  84. package/dist/storefront/components/ChargeBlocksRenderer/index.d.ts +6 -0
  85. package/dist/storefront/components/ChargeItems/index.d.ts +7 -0
  86. package/dist/storefront/components/ChargeStatusBlock/index.d.ts +10 -0
  87. package/dist/storefront/components/CheckoutFooter/index.d.ts +6 -0
  88. package/dist/storefront/components/CheckoutHeader/index.d.ts +7 -0
  89. package/dist/storefront/components/CheckoutItems/index.d.ts +18 -0
  90. package/dist/storefront/components/CheckoutOperational/index.d.ts +24 -0
  91. package/dist/storefront/components/CheckoutOrderMainData/index.d.ts +9 -0
  92. package/dist/storefront/components/CheckoutPrices/index.d.ts +12 -0
  93. package/dist/storefront/components/CheckoutProduct/index.d.ts +8 -0
  94. package/dist/storefront/components/CheckoutProduct/model.d.ts +1 -0
  95. package/dist/storefront/components/ChoosePlanUpgradeMethod/index.d.ts +9 -0
  96. package/dist/storefront/components/ConnectDiscord/index.d.ts +6 -0
  97. package/dist/storefront/components/ConnectDiscord/model.d.ts +22 -0
  98. package/dist/storefront/components/Coupon/index.d.ts +12 -0
  99. package/dist/storefront/components/CustomFields/index.d.ts +13 -0
  100. package/dist/storefront/components/CustomerDashboard/index.d.ts +2 -0
  101. package/dist/storefront/components/DeliveryItem/index.d.ts +7 -0
  102. package/dist/storefront/components/InsufficientBalance/index.d.ts +8 -0
  103. package/dist/storefront/components/LeaveAReview/index.d.ts +9 -0
  104. package/dist/storefront/components/NoItemsBlock/index.d.ts +7 -0
  105. package/dist/storefront/components/OpenDelivery/index.d.ts +8 -0
  106. package/dist/storefront/components/OrderStatusBlock/index.d.ts +9 -0
  107. package/dist/storefront/components/OrdersTable/index.d.ts +15 -0
  108. package/dist/storefront/components/PageLoading/index.d.ts +7 -0
  109. package/dist/storefront/components/PageTitle/index.d.ts +6 -0
  110. package/dist/storefront/components/Pagination/index.d.ts +15 -0
  111. package/dist/storefront/components/PayPalF&FNote/index.d.ts +8 -0
  112. package/dist/storefront/components/PaymentMethod/checkout-balance-payment-method.d.ts +13 -0
  113. package/dist/storefront/components/PaymentMethod/index.d.ts +15 -0
  114. package/dist/storefront/components/PaymentMethod/model.d.ts +16 -0
  115. package/dist/storefront/components/PaymentMethods/index.d.ts +18 -0
  116. package/dist/storefront/components/ProcessingPayment/index.d.ts +1 -0
  117. package/dist/storefront/components/ReferralBlock/index.d.ts +13 -0
  118. package/dist/storefront/components/ReferralBlock/mask.d.ts +1 -0
  119. package/dist/storefront/components/ReferralBlock/referral-modal.d.ts +7 -0
  120. package/dist/storefront/components/ReferralBlock/step-item.d.ts +8 -0
  121. package/dist/storefront/components/SecuredBySsl/index.d.ts +1 -0
  122. package/dist/storefront/components/Sidebar/card.d.ts +6 -0
  123. package/dist/storefront/components/Sidebar/index.d.ts +1 -0
  124. package/dist/storefront/components/Sidebar/nav-list.d.ts +2 -0
  125. package/dist/storefront/components/StatItem/index.d.ts +14 -0
  126. package/dist/storefront/components/StatusIndicator/index.d.ts +7 -0
  127. package/dist/storefront/components/SubmitReview/index.d.ts +7 -0
  128. package/dist/storefront/components/SubscriptionCoupon/index.d.ts +7 -0
  129. package/dist/storefront/components/SubscriptionExpiration/index.d.ts +6 -0
  130. package/dist/storefront/components/SubscriptionExpirationDate/index.d.ts +2 -0
  131. package/dist/storefront/components/SubscriptionProduct/index.d.ts +7 -0
  132. package/dist/storefront/components/SubscriptionProduct/model.d.ts +9 -0
  133. package/dist/storefront/components/SubscriptionStatusBadge/index.d.ts +5 -0
  134. package/dist/storefront/components/SubscriptionsTable/index.d.ts +11 -0
  135. package/dist/storefront/components/Table/index.d.ts +17 -0
  136. package/dist/storefront/components/TermsOfService/index.d.ts +1 -0
  137. package/dist/storefront/components/TicketRow/index.d.ts +5 -0
  138. package/dist/storefront/components/TrackPayment/index.d.ts +8 -0
  139. package/dist/storefront/components/index.d.ts +53 -0
  140. package/dist/storefront/constants/api.d.ts +3 -0
  141. package/dist/storefront/constants/index.d.ts +3 -0
  142. package/dist/storefront/constants/referralSteps.d.ts +6 -0
  143. package/dist/storefront/constants/routes.d.ts +8 -0
  144. package/dist/storefront/hooks/index.d.ts +2 -0
  145. package/dist/storefront/hooks/useCart.d.ts +186 -0
  146. package/dist/storefront/hooks/useCopy.d.ts +1 -0
  147. package/dist/storefront/index.d.ts +9 -0
  148. package/dist/storefront/models/balance.d.ts +46 -0
  149. package/dist/storefront/models/charge.d.ts +73 -0
  150. package/dist/storefront/models/checkout.d.ts +16 -0
  151. package/dist/storefront/models/coupon.d.ts +5 -0
  152. package/dist/storefront/models/discord.d.ts +22 -0
  153. package/dist/storefront/models/gateway.d.ts +8 -0
  154. package/dist/storefront/models/index.d.ts +15 -0
  155. package/dist/storefront/models/order.d.ts +125 -0
  156. package/dist/storefront/models/payment.d.ts +15 -0
  157. package/dist/storefront/models/post.d.ts +5 -0
  158. package/dist/storefront/models/price.d.ts +5 -0
  159. package/dist/storefront/models/referral.d.ts +12 -0
  160. package/dist/storefront/models/referralCode.d.ts +3 -0
  161. package/dist/{builder/constants/general.d.ts → storefront/models/shop.d.ts} +19 -6
  162. package/dist/storefront/models/subscription.d.ts +129 -0
  163. package/dist/storefront/models/transaction.d.ts +12 -0
  164. package/dist/storefront/store/index.d.ts +6 -0
  165. package/dist/storefront/store/useCartStore.d.ts +24 -0
  166. package/dist/storefront/store/useCustomerDashboardStore.d.ts +34 -0
  167. package/dist/storefront/store/useDiscordStore.d.ts +7 -0
  168. package/dist/storefront/store/usePaginationPagesStore.d.ts +6 -0
  169. package/dist/storefront/store/useStorefrontStore.d.ts +21 -0
  170. package/dist/storefront/store/useSubscriptionStore.d.ts +7 -0
  171. package/dist/storefront/ui/ActiveBadge/index.d.ts +5 -0
  172. package/dist/storefront/ui/InputRange/index.d.ts +9 -0
  173. package/dist/storefront/ui/ProgressBar/index.d.ts +8 -0
  174. package/dist/storefront/ui/Rating/index.d.ts +8 -0
  175. package/dist/storefront/ui/Timer/index.d.ts +6 -0
  176. package/dist/storefront/ui/index.d.ts +5 -0
  177. package/dist/storefront/utils/index.d.ts +16 -0
  178. package/dist/storefront/utils/recapcha.d.ts +12 -0
  179. package/dist/ui/Button/index.d.ts +1 -1
  180. package/dist/ui/CategorySettings/index.d.ts +1 -1
  181. package/dist/ui/Input/index.d.ts +2 -0
  182. package/dist/ui/ItemsSettings/index.d.ts +1 -1
  183. package/dist/ui/ListingSelector/index.d.ts +1 -1
  184. package/dist/ui/Loader/index.d.ts +4 -0
  185. package/dist/ui/Radio/index.d.ts +14 -0
  186. package/dist/ui/Select/index.d.ts +20 -0
  187. package/dist/ui/Select/utils/index.d.ts +2 -0
  188. package/dist/ui/index.d.ts +3 -0
  189. package/dist/ui.cjs.js +1 -1
  190. package/dist/ui.es.js +1105 -1208
  191. package/package.json +7 -3
  192. package/dist/api/fetchThemeAndSettings.d.ts +0 -4
  193. package/dist/index-BaU8m6yb.cjs +0 -194
  194. package/dist/index-zSoKRTpK.js +0 -34420
  195. /package/dist/{api → builder/api}/fetchAll.d.ts +0 -0
  196. /package/dist/{api → builder/api}/fetchData.d.ts +0 -0
  197. /package/dist/{api → builder/api}/fetchFontsData.d.ts +0 -0
  198. /package/dist/{api → builder/api}/fetchPagesData.d.ts +0 -0
  199. /package/dist/{api → storefront/api}/fetchGeneral.d.ts +0 -0
package/dist/ui.es.js CHANGED
@@ -1,20 +1,18 @@
1
- import { j as t, I as b, c as F, d as bt, u as lt, e as dt, P as ut, S as ot, R as kt, D as pt, f as ht, v as mt, B as ct, g as st, h as Ct, a as St, O as rt, i as et, k as _t, C as gt, l as V, m as Bt, n as Tt, o as ft, p as Mt, r as jt, t as G, L as At, w as xt, x as it, s as yt, y as z, z as Ot, M as Nt, A as $t, E as Et, F as qt, G as wt, H as Rt, J as Dt, K as zt, N as Lt } from "./index-zSoKRTpK.js";
2
- import { X as sa, U as na, W as ia, Q as aa, T as oa, V as ca } from "./index-zSoKRTpK.js";
1
+ import { j as t, I as v, c as U, b as vt, u as rt, d as lt, P as dt, S as at, R as Ct, D as ut, e as ht, v as pt, B as ot, f as st, a as St, g as kt, O as ct, h as K, i as mt, C as gt, k as V, l as Bt, m as Tt, n as ft, o as $t, p as _t, q as X, L as Mt, r as bt, t as xt, w as nt, s as yt, x as F, y as At, M as It, z as wt, A as Ot, E as Pt, F as Et, G as Rt, H as Dt } from "./index-C1GpRLwI.js";
2
+ import { X as Mn, U as An, N as On, W as En, K as Rn, Q as Dn, T as Ln, J as zn, V as Fn } from "./index-C1GpRLwI.js";
3
3
  import f from "react";
4
- const Ft = "_wrapper_kh9z8_2", Ut = "_block_kh9z8_8", Vt = "_title_kh9z8_16", Ht = "_subtitle_kh9z8_23", Yt = "_alignmentContent_kh9z8_30", Wt = "_alignments_kh9z8_39", Gt = "_alignment_kh9z8_30", Xt = "_circle_kh9z8_64", Qt = "_paddings_kh9z8_71", Jt = "_padding_kh9z8_71", Kt = "_active_kh9z8_97", Zt = "_input_kh9z8_104", W = {
5
- wrapper: Ft,
6
- block: Ut,
7
- title: Vt,
8
- subtitle: Ht,
9
- alignmentContent: Yt,
10
- alignments: Wt,
11
- alignment: Gt,
12
- circle: Xt,
13
- paddings: Qt,
14
- padding: Jt,
15
- active: Kt,
16
- input: Zt
17
- }, te = [
4
+ const Lt = "_block_kh9z8_8", zt = "_title_kh9z8_16", Ft = "_subtitle_kh9z8_23", Ht = "_alignmentContent_kh9z8_30", Ut = "_alignments_kh9z8_39", Vt = "_alignment_kh9z8_30", Yt = "_circle_kh9z8_64", Wt = "_paddings_kh9z8_71", Gt = "_padding_kh9z8_71", Xt = "_active_kh9z8_97", G = {
5
+ block: Lt,
6
+ title: zt,
7
+ subtitle: Ft,
8
+ alignmentContent: Ht,
9
+ alignments: Ut,
10
+ alignment: Vt,
11
+ circle: Yt,
12
+ paddings: Wt,
13
+ padding: Gt,
14
+ active: Xt
15
+ }, Qt = [
18
16
  "topLeft",
19
17
  "top",
20
18
  "topRight",
@@ -24,17 +22,17 @@ const Ft = "_wrapper_kh9z8_2", Ut = "_block_kh9z8_8", Vt = "_title_kh9z8_16", Ht
24
22
  "bottomLeft",
25
23
  "bottom",
26
24
  "bottomRight"
27
- ], ee = ["left", "top", "right", "bottom"], Di = (c) => {
25
+ ], Jt = ["left", "top", "right", "bottom"], _n = (o) => {
28
26
  const {
29
27
  alignment: i,
30
28
  padding: a,
31
29
  setPadding: s,
32
30
  setAlignment: e,
33
- isAlignment: o = !0,
31
+ isAlignment: c = !0,
34
32
  isPadding: u = !0
35
- } = c;
36
- function p(d) {
37
- switch (d) {
33
+ } = o;
34
+ function d(l) {
35
+ switch (l) {
38
36
  case "left":
39
37
  case "topLeft":
40
38
  case "bottomLeft":
@@ -51,8 +49,8 @@ const Ft = "_wrapper_kh9z8_2", Ut = "_block_kh9z8_8", Vt = "_title_kh9z8_16", Ht
51
49
  return "TextAlignCenter";
52
50
  }
53
51
  }
54
- function _(d) {
55
- switch (d) {
52
+ function g(l) {
53
+ switch (l) {
56
54
  case "left":
57
55
  return "AlignLeft";
58
56
  case "right":
@@ -63,40 +61,40 @@ const Ft = "_wrapper_kh9z8_2", Ut = "_block_kh9z8_8", Vt = "_title_kh9z8_16", Ht
63
61
  return "AlignBottom";
64
62
  }
65
63
  }
66
- const [h, k] = f.useState(null), [y, n] = f.useState(null);
67
- return /* @__PURE__ */ t.jsxs("div", { className: W.layout, children: [
68
- /* @__PURE__ */ t.jsx("h3", { className: W.title, children: "Layout (for Desktop version)" }),
69
- /* @__PURE__ */ t.jsxs("div", { className: W.alignmentContent, children: [
70
- o && /* @__PURE__ */ t.jsxs("div", { className: W.block, children: [
71
- /* @__PURE__ */ t.jsx("h5", { className: W.subtitle, children: "Alignment" }),
72
- /* @__PURE__ */ t.jsx("div", { className: W.alignments, children: te.map((d) => /* @__PURE__ */ t.jsxs(
64
+ const [x, $] = f.useState(null), [_, n] = f.useState(null);
65
+ return /* @__PURE__ */ t.jsxs("div", { className: G.layout, children: [
66
+ /* @__PURE__ */ t.jsx("h3", { className: G.title, children: "Layout (for Desktop version)" }),
67
+ /* @__PURE__ */ t.jsxs("div", { className: G.alignmentContent, children: [
68
+ c && /* @__PURE__ */ t.jsxs("div", { className: G.block, children: [
69
+ /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: "Alignment" }),
70
+ /* @__PURE__ */ t.jsx("div", { className: G.alignments, children: Qt.map((l) => /* @__PURE__ */ t.jsxs(
73
71
  "div",
74
72
  {
75
73
  onClick: () => {
76
- e(d);
74
+ e(l);
77
75
  },
78
- className: W.alignment,
76
+ className: G.alignment,
79
77
  onMouseEnter: () => {
80
- k(d);
78
+ $(l);
81
79
  },
82
80
  onMouseLeave: () => {
83
- k(null);
81
+ $(null);
84
82
  },
85
83
  children: [
86
- d !== i && h !== d && /* @__PURE__ */ t.jsx("div", { className: W.circle }),
87
- d !== i && h === d && /* @__PURE__ */ t.jsx(
88
- b,
84
+ l !== i && x !== l && /* @__PURE__ */ t.jsx("div", { className: G.circle }),
85
+ l !== i && x === l && /* @__PURE__ */ t.jsx(
86
+ v,
89
87
  {
90
- name: p(h),
88
+ name: d(x),
91
89
  fill: "#c2c2c2",
92
90
  width: 22,
93
91
  height: 22
94
92
  }
95
93
  ),
96
- d === i && /* @__PURE__ */ t.jsx(
97
- b,
94
+ l === i && /* @__PURE__ */ t.jsx(
95
+ v,
98
96
  {
99
- name: p(i),
97
+ name: d(i),
100
98
  fill: "#FF3F19",
101
99
  width: 22,
102
100
  height: 22
@@ -104,40 +102,40 @@ const Ft = "_wrapper_kh9z8_2", Ut = "_block_kh9z8_8", Vt = "_title_kh9z8_16", Ht
104
102
  )
105
103
  ]
106
104
  },
107
- d
105
+ l
108
106
  )) })
109
107
  ] }),
110
- u && /* @__PURE__ */ t.jsxs("div", { className: W.block, children: [
111
- /* @__PURE__ */ t.jsx("h5", { className: W.subtitle, children: "Paddings" }),
112
- /* @__PURE__ */ t.jsx("div", { className: W.paddings, children: ee.map((d) => /* @__PURE__ */ t.jsxs(
108
+ u && /* @__PURE__ */ t.jsxs("div", { className: G.block, children: [
109
+ /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: "Paddings" }),
110
+ /* @__PURE__ */ t.jsx("div", { className: G.paddings, children: Jt.map((l) => /* @__PURE__ */ t.jsxs(
113
111
  "label",
114
112
  {
115
- className: F(W.padding, {
116
- [W.active]: y === d
113
+ className: U(G.padding, {
114
+ [G.active]: _ === l
117
115
  }),
118
116
  onFocus: () => {
119
- n(d);
117
+ n(l);
120
118
  },
121
119
  onBlur: () => {
122
120
  n(null);
123
121
  },
124
122
  children: [
125
123
  /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
126
- b,
124
+ v,
127
125
  {
128
- name: _(d),
126
+ name: g(l),
129
127
  width: 20,
130
128
  height: 20
131
129
  }
132
130
  ) }),
133
131
  /* @__PURE__ */ t.jsx(
134
- bt,
132
+ vt,
135
133
  {
136
134
  type: "number",
137
- value: String(a[d]),
138
- onChange: (r) => s({
135
+ value: String(a[l]),
136
+ onChange: (m) => s({
139
137
  ...a,
140
- [d]: Math.min(Number(r), 999)
138
+ [l]: Math.min(Number(m), 999)
141
139
  }),
142
140
  max: 999,
143
141
  paddingless: !0,
@@ -146,111 +144,99 @@ const Ft = "_wrapper_kh9z8_2", Ut = "_block_kh9z8_8", Vt = "_title_kh9z8_16", Ht
146
144
  )
147
145
  ]
148
146
  },
149
- d
147
+ l
150
148
  )) })
151
149
  ] })
152
150
  ] })
153
151
  ] });
154
- }, se = "_title_82zux_1", ne = "_subtitle_82zux_5", ie = "_header_82zux_12", ae = "_text_82zux_13", oe = "_productsBlock_82zux_14", ce = "_top_82zux_26", re = "_itemsBlock_82zux_35", le = "_typeTexts_82zux_41", de = "_block_82zux_48", ue = "_active_82zux_61", pe = "_products_82zux_14", he = "_product_82zux_14", me = "_button_82zux_80", _e = "_disabled_82zux_91", ge = "_image_82zux_95", fe = "_info_82zux_102", xe = "_name_82zux_114", je = "_buttons_82zux_118", ve = "_modal_82zux_125", be = "_link_82zux_145", ye = "_modalOptions_82zux_151", Ne = "_addButton_82zux_157", Ie = "_deleteButton_82zux_179", X = {
155
- title: se,
156
- subtitle: ne,
157
- header: ie,
158
- text: ae,
159
- productsBlock: oe,
160
- top: ce,
161
- itemsBlock: re,
162
- typeTexts: le,
163
- block: de,
164
- active: ue,
165
- products: pe,
166
- product: he,
167
- button: me,
168
- disabled: _e,
169
- image: ge,
170
- info: fe,
171
- name: xe,
172
- buttons: je,
173
- modal: ve,
174
- link: be,
175
- modalOptions: ye,
176
- addButton: Ne,
177
- deleteButton: Ie
152
+ }, Kt = "_title_82zux_1", Zt = "_subtitle_82zux_5", te = "_productsBlock_82zux_14", ee = "_top_82zux_26", se = "_products_82zux_14", ne = "_product_82zux_14", ie = "_button_82zux_80", ae = "_disabled_82zux_91", oe = "_buttons_82zux_118", ce = "_addButton_82zux_157", re = "_deleteButton_82zux_179", Q = {
153
+ title: Kt,
154
+ subtitle: Zt,
155
+ productsBlock: te,
156
+ top: ee,
157
+ products: se,
158
+ product: ne,
159
+ button: ie,
160
+ disabled: ae,
161
+ buttons: oe,
162
+ addButton: ce,
163
+ deleteButton: re
178
164
  };
179
- function ke({ id: c, children: i }) {
165
+ function le({ id: o, children: i }) {
180
166
  const {
181
167
  attributes: a,
182
168
  listeners: s,
183
169
  setNodeRef: e,
184
- transform: o,
170
+ transform: c,
185
171
  transition: u,
186
- isDragging: p
187
- } = _t({
188
- id: c
189
- }), _ = {
190
- transform: gt.Transform.toString(o),
172
+ isDragging: d
173
+ } = mt({
174
+ id: o
175
+ }), g = {
176
+ transform: gt.Transform.toString(c),
191
177
  transition: u
192
178
  };
193
179
  return /* @__PURE__ */ t.jsx(
194
180
  "div",
195
181
  {
196
182
  ref: e,
197
- style: _,
198
- className: `${X.product} ${p ? X.dragging : ""}`,
183
+ style: g,
184
+ className: `${Q.product} ${d ? Q.dragging : ""}`,
199
185
  ...a,
200
186
  ...s,
201
187
  children: i
202
188
  }
203
189
  );
204
190
  }
205
- const zi = (c) => {
191
+ const jn = (o) => {
206
192
  const {
207
193
  isActiveItems: i,
208
194
  setIsActiveItems: a,
209
195
  items: s,
210
196
  setItems: e,
211
- other: o,
197
+ other: c,
212
198
  tags: u,
213
- title: p,
214
- subtitle: _,
215
- draggable: h = !1,
216
- withImage: k = !1,
217
- addable: y = !0,
199
+ title: d,
200
+ subtitle: g,
201
+ draggable: x = !1,
202
+ withImage: $ = !1,
203
+ addable: _ = !0,
218
204
  itemsOptions: n,
219
- hasRangeSelector: d = !1,
220
- rangeSelectorOptions: r,
221
- limit: B,
222
- autoScrollInterval: g,
223
- deletable: T,
224
- aspectRatio: I,
225
- setAspectRatio: M
226
- } = c, x = lt(
227
- dt(ut, {
205
+ hasRangeSelector: l = !1,
206
+ rangeSelectorOptions: m,
207
+ limit: b,
208
+ autoScrollInterval: p,
209
+ deletable: P,
210
+ aspectRatio: C,
211
+ setAspectRatio: O
212
+ } = o, L = rt(
213
+ lt(dt, {
228
214
  activationConstraint: {
229
215
  distance: 5
230
216
  }
231
217
  })
232
- ), R = (m) => {
233
- const { active: j, over: S } = m;
234
- if (S && j.id !== S.id) {
235
- const P = s.findIndex((A) => A === j.id), $ = s.findIndex((A) => A === S.id);
236
- if (P !== -1 && $ !== -1) {
237
- const A = [...s], [v] = A.splice(P, 1);
238
- A.splice($, 0, v), e(A);
218
+ ), R = (h) => {
219
+ const { active: S, over: k } = h;
220
+ if (k && S.id !== k.id) {
221
+ const I = s.findIndex((M) => M === S.id), q = s.findIndex((M) => M === k.id);
222
+ if (I !== -1 && q !== -1) {
223
+ const M = [...s], [j] = M.splice(I, 1);
224
+ M.splice(q, 0, j), e(M);
239
225
  }
240
226
  }
241
227
  };
242
- function Q(m) {
243
- if (k)
244
- return m ? /* @__PURE__ */ t.jsx(
228
+ function y(h) {
229
+ if ($)
230
+ return h ? /* @__PURE__ */ t.jsx(
245
231
  "img",
246
232
  {
247
- src: `https://imagedelivery.net/${m[0]}/w=1000`,
233
+ src: `https://imagedelivery.net/${h[0]}/w=1000`,
248
234
  alt: "image",
249
235
  width: 16,
250
236
  height: 16
251
237
  }
252
238
  ) : /* @__PURE__ */ t.jsx(
253
- b,
239
+ v,
254
240
  {
255
241
  name: "Image",
256
242
  width: 16,
@@ -259,12 +245,12 @@ const zi = (c) => {
259
245
  }
260
246
  );
261
247
  }
262
- const U = (m, j = !1) => {
263
- const S = n.find(($) => $.id === m);
264
- if (!S) return;
265
- const P = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
266
- h && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
267
- b,
248
+ const z = (h, S = !1) => {
249
+ const k = n.find((q) => q.id === h);
250
+ if (!k) return;
251
+ const I = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
252
+ x && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
253
+ v,
268
254
  {
269
255
  name: "DotsSixVertical",
270
256
  hoverable: !0,
@@ -275,78 +261,78 @@ const zi = (c) => {
275
261
  /* @__PURE__ */ t.jsx(
276
262
  st,
277
263
  {
278
- onChange: ($) => {
279
- const A = [...s], v = n.find((l) => l.name === $);
280
- if (!v) return;
281
- const O = v.id, L = A.map((l) => l === m ? O : l);
282
- e([...L]);
264
+ onChange: (q) => {
265
+ const M = [...s], j = n.find((r) => r.name === q);
266
+ if (!j) return;
267
+ const A = j.id, H = M.map((r) => r === h ? A : r);
268
+ e([...H]);
283
269
  },
284
- value: S.name,
285
- options: n.filter(($) => !s.find((A) => A === $.id)).map(($) => $.name),
286
- leftAddonOptions: n.map(($) => ({
287
- value: $.name,
288
- addon: Q($.images)
270
+ value: k.name,
271
+ options: n.filter((q) => !s.find((M) => M === q.id)).map((q) => q.name),
272
+ leftAddonOptions: n.map((q) => ({
273
+ value: q.name,
274
+ addon: y(q.images)
289
275
  }))
290
276
  }
291
277
  ),
292
- j && /* @__PURE__ */ t.jsx("div", { className: X.buttons, children: /* @__PURE__ */ t.jsx("div", { className: X.deleteButton, children: /* @__PURE__ */ t.jsx(
293
- b,
278
+ S && /* @__PURE__ */ t.jsx("div", { className: Q.buttons, children: /* @__PURE__ */ t.jsx("div", { className: Q.deleteButton, children: /* @__PURE__ */ t.jsx(
279
+ v,
294
280
  {
295
281
  name: "Trash",
296
282
  hoverable: !0,
297
283
  width: 20,
298
284
  height: 20,
299
285
  fill: "#C12A2A",
300
- onClick: () => e(s.filter(($) => $ !== m))
286
+ onClick: () => e(s.filter((q) => q !== h))
301
287
  }
302
288
  ) }) })
303
289
  ] });
304
- return h ? /* @__PURE__ */ t.jsx(
305
- ke,
290
+ return x ? /* @__PURE__ */ t.jsx(
291
+ le,
306
292
  {
307
- id: m,
308
- children: P
293
+ id: h,
294
+ children: I
309
295
  },
310
- et()
296
+ K()
311
297
  ) : /* @__PURE__ */ t.jsx(
312
298
  "div",
313
299
  {
314
- className: X.product,
315
- children: P
300
+ className: Q.product,
301
+ children: I
316
302
  },
317
- et()
303
+ K()
318
304
  );
319
305
  };
320
- return /* @__PURE__ */ t.jsxs("div", { className: X.productsBlock, children: [
321
- (p || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: X.top, children: [
322
- p && /* @__PURE__ */ t.jsx("h3", { className: X.title, children: p }),
306
+ return /* @__PURE__ */ t.jsxs("div", { className: Q.productsBlock, children: [
307
+ (d || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Q.top, children: [
308
+ d && /* @__PURE__ */ t.jsx("h3", { className: Q.title, children: d }),
323
309
  i !== void 0 && /* @__PURE__ */ t.jsx(
324
- ot,
310
+ at,
325
311
  {
326
312
  current: i,
327
- onChange: (m) => a == null ? void 0 : a(m)
313
+ onChange: (h) => a == null ? void 0 : a(h)
328
314
  }
329
315
  )
330
316
  ] }),
331
- d && r && /* @__PURE__ */ t.jsx(kt, { ...r }),
332
- /* @__PURE__ */ t.jsxs("div", { className: X.products, children: [
333
- _ && /* @__PURE__ */ t.jsx("h5", { className: X.subtitle, children: _ }),
334
- h ? /* @__PURE__ */ t.jsx(
335
- pt,
317
+ l && m && /* @__PURE__ */ t.jsx(Ct, { ...m }),
318
+ /* @__PURE__ */ t.jsxs("div", { className: Q.products, children: [
319
+ g && /* @__PURE__ */ t.jsx("h5", { className: Q.subtitle, children: g }),
320
+ x ? /* @__PURE__ */ t.jsx(
321
+ ut,
336
322
  {
337
- sensors: x,
323
+ sensors: L,
338
324
  onDragEnd: R,
339
325
  children: /* @__PURE__ */ t.jsx(
340
326
  ht,
341
327
  {
342
328
  items: s,
343
- strategy: mt,
344
- children: s.map((m) => U(m, T))
329
+ strategy: pt,
330
+ children: s.map((h) => z(h, P))
345
331
  }
346
332
  )
347
333
  }
348
- ) : s.map((m) => U(m, T)),
349
- y && /* @__PURE__ */ t.jsx(
334
+ ) : s.map((h) => z(h, P)),
335
+ _ && /* @__PURE__ */ t.jsx(
350
336
  "div",
351
337
  {
352
338
  style: {
@@ -356,33 +342,33 @@ const zi = (c) => {
356
342
  gap: 5
357
343
  },
358
344
  children: /* @__PURE__ */ t.jsx(
359
- ct,
345
+ ot,
360
346
  {
361
347
  withoutHover: !0,
362
- className: F(X.button, {
363
- [X.disabled]: !!(B && B <= s.length || s.length === n.length)
348
+ className: U(Q.button, {
349
+ [Q.disabled]: !!(b && b <= s.length || s.length === n.length)
364
350
  }),
365
351
  size: "s",
366
- disabled: !!(B && B <= s.length || s.length === n.length),
352
+ disabled: !!(b && b <= s.length || s.length === n.length),
367
353
  onClick: () => {
368
- const m = [...s];
369
- let j = null;
354
+ const h = [...s];
355
+ let S = null;
370
356
  if (n) {
371
- for (let S = 0; S < n.length; S++)
372
- if (!s.find((P) => P === n[S].id)) {
373
- j = n[S];
357
+ for (let k = 0; k < n.length; k++)
358
+ if (!s.find((I) => I === n[k].id)) {
359
+ S = n[k];
374
360
  break;
375
361
  }
376
362
  }
377
- m.push((j == null ? void 0 : j.id) || n[0].id), e(m);
363
+ h.push((S == null ? void 0 : S.id) || n[0].id), e(h);
378
364
  },
379
365
  style: {
380
366
  width: "fit-content"
381
367
  },
382
- children: /* @__PURE__ */ t.jsxs("div", { className: X.addButton, children: [
368
+ children: /* @__PURE__ */ t.jsxs("div", { className: Q.addButton, children: [
383
369
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
384
370
  /* @__PURE__ */ t.jsx(
385
- b,
371
+ v,
386
372
  {
387
373
  name: "Plus",
388
374
  width: 16,
@@ -395,37 +381,37 @@ const zi = (c) => {
395
381
  }
396
382
  )
397
383
  ] }),
398
- I && M && /* @__PURE__ */ t.jsx(
384
+ C && O && /* @__PURE__ */ t.jsx(
399
385
  st,
400
386
  {
401
- value: I,
387
+ value: C,
402
388
  label: "Aspect Ratio",
403
- options: Object.keys(Ct),
404
- onChange: (m) => M(m),
389
+ options: Object.keys(kt),
390
+ onChange: (h) => O(h),
405
391
  leftAddonOptions: St
406
392
  }
407
393
  ),
408
394
  u !== void 0 && /* @__PURE__ */ t.jsx(
409
- rt,
395
+ ct,
410
396
  {
411
397
  tagsTitle: "Tags",
412
398
  items: u
413
399
  }
414
400
  ),
415
- o !== void 0 && /* @__PURE__ */ t.jsx(
416
- rt,
401
+ c !== void 0 && /* @__PURE__ */ t.jsx(
402
+ ct,
417
403
  {
418
404
  otherTitle: "Other",
419
- items: o
405
+ items: c
420
406
  }
421
407
  ),
422
- g !== void 0 && /* @__PURE__ */ t.jsx(
423
- bt,
408
+ p !== void 0 && /* @__PURE__ */ t.jsx(
409
+ vt,
424
410
  {
425
411
  label: "Auto scroll interval",
426
412
  type: "number",
427
- value: String(g.scrollInterval),
428
- onChange: (m) => g.setScrollInterval(Number(m)),
413
+ value: String(p.scrollInterval),
414
+ onChange: (h) => p.setScrollInterval(Number(h)),
429
415
  min: 0.1,
430
416
  max: 100,
431
417
  style: {
@@ -435,109 +421,96 @@ const zi = (c) => {
435
421
  }
436
422
  )
437
423
  ] });
438
- }, Ce = "_title_roi3a_1", Se = "_subtitle_roi3a_5", $e = "_header_roi3a_12", qe = "_text_roi3a_13", we = "_productsBlock_roi3a_14", Pe = "_top_roi3a_26", Be = "_itemsBlock_roi3a_35", Te = "_typeTexts_roi3a_41", Me = "_block_roi3a_48", Ae = "_active_roi3a_61", Oe = "_products_roi3a_14", Ee = "_product_roi3a_14", Re = "_button_roi3a_80", De = "_disabled_roi3a_91", ze = "_image_roi3a_95", Le = "_info_roi3a_102", Fe = "_name_roi3a_114", Ue = "_buttons_roi3a_118", Ve = "_modal_roi3a_125", He = "_link_roi3a_145", Ye = "_modalOptions_roi3a_151", We = "_addButton_roi3a_164", Ge = "_deleteButton_roi3a_179", Xe = "_closeIcon_roi3a_191", H = {
439
- title: Ce,
440
- subtitle: Se,
441
- header: $e,
442
- text: qe,
443
- productsBlock: we,
444
- top: Pe,
445
- itemsBlock: Be,
446
- typeTexts: Te,
447
- block: Me,
448
- active: Ae,
449
- products: Oe,
450
- product: Ee,
451
- button: Re,
452
- disabled: De,
453
- image: ze,
454
- info: Le,
455
- name: Fe,
456
- buttons: Ue,
457
- modal: Ve,
458
- link: He,
459
- modalOptions: Ye,
460
- addButton: We,
461
- deleteButton: Ge,
462
- closeIcon: Xe
424
+ }, de = "_title_roi3a_1", ue = "_subtitle_roi3a_5", he = "_productsBlock_roi3a_14", pe = "_top_roi3a_26", me = "_products_roi3a_14", ge = "_product_roi3a_14", fe = "_button_roi3a_80", xe = "_disabled_roi3a_91", _e = "_buttons_roi3a_118", je = "_addButton_roi3a_164", ve = "_deleteButton_roi3a_179", Y = {
425
+ title: de,
426
+ subtitle: ue,
427
+ productsBlock: he,
428
+ top: pe,
429
+ products: me,
430
+ product: ge,
431
+ button: fe,
432
+ disabled: xe,
433
+ buttons: _e,
434
+ addButton: je,
435
+ deleteButton: ve
463
436
  };
464
- function Qe({ product: c, children: i }) {
437
+ function be({ product: o, children: i }) {
465
438
  const {
466
439
  attributes: a,
467
440
  listeners: s,
468
441
  setNodeRef: e,
469
- transform: o,
442
+ transform: c,
470
443
  transition: u,
471
- isDragging: p
472
- } = _t({
473
- id: c.id
474
- }), _ = {
475
- transform: gt.Transform.toString(o),
444
+ isDragging: d
445
+ } = mt({
446
+ id: o.id
447
+ }), g = {
448
+ transform: gt.Transform.toString(c),
476
449
  transition: u
477
450
  };
478
451
  return /* @__PURE__ */ t.jsx(
479
452
  "div",
480
453
  {
481
454
  ref: e,
482
- style: _,
483
- className: `${H.product} ${p ? H.dragging : ""}`,
455
+ style: g,
456
+ className: `${Y.product} ${d ? Y.dragging : ""}`,
484
457
  ...a,
485
458
  ...s,
486
459
  children: i
487
460
  }
488
461
  );
489
462
  }
490
- const Li = (c) => {
463
+ const vn = (o) => {
491
464
  const {
492
465
  isActiveItems: i,
493
466
  setIsActiveItems: a,
494
467
  items: s,
495
468
  setItems: e,
496
- title: o,
469
+ title: c,
497
470
  subtitle: u,
498
- editable: p = !0,
499
- draggable: _ = !1,
500
- deletable: h = !0,
501
- addable: k = !0,
502
- itemsType: y,
471
+ editable: d = !0,
472
+ draggable: g = !1,
473
+ deletable: x = !0,
474
+ addable: $ = !0,
475
+ itemsType: _,
503
476
  itemsOptions: n,
504
- addableOptions: d = {},
505
- limit: r
506
- } = c, [B, g] = f.useState(null), [T, I] = f.useState(null), M = f.useRef(null), x = lt(
507
- dt(ut, {
477
+ addableOptions: l = {},
478
+ limit: m
479
+ } = o, [b, p] = f.useState(null), [P, C] = f.useState(null), O = f.useRef(null), L = rt(
480
+ lt(dt, {
508
481
  activationConstraint: {
509
482
  distance: 5
510
483
  }
511
484
  })
512
485
  );
513
486
  f.useEffect(() => {
514
- if (B) {
515
- const m = [...s].map((j) => j.id === B.id ? B : j);
516
- e(m);
487
+ if (b) {
488
+ const h = [...s].map((S) => S.id === b.id ? b : S);
489
+ e(h);
517
490
  }
518
- }, [B]), f.useEffect(() => {
519
- M.current && T && (M.current.getBoundingClientRect().height, T.top);
520
- }, [M.current, T]);
521
- const R = (m, j) => {
522
- m.stopPropagation();
523
- const S = m.target.getBoundingClientRect();
524
- I({
525
- top: S.top + window.scrollY,
526
- left: S.left - 30
527
- }), g(j);
528
- }, Q = (m) => {
529
- const { active: j, over: S } = m;
530
- if (S && j.id !== S.id) {
531
- const P = s.findIndex((A) => A.id === j.id), $ = s.findIndex((A) => A.id === S.id);
532
- if (P !== -1 && $ !== -1) {
533
- const A = [...s], [v] = A.splice(P, 1);
534
- A.splice($, 0, v), e(A);
491
+ }, [b]), f.useEffect(() => {
492
+ O.current && P && (O.current.getBoundingClientRect().height, P.top);
493
+ }, [O.current, P]);
494
+ const R = (h, S) => {
495
+ h.stopPropagation();
496
+ const k = h.target.getBoundingClientRect();
497
+ C({
498
+ top: k.top + window.scrollY,
499
+ left: k.left - 30
500
+ }), p(S);
501
+ }, y = (h) => {
502
+ const { active: S, over: k } = h;
503
+ if (k && S.id !== k.id) {
504
+ const I = s.findIndex((M) => M.id === S.id), q = s.findIndex((M) => M.id === k.id);
505
+ if (I !== -1 && q !== -1) {
506
+ const M = [...s], [j] = M.splice(I, 1);
507
+ M.splice(q, 0, j), e(M);
535
508
  }
536
509
  }
537
- }, U = (m, j) => {
538
- const S = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
539
- _ && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
540
- b,
510
+ }, z = (h, S) => {
511
+ const k = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
512
+ g && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
513
+ v,
541
514
  {
542
515
  name: "DotsSixVertical",
543
516
  hoverable: !0,
@@ -545,99 +518,99 @@ const Li = (c) => {
545
518
  height: 20
546
519
  }
547
520
  ) }),
548
- y === "select" && n && /* @__PURE__ */ t.jsx(
521
+ _ === "select" && n && /* @__PURE__ */ t.jsx(
549
522
  st,
550
523
  {
551
- onChange: (P) => {
552
- const $ = [...s], A = n.find((O) => O.name === P);
553
- if (!A) return;
554
- const v = $.map((O) => O.id === m.id ? {
555
- ...A,
524
+ onChange: (I) => {
525
+ const q = [...s], M = n.find((A) => A.name === I);
526
+ if (!M) return;
527
+ const j = q.map((A) => A.id === h.id ? {
528
+ ...M,
556
529
  name: {
557
- "en-US": P
530
+ "en-US": I
558
531
  }
559
- } : O);
560
- g({
561
- ...m,
532
+ } : A);
533
+ p({
534
+ ...h,
562
535
  name: {
563
- "en-US": P
536
+ "en-US": I
564
537
  }
565
- }), e([...v]);
538
+ }), e([...j]);
566
539
  },
567
- value: m.name,
568
- options: n.filter((P) => !s.find(($) => $.name === P.name)).map((P) => P.name)
540
+ value: h.name,
541
+ options: n.filter((I) => !s.find((q) => q.name === I.name)).map((I) => I.name)
569
542
  }
570
543
  ),
571
- /* @__PURE__ */ t.jsxs("div", { className: H.buttons, children: [
572
- p && /* @__PURE__ */ t.jsx("div", { className: H.deleteButton, children: /* @__PURE__ */ t.jsx(
573
- b,
544
+ /* @__PURE__ */ t.jsxs("div", { className: Y.buttons, children: [
545
+ d && /* @__PURE__ */ t.jsx("div", { className: Y.deleteButton, children: /* @__PURE__ */ t.jsx(
546
+ v,
574
547
  {
575
548
  name: "Sliders",
576
549
  hoverable: !0,
577
550
  width: 20,
578
551
  height: 20,
579
- onClick: (P) => R(P, m)
552
+ onClick: (I) => R(I, h)
580
553
  }
581
554
  ) }),
582
- h && /* @__PURE__ */ t.jsx("div", { className: H.deleteButton, children: /* @__PURE__ */ t.jsx(
583
- b,
555
+ x && /* @__PURE__ */ t.jsx("div", { className: Y.deleteButton, children: /* @__PURE__ */ t.jsx(
556
+ v,
584
557
  {
585
558
  name: "Trash",
586
559
  hoverable: !0,
587
560
  width: 20,
588
561
  height: 20,
589
562
  fill: "#C12A2A",
590
- onClick: () => e(s.filter((P) => P.id !== m.id))
563
+ onClick: () => e(s.filter((I) => I.id !== h.id))
591
564
  }
592
565
  ) })
593
566
  ] })
594
567
  ] });
595
- return _ ? /* @__PURE__ */ t.jsx(
596
- Qe,
568
+ return g ? /* @__PURE__ */ t.jsx(
569
+ be,
597
570
  {
598
- product: m,
599
- index: j,
600
- children: S
571
+ product: h,
572
+ index: S,
573
+ children: k
601
574
  },
602
- m.id
575
+ h.id
603
576
  ) : /* @__PURE__ */ t.jsx(
604
577
  "div",
605
578
  {
606
- className: H.product,
607
- children: S
579
+ className: Y.product,
580
+ children: k
608
581
  },
609
- m.id
582
+ h.id
610
583
  );
611
584
  };
612
- return /* @__PURE__ */ t.jsxs("div", { className: H.productsBlock, children: [
613
- (o || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: H.top, children: [
614
- o && /* @__PURE__ */ t.jsx("h3", { className: H.title, children: o }),
585
+ return /* @__PURE__ */ t.jsxs("div", { className: Y.productsBlock, children: [
586
+ (c || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: Y.top, children: [
587
+ c && /* @__PURE__ */ t.jsx("h3", { className: Y.title, children: c }),
615
588
  i !== void 0 && /* @__PURE__ */ t.jsx(
616
- ot,
589
+ at,
617
590
  {
618
591
  current: i,
619
- onChange: (m) => a == null ? void 0 : a(m)
592
+ onChange: (h) => a == null ? void 0 : a(h)
620
593
  }
621
594
  )
622
595
  ] }),
623
- /* @__PURE__ */ t.jsxs("div", { className: H.products, children: [
624
- u && /* @__PURE__ */ t.jsx("h5", { className: H.subtitle, children: u }),
625
- _ ? /* @__PURE__ */ t.jsx(
626
- pt,
596
+ /* @__PURE__ */ t.jsxs("div", { className: Y.products, children: [
597
+ u && /* @__PURE__ */ t.jsx("h5", { className: Y.subtitle, children: u }),
598
+ g ? /* @__PURE__ */ t.jsx(
599
+ ut,
627
600
  {
628
- sensors: x,
629
- onDragEnd: Q,
601
+ sensors: L,
602
+ onDragEnd: y,
630
603
  children: /* @__PURE__ */ t.jsx(
631
604
  ht,
632
605
  {
633
- items: s.map((m) => m.id),
634
- strategy: mt,
635
- children: s.map((m, j) => U(m, j))
606
+ items: s.map((h) => h.id),
607
+ strategy: pt,
608
+ children: s.map((h, S) => z(h, S))
636
609
  }
637
610
  )
638
611
  }
639
- ) : s.map((m, j) => U(m, j)),
640
- k && /* @__PURE__ */ t.jsx(
612
+ ) : s.map((h, S) => z(h, S)),
613
+ $ && /* @__PURE__ */ t.jsx(
641
614
  "div",
642
615
  {
643
616
  style: {
@@ -646,37 +619,37 @@ const Li = (c) => {
646
619
  justifyContent: "center"
647
620
  },
648
621
  children: /* @__PURE__ */ t.jsx(
649
- ct,
622
+ ot,
650
623
  {
651
624
  withoutHover: !0,
652
- className: F(H.button, {
653
- [H.disabled]: !!(r && r <= s.length || s.length === (n == null ? void 0 : n.length))
625
+ className: U(Y.button, {
626
+ [Y.disabled]: !!(m && m <= s.length || s.length === (n == null ? void 0 : n.length))
654
627
  }),
655
628
  size: "s",
656
- disabled: !!(r && r <= s.length || s.length === (n == null ? void 0 : n.length)),
629
+ disabled: !!(m && m <= s.length || s.length === (n == null ? void 0 : n.length)),
657
630
  onClick: () => {
658
- const m = [...s];
659
- let j = null;
631
+ const h = [...s];
632
+ let S = null;
660
633
  if (n) {
661
- for (let S = 0; S < n.length; S++)
662
- if (!s.find((P) => P.id === n[S].id)) {
663
- j = n[S];
634
+ for (let k = 0; k < n.length; k++)
635
+ if (!s.find((I) => I.id === n[k].id)) {
636
+ S = n[k];
664
637
  break;
665
638
  }
666
639
  }
667
- y === "select" && n && m.push({
668
- name: j ? j.name : n[0].name,
669
- id: (j == null ? void 0 : j.id) || n[0].id,
670
- ...d
671
- }), e(m);
640
+ _ === "select" && n && h.push({
641
+ name: S ? S.name : n[0].name,
642
+ id: (S == null ? void 0 : S.id) || n[0].id,
643
+ ...l
644
+ }), e(h);
672
645
  },
673
646
  style: {
674
647
  width: "fit-content"
675
648
  },
676
- children: /* @__PURE__ */ t.jsxs("div", { className: H.addButton, children: [
649
+ children: /* @__PURE__ */ t.jsxs("div", { className: Y.addButton, children: [
677
650
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
678
651
  /* @__PURE__ */ t.jsx(
679
- b,
652
+ v,
680
653
  {
681
654
  name: "Plus",
682
655
  width: 16,
@@ -691,99 +664,99 @@ const Li = (c) => {
691
664
  ] })
692
665
  ] });
693
666
  };
694
- function Je(c) {
695
- const { product: i, children: a } = c, { attributes: s, listeners: e, setNodeRef: o, transform: u, transition: p, isDragging: _ } = _t({
667
+ function ye(o) {
668
+ const { product: i, children: a } = o, { attributes: s, listeners: e, setNodeRef: c, transform: u, transition: d, isDragging: g } = mt({
696
669
  id: i.id
697
- }), h = {
670
+ }), x = {
698
671
  transform: gt.Transform.toString(u),
699
- transition: p
672
+ transition: d
700
673
  };
701
674
  return /* @__PURE__ */ t.jsx(
702
675
  "div",
703
676
  {
704
- ref: o,
705
- style: h,
706
- className: `${V.product} ${_ ? V.dragging : ""}`,
677
+ ref: c,
678
+ style: x,
679
+ className: `${V.product} ${g ? V.dragging : ""}`,
707
680
  ...s,
708
681
  ...e,
709
682
  children: a
710
683
  }
711
684
  );
712
685
  }
713
- const Fi = (c) => {
686
+ const bn = (o) => {
714
687
  const {
715
688
  isActiveItems: i,
716
689
  setIsActiveItems: a,
717
690
  items: s,
718
691
  setItems: e,
719
- other: o,
692
+ other: c,
720
693
  title: u,
721
- subtitle: p,
722
- editable: _ = !0,
723
- draggable: h = !1,
724
- deletable: k = !0,
725
- addable: y = !0,
694
+ subtitle: d,
695
+ editable: g = !0,
696
+ draggable: x = !1,
697
+ deletable: $ = !0,
698
+ addable: _ = !0,
726
699
  itemsType: n,
727
- itemsPlaceholder: d = "",
728
- itemsOptions: r,
729
- hasRangeSelector: B = !1,
730
- rangeSelectorOptions: g,
731
- modalOptions: T,
732
- addableOptions: I = {},
733
- limit: M
734
- } = c, [x, R] = f.useState(null), [Q, U] = f.useState({
700
+ itemsPlaceholder: l = "",
701
+ itemsOptions: m,
702
+ hasRangeSelector: b = !1,
703
+ rangeSelectorOptions: p,
704
+ modalOptions: P,
705
+ addableOptions: C = {},
706
+ limit: O
707
+ } = o, [L, R] = f.useState(null), [y, z] = f.useState({
735
708
  top: 0,
736
709
  left: 0
737
- }), [m, j] = f.useState(null), S = f.useRef(null), [P, $] = f.useState(!1), A = lt(
738
- dt(ut, {
710
+ }), [h, S] = f.useState(null), k = f.useRef(null), [I, q] = f.useState(!1), M = rt(
711
+ lt(dt, {
739
712
  activationConstraint: {
740
713
  distance: 5
741
714
  }
742
715
  })
743
716
  );
744
717
  f.useEffect(() => {
745
- const l = () => {
746
- R(null), $(!1);
718
+ const r = () => {
719
+ R(null), q(!1);
747
720
  };
748
- return document.body.addEventListener("click", l), R(null), $(!1), () => {
749
- R(null), $(!1), document.body.removeEventListener("click", l);
721
+ return document.body.addEventListener("click", r), R(null), q(!1), () => {
722
+ R(null), q(!1), document.body.removeEventListener("click", r);
750
723
  };
751
724
  }, []), f.useEffect(() => {
752
- if (x) {
753
- const l = [...s].map((w) => w.id === x.id ? x : w);
754
- e(l);
725
+ if (L) {
726
+ const r = [...s].map((T) => T.id === L.id ? L : T);
727
+ e(r);
755
728
  }
756
- }, [x]), f.useEffect(() => {
757
- if (S.current && m) {
758
- const l = S.current.getBoundingClientRect().height, w = window.innerHeight;
759
- let N = m.top;
760
- N + l > w + window.scrollY - 200 && (N = w + window.scrollY - l - 200), N < 0 && (N = 10), U({
729
+ }, [L]), f.useEffect(() => {
730
+ if (k.current && h) {
731
+ const r = k.current.getBoundingClientRect().height, T = window.innerHeight;
732
+ let N = h.top;
733
+ N + r > T + window.scrollY - 200 && (N = T + window.scrollY - r - 200), N < 0 && (N = 10), z({
761
734
  top: N,
762
- left: m.left
735
+ left: h.left
763
736
  });
764
737
  }
765
- }, [S.current, m]);
766
- const v = (l, w) => {
767
- l.stopPropagation();
768
- const N = l.target.getBoundingClientRect();
769
- j({
738
+ }, [k.current, h]);
739
+ const j = (r, T) => {
740
+ r.stopPropagation();
741
+ const N = r.target.getBoundingClientRect();
742
+ S({
770
743
  top: N.top + window.scrollY,
771
744
  left: N.left - 30
772
- }), R(w), $(!0);
773
- }, O = (l) => {
774
- const { active: w, over: N } = l;
775
- if (N && w.id !== N.id) {
776
- const E = s.findIndex((D) => D.id === w.id), K = s.findIndex((D) => D.id === N.id);
777
- if (E !== -1 && K !== -1) {
745
+ }), R(T), q(!0);
746
+ }, A = (r) => {
747
+ const { active: T, over: N } = r;
748
+ if (N && T.id !== N.id) {
749
+ const E = s.findIndex((D) => D.id === T.id), Z = s.findIndex((D) => D.id === N.id);
750
+ if (E !== -1 && Z !== -1) {
778
751
  const D = [...s], [J] = D.splice(E, 1);
779
- D.splice(K, 0, J), e(D);
752
+ D.splice(Z, 0, J), e(D);
780
753
  }
781
754
  }
782
- }, L = (l) => {
755
+ }, H = (r) => {
783
756
  var N;
784
- const w = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
785
- h && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
786
- b,
757
+ const T = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
758
+ x && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
759
+ v,
787
760
  {
788
761
  name: "DotsSixVertical",
789
762
  hoverable: !0,
@@ -791,139 +764,139 @@ const Fi = (c) => {
791
764
  height: 20
792
765
  }
793
766
  ) }),
794
- n === "select" && r && /* @__PURE__ */ t.jsx(
767
+ n === "select" && m && /* @__PURE__ */ t.jsx(
795
768
  st,
796
769
  {
797
770
  onChange: (E) => {
798
- const D = [...s].map((J) => J.id === l.id ? {
799
- ...l,
771
+ const D = [...s].map((J) => J.id === r.id ? {
772
+ ...r,
800
773
  name: {
801
774
  "en-US": E
802
775
  }
803
776
  } : J);
804
777
  R({
805
- ...l,
778
+ ...r,
806
779
  name: {
807
780
  "en-US": E
808
781
  }
809
782
  }), e([...D]);
810
783
  },
811
- value: l.name["en-US"],
812
- options: r.filter(
813
- (E) => !s.find((K) => K.name["en-US"] === E)
784
+ value: r.name["en-US"],
785
+ options: m.filter(
786
+ (E) => !s.find((Z) => Z.name["en-US"] === E)
814
787
  )
815
788
  }
816
789
  ),
817
790
  n === "input" && /* @__PURE__ */ t.jsx(
818
- bt,
791
+ vt,
819
792
  {
820
793
  onChange: (E) => {
821
- const D = [...s].map((J) => J.id === l.id ? {
822
- ...l,
794
+ const D = [...s].map((J) => J.id === r.id ? {
795
+ ...r,
823
796
  name: {
824
797
  "en-US": E
825
798
  }
826
799
  } : J);
827
800
  e([...D]);
828
801
  },
829
- value: l.name["en-US"],
830
- placeholder: d
802
+ value: r.name["en-US"],
803
+ placeholder: l
831
804
  }
832
805
  ),
833
806
  n === "image" && /* @__PURE__ */ t.jsx(
834
807
  Tt,
835
808
  {
836
809
  onChange: (E) => {
837
- const D = [...s].map((J) => J.id === l.id ? {
838
- ...l,
810
+ const D = [...s].map((J) => J.id === r.id ? {
811
+ ...r,
839
812
  images: E
840
813
  } : J);
841
814
  e([...D]);
842
815
  },
843
- activeImage: (N = s.find((E) => E.id === l.id)) == null ? void 0 : N.images[0]
816
+ activeImage: (N = s.find((E) => E.id === r.id)) == null ? void 0 : N.images[0]
844
817
  }
845
818
  ),
846
819
  /* @__PURE__ */ t.jsxs("div", { className: V.buttons, children: [
847
- _ && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
848
- b,
820
+ g && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
821
+ v,
849
822
  {
850
823
  name: "Sliders",
851
824
  hoverable: !0,
852
825
  width: 20,
853
826
  height: 20,
854
- onClick: (E) => v(E, l)
827
+ onClick: (E) => j(E, r)
855
828
  }
856
829
  ) }),
857
- k && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
858
- b,
830
+ $ && /* @__PURE__ */ t.jsx("div", { className: V.deleteButton, children: /* @__PURE__ */ t.jsx(
831
+ v,
859
832
  {
860
833
  name: "Trash",
861
834
  hoverable: !0,
862
835
  width: 20,
863
836
  height: 20,
864
837
  fill: "#C12A2A",
865
- onClick: () => e(s.filter((E) => E.id !== l.id))
838
+ onClick: () => e(s.filter((E) => E.id !== r.id))
866
839
  }
867
840
  ) })
868
841
  ] })
869
842
  ] });
870
- return h ? /* @__PURE__ */ t.jsx(
871
- Je,
843
+ return x ? /* @__PURE__ */ t.jsx(
844
+ ye,
872
845
  {
873
- product: l,
874
- children: w
846
+ product: r,
847
+ children: T
875
848
  },
876
- l.id
849
+ r.id
877
850
  ) : /* @__PURE__ */ t.jsx(
878
851
  "div",
879
852
  {
880
853
  className: V.product,
881
- children: w
854
+ children: T
882
855
  },
883
- l.id
856
+ r.id
884
857
  );
885
858
  };
886
859
  return /* @__PURE__ */ t.jsxs("div", { className: V.productsBlock, children: [
887
860
  (u || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: V.top, children: [
888
861
  u && /* @__PURE__ */ t.jsx("h3", { className: V.title, children: u }),
889
862
  i !== void 0 && /* @__PURE__ */ t.jsx(
890
- ot,
863
+ at,
891
864
  {
892
865
  current: i,
893
- onChange: (l) => a == null ? void 0 : a(l)
866
+ onChange: (r) => a == null ? void 0 : a(r)
894
867
  }
895
868
  )
896
869
  ] }),
897
- x && _ && T && P && /* @__PURE__ */ t.jsx(
870
+ L && g && P && I && /* @__PURE__ */ t.jsx(
898
871
  Bt,
899
872
  {
900
- ref: S,
901
- activeItem: x,
873
+ ref: k,
874
+ activeItem: L,
902
875
  setActiveItem: R,
903
- popupPosition: Q,
904
- modalOptions: T,
905
- setIsOpenModal: $
876
+ popupPosition: y,
877
+ modalOptions: P,
878
+ setIsOpenModal: q
906
879
  }
907
880
  ),
908
- B && g && /* @__PURE__ */ t.jsx(kt, { ...g }),
881
+ b && p && /* @__PURE__ */ t.jsx(Ct, { ...p }),
909
882
  /* @__PURE__ */ t.jsxs("div", { className: V.products, children: [
910
- p && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: p }),
911
- h ? /* @__PURE__ */ t.jsx(
912
- pt,
883
+ d && /* @__PURE__ */ t.jsx("h5", { className: V.subtitle, children: d }),
884
+ x ? /* @__PURE__ */ t.jsx(
885
+ ut,
913
886
  {
914
- sensors: A,
915
- onDragEnd: O,
887
+ sensors: M,
888
+ onDragEnd: A,
916
889
  children: /* @__PURE__ */ t.jsx(
917
890
  ht,
918
891
  {
919
- items: s.map((l) => l.id),
920
- strategy: mt,
921
- children: s.map((l) => L(l))
892
+ items: s.map((r) => r.id),
893
+ strategy: pt,
894
+ children: s.map((r) => H(r))
922
895
  }
923
896
  )
924
897
  }
925
- ) : s.map((l) => L(l)),
926
- y && /* @__PURE__ */ t.jsx(
898
+ ) : s.map((r) => H(r)),
899
+ _ && /* @__PURE__ */ t.jsx(
927
900
  "div",
928
901
  {
929
902
  style: {
@@ -932,47 +905,47 @@ const Fi = (c) => {
932
905
  justifyContent: "center"
933
906
  },
934
907
  children: /* @__PURE__ */ t.jsx(
935
- ct,
908
+ ot,
936
909
  {
937
910
  withoutHover: !0,
938
- className: F(V.button, {
939
- [V.disabled]: !!(M && M <= s.length)
911
+ className: U(V.button, {
912
+ [V.disabled]: !!(O && O <= s.length)
940
913
  }),
941
914
  size: "s",
942
- disabled: !!(M && M <= s.length),
915
+ disabled: !!(O && O <= s.length),
943
916
  onClick: () => {
944
- const l = [...s];
945
- let w = null;
946
- if (r) {
947
- for (let N = 0; N < r.length; N++)
948
- if (!s.find((E) => E.name["en-US"] === r[N])) {
949
- w = r[N];
917
+ const r = [...s];
918
+ let T = null;
919
+ if (m) {
920
+ for (let N = 0; N < m.length; N++)
921
+ if (!s.find((E) => E.name["en-US"] === m[N])) {
922
+ T = m[N];
950
923
  break;
951
924
  }
952
925
  }
953
- n === "select" && r ? l.push({
926
+ n === "select" && m ? r.push({
954
927
  name: {
955
- "en-US": w || r[0]
928
+ "en-US": T || m[0]
956
929
  },
957
- id: et(),
958
- ...I,
930
+ id: K(),
931
+ ...C,
959
932
  maxSymbols: 100
960
933
  // пример значения
961
- }) : n === "input" ? l.push({
934
+ }) : n === "input" ? r.push({
962
935
  name: {
963
936
  "en-US": ""
964
937
  },
965
- id: et(),
966
- ...I,
938
+ id: K(),
939
+ ...C,
967
940
  maxSymbols: 100
968
- }) : l.push({
941
+ }) : r.push({
969
942
  name: {
970
943
  "en-US": `Image ${s.length + 1}`
971
944
  },
972
- id: et(),
973
- ...I,
945
+ id: K(),
946
+ ...C,
974
947
  maxSymbols: 100
975
- }), e(l);
948
+ }), e(r);
976
949
  },
977
950
  style: {
978
951
  width: "fit-content"
@@ -980,7 +953,7 @@ const Fi = (c) => {
980
953
  children: /* @__PURE__ */ t.jsxs("div", { className: V.addButton, children: [
981
954
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
982
955
  /* @__PURE__ */ t.jsx(
983
- b,
956
+ v,
984
957
  {
985
958
  name: "Plus",
986
959
  width: 16,
@@ -993,126 +966,111 @@ const Fi = (c) => {
993
966
  }
994
967
  )
995
968
  ] }),
996
- o !== void 0 && /* @__PURE__ */ t.jsx(
997
- rt,
969
+ c !== void 0 && /* @__PURE__ */ t.jsx(
970
+ ct,
998
971
  {
999
972
  otherTitle: "Other",
1000
- items: o
973
+ items: c
1001
974
  }
1002
975
  )
1003
976
  ] });
1004
- }, Ke = "_subtitle_jql1y_1", Ze = "_header_jql1y_8", ts = "_text_jql1y_9", es = "_productsBlock_jql1y_10", ss = "_buttonsBlock_jql1y_11", ns = "_top_jql1y_23", is = "_itemsBlock_jql1y_32", as = "_typeTexts_jql1y_38", os = "_block_jql1y_45", cs = "_active_jql1y_58", rs = "_products_jql1y_10", ls = "_product_jql1y_10", ds = "_button_jql1y_11", us = "_image_jql1y_88", ps = "_info_jql1y_95", hs = "_name_jql1y_107", ms = "_buttons_jql1y_11", _s = "_modal_jql1y_118", gs = "_other_jql1y_138", fs = "_options_jql1y_144", xs = "_addButton_jql1y_150", js = "_deleteButton_jql1y_165", Z = {
1005
- subtitle: Ke,
1006
- header: Ze,
1007
- text: ts,
1008
- productsBlock: es,
1009
- buttonsBlock: ss,
1010
- top: ns,
1011
- itemsBlock: is,
1012
- typeTexts: as,
1013
- block: os,
1014
- active: cs,
1015
- products: rs,
1016
- product: ls,
1017
- button: ds,
1018
- image: us,
1019
- info: ps,
1020
- name: hs,
1021
- buttons: ms,
1022
- modal: _s,
1023
- other: gs,
1024
- options: fs,
1025
- addButton: xs,
1026
- deleteButton: js
1027
- }, vs = (c) => {
1028
- const { buttons: i, setButtons: a, deletable: s = !0, addable: e = !0, editableLink: o = !0 } = c, { pages: u } = ft(), [p, _] = f.useState(null), [h, k] = f.useState({
977
+ }, Ie = "_subtitle_jql1y_1", Ne = "_products_jql1y_10", Ce = "_product_jql1y_10", Se = "_button_jql1y_11", ke = "_buttons_jql1y_11", we = "_addButton_jql1y_150", Pe = "_deleteButton_jql1y_165", tt = {
978
+ subtitle: Ie,
979
+ products: Ne,
980
+ product: Ce,
981
+ button: Se,
982
+ buttons: ke,
983
+ addButton: we,
984
+ deleteButton: Pe
985
+ }, qe = (o) => {
986
+ const { buttons: i, setButtons: a, deletable: s = !0, addable: e = !0, editableLink: c = !0 } = o, { pages: u } = ft(), [d, g] = f.useState(null), [x, $] = f.useState({
1029
987
  top: 0,
1030
988
  left: 0
1031
- }), [y, n] = f.useState(null), d = f.useRef(null);
989
+ }), [_, n] = f.useState(null), l = f.useRef(null);
1032
990
  f.useEffect(() => {
1033
- if (p) {
1034
- const g = [...i].map((T) => T.id === p.id ? p : T);
1035
- a(g);
991
+ if (d) {
992
+ const p = [...i].map((P) => P.id === d.id ? d : P);
993
+ a(p);
1036
994
  }
1037
- }, [p]), f.useEffect(() => {
1038
- if (d.current && y) {
1039
- const g = d.current.getBoundingClientRect().height, T = window.innerHeight;
1040
- let I = y.top;
1041
- I + g > T + window.scrollY - 200 && (I = T + window.scrollY - g - 200), I < 0 && (I = 10), k({
1042
- top: I,
1043
- left: y.left
995
+ }, [d]), f.useEffect(() => {
996
+ if (l.current && _) {
997
+ const p = l.current.getBoundingClientRect().height, P = window.innerHeight;
998
+ let C = _.top;
999
+ C + p > P + window.scrollY - 200 && (C = P + window.scrollY - p - 200), C < 0 && (C = 10), $({
1000
+ top: C,
1001
+ left: _.left
1044
1002
  });
1045
1003
  }
1046
- }, [d.current, y]);
1047
- const r = (g, T) => {
1048
- g.stopPropagation();
1049
- const I = g.target.getBoundingClientRect();
1004
+ }, [l.current, _]);
1005
+ const m = (p, P) => {
1006
+ p.stopPropagation();
1007
+ const C = p.target.getBoundingClientRect();
1050
1008
  n({
1051
- top: I.top + window.scrollY - 70,
1052
- left: I.left - (e ? 30 : 65)
1053
- }), _(T);
1054
- }, B = (g, T) => {
1055
- const I = [...i], M = {
1056
- ...g,
1009
+ top: C.top + window.scrollY - 70,
1010
+ left: C.left - (e ? 30 : 65)
1011
+ }), g(P);
1012
+ }, b = (p, P) => {
1013
+ const C = [...i], O = {
1014
+ ...p,
1057
1015
  id: Math.random().toString(36).substr(2, 9)
1058
1016
  // Генерируем новый уникальный ID
1059
1017
  };
1060
- I.splice(T + 1, 0, M), a(I);
1018
+ C.splice(P + 1, 0, O), a(C);
1061
1019
  };
1062
- return /* @__PURE__ */ t.jsxs("div", { className: Z.products, children: [
1063
- /* @__PURE__ */ t.jsx("h5", { className: Z.subtitle, children: "Button Type" }),
1064
- i.map((g, T) => /* @__PURE__ */ t.jsxs(
1020
+ return /* @__PURE__ */ t.jsxs("div", { className: tt.products, children: [
1021
+ /* @__PURE__ */ t.jsx("h5", { className: tt.subtitle, children: "Button Type" }),
1022
+ i.map((p, P) => /* @__PURE__ */ t.jsxs(
1065
1023
  "div",
1066
1024
  {
1067
- className: Z.product,
1025
+ className: tt.product,
1068
1026
  children: [
1069
1027
  /* @__PURE__ */ t.jsx(
1070
1028
  st,
1071
1029
  {
1072
- onChange: (I) => {
1073
- const x = [...i].map((R) => R.id === g.id ? {
1074
- ...g,
1075
- type: I
1030
+ onChange: (C) => {
1031
+ const L = [...i].map((R) => R.id === p.id ? {
1032
+ ...p,
1033
+ type: C
1076
1034
  } : R);
1077
- a(x);
1035
+ a(L);
1078
1036
  },
1079
- value: g.type,
1037
+ value: p.type,
1080
1038
  options: ["Primary", "Secondary", "Tertiary"]
1081
1039
  }
1082
1040
  ),
1083
- /* @__PURE__ */ t.jsxs("div", { className: Z.buttons, children: [
1084
- /* @__PURE__ */ t.jsx("div", { className: Z.deleteButton, children: /* @__PURE__ */ t.jsx(
1085
- b,
1041
+ /* @__PURE__ */ t.jsxs("div", { className: tt.buttons, children: [
1042
+ /* @__PURE__ */ t.jsx("div", { className: tt.deleteButton, children: /* @__PURE__ */ t.jsx(
1043
+ v,
1086
1044
  {
1087
1045
  name: "Copy",
1088
1046
  hoverable: !0,
1089
1047
  width: 20,
1090
1048
  height: 20,
1091
1049
  onClick: () => {
1092
- B(g, T);
1050
+ b(p, P);
1093
1051
  }
1094
1052
  }
1095
1053
  ) }),
1096
- /* @__PURE__ */ t.jsx("div", { className: Z.deleteButton, children: /* @__PURE__ */ t.jsx(
1097
- b,
1054
+ /* @__PURE__ */ t.jsx("div", { className: tt.deleteButton, children: /* @__PURE__ */ t.jsx(
1055
+ v,
1098
1056
  {
1099
1057
  name: "Sliders",
1100
1058
  hoverable: !0,
1101
1059
  width: 20,
1102
1060
  height: 20,
1103
- onClick: (I) => {
1104
- r(I, g);
1061
+ onClick: (C) => {
1062
+ m(C, p);
1105
1063
  }
1106
1064
  }
1107
1065
  ) }),
1108
- s && /* @__PURE__ */ t.jsx("div", { className: Z.deleteButton, children: /* @__PURE__ */ t.jsx(
1109
- b,
1066
+ s && /* @__PURE__ */ t.jsx("div", { className: tt.deleteButton, children: /* @__PURE__ */ t.jsx(
1067
+ v,
1110
1068
  {
1111
1069
  name: "Trash",
1112
1070
  hoverable: !0,
1113
1071
  onClick: () => {
1114
- const I = i.filter((M) => M.id !== g.id);
1115
- a(I);
1072
+ const C = i.filter((O) => O.id !== p.id);
1073
+ a(C);
1116
1074
  },
1117
1075
  width: 20,
1118
1076
  height: 20,
@@ -1122,16 +1080,16 @@ const Fi = (c) => {
1122
1080
  ] })
1123
1081
  ]
1124
1082
  },
1125
- g.id
1083
+ p.id
1126
1084
  )),
1127
- p && /* @__PURE__ */ t.jsx(
1128
- Mt,
1085
+ d && /* @__PURE__ */ t.jsx(
1086
+ $t,
1129
1087
  {
1130
- ref: d,
1131
- activeButton: p,
1132
- setActiveButton: _,
1133
- popupPosition: h,
1134
- editableLink: o
1088
+ ref: l,
1089
+ activeButton: d,
1090
+ setActiveButton: g,
1091
+ popupPosition: x,
1092
+ editableLink: c
1135
1093
  }
1136
1094
  ),
1137
1095
  e && /* @__PURE__ */ t.jsx(
@@ -1143,16 +1101,16 @@ const Fi = (c) => {
1143
1101
  justifyContent: "center"
1144
1102
  },
1145
1103
  children: /* @__PURE__ */ t.jsx(
1146
- ct,
1104
+ ot,
1147
1105
  {
1148
1106
  withoutHover: !0,
1149
- className: Z.button,
1107
+ className: tt.button,
1150
1108
  size: "s",
1151
1109
  onClick: () => {
1152
- const g = [...i];
1153
- o ? g.push({
1110
+ const p = [...i];
1111
+ c ? p.push({
1154
1112
  type: "Primary",
1155
- id: et(),
1113
+ id: K(),
1156
1114
  typesText: [],
1157
1115
  text: {
1158
1116
  "en-US": "Button Name"
@@ -1160,9 +1118,9 @@ const Fi = (c) => {
1160
1118
  destination: "Go to Page",
1161
1119
  page: u ? Object.values(u)[0].path : "/",
1162
1120
  openInNewTab: !1
1163
- }) : g.push({
1121
+ }) : p.push({
1164
1122
  type: "Primary",
1165
- id: et(),
1123
+ id: K(),
1166
1124
  typesText: [],
1167
1125
  text: {
1168
1126
  "en-US": "Create Ticket"
@@ -1170,15 +1128,15 @@ const Fi = (c) => {
1170
1128
  destination: "Go to Page",
1171
1129
  page: u ? Object.values(u)[0].path : "/",
1172
1130
  openInNewTab: !1
1173
- }), a(g);
1131
+ }), a(p);
1174
1132
  },
1175
1133
  style: {
1176
1134
  width: "fit-content"
1177
1135
  },
1178
- children: /* @__PURE__ */ t.jsxs("div", { className: Z.addButton, children: [
1136
+ children: /* @__PURE__ */ t.jsxs("div", { className: tt.addButton, children: [
1179
1137
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
1180
1138
  /* @__PURE__ */ t.jsx(
1181
- b,
1139
+ v,
1182
1140
  {
1183
1141
  name: "Plus",
1184
1142
  width: 16,
@@ -1191,123 +1149,123 @@ const Fi = (c) => {
1191
1149
  }
1192
1150
  )
1193
1151
  ] });
1194
- }, Ui = (c) => {
1152
+ }, yn = (o) => {
1195
1153
  const {
1196
1154
  isActiveButtons: i,
1197
1155
  setIsActiveButtons: a,
1198
1156
  buttons: s,
1199
1157
  setButtons: e,
1200
- editableLink: o = !0,
1158
+ editableLink: c = !0,
1201
1159
  addable: u = !0,
1202
- deletable: p = !0
1203
- } = c;
1204
- return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: jt.buttonsBlock, children: [
1205
- /* @__PURE__ */ t.jsxs("div", { className: jt.top, children: [
1206
- /* @__PURE__ */ t.jsx("h3", { className: jt.title, children: "Buttons" }),
1160
+ deletable: d = !0
1161
+ } = o;
1162
+ return /* @__PURE__ */ t.jsx(t.Fragment, { children: /* @__PURE__ */ t.jsxs("div", { className: _t.buttonsBlock, children: [
1163
+ /* @__PURE__ */ t.jsxs("div", { className: _t.top, children: [
1164
+ /* @__PURE__ */ t.jsx("h3", { className: _t.title, children: "Buttons" }),
1207
1165
  /* @__PURE__ */ t.jsx(
1208
- ot,
1166
+ at,
1209
1167
  {
1210
1168
  current: i,
1211
- onChange: (_) => a(_)
1169
+ onChange: (g) => a(g)
1212
1170
  }
1213
1171
  )
1214
1172
  ] }),
1215
1173
  i && /* @__PURE__ */ t.jsx(
1216
- vs,
1174
+ qe,
1217
1175
  {
1218
1176
  buttons: s,
1219
1177
  setButtons: e,
1220
- editableLink: o,
1178
+ editableLink: c,
1221
1179
  addable: u,
1222
- deletable: p
1180
+ deletable: d
1223
1181
  }
1224
1182
  )
1225
1183
  ] }) });
1226
1184
  };
1227
- function bs(c) {
1228
- const { product: i, children: a } = c, { attributes: s, listeners: e, setNodeRef: o, transform: u, transition: p, isDragging: _ } = _t({
1185
+ function Be(o) {
1186
+ const { product: i, children: a } = o, { attributes: s, listeners: e, setNodeRef: c, transform: u, transition: d, isDragging: g } = mt({
1229
1187
  id: String(i.listingId)
1230
- }), h = {
1188
+ }), x = {
1231
1189
  transform: gt.Transform.toString(u),
1232
- transition: p
1190
+ transition: d
1233
1191
  };
1234
1192
  return /* @__PURE__ */ t.jsx(
1235
1193
  "div",
1236
1194
  {
1237
- ref: o,
1238
- style: h,
1239
- className: `${G.product} ${_ ? G.dragging : ""}`,
1195
+ ref: c,
1196
+ style: x,
1197
+ className: `${X.product} ${g ? X.dragging : ""}`,
1240
1198
  ...s,
1241
1199
  ...e,
1242
1200
  children: a
1243
1201
  }
1244
1202
  );
1245
1203
  }
1246
- const Vi = (c) => {
1204
+ const In = (o) => {
1247
1205
  const {
1248
1206
  isActiveItems: i,
1249
1207
  setIsActiveItems: a,
1250
1208
  items: s,
1251
1209
  setItems: e,
1252
- other: o,
1210
+ other: c,
1253
1211
  title: u,
1254
- subtitle: p,
1255
- editable: _ = !0,
1256
- draggable: h = !1,
1257
- withImage: k = !1,
1258
- deletable: y = !0,
1212
+ subtitle: d,
1213
+ editable: g = !0,
1214
+ draggable: x = !1,
1215
+ withImage: $ = !1,
1216
+ deletable: _ = !0,
1259
1217
  addable: n = !0,
1260
- itemsType: d,
1261
- itemsOptions: r,
1262
- limit: B,
1263
- aspectRatio: g,
1264
- setAspectRatio: T
1265
- } = c, [I, M] = f.useState(
1218
+ itemsType: l,
1219
+ itemsOptions: m,
1220
+ limit: b,
1221
+ aspectRatio: p,
1222
+ setAspectRatio: P
1223
+ } = o, [C, O] = f.useState(
1266
1224
  null
1267
- ), [x, R] = f.useState({
1225
+ ), [L, R] = f.useState({
1268
1226
  top: 0,
1269
1227
  left: 0
1270
- }), [Q, U] = f.useState(!1), m = lt(
1271
- dt(ut, {
1228
+ }), [y, z] = f.useState(!1), h = rt(
1229
+ lt(dt, {
1272
1230
  activationConstraint: {
1273
1231
  distance: 5
1274
1232
  }
1275
1233
  })
1276
1234
  );
1277
1235
  f.useEffect(() => {
1278
- const v = () => {
1279
- M(null), U(!1);
1236
+ const j = () => {
1237
+ O(null), z(!1);
1280
1238
  };
1281
- return document.body.addEventListener("click", v), M(null), U(!1), () => {
1282
- M(null), U(!1), document.body.removeEventListener("click", v);
1239
+ return document.body.addEventListener("click", j), O(null), z(!1), () => {
1240
+ O(null), z(!1), document.body.removeEventListener("click", j);
1283
1241
  };
1284
1242
  }, []), f.useEffect(() => {
1285
- if (I) {
1286
- const v = [...s].map((O) => O.listingId === I.listingId ? I : O);
1287
- e(v);
1243
+ if (C) {
1244
+ const j = [...s].map((A) => A.listingId === C.listingId ? C : A);
1245
+ e(j);
1288
1246
  }
1289
- }, [I]);
1290
- const j = (v, O) => {
1291
- v.stopPropagation();
1292
- const L = v.target.getBoundingClientRect(), l = 100, w = window.innerHeight;
1293
- let N = L.top + window.scrollY;
1294
- N + l > w && (N = w - l - 20), U(!0), R({
1247
+ }, [C]);
1248
+ const S = (j, A) => {
1249
+ j.stopPropagation();
1250
+ const H = j.target.getBoundingClientRect(), r = 100, T = window.innerHeight;
1251
+ let N = H.top + window.scrollY;
1252
+ N + r > T && (N = T - r - 20), z(!0), R({
1295
1253
  top: N - 80,
1296
- left: L.left - 30
1297
- }), M(O);
1254
+ left: H.left - 30
1255
+ }), O(A);
1298
1256
  };
1299
- function S(v) {
1300
- if (k)
1301
- return v ? /* @__PURE__ */ t.jsx(
1257
+ function k(j) {
1258
+ if ($)
1259
+ return j ? /* @__PURE__ */ t.jsx(
1302
1260
  "img",
1303
1261
  {
1304
- src: `https://imagedelivery.net/${v}/w=1000`,
1262
+ src: `https://imagedelivery.net/${j}/w=1000`,
1305
1263
  alt: "image",
1306
1264
  width: 16,
1307
1265
  height: 16
1308
1266
  }
1309
1267
  ) : /* @__PURE__ */ t.jsx(
1310
- b,
1268
+ v,
1311
1269
  {
1312
1270
  name: "Image",
1313
1271
  width: 16,
@@ -1316,21 +1274,21 @@ const Vi = (c) => {
1316
1274
  }
1317
1275
  );
1318
1276
  }
1319
- const P = (v) => {
1320
- const { active: O, over: L } = v;
1321
- if (L && O.id !== L.id) {
1322
- const l = s.findIndex((N) => String(N.listingId) === O.id), w = s.findIndex((N) => String(N.listingId) === L.id);
1323
- if (l !== -1 && w !== -1) {
1324
- const N = [...s], [E] = N.splice(l, 1);
1325
- N.splice(w, 0, E), e(N);
1277
+ const I = (j) => {
1278
+ const { active: A, over: H } = j;
1279
+ if (H && A.id !== H.id) {
1280
+ const r = s.findIndex((N) => String(N.listingId) === A.id), T = s.findIndex((N) => String(N.listingId) === H.id);
1281
+ if (r !== -1 && T !== -1) {
1282
+ const N = [...s], [E] = N.splice(r, 1);
1283
+ N.splice(T, 0, E), e(N);
1326
1284
  }
1327
1285
  }
1328
- }, $ = (v) => {
1329
- const O = r.find((l) => v.listingId === l.id);
1330
- if (!O) return null;
1331
- const L = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1332
- h && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1333
- b,
1286
+ }, q = (j) => {
1287
+ const A = m.find((r) => j.listingId === r.id);
1288
+ if (!A) return null;
1289
+ const H = /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1290
+ x && /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1291
+ v,
1334
1292
  {
1335
1293
  name: "DotsSixVertical",
1336
1294
  hoverable: !0,
@@ -1338,110 +1296,110 @@ const Vi = (c) => {
1338
1296
  height: 20
1339
1297
  }
1340
1298
  ) }),
1341
- d === "select" && /* @__PURE__ */ t.jsx(
1299
+ l === "select" && /* @__PURE__ */ t.jsx(
1342
1300
  st,
1343
1301
  {
1344
- onChange: (l) => {
1345
- const w = [...s], N = r.find((D) => D.productData.name === l);
1302
+ onChange: (r) => {
1303
+ const T = [...s], N = m.find((D) => D.productData.name === r);
1346
1304
  if (!N) return;
1347
1305
  const E = {
1348
1306
  listingId: N.id,
1349
1307
  image: N.productData.images.length > 0 ? N.productData.images[0].cfId : ""
1350
- }, K = w.map((D) => D.listingId === v.listingId ? E : D);
1351
- M(E), e([...K]);
1308
+ }, Z = T.map((D) => D.listingId === j.listingId ? E : D);
1309
+ O(E), e([...Z]);
1352
1310
  },
1353
- value: O.productData.name,
1311
+ value: A.productData.name,
1354
1312
  options: [
1355
- ...r.filter((l) => !s.find((w) => w.listingId === l.id)).map((l) => l.productData.name)
1313
+ ...m.filter((r) => !s.find((T) => T.listingId === r.id)).map((r) => r.productData.name)
1356
1314
  ],
1357
- leftAddonOptions: r.map((l) => {
1358
- var w;
1315
+ leftAddonOptions: m.map((r) => {
1316
+ var T;
1359
1317
  return {
1360
- value: l.productData.name,
1361
- addon: S(((w = l.productData.images[0]) == null ? void 0 : w.cfId) || "")
1318
+ value: r.productData.name,
1319
+ addon: k(((T = r.productData.images[0]) == null ? void 0 : T.cfId) || "")
1362
1320
  };
1363
1321
  })
1364
1322
  }
1365
1323
  ),
1366
- /* @__PURE__ */ t.jsxs("div", { className: G.buttons, children: [
1367
- _ && /* @__PURE__ */ t.jsx("div", { className: G.deleteButton, children: /* @__PURE__ */ t.jsx(
1368
- b,
1324
+ /* @__PURE__ */ t.jsxs("div", { className: X.buttons, children: [
1325
+ g && /* @__PURE__ */ t.jsx("div", { className: X.deleteButton, children: /* @__PURE__ */ t.jsx(
1326
+ v,
1369
1327
  {
1370
1328
  name: "Sliders",
1371
1329
  hoverable: !0,
1372
1330
  width: 20,
1373
1331
  height: 20,
1374
- onClick: (l) => j(l, v)
1332
+ onClick: (r) => S(r, j)
1375
1333
  }
1376
1334
  ) }),
1377
- y && /* @__PURE__ */ t.jsx("div", { className: G.deleteButton, children: /* @__PURE__ */ t.jsx(
1378
- b,
1335
+ _ && /* @__PURE__ */ t.jsx("div", { className: X.deleteButton, children: /* @__PURE__ */ t.jsx(
1336
+ v,
1379
1337
  {
1380
1338
  name: "Trash",
1381
1339
  hoverable: !0,
1382
1340
  width: 20,
1383
1341
  height: 20,
1384
1342
  fill: "#C12A2A",
1385
- onClick: () => e(s.filter((l) => l !== v))
1343
+ onClick: () => e(s.filter((r) => r !== j))
1386
1344
  }
1387
1345
  ) })
1388
1346
  ] })
1389
1347
  ] });
1390
- return h ? /* @__PURE__ */ t.jsx(
1391
- bs,
1348
+ return x ? /* @__PURE__ */ t.jsx(
1349
+ Be,
1392
1350
  {
1393
- product: v,
1394
- children: L
1351
+ product: j,
1352
+ children: H
1395
1353
  },
1396
- v.listingId
1354
+ j.listingId
1397
1355
  ) : /* @__PURE__ */ t.jsx(
1398
1356
  "div",
1399
1357
  {
1400
- className: G.product,
1401
- children: L
1358
+ className: X.product,
1359
+ children: H
1402
1360
  },
1403
- v.listingId
1361
+ j.listingId
1404
1362
  );
1405
- }, A = f.useRef(null);
1406
- return /* @__PURE__ */ t.jsxs("div", { className: G.productsBlock, children: [
1407
- (u || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: G.top, children: [
1408
- u && /* @__PURE__ */ t.jsx("h3", { className: G.title, children: u }),
1363
+ }, M = f.useRef(null);
1364
+ return /* @__PURE__ */ t.jsxs("div", { className: X.productsBlock, children: [
1365
+ (u || i !== void 0) && /* @__PURE__ */ t.jsxs("div", { className: X.top, children: [
1366
+ u && /* @__PURE__ */ t.jsx("h3", { className: X.title, children: u }),
1409
1367
  i !== void 0 && /* @__PURE__ */ t.jsx(
1410
- ot,
1368
+ at,
1411
1369
  {
1412
1370
  current: i,
1413
- onChange: (v) => a == null ? void 0 : a(v)
1371
+ onChange: (j) => a == null ? void 0 : a(j)
1414
1372
  }
1415
1373
  )
1416
1374
  ] }),
1417
- Q && I && /* @__PURE__ */ t.jsx(
1418
- At,
1375
+ y && C && /* @__PURE__ */ t.jsx(
1376
+ Mt,
1419
1377
  {
1420
- ref: A,
1421
- activeItem: I,
1422
- setActiveItem: M,
1423
- setIsOpenModal: U,
1424
- popupPosition: x,
1425
- itemsOptions: r
1378
+ ref: M,
1379
+ activeItem: C,
1380
+ setActiveItem: O,
1381
+ setIsOpenModal: z,
1382
+ popupPosition: L,
1383
+ itemsOptions: m
1426
1384
  }
1427
1385
  ),
1428
- i && /* @__PURE__ */ t.jsxs("div", { className: G.products, children: [
1429
- p && /* @__PURE__ */ t.jsx("h5", { className: G.subtitle, children: p }),
1430
- h ? /* @__PURE__ */ t.jsx(
1431
- pt,
1386
+ i && /* @__PURE__ */ t.jsxs("div", { className: X.products, children: [
1387
+ d && /* @__PURE__ */ t.jsx("h5", { className: X.subtitle, children: d }),
1388
+ x ? /* @__PURE__ */ t.jsx(
1389
+ ut,
1432
1390
  {
1433
- sensors: m,
1434
- onDragEnd: P,
1391
+ sensors: h,
1392
+ onDragEnd: I,
1435
1393
  children: /* @__PURE__ */ t.jsx(
1436
1394
  ht,
1437
1395
  {
1438
- items: s.map((v) => String(v.listingId)),
1439
- strategy: mt,
1440
- children: s.map((v) => $(v))
1396
+ items: s.map((j) => String(j.listingId)),
1397
+ strategy: pt,
1398
+ children: s.map((j) => q(j))
1441
1399
  }
1442
1400
  )
1443
1401
  }
1444
- ) : s.map((v) => $(v)),
1402
+ ) : s.map((j) => q(j)),
1445
1403
  n && /* @__PURE__ */ t.jsx(
1446
1404
  "div",
1447
1405
  {
@@ -1451,31 +1409,31 @@ const Vi = (c) => {
1451
1409
  justifyContent: "center"
1452
1410
  },
1453
1411
  children: /* @__PURE__ */ t.jsx(
1454
- ct,
1412
+ ot,
1455
1413
  {
1456
1414
  withoutHover: !0,
1457
- className: G.button,
1415
+ className: X.button,
1458
1416
  size: "s",
1459
1417
  onClick: () => {
1460
- const v = [...s];
1461
- for (let O = 0; O < r.length; O++)
1462
- if (!s.find((L) => L.listingId === r[O].id)) {
1463
- v.push({
1464
- listingId: r[O].id,
1465
- image: r[O].productData.images.length > 0 ? r[O].productData.images[0].cfId : ""
1418
+ const j = [...s];
1419
+ for (let A = 0; A < m.length; A++)
1420
+ if (!s.find((H) => H.listingId === m[A].id)) {
1421
+ j.push({
1422
+ listingId: m[A].id,
1423
+ image: m[A].productData.images.length > 0 ? m[A].productData.images[0].cfId : ""
1466
1424
  });
1467
1425
  break;
1468
1426
  }
1469
- e(v);
1427
+ e(j);
1470
1428
  },
1471
- disabled: s.length === (B || r.length),
1429
+ disabled: s.length === (b || m.length),
1472
1430
  style: {
1473
1431
  width: "fit-content"
1474
1432
  },
1475
- children: /* @__PURE__ */ t.jsxs("div", { className: G.addButton, children: [
1433
+ children: /* @__PURE__ */ t.jsxs("div", { className: X.addButton, children: [
1476
1434
  /* @__PURE__ */ t.jsx("span", { children: "Add Option" }),
1477
1435
  /* @__PURE__ */ t.jsx(
1478
- b,
1436
+ v,
1479
1437
  {
1480
1438
  name: "Plus",
1481
1439
  width: 16,
@@ -1488,169 +1446,173 @@ const Vi = (c) => {
1488
1446
  }
1489
1447
  )
1490
1448
  ] }),
1491
- g && T && /* @__PURE__ */ t.jsx(
1449
+ p && P && /* @__PURE__ */ t.jsx(
1492
1450
  st,
1493
1451
  {
1494
- value: g,
1495
- options: Object.keys(Ct),
1496
- onChange: (v) => T(v),
1452
+ value: p,
1453
+ options: Object.keys(kt),
1454
+ onChange: (j) => P(j),
1497
1455
  leftAddonOptions: St
1498
1456
  }
1499
1457
  ),
1500
- i && o !== void 0 && /* @__PURE__ */ t.jsx(
1501
- rt,
1458
+ i && c !== void 0 && /* @__PURE__ */ t.jsx(
1459
+ ct,
1502
1460
  {
1503
1461
  otherTitle: "Other",
1504
- items: o
1462
+ items: c
1505
1463
  }
1506
1464
  )
1507
1465
  ] });
1508
- }, ys = "_options_1aiq8_1", Ns = "_price_1aiq8_18", Is = "_oldPrice_1aiq8_25", ks = "_newPrice_1aiq8_33", Cs = "_animate_1aiq8_40", Ss = "_appearAndBounce_1aiq8_1", $s = "_meta_1aiq8_58", qs = "_info_1aiq8_64", ws = "_infoRight_1aiq8_72", Ps = "_buttons_1aiq8_79", Bs = "_variants_1aiq8_86", Ts = "_variant_1aiq8_86", Ms = "_stock_1aiq8_104", As = "_variantInfo_1aiq8_111", Os = "_quantity_1aiq8_117", Es = "_count_1aiq8_124", Rs = "_focused_1aiq8_141", Ds = "_button_1aiq8_79", zs = "_activeVariant_1aiq8_167", Ls = "_chargeTypes_1aiq8_171", Fs = "_charge_1aiq8_171", Us = "_chargeActive_1aiq8_196", Vs = "_title_1aiq8_204", q = {
1509
- options: ys,
1510
- price: Ns,
1511
- oldPrice: Is,
1512
- newPrice: ks,
1513
- animate: Cs,
1514
- appearAndBounce: Ss,
1515
- meta: $s,
1516
- info: qs,
1517
- infoRight: ws,
1518
- buttons: Ps,
1519
- variants: Bs,
1520
- variant: Ts,
1521
- stock: Ms,
1522
- variantInfo: As,
1523
- quantity: Os,
1524
- count: Es,
1525
- focused: Rs,
1526
- button: Ds,
1527
- activeVariant: zs,
1528
- chargeTypes: Ls,
1529
- charge: Fs,
1530
- chargeActive: Us,
1531
- title: Vs
1466
+ }, Te = "_options_1aiq8_1", $e = "_price_1aiq8_18", Me = "_oldPrice_1aiq8_25", Ae = "_newPrice_1aiq8_33", Oe = "_animate_1aiq8_40", Ee = "_meta_1aiq8_58", Re = "_info_1aiq8_64", De = "_infoRight_1aiq8_72", Le = "_buttons_1aiq8_79", ze = "_variants_1aiq8_86", Fe = "_variant_1aiq8_86", He = "_stock_1aiq8_104", Ue = "_variantInfo_1aiq8_111", Ve = "_quantity_1aiq8_117", Ye = "_button_1aiq8_79", We = "_activeVariant_1aiq8_167", Ge = "_chargeTypes_1aiq8_171", Xe = "_charge_1aiq8_171", Qe = "_chargeActive_1aiq8_196", Je = "_title_1aiq8_204", B = {
1467
+ options: Te,
1468
+ price: $e,
1469
+ oldPrice: Me,
1470
+ newPrice: Ae,
1471
+ animate: Oe,
1472
+ meta: Ee,
1473
+ info: Re,
1474
+ infoRight: De,
1475
+ buttons: Le,
1476
+ variants: ze,
1477
+ variant: Fe,
1478
+ stock: He,
1479
+ variantInfo: Ue,
1480
+ quantity: Ve,
1481
+ button: Ye,
1482
+ activeVariant: We,
1483
+ chargeTypes: Ge,
1484
+ charge: Xe,
1485
+ chargeActive: Qe,
1486
+ title: Je
1532
1487
  };
1533
- var It = /* @__PURE__ */ ((c) => (c.ONE_TIME = "One-Time", c.RECURRING = "Subscribe & Save", c))(It || {});
1534
- const Hs = (c) => {
1535
- var I, M;
1536
- const { product: i, setIsOpen: a } = c, { variants: s } = i, [e, o] = f.useState(s[0]), [u, p] = f.useState(
1488
+ var Nt = /* @__PURE__ */ ((o) => (o.ONE_TIME = "One-Time", o.RECURRING = "Subscribe & Save", o))(Nt || {});
1489
+ const Ke = (o) => {
1490
+ var L, R;
1491
+ const { product: i, setIsOpen: a } = o, { variants: s } = i, [e, c] = f.useState(s[0]), [u, d] = f.useState(
1537
1492
  e.chargeTypes ? e.chargeTypes[0] : "ONE_TIME"
1538
- ), _ = xt(), [h, k] = f.useState(1), { reset: y, addProductToCart: n } = it(), [d, r] = f.useState(!1);
1493
+ ), { notifications: g, setNotifications: x } = bt(), $ = xt(), [_, n] = f.useState(1), { reset: l, addProductToCart: m } = nt(), [b, p] = f.useState(!1);
1539
1494
  f.useEffect(() => {
1540
- r(!0);
1541
- const x = setTimeout(() => r(!1), 600);
1542
- return () => clearTimeout(x);
1543
- }, [h]);
1544
- async function B() {
1545
- await n({
1495
+ p(!0);
1496
+ const y = setTimeout(() => p(!1), 600);
1497
+ return () => clearTimeout(y);
1498
+ }, [_]);
1499
+ async function P() {
1500
+ await m({
1546
1501
  productId: i.id,
1547
1502
  productVariantId: e.id,
1548
- quantity: h
1549
- }), a == null || a(!1);
1503
+ quantity: _
1504
+ }), a == null || a(!1), x([
1505
+ ...g,
1506
+ {
1507
+ id: K(),
1508
+ message: "Product added to cart",
1509
+ status: "success"
1510
+ }
1511
+ ]);
1550
1512
  }
1551
- function g() {
1552
- y(), B(), _("/checkout");
1513
+ function C() {
1514
+ l(), P(), $("/checkout");
1553
1515
  }
1554
- function T(x) {
1555
- if (x >= 864e5) {
1556
- const j = Math.floor(x / 864e5);
1557
- return `${j} ${j === 1 ? "day" : "days"}`;
1558
- } else if (x >= 36e5) {
1559
- const j = Math.floor(x / 36e5);
1560
- return `${j} ${j === 1 ? "hour" : "hours"}`;
1561
- } else if (x >= 6e4) {
1562
- const j = Math.floor(x / 6e4);
1563
- return `${j} ${j === 1 ? "minute" : "minutes"}`;
1516
+ function O(y) {
1517
+ if (y >= 864e5) {
1518
+ const I = Math.floor(y / 864e5);
1519
+ return `${I} ${I === 1 ? "day" : "days"}`;
1520
+ } else if (y >= 36e5) {
1521
+ const I = Math.floor(y / 36e5);
1522
+ return `${I} ${I === 1 ? "hour" : "hours"}`;
1523
+ } else if (y >= 6e4) {
1524
+ const I = Math.floor(y / 6e4);
1525
+ return `${I} ${I === 1 ? "minute" : "minutes"}`;
1564
1526
  } else {
1565
- const j = Math.floor(x / 1e3);
1566
- return `${j} ${j === 1 ? "second" : "seconds"}`;
1527
+ const I = Math.floor(y / 1e3);
1528
+ return `${I} ${I === 1 ? "second" : "seconds"}`;
1567
1529
  }
1568
1530
  }
1569
1531
  return f.useEffect(() => {
1570
- e.quantity && e.quantity.available === 0 ? k(0) : k(1);
1571
- }, [e.quantity.available]), /* @__PURE__ */ t.jsxs("div", { className: q.options, children: [
1572
- e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: q.chargeTypes, children: e.chargeTypes.map((x) => /* @__PURE__ */ t.jsx(
1532
+ e.quantity && e.quantity.available === 0 ? n(0) : n(1);
1533
+ }, [e.quantity.available]), /* @__PURE__ */ t.jsxs("div", { className: B.options, children: [
1534
+ e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: B.chargeTypes, children: e.chargeTypes.map((y) => /* @__PURE__ */ t.jsx(
1573
1535
  "div",
1574
1536
  {
1575
- className: F(q.charge, {
1576
- [q.chargeActive]: u === x
1537
+ className: U(B.charge, {
1538
+ [B.chargeActive]: u === y
1577
1539
  }),
1578
- onClick: () => p(x),
1579
- children: It[x]
1540
+ onClick: () => d(y),
1541
+ children: Nt[y]
1580
1542
  },
1581
- x
1543
+ y
1582
1544
  )) }),
1583
- /* @__PURE__ */ t.jsx("div", { className: q.variants, children: s.map((x) => {
1584
- var R, Q;
1545
+ /* @__PURE__ */ t.jsx("div", { className: B.variants, children: s.map((y) => {
1546
+ var z, h;
1585
1547
  return /* @__PURE__ */ t.jsxs(
1586
1548
  "div",
1587
1549
  {
1588
- className: F(q.variant, {
1589
- [q.activeVariant]: e.id === x.id
1550
+ className: U(B.variant, {
1551
+ [B.activeVariant]: e.id === y.id
1590
1552
  }),
1591
- onClick: () => o(x),
1553
+ onClick: () => c(y),
1592
1554
  children: [
1593
- /* @__PURE__ */ t.jsxs("div", { className: q.variantInfo, children: [
1594
- /* @__PURE__ */ t.jsx("span", { className: q.title, children: yt(x.name) }),
1555
+ /* @__PURE__ */ t.jsxs("div", { className: B.variantInfo, children: [
1556
+ /* @__PURE__ */ t.jsx("span", { className: B.title, children: yt(y.name) }),
1595
1557
  /* @__PURE__ */ t.jsxs("span", { children: [
1596
1558
  "$",
1597
- u === "ONE_TIME" ? x.price.amount : x.subscriptionSettings ? x.subscriptionSettings.price.amount : "Price Not Found"
1559
+ u === "ONE_TIME" ? y.price.amount : y.subscriptionSettings ? y.subscriptionSettings.price.amount : "Price Not Found"
1598
1560
  ] })
1599
1561
  ] }),
1600
- /* @__PURE__ */ t.jsx("div", { children: u === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: q.stock, children: [
1601
- (R = x.quantity.restrictions) != null && R.max || x.quantity.available !== void 0 ? ((Q = x.quantity.restrictions) == null ? void 0 : Q.max) || x.quantity.available : "∞",
1562
+ /* @__PURE__ */ t.jsx("div", { children: u === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: B.stock, children: [
1563
+ (z = y.quantity.restrictions) != null && z.max || y.quantity.available !== void 0 ? ((h = y.quantity.restrictions) == null ? void 0 : h.max) || y.quantity.available : "∞",
1602
1564
  " ",
1603
1565
  "in stock"
1604
1566
  ] }) })
1605
1567
  ]
1606
1568
  },
1607
- x.id
1569
+ y.id
1608
1570
  );
1609
1571
  }) }),
1610
- u === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: q.quantity, children: [
1572
+ u === "ONE_TIME" && /* @__PURE__ */ t.jsxs("div", { className: B.quantity, children: [
1611
1573
  /* @__PURE__ */ t.jsx(
1612
- z,
1574
+ F,
1613
1575
  {
1614
1576
  type: "Secondary",
1615
1577
  onClick: () => {
1616
- h > 1 ? k((x) => x - 1) : k(1);
1578
+ _ > 1 ? n((y) => y - 1) : n(1);
1617
1579
  },
1618
- className: q.button,
1619
- disabled: e.quantity.available && e.quantity.restrictions && h <= e.quantity.restrictions.min || e.quantity.available === 0,
1620
- children: /* @__PURE__ */ t.jsx(b, { name: "Minus" })
1580
+ className: B.button,
1581
+ disabled: e.quantity.available && e.quantity.restrictions && _ <= e.quantity.restrictions.min || e.quantity.available === 0,
1582
+ children: /* @__PURE__ */ t.jsx(v, { name: "Minus" })
1621
1583
  }
1622
1584
  ),
1623
1585
  /* @__PURE__ */ t.jsx(
1624
- Ot,
1586
+ At,
1625
1587
  {
1626
1588
  type: "number",
1627
- value: String(h),
1628
- onChange: (x) => k(Number(x)),
1629
- max: ((I = e.quantity.restrictions) == null ? void 0 : I.max) || e.quantity.available || Number.POSITIVE_INFINITY,
1630
- min: ((M = e.quantity.restrictions) == null ? void 0 : M.min) || 0,
1589
+ value: String(_),
1590
+ onChange: (y) => n(Number(y)),
1591
+ max: ((L = e.quantity.restrictions) == null ? void 0 : L.max) || e.quantity.available || Number.POSITIVE_INFINITY,
1592
+ min: ((R = e.quantity.restrictions) == null ? void 0 : R.min) || 0,
1631
1593
  centered: !0,
1632
- disabled: e.quantity && e.quantity.available === 0 || Object.keys(e.quantity.restrictions || {}).length !== 0 && h >= e.quantity.restrictions.max
1594
+ disabled: e.quantity && e.quantity.available === 0 || Object.keys(e.quantity.restrictions || {}).length !== 0 && _ >= e.quantity.restrictions.max
1633
1595
  }
1634
1596
  ),
1635
1597
  /* @__PURE__ */ t.jsx(
1636
- z,
1598
+ F,
1637
1599
  {
1638
1600
  type: "Secondary",
1639
1601
  onClick: () => {
1640
- k((x) => x + 1);
1602
+ n((y) => y + 1);
1641
1603
  },
1642
- className: q.button,
1643
- disabled: !!(e.quantity.available && e.quantity.restrictions && h >= e.quantity.restrictions.max || e.quantity.available === 0),
1644
- children: /* @__PURE__ */ t.jsx(b, { name: "Plus" })
1604
+ className: B.button,
1605
+ disabled: !!(e.quantity.available && e.quantity.restrictions && _ >= e.quantity.restrictions.max || e.quantity.available === 0),
1606
+ children: /* @__PURE__ */ t.jsx(v, { name: "Plus" })
1645
1607
  }
1646
1608
  )
1647
1609
  ] }),
1648
- /* @__PURE__ */ t.jsxs("div", { className: q.meta, children: [
1649
- /* @__PURE__ */ t.jsxs("div", { className: q.info, children: [
1610
+ /* @__PURE__ */ t.jsxs("div", { className: B.meta, children: [
1611
+ /* @__PURE__ */ t.jsxs("div", { className: B.info, children: [
1650
1612
  /* @__PURE__ */ t.jsx("span", { children: "Delivery" }),
1651
- /* @__PURE__ */ t.jsxs("div", { className: q.infoRight, children: [
1613
+ /* @__PURE__ */ t.jsxs("div", { className: B.infoRight, children: [
1652
1614
  /* @__PURE__ */ t.jsx(
1653
- b,
1615
+ v,
1654
1616
  {
1655
1617
  name: "Lightning",
1656
1618
  fill: "#FF3F19",
@@ -1658,140 +1620,133 @@ const Hs = (c) => {
1658
1620
  height: 20
1659
1621
  }
1660
1622
  ),
1661
- /* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : T(e.deliveryTime) })
1623
+ /* @__PURE__ */ t.jsx("span", { children: !e.deliveryTime || e.deliveryTime === 0 ? "Instant" : O(e.deliveryTime) })
1662
1624
  ] })
1663
1625
  ] }),
1664
- /* @__PURE__ */ t.jsxs("div", { className: q.info, children: [
1626
+ /* @__PURE__ */ t.jsxs("div", { className: B.info, children: [
1665
1627
  /* @__PURE__ */ t.jsx("span", { children: "Price" }),
1666
- /* @__PURE__ */ t.jsx("div", { className: q.infoRight, children: u === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: q.price, children: [
1667
- /* @__PURE__ */ t.jsxs("span", { className: F(q.newPrice, { [q.animate]: d }), children: [
1628
+ /* @__PURE__ */ t.jsx("div", { className: B.infoRight, children: u === "ONE_TIME" ? e.compareAtPrice && (e.compareAtPrice.amount || 0) - (e.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: B.price, children: [
1629
+ /* @__PURE__ */ t.jsxs("span", { className: U(B.newPrice, { [B.animate]: b }), children: [
1668
1630
  "$ ",
1669
- (e.price.amount || 0) * h
1631
+ (e.price.amount || 0) * _
1670
1632
  ] }),
1671
- /* @__PURE__ */ t.jsxs("span", { className: q.oldPrice, children: [
1633
+ /* @__PURE__ */ t.jsxs("span", { className: B.oldPrice, children: [
1672
1634
  "$ ",
1673
- (e.compareAtPrice.amount || 0) * h
1635
+ (e.compareAtPrice.amount || 0) * _
1674
1636
  ] })
1675
- ] }) : /* @__PURE__ */ t.jsxs("span", { className: F(q.newPrice, { [q.animate]: d }), children: [
1637
+ ] }) : /* @__PURE__ */ t.jsxs("span", { className: U(B.newPrice, { [B.animate]: b }), children: [
1676
1638
  "$ ",
1677
- (e.price.amount || 0) * h
1678
- ] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: q.price, children: [
1679
- /* @__PURE__ */ t.jsxs("span", { className: F(q.newPrice, { [q.animate]: d }), children: [
1639
+ (e.price.amount || 0) * _
1640
+ ] }) : e.subscriptionSettings && e.subscriptionSettings.compareAtPrice && (e.subscriptionSettings.compareAtPrice.amount || 0) - (e.subscriptionSettings.price.amount || 0) > 0 ? /* @__PURE__ */ t.jsxs("div", { className: B.price, children: [
1641
+ /* @__PURE__ */ t.jsxs("span", { className: U(B.newPrice, { [B.animate]: b }), children: [
1680
1642
  "$ ",
1681
1643
  e.subscriptionSettings.price.amount || 0
1682
1644
  ] }),
1683
- /* @__PURE__ */ t.jsxs("span", { className: q.oldPrice, children: [
1645
+ /* @__PURE__ */ t.jsxs("span", { className: B.oldPrice, children: [
1684
1646
  "$ ",
1685
1647
  e.subscriptionSettings.compareAtPrice.amount || 0
1686
1648
  ] })
1687
- ] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: F(q.newPrice, { [q.animate]: d }), children: [
1649
+ ] }) : e.subscriptionSettings && /* @__PURE__ */ t.jsxs("span", { className: U(B.newPrice, { [B.animate]: b }), children: [
1688
1650
  "$ ",
1689
1651
  e.subscriptionSettings.price.amount || 0
1690
1652
  ] }) })
1691
1653
  ] })
1692
1654
  ] }),
1693
- /* @__PURE__ */ t.jsxs("div", { className: q.buttons, children: [
1655
+ /* @__PURE__ */ t.jsxs("div", { className: B.buttons, children: [
1694
1656
  /* @__PURE__ */ t.jsx(
1695
- z,
1657
+ F,
1696
1658
  {
1697
1659
  type: "Primary",
1698
- onClick: () => g(),
1660
+ onClick: () => C(),
1699
1661
  disabled: e.quantity && e.quantity.available === 0,
1700
1662
  children: u === "ONE_TIME" ? "Buy Now" : "Subscribe Now"
1701
1663
  }
1702
1664
  ),
1703
1665
  u === "ONE_TIME" && /* @__PURE__ */ t.jsx(
1704
- z,
1666
+ F,
1705
1667
  {
1706
1668
  type: "Secondary",
1707
- onClick: () => B(),
1669
+ onClick: () => P(),
1708
1670
  disabled: e.quantity && e.quantity.available === 0,
1709
1671
  children: "Add to Cart"
1710
1672
  }
1711
1673
  )
1712
1674
  ] })
1713
1675
  ] });
1714
- }, Ys = "_button_14q75_1", Ws = "_login_14q75_14", Gs = "_signUp_14q75_18", Xs = "_buttons_14q75_23", Qs = "_modal_14q75_32", Js = "_closing_14q75_64", Ks = "_info_14q75_113", Zs = "_top_14q75_120", tn = "_title_14q75_131", en = "_clear_14q75_138", sn = "_activeClear_14q75_145", nn = "_count_14q75_149", an = "_cart_14q75_164", on = "_empty_14q75_172", cn = "_product_14q75_198", rn = "_products_14q75_207", ln = "_image_14q75_215", dn = "_productInfo_14q75_230", un = "_content_14q75_237", pn = "_name_14q75_243", hn = "_price_14q75_249", mn = "_productButtons_14q75_255", _n = "_productButton_14q75_255", gn = "_productCount_14q75_272", fn = "_bottom_14q75_289", xn = "_subtotal_14q75_297", jn = "_block_14q75_305", vn = "_shoppingCount_14q75_312", bn = "_total_14q75_332", yn = "_link_14q75_338", Nn = "_userInfo_14q75_345", In = "_pagesMobileModal_14q75_356", kn = "_pagesMobileModalContent_14q75_370", Cn = "_pagesMobileModalHeader_14q75_376", Sn = "_pagesMobileModalFooter_14q75_386", C = {
1715
- button: Ys,
1716
- login: Ws,
1717
- signUp: Gs,
1718
- buttons: Xs,
1719
- modal: Qs,
1720
- "slide-in-fade": "_slide-in-fade_14q75_1",
1721
- "mobile-slide-in-fade": "_mobile-slide-in-fade_14q75_1",
1722
- closing: Js,
1723
- "mobile-slide-out-fade": "_mobile-slide-out-fade_14q75_1",
1724
- "slide-out-fade": "_slide-out-fade_14q75_1",
1725
- info: Ks,
1726
- top: Zs,
1727
- title: tn,
1728
- clear: en,
1729
- activeClear: sn,
1730
- count: nn,
1731
- cart: an,
1732
- empty: on,
1733
- product: cn,
1734
- products: rn,
1735
- image: ln,
1736
- productInfo: dn,
1737
- content: un,
1738
- name: pn,
1739
- price: hn,
1740
- productButtons: mn,
1741
- productButton: _n,
1742
- productCount: gn,
1743
- bottom: fn,
1744
- subtotal: xn,
1745
- block: jn,
1746
- shoppingCount: vn,
1747
- total: bn,
1748
- link: yn,
1749
- userInfo: Nn,
1750
- pagesMobileModal: In,
1751
- pagesMobileModalContent: kn,
1752
- pagesMobileModalHeader: Cn,
1753
- pagesMobileModalFooter: Sn
1754
- }, Hi = (c) => {
1755
- const { shopping: i, signUp: a, isShowUserInfo: s = !0 } = c;
1756
- return /* @__PURE__ */ t.jsxs("div", { className: C.buttons, children: [
1757
- i && /* @__PURE__ */ t.jsx($n, {}),
1758
- s && /* @__PURE__ */ t.jsx(Pt, { signUp: a })
1676
+ }, Ze = "_buttons_14q75_23", ts = "_modal_14q75_32", es = "_closing_14q75_64", ss = "_info_14q75_113", ns = "_top_14q75_120", is = "_title_14q75_131", as = "_clear_14q75_138", os = "_activeClear_14q75_145", cs = "_count_14q75_149", rs = "_cart_14q75_164", ls = "_empty_14q75_172", ds = "_product_14q75_198", us = "_products_14q75_207", hs = "_image_14q75_215", ps = "_productInfo_14q75_230", ms = "_content_14q75_237", gs = "_name_14q75_243", fs = "_price_14q75_249", xs = "_productButtons_14q75_255", _s = "_productButton_14q75_255", js = "_productCount_14q75_272", vs = "_bottom_14q75_289", bs = "_subtotal_14q75_297", ys = "_block_14q75_305", Is = "_shoppingCount_14q75_312", Ns = "_total_14q75_332", Cs = "_link_14q75_338", Ss = "_userInfo_14q75_345", ks = "_pagesMobileModal_14q75_356", ws = "_pagesMobileModalContent_14q75_370", Ps = "_pagesMobileModalHeader_14q75_376", qs = "_pagesMobileModalFooter_14q75_386", w = {
1677
+ buttons: Ze,
1678
+ modal: ts,
1679
+ closing: es,
1680
+ info: ss,
1681
+ top: ns,
1682
+ title: is,
1683
+ clear: as,
1684
+ activeClear: os,
1685
+ count: cs,
1686
+ cart: rs,
1687
+ empty: ls,
1688
+ product: ds,
1689
+ products: us,
1690
+ image: hs,
1691
+ productInfo: ps,
1692
+ content: ms,
1693
+ name: gs,
1694
+ price: fs,
1695
+ productButtons: xs,
1696
+ productButton: _s,
1697
+ productCount: js,
1698
+ bottom: vs,
1699
+ subtotal: bs,
1700
+ block: ys,
1701
+ shoppingCount: Is,
1702
+ total: Ns,
1703
+ link: Cs,
1704
+ userInfo: Ss,
1705
+ pagesMobileModal: ks,
1706
+ pagesMobileModalContent: ws,
1707
+ pagesMobileModalHeader: Ps,
1708
+ pagesMobileModalFooter: qs
1709
+ }, Nn = (o) => {
1710
+ const { shopping: i, signUp: a, isShowUserInfo: s = !0 } = o;
1711
+ return /* @__PURE__ */ t.jsxs("div", { className: w.buttons, children: [
1712
+ i && /* @__PURE__ */ t.jsx(Bs, {}),
1713
+ s && /* @__PURE__ */ t.jsx(qt, { signUp: a })
1759
1714
  ] });
1760
- }, $n = () => {
1761
- const [c, i] = f.useState(!1), [a, s] = f.useState([]), { cart: e, products: o } = it();
1715
+ }, Bs = () => {
1716
+ const [o, i] = f.useState(!1), [a, s] = f.useState([]), { cart: e, products: c } = nt();
1762
1717
  function u(n) {
1763
1718
  if (n.variants.length > 0) {
1764
- for (let d = 0; d < e.parts.length; d++)
1765
- for (let r = 0; r < n.variants.length; r++)
1766
- if (n.variants[r] && e.parts[d].productVariantId === n.variants[r].id)
1767
- return e.parts[d].productVariantId;
1719
+ for (let l = 0; l < e.parts.length; l++)
1720
+ for (let m = 0; m < n.variants.length; m++)
1721
+ if (n.variants[m] && e.parts[l].productVariantId === n.variants[m].id)
1722
+ return e.parts[l].productVariantId;
1768
1723
  }
1769
1724
  return n.variants[0].id;
1770
1725
  }
1771
- function p(n) {
1772
- for (let d = 0; d < e.parts.length; d++)
1773
- for (let r = 0; r < n.variants.length; r++)
1774
- if (n.variants[r] && e.parts[d].productVariantId === n.variants[r].id)
1775
- return e.parts[d].quantity;
1726
+ function d(n) {
1727
+ for (let l = 0; l < e.parts.length; l++)
1728
+ for (let m = 0; m < n.variants.length; m++)
1729
+ if (n.variants[m] && e.parts[l].productVariantId === n.variants[m].id)
1730
+ return e.parts[l].quantity;
1776
1731
  }
1777
1732
  f.useEffect(() => {
1778
1733
  (async () => {
1779
- const d = e.parts.map((g) => String(g.productId)), B = (o.filter((g) => d.includes(String(g.id))) || []).map((g) => ({
1780
- ...g,
1781
- activeVariantId: u(g),
1782
- quantity: p(g)
1734
+ const l = e.parts.map((p) => String(p.productId)), b = (c.filter((p) => l.includes(String(p.id))) || []).map((p) => ({
1735
+ ...p,
1736
+ activeVariantId: u(p),
1737
+ quantity: d(p)
1783
1738
  }));
1784
- s(B);
1739
+ s(b);
1785
1740
  })();
1786
1741
  }, [e.parts]);
1787
- function _(n) {
1788
- var d;
1789
- return !n || !(n != null && n.variants) ? !1 : (d = n.variants.find((r) => r.id === n.activeVariantId)) == null ? void 0 : d.subscriptionSettings;
1742
+ function g(n) {
1743
+ var l;
1744
+ return !n || !(n != null && n.variants) ? !1 : (l = n.variants.find((m) => m.id === n.activeVariantId)) == null ? void 0 : l.subscriptionSettings;
1790
1745
  }
1791
- const h = e.parts.length > 0 && a.length > 0 && !_(a[0]), [k, y] = f.useState(!1);
1746
+ const x = e.parts.length > 0 && a.length > 0 && !g(a[0]), [$, _] = f.useState(!1);
1792
1747
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
1793
1748
  /* @__PURE__ */ t.jsxs(
1794
- z,
1749
+ F,
1795
1750
  {
1796
1751
  type: "Secondary",
1797
1752
  style: {
@@ -1799,54 +1754,54 @@ const Hs = (c) => {
1799
1754
  position: "relative"
1800
1755
  },
1801
1756
  onClick: (n) => {
1802
- n.stopPropagation(), window.location.pathname.includes("/admin/builder") || (i(!0), y(!0));
1757
+ n.stopPropagation(), window.location.pathname.includes("/admin/builder") || (i(!0), _(!0));
1803
1758
  },
1804
1759
  children: [
1805
1760
  /* @__PURE__ */ t.jsx(
1806
- b,
1761
+ v,
1807
1762
  {
1808
1763
  name: "Handbag",
1809
1764
  fill: "var(--text-primary)"
1810
1765
  }
1811
1766
  ),
1812
- h && /* @__PURE__ */ t.jsx("div", { className: C.shoppingCount, children: e.parts.length })
1767
+ x && /* @__PURE__ */ t.jsx("div", { className: w.shoppingCount, children: e.parts.length })
1813
1768
  ]
1814
1769
  }
1815
1770
  ),
1816
- c && /* @__PURE__ */ t.jsx(
1817
- Nt,
1771
+ o && /* @__PURE__ */ t.jsx(
1772
+ It,
1818
1773
  {
1819
1774
  close: () => {
1820
- y(!1), setTimeout(() => {
1775
+ _(!1), setTimeout(() => {
1821
1776
  i(!1);
1822
1777
  }, 300);
1823
1778
  },
1824
1779
  withAnimation: !1,
1825
1780
  children: /* @__PURE__ */ t.jsx(
1826
- qn,
1781
+ Ts,
1827
1782
  {
1828
1783
  activeProducts: a,
1829
- isCartNotEmpty: h,
1830
- isOpen: k
1784
+ isCartNotEmpty: x,
1785
+ isOpen: $
1831
1786
  }
1832
1787
  )
1833
1788
  }
1834
1789
  )
1835
1790
  ] });
1836
- }, qn = (c) => {
1837
- const { activeProducts: i, isCartNotEmpty: a, isOpen: s } = c, { cart: e, reset: o, getTotalAndDiscount: u, updateQuantityOfProduct: p } = it(), _ = xt();
1838
- function h(n) {
1839
- _(n);
1791
+ }, Ts = (o) => {
1792
+ const { activeProducts: i, isCartNotEmpty: a, isOpen: s } = o, { cart: e, reset: c, getTotalAndDiscount: u, updateQuantityOfProduct: d } = nt(), g = xt();
1793
+ function x(n) {
1794
+ g(n);
1840
1795
  }
1841
- function k(n) {
1842
- n.quantity && p({
1796
+ function $(n) {
1797
+ n.quantity && d({
1843
1798
  productId: n.id,
1844
1799
  productVariantId: n.activeVariantId,
1845
1800
  quantity: n.quantity + 1
1846
1801
  });
1847
1802
  }
1848
- function y(n) {
1849
- n.quantity && p({
1803
+ function _(n) {
1804
+ n.quantity && d({
1850
1805
  productId: n.id,
1851
1806
  productVariantId: n.activeVariantId,
1852
1807
  quantity: n.quantity - 1
@@ -1855,35 +1810,35 @@ const Hs = (c) => {
1855
1810
  return /* @__PURE__ */ t.jsxs(
1856
1811
  "div",
1857
1812
  {
1858
- className: F(C.modal, {
1859
- [C.closing]: !s
1813
+ className: U(w.modal, {
1814
+ [w.closing]: !s
1860
1815
  }),
1861
1816
  onClick: (n) => n.stopPropagation(),
1862
1817
  children: [
1863
- /* @__PURE__ */ t.jsxs("div", { className: C.top, children: [
1864
- /* @__PURE__ */ t.jsxs("div", { className: C.info, children: [
1865
- /* @__PURE__ */ t.jsx("span", { className: C.title, children: "Cart" }),
1866
- a && /* @__PURE__ */ t.jsx("div", { className: C.count, children: e.parts.length })
1818
+ /* @__PURE__ */ t.jsxs("div", { className: w.top, children: [
1819
+ /* @__PURE__ */ t.jsxs("div", { className: w.info, children: [
1820
+ /* @__PURE__ */ t.jsx("span", { className: w.title, children: "Cart" }),
1821
+ a && /* @__PURE__ */ t.jsx("div", { className: w.count, children: e.parts.length })
1867
1822
  ] }),
1868
1823
  /* @__PURE__ */ t.jsx(
1869
1824
  "button",
1870
1825
  {
1871
- className: F(C.clear, {
1872
- [C.activeClear]: a
1826
+ className: U(w.clear, {
1827
+ [w.activeClear]: a
1873
1828
  }),
1874
1829
  disabled: !a,
1875
- onClick: o,
1830
+ onClick: c,
1876
1831
  children: "Clear all"
1877
1832
  }
1878
1833
  )
1879
1834
  ] }),
1880
- a ? /* @__PURE__ */ t.jsxs("div", { className: C.cart, children: [
1881
- /* @__PURE__ */ t.jsx("div", { className: C.products, children: [...new Map(i.map((n) => [n.id, n])).values()].map((n) => /* @__PURE__ */ t.jsxs(
1835
+ a ? /* @__PURE__ */ t.jsxs("div", { className: w.cart, children: [
1836
+ /* @__PURE__ */ t.jsx("div", { className: w.products, children: [...new Map(i.map((n) => [n.id, n])).values()].map((n) => /* @__PURE__ */ t.jsxs(
1882
1837
  "div",
1883
1838
  {
1884
- className: C.product,
1839
+ className: w.product,
1885
1840
  children: [
1886
- /* @__PURE__ */ t.jsxs("div", { className: C.productInfo, children: [
1841
+ /* @__PURE__ */ t.jsxs("div", { className: w.productInfo, children: [
1887
1842
  n.images.length > 0 ? /* @__PURE__ */ t.jsx(
1888
1843
  "img",
1889
1844
  {
@@ -1891,35 +1846,35 @@ const Hs = (c) => {
1891
1846
  alt: "image",
1892
1847
  width: "100%",
1893
1848
  height: "100%",
1894
- className: C.image
1849
+ className: w.image
1895
1850
  }
1896
- ) : /* @__PURE__ */ t.jsx("div", { className: C.image, children: /* @__PURE__ */ t.jsx(
1897
- b,
1851
+ ) : /* @__PURE__ */ t.jsx("div", { className: w.image, children: /* @__PURE__ */ t.jsx(
1852
+ v,
1898
1853
  {
1899
1854
  name: "Image",
1900
1855
  fill: "var(--text-secondary)"
1901
1856
  }
1902
1857
  ) }),
1903
- /* @__PURE__ */ t.jsxs("div", { className: C.content, children: [
1904
- /* @__PURE__ */ t.jsx("div", { className: C.name, children: yt(n.name) }),
1905
- /* @__PURE__ */ t.jsxs("div", { className: C.price, children: [
1858
+ /* @__PURE__ */ t.jsxs("div", { className: w.content, children: [
1859
+ /* @__PURE__ */ t.jsx("div", { className: w.name, children: yt(n.name) }),
1860
+ /* @__PURE__ */ t.jsxs("div", { className: w.price, children: [
1906
1861
  "$",
1907
- n.variants.find((d) => d.id === n.activeVariantId).price.amount * ((n == null ? void 0 : n.quantity) || 1)
1862
+ n.variants.find((l) => l.id === n.activeVariantId).price.amount * ((n == null ? void 0 : n.quantity) || 1)
1908
1863
  ] })
1909
1864
  ] })
1910
1865
  ] }),
1911
- /* @__PURE__ */ t.jsxs("div", { className: C.productButtons, children: [
1866
+ /* @__PURE__ */ t.jsxs("div", { className: w.productButtons, children: [
1912
1867
  /* @__PURE__ */ t.jsx(
1913
- z,
1868
+ F,
1914
1869
  {
1915
1870
  type: "Secondary",
1916
1871
  onClick: () => {
1917
- n.quantity !== 1 && y(n);
1872
+ n.quantity !== 1 && _(n);
1918
1873
  },
1919
- className: C.productButton,
1874
+ className: w.productButton,
1920
1875
  disabled: n.quantity === 1,
1921
1876
  children: /* @__PURE__ */ t.jsx(
1922
- b,
1877
+ v,
1923
1878
  {
1924
1879
  name: "Minus",
1925
1880
  fill: "#757575",
@@ -1929,16 +1884,16 @@ const Hs = (c) => {
1929
1884
  )
1930
1885
  }
1931
1886
  ),
1932
- /* @__PURE__ */ t.jsx("div", { className: C.productCount, children: n.quantity }),
1887
+ /* @__PURE__ */ t.jsx("div", { className: w.productCount, children: n.quantity }),
1933
1888
  /* @__PURE__ */ t.jsx(
1934
- z,
1889
+ F,
1935
1890
  {
1936
1891
  type: "Secondary",
1937
- onClick: () => k(n),
1938
- className: C.productButton,
1939
- disabled: n.quantity === n.variants.find((d) => d.id === n.activeVariantId).quantity.available,
1892
+ onClick: () => $(n),
1893
+ className: w.productButton,
1894
+ disabled: n.quantity === n.variants.find((l) => l.id === n.activeVariantId).quantity.available,
1940
1895
  children: /* @__PURE__ */ t.jsx(
1941
- b,
1896
+ v,
1942
1897
  {
1943
1898
  name: "Plus",
1944
1899
  fill: "#757575",
@@ -1953,12 +1908,12 @@ const Hs = (c) => {
1953
1908
  },
1954
1909
  n.id
1955
1910
  )) }),
1956
- /* @__PURE__ */ t.jsxs("div", { className: C.bottom, children: [
1957
- /* @__PURE__ */ t.jsxs("div", { className: C.subtotal, children: [
1958
- /* @__PURE__ */ t.jsxs("div", { className: C.block, children: [
1911
+ /* @__PURE__ */ t.jsxs("div", { className: w.bottom, children: [
1912
+ /* @__PURE__ */ t.jsxs("div", { className: w.subtotal, children: [
1913
+ /* @__PURE__ */ t.jsxs("div", { className: w.block, children: [
1959
1914
  /* @__PURE__ */ t.jsx("span", { children: "Subtotal" }),
1960
1915
  /* @__PURE__ */ t.jsx(
1961
- b,
1916
+ v,
1962
1917
  {
1963
1918
  name: "Info",
1964
1919
  width: 20,
@@ -1967,20 +1922,20 @@ const Hs = (c) => {
1967
1922
  }
1968
1923
  )
1969
1924
  ] }),
1970
- /* @__PURE__ */ t.jsxs("div", { className: C.total, children: [
1925
+ /* @__PURE__ */ t.jsxs("div", { className: w.total, children: [
1971
1926
  "$",
1972
1927
  u().total
1973
1928
  ] })
1974
1929
  ] }),
1975
- /* @__PURE__ */ t.jsx(z, { onClick: () => h("/checkout"), children: "Checkout" })
1930
+ /* @__PURE__ */ t.jsx(F, { onClick: () => x("/checkout"), children: "Checkout" })
1976
1931
  ] })
1977
- ] }) : /* @__PURE__ */ t.jsx(wn, {})
1932
+ ] }) : /* @__PURE__ */ t.jsx($s, {})
1978
1933
  ]
1979
1934
  }
1980
1935
  );
1981
- }, wn = () => /* @__PURE__ */ t.jsxs("div", { className: C.empty, children: [
1936
+ }, $s = () => /* @__PURE__ */ t.jsxs("div", { className: w.empty, children: [
1982
1937
  /* @__PURE__ */ t.jsx("div", { children: /* @__PURE__ */ t.jsx(
1983
- b,
1938
+ v,
1984
1939
  {
1985
1940
  name: "Handbag",
1986
1941
  fill: "var(--text-secondary)"
@@ -1994,23 +1949,23 @@ const Hs = (c) => {
1994
1949
  "a",
1995
1950
  {
1996
1951
  href: "/products",
1997
- className: C.link,
1952
+ className: w.link,
1998
1953
  children: "view products"
1999
1954
  }
2000
1955
  )
2001
1956
  ] })
2002
- ] }), Pt = ({ signUp: c, close: i }) => {
2003
- const a = JSON.parse(localStorage.getItem("token") || "{}"), { data: s } = a, e = xt();
2004
- function o(_) {
2005
- window.location.pathname.includes("/admin/builder") || e(_);
1957
+ ] }), qt = ({ signUp: o, close: i }) => {
1958
+ const a = localStorage.getItem("token"), s = xt();
1959
+ function e(d) {
1960
+ window.location.pathname.includes("/admin/builder") || s(d);
2006
1961
  }
2007
- if (!s)
1962
+ if (!a)
2008
1963
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2009
1964
  /* @__PURE__ */ t.jsx(
2010
- z,
1965
+ F,
2011
1966
  {
2012
1967
  onClick: () => {
2013
- o("/customer-dash"), i == null || i();
1968
+ e("/customer-dash"), i == null || i();
2014
1969
  },
2015
1970
  type: "Secondary",
2016
1971
  style: {
@@ -2019,11 +1974,11 @@ const Hs = (c) => {
2019
1974
  children: "Login"
2020
1975
  }
2021
1976
  ),
2022
- c && /* @__PURE__ */ t.jsx(
2023
- z,
1977
+ o && /* @__PURE__ */ t.jsx(
1978
+ F,
2024
1979
  {
2025
1980
  onClick: () => {
2026
- o("/customer-dash"), i == null || i();
1981
+ e("/customer-dash"), i == null || i();
2027
1982
  },
2028
1983
  type: "Primary",
2029
1984
  style: {
@@ -2034,29 +1989,29 @@ const Hs = (c) => {
2034
1989
  }
2035
1990
  )
2036
1991
  ] });
2037
- const [u, p] = f.useState("test-email@gmail.com");
1992
+ const [c, u] = f.useState("test-email@gmail.com");
2038
1993
  return f.useEffect(() => {
2039
1994
  (async () => {
2040
- const h = Et(s);
2041
- p(h.email);
1995
+ const g = Ot(a);
1996
+ u(g.email);
2042
1997
  })();
2043
- }, [s]), /* @__PURE__ */ t.jsx(
1998
+ }, [a]), /* @__PURE__ */ t.jsx(
2044
1999
  "div",
2045
2000
  {
2046
- className: C.userInfo,
2001
+ className: w.userInfo,
2047
2002
  onClick: () => {
2048
- o("/customer-dash"), i == null || i();
2003
+ e("/customer-dash"), i == null || i();
2049
2004
  },
2050
- children: /* @__PURE__ */ t.jsx("div", { children: u || "test-email@gmail.com" })
2005
+ children: /* @__PURE__ */ t.jsx("div", { children: c || "test-email@gmail.com" })
2051
2006
  }
2052
2007
  );
2053
- }, Pn = ({
2054
- children: c,
2008
+ }, Ms = ({
2009
+ children: o,
2055
2010
  logo: i,
2056
2011
  setIsOpen: a,
2057
2012
  signUp: s
2058
2013
  }) => {
2059
- const { setIsOpen: e } = $t(), o = () => {
2014
+ const { setIsOpen: e } = wt(), c = () => {
2060
2015
  e(!1), setTimeout(() => {
2061
2016
  a(!1), e(!0);
2062
2017
  }, 300);
@@ -2064,18 +2019,18 @@ const Hs = (c) => {
2064
2019
  return /* @__PURE__ */ t.jsxs(
2065
2020
  "div",
2066
2021
  {
2067
- className: C.pagesMobileModal,
2022
+ className: w.pagesMobileModal,
2068
2023
  onClick: (u) => u.stopPropagation(),
2069
2024
  children: [
2070
- /* @__PURE__ */ t.jsxs("div", { className: C.pagesMobileModalHeader, children: [
2025
+ /* @__PURE__ */ t.jsxs("div", { className: w.pagesMobileModalHeader, children: [
2071
2026
  /* @__PURE__ */ t.jsx("div", { children: i }),
2072
2027
  /* @__PURE__ */ t.jsx(
2073
- z,
2028
+ F,
2074
2029
  {
2075
2030
  type: "Secondary",
2076
- onClick: o,
2031
+ onClick: c,
2077
2032
  children: /* @__PURE__ */ t.jsx(
2078
- b,
2033
+ v,
2079
2034
  {
2080
2035
  name: "X",
2081
2036
  fill: "var(--text-primary)"
@@ -2084,46 +2039,46 @@ const Hs = (c) => {
2084
2039
  }
2085
2040
  )
2086
2041
  ] }),
2087
- /* @__PURE__ */ t.jsx("div", { className: C.pagesMobileModalContent, children: c }),
2088
- /* @__PURE__ */ t.jsx("div", { className: C.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(
2089
- Pt,
2042
+ /* @__PURE__ */ t.jsx("div", { className: w.pagesMobileModalContent, children: o }),
2043
+ /* @__PURE__ */ t.jsx("div", { className: w.pagesMobileModalFooter, children: /* @__PURE__ */ t.jsx(
2044
+ qt,
2090
2045
  {
2091
2046
  signUp: s,
2092
- close: o
2047
+ close: c
2093
2048
  }
2094
2049
  ) })
2095
2050
  ]
2096
2051
  }
2097
2052
  );
2098
- }, Yi = ({
2099
- children: c,
2053
+ }, Cn = ({
2054
+ children: o,
2100
2055
  logo: i,
2101
2056
  signUp: a
2102
2057
  }) => {
2103
2058
  const [s, e] = f.useState(!1);
2104
2059
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2105
- /* @__PURE__ */ t.jsx(Bn, { setIsOpenModal: e }),
2060
+ /* @__PURE__ */ t.jsx(As, { setIsOpenModal: e }),
2106
2061
  s && /* @__PURE__ */ t.jsx(
2107
- Nt,
2062
+ It,
2108
2063
  {
2109
2064
  close: () => e(!1),
2110
2065
  hasPadding: !1,
2111
2066
  children: /* @__PURE__ */ t.jsx(
2112
- Pn,
2067
+ Ms,
2113
2068
  {
2114
2069
  logo: i,
2115
2070
  setIsOpen: e,
2116
2071
  signUp: a,
2117
- children: c
2072
+ children: o
2118
2073
  }
2119
2074
  )
2120
2075
  }
2121
2076
  )
2122
2077
  ] });
2123
- }, Bn = (c) => {
2124
- const { setIsOpenModal: i } = c;
2078
+ }, As = (o) => {
2079
+ const { setIsOpenModal: i } = o;
2125
2080
  return /* @__PURE__ */ t.jsx(
2126
- z,
2081
+ F,
2127
2082
  {
2128
2083
  type: "Secondary",
2129
2084
  style: {
@@ -2133,7 +2088,7 @@ const Hs = (c) => {
2133
2088
  a.stopPropagation(), window.location.pathname.includes("/admin/builder") || i(!0);
2134
2089
  },
2135
2090
  children: /* @__PURE__ */ t.jsx(
2136
- b,
2091
+ v,
2137
2092
  {
2138
2093
  name: "List",
2139
2094
  fill: "var(--text-primary)"
@@ -2141,34 +2096,31 @@ const Hs = (c) => {
2141
2096
  )
2142
2097
  }
2143
2098
  );
2144
- }, Tn = "_share_10urc_1", Mn = "_modal_10urc_9", An = "_header_10urc_21", On = "_socials_10urc_31", En = "_social_10urc_31", Rn = "_copy_10urc_41", Dn = "_title_10urc_48", zn = "_copyWrapper_10urc_54", Ln = "_copyText_10urc_63", Fn = "_copyTextMobile_10urc_76", Un = "_copyTextMiniMobile_10urc_95", tt = {
2145
- share: Tn,
2146
- modal: Mn,
2147
- header: An,
2148
- socials: On,
2149
- social: En,
2150
- copy: Rn,
2151
- title: Dn,
2152
- copyWrapper: zn,
2153
- copyText: Ln,
2154
- copyTextMobile: Fn,
2155
- copyTextMiniMobile: Un
2156
- }, Wi = ({ title: c = "Copy Product Link" }) => {
2157
- const { isOpenModal: i, setIsOpenModal: a } = qt();
2099
+ }, Os = "_share_10urc_1", Es = "_modal_10urc_9", Rs = "_header_10urc_21", Ds = "_title_10urc_48", Ls = "_copyWrapper_10urc_54", zs = "_copyText_10urc_63", Fs = "_copyTextMobile_10urc_76", Hs = "_copyTextMiniMobile_10urc_95", et = {
2100
+ share: Os,
2101
+ modal: Es,
2102
+ header: Rs,
2103
+ title: Ds,
2104
+ copyWrapper: Ls,
2105
+ copyText: zs,
2106
+ copyTextMobile: Fs,
2107
+ copyTextMiniMobile: Hs
2108
+ }, Sn = ({ title: o = "Copy Product Link" }) => {
2109
+ const { isOpenModal: i, setIsOpenModal: a } = Pt();
2158
2110
  function s() {
2159
2111
  a(!0);
2160
2112
  }
2161
2113
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2162
2114
  /* @__PURE__ */ t.jsx(
2163
- z,
2115
+ F,
2164
2116
  {
2165
- className: tt.share,
2117
+ className: et.share,
2166
2118
  onClick: (e) => {
2167
2119
  e.stopPropagation(), s();
2168
2120
  },
2169
2121
  type: "Secondary",
2170
2122
  children: /* @__PURE__ */ t.jsx(
2171
- b,
2123
+ v,
2172
2124
  {
2173
2125
  name: "Share",
2174
2126
  fill: "#757575",
@@ -2177,45 +2129,49 @@ const Hs = (c) => {
2177
2129
  )
2178
2130
  }
2179
2131
  ),
2180
- i && /* @__PURE__ */ t.jsx(Nt, { close: a, children: /* @__PURE__ */ t.jsx(Vn, { title: c }) })
2132
+ i && /* @__PURE__ */ t.jsx(It, { close: a, children: /* @__PURE__ */ t.jsx(Us, { title: o }) })
2181
2133
  ] });
2182
- }, Vn = ({ title: c = "Copy Product Link" }) => {
2183
- const { setIsOpenModal: i } = qt(), { notification: a, setNotification: s } = wt(), { setIsOpen: e } = $t(), o = window.location.href;
2134
+ }, Us = ({ title: o = "Copy Product Link" }) => {
2135
+ const { setIsOpenModal: i } = Pt(), { notifications: a, setNotifications: s } = bt(), { setIsOpen: e } = wt(), c = window.location.href;
2184
2136
  function u() {
2185
- navigator.clipboard.writeText(o), s({
2186
- message: "Link copied to clipboard",
2187
- status: "success"
2188
- });
2137
+ navigator.clipboard.writeText(c), s([
2138
+ ...a,
2139
+ {
2140
+ id: K(),
2141
+ message: "Link copied to clipboard",
2142
+ status: "success"
2143
+ }
2144
+ ]);
2189
2145
  }
2190
- function p() {
2146
+ function d() {
2191
2147
  e(!1), setTimeout(() => {
2192
2148
  i(!1), e(!0);
2193
2149
  }, 300);
2194
2150
  }
2195
- function _(h, k) {
2196
- return h.length > k ? h.slice(0, k) + "..." : h;
2151
+ function g(x, $) {
2152
+ return x.length > $ ? x.slice(0, $) + "..." : x;
2197
2153
  }
2198
2154
  return /* @__PURE__ */ t.jsxs(
2199
2155
  "div",
2200
2156
  {
2201
- className: tt.modal,
2202
- onClick: (h) => h.stopPropagation(),
2157
+ className: et.modal,
2158
+ onClick: (x) => x.stopPropagation(),
2203
2159
  children: [
2204
- /* @__PURE__ */ t.jsxs("div", { className: tt.header, children: [
2205
- /* @__PURE__ */ t.jsx("div", { className: tt.title, children: c }),
2160
+ /* @__PURE__ */ t.jsxs("div", { className: et.header, children: [
2161
+ /* @__PURE__ */ t.jsx("div", { className: et.title, children: o }),
2206
2162
  /* @__PURE__ */ t.jsx(
2207
- b,
2163
+ v,
2208
2164
  {
2209
2165
  name: "X",
2210
2166
  fill: "#757575",
2211
- onClick: p,
2167
+ onClick: d,
2212
2168
  hoverable: !0
2213
2169
  }
2214
2170
  )
2215
2171
  ] }),
2216
- /* @__PURE__ */ t.jsxs("div", { className: tt.copyWrapper, children: [
2172
+ /* @__PURE__ */ t.jsxs("div", { className: et.copyWrapper, children: [
2217
2173
  /* @__PURE__ */ t.jsxs(
2218
- z,
2174
+ F,
2219
2175
  {
2220
2176
  type: "Secondary",
2221
2177
  onClick: u,
@@ -2223,59 +2179,61 @@ const Hs = (c) => {
2223
2179
  flex: 1
2224
2180
  },
2225
2181
  children: [
2226
- /* @__PURE__ */ t.jsx("div", { className: tt.copyText, children: _(o, 100) }),
2227
- /* @__PURE__ */ t.jsx("div", { className: tt.copyTextMobile, children: _(o, 40) }),
2228
- /* @__PURE__ */ t.jsx("div", { className: tt.copyTextMiniMobile, children: _(o, 20) })
2182
+ /* @__PURE__ */ t.jsx("div", { className: et.copyText, children: g(c, 100) }),
2183
+ /* @__PURE__ */ t.jsx("div", { className: et.copyTextMobile, children: g(c, 40) }),
2184
+ /* @__PURE__ */ t.jsx("div", { className: et.copyTextMiniMobile, children: g(c, 20) })
2229
2185
  ]
2230
2186
  }
2231
2187
  ),
2232
2188
  /* @__PURE__ */ t.jsx(
2233
- z,
2189
+ F,
2234
2190
  {
2235
2191
  type: "Secondary",
2236
2192
  onClick: u,
2237
- children: a ? /* @__PURE__ */ t.jsx(b, { name: "Check" }) : /* @__PURE__ */ t.jsx(b, { name: "Copy" })
2193
+ children: a.find(
2194
+ (x) => x.message === "Link copied to clipboard"
2195
+ ) ? /* @__PURE__ */ t.jsx(v, { name: "Check" }) : /* @__PURE__ */ t.jsx(v, { name: "Copy" })
2238
2196
  }
2239
2197
  )
2240
2198
  ] })
2241
2199
  ]
2242
2200
  }
2243
2201
  );
2244
- }, Hn = "_accordion_1s1lq_1", Yn = "_header_1s1lq_9", Wn = "_icon_1s1lq_18", Gn = "_open_1s1lq_21", Xn = "_content_1s1lq_25", at = {
2245
- accordion: Hn,
2246
- header: Yn,
2247
- icon: Wn,
2248
- open: Gn,
2249
- content: Xn
2250
- }, Gi = ({ title: c, content: i, defaultOpen: a = !1 }) => {
2251
- const [s, e] = f.useState(a), [o, u] = f.useState(0), p = f.useRef(null), _ = () => {
2202
+ }, Vs = "_accordion_1s1lq_1", Ys = "_header_1s1lq_9", Ws = "_icon_1s1lq_18", Gs = "_open_1s1lq_21", Xs = "_content_1s1lq_25", it = {
2203
+ accordion: Vs,
2204
+ header: Ys,
2205
+ icon: Ws,
2206
+ open: Gs,
2207
+ content: Xs
2208
+ }, kn = ({ title: o, content: i, defaultOpen: a = !1 }) => {
2209
+ const [s, e] = f.useState(a), [c, u] = f.useState(0), d = f.useRef(null), g = () => {
2252
2210
  e(!s);
2253
2211
  };
2254
2212
  return f.useEffect(() => {
2255
- p.current && u(s ? p.current.scrollHeight : 0);
2256
- }, [s]), /* @__PURE__ */ t.jsxs("div", { className: at.accordion, children: [
2213
+ d.current && u(s ? d.current.scrollHeight : 0);
2214
+ }, [s]), /* @__PURE__ */ t.jsxs("div", { className: it.accordion, children: [
2257
2215
  /* @__PURE__ */ t.jsxs(
2258
2216
  "div",
2259
2217
  {
2260
- className: at.header,
2261
- onClick: _,
2218
+ className: it.header,
2219
+ onClick: g,
2262
2220
  children: [
2263
- /* @__PURE__ */ t.jsx("h5", { id: "h5", children: c }),
2264
- /* @__PURE__ */ t.jsx("div", { className: F(at.icon, { [at.open]: s }), children: /* @__PURE__ */ t.jsx(b, { name: "CaretDown" }) })
2221
+ /* @__PURE__ */ t.jsx("h5", { id: "h5", children: o }),
2222
+ /* @__PURE__ */ t.jsx("div", { className: U(it.icon, { [it.open]: s }), children: /* @__PURE__ */ t.jsx(v, { name: "CaretDown" }) })
2265
2223
  ]
2266
2224
  }
2267
2225
  ),
2268
2226
  /* @__PURE__ */ t.jsx(
2269
2227
  "div",
2270
2228
  {
2271
- ref: p,
2272
- className: at.content,
2273
- style: { height: `${o}px` },
2229
+ ref: d,
2230
+ className: it.content,
2231
+ style: { height: `${c}px` },
2274
2232
  children: /* @__PURE__ */ t.jsx("p", { id: "p", children: i })
2275
2233
  }
2276
2234
  )
2277
2235
  ] });
2278
- }, Xi = ({ children: c, path: i, className: a, target: s = "_self", id: e }) => {
2236
+ }, wn = ({ children: o, path: i, className: a, target: s = "_self", id: e }) => {
2279
2237
  if (window.location.pathname.includes("/admin/builder"))
2280
2238
  return /* @__PURE__ */ t.jsx(
2281
2239
  "div",
@@ -2284,45 +2242,44 @@ const Hs = (c) => {
2284
2242
  role: "link",
2285
2243
  style: { cursor: "pointer" },
2286
2244
  id: e,
2287
- children: c
2245
+ children: o
2288
2246
  }
2289
2247
  );
2290
- const o = xt(), u = /^https?:\/\//.test(i), p = (_) => {
2291
- u || s === "_blank" ? s === "_blank" ? window.open(i, "_blank") : window.open(i, "_self") : (_.preventDefault(), o(i));
2248
+ const c = xt(), u = /^https?:\/\//.test(i), d = (g) => {
2249
+ u || s === "_blank" ? s === "_blank" ? window.open(i, "_blank") : window.open(i, "_self") : (g.preventDefault(), c(i));
2292
2250
  };
2293
2251
  return /* @__PURE__ */ t.jsx(
2294
2252
  "div",
2295
2253
  {
2296
- onClick: p,
2254
+ onClick: d,
2297
2255
  className: a,
2298
2256
  role: "link",
2299
2257
  style: { cursor: "pointer" },
2300
2258
  id: e,
2301
- children: c
2259
+ children: o
2302
2260
  }
2303
2261
  );
2304
- }, Qn = "_buttonsBlock_1b2rb_1", Jn = "_slideUp_1b2rb_1", Kn = {
2305
- buttonsBlock: Qn,
2306
- slideUp: Jn
2307
- }, Qi = (c) => {
2308
- var h, k;
2309
- const { setIsOpen: i, setModalType: a, productId: s } = c, { cart: e } = it(), { pageContext: o } = ft(), u = (h = o == null ? void 0 : o.listings) == null ? void 0 : h.find((y) => y.id === s);
2262
+ }, Qs = "_buttonsBlock_1b2rb_1", Js = {
2263
+ buttonsBlock: Qs
2264
+ }, Pn = (o) => {
2265
+ var x, $;
2266
+ const { setIsOpen: i, setModalType: a, productId: s } = o, { cart: e } = nt(), { pageContext: c } = ft(), u = (x = c == null ? void 0 : c.listings) == null ? void 0 : x.find((_) => _.id === s);
2310
2267
  if (!u)
2311
2268
  return null;
2312
- const p = (k = o == null ? void 0 : o.products) == null ? void 0 : k.find(
2313
- (y) => y.uniquePath === u.productData.uniquePath
2269
+ const d = ($ = c == null ? void 0 : c.products) == null ? void 0 : $.find(
2270
+ (_) => _.uniquePath === u.productData.uniquePath
2314
2271
  );
2315
- if (!p)
2272
+ if (!d)
2316
2273
  return null;
2317
- const _ = e.parts.find((y) => y.productId === p.id);
2274
+ const g = e.parts.find((_) => _.productId === d.id);
2318
2275
  return /* @__PURE__ */ t.jsxs(
2319
2276
  "div",
2320
2277
  {
2321
- className: Kn.buttonsBlock,
2322
- onClick: (y) => y.stopPropagation(),
2278
+ className: Js.buttonsBlock,
2279
+ onClick: (_) => _.stopPropagation(),
2323
2280
  children: [
2324
2281
  /* @__PURE__ */ t.jsx(
2325
- z,
2282
+ F,
2326
2283
  {
2327
2284
  type: "Secondary",
2328
2285
  style: {
@@ -2331,11 +2288,11 @@ const Hs = (c) => {
2331
2288
  onClick: () => {
2332
2289
  a("Add To Cart"), i(!0);
2333
2290
  },
2334
- children: _ ? "Add More" : "Add To Cart"
2291
+ children: g ? "Add More" : "Add To Cart"
2335
2292
  }
2336
2293
  ),
2337
2294
  /* @__PURE__ */ t.jsx(
2338
- z,
2295
+ F,
2339
2296
  {
2340
2297
  type: "Primary",
2341
2298
  onClick: () => {
@@ -2347,15 +2304,15 @@ const Hs = (c) => {
2347
2304
  ]
2348
2305
  }
2349
2306
  );
2350
- }, Zn = "_wrapper_27wzz_1", ti = "_logo_27wzz_8", ei = "_info_27wzz_12", vt = {
2351
- wrapper: Zn,
2352
- logo: ti,
2353
- info: ei
2354
- }, Ji = ({ date: c }) => {
2355
- const { general: i } = Rt();
2307
+ }, Ks = "_wrapper_27wzz_1", Zs = "_logo_27wzz_8", tn = "_info_27wzz_12", jt = {
2308
+ wrapper: Ks,
2309
+ logo: Zs,
2310
+ info: tn
2311
+ }, qn = ({ date: o }) => {
2312
+ const { general: i } = Et();
2356
2313
  if (!i) return /* @__PURE__ */ t.jsx(t.Fragment, {});
2357
2314
  function a(s) {
2358
- const e = new Date(s), o = {
2315
+ const e = new Date(s), c = {
2359
2316
  month: "short",
2360
2317
  day: "2-digit",
2361
2318
  year: "numeric",
@@ -2363,10 +2320,10 @@ const Hs = (c) => {
2363
2320
  minute: "2-digit",
2364
2321
  hour12: !1
2365
2322
  };
2366
- return e.toLocaleDateString("en-US", o);
2323
+ return e.toLocaleDateString("en-US", c);
2367
2324
  }
2368
- return /* @__PURE__ */ t.jsxs("div", { className: vt.wrapper, children: [
2369
- /* @__PURE__ */ t.jsx("div", { className: vt.logo, children: i.info.logo ? /* @__PURE__ */ t.jsx(
2325
+ return /* @__PURE__ */ t.jsxs("div", { className: jt.wrapper, children: [
2326
+ /* @__PURE__ */ t.jsx("div", { className: jt.logo, children: i.info.logo ? /* @__PURE__ */ t.jsx(
2370
2327
  "img",
2371
2328
  {
2372
2329
  src: `https://imagedelivery.net/${i.info.logo.cfId}/w=500,h=500`,
@@ -2374,129 +2331,118 @@ const Hs = (c) => {
2374
2331
  style: { objectFit: "contain", width: "48px", height: "48px" }
2375
2332
  }
2376
2333
  ) : /* @__PURE__ */ t.jsx(
2377
- b,
2334
+ v,
2378
2335
  {
2379
2336
  name: "Image",
2380
2337
  width: 48,
2381
2338
  height: 48
2382
2339
  }
2383
2340
  ) }),
2384
- /* @__PURE__ */ t.jsxs("div", { className: vt.info, children: [
2341
+ /* @__PURE__ */ t.jsxs("div", { className: jt.info, children: [
2385
2342
  /* @__PURE__ */ t.jsx("h3", { id: "h4", children: i.info.name }),
2386
- /* @__PURE__ */ t.jsx("p", { id: "p", children: a(c) })
2343
+ /* @__PURE__ */ t.jsx("p", { id: "p", children: a(o) })
2387
2344
  ] })
2388
2345
  ] });
2389
- }, si = "_options_puxd1_1", ni = "_price_puxd1_12", ii = "_oldPrice_puxd1_19", ai = "_newPrice_puxd1_27", oi = "_animate_puxd1_34", ci = "_appearAndBounce_puxd1_1", ri = "_meta_puxd1_52", li = "_info_puxd1_58", di = "_infoRight_puxd1_66", ui = "_buttons_puxd1_73", pi = "_variants_puxd1_80", hi = "_variant_puxd1_80", mi = "_stock_puxd1_98", _i = "_variantInfo_puxd1_105", gi = "_quantity_puxd1_111", fi = "_count_puxd1_118", xi = "_focused_puxd1_135", ji = "_button_puxd1_73", vi = "_activeVariant_puxd1_161", bi = "_chargeTypes_puxd1_165", yi = "_charge_puxd1_165", Ni = "_chargeActive_puxd1_190", Ii = "_title_puxd1_198", ki = "_modal_puxd1_204", Ci = "_header_puxd1_224", Si = "_productOptions_puxd1_232", $i = "_loading_puxd1_236", Y = {
2390
- options: si,
2391
- price: ni,
2392
- oldPrice: ii,
2393
- newPrice: ai,
2394
- animate: oi,
2395
- appearAndBounce: ci,
2396
- meta: ri,
2397
- info: li,
2398
- infoRight: di,
2399
- buttons: ui,
2400
- variants: pi,
2401
- variant: hi,
2402
- stock: mi,
2403
- variantInfo: _i,
2404
- quantity: gi,
2405
- count: fi,
2406
- focused: xi,
2407
- button: ji,
2408
- activeVariant: vi,
2409
- chargeTypes: bi,
2410
- charge: yi,
2411
- chargeActive: Ni,
2412
- title: Ii,
2413
- modal: ki,
2414
- header: Ci,
2415
- productOptions: Si,
2416
- loading: $i
2417
- }, Ki = (c) => {
2418
- var y;
2419
- const { pageContext: i } = ft(), a = (y = i == null ? void 0 : i.listings) == null ? void 0 : y.find((n) => n.id === c.productId), [s, e] = f.useState(!0), [o, u] = f.useState(null), p = (o == null ? void 0 : o.variants[0]) || null, [_, h] = f.useState(
2420
- p != null && p.chargeTypes && p.chargeTypes.length > 1 ? p.chargeTypes[0] : "ONE_TIME"
2421
- ), { addProducts: k } = it();
2346
+ }, en = "_variants_puxd1_80", sn = "_variant_puxd1_80", nn = "_stock_puxd1_98", an = "_variantInfo_puxd1_105", on = "_chargeTypes_puxd1_165", cn = "_charge_puxd1_165", rn = "_chargeActive_puxd1_190", ln = "_title_puxd1_198", dn = "_modal_puxd1_204", un = "_header_puxd1_224", hn = "_productOptions_puxd1_232", pn = "_loading_puxd1_236", W = {
2347
+ variants: en,
2348
+ variant: sn,
2349
+ stock: nn,
2350
+ variantInfo: an,
2351
+ chargeTypes: on,
2352
+ charge: cn,
2353
+ chargeActive: rn,
2354
+ title: ln,
2355
+ modal: dn,
2356
+ header: un,
2357
+ productOptions: hn,
2358
+ loading: pn
2359
+ }, Bn = (o) => {
2360
+ var _;
2361
+ const { pageContext: i } = ft(), a = (_ = i == null ? void 0 : i.listings) == null ? void 0 : _.find((n) => n.id === o.productId), [s, e] = f.useState(!0), [c, u] = f.useState(null), d = (c == null ? void 0 : c.variants[0]) || null, [g, x] = f.useState(
2362
+ d != null && d.chargeTypes && d.chargeTypes.length > 1 ? d.chargeTypes[0] : "ONE_TIME"
2363
+ ), { addProducts: $ } = nt();
2422
2364
  if (f.useEffect(() => {
2423
2365
  (async () => {
2424
2366
  e(!0);
2425
- const d = await zt(
2367
+ const l = await Dt(
2426
2368
  encodeURIComponent(
2427
2369
  `/product/${a.productData.uniquePath}`
2428
2370
  )
2429
2371
  );
2430
- k(d == null ? void 0 : d.data.products), u(d == null ? void 0 : d.data.products[0]), e(!1);
2372
+ $(l == null ? void 0 : l.data.products), u(l == null ? void 0 : l.data.products[0]), e(!1);
2431
2373
  })();
2432
2374
  }, []), s)
2433
2375
  return /* @__PURE__ */ t.jsx(
2434
2376
  "div",
2435
2377
  {
2436
- className: Y.modal,
2378
+ className: W.modal,
2437
2379
  onClick: (n) => n.stopPropagation(),
2438
- children: /* @__PURE__ */ t.jsx("div", { className: Y.loading, children: /* @__PURE__ */ t.jsx(Dt, {}) })
2380
+ children: /* @__PURE__ */ t.jsx("div", { className: W.loading, children: /* @__PURE__ */ t.jsx(Rt, {}) })
2439
2381
  }
2440
2382
  );
2441
- if (!o) {
2442
- c.setIsOpen(!1);
2383
+ if (!c) {
2384
+ o.setIsOpen(!1);
2443
2385
  return;
2444
2386
  }
2445
- if (!p) {
2446
- c.setIsOpen(!1);
2387
+ if (!d) {
2388
+ o.setIsOpen(!1);
2447
2389
  return;
2448
2390
  }
2449
2391
  return /* @__PURE__ */ t.jsxs(
2450
2392
  "div",
2451
2393
  {
2452
- className: Y.modal,
2394
+ className: W.modal,
2453
2395
  onClick: (n) => n.stopPropagation(),
2454
2396
  children: [
2455
- c.type === "Add To Cart" && !s && /* @__PURE__ */ t.jsx(
2456
- qi,
2397
+ o.type === "Add To Cart" && !s && /* @__PURE__ */ t.jsx(
2398
+ mn,
2457
2399
  {
2458
- variants: o.variants,
2459
- activeVariant: p,
2460
- activeChargeType: _,
2461
- setActiveChargeType: h,
2462
- productId: o.id,
2463
- setIsOpen: c.setIsOpen
2400
+ variants: c.variants,
2401
+ activeVariant: d,
2402
+ activeChargeType: g,
2403
+ setActiveChargeType: x,
2404
+ productId: c.id,
2405
+ setIsOpen: o.setIsOpen
2464
2406
  }
2465
2407
  ),
2466
- c.type === "Buy Now" && !s && /* @__PURE__ */ t.jsx(
2467
- wi,
2408
+ o.type === "Buy Now" && !s && /* @__PURE__ */ t.jsx(
2409
+ gn,
2468
2410
  {
2469
- product: o,
2470
- setIsOpen: c.setIsOpen
2411
+ product: c,
2412
+ setIsOpen: o.setIsOpen
2471
2413
  }
2472
2414
  )
2473
2415
  ]
2474
2416
  }
2475
2417
  );
2476
- }, qi = (c) => {
2477
- const { variants: i, activeChargeType: a, setActiveChargeType: s, activeVariant: e, productId: o, setIsOpen: u } = c, { cart: p, addProductToCart: _, addProducts: h, updateQuantityOfProduct: k } = it(), { setNotification: y } = wt(), { pageContext: n } = ft();
2478
- async function d(r) {
2479
- const B = p.parts.find(
2480
- (g) => g.productId === c.productId && g.productVariantId === r
2418
+ }, mn = (o) => {
2419
+ const { variants: i, activeChargeType: a, setActiveChargeType: s, activeVariant: e, productId: c, setIsOpen: u } = o, { cart: d, addProductToCart: g, addProducts: x, updateQuantityOfProduct: $ } = nt(), { notifications: _, setNotifications: n } = bt(), { pageContext: l } = ft();
2420
+ async function m(b) {
2421
+ const p = d.parts.find(
2422
+ (P) => P.productId === o.productId && P.productVariantId === b
2481
2423
  );
2482
- B ? k({
2483
- productId: o,
2484
- productVariantId: r,
2485
- quantity: B.quantity + 1
2486
- }) : (n != null && n.products && await h(n.products), await _({
2487
- productId: o,
2488
- productVariantId: r,
2424
+ p ? $({
2425
+ productId: c,
2426
+ productVariantId: b,
2427
+ quantity: p.quantity + 1
2428
+ }) : (l != null && l.products && await x(l.products), await g({
2429
+ productId: c,
2430
+ productVariantId: b,
2489
2431
  quantity: 1
2490
- })), y({
2491
- message: "Product added to cart",
2492
- status: "success"
2493
- });
2432
+ })), n([
2433
+ ..._,
2434
+ {
2435
+ id: K(),
2436
+ message: "Product added to cart",
2437
+ status: "success"
2438
+ }
2439
+ ]);
2494
2440
  }
2495
2441
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2496
- /* @__PURE__ */ t.jsxs("div", { className: Y.header, children: [
2442
+ /* @__PURE__ */ t.jsxs("div", { className: W.header, children: [
2497
2443
  /* @__PURE__ */ t.jsx("div", { id: "h3", children: "Choose a variant" }),
2498
2444
  /* @__PURE__ */ t.jsx(
2499
- b,
2445
+ v,
2500
2446
  {
2501
2447
  name: "X",
2502
2448
  width: 24,
@@ -2507,55 +2453,55 @@ const Hs = (c) => {
2507
2453
  }
2508
2454
  )
2509
2455
  ] }),
2510
- e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: Y.chargeTypes, children: e.chargeTypes.map((r) => /* @__PURE__ */ t.jsx(
2456
+ e.chargeTypes && e.chargeTypes.length > 1 && /* @__PURE__ */ t.jsx("div", { className: W.chargeTypes, children: e.chargeTypes.map((b) => /* @__PURE__ */ t.jsx(
2511
2457
  "div",
2512
2458
  {
2513
- className: F(Y.charge, {
2514
- [Y.chargeActive]: a === r
2459
+ className: U(W.charge, {
2460
+ [W.chargeActive]: a === b
2515
2461
  }),
2516
- onClick: () => s(r),
2517
- children: It[r]
2462
+ onClick: () => s(b),
2463
+ children: Nt[b]
2518
2464
  },
2519
- r
2465
+ b
2520
2466
  )) }),
2521
- /* @__PURE__ */ t.jsx("div", { className: Y.variants, children: i.map((r) => {
2522
- var B, g;
2467
+ /* @__PURE__ */ t.jsx("div", { className: W.variants, children: i.map((b) => {
2468
+ var p, P;
2523
2469
  return /* @__PURE__ */ t.jsxs(
2524
2470
  "div",
2525
2471
  {
2526
- className: F(Y.variant),
2472
+ className: U(W.variant),
2527
2473
  onClick: () => {
2528
- d(r.id), u(!1);
2474
+ m(b.id), u(!1);
2529
2475
  },
2530
2476
  children: [
2531
- /* @__PURE__ */ t.jsxs("div", { className: Y.variantInfo, children: [
2532
- /* @__PURE__ */ t.jsx("span", { className: Y.title, children: r.name }),
2477
+ /* @__PURE__ */ t.jsxs("div", { className: W.variantInfo, children: [
2478
+ /* @__PURE__ */ t.jsx("span", { className: W.title, children: b.name }),
2533
2479
  /* @__PURE__ */ t.jsxs("span", { children: [
2534
2480
  "$",
2535
- a === "ONE_TIME" ? r.price.amount : r.subscriptionSettings ? r.subscriptionSettings.price.amount : "Price Not Found"
2481
+ a === "ONE_TIME" ? b.price.amount : b.subscriptionSettings ? b.subscriptionSettings.price.amount : "Price Not Found"
2536
2482
  ] })
2537
2483
  ] }),
2538
- /* @__PURE__ */ t.jsx("div", { children: a === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: Y.stock, children: [
2539
- (B = r.quantity.restrictions) != null && B.max || r.quantity.available !== void 0 ? ((g = r.quantity.restrictions) == null ? void 0 : g.max) || r.quantity.available : "∞",
2484
+ /* @__PURE__ */ t.jsx("div", { children: a === "ONE_TIME" && /* @__PURE__ */ t.jsxs("span", { className: W.stock, children: [
2485
+ (p = b.quantity.restrictions) != null && p.max || b.quantity.available !== void 0 ? ((P = b.quantity.restrictions) == null ? void 0 : P.max) || b.quantity.available : "∞",
2540
2486
  " ",
2541
2487
  "in stock"
2542
2488
  ] }) })
2543
2489
  ]
2544
2490
  },
2545
- r.id
2491
+ b.id
2546
2492
  );
2547
2493
  }) })
2548
2494
  ] });
2549
- }, wi = (c) => {
2550
- const { product: i, setIsOpen: a } = c;
2495
+ }, gn = (o) => {
2496
+ const { product: i, setIsOpen: a } = o;
2551
2497
  return /* @__PURE__ */ t.jsxs(t.Fragment, { children: [
2552
- /* @__PURE__ */ t.jsxs("div", { className: Y.header, children: [
2498
+ /* @__PURE__ */ t.jsxs("div", { className: W.header, children: [
2553
2499
  /* @__PURE__ */ t.jsxs("div", { id: "h3", children: [
2554
2500
  "Buy ",
2555
2501
  yt(i.name)
2556
2502
  ] }),
2557
2503
  /* @__PURE__ */ t.jsx(
2558
- b,
2504
+ v,
2559
2505
  {
2560
2506
  name: "X",
2561
2507
  width: 24,
@@ -2570,105 +2516,56 @@ const Hs = (c) => {
2570
2516
  }
2571
2517
  )
2572
2518
  ] }),
2573
- /* @__PURE__ */ t.jsx("div", { className: Y.productOptions, children: /* @__PURE__ */ t.jsx(
2574
- Hs,
2519
+ /* @__PURE__ */ t.jsx("div", { className: W.productOptions, children: /* @__PURE__ */ t.jsx(
2520
+ Ke,
2575
2521
  {
2576
2522
  product: i,
2577
2523
  setIsOpen: a
2578
2524
  }
2579
2525
  ) })
2580
2526
  ] });
2581
- }, Pi = "_wrapper_1efqk_1", Bi = "_label_1efqk_10", Ti = "_contentBorder_1efqk_19", Mi = "_contentField_1efqk_23", Ai = "_textarea_1efqk_27", Oi = "_length_1efqk_42", nt = {
2582
- wrapper: Pi,
2583
- label: Bi,
2584
- contentBorder: Ti,
2585
- contentField: Mi,
2586
- textarea: Ai,
2587
- length: Oi
2588
- }, Zi = (c) => {
2589
- const {
2590
- onChange: i,
2591
- label: a,
2592
- value: s,
2593
- maxLength: e,
2594
- placeholder: o = "Type something...",
2595
- type: u = "text"
2596
- } = c, [p, _] = f.useState(s.length), { themeSettings: h } = Lt();
2597
- function k(y) {
2598
- return u === "number" ? y.replace(/[^\d\n]+/g, "") : y;
2599
- }
2600
- return /* @__PURE__ */ t.jsxs("div", { className: nt.wrapper, children: [
2601
- a && /* @__PURE__ */ t.jsx(
2602
- "label",
2603
- {
2604
- className: nt.label,
2605
- htmlFor: a,
2606
- children: a
2607
- }
2608
- ),
2609
- /* @__PURE__ */ t.jsx(
2610
- "textarea",
2611
- {
2612
- id: a,
2613
- value: s,
2614
- onChange: (y) => {
2615
- const n = k(y.target.value);
2616
- _(n.length), i(n);
2617
- },
2618
- placeholder: o,
2619
- className: F(nt.textarea, {
2620
- [nt.contentBorder]: h.inputs.border.active,
2621
- [nt.contentField]: h.inputs.field.active
2622
- }),
2623
- maxLength: e
2624
- }
2625
- ),
2626
- e && /* @__PURE__ */ t.jsxs("div", { className: nt.length, children: [
2627
- p,
2628
- "/",
2629
- e
2630
- ] })
2631
- ] });
2632
2527
  };
2633
2528
  export {
2634
- Gi as Accordion,
2635
- Bn as BurgerMenuButton,
2636
- z as Button,
2637
- vs as ButtonTypeSettings,
2638
- Ui as ButtonsSettings,
2639
- zi as CategorySettings,
2640
- It as ChargeTypes,
2529
+ kn as Accordion,
2530
+ As as BurgerMenuButton,
2531
+ F as Button,
2532
+ qe as ButtonTypeSettings,
2533
+ yn as ButtonsSettings,
2534
+ jn as CategorySettings,
2535
+ Nt as ChargeTypes,
2641
2536
  Tt as ChooseImage,
2642
- sa as ChooseImageModal,
2643
- wn as EmptyCart,
2644
- Fi as FormSettings,
2645
- Hi as HeaderButtons,
2646
- b as Icon,
2647
- bt as InputSettings,
2648
- Ot as InputUI,
2649
- na as ItemsSettings,
2650
- Di as LayoutSettings,
2651
- Xi as Link,
2652
- Vi as ListingSelector,
2653
- Dt as Loader,
2654
- Ji as MetaInfoPost,
2655
- Nt as Modal,
2656
- Yi as PagesMobileMenu,
2657
- Pn as PagesMobileModal,
2658
- Li as PagesSettings,
2659
- Qi as ProductCardButtons,
2660
- Ki as ProductCardModal,
2661
- Hs as ProductOptions,
2662
- kt as RangeSelector,
2537
+ Mn as ChooseImageModal,
2538
+ $s as EmptyCart,
2539
+ bn as FormSettings,
2540
+ Nn as HeaderButtons,
2541
+ v as Icon,
2542
+ vt as InputSettings,
2543
+ At as InputUI,
2544
+ An as ItemsSettings,
2545
+ _n as LayoutSettings,
2546
+ wn as Link,
2547
+ In as ListingSelector,
2548
+ Rt as Loader,
2549
+ qn as MetaInfoPost,
2550
+ It as Modal,
2551
+ Cn as PagesMobileMenu,
2552
+ Ms as PagesMobileModal,
2553
+ vn as PagesSettings,
2554
+ Pn as ProductCardButtons,
2555
+ Bn as ProductCardModal,
2556
+ Ke as ProductOptions,
2557
+ On as RadioUI,
2558
+ Ct as RangeSelector,
2663
2559
  st as Select,
2664
- ia as SelectInfiniteList,
2665
- Wi as ShareLink,
2666
- $n as ShoppingButton,
2667
- qn as ShoppingModalCart,
2668
- ot as Switch,
2669
- aa as TextSettings,
2670
- oa as TextareaSettings,
2671
- Zi as TextareaUI,
2672
- ca as TypesText,
2673
- Pt as UserInfo
2560
+ En as SelectInfiniteList,
2561
+ Rn as SelectUI,
2562
+ Sn as ShareLink,
2563
+ Bs as ShoppingButton,
2564
+ Ts as ShoppingModalCart,
2565
+ at as Switch,
2566
+ Dn as TextSettings,
2567
+ Ln as TextareaSettings,
2568
+ zn as TextareaUI,
2569
+ Fn as TypesText,
2570
+ qt as UserInfo
2674
2571
  };