@burdenoff/microfe-billing 2026.1023.2 → 2026.1026.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/billing/modules/checkout/hooks/useNativeCheckout.js +30 -30
- package/dist/billing/modules/checkout/pages/CheckoutPage.js +709 -709
- package/dist/billing/modules/checkout/pages/CheckoutPage.js.map +1 -1
- package/dist/billing/providers/BillingProvider.js +37 -31
- package/dist/billing/providers/BillingProvider.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,48 +1,48 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { isNativeIAPAvailable as e } from "../../../lib/native-purchases.js";
|
|
2
|
+
import { useBilling as t } from "../../../providers/BillingProvider.js";
|
|
3
|
+
import { AccessDenied as n } from "../../../shared/components/AccessDenied.js";
|
|
4
|
+
import { PageHeader as r } from "../../../shared/components/PageHeader.js";
|
|
4
5
|
import "../../../shared/components/index.js";
|
|
5
|
-
import { useBillingEventEmitter as
|
|
6
|
-
import { getStoredBillingAccountId as
|
|
7
|
-
import { useBillingPermissions as
|
|
8
|
-
import { useGetActiveSubscriptionsCheckoutQuery as
|
|
9
|
-
import { useAddonCartStore as
|
|
10
|
-
import { useBillingNavigate as
|
|
11
|
-
import { recordAffiliateEvent as
|
|
12
|
-
import { useMyWorkspaces as
|
|
13
|
-
import { STORE_SHIPPING_ITEM_ID as
|
|
14
|
-
import { useCheckout as
|
|
15
|
-
import {
|
|
16
|
-
import {
|
|
17
|
-
import {
|
|
18
|
-
import { usePaymentStatusPolling as me } from "../hooks/usePaymentStatusPolling.js";
|
|
6
|
+
import { useBillingEventEmitter as i } from "../../../hooks/useBillingEventEmitter.js";
|
|
7
|
+
import { getStoredBillingAccountId as a } from "../../../hooks/useBillingAccountSelection.js";
|
|
8
|
+
import { useBillingPermissions as o } from "../../../hooks/useBillingPermissions.js";
|
|
9
|
+
import { useGetActiveSubscriptionsCheckoutQuery as ee, useGetBillingAccountsCheckoutQuery as te, useGetCostOfCreditsCheckoutQuery as ne, useGetPaymentMethodsCheckoutQuery as re, useGetPlanCheckoutQuery as ie, useGetSelectedAddonCheckoutQuery as ae, useGetStoreOrderCheckoutQuery as oe } from "../../../../generated/global-operations.js";
|
|
10
|
+
import { useAddonCartStore as se } from "../../addons/store/addonCartStore.js";
|
|
11
|
+
import { useBillingNavigate as ce } from "../../../hooks/useBillingNavigate.js";
|
|
12
|
+
import { recordAffiliateEvent as le } from "../../affiliate/api.js";
|
|
13
|
+
import { useMyWorkspaces as ue } from "../../usage/hooks/useUsage.js";
|
|
14
|
+
import { STORE_SHIPPING_ITEM_ID as de, useSetStoreOrderShipping as fe } from "../hooks/useStoreShipping.js";
|
|
15
|
+
import { useCheckout as pe } from "../hooks/useCheckout.js";
|
|
16
|
+
import { useNativeCheckout as me } from "../hooks/useNativeCheckout.js";
|
|
17
|
+
import { usePaymentProviders as he } from "../hooks/usePaymentProviders.js";
|
|
18
|
+
import { usePaymentStatusPolling as ge } from "../hooks/usePaymentStatusPolling.js";
|
|
19
19
|
import "../hooks/index.js";
|
|
20
|
-
import { NativeCheckoutView as
|
|
21
|
-
import { WebCheckoutRedirectView as
|
|
22
|
-
import { BillingAccountSelector as
|
|
23
|
-
import { OrderSummary as
|
|
24
|
-
import { PromoCodeInput as
|
|
25
|
-
import { CreditsAmountInput as
|
|
26
|
-
import { StripePaymentForm as
|
|
27
|
-
import { RazorpayPaymentButton as
|
|
28
|
-
import { SubscriptionSelector as
|
|
29
|
-
import { SimpleAutoPayToggle as
|
|
30
|
-
import { UnifiedPaymentMethodSelector as
|
|
31
|
-
import { CompleteBillingAccountModal as
|
|
32
|
-
import { StoreShippingSection as
|
|
33
|
-
import { WorkspaceQuotaAssignmentModal as
|
|
20
|
+
import { NativeCheckoutView as _e } from "../components/NativeCheckoutView.js";
|
|
21
|
+
import { WebCheckoutRedirectView as ve } from "../components/WebCheckoutRedirectView.js";
|
|
22
|
+
import { BillingAccountSelector as ye } from "../components/BillingAccountSelector.js";
|
|
23
|
+
import { OrderSummary as be } from "../components/OrderSummary.js";
|
|
24
|
+
import { PromoCodeInput as xe } from "../components/PromoCodeInput.js";
|
|
25
|
+
import { CreditsAmountInput as Se } from "../components/CreditsAmountInput.js";
|
|
26
|
+
import { StripePaymentForm as Ce } from "../components/StripePaymentForm.js";
|
|
27
|
+
import { RazorpayPaymentButton as we } from "../components/RazorpayPaymentButton.js";
|
|
28
|
+
import { SubscriptionSelector as Te } from "../components/SubscriptionSelector.js";
|
|
29
|
+
import { SimpleAutoPayToggle as Ee } from "../components/SimpleAutoPayToggle.js";
|
|
30
|
+
import { UnifiedPaymentMethodSelector as De } from "../components/UnifiedPaymentMethodSelector.js";
|
|
31
|
+
import { CompleteBillingAccountModal as Oe, isBillingAccountComplete as ke } from "../components/CompleteBillingAccountModal.js";
|
|
32
|
+
import { StoreShippingSection as Ae } from "../components/StoreShippingSection.js";
|
|
33
|
+
import { WorkspaceQuotaAssignmentModal as je, isWorkspaceScopedQuota as Me } from "../components/WorkspaceQuotaAssignmentModal.js";
|
|
34
34
|
import "../components/index.js";
|
|
35
|
-
import { buildStoreOrderCheckoutItems as
|
|
36
|
-
import { useCallback as
|
|
37
|
-
import { ArrowLeft as
|
|
38
|
-
import { useLocation as
|
|
39
|
-
import { useAppShell as
|
|
40
|
-
import { Fragment as
|
|
41
|
-
import { useI18n as
|
|
42
|
-
import { getProfileScopedKey as
|
|
43
|
-
import { PagePurpose as
|
|
35
|
+
import { buildStoreOrderCheckoutItems as Ne, normalizeStoreOrderCurrency as Pe } from "../utils/storeOrder.js";
|
|
36
|
+
import { useCallback as s, useEffect as c, useMemo as l, useRef as Fe, useState as u } from "react";
|
|
37
|
+
import { ArrowLeft as Ie, ArrowRight as Le, Blocks as Re, CheckCircle as ze, Coins as Be, CreditCard as Ve, Loader2 as d, Package as He, Receipt as Ue, RefreshCw as We, ShoppingCart as Ge, Wallet as Ke, XCircle as qe } from "lucide-react";
|
|
38
|
+
import { useLocation as Je, useParams as Ye } from "react-router";
|
|
39
|
+
import { useAppShell as Xe } from "@burdenoff/fe-libs/shared/providers/shell";
|
|
40
|
+
import { Fragment as f, jsx as p, jsxs as m } from "react/jsx-runtime";
|
|
41
|
+
import { useI18n as Ze } from "@burdenoff/fe-libs/shared/providers/shell/I18nProvider";
|
|
42
|
+
import { getProfileScopedKey as Qe } from "@burdenoff/fe-libs/shared/utils";
|
|
43
|
+
import { PagePurpose as $e } from "@burdenoff/fe-libs/ui";
|
|
44
44
|
//#region src/billing/modules/checkout/pages/CheckoutPage.tsx
|
|
45
|
-
function
|
|
45
|
+
function et(e) {
|
|
46
46
|
return typeof e.id != "string" || typeof e.name != "string" || typeof e.email != "string" || typeof e.currency != "string" || typeof e.creditAmount != "number" || typeof e.isActive != "boolean" ? null : {
|
|
47
47
|
...e,
|
|
48
48
|
id: e.id,
|
|
@@ -54,17 +54,17 @@ function $e(e) {
|
|
|
54
54
|
billingAddresses: e.billingAddresses === null ? null : e.billingAddresses?.flatMap((e) => e ? [{ ...e }] : [])
|
|
55
55
|
};
|
|
56
56
|
}
|
|
57
|
-
var
|
|
58
|
-
let { t:
|
|
59
|
-
let n =
|
|
57
|
+
var tt = () => {
|
|
58
|
+
let { t: tt } = Ze(), h = (e, t) => {
|
|
59
|
+
let n = tt(e);
|
|
60
60
|
return n === e ? t : n;
|
|
61
|
-
}, { planId:
|
|
62
|
-
id:
|
|
61
|
+
}, { planId: nt, addonId: rt, storeOrderId: g } = Ye(), _ = ce(), v = Je(), y = v.state, it = o(), { emit: b } = i(), { orgId: x, stripePublishableKey: at, razorpayKey: ot, apiGatewayUrl: st, authToken: ct, currentUser: lt, workspaceId: S } = t(), { productSlug: ut } = Xe(), dt = Fe(null), { workspaces: ft } = ue(), pt = ft.length > 0 ? ft : S ? [{
|
|
62
|
+
id: S,
|
|
63
63
|
name: "Current workspace"
|
|
64
|
-
}] : [], { items:
|
|
65
|
-
|
|
66
|
-
if (
|
|
67
|
-
let e = typeof window < "u" ? window.localStorage.getItem(
|
|
64
|
+
}] : [], { items: C, clearCart: mt, _hasHydrated: w } = se(), T = v.pathname.includes("/checkout/addons") && !rt, E = v.pathname.includes("/checkout/store") && !!g, D = T ? "ADDON" : E ? "ORDER" : y?.purchaseType ?? (nt ? "PLAN" : rt ? "ADDON" : "CREDITS"), O = y?.itemId ?? nt ?? rt ?? g, [ht, gt] = u(!1), _t = Fe(!1), [vt, yt] = u(!1), [bt, xt] = u([]), [St, Ct] = u(null), [k, A] = u("select"), [j, wt] = u(null), [Tt, M] = u(null), [N, Et] = u(null), [Dt, Ot] = u("card");
|
|
65
|
+
c(() => {
|
|
66
|
+
if (k !== "success" || !N) return;
|
|
67
|
+
let e = typeof window < "u" ? window.localStorage.getItem(Qe("boff-referral-attribution")) : null;
|
|
68
68
|
if (!e) return;
|
|
69
69
|
let t;
|
|
70
70
|
try {
|
|
@@ -73,191 +73,191 @@ var et = () => {
|
|
|
73
73
|
return;
|
|
74
74
|
}
|
|
75
75
|
if (!t.journeyId && !t.codeId) return;
|
|
76
|
-
let n =
|
|
77
|
-
|
|
76
|
+
let n = N.transactionId || j?.paymentId || j?.orderId || g || O || D, r = `${t.journeyId ?? "journey"}:${n}`;
|
|
77
|
+
dt.current !== r && (dt.current = r, le({
|
|
78
78
|
journeyId: t.journeyId,
|
|
79
79
|
codeId: t.codeId,
|
|
80
|
-
eventType:
|
|
81
|
-
productSlug:
|
|
82
|
-
actorUserId:
|
|
83
|
-
orderId:
|
|
84
|
-
billingAccountId:
|
|
85
|
-
storeOrderId:
|
|
86
|
-
valueAmount:
|
|
87
|
-
currency:
|
|
80
|
+
eventType: D === "ORDER" ? "STORE_PURCHASE" : "PAID_CONVERSION",
|
|
81
|
+
productSlug: ut,
|
|
82
|
+
actorUserId: lt?.id,
|
|
83
|
+
orderId: N.transactionId || j?.paymentId || j?.orderId,
|
|
84
|
+
billingAccountId: N.billingAccountId,
|
|
85
|
+
storeOrderId: D === "ORDER" ? g : void 0,
|
|
86
|
+
valueAmount: N.total,
|
|
87
|
+
currency: N.currency,
|
|
88
88
|
mode: "billing-checkout",
|
|
89
89
|
metadata: {
|
|
90
|
-
purchaseType:
|
|
91
|
-
billingAccountName:
|
|
90
|
+
purchaseType: D,
|
|
91
|
+
billingAccountName: N.billingAccountName
|
|
92
92
|
}
|
|
93
93
|
}, {
|
|
94
|
-
apiGatewayUrl:
|
|
95
|
-
authToken:
|
|
96
|
-
orgId:
|
|
94
|
+
apiGatewayUrl: st,
|
|
95
|
+
authToken: ct,
|
|
96
|
+
orgId: x
|
|
97
97
|
}).catch(() => {
|
|
98
|
-
|
|
98
|
+
dt.current = null;
|
|
99
99
|
}));
|
|
100
100
|
}, [
|
|
101
|
-
ot,
|
|
102
101
|
st,
|
|
103
|
-
ct
|
|
104
|
-
|
|
105
|
-
A,
|
|
106
|
-
S,
|
|
107
|
-
M?.orderId,
|
|
108
|
-
M?.paymentId,
|
|
109
|
-
lt,
|
|
110
|
-
P,
|
|
102
|
+
ct,
|
|
103
|
+
lt?.id,
|
|
111
104
|
O,
|
|
112
|
-
|
|
105
|
+
k,
|
|
106
|
+
x,
|
|
107
|
+
j?.orderId,
|
|
108
|
+
j?.paymentId,
|
|
109
|
+
ut,
|
|
110
|
+
N,
|
|
111
|
+
D,
|
|
112
|
+
g
|
|
113
113
|
]);
|
|
114
|
-
let [
|
|
114
|
+
let [P, kt] = u(1), F = pe({
|
|
115
115
|
defaultCurrency: "USD",
|
|
116
|
-
upgradeFromSubscriptionId:
|
|
117
|
-
downgradeFromSubscriptionId:
|
|
118
|
-
}), { config:
|
|
119
|
-
paymentId:
|
|
120
|
-
billingAccountId:
|
|
121
|
-
paymentType:
|
|
116
|
+
upgradeFromSubscriptionId: y?.upgradeFromSubscriptionId,
|
|
117
|
+
downgradeFromSubscriptionId: y?.downgradeFromSubscriptionId
|
|
118
|
+
}), { config: At, stripeEnabled: jt, razorpayEnabled: Mt } = he(), { elapsedTime: Nt, error: Pt } = ge({
|
|
119
|
+
paymentId: k === "processing" ? j?.paymentId ?? null : null,
|
|
120
|
+
billingAccountId: F.billingAccount?.id ?? N?.billingAccountId ?? null,
|
|
121
|
+
paymentType: Dt,
|
|
122
122
|
pollingInterval: 5e3,
|
|
123
123
|
maxPollingTime: 3e5,
|
|
124
124
|
onSuccess: (e) => {
|
|
125
|
-
if (e.transactionId &&
|
|
125
|
+
if (e.transactionId && Et((t) => t && {
|
|
126
126
|
...t,
|
|
127
127
|
transactionId: e.transactionId
|
|
128
|
-
}),
|
|
129
|
-
let e = (
|
|
128
|
+
}), A("success"), T && mt(), (D === "PLAN" || D === "ADDON") && S) {
|
|
129
|
+
let e = (I?.getPlan?.features ?? []).filter((e) => e != null).filter((e) => e.quota?.name && Me(e.quota.name)).map((e) => {
|
|
130
130
|
let t = e.quota?.limits, n = t && "type" in t ? String(t.type) : "number", r = e.context && "quantity" in e.context ? Number(e.context.quantity) : null, i = t && "value" in t ? Number(t.value) : null, a = r ?? i;
|
|
131
131
|
return {
|
|
132
132
|
quotaName: e.quota.name,
|
|
133
|
-
productId:
|
|
133
|
+
productId: I?.getPlan?.context?.productId ?? "platform",
|
|
134
134
|
limit: n === "number" ? a : null,
|
|
135
135
|
noLimit: n !== "number",
|
|
136
136
|
resetPeriod: "NEVER",
|
|
137
137
|
quotaMode: "dedicated"
|
|
138
138
|
};
|
|
139
139
|
});
|
|
140
|
-
e.length > 0 && (
|
|
141
|
-
let t = e.data?.getActiveSubscriptions?.find((e) => e.planId ===
|
|
142
|
-
t &&
|
|
143
|
-
}),
|
|
140
|
+
e.length > 0 && (xt(e), Jt().then((e) => {
|
|
141
|
+
let t = e.data?.getActiveSubscriptions?.find((e) => e.planId === O);
|
|
142
|
+
t && Ct(t.id);
|
|
143
|
+
}), pt.length > 1 && yt(!0));
|
|
144
144
|
}
|
|
145
145
|
},
|
|
146
146
|
onFailure: (e) => {
|
|
147
|
-
|
|
147
|
+
M(e.failureReason || "Payment failed"), A("error");
|
|
148
148
|
},
|
|
149
149
|
onTimeout: () => {
|
|
150
|
-
|
|
150
|
+
M("Payment verification timed out. Please check your billing history for the payment status."), A("error");
|
|
151
151
|
}
|
|
152
|
-
}), { data:
|
|
153
|
-
variables: { id:
|
|
154
|
-
skip:
|
|
155
|
-
}), { data:
|
|
156
|
-
variables: { addonIDs:
|
|
157
|
-
skip:
|
|
158
|
-
}), { data:
|
|
159
|
-
variables: { id:
|
|
160
|
-
skip: !
|
|
161
|
-
}),
|
|
162
|
-
let e =
|
|
152
|
+
}), { data: Ft, loading: It, refetch: Lt } = te({}), { data: I, loading: Rt } = ie({
|
|
153
|
+
variables: { id: O },
|
|
154
|
+
skip: D !== "PLAN" || !O
|
|
155
|
+
}), { data: L, loading: zt } = ae({
|
|
156
|
+
variables: { addonIDs: O ? [O] : [] },
|
|
157
|
+
skip: D !== "ADDON" || !O || E
|
|
158
|
+
}), { data: R } = oe({
|
|
159
|
+
variables: { id: g },
|
|
160
|
+
skip: !E || !g
|
|
161
|
+
}), z = D === "PLAN" ? I?.getPlan?.nativeProductId ?? O : D === "ADDON" && !T ? L?.getSelectedAddons?.[0]?.nativeProductId ?? O : void 0, Bt = l(() => {
|
|
162
|
+
let e = R?.getStoreOrder?.lineItems;
|
|
163
163
|
return Array.isArray(e) ? e : [];
|
|
164
|
-
}, [
|
|
164
|
+
}, [R]), B = E && Bt.some((e) => String(e.itemType).toUpperCase() === "PHYSICAL"), Vt = Pe(R?.getStoreOrder?.currency), [V, Ht] = u({
|
|
165
165
|
shippingAddressId: null,
|
|
166
166
|
shippingMethodId: null,
|
|
167
167
|
shippingCost: 0,
|
|
168
168
|
destinationCountry: null
|
|
169
|
-
}), [
|
|
170
|
-
variables: { billingAccountId:
|
|
171
|
-
skip: !
|
|
172
|
-
}), { data:
|
|
173
|
-
variables: { billingAccountId:
|
|
174
|
-
skip: !
|
|
175
|
-
}),
|
|
169
|
+
}), [Ut] = fe(), { data: Wt, loading: Gt } = re({
|
|
170
|
+
variables: { billingAccountId: F.billingAccount?.id },
|
|
171
|
+
skip: !F.billingAccount?.id
|
|
172
|
+
}), { data: Kt, loading: qt, refetch: Jt } = ee({
|
|
173
|
+
variables: { billingAccountId: F.billingAccount?.id },
|
|
174
|
+
skip: !F.billingAccount?.id || D !== "ADDON" && D !== "PLAN" || E
|
|
175
|
+
}), H = l(() => Kt?.getActiveSubscriptions ?? [], [Kt]), U = l(() => !F.selectedSubscriptionId || H.length === 0 ? null : H.find((e) => e.id === F.selectedSubscriptionId) ?? null, [F.selectedSubscriptionId, H]), W = F.items[0]?.type === "CREDITS" ? F.items[0].quantity : 100, { data: Yt, loading: Xt } = ne({
|
|
176
176
|
variables: {
|
|
177
|
-
creditAmount:
|
|
178
|
-
currency:
|
|
177
|
+
creditAmount: W,
|
|
178
|
+
currency: F.selectedCurrency || "USD"
|
|
179
179
|
},
|
|
180
|
-
skip:
|
|
181
|
-
}),
|
|
182
|
-
if (!
|
|
183
|
-
let e =
|
|
180
|
+
skip: D !== "CREDITS"
|
|
181
|
+
}), G = l(() => Yt?.getCostOfCredits?.amount && W > 0 ? Yt.getCostOfCredits.amount / W : .01, [Yt, W]), K = l(() => Wt?.getPaymentMethods ?? [], [Wt]), q = l(() => Ft?.myBillingAccounts ?? [], [Ft]), J = l(() => {
|
|
182
|
+
if (!F.billingAccount) return;
|
|
183
|
+
let e = q.find((e) => e.id === F.billingAccount?.id)?.billingAddresses;
|
|
184
184
|
if (e && e.length > 0) return e[0]?.country || void 0;
|
|
185
|
-
}, [
|
|
186
|
-
|
|
187
|
-
if (
|
|
185
|
+
}, [F.billingAccount, q]), [Zt, Qt] = u(null);
|
|
186
|
+
c(() => {
|
|
187
|
+
if (J) if (J === "IN") F.selectedCurrency !== "INR" && F.setCurrency("INR"), Mt && Zt !== J && F.selectedProvider !== "CREDITS" && (F.setPaymentProvider("RAZORPAY"), Qt(J));
|
|
188
188
|
else {
|
|
189
|
-
if (
|
|
190
|
-
let e =
|
|
191
|
-
|
|
189
|
+
if (F.selectedCurrency === "INR") {
|
|
190
|
+
let e = F.billingAccount?.currency, t = e && e !== "INR" ? e : "USD";
|
|
191
|
+
F.setCurrency(t);
|
|
192
192
|
}
|
|
193
|
-
|
|
193
|
+
F.selectedProvider === "RAZORPAY" && (F.setPaymentProvider("STRIPE"), Qt(J));
|
|
194
194
|
}
|
|
195
195
|
}, [
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
196
|
+
J,
|
|
197
|
+
F.selectedCurrency,
|
|
198
|
+
F.selectedProvider,
|
|
199
|
+
F.setCurrency,
|
|
200
|
+
F.setPaymentProvider,
|
|
201
|
+
F.billingAccount?.currency,
|
|
202
|
+
Mt,
|
|
203
|
+
Zt
|
|
204
204
|
]);
|
|
205
|
-
let { billingAccount:
|
|
206
|
-
|
|
207
|
-
if (
|
|
208
|
-
let e =
|
|
209
|
-
e !== "INR" &&
|
|
205
|
+
let { billingAccount: $t, canPayWithCredits: en, hasEnoughCredits: tn, selectedCurrency: Y, selectedPaymentMethodId: nn, selectedProvider: rn, setCurrency: X, setPaymentProvider: Z, setSelectedPaymentMethodId: an } = F;
|
|
206
|
+
c(() => {
|
|
207
|
+
if (!$t?.currency || J === "IN") return;
|
|
208
|
+
let e = $t.currency;
|
|
209
|
+
e !== "INR" && Y !== e && X(e);
|
|
210
210
|
}, [
|
|
211
|
+
J,
|
|
212
|
+
$t,
|
|
211
213
|
Y,
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
217
|
-
if ($t && en) {
|
|
218
|
-
rn("CREDITS"), an(null);
|
|
214
|
+
X
|
|
215
|
+
]), c(() => {
|
|
216
|
+
if (!(rn !== "AUTO" && rn !== null)) {
|
|
217
|
+
if (en && tn) {
|
|
218
|
+
Z("CREDITS"), an(null);
|
|
219
219
|
return;
|
|
220
220
|
}
|
|
221
|
-
if (
|
|
222
|
-
let e =
|
|
221
|
+
if (K.length > 0 && !nn) {
|
|
222
|
+
let e = K.find((e) => e.isDefault && e.isVerified), t = K.find((e) => e.isVerified), n = e || t;
|
|
223
223
|
if (n) {
|
|
224
|
-
an(n.id), n.razorpayPaymentMethodId ?
|
|
224
|
+
an(n.id), n.razorpayPaymentMethodId ? Z("RAZORPAY") : n.stripePaymentMethodId && Z("STRIPE");
|
|
225
225
|
return;
|
|
226
226
|
}
|
|
227
227
|
}
|
|
228
228
|
}
|
|
229
229
|
}, [
|
|
230
|
-
$t,
|
|
231
230
|
en,
|
|
232
|
-
q,
|
|
233
231
|
tn,
|
|
232
|
+
K,
|
|
234
233
|
nn,
|
|
235
234
|
rn,
|
|
235
|
+
Z,
|
|
236
236
|
an
|
|
237
237
|
]);
|
|
238
|
-
let [Q, $] =
|
|
239
|
-
|
|
240
|
-
if (!
|
|
241
|
-
let e =
|
|
242
|
-
|
|
238
|
+
let [Q, $] = u(!1);
|
|
239
|
+
c(() => {
|
|
240
|
+
if (!E || Q || !R?.getStoreOrder) return;
|
|
241
|
+
let e = Pe(R.getStoreOrder.currency);
|
|
242
|
+
Y !== e && X(e);
|
|
243
243
|
}, [
|
|
244
|
-
|
|
244
|
+
E,
|
|
245
245
|
Q,
|
|
246
|
+
Y,
|
|
246
247
|
X,
|
|
247
|
-
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
251
|
-
|
|
252
|
-
Ot((t) => t < e ? e : t);
|
|
248
|
+
R
|
|
249
|
+
]), c(() => {
|
|
250
|
+
if (D === "PLAN" && I?.getPlan?.pricingModel === "PER_SEAT") {
|
|
251
|
+
let e = I.getPlan.minSeats ?? 1;
|
|
252
|
+
kt((t) => t < e ? e : t);
|
|
253
253
|
}
|
|
254
|
-
}, [
|
|
255
|
-
|
|
256
|
-
}, [
|
|
254
|
+
}, [I, D]), c(() => {
|
|
255
|
+
D === "PLAN" && I?.getPlan?.pricingModel === "PER_SEAT" && Q && $(!1);
|
|
256
|
+
}, [P]), c(() => {
|
|
257
257
|
if (!Q) {
|
|
258
|
-
if (
|
|
259
|
-
|
|
260
|
-
for (let e of
|
|
258
|
+
if (T && w && C.length > 0) {
|
|
259
|
+
F.clearItems();
|
|
260
|
+
for (let e of C) {
|
|
261
261
|
let t = e.addon, n = t.features?.map((e) => {
|
|
262
262
|
let t = e.quota?.limits, n = e.context && "quantity" in e.context ? Number(e.context.quantity) : void 0;
|
|
263
263
|
return {
|
|
@@ -268,7 +268,7 @@ var et = () => {
|
|
|
268
268
|
value: n
|
|
269
269
|
} : t
|
|
270
270
|
};
|
|
271
|
-
}) || [], r =
|
|
271
|
+
}) || [], r = F.selectedCurrency || "USD", i = t.currencyPrices, a = i?.[r] ?? t.price, o = i?.USD ?? t.price, ee = {
|
|
272
272
|
id: t.id,
|
|
273
273
|
type: "ADDON",
|
|
274
274
|
name: t.name,
|
|
@@ -280,13 +280,13 @@ var et = () => {
|
|
|
280
280
|
features: n,
|
|
281
281
|
metadata: { addonId: t.id }
|
|
282
282
|
};
|
|
283
|
-
|
|
283
|
+
F.addItem(ee);
|
|
284
284
|
}
|
|
285
285
|
$(!0);
|
|
286
286
|
return;
|
|
287
287
|
}
|
|
288
|
-
if (
|
|
289
|
-
let e =
|
|
288
|
+
if (D === "PLAN" && I?.getPlan) {
|
|
289
|
+
let e = I.getPlan, t = e.features?.map((e) => {
|
|
290
290
|
let t = e.quota?.limits, n = e.context && "quantity" in e.context ? Number(e.context.quantity) : void 0;
|
|
291
291
|
return {
|
|
292
292
|
id: e.quota?.id || e.id,
|
|
@@ -296,33 +296,33 @@ var et = () => {
|
|
|
296
296
|
value: n
|
|
297
297
|
} : t
|
|
298
298
|
};
|
|
299
|
-
}) || [], n =
|
|
299
|
+
}) || [], n = F.selectedCurrency || "USD", r = e.currencyPrices, i = e.pricingModel === "PER_SEAT", a;
|
|
300
300
|
if (i && e.pricePerSeat) {
|
|
301
301
|
let t = r?.[n];
|
|
302
|
-
a = (typeof t == "object" && t?.perSeat ? t.perSeat : e.pricePerSeat) *
|
|
302
|
+
a = (typeof t == "object" && t?.perSeat ? t.perSeat : e.pricePerSeat) * P;
|
|
303
303
|
} else {
|
|
304
304
|
let t = r?.[n];
|
|
305
305
|
a = typeof t == "number" ? t : e.price;
|
|
306
306
|
}
|
|
307
|
-
let o = r?.USD, ee = typeof o == "number" ? o : e.price, te = typeof o == "object" && o?.perSeat ? o.perSeat : e.pricePerSeat,
|
|
307
|
+
let o = r?.USD, ee = typeof o == "number" ? o : e.price, te = typeof o == "object" && o?.perSeat ? o.perSeat : e.pricePerSeat, ne = i ? P : 1, re = {
|
|
308
308
|
id: e.id,
|
|
309
309
|
type: "PLAN",
|
|
310
310
|
name: e.name,
|
|
311
311
|
description: typeof e.context == "object" && e.context !== null ? e.context.description : typeof e.context == "string" ? e.context : void 0,
|
|
312
312
|
price: a,
|
|
313
|
-
priceUSD: i && e.pricePerSeat ? (te ?? e.pricePerSeat) *
|
|
313
|
+
priceUSD: i && e.pricePerSeat ? (te ?? e.pricePerSeat) * ne : ee,
|
|
314
314
|
currency: n,
|
|
315
|
-
quantity:
|
|
315
|
+
quantity: ne,
|
|
316
316
|
features: t,
|
|
317
317
|
metadata: {
|
|
318
318
|
planId: e.id,
|
|
319
319
|
duration: e.duration,
|
|
320
|
-
seatCount: i ?
|
|
320
|
+
seatCount: i ? ne : void 0
|
|
321
321
|
}
|
|
322
322
|
};
|
|
323
|
-
|
|
324
|
-
} else if (
|
|
325
|
-
let e =
|
|
323
|
+
F.addItem(re), $(!0);
|
|
324
|
+
} else if (D === "ADDON" && !T && L?.getSelectedAddons?.[0]) {
|
|
325
|
+
let e = L.getSelectedAddons[0], t = e.features?.map((e) => {
|
|
326
326
|
let t = e.quota?.limits, n = e.context && "quantity" in e.context ? Number(e.context.quantity) : void 0;
|
|
327
327
|
return {
|
|
328
328
|
id: e.quota?.id || e.id,
|
|
@@ -332,7 +332,7 @@ var et = () => {
|
|
|
332
332
|
value: n
|
|
333
333
|
} : t
|
|
334
334
|
};
|
|
335
|
-
}) || [], n =
|
|
335
|
+
}) || [], n = F.selectedCurrency || "USD", r = e.currencyPrices, i = r?.[n] ?? e.price, a = r?.USD ?? e.price, o = {
|
|
336
336
|
id: e.id,
|
|
337
337
|
type: "ADDON",
|
|
338
338
|
name: e.name,
|
|
@@ -340,232 +340,232 @@ var et = () => {
|
|
|
340
340
|
price: i,
|
|
341
341
|
priceUSD: a,
|
|
342
342
|
currency: n,
|
|
343
|
-
quantity:
|
|
343
|
+
quantity: y?.quantity ?? 1,
|
|
344
344
|
features: t,
|
|
345
345
|
metadata: { addonId: e.id }
|
|
346
346
|
};
|
|
347
|
-
|
|
348
|
-
} else if (
|
|
349
|
-
|
|
350
|
-
let e =
|
|
351
|
-
for (let e of t)
|
|
347
|
+
F.addItem(o), $(!0);
|
|
348
|
+
} else if (E && R?.getStoreOrder) {
|
|
349
|
+
F.clearItems();
|
|
350
|
+
let e = R.getStoreOrder, t = Ne(e);
|
|
351
|
+
for (let e of t) F.addItem(e);
|
|
352
352
|
$(!0);
|
|
353
|
-
} else if (
|
|
353
|
+
} else if (D === "CREDITS") {
|
|
354
354
|
let e = {
|
|
355
355
|
id: "credits-purchase",
|
|
356
356
|
type: "CREDITS",
|
|
357
357
|
name: "Credits",
|
|
358
358
|
description: "Purchase credits for your account",
|
|
359
|
-
price:
|
|
360
|
-
currency:
|
|
359
|
+
price: G,
|
|
360
|
+
currency: F.selectedCurrency || "USD",
|
|
361
361
|
quantity: 100
|
|
362
362
|
};
|
|
363
|
-
|
|
363
|
+
F.addItem(e), $(!0);
|
|
364
364
|
}
|
|
365
365
|
}
|
|
366
366
|
}, [
|
|
367
|
-
|
|
367
|
+
D,
|
|
368
|
+
I,
|
|
368
369
|
L,
|
|
369
370
|
R,
|
|
370
|
-
|
|
371
|
-
|
|
372
|
-
|
|
373
|
-
b?.quantity,
|
|
371
|
+
F.addItem,
|
|
372
|
+
F.clearItems,
|
|
373
|
+
y?.quantity,
|
|
374
374
|
Q,
|
|
375
|
+
T,
|
|
375
376
|
E,
|
|
376
|
-
|
|
377
|
+
C,
|
|
377
378
|
w,
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
|
|
385
|
-
I.updateItemPrice(e.id, t, I.selectedCurrency);
|
|
379
|
+
G,
|
|
380
|
+
F.selectedCurrency
|
|
381
|
+
]), c(() => {
|
|
382
|
+
if (!(!E || !Q || F.convertedAmount === null)) {
|
|
383
|
+
for (let e of F.items) if (e.type === "ORDER" && e.currency !== F.selectedCurrency) {
|
|
384
|
+
let t = e.price * F.conversionRate;
|
|
385
|
+
F.updateItemPrice(e.id, t, F.selectedCurrency);
|
|
386
386
|
}
|
|
387
387
|
}
|
|
388
388
|
}, [
|
|
389
|
-
|
|
389
|
+
E,
|
|
390
390
|
Q,
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
391
|
+
F.convertedAmount,
|
|
392
|
+
F.conversionRate,
|
|
393
|
+
F.selectedCurrency,
|
|
394
|
+
F.updateItemPrice
|
|
395
395
|
]);
|
|
396
|
-
let on =
|
|
397
|
-
|
|
398
|
-
if (
|
|
399
|
-
let e =
|
|
396
|
+
let on = Fe(null);
|
|
397
|
+
c(() => {
|
|
398
|
+
if (B) if (V.shippingCost > 0) {
|
|
399
|
+
let e = F.selectedCurrency, t = Vt !== e && F.convertedAmount !== null ? V.shippingCost * F.conversionRate : V.shippingCost, n = on.current;
|
|
400
400
|
if (n && n.price === t && n.currency === e) return;
|
|
401
|
-
n === null ?
|
|
402
|
-
id:
|
|
401
|
+
n === null ? F.addItem({
|
|
402
|
+
id: de,
|
|
403
403
|
type: "ORDER",
|
|
404
404
|
name: "Shipping",
|
|
405
405
|
price: t,
|
|
406
406
|
currency: e,
|
|
407
407
|
quantity: 1,
|
|
408
408
|
metadata: {
|
|
409
|
-
storeOrderId:
|
|
409
|
+
storeOrderId: g,
|
|
410
410
|
isShipping: !0
|
|
411
411
|
}
|
|
412
|
-
}) :
|
|
412
|
+
}) : F.updateItemPrice(de, t, e), on.current = {
|
|
413
413
|
price: t,
|
|
414
414
|
currency: e
|
|
415
415
|
};
|
|
416
|
-
} else on.current !== null && (on.current = null,
|
|
416
|
+
} else on.current !== null && (on.current = null, F.removeItem(de));
|
|
417
417
|
}, [
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
|
|
427
|
-
|
|
428
|
-
]),
|
|
429
|
-
if (
|
|
430
|
-
let e =
|
|
431
|
-
e && e.price !==
|
|
418
|
+
B,
|
|
419
|
+
V.shippingCost,
|
|
420
|
+
Vt,
|
|
421
|
+
F.selectedCurrency,
|
|
422
|
+
F.conversionRate,
|
|
423
|
+
F.convertedAmount,
|
|
424
|
+
g,
|
|
425
|
+
F.addItem,
|
|
426
|
+
F.updateItemPrice,
|
|
427
|
+
F.removeItem
|
|
428
|
+
]), c(() => {
|
|
429
|
+
if (D === "CREDITS" && Q && G > 0) {
|
|
430
|
+
let e = F.items.find((e) => e.id === "credits-purchase");
|
|
431
|
+
e && e.price !== G && F.updateItemPrice("credits-purchase", G);
|
|
432
432
|
}
|
|
433
433
|
}, [
|
|
434
|
-
|
|
434
|
+
D,
|
|
435
435
|
Q,
|
|
436
|
-
|
|
437
|
-
|
|
438
|
-
|
|
439
|
-
]),
|
|
440
|
-
if (!Q ||
|
|
441
|
-
let e =
|
|
442
|
-
for (let t of
|
|
443
|
-
let n =
|
|
444
|
-
(t.price !== n || t.currency !== e) &&
|
|
436
|
+
G,
|
|
437
|
+
F.items,
|
|
438
|
+
F.updateItemPrice
|
|
439
|
+
]), c(() => {
|
|
440
|
+
if (!Q || F.items.length === 0) return;
|
|
441
|
+
let e = F.selectedCurrency || "USD";
|
|
442
|
+
for (let t of F.items) if (t.type === "PLAN" && I?.getPlan) {
|
|
443
|
+
let n = I.getPlan.currencyPrices?.[e] ?? I.getPlan.price;
|
|
444
|
+
(t.price !== n || t.currency !== e) && F.updateItemPrice(t.id, n, e);
|
|
445
445
|
} else if (t.type === "ADDON") {
|
|
446
|
-
if (!
|
|
447
|
-
let n =
|
|
448
|
-
(t.price !== r || t.currency !== e) &&
|
|
446
|
+
if (!T && L?.getSelectedAddons?.[0]) {
|
|
447
|
+
let n = L.getSelectedAddons[0], r = n.currencyPrices?.[e] ?? n.price;
|
|
448
|
+
(t.price !== r || t.currency !== e) && F.updateItemPrice(t.id, r, e);
|
|
449
449
|
}
|
|
450
|
-
if (
|
|
451
|
-
let n =
|
|
450
|
+
if (T) {
|
|
451
|
+
let n = C.find((e) => e.addon.id === t.id);
|
|
452
452
|
if (n) {
|
|
453
453
|
let r = n.addon.currencyPrices?.[e] ?? n.addon.price;
|
|
454
|
-
(t.price !== r || t.currency !== e) &&
|
|
454
|
+
(t.price !== r || t.currency !== e) && F.updateItemPrice(t.id, r, e);
|
|
455
455
|
}
|
|
456
456
|
}
|
|
457
457
|
}
|
|
458
458
|
}, [
|
|
459
|
-
|
|
459
|
+
F.selectedCurrency,
|
|
460
460
|
Q,
|
|
461
|
-
|
|
462
|
-
|
|
461
|
+
F.items,
|
|
462
|
+
F.updateItemPrice,
|
|
463
|
+
I,
|
|
463
464
|
L,
|
|
464
|
-
|
|
465
|
-
|
|
466
|
-
|
|
467
|
-
|
|
468
|
-
|
|
469
|
-
|
|
470
|
-
let e = J.find((e) => e.id === b.billingAccountId);
|
|
465
|
+
C,
|
|
466
|
+
T
|
|
467
|
+
]), c(() => {
|
|
468
|
+
if (q.length > 0 && !F.billingAccount) {
|
|
469
|
+
if (y?.billingAccountId) {
|
|
470
|
+
let e = q.find((e) => e.id === y.billingAccountId);
|
|
471
471
|
if (e) {
|
|
472
|
-
|
|
472
|
+
F.setBillingAccount(e);
|
|
473
473
|
return;
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
|
-
if (
|
|
477
|
-
let e =
|
|
476
|
+
if (x) {
|
|
477
|
+
let e = a(x);
|
|
478
478
|
if (e) {
|
|
479
|
-
let t =
|
|
479
|
+
let t = q.find((t) => t.id === e);
|
|
480
480
|
if (t) {
|
|
481
|
-
|
|
481
|
+
F.setBillingAccount(t);
|
|
482
482
|
return;
|
|
483
483
|
}
|
|
484
484
|
}
|
|
485
485
|
}
|
|
486
|
-
|
|
486
|
+
F.setBillingAccount(q[0]);
|
|
487
487
|
}
|
|
488
488
|
}, [
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
489
|
+
q,
|
|
490
|
+
F.billingAccount,
|
|
491
|
+
F.setBillingAccount,
|
|
492
|
+
y?.billingAccountId,
|
|
493
|
+
x
|
|
494
494
|
]);
|
|
495
|
-
let sn = !!(
|
|
496
|
-
|
|
497
|
-
|
|
495
|
+
let sn = !!(y?.upgradeFromSubscriptionId || y?.downgradeFromSubscriptionId);
|
|
496
|
+
c(() => {
|
|
497
|
+
T && w && C.length === 0 && !Q && _("/addons", { replace: !0 });
|
|
498
498
|
}, [
|
|
499
|
+
w,
|
|
500
|
+
C.length,
|
|
499
501
|
T,
|
|
500
|
-
w.length,
|
|
501
|
-
E,
|
|
502
502
|
Q,
|
|
503
|
-
|
|
503
|
+
_
|
|
504
504
|
]);
|
|
505
|
-
let cn =
|
|
506
|
-
billingAccountId:
|
|
507
|
-
purchaseType:
|
|
508
|
-
productId:
|
|
509
|
-
}), ln =
|
|
510
|
-
if (!
|
|
511
|
-
let e =
|
|
512
|
-
if (
|
|
513
|
-
|
|
505
|
+
let cn = me({
|
|
506
|
+
billingAccountId: F.billingAccount?.id,
|
|
507
|
+
purchaseType: D,
|
|
508
|
+
productId: z
|
|
509
|
+
}), ln = s(async () => {
|
|
510
|
+
if (!F.billingAccount) return;
|
|
511
|
+
let e = _t.current;
|
|
512
|
+
if (_t.current = !1, !e && !ke(F.billingAccount)) {
|
|
513
|
+
gt(!0);
|
|
514
514
|
return;
|
|
515
515
|
}
|
|
516
|
-
if (
|
|
517
|
-
let e = (await
|
|
518
|
-
orderId:
|
|
519
|
-
shippingMethodId:
|
|
520
|
-
...
|
|
516
|
+
if (M(null), B) try {
|
|
517
|
+
let e = (await Ut({ variables: { input: {
|
|
518
|
+
orderId: g,
|
|
519
|
+
shippingMethodId: V.shippingMethodId,
|
|
520
|
+
...V.shippingAddressId ? { shippingAddressId: V.shippingAddressId } : {}
|
|
521
521
|
} } })).data?.setStoreOrderShipping?.shippingCost;
|
|
522
|
-
typeof e == "number" && e !==
|
|
522
|
+
typeof e == "number" && e !== V.shippingCost && Ht((t) => ({
|
|
523
523
|
...t,
|
|
524
524
|
shippingCost: e
|
|
525
525
|
}));
|
|
526
526
|
} catch (e) {
|
|
527
|
-
|
|
527
|
+
M(e instanceof Error && e.message ? e.message : "Could not save your shipping details. Please review your delivery address and try again."), A("error");
|
|
528
528
|
return;
|
|
529
529
|
}
|
|
530
|
-
let t =
|
|
530
|
+
let t = F.billingAccount.creditAmount ?? 0, n = [...F.items], r = F.total, i = F.creditsRequired, a = await F.initiatePayment();
|
|
531
531
|
if (a.success) {
|
|
532
|
-
if (
|
|
532
|
+
if (b("billing.checkout.initiated", {
|
|
533
533
|
route: "/billing/checkout",
|
|
534
534
|
entityId: a.paymentId ?? a.orderId,
|
|
535
535
|
source: "checkout",
|
|
536
536
|
amount: a.total || r,
|
|
537
|
-
currency: a.currency ||
|
|
538
|
-
}),
|
|
539
|
-
|
|
537
|
+
currency: a.currency || F.selectedCurrency
|
|
538
|
+
}), F.selectedProvider === "CREDITS") {
|
|
539
|
+
b("billing.credits.spent", {
|
|
540
540
|
route: "/billing/checkout",
|
|
541
541
|
entityId: a.orderId,
|
|
542
542
|
source: "checkout",
|
|
543
543
|
amount: i,
|
|
544
544
|
currency: "CREDITS"
|
|
545
|
-
}),
|
|
545
|
+
}), Et({
|
|
546
546
|
items: n,
|
|
547
547
|
total: i,
|
|
548
|
-
billingAccountName:
|
|
549
|
-
billingAccountId:
|
|
548
|
+
billingAccountName: F.billingAccount.name,
|
|
549
|
+
billingAccountId: F.billingAccount.id,
|
|
550
550
|
previousBalance: t,
|
|
551
551
|
newBalance: t - i,
|
|
552
552
|
paymentMethod: "credits",
|
|
553
553
|
currency: "Credits",
|
|
554
554
|
transactionId: a.orderId
|
|
555
|
-
}),
|
|
555
|
+
}), Ot("credits"), wt({ paymentId: a.orderId }), A("processing");
|
|
556
556
|
return;
|
|
557
557
|
}
|
|
558
|
-
|
|
558
|
+
Et({
|
|
559
559
|
items: n,
|
|
560
560
|
total: a.total || r,
|
|
561
|
-
billingAccountName:
|
|
562
|
-
billingAccountId:
|
|
561
|
+
billingAccountName: F.billingAccount.name,
|
|
562
|
+
billingAccountId: F.billingAccount.id,
|
|
563
563
|
previousBalance: t,
|
|
564
564
|
newBalance: t,
|
|
565
565
|
paymentMethod: "card",
|
|
566
|
-
currency: a.currency ||
|
|
566
|
+
currency: a.currency || F.selectedCurrency,
|
|
567
567
|
transactionId: a.paymentId
|
|
568
|
-
}),
|
|
568
|
+
}), Ot("card"), wt({
|
|
569
569
|
clientSecret: a.clientSecret,
|
|
570
570
|
orderId: a.orderId,
|
|
571
571
|
razorpayKeyId: a.razorpayKeyId,
|
|
@@ -577,760 +577,760 @@ var et = () => {
|
|
|
577
577
|
prefillContact: a.prefillContact,
|
|
578
578
|
total: a.total,
|
|
579
579
|
currency: a.currency
|
|
580
|
-
}), a.paymentComplete ?
|
|
581
|
-
} else
|
|
580
|
+
}), a.paymentComplete ? A("processing") : A("payment");
|
|
581
|
+
} else b("billing.checkout.failed", {
|
|
582
582
|
route: "/billing/checkout",
|
|
583
583
|
source: "checkout",
|
|
584
584
|
reason: a.error || "Payment initiation failed"
|
|
585
|
-
}),
|
|
585
|
+
}), M(a.error || "Payment initiation failed"), A("error");
|
|
586
586
|
}, [
|
|
587
|
-
|
|
588
|
-
|
|
587
|
+
F,
|
|
588
|
+
b,
|
|
589
|
+
B,
|
|
589
590
|
V,
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
x("billing.payment.succeeded", {
|
|
591
|
+
g,
|
|
592
|
+
Vt,
|
|
593
|
+
Ut
|
|
594
|
+
]), un = s((e) => {
|
|
595
|
+
b("billing.payment.succeeded", {
|
|
596
596
|
route: "/billing/checkout",
|
|
597
|
-
entityId:
|
|
597
|
+
entityId: j?.paymentId ?? j?.orderId,
|
|
598
598
|
source: "checkout"
|
|
599
|
-
}),
|
|
599
|
+
}), wt((e) => e), A("processing");
|
|
600
600
|
}, [
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
]), dn =
|
|
605
|
-
|
|
601
|
+
b,
|
|
602
|
+
j?.orderId,
|
|
603
|
+
j?.paymentId
|
|
604
|
+
]), dn = s((e) => {
|
|
605
|
+
b("billing.payment.failed", {
|
|
606
606
|
route: "/billing/checkout",
|
|
607
|
-
entityId:
|
|
607
|
+
entityId: j?.paymentId ?? j?.orderId,
|
|
608
608
|
source: "checkout",
|
|
609
609
|
reason: e
|
|
610
|
-
}),
|
|
610
|
+
}), M(e), A("error");
|
|
611
611
|
}, [
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
]), fn =
|
|
616
|
-
|
|
617
|
-
}, [
|
|
618
|
-
if (!
|
|
619
|
-
if (
|
|
612
|
+
b,
|
|
613
|
+
j?.orderId,
|
|
614
|
+
j?.paymentId
|
|
615
|
+
]), fn = s((e) => {
|
|
616
|
+
F.updateItemQuantity("credits-purchase", e);
|
|
617
|
+
}, [F]);
|
|
618
|
+
if (!it.canProcessPayment) return /* @__PURE__ */ p(n, { message: "You don't have permission to make purchases." });
|
|
619
|
+
if (e() && D === "PLAN" && (Rt || It)) return /* @__PURE__ */ p("div", {
|
|
620
620
|
className: "flex min-h-[240px] items-center justify-center",
|
|
621
|
-
children: /* @__PURE__ */
|
|
621
|
+
children: /* @__PURE__ */ p(d, {
|
|
622
622
|
className: "size-6 animate-spin text-[--color-primary]",
|
|
623
623
|
"aria-label": "Loading"
|
|
624
624
|
})
|
|
625
625
|
});
|
|
626
|
-
if (
|
|
627
|
-
purchaseType:
|
|
628
|
-
path:
|
|
629
|
-
billingAccountId:
|
|
630
|
-
onBack: () =>
|
|
626
|
+
if (e() && D !== "PLAN") return /* @__PURE__ */ p(ve, {
|
|
627
|
+
purchaseType: D,
|
|
628
|
+
path: v.pathname + v.search,
|
|
629
|
+
billingAccountId: F.billingAccount?.id,
|
|
630
|
+
onBack: () => _("dashboard")
|
|
631
631
|
});
|
|
632
|
-
if (
|
|
633
|
-
purchaseType:
|
|
634
|
-
productId:
|
|
635
|
-
billingAccountId:
|
|
632
|
+
if (e() && D === "PLAN" && z) return /* @__PURE__ */ p(_e, {
|
|
633
|
+
purchaseType: D,
|
|
634
|
+
productId: z,
|
|
635
|
+
billingAccountId: F.billingAccount?.id,
|
|
636
636
|
nativeCheckout: cn,
|
|
637
|
-
onBack: () =>
|
|
637
|
+
onBack: () => _("dashboard")
|
|
638
638
|
});
|
|
639
|
-
if (
|
|
640
|
-
purchaseType:
|
|
641
|
-
path:
|
|
642
|
-
billingAccountId:
|
|
643
|
-
onBack: () =>
|
|
639
|
+
if (e() && D === "PLAN" && !z) return /* @__PURE__ */ p(ve, {
|
|
640
|
+
purchaseType: D,
|
|
641
|
+
path: v.pathname + v.search,
|
|
642
|
+
billingAccountId: F.billingAccount?.id,
|
|
643
|
+
onBack: () => _("dashboard")
|
|
644
644
|
});
|
|
645
|
-
let pn =
|
|
646
|
-
if (
|
|
645
|
+
let pn = It || Rt && D === "PLAN" || zt && D === "ADDON" && !T || T && !w;
|
|
646
|
+
if (T && w && C.length === 0 && !Q) return null;
|
|
647
647
|
let mn = () => {
|
|
648
|
-
if (
|
|
649
|
-
let e =
|
|
648
|
+
if (T) {
|
|
649
|
+
let e = F.items.length;
|
|
650
650
|
return `Purchase ${e} Add-on${e === 1 ? "" : "s"}`;
|
|
651
651
|
}
|
|
652
|
-
switch (
|
|
652
|
+
switch (D) {
|
|
653
653
|
case "CREDITS": return "Buy Credits";
|
|
654
654
|
case "PLAN": return "Subscribe to Plan";
|
|
655
655
|
case "ADDON": return "Purchase Add-on";
|
|
656
656
|
default: return "Checkout";
|
|
657
657
|
}
|
|
658
658
|
}, hn = () => {
|
|
659
|
-
switch (
|
|
660
|
-
case "CREDITS": return /* @__PURE__ */
|
|
661
|
-
case "PLAN": return /* @__PURE__ */
|
|
662
|
-
case "ADDON": return /* @__PURE__ */
|
|
663
|
-
default: return /* @__PURE__ */
|
|
659
|
+
switch (D) {
|
|
660
|
+
case "CREDITS": return /* @__PURE__ */ p(Be, { className: "size-6" });
|
|
661
|
+
case "PLAN": return /* @__PURE__ */ p(He, { className: "size-6" });
|
|
662
|
+
case "ADDON": return /* @__PURE__ */ p(Re, { className: "size-6" });
|
|
663
|
+
default: return /* @__PURE__ */ p(Ge, { className: "size-6" });
|
|
664
664
|
}
|
|
665
665
|
};
|
|
666
|
-
if (pn) return /* @__PURE__ */
|
|
666
|
+
if (pn) return /* @__PURE__ */ p("div", {
|
|
667
667
|
className: "flex items-center justify-center min-h-[400px]",
|
|
668
|
-
children: /* @__PURE__ */
|
|
668
|
+
children: /* @__PURE__ */ m("div", {
|
|
669
669
|
className: "text-center space-y-4",
|
|
670
|
-
children: [/* @__PURE__ */
|
|
670
|
+
children: [/* @__PURE__ */ p(d, { className: "size-8 animate-spin mx-auto text-text-link" }), /* @__PURE__ */ p("p", {
|
|
671
671
|
className: "text-text-secondary",
|
|
672
|
-
children:
|
|
672
|
+
children: h("billing.checkout.loadingCheckout", "Loading checkout...")
|
|
673
673
|
})]
|
|
674
674
|
})
|
|
675
675
|
});
|
|
676
|
-
if (
|
|
676
|
+
if (k === "success") {
|
|
677
677
|
let e = (e) => {
|
|
678
|
-
if (!
|
|
679
|
-
let t =
|
|
678
|
+
if (!N) return `${e.toFixed(2)}`;
|
|
679
|
+
let t = N.currency;
|
|
680
680
|
return t === "Credits" ? `${e.toFixed(2)} Credits` : `${{
|
|
681
681
|
INR: "₹",
|
|
682
682
|
USD: "$",
|
|
683
683
|
EUR: "€",
|
|
684
684
|
GBP: "£"
|
|
685
685
|
}[t] || t + " "}${e.toFixed(2)}`;
|
|
686
|
-
}, t = (e) => `${e.toFixed(2)} Credits`, n =
|
|
687
|
-
if (!
|
|
686
|
+
}, t = (e) => `${e.toFixed(2)} Credits`, n = N ? N.items.reduce((e, t) => e + t.price * t.quantity, 0) : 0, r = (e) => {
|
|
687
|
+
if (!N || n <= 0) return 0;
|
|
688
688
|
let t = e.price * e.quantity;
|
|
689
|
-
return
|
|
689
|
+
return N.total * (t / n);
|
|
690
690
|
};
|
|
691
|
-
return /* @__PURE__ */
|
|
691
|
+
return /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ m("div", {
|
|
692
692
|
className: "max-w-2xl mx-auto p-6 space-y-6",
|
|
693
693
|
children: [
|
|
694
|
-
/* @__PURE__ */
|
|
694
|
+
/* @__PURE__ */ m("div", {
|
|
695
695
|
className: "text-center space-y-4",
|
|
696
|
-
children: [/* @__PURE__ */
|
|
696
|
+
children: [/* @__PURE__ */ p("div", {
|
|
697
697
|
className: "inline-flex p-4 rounded-full bg-status-success-bg-subtle text-status-success-text",
|
|
698
|
-
children: /* @__PURE__ */
|
|
699
|
-
}), /* @__PURE__ */
|
|
698
|
+
children: /* @__PURE__ */ p(ze, { className: "size-12" })
|
|
699
|
+
}), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h1", {
|
|
700
700
|
className: "text-2xl font-bold text-text-primary",
|
|
701
|
-
children:
|
|
702
|
-
}), /* @__PURE__ */
|
|
701
|
+
children: h("billing.checkout.paymentSuccessful", "Payment Successful!")
|
|
702
|
+
}), /* @__PURE__ */ p("p", {
|
|
703
703
|
className: "text-text-secondary mt-2",
|
|
704
|
-
children:
|
|
704
|
+
children: h("billing.checkout.purchaseCompleted", "Your purchase has been completed successfully.")
|
|
705
705
|
})] })]
|
|
706
706
|
}),
|
|
707
|
-
|
|
707
|
+
N && /* @__PURE__ */ m("div", {
|
|
708
708
|
className: "bg-bg-surface border border-border-subtle rounded-lg overflow-hidden",
|
|
709
709
|
children: [
|
|
710
|
-
/* @__PURE__ */
|
|
710
|
+
/* @__PURE__ */ m("div", {
|
|
711
711
|
className: "p-4 border-b border-border-subtle",
|
|
712
|
-
children: [/* @__PURE__ */
|
|
712
|
+
children: [/* @__PURE__ */ m("h3", {
|
|
713
713
|
className: "font-semibold text-text-primary mb-3 flex items-center gap-2",
|
|
714
|
-
children: [/* @__PURE__ */
|
|
715
|
-
}), /* @__PURE__ */
|
|
714
|
+
children: [/* @__PURE__ */ p(Ue, { className: "size-4" }), h("billing.checkout.itemsPurchased", "Items Purchased")]
|
|
715
|
+
}), /* @__PURE__ */ p("div", {
|
|
716
716
|
className: "space-y-2",
|
|
717
|
-
children:
|
|
717
|
+
children: N.items.map((t) => /* @__PURE__ */ m("div", {
|
|
718
718
|
className: "flex items-center justify-between",
|
|
719
|
-
children: [/* @__PURE__ */
|
|
719
|
+
children: [/* @__PURE__ */ m("div", {
|
|
720
720
|
className: "flex items-center gap-2",
|
|
721
721
|
children: [
|
|
722
|
-
t.type === "PLAN" && /* @__PURE__ */
|
|
723
|
-
t.type === "ADDON" && /* @__PURE__ */
|
|
724
|
-
t.type === "CREDITS" && /* @__PURE__ */
|
|
725
|
-
t.type === "ORDER" && /* @__PURE__ */
|
|
726
|
-
/* @__PURE__ */
|
|
722
|
+
t.type === "PLAN" && /* @__PURE__ */ p(He, { className: "size-4 text-accent-blue" }),
|
|
723
|
+
t.type === "ADDON" && /* @__PURE__ */ p(Re, { className: "size-4 text-accent-purple" }),
|
|
724
|
+
t.type === "CREDITS" && /* @__PURE__ */ p(Be, { className: "size-4 text-status-warning-text" }),
|
|
725
|
+
t.type === "ORDER" && /* @__PURE__ */ p(Ge, { className: "size-4 text-status-success-text" }),
|
|
726
|
+
/* @__PURE__ */ p("span", {
|
|
727
727
|
className: "text-text-primary",
|
|
728
728
|
children: t.name
|
|
729
729
|
}),
|
|
730
|
-
t.quantity > 1 && /* @__PURE__ */
|
|
730
|
+
t.quantity > 1 && /* @__PURE__ */ m("span", {
|
|
731
731
|
className: "text-xs text-text-secondary",
|
|
732
732
|
children: ["x", t.quantity]
|
|
733
733
|
})
|
|
734
734
|
]
|
|
735
|
-
}), /* @__PURE__ */
|
|
735
|
+
}), /* @__PURE__ */ p("span", {
|
|
736
736
|
className: "text-text-secondary",
|
|
737
|
-
children: e(
|
|
737
|
+
children: e(N.paymentMethod === "credits" ? r(t) : t.price * t.quantity)
|
|
738
738
|
})]
|
|
739
739
|
}, t.id))
|
|
740
740
|
})]
|
|
741
741
|
}),
|
|
742
|
-
/* @__PURE__ */
|
|
742
|
+
/* @__PURE__ */ p("div", {
|
|
743
743
|
className: "p-4 border-b border-border-subtle bg-bg-sunken",
|
|
744
|
-
children: /* @__PURE__ */
|
|
744
|
+
children: /* @__PURE__ */ m("div", {
|
|
745
745
|
className: "grid grid-cols-2 gap-4",
|
|
746
|
-
children: [/* @__PURE__ */
|
|
746
|
+
children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
|
|
747
747
|
className: "text-xs text-text-secondary mb-1",
|
|
748
|
-
children:
|
|
749
|
-
}), /* @__PURE__ */
|
|
748
|
+
children: h("billing.checkout.paymentMethod", "Payment Method")
|
|
749
|
+
}), /* @__PURE__ */ p("div", {
|
|
750
750
|
className: "flex items-center gap-2",
|
|
751
|
-
children:
|
|
751
|
+
children: N.paymentMethod === "credits" ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(Ke, { className: "size-4 text-status-warning-text" }), /* @__PURE__ */ p("span", {
|
|
752
752
|
className: "font-medium text-text-primary",
|
|
753
|
-
children:
|
|
754
|
-
})] }) : /* @__PURE__ */
|
|
753
|
+
children: h("billing.checkout.credits", "Credits")
|
|
754
|
+
})] }) : /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(Ve, { className: "size-4 text-accent-blue" }), /* @__PURE__ */ p("span", {
|
|
755
755
|
className: "font-medium text-text-primary",
|
|
756
|
-
children:
|
|
756
|
+
children: h("billing.checkout.card", "Card")
|
|
757
757
|
})] })
|
|
758
|
-
})] }), /* @__PURE__ */
|
|
758
|
+
})] }), /* @__PURE__ */ m("div", {
|
|
759
759
|
className: "text-right",
|
|
760
|
-
children: [/* @__PURE__ */
|
|
760
|
+
children: [/* @__PURE__ */ p("p", {
|
|
761
761
|
className: "text-xs text-text-secondary mb-1",
|
|
762
|
-
children:
|
|
763
|
-
}), /* @__PURE__ */
|
|
762
|
+
children: h("billing.checkout.totalPaid", "Total Paid")
|
|
763
|
+
}), /* @__PURE__ */ p("p", {
|
|
764
764
|
className: "font-bold text-lg text-text-primary",
|
|
765
|
-
children: e(
|
|
765
|
+
children: e(N.total)
|
|
766
766
|
})]
|
|
767
767
|
})]
|
|
768
768
|
})
|
|
769
769
|
}),
|
|
770
|
-
|
|
770
|
+
N.paymentMethod === "credits" && /* @__PURE__ */ m("div", {
|
|
771
771
|
className: "p-4 border-b border-border-subtle",
|
|
772
|
-
children: [/* @__PURE__ */
|
|
772
|
+
children: [/* @__PURE__ */ m("h3", {
|
|
773
773
|
className: "font-semibold text-text-primary mb-3 flex items-center gap-2",
|
|
774
|
-
children: [/* @__PURE__ */
|
|
775
|
-
}), /* @__PURE__ */
|
|
774
|
+
children: [/* @__PURE__ */ p(Ke, { className: "size-4" }), h("billing.checkout.creditBalance", "Credit Balance")]
|
|
775
|
+
}), /* @__PURE__ */ m("div", {
|
|
776
776
|
className: "flex items-center gap-4",
|
|
777
777
|
children: [
|
|
778
|
-
/* @__PURE__ */
|
|
778
|
+
/* @__PURE__ */ m("div", {
|
|
779
779
|
className: "flex-1 text-center p-3 rounded-lg bg-bg-sunken",
|
|
780
|
-
children: [/* @__PURE__ */
|
|
780
|
+
children: [/* @__PURE__ */ p("p", {
|
|
781
781
|
className: "text-xs text-text-secondary mb-1",
|
|
782
|
-
children:
|
|
783
|
-
}), /* @__PURE__ */
|
|
782
|
+
children: h("billing.checkout.previousBalance", "Previous Balance")
|
|
783
|
+
}), /* @__PURE__ */ p("p", {
|
|
784
784
|
className: "font-semibold text-text-primary",
|
|
785
|
-
children: t(
|
|
785
|
+
children: t(N.previousBalance)
|
|
786
786
|
})]
|
|
787
787
|
}),
|
|
788
|
-
/* @__PURE__ */
|
|
789
|
-
/* @__PURE__ */
|
|
788
|
+
/* @__PURE__ */ p(Le, { className: "size-5 text-text-secondary shrink-0" }),
|
|
789
|
+
/* @__PURE__ */ m("div", {
|
|
790
790
|
className: "flex-1 text-center p-3 rounded-lg bg-status-success-bg-subtle",
|
|
791
|
-
children: [/* @__PURE__ */
|
|
791
|
+
children: [/* @__PURE__ */ p("p", {
|
|
792
792
|
className: "text-xs text-text-secondary mb-1",
|
|
793
|
-
children:
|
|
794
|
-
}), /* @__PURE__ */
|
|
793
|
+
children: h("billing.checkout.newBalance", "New Balance")
|
|
794
|
+
}), /* @__PURE__ */ p("p", {
|
|
795
795
|
className: "font-semibold text-status-success-text",
|
|
796
|
-
children: t(
|
|
796
|
+
children: t(N.newBalance)
|
|
797
797
|
})]
|
|
798
798
|
})
|
|
799
799
|
]
|
|
800
800
|
})]
|
|
801
801
|
}),
|
|
802
|
-
/* @__PURE__ */
|
|
802
|
+
/* @__PURE__ */ p("div", {
|
|
803
803
|
className: "p-4 bg-bg-sunken",
|
|
804
|
-
children: /* @__PURE__ */
|
|
804
|
+
children: /* @__PURE__ */ m("div", {
|
|
805
805
|
className: "flex items-center justify-between",
|
|
806
|
-
children: [/* @__PURE__ */
|
|
806
|
+
children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("p", {
|
|
807
807
|
className: "text-xs text-text-secondary mb-1",
|
|
808
|
-
children:
|
|
809
|
-
}), /* @__PURE__ */
|
|
808
|
+
children: h("billing.checkout.billingAccount", "Billing Account")
|
|
809
|
+
}), /* @__PURE__ */ p("p", {
|
|
810
810
|
className: "font-medium text-text-primary",
|
|
811
|
-
children:
|
|
812
|
-
})] }),
|
|
811
|
+
children: N.billingAccountName
|
|
812
|
+
})] }), N.transactionId && /* @__PURE__ */ m("div", {
|
|
813
813
|
className: "text-right",
|
|
814
|
-
children: [/* @__PURE__ */
|
|
814
|
+
children: [/* @__PURE__ */ p("p", {
|
|
815
815
|
className: "text-xs text-text-secondary mb-1",
|
|
816
|
-
children:
|
|
817
|
-
}), /* @__PURE__ */
|
|
816
|
+
children: h("billing.checkout.transactionId", "Transaction ID")
|
|
817
|
+
}), /* @__PURE__ */ m("p", {
|
|
818
818
|
className: "font-mono text-xs text-text-secondary",
|
|
819
|
-
children: [
|
|
819
|
+
children: [N.transactionId.slice(0, 8), "..."]
|
|
820
820
|
})]
|
|
821
821
|
})]
|
|
822
822
|
})
|
|
823
823
|
})
|
|
824
824
|
]
|
|
825
825
|
}),
|
|
826
|
-
/* @__PURE__ */
|
|
826
|
+
/* @__PURE__ */ m("div", {
|
|
827
827
|
className: "flex flex-col sm:flex-row gap-3 justify-center pt-2",
|
|
828
|
-
children: [/* @__PURE__ */
|
|
828
|
+
children: [/* @__PURE__ */ p("button", {
|
|
829
829
|
type: "button",
|
|
830
|
-
onClick: () =>
|
|
830
|
+
onClick: () => _("/overview"),
|
|
831
831
|
className: "px-6 py-3 text-sm font-medium bg-action-primary-bg text-action-primary-text rounded-lg hover:bg-action-primary-bgHover transition-colors",
|
|
832
|
-
children:
|
|
833
|
-
}), /* @__PURE__ */
|
|
832
|
+
children: h("billing.checkout.backToOverview", "Back to Overview")
|
|
833
|
+
}), /* @__PURE__ */ p("button", {
|
|
834
834
|
type: "button",
|
|
835
|
-
onClick: () =>
|
|
835
|
+
onClick: () => _("/subscriptions"),
|
|
836
836
|
className: "px-6 py-3 text-sm font-medium border border-border-subtle text-text-primary rounded-lg hover:bg-bg-sunken transition-colors",
|
|
837
|
-
children:
|
|
837
|
+
children: h("billing.checkout.viewSubscriptions", "View Subscriptions")
|
|
838
838
|
})]
|
|
839
839
|
})
|
|
840
840
|
]
|
|
841
|
-
}),
|
|
842
|
-
billingAccountId:
|
|
843
|
-
subscriptionId:
|
|
844
|
-
quotas:
|
|
845
|
-
workspaces:
|
|
846
|
-
currentWorkspaceId:
|
|
847
|
-
onAssigned: () =>
|
|
848
|
-
onSkip: () =>
|
|
841
|
+
}), vt && bt.length > 0 && S && St && /* @__PURE__ */ p(je, {
|
|
842
|
+
billingAccountId: N?.billingAccountId ?? "",
|
|
843
|
+
subscriptionId: St,
|
|
844
|
+
quotas: bt,
|
|
845
|
+
workspaces: pt,
|
|
846
|
+
currentWorkspaceId: S,
|
|
847
|
+
onAssigned: () => yt(!1),
|
|
848
|
+
onSkip: () => yt(!1)
|
|
849
849
|
})] });
|
|
850
850
|
}
|
|
851
|
-
if (
|
|
851
|
+
if (k === "error") return /* @__PURE__ */ p("div", {
|
|
852
852
|
className: "max-w-lg mx-auto p-6",
|
|
853
|
-
children: /* @__PURE__ */
|
|
853
|
+
children: /* @__PURE__ */ m("div", {
|
|
854
854
|
className: "text-center space-y-6",
|
|
855
855
|
children: [
|
|
856
|
-
/* @__PURE__ */
|
|
856
|
+
/* @__PURE__ */ p("div", {
|
|
857
857
|
className: "inline-flex p-4 rounded-full bg-status-error-bg-subtle text-status-error-text",
|
|
858
|
-
children: /* @__PURE__ */
|
|
858
|
+
children: /* @__PURE__ */ p(qe, { className: "size-12" })
|
|
859
859
|
}),
|
|
860
|
-
/* @__PURE__ */
|
|
860
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h1", {
|
|
861
861
|
className: "text-2xl font-bold text-text-primary",
|
|
862
|
-
children:
|
|
863
|
-
}), /* @__PURE__ */
|
|
862
|
+
children: h("billing.checkout.paymentFailed", "Payment Failed")
|
|
863
|
+
}), /* @__PURE__ */ p("p", {
|
|
864
864
|
className: "text-text-secondary mt-2",
|
|
865
|
-
children:
|
|
865
|
+
children: Tt || Pt || F.error || h("billing.checkout.genericError", "Something went wrong. Please try again.")
|
|
866
866
|
})] }),
|
|
867
|
-
/* @__PURE__ */
|
|
867
|
+
/* @__PURE__ */ m("div", {
|
|
868
868
|
className: "flex gap-3 justify-center",
|
|
869
|
-
children: [/* @__PURE__ */
|
|
869
|
+
children: [/* @__PURE__ */ p("button", {
|
|
870
870
|
type: "button",
|
|
871
|
-
onClick: () =>
|
|
871
|
+
onClick: () => _(-1),
|
|
872
872
|
className: "px-4 py-2 rounded-lg border border-border-subtle hover:bg-bg-sunken",
|
|
873
|
-
children:
|
|
874
|
-
}), /* @__PURE__ */
|
|
873
|
+
children: h("billing.checkout.goBack", "Go Back")
|
|
874
|
+
}), /* @__PURE__ */ p("button", {
|
|
875
875
|
type: "button",
|
|
876
876
|
onClick: () => {
|
|
877
|
-
|
|
877
|
+
A("select"), M(null), F.reset();
|
|
878
878
|
},
|
|
879
879
|
className: "px-4 py-2 rounded-lg bg-action-primary-bg text-action-primary-text hover:bg-action-primary-bgHover",
|
|
880
|
-
children:
|
|
880
|
+
children: h("billing.checkout.tryAgain", "Try Again")
|
|
881
881
|
})]
|
|
882
882
|
})
|
|
883
883
|
]
|
|
884
884
|
})
|
|
885
885
|
});
|
|
886
|
-
if (
|
|
886
|
+
if (k === "processing") return /* @__PURE__ */ p("div", {
|
|
887
887
|
className: "max-w-lg mx-auto p-6",
|
|
888
|
-
children: /* @__PURE__ */
|
|
888
|
+
children: /* @__PURE__ */ m("div", {
|
|
889
889
|
className: "text-center space-y-6",
|
|
890
890
|
children: [
|
|
891
|
-
/* @__PURE__ */
|
|
891
|
+
/* @__PURE__ */ p("div", {
|
|
892
892
|
className: "inline-flex p-4 rounded-full bg-[var(--color-accent-soft)] text-text-link",
|
|
893
|
-
children: /* @__PURE__ */
|
|
893
|
+
children: /* @__PURE__ */ p(d, { className: "size-12 animate-spin" })
|
|
894
894
|
}),
|
|
895
|
-
/* @__PURE__ */
|
|
895
|
+
/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h1", {
|
|
896
896
|
className: "text-2xl font-bold text-text-primary",
|
|
897
|
-
children:
|
|
898
|
-
}), /* @__PURE__ */
|
|
897
|
+
children: h("billing.checkout.verifyingPayment", "Verifying Payment")
|
|
898
|
+
}), /* @__PURE__ */ p("p", {
|
|
899
899
|
className: "text-text-secondary mt-2",
|
|
900
|
-
children:
|
|
900
|
+
children: h("billing.checkout.verifyingPaymentDescription", "Please wait while we confirm your payment...")
|
|
901
901
|
})] }),
|
|
902
|
-
/* @__PURE__ */
|
|
902
|
+
/* @__PURE__ */ m("div", {
|
|
903
903
|
className: "bg-bg-sunken rounded-lg p-4",
|
|
904
|
-
children: [/* @__PURE__ */
|
|
904
|
+
children: [/* @__PURE__ */ m("p", {
|
|
905
905
|
className: "text-sm text-text-secondary",
|
|
906
906
|
children: [
|
|
907
|
-
|
|
907
|
+
h("billing.checkout.timeElapsed", "Time elapsed:"),
|
|
908
908
|
" ",
|
|
909
|
-
/* @__PURE__ */
|
|
909
|
+
/* @__PURE__ */ p("span", {
|
|
910
910
|
className: "font-mono font-medium text-text-primary",
|
|
911
911
|
children: ((e) => {
|
|
912
912
|
let t = Math.floor(e / 1e3);
|
|
913
913
|
return `${Math.floor(t / 60)}:${(t % 60).toString().padStart(2, "0")}`;
|
|
914
|
-
})(
|
|
914
|
+
})(Nt)
|
|
915
915
|
})
|
|
916
916
|
]
|
|
917
|
-
}), /* @__PURE__ */
|
|
917
|
+
}), /* @__PURE__ */ p("p", {
|
|
918
918
|
className: "text-xs text-text-secondary mt-1",
|
|
919
|
-
children:
|
|
919
|
+
children: h("billing.checkout.keepPageOpen", "This may take a few moments. Please don't close this page.")
|
|
920
920
|
})]
|
|
921
921
|
}),
|
|
922
|
-
/* @__PURE__ */
|
|
922
|
+
/* @__PURE__ */ p("div", {
|
|
923
923
|
className: "w-full bg-bg-sunken rounded-full h-2 overflow-hidden",
|
|
924
|
-
children: /* @__PURE__ */
|
|
924
|
+
children: /* @__PURE__ */ p("div", {
|
|
925
925
|
className: "bg-action-primary-bg h-2 rounded-full transition-all duration-1000",
|
|
926
|
-
style: { width: `${Math.min(
|
|
926
|
+
style: { width: `${Math.min(Nt / 3e5 * 100, 100)}%` }
|
|
927
927
|
})
|
|
928
928
|
}),
|
|
929
|
-
|
|
929
|
+
Nt > 3e4 && /* @__PURE__ */ p("button", {
|
|
930
930
|
type: "button",
|
|
931
931
|
onClick: () => {
|
|
932
|
-
|
|
932
|
+
A("error"), M("Payment verification was cancelled. Please check your billing history.");
|
|
933
933
|
},
|
|
934
934
|
className: "text-sm text-text-secondary hover:text-text-primary underline",
|
|
935
|
-
children:
|
|
935
|
+
children: h("billing.checkout.cancelAndCheckHistory", "Cancel and check billing history")
|
|
936
936
|
})
|
|
937
937
|
]
|
|
938
938
|
})
|
|
939
939
|
});
|
|
940
|
-
if (
|
|
940
|
+
if (k === "payment" && j) {
|
|
941
941
|
let e = (e, t) => `${{
|
|
942
942
|
INR: "₹",
|
|
943
943
|
USD: "$",
|
|
944
944
|
EUR: "€",
|
|
945
945
|
GBP: "£"
|
|
946
|
-
}[t] || t + " "}${e.toFixed(2)}`, t =
|
|
947
|
-
return /* @__PURE__ */
|
|
946
|
+
}[t] || t + " "}${e.toFixed(2)}`, t = j.currency || F.selectedCurrency, n = j.total ?? F.total;
|
|
947
|
+
return /* @__PURE__ */ m("div", {
|
|
948
948
|
className: "max-w-2xl mx-auto p-4 sm:p-6 space-y-6",
|
|
949
949
|
children: [
|
|
950
|
-
/* @__PURE__ */
|
|
950
|
+
/* @__PURE__ */ m("button", {
|
|
951
951
|
type: "button",
|
|
952
|
-
onClick: () =>
|
|
952
|
+
onClick: () => A("select"),
|
|
953
953
|
className: "flex items-center gap-2 text-sm text-text-secondary hover:text-text-primary",
|
|
954
|
-
children: [/* @__PURE__ */
|
|
954
|
+
children: [/* @__PURE__ */ p(Ie, { className: "size-4" }), h("billing.checkout.backToCheckout", "Back to checkout")]
|
|
955
955
|
}),
|
|
956
|
-
/* @__PURE__ */
|
|
957
|
-
title:
|
|
958
|
-
description:
|
|
956
|
+
/* @__PURE__ */ p(r, {
|
|
957
|
+
title: h("billing.checkout.completePayment", "Complete Payment"),
|
|
958
|
+
description: h("billing.checkout.completePaymentDescription", "Enter your payment details to complete the purchase")
|
|
959
959
|
}),
|
|
960
|
-
/* @__PURE__ */
|
|
960
|
+
/* @__PURE__ */ m("div", {
|
|
961
961
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 space-y-4",
|
|
962
962
|
children: [
|
|
963
|
-
/* @__PURE__ */
|
|
963
|
+
/* @__PURE__ */ m("h3", {
|
|
964
964
|
className: "font-semibold text-text-primary flex items-center gap-2",
|
|
965
|
-
children: [/* @__PURE__ */
|
|
965
|
+
children: [/* @__PURE__ */ p(Ue, { className: "size-4" }), h("billing.checkout.paymentSummary", "Payment Summary")]
|
|
966
966
|
}),
|
|
967
|
-
|
|
967
|
+
F.billingAccount && /* @__PURE__ */ m("div", {
|
|
968
968
|
className: "p-3 bg-bg-sunken rounded-lg space-y-1",
|
|
969
969
|
children: [
|
|
970
|
-
/* @__PURE__ */
|
|
970
|
+
/* @__PURE__ */ p("div", {
|
|
971
971
|
className: "text-xs text-text-secondary uppercase tracking-wide",
|
|
972
|
-
children:
|
|
972
|
+
children: h("billing.checkout.billingAccount", "Billing Account")
|
|
973
973
|
}),
|
|
974
|
-
/* @__PURE__ */
|
|
974
|
+
/* @__PURE__ */ p("div", {
|
|
975
975
|
className: "font-medium text-text-primary",
|
|
976
|
-
children:
|
|
976
|
+
children: F.billingAccount.name
|
|
977
977
|
}),
|
|
978
|
-
/* @__PURE__ */
|
|
978
|
+
/* @__PURE__ */ p("div", {
|
|
979
979
|
className: "text-sm text-text-secondary",
|
|
980
|
-
children:
|
|
980
|
+
children: F.billingAccount.email
|
|
981
981
|
})
|
|
982
982
|
]
|
|
983
983
|
}),
|
|
984
|
-
|
|
984
|
+
D === "ADDON" && F.selectedSubscriptionId && U && /* @__PURE__ */ m("div", {
|
|
985
985
|
className: "p-3 bg-bg-sunken rounded-lg space-y-1",
|
|
986
986
|
children: [
|
|
987
|
-
/* @__PURE__ */
|
|
987
|
+
/* @__PURE__ */ p("div", {
|
|
988
988
|
className: "text-xs text-text-secondary uppercase tracking-wide",
|
|
989
|
-
children:
|
|
989
|
+
children: h("billing.checkout.addingToSubscription", "Adding to Subscription")
|
|
990
990
|
}),
|
|
991
|
-
/* @__PURE__ */
|
|
991
|
+
/* @__PURE__ */ p("div", {
|
|
992
992
|
className: "font-medium text-text-primary",
|
|
993
|
-
children:
|
|
993
|
+
children: U.plan?.name || h("billing.checkout.subscription", "Subscription")
|
|
994
994
|
}),
|
|
995
|
-
|
|
995
|
+
U.plan?.product?.name && /* @__PURE__ */ p("div", {
|
|
996
996
|
className: "text-sm text-text-secondary",
|
|
997
|
-
children:
|
|
997
|
+
children: U.plan.product.name
|
|
998
998
|
})
|
|
999
999
|
]
|
|
1000
1000
|
}),
|
|
1001
|
-
/* @__PURE__ */
|
|
1001
|
+
/* @__PURE__ */ m("div", {
|
|
1002
1002
|
className: "space-y-2 text-sm",
|
|
1003
1003
|
children: [
|
|
1004
1004
|
(() => {
|
|
1005
|
-
let
|
|
1006
|
-
return /* @__PURE__ */
|
|
1007
|
-
/* @__PURE__ */
|
|
1005
|
+
let r = F.taxRate, i = r > 0 ? n / (1 + r) : n, a = r > 0 ? n - i : 0;
|
|
1006
|
+
return /* @__PURE__ */ m(f, { children: [
|
|
1007
|
+
/* @__PURE__ */ m("div", {
|
|
1008
1008
|
className: "flex justify-between",
|
|
1009
|
-
children: [/* @__PURE__ */
|
|
1009
|
+
children: [/* @__PURE__ */ p("span", {
|
|
1010
1010
|
className: "text-text-secondary",
|
|
1011
|
-
children:
|
|
1012
|
-
}), /* @__PURE__ */
|
|
1011
|
+
children: h("billing.checkout.subtotal", "Subtotal")
|
|
1012
|
+
}), /* @__PURE__ */ p("span", {
|
|
1013
1013
|
className: "text-text-primary",
|
|
1014
1014
|
children: e(i, t)
|
|
1015
1015
|
})]
|
|
1016
1016
|
}),
|
|
1017
|
-
|
|
1017
|
+
F.discountAmount > 0 && /* @__PURE__ */ m("div", {
|
|
1018
1018
|
className: "flex justify-between text-status-success-text",
|
|
1019
|
-
children: [/* @__PURE__ */
|
|
1019
|
+
children: [/* @__PURE__ */ p("span", { children: h("billing.checkout.discount", "Discount") }), /* @__PURE__ */ m("span", { children: ["-", e(F.discountAmount, t)] })]
|
|
1020
1020
|
}),
|
|
1021
|
-
a > 0 && /* @__PURE__ */
|
|
1021
|
+
a > 0 && /* @__PURE__ */ m("div", {
|
|
1022
1022
|
className: "flex justify-between",
|
|
1023
|
-
children: [/* @__PURE__ */
|
|
1023
|
+
children: [/* @__PURE__ */ m("span", {
|
|
1024
1024
|
className: "text-text-secondary",
|
|
1025
1025
|
children: [
|
|
1026
|
-
|
|
1026
|
+
F.taxType || h("billing.checkout.tax", "Tax"),
|
|
1027
1027
|
" (",
|
|
1028
|
-
(
|
|
1028
|
+
(r * 100).toFixed(0),
|
|
1029
1029
|
"%)"
|
|
1030
1030
|
]
|
|
1031
|
-
}), /* @__PURE__ */
|
|
1031
|
+
}), /* @__PURE__ */ p("span", {
|
|
1032
1032
|
className: "text-text-primary",
|
|
1033
1033
|
children: e(a, t)
|
|
1034
1034
|
})]
|
|
1035
1035
|
})
|
|
1036
1036
|
] });
|
|
1037
1037
|
})(),
|
|
1038
|
-
/* @__PURE__ */
|
|
1039
|
-
/* @__PURE__ */
|
|
1038
|
+
/* @__PURE__ */ p("div", { className: "border-t border-border-subtle my-2" }),
|
|
1039
|
+
/* @__PURE__ */ m("div", {
|
|
1040
1040
|
className: "flex justify-between font-semibold",
|
|
1041
|
-
children: [/* @__PURE__ */
|
|
1041
|
+
children: [/* @__PURE__ */ p("span", {
|
|
1042
1042
|
className: "text-text-primary",
|
|
1043
|
-
children:
|
|
1044
|
-
}), /* @__PURE__ */
|
|
1043
|
+
children: h("billing.checkout.total", "Total")
|
|
1044
|
+
}), /* @__PURE__ */ p("span", {
|
|
1045
1045
|
className: "text-lg text-text-primary",
|
|
1046
|
-
children: e(
|
|
1046
|
+
children: e(n, t)
|
|
1047
1047
|
})]
|
|
1048
1048
|
})
|
|
1049
1049
|
]
|
|
1050
1050
|
})
|
|
1051
1051
|
]
|
|
1052
1052
|
}),
|
|
1053
|
-
|
|
1053
|
+
F.selectedProvider === "STRIPE" && j.clientSecret && /* @__PURE__ */ p("div", {
|
|
1054
1054
|
className: "rounded-lg border border-border-subtle bg-bg-surface overflow-hidden",
|
|
1055
|
-
children: /* @__PURE__ */
|
|
1055
|
+
children: /* @__PURE__ */ p("div", {
|
|
1056
1056
|
className: "p-4 space-y-4",
|
|
1057
|
-
children: /* @__PURE__ */
|
|
1058
|
-
clientSecret:
|
|
1059
|
-
publishableKey:
|
|
1060
|
-
amount: Math.round((
|
|
1061
|
-
currency:
|
|
1057
|
+
children: /* @__PURE__ */ p(Ce, {
|
|
1058
|
+
clientSecret: j.clientSecret,
|
|
1059
|
+
publishableKey: at || At?.stripePublishableKey || "",
|
|
1060
|
+
amount: Math.round((j.total ?? F.total) * 100),
|
|
1061
|
+
currency: j.currency || F.selectedCurrency,
|
|
1062
1062
|
onSuccess: un,
|
|
1063
1063
|
onError: dn,
|
|
1064
|
-
onCancel: () =>
|
|
1065
|
-
isCompletingExistingPayment: !!
|
|
1064
|
+
onCancel: () => A("select"),
|
|
1065
|
+
isCompletingExistingPayment: !!F.selectedPaymentMethodId
|
|
1066
1066
|
})
|
|
1067
1067
|
})
|
|
1068
1068
|
}),
|
|
1069
|
-
|
|
1069
|
+
F.selectedProvider === "RAZORPAY" && j.orderId && /* @__PURE__ */ p("div", {
|
|
1070
1070
|
className: "rounded-lg border border-border-subtle bg-bg-surface overflow-hidden",
|
|
1071
|
-
children: /* @__PURE__ */
|
|
1071
|
+
children: /* @__PURE__ */ m("div", {
|
|
1072
1072
|
className: "p-4 space-y-4",
|
|
1073
|
-
children: [/* @__PURE__ */
|
|
1073
|
+
children: [/* @__PURE__ */ m("label", {
|
|
1074
1074
|
className: "flex items-center gap-2 cursor-pointer",
|
|
1075
|
-
children: [/* @__PURE__ */
|
|
1075
|
+
children: [/* @__PURE__ */ p("input", {
|
|
1076
1076
|
type: "checkbox",
|
|
1077
|
-
checked:
|
|
1078
|
-
onChange: (e) =>
|
|
1077
|
+
checked: F.saveCard,
|
|
1078
|
+
onChange: (e) => F.setSaveCard(e.target.checked),
|
|
1079
1079
|
className: "size-4 rounded border-border-subtle text-text-link focus:ring-[var(--color-focus-ring)]"
|
|
1080
|
-
}), /* @__PURE__ */
|
|
1080
|
+
}), /* @__PURE__ */ p("span", {
|
|
1081
1081
|
className: "text-sm text-text-secondary",
|
|
1082
1082
|
children: "Save card for future purchases"
|
|
1083
1083
|
})]
|
|
1084
|
-
}), /* @__PURE__ */
|
|
1085
|
-
orderId:
|
|
1086
|
-
keyId:
|
|
1087
|
-
amount: Math.round((
|
|
1088
|
-
currency:
|
|
1089
|
-
customerId:
|
|
1084
|
+
}), /* @__PURE__ */ p(we, {
|
|
1085
|
+
orderId: j.orderId,
|
|
1086
|
+
keyId: j.razorpayKeyId || ot || "",
|
|
1087
|
+
amount: Math.round((j.total ?? F.total) * 100),
|
|
1088
|
+
currency: j.currency || "INR",
|
|
1089
|
+
customerId: j.razorpayCustomerId,
|
|
1090
1090
|
prefill: {
|
|
1091
|
-
name:
|
|
1092
|
-
email:
|
|
1093
|
-
contact:
|
|
1091
|
+
name: j.prefillName,
|
|
1092
|
+
email: j.prefillEmail,
|
|
1093
|
+
contact: j.prefillContact
|
|
1094
1094
|
},
|
|
1095
1095
|
onSuccess: (e) => un(e.razorpay_payment_id),
|
|
1096
1096
|
onError: dn,
|
|
1097
|
-
onCancel: () =>
|
|
1097
|
+
onCancel: () => A("select")
|
|
1098
1098
|
})]
|
|
1099
1099
|
})
|
|
1100
1100
|
})
|
|
1101
1101
|
]
|
|
1102
1102
|
});
|
|
1103
1103
|
}
|
|
1104
|
-
return /* @__PURE__ */
|
|
1104
|
+
return /* @__PURE__ */ m("div", {
|
|
1105
1105
|
className: "max-w-6xl mx-auto p-4 sm:p-6",
|
|
1106
1106
|
children: [
|
|
1107
|
-
/* @__PURE__ */
|
|
1107
|
+
/* @__PURE__ */ m("button", {
|
|
1108
1108
|
type: "button",
|
|
1109
|
-
onClick: () =>
|
|
1109
|
+
onClick: () => _(-1),
|
|
1110
1110
|
className: "flex items-center gap-2 text-sm text-text-secondary hover:text-text-primary mb-4",
|
|
1111
|
-
children: [/* @__PURE__ */
|
|
1111
|
+
children: [/* @__PURE__ */ p(Ie, { className: "size-4" }), "Back"]
|
|
1112
1112
|
}),
|
|
1113
|
-
/* @__PURE__ */
|
|
1113
|
+
/* @__PURE__ */ m("div", {
|
|
1114
1114
|
className: "flex items-center gap-3 mb-6",
|
|
1115
|
-
children: [/* @__PURE__ */
|
|
1115
|
+
children: [/* @__PURE__ */ p("div", {
|
|
1116
1116
|
className: "p-2 rounded-lg bg-[var(--color-accent-soft)] text-text-link",
|
|
1117
1117
|
children: hn()
|
|
1118
|
-
}), /* @__PURE__ */
|
|
1118
|
+
}), /* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("h1", {
|
|
1119
1119
|
className: "text-2xl font-bold text-text-primary",
|
|
1120
1120
|
children: mn()
|
|
1121
|
-
}), /* @__PURE__ */
|
|
1121
|
+
}), /* @__PURE__ */ p("p", {
|
|
1122
1122
|
className: "text-sm text-text-secondary",
|
|
1123
1123
|
children: "Complete your purchase securely"
|
|
1124
1124
|
})] })]
|
|
1125
1125
|
}),
|
|
1126
|
-
/* @__PURE__ */
|
|
1126
|
+
/* @__PURE__ */ p($e, {
|
|
1127
1127
|
className: "mb-6",
|
|
1128
|
-
children:
|
|
1128
|
+
children: h("billing.checkout.purpose", "Review what you are buying — plan, add-ons or credits — pick the billing account and payment method, apply any discount code, and pay. Taxes and the final total are shown before you confirm.")
|
|
1129
1129
|
}),
|
|
1130
|
-
|
|
1130
|
+
y?.upgradeFromSubscriptionId && y?.currentPlanName && /* @__PURE__ */ p("div", {
|
|
1131
1131
|
className: "mb-6 p-4 rounded-lg border border-border-subtle bg-status-info-bg-subtle",
|
|
1132
|
-
children: /* @__PURE__ */
|
|
1132
|
+
children: /* @__PURE__ */ m("div", {
|
|
1133
1133
|
className: "flex items-center gap-3",
|
|
1134
|
-
children: [/* @__PURE__ */
|
|
1134
|
+
children: [/* @__PURE__ */ p("div", {
|
|
1135
1135
|
className: "p-2 rounded-full bg-status-info-bg-subtle",
|
|
1136
|
-
children: /* @__PURE__ */
|
|
1137
|
-
}), /* @__PURE__ */
|
|
1136
|
+
children: /* @__PURE__ */ p(We, { className: "size-4 text-accent-blue" })
|
|
1137
|
+
}), /* @__PURE__ */ m("div", {
|
|
1138
1138
|
className: "flex-1",
|
|
1139
|
-
children: [/* @__PURE__ */
|
|
1139
|
+
children: [/* @__PURE__ */ m("p", {
|
|
1140
1140
|
className: "text-sm font-medium text-status-info-text",
|
|
1141
1141
|
children: [
|
|
1142
1142
|
"Upgrading from:",
|
|
1143
1143
|
" ",
|
|
1144
|
-
/* @__PURE__ */
|
|
1144
|
+
/* @__PURE__ */ p("span", {
|
|
1145
1145
|
className: "font-semibold",
|
|
1146
|
-
children:
|
|
1146
|
+
children: y.currentPlanName
|
|
1147
1147
|
})
|
|
1148
1148
|
]
|
|
1149
|
-
}), /* @__PURE__ */
|
|
1149
|
+
}), /* @__PURE__ */ p("p", {
|
|
1150
1150
|
className: "text-xs text-status-info-text mt-0.5",
|
|
1151
1151
|
children: "Your current subscription will be marked as upgraded and quotas will transfer to the new plan."
|
|
1152
1152
|
})]
|
|
1153
1153
|
})]
|
|
1154
1154
|
})
|
|
1155
1155
|
}),
|
|
1156
|
-
|
|
1156
|
+
y?.downgradeFromSubscriptionId && y?.currentPlanName && /* @__PURE__ */ p("div", {
|
|
1157
1157
|
className: "mb-6 p-4 rounded-lg border border-status-warning-border bg-status-warning-bg-subtle",
|
|
1158
|
-
children: /* @__PURE__ */
|
|
1158
|
+
children: /* @__PURE__ */ m("div", {
|
|
1159
1159
|
className: "flex items-center gap-3",
|
|
1160
|
-
children: [/* @__PURE__ */
|
|
1160
|
+
children: [/* @__PURE__ */ p("div", {
|
|
1161
1161
|
className: "p-2 rounded-full bg-status-warning-bg-subtle",
|
|
1162
|
-
children: /* @__PURE__ */
|
|
1163
|
-
}), /* @__PURE__ */
|
|
1162
|
+
children: /* @__PURE__ */ p(We, { className: "size-4 text-status-warning-text" })
|
|
1163
|
+
}), /* @__PURE__ */ m("div", {
|
|
1164
1164
|
className: "flex-1",
|
|
1165
|
-
children: [/* @__PURE__ */
|
|
1165
|
+
children: [/* @__PURE__ */ m("p", {
|
|
1166
1166
|
className: "text-sm font-medium text-status-warning-text",
|
|
1167
1167
|
children: [
|
|
1168
1168
|
"Downgrading from:",
|
|
1169
1169
|
" ",
|
|
1170
|
-
/* @__PURE__ */
|
|
1170
|
+
/* @__PURE__ */ p("span", {
|
|
1171
1171
|
className: "font-semibold",
|
|
1172
|
-
children:
|
|
1172
|
+
children: y.currentPlanName
|
|
1173
1173
|
})
|
|
1174
1174
|
]
|
|
1175
|
-
}), /* @__PURE__ */
|
|
1175
|
+
}), /* @__PURE__ */ p("p", {
|
|
1176
1176
|
className: "text-xs text-status-warning-text mt-0.5",
|
|
1177
1177
|
children: "Your current plan stays active until it expires, you keep all its features until then. After expiry, only the new plan applies."
|
|
1178
1178
|
})]
|
|
1179
1179
|
})]
|
|
1180
1180
|
})
|
|
1181
1181
|
}),
|
|
1182
|
-
/* @__PURE__ */
|
|
1182
|
+
/* @__PURE__ */ m("div", {
|
|
1183
1183
|
className: "grid gap-6 lg:grid-cols-5",
|
|
1184
|
-
children: [/* @__PURE__ */
|
|
1184
|
+
children: [/* @__PURE__ */ m("div", {
|
|
1185
1185
|
className: "lg:col-span-3 space-y-6 order-2 lg:order-1",
|
|
1186
1186
|
children: [
|
|
1187
|
-
|
|
1187
|
+
D === "CREDITS" && F.items[0] && /* @__PURE__ */ p("div", {
|
|
1188
1188
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 sm:p-6",
|
|
1189
|
-
children: /* @__PURE__ */
|
|
1190
|
-
value:
|
|
1189
|
+
children: /* @__PURE__ */ p(Se, {
|
|
1190
|
+
value: F.items[0].quantity,
|
|
1191
1191
|
onChange: fn,
|
|
1192
|
-
costPerCredit:
|
|
1193
|
-
currency:
|
|
1194
|
-
disabled:
|
|
1192
|
+
costPerCredit: G,
|
|
1193
|
+
currency: F.selectedCurrency,
|
|
1194
|
+
disabled: Xt
|
|
1195
1195
|
})
|
|
1196
1196
|
}),
|
|
1197
|
-
/* @__PURE__ */
|
|
1197
|
+
/* @__PURE__ */ m("div", {
|
|
1198
1198
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 sm:p-6 space-y-4",
|
|
1199
|
-
children: [/* @__PURE__ */
|
|
1200
|
-
accounts:
|
|
1201
|
-
selectedAccountId:
|
|
1202
|
-
onSelect:
|
|
1203
|
-
isLoading:
|
|
1199
|
+
children: [/* @__PURE__ */ p(ye, {
|
|
1200
|
+
accounts: q,
|
|
1201
|
+
selectedAccountId: F.billingAccount?.id ?? null,
|
|
1202
|
+
onSelect: F.setBillingAccount,
|
|
1203
|
+
isLoading: It,
|
|
1204
1204
|
disabled: sn,
|
|
1205
1205
|
disabledMessage: sn ? "Billing account is locked for plan changes" : void 0
|
|
1206
|
-
}),
|
|
1207
|
-
subscriptions:
|
|
1208
|
-
selectedSubscriptionId:
|
|
1209
|
-
onSelect:
|
|
1210
|
-
isLoading:
|
|
1206
|
+
}), D === "ADDON" && !E && F.billingAccount && /* @__PURE__ */ p(Te, {
|
|
1207
|
+
subscriptions: H,
|
|
1208
|
+
selectedSubscriptionId: F.selectedSubscriptionId,
|
|
1209
|
+
onSelect: F.setSelectedSubscriptionId,
|
|
1210
|
+
isLoading: qt
|
|
1211
1211
|
})]
|
|
1212
1212
|
}),
|
|
1213
|
-
|
|
1214
|
-
storeOrderId:
|
|
1215
|
-
currency:
|
|
1216
|
-
onChange:
|
|
1213
|
+
B && /* @__PURE__ */ p(Ae, {
|
|
1214
|
+
storeOrderId: g,
|
|
1215
|
+
currency: F.selectedCurrency,
|
|
1216
|
+
onChange: Ht
|
|
1217
1217
|
}),
|
|
1218
|
-
/* @__PURE__ */
|
|
1218
|
+
/* @__PURE__ */ m("div", {
|
|
1219
1219
|
className: "rounded-lg border border-border-subtle bg-bg-surface p-4 sm:p-6 space-y-4",
|
|
1220
1220
|
children: [
|
|
1221
|
-
/* @__PURE__ */
|
|
1222
|
-
savedPaymentMethods:
|
|
1223
|
-
selectedPaymentMethodId:
|
|
1224
|
-
onSelectSavedCard:
|
|
1225
|
-
selectedProvider:
|
|
1226
|
-
onSelectProvider:
|
|
1227
|
-
stripeEnabled:
|
|
1228
|
-
razorpayEnabled:
|
|
1229
|
-
canPayWithCredits:
|
|
1230
|
-
availableCredits:
|
|
1231
|
-
creditsRequired:
|
|
1232
|
-
billingCountry:
|
|
1233
|
-
saveCard:
|
|
1234
|
-
onSaveCardChange:
|
|
1235
|
-
autoRenewEnabled:
|
|
1236
|
-
isLoading:
|
|
1221
|
+
/* @__PURE__ */ p(De, {
|
|
1222
|
+
savedPaymentMethods: K,
|
|
1223
|
+
selectedPaymentMethodId: F.selectedPaymentMethodId,
|
|
1224
|
+
onSelectSavedCard: F.setSelectedPaymentMethodId,
|
|
1225
|
+
selectedProvider: F.selectedProvider,
|
|
1226
|
+
onSelectProvider: F.setPaymentProvider,
|
|
1227
|
+
stripeEnabled: jt,
|
|
1228
|
+
razorpayEnabled: Mt,
|
|
1229
|
+
canPayWithCredits: F.canPayWithCredits,
|
|
1230
|
+
availableCredits: F.availableCredits,
|
|
1231
|
+
creditsRequired: F.creditsRequired,
|
|
1232
|
+
billingCountry: J,
|
|
1233
|
+
saveCard: F.saveCard,
|
|
1234
|
+
onSaveCardChange: F.setSaveCard,
|
|
1235
|
+
autoRenewEnabled: D === "PLAN" && F.autoRenew,
|
|
1236
|
+
isLoading: Gt
|
|
1237
1237
|
}),
|
|
1238
|
-
|
|
1238
|
+
F.selectedProvider !== "CREDITS" && F.selectedProvider !== "AUTO" && /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p("div", { className: "border-t border-border-subtle" }), /* @__PURE__ */ p("div", {
|
|
1239
1239
|
className: "bg-bg-sunken p-4 rounded-button",
|
|
1240
|
-
children: /* @__PURE__ */
|
|
1240
|
+
children: /* @__PURE__ */ m("div", {
|
|
1241
1241
|
className: "flex items-start gap-3",
|
|
1242
|
-
children: [/* @__PURE__ */
|
|
1242
|
+
children: [/* @__PURE__ */ p("svg", {
|
|
1243
1243
|
className: "size-5 text-text-secondary mt-0.5",
|
|
1244
1244
|
fill: "none",
|
|
1245
1245
|
stroke: "currentColor",
|
|
1246
1246
|
viewBox: "0 0 24 24",
|
|
1247
|
-
children: /* @__PURE__ */
|
|
1247
|
+
children: /* @__PURE__ */ p("path", {
|
|
1248
1248
|
strokeLinecap: "round",
|
|
1249
1249
|
strokeLinejoin: "round",
|
|
1250
1250
|
strokeWidth: 2,
|
|
1251
1251
|
d: "M13 16h-1v-4h-1m1-4h.01M21 12a9 9 0 11-18 0 9 9 0 0118 0z"
|
|
1252
1252
|
})
|
|
1253
|
-
}), /* @__PURE__ */
|
|
1253
|
+
}), /* @__PURE__ */ m("div", {
|
|
1254
1254
|
className: "flex-1 text-sm",
|
|
1255
|
-
children: [/* @__PURE__ */
|
|
1255
|
+
children: [/* @__PURE__ */ m("p", {
|
|
1256
1256
|
className: "font-medium text-text-primary mb-1",
|
|
1257
|
-
children: ["Currency: ",
|
|
1258
|
-
}), /* @__PURE__ */
|
|
1257
|
+
children: ["Currency: ", F.selectedCurrency]
|
|
1258
|
+
}), /* @__PURE__ */ m("p", {
|
|
1259
1259
|
className: "text-text-secondary text-xs",
|
|
1260
1260
|
children: [
|
|
1261
1261
|
"All prices are shown in",
|
|
1262
1262
|
" ",
|
|
1263
|
-
/* @__PURE__ */
|
|
1263
|
+
/* @__PURE__ */ p("strong", {
|
|
1264
1264
|
className: "text-text-primary",
|
|
1265
|
-
children:
|
|
1265
|
+
children: F.selectedCurrency
|
|
1266
1266
|
}),
|
|
1267
1267
|
" ",
|
|
1268
1268
|
"based on your billing account settings.",
|
|
1269
|
-
|
|
1269
|
+
F.selectedCurrency === "INR" && " GST will be applied at checkout."
|
|
1270
1270
|
]
|
|
1271
1271
|
})]
|
|
1272
1272
|
})]
|
|
1273
1273
|
})
|
|
1274
1274
|
})] }),
|
|
1275
|
-
|
|
1275
|
+
D === "PLAN" && I?.getPlan?.pricingModel === "PER_SEAT" && /* @__PURE__ */ p("div", {
|
|
1276
1276
|
className: "border-t border-border-subtle pt-4",
|
|
1277
|
-
children: /* @__PURE__ */
|
|
1277
|
+
children: /* @__PURE__ */ m("div", {
|
|
1278
1278
|
className: "space-y-3",
|
|
1279
|
-
children: [/* @__PURE__ */
|
|
1279
|
+
children: [/* @__PURE__ */ m("div", { children: [/* @__PURE__ */ p("label", {
|
|
1280
1280
|
className: "text-sm font-medium text-text-primary",
|
|
1281
1281
|
children: "Number of seats"
|
|
1282
|
-
}),
|
|
1282
|
+
}), I.getPlan.minSeats && /* @__PURE__ */ m("p", {
|
|
1283
1283
|
className: "text-xs text-text-secondary mt-0.5",
|
|
1284
1284
|
children: [
|
|
1285
1285
|
"Minimum ",
|
|
1286
|
-
|
|
1286
|
+
I.getPlan.minSeats,
|
|
1287
1287
|
" seat",
|
|
1288
|
-
|
|
1288
|
+
I.getPlan.minSeats === 1 ? "" : "s",
|
|
1289
1289
|
" required"
|
|
1290
1290
|
]
|
|
1291
|
-
})] }), /* @__PURE__ */
|
|
1291
|
+
})] }), /* @__PURE__ */ m("div", {
|
|
1292
1292
|
className: "flex items-center gap-3",
|
|
1293
1293
|
children: [
|
|
1294
|
-
/* @__PURE__ */
|
|
1294
|
+
/* @__PURE__ */ p("button", {
|
|
1295
1295
|
type: "button",
|
|
1296
|
-
onClick: () =>
|
|
1297
|
-
disabled:
|
|
1296
|
+
onClick: () => kt((e) => Math.max(I.getPlan?.minSeats ?? 1, e - 1)),
|
|
1297
|
+
disabled: P <= (I.getPlan.minSeats ?? 1),
|
|
1298
1298
|
className: "size-9 rounded-button border border-border-subtle flex items-center justify-center hover:bg-action-ghost-bgHover disabled:opacity-40 disabled:cursor-not-allowed transition-colors text-text-primary",
|
|
1299
1299
|
children: "−"
|
|
1300
1300
|
}),
|
|
1301
|
-
/* @__PURE__ */
|
|
1301
|
+
/* @__PURE__ */ p("input", {
|
|
1302
1302
|
type: "number",
|
|
1303
|
-
value:
|
|
1304
|
-
min:
|
|
1305
|
-
max:
|
|
1303
|
+
value: P,
|
|
1304
|
+
min: I.getPlan.minSeats ?? 1,
|
|
1305
|
+
max: I.getPlan.maxSeats ?? 999,
|
|
1306
1306
|
onChange: (e) => {
|
|
1307
1307
|
let t = parseInt(e.target.value, 10);
|
|
1308
|
-
isNaN(t) ||
|
|
1308
|
+
isNaN(t) || kt(Math.max(I.getPlan?.minSeats ?? 1, t));
|
|
1309
1309
|
},
|
|
1310
1310
|
className: "w-20 h-9 text-center border border-border-subtle rounded-button bg-bg-surface text-text-primary text-sm focus:outline-none focus:ring-2 focus:ring-[var(--color-focus-ring)]"
|
|
1311
1311
|
}),
|
|
1312
|
-
/* @__PURE__ */
|
|
1312
|
+
/* @__PURE__ */ p("button", {
|
|
1313
1313
|
type: "button",
|
|
1314
|
-
onClick: () =>
|
|
1315
|
-
disabled:
|
|
1314
|
+
onClick: () => kt((e) => Math.min(I.getPlan?.maxSeats ?? 999, e + 1)),
|
|
1315
|
+
disabled: P >= (I.getPlan.maxSeats ?? 999),
|
|
1316
1316
|
className: "size-9 rounded-button border border-border-subtle flex items-center justify-center hover:bg-action-ghost-bgHover disabled:opacity-40 disabled:cursor-not-allowed transition-colors text-text-primary",
|
|
1317
1317
|
children: "+"
|
|
1318
1318
|
}),
|
|
1319
|
-
|
|
1319
|
+
I.getPlan.pricePerSeat && /* @__PURE__ */ m("span", {
|
|
1320
1320
|
className: "text-sm text-text-secondary",
|
|
1321
1321
|
children: [
|
|
1322
1322
|
"×",
|
|
1323
1323
|
" ",
|
|
1324
|
-
|
|
1324
|
+
I.getPlan.pricePerSeat.toLocaleString("en", {
|
|
1325
1325
|
style: "currency",
|
|
1326
|
-
currency:
|
|
1326
|
+
currency: I.getPlan.currency ?? "USD"
|
|
1327
1327
|
}),
|
|
1328
1328
|
" ",
|
|
1329
1329
|
"=",
|
|
1330
1330
|
" ",
|
|
1331
|
-
(
|
|
1331
|
+
(I.getPlan.pricePerSeat * P).toLocaleString("en", {
|
|
1332
1332
|
style: "currency",
|
|
1333
|
-
currency:
|
|
1333
|
+
currency: I.getPlan.currency ?? "USD"
|
|
1334
1334
|
}),
|
|
1335
1335
|
"/mo"
|
|
1336
1336
|
]
|
|
@@ -1342,58 +1342,58 @@ var et = () => {
|
|
|
1342
1342
|
]
|
|
1343
1343
|
})
|
|
1344
1344
|
]
|
|
1345
|
-
}), /* @__PURE__ */
|
|
1345
|
+
}), /* @__PURE__ */ p("div", {
|
|
1346
1346
|
className: "lg:col-span-2 order-1 lg:order-2",
|
|
1347
|
-
children: /* @__PURE__ */
|
|
1347
|
+
children: /* @__PURE__ */ m("div", {
|
|
1348
1348
|
className: "lg:sticky lg:top-6 space-y-4",
|
|
1349
1349
|
children: [
|
|
1350
|
-
/* @__PURE__ */
|
|
1350
|
+
/* @__PURE__ */ m("div", {
|
|
1351
1351
|
className: "rounded-lg border border-border-subtle bg-bg-surface",
|
|
1352
1352
|
children: [
|
|
1353
|
-
/* @__PURE__ */
|
|
1353
|
+
/* @__PURE__ */ p("div", {
|
|
1354
1354
|
className: "p-4",
|
|
1355
|
-
children: /* @__PURE__ */
|
|
1356
|
-
items:
|
|
1357
|
-
subtotal:
|
|
1358
|
-
discountAmount:
|
|
1359
|
-
taxAmount:
|
|
1360
|
-
taxRate:
|
|
1361
|
-
taxType:
|
|
1362
|
-
total:
|
|
1363
|
-
currency:
|
|
1364
|
-
isCalculatingTax:
|
|
1365
|
-
showInCredits:
|
|
1366
|
-
creditsRequired:
|
|
1367
|
-
onUpdateQuantity:
|
|
1368
|
-
onRemoveItem:
|
|
1369
|
-
isEditable:
|
|
1355
|
+
children: /* @__PURE__ */ p(be, {
|
|
1356
|
+
items: F.items,
|
|
1357
|
+
subtotal: F.subtotal,
|
|
1358
|
+
discountAmount: F.discountAmount,
|
|
1359
|
+
taxAmount: F.taxAmount,
|
|
1360
|
+
taxRate: F.taxRate,
|
|
1361
|
+
taxType: F.taxType,
|
|
1362
|
+
total: F.total,
|
|
1363
|
+
currency: F.selectedCurrency,
|
|
1364
|
+
isCalculatingTax: F.isCalculatingTax,
|
|
1365
|
+
showInCredits: F.selectedProvider === "CREDITS",
|
|
1366
|
+
creditsRequired: F.creditsRequired,
|
|
1367
|
+
onUpdateQuantity: D !== "PLAN" && D !== "ORDER" ? F.updateItemQuantity : void 0,
|
|
1368
|
+
onRemoveItem: F.removeItem,
|
|
1369
|
+
isEditable: D !== "PLAN" && D !== "ORDER"
|
|
1370
1370
|
})
|
|
1371
1371
|
}),
|
|
1372
|
-
|
|
1372
|
+
F.selectedProvider !== "CREDITS" && /* @__PURE__ */ p("div", {
|
|
1373
1373
|
className: "px-4 pb-4 border-t border-border-subtle pt-4",
|
|
1374
|
-
children: /* @__PURE__ */
|
|
1375
|
-
value:
|
|
1376
|
-
onChange:
|
|
1377
|
-
onValidate: async () => await
|
|
1378
|
-
onClear:
|
|
1379
|
-
isApplied:
|
|
1380
|
-
discountValue:
|
|
1381
|
-
discountType:
|
|
1382
|
-
isValidating:
|
|
1374
|
+
children: /* @__PURE__ */ p(xe, {
|
|
1375
|
+
value: F.promoCode,
|
|
1376
|
+
onChange: F.setPromoCode,
|
|
1377
|
+
onValidate: async () => await F.validatePromoCode(),
|
|
1378
|
+
onClear: F.clearPromoCode,
|
|
1379
|
+
isApplied: F.promoDiscount > 0,
|
|
1380
|
+
discountValue: F.promoDiscount,
|
|
1381
|
+
discountType: F.promoDiscountType,
|
|
1382
|
+
isValidating: F.isProcessing
|
|
1383
1383
|
})
|
|
1384
1384
|
}),
|
|
1385
|
-
|
|
1385
|
+
D === "PLAN" && F.selectedProvider !== "CREDITS" && F.selectedProvider !== "AUTO" && (() => {
|
|
1386
1386
|
let e = "", t = !1, n = !1;
|
|
1387
|
-
if (
|
|
1388
|
-
let r =
|
|
1387
|
+
if (F.selectedPaymentMethodId) {
|
|
1388
|
+
let r = K.find((e) => e.id === F.selectedPaymentMethodId);
|
|
1389
1389
|
r && (e = `${r.type === "CREDIT_CARD" || r.type === "DEBIT_CARD" ? "Card" : r.type}${r.last4 ? ` •••• ${r.last4}` : ""}`, t = !0, n = !1);
|
|
1390
|
-
} else (
|
|
1391
|
-
return /* @__PURE__ */
|
|
1390
|
+
} else (F.selectedProvider === "RAZORPAY" || F.selectedProvider === "STRIPE") && (e = F.selectedProvider === "RAZORPAY" ? "new card (Razorpay)" : "new card (Stripe)", t = !0, n = !0);
|
|
1391
|
+
return /* @__PURE__ */ p("div", {
|
|
1392
1392
|
className: "px-4 pb-4",
|
|
1393
|
-
children: /* @__PURE__ */
|
|
1394
|
-
enabled:
|
|
1393
|
+
children: /* @__PURE__ */ p(Ee, {
|
|
1394
|
+
enabled: F.autoRenew,
|
|
1395
1395
|
onToggle: (e) => {
|
|
1396
|
-
|
|
1396
|
+
F.setAutoRenew(e), e && F.selectedPaymentMethodId && F.setAutoRenewPaymentMethodId(F.selectedPaymentMethodId);
|
|
1397
1397
|
},
|
|
1398
1398
|
hasPaymentMethodSelected: t,
|
|
1399
1399
|
selectedPaymentMethodDisplay: e,
|
|
@@ -1403,14 +1403,14 @@ var et = () => {
|
|
|
1403
1403
|
})()
|
|
1404
1404
|
]
|
|
1405
1405
|
}),
|
|
1406
|
-
/* @__PURE__ */
|
|
1406
|
+
/* @__PURE__ */ p("button", {
|
|
1407
1407
|
type: "button",
|
|
1408
1408
|
onClick: ln,
|
|
1409
|
-
disabled:
|
|
1409
|
+
disabled: F.isProcessing || !F.billingAccount || F.items.length === 0 || F.selectedProvider === "CREDITS" && !tn || D === "ADDON" && !E && qt || D === "ADDON" && !E && H.length === 0 || D === "ADDON" && !E && !F.selectedSubscriptionId || B && (!V.shippingAddressId || !V.shippingMethodId),
|
|
1410
1410
|
className: "w-full px-6 py-4 rounded-lg bg-action-primary-bg text-action-primary-text font-semibold\n hover:bg-action-primary-bgHover disabled:opacity-50 disabled:cursor-not-allowed\n transition-colors flex items-center justify-center gap-2",
|
|
1411
|
-
children:
|
|
1411
|
+
children: F.isProcessing ? /* @__PURE__ */ m(f, { children: [/* @__PURE__ */ p(d, { className: "size-5 animate-spin" }), "Processing…"] }) : F.selectedProvider === "CREDITS" ? "Pay with Credits" : "Proceed to Payment"
|
|
1412
1412
|
}),
|
|
1413
|
-
/* @__PURE__ */
|
|
1413
|
+
/* @__PURE__ */ p("p", {
|
|
1414
1414
|
className: "text-center text-xs text-text-secondary",
|
|
1415
1415
|
children: "🔒 Secure checkout with 256-bit SSL encryption"
|
|
1416
1416
|
})
|
|
@@ -1418,22 +1418,22 @@ var et = () => {
|
|
|
1418
1418
|
})
|
|
1419
1419
|
})]
|
|
1420
1420
|
}),
|
|
1421
|
-
|
|
1422
|
-
billingAccountId:
|
|
1423
|
-
hasPhone: !!
|
|
1424
|
-
hasAddress: !!(
|
|
1421
|
+
ht && F.billingAccount && /* @__PURE__ */ p(Oe, {
|
|
1422
|
+
billingAccountId: F.billingAccount.id,
|
|
1423
|
+
hasPhone: !!F.billingAccount.contactNumber?.trim(),
|
|
1424
|
+
hasAddress: !!(F.billingAccount.billingAddresses?.[0]?.line1?.trim() && F.billingAccount.billingAddresses?.[0]?.postalCode?.trim()),
|
|
1425
1425
|
onCompleted: () => {
|
|
1426
|
-
|
|
1427
|
-
let t = (e.data?.myBillingAccounts ?? []).map(
|
|
1428
|
-
t &&
|
|
1426
|
+
_t.current = !0, gt(!1), ln(), Lt().then((e) => {
|
|
1427
|
+
let t = (e.data?.myBillingAccounts ?? []).map(et).find((e) => e?.id === F.billingAccount?.id);
|
|
1428
|
+
t && F.setBillingAccount(t);
|
|
1429
1429
|
});
|
|
1430
1430
|
},
|
|
1431
|
-
onCancel: () =>
|
|
1431
|
+
onCancel: () => gt(!1)
|
|
1432
1432
|
})
|
|
1433
1433
|
]
|
|
1434
1434
|
});
|
|
1435
1435
|
};
|
|
1436
1436
|
//#endregion
|
|
1437
|
-
export {
|
|
1437
|
+
export { tt as CheckoutPage };
|
|
1438
1438
|
|
|
1439
1439
|
//# sourceMappingURL=CheckoutPage.js.map
|