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