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