@solvimon/solvimon-web 0.1.0-alpha.30 → 0.1.0-alpha.31
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/README.md +152 -91
- package/dist/AddPaymentMethodModal-Bs_aOOCX.mjs +97 -0
- package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DF4PIR-A.mjs +89 -0
- package/dist/{Alert.vue.es-ZPG49yR_.mjs → Alert.vue.es-xhsk_7Gn.mjs} +1 -1
- package/dist/AuthProvider.handle-CUO6Qj-5.mjs +46 -0
- package/dist/{Avatar.vue.es-geDQsZwu.mjs → Avatar.vue.es-DrbtUiLO.mjs} +1 -1
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-C3JYNZuR.mjs +64 -0
- package/dist/BillingInformationForm.lib-ad8B2Y1O.mjs +32 -0
- package/dist/BillingInformationForm.vue_vue_type_script_setup_true_lang-BUdcXy0H.mjs +340 -0
- package/dist/BillingInformationModal-crgTNGf4.mjs +85 -0
- package/dist/{Button.vue.es-j7iYlqtJ.mjs → Button.vue.es-BHbanjR0.mjs} +1 -1
- package/dist/{ChargeOnDemandModal-CR01PkP_.mjs → ChargeOnDemandModal-DYiFtw1n.mjs} +44 -43
- package/dist/{Chip.vue.es-Dxx_0dte.mjs → Chip.vue.es-Dc6-PjEn.mjs} +2 -2
- package/dist/{ContentWithAsideLayout-Bnbsq8_5.mjs → ContentWithAsideLayout-C2kFcft1.mjs} +1 -1
- package/dist/{ContextMenu.vue.es-BJO4U47Q.mjs → ContextMenu.vue.es-CvX6O2IM.mjs} +10 -10
- package/dist/{CustomerBillingInformation.vue.es-CmNpqcBw.mjs → CustomerBillingInformation.vue.es-DQWt9osz.mjs} +3 -3
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-hNVtamwL.mjs +217 -0
- package/dist/CustomerShippingAddresses-C0c-4D2W.mjs +282 -0
- package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DJnr5D56.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-C50vGUvw.mjs} +992 -1100
- package/dist/{DividerText.vue.es-BusbyeAI.mjs → DividerText.vue.es-ChN6fnrH.mjs} +1 -1
- package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-wPma8Os-.mjs → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-DCUml1W4.mjs} +3 -3
- package/dist/{ErrorNotification.vue.es-F068p7PY.mjs → ErrorNotification.vue.es-CWIVt5q9.mjs} +2 -2
- package/dist/{FormMessage.vue.es-CwMQpIAW.mjs → FormMessage.vue.es-CQ64C8dt.mjs} +1 -1
- package/dist/{IconButton.vue.es-D8DtBW9i.mjs → IconButton.vue.es-BXzwMvVk.mjs} +2 -2
- package/dist/{IconTitle.vue.es-6VJtjJX2.mjs → IconTitle.vue.es-GyanM-JQ.mjs} +3 -3
- package/dist/{Input.vue.es-BLyHcmu4.mjs → Input.vue.es-CxiwRZYs.mjs} +4 -4
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Dl1vTzQD.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Ca0qflBR.mjs} +2 -2
- package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-DYskT3r7.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-Dw73a5Yt.mjs} +7 -7
- package/dist/{InvoicePreview.vue.es-Cpf66_xV.mjs → InvoicePreview.vue.es-BvnikfEH.mjs} +6 -6
- package/dist/{InvoicePricingClauseChip.vue.es-CDrAE901.mjs → InvoicePricingClauseChip.vue.es-DxcyTRGr.mjs} +3 -3
- package/dist/{Label.vue.es-es7ZUBSP.mjs → Label.vue.es-3ACRco55.mjs} +3 -3
- package/dist/LoadFailedNotice.vue_vue_type_script_setup_true_lang-1qpRh-0S.mjs +20 -0
- package/dist/{Modal.vue.es-eeR9FmvQ.mjs → Modal.vue.es-CDjfZDDx.mjs} +138 -127
- package/dist/OrderSummaryInvoice.vue_vue_type_script_setup_true_lang-CnZwxJ5b.mjs +789 -0
- package/dist/{PaymentCompletedCard.vue_vue_type_script_setup_true_lang-CrjVPks0.mjs → PaymentCompletedCard.vue_vue_type_script_setup_true_lang-PICpXmC3.mjs} +2 -2
- package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-DyjzaTK1.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-DpZtYBfM.mjs} +4 -4
- package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-BHQrWy6r.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-Co5qBQa8.mjs} +3 -3
- package/dist/{PaymentHistoryBlock-CN42ewCn.mjs → PaymentHistoryBlock-HUazLER6.mjs} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-C3Y5fHvA.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DdmUoiet.mjs} +4 -4
- package/dist/{PaymentIntegrationForm-D3Ye7LZ5.mjs → PaymentIntegrationForm-ZnIjTyda.mjs} +1 -1
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DU5wu66t.mjs +161 -0
- package/dist/{PaymentIntegrationFormAdyen-Fm-diCCO.mjs → PaymentIntegrationFormAdyen-sbw3AoKS.mjs} +302 -282
- package/dist/{PaymentIntegrationFormStripe-BANBL6za.mjs → PaymentIntegrationFormStripe-4JmKEwbS.mjs} +126 -117
- package/dist/{PaymentMethod.vue.es-t3-VyoE8.mjs → PaymentMethod.vue.es-DAabE41t.mjs} +23 -21
- package/dist/{PaymentMethodForm-CqP3GoNj.mjs → PaymentMethodForm-MmCUSJLE.mjs} +1 -1
- package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-DyiXLYRj.mjs +165 -0
- package/dist/{PaymentMethodSelector.vue_vue_type_script_setup_true_lang-D5wmRuCf.mjs → PaymentMethodSelector.vue_vue_type_script_setup_true_lang-Bv34aiZ6.mjs} +6 -6
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-DhkkiJaQ.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-DZ2Z-RMv.mjs} +28 -26
- package/dist/PaymentMethodsModal-CjpNw4kX.mjs +192 -0
- package/dist/PlanCustomizationEditor-BDWm_z2w.mjs +864 -0
- package/dist/{PortalLinkUnverified-Cp60_kRJ.mjs → PortalLinkUnverified-B7YYhv97.mjs} +3 -3
- package/dist/{PortalNotAvailable-DzSQnfzw.mjs → PortalNotAvailable-DIyeKrAp.mjs} +2 -2
- package/dist/{PricingGroupRangeInput.vue.es-Srq_3cga.mjs → PricingGroupRangeInput.vue.es-C6J8C7JS.mjs} +7 -7
- package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-oRijnVnZ.mjs → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-CiQ-C9Hh.mjs} +16 -15
- package/dist/{RadioGroupExtended.vue.es-BbBMDf6l.mjs → RadioGroupExtended.vue.es-hDmUAKIA.mjs} +5 -5
- package/dist/{Section.vue.es-Oqn1wGPZ.mjs → Section.vue.es-CwKTCeZ1.mjs} +1 -1
- package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-OM19NPBh.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Gn1aE60E.mjs} +2 -2
- package/dist/ShippingAddressForm.vue_vue_type_script_setup_true_lang-y7yOKwR3.mjs +144 -0
- package/dist/ShippingAddressesModal-CNXxkxnJ.mjs +283 -0
- package/dist/{StepInput.vue.es-ieh4EuJ7.mjs → StepInput.vue.es-GkrOtOVa.mjs} +4 -4
- package/dist/SubscriptionCancellationModal-C_xFPx1I.mjs +4 -0
- package/dist/SubscriptionCancellationModal.vue_vue_type_script_setup_true_lang-DdTC33Qh.mjs +240 -0
- package/dist/SubscriptionCancellationSuccess.vue_vue_type_script_setup_true_lang-CQ-ZOzVI.mjs +64 -0
- package/dist/SubscriptionDetails.entry.ce-DuP8TtKu.mjs +764 -0
- package/dist/{SubscriptionSchedules-DMxX3GpK.mjs → SubscriptionSchedules-DosBeXD7.mjs} +1 -1
- package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DXro_64f.mjs → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-5tyDFxEh.mjs} +1948 -1965
- package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-C26HShPu.mjs +90 -0
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-CHlXP_2x.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BUDuQk2e.mjs} +133 -108
- package/dist/Toggle.vue.es-S2g8WGY_.mjs +99 -0
- package/dist/{TooltipParagraph.vue.es-BES3zsYN.mjs → TooltipParagraph.vue.es-4HaXi8RP.mjs} +18 -18
- package/dist/{TranslationOverride.vue_vue_type_script_setup_true_lang-BJmlNrXT.mjs → TranslationOverride.vue_vue_type_script_setup_true_lang-C5Y6Kg-_.mjs} +1 -1
- package/dist/TrialChip.vue.es-CUfJ4SK3.mjs +47 -0
- package/dist/addonQuantity-BvoYTajN.mjs +128 -0
- package/dist/adyen-D4em6EgU.mjs +99 -0
- package/dist/adyenSdk-DUTO7xkT.mjs +63 -0
- package/dist/{api.es-qgvzNMU-.mjs → api.es-QaC926Xu.mjs} +2 -2
- package/dist/components/BillingInformation/BillingInformation.mjs +37 -41
- package/dist/components/BillingInformationForm/BillingInformationForm.mjs +45 -462
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +33 -42
- package/dist/components/Invoice/Invoice.mjs +426 -426
- package/dist/components/InvoiceDetails/InvoiceDetails.mjs +38 -47
- package/dist/components/InvoiceHeader/InvoiceHeader.mjs +29 -34
- package/dist/components/InvoicesList/InvoicesList.mjs +33 -42
- package/dist/components/PaymentHistory/PaymentHistory.mjs +39 -48
- package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +56 -64
- package/dist/components/ShippingAddressForm/ShippingAddressForm.ce.d.ts +1 -0
- package/dist/components/ShippingAddressForm/ShippingAddressForm.mjs +212 -0
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +34 -42
- package/dist/components/SubscriptionsList/SubscriptionsList.mjs +41 -50
- package/dist/components/WalletBalances/WalletBalances.mjs +46 -55
- package/dist/core/events.types.d.ts +1 -0
- package/dist/core/index.mjs +51 -34
- package/dist/{customElements-DK4GKNJG.mjs → customElements-d7Bhfqi_.mjs} +773 -746
- package/dist/{customer-lf6S5DBR.mjs → customer-CNCSN_G5.mjs} +1 -1
- package/dist/{de-DE-UJ6X6jXu.mjs → de-DE-D-sV3avS.mjs} +8 -5
- package/dist/{de-DE-Cyj_NtiI.mjs → de-DE-wZp39RC-.mjs} +68 -5
- package/dist/{fr-FR-Cvvbkwlj.mjs → fr-FR-BYHycSxz.mjs} +3 -0
- package/dist/{fr-FR-CRFoWQ7J.mjs → fr-FR-BrNXJ7gR.mjs} +68 -5
- package/dist/{countryData.es-BegoD-cZ.mjs → getCountryNameByCode.es-OGxn_zT0.mjs} +7 -2
- package/dist/index.es-BEZ2mumY.mjs +633 -0
- package/dist/{index.es-BrVTOW5D.mjs → index.es-C7J3WGGo.mjs} +4 -4
- package/dist/index.mjs +37 -33
- package/dist/invoices-CXvL8KQx.mjs +143 -0
- package/dist/{it-IT-DObZEc-U.mjs → it-IT-Bd1qsMVU.mjs} +68 -5
- package/dist/{it-IT-DnJP5URH.mjs → it-IT-zpPyT9PH.mjs} +8 -5
- package/dist/{nl-NL-q9xfTZF0.mjs → nl-NL-BOr4MR7L.mjs} +8 -5
- package/dist/{nl-NL-C02xHilF.mjs → nl-NL-C6Y6fqaW.mjs} +68 -5
- package/dist/paymentIntegrationFormLoaders-wi1vMgf_.mjs +31 -0
- package/dist/{paymentMethods-8w-ccfY_.mjs → paymentMethods-CG1fcG2v.mjs} +22 -21
- package/dist/{paymentOutcome-B6sW1eCV.mjs → paymentOutcome-D59QkGfm.mjs} +1 -1
- package/dist/paymentRedirect-DaS8Kccc.mjs +66 -0
- package/dist/payments-Dy81gmkC.mjs +71 -0
- package/dist/preloadPaymentIntegrationForms-C_9p7Jbi.mjs +9 -0
- package/dist/pricing-CBJT8C6L.mjs +42 -0
- package/dist/{pricingItem.es-bCPArbTa.mjs → pricingItem.es-AYq_hYeD.mjs} +1 -1
- package/dist/pricingPlanScheduleOverrides-GON_34ep.mjs +291 -0
- package/dist/randomUuid-BE_IQ-aq.mjs +10 -0
- package/dist/screens/Checkout/Checkout.mjs +1098 -3
- package/dist/screens/CheckoutSession/CheckoutSession.ce.d.ts +1 -0
- package/dist/screens/CheckoutSession/CheckoutSession.mjs +1316 -0
- package/dist/screens/CustomerOverview/CustomerOverview.mjs +209 -133
- package/dist/screens/PayInvoice/PayInvoice.mjs +282 -274
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +92 -97
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +2 -2
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +915 -404
- package/dist/{sorting.es-C0pdMgX0.mjs → sorting.es-kM0f1VX0.mjs} +1 -1
- package/dist/{subscription-BwzkagDI.mjs → subscription-DQ5mRp_e.mjs} +10 -10
- package/dist/subscriptions-Bm1eu9wc.mjs +99 -0
- package/dist/taxId.es-Zu2Ff1gL.mjs +510 -0
- package/dist/timePeriod.es-R9U0wLlB.mjs +13 -0
- package/dist/types/components/customer/BillingInformationForm/BillingInformationForm.types.d.ts +11 -14
- package/dist/types/components/customer/CheckoutForm/CheckoutAddressFields.types.d.ts +2 -9
- package/dist/types/components/customer/CheckoutForm/CheckoutForm.types.d.ts +10 -0
- package/dist/types/components/customer/CustomerPaymentMethodsBlock/CustomerPaymentMethodsBlock.types.d.ts +6 -0
- package/dist/types/components/payments/AddPaymentMethodModal/AddPaymentMethodModal.types.d.ts +17 -0
- package/dist/types/components/payments/ExpressPaymentMethod/ExpressPaymentMethodApplePay.types.d.ts +3 -2
- package/dist/types/components/payments/ExpressPaymentMethods/ExpressPaymentMethods.types.d.ts +3 -2
- package/dist/types/components/payments/OnDemandPaymentModalShell/OnDemandPaymentModalShell.types.d.ts +2 -0
- package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +12 -1
- package/dist/types/components/payments/PaymentMethodsList/PaymentMethodsList.types.d.ts +2 -0
- package/dist/types/components/payments/PaymentMethodsModal/PaymentMethodsModal.types.d.ts +22 -0
- package/dist/types/components/providers/ActionDispatchProvider/ActionDispatchProvider.lib.types.d.ts +1 -1
- package/dist/types/components/providers/AuthProvider/AuthProvider.vue.d.ts +7 -1
- package/dist/types/components/providers/EntryProvider/EntryProvider.types.d.ts +2 -2
- package/dist/types/components/providers/EntryProvider/EntryProvider.vue.d.ts +3 -11
- package/dist/types/components/providers/ErrorBoundary/ErrorBoundary.vue.d.ts +1 -5
- package/dist/types/components/providers/HostElementProvider/HostElementProvider.lib.d.ts +11 -0
- package/dist/types/components/providers/HostElementProvider/composables/useHostEvent.d.ts +12 -0
- package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +5 -4
- package/dist/types/components/providers/PortalProvider/PortalProvider.lib.d.ts +3 -3
- package/dist/types/components/providers/PortalProvider/PortalProvider.types.d.ts +3 -3
- package/dist/types/components/providers/PortalProvider/PortalProvider.vue.d.ts +6 -1
- package/dist/types/components/providers/PortalProvider/composables/usePortal.d.ts +1 -0
- package/dist/types/components/providers/Provider/Provider.types.d.ts +10 -3
- package/dist/types/components/providers/Provider/Provider.vue.d.ts +3 -14
- package/dist/types/components/subscriptions/ChargeOnDemandModal/ChargeOnDemandModal.types.d.ts +1 -1
- package/dist/types/components/subscriptions/OrderSummary.types.d.ts +14 -0
- package/dist/types/components/subscriptions/OrderSummaryInvoice.types.d.ts +14 -1
- package/dist/types/components/subscriptions/PlanCustomizationForm/PlanCustomizationEditor.types.d.ts +9 -0
- package/dist/types/components/subscriptions/PlanCustomizationForm/SeatsEditor.types.d.ts +4 -0
- package/dist/types/components/subscriptions/PlanCustomizationForm/SeatsEditorItem.types.d.ts +2 -0
- package/dist/types/components/subscriptions/PlanCustomizationForm/UnitsEditor.types.d.ts +4 -0
- package/dist/types/components/subscriptions/PlanCustomizationForm/UnitsEditorItem.types.d.ts +2 -0
- package/dist/types/components/subscriptions/SubscriptionCancellationSuccess/SubscriptionCancellationSuccess.types.d.ts +4 -0
- package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementForm.types.d.ts +10 -9
- package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementSuccess.types.d.ts +5 -0
- package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementSummary.types.d.ts +3 -0
- package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionPlanChangeSummary.types.d.ts +4 -0
- package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionPlanSelector.types.d.ts +7 -0
- package/dist/types/components/subscriptions/SubscriptionsList/SubscriptionsList.types.d.ts +1 -0
- package/dist/types/components/subscriptions/SubscriptionsList/SubscriptionsListItem.types.d.ts +1 -0
- package/dist/types/index.d.ts +5 -1
- package/dist/types/public/components/BillingInformation/BillingInformation.types.d.ts +5 -0
- package/dist/types/public/components/BillingInformationForm/BillingInformationForm.entry.types.d.ts +1 -2
- package/dist/types/public/components/CustomerPaymentMethods/CustomerPaymentMethods.types.d.ts +6 -2
- package/dist/types/public/components/Invoice/Invoice.types.d.ts +7 -7
- package/dist/types/public/components/InvoiceHeader/InvoiceHeader.types.d.ts +2 -2
- package/dist/types/public/components/InvoicesList/InvoicesList.types.d.ts +6 -7
- package/dist/types/public/components/PaymentMethodForm/PaymentMethodForm.entry.types.d.ts +1 -1
- package/dist/types/public/components/PaymentMethodForm/PaymentMethodForm.types.d.ts +19 -14
- package/dist/types/public/components/ShippingAddressForm/ShippingAddressForm.entry.ce.d.ts +1 -0
- package/dist/types/public/components/ShippingAddressForm/ShippingAddressForm.entry.types.d.ts +6 -0
- package/dist/types/public/components/ShippingAddressForm/ShippingAddressForm.types.d.ts +5 -0
- package/dist/types/public/components/SubscriptionsList/SubscriptionsList.types.d.ts +10 -1
- package/dist/types/public/core/action-request.types.d.ts +18 -24
- package/dist/types/public/core/events.types.d.ts +99 -0
- package/dist/types/public/core/index.d.ts +3 -1
- package/dist/types/public/core/types.d.ts +11 -2
- package/dist/types/public/screens/Checkout/Checkout.entry.types.d.ts +1 -7
- package/dist/types/public/screens/Checkout/Checkout.source.types.d.ts +151 -0
- package/dist/types/public/screens/Checkout/Checkout.types.d.ts +7 -30
- package/dist/types/public/screens/CheckoutSession/CheckoutSession.entry.ce.d.ts +1 -0
- package/dist/types/public/screens/CheckoutSession/CheckoutSession.entry.types.d.ts +3 -0
- package/dist/types/public/screens/CustomerOverview/CustomerOverview.types.d.ts +8 -2
- package/dist/types/public/screens/PayInvoice/PayInvoice.types.d.ts +0 -6
- package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.configuration.types.d.ts +2 -19
- package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.types.d.ts +2 -3
- package/dist/types/public/screens/SubscriptionManagement/SubscriptionManagement.types.d.ts +2 -1
- package/dist/types/services/paymentMethods.types.d.ts +12 -1
- package/dist/types/types/EntryBaseProps.d.ts +10 -6
- package/dist/types/types/branding.d.ts +15 -0
- package/dist/types/types/checkoutSession.d.ts +189 -0
- package/dist/types/types/errors.d.ts +2 -0
- package/dist/types/types/pricingPlanGroup.d.ts +25 -0
- package/dist/{useActionDispatchProvider-ChAHdwR8.mjs → useActionDispatchProvider-BWna0S6N.mjs} +1 -1
- package/dist/useAddressFormats-Dw7IEdxg.mjs +1997 -0
- package/dist/useCheckoutForm-BaV2j_ob.mjs +3310 -0
- package/dist/{useCustomer-CTMhg1nd.mjs → useCustomer-RUtEzDOY.mjs} +2 -2
- package/dist/useDefaultPaymentMethod-Dliq6_Yw.mjs +39 -0
- package/dist/useExperimentalFeature-DAKAF_a2.mjs +6 -0
- package/dist/useHostEvent-pjoWJ7ZH.mjs +12 -0
- package/dist/{useIncrementalLoading-CBVutPH8.mjs → useIncrementalLoading-B3gp58X-.mjs} +2 -2
- package/dist/{useInvoiceData-qUGbBAQK.mjs → useInvoiceData-Dya4mmvf.mjs} +2 -2
- package/dist/{useInvoicesList-wJvZAJpW.mjs → useInvoicesList-Dp3c_cb3.mjs} +9 -9
- package/dist/{useLoadInitialData-UvfYXgbi.mjs → useLoadInitialData-CwySdYZM.mjs} +1 -1
- package/dist/usePaymentFormHold-CYZ4BdOw.mjs +19 -0
- package/dist/{usePaymentMethodAvailability-35l4pWdH.mjs → usePaymentMethodAvailability-B7NV0ZtX.mjs} +4 -4
- package/dist/usePaymentMethodOptions-DDRjVvDJ.mjs +67 -0
- package/dist/{usePaymentMethods-De7hlLHo.mjs → usePaymentMethods-DBGyQA_I.mjs} +2 -2
- package/dist/{usePayments-hWS7fnOx.mjs → usePayments-ChGtK_As.mjs} +9 -9
- package/dist/usePortal--Uzbpbgr.mjs +14 -0
- package/dist/{useService-BwzIBIRp.mjs → useService-DayNZhPh.mjs} +1 -1
- package/dist/useShippingAddresses-TXVeGFPm.mjs +122 -0
- package/dist/useSubscription-lIGMFLG1.mjs +35 -0
- package/dist/useSubscriptionActions-BSlJVB4p.mjs +44 -0
- package/dist/useWatchDebounced-DkXgKe0E.mjs +20 -0
- package/package.json +12 -5
- package/dist/AuthProvider.handle-SRR_04XS.mjs +0 -50
- package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-nqKbgY7G.mjs +0 -58
- package/dist/Checkout.entry.ce-CopWuLJC.mjs +0 -4169
- package/dist/CheckoutAddressFields.vue_vue_type_script_setup_true_lang-CEnM1uxK.mjs +0 -828
- package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Jyb5ZN3s.mjs +0 -136
- package/dist/CustomerShippingAddresses-BRPukhRI.mjs +0 -397
- package/dist/OrderSummaryInvoice.vue_vue_type_script_setup_true_lang-B_FpibLA.mjs +0 -441
- package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-D07SEP8a.mjs +0 -181
- package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-CMRMbL3d.mjs +0 -161
- package/dist/PlanCustomizationEditor-B76UNEMm.mjs +0 -791
- package/dist/ShippingAddressesModal-c7nqf4Ny.mjs +0 -418
- package/dist/SubscriptionDetails.entry.ce-uYv45FGH.mjs +0 -1044
- package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-BZNsqN4G.mjs +0 -203
- package/dist/TrialChip.vue.es-C51z1ZiA.mjs +0 -35
- package/dist/addonQuantity-CCVaA3e-.mjs +0 -758
- package/dist/adyenSdk-B01MB9Ia.mjs +0 -58
- package/dist/getCountryNameByCode.es-BDHua7VM.mjs +0 -8
- package/dist/invoices-DdREPDXV.mjs +0 -123
- package/dist/paymentMethods-Goa25rTs.mjs +0 -61
- package/dist/payments-CKpU1K3t.mjs +0 -68
- package/dist/pricing-CEaZGgKe.mjs +0 -29
- package/dist/pricingPlanScheduleOverrides-BBp-DmpV.mjs +0 -233
- package/dist/pricingPlanSchedules-DSMptcAh.mjs +0 -38
- package/dist/subscriptions-B5bH8hsI.mjs +0 -66
- package/dist/taxId.es-e6NEvprh.mjs +0 -243
- package/dist/types/components/payments/ExpressPaymentMethodButton/ExpressPaymentMethodButton.types.d.ts +0 -3
- package/dist/useCustomerFormLabels-D4oDnfxA.mjs +0 -1173
- package/dist/usePaymentFormHold-Cwdr-vyc.mjs +0 -181
- package/dist/usePortal-DUfD6hrA.mjs +0 -7
- package/dist/useTimePeriod.es-BUorDLVK.mjs +0 -93
|
@@ -0,0 +1,3310 @@
|
|
|
1
|
+
import { defineComponent as se, openBlock as i, createElementBlock as x, createElementVNode as I, createVNode as _, unref as e, withCtx as m, createTextVNode as O, toDisplayString as M, withModifiers as qe, useId as Oa, ref as Q, useModel as Ra, computed as u, reactive as $a, Fragment as G, renderList as ce, createBlock as P, createCommentVNode as N, mergeModels as Ot, renderSlot as Rt, createSlots as $t, resolveComponent as Va, normalizeClass as rt, onMounted as na, watch as Pe, onBeforeUnmount as Ba, nextTick as Re, mergeProps as ve, withDirectives as Da, withKeys as Vt, vShow as Ua, defineAsyncComponent as Bt, isRef as Dt, toValue as nt, getCurrentInstance as Fa, toRaw as qa } from "vue";
|
|
2
|
+
import { u as ze, w as ja } from "./pricingPlanScheduleOverrides-GON_34ep.mjs";
|
|
3
|
+
import { f as ne } from "./formatting.es-RclXHhKo.mjs";
|
|
4
|
+
import { _ as Ie, b as za, a as Be } from "./Button.vue.es-BHbanjR0.mjs";
|
|
5
|
+
import { _ as st } from "./ErrorNotification.vue.es-CWIVt5q9.mjs";
|
|
6
|
+
import { a as fe, d as Y, e as sa } from "./customElements-d7Bhfqi_.mjs";
|
|
7
|
+
import { u as Ya } from "./useHostEvent-pjoWJ7ZH.mjs";
|
|
8
|
+
import { g as Ut } from "./getCountryNameByCode.es-OGxn_zT0.mjs";
|
|
9
|
+
import { a as Ft, b as Ga, g as Ha, c as qt, d as De, e as jt, _ as Ka, i as Za, s as Wa } from "./OrderSummaryInvoice.vue_vue_type_script_setup_true_lang-CnZwxJ5b.mjs";
|
|
10
|
+
import { i as je, f as Ja, t as Xa, l as zt, _ as Ue, c as Yt, m as la, g as Fe, u as Qa, d as eo, a as Gt, s as to, e as ao, b as Ht, n as oo, r as lt, h as io, o as Kt } from "./useAddressFormats-Dw7IEdxg.mjs";
|
|
11
|
+
import { _ as Zt } from "./Expand.vue.es-BleuAfDz.mjs";
|
|
12
|
+
import { _ as Ee } from "./Input.vue.es-CxiwRZYs.mjs";
|
|
13
|
+
import { _ as Wt, u as no } from "./Label.vue.es-3ACRco55.mjs";
|
|
14
|
+
import { _ as he } from "./Section.vue.es-CwKTCeZ1.mjs";
|
|
15
|
+
import { _ as so, a as lo, t as ro, o as uo } from "./taxId.es-Zu2Ff1gL.mjs";
|
|
16
|
+
import { f as pe, a as re, d as co, u as po, b as Jt, e as mo, r as go } from "./formControl-BZQLHnOO.mjs";
|
|
17
|
+
import { a as vo } from "./InvoicePreview.vue.es-BvnikfEH.mjs";
|
|
18
|
+
import { _ as ho, T as fo, a as yo } from "./TooltipParagraph.vue.es-4HaXi8RP.mjs";
|
|
19
|
+
import { _ as bo, g as _o, a as ko } from "./TrialChip.vue.es-CUfJ4SK3.mjs";
|
|
20
|
+
import { _ as Po } from "./PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-Co5qBQa8.mjs";
|
|
21
|
+
import { _ as Xt } from "./Chip.vue.es-Dc6-PjEn.mjs";
|
|
22
|
+
import { _ as Ao } from "./Toggle.vue.es-S2g8WGY_.mjs";
|
|
23
|
+
import { S as wo } from "./index.es-BEZ2mumY.mjs";
|
|
24
|
+
import { _ as Co } from "./SubscriptionSummary.vue_vue_type_script_setup_true_lang-C26HShPu.mjs";
|
|
25
|
+
import { u as ra } from "./useViewport-psZejz_H.mjs";
|
|
26
|
+
import { j as ua, e as ut, m as xo, c as Eo, n as Mo } from "./subscription-DQ5mRp_e.mjs";
|
|
27
|
+
import { b as Io, s as Lo } from "./paymentRedirect-DaS8Kccc.mjs";
|
|
28
|
+
import { _ as Se } from "./EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-DCUml1W4.mjs";
|
|
29
|
+
import { _ as Me } from "./Skeleton.vue_vue_type_script_setup_true_lang-D7MFjvrP.mjs";
|
|
30
|
+
import { _ as To } from "./DividerText.vue.es-ChN6fnrH.mjs";
|
|
31
|
+
import { d as No, c as So, t as Qt } from "./adyen-D4em6EgU.mjs";
|
|
32
|
+
import { a as ca } from "./adyenSdk-DUTO7xkT.mjs";
|
|
33
|
+
import { c as Oo } from "./payments-Dy81gmkC.mjs";
|
|
34
|
+
import { c as Ro } from "./paymentFailure-QZdZHBhf.mjs";
|
|
35
|
+
import { a as $o, i as Vo } from "./paymentOutcome-D59QkGfm.mjs";
|
|
36
|
+
import { u as Bo } from "./useExperimentalFeature-DAKAF_a2.mjs";
|
|
37
|
+
import { b as Do, c as Uo, g as Fo, d as qo } from "./pricing-CBJT8C6L.mjs";
|
|
38
|
+
import { g as jo } from "./pricingItem.es-AYq_hYeD.mjs";
|
|
39
|
+
import { C as zo } from "./ContentWithAsideLayout-C2kFcft1.mjs";
|
|
40
|
+
import { u as Yo } from "./usePaymentFormHold-CYZ4BdOw.mjs";
|
|
41
|
+
import { _ as Go } from "./SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Gn1aE60E.mjs";
|
|
42
|
+
import { u as Ho } from "./useWatchDebounced-DkXgKe0E.mjs";
|
|
43
|
+
const Ko = { class: "flex min-h-96 w-full items-center justify-center" }, Zo = { class: "max-w-sm" }, Wo = /* @__PURE__ */ se({
|
|
44
|
+
__name: "CheckoutNotAvailable",
|
|
45
|
+
setup(t) {
|
|
46
|
+
const { $t: r } = fe(), n = () => {
|
|
47
|
+
window.location.reload();
|
|
48
|
+
};
|
|
49
|
+
return (h, a) => (i(), x("div", Ko, [
|
|
50
|
+
I("div", Zo, [
|
|
51
|
+
_(e(Y), { variant: "heading-1" }, {
|
|
52
|
+
default: m(() => [
|
|
53
|
+
O(M(e(r)({
|
|
54
|
+
defaultMessage: "Checkout not available",
|
|
55
|
+
id: "checkout.not_available.title",
|
|
56
|
+
description: "The title of the checkout not available page"
|
|
57
|
+
})), 1)
|
|
58
|
+
]),
|
|
59
|
+
_: 1
|
|
60
|
+
}),
|
|
61
|
+
_(e(Y), {
|
|
62
|
+
variant: "body-sm",
|
|
63
|
+
color: "subtle"
|
|
64
|
+
}, {
|
|
65
|
+
default: m(() => [
|
|
66
|
+
O(M(e(r)({
|
|
67
|
+
defaultMessage: "The checkout is currently not available.",
|
|
68
|
+
id: "checkout.not_available.description",
|
|
69
|
+
description: "The description of the checkout not available page"
|
|
70
|
+
})) + " ", 1),
|
|
71
|
+
I("a", {
|
|
72
|
+
href: "#",
|
|
73
|
+
class: "text-primary-900 hover:underline",
|
|
74
|
+
onClick: qe(n, ["prevent"])
|
|
75
|
+
}, M(e(r)({
|
|
76
|
+
defaultMessage: "Reload",
|
|
77
|
+
id: "checkout.not_available.reload_button",
|
|
78
|
+
description: "The label of the reload button"
|
|
79
|
+
})), 1),
|
|
80
|
+
O(" " + M(e(r)({
|
|
81
|
+
defaultMessage: "this page to try again, or contact customer support.",
|
|
82
|
+
id: "checkout.not_available.contact_support_message",
|
|
83
|
+
description: "The message shown when the user wants to contact customer support"
|
|
84
|
+
})), 1)
|
|
85
|
+
]),
|
|
86
|
+
_: 1
|
|
87
|
+
})
|
|
88
|
+
])
|
|
89
|
+
]));
|
|
90
|
+
}
|
|
91
|
+
}), Jo = ["id"], Xo = { class: "grid grid-cols-1 gap-4" }, Qo = {
|
|
92
|
+
key: 0,
|
|
93
|
+
class: "grid grid-cols-1 gap-2"
|
|
94
|
+
}, ei = {
|
|
95
|
+
key: 1,
|
|
96
|
+
class: "flex flex-col gap-2"
|
|
97
|
+
}, ti = { key: 0 }, ai = { class: "mt-2 flex flex-col gap-2" }, oi = { class: "grid grid-cols-3 gap-2" }, ii = {
|
|
98
|
+
key: 3,
|
|
99
|
+
class: "mt-2"
|
|
100
|
+
}, ni = { class: "flex flex-col gap-2" }, si = { class: "mt-2" }, li = {
|
|
101
|
+
key: 1,
|
|
102
|
+
class: "grid grid-cols-1 gap-2"
|
|
103
|
+
}, ri = {
|
|
104
|
+
key: 2,
|
|
105
|
+
class: "mt-2 grid grid-cols-2 gap-2"
|
|
106
|
+
}, ui = { key: 0 }, ci = {
|
|
107
|
+
key: 0,
|
|
108
|
+
class: "mt-2 flex flex-col gap-2"
|
|
109
|
+
}, ea = /* @__PURE__ */ se({
|
|
110
|
+
__name: "CheckoutForm",
|
|
111
|
+
props: /* @__PURE__ */ Ot({
|
|
112
|
+
validation: { type: null },
|
|
113
|
+
initialState: { type: Object },
|
|
114
|
+
readOnlyEmail: { type: String },
|
|
115
|
+
showCustomerInfoOnTop: { type: Boolean },
|
|
116
|
+
isBillingInformationMandatory: { type: Boolean },
|
|
117
|
+
isShippingAddressRequired: { type: Boolean },
|
|
118
|
+
getIsFieldRequired: { type: Function },
|
|
119
|
+
shippingAddressFormat: { type: Object },
|
|
120
|
+
readOnly: { type: Boolean },
|
|
121
|
+
display: { type: Object },
|
|
122
|
+
isTypeLocked: { type: Boolean },
|
|
123
|
+
title: { type: String }
|
|
124
|
+
}, {
|
|
125
|
+
modelValue: { required: !0 },
|
|
126
|
+
modelModifiers: {}
|
|
127
|
+
}),
|
|
128
|
+
emits: /* @__PURE__ */ Ot(["submit"], ["update:modelValue"]),
|
|
129
|
+
setup(t) {
|
|
130
|
+
const r = t, n = Oa(), h = Q(!1), a = Ra(t, "modelValue"), L = u({
|
|
131
|
+
get: () => a.value.type === "ORGANIZATION",
|
|
132
|
+
set: (v) => {
|
|
133
|
+
a.value.type = v ? "ORGANIZATION" : "INDIVIDUAL";
|
|
134
|
+
}
|
|
135
|
+
}), C = u(() => a.value.type === "ORGANIZATION"), o = $a({
|
|
136
|
+
email: pe(a, "email", re),
|
|
137
|
+
addressLine1: pe(a, "addressLine1", re),
|
|
138
|
+
addressLine2: pe(a, "addressLine2", re),
|
|
139
|
+
postalCode: pe(a, "postalCode", re),
|
|
140
|
+
city: pe(a, "city", re),
|
|
141
|
+
state: pe(a, "state", re),
|
|
142
|
+
firstName: pe(a, "firstName", re),
|
|
143
|
+
lastName: pe(a, "lastName", re),
|
|
144
|
+
companyRegistrationNumber: pe(a, "companyRegistrationNumber", re),
|
|
145
|
+
taxExemptNote: pe(a, "taxExemptNote", re)
|
|
146
|
+
}), T = u({
|
|
147
|
+
get: () => !!a.value.taxExempt,
|
|
148
|
+
set: (v) => {
|
|
149
|
+
a.value.taxExempt = v;
|
|
150
|
+
}
|
|
151
|
+
}), b = (v) => la(r.display, v), f = (v) => b(v) === "EDITABLE", V = (v, l) => C.value && !!r.display && b(v) === l, B = u(
|
|
152
|
+
() => {
|
|
153
|
+
var v;
|
|
154
|
+
return !C.value && !!((v = r.display) != null && v.customer_details) && b("firstName") !== "HIDDEN";
|
|
155
|
+
}
|
|
156
|
+
), U = u({
|
|
157
|
+
get: () => a.value.country,
|
|
158
|
+
set: (v) => {
|
|
159
|
+
const l = re(v);
|
|
160
|
+
a.value.country = l !== void 0 && je(l) ? l : void 0;
|
|
161
|
+
}
|
|
162
|
+
}), w = u({
|
|
163
|
+
get: () => a.value.shippingCountry,
|
|
164
|
+
set: (v) => {
|
|
165
|
+
const l = re(v);
|
|
166
|
+
a.value.shippingCountry = l !== void 0 && je(l) ? l : void 0;
|
|
167
|
+
}
|
|
168
|
+
}), { $t: A } = fe(), q = Ja(), H = (v) => r.getIsFieldRequired(v) ? "" : " " + A({
|
|
169
|
+
defaultMessage: "(optional)",
|
|
170
|
+
id: "checkout.optional_suffix.label",
|
|
171
|
+
description: "The suffix for optional fields in the checkout form"
|
|
172
|
+
}), te = u(
|
|
173
|
+
() => a.value.country ? Ut(a.value.country) : void 0
|
|
174
|
+
), ee = u(
|
|
175
|
+
() => ["addressLine1", "postalCode", "city", "state"].some(r.getIsFieldRequired)
|
|
176
|
+
), oe = u(
|
|
177
|
+
() => [
|
|
178
|
+
a.value.addressLine1,
|
|
179
|
+
a.value.addressLine2,
|
|
180
|
+
[a.value.postalCode, a.value.city].filter(Boolean).join(" "),
|
|
181
|
+
a.value.state,
|
|
182
|
+
te.value
|
|
183
|
+
].filter((v) => !!v)
|
|
184
|
+
), Z = u(
|
|
185
|
+
() => A({
|
|
186
|
+
defaultMessage: "Name",
|
|
187
|
+
id: "checkout.individual_name.label",
|
|
188
|
+
description: "Label of the name of a customer who buys as an individual"
|
|
189
|
+
})
|
|
190
|
+
), c = u(
|
|
191
|
+
() => A({
|
|
192
|
+
defaultMessage: "Registration number",
|
|
193
|
+
id: "checkout.registration_number.label",
|
|
194
|
+
description: "Label of the company registration number of an organization customer"
|
|
195
|
+
})
|
|
196
|
+
), $ = u(
|
|
197
|
+
() => A({
|
|
198
|
+
defaultMessage: "Tax exempt",
|
|
199
|
+
id: "checkout.tax_exempt.label",
|
|
200
|
+
description: "Label of whether an organization customer is exempt from tax"
|
|
201
|
+
})
|
|
202
|
+
), R = u(
|
|
203
|
+
() => [
|
|
204
|
+
C.value && b("companyLegalName") === "READ_ONLY" && {
|
|
205
|
+
label: q.legalNameLabel,
|
|
206
|
+
value: a.value.companyLegalName
|
|
207
|
+
},
|
|
208
|
+
C.value && b("companyVatNumber") === "READ_ONLY" && {
|
|
209
|
+
label: q.vatNumberLabel,
|
|
210
|
+
value: a.value.companyVatNumber
|
|
211
|
+
},
|
|
212
|
+
V("companyRegistrationNumber", "READ_ONLY") && {
|
|
213
|
+
label: c.value,
|
|
214
|
+
value: a.value.companyRegistrationNumber
|
|
215
|
+
},
|
|
216
|
+
V("taxExempt", "READ_ONLY") && a.value.taxExempt && {
|
|
217
|
+
label: $.value,
|
|
218
|
+
value: a.value.taxExemptNote || A({
|
|
219
|
+
defaultMessage: "Yes",
|
|
220
|
+
id: "checkout.tax_exempt.yes",
|
|
221
|
+
description: "Shown for an organization customer that is exempt from tax, when no reason is given"
|
|
222
|
+
})
|
|
223
|
+
},
|
|
224
|
+
B.value && b("firstName") === "READ_ONLY" && {
|
|
225
|
+
label: Z.value,
|
|
226
|
+
value: [a.value.firstName, a.value.infix, a.value.lastName].filter(Boolean).join(" ")
|
|
227
|
+
}
|
|
228
|
+
].filter((v) => !!v && !!v.value)
|
|
229
|
+
), D = u(
|
|
230
|
+
() => !r.isTypeLocked || B.value || C.value && (b("companyLegalName") !== "HIDDEN" || b("companyVatNumber") !== "HIDDEN")
|
|
231
|
+
), z = u(() => {
|
|
232
|
+
var W, ae;
|
|
233
|
+
const { recipient: v, address: l } = Xa(
|
|
234
|
+
a.value,
|
|
235
|
+
"",
|
|
236
|
+
r.shippingAddressFormat
|
|
237
|
+
), y = (W = v.individual) == null ? void 0 : W.name;
|
|
238
|
+
return [
|
|
239
|
+
((ae = v.organization) == null ? void 0 : ae.attention_name) ?? [y == null ? void 0 : y.first_name, y == null ? void 0 : y.last_name].filter(Boolean).join(" "),
|
|
240
|
+
l.line1,
|
|
241
|
+
l.line2,
|
|
242
|
+
[l.postal_code, l.city].filter(Boolean).join(" "),
|
|
243
|
+
l.state,
|
|
244
|
+
l.country && Ut(l.country)
|
|
245
|
+
].filter((ie) => !!ie);
|
|
246
|
+
}), d = u({
|
|
247
|
+
get: () => a.value.billingAddressSameAsShipping,
|
|
248
|
+
set: (v) => {
|
|
249
|
+
a.value.billingAddressSameAsShipping = v;
|
|
250
|
+
}
|
|
251
|
+
}), j = u(
|
|
252
|
+
() => r.title ?? (r.isShippingAddressRequired ? A({
|
|
253
|
+
defaultMessage: "Shipping information",
|
|
254
|
+
id: "checkout.shipping_information_block.title",
|
|
255
|
+
description: "The title of the shipping information block in the checkout form"
|
|
256
|
+
}) : q.contactInformationTitle)
|
|
257
|
+
), k = u(
|
|
258
|
+
() => A({
|
|
259
|
+
defaultMessage: "Shipping address",
|
|
260
|
+
id: "checkout.shipping_address.title",
|
|
261
|
+
description: "Label above the address an order is shipped to in the checkout form"
|
|
262
|
+
})
|
|
263
|
+
), p = u(
|
|
264
|
+
() => A({
|
|
265
|
+
defaultMessage: "Shipping country",
|
|
266
|
+
id: "checkout.shipping_country.label",
|
|
267
|
+
description: "Label of the country an order is shipped to in the checkout form"
|
|
268
|
+
})
|
|
269
|
+
), E = u(
|
|
270
|
+
() => A({
|
|
271
|
+
defaultMessage: "Shipping country",
|
|
272
|
+
id: "checkout.shipping_country.placeholder",
|
|
273
|
+
description: "Placeholder of the shipping country select while no country is chosen"
|
|
274
|
+
})
|
|
275
|
+
);
|
|
276
|
+
return (v, l) => (i(), x("form", {
|
|
277
|
+
id: e(n),
|
|
278
|
+
onSubmit: l[20] || (l[20] = qe((y) => v.$emit("submit", a.value), ["prevent"]))
|
|
279
|
+
}, [
|
|
280
|
+
I("div", Xo, [
|
|
281
|
+
_(e(he), { title: j.value }, {
|
|
282
|
+
default: m(() => [
|
|
283
|
+
t.readOnly ? (i(), x("div", Qo, [
|
|
284
|
+
_(e(Y), {
|
|
285
|
+
variant: "body",
|
|
286
|
+
tag: "span",
|
|
287
|
+
weight: "semibold",
|
|
288
|
+
"no-spacing": ""
|
|
289
|
+
}, {
|
|
290
|
+
default: m(() => [
|
|
291
|
+
O(M(a.value.email), 1)
|
|
292
|
+
]),
|
|
293
|
+
_: 1
|
|
294
|
+
}),
|
|
295
|
+
t.isShippingAddressRequired ? (i(!0), x(G, { key: 0 }, ce(z.value, (y, W) => (i(), P(e(Y), {
|
|
296
|
+
key: W,
|
|
297
|
+
variant: "body-sm",
|
|
298
|
+
tag: "span",
|
|
299
|
+
color: "subtle",
|
|
300
|
+
"no-spacing": "",
|
|
301
|
+
class: "sv-checkout__shipping-address-summary"
|
|
302
|
+
}, {
|
|
303
|
+
default: m(() => [
|
|
304
|
+
O(M(y), 1)
|
|
305
|
+
]),
|
|
306
|
+
_: 2
|
|
307
|
+
}, 1024))), 128)) : (i(), P(e(Y), {
|
|
308
|
+
key: 1,
|
|
309
|
+
variant: "body-sm",
|
|
310
|
+
tag: "span",
|
|
311
|
+
color: "subtle",
|
|
312
|
+
"no-spacing": ""
|
|
313
|
+
}, {
|
|
314
|
+
default: m(() => [
|
|
315
|
+
O(M(te.value), 1)
|
|
316
|
+
]),
|
|
317
|
+
_: 1
|
|
318
|
+
}))
|
|
319
|
+
])) : (i(), x("div", ei, [
|
|
320
|
+
b("email") === "READ_ONLY" ? (i(), P(e(Y), {
|
|
321
|
+
key: 0,
|
|
322
|
+
variant: "body",
|
|
323
|
+
tag: "span",
|
|
324
|
+
weight: "semibold",
|
|
325
|
+
"no-spacing": ""
|
|
326
|
+
}, {
|
|
327
|
+
default: m(() => [
|
|
328
|
+
O(M(a.value.email), 1)
|
|
329
|
+
]),
|
|
330
|
+
_: 1
|
|
331
|
+
})) : f("email") ? (i(), P(e(Ee), {
|
|
332
|
+
key: 1,
|
|
333
|
+
modelValue: o.email,
|
|
334
|
+
"onUpdate:modelValue": l[0] || (l[0] = (y) => o.email = y),
|
|
335
|
+
required: "",
|
|
336
|
+
type: "email",
|
|
337
|
+
name: "email",
|
|
338
|
+
autocomplete: "email",
|
|
339
|
+
disabled: !!t.readOnlyEmail,
|
|
340
|
+
label: e(q).emailLabel,
|
|
341
|
+
placeholder: e(q).emailPlaceholder + H("email"),
|
|
342
|
+
error: t.validation.value.email.$errors
|
|
343
|
+
}, null, 8, ["modelValue", "disabled", "label", "placeholder", "error"])) : N("", !0),
|
|
344
|
+
!t.isShippingAddressRequired && b("country") === "READ_ONLY" ? (i(!0), x(G, { key: 2 }, ce(oe.value, (y, W) => (i(), P(e(Y), {
|
|
345
|
+
key: W,
|
|
346
|
+
variant: "body-sm",
|
|
347
|
+
tag: "span",
|
|
348
|
+
color: "subtle",
|
|
349
|
+
"no-spacing": ""
|
|
350
|
+
}, {
|
|
351
|
+
default: m(() => [
|
|
352
|
+
O(M(y), 1)
|
|
353
|
+
]),
|
|
354
|
+
_: 2
|
|
355
|
+
}, 1024))), 128)) : !t.isShippingAddressRequired && f("country") ? (i(), P(e(zt), {
|
|
356
|
+
key: 3,
|
|
357
|
+
"single-model-value": U.value,
|
|
358
|
+
"onUpdate:singleModelValue": l[3] || (l[3] = (y) => U.value = y),
|
|
359
|
+
i18n: { placeholderDefault: e(q).countryPlaceholder },
|
|
360
|
+
required: "",
|
|
361
|
+
name: "country",
|
|
362
|
+
label: e(q).countryLabel + H("country"),
|
|
363
|
+
error: t.validation.value.country.$errors
|
|
364
|
+
}, {
|
|
365
|
+
"label-suffix": m(() => [
|
|
366
|
+
!h.value && !t.isBillingInformationMandatory && !ee.value ? (i(), P(e(Ie), {
|
|
367
|
+
key: 0,
|
|
368
|
+
size: "xs",
|
|
369
|
+
intent: "subtle",
|
|
370
|
+
"icon-prefix": "add",
|
|
371
|
+
class: "py-0.5",
|
|
372
|
+
onClick: l[1] || (l[1] = (y) => h.value = !0)
|
|
373
|
+
}, {
|
|
374
|
+
default: m(() => [
|
|
375
|
+
O(M(e(A)({
|
|
376
|
+
defaultMessage: "More billing details",
|
|
377
|
+
description: "Label of the button in the checkout that lets you fill out all billing details",
|
|
378
|
+
id: "checkout.billing_details.add_billing_details_button.label"
|
|
379
|
+
})), 1)
|
|
380
|
+
]),
|
|
381
|
+
_: 1
|
|
382
|
+
})) : N("", !0),
|
|
383
|
+
h.value && !t.isBillingInformationMandatory && !ee.value ? (i(), P(e(Ie), {
|
|
384
|
+
key: 1,
|
|
385
|
+
size: "sm",
|
|
386
|
+
intent: "subtle",
|
|
387
|
+
"icon-prefix": "close",
|
|
388
|
+
class: "py-0.5",
|
|
389
|
+
onClick: l[2] || (l[2] = (y) => h.value = !1)
|
|
390
|
+
}, {
|
|
391
|
+
default: m(() => [
|
|
392
|
+
O(M(e(A)({
|
|
393
|
+
defaultMessage: "Remove billing details",
|
|
394
|
+
id: "checkout.billing_details.remove_billing_details_button.label",
|
|
395
|
+
description: "Label of the button in the checkout that lets you remove the billing details"
|
|
396
|
+
})), 1)
|
|
397
|
+
]),
|
|
398
|
+
_: 1
|
|
399
|
+
})) : N("", !0)
|
|
400
|
+
]),
|
|
401
|
+
_: 1
|
|
402
|
+
}, 8, ["single-model-value", "i18n", "label", "error"])) : N("", !0)
|
|
403
|
+
])),
|
|
404
|
+
!t.isShippingAddressRequired && f("country") ? (i(), P(e(Zt), {
|
|
405
|
+
key: 2,
|
|
406
|
+
"is-open": h.value || !!t.isBillingInformationMandatory || ee.value
|
|
407
|
+
}, {
|
|
408
|
+
default: m(() => [
|
|
409
|
+
h.value || t.isBillingInformationMandatory || ee.value ? (i(), x("div", ti, [
|
|
410
|
+
I("div", ai, [
|
|
411
|
+
_(e(Ee), {
|
|
412
|
+
modelValue: o.addressLine1,
|
|
413
|
+
"onUpdate:modelValue": l[4] || (l[4] = (y) => o.addressLine1 = y),
|
|
414
|
+
name: "address_line_1",
|
|
415
|
+
autocomplete: "billing address-line1",
|
|
416
|
+
label: e(A)({
|
|
417
|
+
defaultMessage: "Billing address",
|
|
418
|
+
id: "checkout.address.title",
|
|
419
|
+
description: "Label of the billing address, above its first line, in the checkout and billing information forms"
|
|
420
|
+
}),
|
|
421
|
+
placeholder: e(A)({
|
|
422
|
+
defaultMessage: "Address line 1",
|
|
423
|
+
id: "checkout.address.line1.placeholder",
|
|
424
|
+
description: "Address line 1 of the customer address in the checkout form"
|
|
425
|
+
}) + H("addressLine1"),
|
|
426
|
+
required: "",
|
|
427
|
+
error: t.validation.value.addressLine1.$errors
|
|
428
|
+
}, null, 8, ["modelValue", "label", "placeholder", "error"]),
|
|
429
|
+
_(Ue, {
|
|
430
|
+
modelValue: o.addressLine2,
|
|
431
|
+
"onUpdate:modelValue": l[5] || (l[5] = (y) => o.addressLine2 = y),
|
|
432
|
+
name: "address_line_2",
|
|
433
|
+
autocomplete: "billing address-line2",
|
|
434
|
+
label: e(q).addressLine2Label,
|
|
435
|
+
placeholder: e(A)({
|
|
436
|
+
defaultMessage: "Address line 2",
|
|
437
|
+
id: "checkout.address.line2.placeholder",
|
|
438
|
+
description: "Address line 2 of the customer address in the checkout form"
|
|
439
|
+
}) + H("addressLine2")
|
|
440
|
+
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
441
|
+
I("div", oi, [
|
|
442
|
+
_(Ue, {
|
|
443
|
+
modelValue: o.postalCode,
|
|
444
|
+
"onUpdate:modelValue": l[6] || (l[6] = (y) => o.postalCode = y),
|
|
445
|
+
name: "postal_code",
|
|
446
|
+
autocomplete: "billing postal-code",
|
|
447
|
+
label: e(q).postalCodeLabel,
|
|
448
|
+
placeholder: e(q).postalCodePlaceholder + H("postalCode"),
|
|
449
|
+
error: t.validation.value.postalCode.$errors
|
|
450
|
+
}, null, 8, ["modelValue", "label", "placeholder", "error"]),
|
|
451
|
+
_(Ue, {
|
|
452
|
+
modelValue: o.city,
|
|
453
|
+
"onUpdate:modelValue": l[7] || (l[7] = (y) => o.city = y),
|
|
454
|
+
name: "city",
|
|
455
|
+
autocomplete: "billing address-level2",
|
|
456
|
+
label: e(q).cityLabel,
|
|
457
|
+
placeholder: e(q).cityPlaceholder + H("city")
|
|
458
|
+
}, null, 8, ["modelValue", "label", "placeholder"]),
|
|
459
|
+
_(Ue, {
|
|
460
|
+
modelValue: o.state,
|
|
461
|
+
"onUpdate:modelValue": l[8] || (l[8] = (y) => o.state = y),
|
|
462
|
+
name: "state",
|
|
463
|
+
autocomplete: "billing address-level1",
|
|
464
|
+
label: e(q).stateLabel,
|
|
465
|
+
placeholder: e(q).statePlaceholder + H("state"),
|
|
466
|
+
error: t.validation.value.state.$errors
|
|
467
|
+
}, null, 8, ["modelValue", "label", "placeholder", "error"])
|
|
468
|
+
])
|
|
469
|
+
])
|
|
470
|
+
])) : N("", !0)
|
|
471
|
+
]),
|
|
472
|
+
_: 1
|
|
473
|
+
}, 8, ["is-open"])) : N("", !0),
|
|
474
|
+
t.isShippingAddressRequired && !t.readOnly ? (i(), x("fieldset", ii, [
|
|
475
|
+
I("legend", null, [
|
|
476
|
+
_(e(Wt), {
|
|
477
|
+
tag: "span",
|
|
478
|
+
required: ""
|
|
479
|
+
}, {
|
|
480
|
+
default: m(() => [
|
|
481
|
+
O(M(k.value), 1)
|
|
482
|
+
]),
|
|
483
|
+
_: 1
|
|
484
|
+
})
|
|
485
|
+
]),
|
|
486
|
+
I("div", ni, [
|
|
487
|
+
_(e(zt), {
|
|
488
|
+
"single-model-value": w.value,
|
|
489
|
+
"onUpdate:singleModelValue": l[9] || (l[9] = (y) => w.value = y),
|
|
490
|
+
i18n: { placeholderDefault: E.value },
|
|
491
|
+
required: "",
|
|
492
|
+
"label-screen-reader-only": "",
|
|
493
|
+
name: "shipping_country",
|
|
494
|
+
label: p.value,
|
|
495
|
+
error: t.validation.value.shippingCountry.$errors
|
|
496
|
+
}, null, 8, ["single-model-value", "i18n", "label", "error"]),
|
|
497
|
+
_(Yt, {
|
|
498
|
+
modelValue: a.value,
|
|
499
|
+
"onUpdate:modelValue": l[10] || (l[10] = (y) => a.value = y),
|
|
500
|
+
variant: "SHIPPING",
|
|
501
|
+
class: "sv-checkout__shipping-address",
|
|
502
|
+
"get-optional-suffix": H,
|
|
503
|
+
format: t.shippingAddressFormat,
|
|
504
|
+
errors: {
|
|
505
|
+
addressLine1: t.validation.value.shippingAddressLine1.$errors,
|
|
506
|
+
postalCode: t.validation.value.shippingPostalCode.$errors,
|
|
507
|
+
city: t.validation.value.shippingCity.$errors,
|
|
508
|
+
state: t.validation.value.shippingState.$errors,
|
|
509
|
+
phoneNumber: t.validation.value.shippingPhoneNumber.$errors,
|
|
510
|
+
lastName: t.validation.value.shippingLastName.$errors
|
|
511
|
+
}
|
|
512
|
+
}, null, 8, ["modelValue", "format", "errors"])
|
|
513
|
+
]),
|
|
514
|
+
I("div", si, [
|
|
515
|
+
_(e(Ft), {
|
|
516
|
+
modelValue: d.value,
|
|
517
|
+
"onUpdate:modelValue": l[11] || (l[11] = (y) => d.value = y),
|
|
518
|
+
name: "billing_address_same_as_shipping",
|
|
519
|
+
class: "sv-checkout__billing-same-as-shipping",
|
|
520
|
+
label: e(A)({
|
|
521
|
+
defaultMessage: "Billing address is the same as shipping address",
|
|
522
|
+
id: "checkout.billing_address_same_as_shipping.label",
|
|
523
|
+
description: "Label of the checkbox that bills the order to the address it ships to"
|
|
524
|
+
})
|
|
525
|
+
}, null, 8, ["modelValue", "label"])
|
|
526
|
+
])
|
|
527
|
+
])) : N("", !0)
|
|
528
|
+
]),
|
|
529
|
+
_: 1
|
|
530
|
+
}, 8, ["title"]),
|
|
531
|
+
t.isShippingAddressRequired && !t.readOnly ? (i(), x(G, { key: 0 }, [
|
|
532
|
+
d.value ? N("", !0) : (i(), P(e(he), {
|
|
533
|
+
key: 0,
|
|
534
|
+
class: "sv-checkout__billing-section"
|
|
535
|
+
}, {
|
|
536
|
+
default: m(() => [
|
|
537
|
+
I("fieldset", null, [
|
|
538
|
+
I("legend", null, [
|
|
539
|
+
_(e(Wt), {
|
|
540
|
+
tag: "span",
|
|
541
|
+
required: ""
|
|
542
|
+
}, {
|
|
543
|
+
default: m(() => [
|
|
544
|
+
O(M(e(q).addressTitle), 1)
|
|
545
|
+
]),
|
|
546
|
+
_: 1
|
|
547
|
+
})
|
|
548
|
+
]),
|
|
549
|
+
_(Yt, {
|
|
550
|
+
modelValue: a.value,
|
|
551
|
+
"onUpdate:modelValue": l[12] || (l[12] = (y) => a.value = y),
|
|
552
|
+
variant: "BILLING",
|
|
553
|
+
class: "sv-checkout__billing-address",
|
|
554
|
+
"with-country": "",
|
|
555
|
+
"country-label": e(q).countryLabel,
|
|
556
|
+
"get-optional-suffix": H,
|
|
557
|
+
errors: {
|
|
558
|
+
addressLine1: t.validation.value.addressLine1.$errors,
|
|
559
|
+
postalCode: t.validation.value.postalCode.$errors,
|
|
560
|
+
city: t.validation.value.city.$errors,
|
|
561
|
+
state: t.validation.value.state.$errors,
|
|
562
|
+
country: t.validation.value.country.$errors
|
|
563
|
+
}
|
|
564
|
+
}, null, 8, ["modelValue", "country-label", "errors"])
|
|
565
|
+
])
|
|
566
|
+
]),
|
|
567
|
+
_: 1
|
|
568
|
+
}))
|
|
569
|
+
], 64)) : N("", !0),
|
|
570
|
+
!t.readOnly && D.value ? (i(), P(e(he), { key: 1 }, {
|
|
571
|
+
default: m(() => [
|
|
572
|
+
t.isTypeLocked ? N("", !0) : (i(), P(so, {
|
|
573
|
+
key: 0,
|
|
574
|
+
modelValue: L.value,
|
|
575
|
+
"onUpdate:modelValue": l[13] || (l[13] = (y) => L.value = y),
|
|
576
|
+
"no-spacing": "",
|
|
577
|
+
class: "!flex"
|
|
578
|
+
}, null, 8, ["modelValue"])),
|
|
579
|
+
R.value.length ? (i(), x("div", li, [
|
|
580
|
+
(i(!0), x(G, null, ce(R.value, (y) => (i(), x("div", {
|
|
581
|
+
key: y.label,
|
|
582
|
+
class: "flex flex-col"
|
|
583
|
+
}, [
|
|
584
|
+
_(e(Y), {
|
|
585
|
+
variant: "body-sm",
|
|
586
|
+
tag: "span",
|
|
587
|
+
color: "subtle",
|
|
588
|
+
"no-spacing": ""
|
|
589
|
+
}, {
|
|
590
|
+
default: m(() => [
|
|
591
|
+
O(M(y.label), 1)
|
|
592
|
+
]),
|
|
593
|
+
_: 2
|
|
594
|
+
}, 1024),
|
|
595
|
+
_(e(Y), {
|
|
596
|
+
variant: "body",
|
|
597
|
+
tag: "span",
|
|
598
|
+
"no-spacing": ""
|
|
599
|
+
}, {
|
|
600
|
+
default: m(() => [
|
|
601
|
+
O(M(y.value), 1)
|
|
602
|
+
]),
|
|
603
|
+
_: 2
|
|
604
|
+
}, 1024)
|
|
605
|
+
]))), 128))
|
|
606
|
+
])) : N("", !0),
|
|
607
|
+
B.value && f("firstName") ? (i(), x("div", ri, [
|
|
608
|
+
_(e(Ee), {
|
|
609
|
+
modelValue: o.firstName,
|
|
610
|
+
"onUpdate:modelValue": l[14] || (l[14] = (y) => o.firstName = y),
|
|
611
|
+
name: "first_name",
|
|
612
|
+
required: t.getIsFieldRequired("firstName"),
|
|
613
|
+
autocomplete: "given-name",
|
|
614
|
+
label: e(A)({
|
|
615
|
+
defaultMessage: "First name",
|
|
616
|
+
id: "checkout.first_name.label",
|
|
617
|
+
description: "Label of the first name of a customer who buys as an individual"
|
|
618
|
+
}),
|
|
619
|
+
error: t.validation.value.firstName.$errors
|
|
620
|
+
}, null, 8, ["modelValue", "required", "label", "error"]),
|
|
621
|
+
_(e(Ee), {
|
|
622
|
+
modelValue: o.lastName,
|
|
623
|
+
"onUpdate:modelValue": l[15] || (l[15] = (y) => o.lastName = y),
|
|
624
|
+
name: "last_name",
|
|
625
|
+
required: t.getIsFieldRequired("lastName"),
|
|
626
|
+
autocomplete: "family-name",
|
|
627
|
+
label: e(A)({
|
|
628
|
+
defaultMessage: "Last name",
|
|
629
|
+
id: "checkout.last_name.label",
|
|
630
|
+
description: "Label of the last name of a customer who buys as an individual"
|
|
631
|
+
}),
|
|
632
|
+
error: t.validation.value.lastName.$errors
|
|
633
|
+
}, null, 8, ["modelValue", "required", "label", "error"])
|
|
634
|
+
])) : N("", !0),
|
|
635
|
+
_(e(Zt), { "is-open": C.value }, {
|
|
636
|
+
default: m(() => [
|
|
637
|
+
C.value ? (i(), x("div", ui, [
|
|
638
|
+
_(lo, {
|
|
639
|
+
modelValue: a.value,
|
|
640
|
+
"onUpdate:modelValue": l[16] || (l[16] = (y) => a.value = y),
|
|
641
|
+
class: "mt-2",
|
|
642
|
+
errors: {
|
|
643
|
+
companyLegalName: t.validation.value.companyLegalName.$errors,
|
|
644
|
+
companyVatNumber: t.validation.value.companyVatNumber.$errors
|
|
645
|
+
},
|
|
646
|
+
"is-vat-number-invalid": t.validation.value.companyVatNumber.$invalid,
|
|
647
|
+
"hides-legal-name": !f("companyLegalName"),
|
|
648
|
+
"hides-vat-number": !f("companyVatNumber")
|
|
649
|
+
}, null, 8, ["modelValue", "errors", "is-vat-number-invalid", "hides-legal-name", "hides-vat-number"]),
|
|
650
|
+
V("companyRegistrationNumber", "EDITABLE") || V("taxExempt", "EDITABLE") ? (i(), x("div", ci, [
|
|
651
|
+
V("companyRegistrationNumber", "EDITABLE") ? (i(), P(e(Ee), {
|
|
652
|
+
key: 0,
|
|
653
|
+
modelValue: o.companyRegistrationNumber,
|
|
654
|
+
"onUpdate:modelValue": l[17] || (l[17] = (y) => o.companyRegistrationNumber = y),
|
|
655
|
+
name: "registration_number",
|
|
656
|
+
autocomplete: "off",
|
|
657
|
+
required: t.getIsFieldRequired("companyRegistrationNumber"),
|
|
658
|
+
label: c.value,
|
|
659
|
+
error: t.validation.value.companyRegistrationNumber.$errors
|
|
660
|
+
}, null, 8, ["modelValue", "required", "label", "error"])) : N("", !0),
|
|
661
|
+
V("taxExempt", "EDITABLE") ? (i(), x(G, { key: 1 }, [
|
|
662
|
+
_(e(Ft), {
|
|
663
|
+
modelValue: T.value,
|
|
664
|
+
"onUpdate:modelValue": l[18] || (l[18] = (y) => T.value = y),
|
|
665
|
+
name: "tax_exempt",
|
|
666
|
+
label: $.value
|
|
667
|
+
}, null, 8, ["modelValue", "label"]),
|
|
668
|
+
T.value ? (i(), P(e(Ee), {
|
|
669
|
+
key: 0,
|
|
670
|
+
modelValue: o.taxExemptNote,
|
|
671
|
+
"onUpdate:modelValue": l[19] || (l[19] = (y) => o.taxExemptNote = y),
|
|
672
|
+
name: "tax_exempt_note",
|
|
673
|
+
autocomplete: "off",
|
|
674
|
+
label: e(A)({
|
|
675
|
+
defaultMessage: "Reason for tax exemption",
|
|
676
|
+
id: "checkout.tax_exempt_note.label",
|
|
677
|
+
description: "Label of the reason an organization customer is exempt from tax"
|
|
678
|
+
})
|
|
679
|
+
}, null, 8, ["modelValue", "label"])) : N("", !0)
|
|
680
|
+
], 64)) : N("", !0)
|
|
681
|
+
])) : N("", !0)
|
|
682
|
+
])) : N("", !0)
|
|
683
|
+
]),
|
|
684
|
+
_: 1
|
|
685
|
+
}, 8, ["is-open"])
|
|
686
|
+
]),
|
|
687
|
+
_: 1
|
|
688
|
+
})) : N("", !0)
|
|
689
|
+
])
|
|
690
|
+
], 40, Jo));
|
|
691
|
+
}
|
|
692
|
+
}), di = (t) => typeof t == "object" && t !== null && typeof Reflect.get(t, "strong") == "string", Te = (t) => ({
|
|
693
|
+
strong: t.filter((r) => typeof r == "string").join("")
|
|
694
|
+
});
|
|
695
|
+
function pi(t) {
|
|
696
|
+
return (Array.isArray(t) ? t : [t]).flatMap((n) => typeof n == "string" ? n ? [{ text: n, strong: !1 }] : [] : di(n) ? [{ text: n.strong, strong: !0 }] : []);
|
|
697
|
+
}
|
|
698
|
+
const mi = {
|
|
699
|
+
key: 0,
|
|
700
|
+
class: "flex items-center"
|
|
701
|
+
}, gi = { key: 1 }, vi = { key: 0 }, hi = /* @__PURE__ */ se({
|
|
702
|
+
__name: "CheckoutTitle",
|
|
703
|
+
props: {
|
|
704
|
+
trialPeriod: { type: Object },
|
|
705
|
+
subscriptionName: { type: String },
|
|
706
|
+
amount: { type: Object },
|
|
707
|
+
dueTodayAmount: { type: Object },
|
|
708
|
+
recurringAmount: { type: Object },
|
|
709
|
+
hasOneOffCharges: { type: Boolean },
|
|
710
|
+
hasRecurringCharge: { type: Boolean },
|
|
711
|
+
hasUsageCharges: { type: Boolean },
|
|
712
|
+
billingPeriod: { type: Object },
|
|
713
|
+
countryCode: { type: null },
|
|
714
|
+
trialStartDate: { type: Date },
|
|
715
|
+
subscriptionStartDate: { type: Date }
|
|
716
|
+
},
|
|
717
|
+
setup(t) {
|
|
718
|
+
const r = t, { $t: n } = fe(), { formatTimePeriod: h } = ze(), a = u(
|
|
719
|
+
() => h(r.billingPeriod, { short: !0, hideValueForExactPeriods: !0 })
|
|
720
|
+
), L = u(() => {
|
|
721
|
+
const T = ne(r.dueTodayAmount), b = () => n(
|
|
722
|
+
{
|
|
723
|
+
defaultMessage: "You will be billed <strong>{due_today}</strong> today.",
|
|
724
|
+
id: "checkout.one_off_description",
|
|
725
|
+
description: "The description of an order that is charged once and does not renew"
|
|
726
|
+
},
|
|
727
|
+
// @ts-expect-error formatjs does not support this type yet
|
|
728
|
+
{ due_today: T, strong: Te }
|
|
729
|
+
);
|
|
730
|
+
if (r.recurringAmount) {
|
|
731
|
+
if (Number(r.recurringAmount.quantity) === 0) {
|
|
732
|
+
if (r.hasUsageCharges)
|
|
733
|
+
return n(
|
|
734
|
+
{
|
|
735
|
+
defaultMessage: "You will be billed <strong>{due_today}</strong> today. Usage is billed every {period_name}.",
|
|
736
|
+
id: "checkout.usage_with_one_off_description",
|
|
737
|
+
description: "The description of a usage-based subscription whose first invoice also charges something only once"
|
|
738
|
+
},
|
|
739
|
+
// @ts-expect-error formatjs does not support this type yet
|
|
740
|
+
{ due_today: T, period_name: a.value, strong: Te }
|
|
741
|
+
);
|
|
742
|
+
if (!r.hasRecurringCharge)
|
|
743
|
+
return b();
|
|
744
|
+
}
|
|
745
|
+
const V = ne(r.recurringAmount);
|
|
746
|
+
return r.trialStartDate ? n(
|
|
747
|
+
{
|
|
748
|
+
defaultMessage: "You will be billed <strong>{due_today}</strong> today, then <strong>{price}</strong> per {period_name}, starting {startDate, date, long}.",
|
|
749
|
+
id: "checkout.trial_period_description_with_one_off",
|
|
750
|
+
description: "The description of a trial whose first invoice also charges something only once"
|
|
751
|
+
},
|
|
752
|
+
{
|
|
753
|
+
due_today: T,
|
|
754
|
+
price: V,
|
|
755
|
+
period_name: a.value,
|
|
756
|
+
// @ts-expect-error formatjs does not support this type yet
|
|
757
|
+
startDate: r.subscriptionStartDate,
|
|
758
|
+
// @ts-expect-error formatjs does not support this type yet
|
|
759
|
+
strong: Te
|
|
760
|
+
}
|
|
761
|
+
) : n(
|
|
762
|
+
{
|
|
763
|
+
defaultMessage: "You will be billed <strong>{due_today}</strong> today, then <strong>{price}</strong> per {period_name}.",
|
|
764
|
+
id: "checkout.subscription_description_with_one_off",
|
|
765
|
+
description: "The description of a subscription whose first invoice also charges something only once"
|
|
766
|
+
},
|
|
767
|
+
// @ts-expect-error formatjs does not support this type yet
|
|
768
|
+
{ due_today: T, price: V, period_name: a.value, strong: Te }
|
|
769
|
+
);
|
|
770
|
+
}
|
|
771
|
+
if (r.hasOneOffCharges)
|
|
772
|
+
return b();
|
|
773
|
+
const f = ne(r.amount);
|
|
774
|
+
return r.trialStartDate ? n(
|
|
775
|
+
{
|
|
776
|
+
defaultMessage: "You will be billed <strong>{price}</strong> per {period_name}, starting {startDate, date, long}.",
|
|
777
|
+
id: "checkout.trial_period_description",
|
|
778
|
+
description: "The description of the trial period"
|
|
779
|
+
},
|
|
780
|
+
{
|
|
781
|
+
price: f,
|
|
782
|
+
// @ts-expect-error formatjs does not support this type yet
|
|
783
|
+
startDate: r.subscriptionStartDate,
|
|
784
|
+
period_name: a.value,
|
|
785
|
+
// @ts-expect-error formatjs does not support this type yet
|
|
786
|
+
strong: Te
|
|
787
|
+
}
|
|
788
|
+
) : n(
|
|
789
|
+
{
|
|
790
|
+
defaultMessage: "You will be billed <strong>{price}</strong> per {period_name}, starting today.",
|
|
791
|
+
id: "checkout.subscription_description",
|
|
792
|
+
description: "The description of the subscription"
|
|
793
|
+
},
|
|
794
|
+
// @ts-expect-error formatjs does not support this type yet
|
|
795
|
+
{ price: f, period_name: a.value, strong: Te }
|
|
796
|
+
);
|
|
797
|
+
}), C = u(() => pi(L.value)), o = u(
|
|
798
|
+
() => r.trialStartDate ? n(
|
|
799
|
+
{
|
|
800
|
+
defaultMessage: "per {period_name} starting, {startDate, date, long}",
|
|
801
|
+
id: "checkout.trial_period_description_without_price",
|
|
802
|
+
description: "The description of the trial period, while the price is still being determined"
|
|
803
|
+
},
|
|
804
|
+
{
|
|
805
|
+
// @ts-expect-error formatjs does not support this type yet
|
|
806
|
+
startDate: r.subscriptionStartDate,
|
|
807
|
+
period_name: a.value
|
|
808
|
+
}
|
|
809
|
+
) : n(
|
|
810
|
+
{
|
|
811
|
+
defaultMessage: "per {period_name}, starting today",
|
|
812
|
+
id: "checkout.subscription_description_without_price",
|
|
813
|
+
description: "The description of the subscription, while the price is still being determined"
|
|
814
|
+
},
|
|
815
|
+
{ period_name: a.value }
|
|
816
|
+
)
|
|
817
|
+
);
|
|
818
|
+
return (T, b) => (i(), x("div", null, [
|
|
819
|
+
I("div", null, [
|
|
820
|
+
_(e(Y), {
|
|
821
|
+
variant: "heading-1",
|
|
822
|
+
class: "inline-block"
|
|
823
|
+
}, {
|
|
824
|
+
default: m(() => [
|
|
825
|
+
O(M(t.trialStartDate ? t.subscriptionName : e(n)({
|
|
826
|
+
defaultMessage: "Pay and subscribe",
|
|
827
|
+
id: "checkout.page_title",
|
|
828
|
+
description: "The title of the checkout page"
|
|
829
|
+
})) + M(" "), 1),
|
|
830
|
+
t.trialPeriod ? (i(), P(e(bo), {
|
|
831
|
+
key: 0,
|
|
832
|
+
"trial-period": t.trialPeriod,
|
|
833
|
+
size: "lg",
|
|
834
|
+
class: "-translate-y-0.5"
|
|
835
|
+
}, null, 8, ["trial-period"])) : N("", !0)
|
|
836
|
+
]),
|
|
837
|
+
_: 1
|
|
838
|
+
})
|
|
839
|
+
]),
|
|
840
|
+
_(e(Y), {
|
|
841
|
+
variant: "body-sm",
|
|
842
|
+
color: "subtle",
|
|
843
|
+
"no-spacing": ""
|
|
844
|
+
}, {
|
|
845
|
+
default: m(() => [
|
|
846
|
+
t.countryCode ? (i(), x("span", gi, [
|
|
847
|
+
(i(!0), x(G, null, ce(C.value, (f, V) => (i(), x(G, { key: V }, [
|
|
848
|
+
f.strong ? (i(), x("strong", vi, M(f.text), 1)) : (i(), x(G, { key: 1 }, [
|
|
849
|
+
O(M(f.text), 1)
|
|
850
|
+
], 64))
|
|
851
|
+
], 64))), 128))
|
|
852
|
+
])) : (i(), x("span", mi, [
|
|
853
|
+
_(e(ho), { "is-dark-mode": "" }, {
|
|
854
|
+
tooltip: m(() => [
|
|
855
|
+
_(e(fo), null, {
|
|
856
|
+
default: m(() => [
|
|
857
|
+
_(e(yo), null, {
|
|
858
|
+
default: m(() => [
|
|
859
|
+
O(M(e(n)({
|
|
860
|
+
defaultMessage: "Will be determined by billing information",
|
|
861
|
+
description: "Tooltip content for the invoice preview when taxes are not determined by billing information",
|
|
862
|
+
id: "invoice_preview.taxes_not_determined_by_billing_information_tooltip"
|
|
863
|
+
})), 1)
|
|
864
|
+
]),
|
|
865
|
+
_: 1
|
|
866
|
+
})
|
|
867
|
+
]),
|
|
868
|
+
_: 1
|
|
869
|
+
})
|
|
870
|
+
]),
|
|
871
|
+
default: m(() => [
|
|
872
|
+
_(e(vo), {
|
|
873
|
+
"width-class": "w-10",
|
|
874
|
+
"height-class": "h-4",
|
|
875
|
+
shade: "darker",
|
|
876
|
+
class: "mr-1.5 inline-block"
|
|
877
|
+
})
|
|
878
|
+
]),
|
|
879
|
+
_: 1
|
|
880
|
+
}),
|
|
881
|
+
I("span", null, M(o.value), 1)
|
|
882
|
+
]))
|
|
883
|
+
]),
|
|
884
|
+
_: 1
|
|
885
|
+
})
|
|
886
|
+
]));
|
|
887
|
+
}
|
|
888
|
+
}), fi = /* @__PURE__ */ se({
|
|
889
|
+
__name: "SubscriptionPaymentCompletedCard",
|
|
890
|
+
setup(t) {
|
|
891
|
+
const { $t: r } = fe();
|
|
892
|
+
return (n, h) => (i(), P(Po, {
|
|
893
|
+
status: "success",
|
|
894
|
+
title: e(r)({
|
|
895
|
+
defaultMessage: "Payment successful",
|
|
896
|
+
id: "subscription_payment_completed_card.title",
|
|
897
|
+
description: "The title for when a payment has been successful"
|
|
898
|
+
})
|
|
899
|
+
}, {
|
|
900
|
+
default: m(() => [
|
|
901
|
+
_(e(Y), {
|
|
902
|
+
variant: "body-xs",
|
|
903
|
+
color: "subtle",
|
|
904
|
+
tag: "span"
|
|
905
|
+
}, {
|
|
906
|
+
default: m(() => [
|
|
907
|
+
O(M(e(r)({
|
|
908
|
+
defaultMessage: "Thank you for subscribing.",
|
|
909
|
+
id: "subscription_payment_completed_card.thank_you_for_subscribing",
|
|
910
|
+
description: "The text shown after a successful message before a redirect"
|
|
911
|
+
})), 1)
|
|
912
|
+
]),
|
|
913
|
+
_: 1
|
|
914
|
+
})
|
|
915
|
+
]),
|
|
916
|
+
_: 1
|
|
917
|
+
}, 8, ["title"]));
|
|
918
|
+
}
|
|
919
|
+
}), yi = { class: "flex flex-col gap-3" }, bi = { class: "sv-order-summary__usage-price grid grid-cols-2 gap-2" }, _i = /* @__PURE__ */ se({
|
|
920
|
+
__name: "OrderSummaryUsage",
|
|
921
|
+
props: {
|
|
922
|
+
groups: { type: Array }
|
|
923
|
+
},
|
|
924
|
+
setup(t) {
|
|
925
|
+
const r = t, { $t: n } = fe(), { map: h } = ze(), a = u(
|
|
926
|
+
() => n({
|
|
927
|
+
defaultMessage: "+ Usage",
|
|
928
|
+
id: "checkout.invoice_preview.usage_based_message",
|
|
929
|
+
description: "The message shown for the usage based invoice preview"
|
|
930
|
+
})
|
|
931
|
+
), L = u(() => {
|
|
932
|
+
const C = r.groups.flatMap(
|
|
933
|
+
(b) => b.prices.map((f) => f.billingPeriod)
|
|
934
|
+
), [o] = C;
|
|
935
|
+
return !!o && (o.value ?? 1) === 1 && C.every((b) => (b == null ? void 0 : b.type) === o.type && (b.value ?? 1) === 1) ? n(
|
|
936
|
+
{
|
|
937
|
+
defaultMessage: "Billed {period}",
|
|
938
|
+
id: "checkout.order_summary_block.usage.billed_period",
|
|
939
|
+
description: 'Next to the usage line of the order summary, how often usage is billed, e.g. "Billed monthly"'
|
|
940
|
+
},
|
|
941
|
+
{ period: h.value[o.type].full }
|
|
942
|
+
) : void 0;
|
|
943
|
+
});
|
|
944
|
+
return (C, o) => (i(), P(Ga, {
|
|
945
|
+
class: "sv-order-summary__usage",
|
|
946
|
+
title: a.value,
|
|
947
|
+
subtitle: L.value,
|
|
948
|
+
expandable: t.groups.length > 0
|
|
949
|
+
}, {
|
|
950
|
+
default: m(() => [
|
|
951
|
+
I("div", yi, [
|
|
952
|
+
(i(!0), x(G, null, ce(t.groups, (T, b) => (i(), x("div", {
|
|
953
|
+
key: b,
|
|
954
|
+
class: "flex flex-col gap-1.5"
|
|
955
|
+
}, [
|
|
956
|
+
T.name ? (i(), P(e(Y), {
|
|
957
|
+
key: 0,
|
|
958
|
+
variant: "caps-heading"
|
|
959
|
+
}, {
|
|
960
|
+
default: m(() => [
|
|
961
|
+
O(M(T.name), 1)
|
|
962
|
+
]),
|
|
963
|
+
_: 2
|
|
964
|
+
}, 1024)) : N("", !0),
|
|
965
|
+
(i(!0), x(G, null, ce(T.prices, (f, V) => (i(), x(G, { key: V }, [
|
|
966
|
+
I("div", bi, [
|
|
967
|
+
_(e(Y), {
|
|
968
|
+
variant: "body-xs",
|
|
969
|
+
weight: "semibold",
|
|
970
|
+
tag: "div",
|
|
971
|
+
class: "break-words"
|
|
972
|
+
}, {
|
|
973
|
+
default: m(() => [
|
|
974
|
+
O(M(f.name), 1)
|
|
975
|
+
]),
|
|
976
|
+
_: 2
|
|
977
|
+
}, 1024),
|
|
978
|
+
_(e(Y), {
|
|
979
|
+
variant: "body-xs",
|
|
980
|
+
color: "subtle",
|
|
981
|
+
tag: "div",
|
|
982
|
+
class: "break-words text-right"
|
|
983
|
+
}, {
|
|
984
|
+
default: m(() => [
|
|
985
|
+
O(M(f.rate), 1)
|
|
986
|
+
]),
|
|
987
|
+
_: 2
|
|
988
|
+
}, 1024)
|
|
989
|
+
]),
|
|
990
|
+
(i(!0), x(G, null, ce(f.tiers, (B, U) => (i(), x("div", {
|
|
991
|
+
key: `${V}-${U}`,
|
|
992
|
+
class: "sv-order-summary__usage-price grid grid-cols-2 gap-2"
|
|
993
|
+
}, [
|
|
994
|
+
_(e(Y), {
|
|
995
|
+
variant: "body-xs",
|
|
996
|
+
color: "subtle",
|
|
997
|
+
tag: "div",
|
|
998
|
+
class: "break-words"
|
|
999
|
+
}, {
|
|
1000
|
+
default: m(() => [
|
|
1001
|
+
O(M(B.range), 1)
|
|
1002
|
+
]),
|
|
1003
|
+
_: 2
|
|
1004
|
+
}, 1024),
|
|
1005
|
+
_(e(Y), {
|
|
1006
|
+
variant: "body-xs",
|
|
1007
|
+
color: "subtle",
|
|
1008
|
+
tag: "div",
|
|
1009
|
+
class: "break-words text-right"
|
|
1010
|
+
}, {
|
|
1011
|
+
default: m(() => [
|
|
1012
|
+
O(M(B.rate), 1)
|
|
1013
|
+
]),
|
|
1014
|
+
_: 2
|
|
1015
|
+
}, 1024)
|
|
1016
|
+
]))), 128))
|
|
1017
|
+
], 64))), 128))
|
|
1018
|
+
]))), 128))
|
|
1019
|
+
])
|
|
1020
|
+
]),
|
|
1021
|
+
_: 1
|
|
1022
|
+
}, 8, ["title", "subtitle", "expandable"]));
|
|
1023
|
+
}
|
|
1024
|
+
}), ki = { class: "flex items-start" }, Pi = { class: "flex grow flex-col" }, Ai = { class: "flex items-center gap-1" }, wi = { class: "ml-4 flex items-center self-center" }, Ci = /* @__PURE__ */ se({
|
|
1025
|
+
__name: "PricingGroupContent",
|
|
1026
|
+
props: {
|
|
1027
|
+
name: { type: String },
|
|
1028
|
+
description: { type: String }
|
|
1029
|
+
},
|
|
1030
|
+
setup(t) {
|
|
1031
|
+
return (r, n) => (i(), x("div", ki, [
|
|
1032
|
+
I("div", Pi, [
|
|
1033
|
+
I("div", Ai, [
|
|
1034
|
+
_(e(Y), {
|
|
1035
|
+
tag: "span",
|
|
1036
|
+
variant: "body-sm",
|
|
1037
|
+
weight: "semibold"
|
|
1038
|
+
}, {
|
|
1039
|
+
default: m(() => [
|
|
1040
|
+
O(M(t.name), 1)
|
|
1041
|
+
]),
|
|
1042
|
+
_: 1
|
|
1043
|
+
}),
|
|
1044
|
+
Rt(r.$slots, "badge")
|
|
1045
|
+
]),
|
|
1046
|
+
_(e(Y), {
|
|
1047
|
+
tag: "span",
|
|
1048
|
+
variant: "body-xs",
|
|
1049
|
+
color: "subtle"
|
|
1050
|
+
}, {
|
|
1051
|
+
default: m(() => [
|
|
1052
|
+
O(M(t.description), 1)
|
|
1053
|
+
]),
|
|
1054
|
+
_: 1
|
|
1055
|
+
})
|
|
1056
|
+
]),
|
|
1057
|
+
I("div", wi, [
|
|
1058
|
+
Rt(r.$slots, "default")
|
|
1059
|
+
])
|
|
1060
|
+
]));
|
|
1061
|
+
}
|
|
1062
|
+
}), xi = {
|
|
1063
|
+
class: "sv-order-summary__updating",
|
|
1064
|
+
role: "status"
|
|
1065
|
+
}, Ei = { class: "sr-only" }, Mi = { class: "sv-order-summary__body grid grid-cols-1 gap-1" }, Ii = { class: "px-3 py-2" }, Li = { class: "sv-order-summary__billing-period flex flex-col gap-3" }, Ti = {
|
|
1066
|
+
key: 0,
|
|
1067
|
+
class: "sv-order-summary__renewal flex flex-row gap-2 pt-1.5"
|
|
1068
|
+
}, ta = /* @__PURE__ */ se({
|
|
1069
|
+
__name: "OrderSummary",
|
|
1070
|
+
props: {
|
|
1071
|
+
subscription: { type: Object },
|
|
1072
|
+
subscriptions: { type: Array },
|
|
1073
|
+
invoice: { type: Object },
|
|
1074
|
+
invoiceSections: { type: Array },
|
|
1075
|
+
invoicePreviewByBillingPeriod: { type: Object },
|
|
1076
|
+
trialInvoice: { type: Object },
|
|
1077
|
+
enabledPricingIds: { type: Array },
|
|
1078
|
+
avatar: { type: String },
|
|
1079
|
+
isPaid: { type: Boolean },
|
|
1080
|
+
isUsageBased: { type: Boolean },
|
|
1081
|
+
usagePriceGroups: { type: Array },
|
|
1082
|
+
collapsible: { type: String },
|
|
1083
|
+
noTitle: { type: Boolean },
|
|
1084
|
+
countryCode: { type: null },
|
|
1085
|
+
variant: { type: String },
|
|
1086
|
+
isUpdating: { type: Boolean }
|
|
1087
|
+
},
|
|
1088
|
+
emits: ["billing-period-change"],
|
|
1089
|
+
setup(t, { emit: r }) {
|
|
1090
|
+
const n = t, h = r, { $t: a } = fe(), { map: L, formatTimePeriod: C } = ze(), { isMobileViewport: o } = ra(), T = u(() => o.value ? "sm" : "xs"), b = (p) => `${p.type}:${p.value}`, f = ["DAY", "WEEK", "MONTH", "YEAR"], V = (p) => f.includes(p), B = (p) => {
|
|
1091
|
+
if (!p)
|
|
1092
|
+
return;
|
|
1093
|
+
const [E, v] = p.split(":"), l = Number(v);
|
|
1094
|
+
if (!(!l || !V(E)))
|
|
1095
|
+
return { type: E, value: l };
|
|
1096
|
+
}, U = u({
|
|
1097
|
+
get: () => {
|
|
1098
|
+
const p = n.subscription.billing_period;
|
|
1099
|
+
return p ? b(p) : void 0;
|
|
1100
|
+
},
|
|
1101
|
+
set: (p) => {
|
|
1102
|
+
const E = B(p);
|
|
1103
|
+
E && h("billing-period-change", E);
|
|
1104
|
+
}
|
|
1105
|
+
}), w = u({
|
|
1106
|
+
get: () => U.value,
|
|
1107
|
+
set: (p) => {
|
|
1108
|
+
U.value = re(p);
|
|
1109
|
+
}
|
|
1110
|
+
}), A = (p) => {
|
|
1111
|
+
var E;
|
|
1112
|
+
return qt((E = n.invoicePreviewByBillingPeriod) == null ? void 0 : E[p]);
|
|
1113
|
+
}, q = (p) => {
|
|
1114
|
+
const E = A(b(p));
|
|
1115
|
+
if (!E)
|
|
1116
|
+
return;
|
|
1117
|
+
const v = p.type === "MONTH" && p.value === 3 ? a({
|
|
1118
|
+
defaultMessage: "/quarter",
|
|
1119
|
+
id: "checkout.order_summary_block.billing_period.per_quarter",
|
|
1120
|
+
description: "Period label for quarterly billing"
|
|
1121
|
+
}) : a(
|
|
1122
|
+
{
|
|
1123
|
+
defaultMessage: "/{period}",
|
|
1124
|
+
id: "checkout.order_summary_block.billing_period.per_label",
|
|
1125
|
+
description: "Period label for billing cycles"
|
|
1126
|
+
},
|
|
1127
|
+
{
|
|
1128
|
+
period: C(p, {
|
|
1129
|
+
prefix: !1,
|
|
1130
|
+
hideValueForExactPeriods: !0
|
|
1131
|
+
})
|
|
1132
|
+
}
|
|
1133
|
+
);
|
|
1134
|
+
return a(
|
|
1135
|
+
{
|
|
1136
|
+
defaultMessage: "{amount}{period}",
|
|
1137
|
+
id: "checkout.order_summary_block.billing_period.sub_label",
|
|
1138
|
+
description: "Billing period option sublabel showing price per period"
|
|
1139
|
+
},
|
|
1140
|
+
{
|
|
1141
|
+
amount: ne(E),
|
|
1142
|
+
period: v
|
|
1143
|
+
}
|
|
1144
|
+
);
|
|
1145
|
+
}, H = (p) => {
|
|
1146
|
+
if (!p)
|
|
1147
|
+
return;
|
|
1148
|
+
const E = a(
|
|
1149
|
+
{
|
|
1150
|
+
defaultMessage: "Save {amount}",
|
|
1151
|
+
id: "checkout.order_summary_block.billing_period.save_badge.prefix",
|
|
1152
|
+
description: "First line for the savings badge label"
|
|
1153
|
+
},
|
|
1154
|
+
{ amount: ne(p) }
|
|
1155
|
+
), v = a({
|
|
1156
|
+
defaultMessage: "/year",
|
|
1157
|
+
id: "checkout.order_summary_block.billing_period.save_badge.suffix",
|
|
1158
|
+
description: "Second line for the savings badge label"
|
|
1159
|
+
});
|
|
1160
|
+
return `${E}${v}`;
|
|
1161
|
+
}, te = u(
|
|
1162
|
+
() => n.invoice ? Ha(n.invoice) : { recurring: [], oneOff: [], other: [] }
|
|
1163
|
+
), ee = u(
|
|
1164
|
+
() => te.value.recurring.length > 0 && te.value.oneOff.length > 0
|
|
1165
|
+
), oe = u(
|
|
1166
|
+
() => ee.value ? qt(n.invoice) : void 0
|
|
1167
|
+
), Z = u(
|
|
1168
|
+
() => oe.value && Number(oe.value.quantity) !== 0 ? oe.value : void 0
|
|
1169
|
+
), c = u(() => {
|
|
1170
|
+
var me, ye, $e;
|
|
1171
|
+
const p = ua({
|
|
1172
|
+
pricingPlanScheduleInfos: n.subscription.pricing_plan_schedule_infos ?? [],
|
|
1173
|
+
type: "DEFAULT"
|
|
1174
|
+
}), E = ((ye = (me = p == null ? void 0 : p.pricing_plan_version) == null ? void 0 : me.billing_period_settings) == null ? void 0 : ye.billing_periods) ?? [], v = /* @__PURE__ */ new Map(), l = (X) => {
|
|
1175
|
+
X && v.set(b(X), X);
|
|
1176
|
+
}, y = (X) => {
|
|
1177
|
+
var Ae;
|
|
1178
|
+
(Ae = X == null ? void 0 : X.items) == null || Ae.forEach((be) => {
|
|
1179
|
+
var le, _e;
|
|
1180
|
+
(le = be.billing_period_configs) == null || le.forEach(
|
|
1181
|
+
(ke) => l(ke.billing_period)
|
|
1182
|
+
), (_e = be.pricing_currency_configs) == null || _e.forEach((ke) => {
|
|
1183
|
+
var Le;
|
|
1184
|
+
(Le = ke.billing_period_configs) == null || Le.forEach(
|
|
1185
|
+
(Ye) => l(Ye.billing_period)
|
|
1186
|
+
);
|
|
1187
|
+
});
|
|
1188
|
+
});
|
|
1189
|
+
};
|
|
1190
|
+
if (((($e = p == null ? void 0 : p.pricing_plan_version) == null ? void 0 : $e.pricing_categories) ?? []).forEach((X) => {
|
|
1191
|
+
var Ae, be;
|
|
1192
|
+
(Ae = X.pricings) == null || Ae.forEach((le) => y(le)), (be = X.pricing_groups) == null || be.forEach(
|
|
1193
|
+
(le) => {
|
|
1194
|
+
var _e;
|
|
1195
|
+
return (_e = le.pricings) == null ? void 0 : _e.forEach((ke) => y(ke));
|
|
1196
|
+
}
|
|
1197
|
+
);
|
|
1198
|
+
}), !v.size)
|
|
1199
|
+
return [];
|
|
1200
|
+
const ae = E.map((X) => v.get(b(X.period))).filter((X) => !!X), ie = new Set(ae.map(b)), J = [...v.values()].filter(
|
|
1201
|
+
(X) => !ie.has(b(X))
|
|
1202
|
+
);
|
|
1203
|
+
return [...ae, ...J];
|
|
1204
|
+
}), $ = u(() => {
|
|
1205
|
+
const p = c.value[c.value.length - 1], E = p ? De(
|
|
1206
|
+
p,
|
|
1207
|
+
A(b(p))
|
|
1208
|
+
) : void 0;
|
|
1209
|
+
return c.value.map((l) => {
|
|
1210
|
+
const y = l.type === "MONTH" && l.value === 3 ? a({
|
|
1211
|
+
defaultMessage: "Billed quarterly",
|
|
1212
|
+
id: "checkout.order_summary_block.billing_period.quarterly",
|
|
1213
|
+
description: "Billing period option label for quarterly billing"
|
|
1214
|
+
}) : a(
|
|
1215
|
+
{
|
|
1216
|
+
defaultMessage: "Billed {period}",
|
|
1217
|
+
id: "checkout.order_summary_block.billing_period.label",
|
|
1218
|
+
description: "Billing period option label for the selected period"
|
|
1219
|
+
},
|
|
1220
|
+
{ period: L.value[l.type].full }
|
|
1221
|
+
), W = A(b(l)), ae = De(l, W), ie = p && l.type === p.type && l.value === p.value ? void 0 : jt(ae, E), J = H(ie);
|
|
1222
|
+
return {
|
|
1223
|
+
label: y,
|
|
1224
|
+
subLabel: q(l),
|
|
1225
|
+
labelSuffixComponent: J ? {
|
|
1226
|
+
component: Xt,
|
|
1227
|
+
props: {
|
|
1228
|
+
color: "primary",
|
|
1229
|
+
content: J,
|
|
1230
|
+
size: T.value,
|
|
1231
|
+
class: "whitespace-nowrap text-left leading-tight"
|
|
1232
|
+
}
|
|
1233
|
+
} : void 0,
|
|
1234
|
+
hidden: U.value === b(l),
|
|
1235
|
+
value: b(l)
|
|
1236
|
+
};
|
|
1237
|
+
});
|
|
1238
|
+
}), R = u(() => {
|
|
1239
|
+
const p = $.value, E = p[0], v = p[p.length - 1];
|
|
1240
|
+
return {
|
|
1241
|
+
smallestPeriod: E == null ? void 0 : E.value,
|
|
1242
|
+
biggestPeriod: v == null ? void 0 : v.value
|
|
1243
|
+
};
|
|
1244
|
+
}), D = u(
|
|
1245
|
+
() => $.value.find((p) => p.value === R.value.biggestPeriod)
|
|
1246
|
+
), z = u(
|
|
1247
|
+
() => $.value.find((p) => p.value === U.value)
|
|
1248
|
+
), d = u(() => {
|
|
1249
|
+
const p = $.value, E = p[p.length - 1], v = U.value;
|
|
1250
|
+
if (!E || !v || v === E.value)
|
|
1251
|
+
return "";
|
|
1252
|
+
const l = B(E.value);
|
|
1253
|
+
if (!l)
|
|
1254
|
+
return "";
|
|
1255
|
+
const y = A(E.value), W = B(v), ae = A(v);
|
|
1256
|
+
if (!W || !ae)
|
|
1257
|
+
return "";
|
|
1258
|
+
const ie = De(W, ae), J = De(l, y);
|
|
1259
|
+
return H(jt(ie, J)) ?? "";
|
|
1260
|
+
}), j = u(
|
|
1261
|
+
() => {
|
|
1262
|
+
var p;
|
|
1263
|
+
return !!((p = n.invoiceSections) != null && p.length) && n.variant !== "products-inline";
|
|
1264
|
+
}
|
|
1265
|
+
), k = (p) => {
|
|
1266
|
+
const { smallestPeriod: E, biggestPeriod: v } = R.value;
|
|
1267
|
+
U.value = p ? v : E;
|
|
1268
|
+
};
|
|
1269
|
+
return (p, E) => (i(), P(e(he), {
|
|
1270
|
+
class: "sv-order-summary",
|
|
1271
|
+
"no-border": "",
|
|
1272
|
+
"no-spacing": "",
|
|
1273
|
+
"content-background": "none",
|
|
1274
|
+
title: t.noTitle ? void 0 : e(a)({
|
|
1275
|
+
defaultMessage: "Order summary",
|
|
1276
|
+
id: "checkout.order_summary_block.title",
|
|
1277
|
+
description: "The title of the order summary block that lists the subscription cost in the checkout"
|
|
1278
|
+
})
|
|
1279
|
+
}, $t({
|
|
1280
|
+
default: m(() => [
|
|
1281
|
+
I("div", Mi, [
|
|
1282
|
+
(i(!0), x(G, null, ce(j.value ? [] : t.subscriptions ?? [t.subscription], (v, l) => (i(), P(e(he), {
|
|
1283
|
+
key: l,
|
|
1284
|
+
"no-spacing": "",
|
|
1285
|
+
class: "sv-order-summary__subscription"
|
|
1286
|
+
}, {
|
|
1287
|
+
default: m(() => [
|
|
1288
|
+
v ? (i(), P(Co, {
|
|
1289
|
+
key: 0,
|
|
1290
|
+
avatar: t.avatar,
|
|
1291
|
+
subscription: v,
|
|
1292
|
+
"enabled-pricing-ids": t.enabledPricingIds
|
|
1293
|
+
}, null, 8, ["avatar", "subscription", "enabled-pricing-ids"])) : N("", !0)
|
|
1294
|
+
]),
|
|
1295
|
+
_: 2
|
|
1296
|
+
}, 1024))), 128)),
|
|
1297
|
+
$.value.length === 2 ? (i(), P(e(he), {
|
|
1298
|
+
key: 0,
|
|
1299
|
+
"no-spacing": "",
|
|
1300
|
+
"content-classes": U.value === R.value.biggestPeriod ? "border-primary-500" : void 0
|
|
1301
|
+
}, {
|
|
1302
|
+
default: m(() => {
|
|
1303
|
+
var v;
|
|
1304
|
+
return [
|
|
1305
|
+
I("div", Ii, [
|
|
1306
|
+
I("div", Li, [
|
|
1307
|
+
D.value ? (i(), P(Ci, {
|
|
1308
|
+
key: 0,
|
|
1309
|
+
name: D.value.label,
|
|
1310
|
+
description: ((v = z.value) == null ? void 0 : v.subLabel) ?? ""
|
|
1311
|
+
}, $t({
|
|
1312
|
+
default: m(() => [
|
|
1313
|
+
_(e(Ao), {
|
|
1314
|
+
"model-value": U.value === R.value.biggestPeriod,
|
|
1315
|
+
size: "sm",
|
|
1316
|
+
"onUpdate:modelValue": k
|
|
1317
|
+
}, null, 8, ["model-value"])
|
|
1318
|
+
]),
|
|
1319
|
+
_: 2
|
|
1320
|
+
}, [
|
|
1321
|
+
d.value ? {
|
|
1322
|
+
name: "badge",
|
|
1323
|
+
fn: m(() => [
|
|
1324
|
+
_(e(Xt), {
|
|
1325
|
+
intent: "brand",
|
|
1326
|
+
content: d.value,
|
|
1327
|
+
size: T.value,
|
|
1328
|
+
class: "whitespace-nowrap text-left leading-tight"
|
|
1329
|
+
}, null, 8, ["content", "size"])
|
|
1330
|
+
]),
|
|
1331
|
+
key: "0"
|
|
1332
|
+
} : void 0
|
|
1333
|
+
]), 1032, ["name", "description"])) : N("", !0)
|
|
1334
|
+
])
|
|
1335
|
+
])
|
|
1336
|
+
];
|
|
1337
|
+
}),
|
|
1338
|
+
_: 1
|
|
1339
|
+
}, 8, ["content-classes"])) : $.value.length > 2 ? (i(), P(e(wo), {
|
|
1340
|
+
key: 1,
|
|
1341
|
+
"single-model-value": w.value,
|
|
1342
|
+
"onUpdate:singleModelValue": E[0] || (E[0] = (v) => w.value = v),
|
|
1343
|
+
class: "sv-order-summary__billing-period",
|
|
1344
|
+
options: $.value,
|
|
1345
|
+
size: "xl",
|
|
1346
|
+
"has-large-dropdown": "",
|
|
1347
|
+
"show-sub-label-in-input": "",
|
|
1348
|
+
"show-suffix-in-closed-input": ""
|
|
1349
|
+
}, null, 8, ["single-model-value", "options"])) : N("", !0),
|
|
1350
|
+
t.invoice ? (i(), P(Ka, {
|
|
1351
|
+
key: 2,
|
|
1352
|
+
"is-updating": t.isUpdating,
|
|
1353
|
+
invoice: t.invoice,
|
|
1354
|
+
sections: t.invoiceSections,
|
|
1355
|
+
"trial-invoice": t.trialInvoice,
|
|
1356
|
+
"is-paid": t.isPaid,
|
|
1357
|
+
collapsible: t.collapsible,
|
|
1358
|
+
"is-preview-without-taxes": !t.countryCode,
|
|
1359
|
+
variant: t.variant
|
|
1360
|
+
}, {
|
|
1361
|
+
"before-totals": m(() => [
|
|
1362
|
+
t.isUsageBased ? (i(), P(_i, {
|
|
1363
|
+
key: 0,
|
|
1364
|
+
groups: t.usagePriceGroups ?? []
|
|
1365
|
+
}, null, 8, ["groups"])) : N("", !0)
|
|
1366
|
+
]),
|
|
1367
|
+
default: m(() => [
|
|
1368
|
+
Z.value ? (i(), x("div", Ti, [
|
|
1369
|
+
_(e(Y), {
|
|
1370
|
+
tag: "span",
|
|
1371
|
+
variant: "body-xs",
|
|
1372
|
+
color: "subtle",
|
|
1373
|
+
class: "grow"
|
|
1374
|
+
}, {
|
|
1375
|
+
default: m(() => [
|
|
1376
|
+
O(M(e(a)(
|
|
1377
|
+
{
|
|
1378
|
+
defaultMessage: "Then {amount} per {period}",
|
|
1379
|
+
id: "checkout.order_summary_block.renews_at",
|
|
1380
|
+
description: "The amount the subscription is charged every period after the first invoice"
|
|
1381
|
+
},
|
|
1382
|
+
{
|
|
1383
|
+
amount: e(ne)(Z.value),
|
|
1384
|
+
period: e(C)(t.subscription.billing_period, {
|
|
1385
|
+
prefix: !1,
|
|
1386
|
+
singular: !0,
|
|
1387
|
+
hideValueForExactPeriods: !0
|
|
1388
|
+
})
|
|
1389
|
+
}
|
|
1390
|
+
)), 1)
|
|
1391
|
+
]),
|
|
1392
|
+
_: 1
|
|
1393
|
+
})
|
|
1394
|
+
])) : N("", !0)
|
|
1395
|
+
]),
|
|
1396
|
+
_: 1
|
|
1397
|
+
}, 8, ["is-updating", "invoice", "sections", "trial-invoice", "is-paid", "collapsible", "is-preview-without-taxes", "variant"])) : (i(), P(e(he), {
|
|
1398
|
+
key: 3,
|
|
1399
|
+
class: "sv-order-summary__totals"
|
|
1400
|
+
}, {
|
|
1401
|
+
default: m(() => [
|
|
1402
|
+
_(e(Y), {
|
|
1403
|
+
variant: "body-sm",
|
|
1404
|
+
color: "subtle",
|
|
1405
|
+
class: "sv-order-summary__empty"
|
|
1406
|
+
}, {
|
|
1407
|
+
default: m(() => [
|
|
1408
|
+
O(M(e(a)({
|
|
1409
|
+
defaultMessage: "Please select a country first",
|
|
1410
|
+
description: "The message shown for the invoice preview when no country is set",
|
|
1411
|
+
id: "checkout.invoice_preview.no_country_selected_message"
|
|
1412
|
+
})), 1)
|
|
1413
|
+
]),
|
|
1414
|
+
_: 1
|
|
1415
|
+
})
|
|
1416
|
+
]),
|
|
1417
|
+
_: 1
|
|
1418
|
+
}))
|
|
1419
|
+
])
|
|
1420
|
+
]),
|
|
1421
|
+
_: 2
|
|
1422
|
+
}, [
|
|
1423
|
+
t.isUpdating ? {
|
|
1424
|
+
name: "right",
|
|
1425
|
+
fn: m(() => [
|
|
1426
|
+
I("span", xi, [
|
|
1427
|
+
_(e(za), {
|
|
1428
|
+
size: "4",
|
|
1429
|
+
color: "gray"
|
|
1430
|
+
}),
|
|
1431
|
+
I("span", Ei, M(e(a)({
|
|
1432
|
+
defaultMessage: "Updating the price",
|
|
1433
|
+
id: "checkout.order_summary_block.updating",
|
|
1434
|
+
description: "Read out while the order summary is priced again after the customer changed the order"
|
|
1435
|
+
})), 1)
|
|
1436
|
+
])
|
|
1437
|
+
]),
|
|
1438
|
+
key: "0"
|
|
1439
|
+
} : void 0
|
|
1440
|
+
]), 1032, ["title"]));
|
|
1441
|
+
}
|
|
1442
|
+
}), Ni = { key: 1 }, Si = { key: 2 }, Oi = { key: 3 }, Ri = { key: 4 }, $i = ["href"], Vi = /* @__PURE__ */ se({
|
|
1443
|
+
__name: "MarkdownInline",
|
|
1444
|
+
props: {
|
|
1445
|
+
nodes: { type: Array }
|
|
1446
|
+
},
|
|
1447
|
+
setup(t) {
|
|
1448
|
+
return (r, n) => {
|
|
1449
|
+
const h = Va("MarkdownInline", !0);
|
|
1450
|
+
return i(!0), x(G, null, ce(t.nodes, (a, L) => (i(), x(G, { key: L }, [
|
|
1451
|
+
a.type === "text" ? (i(), x(G, { key: 0 }, [
|
|
1452
|
+
O(M(a.value), 1)
|
|
1453
|
+
], 64)) : a.type === "break" ? (i(), x("br", Ni)) : a.type === "bold" ? (i(), x("strong", Si, [
|
|
1454
|
+
_(h, {
|
|
1455
|
+
nodes: a.children
|
|
1456
|
+
}, null, 8, ["nodes"])
|
|
1457
|
+
])) : a.type === "italic" ? (i(), x("em", Oi, [
|
|
1458
|
+
_(h, {
|
|
1459
|
+
nodes: a.children
|
|
1460
|
+
}, null, 8, ["nodes"])
|
|
1461
|
+
])) : a.type === "underline" ? (i(), x("u", Ri, [
|
|
1462
|
+
_(h, {
|
|
1463
|
+
nodes: a.children
|
|
1464
|
+
}, null, 8, ["nodes"])
|
|
1465
|
+
])) : a.type === "link" ? (i(), x("a", {
|
|
1466
|
+
key: 5,
|
|
1467
|
+
href: a.href,
|
|
1468
|
+
target: "_blank",
|
|
1469
|
+
rel: "noopener noreferrer",
|
|
1470
|
+
class: "underline"
|
|
1471
|
+
}, [
|
|
1472
|
+
_(h, {
|
|
1473
|
+
nodes: a.children
|
|
1474
|
+
}, null, 8, ["nodes"])
|
|
1475
|
+
], 8, $i)) : N("", !0)
|
|
1476
|
+
], 64))), 128);
|
|
1477
|
+
};
|
|
1478
|
+
}
|
|
1479
|
+
}), Bi = /^<u>([\s\S]*?)<\/u>/i, Di = /^\*\*([\s\S]+?)\*\*/, Ui = /^\*([\s\S]+?)\*/, Fi = /^_([\s\S]+?)_(?![\p{L}\p{N}])/u, qi = /[\p{L}\p{N}]/u, ji = /^\[([^\]]*)\]\(\s*([^)\s]*)\s*\)/, zi = /^<([a-z][a-z0-9+.-]*:[^>\s]+)>/i, Yi = /\n[ \t]*\n/;
|
|
1480
|
+
function Oe(t) {
|
|
1481
|
+
const r = [];
|
|
1482
|
+
let n = "";
|
|
1483
|
+
const h = () => {
|
|
1484
|
+
n && (r.push({ type: "text", value: n }), n = "");
|
|
1485
|
+
};
|
|
1486
|
+
let a = 0;
|
|
1487
|
+
for (; a < t.length; ) {
|
|
1488
|
+
const L = t.slice(a), C = Di.exec(L);
|
|
1489
|
+
if (C) {
|
|
1490
|
+
h(), r.push({ type: "bold", children: Oe(C[1]) }), a += C[0].length;
|
|
1491
|
+
continue;
|
|
1492
|
+
}
|
|
1493
|
+
const o = Ui.exec(L) ?? (Gi(t, a) ? Fi.exec(L) : null);
|
|
1494
|
+
if (o) {
|
|
1495
|
+
h(), r.push({ type: "italic", children: Oe(o[1]) }), a += o[0].length;
|
|
1496
|
+
continue;
|
|
1497
|
+
}
|
|
1498
|
+
const T = Bi.exec(L);
|
|
1499
|
+
if (T) {
|
|
1500
|
+
h(), r.push({ type: "underline", children: Oe(T[1]) }), a += T[0].length;
|
|
1501
|
+
continue;
|
|
1502
|
+
}
|
|
1503
|
+
const b = ji.exec(L);
|
|
1504
|
+
if (b) {
|
|
1505
|
+
h(), r.push(aa(b[2], Oe(b[1]))), a += b[0].length;
|
|
1506
|
+
continue;
|
|
1507
|
+
}
|
|
1508
|
+
const f = zi.exec(L);
|
|
1509
|
+
if (f) {
|
|
1510
|
+
h(), r.push(aa(f[1], [{ type: "text", value: f[1] }])), a += f[0].length;
|
|
1511
|
+
continue;
|
|
1512
|
+
}
|
|
1513
|
+
if (t[a] === `
|
|
1514
|
+
`) {
|
|
1515
|
+
h(), r.push({ type: "break" }), a += 1;
|
|
1516
|
+
continue;
|
|
1517
|
+
}
|
|
1518
|
+
n += t[a], a += 1;
|
|
1519
|
+
}
|
|
1520
|
+
return h(), r;
|
|
1521
|
+
}
|
|
1522
|
+
function Gi(t, r) {
|
|
1523
|
+
return r === 0 || !qi.test(t[r - 1]);
|
|
1524
|
+
}
|
|
1525
|
+
function aa(t, r) {
|
|
1526
|
+
const n = Io(t);
|
|
1527
|
+
return n ? { type: "link", href: n, children: r } : { type: "text", value: da(r) };
|
|
1528
|
+
}
|
|
1529
|
+
function da(t) {
|
|
1530
|
+
return t.map((r) => r.type === "text" ? r.value : r.type === "break" ? " " : da(r.children)).join("");
|
|
1531
|
+
}
|
|
1532
|
+
function Hi(t) {
|
|
1533
|
+
return t != null && t.trim() ? t.split(Yi).map((r) => r.trim()).filter(Boolean).map((r) => ({ type: "paragraph", children: Oe(r) })) : [];
|
|
1534
|
+
}
|
|
1535
|
+
const Ki = { key: 0 }, Zi = /* @__PURE__ */ se({
|
|
1536
|
+
__name: "MarkdownText",
|
|
1537
|
+
props: {
|
|
1538
|
+
source: { type: [String, null] }
|
|
1539
|
+
},
|
|
1540
|
+
setup(t) {
|
|
1541
|
+
const r = t, n = u(() => Hi(r.source));
|
|
1542
|
+
return (h, a) => n.value.length ? (i(), x("div", Ki, [
|
|
1543
|
+
(i(!0), x(G, null, ce(n.value, (L, C) => (i(), x("p", {
|
|
1544
|
+
key: C,
|
|
1545
|
+
class: rt({ "mt-2": C > 0 })
|
|
1546
|
+
}, [
|
|
1547
|
+
_(Vi, {
|
|
1548
|
+
nodes: L.children
|
|
1549
|
+
}, null, 8, ["nodes"])
|
|
1550
|
+
], 2))), 128))
|
|
1551
|
+
])) : N("", !0);
|
|
1552
|
+
}
|
|
1553
|
+
});
|
|
1554
|
+
async function Wi(t, r, { onSubmit: n } = {}) {
|
|
1555
|
+
const { AdyenCheckout: h } = await ca();
|
|
1556
|
+
return h(
|
|
1557
|
+
No({
|
|
1558
|
+
locale: t.locale,
|
|
1559
|
+
amount: t.amount,
|
|
1560
|
+
countryCode: t.countryCode,
|
|
1561
|
+
paymentMethodOptionResponse: t.paymentMethodOptionsResponse,
|
|
1562
|
+
logger: r,
|
|
1563
|
+
onSubmit: n
|
|
1564
|
+
})
|
|
1565
|
+
);
|
|
1566
|
+
}
|
|
1567
|
+
const Ji = /* @__PURE__ */ se({
|
|
1568
|
+
__name: "ExpressPaymentMethodButton",
|
|
1569
|
+
emits: ["click"],
|
|
1570
|
+
setup(t, { emit: r }) {
|
|
1571
|
+
const n = r;
|
|
1572
|
+
function h() {
|
|
1573
|
+
n("click");
|
|
1574
|
+
}
|
|
1575
|
+
return (a, L) => (i(), P(e(Ie), {
|
|
1576
|
+
size: "lg",
|
|
1577
|
+
"aria-label": "Apple Pay",
|
|
1578
|
+
class: "!block h-11 w-full !bg-black !py-0",
|
|
1579
|
+
onClick: h
|
|
1580
|
+
}, {
|
|
1581
|
+
default: m(() => [...L[0] || (L[0] = [
|
|
1582
|
+
I("svg", {
|
|
1583
|
+
viewBox: "0 0 35 15",
|
|
1584
|
+
class: "h-[44px]"
|
|
1585
|
+
}, [
|
|
1586
|
+
I("svg", {
|
|
1587
|
+
x: "0",
|
|
1588
|
+
y: "3.85",
|
|
1589
|
+
height: "7.3",
|
|
1590
|
+
width: "35",
|
|
1591
|
+
class: "logo",
|
|
1592
|
+
viewBox: "0 0 105 43",
|
|
1593
|
+
version: "1.1",
|
|
1594
|
+
xmlns: "http://www.w3.org/2000/svg"
|
|
1595
|
+
}, [
|
|
1596
|
+
I("title", null, "Apple Logo"),
|
|
1597
|
+
I("g", {
|
|
1598
|
+
stroke: "none",
|
|
1599
|
+
"stroke-width": "1",
|
|
1600
|
+
fill: "none",
|
|
1601
|
+
"fill-rule": "evenodd"
|
|
1602
|
+
}, [
|
|
1603
|
+
I("g", { fill: "#FFF" }, [
|
|
1604
|
+
I("path", { d: "M19.4028,5.5674 C20.6008,4.0684 21.4138,2.0564 21.1998,0.0004 C19.4458,0.0874 17.3058,1.1574 16.0668,2.6564 C14.9538,3.9414 13.9688,6.0374 14.2258,8.0074 C16.1948,8.1784 18.1618,7.0244 19.4028,5.5674" }),
|
|
1605
|
+
I("path", { d: "M21.1772,8.3926 C18.3182,8.2226 15.8872,10.0156 14.5212,10.0156 C13.1552,10.0156 11.0642,8.4786 8.8022,8.5196 C5.8592,8.5626 3.1282,10.2276 1.6342,12.8746 C-1.4378,18.1696 0.8232,26.0246 3.8112,30.3376 C5.2622,32.4716 7.0102,34.8206 9.3142,34.7366 C11.4912,34.6506 12.3442,33.3266 14.9902,33.3266 C17.6352,33.3266 18.4042,34.7366 20.7082,34.6936 C23.0972,34.6506 24.5922,32.5586 26.0422,30.4226 C27.7072,27.9906 28.3882,25.6426 28.4312,25.5126 C28.3882,25.4706 23.8232,23.7186 23.7812,18.4676 C23.7382,14.0706 27.3652,11.9786 27.5362,11.8496 C25.4882,8.8196 22.2872,8.4786 21.1772,8.3926" }),
|
|
1606
|
+
I("path", { d: "M85.5508,43.0381 L85.5508,39.1991 C85.8628,39.2421 86.6158,39.2871 87.0158,39.2871 C89.2138,39.2871 90.4558,38.3551 91.2108,35.9581 L91.6548,34.5371 L83.2428,11.2321 L88.4368,11.2321 L94.2958,30.1421 L94.4068,30.1421 L100.2668,11.2321 L105.3278,11.2321 L96.6048,35.7141 C94.6078,41.3291 92.3208,43.1721 87.4828,43.1721 C87.1048,43.1721 85.8838,43.1271 85.5508,43.0381" }),
|
|
1607
|
+
I("path", { d: "M42.6499,19.3555 L48.3549,19.3555 C52.6829,19.3555 55.1469,17.0255 55.1469,12.9855 C55.1469,8.9455 52.6829,6.6375 48.3769,6.6375 L42.6499,6.6375 L42.6499,19.3555 Z M49.6869,2.4425 C55.9009,2.4425 60.2289,6.7265 60.2289,12.9625 C60.2289,19.2225 55.8129,23.5285 49.5309,23.5285 L42.6499,23.5285 L42.6499,34.4705 L37.6779,34.4705 L37.6779,2.4425 L49.6869,2.4425 Z" }),
|
|
1608
|
+
I("path", { d: "M76.5547,25.7705 L76.5547,23.9715 L71.0287,24.3275 C67.9207,24.5275 66.3007,25.6815 66.3007,27.7015 C66.3007,29.6545 67.9887,30.9195 70.6287,30.9195 C74.0027,30.9195 76.5547,28.7665 76.5547,25.7705 M61.4617,27.8345 C61.4617,23.7285 64.5917,21.3755 70.3627,21.0205 L76.5547,20.6425 L76.5547,18.8675 C76.5547,16.2705 74.8457,14.8495 71.8057,14.8495 C69.2967,14.8495 67.4777,16.1375 67.0997,18.1125 L62.6167,18.1125 C62.7497,13.9615 66.6567,10.9435 71.9387,10.9435 C77.6207,10.9435 81.3267,13.9175 81.3267,18.5345 L81.3267,34.4705 L76.7327,34.4705 L76.7327,30.6305 L76.6217,30.6305 C75.3127,33.1395 72.4267,34.7145 69.2967,34.7145 C64.6807,34.7145 61.4617,31.9625 61.4617,27.8345" })
|
|
1609
|
+
])
|
|
1610
|
+
])
|
|
1611
|
+
])
|
|
1612
|
+
], -1)
|
|
1613
|
+
])]),
|
|
1614
|
+
_: 1
|
|
1615
|
+
}));
|
|
1616
|
+
}
|
|
1617
|
+
}), Xi = { class: "absolute h-[1px] w-[1px] overflow-hidden opacity-0" }, Qi = "ADYEN", en = /* @__PURE__ */ se({
|
|
1618
|
+
__name: "ExpressPaymentMethodApplePay",
|
|
1619
|
+
props: {
|
|
1620
|
+
onBillingInformationChange: { type: Function },
|
|
1621
|
+
context: { type: Object },
|
|
1622
|
+
validateOnSubmit: { type: Function },
|
|
1623
|
+
amount: { type: Object },
|
|
1624
|
+
countryCode: { type: String },
|
|
1625
|
+
locale: { type: String },
|
|
1626
|
+
isVisible: { type: Boolean },
|
|
1627
|
+
paymentMethodOptionsResponse: { type: Object },
|
|
1628
|
+
billingInformation: { type: Object }
|
|
1629
|
+
},
|
|
1630
|
+
emits: ["ready", "unavailable", "update-billing-information", "payment-success", "payment-failed"],
|
|
1631
|
+
setup(t, { emit: r }) {
|
|
1632
|
+
const n = t, h = r, a = Q();
|
|
1633
|
+
let L, C = 0;
|
|
1634
|
+
const o = sa(), { authorizePayment: T } = Oo(), b = n.paymentMethodOptionsResponse.payment_acceptor.id;
|
|
1635
|
+
function f(c) {
|
|
1636
|
+
return Ro({
|
|
1637
|
+
gateway: "ADYEN",
|
|
1638
|
+
paymentAcceptorId: b,
|
|
1639
|
+
paymentMethodType: "applepay",
|
|
1640
|
+
...c
|
|
1641
|
+
});
|
|
1642
|
+
}
|
|
1643
|
+
const V = (c) => {
|
|
1644
|
+
var $;
|
|
1645
|
+
return c.status === "SUCCESS" && (($ = c.payment) == null ? void 0 : $.result) === "AUTHORIZED";
|
|
1646
|
+
}, B = () => Object.assign(new Error("Apple Pay payment could not be confirmed"), {
|
|
1647
|
+
code: "PAYMENT_OUTCOME_UNCONFIRMED"
|
|
1648
|
+
}), U = async (c, $) => {
|
|
1649
|
+
var D;
|
|
1650
|
+
const R = (z) => {
|
|
1651
|
+
$.reject(), h("payment-failed", z);
|
|
1652
|
+
};
|
|
1653
|
+
try {
|
|
1654
|
+
const z = await T({
|
|
1655
|
+
payment_acceptor_id: b,
|
|
1656
|
+
payment_gateway_variant: Qi,
|
|
1657
|
+
adyen: {
|
|
1658
|
+
payment_method: Qt(c.data.paymentMethod),
|
|
1659
|
+
...c.data.riskData && {
|
|
1660
|
+
risk_data: Qt(c.data.riskData)
|
|
1661
|
+
},
|
|
1662
|
+
store_payment_method: !0
|
|
1663
|
+
// Required for recurring payments
|
|
1664
|
+
},
|
|
1665
|
+
amount: n.amount,
|
|
1666
|
+
...n.context ? { context: n.context } : {},
|
|
1667
|
+
return_url: So({ paymentAcceptorId: b, redirectUrl: window.location.href })
|
|
1668
|
+
});
|
|
1669
|
+
if (V(z)) {
|
|
1670
|
+
$.resolve({ resultCode: "Authorised" }), h("payment-success");
|
|
1671
|
+
return;
|
|
1672
|
+
}
|
|
1673
|
+
if ($o(z) === "UNCONFIRMED") {
|
|
1674
|
+
o.warn(
|
|
1675
|
+
"PAYMENT_OUTCOME_UNCONFIRMED",
|
|
1676
|
+
"The payment outcome could not be confirmed yet",
|
|
1677
|
+
f({
|
|
1678
|
+
reason: "PAYMENT_PENDING",
|
|
1679
|
+
extra: {
|
|
1680
|
+
paymentStatus: z.status,
|
|
1681
|
+
paymentResult: (D = z.payment) == null ? void 0 : D.result
|
|
1682
|
+
}
|
|
1683
|
+
})
|
|
1684
|
+
), R(B());
|
|
1685
|
+
return;
|
|
1686
|
+
}
|
|
1687
|
+
o.error(
|
|
1688
|
+
"APPLE_PAY_AUTHORIZATION_FAILED",
|
|
1689
|
+
"Payment authorization failed",
|
|
1690
|
+
f({
|
|
1691
|
+
reason: "APPLE_PAY_AUTHORIZATION_REJECTED",
|
|
1692
|
+
extra: { paymentStatus: z.status }
|
|
1693
|
+
})
|
|
1694
|
+
), R(new Error(`Apple Pay payment was not authorized (${z.status})`));
|
|
1695
|
+
} catch (z) {
|
|
1696
|
+
if (o.error(
|
|
1697
|
+
"APPLE_PAY_AUTHORIZATION_FAILED",
|
|
1698
|
+
"Apple Pay authorization failed",
|
|
1699
|
+
f({ reason: "APPLE_PAY_AUTHORIZATION_FAILED", cause: z }),
|
|
1700
|
+
z
|
|
1701
|
+
), Vo(z)) {
|
|
1702
|
+
R(B());
|
|
1703
|
+
return;
|
|
1704
|
+
}
|
|
1705
|
+
R(z instanceof Error ? z : new Error("Apple Pay authorization failed"));
|
|
1706
|
+
}
|
|
1707
|
+
}, w = async () => {
|
|
1708
|
+
const c = C, { ApplePay: $ } = await ca(), R = await Wi(n, o, {
|
|
1709
|
+
onSubmit: (d, j, k) => void U(d, k)
|
|
1710
|
+
}), D = n.billingInformation.regular ? {
|
|
1711
|
+
paymentDescription: n.billingInformation.description,
|
|
1712
|
+
billingAgreement: n.billingInformation.agreement,
|
|
1713
|
+
managementURL: n.billingInformation.managementURL,
|
|
1714
|
+
...n.billingInformation.trial && {
|
|
1715
|
+
trialBilling: {
|
|
1716
|
+
label: n.billingInformation.trial.label,
|
|
1717
|
+
amount: n.billingInformation.trial.amount.quantity.toString(),
|
|
1718
|
+
type: "final",
|
|
1719
|
+
paymentTiming: "recurring",
|
|
1720
|
+
recurringPaymentStartDate: n.billingInformation.trial.startDate,
|
|
1721
|
+
recurringPaymentEndDate: n.billingInformation.trial.endDate
|
|
1722
|
+
}
|
|
1723
|
+
},
|
|
1724
|
+
regularBilling: {
|
|
1725
|
+
label: n.billingInformation.regular.label,
|
|
1726
|
+
amount: n.billingInformation.regular.amount.quantity.toString(),
|
|
1727
|
+
type: "final",
|
|
1728
|
+
paymentTiming: "recurring",
|
|
1729
|
+
recurringPaymentStartDate: n.billingInformation.regular.startDate,
|
|
1730
|
+
...q(
|
|
1731
|
+
n.billingInformation.regular.interval ?? { type: "MONTH", value: 1 }
|
|
1732
|
+
)
|
|
1733
|
+
}
|
|
1734
|
+
} : void 0, z = new $(R, {
|
|
1735
|
+
isExpress: !0,
|
|
1736
|
+
...D && { recurringPaymentRequest: D },
|
|
1737
|
+
requiredBillingContactFields: ["postalAddress"],
|
|
1738
|
+
requiredShippingContactFields: ["email"],
|
|
1739
|
+
onPaymentMethodSelected: async (d, j, k) => {
|
|
1740
|
+
var l, y, W, ae, ie, J, me, ye;
|
|
1741
|
+
const { invoicePreview: p, trialInvoicePreview: E } = await n.onBillingInformationChange({
|
|
1742
|
+
...((l = k.paymentMethod.billingContact) == null ? void 0 : l.postalCode) && {
|
|
1743
|
+
postalCode: k.paymentMethod.billingContact.postalCode
|
|
1744
|
+
},
|
|
1745
|
+
...((y = k.paymentMethod.billingContact) == null ? void 0 : y.locality) && {
|
|
1746
|
+
city: k.paymentMethod.billingContact.locality
|
|
1747
|
+
},
|
|
1748
|
+
...ee((W = k.paymentMethod.billingContact) == null ? void 0 : W.countryCode) && {
|
|
1749
|
+
country: ee((ae = k.paymentMethod.billingContact) == null ? void 0 : ae.countryCode)
|
|
1750
|
+
}
|
|
1751
|
+
}), v = E ? E.invoice_amount_including_tax.quantity.toString() : p.invoice_amount_including_tax.quantity.toString();
|
|
1752
|
+
h("update-billing-information", {
|
|
1753
|
+
postal_code: (ie = k.paymentMethod.billingContact) == null ? void 0 : ie.postalCode,
|
|
1754
|
+
city: (J = k.paymentMethod.billingContact) == null ? void 0 : J.locality,
|
|
1755
|
+
country: (me = k.paymentMethod.billingContact) == null ? void 0 : me.countryCode
|
|
1756
|
+
}), d({
|
|
1757
|
+
newTotal: {
|
|
1758
|
+
label: ((ye = n.billingInformation.regular) == null ? void 0 : ye.label) ?? n.billingInformation.description,
|
|
1759
|
+
amount: v,
|
|
1760
|
+
type: "final"
|
|
1761
|
+
}
|
|
1762
|
+
});
|
|
1763
|
+
},
|
|
1764
|
+
onError: (d) => {
|
|
1765
|
+
o.error(
|
|
1766
|
+
"APPLE_PAY_ERROR",
|
|
1767
|
+
"Apple Pay error",
|
|
1768
|
+
f({ reason: "APPLE_PAY_ERROR", cause: d }),
|
|
1769
|
+
d
|
|
1770
|
+
);
|
|
1771
|
+
},
|
|
1772
|
+
/**
|
|
1773
|
+
* Resolving here is what starts Adyen's payment flow, which calls `onSubmit` above. The
|
|
1774
|
+
* charge is not made from this callback — the form is checked here instead, because a
|
|
1775
|
+
* rejection shows the customer an error in the sheet rather than taking their money for a
|
|
1776
|
+
* subscription the checkout cannot create.
|
|
1777
|
+
*/
|
|
1778
|
+
onAuthorized: async (d, j) => {
|
|
1779
|
+
var k, p, E, v;
|
|
1780
|
+
try {
|
|
1781
|
+
const l = (k = d.authorizedEvent.payment) == null ? void 0 : k.billingContact, y = l ? H(l) : d.billingAddress ? te(d.billingAddress) : void 0, W = (E = (p = d.authorizedEvent.payment) == null ? void 0 : p.shippingContact) == null ? void 0 : E.emailAddress;
|
|
1782
|
+
if ((y || W) && (h("update-billing-information", { ...y, ...W && { email: W } }), await Re()), !(await ((v = n.validateOnSubmit) == null ? void 0 : v.call(n)) ?? !0)) {
|
|
1783
|
+
o.warn(
|
|
1784
|
+
"APPLE_PAY_FORM_INCOMPLETE",
|
|
1785
|
+
"Apple Pay authorization stopped: the checkout form is incomplete",
|
|
1786
|
+
f({ reason: "APPLE_PAY_FORM_INVALID" })
|
|
1787
|
+
), j.reject(), h("payment-failed", new Error("The checkout form is incomplete"));
|
|
1788
|
+
return;
|
|
1789
|
+
}
|
|
1790
|
+
j.resolve();
|
|
1791
|
+
} catch (l) {
|
|
1792
|
+
o.error(
|
|
1793
|
+
"APPLE_PAY_AUTHORIZATION_FAILED",
|
|
1794
|
+
"Apple Pay authorization failed",
|
|
1795
|
+
f({ reason: "APPLE_PAY_AUTHORIZATION_FAILED", cause: l }),
|
|
1796
|
+
l
|
|
1797
|
+
), j.reject(), h(
|
|
1798
|
+
"payment-failed",
|
|
1799
|
+
l instanceof Error ? l : new Error("Apple Pay authorization failed")
|
|
1800
|
+
);
|
|
1801
|
+
}
|
|
1802
|
+
}
|
|
1803
|
+
});
|
|
1804
|
+
if (!a.value) {
|
|
1805
|
+
o.error("APPLE_PAY_ERROR", "Apple Pay button ref not found");
|
|
1806
|
+
return;
|
|
1807
|
+
}
|
|
1808
|
+
try {
|
|
1809
|
+
if (await z.isAvailable(), c !== C)
|
|
1810
|
+
return;
|
|
1811
|
+
z.mount(a.value), L = z, h("ready");
|
|
1812
|
+
} catch (d) {
|
|
1813
|
+
o.error("APPLE_PAY_ERROR", "Apple Pay not available on this device", {}, d), c === C && h("unavailable");
|
|
1814
|
+
}
|
|
1815
|
+
}, A = () => {
|
|
1816
|
+
C += 1, L == null || L.unmount(), L = void 0;
|
|
1817
|
+
}, q = (c) => {
|
|
1818
|
+
if (!c.value)
|
|
1819
|
+
return;
|
|
1820
|
+
let $ = c.value ?? 1, R = c.type.toLowerCase();
|
|
1821
|
+
if (c.type === "WEEK" && (R = "day", $ = c.value * 7), R === "day" || R === "month" || R === "year" || R === "hour" || R === "minute")
|
|
1822
|
+
return {
|
|
1823
|
+
recurringPaymentIntervalUnit: R,
|
|
1824
|
+
recurringPaymentIntervalCount: $
|
|
1825
|
+
};
|
|
1826
|
+
}, H = (c) => {
|
|
1827
|
+
var $, R;
|
|
1828
|
+
return {
|
|
1829
|
+
...(($ = c.addressLines) == null ? void 0 : $[0]) && { line1: c.addressLines[0] },
|
|
1830
|
+
...((R = c.addressLines) == null ? void 0 : R[1]) && { line2: c.addressLines[1] },
|
|
1831
|
+
...c.administrativeArea && { state: c.administrativeArea },
|
|
1832
|
+
postal_code: c.postalCode,
|
|
1833
|
+
city: c.locality,
|
|
1834
|
+
country: c.countryCode
|
|
1835
|
+
};
|
|
1836
|
+
}, te = (c) => ({
|
|
1837
|
+
...c.street && { line1: c.street },
|
|
1838
|
+
...c.houseNumberOrName && { line2: c.houseNumberOrName },
|
|
1839
|
+
...c.stateOrProvince && { state: c.stateOrProvince },
|
|
1840
|
+
postal_code: c.postalCode,
|
|
1841
|
+
city: c.city,
|
|
1842
|
+
country: c.country
|
|
1843
|
+
}), ee = (c) => c && je(c) ? c : void 0, oe = () => {
|
|
1844
|
+
var $;
|
|
1845
|
+
const c = ($ = a.value) == null ? void 0 : $.querySelector("apple-pay-button");
|
|
1846
|
+
if (c) {
|
|
1847
|
+
const R = new MouseEvent("click", {
|
|
1848
|
+
bubbles: !0,
|
|
1849
|
+
cancelable: !0,
|
|
1850
|
+
view: window
|
|
1851
|
+
});
|
|
1852
|
+
c.dispatchEvent(R);
|
|
1853
|
+
}
|
|
1854
|
+
}, Z = async () => {
|
|
1855
|
+
try {
|
|
1856
|
+
await w();
|
|
1857
|
+
} catch (c) {
|
|
1858
|
+
o.error(
|
|
1859
|
+
"APPLE_PAY_ERROR",
|
|
1860
|
+
"Apple Pay could not be set up",
|
|
1861
|
+
f({ reason: "APPLE_PAY_SETUP_FAILED", cause: c }),
|
|
1862
|
+
c
|
|
1863
|
+
);
|
|
1864
|
+
}
|
|
1865
|
+
};
|
|
1866
|
+
return na(() => {
|
|
1867
|
+
Z();
|
|
1868
|
+
}), Pe(
|
|
1869
|
+
// By value: `amount` is rebuilt by every invoice preview, and `onPaymentMethodSelected` asks
|
|
1870
|
+
// for one as the sheet opens — comparing objects would tear down the live session.
|
|
1871
|
+
() => [n.amount.quantity, n.amount.currency, n.billingInformation.agreement].join(
|
|
1872
|
+
"|"
|
|
1873
|
+
),
|
|
1874
|
+
() => {
|
|
1875
|
+
A(), Z();
|
|
1876
|
+
}
|
|
1877
|
+
), Ba(A), (c, $) => (i(), x(G, null, [
|
|
1878
|
+
t.isVisible ? (i(), P(Ji, {
|
|
1879
|
+
key: 0,
|
|
1880
|
+
onClick: oe
|
|
1881
|
+
})) : N("", !0),
|
|
1882
|
+
I("div", Xi, [
|
|
1883
|
+
I("div", {
|
|
1884
|
+
ref_key: "applePayButtonRef",
|
|
1885
|
+
ref: a
|
|
1886
|
+
}, null, 512)
|
|
1887
|
+
])
|
|
1888
|
+
], 64));
|
|
1889
|
+
}
|
|
1890
|
+
}), tn = {
|
|
1891
|
+
key: 0,
|
|
1892
|
+
class: "mt-4n"
|
|
1893
|
+
}, an = { class: "mb-2" }, on = { class: "mt-4 h-4" }, nn = /* @__PURE__ */ se({
|
|
1894
|
+
__name: "ExpressPaymentMethods",
|
|
1895
|
+
props: {
|
|
1896
|
+
amount: { type: Object },
|
|
1897
|
+
countryCode: { type: String },
|
|
1898
|
+
locale: { type: String },
|
|
1899
|
+
paymentMethodsOptionsResponse: { type: null },
|
|
1900
|
+
billingInformation: { type: Object },
|
|
1901
|
+
onBillingInformationChange: { type: Function },
|
|
1902
|
+
context: { type: Object },
|
|
1903
|
+
validateOnSubmit: { type: Function }
|
|
1904
|
+
},
|
|
1905
|
+
emits: ["update-billing-information", "payment-success", "payment-failed"],
|
|
1906
|
+
setup(t) {
|
|
1907
|
+
const r = t, { $t: n } = fe(), h = Q(!1), a = Q(!1), L = u(
|
|
1908
|
+
() => {
|
|
1909
|
+
var o;
|
|
1910
|
+
return (o = r.paymentMethodsOptionsResponse) == null ? void 0 : o.find(
|
|
1911
|
+
(T) => {
|
|
1912
|
+
var b;
|
|
1913
|
+
return (b = T.options) == null ? void 0 : b.some(
|
|
1914
|
+
(f) => f.name.toLowerCase() === "apple pay" && f.payment_gateway_variant === "ADYEN"
|
|
1915
|
+
);
|
|
1916
|
+
}
|
|
1917
|
+
);
|
|
1918
|
+
}
|
|
1919
|
+
), C = u(() => a.value ? void 0 : L.value);
|
|
1920
|
+
return (o, T) => C.value ? (i(), x("div", tn, [
|
|
1921
|
+
I("div", an, [
|
|
1922
|
+
h.value ? (i(), P(e(Y), {
|
|
1923
|
+
key: 1,
|
|
1924
|
+
variant: "heading-3",
|
|
1925
|
+
tag: "h2"
|
|
1926
|
+
}, {
|
|
1927
|
+
default: m(() => [
|
|
1928
|
+
O(M(e(n)({
|
|
1929
|
+
defaultMessage: "Subscribe instantly with",
|
|
1930
|
+
id: "checkout.express_payment_methods.title",
|
|
1931
|
+
description: "The title of the express payment methods block in the checkout form"
|
|
1932
|
+
})), 1)
|
|
1933
|
+
]),
|
|
1934
|
+
_: 1
|
|
1935
|
+
})) : (i(), P(Me, {
|
|
1936
|
+
key: 0,
|
|
1937
|
+
variant: "title"
|
|
1938
|
+
}))
|
|
1939
|
+
]),
|
|
1940
|
+
I("div", null, [
|
|
1941
|
+
h.value ? N("", !0) : (i(), P(Me, {
|
|
1942
|
+
key: 0,
|
|
1943
|
+
class: "h-11"
|
|
1944
|
+
})),
|
|
1945
|
+
_(en, {
|
|
1946
|
+
amount: t.amount,
|
|
1947
|
+
"billing-information": t.billingInformation,
|
|
1948
|
+
"country-code": t.countryCode,
|
|
1949
|
+
locale: t.locale,
|
|
1950
|
+
"is-visible": h.value,
|
|
1951
|
+
"payment-method-options-response": C.value,
|
|
1952
|
+
"on-billing-information-change": t.onBillingInformationChange,
|
|
1953
|
+
context: t.context,
|
|
1954
|
+
"validate-on-submit": t.validateOnSubmit,
|
|
1955
|
+
onReady: T[0] || (T[0] = (b) => h.value = !0),
|
|
1956
|
+
onUnavailable: T[1] || (T[1] = (b) => a.value = !0),
|
|
1957
|
+
onUpdateBillingInformation: T[2] || (T[2] = (b) => o.$emit("update-billing-information", b)),
|
|
1958
|
+
onPaymentSuccess: T[3] || (T[3] = (b) => o.$emit("payment-success")),
|
|
1959
|
+
onPaymentFailed: T[4] || (T[4] = (b) => o.$emit("payment-failed", b))
|
|
1960
|
+
}, null, 8, ["amount", "billing-information", "country-code", "locale", "is-visible", "payment-method-options-response", "on-billing-information-change", "context", "validate-on-submit"])
|
|
1961
|
+
]),
|
|
1962
|
+
I("div", on, [
|
|
1963
|
+
h.value ? (i(), P(e(To), {
|
|
1964
|
+
key: 1,
|
|
1965
|
+
text: e(n)({
|
|
1966
|
+
defaultMessage: "Or",
|
|
1967
|
+
id: "checkout.express_payment_methods.divider_text",
|
|
1968
|
+
description: "The text of the divider text in the express payment methods block in the checkout form"
|
|
1969
|
+
}),
|
|
1970
|
+
"text-position": "center"
|
|
1971
|
+
}, null, 8, ["text"])) : (i(), P(Me, {
|
|
1972
|
+
key: 0,
|
|
1973
|
+
variant: "divider-text"
|
|
1974
|
+
}))
|
|
1975
|
+
])
|
|
1976
|
+
])) : N("", !0);
|
|
1977
|
+
}
|
|
1978
|
+
});
|
|
1979
|
+
function gs(t, r = void 0) {
|
|
1980
|
+
const n = r ?? [], h = ut(t);
|
|
1981
|
+
for (const a of h)
|
|
1982
|
+
if (["EXACTLY_ONE", "AT_LEAST_ONE"].includes(a.selection_constraint)) {
|
|
1983
|
+
const L = a.pricings.map((C) => C.id);
|
|
1984
|
+
if (r != null && r.some((C) => L.includes(C)))
|
|
1985
|
+
continue;
|
|
1986
|
+
n.push(a.pricings[0].id);
|
|
1987
|
+
}
|
|
1988
|
+
return n;
|
|
1989
|
+
}
|
|
1990
|
+
function sn(t) {
|
|
1991
|
+
return ut(t).some(
|
|
1992
|
+
(n) => n.selection_constraint === "EXACTLY_ONE" || n.selection_constraint === "AT_LEAST_ONE"
|
|
1993
|
+
);
|
|
1994
|
+
}
|
|
1995
|
+
function ln(t) {
|
|
1996
|
+
const r = Do(t.pricing_plan_schedule_infos), n = ut(t);
|
|
1997
|
+
return r.some((h) => h.product_type === "ADDON") || n.some((h) => h.object_type === "ADDON");
|
|
1998
|
+
}
|
|
1999
|
+
const rn = ["TIERED", "TOP_TIERED", "STAIR_STEP"];
|
|
2000
|
+
function un({
|
|
2001
|
+
scheduleInfo: t,
|
|
2002
|
+
enabledPricingIds: r,
|
|
2003
|
+
currency: n,
|
|
2004
|
+
billingPeriod: h,
|
|
2005
|
+
intl: { $t: a, formatNumber: L }
|
|
2006
|
+
}) {
|
|
2007
|
+
if (!t) return [];
|
|
2008
|
+
const C = (f, V) => {
|
|
2009
|
+
const B = Number(f.percentage) !== 0 && f.percentage && L(Number(f.percentage) / 100, {
|
|
2010
|
+
style: "percent",
|
|
2011
|
+
maximumFractionDigits: 4
|
|
2012
|
+
}), U = f.amount && !(B && Number(f.amount.quantity) === 0) && ne(f.amount), w = V ?? a({
|
|
2013
|
+
defaultMessage: "unit",
|
|
2014
|
+
id: "checkout.order_summary_block.usage.unit_fallback",
|
|
2015
|
+
description: "The unit a usage price is charged per when its product names none"
|
|
2016
|
+
});
|
|
2017
|
+
return B && U ? a(
|
|
2018
|
+
{
|
|
2019
|
+
defaultMessage: "{percentage} + {amount} / {unit}",
|
|
2020
|
+
id: "checkout.order_summary_block.usage.rate_percentage_amount",
|
|
2021
|
+
description: 'A usage price of a percentage plus an amount per unit, e.g. "1.4% + €0.25 / transaction"'
|
|
2022
|
+
},
|
|
2023
|
+
{ percentage: B, amount: U, unit: w }
|
|
2024
|
+
) : U ? a(
|
|
2025
|
+
{
|
|
2026
|
+
defaultMessage: "{amount} / {unit}",
|
|
2027
|
+
id: "checkout.order_summary_block.usage.rate_per_unit",
|
|
2028
|
+
description: 'A usage price per unit, e.g. "€0.05 / transaction"'
|
|
2029
|
+
},
|
|
2030
|
+
{ amount: U, unit: w }
|
|
2031
|
+
) : B && V ? a(
|
|
2032
|
+
{
|
|
2033
|
+
defaultMessage: "{percentage} of {unit} value",
|
|
2034
|
+
id: "checkout.order_summary_block.usage.rate_percentage",
|
|
2035
|
+
description: 'A usage price as a percentage of what is used, e.g. "1.19% of transaction value"'
|
|
2036
|
+
},
|
|
2037
|
+
{ percentage: B, unit: V }
|
|
2038
|
+
) : B || void 0;
|
|
2039
|
+
}, o = (f, V, B) => {
|
|
2040
|
+
if (!(f.block_size || f.minimum_amount || f.maximum_amount || f.minimum_number || f.maximum_number))
|
|
2041
|
+
return f.fixed_amount ? B && !f.amount && !f.percentage ? ne(f.fixed_amount) : void 0 : B ? void 0 : C(f, V);
|
|
2042
|
+
}, T = (f, V, B) => {
|
|
2043
|
+
const U = {
|
|
2044
|
+
infinite: "",
|
|
2045
|
+
formatNumber: (w) => L(w),
|
|
2046
|
+
formatAmount: ne
|
|
2047
|
+
};
|
|
2048
|
+
return f.map((w, A) => {
|
|
2049
|
+
const q = String(_o(U)(f[A - 1]) ?? "");
|
|
2050
|
+
return {
|
|
2051
|
+
range: A === f.length - 1 ? a(
|
|
2052
|
+
{
|
|
2053
|
+
defaultMessage: "{from}+",
|
|
2054
|
+
id: "checkout.order_summary_block.usage.tier_open",
|
|
2055
|
+
description: 'The last band of a tiered usage price, which has no upper bound, e.g. "20,000+"'
|
|
2056
|
+
},
|
|
2057
|
+
{ from: q }
|
|
2058
|
+
) : a(
|
|
2059
|
+
{
|
|
2060
|
+
defaultMessage: "{from} - {to}",
|
|
2061
|
+
id: "checkout.order_summary_block.usage.tier_range",
|
|
2062
|
+
description: 'The range of a band of a tiered usage price, e.g. "0 - 20,000"'
|
|
2063
|
+
},
|
|
2064
|
+
{ from: q, to: ko(U)(w, f, A) ?? "" }
|
|
2065
|
+
),
|
|
2066
|
+
rate: o(w, V, B)
|
|
2067
|
+
};
|
|
2068
|
+
});
|
|
2069
|
+
}, b = /* @__PURE__ */ new Map();
|
|
2070
|
+
return Uo(ja(t).pricing_categories, {
|
|
2071
|
+
enabledPricingIds: r
|
|
2072
|
+
}).forEach(({ category: f, pricing: V }) => {
|
|
2073
|
+
(V.items ?? []).forEach((B) => {
|
|
2074
|
+
var R, D, z, d, j, k;
|
|
2075
|
+
const U = (R = B.product_items) == null ? void 0 : R[0];
|
|
2076
|
+
if ((U == null ? void 0 : U.model_type) !== "USAGE_BASED") return;
|
|
2077
|
+
const w = jo({ pricingItem: B, currency: n, billingPeriod: h }), A = w == null ? void 0 : w.details;
|
|
2078
|
+
if ((A == null ? void 0 : A.pricing_type) === "NONE") return;
|
|
2079
|
+
const q = [
|
|
2080
|
+
B.configs,
|
|
2081
|
+
...(B.billing_period_configs ?? []).map((p) => p.configs),
|
|
2082
|
+
...(B.pricing_currency_configs ?? []).flatMap((p) => [
|
|
2083
|
+
p.configs,
|
|
2084
|
+
...(p.billing_period_configs ?? []).map((E) => E.configs)
|
|
2085
|
+
])
|
|
2086
|
+
], H = !!((z = (D = w == null ? void 0 : w.conditions) == null ? void 0 : D.configs) != null && z.length) || (((d = q.find((p) => w && (p == null ? void 0 : p.includes(w)))) == null ? void 0 : d.length) ?? 0) > 1, te = ((j = U.unit_name) == null ? void 0 : j.singular) || void 0, ee = (A == null ? void 0 : A.bands) ?? [], oe = ee[0], Z = {
|
|
2087
|
+
name: U.name || Fo(V) || "",
|
|
2088
|
+
billingPeriod: (A == null ? void 0 : A.billing_period) ?? h
|
|
2089
|
+
}, c = H || A == null ? void 0 : A.pricing_type;
|
|
2090
|
+
c && rn.includes(c) ? Z.tiers = T(ee, te, c === "STAIR_STEP") : c === "FLAT" && oe && (Z.rate = o(oe, te, !1));
|
|
2091
|
+
const $ = b.get(f.product_category_id) ?? {
|
|
2092
|
+
name: ((k = f.product_category) == null ? void 0 : k.name) ?? "",
|
|
2093
|
+
prices: []
|
|
2094
|
+
};
|
|
2095
|
+
$.prices.push(Z), b.set(f.product_category_id, $);
|
|
2096
|
+
});
|
|
2097
|
+
}), [...b.values()];
|
|
2098
|
+
}
|
|
2099
|
+
const cn = ["aria-expanded", "aria-label"], dn = { class: "flex w-full cursor-pointer flex-row items-center justify-between gap-3 px-3 py-2" }, pn = { class: "flex flex-row items-center gap-2" }, mn = ["onKeydown"], gn = ["aria-label"], vn = { class: "flex w-full cursor-pointer flex-row items-center justify-between gap-3 px-3 py-2" }, hn = { class: "flex flex-row items-center gap-2" }, fn = {
|
|
2100
|
+
class: "sr-only",
|
|
2101
|
+
"aria-live": "polite"
|
|
2102
|
+
}, oa = /* @__PURE__ */ se({
|
|
2103
|
+
inheritAttrs: !1,
|
|
2104
|
+
__name: "PromotionCodeSection",
|
|
2105
|
+
props: {
|
|
2106
|
+
promotionCode: { default: null, type: [String, null] },
|
|
2107
|
+
isPending: { type: Boolean, default: !1 }
|
|
2108
|
+
},
|
|
2109
|
+
emits: ["update:appliedCode", "apply", "remove"],
|
|
2110
|
+
setup(t, { emit: r }) {
|
|
2111
|
+
const { $t: n } = fe(), h = t, a = r, L = Q(!1), C = Q(""), o = Q(""), T = Q(!1), b = Q(null), f = Q(null), V = no("promotion-code-"), B = `${V}-label`, U = `${V}-panel`, w = u({
|
|
2112
|
+
get: () => C.value,
|
|
2113
|
+
set: (d) => C.value = co(d)
|
|
2114
|
+
}), A = u(() => h.promotionCode !== null && h.promotionCode !== ""), q = u(() => C.value.trim().length > 0), H = u(
|
|
2115
|
+
() => h.promotionCode ?? n({
|
|
2116
|
+
defaultMessage: "Promotion applied",
|
|
2117
|
+
id: "checkout.promotion_code.applied_label",
|
|
2118
|
+
description: "Fallback label for an applied promotion code in checkout"
|
|
2119
|
+
})
|
|
2120
|
+
), te = u(
|
|
2121
|
+
() => L.value ? n({
|
|
2122
|
+
defaultMessage: "Collapse promotion code input",
|
|
2123
|
+
id: "checkout.promotion_code.collapse_aria_label",
|
|
2124
|
+
description: "Aria label for the promotion code toggle button in checkout, while the input is open"
|
|
2125
|
+
}) : n({
|
|
2126
|
+
defaultMessage: "Expand promotion code input",
|
|
2127
|
+
id: "checkout.promotion_code.expand_aria_label",
|
|
2128
|
+
description: "Aria label for the promotion code toggle button in checkout, while the input is closed"
|
|
2129
|
+
})
|
|
2130
|
+
), ee = u(
|
|
2131
|
+
() => n({
|
|
2132
|
+
defaultMessage: "Apply promotion code",
|
|
2133
|
+
id: "checkout.promotion_code.apply_aria_label",
|
|
2134
|
+
description: "Aria label for the promotion code apply button in checkout"
|
|
2135
|
+
})
|
|
2136
|
+
), oe = u(
|
|
2137
|
+
() => n({
|
|
2138
|
+
defaultMessage: "Remove promotion code",
|
|
2139
|
+
id: "checkout.promotion_code.remove_aria_label",
|
|
2140
|
+
description: "Aria label for the promotion code remove button in checkout"
|
|
2141
|
+
})
|
|
2142
|
+
), Z = () => {
|
|
2143
|
+
C.value = "";
|
|
2144
|
+
}, c = () => {
|
|
2145
|
+
var j;
|
|
2146
|
+
const d = (j = f.value) == null ? void 0 : j.querySelector("input");
|
|
2147
|
+
d instanceof HTMLInputElement && d.focus();
|
|
2148
|
+
}, $ = () => {
|
|
2149
|
+
L.value && (L.value = !1);
|
|
2150
|
+
}, R = () => {
|
|
2151
|
+
A.value || (L.value = !L.value);
|
|
2152
|
+
}, D = () => {
|
|
2153
|
+
if (!q.value)
|
|
2154
|
+
return;
|
|
2155
|
+
const d = C.value.trim();
|
|
2156
|
+
o.value = "", T.value = !0, a("update:appliedCode", d), a("apply", d), L.value = !1;
|
|
2157
|
+
}, z = () => {
|
|
2158
|
+
T.value = !1, a("update:appliedCode", null), a("remove"), o.value = n({
|
|
2159
|
+
defaultMessage: "Promotion code removed",
|
|
2160
|
+
id: "checkout.promotion_code.removed_status",
|
|
2161
|
+
description: "Aria live message when a promotion code is removed in checkout"
|
|
2162
|
+
}), Z(), Re(() => {
|
|
2163
|
+
var d;
|
|
2164
|
+
(d = b.value) == null || d.focus();
|
|
2165
|
+
});
|
|
2166
|
+
};
|
|
2167
|
+
return Pe(L, (d) => {
|
|
2168
|
+
if (!d) {
|
|
2169
|
+
Z(), Re(() => {
|
|
2170
|
+
var j;
|
|
2171
|
+
(j = b.value) == null || j.focus();
|
|
2172
|
+
});
|
|
2173
|
+
return;
|
|
2174
|
+
}
|
|
2175
|
+
Re(() => {
|
|
2176
|
+
c();
|
|
2177
|
+
});
|
|
2178
|
+
}), Pe(
|
|
2179
|
+
() => h.promotionCode,
|
|
2180
|
+
(d) => {
|
|
2181
|
+
d || Z();
|
|
2182
|
+
}
|
|
2183
|
+
), Pe(
|
|
2184
|
+
() => h.isPending,
|
|
2185
|
+
(d) => {
|
|
2186
|
+
d || !T.value || (T.value = !1, A.value && (o.value = n({
|
|
2187
|
+
defaultMessage: "Promotion code applied",
|
|
2188
|
+
id: "checkout.promotion_code.applied_status",
|
|
2189
|
+
description: "Aria live message when a promotion code is applied in checkout"
|
|
2190
|
+
})));
|
|
2191
|
+
}
|
|
2192
|
+
), (d, j) => (i(), x(G, null, [
|
|
2193
|
+
A.value ? (i(), P(e(he), ve({ key: 1 }, d.$attrs, {
|
|
2194
|
+
"no-border": "",
|
|
2195
|
+
"no-spacing": "",
|
|
2196
|
+
"content-background": "none",
|
|
2197
|
+
class: "relative w-full"
|
|
2198
|
+
}), {
|
|
2199
|
+
default: m(() => [
|
|
2200
|
+
I("button", {
|
|
2201
|
+
type: "button",
|
|
2202
|
+
class: "w-full rounded border border-primary-900 bg-white",
|
|
2203
|
+
"aria-label": oe.value,
|
|
2204
|
+
onClick: z
|
|
2205
|
+
}, [
|
|
2206
|
+
I("div", vn, [
|
|
2207
|
+
I("div", hn, [
|
|
2208
|
+
_(e(Be), { icon: "local_activity" }),
|
|
2209
|
+
_(e(Y), {
|
|
2210
|
+
variant: "body-sm",
|
|
2211
|
+
class: "font-semibold"
|
|
2212
|
+
}, {
|
|
2213
|
+
default: m(() => [
|
|
2214
|
+
O(M(H.value), 1)
|
|
2215
|
+
]),
|
|
2216
|
+
_: 1
|
|
2217
|
+
})
|
|
2218
|
+
]),
|
|
2219
|
+
_(e(Be), { icon: "close" })
|
|
2220
|
+
])
|
|
2221
|
+
], 8, gn)
|
|
2222
|
+
]),
|
|
2223
|
+
_: 1
|
|
2224
|
+
}, 16)) : (i(), P(e(he), ve({ key: 0 }, d.$attrs, {
|
|
2225
|
+
"no-spacing": "",
|
|
2226
|
+
class: "relative w-full"
|
|
2227
|
+
}), {
|
|
2228
|
+
default: m(() => [
|
|
2229
|
+
I("button", {
|
|
2230
|
+
ref_key: "toggleRef",
|
|
2231
|
+
ref: b,
|
|
2232
|
+
type: "button",
|
|
2233
|
+
class: "w-full",
|
|
2234
|
+
"aria-expanded": L.value,
|
|
2235
|
+
"aria-controls": U,
|
|
2236
|
+
"aria-label": te.value,
|
|
2237
|
+
onClick: R
|
|
2238
|
+
}, [
|
|
2239
|
+
I("div", dn, [
|
|
2240
|
+
I("div", pn, [
|
|
2241
|
+
_(e(Be), { icon: "local_activity" }),
|
|
2242
|
+
_(e(Y), {
|
|
2243
|
+
id: B,
|
|
2244
|
+
variant: "body-sm"
|
|
2245
|
+
}, {
|
|
2246
|
+
default: m(() => [
|
|
2247
|
+
O(M(e(n)({
|
|
2248
|
+
defaultMessage: "Add promotion code",
|
|
2249
|
+
id: "checkout.promotion_code.add_label",
|
|
2250
|
+
description: "Label for adding a promotion code in checkout"
|
|
2251
|
+
})), 1)
|
|
2252
|
+
]),
|
|
2253
|
+
_: 1
|
|
2254
|
+
})
|
|
2255
|
+
]),
|
|
2256
|
+
_(e(Be), {
|
|
2257
|
+
icon: L.value ? "remove" : "add"
|
|
2258
|
+
}, null, 8, ["icon"])
|
|
2259
|
+
])
|
|
2260
|
+
], 8, cn),
|
|
2261
|
+
Da(I("div", {
|
|
2262
|
+
id: U,
|
|
2263
|
+
ref_key: "panelRef",
|
|
2264
|
+
ref: f,
|
|
2265
|
+
role: "region",
|
|
2266
|
+
"aria-labelledby": B,
|
|
2267
|
+
class: "flex w-full flex-row items-center gap-2 overflow-hidden border-t px-3 py-2",
|
|
2268
|
+
onKeydown: Vt(qe($, ["prevent"]), ["esc"])
|
|
2269
|
+
}, [
|
|
2270
|
+
_(e(Ee), {
|
|
2271
|
+
modelValue: w.value,
|
|
2272
|
+
"onUpdate:modelValue": j[0] || (j[0] = (k) => w.value = k),
|
|
2273
|
+
placeholder: e(n)({
|
|
2274
|
+
defaultMessage: "Promotion code",
|
|
2275
|
+
id: "checkout.promotion_code.placeholder",
|
|
2276
|
+
description: "Placeholder for promotion code input in checkout"
|
|
2277
|
+
}),
|
|
2278
|
+
"aria-label": e(n)({
|
|
2279
|
+
defaultMessage: "Promotion code",
|
|
2280
|
+
id: "checkout.promotion_code.input_aria_label",
|
|
2281
|
+
description: "Aria label for promotion code input in checkout"
|
|
2282
|
+
}),
|
|
2283
|
+
class: "w-full",
|
|
2284
|
+
onKeydown: Vt(qe(D, ["self", "prevent"]), ["enter"])
|
|
2285
|
+
}, null, 8, ["modelValue", "placeholder", "aria-label", "onKeydown"]),
|
|
2286
|
+
_(e(Ie), {
|
|
2287
|
+
type: "button",
|
|
2288
|
+
disabled: !q.value,
|
|
2289
|
+
"aria-label": ee.value,
|
|
2290
|
+
"aria-disabled": !q.value,
|
|
2291
|
+
onClick: D
|
|
2292
|
+
}, {
|
|
2293
|
+
default: m(() => [
|
|
2294
|
+
O(M(e(n)({
|
|
2295
|
+
defaultMessage: "Apply",
|
|
2296
|
+
id: "checkout.promotion_code.apply_button",
|
|
2297
|
+
description: "Button label for applying a promotion code in checkout"
|
|
2298
|
+
})), 1)
|
|
2299
|
+
]),
|
|
2300
|
+
_: 1
|
|
2301
|
+
}, 8, ["disabled", "aria-label", "aria-disabled"])
|
|
2302
|
+
], 40, mn), [
|
|
2303
|
+
[Ua, L.value]
|
|
2304
|
+
])
|
|
2305
|
+
]),
|
|
2306
|
+
_: 1
|
|
2307
|
+
}, 16)),
|
|
2308
|
+
I("span", fn, M(o.value), 1)
|
|
2309
|
+
], 64));
|
|
2310
|
+
}
|
|
2311
|
+
}), yn = { class: "sv-checkout__header" }, bn = { class: "sv-checkout__payment-methods" }, _n = {
|
|
2312
|
+
key: 0,
|
|
2313
|
+
class: "sv-checkout__payment-methods-body"
|
|
2314
|
+
}, kn = {
|
|
2315
|
+
key: 4,
|
|
2316
|
+
class: "sv-checkout__payment-form"
|
|
2317
|
+
}, Pn = { class: "sv-checkout__order-summary" }, An = { class: "flex flex-col gap-4" }, wn = ["href"], vs = /* @__PURE__ */ se({
|
|
2318
|
+
__name: "Checkout",
|
|
2319
|
+
props: {
|
|
2320
|
+
configuration: { type: Object },
|
|
2321
|
+
source: { type: Object },
|
|
2322
|
+
avatar: { type: String }
|
|
2323
|
+
},
|
|
2324
|
+
setup(t) {
|
|
2325
|
+
const r = Bt(
|
|
2326
|
+
() => import("./PaymentIntegrationForm-ZnIjTyda.mjs")
|
|
2327
|
+
), n = Bt(
|
|
2328
|
+
() => import("./PlanCustomizationEditor-BDWm_z2w.mjs")
|
|
2329
|
+
), h = t, a = Q(), L = sa(), C = fe(), { $t: o, locale: T } = C, { formatTimePeriod: b } = ze(), { isMobileViewport: f } = ra(), V = u(() => {
|
|
2330
|
+
var s;
|
|
2331
|
+
return ((s = h.source.note.value) == null ? void 0 : s.trim()) || void 0;
|
|
2332
|
+
}), {
|
|
2333
|
+
validatedEmail: B,
|
|
2334
|
+
validatedCountry: U,
|
|
2335
|
+
subscription: w,
|
|
2336
|
+
orderMeterValues: A,
|
|
2337
|
+
quantityAddonConfigIds: q,
|
|
2338
|
+
isInvoicePreviewPending: H,
|
|
2339
|
+
isInvoicePreviewStale: te,
|
|
2340
|
+
isInvoicePreviewFailed: ee,
|
|
2341
|
+
hasSubscriptionLoadFailed: oe,
|
|
2342
|
+
settleInvoicePreview: Z,
|
|
2343
|
+
checkoutForm: c,
|
|
2344
|
+
customerForms: $,
|
|
2345
|
+
planCustomizations: R,
|
|
2346
|
+
invoicePreview: D,
|
|
2347
|
+
invoicePreviewByBillingPeriod: z,
|
|
2348
|
+
trialInvoicePreview: d,
|
|
2349
|
+
trialPeriod: j,
|
|
2350
|
+
payment: k,
|
|
2351
|
+
pricingCurrency: p,
|
|
2352
|
+
isPaid: E,
|
|
2353
|
+
amount: v,
|
|
2354
|
+
recurringAmount: l,
|
|
2355
|
+
hasOneOffCharges: y,
|
|
2356
|
+
loadInvoicePreview: W,
|
|
2357
|
+
changeBillingPeriod: ae,
|
|
2358
|
+
saveFormStateForRedirect: ie,
|
|
2359
|
+
clearSavedFormState: J,
|
|
2360
|
+
successUrl: me,
|
|
2361
|
+
cancelUrl: ye,
|
|
2362
|
+
isShippingAddressRequired: $e
|
|
2363
|
+
} = h.source, { dispatch: X, componentName: Ae } = Ya();
|
|
2364
|
+
let be = !1;
|
|
2365
|
+
Pe(
|
|
2366
|
+
() => !!(w.value && D.value),
|
|
2367
|
+
(s) => {
|
|
2368
|
+
!s || be || (be = !0, X("solvimon-ready", void 0));
|
|
2369
|
+
},
|
|
2370
|
+
{ immediate: !0 }
|
|
2371
|
+
);
|
|
2372
|
+
const le = u(() => (k == null ? void 0 : k.paymentMethodOptions.value) ?? []), _e = u(() => (k == null ? void 0 : k.isPaymentMethodsPending.value) ?? !1), ke = u(
|
|
2373
|
+
() => (k == null ? void 0 : k.hasPaymentMethodOptionsError.value) ?? !1
|
|
2374
|
+
), Le = u(() => k == null ? void 0 : k.authorizationContext.value), Ye = () => k == null ? void 0 : k.retryPaymentMethodOptions(), ct = k == null ? void 0 : k.updateInvoicePreviewOnBillingInformationChange, Ge = u(
|
|
2375
|
+
() => k != null && k.countryCode ? k.countryCode.value : c.form.value.country
|
|
2376
|
+
), dt = u(() => {
|
|
2377
|
+
var s;
|
|
2378
|
+
return !!k && (((s = h.source.canPay) == null ? void 0 : s.value) ?? !0);
|
|
2379
|
+
}), He = Bo(), pa = u(
|
|
2380
|
+
() => {
|
|
2381
|
+
var s;
|
|
2382
|
+
return !!((s = He == null ? void 0 : He.value) != null && s["express-checkout"]);
|
|
2383
|
+
}
|
|
2384
|
+
), we = Q(!1), { isFormHeld: ma, handleActionRequired: ga } = Yo(we), pt = u(
|
|
2385
|
+
() => ($ == null ? void 0 : $.value.map(({ form: s }) => s)) ?? [c]
|
|
2386
|
+
), mt = async () => (await Promise.all(pt.value.map((s) => s.validation.value.$validate())), pt.value.every((s) => !s.validation.value.$invalid)), va = async () => {
|
|
2387
|
+
!await mt() || !a.value || (gt(), a.value.submit());
|
|
2388
|
+
}, gt = () => {
|
|
2389
|
+
we.value = !0, de.value = null, ie == null || ie();
|
|
2390
|
+
}, de = Q(null), vt = () => o({
|
|
2391
|
+
defaultMessage: "The price changed with your last edit. Check it and pay again.",
|
|
2392
|
+
id: "checkout.price_changed",
|
|
2393
|
+
description: "Shown when a payment is held back because the customer changed the order while it waited for the price"
|
|
2394
|
+
}), ha = () => {
|
|
2395
|
+
we.value = !1, ge.value = void 0, J == null || J();
|
|
2396
|
+
}, Ke = Q(!1), ht = (s) => {
|
|
2397
|
+
var g;
|
|
2398
|
+
const S = (g = k == null ? void 0 : k.recoverPaymentFailure) == null ? void 0 : g.call(k, s);
|
|
2399
|
+
if (we.value = !1, ge.value = void 0, J == null || J(), (s == null ? void 0 : s.code) === "PAYMENT_OUTCOME_UNCONFIRMED") {
|
|
2400
|
+
Ke.value = !0;
|
|
2401
|
+
return;
|
|
2402
|
+
}
|
|
2403
|
+
if (S === "PRICE_CHANGED") {
|
|
2404
|
+
de.value = vt();
|
|
2405
|
+
return;
|
|
2406
|
+
}
|
|
2407
|
+
de.value = (s == null ? void 0 : s.message) ?? o({
|
|
2408
|
+
defaultMessage: "The payment did not go through. Please try again.",
|
|
2409
|
+
id: "checkout.payment_failed",
|
|
2410
|
+
description: "Error shown when a payment the customer started did not complete"
|
|
2411
|
+
});
|
|
2412
|
+
}, fa = (s) => {
|
|
2413
|
+
ht(s), (s == null ? void 0 : s.code) === "PAYMENT_OUTCOME_UNCONFIRMED" && (de.value = o({
|
|
2414
|
+
defaultMessage: "Your payment could not be confirmed yet and may still go through, so please do not pay again.",
|
|
2415
|
+
id: "checkout.payment_unconfirmed",
|
|
2416
|
+
description: "Shown when it is not yet known whether an express payment the customer made went through"
|
|
2417
|
+
}));
|
|
2418
|
+
}, ge = Q(), Ne = u(() => ge.value ? { inert: !0 } : {}), ft = async () => {
|
|
2419
|
+
if (!await mt()) return !1;
|
|
2420
|
+
const s = await Z();
|
|
2421
|
+
return s === "CHANGED" ? (de.value = vt(), !1) : s === "FAILED" ? (de.value = o({
|
|
2422
|
+
defaultMessage: "The price could not be brought up to date. Please try again.",
|
|
2423
|
+
id: "checkout.price_not_settled",
|
|
2424
|
+
description: "Error shown when a payment is held back because the price of the latest changes could not be loaded"
|
|
2425
|
+
}), !1) : dt.value ? (v.value && (ge.value = { amount: v.value, context: Le.value }, await Re()), !0) : !1;
|
|
2426
|
+
}, ya = u(() => !!d.value), yt = u(
|
|
2427
|
+
() => {
|
|
2428
|
+
var s, S;
|
|
2429
|
+
return ((s = h.source.chargedSchedules) == null ? void 0 : s.value) ?? [
|
|
2430
|
+
{
|
|
2431
|
+
scheduleInfo: Xe.value,
|
|
2432
|
+
enabledPricingIds: c.form.value.enabledPricingIds,
|
|
2433
|
+
billingPeriod: (S = w.value) == null ? void 0 : S.billing_period
|
|
2434
|
+
}
|
|
2435
|
+
];
|
|
2436
|
+
}
|
|
2437
|
+
), bt = u(
|
|
2438
|
+
() => new Set(
|
|
2439
|
+
yt.value.flatMap((s) => [
|
|
2440
|
+
...qo(s.scheduleInfo, {
|
|
2441
|
+
enabledPricingIds: s.enabledPricingIds
|
|
2442
|
+
})
|
|
2443
|
+
])
|
|
2444
|
+
)
|
|
2445
|
+
), _t = u(
|
|
2446
|
+
() => yt.value.flatMap(
|
|
2447
|
+
(s) => un({
|
|
2448
|
+
...s,
|
|
2449
|
+
currency: p.value,
|
|
2450
|
+
intl: C
|
|
2451
|
+
})
|
|
2452
|
+
)
|
|
2453
|
+
), ba = u(
|
|
2454
|
+
() => [...bt.value].some((s) => s !== "ONE_OFF")
|
|
2455
|
+
), Ze = u(() => bt.value.has("USAGE_BASED")), _a = u(
|
|
2456
|
+
() => Ze.value || _t.value.length > 0 || (D.value ? Za(D.value) : !1)
|
|
2457
|
+
), Ce = u(
|
|
2458
|
+
() => {
|
|
2459
|
+
var s;
|
|
2460
|
+
return l.value ?? ((s = D.value) == null ? void 0 : s.tax_summary.total_amount);
|
|
2461
|
+
}
|
|
2462
|
+
);
|
|
2463
|
+
Pe(
|
|
2464
|
+
() => y.value && !l.value && !!D.value,
|
|
2465
|
+
(s) => {
|
|
2466
|
+
s && L.warn(
|
|
2467
|
+
"RECURRING_AMOUNT_UNRESOLVED",
|
|
2468
|
+
"Could not tell the recurring part of the invoice from the one-off part; the mandate states the invoice total",
|
|
2469
|
+
{
|
|
2470
|
+
flow: "CHECKOUT",
|
|
2471
|
+
unattributedGroupTypes: D.value ? Wa(D.value).unattributedGroupTypes : []
|
|
2472
|
+
}
|
|
2473
|
+
);
|
|
2474
|
+
}
|
|
2475
|
+
);
|
|
2476
|
+
const We = u(
|
|
2477
|
+
() => ba.value || !!Ce.value && Number(Ce.value.quantity) !== 0
|
|
2478
|
+
), ka = u(
|
|
2479
|
+
() => y.value ? l.value : void 0
|
|
2480
|
+
), kt = (s) => !!s && ["US", "CA"].includes(s), Pa = u(
|
|
2481
|
+
() => kt(c.form.value.country)
|
|
2482
|
+
), Je = u({
|
|
2483
|
+
get: () => c.form.value.enabledPricingIds ?? [],
|
|
2484
|
+
set: (s) => {
|
|
2485
|
+
c.form.value.enabledPricingIds = s;
|
|
2486
|
+
}
|
|
2487
|
+
}), Xe = u(
|
|
2488
|
+
() => w.value ? ua({
|
|
2489
|
+
pricingPlanScheduleInfos: w.value.pricing_plan_schedule_infos,
|
|
2490
|
+
type: "DEFAULT"
|
|
2491
|
+
}) : void 0
|
|
2492
|
+
), Pt = u(() => {
|
|
2493
|
+
if (!Xe.value || !w.value)
|
|
2494
|
+
return /* @__PURE__ */ new Set();
|
|
2495
|
+
const s = xo({
|
|
2496
|
+
pricingPlanScheduleInfo: Xe.value
|
|
2497
|
+
}), S = p.value, g = w.value.billing_period, F = /* @__PURE__ */ new Set();
|
|
2498
|
+
return s.forEach((K, ue) => {
|
|
2499
|
+
S && K.currency !== S || g && K.billingPeriod && (K.billingPeriod.type !== g.type || K.billingPeriod.value !== g.value) || F.add(ue);
|
|
2500
|
+
}), F;
|
|
2501
|
+
}), At = (s) => u({
|
|
2502
|
+
get: () => {
|
|
2503
|
+
const S = c.form.value[s] ?? [], g = Pt.value;
|
|
2504
|
+
return g.size ? S.filter(({ pricing_item_config_id: F }) => g.has(F)) : S;
|
|
2505
|
+
},
|
|
2506
|
+
set: (S) => {
|
|
2507
|
+
const g = c.form.value[s] ?? [], F = Pt.value;
|
|
2508
|
+
if (!F.size) {
|
|
2509
|
+
c.form.value[s] = S;
|
|
2510
|
+
return;
|
|
2511
|
+
}
|
|
2512
|
+
const K = g.filter(
|
|
2513
|
+
({ pricing_item_config_id: ue }) => !F.has(ue) && !(q != null && q.value.has(ue))
|
|
2514
|
+
);
|
|
2515
|
+
c.form.value[s] = K.concat(S);
|
|
2516
|
+
}
|
|
2517
|
+
}), Qe = At("seatsValues"), et = At("unitsValues"), Ve = u(
|
|
2518
|
+
() => {
|
|
2519
|
+
var s;
|
|
2520
|
+
return b(((s = D.value) == null ? void 0 : s.billing_period) ?? { type: "MONTH", value: 1 }, {
|
|
2521
|
+
short: !0,
|
|
2522
|
+
singular: !0,
|
|
2523
|
+
hideValueForExactPeriods: !0
|
|
2524
|
+
});
|
|
2525
|
+
}
|
|
2526
|
+
), Aa = u(() => {
|
|
2527
|
+
var s;
|
|
2528
|
+
if (d.value)
|
|
2529
|
+
return o(
|
|
2530
|
+
{
|
|
2531
|
+
defaultMessage: "{discounted_amount} for {trial_period}, then {subscription_amount}/{billing_period} until canceled, starting {start_date, date, ::MMMMd}.",
|
|
2532
|
+
id: "checkout.agreement.trial",
|
|
2533
|
+
description: "The agreement for the trial period"
|
|
2534
|
+
},
|
|
2535
|
+
{
|
|
2536
|
+
discounted_amount: Number(d.value.tax_summary.total_amount.quantity) === 0 ? o({
|
|
2537
|
+
defaultMessage: "Free",
|
|
2538
|
+
id: "checkout.agreement.trial.free",
|
|
2539
|
+
description: "The free amount for the trial period"
|
|
2540
|
+
}) : ne(d.value.tax_summary.total_amount),
|
|
2541
|
+
trial_period: b(j.value, { short: !0 }),
|
|
2542
|
+
subscription_amount: ne(
|
|
2543
|
+
Ce.value ?? {
|
|
2544
|
+
quantity: "0.00",
|
|
2545
|
+
currency: d.value.tax_summary.total_amount.currency
|
|
2546
|
+
}
|
|
2547
|
+
),
|
|
2548
|
+
billing_period: Ve.value,
|
|
2549
|
+
// @ts-expect-error formatjs does not support this type yet
|
|
2550
|
+
start_date: new Date(xe.value)
|
|
2551
|
+
}
|
|
2552
|
+
);
|
|
2553
|
+
if (y.value && l.value) {
|
|
2554
|
+
const S = ne(
|
|
2555
|
+
((s = D.value) == null ? void 0 : s.tax_summary.total_amount) ?? {
|
|
2556
|
+
quantity: "0.00",
|
|
2557
|
+
currency: l.value.currency
|
|
2558
|
+
}
|
|
2559
|
+
);
|
|
2560
|
+
return We.value ? Ze.value && Number(l.value.quantity) === 0 ? o(
|
|
2561
|
+
{
|
|
2562
|
+
defaultMessage: "{due_today} today, then usage billed every {billing_period} until canceled.",
|
|
2563
|
+
id: "checkout.agreement.usage_with_one_off",
|
|
2564
|
+
description: "The agreement for a usage-based subscription whose first invoice also charges something only once"
|
|
2565
|
+
},
|
|
2566
|
+
{
|
|
2567
|
+
due_today: S,
|
|
2568
|
+
billing_period: Ve.value
|
|
2569
|
+
}
|
|
2570
|
+
) : o(
|
|
2571
|
+
{
|
|
2572
|
+
defaultMessage: "{due_today} today, then {subscription_amount}/{billing_period} until canceled, starting {start_date, date, long}.",
|
|
2573
|
+
id: "checkout.agreement.subscription_with_one_off",
|
|
2574
|
+
description: "The agreement for a subscription whose first invoice also charges something only once"
|
|
2575
|
+
},
|
|
2576
|
+
{
|
|
2577
|
+
due_today: S,
|
|
2578
|
+
subscription_amount: ne(l.value),
|
|
2579
|
+
billing_period: Ve.value,
|
|
2580
|
+
// @ts-expect-error formatjs does not support this type yet
|
|
2581
|
+
start_date: new Date(xe.value)
|
|
2582
|
+
}
|
|
2583
|
+
) : o(
|
|
2584
|
+
{
|
|
2585
|
+
defaultMessage: "{due_today} today. One-time purchase.",
|
|
2586
|
+
id: "checkout.agreement.one_off",
|
|
2587
|
+
description: "The agreement for an order that is charged once and does not renew"
|
|
2588
|
+
},
|
|
2589
|
+
{ due_today: S }
|
|
2590
|
+
);
|
|
2591
|
+
}
|
|
2592
|
+
return o(
|
|
2593
|
+
{
|
|
2594
|
+
defaultMessage: "{subscription_amount}/{billing_period} until canceled, starting {start_date, date, long}.",
|
|
2595
|
+
id: "checkout.agreement.subscription",
|
|
2596
|
+
description: "The agreement for the subscription"
|
|
2597
|
+
},
|
|
2598
|
+
{
|
|
2599
|
+
subscription_amount: Ce.value ? ne(Ce.value) : "",
|
|
2600
|
+
billing_period: Ve.value,
|
|
2601
|
+
// @ts-expect-error formatjs does not support this type yet
|
|
2602
|
+
start_date: new Date(xe.value)
|
|
2603
|
+
}
|
|
2604
|
+
);
|
|
2605
|
+
}), wt = u(
|
|
2606
|
+
() => {
|
|
2607
|
+
var s, S, g, F;
|
|
2608
|
+
return ((S = (s = D.value) == null ? void 0 : s.billing_entity) == null ? void 0 : S.legal_name) || ((F = (g = w.value) == null ? void 0 : g.billing_entity) == null ? void 0 : F.legal_name) || void 0;
|
|
2609
|
+
}
|
|
2610
|
+
), Ct = u(() => {
|
|
2611
|
+
var s;
|
|
2612
|
+
return {
|
|
2613
|
+
subscriptions: R == null ? void 0 : R.value.map((S) => S.subscription),
|
|
2614
|
+
invoicePreviewByBillingPeriod: z.value,
|
|
2615
|
+
trialInvoice: d.value,
|
|
2616
|
+
enabledPricingIds: Je.value,
|
|
2617
|
+
countryCode: c.form.value.country,
|
|
2618
|
+
avatar: h.avatar,
|
|
2619
|
+
isPaid: E.value,
|
|
2620
|
+
isUsageBased: _a.value,
|
|
2621
|
+
usagePriceGroups: _t.value,
|
|
2622
|
+
isUpdating: H.value || te.value,
|
|
2623
|
+
invoiceSections: (s = h.source.invoiceSections) == null ? void 0 : s.value
|
|
2624
|
+
};
|
|
2625
|
+
}), xt = u(() => {
|
|
2626
|
+
var S;
|
|
2627
|
+
if (!D.value)
|
|
2628
|
+
return;
|
|
2629
|
+
const s = Eo({
|
|
2630
|
+
subscription: w.value,
|
|
2631
|
+
fallback: o({
|
|
2632
|
+
defaultMessage: "Subscription",
|
|
2633
|
+
description: "The fallback name for when no subscription name can be determined",
|
|
2634
|
+
id: "customer_overview.subscriptions_block.fallback_subscription_name"
|
|
2635
|
+
})
|
|
2636
|
+
});
|
|
2637
|
+
return {
|
|
2638
|
+
description: s,
|
|
2639
|
+
managementURL: "https://www.solvimon.com/account/billing",
|
|
2640
|
+
agreement: Aa.value,
|
|
2641
|
+
...d.value && j.value && {
|
|
2642
|
+
trial: {
|
|
2643
|
+
label: o({
|
|
2644
|
+
defaultMessage: "Trial",
|
|
2645
|
+
id: "checkout.trial.label",
|
|
2646
|
+
description: "The label of the trial"
|
|
2647
|
+
}),
|
|
2648
|
+
amount: d.value.tax_summary.total_amount,
|
|
2649
|
+
startDate: tt.value ? new Date(tt.value) : void 0,
|
|
2650
|
+
endDate: Mt.value ? new Date(Mt.value) : void 0
|
|
2651
|
+
}
|
|
2652
|
+
},
|
|
2653
|
+
// Left off entirely, so the sheet mandates no charge that is never going to be made.
|
|
2654
|
+
...We.value && Ce.value && {
|
|
2655
|
+
regular: {
|
|
2656
|
+
label: s,
|
|
2657
|
+
amount: Ce.value,
|
|
2658
|
+
startDate: xe.value ? new Date(xe.value) : void 0,
|
|
2659
|
+
interval: ((S = w.value) == null ? void 0 : S.billing_period) ?? { type: "MONTH", value: 1 }
|
|
2660
|
+
}
|
|
2661
|
+
}
|
|
2662
|
+
};
|
|
2663
|
+
}), wa = (s) => {
|
|
2664
|
+
const { line1: S, line2: g, postal_code: F, city: K, state: ue, country: it, email: St } = s;
|
|
2665
|
+
c.updateInitialState({
|
|
2666
|
+
...S && { addressLine1: S },
|
|
2667
|
+
...g && { addressLine2: g },
|
|
2668
|
+
...F && { postalCode: F },
|
|
2669
|
+
...K && { city: K },
|
|
2670
|
+
...ue && { state: ue },
|
|
2671
|
+
...St && { email: St },
|
|
2672
|
+
...it && je(it) ? { country: it } : {}
|
|
2673
|
+
});
|
|
2674
|
+
}, Et = u(() => !(B && U)), tt = u(() => {
|
|
2675
|
+
var g, F, K;
|
|
2676
|
+
const s = (F = (g = d.value) == null ? void 0 : g.periods) == null ? void 0 : F[0], S = (K = at.value) == null ? void 0 : K.trialStartDate;
|
|
2677
|
+
return s != null && s.start_at ? new Date(s.start_at) : S;
|
|
2678
|
+
}), at = u(() => Mo(w.value)), Mt = u(() => {
|
|
2679
|
+
var g, F, K;
|
|
2680
|
+
const s = (F = (g = d.value) == null ? void 0 : g.periods) == null ? void 0 : F[0], S = (K = at.value) == null ? void 0 : K.trialEndDate;
|
|
2681
|
+
return s != null && s.end_at ? new Date(s.end_at) : S;
|
|
2682
|
+
}), xe = u(() => {
|
|
2683
|
+
var g, F, K;
|
|
2684
|
+
const s = (F = (g = D.value) == null ? void 0 : g.periods) == null ? void 0 : F[0], S = (K = at.value) == null ? void 0 : K.subscriptionStartDate;
|
|
2685
|
+
return s != null && s.start_at ? new Date(s.start_at) : S;
|
|
2686
|
+
}), Ca = u(() => !!(c.form.value.seatsValues && c.form.value.seatsValues.length > 0 || c.form.value.unitsValues && c.form.value.unitsValues.length > 0 || w.value && sn(w.value) || w.value && ln(w.value))), {
|
|
2687
|
+
code: It,
|
|
2688
|
+
isPending: Lt,
|
|
2689
|
+
errorMessage: ot,
|
|
2690
|
+
apply: xa,
|
|
2691
|
+
remove: Ea
|
|
2692
|
+
} = h.source.promotionCode, Ma = u(() => {
|
|
2693
|
+
var s;
|
|
2694
|
+
return ((s = h.source.promotionCode.isAllowed) == null ? void 0 : s.value) ?? !0;
|
|
2695
|
+
}), Ia = (s) => {
|
|
2696
|
+
It.value = s;
|
|
2697
|
+
}, La = (s, S) => {
|
|
2698
|
+
s && (s.code.value = S);
|
|
2699
|
+
}, Ta = () => {
|
|
2700
|
+
me.value && Lo(me.value);
|
|
2701
|
+
}, Tt = Q(!1), Na = u(
|
|
2702
|
+
() => !Tt.value && !!me.value
|
|
2703
|
+
), Nt = () => {
|
|
2704
|
+
var s;
|
|
2705
|
+
if (k != null && k.awaitCompletion) {
|
|
2706
|
+
we.value = !0, de.value = null, k.awaitCompletion();
|
|
2707
|
+
return;
|
|
2708
|
+
}
|
|
2709
|
+
if (E.value = !0, ge.value = void 0, J == null || J(), ot.value = null, de.value = null, !X("solvimon-payment-succeeded", {
|
|
2710
|
+
componentName: Ae,
|
|
2711
|
+
subscriptionId: (s = w.value) == null ? void 0 : s.id
|
|
2712
|
+
})) {
|
|
2713
|
+
Tt.value = !0;
|
|
2714
|
+
return;
|
|
2715
|
+
}
|
|
2716
|
+
Ta();
|
|
2717
|
+
}, Sa = () => W().catch(() => {
|
|
2718
|
+
});
|
|
2719
|
+
return (s, S) => e(oe) ? (i(), P(Wo, {
|
|
2720
|
+
key: 0,
|
|
2721
|
+
class: "sv-checkout sv-root sv-screen sv-checkout--error"
|
|
2722
|
+
})) : (i(), P(e(zo), {
|
|
2723
|
+
key: 1,
|
|
2724
|
+
class: rt(["sv-checkout sv-root sv-screen", { "sv-checkout--paid": e(E) }])
|
|
2725
|
+
}, {
|
|
2726
|
+
header: m(() => [
|
|
2727
|
+
I("div", yn, [
|
|
2728
|
+
_(Me, { class: "min-h-[52px] w-96" }, {
|
|
2729
|
+
default: m(() => {
|
|
2730
|
+
var g, F, K, ue;
|
|
2731
|
+
return [
|
|
2732
|
+
e(D) && e(w) && xe.value ? (i(), P(hi, {
|
|
2733
|
+
key: 0,
|
|
2734
|
+
class: "sv-checkout__title",
|
|
2735
|
+
"trial-start-date": tt.value,
|
|
2736
|
+
"trial-period": e(j),
|
|
2737
|
+
"subscription-start-date": xe.value,
|
|
2738
|
+
"subscription-name": ((g = e(w)) == null ? void 0 : g.name) ?? "",
|
|
2739
|
+
amount: (F = e(D)) == null ? void 0 : F.invoice_amount_including_tax,
|
|
2740
|
+
"due-today-amount": e(v) ?? ((K = e(D)) == null ? void 0 : K.invoice_amount_including_tax),
|
|
2741
|
+
"recurring-amount": ka.value,
|
|
2742
|
+
"has-one-off-charges": e(y),
|
|
2743
|
+
"has-recurring-charge": We.value,
|
|
2744
|
+
"has-usage-charges": Ze.value,
|
|
2745
|
+
"billing-period": (ue = e(w)) == null ? void 0 : ue.billing_period,
|
|
2746
|
+
"country-code": e(c).form.value.country
|
|
2747
|
+
}, null, 8, ["trial-start-date", "trial-period", "subscription-start-date", "subscription-name", "amount", "due-today-amount", "recurring-amount", "has-one-off-charges", "has-recurring-charge", "has-usage-charges", "billing-period", "country-code"])) : N("", !0)
|
|
2748
|
+
];
|
|
2749
|
+
}),
|
|
2750
|
+
_: 1
|
|
2751
|
+
})
|
|
2752
|
+
])
|
|
2753
|
+
]),
|
|
2754
|
+
content: m(() => [
|
|
2755
|
+
e(E) ? (i(), P(fi, {
|
|
2756
|
+
key: 0,
|
|
2757
|
+
class: "sv-checkout__completed-payment"
|
|
2758
|
+
})) : (i(), x(G, { key: 1 }, [
|
|
2759
|
+
e(w) && e(f) ? (i(), P(ta, ve({
|
|
2760
|
+
key: 0,
|
|
2761
|
+
class: "sv-checkout__mobile-order-summary"
|
|
2762
|
+
}, Ct.value, {
|
|
2763
|
+
subscription: e(w),
|
|
2764
|
+
invoice: e(D),
|
|
2765
|
+
collapsible: "collapsed",
|
|
2766
|
+
variant: "products-inline",
|
|
2767
|
+
onBillingPeriodChange: e(ae)
|
|
2768
|
+
}), null, 16, ["subscription", "invoice", "onBillingPeriodChange"])) : N("", !0),
|
|
2769
|
+
e(R) ? (i(!0), x(G, { key: 1 }, ce(e(R), (g) => (i(), x(G, {
|
|
2770
|
+
key: g.key
|
|
2771
|
+
}, [
|
|
2772
|
+
g.seatsValues.value.length || g.unitsValues.value.length || g.promotionCode ? (i(), P(e(n), ve({
|
|
2773
|
+
key: 0,
|
|
2774
|
+
ref_for: !0
|
|
2775
|
+
}, Ne.value, {
|
|
2776
|
+
"seats-values": g.seatsValues.value,
|
|
2777
|
+
"onUpdate:seatsValues": (F) => g.seatsValues.value = F,
|
|
2778
|
+
"units-values": g.unitsValues.value,
|
|
2779
|
+
"onUpdate:unitsValues": (F) => g.unitsValues.value = F,
|
|
2780
|
+
class: "sv-checkout__plan-customization",
|
|
2781
|
+
title: g.title,
|
|
2782
|
+
subscription: g.subscription,
|
|
2783
|
+
"enabled-pricing-ids": [],
|
|
2784
|
+
"hide-pricing-choices": "",
|
|
2785
|
+
"initial-seats-values": g.minimums.seatsValues,
|
|
2786
|
+
"initial-units-values": g.minimums.unitsValues,
|
|
2787
|
+
"max-seats-values": g.maximums.seatsValues,
|
|
2788
|
+
"max-units-values": g.maximums.unitsValues,
|
|
2789
|
+
"editable-config-ids": g.editableConfigIds,
|
|
2790
|
+
"billing-period": g.subscription.billing_period
|
|
2791
|
+
}), {
|
|
2792
|
+
default: m(() => {
|
|
2793
|
+
var F, K;
|
|
2794
|
+
return [
|
|
2795
|
+
(K = (F = g.promotionCode) == null ? void 0 : F.isAllowed) != null && K.value ? (i(), x(G, { key: 0 }, [
|
|
2796
|
+
_(oa, {
|
|
2797
|
+
class: "sv-checkout__promotion-code",
|
|
2798
|
+
"promotion-code": g.promotionCode.code.value,
|
|
2799
|
+
"is-pending": g.promotionCode.isPending.value,
|
|
2800
|
+
"onUpdate:appliedCode": (ue) => La(g.promotionCode, ue),
|
|
2801
|
+
onRemove: g.promotionCode.remove,
|
|
2802
|
+
onApply: g.promotionCode.apply
|
|
2803
|
+
}, null, 8, ["promotion-code", "is-pending", "onUpdate:appliedCode", "onRemove", "onApply"]),
|
|
2804
|
+
g.promotionCode.errorMessage.value ? (i(), P(e(st), {
|
|
2805
|
+
key: 0,
|
|
2806
|
+
class: "sv-checkout__promotion-error",
|
|
2807
|
+
title: g.promotionCode.errorMessage.value
|
|
2808
|
+
}, null, 8, ["title"])) : N("", !0)
|
|
2809
|
+
], 64)) : N("", !0)
|
|
2810
|
+
];
|
|
2811
|
+
}),
|
|
2812
|
+
_: 2
|
|
2813
|
+
}, 1040, ["seats-values", "onUpdate:seatsValues", "units-values", "onUpdate:unitsValues", "title", "subscription", "initial-seats-values", "initial-units-values", "max-seats-values", "max-units-values", "editable-config-ids", "billing-period"])) : N("", !0)
|
|
2814
|
+
], 64))), 128)) : Ca.value && e(w) ? (i(), P(e(n), ve({ key: 2 }, Ne.value, {
|
|
2815
|
+
"seats-values": e(Qe),
|
|
2816
|
+
"onUpdate:seatsValues": S[0] || (S[0] = (g) => Dt(Qe) ? Qe.value = g : null),
|
|
2817
|
+
"units-values": e(et),
|
|
2818
|
+
"onUpdate:unitsValues": S[1] || (S[1] = (g) => Dt(et) ? et.value = g : null),
|
|
2819
|
+
"enabled-pricing-ids": Je.value,
|
|
2820
|
+
"onUpdate:enabledPricingIds": S[2] || (S[2] = (g) => Je.value = g),
|
|
2821
|
+
class: "sv-checkout__plan-customization",
|
|
2822
|
+
subscription: e(w),
|
|
2823
|
+
"initial-seats-values": e(A).seatsValues,
|
|
2824
|
+
"initial-units-values": e(A).unitsValues,
|
|
2825
|
+
"billing-period": e(w).billing_period,
|
|
2826
|
+
currency: e(p)
|
|
2827
|
+
}), null, 16, ["seats-values", "units-values", "enabled-pricing-ids", "subscription", "initial-seats-values", "initial-units-values", "billing-period", "currency"])) : N("", !0),
|
|
2828
|
+
e(ct) && pa.value && !Ke.value && e(c).form.value.country && e(v) && xt.value ? (i(), P(nn, {
|
|
2829
|
+
key: 3,
|
|
2830
|
+
class: "sv-checkout__express-payment-methods",
|
|
2831
|
+
amount: e(v),
|
|
2832
|
+
"country-code": e(c).form.value.country,
|
|
2833
|
+
locale: e(T),
|
|
2834
|
+
"payment-methods-options-response": le.value ?? [],
|
|
2835
|
+
"billing-information": xt.value,
|
|
2836
|
+
"on-billing-information-change": e(ct),
|
|
2837
|
+
context: Le.value,
|
|
2838
|
+
"validate-on-submit": ft,
|
|
2839
|
+
onUpdateBillingInformation: wa,
|
|
2840
|
+
onPaymentSuccess: Nt,
|
|
2841
|
+
onPaymentFailed: fa
|
|
2842
|
+
}, null, 8, ["amount", "country-code", "locale", "payment-methods-options-response", "billing-information", "on-billing-information-change", "context"])) : N("", !0),
|
|
2843
|
+
e($) ? (i(!0), x(G, { key: 4 }, ce(e($), (g) => (i(), P(ea, ve({
|
|
2844
|
+
key: g.key,
|
|
2845
|
+
modelValue: g.form.form.value,
|
|
2846
|
+
"onUpdate:modelValue": (F) => g.form.form.value = F,
|
|
2847
|
+
class: "sv-checkout__customer-form",
|
|
2848
|
+
validation: g.form.validation,
|
|
2849
|
+
display: g.display,
|
|
2850
|
+
"is-type-locked": g.isTypeLocked,
|
|
2851
|
+
title: g.title,
|
|
2852
|
+
"show-customer-info-on-top": Et.value || e(E),
|
|
2853
|
+
"is-billing-information-mandatory": kt(g.form.form.value.country),
|
|
2854
|
+
"get-is-field-required": g.form.getIsFieldRequired,
|
|
2855
|
+
"shipping-address-format": g.form.shippingAddressFormat.value,
|
|
2856
|
+
"read-only": e(E)
|
|
2857
|
+
}, { ref_for: !0 }, Ne.value), null, 16, ["modelValue", "onUpdate:modelValue", "validation", "display", "is-type-locked", "title", "show-customer-info-on-top", "is-billing-information-mandatory", "get-is-field-required", "shipping-address-format", "read-only"]))), 128)) : (i(), P(ea, ve({
|
|
2858
|
+
key: 5,
|
|
2859
|
+
modelValue: e(c).form.value,
|
|
2860
|
+
"onUpdate:modelValue": S[3] || (S[3] = (g) => e(c).form.value = g),
|
|
2861
|
+
class: "sv-checkout__customer-form",
|
|
2862
|
+
validation: e(c).validation,
|
|
2863
|
+
"read-only-email": e(B),
|
|
2864
|
+
"show-customer-info-on-top": Et.value || e(E),
|
|
2865
|
+
"is-billing-information-mandatory": Pa.value,
|
|
2866
|
+
"is-shipping-address-required": e($e),
|
|
2867
|
+
"get-is-field-required": e(c).getIsFieldRequired,
|
|
2868
|
+
"shipping-address-format": e(c).shippingAddressFormat.value,
|
|
2869
|
+
"read-only": e(E)
|
|
2870
|
+
}, Ne.value), null, 16, ["modelValue", "validation", "read-only-email", "show-customer-info-on-top", "is-billing-information-mandatory", "is-shipping-address-required", "get-is-field-required", "shipping-address-format", "read-only"])),
|
|
2871
|
+
I("div", bn, [
|
|
2872
|
+
_(Me, {
|
|
2873
|
+
variant: "section",
|
|
2874
|
+
class: "min-h-[130px]"
|
|
2875
|
+
}, {
|
|
2876
|
+
default: m(() => {
|
|
2877
|
+
var g, F;
|
|
2878
|
+
return [
|
|
2879
|
+
!_e.value || _e.value && le.value.length > 0 ? (i(), x("div", _n, [
|
|
2880
|
+
_(e(Y), {
|
|
2881
|
+
variant: "heading-3",
|
|
2882
|
+
tag: "h2",
|
|
2883
|
+
class: "sv-checkout__payment-methods-title mb-2"
|
|
2884
|
+
}, {
|
|
2885
|
+
default: m(() => [
|
|
2886
|
+
O(M(e(o)({
|
|
2887
|
+
defaultMessage: "Payment method",
|
|
2888
|
+
id: "checkout.payment_method_block.title",
|
|
2889
|
+
description: "The title of the payment method block in the checkout form"
|
|
2890
|
+
})), 1)
|
|
2891
|
+
]),
|
|
2892
|
+
_: 1
|
|
2893
|
+
}),
|
|
2894
|
+
e(k) ? Ge.value ? ke.value ? (i(), P(Se, {
|
|
2895
|
+
key: 2,
|
|
2896
|
+
class: "sv-checkout__payment-methods-error",
|
|
2897
|
+
icon: "error"
|
|
2898
|
+
}, {
|
|
2899
|
+
title: m(() => [
|
|
2900
|
+
O(M(e(o)({
|
|
2901
|
+
defaultMessage: "Could not load payment methods",
|
|
2902
|
+
id: "checkout.payment_method_block.load_failed_title",
|
|
2903
|
+
description: "The title shown when the payment methods failed to load"
|
|
2904
|
+
})), 1)
|
|
2905
|
+
]),
|
|
2906
|
+
message: m(() => [
|
|
2907
|
+
O(M(e(o)({
|
|
2908
|
+
defaultMessage: "Check your connection and try again.",
|
|
2909
|
+
id: "checkout.payment_method_block.load_failed_message",
|
|
2910
|
+
description: "The message shown when the payment methods failed to load"
|
|
2911
|
+
})), 1)
|
|
2912
|
+
]),
|
|
2913
|
+
action: m(() => [
|
|
2914
|
+
_(e(Ie), {
|
|
2915
|
+
type: "button",
|
|
2916
|
+
intent: "secondary",
|
|
2917
|
+
size: "sm",
|
|
2918
|
+
class: "sv-action sv-action--secondary sv-checkout__payment-methods-retry",
|
|
2919
|
+
onClick: Ye
|
|
2920
|
+
}, {
|
|
2921
|
+
default: m(() => [
|
|
2922
|
+
O(M(e(o)({
|
|
2923
|
+
defaultMessage: "Try again",
|
|
2924
|
+
id: "checkout.payment_method_block.load_failed_retry_button.label",
|
|
2925
|
+
description: "The label of the button that loads the payment methods again"
|
|
2926
|
+
})), 1)
|
|
2927
|
+
]),
|
|
2928
|
+
_: 1
|
|
2929
|
+
})
|
|
2930
|
+
]),
|
|
2931
|
+
_: 1
|
|
2932
|
+
})) : le.value.length === 0 ? (i(), P(Se, {
|
|
2933
|
+
key: 3,
|
|
2934
|
+
class: "sv-checkout__payment-methods-empty",
|
|
2935
|
+
icon: "credit_card_off"
|
|
2936
|
+
}, {
|
|
2937
|
+
title: m(() => [
|
|
2938
|
+
O(M(e(o)({
|
|
2939
|
+
defaultMessage: "No payment methods available",
|
|
2940
|
+
id: "checkout.payment_method_block.no_payment_methods_available_title",
|
|
2941
|
+
description: "The title shown when there are no available payment methods"
|
|
2942
|
+
})), 1)
|
|
2943
|
+
]),
|
|
2944
|
+
_: 1
|
|
2945
|
+
})) : e(v) && Ge.value ? (i(), x("div", kn, [
|
|
2946
|
+
I("div", {
|
|
2947
|
+
class: rt({ "pointer-events-none opacity-60": e(ma) })
|
|
2948
|
+
}, [
|
|
2949
|
+
_(e(r), {
|
|
2950
|
+
ref_key: "paymentIntegrationFormRef",
|
|
2951
|
+
ref: a,
|
|
2952
|
+
"country-code": Ge.value,
|
|
2953
|
+
context: ge.value ? ge.value.context : Le.value,
|
|
2954
|
+
amount: ge.value ? ge.value.amount : e(v),
|
|
2955
|
+
email: e(c).form.value.email,
|
|
2956
|
+
variant: "AUTHORIZE",
|
|
2957
|
+
"payment-method-options": le.value ?? [],
|
|
2958
|
+
"validate-on-submit": ft,
|
|
2959
|
+
"redirects-on-success": Na.value,
|
|
2960
|
+
"force-store-payment-method": "",
|
|
2961
|
+
"billing-entity-name": (F = (g = e(w)) == null ? void 0 : g.billing_entity) == null ? void 0 : F.legal_name,
|
|
2962
|
+
onPaymentSuccess: Nt,
|
|
2963
|
+
onPaymentFailed: ht,
|
|
2964
|
+
onInvalid: ha,
|
|
2965
|
+
onSubmitting: gt,
|
|
2966
|
+
onActionRequired: e(ga)
|
|
2967
|
+
}, null, 8, ["country-code", "context", "amount", "email", "payment-method-options", "redirects-on-success", "billing-entity-name", "onActionRequired"])
|
|
2968
|
+
], 2)
|
|
2969
|
+
])) : N("", !0) : (i(), P(Se, {
|
|
2970
|
+
key: 1,
|
|
2971
|
+
class: "sv-checkout__payment-methods-empty",
|
|
2972
|
+
icon: "captive_portal"
|
|
2973
|
+
}, {
|
|
2974
|
+
title: m(() => [
|
|
2975
|
+
O(M(e(o)({
|
|
2976
|
+
defaultMessage: "Select your billing country",
|
|
2977
|
+
id: "checkout.payment_method_block.no_country_selected_title",
|
|
2978
|
+
description: "The title shown when no country is selected"
|
|
2979
|
+
})), 1)
|
|
2980
|
+
]),
|
|
2981
|
+
message: m(() => [
|
|
2982
|
+
O(M(e(o)({
|
|
2983
|
+
defaultMessage: "Payment methods will be shown after you select the billing country.",
|
|
2984
|
+
id: "checkout.payment_method_block.no_country_selected_message",
|
|
2985
|
+
description: "The message shown when no country is selected"
|
|
2986
|
+
})), 1)
|
|
2987
|
+
]),
|
|
2988
|
+
_: 1
|
|
2989
|
+
})) : (i(), P(Se, {
|
|
2990
|
+
key: 0,
|
|
2991
|
+
class: "sv-checkout__payment-unavailable",
|
|
2992
|
+
icon: "credit_card_off"
|
|
2993
|
+
}, {
|
|
2994
|
+
title: m(() => [
|
|
2995
|
+
O(M(e(o)({
|
|
2996
|
+
defaultMessage: "Payment is not available yet",
|
|
2997
|
+
id: "checkout.payment_method_block.payment_unavailable_title",
|
|
2998
|
+
description: "The title shown where the payment methods go when this checkout cannot take a payment yet"
|
|
2999
|
+
})), 1)
|
|
3000
|
+
]),
|
|
3001
|
+
_: 1
|
|
3002
|
+
}))
|
|
3003
|
+
])) : N("", !0)
|
|
3004
|
+
];
|
|
3005
|
+
}),
|
|
3006
|
+
_: 1
|
|
3007
|
+
})
|
|
3008
|
+
])
|
|
3009
|
+
], 64))
|
|
3010
|
+
]),
|
|
3011
|
+
aside: m(() => [
|
|
3012
|
+
I("div", Pn, [
|
|
3013
|
+
e(ee) && !e(D) ? (i(), P(Se, {
|
|
3014
|
+
key: 0,
|
|
3015
|
+
class: "sv-checkout__order-summary-error",
|
|
3016
|
+
icon: "error"
|
|
3017
|
+
}, {
|
|
3018
|
+
title: m(() => [
|
|
3019
|
+
O(M(e(o)({
|
|
3020
|
+
defaultMessage: "Could not load the price",
|
|
3021
|
+
id: "checkout.order_summary.load_failed_title",
|
|
3022
|
+
description: "The title shown in the order summary when the price of the order failed to load"
|
|
3023
|
+
})), 1)
|
|
3024
|
+
]),
|
|
3025
|
+
message: m(() => [
|
|
3026
|
+
O(M(e(o)({
|
|
3027
|
+
defaultMessage: "Check your connection and try again.",
|
|
3028
|
+
id: "checkout.order_summary.load_failed_message",
|
|
3029
|
+
description: "The message shown in the order summary when the price of the order failed to load"
|
|
3030
|
+
})), 1)
|
|
3031
|
+
]),
|
|
3032
|
+
action: m(() => [
|
|
3033
|
+
_(e(Ie), {
|
|
3034
|
+
type: "button",
|
|
3035
|
+
intent: "secondary",
|
|
3036
|
+
size: "sm",
|
|
3037
|
+
class: "sv-action sv-action--secondary sv-checkout__order-summary-retry",
|
|
3038
|
+
onClick: Sa
|
|
3039
|
+
}, {
|
|
3040
|
+
default: m(() => [
|
|
3041
|
+
O(M(e(o)({
|
|
3042
|
+
defaultMessage: "Try again",
|
|
3043
|
+
id: "checkout.order_summary.load_failed_retry_button.label",
|
|
3044
|
+
description: "The label of the button that loads the price of the order again"
|
|
3045
|
+
})), 1)
|
|
3046
|
+
]),
|
|
3047
|
+
_: 1
|
|
3048
|
+
})
|
|
3049
|
+
]),
|
|
3050
|
+
_: 1
|
|
3051
|
+
})) : (i(), P(Me, {
|
|
3052
|
+
key: 1,
|
|
3053
|
+
variant: "section",
|
|
3054
|
+
class: "min-h-[220px]"
|
|
3055
|
+
}, {
|
|
3056
|
+
default: m(() => [
|
|
3057
|
+
e(w) && e(D) ? (i(), P(ta, ve({ key: 0 }, Ct.value, {
|
|
3058
|
+
subscription: e(w),
|
|
3059
|
+
invoice: e(D),
|
|
3060
|
+
onBillingPeriodChange: e(ae)
|
|
3061
|
+
}), null, 16, ["subscription", "invoice", "onBillingPeriodChange"])) : N("", !0)
|
|
3062
|
+
]),
|
|
3063
|
+
_: 1
|
|
3064
|
+
}))
|
|
3065
|
+
]),
|
|
3066
|
+
e(E) ? N("", !0) : (i(), x(G, { key: 0 }, [
|
|
3067
|
+
Ma.value ? (i(), P(oa, ve({
|
|
3068
|
+
key: 0,
|
|
3069
|
+
class: "sv-checkout__promotion-code"
|
|
3070
|
+
}, Ne.value, {
|
|
3071
|
+
"promotion-code": e(It),
|
|
3072
|
+
"is-pending": e(Lt),
|
|
3073
|
+
"onUpdate:appliedCode": Ia,
|
|
3074
|
+
onRemove: e(Ea),
|
|
3075
|
+
onApply: e(xa)
|
|
3076
|
+
}), null, 16, ["promotion-code", "is-pending", "onRemove", "onApply"])) : N("", !0),
|
|
3077
|
+
e(ot) ? (i(), P(e(st), {
|
|
3078
|
+
key: 1,
|
|
3079
|
+
class: "sv-checkout__promotion-error mt-2",
|
|
3080
|
+
title: e(ot)
|
|
3081
|
+
}, null, 8, ["title"])) : N("", !0),
|
|
3082
|
+
de.value ? (i(), P(e(st), {
|
|
3083
|
+
key: 2,
|
|
3084
|
+
class: "sv-checkout__payment-error mt-2",
|
|
3085
|
+
title: de.value
|
|
3086
|
+
}, null, 8, ["title"])) : N("", !0),
|
|
3087
|
+
I("div", An, [
|
|
3088
|
+
_(Me, { class: "sv-checkout__submit-skeleton min-h-10" }, {
|
|
3089
|
+
default: m(() => [
|
|
3090
|
+
e(D) ? (i(), P(e(Ie), {
|
|
3091
|
+
key: 0,
|
|
3092
|
+
type: "button",
|
|
3093
|
+
size: "md",
|
|
3094
|
+
class: "sv-action sv-action--primary sv-action--full-width sv-checkout__submit w-full",
|
|
3095
|
+
disabled: !dt.value || e(Lt) || e(H) || e(te) || ke.value || le.value.length === 0 || we.value || Ke.value,
|
|
3096
|
+
loading: we.value,
|
|
3097
|
+
onClick: va
|
|
3098
|
+
}, {
|
|
3099
|
+
default: m(() => [
|
|
3100
|
+
O(M(ya.value ? e(o)({
|
|
3101
|
+
defaultMessage: "Start trial",
|
|
3102
|
+
id: "checkout.pay_and_subscribe_button_trial.label",
|
|
3103
|
+
description: "The label of the start trial button in the checkout form"
|
|
3104
|
+
}) : e(o)({
|
|
3105
|
+
defaultMessage: "Pay and subscribe",
|
|
3106
|
+
id: "checkout.pay_and_subscribe_button.label",
|
|
3107
|
+
description: "The label of the pay and subscribe button in the checkout form"
|
|
3108
|
+
})), 1)
|
|
3109
|
+
]),
|
|
3110
|
+
_: 1
|
|
3111
|
+
}, 8, ["disabled", "loading"])) : N("", !0)
|
|
3112
|
+
]),
|
|
3113
|
+
_: 1
|
|
3114
|
+
}),
|
|
3115
|
+
e(ye) ? (i(), P(e(Y), {
|
|
3116
|
+
key: 0,
|
|
3117
|
+
tag: "div",
|
|
3118
|
+
variant: "body-xs",
|
|
3119
|
+
class: "sv-checkout__cancel text-center"
|
|
3120
|
+
}, {
|
|
3121
|
+
default: m(() => [
|
|
3122
|
+
I("a", {
|
|
3123
|
+
href: e(ye),
|
|
3124
|
+
class: "text-primary-900 hover:underline"
|
|
3125
|
+
}, M(wt.value ? e(o)(
|
|
3126
|
+
{
|
|
3127
|
+
defaultMessage: "Cancel and return to {name}",
|
|
3128
|
+
id: "checkout.cancel_link_to",
|
|
3129
|
+
description: "The link under the pay button that leaves the checkout without paying and goes back to the shop named by the seller"
|
|
3130
|
+
},
|
|
3131
|
+
{ name: wt.value }
|
|
3132
|
+
) : e(o)({
|
|
3133
|
+
defaultMessage: "Cancel and return",
|
|
3134
|
+
id: "checkout.cancel_link",
|
|
3135
|
+
description: "The link under the pay button that leaves the checkout without paying and goes back to the shop"
|
|
3136
|
+
})), 9, wn)
|
|
3137
|
+
]),
|
|
3138
|
+
_: 1
|
|
3139
|
+
})) : N("", !0),
|
|
3140
|
+
_(Go, { "payment-method-options": le.value }, null, 8, ["payment-method-options"]),
|
|
3141
|
+
V.value ? (i(), P(e(Y), {
|
|
3142
|
+
key: 1,
|
|
3143
|
+
tag: "div",
|
|
3144
|
+
variant: "body-xs",
|
|
3145
|
+
color: "subtle",
|
|
3146
|
+
class: "sv-checkout__terms px-4 text-center"
|
|
3147
|
+
}, {
|
|
3148
|
+
default: m(() => [
|
|
3149
|
+
_(Zi, { source: V.value }, null, 8, ["source"])
|
|
3150
|
+
]),
|
|
3151
|
+
_: 1
|
|
3152
|
+
})) : N("", !0)
|
|
3153
|
+
])
|
|
3154
|
+
], 64))
|
|
3155
|
+
]),
|
|
3156
|
+
_: 1
|
|
3157
|
+
}, 8, ["class"]));
|
|
3158
|
+
}
|
|
3159
|
+
});
|
|
3160
|
+
function Cn() {
|
|
3161
|
+
return {
|
|
3162
|
+
/**
|
|
3163
|
+
* Get geolocation information from the user
|
|
3164
|
+
*/
|
|
3165
|
+
getGeoLocation() {
|
|
3166
|
+
return fetch("https://api.country.is/").then((t) => t.json());
|
|
3167
|
+
}
|
|
3168
|
+
};
|
|
3169
|
+
}
|
|
3170
|
+
function hs({
|
|
3171
|
+
initialState: t,
|
|
3172
|
+
onRequiredFieldChange: r,
|
|
3173
|
+
isShippingAddressRequired: n,
|
|
3174
|
+
display: h,
|
|
3175
|
+
alsoRequired: a,
|
|
3176
|
+
guessCountry: L = !0
|
|
3177
|
+
}) {
|
|
3178
|
+
const C = u(() => nt(n) ?? !1), o = Q(Fe(t)), T = Q(Fe(t));
|
|
3179
|
+
C.value && !o.value.shippingCountry && (o.value.shippingCountry = o.value.country, T.value.shippingCountry = o.value.country);
|
|
3180
|
+
const b = (d) => {
|
|
3181
|
+
const j = Fe({ ...qa(o.value), ...d });
|
|
3182
|
+
o.value = j, T.value = structuredClone(j);
|
|
3183
|
+
}, { formatOf: f } = Qa({
|
|
3184
|
+
isNeeded: () => C.value,
|
|
3185
|
+
countries: [() => o.value.shippingCountry, () => o.value.country]
|
|
3186
|
+
}), V = u(() => f(o.value.shippingCountry)), B = u(
|
|
3187
|
+
() => C.value && !o.value.billingAddressSameAsShipping
|
|
3188
|
+
), U = u(
|
|
3189
|
+
() => B.value ? f(o.value.country) : void 0
|
|
3190
|
+
), w = u(() => {
|
|
3191
|
+
const d = o.value.type === "ORGANIZATION" ? [] : ["shippingLastName"];
|
|
3192
|
+
return [
|
|
3193
|
+
...eo(o.value.country),
|
|
3194
|
+
...C.value ? [
|
|
3195
|
+
...Gt(
|
|
3196
|
+
"SHIPPING",
|
|
3197
|
+
o.value.shippingCountry,
|
|
3198
|
+
V.value
|
|
3199
|
+
),
|
|
3200
|
+
"shippingPhoneNumber",
|
|
3201
|
+
...d
|
|
3202
|
+
] : [],
|
|
3203
|
+
...B.value ? Gt(
|
|
3204
|
+
"BILLING",
|
|
3205
|
+
o.value.country,
|
|
3206
|
+
U.value
|
|
3207
|
+
) : [],
|
|
3208
|
+
...nt(a) ?? []
|
|
3209
|
+
];
|
|
3210
|
+
}), A = (d) => w.value.includes(d), q = po(
|
|
3211
|
+
u(() => {
|
|
3212
|
+
const d = {
|
|
3213
|
+
...Ht("BILLING", () => U.value, A),
|
|
3214
|
+
...Ht("SHIPPING", () => V.value, A),
|
|
3215
|
+
email: { required: Jt, email: mo },
|
|
3216
|
+
country: { required: Jt },
|
|
3217
|
+
companyLegalName: {
|
|
3218
|
+
required: go(() => o.value.type === "ORGANIZATION")
|
|
3219
|
+
},
|
|
3220
|
+
companyRegistrationNumber: lt(
|
|
3221
|
+
A,
|
|
3222
|
+
"companyRegistrationNumber"
|
|
3223
|
+
),
|
|
3224
|
+
firstName: lt(A, "firstName"),
|
|
3225
|
+
lastName: lt(A, "lastName"),
|
|
3226
|
+
companyVatNumber: ao(o.value) ? { taxId: ro } : {},
|
|
3227
|
+
...to(A)
|
|
3228
|
+
}, j = nt(h);
|
|
3229
|
+
return j ? Object.fromEntries(
|
|
3230
|
+
Object.entries(d).map(([k, p]) => [
|
|
3231
|
+
k,
|
|
3232
|
+
ia(k) && la(j, k) !== "EDITABLE" ? {} : p
|
|
3233
|
+
])
|
|
3234
|
+
) : d;
|
|
3235
|
+
}),
|
|
3236
|
+
o
|
|
3237
|
+
), H = Cn(), te = async () => {
|
|
3238
|
+
try {
|
|
3239
|
+
const { country: d } = await H.getGeoLocation();
|
|
3240
|
+
if (typeof d != "string" || !io(d))
|
|
3241
|
+
return;
|
|
3242
|
+
o.value.country || (o.value.country = d), C.value && !o.value.shippingCountry && (o.value.shippingCountry = d);
|
|
3243
|
+
} catch {
|
|
3244
|
+
}
|
|
3245
|
+
}, ee = [
|
|
3246
|
+
"type",
|
|
3247
|
+
"companyVatNumber",
|
|
3248
|
+
"seatsValues",
|
|
3249
|
+
"unitsValues",
|
|
3250
|
+
"enabledPricingIds"
|
|
3251
|
+
], oe = (d) => ee.includes(d) || (C.value ? Kt("SHIPPING", o.value.shippingCountry) : Kt("BILLING", o.value.country)).includes(d), Z = () => JSON.parse(JSON.stringify(o.value));
|
|
3252
|
+
let c = Z();
|
|
3253
|
+
const $ = (d) => Object.keys(uo({ from: c, to: d })).filter(ia).some(oe);
|
|
3254
|
+
Pe(
|
|
3255
|
+
() => [
|
|
3256
|
+
C.value,
|
|
3257
|
+
o.value.billingAddressSameAsShipping,
|
|
3258
|
+
o.value.shippingAddressLine1,
|
|
3259
|
+
o.value.shippingAddressLine2,
|
|
3260
|
+
o.value.shippingPostalCode,
|
|
3261
|
+
o.value.shippingCity,
|
|
3262
|
+
o.value.shippingState,
|
|
3263
|
+
o.value.shippingCountry,
|
|
3264
|
+
V.value
|
|
3265
|
+
],
|
|
3266
|
+
() => {
|
|
3267
|
+
!C.value || !o.value.billingAddressSameAsShipping || Object.assign(
|
|
3268
|
+
o.value,
|
|
3269
|
+
oo(o.value, V.value)
|
|
3270
|
+
);
|
|
3271
|
+
},
|
|
3272
|
+
{ immediate: !0 }
|
|
3273
|
+
);
|
|
3274
|
+
const R = Q(!1), D = (d) => {
|
|
3275
|
+
const j = $(d);
|
|
3276
|
+
c = d, R.value = !1, j && r(d);
|
|
3277
|
+
};
|
|
3278
|
+
Pe(
|
|
3279
|
+
Z,
|
|
3280
|
+
(d) => {
|
|
3281
|
+
R.value = $(d);
|
|
3282
|
+
},
|
|
3283
|
+
{ flush: "sync" }
|
|
3284
|
+
);
|
|
3285
|
+
const z = () => {
|
|
3286
|
+
R.value && D(Z());
|
|
3287
|
+
};
|
|
3288
|
+
return L && Fa() && na(() => {
|
|
3289
|
+
t != null && t.country || te();
|
|
3290
|
+
}), Ho(Z, D, { debounce: 200 }), {
|
|
3291
|
+
form: o,
|
|
3292
|
+
validation: q,
|
|
3293
|
+
getIsFieldRequired: A,
|
|
3294
|
+
shippingAddressFormat: V,
|
|
3295
|
+
updateInitialState: b,
|
|
3296
|
+
initialState: T,
|
|
3297
|
+
isPreviewStale: R,
|
|
3298
|
+
flushPreviewChange: z
|
|
3299
|
+
};
|
|
3300
|
+
}
|
|
3301
|
+
function ia(t) {
|
|
3302
|
+
return t in Fe();
|
|
3303
|
+
}
|
|
3304
|
+
export {
|
|
3305
|
+
Wo as _,
|
|
3306
|
+
vs as a,
|
|
3307
|
+
Ci as b,
|
|
3308
|
+
hs as u,
|
|
3309
|
+
gs as w
|
|
3310
|
+
};
|