@solvimon/solvimon-web 0.1.0-alpha.31 → 0.1.0-alpha.32
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/{AddPaymentMethodModal-Bs_aOOCX.mjs → AddPaymentMethodModal-Cx203VXo.mjs} +4 -4
- package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DF4PIR-A.mjs → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-BMHhLZnu.mjs} +2 -2
- package/dist/{Alert.vue.es-xhsk_7Gn.mjs → Alert.vue.es-DHJpiSdR.mjs} +1 -1
- package/dist/{Amount.vue.es-DPqHB8Xd.mjs → Amount.vue.es-CofcgmXt.mjs} +1 -1
- package/dist/{AuthProvider.handle-CUO6Qj-5.mjs → AuthProvider.handle-BpFblzFx.mjs} +1 -1
- package/dist/{Avatar.vue.es-DrbtUiLO.mjs → Avatar.vue.es-CJdXXOiG.mjs} +1 -1
- package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-C3JYNZuR.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-BD84aBiU.mjs} +4 -4
- package/dist/{BillingInformationForm.vue_vue_type_script_setup_true_lang-BUdcXy0H.mjs → BillingInformationForm.vue_vue_type_script_setup_true_lang-F5OVG0kO.mjs} +7 -7
- package/dist/{BillingInformationModal-crgTNGf4.mjs → BillingInformationModal-Do3Fuu8A.mjs} +3 -3
- package/dist/{Button.vue.es-BHbanjR0.mjs → Button.vue.es-CW7XfMBF.mjs} +1 -1
- package/dist/{ChargeOnDemandModal-DYiFtw1n.mjs → ChargeOnDemandModal-B4ShPKLS.mjs} +17 -17
- package/dist/{Chip.vue.es-Dc6-PjEn.mjs → Chip.vue.es-CYwWHyAT.mjs} +2 -2
- package/dist/{taxId.es-Zu2Ff1gL.mjs → CompanyPurchaseToggle.vue_vue_type_script_setup_true_lang-CVXHCSPb.mjs} +226 -226
- package/dist/{Comparators.vue.es-DQBI3f7m.mjs → Comparators.vue.es-DYrKlE8t.mjs} +1 -1
- package/dist/{ContextMenu.vue.es-CvX6O2IM.mjs → ContextMenu.vue.es-EXTx0NEt.mjs} +4 -4
- package/dist/{CustomerBillingInformation.vue.es-DQWt9osz.mjs → CustomerBillingInformation.vue.es-CSKG6V3T.mjs} +2 -2
- package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-hNVtamwL.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DZZuAHIE.mjs} +5 -5
- package/dist/{CustomerShippingAddresses-C0c-4D2W.mjs → CustomerShippingAddresses-Bdy4XWjE.mjs} +9 -9
- package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-C50vGUvw.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BEKwWob_.mjs} +1361 -1065
- package/dist/{DividerText.vue.es-ChN6fnrH.mjs → DividerText.vue.es-Dq0JzI8C.mjs} +1 -1
- package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-DCUml1W4.mjs → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-3gf8pvR7.mjs} +3 -3
- package/dist/{ErrorNotification.vue.es-CWIVt5q9.mjs → ErrorNotification.vue.es-Cw7fqCg1.mjs} +2 -2
- package/dist/{FormMessage.vue.es-CQ64C8dt.mjs → FormMessage.vue.es-MrzQoSae.mjs} +1 -1
- package/dist/{IconButton.vue.es-BXzwMvVk.mjs → IconButton.vue.es-CpQbFw0x.mjs} +2 -2
- package/dist/{IconTitle.vue.es-GyanM-JQ.mjs → IconTitle.vue.es-CcOIFjbE.mjs} +3 -3
- package/dist/{Input.vue.es-CxiwRZYs.mjs → Input.vue.es-Cd55vQri.mjs} +4 -4
- package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Ca0qflBR.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-CqkGCbvg.mjs} +2 -2
- package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-Dw73a5Yt.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-BUu5M_gx.mjs} +4 -4
- package/dist/{InvoicePreview.vue.es-BvnikfEH.mjs → InvoicePreview.vue.es-DHh5wruk.mjs} +5 -5
- package/dist/{InvoicePricingClauseChip.vue.es-DxcyTRGr.mjs → InvoicePricingClauseChip.vue.es-ZSOBp1se.mjs} +4 -4
- package/dist/{Label.vue.es-3ACRco55.mjs → Label.vue.es-CB6G8Krh.mjs} +3 -3
- package/dist/{LoadFailedNotice.vue_vue_type_script_setup_true_lang-1qpRh-0S.mjs → LoadFailedNotice.vue_vue_type_script_setup_true_lang-BZCtO2Er.mjs} +2 -2
- package/dist/{Modal.vue.es-CDjfZDDx.mjs → Modal.vue.es-CJFTVFSZ.mjs} +5 -5
- package/dist/{OrderSummaryInvoice.vue_vue_type_script_setup_true_lang-CnZwxJ5b.mjs → OrderSummaryInvoice.vue_vue_type_script_setup_true_lang-D0pwpqIC.mjs} +8 -8
- package/dist/{PaymentCompletedCard.vue_vue_type_script_setup_true_lang-PICpXmC3.mjs → PaymentCompletedCard.vue_vue_type_script_setup_true_lang-D08Qpgb0.mjs} +2 -2
- package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-DpZtYBfM.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-dl52PYcq.mjs} +4 -4
- package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-Co5qBQa8.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-D0priVnA.mjs} +3 -3
- package/dist/{PaymentHistoryBlock-HUazLER6.mjs → PaymentHistoryBlock-BSXlneqM.mjs} +1 -1
- package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DdmUoiet.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CXy0XGpn.mjs} +5 -5
- package/dist/{PaymentIntegrationForm-ZnIjTyda.mjs → PaymentIntegrationForm-Diua0GGJ.mjs} +1 -1
- package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DU5wu66t.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CLlm_Q2j.mjs} +3 -3
- package/dist/{PaymentIntegrationFormAdyen-sbw3AoKS.mjs → PaymentIntegrationFormAdyen-D4FP0Vj5.mjs} +9 -9
- package/dist/{PaymentIntegrationFormStripe-4JmKEwbS.mjs → PaymentIntegrationFormStripe-vFzF_sCJ.mjs} +8 -8
- package/dist/{PaymentMethod.vue.es-DAabE41t.mjs → PaymentMethod.vue.es-vs6SaZOh.mjs} +197 -149
- package/dist/{PaymentMethodForm-MmCUSJLE.mjs → PaymentMethodForm-Buhe0aRQ.mjs} +1 -1
- package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-DyiXLYRj.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-RPPdBw_e.mjs} +6 -6
- package/dist/{PaymentMethodSelector.vue_vue_type_script_setup_true_lang-Bv34aiZ6.mjs → PaymentMethodSelector.vue_vue_type_script_setup_true_lang-DprL5TR8.mjs} +7 -7
- package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-DZ2Z-RMv.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-BXbevI3r.mjs} +7 -7
- package/dist/{PaymentMethodsModal-CjpNw4kX.mjs → PaymentMethodsModal-CnJP9UKp.mjs} +6 -6
- package/dist/{PlanCustomizationEditor-BDWm_z2w.mjs → PlanCustomizationEditor-KHLSEUbb.mjs} +12 -12
- package/dist/{PortalLinkUnverified-B7YYhv97.mjs → PortalLinkUnverified-DlZAkE93.mjs} +3 -3
- package/dist/{PortalNotAvailable-DIyeKrAp.mjs → PortalNotAvailable-CKIomNrm.mjs} +2 -2
- package/dist/{PricingGroupRangeInput.vue.es-C6J8C7JS.mjs → PricingGroupRangeInput.vue.es-oHD-IT12.mjs} +8 -8
- package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-CiQ-C9Hh.mjs → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-wCW8YZHM.mjs} +9 -9
- package/dist/{RadioGroupExtended.vue.es-hDmUAKIA.mjs → RadioGroupExtended.vue.es-DsShmkKZ.mjs} +4 -4
- package/dist/Section.vue.es-DYmEtgBj.mjs +88 -0
- package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Gn1aE60E.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-CANXYTzu.mjs} +2 -2
- package/dist/{ShippingAddressForm.vue_vue_type_script_setup_true_lang-y7yOKwR3.mjs → ShippingAddressForm.vue_vue_type_script_setup_true_lang-CJp6ddhZ.mjs} +4 -4
- package/dist/{ShippingAddressesModal-CNXxkxnJ.mjs → ShippingAddressesModal-Gxv2KxaW.mjs} +9 -9
- package/dist/{StepInput.vue.es-GkrOtOVa.mjs → StepInput.vue.es-sqA-VSsn.mjs} +4 -4
- package/dist/{SubscriptionCancellationModal-C_xFPx1I.mjs → SubscriptionCancellationModal-DfAZ_uW6.mjs} +1 -1
- package/dist/{SubscriptionCancellationModal.vue_vue_type_script_setup_true_lang-DdTC33Qh.mjs → SubscriptionCancellationModal.vue_vue_type_script_setup_true_lang-BlbiDNIu.mjs} +7 -7
- package/dist/{SubscriptionCancellationSuccess.vue_vue_type_script_setup_true_lang-CQ-ZOzVI.mjs → SubscriptionCancellationSuccess.vue_vue_type_script_setup_true_lang-C1ko2xvR.mjs} +2 -2
- package/dist/{SubscriptionDetails.entry.ce-DuP8TtKu.mjs → SubscriptionDetails.entry.ce-CdWV-8WN.mjs} +23 -23
- package/dist/{SubscriptionSchedules-DosBeXD7.mjs → SubscriptionSchedules-BfdVn1XA.mjs} +1 -1
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-C8q8Q6h5.mjs +5413 -0
- package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-C26HShPu.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-qQ9gJOIs.mjs} +3 -3
- package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-BUDuQk2e.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-DYWjTzPV.mjs} +9 -9
- package/dist/{TooltipParagraph.vue.es-4HaXi8RP.mjs → TooltipParagraph.vue.es-Bt-7LHr3.mjs} +1 -1
- package/dist/{TranslationOverride.vue_vue_type_script_setup_true_lang-C5Y6Kg-_.mjs → TranslationOverride.vue_vue_type_script_setup_true_lang-Cp_sFa52.mjs} +1 -1
- package/dist/{TrialChip.vue.es-CUfJ4SK3.mjs → TrialChip.vue.es-VZwQX079.mjs} +3 -3
- package/dist/{addonQuantity-BvoYTajN.mjs → addonQuantity-D3bGVqjL.mjs} +2 -2
- package/dist/{adyen-D4em6EgU.mjs → adyen-CHgq2l6n.mjs} +1 -1
- package/dist/components/BillingInformation/BillingInformation.mjs +5 -5
- package/dist/components/BillingInformationForm/BillingInformationForm.mjs +4 -4
- package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +4 -4
- package/dist/components/Invoice/Invoice.mjs +1084 -1016
- package/dist/components/InvoiceDetails/InvoiceDetails.mjs +4 -4
- package/dist/components/InvoiceHeader/InvoiceHeader.mjs +2 -2
- package/dist/components/InvoicesList/InvoicesList.mjs +3 -3
- package/dist/components/PaymentHistory/PaymentHistory.mjs +4 -4
- package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +5 -5
- package/dist/components/ShippingAddressForm/ShippingAddressForm.mjs +9 -9
- package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +5 -5
- package/dist/components/SubscriptionsList/SubscriptionsList.mjs +5 -5
- package/dist/components/WalletBalances/WalletBalances.mjs +3 -3
- package/dist/{customElements-d7Bhfqi_.mjs → customElements-B8c354Nu.mjs} +376 -369
- package/dist/{customer-CNCSN_G5.mjs → customer-CP-Wz7JO.mjs} +1 -1
- package/dist/{de-DE-wZp39RC-.mjs → de-DE-C9HrzHpE.mjs} +3 -0
- package/dist/{de-DE-D-sV3avS.mjs → de-DE-DAQmgEy5.mjs} +75 -15
- package/dist/{formControl-BZQLHnOO.mjs → formControl-C18sw44K.mjs} +275 -275
- package/dist/{formatting.es-RclXHhKo.mjs → formatting.es-DlJEzreG.mjs} +16 -13
- package/dist/{fr-FR-BrNXJ7gR.mjs → fr-FR-CHR3VWvd.mjs} +3 -0
- package/dist/{fr-FR-BYHycSxz.mjs → fr-FR-fz51-Ubw.mjs} +76 -16
- package/dist/icon-sprite.svg.es-2S3rv8NW.mjs +4 -0
- package/dist/{index.es-BEZ2mumY.mjs → index.es-Bv55VtdE.mjs} +8 -8
- package/dist/index.mjs +1 -1
- package/dist/{invoices-CXvL8KQx.mjs → invoices-I7PghcPV.mjs} +1 -1
- package/dist/{it-IT-zpPyT9PH.mjs → it-IT-BpCkTMZL.mjs} +68 -8
- package/dist/{it-IT-Bd1qsMVU.mjs → it-IT-Dzc7DmmL.mjs} +3 -0
- package/dist/{nl-NL-BOr4MR7L.mjs → nl-NL-22C8OcIM.mjs} +72 -12
- package/dist/{nl-NL-C6Y6fqaW.mjs → nl-NL-Dut_QwsY.mjs} +3 -0
- package/dist/{paymentIntegrationFormLoaders-wi1vMgf_.mjs → paymentIntegrationFormLoaders-BFMAMpcA.mjs} +3 -3
- package/dist/{paymentMethods-CG1fcG2v.mjs → paymentMethods-aGKIi7DS.mjs} +1 -1
- package/dist/{paymentOutcome-D59QkGfm.mjs → paymentOutcome-Cv7hTFVu.mjs} +1 -1
- package/dist/{payments-Dy81gmkC.mjs → payments-BKoKpoLN.mjs} +1 -1
- package/dist/{preloadPaymentIntegrationForms-C_9p7Jbi.mjs → preloadPaymentIntegrationForms-Buwal_JR.mjs} +1 -1
- package/dist/{pricing-CBJT8C6L.mjs → pricing-Y-7ELzN-.mjs} +1 -1
- package/dist/{pricingItem.es-AYq_hYeD.mjs → pricingItem.es-BafitMMY.mjs} +1 -1
- package/dist/{pricingPlanScheduleOverrides-GON_34ep.mjs → pricingPlanScheduleOverrides-CGm_-jJq.mjs} +1 -1
- package/dist/screens/Checkout/Checkout.mjs +12 -12
- package/dist/screens/CheckoutSession/CheckoutSession.mjs +650 -644
- package/dist/screens/CustomerOverview/CustomerOverview.mjs +17 -17
- package/dist/screens/PayInvoice/PayInvoice.mjs +22 -22
- package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +10 -10
- package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +2 -2
- package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +29 -29
- package/dist/{subscriptions-Bm1eu9wc.mjs → subscriptions-B7dNqi1C.mjs} +1 -1
- package/dist/types/components/wallets/AutoTopUpModal/AutoTopUpModal.types.d.ts +3 -1
- package/dist/types/types/checkoutSession.d.ts +11 -1
- package/dist/{useActionDispatchProvider-BWna0S6N.mjs → useActionDispatchProvider-BCtk-FGU.mjs} +1 -1
- package/dist/{useAddressFormats-Dw7IEdxg.mjs → useAddressFormats-CtE4QaVU.mjs} +51 -50
- package/dist/{useCheckoutForm-BaV2j_ob.mjs → useCheckoutForm-BhXcmnUi.mjs} +1467 -1422
- package/dist/{useCustomer-RUtEzDOY.mjs → useCustomer-mQysxUwp.mjs} +2 -2
- package/dist/{useExperimentalFeature-DAKAF_a2.mjs → useExperimentalFeature-Bw6bBtay.mjs} +1 -1
- package/dist/{useHostEvent-pjoWJ7ZH.mjs → useHostEvent-MtRG6W2B.mjs} +1 -1
- package/dist/{useIncrementalLoading-B3gp58X-.mjs → useIncrementalLoading-CJSj1945.mjs} +1 -1
- package/dist/{useInvoiceData-Dya4mmvf.mjs → useInvoiceData-BEZIvw32.mjs} +2 -2
- package/dist/{useInvoicesList-Dp3c_cb3.mjs → useInvoicesList-CrXjsmei.mjs} +140 -138
- package/dist/{sorting.es-kM0f1VX0.mjs → useIsMounted.es-BNPhTTHE.mjs} +11 -10
- package/dist/{useLoadInitialData-CwySdYZM.mjs → useLoadInitialData-Bomj_1mo.mjs} +1 -1
- package/dist/{usePaymentMethodAvailability-B7NV0ZtX.mjs → usePaymentMethodAvailability-DR_neLeZ.mjs} +4 -4
- package/dist/{usePaymentMethodOptions-DDRjVvDJ.mjs → usePaymentMethodOptions-CuHoQx3K.mjs} +2 -2
- package/dist/{usePaymentMethods-DBGyQA_I.mjs → usePaymentMethods-BDdetXts.mjs} +2 -2
- package/dist/{usePayments-ChGtK_As.mjs → usePayments-B5Z9Kfbv.mjs} +19 -17
- package/dist/{usePortal--Uzbpbgr.mjs → usePortal-DuLR5Mid.mjs} +1 -1
- package/dist/{useService-DayNZhPh.mjs → useService-2aOFBTxU.mjs} +1 -1
- package/dist/{useShippingAddresses-TXVeGFPm.mjs → useShippingAddresses-BvThNpez.mjs} +1 -1
- package/dist/{useSubscription-lIGMFLG1.mjs → useSubscription-Dzo-kBpQ.mjs} +2 -2
- package/dist/{useSubscriptionActions-BSlJVB4p.mjs → useSubscriptionActions-CWaNRoZ7.mjs} +1 -1
- package/dist/{wallets.es-eH2C2ygn.mjs → wallets.es-DRlUVd2R.mjs} +1 -1
- package/package.json +31 -8
- package/dist/Section.vue.es-CwKTCeZ1.mjs +0 -72
- package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-5tyDFxEh.mjs +0 -5183
- package/dist/icon-sprite.svg.es-BWBB8SGw.mjs +0 -4
|
@@ -1,29 +1,29 @@
|
|
|
1
|
-
import { shallowRef as
|
|
2
|
-
import { u as
|
|
3
|
-
import { D as ks, h as Cs, g as _t } from "../../useAddressFormats-
|
|
4
|
-
import { u as bs } from "../../useHostEvent-
|
|
5
|
-
import { u as
|
|
1
|
+
import { shallowRef as q, ref as P, computed as p, effectScope as rs, reactive as lt, onScopeDispose as us, watch as ee, onMounted as ls, defineComponent as xe, openBlock as R, createElementBlock as ds, createElementVNode as ps, createVNode as bt, unref as w, withCtx as ce, createTextVNode as dt, toDisplayString as pt, createBlock as $, mergeProps as ms, createCommentVNode as _s } from "vue";
|
|
2
|
+
import { u as vs, c as fs, b as hs, E as gs, e as It, a as Nt, L as ys, f as A, d as mt, j as Es, k as Ss, l as Os } from "../../customElements-B8c354Nu.mjs";
|
|
3
|
+
import { D as ks, h as Cs, g as _t } from "../../useAddressFormats-CtE4QaVU.mjs";
|
|
4
|
+
import { u as bs } from "../../useHostEvent-MtRG6W2B.mjs";
|
|
5
|
+
import { u as Is, _ as Pt, a as Ns } from "../../useCheckoutForm-BhXcmnUi.mjs";
|
|
6
6
|
import { u as Ps } from "../../useWatchDebounced-DkXgKe0E.mjs";
|
|
7
|
-
import { u as ws } from "../../usePaymentMethodOptions-
|
|
8
|
-
import {
|
|
9
|
-
import { j as
|
|
10
|
-
import { s as Ms } from "../../OrderSummaryInvoice.vue_vue_type_script_setup_true_lang-
|
|
11
|
-
import { b as
|
|
12
|
-
const
|
|
13
|
-
function
|
|
14
|
-
var
|
|
15
|
-
if (!
|
|
16
|
-
const
|
|
7
|
+
import { u as ws } from "../../usePaymentMethodOptions-CuHoQx3K.mjs";
|
|
8
|
+
import { w as Ts } from "../../api.es-QaC926Xu.mjs";
|
|
9
|
+
import { j as xs, c as Ds } from "../../subscription-DQ5mRp_e.mjs";
|
|
10
|
+
import { s as Ms } from "../../OrderSummaryInvoice.vue_vue_type_script_setup_true_lang-D0pwpqIC.mjs";
|
|
11
|
+
import { b as vt, s as Ls } from "../../paymentRedirect-DaS8Kccc.mjs";
|
|
12
|
+
const wt = ["line1", "line2", "city", "state", "postal_code", "country"], As = (s) => Cs(s);
|
|
13
|
+
function ae(s) {
|
|
14
|
+
var v, y, S, C, m, I;
|
|
15
|
+
if (!s) return {};
|
|
16
|
+
const n = s.type === "ORGANIZATION" ? (v = s.organization) == null ? void 0 : v.registered_address : (y = s.individual) == null ? void 0 : y.residential_address, a = (S = s.individual) == null ? void 0 : S.name, c = s.organization, u = (m = (C = c == null ? void 0 : c.tax_ids) == null ? void 0 : C[0]) == null ? void 0 : m.id, l = n == null ? void 0 : n.country;
|
|
17
17
|
return {
|
|
18
|
-
type:
|
|
19
|
-
...
|
|
20
|
-
...((
|
|
21
|
-
companyLegalName:
|
|
18
|
+
type: s.type,
|
|
19
|
+
...s.email && { email: s.email },
|
|
20
|
+
...((I = s.organization) == null ? void 0 : I.legal_name) && {
|
|
21
|
+
companyLegalName: s.organization.legal_name
|
|
22
22
|
},
|
|
23
23
|
...(a == null ? void 0 : a.first_name) && { firstName: a.first_name },
|
|
24
24
|
...(a == null ? void 0 : a.infix) && { infix: a.infix },
|
|
25
25
|
...(a == null ? void 0 : a.last_name) && { lastName: a.last_name },
|
|
26
|
-
...
|
|
26
|
+
...u && { companyVatNumber: u },
|
|
27
27
|
...(c == null ? void 0 : c.registration_number) && {
|
|
28
28
|
companyRegistrationNumber: c.registration_number
|
|
29
29
|
},
|
|
@@ -31,22 +31,22 @@ function ce(n) {
|
|
|
31
31
|
taxExempt: c.tax_exempt
|
|
32
32
|
},
|
|
33
33
|
...(c == null ? void 0 : c.tax_exempt_note) && { taxExemptNote: c.tax_exempt_note },
|
|
34
|
-
...(
|
|
35
|
-
...(
|
|
36
|
-
...(
|
|
37
|
-
...(
|
|
38
|
-
...(
|
|
39
|
-
...
|
|
34
|
+
...(n == null ? void 0 : n.line1) && { addressLine1: n.line1 },
|
|
35
|
+
...(n == null ? void 0 : n.line2) && { addressLine2: n.line2 },
|
|
36
|
+
...(n == null ? void 0 : n.postal_code) && { postalCode: n.postal_code },
|
|
37
|
+
...(n == null ? void 0 : n.city) && { city: n.city },
|
|
38
|
+
...(n == null ? void 0 : n.state) && { state: n.state },
|
|
39
|
+
...l && As(l) && { country: l }
|
|
40
40
|
};
|
|
41
41
|
}
|
|
42
|
-
const
|
|
42
|
+
const Ne = {
|
|
43
43
|
line1: "addressLine1",
|
|
44
44
|
line2: "addressLine2",
|
|
45
45
|
city: "city",
|
|
46
46
|
postal_code: "postalCode",
|
|
47
47
|
state: "state",
|
|
48
48
|
country: "country"
|
|
49
|
-
},
|
|
49
|
+
}, Tt = ["first_name", "infix", "last_name"], Pe = {
|
|
50
50
|
first_name: "firstName",
|
|
51
51
|
infix: "infix",
|
|
52
52
|
last_name: "lastName"
|
|
@@ -58,139 +58,139 @@ const Pe = {
|
|
|
58
58
|
"organization.tax_ids": ["companyVatNumber"],
|
|
59
59
|
"individual.name": ["firstName", "lastName"],
|
|
60
60
|
...Object.fromEntries(
|
|
61
|
-
|
|
61
|
+
Tt.map((s) => [`individual.name.${s}`, [Pe[s]]])
|
|
62
62
|
),
|
|
63
63
|
...Object.fromEntries(
|
|
64
64
|
["organization.registered_address", "individual.residential_address"].flatMap(
|
|
65
|
-
(
|
|
65
|
+
(s) => wt.map((n) => [`${s}.${n}`, [Ne[n]]])
|
|
66
66
|
)
|
|
67
67
|
)
|
|
68
68
|
};
|
|
69
|
-
function Fs(
|
|
69
|
+
function Fs(s, n) {
|
|
70
70
|
var c;
|
|
71
|
-
const a = Array.from({ length:
|
|
72
|
-
for (const
|
|
73
|
-
const
|
|
74
|
-
|
|
71
|
+
const a = Array.from({ length: n }, () => []);
|
|
72
|
+
for (const u of s) {
|
|
73
|
+
const l = /^checkout_session\.customers\.(\d+)\.customer\.(.+)$/.exec(u), v = l && Rs[l[2]];
|
|
74
|
+
v && ((c = a[Number(l[1])]) == null || c.push(...v));
|
|
75
75
|
}
|
|
76
76
|
return a;
|
|
77
77
|
}
|
|
78
|
-
const
|
|
79
|
-
function Us(
|
|
80
|
-
const
|
|
81
|
-
const
|
|
82
|
-
if (!(!
|
|
83
|
-
return
|
|
84
|
-
},
|
|
78
|
+
const re = (s) => (s == null ? void 0 : s.trim()) || void 0;
|
|
79
|
+
function Us(s, n, a, c = () => !1) {
|
|
80
|
+
const u = ae(n), l = [], v = (O, k) => a[O] === "EDITABLE" && !k.some(c), y = (O) => {
|
|
81
|
+
const k = re(s[O]);
|
|
82
|
+
if (!(!k || k === re(u[O])))
|
|
83
|
+
return l.push(O), k;
|
|
84
|
+
}, S = () => {
|
|
85
85
|
const O = {};
|
|
86
|
-
for (const
|
|
87
|
-
const
|
|
88
|
-
|
|
86
|
+
for (const k of wt) {
|
|
87
|
+
const T = y(Ne[k]);
|
|
88
|
+
T && (O[k] = T);
|
|
89
89
|
}
|
|
90
90
|
return Object.keys(O).length ? O : void 0;
|
|
91
|
-
},
|
|
91
|
+
}, C = () => {
|
|
92
92
|
const O = {};
|
|
93
|
-
for (const
|
|
94
|
-
const
|
|
95
|
-
|
|
93
|
+
for (const k of Tt) {
|
|
94
|
+
const T = y(Pe[k]);
|
|
95
|
+
T && (O[k] = T);
|
|
96
96
|
}
|
|
97
97
|
return Object.keys(O).length ? O : void 0;
|
|
98
|
-
},
|
|
99
|
-
|
|
100
|
-
const
|
|
101
|
-
if (
|
|
102
|
-
const O =
|
|
103
|
-
(O ||
|
|
98
|
+
}, m = {}, I = v("email", ["email"]) ? y("email") : void 0;
|
|
99
|
+
I && (m.email = I);
|
|
100
|
+
const M = v("address", Object.values(Ne)) ? S() : void 0;
|
|
101
|
+
if (n.type === "INDIVIDUAL") {
|
|
102
|
+
const O = v("customer_details", Object.values(Pe)) ? C() : void 0;
|
|
103
|
+
(O || M) && (m.individual = {
|
|
104
104
|
...O && { name: O },
|
|
105
|
-
...
|
|
105
|
+
...M && { residential_address: M }
|
|
106
106
|
});
|
|
107
107
|
} else {
|
|
108
|
-
const O =
|
|
109
|
-
|
|
110
|
-
const
|
|
111
|
-
|
|
112
|
-
const
|
|
108
|
+
const O = v("customer_details", ["companyLegalName"]) ? y("companyLegalName") : void 0, k = v("customer_details", ["companyRegistrationNumber"]) ? y("companyRegistrationNumber") : void 0, T = v("tax_ids", ["companyVatNumber"]) ? $s(s.companyVatNumber, n) : void 0;
|
|
109
|
+
T !== void 0 && l.push("companyVatNumber");
|
|
110
|
+
const z = v("tax_ids", []) && !!s.taxExempt != !!u.taxExempt ? !!s.taxExempt : void 0;
|
|
111
|
+
z !== void 0 && l.push("taxExempt");
|
|
112
|
+
const X = v("tax_ids", ["taxExemptNote"]) && s.taxExempt ? y("taxExemptNote") : void 0, N = {
|
|
113
113
|
...O && { legal_name: O },
|
|
114
|
-
...
|
|
115
|
-
...
|
|
116
|
-
...
|
|
117
|
-
...
|
|
118
|
-
...
|
|
114
|
+
...k && { registration_number: k },
|
|
115
|
+
...M && { registered_address: M },
|
|
116
|
+
...T !== void 0 && { tax_ids: T },
|
|
117
|
+
...z !== void 0 && { tax_exempt: z },
|
|
118
|
+
...X && { tax_exempt_note: X }
|
|
119
119
|
};
|
|
120
|
-
Object.keys(
|
|
120
|
+
Object.keys(N).length && (m.organization = N);
|
|
121
121
|
}
|
|
122
|
-
return Object.keys(
|
|
122
|
+
return Object.keys(m).length ? { patch: m, fields: l } : void 0;
|
|
123
123
|
}
|
|
124
|
-
function $s(
|
|
125
|
-
var
|
|
126
|
-
const a = ((
|
|
127
|
-
if (c ===
|
|
128
|
-
const [
|
|
129
|
-
return
|
|
124
|
+
function $s(s, n) {
|
|
125
|
+
var y, S;
|
|
126
|
+
const a = ((y = n.organization) == null ? void 0 : y.tax_ids) ?? [], c = re(s);
|
|
127
|
+
if (c === re((S = a[0]) == null ? void 0 : S.id)) return;
|
|
128
|
+
const [u, ...l] = a.map(({ id: C, type: m }) => ({ id: C, type: m })), v = c ? [{ id: c, type: (u == null ? void 0 : u.type) ?? ks }, ...l] : l;
|
|
129
|
+
return v.length ? v : null;
|
|
130
130
|
}
|
|
131
|
-
function Vs(
|
|
132
|
-
var a, c,
|
|
133
|
-
return ((c = (a =
|
|
131
|
+
function Vs(s, n) {
|
|
132
|
+
var a, c, u, l;
|
|
133
|
+
return ((c = (a = s.pricing_plan_schedule_customizations) == null ? void 0 : a[0]) == null ? void 0 : c.pricing_plan_schedule_id) ?? ((l = (u = s.starting_values) == null ? void 0 : u[0]) == null ? void 0 : l.pricing_plan_schedule_id) ?? n;
|
|
134
134
|
}
|
|
135
|
-
function
|
|
136
|
-
var
|
|
137
|
-
const c = (
|
|
138
|
-
(
|
|
139
|
-
),
|
|
140
|
-
(
|
|
135
|
+
function ft(s, n, a) {
|
|
136
|
+
var v, y;
|
|
137
|
+
const c = (v = s.pricing_plan_schedule_customizations) == null ? void 0 : v.find(
|
|
138
|
+
(S) => S.pricing_plan_schedule_id === n
|
|
139
|
+
), u = (y = s.starting_values) == null ? void 0 : y.find(
|
|
140
|
+
(S) => S.pricing_plan_schedule_id === n
|
|
141
141
|
);
|
|
142
142
|
return [...new Map(
|
|
143
|
-
[...(
|
|
144
|
-
({ pricing_item_config_id:
|
|
143
|
+
[...(u == null ? void 0 : u[a]) ?? [], ...(c == null ? void 0 : c[a]) ?? []].map(
|
|
144
|
+
({ pricing_item_config_id: S, number: C }) => [S, C]
|
|
145
145
|
)
|
|
146
|
-
)].map(([
|
|
147
|
-
pricing_item_config_id:
|
|
148
|
-
number:
|
|
146
|
+
)].map(([S, C]) => ({
|
|
147
|
+
pricing_item_config_id: S,
|
|
148
|
+
number: C
|
|
149
149
|
}));
|
|
150
150
|
}
|
|
151
|
-
function
|
|
152
|
-
const a = (
|
|
153
|
-
({ pricing_item_config_id:
|
|
154
|
-
), c = (
|
|
155
|
-
pricing_item_config_id:
|
|
156
|
-
number: u
|
|
151
|
+
function ht(s, n) {
|
|
152
|
+
const a = (s ?? []).filter(
|
|
153
|
+
({ pricing_item_config_id: u }) => !n.some((l) => l.pricing_item_config_id === u)
|
|
154
|
+
), c = (u) => (s ?? []).map((l) => ({
|
|
155
|
+
pricing_item_config_id: l.pricing_item_config_id,
|
|
156
|
+
number: l[u].number
|
|
157
157
|
}));
|
|
158
158
|
return {
|
|
159
159
|
// Only what the buyer may change: a fixed quantity already shows in the order summary.
|
|
160
160
|
values: [
|
|
161
|
-
...
|
|
162
|
-
({ pricing_item_config_id:
|
|
163
|
-
(
|
|
161
|
+
...n.filter(
|
|
162
|
+
({ pricing_item_config_id: u }) => (s ?? []).some(
|
|
163
|
+
(l) => l.pricing_item_config_id === u
|
|
164
164
|
)
|
|
165
165
|
),
|
|
166
|
-
...a.map(({ pricing_item_config_id:
|
|
167
|
-
pricing_item_config_id:
|
|
168
|
-
number:
|
|
166
|
+
...a.map(({ pricing_item_config_id: u, min: l }) => ({
|
|
167
|
+
pricing_item_config_id: u,
|
|
168
|
+
number: l.number
|
|
169
169
|
}))
|
|
170
170
|
],
|
|
171
171
|
minimums: c("min"),
|
|
172
172
|
maximums: c("max")
|
|
173
173
|
};
|
|
174
174
|
}
|
|
175
|
-
const Hs = (
|
|
176
|
-
const c = Number(
|
|
177
|
-
return Number.isFinite(c) && (!a || Number.isInteger(c)) && c >= Number(
|
|
175
|
+
const Hs = (s, n, a) => {
|
|
176
|
+
const c = Number(s);
|
|
177
|
+
return Number.isFinite(c) && (!a || Number.isInteger(c)) && c >= Number(n.min.number) && c <= Number(n.max.number);
|
|
178
178
|
};
|
|
179
|
-
function
|
|
180
|
-
const
|
|
181
|
-
const
|
|
182
|
-
(
|
|
183
|
-
),
|
|
184
|
-
(
|
|
179
|
+
function gt(s, n, a, { wholeOnly: c }) {
|
|
180
|
+
const u = (s ?? []).filter(({ pricing_item_config_id: l, number: v }) => {
|
|
181
|
+
const y = n == null ? void 0 : n.find(
|
|
182
|
+
(C) => C.pricing_item_config_id === l
|
|
183
|
+
), S = a.find(
|
|
184
|
+
(C) => C.pricing_item_config_id === l
|
|
185
185
|
);
|
|
186
|
-
return !!
|
|
186
|
+
return !!y && Hs(v, y, c) && Number(v) !== Number(S == null ? void 0 : S.number);
|
|
187
187
|
});
|
|
188
|
-
return
|
|
188
|
+
return u.length ? u : void 0;
|
|
189
189
|
}
|
|
190
|
-
function
|
|
190
|
+
function yt(s, n) {
|
|
191
191
|
var a, c;
|
|
192
|
-
return (c = (a =
|
|
193
|
-
(
|
|
192
|
+
return (c = (a = s.pricing_plan_schedule_customizations) == null ? void 0 : a.find(
|
|
193
|
+
(u) => u.pricing_plan_schedule_id === n
|
|
194
194
|
)) == null ? void 0 : c.promotion_codes;
|
|
195
195
|
}
|
|
196
196
|
const js = ["email", "custom_fields", "individual", "organization"], zs = ["name", "residential_address"], Ks = ["first_name", "last_name", "infix"], Bs = ["line1", "line2", "city", "postal_code", "state", "country"], Ys = [
|
|
@@ -208,91 +208,95 @@ const js = ["email", "custom_fields", "individual", "organization"], zs = ["name
|
|
|
208
208
|
"units",
|
|
209
209
|
"promotion_codes"
|
|
210
210
|
];
|
|
211
|
-
function
|
|
211
|
+
function Z(s, n, a = []) {
|
|
212
212
|
const c = {};
|
|
213
|
-
for (const
|
|
214
|
-
const
|
|
215
|
-
|
|
213
|
+
for (const u of n) {
|
|
214
|
+
const l = s[u];
|
|
215
|
+
l === void 0 || l === null && !a.includes(u) || (c[u] = l);
|
|
216
216
|
}
|
|
217
217
|
return c;
|
|
218
218
|
}
|
|
219
|
-
const
|
|
220
|
-
const { individual:
|
|
219
|
+
const Et = (s) => Z(s, Bs), Ws = (s) => {
|
|
220
|
+
const { individual: n, organization: a, ...c } = Z(s, js, [
|
|
221
221
|
"custom_fields"
|
|
222
|
-
]),
|
|
222
|
+
]), u = n && Z(n, zs), l = a && Z(a, Ys, ["tax_ids", "tax_registrations"]);
|
|
223
223
|
return {
|
|
224
224
|
...c,
|
|
225
|
-
...
|
|
225
|
+
...u && {
|
|
226
226
|
individual: {
|
|
227
|
-
...
|
|
228
|
-
...
|
|
229
|
-
residential_address:
|
|
227
|
+
...u.name && { name: Z(u.name, Ks) },
|
|
228
|
+
...u.residential_address && {
|
|
229
|
+
residential_address: Et(u.residential_address)
|
|
230
230
|
}
|
|
231
231
|
}
|
|
232
232
|
},
|
|
233
|
-
...
|
|
233
|
+
...l && {
|
|
234
234
|
organization: {
|
|
235
|
-
...
|
|
236
|
-
...
|
|
237
|
-
registered_address:
|
|
235
|
+
...l,
|
|
236
|
+
...l.registered_address && {
|
|
237
|
+
registered_address: Et(l.registered_address)
|
|
238
238
|
},
|
|
239
239
|
// A stored id carries read-only keys, such as its validation result.
|
|
240
|
-
...
|
|
241
|
-
tax_ids:
|
|
240
|
+
...l.tax_ids && {
|
|
241
|
+
tax_ids: l.tax_ids.map(({ id: v, type: y }) => ({ id: v, type: y }))
|
|
242
242
|
}
|
|
243
243
|
}
|
|
244
244
|
}
|
|
245
245
|
};
|
|
246
|
-
}, qs = (
|
|
247
|
-
...
|
|
248
|
-
pricing_plan_schedule_id:
|
|
249
|
-
}),
|
|
250
|
-
const a = (
|
|
246
|
+
}, qs = (s) => ({
|
|
247
|
+
...Z(s, Gs, ["promotion_codes"]),
|
|
248
|
+
pricing_plan_schedule_id: s.pricing_plan_schedule_id
|
|
249
|
+
}), we = {}, St = (s, n) => {
|
|
250
|
+
const a = (s ?? []).map((c) => c ? n(c) : we);
|
|
251
251
|
for (; a.length && Object.keys(a[a.length - 1]).length === 0; ) a.pop();
|
|
252
252
|
return a.length ? a : void 0;
|
|
253
253
|
};
|
|
254
|
-
function Ie(
|
|
255
|
-
const a =
|
|
256
|
-
const
|
|
257
|
-
return Object.keys(
|
|
258
|
-
}), c =
|
|
259
|
-
|
|
260
|
-
(
|
|
254
|
+
function Ie(s, n) {
|
|
255
|
+
const a = St(n.customers, (u) => {
|
|
256
|
+
const l = Ws(u);
|
|
257
|
+
return Object.keys(l).length ? { customer: l } : we;
|
|
258
|
+
}), c = St(
|
|
259
|
+
n.pricing_plan_subscriptions,
|
|
260
|
+
(u) => u.length ? { pricing_plan_schedule_customizations: u.map(qs) } : we
|
|
261
261
|
);
|
|
262
262
|
return {
|
|
263
263
|
checkout_session: {
|
|
264
|
-
expected_version:
|
|
264
|
+
expected_version: s,
|
|
265
265
|
...a && { customers: a },
|
|
266
266
|
...c && { pricing_plan_subscriptions: c }
|
|
267
267
|
}
|
|
268
268
|
};
|
|
269
269
|
}
|
|
270
|
-
function Js(
|
|
271
|
-
return !
|
|
270
|
+
function Js(s) {
|
|
271
|
+
return !s.checkout_session.customers && !s.checkout_session.pricing_plan_subscriptions;
|
|
272
272
|
}
|
|
273
273
|
function Zs() {
|
|
274
|
-
const
|
|
274
|
+
const s = vs(), n = fs(), a = (c, ...u) => hs(s.apiUrls.transaction, "portal", "portal-urls", c, ...u);
|
|
275
275
|
return {
|
|
276
|
-
|
|
277
|
-
|
|
276
|
+
/** `expanded` adds each subscription's plan, which a session token can read only here. */
|
|
277
|
+
getCheckoutSession(c, { expanded: u = !1 } = {}) {
|
|
278
|
+
return n({
|
|
279
|
+
url: a(c),
|
|
280
|
+
...u && { query: Ts({ expandParams: gs, expand: !0 }) }
|
|
281
|
+
});
|
|
278
282
|
},
|
|
279
283
|
/** A stale `expected_version` or a refused promotion code is a 400 the caller handles. */
|
|
280
|
-
updateCheckoutSession(c,
|
|
281
|
-
return
|
|
284
|
+
updateCheckoutSession(c, u) {
|
|
285
|
+
return n({
|
|
282
286
|
url: a(c),
|
|
283
|
-
data:
|
|
287
|
+
data: u,
|
|
284
288
|
options: { method: "PATCH", expectedStatusCodes: [400] }
|
|
285
289
|
});
|
|
286
290
|
},
|
|
287
291
|
previewCheckoutSession(c) {
|
|
288
|
-
return
|
|
292
|
+
return n({
|
|
289
293
|
url: a(c, "preview"),
|
|
290
294
|
options: { method: "POST" }
|
|
291
295
|
});
|
|
292
296
|
}
|
|
293
297
|
};
|
|
294
298
|
}
|
|
295
|
-
const Xs = 400, Qs = 3,
|
|
299
|
+
const Xs = 400, Qs = 3, en = 250, Ot = [1e3, 2e3, 4e3, 8e3, 16e3], tn = "{CHECKOUT_SESSION_ID}", sn = 1e3, nn = 15e3, on = 6e4, an = [
|
|
296
300
|
"email",
|
|
297
301
|
"companyLegalName",
|
|
298
302
|
"companyRegistrationNumber",
|
|
@@ -308,296 +312,309 @@ const Xs = 400, Qs = 3, eo = 250, kt = [1e3, 2e3, 4e3, 8e3, 16e3], to = "{CHECKO
|
|
|
308
312
|
"city",
|
|
309
313
|
"state",
|
|
310
314
|
"country"
|
|
311
|
-
],
|
|
312
|
-
|
|
313
|
-
},
|
|
315
|
+
], cn = (s, n, a) => {
|
|
316
|
+
s[a] = n[a];
|
|
317
|
+
}, rn = (s, n) => {
|
|
314
318
|
const a = {};
|
|
315
|
-
for (const c in
|
|
316
|
-
|
|
319
|
+
for (const c in s)
|
|
320
|
+
n(c, s[c]) && (a[c] = s[c]);
|
|
317
321
|
return a;
|
|
318
|
-
},
|
|
322
|
+
}, un = {
|
|
319
323
|
customer_details: "HIDDEN",
|
|
320
324
|
address: "HIDDEN",
|
|
321
325
|
tax_ids: "HIDDEN",
|
|
322
326
|
email: "HIDDEN",
|
|
323
327
|
custom_fields: "HIDDEN"
|
|
324
|
-
},
|
|
325
|
-
const a = Reflect.get(
|
|
328
|
+
}, kt = (s, n) => {
|
|
329
|
+
const a = Reflect.get(s.validation.value, n);
|
|
326
330
|
return typeof a == "object" && a !== null ? a : void 0;
|
|
327
|
-
},
|
|
331
|
+
}, Ct = (s) => {
|
|
328
332
|
var a, c;
|
|
329
|
-
const
|
|
330
|
-
return (
|
|
331
|
-
},
|
|
333
|
+
const n = (a = s.individual) == null ? void 0 : a.name;
|
|
334
|
+
return (s.type === "ORGANIZATION" ? (c = s.organization) == null ? void 0 : c.legal_name : [n == null ? void 0 : n.first_name, n == null ? void 0 : n.infix, n == null ? void 0 : n.last_name].filter(Boolean).join(" ")) || s.reference;
|
|
335
|
+
}, J = (s, n) => {
|
|
332
336
|
var a;
|
|
333
|
-
return A(
|
|
334
|
-
},
|
|
335
|
-
if (!
|
|
336
|
-
const
|
|
337
|
-
return
|
|
337
|
+
return A(s) && s.statusCode === 400 && !!((a = s.field) != null && a.endsWith(n));
|
|
338
|
+
}, ie = (s) => {
|
|
339
|
+
if (!J(s, "promotion_codes") || !A(s)) return;
|
|
340
|
+
const n = /pricing_plan_subscriptions\.(\d+)\./.exec(s.field ?? "");
|
|
341
|
+
return n ? Number(n[1]) : -1;
|
|
342
|
+
}, ln = (s) => {
|
|
343
|
+
const n = s.pricing_plan_schedule_infos;
|
|
344
|
+
if (!(!(n != null && n.length) || !n.every(({ pricing_plan_version: a }) => a)))
|
|
345
|
+
return {
|
|
346
|
+
id: s.template_pricing_plan_subscription_id,
|
|
347
|
+
// The name the platform gave the session wins; the read's own may be the template's.
|
|
348
|
+
name: s.pricing_plan_subscription.name ?? s.name,
|
|
349
|
+
billing_period: s.billing_period,
|
|
350
|
+
billing_currency: s.billing_currency,
|
|
351
|
+
billing_entity_id: s.billing_entity_id,
|
|
352
|
+
billing_entity: s.billing_entity,
|
|
353
|
+
pricing_plan_schedule_infos: n
|
|
354
|
+
};
|
|
338
355
|
};
|
|
339
|
-
function
|
|
340
|
-
const
|
|
356
|
+
function dn({ portalUrlId: s }) {
|
|
357
|
+
const n = It(), { $t: a } = Nt(), c = Zs(), u = q(), l = q(), v = q([]), y = P(!1), S = P(!1), C = P(!1), m = p(() => {
|
|
341
358
|
var e;
|
|
342
359
|
return (e = u.value) == null ? void 0 : e.checkout_session;
|
|
343
|
-
}),
|
|
360
|
+
}), I = p(
|
|
344
361
|
() => {
|
|
345
362
|
var e, t;
|
|
346
|
-
return ((e = u.value) == null ? void 0 : e.status) === "PUBLISHED" && ((t =
|
|
363
|
+
return ((e = u.value) == null ? void 0 : e.status) === "PUBLISHED" && ((t = m.value) == null ? void 0 : t.status) === "OPEN";
|
|
347
364
|
}
|
|
348
|
-
),
|
|
365
|
+
), M = p(
|
|
349
366
|
() => {
|
|
350
367
|
var e;
|
|
351
|
-
return !!
|
|
368
|
+
return !!m.value && (((e = l.value) == null ? void 0 : e.checkout_session.version) ?? -1) < m.value.version;
|
|
352
369
|
}
|
|
353
|
-
),
|
|
370
|
+
), O = p(() => {
|
|
354
371
|
var e, t;
|
|
355
372
|
return [
|
|
356
373
|
.../* @__PURE__ */ new Set([
|
|
357
|
-
...((e =
|
|
358
|
-
...
|
|
374
|
+
...((e = m.value) == null ? void 0 : e.missing_fields) ?? [],
|
|
375
|
+
...M.value ? [] : ((t = l.value) == null ? void 0 : t.checkout_session.missing_fields) ?? []
|
|
359
376
|
])
|
|
360
377
|
];
|
|
361
|
-
}),
|
|
378
|
+
}), k = p(
|
|
362
379
|
() => {
|
|
363
380
|
var e;
|
|
364
|
-
return Fs(
|
|
381
|
+
return Fs(O.value, ((e = m.value) == null ? void 0 : e.customers.length) ?? 0);
|
|
365
382
|
}
|
|
366
|
-
),
|
|
367
|
-
var
|
|
368
|
-
const t = (
|
|
383
|
+
), T = (e) => {
|
|
384
|
+
var o;
|
|
385
|
+
const t = (o = m.value) == null ? void 0 : o.customers[e];
|
|
369
386
|
if (t)
|
|
370
|
-
return t.customer ? t.effective_display :
|
|
371
|
-
},
|
|
387
|
+
return t.customer ? t.effective_display : un;
|
|
388
|
+
}, z = (e) => Is({
|
|
372
389
|
initialState: {},
|
|
373
390
|
// Every change is saved to the session, not only those that move the price.
|
|
374
391
|
onRequiredFieldChange: () => {
|
|
375
392
|
},
|
|
376
|
-
display: () =>
|
|
377
|
-
alsoRequired: () =>
|
|
393
|
+
display: () => T(e),
|
|
394
|
+
alsoRequired: () => k.value[e] ?? [],
|
|
378
395
|
// A guess would be saved into the merchant's session as the customer's country.
|
|
379
396
|
guessCountry: !1
|
|
380
|
-
}), X =
|
|
397
|
+
}), X = z(0), N = q([X]), xt = rs(), Dt = (e) => {
|
|
381
398
|
const t = xt.run(
|
|
382
399
|
() => Array.from(
|
|
383
|
-
{ length: e -
|
|
384
|
-
(
|
|
400
|
+
{ length: e - N.value.length },
|
|
401
|
+
(o, i) => z(N.value.length + i)
|
|
385
402
|
)
|
|
386
403
|
);
|
|
387
|
-
t != null && t.length && (
|
|
388
|
-
},
|
|
404
|
+
t != null && t.length && (N.value = [...N.value, ...t]);
|
|
405
|
+
}, te = (e) => {
|
|
389
406
|
var i, r;
|
|
390
|
-
const t = (i =
|
|
407
|
+
const t = (i = m.value) == null ? void 0 : i.pricing_plan_subscriptions[e], o = v.value[e];
|
|
391
408
|
if (t)
|
|
392
409
|
return Vs(
|
|
393
410
|
t,
|
|
394
|
-
|
|
395
|
-
pricingPlanScheduleInfos:
|
|
411
|
+
o && ((r = xs({
|
|
412
|
+
pricingPlanScheduleInfos: o.pricing_plan_schedule_infos,
|
|
396
413
|
type: "DEFAULT"
|
|
397
414
|
})) == null ? void 0 : r.id)
|
|
398
415
|
);
|
|
399
|
-
},
|
|
416
|
+
}, K = p(
|
|
400
417
|
() => {
|
|
401
418
|
var e;
|
|
402
|
-
return (((e =
|
|
403
|
-
(t,
|
|
419
|
+
return (((e = m.value) == null ? void 0 : e.pricing_plan_subscriptions) ?? []).flatMap(
|
|
420
|
+
(t, o) => {
|
|
404
421
|
var i;
|
|
405
|
-
return ((i = t.options) == null ? void 0 : i.allow_promotion_codes) === "SINGLE" ? [
|
|
422
|
+
return ((i = t.options) == null ? void 0 : i.allow_promotion_codes) === "SINGLE" ? [o] : [];
|
|
406
423
|
}
|
|
407
424
|
);
|
|
408
425
|
}
|
|
409
|
-
), F =
|
|
426
|
+
), F = lt(/* @__PURE__ */ new Map()), Q = q([]), De = (e, t, o, i) => {
|
|
410
427
|
var r;
|
|
411
|
-
return
|
|
428
|
+
return ht(
|
|
412
429
|
(r = e.options) == null ? void 0 : r[i],
|
|
413
|
-
|
|
430
|
+
ft(e, t, o)
|
|
414
431
|
).values;
|
|
415
|
-
},
|
|
432
|
+
}, Me = (e) => {
|
|
416
433
|
var i;
|
|
417
|
-
const t = (i =
|
|
418
|
-
return t != null && t.customer &&
|
|
419
|
-
|
|
434
|
+
const t = (i = m.value) == null ? void 0 : i.customers[e], o = N.value[e];
|
|
435
|
+
return t != null && t.customer && o ? Us(
|
|
436
|
+
o.form.value,
|
|
420
437
|
t.customer,
|
|
421
438
|
t.effective_display,
|
|
422
|
-
(r) => Reflect.get(
|
|
439
|
+
(r) => Reflect.get(kt(o, r) ?? {}, "$invalid") === !0
|
|
423
440
|
) : void 0;
|
|
424
|
-
},
|
|
441
|
+
}, Le = lt(/* @__PURE__ */ new Map()), Ae = (e, t) => Le.get(e) === JSON.stringify(t), Mt = (e, t) => {
|
|
425
442
|
if (!e) return;
|
|
426
|
-
const
|
|
427
|
-
if (!
|
|
428
|
-
const
|
|
429
|
-
return Object.keys(
|
|
430
|
-
},
|
|
431
|
-
...
|
|
432
|
-
...
|
|
433
|
-
...
|
|
443
|
+
const o = `customers.${t}`, { individual: i, organization: r, ...d } = e, _ = (h, b) => {
|
|
444
|
+
if (!h) return;
|
|
445
|
+
const x = rn(h, (L, D) => !Ae(`${b}.${L}`, D));
|
|
446
|
+
return Object.keys(x).length ? x : void 0;
|
|
447
|
+
}, g = _(i, `${o}.individual`), E = _(r, `${o}.organization`), f = {
|
|
448
|
+
..._(d, o),
|
|
449
|
+
...g && { individual: g },
|
|
450
|
+
...E && { organization: E }
|
|
434
451
|
};
|
|
435
452
|
return Object.keys(f).length ? f : void 0;
|
|
436
|
-
},
|
|
453
|
+
}, Lt = (e) => [
|
|
437
454
|
...(e.customers ?? []).flatMap(
|
|
438
|
-
(t,
|
|
439
|
-
([i, r]) => i === "individual" || i === "organization" ? Object.entries(r ?? {}).map(([d,
|
|
440
|
-
`customers.${
|
|
441
|
-
|
|
442
|
-
]) : [[`customers.${
|
|
455
|
+
(t, o) => Object.entries(t ?? {}).flatMap(
|
|
456
|
+
([i, r]) => i === "individual" || i === "organization" ? Object.entries(r ?? {}).map(([d, _]) => [
|
|
457
|
+
`customers.${o}.${i}.${d}`,
|
|
458
|
+
_
|
|
459
|
+
]) : [[`customers.${o}.${i}`, r]]
|
|
443
460
|
)
|
|
444
461
|
),
|
|
445
462
|
...(e.pricing_plan_subscriptions ?? []).flatMap(
|
|
446
|
-
(t,
|
|
463
|
+
(t, o) => (t ?? []).flatMap(
|
|
447
464
|
(i) => ["seats_values", "units"].flatMap(
|
|
448
465
|
(r) => (i[r] ?? []).map(
|
|
449
|
-
({ pricing_item_config_id: d, number:
|
|
450
|
-
`subs.${
|
|
451
|
-
|
|
466
|
+
({ pricing_item_config_id: d, number: _ }) => [
|
|
467
|
+
`subs.${o}.${r}.${d}`,
|
|
468
|
+
_
|
|
452
469
|
]
|
|
453
470
|
)
|
|
454
471
|
)
|
|
455
472
|
)
|
|
456
473
|
)
|
|
457
|
-
],
|
|
458
|
-
const [
|
|
459
|
-
(f) =>
|
|
474
|
+
], At = (e, t) => {
|
|
475
|
+
const [o, i, ...r] = (t ?? "").replace(/^checkout_session\./, "").split("."), d = o === "customers" && /^\d+$/.test(i ?? "") ? [["customers", i, ...r.slice(1, 3)].join("."), `customers.${i}`] : o === "pricing_plan_subscriptions" && /^\d+$/.test(i ?? "") ? [["subs", i, ...r.slice(2, 3)].join("."), `subs.${i}`] : [], _ = Lt(e), g = (f, h) => f === h || f.startsWith(`${h}.`), E = d.find(
|
|
476
|
+
(f) => _.some(([h]) => g(h, f))
|
|
460
477
|
);
|
|
461
|
-
for (const [f,
|
|
462
|
-
(
|
|
463
|
-
},
|
|
464
|
-
const e =
|
|
478
|
+
for (const [f, h] of _)
|
|
479
|
+
(E === void 0 || g(f, E)) && Le.set(f, JSON.stringify(h));
|
|
480
|
+
}, ue = () => {
|
|
481
|
+
const e = m.value;
|
|
465
482
|
if (!e) return {};
|
|
466
|
-
const t = e.pricing_plan_subscriptions.map((
|
|
467
|
-
var
|
|
468
|
-
const r =
|
|
483
|
+
const t = e.pricing_plan_subscriptions.map((o, i) => {
|
|
484
|
+
var E, f;
|
|
485
|
+
const r = te(i);
|
|
469
486
|
if (!r) return;
|
|
470
487
|
const d = {
|
|
471
488
|
pricing_plan_schedule_id: r
|
|
472
|
-
},
|
|
473
|
-
if (
|
|
474
|
-
const
|
|
475
|
-
|
|
476
|
-
(
|
|
477
|
-
|
|
489
|
+
}, _ = Q.value[i];
|
|
490
|
+
if (_) {
|
|
491
|
+
const h = gt(
|
|
492
|
+
_.seatsValues.value,
|
|
493
|
+
(E = o.options) == null ? void 0 : E.edit_seats,
|
|
494
|
+
De(o, r, "seats_values", "edit_seats"),
|
|
478
495
|
{ wholeOnly: !0 }
|
|
479
|
-
),
|
|
480
|
-
|
|
481
|
-
(f =
|
|
482
|
-
|
|
496
|
+
), b = gt(
|
|
497
|
+
_.unitsValues.value,
|
|
498
|
+
(f = o.options) == null ? void 0 : f.edit_units,
|
|
499
|
+
De(o, r, "units", "edit_units"),
|
|
483
500
|
{ wholeOnly: !1 }
|
|
484
|
-
),
|
|
485
|
-
({ pricing_item_config_id:
|
|
486
|
-
),
|
|
487
|
-
|
|
501
|
+
), x = (Y, G) => G == null ? void 0 : G.filter(
|
|
502
|
+
({ pricing_item_config_id: W, number: j }) => !Ae(`subs.${i}.${Y}.${W}`, j)
|
|
503
|
+
), L = x("seats_values", h), D = x("units", b);
|
|
504
|
+
L != null && L.length && (d.seats_values = L), D != null && D.length && (d.units = D);
|
|
488
505
|
}
|
|
489
|
-
const
|
|
490
|
-
if (
|
|
491
|
-
const
|
|
492
|
-
((
|
|
506
|
+
const g = F.get(i);
|
|
507
|
+
if (g !== void 0 && K.value.includes(i)) {
|
|
508
|
+
const h = g ? [g] : null, b = yt(o, r);
|
|
509
|
+
((h == null ? void 0 : h[0]) ?? null) !== ((b == null ? void 0 : b[0]) ?? null) && (d.promotion_codes = h);
|
|
493
510
|
}
|
|
494
511
|
return Object.keys(d).length > 1 ? [d] : void 0;
|
|
495
512
|
});
|
|
496
513
|
return {
|
|
497
|
-
customers:
|
|
498
|
-
(
|
|
514
|
+
customers: N.value.map(
|
|
515
|
+
(o, i) => {
|
|
499
516
|
var r;
|
|
500
|
-
return
|
|
517
|
+
return Mt((r = Me(i)) == null ? void 0 : r.patch, i);
|
|
501
518
|
}
|
|
502
519
|
),
|
|
503
520
|
pricing_plan_subscriptions: t
|
|
504
521
|
};
|
|
505
|
-
},
|
|
522
|
+
}, le = (e) => {
|
|
506
523
|
const t = Ie(0, e);
|
|
507
524
|
return Js(t) ? "" : JSON.stringify(t);
|
|
508
|
-
},
|
|
509
|
-
() => !!
|
|
525
|
+
}, de = p(() => m.value && I.value ? le(ue()) : ""), pe = P(), Rt = p(
|
|
526
|
+
() => !!de.value && de.value !== pe.value
|
|
510
527
|
);
|
|
511
|
-
let
|
|
512
|
-
const
|
|
513
|
-
|
|
514
|
-
|
|
528
|
+
let Re = !1;
|
|
529
|
+
const me = /* @__PURE__ */ new Set();
|
|
530
|
+
us(() => {
|
|
531
|
+
Re = !0, me.forEach(clearTimeout);
|
|
515
532
|
});
|
|
516
533
|
const _e = (e) => new Promise((t) => {
|
|
517
|
-
const
|
|
518
|
-
|
|
534
|
+
const o = setTimeout(() => {
|
|
535
|
+
me.delete(o), t();
|
|
519
536
|
}, e);
|
|
520
|
-
|
|
521
|
-
}),
|
|
537
|
+
me.add(o);
|
|
538
|
+
}), ve = P(0), Ft = p(() => ve.value > 0), fe = P(!1), Fe = (e) => n.error("INVOICE_PREVIEW_FAILED", "Failed to preview the checkout session", {}, e), V = async ({ onFailure: e = Fe } = {}) => {
|
|
522
539
|
var t;
|
|
523
|
-
|
|
540
|
+
ve.value++;
|
|
524
541
|
try {
|
|
525
|
-
for (let
|
|
526
|
-
|
|
527
|
-
const i = await c.previewCheckoutSession(
|
|
528
|
-
if ((!
|
|
542
|
+
for (let o = 0; o < Qs; o++) {
|
|
543
|
+
o > 0 && await _e(en * 2 ** (o - 1));
|
|
544
|
+
const i = await c.previewCheckoutSession(s);
|
|
545
|
+
if ((!l.value || i.checkout_session.version >= l.value.checkout_session.version) && (l.value = i), fe.value = !1, i.checkout_session.version >= (((t = m.value) == null ? void 0 : t.version) ?? 0)) return;
|
|
529
546
|
}
|
|
530
|
-
} catch (
|
|
531
|
-
|
|
547
|
+
} catch (o) {
|
|
548
|
+
fe.value = !0, e(o);
|
|
532
549
|
} finally {
|
|
533
|
-
|
|
550
|
+
ve.value--;
|
|
534
551
|
}
|
|
535
|
-
},
|
|
536
|
-
var
|
|
537
|
-
const r = _t(
|
|
538
|
-
for (const f of
|
|
539
|
-
const
|
|
540
|
-
|
|
552
|
+
}, Ut = (e, t, o, i) => {
|
|
553
|
+
var g, E;
|
|
554
|
+
const r = _t(ae(t)), d = _t(ae((E = (g = m.value) == null ? void 0 : g.customers[e]) == null ? void 0 : E.customer)), _ = N.value[e].form.value;
|
|
555
|
+
for (const f of an) {
|
|
556
|
+
const h = _[f] === o[f], b = i.includes(f) || o[f] === r[f];
|
|
557
|
+
h && b && _[f] !== d[f] && cn(_, d, f);
|
|
541
558
|
}
|
|
542
|
-
},
|
|
559
|
+
}, Ue = (e) => N.value.map((t, o) => {
|
|
543
560
|
var i, r, d;
|
|
544
561
|
return {
|
|
545
|
-
before: (r = (i =
|
|
562
|
+
before: (r = (i = m.value) == null ? void 0 : i.customers[o]) == null ? void 0 : r.customer,
|
|
546
563
|
form: { ...t.form.value },
|
|
547
|
-
fields: e ? ((d =
|
|
564
|
+
fields: e ? ((d = Me(o)) == null ? void 0 : d.fields) ?? [] : []
|
|
548
565
|
};
|
|
549
|
-
}),
|
|
550
|
-
({ before: t, form:
|
|
551
|
-
),
|
|
552
|
-
if (!
|
|
553
|
-
const e =
|
|
554
|
-
if (!t || t ===
|
|
555
|
-
const
|
|
556
|
-
|
|
566
|
+
}), $e = (e) => e.forEach(
|
|
567
|
+
({ before: t, form: o, fields: i }, r) => Ut(r, t, o, i)
|
|
568
|
+
), $t = async () => {
|
|
569
|
+
if (!m.value || !I.value) return;
|
|
570
|
+
const e = ue(), t = le(e);
|
|
571
|
+
if (!t || t === pe.value) return;
|
|
572
|
+
const o = Ue(!0), i = new Map(F);
|
|
573
|
+
y.value = !0;
|
|
557
574
|
try {
|
|
558
575
|
try {
|
|
559
576
|
u.value = await c.updateCheckoutSession(
|
|
560
|
-
|
|
561
|
-
Ie(
|
|
577
|
+
s,
|
|
578
|
+
Ie(m.value.version, e)
|
|
562
579
|
);
|
|
563
580
|
} catch (r) {
|
|
564
|
-
if (!
|
|
565
|
-
if (u.value = await c.getCheckoutSession(
|
|
581
|
+
if (!J(r, "expected_version")) throw r;
|
|
582
|
+
if (u.value = await c.getCheckoutSession(s), !I.value) return;
|
|
566
583
|
u.value = await c.updateCheckoutSession(
|
|
567
|
-
|
|
584
|
+
s,
|
|
568
585
|
Ie(u.value.checkout_session.version, e)
|
|
569
586
|
);
|
|
570
587
|
}
|
|
571
|
-
|
|
588
|
+
$e(o);
|
|
572
589
|
for (const [r, d] of i)
|
|
573
590
|
F.get(r) === d && F.delete(r);
|
|
574
|
-
|
|
591
|
+
le(ue()) === t && (pe.value = t, n.warn(
|
|
575
592
|
"CHECKOUT_SESSION_EDIT_NOT_APPLIED",
|
|
576
593
|
"The checkout session was saved but kept a value the customer changed"
|
|
577
594
|
));
|
|
578
595
|
} catch (r) {
|
|
579
|
-
throw A(r) && r.statusCode === 400 && !
|
|
596
|
+
throw A(r) && r.statusCode === 400 && !J(r, "expected_version") && ie(r) === void 0 && At(e, r.field), Ht(r), r;
|
|
580
597
|
} finally {
|
|
581
|
-
|
|
598
|
+
y.value = !1;
|
|
582
599
|
}
|
|
583
600
|
await V();
|
|
584
601
|
};
|
|
585
|
-
let
|
|
586
|
-
const
|
|
587
|
-
const e =
|
|
588
|
-
return
|
|
602
|
+
let Ve = Promise.resolve();
|
|
603
|
+
const he = () => {
|
|
604
|
+
const e = Ve.then($t);
|
|
605
|
+
return Ve = e.catch(() => {
|
|
589
606
|
}), e;
|
|
590
|
-
},
|
|
591
|
-
let
|
|
592
|
-
const
|
|
593
|
-
!(!A(e) || e.statusCode >= 500) ||
|
|
594
|
-
},
|
|
607
|
+
}, He = (e) => A(e) && e.statusCode === 400;
|
|
608
|
+
let se = 0, ge = !1;
|
|
609
|
+
const Vt = (e) => {
|
|
610
|
+
!(!A(e) || e.statusCode >= 500) || ge || se >= Ot.length || (ge = !0, _e(Ot[se++]).then(() => (ge = !1, ye())));
|
|
611
|
+
}, ye = () => he().then(
|
|
595
612
|
() => {
|
|
596
|
-
|
|
613
|
+
se = 0;
|
|
597
614
|
},
|
|
598
615
|
(e) => {
|
|
599
|
-
if (
|
|
600
|
-
|
|
616
|
+
if (Vt(e), He(e)) {
|
|
617
|
+
n.warn(
|
|
601
618
|
"CHECKOUT_SESSION_UPDATE_REFUSED",
|
|
602
619
|
"The API refused a change to the checkout session",
|
|
603
620
|
{ field: A(e) ? e.field : void 0 },
|
|
@@ -605,7 +622,7 @@ function uo({ portalUrlId: n }) {
|
|
|
605
622
|
);
|
|
606
623
|
return;
|
|
607
624
|
}
|
|
608
|
-
|
|
625
|
+
n.error(
|
|
609
626
|
"CHECKOUT_SESSION_UPDATE_FAILED",
|
|
610
627
|
"Failed to save the checkout session",
|
|
611
628
|
{},
|
|
@@ -614,27 +631,27 @@ function uo({ portalUrlId: n }) {
|
|
|
614
631
|
}
|
|
615
632
|
);
|
|
616
633
|
Ps(
|
|
617
|
-
() =>
|
|
634
|
+
() => de.value,
|
|
618
635
|
() => {
|
|
619
|
-
|
|
636
|
+
se = 0, ye();
|
|
620
637
|
},
|
|
621
638
|
{ debounce: Xs }
|
|
622
639
|
);
|
|
623
|
-
const
|
|
624
|
-
let t =
|
|
625
|
-
return t || (t = { code:
|
|
626
|
-
},
|
|
627
|
-
var
|
|
628
|
-
const t = (
|
|
629
|
-
return t ? ((i =
|
|
640
|
+
const je = /* @__PURE__ */ new Map(), ne = (e) => {
|
|
641
|
+
let t = je.get(e);
|
|
642
|
+
return t || (t = { code: P(null), isPending: P(!1), errorMessage: P(null) }, je.set(e, t)), t;
|
|
643
|
+
}, ze = (e) => {
|
|
644
|
+
var o, i;
|
|
645
|
+
const t = (o = m.value) == null ? void 0 : o.pricing_plan_subscriptions[e];
|
|
646
|
+
return t ? ((i = yt(t, te(e))) == null ? void 0 : i[0]) ?? null : null;
|
|
630
647
|
};
|
|
631
|
-
|
|
632
|
-
for (const e of
|
|
648
|
+
ee(m, () => {
|
|
649
|
+
for (const e of K.value) {
|
|
633
650
|
const t = ne(e);
|
|
634
|
-
t.isPending.value || (t.code.value =
|
|
651
|
+
t.isPending.value || (t.code.value = ze(e));
|
|
635
652
|
}
|
|
636
653
|
});
|
|
637
|
-
const
|
|
654
|
+
const Ke = (e) => a(e === "apply" ? {
|
|
638
655
|
defaultMessage: "Promotion code could not be applied. Please try again.",
|
|
639
656
|
id: "checkout.promotion_code.apply_failed",
|
|
640
657
|
description: "Error message when applying a promotion code in checkout failed"
|
|
@@ -643,102 +660,95 @@ function uo({ portalUrlId: n }) {
|
|
|
643
660
|
id: "checkout.promotion_code.remove_failed",
|
|
644
661
|
description: "Error message when removing a promotion code in checkout failed"
|
|
645
662
|
});
|
|
646
|
-
function
|
|
647
|
-
const t =
|
|
663
|
+
function Ht(e) {
|
|
664
|
+
const t = ie(e);
|
|
648
665
|
if (t !== void 0)
|
|
649
|
-
for (const [
|
|
650
|
-
t !== -1 && t !==
|
|
666
|
+
for (const [o, i] of [...F])
|
|
667
|
+
t !== -1 && t !== o || (F.delete(o), ne(o).errorMessage.value = i ? a({
|
|
651
668
|
defaultMessage: "This promotion code is not valid.",
|
|
652
669
|
id: "checkout_session.promotion_code.rejected",
|
|
653
670
|
description: "Error shown under the promotion code field when the code the customer entered was not accepted"
|
|
654
|
-
}) :
|
|
671
|
+
}) : Ke("remove"), n.warn(
|
|
655
672
|
"PROMOTION_CODE_REJECTED",
|
|
656
673
|
"The promotion code was not accepted",
|
|
657
674
|
{},
|
|
658
675
|
e
|
|
659
676
|
));
|
|
660
677
|
}
|
|
661
|
-
const
|
|
678
|
+
const Be = async (e, t, o) => {
|
|
662
679
|
const i = ne(e);
|
|
663
680
|
F.set(e, t), i.errorMessage.value = null, i.isPending.value = !0;
|
|
664
681
|
try {
|
|
665
682
|
for (let r = 0; ; r++)
|
|
666
683
|
try {
|
|
667
|
-
await
|
|
684
|
+
await he();
|
|
668
685
|
break;
|
|
669
686
|
} catch (d) {
|
|
670
|
-
const
|
|
671
|
-
if (!(
|
|
687
|
+
const _ = ie(d);
|
|
688
|
+
if (!(_ !== void 0 && _ !== -1 && _ !== e) || r >= K.value.length)
|
|
672
689
|
throw d;
|
|
673
690
|
}
|
|
674
691
|
} catch (r) {
|
|
675
|
-
|
|
692
|
+
ie(r) === void 0 && (He(r) ? n.warn(
|
|
676
693
|
"CHECKOUT_SESSION_UPDATE_REFUSED",
|
|
677
694
|
"The API refused a change to the checkout session",
|
|
678
695
|
{ field: A(r) ? r.field : void 0 },
|
|
679
696
|
r
|
|
680
|
-
) :
|
|
681
|
-
code:
|
|
697
|
+
) : n.capture(r, {
|
|
698
|
+
code: o === "apply" ? "PROMOTION_CODE_APPLY_FAILED" : "PROMOTION_CODE_REMOVE_FAILED",
|
|
682
699
|
message: "Failed to change the promotion code of the checkout session"
|
|
683
|
-
}), i.errorMessage.value =
|
|
700
|
+
}), i.errorMessage.value = Ke(o)), F.delete(e), ye();
|
|
684
701
|
} finally {
|
|
685
|
-
i.isPending.value = !1, i.code.value =
|
|
702
|
+
i.isPending.value = !1, i.code.value = ze(e);
|
|
686
703
|
}
|
|
687
|
-
},
|
|
704
|
+
}, Ye = (e) => {
|
|
688
705
|
const t = () => ne(e());
|
|
689
706
|
return {
|
|
690
|
-
isAllowed:
|
|
691
|
-
code:
|
|
707
|
+
isAllowed: p(() => I.value && e() !== -1),
|
|
708
|
+
code: p({
|
|
692
709
|
get: () => t().code.value,
|
|
693
|
-
set: (
|
|
710
|
+
set: (o) => t().code.value = o
|
|
694
711
|
}),
|
|
695
|
-
isPending:
|
|
696
|
-
errorMessage:
|
|
712
|
+
isPending: p(() => t().isPending.value),
|
|
713
|
+
errorMessage: p({
|
|
697
714
|
get: () => t().errorMessage.value,
|
|
698
|
-
set: (
|
|
715
|
+
set: (o) => t().errorMessage.value = o
|
|
699
716
|
}),
|
|
700
|
-
apply: (
|
|
701
|
-
const i =
|
|
702
|
-
return i ?
|
|
717
|
+
apply: (o) => {
|
|
718
|
+
const i = o == null ? void 0 : o.trim();
|
|
719
|
+
return i ? Be(e(), i, "apply") : void 0;
|
|
703
720
|
},
|
|
704
|
-
remove: () =>
|
|
721
|
+
remove: () => Be(e(), null, "remove")
|
|
705
722
|
};
|
|
706
|
-
},
|
|
707
|
-
() =>
|
|
708
|
-
),
|
|
709
|
-
|
|
710
|
-
|
|
711
|
-
|
|
712
|
-
|
|
713
|
-
|
|
714
|
-
|
|
715
|
-
|
|
716
|
-
|
|
717
|
-
|
|
718
|
-
|
|
719
|
-
|
|
720
|
-
|
|
721
|
-
}, Kt = () => {
|
|
722
|
-
const e = _.value, t = (e == null ? void 0 : e.pricing_plan_subscriptions) ?? [];
|
|
723
|
-
Q.value = t.map((s, i) => {
|
|
724
|
-
const r = g.value[i], d = se(i);
|
|
723
|
+
}, Ge = p(
|
|
724
|
+
() => K.value.length === 1 ? K.value[0] : -1
|
|
725
|
+
), jt = (e) => {
|
|
726
|
+
v.value = e.checkout_session.pricing_plan_subscriptions.map((t) => {
|
|
727
|
+
const o = ln(t);
|
|
728
|
+
return o || n.error(
|
|
729
|
+
"SUBSCRIPTION_LOAD_FAILED",
|
|
730
|
+
"A checkout session subscription came without its plan",
|
|
731
|
+
{}
|
|
732
|
+
), o;
|
|
733
|
+
});
|
|
734
|
+
}, zt = () => {
|
|
735
|
+
const e = m.value, t = (e == null ? void 0 : e.pricing_plan_subscriptions) ?? [];
|
|
736
|
+
Q.value = t.map((o, i) => {
|
|
737
|
+
const r = v.value[i], d = te(i);
|
|
725
738
|
if (!r) return;
|
|
726
|
-
const
|
|
727
|
-
|
|
728
|
-
|
|
729
|
-
|
|
730
|
-
|
|
731
|
-
return gt(
|
|
732
|
-
(D = s.options) == null ? void 0 : D[L],
|
|
733
|
-
d ? ht(s, d, k) : []
|
|
739
|
+
const _ = (h, b) => {
|
|
740
|
+
var x;
|
|
741
|
+
return ht(
|
|
742
|
+
(x = o.options) == null ? void 0 : x[b],
|
|
743
|
+
d ? ft(o, d, h) : []
|
|
734
744
|
);
|
|
735
|
-
},
|
|
745
|
+
}, g = _("seats_values", "edit_seats"), E = _("units", "edit_units"), f = K.value.includes(i) && Ge.value === -1;
|
|
736
746
|
return {
|
|
737
747
|
key: `${i}`,
|
|
738
|
-
subscription:
|
|
748
|
+
subscription: r,
|
|
739
749
|
...t.length > 1 && {
|
|
740
|
-
title:
|
|
741
|
-
subscription:
|
|
750
|
+
title: Ds({
|
|
751
|
+
subscription: r,
|
|
742
752
|
fallback: a({
|
|
743
753
|
defaultMessage: "Subscription",
|
|
744
754
|
description: "The fallback name for when no subscription name can be determined",
|
|
@@ -746,86 +756,79 @@ function uo({ portalUrlId: n }) {
|
|
|
746
756
|
})
|
|
747
757
|
})
|
|
748
758
|
},
|
|
749
|
-
seatsValues:
|
|
750
|
-
unitsValues:
|
|
751
|
-
minimums: { seatsValues:
|
|
752
|
-
maximums: { seatsValues:
|
|
753
|
-
editableConfigIds: [...
|
|
754
|
-
({ pricing_item_config_id:
|
|
759
|
+
seatsValues: P(g.values),
|
|
760
|
+
unitsValues: P(E.values),
|
|
761
|
+
minimums: { seatsValues: g.minimums, unitsValues: E.minimums },
|
|
762
|
+
maximums: { seatsValues: g.maximums, unitsValues: E.maximums },
|
|
763
|
+
editableConfigIds: [...g.minimums, ...E.minimums].map(
|
|
764
|
+
({ pricing_item_config_id: h }) => h
|
|
755
765
|
),
|
|
756
|
-
...
|
|
766
|
+
...f && { promotionCode: Ye(() => i) }
|
|
757
767
|
};
|
|
758
|
-
}),
|
|
759
|
-
(
|
|
768
|
+
}), N.value.forEach(
|
|
769
|
+
(o, i) => {
|
|
760
770
|
var r;
|
|
761
|
-
return
|
|
771
|
+
return o.updateInitialState(ae((r = e == null ? void 0 : e.customers[i]) == null ? void 0 : r.customer));
|
|
762
772
|
}
|
|
763
773
|
);
|
|
764
|
-
},
|
|
774
|
+
}, Kt = p(() => {
|
|
765
775
|
const e = /* @__PURE__ */ new Map();
|
|
766
|
-
return
|
|
767
|
-
var y;
|
|
776
|
+
return v.value.forEach((t, o) => {
|
|
768
777
|
if (!t) return;
|
|
769
|
-
const i =
|
|
770
|
-
({ id:
|
|
771
|
-
), d = (((y = r == null ? void 0 : r.pricing_plan_schedule) == null ? void 0 : y.enabled_pricings) ?? []).map(({ pricing_id: h }) => h), v = {
|
|
772
|
-
scheduleInfo: r,
|
|
773
|
-
enabledPricingIds: d,
|
|
778
|
+
const i = te(o), r = {
|
|
779
|
+
scheduleInfo: t.pricing_plan_schedule_infos.find(({ id: d }) => d === i),
|
|
774
780
|
billingPeriod: t.billing_period
|
|
775
781
|
};
|
|
776
|
-
e.set(
|
|
777
|
-
JSON.stringify([i, d, t.billing_period]),
|
|
778
|
-
v
|
|
779
|
-
);
|
|
782
|
+
e.set(JSON.stringify([r.scheduleInfo, t.billing_period]), r);
|
|
780
783
|
}), [...e.values()];
|
|
781
|
-
}),
|
|
782
|
-
|
|
783
|
-
|
|
784
|
-
for (const
|
|
785
|
-
const i = Reflect.get(
|
|
784
|
+
}), B = P(!1);
|
|
785
|
+
ee([B, k], () => {
|
|
786
|
+
B.value && N.value.forEach((e, t) => {
|
|
787
|
+
for (const o of k.value[t] ?? []) {
|
|
788
|
+
const i = Reflect.get(kt(e, o) ?? {}, "$touch");
|
|
786
789
|
typeof i == "function" && i();
|
|
787
790
|
}
|
|
788
791
|
});
|
|
789
792
|
});
|
|
790
|
-
const
|
|
793
|
+
const We = p(() => {
|
|
791
794
|
if (!u.value) return;
|
|
792
|
-
if (
|
|
795
|
+
if (I.value) return C.value ? "PROCESSING" : void 0;
|
|
793
796
|
const { status: e } = u.value.checkout_session;
|
|
794
797
|
return e === "OPEN" ? "CLOSED" : e;
|
|
795
|
-
}),
|
|
798
|
+
}), qe = (e) => e == null ? void 0 : e.replaceAll(tn, encodeURIComponent(s)), Je = p(() => {
|
|
796
799
|
var e;
|
|
797
|
-
return
|
|
798
|
-
}),
|
|
799
|
-
let
|
|
800
|
-
|
|
801
|
-
|
|
800
|
+
return qe((e = m.value) == null ? void 0 : e.success_url);
|
|
801
|
+
}), Ze = P(!1), { dispatch: Bt, componentName: Yt } = bs(), Xe = P(!1);
|
|
802
|
+
let Qe = !1;
|
|
803
|
+
ee(
|
|
804
|
+
We,
|
|
802
805
|
(e) => {
|
|
803
|
-
const t = e === "COMPLETED" && !
|
|
804
|
-
|
|
806
|
+
const t = e === "COMPLETED" && !Xe.value ? vt(Je.value ?? "") : "";
|
|
807
|
+
Ze.value = !!t, t && Ls(t);
|
|
805
808
|
},
|
|
806
809
|
{ immediate: !0 }
|
|
807
810
|
);
|
|
808
|
-
const
|
|
809
|
-
var
|
|
811
|
+
const Gt = async () => {
|
|
812
|
+
var o;
|
|
810
813
|
let e;
|
|
811
814
|
const [t] = await Promise.all([
|
|
812
|
-
c.getCheckoutSession(
|
|
815
|
+
c.getCheckoutSession(s, { expanded: !0 }),
|
|
813
816
|
V({ onFailure: (i) => e = i })
|
|
814
817
|
]);
|
|
815
|
-
if (e !== void 0 &&
|
|
816
|
-
u.value = t, t.checkout_session.status === "PROCESSING" &&
|
|
818
|
+
if (e !== void 0 && Fe(e), t.status !== "PUBLISHED" || t.checkout_session.status !== "OPEN") {
|
|
819
|
+
u.value = t, t.checkout_session.status === "PROCESSING" && Ce({ isPaid: !0, isRead: !0 });
|
|
817
820
|
return;
|
|
818
821
|
}
|
|
819
|
-
|
|
820
|
-
},
|
|
821
|
-
|
|
822
|
+
jt(t), Dt(t.checkout_session.customers.length), u.value = t, zt(), B.value = !0, (((o = l.value) == null ? void 0 : o.checkout_session.version) ?? -1) < t.checkout_session.version && await V();
|
|
823
|
+
}, Ee = q();
|
|
824
|
+
ls(async () => {
|
|
822
825
|
try {
|
|
823
|
-
await
|
|
826
|
+
await Gt();
|
|
824
827
|
} catch (e) {
|
|
825
|
-
|
|
828
|
+
Ee.value = A(e) && e.statusCode === 410 ? {
|
|
826
829
|
reason: ys[e.errorCode ?? ""] ?? "expired",
|
|
827
830
|
status: e.checkoutSessionStatus
|
|
828
|
-
} : {},
|
|
831
|
+
} : {}, n.error(
|
|
829
832
|
"CHECKOUT_SESSION_LOAD_FAILED",
|
|
830
833
|
"Failed to load the checkout session",
|
|
831
834
|
{},
|
|
@@ -833,101 +836,101 @@ function uo({ portalUrlId: n }) {
|
|
|
833
836
|
);
|
|
834
837
|
}
|
|
835
838
|
});
|
|
836
|
-
const H =
|
|
839
|
+
const H = p(
|
|
837
840
|
() => {
|
|
838
|
-
var e, t,
|
|
839
|
-
return (
|
|
841
|
+
var e, t, o;
|
|
842
|
+
return (o = (t = (e = l.value) == null ? void 0 : e.invoices) == null ? void 0 : t[0]) == null ? void 0 : o.invoice;
|
|
840
843
|
}
|
|
841
|
-
),
|
|
842
|
-
var
|
|
843
|
-
const e = (r = (i = (
|
|
844
|
+
), Wt = p(() => {
|
|
845
|
+
var o, i, r, d, _, g, E, f, h, b, x, L;
|
|
846
|
+
const e = (r = (i = (o = l.value) == null ? void 0 : o.invoices) == null ? void 0 : i[0]) == null ? void 0 : r.pricing_plan_subscription_references;
|
|
844
847
|
if (!e || e.length < 2) return;
|
|
845
848
|
const t = /* @__PURE__ */ new Map();
|
|
846
|
-
for (const
|
|
847
|
-
const
|
|
848
|
-
(U) => U.pricing_plan_subscription.reference ===
|
|
849
|
-
)) ?? -1,
|
|
850
|
-
if (!(
|
|
851
|
-
const j =
|
|
849
|
+
for (const D of e) {
|
|
850
|
+
const Y = (g = (_ = (d = l.value) == null ? void 0 : d.per_subscription) == null ? void 0 : _.find((U) => U.pricing_plan_subscription_reference === D)) == null ? void 0 : g.invoice_infos.flatMap((U) => U.invoices.slice(0, 1)), G = ((E = m.value) == null ? void 0 : E.pricing_plan_subscriptions.findIndex(
|
|
851
|
+
(U) => U.pricing_plan_subscription.reference === D
|
|
852
|
+
)) ?? -1, W = (h = (f = m.value) == null ? void 0 : f.pricing_plan_subscriptions[G]) == null ? void 0 : h.pricing_plan_subscription;
|
|
853
|
+
if (!(Y != null && Y.length) || !W) return;
|
|
854
|
+
const j = W.customer_reference ?? W.customer_id ?? D, ct = (x = (b = m.value) == null ? void 0 : b.customers.find(
|
|
852
855
|
(U) => {
|
|
853
|
-
var
|
|
854
|
-
return ((
|
|
856
|
+
var ut;
|
|
857
|
+
return ((ut = U.customer) == null ? void 0 : ut.reference) === j || U.customer_id === j;
|
|
855
858
|
}
|
|
856
|
-
)) == null ? void 0 :
|
|
859
|
+
)) == null ? void 0 : x.customer, be = t.get(j) ?? {
|
|
857
860
|
key: j,
|
|
858
|
-
title:
|
|
861
|
+
title: ct ? Ct(ct) : W.name ?? D,
|
|
859
862
|
invoices: [],
|
|
860
863
|
subscriptions: []
|
|
861
864
|
};
|
|
862
|
-
|
|
863
|
-
const
|
|
864
|
-
|
|
865
|
+
be.invoices.push(...Y);
|
|
866
|
+
const rt = (L = Q.value[G]) == null ? void 0 : L.subscription;
|
|
867
|
+
rt && be.subscriptions.push(rt), t.set(j, be);
|
|
865
868
|
}
|
|
866
869
|
return t.size > 1 ? [...t.values()] : void 0;
|
|
867
|
-
}),
|
|
868
|
-
var t,
|
|
869
|
-
(((t = e == null ? void 0 : e.invoices) == null ? void 0 : t.length) ?? 0) <= 1 || (
|
|
870
|
+
}), qt = ee(l, (e) => {
|
|
871
|
+
var t, o;
|
|
872
|
+
(((t = e == null ? void 0 : e.invoices) == null ? void 0 : t.length) ?? 0) <= 1 || (n.warn(
|
|
870
873
|
"CHECKOUT_SESSION_SEVERAL_INVOICES",
|
|
871
874
|
"The checkout session previewed several invoices; only the first is shown",
|
|
872
|
-
{ count: (
|
|
873
|
-
),
|
|
874
|
-
}),
|
|
875
|
+
{ count: (o = e == null ? void 0 : e.invoices) == null ? void 0 : o.length }
|
|
876
|
+
), qt());
|
|
877
|
+
}), et = p(() => {
|
|
875
878
|
var t;
|
|
876
|
-
const e = (t =
|
|
879
|
+
const e = (t = l.value) == null ? void 0 : t.total;
|
|
877
880
|
return e ? { quantity: e.amount_incl_tax, currency: e.currency } : void 0;
|
|
878
|
-
}),
|
|
881
|
+
}), tt = p(
|
|
879
882
|
() => H.value ? Ms(H.value) : void 0
|
|
880
|
-
),
|
|
883
|
+
), Jt = p(() => {
|
|
881
884
|
var t;
|
|
882
|
-
const e =
|
|
885
|
+
const e = tt.value;
|
|
883
886
|
if (e)
|
|
884
887
|
return e.hasOneOff ? e.hasUnattributed ? void 0 : e.recurring.includingTax : (t = H.value) == null ? void 0 : t.invoice_amount_including_tax;
|
|
885
|
-
}),
|
|
886
|
-
() =>
|
|
887
|
-
),
|
|
888
|
+
}), Se = p(() => Rt.value || M.value), Zt = p(
|
|
889
|
+
() => I.value && !!et.value && !Se.value && O.value.length === 0
|
|
890
|
+
), Xt = async () => {
|
|
888
891
|
try {
|
|
889
|
-
await
|
|
892
|
+
await he();
|
|
890
893
|
} catch {
|
|
891
894
|
return "FAILED";
|
|
892
895
|
}
|
|
893
|
-
return
|
|
896
|
+
return M.value && await V(), Se.value ? "CHANGED" : "SETTLED";
|
|
894
897
|
}, {
|
|
895
|
-
paymentMethodOptions:
|
|
896
|
-
get:
|
|
897
|
-
isPending:
|
|
898
|
-
error:
|
|
899
|
-
} = ws(),
|
|
898
|
+
paymentMethodOptions: st,
|
|
899
|
+
get: Qt,
|
|
900
|
+
isPending: es,
|
|
901
|
+
error: ts
|
|
902
|
+
} = ws(), Oe = P(), nt = () => {
|
|
900
903
|
var e, t;
|
|
901
|
-
return JSON.stringify([
|
|
904
|
+
return JSON.stringify([oe.value, (t = (e = H.value) == null ? void 0 : e.billing_entity) == null ? void 0 : t.id]);
|
|
902
905
|
};
|
|
903
|
-
let
|
|
904
|
-
const
|
|
905
|
-
const e = nt(), t = ++
|
|
906
|
-
return
|
|
906
|
+
let ot = 0;
|
|
907
|
+
const ke = () => {
|
|
908
|
+
const e = nt(), t = ++ot;
|
|
909
|
+
return Qt({ portalUrlId: s }, { fresh: !0 }).then(
|
|
907
910
|
() => {
|
|
908
|
-
t ===
|
|
911
|
+
t === ot && (Oe.value = e);
|
|
909
912
|
},
|
|
910
|
-
(
|
|
911
|
-
|
|
913
|
+
(o) => {
|
|
914
|
+
n.error(
|
|
912
915
|
"PAYMENT_METHOD_OPTIONS_LOAD_FAILED",
|
|
913
916
|
"Failed to load the payment methods that can be offered",
|
|
914
917
|
{ flow: "CHECKOUT_SESSION" },
|
|
915
|
-
|
|
918
|
+
o
|
|
916
919
|
);
|
|
917
920
|
}
|
|
918
921
|
);
|
|
919
|
-
},
|
|
920
|
-
() =>
|
|
922
|
+
}, ss = p(
|
|
923
|
+
() => ts.value !== null && !(st.value.length && Oe.value === nt())
|
|
921
924
|
), ns = async (e) => {
|
|
922
925
|
try {
|
|
923
|
-
const t = await c.getCheckoutSession(
|
|
924
|
-
e && t.checkout_session.status === "COMPLETED" && !
|
|
925
|
-
componentName:
|
|
926
|
+
const t = await c.getCheckoutSession(s);
|
|
927
|
+
e && t.checkout_session.status === "COMPLETED" && !Qe && (Qe = !0, Xe.value = !Bt("solvimon-payment-succeeded", {
|
|
928
|
+
componentName: Yt
|
|
926
929
|
})), (t.status !== "PUBLISHED" || t.checkout_session.status !== "OPEN") && (u.value = t);
|
|
927
|
-
const { status:
|
|
928
|
-
return
|
|
930
|
+
const { status: o } = t.checkout_session;
|
|
931
|
+
return o === "COMPLETED" || o === "FAILED" || t.status !== "PUBLISHED";
|
|
929
932
|
} catch (t) {
|
|
930
|
-
return
|
|
933
|
+
return n.warn(
|
|
931
934
|
"CHECKOUT_SESSION_COMPLETION_CHECK_FAILED",
|
|
932
935
|
"Failed to read the checkout session while waiting for it to complete",
|
|
933
936
|
{},
|
|
@@ -935,29 +938,29 @@ function uo({ portalUrlId: n }) {
|
|
|
935
938
|
), !1;
|
|
936
939
|
}
|
|
937
940
|
};
|
|
938
|
-
let
|
|
939
|
-
const
|
|
941
|
+
let it = 0;
|
|
942
|
+
const Ce = async ({
|
|
940
943
|
isPaid: e,
|
|
941
944
|
isRead: t = !1
|
|
942
945
|
}) => {
|
|
943
|
-
const
|
|
946
|
+
const o = ++it, i = () => !Re && o === it;
|
|
944
947
|
let r = 0;
|
|
945
948
|
for (let d = 0; i(); d++) {
|
|
946
949
|
if ((d > 0 || !t) && await ns(e)) return;
|
|
947
|
-
const
|
|
948
|
-
|
|
949
|
-
|
|
950
|
+
const _ = Math.min(
|
|
951
|
+
sn * 2 ** d,
|
|
952
|
+
nn
|
|
950
953
|
);
|
|
951
|
-
if (!i() || r +
|
|
952
|
-
r +=
|
|
954
|
+
if (!i() || r + _ > on) break;
|
|
955
|
+
r += _, await _e(_);
|
|
953
956
|
}
|
|
954
|
-
e && i() && (
|
|
955
|
-
},
|
|
957
|
+
e && i() && (C.value = !0);
|
|
958
|
+
}, os = async () => {
|
|
956
959
|
try {
|
|
957
|
-
const e =
|
|
958
|
-
u.value = await c.getCheckoutSession(
|
|
960
|
+
const e = Ue(!1);
|
|
961
|
+
u.value = await c.getCheckoutSession(s), $e(e);
|
|
959
962
|
} catch (e) {
|
|
960
|
-
|
|
963
|
+
n.error(
|
|
961
964
|
"CHECKOUT_SESSION_LOAD_FAILED",
|
|
962
965
|
"Failed to load the checkout session",
|
|
963
966
|
{},
|
|
@@ -965,199 +968,202 @@ function uo({ portalUrlId: n }) {
|
|
|
965
968
|
);
|
|
966
969
|
}
|
|
967
970
|
await V();
|
|
968
|
-
},
|
|
971
|
+
}, is = (e) => {
|
|
969
972
|
const t = [e == null ? void 0 : e.apiError, e == null ? void 0 : e.error].find(A);
|
|
970
973
|
if (t) {
|
|
971
|
-
if (
|
|
972
|
-
|
|
974
|
+
if (J(t, "checkout_session.status")) {
|
|
975
|
+
Ce({ isPaid: !1 });
|
|
973
976
|
return;
|
|
974
977
|
}
|
|
975
978
|
if (t.statusCode === 409) {
|
|
976
|
-
|
|
979
|
+
os();
|
|
977
980
|
return;
|
|
978
981
|
}
|
|
979
|
-
if (
|
|
980
|
-
|
|
982
|
+
if (J(t, "payment_acceptor_id")) {
|
|
983
|
+
Oe.value = void 0, ke();
|
|
981
984
|
return;
|
|
982
985
|
}
|
|
983
|
-
if (
|
|
986
|
+
if (J(t, "checkout_session.version"))
|
|
984
987
|
return V(), "PRICE_CHANGED";
|
|
985
988
|
}
|
|
986
|
-
},
|
|
987
|
-
var i, r, d,
|
|
988
|
-
const e = (r = (i =
|
|
989
|
-
return (f =
|
|
990
|
-
(
|
|
991
|
-
var
|
|
992
|
-
return !!t && ((
|
|
989
|
+
}, at = p(() => {
|
|
990
|
+
var i, r, d, _, g, E, f;
|
|
991
|
+
const e = (r = (i = l.value) == null ? void 0 : i.invoices) == null ? void 0 : r[0], t = ((_ = (d = m.value) == null ? void 0 : d.payment) == null ? void 0 : _.customer_reference) ?? (e == null ? void 0 : e.customer_reference), o = ((E = (g = m.value) == null ? void 0 : g.payment) == null ? void 0 : E.customer_id) ?? (e == null ? void 0 : e.customer_id);
|
|
992
|
+
return (f = m.value) == null ? void 0 : f.customers.find(
|
|
993
|
+
(h) => {
|
|
994
|
+
var b;
|
|
995
|
+
return !!t && ((b = h.customer) == null ? void 0 : b.reference) === t || !!o && h.customer_id === o;
|
|
993
996
|
}
|
|
994
997
|
);
|
|
995
|
-
}),
|
|
996
|
-
var r, d,
|
|
997
|
-
const e =
|
|
998
|
+
}), oe = p(() => {
|
|
999
|
+
var r, d, _, g, E;
|
|
1000
|
+
const e = at.value, t = e == null ? void 0 : e.customer;
|
|
998
1001
|
if (t) {
|
|
999
1002
|
const f = ((r = t.organization) == null ? void 0 : r.registered_address) ?? ((d = t.individual) == null ? void 0 : d.residential_address);
|
|
1000
1003
|
return (f == null ? void 0 : f.country) || void 0;
|
|
1001
1004
|
}
|
|
1002
1005
|
if (!e) return;
|
|
1003
|
-
const
|
|
1004
|
-
if (!
|
|
1005
|
-
const i = "organization" in
|
|
1006
|
+
const o = (_ = H.value) == null ? void 0 : _.customer;
|
|
1007
|
+
if (!o) return;
|
|
1008
|
+
const i = "organization" in o ? (g = o.organization) == null ? void 0 : g.registered_address : (E = o.individual) == null ? void 0 : E.residential_address;
|
|
1006
1009
|
return (i == null ? void 0 : i.country) || void 0;
|
|
1007
|
-
}),
|
|
1008
|
-
var
|
|
1009
|
-
const e =
|
|
1010
|
-
if (e && !e.customer) return
|
|
1011
|
-
const t =
|
|
1012
|
-
return (t == null ? void 0 : t.form.value.country) ||
|
|
1010
|
+
}), as = p(() => {
|
|
1011
|
+
var o;
|
|
1012
|
+
const e = at.value;
|
|
1013
|
+
if (e && !e.customer) return oe.value;
|
|
1014
|
+
const t = N.value[e ? ((o = m.value) == null ? void 0 : o.customers.indexOf(e)) ?? 0 : 0];
|
|
1015
|
+
return (t == null ? void 0 : t.form.value.country) || oe.value;
|
|
1013
1016
|
});
|
|
1014
|
-
|
|
1017
|
+
ee(
|
|
1015
1018
|
[
|
|
1016
|
-
|
|
1017
|
-
|
|
1018
|
-
|
|
1019
|
+
B,
|
|
1020
|
+
I,
|
|
1021
|
+
oe,
|
|
1019
1022
|
() => {
|
|
1020
1023
|
var e, t;
|
|
1021
1024
|
return (t = (e = H.value) == null ? void 0 : e.billing_entity) == null ? void 0 : t.id;
|
|
1022
1025
|
},
|
|
1023
1026
|
() => {
|
|
1024
1027
|
var e, t;
|
|
1025
|
-
return (t = (e =
|
|
1028
|
+
return (t = (e = l.value) == null ? void 0 : e.total) == null ? void 0 : t.amount_incl_tax;
|
|
1026
1029
|
},
|
|
1027
1030
|
() => {
|
|
1028
1031
|
var e, t;
|
|
1029
|
-
return (t = (e =
|
|
1032
|
+
return (t = (e = l.value) == null ? void 0 : e.total) == null ? void 0 : t.currency;
|
|
1030
1033
|
}
|
|
1031
1034
|
],
|
|
1032
1035
|
() => {
|
|
1033
|
-
|
|
1036
|
+
B.value && I.value && ke();
|
|
1034
1037
|
}
|
|
1035
1038
|
);
|
|
1036
|
-
const
|
|
1037
|
-
paymentMethodOptions:
|
|
1038
|
-
isPaymentMethodsPending:
|
|
1039
|
-
hasPaymentMethodOptionsError:
|
|
1040
|
-
retryPaymentMethodOptions: () => void
|
|
1041
|
-
countryCode:
|
|
1042
|
-
authorizationContext:
|
|
1043
|
-
() =>
|
|
1039
|
+
const cs = {
|
|
1040
|
+
paymentMethodOptions: st,
|
|
1041
|
+
isPaymentMethodsPending: es,
|
|
1042
|
+
hasPaymentMethodOptionsError: ss,
|
|
1043
|
+
retryPaymentMethodOptions: () => void ke(),
|
|
1044
|
+
countryCode: as,
|
|
1045
|
+
authorizationContext: p(
|
|
1046
|
+
() => l.value ? {
|
|
1044
1047
|
type: "CHECKOUT_SESSION",
|
|
1045
1048
|
checkout_session: {
|
|
1046
|
-
portal_url_id:
|
|
1047
|
-
version:
|
|
1049
|
+
portal_url_id: s,
|
|
1050
|
+
version: l.value.checkout_session.version
|
|
1048
1051
|
}
|
|
1049
1052
|
} : void 0
|
|
1050
1053
|
),
|
|
1051
|
-
awaitCompletion: () => void
|
|
1052
|
-
recoverPaymentFailure:
|
|
1054
|
+
awaitCompletion: () => void Ce({ isPaid: !0 }),
|
|
1055
|
+
recoverPaymentFailure: is
|
|
1053
1056
|
};
|
|
1054
1057
|
return {
|
|
1055
1058
|
source: {
|
|
1056
1059
|
// The first section's copy, under the name the session gives it.
|
|
1057
|
-
subscription:
|
|
1060
|
+
subscription: p(() => {
|
|
1058
1061
|
var e;
|
|
1059
|
-
return ((e = Q.value[0]) == null ? void 0 : e.subscription) ??
|
|
1062
|
+
return ((e = Q.value[0]) == null ? void 0 : e.subscription) ?? v.value[0];
|
|
1060
1063
|
}),
|
|
1061
|
-
|
|
1062
|
-
|
|
1063
|
-
|
|
1064
|
-
|
|
1064
|
+
// An order shown without one of its plans would ask payment for what it does not show.
|
|
1065
|
+
hasSubscriptionLoadFailed: p(
|
|
1066
|
+
() => !!Ee.value || B.value && v.value.some((e) => !e)
|
|
1067
|
+
),
|
|
1068
|
+
orderMeterValues: p(() => ({})),
|
|
1069
|
+
chargedSchedules: Kt,
|
|
1070
|
+
planCustomizations: p(
|
|
1065
1071
|
() => Q.value.filter((e) => e !== void 0)
|
|
1066
1072
|
),
|
|
1067
1073
|
checkoutForm: X,
|
|
1068
|
-
customerForms:
|
|
1069
|
-
var
|
|
1070
|
-
const e = ((
|
|
1074
|
+
customerForms: p(() => {
|
|
1075
|
+
var o;
|
|
1076
|
+
const e = ((o = m.value) == null ? void 0 : o.customers) ?? [], t = e.filter(
|
|
1071
1077
|
({ effective_display: i }) => !Object.values(i).every((r) => r === "HIDDEN")
|
|
1072
1078
|
);
|
|
1073
1079
|
return e.flatMap((i, r) => {
|
|
1074
|
-
const d =
|
|
1080
|
+
const d = N.value[r];
|
|
1075
1081
|
return !i.customer || !d || !t.includes(i) ? [] : [
|
|
1076
1082
|
{
|
|
1077
1083
|
key: `${r}`,
|
|
1078
1084
|
form: d,
|
|
1079
1085
|
display: i.effective_display,
|
|
1080
1086
|
isTypeLocked: !0,
|
|
1081
|
-
...t.length > 1 && { title:
|
|
1087
|
+
...t.length > 1 && { title: Ct(i.customer) }
|
|
1082
1088
|
}
|
|
1083
1089
|
];
|
|
1084
1090
|
});
|
|
1085
1091
|
}),
|
|
1086
1092
|
isShippingAddressRequired: !1,
|
|
1087
1093
|
invoicePreview: H,
|
|
1088
|
-
invoiceSections:
|
|
1089
|
-
invoicePreviewByBillingPeriod:
|
|
1090
|
-
trialInvoicePreview:
|
|
1094
|
+
invoiceSections: Wt,
|
|
1095
|
+
invoicePreviewByBillingPeriod: p(() => ({})),
|
|
1096
|
+
trialInvoicePreview: p(() => {
|
|
1091
1097
|
}),
|
|
1092
|
-
trialPeriod:
|
|
1098
|
+
trialPeriod: p(() => {
|
|
1093
1099
|
}),
|
|
1094
|
-
isInvoicePreviewPending:
|
|
1095
|
-
isInvoicePreviewStale:
|
|
1096
|
-
isInvoicePreviewFailed:
|
|
1100
|
+
isInvoicePreviewPending: p(() => Ft.value || y.value),
|
|
1101
|
+
isInvoicePreviewStale: Se,
|
|
1102
|
+
isInvoicePreviewFailed: fe,
|
|
1097
1103
|
loadInvoicePreview: () => V(),
|
|
1098
|
-
settleInvoicePreview:
|
|
1099
|
-
amount:
|
|
1100
|
-
recurringAmount:
|
|
1101
|
-
hasOneOffCharges:
|
|
1104
|
+
settleInvoicePreview: Xt,
|
|
1105
|
+
amount: et,
|
|
1106
|
+
recurringAmount: Jt,
|
|
1107
|
+
hasOneOffCharges: p(() => {
|
|
1102
1108
|
var e;
|
|
1103
|
-
return ((e =
|
|
1109
|
+
return ((e = tt.value) == null ? void 0 : e.hasOneOff) ?? !1;
|
|
1104
1110
|
}),
|
|
1105
|
-
pricingCurrency:
|
|
1111
|
+
pricingCurrency: p(() => {
|
|
1106
1112
|
var e, t;
|
|
1107
|
-
return (t = (e =
|
|
1113
|
+
return (t = (e = l.value) == null ? void 0 : e.total) == null ? void 0 : t.currency;
|
|
1108
1114
|
}),
|
|
1109
|
-
promotionCode:
|
|
1110
|
-
payment:
|
|
1111
|
-
canPay:
|
|
1112
|
-
isPaid:
|
|
1113
|
-
successUrl:
|
|
1114
|
-
cancelUrl:
|
|
1115
|
+
promotionCode: Ye(() => Ge.value),
|
|
1116
|
+
payment: cs,
|
|
1117
|
+
canPay: Zt,
|
|
1118
|
+
isPaid: S,
|
|
1119
|
+
successUrl: Je,
|
|
1120
|
+
cancelUrl: p(
|
|
1115
1121
|
() => {
|
|
1116
1122
|
var e;
|
|
1117
|
-
return
|
|
1123
|
+
return vt(qe((e = m.value) == null ? void 0 : e.cancel_url) ?? "") || void 0;
|
|
1118
1124
|
}
|
|
1119
1125
|
),
|
|
1120
|
-
note:
|
|
1126
|
+
note: p(() => {
|
|
1121
1127
|
var e;
|
|
1122
|
-
return (e =
|
|
1128
|
+
return (e = m.value) == null ? void 0 : e.note;
|
|
1123
1129
|
})
|
|
1124
1130
|
},
|
|
1125
1131
|
/** What the screen that lists every customer and subscription reads. */
|
|
1126
1132
|
portalUrl: u,
|
|
1127
|
-
session:
|
|
1128
|
-
preview:
|
|
1129
|
-
|
|
1130
|
-
isOpen:
|
|
1131
|
-
missingFields:
|
|
1132
|
-
endState:
|
|
1133
|
-
isRedirecting:
|
|
1134
|
-
loadFailure:
|
|
1133
|
+
session: m,
|
|
1134
|
+
preview: l,
|
|
1135
|
+
plans: v,
|
|
1136
|
+
isOpen: I,
|
|
1137
|
+
missingFields: O,
|
|
1138
|
+
endState: We,
|
|
1139
|
+
isRedirecting: Ze,
|
|
1140
|
+
loadFailure: Ee
|
|
1135
1141
|
};
|
|
1136
1142
|
}
|
|
1137
|
-
const
|
|
1143
|
+
const pn = { class: "sv-checkout-ended flex min-h-96 w-full items-center justify-center" }, mn = { class: "max-w-sm" }, Te = /* @__PURE__ */ xe({
|
|
1138
1144
|
__name: "CheckoutSessionEnded",
|
|
1139
1145
|
props: {
|
|
1140
1146
|
reason: { type: String },
|
|
1141
1147
|
status: { type: String },
|
|
1142
1148
|
isRedirecting: { type: Boolean }
|
|
1143
1149
|
},
|
|
1144
|
-
setup(
|
|
1145
|
-
const
|
|
1150
|
+
setup(s) {
|
|
1151
|
+
const n = s, { $t: a } = Nt(), c = () => a({
|
|
1146
1152
|
defaultMessage: "Contact customer support if you think this is a mistake.",
|
|
1147
1153
|
description: "Shown below the notice that an element is no longer available",
|
|
1148
1154
|
id: "portal.not_available.description"
|
|
1149
|
-
}),
|
|
1155
|
+
}), u = p(() => n.status === "COMPLETED" ? {
|
|
1150
1156
|
title: a({
|
|
1151
1157
|
defaultMessage: "This checkout has been completed",
|
|
1152
1158
|
id: "checkout_session.ended.completed_title",
|
|
1153
1159
|
description: "Shown in place of a checkout that the customer already paid for"
|
|
1154
1160
|
}),
|
|
1155
|
-
message:
|
|
1161
|
+
message: n.isRedirecting ? a({
|
|
1156
1162
|
defaultMessage: "Taking you back…",
|
|
1157
1163
|
id: "checkout_session.ended.redirecting_message",
|
|
1158
1164
|
description: "Shown under the completed checkout notice while the page goes to the shop"
|
|
1159
1165
|
}) : void 0
|
|
1160
|
-
} :
|
|
1166
|
+
} : n.status === "FAILED" ? {
|
|
1161
1167
|
title: a({
|
|
1162
1168
|
defaultMessage: "We received your payment",
|
|
1163
1169
|
id: "checkout_session.ended.failed_title",
|
|
@@ -1168,7 +1174,7 @@ const lo = { class: "sv-checkout-ended flex min-h-96 w-full items-center justify
|
|
|
1168
1174
|
id: "checkout_session.ended.failed_message",
|
|
1169
1175
|
description: "Shown under the notice that the payment was received while the account is being set up"
|
|
1170
1176
|
})
|
|
1171
|
-
} :
|
|
1177
|
+
} : n.status === "PROCESSING" ? {
|
|
1172
1178
|
title: a({
|
|
1173
1179
|
defaultMessage: "We are processing your payment",
|
|
1174
1180
|
id: "checkout_session.ended.processing_title",
|
|
@@ -1179,14 +1185,14 @@ const lo = { class: "sv-checkout-ended flex min-h-96 w-full items-center justify
|
|
|
1179
1185
|
id: "checkout_session.ended.processing_message",
|
|
1180
1186
|
description: "Shown under the notice that the payment is still being processed"
|
|
1181
1187
|
})
|
|
1182
|
-
} :
|
|
1188
|
+
} : n.reason === "expired" ? {
|
|
1183
1189
|
title: a({
|
|
1184
1190
|
defaultMessage: "This checkout link has expired",
|
|
1185
1191
|
id: "checkout_session.ended.expired_title",
|
|
1186
1192
|
description: "Shown in place of a checkout whose link has expired"
|
|
1187
1193
|
}),
|
|
1188
1194
|
message: c()
|
|
1189
|
-
} :
|
|
1195
|
+
} : n.reason === "revoked" ? {
|
|
1190
1196
|
title: a({
|
|
1191
1197
|
defaultMessage: "This checkout is no longer available",
|
|
1192
1198
|
id: "checkout_session.ended.revoked_title",
|
|
@@ -1201,68 +1207,68 @@ const lo = { class: "sv-checkout-ended flex min-h-96 w-full items-center justify
|
|
|
1201
1207
|
}),
|
|
1202
1208
|
message: c()
|
|
1203
1209
|
});
|
|
1204
|
-
return (
|
|
1205
|
-
|
|
1206
|
-
|
|
1210
|
+
return (l, v) => (R(), ds("div", pn, [
|
|
1211
|
+
ps("div", mn, [
|
|
1212
|
+
bt(w(mt), {
|
|
1207
1213
|
variant: "heading-1",
|
|
1208
1214
|
class: "sv-checkout-ended__title"
|
|
1209
1215
|
}, {
|
|
1210
|
-
default:
|
|
1211
|
-
pt(
|
|
1216
|
+
default: ce(() => [
|
|
1217
|
+
dt(pt(u.value.title), 1)
|
|
1212
1218
|
]),
|
|
1213
1219
|
_: 1
|
|
1214
1220
|
}),
|
|
1215
|
-
|
|
1221
|
+
u.value.message ? (R(), $(w(mt), ms({
|
|
1216
1222
|
key: 0,
|
|
1217
1223
|
variant: "body-sm",
|
|
1218
1224
|
color: "subtle",
|
|
1219
1225
|
class: "sv-checkout-ended__message"
|
|
1220
|
-
},
|
|
1221
|
-
default:
|
|
1222
|
-
pt(
|
|
1226
|
+
}, s.isRedirecting && s.status === "COMPLETED" ? { role: "status" } : {}), {
|
|
1227
|
+
default: ce(() => [
|
|
1228
|
+
dt(pt(u.value.message), 1)
|
|
1223
1229
|
]),
|
|
1224
1230
|
_: 1
|
|
1225
1231
|
}, 16)) : _s("", !0)
|
|
1226
1232
|
])
|
|
1227
1233
|
]));
|
|
1228
1234
|
}
|
|
1229
|
-
}),
|
|
1235
|
+
}), _n = /* @__PURE__ */ xe({
|
|
1230
1236
|
__name: "SessionCheckout",
|
|
1231
1237
|
props: {
|
|
1232
1238
|
configuration: { type: Object },
|
|
1233
1239
|
portalUrlId: { type: String },
|
|
1234
1240
|
avatar: { type: String }
|
|
1235
1241
|
},
|
|
1236
|
-
setup(
|
|
1237
|
-
const
|
|
1242
|
+
setup(s) {
|
|
1243
|
+
const n = s;
|
|
1238
1244
|
It().info("COMPONENT_INITIALIZED", "Checkout session component initialized");
|
|
1239
|
-
const { source: a, endState: c, isRedirecting:
|
|
1240
|
-
portalUrlId:
|
|
1245
|
+
const { source: a, endState: c, isRedirecting: u, loadFailure: l } = dn({
|
|
1246
|
+
portalUrlId: n.portalUrlId
|
|
1241
1247
|
});
|
|
1242
|
-
return (
|
|
1243
|
-
var
|
|
1244
|
-
return (
|
|
1248
|
+
return (v, y) => {
|
|
1249
|
+
var S;
|
|
1250
|
+
return (S = w(l)) != null && S.reason ? (R(), $(Te, {
|
|
1245
1251
|
key: 0,
|
|
1246
1252
|
class: "sv-checkout sv-root sv-screen",
|
|
1247
|
-
reason:
|
|
1248
|
-
status:
|
|
1249
|
-
}, null, 8, ["reason", "status"])) :
|
|
1253
|
+
reason: w(l).reason,
|
|
1254
|
+
status: w(l).status
|
|
1255
|
+
}, null, 8, ["reason", "status"])) : w(l) ? (R(), $(Pt, {
|
|
1250
1256
|
key: 1,
|
|
1251
1257
|
class: "sv-checkout sv-root sv-screen sv-checkout--error"
|
|
1252
|
-
})) :
|
|
1258
|
+
})) : w(c) ? (R(), $(Te, {
|
|
1253
1259
|
key: 2,
|
|
1254
1260
|
class: "sv-checkout sv-root sv-screen",
|
|
1255
|
-
status:
|
|
1256
|
-
"is-redirecting":
|
|
1257
|
-
}, null, 8, ["status", "is-redirecting"])) : (R(), $(
|
|
1261
|
+
status: w(c),
|
|
1262
|
+
"is-redirecting": w(u)
|
|
1263
|
+
}, null, 8, ["status", "is-redirecting"])) : (R(), $(Ns, {
|
|
1258
1264
|
key: 3,
|
|
1259
|
-
source:
|
|
1260
|
-
configuration:
|
|
1261
|
-
avatar:
|
|
1265
|
+
source: w(a),
|
|
1266
|
+
configuration: s.configuration,
|
|
1267
|
+
avatar: s.avatar
|
|
1262
1268
|
}, null, 8, ["source", "configuration", "avatar"]));
|
|
1263
1269
|
};
|
|
1264
1270
|
}
|
|
1265
|
-
}),
|
|
1271
|
+
}), vn = /* @__PURE__ */ xe({
|
|
1266
1272
|
__name: "CheckoutSession.entry",
|
|
1267
1273
|
props: {
|
|
1268
1274
|
environment: { type: String },
|
|
@@ -1277,40 +1283,40 @@ const lo = { class: "sv-checkout-ended flex min-h-96 w-full items-center justify
|
|
|
1277
1283
|
branding: { type: Object },
|
|
1278
1284
|
portalObject: { type: null }
|
|
1279
1285
|
},
|
|
1280
|
-
setup(
|
|
1281
|
-
const
|
|
1282
|
-
return (a, c) => (R(), $(
|
|
1286
|
+
setup(s) {
|
|
1287
|
+
const n = Ss("checkout-session");
|
|
1288
|
+
return (a, c) => (R(), $(w(Es), {
|
|
1283
1289
|
entry: a.$props,
|
|
1284
|
-
"component-name":
|
|
1290
|
+
"component-name": w(n),
|
|
1285
1291
|
"allowed-portal-types": ["CHECKOUT_SESSION"]
|
|
1286
1292
|
}, {
|
|
1287
|
-
"portal-unavailable":
|
|
1288
|
-
|
|
1293
|
+
"portal-unavailable": ce(({ ending: u }) => [
|
|
1294
|
+
u ? (R(), $(Te, {
|
|
1289
1295
|
key: 0,
|
|
1290
1296
|
class: "sv-checkout sv-root sv-screen",
|
|
1291
|
-
reason:
|
|
1292
|
-
status:
|
|
1293
|
-
}, null, 8, ["reason", "status"])) : (R(), $(
|
|
1297
|
+
reason: u.reason,
|
|
1298
|
+
status: u.checkoutSessionStatus
|
|
1299
|
+
}, null, 8, ["reason", "status"])) : (R(), $(Pt, {
|
|
1294
1300
|
key: 1,
|
|
1295
1301
|
class: "sv-checkout sv-root sv-screen sv-checkout--error"
|
|
1296
1302
|
}))
|
|
1297
1303
|
]),
|
|
1298
|
-
default:
|
|
1299
|
-
var
|
|
1304
|
+
default: ce(() => {
|
|
1305
|
+
var u, l;
|
|
1300
1306
|
return [
|
|
1301
|
-
|
|
1302
|
-
"portal-url-id":
|
|
1303
|
-
avatar: ((
|
|
1307
|
+
bt(_n, {
|
|
1308
|
+
"portal-url-id": s.portalObject.id,
|
|
1309
|
+
avatar: ((l = (u = s.branding) == null ? void 0 : u.emblem) == null ? void 0 : l.public_url) ?? void 0
|
|
1304
1310
|
}, null, 8, ["portal-url-id", "avatar"])
|
|
1305
1311
|
];
|
|
1306
1312
|
}),
|
|
1307
1313
|
_: 1
|
|
1308
1314
|
}, 8, ["entry", "component-name"]));
|
|
1309
1315
|
}
|
|
1310
|
-
}), { define:
|
|
1311
|
-
|
|
1316
|
+
}), { define: Pn } = Os(
|
|
1317
|
+
vn,
|
|
1312
1318
|
"checkout-session"
|
|
1313
1319
|
);
|
|
1314
1320
|
export {
|
|
1315
|
-
|
|
1321
|
+
Pn as defineSolvimonCheckoutSession
|
|
1316
1322
|
};
|