@solvimon/solvimon-web 0.1.0-alpha.30 → 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.
Files changed (268) hide show
  1. package/README.md +152 -91
  2. package/dist/AddPaymentMethodModal-Cx203VXo.mjs +97 -0
  3. package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-BMHhLZnu.mjs +89 -0
  4. package/dist/{Alert.vue.es-ZPG49yR_.mjs → Alert.vue.es-DHJpiSdR.mjs} +1 -1
  5. package/dist/{Amount.vue.es-DPqHB8Xd.mjs → Amount.vue.es-CofcgmXt.mjs} +1 -1
  6. package/dist/AuthProvider.handle-BpFblzFx.mjs +46 -0
  7. package/dist/{Avatar.vue.es-geDQsZwu.mjs → Avatar.vue.es-CJdXXOiG.mjs} +1 -1
  8. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-BD84aBiU.mjs +64 -0
  9. package/dist/BillingInformationForm.lib-ad8B2Y1O.mjs +32 -0
  10. package/dist/BillingInformationForm.vue_vue_type_script_setup_true_lang-F5OVG0kO.mjs +340 -0
  11. package/dist/BillingInformationModal-Do3Fuu8A.mjs +85 -0
  12. package/dist/{Button.vue.es-j7iYlqtJ.mjs → Button.vue.es-CW7XfMBF.mjs} +1 -1
  13. package/dist/{ChargeOnDemandModal-CR01PkP_.mjs → ChargeOnDemandModal-B4ShPKLS.mjs} +46 -45
  14. package/dist/{Chip.vue.es-Dxx_0dte.mjs → Chip.vue.es-CYwWHyAT.mjs} +2 -2
  15. package/dist/CompanyPurchaseToggle.vue_vue_type_script_setup_true_lang-CVXHCSPb.mjs +510 -0
  16. package/dist/{Comparators.vue.es-DQBI3f7m.mjs → Comparators.vue.es-DYrKlE8t.mjs} +1 -1
  17. package/dist/{ContentWithAsideLayout-Bnbsq8_5.mjs → ContentWithAsideLayout-C2kFcft1.mjs} +1 -1
  18. package/dist/{ContextMenu.vue.es-BJO4U47Q.mjs → ContextMenu.vue.es-EXTx0NEt.mjs} +10 -10
  19. package/dist/{CustomerBillingInformation.vue.es-CmNpqcBw.mjs → CustomerBillingInformation.vue.es-CSKG6V3T.mjs} +3 -3
  20. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-DZZuAHIE.mjs +217 -0
  21. package/dist/CustomerShippingAddresses-Bdy4XWjE.mjs +282 -0
  22. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BEKwWob_.mjs +3124 -0
  23. package/dist/{DividerText.vue.es-BusbyeAI.mjs → DividerText.vue.es-Dq0JzI8C.mjs} +1 -1
  24. package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-wPma8Os-.mjs → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-3gf8pvR7.mjs} +3 -3
  25. package/dist/{ErrorNotification.vue.es-F068p7PY.mjs → ErrorNotification.vue.es-Cw7fqCg1.mjs} +2 -2
  26. package/dist/{FormMessage.vue.es-CwMQpIAW.mjs → FormMessage.vue.es-MrzQoSae.mjs} +1 -1
  27. package/dist/{IconButton.vue.es-D8DtBW9i.mjs → IconButton.vue.es-CpQbFw0x.mjs} +2 -2
  28. package/dist/{IconTitle.vue.es-6VJtjJX2.mjs → IconTitle.vue.es-CcOIFjbE.mjs} +3 -3
  29. package/dist/{Input.vue.es-BLyHcmu4.mjs → Input.vue.es-Cd55vQri.mjs} +4 -4
  30. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Dl1vTzQD.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-CqkGCbvg.mjs} +2 -2
  31. package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-DYskT3r7.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-BUu5M_gx.mjs} +7 -7
  32. package/dist/{InvoicePreview.vue.es-Cpf66_xV.mjs → InvoicePreview.vue.es-DHh5wruk.mjs} +7 -7
  33. package/dist/{InvoicePricingClauseChip.vue.es-CDrAE901.mjs → InvoicePricingClauseChip.vue.es-ZSOBp1se.mjs} +4 -4
  34. package/dist/{Label.vue.es-es7ZUBSP.mjs → Label.vue.es-CB6G8Krh.mjs} +3 -3
  35. package/dist/LoadFailedNotice.vue_vue_type_script_setup_true_lang-BZCtO2Er.mjs +20 -0
  36. package/dist/{Modal.vue.es-eeR9FmvQ.mjs → Modal.vue.es-CJFTVFSZ.mjs} +138 -127
  37. package/dist/OrderSummaryInvoice.vue_vue_type_script_setup_true_lang-D0pwpqIC.mjs +789 -0
  38. package/dist/{PaymentCompletedCard.vue_vue_type_script_setup_true_lang-CrjVPks0.mjs → PaymentCompletedCard.vue_vue_type_script_setup_true_lang-D08Qpgb0.mjs} +2 -2
  39. package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-DyjzaTK1.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-dl52PYcq.mjs} +4 -4
  40. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-BHQrWy6r.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-D0priVnA.mjs} +3 -3
  41. package/dist/{PaymentHistoryBlock-CN42ewCn.mjs → PaymentHistoryBlock-BSXlneqM.mjs} +1 -1
  42. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-C3Y5fHvA.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CXy0XGpn.mjs} +5 -5
  43. package/dist/{PaymentIntegrationForm-D3Ye7LZ5.mjs → PaymentIntegrationForm-Diua0GGJ.mjs} +1 -1
  44. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CLlm_Q2j.mjs +161 -0
  45. package/dist/{PaymentIntegrationFormAdyen-Fm-diCCO.mjs → PaymentIntegrationFormAdyen-D4FP0Vj5.mjs} +302 -282
  46. package/dist/{PaymentIntegrationFormStripe-BANBL6za.mjs → PaymentIntegrationFormStripe-vFzF_sCJ.mjs} +126 -117
  47. package/dist/{PaymentMethod.vue.es-t3-VyoE8.mjs → PaymentMethod.vue.es-vs6SaZOh.mjs} +200 -150
  48. package/dist/{PaymentMethodForm-CqP3GoNj.mjs → PaymentMethodForm-Buhe0aRQ.mjs} +1 -1
  49. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-RPPdBw_e.mjs +165 -0
  50. package/dist/{PaymentMethodSelector.vue_vue_type_script_setup_true_lang-D5wmRuCf.mjs → PaymentMethodSelector.vue_vue_type_script_setup_true_lang-DprL5TR8.mjs} +7 -7
  51. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-DhkkiJaQ.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-BXbevI3r.mjs} +28 -26
  52. package/dist/PaymentMethodsModal-CnJP9UKp.mjs +192 -0
  53. package/dist/PlanCustomizationEditor-KHLSEUbb.mjs +864 -0
  54. package/dist/{PortalLinkUnverified-Cp60_kRJ.mjs → PortalLinkUnverified-DlZAkE93.mjs} +3 -3
  55. package/dist/{PortalNotAvailable-DzSQnfzw.mjs → PortalNotAvailable-CKIomNrm.mjs} +2 -2
  56. package/dist/{PricingGroupRangeInput.vue.es-Srq_3cga.mjs → PricingGroupRangeInput.vue.es-oHD-IT12.mjs} +8 -8
  57. package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-oRijnVnZ.mjs → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-wCW8YZHM.mjs} +16 -15
  58. package/dist/{RadioGroupExtended.vue.es-BbBMDf6l.mjs → RadioGroupExtended.vue.es-DsShmkKZ.mjs} +5 -5
  59. package/dist/Section.vue.es-DYmEtgBj.mjs +88 -0
  60. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-OM19NPBh.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-CANXYTzu.mjs} +2 -2
  61. package/dist/ShippingAddressForm.vue_vue_type_script_setup_true_lang-CJp6ddhZ.mjs +144 -0
  62. package/dist/ShippingAddressesModal-Gxv2KxaW.mjs +283 -0
  63. package/dist/{StepInput.vue.es-ieh4EuJ7.mjs → StepInput.vue.es-sqA-VSsn.mjs} +4 -4
  64. package/dist/SubscriptionCancellationModal-DfAZ_uW6.mjs +4 -0
  65. package/dist/SubscriptionCancellationModal.vue_vue_type_script_setup_true_lang-BlbiDNIu.mjs +240 -0
  66. package/dist/SubscriptionCancellationSuccess.vue_vue_type_script_setup_true_lang-C1ko2xvR.mjs +64 -0
  67. package/dist/SubscriptionDetails.entry.ce-CdWV-8WN.mjs +764 -0
  68. package/dist/{SubscriptionSchedules-DMxX3GpK.mjs → SubscriptionSchedules-BfdVn1XA.mjs} +1 -1
  69. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-C8q8Q6h5.mjs +5413 -0
  70. package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-qQ9gJOIs.mjs +90 -0
  71. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-CHlXP_2x.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-DYWjTzPV.mjs} +133 -108
  72. package/dist/Toggle.vue.es-S2g8WGY_.mjs +99 -0
  73. package/dist/{TooltipParagraph.vue.es-BES3zsYN.mjs → TooltipParagraph.vue.es-Bt-7LHr3.mjs} +18 -18
  74. package/dist/{TranslationOverride.vue_vue_type_script_setup_true_lang-BJmlNrXT.mjs → TranslationOverride.vue_vue_type_script_setup_true_lang-Cp_sFa52.mjs} +1 -1
  75. package/dist/TrialChip.vue.es-VZwQX079.mjs +47 -0
  76. package/dist/addonQuantity-D3bGVqjL.mjs +128 -0
  77. package/dist/adyen-CHgq2l6n.mjs +99 -0
  78. package/dist/adyenSdk-DUTO7xkT.mjs +63 -0
  79. package/dist/{api.es-qgvzNMU-.mjs → api.es-QaC926Xu.mjs} +2 -2
  80. package/dist/components/BillingInformation/BillingInformation.mjs +37 -41
  81. package/dist/components/BillingInformationForm/BillingInformationForm.mjs +45 -462
  82. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +33 -42
  83. package/dist/components/Invoice/Invoice.mjs +1087 -1019
  84. package/dist/components/InvoiceDetails/InvoiceDetails.mjs +38 -47
  85. package/dist/components/InvoiceHeader/InvoiceHeader.mjs +29 -34
  86. package/dist/components/InvoicesList/InvoicesList.mjs +33 -42
  87. package/dist/components/PaymentHistory/PaymentHistory.mjs +39 -48
  88. package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +56 -64
  89. package/dist/components/ShippingAddressForm/ShippingAddressForm.ce.d.ts +1 -0
  90. package/dist/components/ShippingAddressForm/ShippingAddressForm.mjs +212 -0
  91. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +34 -42
  92. package/dist/components/SubscriptionsList/SubscriptionsList.mjs +41 -50
  93. package/dist/components/WalletBalances/WalletBalances.mjs +46 -55
  94. package/dist/core/events.types.d.ts +1 -0
  95. package/dist/core/index.mjs +51 -34
  96. package/dist/{customElements-DK4GKNJG.mjs → customElements-B8c354Nu.mjs} +802 -768
  97. package/dist/{customer-lf6S5DBR.mjs → customer-CP-Wz7JO.mjs} +1 -1
  98. package/dist/{de-DE-Cyj_NtiI.mjs → de-DE-C9HrzHpE.mjs} +71 -5
  99. package/dist/{de-DE-UJ6X6jXu.mjs → de-DE-DAQmgEy5.mjs} +82 -19
  100. package/dist/{formControl-BZQLHnOO.mjs → formControl-C18sw44K.mjs} +275 -275
  101. package/dist/{formatting.es-RclXHhKo.mjs → formatting.es-DlJEzreG.mjs} +16 -13
  102. package/dist/{fr-FR-CRFoWQ7J.mjs → fr-FR-CHR3VWvd.mjs} +71 -5
  103. package/dist/{fr-FR-Cvvbkwlj.mjs → fr-FR-fz51-Ubw.mjs} +79 -16
  104. package/dist/{countryData.es-BegoD-cZ.mjs → getCountryNameByCode.es-OGxn_zT0.mjs} +7 -2
  105. package/dist/icon-sprite.svg.es-2S3rv8NW.mjs +4 -0
  106. package/dist/index.es-Bv55VtdE.mjs +633 -0
  107. package/dist/{index.es-BrVTOW5D.mjs → index.es-C7J3WGGo.mjs} +4 -4
  108. package/dist/index.mjs +37 -33
  109. package/dist/invoices-I7PghcPV.mjs +143 -0
  110. package/dist/{it-IT-DnJP5URH.mjs → it-IT-BpCkTMZL.mjs} +73 -10
  111. package/dist/{it-IT-DObZEc-U.mjs → it-IT-Dzc7DmmL.mjs} +71 -5
  112. package/dist/{nl-NL-q9xfTZF0.mjs → nl-NL-22C8OcIM.mjs} +79 -16
  113. package/dist/{nl-NL-C02xHilF.mjs → nl-NL-Dut_QwsY.mjs} +71 -5
  114. package/dist/paymentIntegrationFormLoaders-BFMAMpcA.mjs +31 -0
  115. package/dist/{paymentMethods-8w-ccfY_.mjs → paymentMethods-aGKIi7DS.mjs} +22 -21
  116. package/dist/{paymentOutcome-B6sW1eCV.mjs → paymentOutcome-Cv7hTFVu.mjs} +1 -1
  117. package/dist/paymentRedirect-DaS8Kccc.mjs +66 -0
  118. package/dist/payments-BKoKpoLN.mjs +71 -0
  119. package/dist/preloadPaymentIntegrationForms-Buwal_JR.mjs +9 -0
  120. package/dist/pricing-Y-7ELzN-.mjs +42 -0
  121. package/dist/{pricingItem.es-bCPArbTa.mjs → pricingItem.es-BafitMMY.mjs} +1 -1
  122. package/dist/pricingPlanScheduleOverrides-CGm_-jJq.mjs +291 -0
  123. package/dist/randomUuid-BE_IQ-aq.mjs +10 -0
  124. package/dist/screens/Checkout/Checkout.mjs +1098 -3
  125. package/dist/screens/CheckoutSession/CheckoutSession.ce.d.ts +1 -0
  126. package/dist/screens/CheckoutSession/CheckoutSession.mjs +1322 -0
  127. package/dist/screens/CustomerOverview/CustomerOverview.mjs +209 -133
  128. package/dist/screens/PayInvoice/PayInvoice.mjs +283 -275
  129. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +92 -97
  130. package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +2 -2
  131. package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +915 -404
  132. package/dist/{subscription-BwzkagDI.mjs → subscription-DQ5mRp_e.mjs} +10 -10
  133. package/dist/subscriptions-B7dNqi1C.mjs +99 -0
  134. package/dist/timePeriod.es-R9U0wLlB.mjs +13 -0
  135. package/dist/types/components/customer/BillingInformationForm/BillingInformationForm.types.d.ts +11 -14
  136. package/dist/types/components/customer/CheckoutForm/CheckoutAddressFields.types.d.ts +2 -9
  137. package/dist/types/components/customer/CheckoutForm/CheckoutForm.types.d.ts +10 -0
  138. package/dist/types/components/customer/CustomerPaymentMethodsBlock/CustomerPaymentMethodsBlock.types.d.ts +6 -0
  139. package/dist/types/components/payments/AddPaymentMethodModal/AddPaymentMethodModal.types.d.ts +17 -0
  140. package/dist/types/components/payments/ExpressPaymentMethod/ExpressPaymentMethodApplePay.types.d.ts +3 -2
  141. package/dist/types/components/payments/ExpressPaymentMethods/ExpressPaymentMethods.types.d.ts +3 -2
  142. package/dist/types/components/payments/OnDemandPaymentModalShell/OnDemandPaymentModalShell.types.d.ts +2 -0
  143. package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +12 -1
  144. package/dist/types/components/payments/PaymentMethodsList/PaymentMethodsList.types.d.ts +2 -0
  145. package/dist/types/components/payments/PaymentMethodsModal/PaymentMethodsModal.types.d.ts +22 -0
  146. package/dist/types/components/providers/ActionDispatchProvider/ActionDispatchProvider.lib.types.d.ts +1 -1
  147. package/dist/types/components/providers/AuthProvider/AuthProvider.vue.d.ts +7 -1
  148. package/dist/types/components/providers/EntryProvider/EntryProvider.types.d.ts +2 -2
  149. package/dist/types/components/providers/EntryProvider/EntryProvider.vue.d.ts +3 -11
  150. package/dist/types/components/providers/ErrorBoundary/ErrorBoundary.vue.d.ts +1 -5
  151. package/dist/types/components/providers/HostElementProvider/HostElementProvider.lib.d.ts +11 -0
  152. package/dist/types/components/providers/HostElementProvider/composables/useHostEvent.d.ts +12 -0
  153. package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +5 -4
  154. package/dist/types/components/providers/PortalProvider/PortalProvider.lib.d.ts +3 -3
  155. package/dist/types/components/providers/PortalProvider/PortalProvider.types.d.ts +3 -3
  156. package/dist/types/components/providers/PortalProvider/PortalProvider.vue.d.ts +6 -1
  157. package/dist/types/components/providers/PortalProvider/composables/usePortal.d.ts +1 -0
  158. package/dist/types/components/providers/Provider/Provider.types.d.ts +10 -3
  159. package/dist/types/components/providers/Provider/Provider.vue.d.ts +3 -14
  160. package/dist/types/components/subscriptions/ChargeOnDemandModal/ChargeOnDemandModal.types.d.ts +1 -1
  161. package/dist/types/components/subscriptions/OrderSummary.types.d.ts +14 -0
  162. package/dist/types/components/subscriptions/OrderSummaryInvoice.types.d.ts +14 -1
  163. package/dist/types/components/subscriptions/PlanCustomizationForm/PlanCustomizationEditor.types.d.ts +9 -0
  164. package/dist/types/components/subscriptions/PlanCustomizationForm/SeatsEditor.types.d.ts +4 -0
  165. package/dist/types/components/subscriptions/PlanCustomizationForm/SeatsEditorItem.types.d.ts +2 -0
  166. package/dist/types/components/subscriptions/PlanCustomizationForm/UnitsEditor.types.d.ts +4 -0
  167. package/dist/types/components/subscriptions/PlanCustomizationForm/UnitsEditorItem.types.d.ts +2 -0
  168. package/dist/types/components/subscriptions/SubscriptionCancellationSuccess/SubscriptionCancellationSuccess.types.d.ts +4 -0
  169. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementForm.types.d.ts +10 -9
  170. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementSuccess.types.d.ts +5 -0
  171. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagementSummary.types.d.ts +3 -0
  172. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionPlanChangeSummary.types.d.ts +4 -0
  173. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionPlanSelector.types.d.ts +7 -0
  174. package/dist/types/components/subscriptions/SubscriptionsList/SubscriptionsList.types.d.ts +1 -0
  175. package/dist/types/components/subscriptions/SubscriptionsList/SubscriptionsListItem.types.d.ts +1 -0
  176. package/dist/types/components/wallets/AutoTopUpModal/AutoTopUpModal.types.d.ts +3 -1
  177. package/dist/types/index.d.ts +5 -1
  178. package/dist/types/public/components/BillingInformation/BillingInformation.types.d.ts +5 -0
  179. package/dist/types/public/components/BillingInformationForm/BillingInformationForm.entry.types.d.ts +1 -2
  180. package/dist/types/public/components/CustomerPaymentMethods/CustomerPaymentMethods.types.d.ts +6 -2
  181. package/dist/types/public/components/Invoice/Invoice.types.d.ts +7 -7
  182. package/dist/types/public/components/InvoiceHeader/InvoiceHeader.types.d.ts +2 -2
  183. package/dist/types/public/components/InvoicesList/InvoicesList.types.d.ts +6 -7
  184. package/dist/types/public/components/PaymentMethodForm/PaymentMethodForm.entry.types.d.ts +1 -1
  185. package/dist/types/public/components/PaymentMethodForm/PaymentMethodForm.types.d.ts +19 -14
  186. package/dist/types/public/components/ShippingAddressForm/ShippingAddressForm.entry.ce.d.ts +1 -0
  187. package/dist/types/public/components/ShippingAddressForm/ShippingAddressForm.entry.types.d.ts +6 -0
  188. package/dist/types/public/components/ShippingAddressForm/ShippingAddressForm.types.d.ts +5 -0
  189. package/dist/types/public/components/SubscriptionsList/SubscriptionsList.types.d.ts +10 -1
  190. package/dist/types/public/core/action-request.types.d.ts +18 -24
  191. package/dist/types/public/core/events.types.d.ts +99 -0
  192. package/dist/types/public/core/index.d.ts +3 -1
  193. package/dist/types/public/core/types.d.ts +11 -2
  194. package/dist/types/public/screens/Checkout/Checkout.entry.types.d.ts +1 -7
  195. package/dist/types/public/screens/Checkout/Checkout.source.types.d.ts +151 -0
  196. package/dist/types/public/screens/Checkout/Checkout.types.d.ts +7 -30
  197. package/dist/types/public/screens/CheckoutSession/CheckoutSession.entry.ce.d.ts +1 -0
  198. package/dist/types/public/screens/CheckoutSession/CheckoutSession.entry.types.d.ts +3 -0
  199. package/dist/types/public/screens/CustomerOverview/CustomerOverview.types.d.ts +8 -2
  200. package/dist/types/public/screens/PayInvoice/PayInvoice.types.d.ts +0 -6
  201. package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.configuration.types.d.ts +2 -19
  202. package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.types.d.ts +2 -3
  203. package/dist/types/public/screens/SubscriptionManagement/SubscriptionManagement.types.d.ts +2 -1
  204. package/dist/types/services/paymentMethods.types.d.ts +12 -1
  205. package/dist/types/types/EntryBaseProps.d.ts +10 -6
  206. package/dist/types/types/branding.d.ts +15 -0
  207. package/dist/types/types/checkoutSession.d.ts +199 -0
  208. package/dist/types/types/errors.d.ts +2 -0
  209. package/dist/types/types/pricingPlanGroup.d.ts +25 -0
  210. package/dist/{useActionDispatchProvider-ChAHdwR8.mjs → useActionDispatchProvider-BCtk-FGU.mjs} +1 -1
  211. package/dist/useAddressFormats-CtE4QaVU.mjs +1998 -0
  212. package/dist/useCheckoutForm-BhXcmnUi.mjs +3355 -0
  213. package/dist/{useCustomer-CTMhg1nd.mjs → useCustomer-mQysxUwp.mjs} +2 -2
  214. package/dist/useDefaultPaymentMethod-Dliq6_Yw.mjs +39 -0
  215. package/dist/useExperimentalFeature-Bw6bBtay.mjs +6 -0
  216. package/dist/useHostEvent-MtRG6W2B.mjs +12 -0
  217. package/dist/{useIncrementalLoading-CBVutPH8.mjs → useIncrementalLoading-CJSj1945.mjs} +2 -2
  218. package/dist/{useInvoiceData-qUGbBAQK.mjs → useInvoiceData-BEZIvw32.mjs} +2 -2
  219. package/dist/{useInvoicesList-wJvZAJpW.mjs → useInvoicesList-CrXjsmei.mjs} +140 -138
  220. package/dist/{sorting.es-C0pdMgX0.mjs → useIsMounted.es-BNPhTTHE.mjs} +11 -10
  221. package/dist/{useLoadInitialData-UvfYXgbi.mjs → useLoadInitialData-Bomj_1mo.mjs} +1 -1
  222. package/dist/usePaymentFormHold-CYZ4BdOw.mjs +19 -0
  223. package/dist/{usePaymentMethodAvailability-35l4pWdH.mjs → usePaymentMethodAvailability-DR_neLeZ.mjs} +4 -4
  224. package/dist/usePaymentMethodOptions-CuHoQx3K.mjs +67 -0
  225. package/dist/{usePaymentMethods-De7hlLHo.mjs → usePaymentMethods-BDdetXts.mjs} +2 -2
  226. package/dist/{usePayments-hWS7fnOx.mjs → usePayments-B5Z9Kfbv.mjs} +20 -18
  227. package/dist/usePortal-DuLR5Mid.mjs +14 -0
  228. package/dist/{useService-BwzIBIRp.mjs → useService-2aOFBTxU.mjs} +1 -1
  229. package/dist/useShippingAddresses-BvThNpez.mjs +122 -0
  230. package/dist/useSubscription-Dzo-kBpQ.mjs +35 -0
  231. package/dist/useSubscriptionActions-CWaNRoZ7.mjs +44 -0
  232. package/dist/useWatchDebounced-DkXgKe0E.mjs +20 -0
  233. package/dist/{wallets.es-eH2C2ygn.mjs → wallets.es-DRlUVd2R.mjs} +1 -1
  234. package/package.json +41 -11
  235. package/dist/AuthProvider.handle-SRR_04XS.mjs +0 -50
  236. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-nqKbgY7G.mjs +0 -58
  237. package/dist/Checkout.entry.ce-CopWuLJC.mjs +0 -4169
  238. package/dist/CheckoutAddressFields.vue_vue_type_script_setup_true_lang-CEnM1uxK.mjs +0 -828
  239. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Jyb5ZN3s.mjs +0 -136
  240. package/dist/CustomerShippingAddresses-BRPukhRI.mjs +0 -397
  241. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DJnr5D56.mjs +0 -2936
  242. package/dist/OrderSummaryInvoice.vue_vue_type_script_setup_true_lang-B_FpibLA.mjs +0 -441
  243. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-D07SEP8a.mjs +0 -181
  244. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-CMRMbL3d.mjs +0 -161
  245. package/dist/PlanCustomizationEditor-B76UNEMm.mjs +0 -791
  246. package/dist/Section.vue.es-Oqn1wGPZ.mjs +0 -72
  247. package/dist/ShippingAddressesModal-c7nqf4Ny.mjs +0 -418
  248. package/dist/SubscriptionDetails.entry.ce-uYv45FGH.mjs +0 -1044
  249. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DXro_64f.mjs +0 -5200
  250. package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-BZNsqN4G.mjs +0 -203
  251. package/dist/TrialChip.vue.es-C51z1ZiA.mjs +0 -35
  252. package/dist/addonQuantity-CCVaA3e-.mjs +0 -758
  253. package/dist/adyenSdk-B01MB9Ia.mjs +0 -58
  254. package/dist/getCountryNameByCode.es-BDHua7VM.mjs +0 -8
  255. package/dist/icon-sprite.svg.es-BWBB8SGw.mjs +0 -4
  256. package/dist/invoices-DdREPDXV.mjs +0 -123
  257. package/dist/paymentMethods-Goa25rTs.mjs +0 -61
  258. package/dist/payments-CKpU1K3t.mjs +0 -68
  259. package/dist/pricing-CEaZGgKe.mjs +0 -29
  260. package/dist/pricingPlanScheduleOverrides-BBp-DmpV.mjs +0 -233
  261. package/dist/pricingPlanSchedules-DSMptcAh.mjs +0 -38
  262. package/dist/subscriptions-B5bH8hsI.mjs +0 -66
  263. package/dist/taxId.es-e6NEvprh.mjs +0 -243
  264. package/dist/types/components/payments/ExpressPaymentMethodButton/ExpressPaymentMethodButton.types.d.ts +0 -3
  265. package/dist/useCustomerFormLabels-D4oDnfxA.mjs +0 -1173
  266. package/dist/usePaymentFormHold-Cwdr-vyc.mjs +0 -181
  267. package/dist/usePortal-DUfD6hrA.mjs +0 -7
  268. package/dist/useTimePeriod.es-BUorDLVK.mjs +0 -93
@@ -1,5 +1,1100 @@
1
- import { d as m } from "../../Checkout.entry.ce-CopWuLJC.mjs";
2
- import "../../customElements-DK4GKNJG.mjs";
1
+ import { ref as E, computed as N, shallowRef as Ge, watch as ee, onMounted as Ve, nextTick as Ke, toValue as ke, defineComponent as Oe, openBlock as Te, createBlock as Me, unref as Ce, withCtx as se, createVNode as Se, createSlots as Xe, renderSlot as Ye } from "vue";
2
+ import { u as He, w as Ze, a as We, _ as xe } from "../../useCheckoutForm-BhXcmnUi.mjs";
3
+ import { e as ie, m as $e, a as Je, C as je, j as ze, k as Qe, l as qe } from "../../customElements-B8c354Nu.mjs";
4
+ import { t as Ue } from "../../CompanyPurchaseToggle.vue_vue_type_script_setup_true_lang-CVXHCSPb.mjs";
5
+ import { e as Le } from "../../formControl-C18sw44K.mjs";
6
+ import { i as Ae, h as ei, j as ce, k as ii, D as oi, e as ti, t as ni } from "../../useAddressFormats-CtE4QaVU.mjs";
7
+ import { c as ri } from "../../subscriptions-B7dNqi1C.mjs";
8
+ import { A as k } from "../../ApiStatus-CSFKl_ra.mjs";
9
+ import { c as ai } from "../../timePeriod.es-R9U0wLlB.mjs";
10
+ import { a as si } from "../../useService-2aOFBTxU.mjs";
11
+ import { j as $, k as Fe } from "../../subscription-DQ5mRp_e.mjs";
12
+ import { c as ci } from "../../invoices-I7PghcPV.mjs";
13
+ import { u as li } from "../../usePaymentMethodOptions-CuHoQx3K.mjs";
14
+ import { a as ui, b as di, c as De } from "../../addonQuantity-D3bGVqjL.mjs";
15
+ import { s as pi } from "../../OrderSummaryInvoice.vue_vue_type_script_setup_true_lang-D0pwpqIC.mjs";
16
+ import { h as mi, g as vi } from "../../paymentRedirect-DaS8Kccc.mjs";
17
+ import { r as fi } from "../../randomUuid-BE_IQ-aq.mjs";
18
+ import { u as gi } from "../../usePortal-DuLR5Mid.mjs";
19
+ const _i = [
20
+ "companyLegalName",
21
+ "firstName",
22
+ "infix",
23
+ "lastName",
24
+ "addressLine1",
25
+ "addressLine2",
26
+ "postalCode",
27
+ "city",
28
+ "state",
29
+ "companyVatNumber",
30
+ "promotionCode",
31
+ "shippingAddressLine1",
32
+ "shippingAddressLine2",
33
+ "shippingPostalCode",
34
+ "shippingCity",
35
+ "shippingState",
36
+ "shippingPhoneNumber",
37
+ "shippingFirstName",
38
+ "shippingLastName",
39
+ "shippingAttentionName"
40
+ ], Pi = /^\d{1,9}$/, we = (e) => typeof e == "object" && e !== null && !Array.isArray(e);
41
+ function Ne(e) {
42
+ if (!Array.isArray(e)) return;
43
+ const i = e.flatMap(
44
+ (r) => we(r) && typeof r.pricing_item_config_id == "string" && typeof r.number == "string" && Pi.test(r.number) ? [{ pricing_item_config_id: r.pricing_item_config_id, number: r.number }] : []
45
+ );
46
+ return i.length === e.length ? i : void 0;
47
+ }
48
+ function hi(e) {
49
+ if (!we(e)) return {};
50
+ const i = {};
51
+ _i.forEach((o) => {
52
+ const c = e[o];
53
+ typeof c == "string" && (i[o] = c);
54
+ }), typeof e.email == "string" && Le.$validator(e.email, {}, {}) && (i.email = e.email), typeof e.country == "string" && Ae(e.country) && (i.country = e.country), typeof e.shippingCountry == "string" && Ae(e.shippingCountry) && (i.shippingCountry = e.shippingCountry), typeof e.billingAddressSameAsShipping == "boolean" && (i.billingAddressSameAsShipping = e.billingAddressSameAsShipping), (e.type === "INDIVIDUAL" || e.type === "ORGANIZATION") && (i.type = e.type);
55
+ const r = Ne(e.seatsValues);
56
+ r && (i.seatsValues = r);
57
+ const l = Ne(e.unitsValues);
58
+ return l && (i.unitsValues = l), Array.isArray(e.enabledPricingIds) && e.enabledPricingIds.every((o) => typeof o == "string") && (i.enabledPricingIds = e.enabledPricingIds), i;
59
+ }
60
+ const yi = {
61
+ AD: "EUR",
62
+ AE: "AED",
63
+ AF: "AFN",
64
+ AG: "XCD",
65
+ AI: "XCD",
66
+ AL: "ALL",
67
+ AM: "AMD",
68
+ AO: "AOA",
69
+ AR: "ARS",
70
+ AS: "USD",
71
+ AT: "EUR",
72
+ AU: "AUD",
73
+ AW: "AWG",
74
+ AX: "EUR",
75
+ AZ: "AZN",
76
+ BA: "BAM",
77
+ BB: "BBD",
78
+ BD: "BDT",
79
+ BE: "EUR",
80
+ BF: "XOF",
81
+ BG: "BGN",
82
+ BH: "BHD",
83
+ BI: "BIF",
84
+ BJ: "XOF",
85
+ BL: "EUR",
86
+ BM: "BMD",
87
+ BN: "BND",
88
+ BO: "BOB",
89
+ BQ: "USD",
90
+ BR: "BRL",
91
+ BS: "BSD",
92
+ BT: "BTN",
93
+ BV: "NOK",
94
+ BW: "BWP",
95
+ BY: "BYN",
96
+ BZ: "BZD",
97
+ CA: "CAD",
98
+ CC: "AUD",
99
+ CD: "CDF",
100
+ CF: "XAF",
101
+ CG: "XAF",
102
+ CH: "CHF",
103
+ CI: "XOF",
104
+ CK: "NZD",
105
+ CL: "CLP",
106
+ CM: "XAF",
107
+ CN: "CNY",
108
+ CO: "COP",
109
+ CR: "CRC",
110
+ CU: "CUP",
111
+ CV: "CVE",
112
+ CW: "ANG",
113
+ CX: "AUD",
114
+ CY: "EUR",
115
+ CZ: "CZK",
116
+ DE: "EUR",
117
+ DJ: "DJF",
118
+ DK: "DKK",
119
+ DM: "XCD",
120
+ DO: "DOP",
121
+ DZ: "DZD",
122
+ EC: "USD",
123
+ EE: "EUR",
124
+ EG: "EGP",
125
+ EH: "MAD",
126
+ ER: "ERN",
127
+ ES: "EUR",
128
+ ET: "ETB",
129
+ FI: "EUR",
130
+ FJ: "FJD",
131
+ FK: "FKP",
132
+ FM: "USD",
133
+ FO: "DKK",
134
+ FR: "EUR",
135
+ GA: "XAF",
136
+ GB: "GBP",
137
+ GD: "XCD",
138
+ GE: "GEL",
139
+ GF: "EUR",
140
+ GG: "GBP",
141
+ GH: "GHS",
142
+ GI: "GIP",
143
+ GL: "DKK",
144
+ GM: "GMD",
145
+ GN: "GNF",
146
+ GP: "EUR",
147
+ GQ: "XAF",
148
+ GR: "EUR",
149
+ GS: "GBP",
150
+ GT: "GTQ",
151
+ GU: "USD",
152
+ GW: "XOF",
153
+ GY: "GYD",
154
+ HK: "HKD",
155
+ HM: "AUD",
156
+ HN: "HNL",
157
+ HR: "EUR",
158
+ HT: "HTG",
159
+ HU: "HUF",
160
+ ID: "IDR",
161
+ IE: "EUR",
162
+ IL: "ILS",
163
+ IM: "GBP",
164
+ IN: "INR",
165
+ IO: "USD",
166
+ IQ: "IQD",
167
+ IR: "IRR",
168
+ IS: "ISK",
169
+ IT: "EUR",
170
+ JE: "GBP",
171
+ JM: "JMD",
172
+ JO: "JOD",
173
+ JP: "JPY",
174
+ KE: "KES",
175
+ KG: "KGS",
176
+ KH: "KHR",
177
+ KI: "AUD",
178
+ KM: "KMF",
179
+ KN: "XCD",
180
+ KP: "KPW",
181
+ KR: "KRW",
182
+ KW: "KWD",
183
+ KY: "KYD",
184
+ KZ: "KZT",
185
+ LA: "LAK",
186
+ LB: "LBP",
187
+ LC: "XCD",
188
+ LI: "CHF",
189
+ LK: "LKR",
190
+ LR: "LRD",
191
+ LS: "LSL",
192
+ LT: "EUR",
193
+ LU: "EUR",
194
+ LV: "EUR",
195
+ LY: "LYD",
196
+ MA: "MAD",
197
+ MC: "EUR",
198
+ MD: "MDL",
199
+ ME: "EUR",
200
+ MF: "EUR",
201
+ MG: "MGA",
202
+ MH: "USD",
203
+ MK: "MKD",
204
+ ML: "XOF",
205
+ MM: "MMK",
206
+ MN: "MNT",
207
+ MO: "MOP",
208
+ MP: "USD",
209
+ MQ: "EUR",
210
+ MR: "MRU",
211
+ MS: "XCD",
212
+ MT: "EUR",
213
+ MU: "MUR",
214
+ MV: "MVR",
215
+ MW: "MWK",
216
+ MX: "MXN",
217
+ MY: "MYR",
218
+ MZ: "MZN",
219
+ NA: "NAD",
220
+ NC: "XPF",
221
+ NE: "XOF",
222
+ NF: "AUD",
223
+ NG: "NGN",
224
+ NI: "NIO",
225
+ NL: "EUR",
226
+ NO: "NOK",
227
+ NP: "NPR",
228
+ NR: "AUD",
229
+ NU: "NZD",
230
+ NZ: "NZD",
231
+ OM: "OMR",
232
+ PA: "PAB",
233
+ PE: "PEN",
234
+ PF: "XPF",
235
+ PG: "PGK",
236
+ PH: "PHP",
237
+ PK: "PKR",
238
+ PL: "PLN",
239
+ PM: "EUR",
240
+ PN: "NZD",
241
+ PR: "USD",
242
+ PS: "ILS",
243
+ PT: "EUR",
244
+ PW: "USD",
245
+ PY: "PYG",
246
+ QA: "QAR",
247
+ RE: "EUR",
248
+ RO: "RON",
249
+ RS: "RSD",
250
+ RU: "RUB",
251
+ RW: "RWF",
252
+ SA: "SAR",
253
+ SB: "SBD",
254
+ SC: "SCR",
255
+ SD: "SDG",
256
+ SE: "SEK",
257
+ SG: "SGD",
258
+ SH: "SHP",
259
+ SI: "EUR",
260
+ SJ: "NOK",
261
+ SK: "EUR",
262
+ SL: "SLE",
263
+ SM: "EUR",
264
+ SN: "XOF",
265
+ SO: "SOS",
266
+ SR: "SRD",
267
+ SS: "SSP",
268
+ ST: "STN",
269
+ SV: "USD",
270
+ SX: "ANG",
271
+ SY: "SYP",
272
+ SZ: "SZL",
273
+ TC: "USD",
274
+ TD: "XAF",
275
+ TF: "EUR",
276
+ TG: "XOF",
277
+ TH: "THB",
278
+ TJ: "TJS",
279
+ TK: "NZD",
280
+ TL: "USD",
281
+ TM: "TMT",
282
+ TN: "TND",
283
+ TO: "TOP",
284
+ TR: "TRY",
285
+ TT: "TTD",
286
+ TV: "AUD",
287
+ TW: "TWD",
288
+ TZ: "TZS",
289
+ UA: "UAH",
290
+ UG: "UGX",
291
+ US: "USD",
292
+ UY: "UYU",
293
+ UZ: "UZS",
294
+ VA: "EUR",
295
+ VC: "XCD",
296
+ VE: "VES",
297
+ VG: "USD",
298
+ VI: "USD",
299
+ VN: "VND",
300
+ VU: "VUV",
301
+ WF: "XPF",
302
+ WS: "WST",
303
+ YE: "YER",
304
+ YT: "EUR",
305
+ ZA: "ZAR",
306
+ ZM: "ZMW",
307
+ ZW: "ZWL"
308
+ }, Ii = (e) => {
309
+ if (e)
310
+ return yi[e];
311
+ }, Ei = ({
312
+ country: e,
313
+ pricingCurrencySettings: i,
314
+ fallbackCurrency: r
315
+ }) => {
316
+ const l = Ii(e), o = (i == null ? void 0 : i.pricing_currencies) ?? [];
317
+ return l && o.includes(l) ? l : (i == null ? void 0 : i.default_pricing_currency) ?? r ?? l;
318
+ }, Ci = "preview", Si = "NL", be = (e) => {
319
+ var i, r;
320
+ if ("organization" in e)
321
+ return (i = e.organization) == null ? void 0 : i.registered_address;
322
+ if ("individual" in e)
323
+ return (r = e.individual) == null ? void 0 : r.residential_address;
324
+ }, Ai = (e) => {
325
+ const i = be(e);
326
+ return {
327
+ ...(i == null ? void 0 : i.line1) && { line1: i.line1 },
328
+ ...(i == null ? void 0 : i.line2) && { line2: i.line2 },
329
+ ...(i == null ? void 0 : i.city) && { city: i.city },
330
+ ...(i == null ? void 0 : i.state) && { state: i.state },
331
+ country: (i == null ? void 0 : i.country) || Si,
332
+ ...(i == null ? void 0 : i.postal_code) && { postal_code: i.postal_code }
333
+ };
334
+ }, Di = (e) => {
335
+ var l, o;
336
+ const i = Ai(e), r = e.type ?? "INDIVIDUAL";
337
+ if (r === "ORGANIZATION") {
338
+ const c = "organization" in e ? e.organization : void 0, s = (o = (l = c == null ? void 0 : c.tax_ids) == null ? void 0 : l[0]) == null ? void 0 : o.id;
339
+ return {
340
+ type: r,
341
+ organization: {
342
+ legal_name: (c == null ? void 0 : c.legal_name) || Ci,
343
+ registered_address: i,
344
+ ...s && {
345
+ tax_id: Ue.$validator(s, {}, {}) ? s : void 0
346
+ }
347
+ }
348
+ };
349
+ }
350
+ return {
351
+ type: r,
352
+ individual: {
353
+ residential_address: i
354
+ }
355
+ };
356
+ }, Be = (e, i) => {
357
+ var r, l, o;
358
+ return Ei({
359
+ country: (r = be(i)) == null ? void 0 : r.country,
360
+ pricingCurrencySettings: (o = (l = $({
361
+ pricingPlanScheduleInfos: e.pricing_plan_schedule_infos ?? [],
362
+ type: "DEFAULT"
363
+ })) == null ? void 0 : l.pricing_plan_version) == null ? void 0 : o.pricing_currency_settings,
364
+ fallbackCurrency: e.billing_currency
365
+ });
366
+ }, Ni = () => {
367
+ const { getInvoicePreview: e } = ci(), i = ie(), r = E(), l = E(), o = E(), c = E({}), s = E(k.Initial), v = E({}), T = E(), h = (m) => `${m.type}:${m.value}`;
368
+ let d = 0, g = Promise.resolve(), P = () => {
369
+ }, y = new Promise((m) => P = m);
370
+ const p = (m) => {
371
+ const S = ++d;
372
+ return g = L(m, S), P(), y = new Promise((F) => P = F), g;
373
+ }, C = async () => {
374
+ for (; ; ) {
375
+ const m = g;
376
+ if (await Promise.race([
377
+ m.then(
378
+ () => !0,
379
+ (F) => {
380
+ if (m === g) throw F;
381
+ return !1;
382
+ }
383
+ ),
384
+ y.then(() => !1)
385
+ ]) && m === g) return;
386
+ }
387
+ }, L = async ({
388
+ subscription: m,
389
+ subscriptionStartAt: S,
390
+ customer: F = {},
391
+ seatsValues: J,
392
+ unitsValues: oe,
393
+ enabledPricingIds: X,
394
+ promotionCode: V
395
+ }, b) => {
396
+ var x, z, Q, Y, q;
397
+ const te = Di(F);
398
+ s.value = k.Loading;
399
+ const B = $({
400
+ pricingPlanScheduleInfos: m.pricing_plan_schedule_infos,
401
+ type: "DEFAULT"
402
+ }), n = (x = B == null ? void 0 : B.pricing_plan_version) == null ? void 0 : x.pricing_currency_settings, ne = (((z = n == null ? void 0 : n.pricing_currencies) == null ? void 0 : z.length) ?? 0) > 1, Z = ((Y = (Q = B == null ? void 0 : B.pricing_plan_version) == null ? void 0 : Q.billing_period_settings) == null ? void 0 : Y.billing_periods) ?? [], W = Z.length > 0 ? Z.map(({ period: R }) => R) : m.billing_period ? [m.billing_period] : [], j = Be(m, F);
403
+ if (!W.length) {
404
+ i.warn("INVOICE_PREVIEW_SKIPPED", "No billing period to preview an invoice for", {
405
+ subscriptionId: m.id
406
+ }), s.value = k.Done;
407
+ return;
408
+ }
409
+ const re = m.billing_period ? h(m.billing_period) : h(W[0]), K = W.map(async (R) => {
410
+ var f;
411
+ const M = h(R), G = Fe({
412
+ enabledPricings: X == null ? void 0 : X.map((u) => ({
413
+ pricing_id: u
414
+ })),
415
+ seatsValues: J,
416
+ unitsValues: oe,
417
+ pricingPlanScheduleInfos: m.pricing_plan_schedule_infos,
418
+ pricingCurrency: ne ? j : void 0,
419
+ // Required by the API whenever the version has billing period settings.
420
+ billingPeriod: Z.length > 0 ? R : void 0
421
+ }) ?? [];
422
+ if (V) {
423
+ const u = (f = m.pricing_plan_schedule_infos.find(
424
+ ({ pricing_plan_schedule: _ }) => _.type === "DEFAULT"
425
+ )) == null ? void 0 : f.id;
426
+ if (u) {
427
+ const _ = G.find(
428
+ ({ pricing_plan_schedule_id: O }) => O === u
429
+ );
430
+ _ ? _.promotion_codes = [V] : G.push({
431
+ pricing_plan_schedule_id: u,
432
+ promotion_codes: [V]
433
+ });
434
+ }
435
+ }
436
+ const D = {
437
+ pricingPlanSubscriptionId: m.id,
438
+ startAt: S,
439
+ customizations: G,
440
+ customer: te
441
+ }, t = v.value[M];
442
+ if (t && si(D, t))
443
+ return { periodKey: M, payload: D, response: void 0 };
444
+ const a = await e(D);
445
+ return { periodKey: M, payload: D, response: a };
446
+ });
447
+ try {
448
+ const R = await Promise.all(K);
449
+ if (b !== d) return g;
450
+ const M = {
451
+ ...c.value
452
+ }, G = { ...v.value }, D = m.pricing_plan_schedule_infos.find(
453
+ ({ pricing_plan_schedule: a }) => a.type === "TRIAL"
454
+ ), t = (q = m.pricing_plan_schedule_infos.find(
455
+ ({ pricing_plan_schedule: a }) => a.type === "DEFAULT"
456
+ )) == null ? void 0 : q.id;
457
+ R.forEach(({ periodKey: a, payload: f, response: u }) => {
458
+ var U;
459
+ if (!u) return;
460
+ G[a] = f, T.value = (U = u.invoice_infos.at(-1)) == null ? void 0 : U.pricing_plan_schedule_id, D && (l.value = u.first_invoice, D.start_at && D.end_at && (r.value = ai(
461
+ new Date(D.start_at),
462
+ new Date(D.end_at)
463
+ )));
464
+ const _ = u.invoice_infos.find(
465
+ ({ pricing_plan_schedule_id: I }) => I === t
466
+ ), O = _ == null ? void 0 : _.invoices[0];
467
+ O && (M[a] = O);
468
+ }), v.value = G, c.value = M, o.value = M[re], s.value = k.Done;
469
+ } catch (R) {
470
+ if (i.error(
471
+ "INVOICE_PREVIEW_FAILED",
472
+ "Failed to load the invoice preview",
473
+ { preview: "CHECKOUT" },
474
+ R
475
+ ), b !== d) return g;
476
+ throw s.value = k.Failed, R;
477
+ }
478
+ };
479
+ return {
480
+ loadInvoicePreview: p,
481
+ invoicePreview: o,
482
+ invoicePreviewByBillingPeriod: c,
483
+ trialInvoicePreview: l,
484
+ trialPeriod: r,
485
+ lastPreviewScheduleId: T,
486
+ isPending: N(() => s.value === k.Loading),
487
+ isFailed: N(() => s.value === k.Failed),
488
+ /** Settles as the preview asked for last does, however many take over meanwhile. */
489
+ whenLoaded: C
490
+ };
491
+ }, Ri = "solvimon_checkout_redirect_state", Oi = "solvimon_checkout_redirect_state:", Ti = 3600 * 1e3;
492
+ function Mi(e) {
493
+ return typeof e == "object" && e !== null && "savedAt" in e && typeof e.savedAt == "number" && "form" in e;
494
+ }
495
+ function Ui(e, i) {
496
+ if (!e || !i) return;
497
+ const r = new Map(
498
+ e.map(({ pricing_item_config_id: o, number: c }) => [o, c])
499
+ ), l = new Set(
500
+ i.map(({ pricing_item_config_id: o }) => o)
501
+ );
502
+ if (![...r.keys()].some((o) => !l.has(o)))
503
+ return i.map((o) => {
504
+ const c = Number(r.get(o.pricing_item_config_id)), s = Number(o.number);
505
+ return c > s ? { ...o, number: String(c) } : o;
506
+ });
507
+ }
508
+ function Re(e, i, r) {
509
+ const l = ({ pricing_item_config_id: s }) => r.has(s), o = (e == null ? void 0 : e.filter(l)) ?? [], c = Ui(
510
+ e == null ? void 0 : e.filter((s) => !l(s)),
511
+ i
512
+ );
513
+ return o.length ? [...c ?? i ?? [], ...o] : c;
514
+ }
515
+ const Li = 1e4;
516
+ function Fi({
517
+ initialCountry: e,
518
+ initialEmail: i,
519
+ subscriptionId: r,
520
+ enabledPricingIds: l,
521
+ isShippingAddressRequired: o
522
+ }) {
523
+ const c = ie(), s = (() => {
524
+ if (e) {
525
+ if (ei(e)) return e;
526
+ c.error("INVALID_COUNTRY_CODE", `invalid country code provided: "${e}"`);
527
+ }
528
+ })(), v = (() => {
529
+ if (i) {
530
+ if (Le.$validator(i, {}, {}) === !0) return i;
531
+ c.error("INVALID_EMAIL", "invalid email provided");
532
+ }
533
+ })(), T = E(!1), h = E(!1), d = E(), g = Ge({}), P = N(
534
+ () => d.value ? ui(
535
+ di(d.value, [
536
+ ...g.value.seatsValues ?? [],
537
+ ...g.value.unitsValues ?? []
538
+ ])
539
+ ) : /* @__PURE__ */ new Set()
540
+ ), { getSubscription: y } = ri(), p = Ni(), C = N(() => d.value && n.form.value.country && K.value), {
541
+ paymentMethodOptions: L,
542
+ get: m,
543
+ isPending: S,
544
+ error: F
545
+ } = li(), J = async (t, a) => {
546
+ try {
547
+ await m({
548
+ subscriptionId: d.value.id,
549
+ country: t,
550
+ amount: a
551
+ });
552
+ } catch (f) {
553
+ c.error(
554
+ "PAYMENT_METHOD_OPTIONS_LOAD_FAILED",
555
+ "Failed to load the payment methods that can be offered",
556
+ { flow: "CHECKOUT" },
557
+ f
558
+ );
559
+ }
560
+ }, oe = N(() => F.value !== null), X = () => {
561
+ const { country: t } = n.form.value;
562
+ !d.value || !t || !K.value || J(t, K.value);
563
+ }, V = () => ({
564
+ isShipped: !!o,
565
+ format: n.shippingAddressFormat.value
566
+ }), b = () => {
567
+ const t = n.form.value;
568
+ return p.loadInvoicePreview({
569
+ subscription: d.value,
570
+ customer: ce(t, V()),
571
+ seatsValues: t.seatsValues,
572
+ unitsValues: t.unitsValues,
573
+ enabledPricingIds: t.enabledPricingIds ?? l,
574
+ promotionCode: t.promotionCode
575
+ });
576
+ }, te = (t) => {
577
+ d.value && (d.value = { ...d.value, billing_period: t }, b().catch(() => {
578
+ }));
579
+ }, B = async (t) => {
580
+ const a = t.promotionCode ?? n.form.value.promotionCode, f = t.enabledPricingIds ?? n.form.value.enabledPricingIds, u = { ...n.form.value, ...t };
581
+ return await p.loadInvoicePreview({
582
+ subscription: d.value,
583
+ customer: ce(u, V()),
584
+ seatsValues: u.seatsValues,
585
+ unitsValues: u.unitsValues,
586
+ enabledPricingIds: f,
587
+ promotionCode: a
588
+ }), {
589
+ trialInvoicePreview: p.trialInvoicePreview.value,
590
+ invoicePreview: p.invoicePreview.value
591
+ };
592
+ }, n = He({
593
+ isShippingAddressRequired: o,
594
+ initialState: {
595
+ country: s,
596
+ email: v
597
+ },
598
+ onRequiredFieldChange: () => {
599
+ d.value && b().catch(() => {
600
+ });
601
+ }
602
+ }), ne = async () => {
603
+ var O, U, I, w;
604
+ const t = await y({
605
+ id: r,
606
+ expanded: !0
607
+ }), a = $({
608
+ pricingPlanScheduleInfos: t.pricing_plan_schedule_infos,
609
+ type: "DEFAULT"
610
+ }), f = (w = (I = (U = (O = a == null ? void 0 : a.pricing_plan_version) == null ? void 0 : O.billing_period_settings) == null ? void 0 : U.billing_periods) == null ? void 0 : I[0]) == null ? void 0 : w.period;
611
+ d.value = {
612
+ ...t,
613
+ billing_period: f ?? t.billing_period
614
+ };
615
+ const u = De("seats", a), _ = De("units", a);
616
+ g.value = { seatsValues: u, unitsValues: _ }, n.updateInitialState({
617
+ ...n.form.value,
618
+ enabledPricingIds: Ze(t, l),
619
+ ...u ? { seatsValues: u } : {},
620
+ ..._ ? { unitsValues: _ } : {}
621
+ });
622
+ };
623
+ let Z;
624
+ const W = () => Z ?? (Z = fi()), j = N(
625
+ () => d.value ? Be(
626
+ d.value,
627
+ ce(n.form.value, V())
628
+ ) : void 0
629
+ ), re = N(() => {
630
+ var ue, de, pe, me, ve, fe, ge, _e, Pe;
631
+ const t = n.form.value.firstName || n.form.value.infix || n.form.value.lastName ? {
632
+ ...n.form.value.firstName ? { first_name: n.form.value.firstName } : {},
633
+ ...n.form.value.infix ? { infix: n.form.value.infix } : {},
634
+ ...n.form.value.lastName ? { last_name: n.form.value.lastName } : {}
635
+ } : {}, a = {
636
+ ...n.form.value.addressLine1 && {
637
+ line1: n.form.value.addressLine1
638
+ },
639
+ ...n.form.value.addressLine2 && {
640
+ line2: n.form.value.addressLine2
641
+ },
642
+ ...n.form.value.city && { city: n.form.value.city },
643
+ ...n.form.value.postalCode && {
644
+ postal_code: n.form.value.postalCode
645
+ },
646
+ ...n.form.value.state && { state: n.form.value.state },
647
+ country: n.form.value.country ?? ""
648
+ }, f = o ? ii(n.form.value, "BILLING") : a, u = $({
649
+ pricingPlanScheduleInfos: ((ue = d.value) == null ? void 0 : ue.pricing_plan_schedule_infos) ?? [],
650
+ type: "DEFAULT"
651
+ }), _ = (de = u == null ? void 0 : u.pricing_plan_version) == null ? void 0 : de.pricing_currency_settings, O = (((pe = _ == null ? void 0 : _.pricing_currencies) == null ? void 0 : pe.length) ?? 0) > 1, U = !!((fe = (ve = (me = u == null ? void 0 : u.pricing_plan_version) == null ? void 0 : me.billing_period_settings) == null ? void 0 : ve.billing_periods) != null && fe.length), I = Fe({
652
+ enabledPricings: (ge = n.form.value.enabledPricingIds) == null ? void 0 : ge.map((H) => ({
653
+ pricing_id: H
654
+ })),
655
+ seatsValues: n.form.value.seatsValues,
656
+ unitsValues: n.form.value.unitsValues,
657
+ pricingPlanScheduleInfos: ((_e = d.value) == null ? void 0 : _e.pricing_plan_schedule_infos) ?? [],
658
+ pricingCurrency: O ? j.value : void 0,
659
+ billingPeriod: U ? (Pe = d.value) == null ? void 0 : Pe.billing_period : void 0
660
+ }), w = n.form.value.promotionCode, le = w && d.value ? (() => {
661
+ var ye, Ie, Ee;
662
+ const H = I ? [...I] : [], ae = ((ye = H[0]) == null ? void 0 : ye.pricing_plan_schedule_id) ?? ((Ee = $({
663
+ pricingPlanScheduleInfos: ((Ie = d.value) == null ? void 0 : Ie.pricing_plan_schedule_infos) ?? [],
664
+ type: "DEFAULT"
665
+ })) == null ? void 0 : Ee.id);
666
+ if (!ae)
667
+ return I;
668
+ const he = H.find(
669
+ ({ pricing_plan_schedule_id: A }) => A === ae
670
+ );
671
+ if (he)
672
+ he.promotion_codes = [w];
673
+ else {
674
+ const A = I == null ? void 0 : I[0];
675
+ H.push({
676
+ pricing_plan_schedule_id: ae,
677
+ ...(A == null ? void 0 : A.enabled_pricings) && {
678
+ enabled_pricings: A.enabled_pricings
679
+ },
680
+ ...(A == null ? void 0 : A.seats_values) && {
681
+ seats_values: A.seats_values
682
+ },
683
+ ...(A == null ? void 0 : A.units) && {
684
+ units: A.units
685
+ },
686
+ promotion_codes: [w]
687
+ });
688
+ }
689
+ return H;
690
+ })() : I;
691
+ return {
692
+ type: "INIT_PRICING_PLAN_SUBSCRIPTION",
693
+ init_pricing_plan_subscription: {
694
+ template_pricing_plan_subscription_id: r,
695
+ ...le && {
696
+ pricing_plan_schedule_customizations: le
697
+ },
698
+ ...o && {
699
+ shipping_address_details: ni(
700
+ n.form.value,
701
+ W(),
702
+ n.shippingAddressFormat.value
703
+ )
704
+ },
705
+ customer_details: {
706
+ email: n.form.value.email ?? "",
707
+ type: n.form.value.type,
708
+ ...n.form.value.type === "INDIVIDUAL" ? {
709
+ individual: {
710
+ residential_address: f,
711
+ ...t ? { name: t } : {}
712
+ }
713
+ } : {
714
+ organization: {
715
+ registered_address: f,
716
+ legal_name: n.form.value.companyLegalName ?? "",
717
+ ...n.form.value.companyVatNumber && ti(n.form.value) && Ue.$validator(n.form.value.companyVatNumber, {}, {}) ? {
718
+ tax_ids: [
719
+ {
720
+ id: n.form.value.companyVatNumber,
721
+ type: oi
722
+ }
723
+ ]
724
+ } : {}
725
+ }
726
+ }
727
+ }
728
+ }
729
+ };
730
+ }), K = N(() => {
731
+ var t, a;
732
+ return ((t = p.trialInvoicePreview.value) == null ? void 0 : t.invoice_amount_including_tax) ?? ((a = p.invoicePreview.value) == null ? void 0 : a.invoice_amount_including_tax);
733
+ }), x = N(
734
+ () => p.invoicePreview.value ? pi(p.invoicePreview.value) : void 0
735
+ ), z = N(() => {
736
+ var t;
737
+ return ((t = x.value) == null ? void 0 : t.hasOneOff) ?? !1;
738
+ }), Q = N(() => {
739
+ var a;
740
+ const t = x.value;
741
+ if (t)
742
+ return t.hasOneOff ? t.hasUnattributed ? void 0 : t.recurring.includingTax : (a = p.invoicePreview.value) == null ? void 0 : a.invoice_amount_including_tax;
743
+ });
744
+ ee(
745
+ [() => n.form.value.country, K],
746
+ ([t, a]) => {
747
+ !d.value || !t || !a || J(t, a);
748
+ }
749
+ );
750
+ const Y = `${Oi}${r}`, q = mi();
751
+ function R() {
752
+ const t = { savedAt: Date.now(), form: n.form.value };
753
+ try {
754
+ sessionStorage.setItem(Y, JSON.stringify(t));
755
+ } catch (a) {
756
+ c.warn(
757
+ "CHECKOUT_FORM_STATE_NOT_SAVED",
758
+ "Could not keep the checkout form for a redirect return",
759
+ {},
760
+ a
761
+ );
762
+ }
763
+ }
764
+ function M() {
765
+ try {
766
+ sessionStorage.removeItem(Y), sessionStorage.removeItem(Ri);
767
+ } catch {
768
+ }
769
+ }
770
+ function G() {
771
+ let t = null;
772
+ try {
773
+ t = sessionStorage.getItem(Y);
774
+ } catch {
775
+ return;
776
+ }
777
+ if (M(), !t || !q) return;
778
+ let a;
779
+ try {
780
+ a = JSON.parse(t);
781
+ } catch {
782
+ return;
783
+ }
784
+ if (!Mi(a)) return;
785
+ const f = Date.now() - a.savedAt;
786
+ if (f < 0 || f > Ti) return;
787
+ const u = hi(a.form);
788
+ return v && delete u.email, Object.keys(u).length ? u : void 0;
789
+ }
790
+ Ve(async () => {
791
+ const t = G();
792
+ t && n.updateInitialState(t);
793
+ try {
794
+ await ne();
795
+ } catch (a) {
796
+ h.value = !0, c.error(
797
+ "SUBSCRIPTION_LOAD_FAILED",
798
+ "Failed to load the subscription the checkout prices",
799
+ {},
800
+ a
801
+ );
802
+ return;
803
+ }
804
+ try {
805
+ await b();
806
+ } catch {
807
+ }
808
+ if (t) {
809
+ const { seatsValues: a, unitsValues: f, ...u } = t, { seatsValues: _, unitsValues: O } = g.value, U = P.value, I = Re(a, _, U), w = Re(f, O, U);
810
+ n.updateInitialState({
811
+ ...u,
812
+ ...I ? { seatsValues: I } : {},
813
+ ...w ? { unitsValues: w } : {}
814
+ });
815
+ }
816
+ });
817
+ const D = async () => {
818
+ if (!d.value) return "FAILED";
819
+ n.flushPreviewChange(), p.isFailed.value && b().catch(() => {
820
+ });
821
+ let t;
822
+ const a = new Promise((f) => {
823
+ t = setTimeout(() => f(!1), Li);
824
+ });
825
+ try {
826
+ if (!await Promise.race([
827
+ p.whenLoaded().then(() => !0),
828
+ a
829
+ ])) return "FAILED";
830
+ } catch {
831
+ return "FAILED";
832
+ } finally {
833
+ clearTimeout(t);
834
+ }
835
+ return await Ke(), n.isPreviewStale.value || p.isPending.value ? "CHANGED" : "SETTLED";
836
+ };
837
+ return ee(
838
+ C,
839
+ (t) => {
840
+ t && X();
841
+ },
842
+ { once: !0 }
843
+ ), {
844
+ /** What the host configured, once anything unusable has been dropped and reported. */
845
+ validatedEmail: v,
846
+ validatedCountry: s,
847
+ invoicePreview: p.invoicePreview,
848
+ invoicePreviewByBillingPeriod: p.invoicePreviewByBillingPeriod,
849
+ trialInvoicePreview: p.trialInvoicePreview,
850
+ trialPeriod: p.trialPeriod,
851
+ loadInvoicePreview: b,
852
+ changeBillingPeriod: te,
853
+ updateInvoicePreviewOnBillingInformationChange: B,
854
+ lastPreviewScheduleId: p.lastPreviewScheduleId,
855
+ paymentMethodOptions: L,
856
+ hasPaymentMethodOptionsError: oe,
857
+ retryPaymentMethodOptions: X,
858
+ isPaymentMethodsPending: S,
859
+ isInvoicePreviewPending: p.isPending,
860
+ isInvoicePreviewStale: n.isPreviewStale,
861
+ isInvoicePreviewFailed: p.isFailed,
862
+ hasSubscriptionLoadFailed: h,
863
+ settleInvoicePreview: D,
864
+ subscription: d,
865
+ orderMeterValues: g,
866
+ quantityAddonConfigIds: P,
867
+ checkoutForm: n,
868
+ authorizationContext: re,
869
+ pricingCurrency: j,
870
+ isPaid: T,
871
+ amount: K,
872
+ recurringAmount: Q,
873
+ hasOneOffCharges: z,
874
+ saveFormStateForRedirect: R,
875
+ clearSavedFormState: M
876
+ };
877
+ }
878
+ function wi({
879
+ checkoutForm: e,
880
+ updateInvoicePreviewOnBillingInformationChange: i,
881
+ formatErrorMessage: r,
882
+ onInvalidPromotionCode: l,
883
+ onApplyError: o
884
+ }) {
885
+ const c = ie(), s = E(!1), v = E(null), T = (P, y) => {
886
+ v.value = r ? r({ action: P, error: y }) : P === "apply" ? "Promotion code could not be applied. Please try again." : "Promotion code could not be removed. Please try again.";
887
+ };
888
+ let h = 0;
889
+ const d = async (P) => {
890
+ const y = P == null ? void 0 : P.trim();
891
+ if (!y)
892
+ return;
893
+ const p = ++h;
894
+ v.value = null, e.form.value.promotionCode = y, s.value = !0;
895
+ try {
896
+ await i({
897
+ promotionCode: y
898
+ });
899
+ } catch (C) {
900
+ if (p !== h) return;
901
+ const L = $e(C);
902
+ L ? c.warn(
903
+ "PROMOTION_CODE_REJECTED",
904
+ "The promotion code was not accepted",
905
+ {},
906
+ C
907
+ ) : c.capture(C, {
908
+ code: "PROMOTION_CODE_APPLY_FAILED",
909
+ message: "Failed to apply promotion code"
910
+ }), T("apply", C), o == null || o(), L && (l == null || l()), s.value = !1, g({ suppressError: !0, preserveErrorMessage: !0 });
911
+ return;
912
+ }
913
+ p === h && (s.value = !1);
914
+ }, g = async ({
915
+ suppressError: P = !1,
916
+ preserveErrorMessage: y = !1
917
+ } = {}) => {
918
+ const p = ++h;
919
+ y || (v.value = null), delete e.form.value.promotionCode, s.value = !0;
920
+ try {
921
+ await i({});
922
+ } catch (C) {
923
+ if (p !== h) return;
924
+ c.capture(C, {
925
+ code: "PROMOTION_CODE_REMOVE_FAILED",
926
+ message: "Failed to remove promotion code"
927
+ }), P || T("remove", C);
928
+ }
929
+ p === h && (s.value = !1);
930
+ };
931
+ return {
932
+ applyPromotionCode: d,
933
+ removePromotionCode: g,
934
+ isPromotionCodePending: s,
935
+ promotionCodeErrorMessage: v
936
+ };
937
+ }
938
+ function bi({
939
+ subscription: e,
940
+ promotionCode: i,
941
+ appliedPromotionCode: r,
942
+ applyPromotionCode: l
943
+ }) {
944
+ ee(
945
+ e,
946
+ (o) => {
947
+ const c = ke(i);
948
+ o && c && (r.value = c, l(c));
949
+ },
950
+ { once: !0 }
951
+ );
952
+ }
953
+ const Bi = /* @__PURE__ */ Oe({
954
+ __name: "LegacyCheckout",
955
+ props: {
956
+ configuration: { type: Object },
957
+ avatar: { type: String }
958
+ },
959
+ setup(e) {
960
+ var y, p, C, L, m;
961
+ const i = e, r = gi(), { $t: l } = Je();
962
+ if (ie().info("COMPONENT_INITIALIZED", "Checkout component initialized"), ((y = r.value) == null ? void 0 : y.type) !== "INIT_PRICING_PLAN_SUBSCRIPTION")
963
+ throw new je("INVALID_TOKEN", "Invalid token");
964
+ const o = (p = r.value) == null ? void 0 : p.init_pricing_plan_subscription, c = (o == null ? void 0 : o.use_shipping_addresses) === !0, s = Fi({
965
+ initialCountry: (C = i.configuration) == null ? void 0 : C.countryCode,
966
+ initialEmail: (L = i.configuration) == null ? void 0 : L.email,
967
+ subscriptionId: o == null ? void 0 : o.pricing_plan_subscription_id,
968
+ enabledPricingIds: (m = i.configuration) == null ? void 0 : m.enabledPricingIds,
969
+ isShippingAddressRequired: c
970
+ }), v = E(null);
971
+ ee(
972
+ () => s.checkoutForm.form.value.promotionCode,
973
+ (S) => {
974
+ v.value = S ?? null;
975
+ }
976
+ );
977
+ const {
978
+ applyPromotionCode: T,
979
+ removePromotionCode: h,
980
+ isPromotionCodePending: d,
981
+ promotionCodeErrorMessage: g
982
+ } = wi({
983
+ checkoutForm: s.checkoutForm,
984
+ updateInvoicePreviewOnBillingInformationChange: s.updateInvoicePreviewOnBillingInformationChange,
985
+ formatErrorMessage: ({ action: S }) => l(S === "apply" ? {
986
+ defaultMessage: "Promotion code could not be applied. Please try again.",
987
+ id: "checkout.promotion_code.apply_failed",
988
+ description: "Error message when applying a promotion code in checkout failed"
989
+ } : {
990
+ defaultMessage: "Promotion code could not be removed. Please try again.",
991
+ id: "checkout.promotion_code.remove_failed",
992
+ description: "Error message when removing a promotion code in checkout failed"
993
+ }),
994
+ onInvalidPromotionCode: () => {
995
+ v.value = null;
996
+ },
997
+ onApplyError: () => {
998
+ v.value = null;
999
+ }
1000
+ });
1001
+ bi({
1002
+ subscription: s.subscription,
1003
+ promotionCode: () => {
1004
+ var S;
1005
+ return (S = i.configuration) == null ? void 0 : S.couponCode;
1006
+ },
1007
+ appliedPromotionCode: v,
1008
+ applyPromotionCode: T
1009
+ });
1010
+ const P = {
1011
+ ...s,
1012
+ isShippingAddressRequired: c,
1013
+ promotionCode: {
1014
+ code: v,
1015
+ isPending: d,
1016
+ errorMessage: g,
1017
+ apply: T,
1018
+ remove: () => h()
1019
+ },
1020
+ payment: {
1021
+ paymentMethodOptions: s.paymentMethodOptions,
1022
+ isPaymentMethodsPending: s.isPaymentMethodsPending,
1023
+ hasPaymentMethodOptionsError: s.hasPaymentMethodOptionsError,
1024
+ retryPaymentMethodOptions: s.retryPaymentMethodOptions,
1025
+ authorizationContext: s.authorizationContext,
1026
+ updateInvoicePreviewOnBillingInformationChange: s.updateInvoicePreviewOnBillingInformationChange
1027
+ },
1028
+ successUrl: E(o == null ? void 0 : o.success_url),
1029
+ note: E(o == null ? void 0 : o.note)
1030
+ };
1031
+ return (S, F) => (Te(), Me(We, {
1032
+ source: P,
1033
+ configuration: e.configuration,
1034
+ avatar: e.avatar
1035
+ }, null, 8, ["configuration", "avatar"]));
1036
+ }
1037
+ }), Gi = 256, Vi = /^[^\s\p{C}]+$/u;
1038
+ function Ki(e) {
1039
+ const i = e == null ? void 0 : e.trim();
1040
+ if (!(!i || i.length > Gi || !Vi.test(i)))
1041
+ return i;
1042
+ }
1043
+ const ki = /* @__PURE__ */ Oe({
1044
+ __name: "Checkout.entry",
1045
+ props: {
1046
+ environment: { type: String },
1047
+ locale: { type: String },
1048
+ dateLocale: { type: String },
1049
+ messages: { type: Object },
1050
+ portalToken: { type: Object },
1051
+ experimentalFeatures: { type: Array },
1052
+ logLevel: { type: String },
1053
+ onLog: { type: Function },
1054
+ cssOverrides: { type: [String, Array] },
1055
+ branding: { type: Object },
1056
+ portalObject: { type: null },
1057
+ configuration: { type: Object }
1058
+ },
1059
+ setup(e) {
1060
+ const i = Qe("checkout"), r = e, l = N(
1061
+ () => {
1062
+ var o;
1063
+ return ((o = r.configuration) == null ? void 0 : o.couponCode) ?? Ki(vi("coupon_code"));
1064
+ }
1065
+ );
1066
+ return (o, c) => (Te(), Me(Ce(ze), {
1067
+ entry: o.$props,
1068
+ "component-name": Ce(i),
1069
+ "allowed-portal-types": ["INIT_PRICING_PLAN_SUBSCRIPTION"]
1070
+ }, {
1071
+ "portal-unavailable": se(() => [
1072
+ Se(xe, { class: "sv-checkout sv-root sv-screen sv-checkout--error" })
1073
+ ]),
1074
+ default: se(() => {
1075
+ var s, v;
1076
+ return [
1077
+ Se(Bi, {
1078
+ configuration: { ...e.configuration, couponCode: l.value },
1079
+ avatar: ((v = (s = e.branding) == null ? void 0 : s.emblem) == null ? void 0 : v.public_url) ?? void 0
1080
+ }, Xe({ _: 2 }, [
1081
+ o.$slots["terms-and-conditions"] ? {
1082
+ name: "terms-and-conditions",
1083
+ fn: se(() => [
1084
+ Ye(o.$slots, "terms-and-conditions")
1085
+ ]),
1086
+ key: "0"
1087
+ } : void 0
1088
+ ]), 1032, ["configuration", "avatar"])
1089
+ ];
1090
+ }),
1091
+ _: 3
1092
+ }, 8, ["entry", "component-name"]));
1093
+ }
1094
+ }), { define: ao } = qe(
1095
+ ki,
1096
+ "checkout"
1097
+ );
3
1098
  export {
4
- m as defineSolvimonCheckout
1099
+ ao as defineSolvimonCheckout
5
1100
  };