@solvimon/solvimon-web 0.1.0-alpha.23 → 0.1.0-alpha.24

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 (193) hide show
  1. package/README.md +41 -0
  2. package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-B70SyWOB.mjs → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DW10rozs.mjs} +6 -6
  3. package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-jXClPW91.js → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-jWthTJk-.js} +1 -1
  4. package/dist/{Avatar.vue.es-2E3laNRb.mjs → Avatar.vue.es-DzjFvLuK.mjs} +1 -1
  5. package/dist/{Avatar.vue.es-DdJreyr_.js → Avatar.vue.es-nr8srGuK.js} +1 -1
  6. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-D5EoBLhj.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-BptcwJMr.mjs} +4 -4
  7. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-ConpyC8n.js → BillingInformation.vue_vue_type_script_setup_true_lang-C1prOJay.js} +1 -1
  8. package/dist/{Button.vue.es-BJEy-e9C.mjs → Button.vue.es-PbJFK8z7.mjs} +1 -1
  9. package/dist/{Button.vue.es-CJNxYacb.js → Button.vue.es-TCF-bvDF.js} +1 -1
  10. package/dist/Checkout.entry.ce-D8O4qJ24.js +2 -0
  11. package/dist/Checkout.entry.ce-DHFx5Vnb.mjs +3900 -0
  12. package/dist/{Chip.vue.es-DLQ4QEPo.js → Chip.vue.es-CAoisngJ.js} +1 -1
  13. package/dist/{Chip.vue.es-DGbc4L_D.mjs → Chip.vue.es-DpcOM3Ai.mjs} +2 -2
  14. package/dist/ContentWithAsideLayout-BCM8tmZN.mjs +38 -0
  15. package/dist/ContentWithAsideLayout-RSdKXqAf.js +1 -0
  16. package/dist/{ContextMenu.vue.es-Bd2kmeVq.js → ContextMenu.vue.es-kzZ3JJHG.js} +1 -1
  17. package/dist/{ContextMenu.vue.es-DL1M7pcr.mjs → ContextMenu.vue.es-tAuFp-6i.mjs} +4 -4
  18. package/dist/{CustomerBillingInformation.vue.es-CE94ASC3.mjs → CustomerBillingInformation.vue.es-BQSl9q6W.mjs} +2 -2
  19. package/dist/{CustomerBillingInformation.vue.es-hiFzB43w.js → CustomerBillingInformation.vue.es-Nac6HgLo.js} +1 -1
  20. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BE21tqgW.js → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BOLf-U0A.js} +1 -1
  21. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Bhih7rPR.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-R47ln7Wb.mjs} +5 -5
  22. package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-C5zc9n64.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-CaNXS48v.mjs} +14 -14
  23. package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-D018AmFA.js → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-D_jcV7VG.js} +1 -1
  24. package/dist/{DividerText.vue.es-CFZUQ62L.mjs → DividerText.vue.es-CSE7a-T0.mjs} +1 -1
  25. package/dist/{DividerText.vue.es-CvCgHHXN.js → DividerText.vue.es-LJ2kZakb.js} +1 -1
  26. package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-YcaBJDzx.mjs → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-DeotDsFP.mjs} +4 -4
  27. package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-jTJGN4jb.js → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-GNPyrcAQ.js} +1 -1
  28. package/dist/{ErrorNotification.vue.es-DI2B7WiR.js → ErrorNotification.vue.es-BF6swP7o.js} +1 -1
  29. package/dist/{ErrorNotification.vue.es-B3mvv79S.mjs → ErrorNotification.vue.es-CVUuIt8Z.mjs} +1 -1
  30. package/dist/{IconButton.vue.es-Dp8h4YOx.js → IconButton.vue.es-CB1lIPao.js} +1 -1
  31. package/dist/{IconButton.vue.es-GLcGhoHC.mjs → IconButton.vue.es-DGflbWFk.mjs} +2 -2
  32. package/dist/{IconTitle.vue.es-CzuPQtOX.mjs → IconTitle.vue.es-BsdjyGlQ.mjs} +3 -3
  33. package/dist/{IconTitle.vue.es-DN9r6nfK.js → IconTitle.vue.es-CMO8EyQl.js} +1 -1
  34. package/dist/{Input.vue.es-5Cq8a7oH.mjs → Input.vue.es-BFbiFXsU.mjs} +2 -2
  35. package/dist/{Input.vue.es-DM81HeVv.js → Input.vue.es-CREdT4nB.js} +1 -1
  36. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-w8w52LcV.js → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BZ4D_-7E.js} +1 -1
  37. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-D75LSIL8.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Btv0rRk4.mjs} +2 -2
  38. package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-dRLsZPNh.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-CrZq0d1M.mjs} +2 -2
  39. package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-DB5h39LA.js → InvoiceEntryView.vue_vue_type_script_setup_true_lang-j-cNIRD_.js} +1 -1
  40. package/dist/{InvoiceSummary.vue.es-Qy99kLZs.js → InvoiceSummary.vue.es-BOnvORpf.js} +1 -1
  41. package/dist/{InvoiceSummary.vue.es-DbtqsTuP.mjs → InvoiceSummary.vue.es-JtOIQ6SJ.mjs} +7 -7
  42. package/dist/{Modal.vue.es-DgLl6XBV.js → Modal.vue.es-BbdtdxsO.js} +1 -1
  43. package/dist/{Modal.vue.es-Z2DWAN2u.mjs → Modal.vue.es-jT61xK_A.mjs} +5 -5
  44. package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-DBm51C7c.js → PaymentErrorCard.vue_vue_type_script_setup_true_lang-BBoZVnsK.js} +1 -1
  45. package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-DYuFPIqs.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-Dan29qmH.mjs} +4 -4
  46. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-CcdhYTB1.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-BJZHkTqA.mjs} +3 -3
  47. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-BNZ9-GW1.js → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-D34fD3Io.js} +1 -1
  48. package/dist/{PaymentHistoryBlock-DS1j-8m-.js → PaymentHistoryBlock-Dw2wOiAI.js} +1 -1
  49. package/dist/{PaymentHistoryBlock-CjP_514k.mjs → PaymentHistoryBlock-quvnCSFV.mjs} +1 -1
  50. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-Dr2jtJhK.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-5ckQd9eQ.mjs} +4 -4
  51. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CSTfMB8U.js → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-C0XIdBbx.js} +1 -1
  52. package/dist/{PaymentIntegrationForm-CpOZUf-W.mjs → PaymentIntegrationForm-CQjUZi22.mjs} +1 -1
  53. package/dist/{PaymentIntegrationForm-80b19Lkq.js → PaymentIntegrationForm-D1oJREmH.js} +1 -1
  54. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-De7h9-fH.js +1 -0
  55. package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BgztoQH5.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DnBLj1wZ.mjs} +43 -40
  56. package/dist/PaymentIntegrationFormAdyen-BQXXwpUK.js +98 -0
  57. package/dist/{PaymentIntegrationFormAdyen-BQcgDcik.mjs → PaymentIntegrationFormAdyen-CyZk9ofV.mjs} +307 -207
  58. package/dist/{PaymentIntegrationFormStripe-CMwLqOe6.js → PaymentIntegrationFormStripe-Bs4F7oK_.js} +2 -2
  59. package/dist/{PaymentIntegrationFormStripe-Dx1H3fZ2.mjs → PaymentIntegrationFormStripe-D-GaLHwc.mjs} +22 -21
  60. package/dist/{PaymentMethod.vue.es-EhRCfeax.mjs → PaymentMethod.vue.es-C0j580g7.mjs} +3 -3
  61. package/dist/{PaymentMethod.vue.es-pLCCzVxN.js → PaymentMethod.vue.es-CXV_ThBY.js} +1 -1
  62. package/dist/{PaymentMethodForm-D3OY8zK5.mjs → PaymentMethodForm-Bf2Ps6eV.mjs} +1 -1
  63. package/dist/{PaymentMethodForm-Bw2e1tXo.js → PaymentMethodForm-CDV5LR8i.js} +1 -1
  64. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-vGprVPpn.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-BqPu7CYA.mjs} +6 -6
  65. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-DHXw6qD0.js → PaymentMethodForm.vue_vue_type_script_setup_true_lang-BwsRDlQJ.js} +1 -1
  66. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-D7b0HhDc.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-9MUPbgWM.mjs} +6 -6
  67. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-CdT1YyeU.js → PaymentMethodsList.vue_vue_type_script_setup_true_lang-BIX0k7-q.js} +1 -1
  68. package/dist/{PlanCustomizationEditor-RC8kj2rC.js → PlanCustomizationEditor-0kEXoOcM.js} +1 -1
  69. package/dist/{PlanCustomizationEditor-BQqkgmzL.mjs → PlanCustomizationEditor-Dv69xPbX.mjs} +9 -9
  70. package/dist/{PricingGroupRangeInput.vue.es-ClkE98ML.js → PricingGroupRangeInput.vue.es-BchXhunH.js} +1 -1
  71. package/dist/{PricingGroupRangeInput.vue.es-DNsiUZyT.mjs → PricingGroupRangeInput.vue.es-CP7-dmxS.mjs} +4 -4
  72. package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-CURXAgMT.mjs → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DmVJ2JQE.mjs} +5 -5
  73. package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-BJfQLRcS.js → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-YsI__d0V.js} +1 -1
  74. package/dist/{RadioGroupExtended.vue.es-Dk9xdj76.js → RadioGroupExtended.vue.es-Cf5R1P9a.js} +1 -1
  75. package/dist/{RadioGroupExtended.vue.es-vUqn2ZUP.mjs → RadioGroupExtended.vue.es-_QMReyZ8.mjs} +2 -2
  76. package/dist/{Section.vue.es-Cybk1Nb8.js → Section.vue.es-CBZx5x53.js} +1 -1
  77. package/dist/{Section.vue.es-C2_topx4.mjs → Section.vue.es-KRsHeFoT.mjs} +1 -1
  78. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-C9q_qwjt.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BVELHoUj.mjs} +6 -6
  79. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DIgVzXLg.js → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-UdGQMJGY.js} +1 -1
  80. package/dist/{SubscriptionSchedules-CNTg_oRy.js → SubscriptionSchedules-1ikoGncQ.js} +1 -1
  81. package/dist/{SubscriptionSchedules-BlCU_xc5.mjs → SubscriptionSchedules-B6b6xf-E.mjs} +1 -1
  82. package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-6LbR_Vni.js → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-Cd56tuZb.js} +1 -1
  83. package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-Cf3Dy8Yn.mjs → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-Dv2bP9vv.mjs} +11 -11
  84. package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-BijBAdqp.js → SubscriptionSummary.vue_vue_type_script_setup_true_lang-DZKl0Zxp.js} +1 -1
  85. package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-CjzjchsS.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-DvYZvTV9.mjs} +2 -2
  86. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-Dz4s3CH_.js → SubscriptionsList.vue_vue_type_script_setup_true_lang-DTjZcOhj.js} +1 -1
  87. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-CxdrAanb.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-DmeIKMYI.mjs} +6 -6
  88. package/dist/{TooltipParagraph.vue.es-OX6bAWP9.js → TooltipParagraph.vue.es-7IQdU3Tf.js} +1 -1
  89. package/dist/{TooltipParagraph.vue.es-Fu9Od3Vr.mjs → TooltipParagraph.vue.es-nGFfHF1A.mjs} +1 -1
  90. package/dist/{TrialChip.vue.es-CbjdkR4i.js → TrialChip.vue.es-DhC5Bpmy.js} +1 -1
  91. package/dist/{TrialChip.vue.es-c7tZOIW3.mjs → TrialChip.vue.es-eKgO6an3.mjs} +2 -2
  92. package/dist/{cn.es-C8Ogac5T.mjs → cn.es-BD7Afj5Q.mjs} +2 -2
  93. package/dist/{cn.es-lC4_Xd0R.js → cn.es-BLE3T5Rx.js} +1 -1
  94. package/dist/components/BillingInformation/BillingInformation.cjs +1 -1
  95. package/dist/components/BillingInformation/BillingInformation.mjs +4 -4
  96. package/dist/components/BillingInformationForm/BillingInformationForm.cjs +1 -1
  97. package/dist/components/BillingInformationForm/BillingInformationForm.mjs +6 -6
  98. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs +1 -1
  99. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +4 -4
  100. package/dist/components/Invoice/Invoice.cjs +1 -1
  101. package/dist/components/Invoice/Invoice.mjs +9 -9
  102. package/dist/components/InvoiceDetails/InvoiceDetails.cjs +1 -1
  103. package/dist/components/InvoiceDetails/InvoiceDetails.mjs +3 -3
  104. package/dist/components/InvoiceHeader/InvoiceHeader.cjs +1 -1
  105. package/dist/components/InvoiceHeader/InvoiceHeader.mjs +2 -2
  106. package/dist/components/InvoicesList/InvoicesList.cjs +1 -1
  107. package/dist/components/InvoicesList/InvoicesList.mjs +3 -3
  108. package/dist/components/PaymentHistory/PaymentHistory.cjs +1 -1
  109. package/dist/components/PaymentHistory/PaymentHistory.mjs +3 -3
  110. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs +1 -1
  111. package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +5 -5
  112. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs +1 -1
  113. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +4 -4
  114. package/dist/components/SubscriptionsList/SubscriptionsList.cjs +1 -1
  115. package/dist/components/SubscriptionsList/SubscriptionsList.mjs +5 -5
  116. package/dist/components/WalletBalances/WalletBalances.cjs +1 -1
  117. package/dist/components/WalletBalances/WalletBalances.mjs +3 -3
  118. package/dist/{customElements-BYIdPSzQ.js → customElements-CSzbVZIH.js} +14 -14
  119. package/dist/{customElements-Df6dGrN-.mjs → customElements-DT1YyL4O.mjs} +637 -601
  120. package/dist/{customer-DoLHZuMG.js → customer-CJonIvSm.js} +1 -1
  121. package/dist/{customer-DmsKYpVi.mjs → customer-Cq4fF__H.mjs} +1 -1
  122. package/dist/{de-DE-Bgm9bnmp.mjs → de-DE-CyvjSD9b.mjs} +7 -2
  123. package/dist/{de-DE-CAL9Mji2.js → de-DE-DXsDvO5y.js} +1 -1
  124. package/dist/{en-US-_xe5H4TQ.js → en-US-DHdI11k9.js} +1 -1
  125. package/dist/{en-US-E86eRIxh.mjs → en-US-xQrWj8qI.mjs} +5 -0
  126. package/dist/index.cjs +1 -1
  127. package/dist/index.mjs +1 -1
  128. package/dist/{invoices-CrO6p4Ms.mjs → invoices-CVZOfEOY.mjs} +1 -1
  129. package/dist/{invoices-mw87cNTS.js → invoices-EamWI_jz.js} +1 -1
  130. package/dist/{it-IT-co1BfV5s.mjs → it-IT-C09oObBM.mjs} +5 -0
  131. package/dist/{it-IT-QFQ1Ajbb.js → it-IT-CcRIzP1A.js} +1 -1
  132. package/dist/{nl-NL-CJXJC1bx.js → nl-NL-5PrgQl8q.js} +1 -1
  133. package/dist/{nl-NL-Drv2E66B.mjs → nl-NL-BhNND_yi.mjs} +5 -0
  134. package/dist/{paymentMethods-CQdhZwq4.js → paymentMethods-Bwym8l9a.js} +1 -1
  135. package/dist/{paymentMethods-BNQbW_f1.mjs → paymentMethods-By1SebnO.mjs} +1 -1
  136. package/dist/{payments-VS_N2xpJ.mjs → payments-BYZLQTJ-.mjs} +1 -1
  137. package/dist/{payments-KTjVHqOa.js → payments-Dnjg9Se4.js} +1 -1
  138. package/dist/screens/Checkout/Checkout.cjs +1 -1
  139. package/dist/screens/Checkout/Checkout.mjs +2 -2
  140. package/dist/screens/CustomerOverview/CustomerOverview.cjs +1 -1
  141. package/dist/screens/CustomerOverview/CustomerOverview.mjs +11 -11
  142. package/dist/screens/PayInvoice/PayInvoice.cjs +1 -1
  143. package/dist/screens/PayInvoice/PayInvoice.mjs +131 -127
  144. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs +1 -1
  145. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +10 -10
  146. package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs +1 -1
  147. package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +19 -19
  148. package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs +1 -1
  149. package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +19 -19
  150. package/dist/{subscriptions-Dugd-oZ1.js → subscriptions-BKER9RUc.js} +1 -1
  151. package/dist/{subscriptions-U4xg2CO1.mjs → subscriptions-Gj3KgCZz.mjs} +1 -1
  152. package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +8 -0
  153. package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +4 -2
  154. package/dist/types/services/portals.types.d.ts +2 -0
  155. package/dist/types/services/requests.types.d.ts +2 -0
  156. package/dist/{url-DwiuKYpu.mjs → url-TNRgVI8A.mjs} +3 -2
  157. package/dist/url-vloPOiXd.js +1 -0
  158. package/dist/{useActionDispatchProvider-CTyDGRX8.js → useActionDispatchProvider-DDHrhy3i.js} +1 -1
  159. package/dist/{useActionDispatchProvider-DyQbRCxR.mjs → useActionDispatchProvider-MjTckd4f.mjs} +1 -1
  160. package/dist/{useCustomer-BXI5Vmit.js → useCustomer-BW0DBEJh.js} +1 -1
  161. package/dist/{useCustomer-dcmU1539.mjs → useCustomer-CxnF7r8Z.mjs} +1 -1
  162. package/dist/{useCustomerFormLabels-Ct6vD_b8.js → useCustomerFormLabels-C773h3J0.js} +1 -1
  163. package/dist/{useCustomerFormLabels-BC1WfqWo.mjs → useCustomerFormLabels-zPc8QrwJ.mjs} +5 -5
  164. package/dist/{useExperimentalFeature-9-p9_nP6.js → useExperimentalFeature-9teNYGuP.js} +1 -1
  165. package/dist/{useExperimentalFeature-4Y-ppDr7.mjs → useExperimentalFeature-NsSDg-e3.mjs} +1 -1
  166. package/dist/{useInvoiceData-CGvtl7Ai.js → useInvoiceData-DvV2AsgC.js} +1 -1
  167. package/dist/{useInvoiceData-B2Z9aD2w.mjs → useInvoiceData-GQwk6fl4.mjs} +2 -2
  168. package/dist/{useInvoicesList-DJPznhig.mjs → useInvoicesList-CGmFSQSg.mjs} +7 -7
  169. package/dist/{useInvoicesList-Ba0GO8p-.js → useInvoicesList-Xnth6s6U.js} +1 -1
  170. package/dist/{useLoadInitialData-CWyI3_RR.mjs → useLoadInitialData-BvvaWeAe.mjs} +1 -1
  171. package/dist/{useLoadInitialData-BO9ZsSsF.js → useLoadInitialData-Cjkc70u-.js} +1 -1
  172. package/dist/{usePaymentMethodAvailability-DqIvkjLF.mjs → usePaymentMethodAvailability-BWaaj3N3.mjs} +4 -4
  173. package/dist/{usePaymentMethodAvailability-bkmDrPXY.js → usePaymentMethodAvailability-DKyscbom.js} +1 -1
  174. package/dist/{usePaymentMethodOptions-BPBVGNDg.js → usePaymentMethodOptions-DuXKS36F.js} +1 -1
  175. package/dist/{usePaymentMethodOptions-MSEp39xQ.mjs → usePaymentMethodOptions-l-wVAmIW.mjs} +1 -1
  176. package/dist/{usePaymentMethods-BAOtOJZD.js → usePaymentMethods-BDFVB-kK.js} +1 -1
  177. package/dist/{usePaymentMethods-U7gnZ0F5.mjs → usePaymentMethods-DvQVnsSV.mjs} +1 -1
  178. package/dist/{usePayments-G-HpKpK8.js → usePayments-CIJocDhR.js} +1 -1
  179. package/dist/{usePayments-Dq2V6bTV.mjs → usePayments-D_dyuf6S.mjs} +6 -6
  180. package/dist/{usePortal-BplmMkBG.js → usePortal-BU4ibdWq.js} +1 -1
  181. package/dist/{usePortal-CMHV-ShD.mjs → usePortal-Br5lYuPT.mjs} +1 -1
  182. package/dist/{useSubscription-V53WsZwQ.mjs → useSubscription-CqRae2I9.mjs} +1 -1
  183. package/dist/{useSubscription-CvB8ROBt.js → useSubscription-DRBUt9H5.js} +1 -1
  184. package/dist/{useTimePeriod.es-D31Zl1MJ.mjs → useTimePeriod.es-BxIGnCAP.mjs} +1 -1
  185. package/dist/{useTimePeriod.es-CtCTu9cz.js → useTimePeriod.es-DDos3-EH.js} +1 -1
  186. package/package.json +1 -1
  187. package/dist/Checkout.entry.ce-BfLlnQyb.js +0 -1
  188. package/dist/Checkout.entry.ce-CQkrWscC.mjs +0 -3769
  189. package/dist/ContentWithAsideLayout-Bnbsq8_5.mjs +0 -32
  190. package/dist/ContentWithAsideLayout-C6yMIVJF.js +0 -1
  191. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DKXhthkA.js +0 -1
  192. package/dist/PaymentIntegrationFormAdyen-DElXsJ96.js +0 -98
  193. package/dist/url-BNKStNY9.js +0 -1
@@ -1,3769 +0,0 @@
1
- import { unref as t, inject as qt, ref as V, computed as b, onMounted as Oe, toRaw as Jt, watch as we, defineComponent as ce, openBlock as _, createBlock as O, withCtx as I, createElementVNode as T, createVNode as E, createTextVNode as F, toDisplayString as U, useModel as ei, createElementBlock as W, withModifiers as $e, Fragment as _e, createCommentVNode as B, createSlots as Je, normalizeClass as be, mergeModels as vt, renderSlot as We, nextTick as He, mergeProps as ft, withDirectives as ti, withKeys as _t, vShow as ii, defineAsyncComponent as Mt } from "vue";
2
- import { I as oi, b as Me, u as ve, _ as se, d as ni, e as ai } from "./customElements-Df6dGrN-.mjs";
3
- import { u as Lt } from "./useTimePeriod.es-D31Zl1MJ.mjs";
4
- import { b as ze, f as Ie } from "./formatting.es-RclXHhKo.mjs";
5
- import { _ as Ae, a as je } from "./Button.vue.es-BJEy-e9C.mjs";
6
- import { _ as ri } from "./ErrorNotification.vue.es-B3mvv79S.mjs";
7
- import { c as li } from "./countryData.es-BegoD-cZ.mjs";
8
- import { c as si } from "./subscriptions-U4xg2CO1.mjs";
9
- import { A as De } from "./error-BHVZJGwD.mjs";
10
- import { c as ci, _ as ui } from "./TrialChip.vue.es-c7tZOIW3.mjs";
11
- import { a as di } from "./useService-Bh47bllz.mjs";
12
- import { c as pi } from "./invoices-CrO6p4Ms.mjs";
13
- import { g as Ne, b as Tt, e as mi } from "./pricingPlanSchedule-BPrS2WRd.mjs";
14
- import { u as gi, r as ht, e as yi, a as Re, _ as vi } from "./index-BPU8tIml.mjs";
15
- import { o as fi, u as _i, _ as Mi, a as hi } from "./useCustomerFormLabels-BC1WfqWo.mjs";
16
- import { u as bi } from "./useWatchDebounced-DT5IicPp.mjs";
17
- import { u as Ii } from "./usePaymentMethodOptions-MSEp39xQ.mjs";
18
- import { c as et, a as Ai, d as Pi } from "./subscription-CrVOr5MF.mjs";
19
- import { a as Di, b as wt } from "./pricing-DLOeiAIB.mjs";
20
- import { g as Te, s as Ni } from "./url-DwiuKYpu.mjs";
21
- import { P as Ei, e as Ci, c as bt, d as xi } from "./adyen-CvsH5fok.mjs";
22
- import { u as Li } from "./usePortal-CMHV-ShD.mjs";
23
- import { g as Ti } from "./getCountryNameByCode.es-BDHua7VM.mjs";
24
- import { _ as It } from "./Expand.vue.es-BleuAfDz.mjs";
25
- import { _ as ye } from "./Input.vue.es-5Cq8a7oH.mjs";
26
- import { _ as ge } from "./Section.vue.es-C2_topx4.mjs";
27
- import { _ as wi } from "./Alert.vue.es-lIiAWf2S.mjs";
28
- import { c as Si } from "./customer-DmsKYpVi.mjs";
29
- import { b as Oi, c as ki, a as zi, _ as Ze } from "./EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-YcaBJDzx.mjs";
30
- import { _ as ji, T as Ri, a as Bi } from "./TooltipParagraph.vue.es-Fu9Od3Vr.mjs";
31
- import { _ as $i } from "./PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-CcdhYTB1.mjs";
32
- import { _ as At } from "./Chip.vue.es-DGbc4L_D.mjs";
33
- import { _ as Ui, a as Vi } from "./SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-C9q_qwjt.mjs";
34
- import { _ as Fi } from "./SubscriptionSummary.vue_vue_type_script_setup_true_lang-CjzjchsS.mjs";
35
- import { u as St } from "./useViewport-BgdA2PPt.mjs";
36
- import { _ as fe } from "./Skeleton.vue_vue_type_script_setup_true_lang-DRLoYWGY.mjs";
37
- import { _ as Gi } from "./DividerText.vue.es-CFZUQ62L.mjs";
38
- import { l as Ve } from "./adyenSdk-B01MB9Ia.mjs";
39
- import { c as Yi } from "./payments-VS_N2xpJ.mjs";
40
- import { c as Ki } from "./paymentFailure-Bh60UhxA.mjs";
41
- import { C as Qi } from "./ContentWithAsideLayout-Bnbsq8_5.mjs";
42
- import { u as Hi } from "./cn.es-C8Ogac5T.mjs";
43
- import { a as Zi } from "./sessionReference-3h-6FdrC.mjs";
44
- const Xi = {
45
- AT: "Austria",
46
- BE: "Belgium",
47
- BG: "Bulgaria",
48
- CY: "Cyprus",
49
- CZ: "Czech Republic",
50
- DE: "Germany",
51
- DK: "Denmark",
52
- EE: "Estonia",
53
- ES: "Spain",
54
- FI: "Finland",
55
- FR: "France",
56
- GR: "Greece",
57
- HR: "Croatia",
58
- HU: "Hungary",
59
- IE: "Ireland",
60
- IT: "Italy",
61
- LT: "Lithuania",
62
- LU: "Luxembourg",
63
- LV: "Latvia",
64
- MT: "Malta",
65
- NL: "Netherlands",
66
- PL: "Poland",
67
- PT: "Portugal",
68
- RO: "Romania",
69
- SE: "Sweden",
70
- SI: "Slovenia",
71
- SK: "Slovakia"
72
- };
73
- function Ot(e) {
74
- return Object.keys(Xi).includes(e);
75
- }
76
- function Pt(e, i) {
77
- var o = Object.keys(e);
78
- if (Object.getOwnPropertySymbols) {
79
- var n = Object.getOwnPropertySymbols(e);
80
- i && (n = n.filter(function(a) {
81
- return Object.getOwnPropertyDescriptor(e, a).enumerable;
82
- })), o.push.apply(o, n);
83
- }
84
- return o;
85
- }
86
- function Se(e) {
87
- for (var i = 1; i < arguments.length; i++) {
88
- var o = arguments[i] != null ? arguments[i] : {};
89
- i % 2 ? Pt(Object(o), !0).forEach(function(n) {
90
- Wi(e, n, o[n]);
91
- }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(o)) : Pt(Object(o)).forEach(function(n) {
92
- Object.defineProperty(e, n, Object.getOwnPropertyDescriptor(o, n));
93
- });
94
- }
95
- return e;
96
- }
97
- function Wi(e, i, o) {
98
- return i in e ? Object.defineProperty(e, i, {
99
- value: o,
100
- enumerable: !0,
101
- configurable: !0,
102
- writable: !0
103
- }) : e[i] = o, e;
104
- }
105
- function Ue(e) {
106
- return typeof e == "function";
107
- }
108
- function qe(e) {
109
- return e !== null && typeof e == "object" && !Array.isArray(e);
110
- }
111
- function Fe(e) {
112
- return Ue(e.$validator) ? Se({}, e) : {
113
- $validator: e
114
- };
115
- }
116
- function kt(e) {
117
- return typeof e == "object" ? e.$valid : e;
118
- }
119
- function zt(e) {
120
- return e.$validator || e;
121
- }
122
- function qi(e, i) {
123
- if (!qe(e)) throw new Error(`[@vuelidate/validators]: First parameter to "withParams" should be an object, provided ${typeof e}`);
124
- if (!qe(i) && !Ue(i)) throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");
125
- const o = Fe(i);
126
- return o.$params = Se(Se({}, o.$params || {}), e), o;
127
- }
128
- function Ji(e, i) {
129
- if (!Ue(e) && typeof t(e) != "string") throw new Error(`[@vuelidate/validators]: First parameter to "withMessage" should be string or a function returning a string, provided ${typeof e}`);
130
- if (!qe(i) && !Ue(i)) throw new Error("[@vuelidate/validators]: Validator must be a function or object with $validator parameter");
131
- const o = Fe(i);
132
- return o.$message = e, o;
133
- }
134
- function eo(e) {
135
- let i = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
136
- const o = Fe(e);
137
- return Se(Se({}, o), {}, {
138
- $async: !0,
139
- $watchTargets: i
140
- });
141
- }
142
- function to(e) {
143
- return {
144
- $validator(i) {
145
- for (var o = arguments.length, n = new Array(o > 1 ? o - 1 : 0), a = 1; a < o; a++)
146
- n[a - 1] = arguments[a];
147
- return t(i).reduce((l, c, m) => {
148
- const u = Object.entries(c).reduce((N, v) => {
149
- let [M, A] = v;
150
- const d = e[M] || {}, L = Object.entries(d).reduce((k, p) => {
151
- let [C, x] = p;
152
- const Q = zt(x).call(this, A, c, m, ...n), s = kt(Q);
153
- if (k.$data[C] = Q, k.$data.$invalid = !s || !!k.$data.$invalid, k.$data.$error = k.$data.$invalid, !s) {
154
- let P = x.$message || "";
155
- const q = x.$params || {};
156
- typeof P == "function" && (P = P({
157
- $pending: !1,
158
- $invalid: !s,
159
- $params: q,
160
- $model: A,
161
- $response: Q
162
- })), k.$errors.push({
163
- $property: M,
164
- $message: P,
165
- $params: q,
166
- $response: Q,
167
- $model: A,
168
- $pending: !1,
169
- $validator: C
170
- });
171
- }
172
- return {
173
- $valid: k.$valid && s,
174
- $data: k.$data,
175
- $errors: k.$errors
176
- };
177
- }, {
178
- $valid: !0,
179
- $data: {},
180
- $errors: []
181
- });
182
- return N.$data[M] = L.$data, N.$errors[M] = L.$errors, {
183
- $valid: N.$valid && L.$valid,
184
- $data: N.$data,
185
- $errors: N.$errors
186
- };
187
- }, {
188
- $valid: !0,
189
- $data: {},
190
- $errors: {}
191
- });
192
- return {
193
- $valid: l.$valid && u.$valid,
194
- $data: l.$data.concat(u.$data),
195
- $errors: l.$errors.concat(u.$errors)
196
- };
197
- }, {
198
- $valid: !0,
199
- $data: [],
200
- $errors: []
201
- });
202
- },
203
- $message: (i) => {
204
- let {
205
- $response: o
206
- } = i;
207
- return o ? o.$errors.map((n) => Object.values(n).map((a) => a.map((l) => l.$message)).reduce((a, l) => a.concat(l), [])) : [];
208
- }
209
- };
210
- }
211
- const jt = (e) => {
212
- if (e = t(e), Array.isArray(e)) return !!e.length;
213
- if (e == null)
214
- return !1;
215
- if (e === !1)
216
- return !0;
217
- if (e instanceof Date)
218
- return !isNaN(e.getTime());
219
- if (typeof e == "object") {
220
- for (let i in e) return !0;
221
- return !1;
222
- }
223
- return !!String(e).length;
224
- }, io = (e) => (e = t(e), Array.isArray(e) ? e.length : typeof e == "object" ? Object.keys(e).length : String(e).length);
225
- function he() {
226
- for (var e = arguments.length, i = new Array(e), o = 0; o < e; o++)
227
- i[o] = arguments[o];
228
- return (n) => (n = t(n), !jt(n) || i.every((a) => (a.lastIndex = 0, a.test(n))));
229
- }
230
- var oo = /* @__PURE__ */ Object.freeze({
231
- __proto__: null,
232
- forEach: to,
233
- len: io,
234
- normalizeValidatorObject: Fe,
235
- regex: he,
236
- req: jt,
237
- unwrap: t,
238
- unwrapNormalizedValidator: zt,
239
- unwrapValidatorResponse: kt,
240
- withAsync: eo,
241
- withMessage: Ji,
242
- withParams: qi
243
- });
244
- he(/^[a-zA-Z]*$/);
245
- he(/^[a-zA-Z0-9]*$/);
246
- he(/^\d*(\.\d+)?$/);
247
- const no = /^(?:[A-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\.[A-z0-9!#$%&'*+/=?^_`{|}~-]+)*|"(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21\x23-\x5b\x5d-\x7f]|[\x01-\x09\x0b\x0c\x0e-\x7f])*")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\.)+[a-z0-9]{2,}(?:[a-z0-9-]*[a-z0-9])?|\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\x01-\x08\x0b\x0c\x0e-\x1f\x21-\x5a\x53-\x7f]|\\[\x01-\x09\x0b\x0c\x0e-\x7f])+)\])$/i;
248
- he(no);
249
- const ao = /^(?:(?:(?:https?|ftp):)?\/\/)(?:\S+(?::\S*)?@)?(?:(?!(?:10|127)(?:\.\d{1,3}){3})(?!(?:169\.254|192\.168)(?:\.\d{1,3}){2})(?!172\.(?:1[6-9]|2\d|3[0-1])(?:\.\d{1,3}){2})(?:[1-9]\d?|1\d\d|2[01]\d|22[0-3])(?:\.(?:1?\d{1,2}|2[0-4]\d|25[0-5])){2}(?:\.(?:[1-9]\d?|1\d\d|2[0-4]\d|25[0-4]))|(?:(?:[a-z0-9\u00a1-\uffff][a-z0-9\u00a1-\uffff_-]{0,62})?[a-z0-9\u00a1-\uffff]\.)+(?:[a-z\u00a1-\uffff]{2,}\.?))(?::\d{2,5})?(?:[/?#]\S*)?$/i;
250
- he(ao);
251
- he(/(^[0-9]*$)|(^-[0-9]+$)/);
252
- he(/^[-]?\d*(\.\d+)?$/);
253
- function Ge(e) {
254
- return !!li.find((i) => i.key === e);
255
- }
256
- const Rt = {
257
- AT: {
258
- regex: /^ATU\d{8}$/,
259
- prefix: "AT",
260
- example: "ATU12345678"
261
- },
262
- BE: {
263
- regex: /^BE0?\d{9}$/,
264
- prefix: "BE",
265
- example: "BE0123456789"
266
- },
267
- BG: {
268
- regex: /^BG\d{9,10}$/,
269
- prefix: "BG",
270
- example: "BG123456789"
271
- },
272
- HR: {
273
- regex: /^HR\d{11}$/,
274
- prefix: "HR",
275
- example: "HR12345678901"
276
- },
277
- CY: {
278
- regex: /^CY\d{8}[A-Z]$/,
279
- prefix: "CY",
280
- example: "CY12345678X"
281
- },
282
- CZ: {
283
- regex: /^CZ\d{8,10}$/,
284
- prefix: "CZ",
285
- example: "CZ12345678"
286
- },
287
- DE: {
288
- regex: /^DE\d{9}$/,
289
- prefix: "DE",
290
- example: "DE123456789"
291
- },
292
- DK: {
293
- regex: /^DK\d{8}$/,
294
- prefix: "DK",
295
- example: "DK12345678"
296
- },
297
- EE: {
298
- regex: /^EE\d{9}$/,
299
- prefix: "EE",
300
- example: "EE123456789"
301
- },
302
- GR: {
303
- regex: /^(EL|GR)\d{9}$/,
304
- prefix: "GR",
305
- example: "GR123456789"
306
- },
307
- ES: {
308
- regex: /^ES[A-Z0-9]\d{7}[A-Z0-9]$/,
309
- prefix: "ES",
310
- example: "ESX1234567X"
311
- },
312
- FI: {
313
- regex: /^FI\d{8}$/,
314
- prefix: "FI",
315
- example: "FI12345678"
316
- },
317
- FR: {
318
- regex: /^FR[0-9A-Z]{2}\d{9}$/,
319
- prefix: "FR",
320
- example: "FRXX123456789"
321
- },
322
- HU: {
323
- regex: /^HU\d{8}$/,
324
- prefix: "HU",
325
- example: "HU12345678"
326
- },
327
- IE: {
328
- regex: /^IE[0-9A-Z]{8,9}$/,
329
- prefix: "IE",
330
- example: "IE1234567A"
331
- },
332
- IS: {
333
- regex: /^IS\d{5}$/,
334
- prefix: "IS",
335
- example: "IS12345"
336
- },
337
- IT: {
338
- regex: /^IT\d{11}$/,
339
- prefix: "IT",
340
- example: "IT12345678901"
341
- },
342
- LT: {
343
- regex: /^LT(\d{9}|\d{12})$/,
344
- prefix: "LT",
345
- example: "LT123456789 or LT123456789012"
346
- },
347
- LU: {
348
- regex: /^LU\d{8}$/,
349
- prefix: "LU",
350
- example: "LU12345678"
351
- },
352
- LV: {
353
- regex: /^LV\d{11}$/,
354
- prefix: "LV",
355
- example: "LV12345678901"
356
- },
357
- ME: {
358
- regex: /^ME\d{9}$/,
359
- prefix: "ME",
360
- example: "ME123456789"
361
- },
362
- MT: {
363
- regex: /^MT\d{8}$/,
364
- prefix: "MT",
365
- example: "MT12345678"
366
- },
367
- NL: {
368
- regex: /^NL\d{9}B\d{2}$/,
369
- prefix: "NL",
370
- example: "NL123456789B01"
371
- },
372
- PL: {
373
- regex: /^PL\d{10}$/,
374
- prefix: "PL",
375
- example: "PL1234567890"
376
- },
377
- PT: {
378
- regex: /^PT\d{9}$/,
379
- prefix: "PT",
380
- example: "PT123456789"
381
- },
382
- RO: {
383
- regex: /^RO\d{2,10}$/,
384
- prefix: "RO",
385
- example: "RO1234567890"
386
- },
387
- RU: {
388
- regex: /^RU(\d{9}|\d{10}|\d{12})$/,
389
- prefix: "RU",
390
- example: "RU123456789 or RU1234567890 or RU123456789012"
391
- },
392
- SE: {
393
- regex: /^SE\d{10}01$/,
394
- prefix: "SE",
395
- example: "SE123456789001"
396
- },
397
- SI: {
398
- regex: /^SI\d{8}$/,
399
- prefix: "SI",
400
- example: "SI12345678"
401
- },
402
- SK: {
403
- regex: /^SK\d{10}$/,
404
- prefix: "SK",
405
- example: "SK1234567890"
406
- },
407
- CH: {
408
- regex: /^CHE\d{9}(MWST|TVA|IVA)?$/,
409
- prefix: "CHE",
410
- example: "CHE123456789MWST"
411
- },
412
- NO: {
413
- regex: /^NO\d{9}MVA$/,
414
- prefix: "NO",
415
- example: "NO123456789MVA"
416
- },
417
- GB: {
418
- regex: /^GB(\d{9}|\d{12}|GD\d{3}|HA\d{3})$/,
419
- prefix: "GB",
420
- example: "GB123456789"
421
- },
422
- XI: {
423
- regex: /^XI(\d{9}|\d{12})$/,
424
- prefix: "XI",
425
- example: "XI123456789"
426
- }
427
- }, ro = (e) => !e || typeof e != "string" || e.trim() === "" ? !0 : Object.values(Rt).some((i) => i.regex.test(e)), lo = ({ $model: e }) => {
428
- if (!e || typeof e != "string" || e.trim() === "")
429
- return "";
430
- const i = qt(oi, null);
431
- if (!i)
432
- return "Invalid tax ID";
433
- const { formatMessage: o } = i, n = Object.values(Rt).find(
434
- (a) => e.toUpperCase().startsWith(a.prefix.toUpperCase())
435
- );
436
- return n ? o(
437
- {
438
- defaultMessage: "Invalid tax ID format. Example: {example}",
439
- id: "form_validation.tax_id.invalid_format",
440
- description: "Error message when tax ID format is invalid but prefix matches"
441
- },
442
- { example: n.example }
443
- ) : o({
444
- defaultMessage: "Invalid tax ID",
445
- id: "taxId.invalid",
446
- description: "Error message when tax ID is invalid"
447
- });
448
- }, tt = oo.withMessage(lo, ro), so = "preview", co = "NL", Bt = (e) => {
449
- var i, o;
450
- if ("organization" in e)
451
- return (i = e.organization) == null ? void 0 : i.registered_address;
452
- if ("individual" in e)
453
- return (o = e.individual) == null ? void 0 : o.residential_address;
454
- }, uo = (e) => {
455
- const i = Bt(e);
456
- return {
457
- ...(i == null ? void 0 : i.line1) && { line1: i.line1 },
458
- ...(i == null ? void 0 : i.line2) && { line2: i.line2 },
459
- ...(i == null ? void 0 : i.city) && { city: i.city },
460
- ...(i == null ? void 0 : i.state) && { state: i.state },
461
- country: (i == null ? void 0 : i.country) || co,
462
- ...(i == null ? void 0 : i.postal_code) && { postal_code: i.postal_code }
463
- };
464
- }, po = (e) => {
465
- var n, a;
466
- const i = uo(e), o = e.type ?? "INDIVIDUAL";
467
- if (o === "ORGANIZATION") {
468
- const l = "organization" in e ? e.organization : void 0, c = (a = (n = l == null ? void 0 : l.tax_ids) == null ? void 0 : n[0]) == null ? void 0 : a.id;
469
- return {
470
- type: o,
471
- organization: {
472
- legal_name: (l == null ? void 0 : l.legal_name) || so,
473
- registered_address: i,
474
- ...c && {
475
- tax_id: tt.$validator(c, {}, {}) ? c : void 0
476
- }
477
- }
478
- };
479
- }
480
- return {
481
- type: o,
482
- individual: {
483
- residential_address: i
484
- }
485
- };
486
- }, mo = {
487
- AD: "EUR",
488
- AE: "AED",
489
- AF: "AFN",
490
- AG: "XCD",
491
- AI: "XCD",
492
- AL: "ALL",
493
- AM: "AMD",
494
- AO: "AOA",
495
- AR: "ARS",
496
- AS: "USD",
497
- AT: "EUR",
498
- AU: "AUD",
499
- AW: "AWG",
500
- AX: "EUR",
501
- AZ: "AZN",
502
- BA: "BAM",
503
- BB: "BBD",
504
- BD: "BDT",
505
- BE: "EUR",
506
- BF: "XOF",
507
- BG: "BGN",
508
- BH: "BHD",
509
- BI: "BIF",
510
- BJ: "XOF",
511
- BL: "EUR",
512
- BM: "BMD",
513
- BN: "BND",
514
- BO: "BOB",
515
- BQ: "USD",
516
- BR: "BRL",
517
- BS: "BSD",
518
- BT: "BTN",
519
- BV: "NOK",
520
- BW: "BWP",
521
- BY: "BYN",
522
- BZ: "BZD",
523
- CA: "CAD",
524
- CC: "AUD",
525
- CD: "CDF",
526
- CF: "XAF",
527
- CG: "XAF",
528
- CH: "CHF",
529
- CI: "XOF",
530
- CK: "NZD",
531
- CL: "CLP",
532
- CM: "XAF",
533
- CN: "CNY",
534
- CO: "COP",
535
- CR: "CRC",
536
- CU: "CUP",
537
- CV: "CVE",
538
- CW: "ANG",
539
- CX: "AUD",
540
- CY: "EUR",
541
- CZ: "CZK",
542
- DE: "EUR",
543
- DJ: "DJF",
544
- DK: "DKK",
545
- DM: "XCD",
546
- DO: "DOP",
547
- DZ: "DZD",
548
- EC: "USD",
549
- EE: "EUR",
550
- EG: "EGP",
551
- EH: "MAD",
552
- ER: "ERN",
553
- ES: "EUR",
554
- ET: "ETB",
555
- FI: "EUR",
556
- FJ: "FJD",
557
- FK: "FKP",
558
- FM: "USD",
559
- FO: "DKK",
560
- FR: "EUR",
561
- GA: "XAF",
562
- GB: "GBP",
563
- GD: "XCD",
564
- GE: "GEL",
565
- GF: "EUR",
566
- GG: "GBP",
567
- GH: "GHS",
568
- GI: "GIP",
569
- GL: "DKK",
570
- GM: "GMD",
571
- GN: "GNF",
572
- GP: "EUR",
573
- GQ: "XAF",
574
- GR: "EUR",
575
- GS: "GBP",
576
- GT: "GTQ",
577
- GU: "USD",
578
- GW: "XOF",
579
- GY: "GYD",
580
- HK: "HKD",
581
- HM: "AUD",
582
- HN: "HNL",
583
- HR: "EUR",
584
- HT: "HTG",
585
- HU: "HUF",
586
- ID: "IDR",
587
- IE: "EUR",
588
- IL: "ILS",
589
- IM: "GBP",
590
- IN: "INR",
591
- IO: "USD",
592
- IQ: "IQD",
593
- IR: "IRR",
594
- IS: "ISK",
595
- IT: "EUR",
596
- JE: "GBP",
597
- JM: "JMD",
598
- JO: "JOD",
599
- JP: "JPY",
600
- KE: "KES",
601
- KG: "KGS",
602
- KH: "KHR",
603
- KI: "AUD",
604
- KM: "KMF",
605
- KN: "XCD",
606
- KP: "KPW",
607
- KR: "KRW",
608
- KW: "KWD",
609
- KY: "KYD",
610
- KZ: "KZT",
611
- LA: "LAK",
612
- LB: "LBP",
613
- LC: "XCD",
614
- LI: "CHF",
615
- LK: "LKR",
616
- LR: "LRD",
617
- LS: "LSL",
618
- LT: "EUR",
619
- LU: "EUR",
620
- LV: "EUR",
621
- LY: "LYD",
622
- MA: "MAD",
623
- MC: "EUR",
624
- MD: "MDL",
625
- ME: "EUR",
626
- MF: "EUR",
627
- MG: "MGA",
628
- MH: "USD",
629
- MK: "MKD",
630
- ML: "XOF",
631
- MM: "MMK",
632
- MN: "MNT",
633
- MO: "MOP",
634
- MP: "USD",
635
- MQ: "EUR",
636
- MR: "MRU",
637
- MS: "XCD",
638
- MT: "EUR",
639
- MU: "MUR",
640
- MV: "MVR",
641
- MW: "MWK",
642
- MX: "MXN",
643
- MY: "MYR",
644
- MZ: "MZN",
645
- NA: "NAD",
646
- NC: "XPF",
647
- NE: "XOF",
648
- NF: "AUD",
649
- NG: "NGN",
650
- NI: "NIO",
651
- NL: "EUR",
652
- NO: "NOK",
653
- NP: "NPR",
654
- NR: "AUD",
655
- NU: "NZD",
656
- NZ: "NZD",
657
- OM: "OMR",
658
- PA: "PAB",
659
- PE: "PEN",
660
- PF: "XPF",
661
- PG: "PGK",
662
- PH: "PHP",
663
- PK: "PKR",
664
- PL: "PLN",
665
- PM: "EUR",
666
- PN: "NZD",
667
- PR: "USD",
668
- PS: "ILS",
669
- PT: "EUR",
670
- PW: "USD",
671
- PY: "PYG",
672
- QA: "QAR",
673
- RE: "EUR",
674
- RO: "RON",
675
- RS: "RSD",
676
- RU: "RUB",
677
- RW: "RWF",
678
- SA: "SAR",
679
- SB: "SBD",
680
- SC: "SCR",
681
- SD: "SDG",
682
- SE: "SEK",
683
- SG: "SGD",
684
- SH: "SHP",
685
- SI: "EUR",
686
- SJ: "NOK",
687
- SK: "EUR",
688
- SL: "SLE",
689
- SM: "EUR",
690
- SN: "XOF",
691
- SO: "SOS",
692
- SR: "SRD",
693
- SS: "SSP",
694
- ST: "STN",
695
- SV: "USD",
696
- SX: "ANG",
697
- SY: "SYP",
698
- SZ: "SZL",
699
- TC: "USD",
700
- TD: "XAF",
701
- TF: "EUR",
702
- TG: "XOF",
703
- TH: "THB",
704
- TJ: "TJS",
705
- TK: "NZD",
706
- TL: "USD",
707
- TM: "TMT",
708
- TN: "TND",
709
- TO: "TOP",
710
- TR: "TRY",
711
- TT: "TTD",
712
- TV: "AUD",
713
- TW: "TWD",
714
- TZ: "TZS",
715
- UA: "UAH",
716
- UG: "UGX",
717
- US: "USD",
718
- UY: "UYU",
719
- UZ: "UZS",
720
- VA: "EUR",
721
- VC: "XCD",
722
- VE: "VES",
723
- VG: "USD",
724
- VI: "USD",
725
- VN: "VND",
726
- VU: "VUV",
727
- WF: "XPF",
728
- WS: "WST",
729
- YE: "YER",
730
- YT: "EUR",
731
- ZA: "ZAR",
732
- ZM: "ZMW",
733
- ZW: "ZWL"
734
- }, go = (e) => {
735
- if (e)
736
- return mo[e];
737
- }, $t = ({
738
- country: e,
739
- pricingCurrencySettings: i,
740
- fallbackCurrency: o
741
- }) => {
742
- const n = go(e), a = (i == null ? void 0 : i.pricing_currencies) ?? [];
743
- return n && a.includes(n) ? n : (i == null ? void 0 : i.default_pricing_currency) ?? o ?? n;
744
- }, yo = () => {
745
- const { getInvoicePreview: e } = pi(), i = Me(), o = V(), n = V(), a = V(), l = V({}), c = V(De.Initial), m = V({}), u = V(), N = (M) => `${M.type}:${M.value}`;
746
- return {
747
- loadInvoicePreview: async ({
748
- subscription: M,
749
- subscriptionStartAt: A,
750
- customer: d = {},
751
- seatsValues: L,
752
- unitsValues: k,
753
- enabledPricingIds: p,
754
- promotionCode: C
755
- }) => {
756
- var g, h, w, j, H, Y;
757
- const x = po(d);
758
- c.value = De.Loading;
759
- const R = Ne({
760
- pricingPlanScheduleInfos: M.pricing_plan_schedule_infos,
761
- type: "DEFAULT"
762
- }), Q = (g = R == null ? void 0 : R.pricing_plan_version) == null ? void 0 : g.pricing_currency_settings, s = (((h = Q == null ? void 0 : Q.pricing_currencies) == null ? void 0 : h.length) ?? 0) > 1, P = ((j = (w = R == null ? void 0 : R.pricing_plan_version) == null ? void 0 : w.billing_period_settings) == null ? void 0 : j.billing_periods) ?? [], q = P.length > 1, te = P.length > 0 ? P.map(({ period: G }) => G) : M.billing_period ? [M.billing_period] : [], f = $t({
763
- country: (H = Bt(d)) == null ? void 0 : H.country,
764
- pricingCurrencySettings: Q,
765
- fallbackCurrency: M.billing_currency
766
- });
767
- if (!te.length) {
768
- i.warn("INVOICE_PREVIEW_SKIPPED", "No billing period to preview an invoice for", {
769
- subscriptionId: M.id
770
- }), c.value = De.Done;
771
- return;
772
- }
773
- const y = M.billing_period ? N(M.billing_period) : N(te[0]), r = te.map(async (G) => {
774
- var ie;
775
- const ae = N(G), Z = Tt({
776
- enabledPricings: p == null ? void 0 : p.map((J) => ({
777
- pricing_id: J
778
- })),
779
- seatsValues: L,
780
- unitsValues: k,
781
- pricingPlanScheduleInfos: M.pricing_plan_schedule_infos,
782
- pricingCurrency: s ? f : void 0,
783
- billingPeriod: q ? G : void 0
784
- }) ?? [];
785
- if (C) {
786
- const J = (ie = M.pricing_plan_schedule_infos.find(
787
- ({ pricing_plan_schedule: ee }) => ee.type === "DEFAULT"
788
- )) == null ? void 0 : ie.id;
789
- if (J) {
790
- const ee = Z.find(
791
- ({ pricing_plan_schedule_id: oe }) => oe === J
792
- );
793
- ee ? ee.promotion_codes = [C] : Z.push({
794
- pricing_plan_schedule_id: J,
795
- promotion_codes: [C]
796
- });
797
- }
798
- }
799
- const re = {
800
- pricingPlanSubscriptionId: M.id,
801
- startAt: A,
802
- customizations: Z,
803
- customer: x
804
- }, ne = m.value[ae];
805
- if (ne && di(re, ne))
806
- return { periodKey: ae, response: void 0 };
807
- m.value = {
808
- ...m.value,
809
- [ae]: re
810
- };
811
- const $ = await e(re);
812
- return { periodKey: ae, response: $ };
813
- });
814
- try {
815
- const G = {
816
- ...l.value
817
- }, ae = await Promise.all(r), Z = M.pricing_plan_schedule_infos.find(
818
- ({ pricing_plan_schedule: ne }) => ne.type === "TRIAL"
819
- ), re = (Y = M.pricing_plan_schedule_infos.find(
820
- ({ pricing_plan_schedule: ne }) => ne.type === "DEFAULT"
821
- )) == null ? void 0 : Y.id;
822
- ae.forEach(({ periodKey: ne, response: $ }) => {
823
- var ee;
824
- if (!$) return;
825
- u.value = (ee = $.invoice_infos.at(-1)) == null ? void 0 : ee.pricing_plan_schedule_id, Z && (n.value = $.first_invoice, Z.start_at && Z.end_at && (o.value = ci(
826
- new Date(Z.start_at),
827
- new Date(Z.end_at)
828
- )));
829
- const ie = $.invoice_infos.find(
830
- ({ pricing_plan_schedule_id: oe }) => oe === re
831
- ), J = ie == null ? void 0 : ie.invoices[0];
832
- J && (G[ne] = J);
833
- }), l.value = G, a.value = G[y];
834
- } catch (G) {
835
- throw c.value = De.Failed, i.error("INVOICE_PREVIEW_FAILED", "Failed to load invoice preview", {}, G), G;
836
- } finally {
837
- c.value = De.Done;
838
- }
839
- },
840
- invoicePreview: a,
841
- invoicePreviewByBillingPeriod: l,
842
- trialInvoicePreview: n,
843
- trialPeriod: o,
844
- lastPreviewScheduleId: u,
845
- isPending: b(() => c.value === De.Loading)
846
- };
847
- }, Dt = ["email", "country"], Ut = "GENERIC_TAX_ID", Nt = {
848
- US: ["addressLine1", "postalCode"],
849
- CA: ["state"]
850
- }, vo = (e) => !e || !Nt[e] ? Dt : [...Nt[e], ...Dt], Et = (e) => {
851
- const i = {
852
- ...e.addressLine1 && { line1: e.addressLine1 },
853
- ...e.addressLine2 && { line2: e.addressLine2 },
854
- ...e.city && { city: e.city },
855
- ...e.state && { state: e.state },
856
- ...e.postalCode && { postal_code: e.postalCode },
857
- country: e.country ?? ""
858
- };
859
- return e.type === "ORGANIZATION" ? {
860
- type: "ORGANIZATION",
861
- organization: {
862
- legal_name: e.companyLegalName ?? "",
863
- registered_address: i,
864
- ...e.companyVatNumber && {
865
- tax_ids: [{ id: e.companyVatNumber, type: Ut }]
866
- }
867
- }
868
- } : {
869
- type: "INDIVIDUAL",
870
- individual: {
871
- residential_address: i
872
- }
873
- };
874
- };
875
- function fo() {
876
- return {
877
- /**
878
- * Get geolocation information from the user
879
- */
880
- getGeoLocation() {
881
- return fetch("https://api.country.is/").then((e) => e.json());
882
- }
883
- };
884
- }
885
- function _o({
886
- initialState: e,
887
- onRequiredFieldChange: i
888
- }) {
889
- const o = V(Be(e)), n = V(Be(e)), a = (v) => {
890
- const M = Be({ ...Jt(o.value), ...v });
891
- o.value = M, n.value = structuredClone(M);
892
- }, l = b(
893
- () => vo(o.value.country)
894
- ), c = (v) => l.value.includes(v), m = gi(
895
- {
896
- email: { required: ht, email: yi },
897
- country: { required: ht },
898
- state: { required: Re(() => c("state")) },
899
- addressLine1: { required: Re(() => c("addressLine1")) },
900
- postalCode: { required: Re(() => c("postalCode")) },
901
- companyLegalName: Re(o.value.type === "ORGANIZATION"),
902
- companyVatNumber: { taxId: tt }
903
- },
904
- o
905
- ), u = (v) => {
906
- v || fo().getGeoLocation().then(({ country: M }) => {
907
- o.value.country = M;
908
- });
909
- }, N = (v, M) => {
910
- const A = fi({ from: M, to: v }), d = Object.keys(A).find(Mo);
911
- if (d) {
912
- if (["type", "companyVatNumber"].includes(d)) {
913
- i(v);
914
- return;
915
- }
916
- if (d === "seatsValues") {
917
- i(v);
918
- return;
919
- }
920
- if (d === "unitsValues") {
921
- i(v);
922
- return;
923
- }
924
- if (d === "enabledPricingIds") {
925
- i(v);
926
- return;
927
- }
928
- if (d !== "email" && c(d)) {
929
- i(v);
930
- return;
931
- }
932
- }
933
- };
934
- return Oe(async () => {
935
- await u(e == null ? void 0 : e.country);
936
- }), bi(
937
- () => JSON.parse(JSON.stringify(o.value)),
938
- N,
939
- { debounce: 200 }
940
- ), {
941
- form: o,
942
- validation: m,
943
- getIsFieldRequired: c,
944
- updateInitialState: a,
945
- initialState: n
946
- };
947
- }
948
- const Be = (e = {}) => ({
949
- email: void 0,
950
- country: void 0,
951
- type: "INDIVIDUAL",
952
- companyLegalName: void 0,
953
- firstName: void 0,
954
- infix: void 0,
955
- lastName: void 0,
956
- addressLine1: void 0,
957
- addressLine2: void 0,
958
- postalCode: void 0,
959
- city: void 0,
960
- state: void 0,
961
- companyVatNumber: void 0,
962
- seatsValues: void 0,
963
- unitsValues: void 0,
964
- enabledPricingIds: void 0,
965
- ...e
966
- });
967
- function Mo(e) {
968
- return e in Be();
969
- }
970
- function ho(e, i = void 0) {
971
- const o = i ?? [], n = et(e);
972
- for (const a of n)
973
- if (["EXACTLY_ONE", "AT_LEAST_ONE"].includes(a.selection_constraint)) {
974
- const l = a.pricings.map((c) => c.id);
975
- if (i != null && i.some((c) => l.includes(c)))
976
- continue;
977
- o.push(a.pricings[0].id);
978
- }
979
- return o;
980
- }
981
- function bo(e) {
982
- return et(e).some(
983
- (o) => o.selection_constraint === "EXACTLY_ONE" || o.selection_constraint === "AT_LEAST_ONE"
984
- );
985
- }
986
- function Io(e) {
987
- const i = Di(e.pricing_plan_schedule_infos), o = et(e);
988
- return i.some((n) => n.product_type === "ADDON") || o.some((n) => n.object_type === "ADDON");
989
- }
990
- const Ct = (e) => (e ?? []).flatMap(
991
- (i) => i.configs ?? []
992
- ), Vt = (e) => [
993
- ...e.configs ?? [],
994
- ...Ct(e.billing_period_configs),
995
- ...(e.pricing_currency_configs ?? []).flatMap((i) => [
996
- ...i.configs ?? [],
997
- ...Ct(i.billing_period_configs)
998
- ])
999
- ];
1000
- function wa({
1001
- pricings: e,
1002
- pricingItemConfigId: i
1003
- }) {
1004
- var l, c;
1005
- const o = e.flatMap((m) => m.items ?? []).find((m) => {
1006
- var u;
1007
- return (u = m.configs) == null ? void 0 : u.some((N) => N.id === i);
1008
- }), n = (l = o == null ? void 0 : o.configs) == null ? void 0 : l.find((m) => m.id === i), a = (c = o == null ? void 0 : o.product_items) == null ? void 0 : c[0];
1009
- return {
1010
- config: n,
1011
- productItem: a
1012
- };
1013
- }
1014
- const Ao = "1";
1015
- function Po(e) {
1016
- const i = wt(e).flatMap((o) => o.items ?? []).flatMap(Vt);
1017
- return new Map(
1018
- i.flatMap(
1019
- (o) => {
1020
- var n;
1021
- return (n = o.default_seats_value) != null && n.number ? [[o.id, o.default_seats_value.number]] : [];
1022
- }
1023
- )
1024
- );
1025
- }
1026
- function Do(e) {
1027
- var n;
1028
- const i = (n = e == null ? void 0 : e.pricing_plan_schedule) == null ? void 0 : n.seats_values;
1029
- if (!e || !(i != null && i.length))
1030
- return;
1031
- const o = e.pricing_plan_version ? Po(e) : /* @__PURE__ */ new Map();
1032
- return i.map(({ pricing_item_config_id: a, number: l }) => ({
1033
- pricing_item_config_id: a,
1034
- number: l || o.get(a) || Ao
1035
- }));
1036
- }
1037
- const No = "1";
1038
- function Eo(e) {
1039
- const i = wt(e).flatMap((o) => o.items ?? []).flatMap(Vt);
1040
- return new Map(
1041
- i.flatMap(
1042
- (o) => {
1043
- var n;
1044
- return (n = o.default_units) != null && n.number ? [[o.id, o.default_units.number]] : [];
1045
- }
1046
- )
1047
- );
1048
- }
1049
- function Co(e) {
1050
- var n;
1051
- const i = (n = e == null ? void 0 : e.pricing_plan_schedule) == null ? void 0 : n.units;
1052
- if (!e || !(i != null && i.length))
1053
- return;
1054
- const o = e.pricing_plan_version ? Eo(e) : /* @__PURE__ */ new Map();
1055
- return i.map(({ pricing_item_config_id: a, number: l }) => ({
1056
- pricing_item_config_id: a,
1057
- number: l || o.get(a) || No
1058
- }));
1059
- }
1060
- const Xe = "solvimon_checkout_redirect_state";
1061
- function xo({
1062
- initialCountry: e,
1063
- initialEmail: i,
1064
- subscriptionId: o,
1065
- enabledPricingIds: n
1066
- }) {
1067
- const a = Me(), l = (() => {
1068
- if (e) {
1069
- if (Ge(e)) return e;
1070
- a.error("INVALID_COUNTRY_CODE", `invalid country code provided: "${e}"`);
1071
- }
1072
- })(), c = (() => {
1073
- if (i) {
1074
- if (/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(i)) return i;
1075
- a.error("INVALID_EMAIL", `invalid email provided: "${i}"`);
1076
- }
1077
- })(), m = V(!1), u = V(), { getSubscription: N } = si(), v = yo(), M = b(() => u.value && s.form.value.country && te.value), {
1078
- paymentMethodOptions: A,
1079
- get: d,
1080
- isPending: L,
1081
- error: k
1082
- } = Ii(), p = async (y, r) => {
1083
- try {
1084
- await d({
1085
- subscriptionId: u.value.id,
1086
- country: y,
1087
- amount: r
1088
- });
1089
- } catch {
1090
- a.error(
1091
- "PAYMENT_METHOD_OPTIONS_LOAD_FAILED",
1092
- "Failed to load the payment methods the checkout can offer",
1093
- {},
1094
- k.value
1095
- );
1096
- }
1097
- }, C = b(() => k.value !== null), x = () => {
1098
- const { country: y } = s.form.value;
1099
- !u.value || !y || !te.value || p(y, te.value);
1100
- }, R = () => {
1101
- const y = s.form.value;
1102
- return v.loadInvoicePreview({
1103
- subscription: u.value,
1104
- customer: Et(y),
1105
- seatsValues: y.seatsValues,
1106
- unitsValues: y.unitsValues,
1107
- enabledPricingIds: y.enabledPricingIds ?? n,
1108
- promotionCode: y.promotionCode
1109
- });
1110
- }, Q = async (y) => {
1111
- const r = y.promotionCode ?? s.form.value.promotionCode, g = y.enabledPricingIds ?? s.form.value.enabledPricingIds, h = { ...s.form.value, ...y };
1112
- return await v.loadInvoicePreview({
1113
- subscription: u.value,
1114
- customer: Et(h),
1115
- seatsValues: h.seatsValues,
1116
- unitsValues: h.unitsValues,
1117
- enabledPricingIds: g,
1118
- promotionCode: r
1119
- }), {
1120
- trialInvoicePreview: v.trialInvoicePreview.value,
1121
- invoicePreview: v.invoicePreview.value
1122
- };
1123
- }, s = _o({
1124
- initialState: {
1125
- country: l,
1126
- email: c
1127
- },
1128
- onRequiredFieldChange: () => {
1129
- u.value && R().catch(() => {
1130
- });
1131
- }
1132
- }), P = async () => {
1133
- var j, H, Y, G;
1134
- const y = await N({
1135
- id: o,
1136
- expanded: !0
1137
- }), r = Ne({
1138
- pricingPlanScheduleInfos: y.pricing_plan_schedule_infos,
1139
- type: "DEFAULT"
1140
- }), g = (G = (Y = (H = (j = r == null ? void 0 : r.pricing_plan_version) == null ? void 0 : j.billing_period_settings) == null ? void 0 : H.billing_periods) == null ? void 0 : Y[0]) == null ? void 0 : G.period;
1141
- u.value = {
1142
- ...y,
1143
- billing_period: g ?? y.billing_period
1144
- };
1145
- const h = Do(r), w = Co(r);
1146
- s.updateInitialState({
1147
- ...s.form.value,
1148
- enabledPricingIds: ho(y, n),
1149
- ...h ? { seatsValues: h } : {},
1150
- ...w ? { unitsValues: w } : {}
1151
- });
1152
- }, q = b(() => {
1153
- var Z, re, ne, $, ie, J, ee, oe, ue;
1154
- const y = s.form.value.firstName || s.form.value.infix || s.form.value.lastName ? {
1155
- ...s.form.value.firstName ? { first_name: s.form.value.firstName } : {},
1156
- ...s.form.value.infix ? { infix: s.form.value.infix } : {},
1157
- ...s.form.value.lastName ? { last_name: s.form.value.lastName } : {}
1158
- } : {}, r = {
1159
- ...s.form.value.addressLine1 && {
1160
- line1: s.form.value.addressLine1
1161
- },
1162
- ...s.form.value.addressLine2 && {
1163
- line2: s.form.value.addressLine2
1164
- },
1165
- ...s.form.value.city && { city: s.form.value.city },
1166
- ...s.form.value.postalCode && {
1167
- postal_code: s.form.value.postalCode
1168
- },
1169
- ...s.form.value.state && { state: s.form.value.state },
1170
- country: s.form.value.country ?? ""
1171
- }, g = Ne({
1172
- pricingPlanScheduleInfos: ((Z = u.value) == null ? void 0 : Z.pricing_plan_schedule_infos) ?? [],
1173
- type: "DEFAULT"
1174
- }), h = (re = g == null ? void 0 : g.pricing_plan_version) == null ? void 0 : re.pricing_currency_settings, w = (((ne = h == null ? void 0 : h.pricing_currencies) == null ? void 0 : ne.length) ?? 0) > 1, H = (((ie = ($ = g == null ? void 0 : g.pricing_plan_version) == null ? void 0 : $.billing_period_settings) == null ? void 0 : ie.billing_periods) ?? []).length > 1, Y = Tt({
1175
- enabledPricings: (J = s.form.value.enabledPricingIds) == null ? void 0 : J.map((de) => ({
1176
- pricing_id: de
1177
- })),
1178
- seatsValues: s.form.value.seatsValues,
1179
- unitsValues: s.form.value.unitsValues,
1180
- pricingPlanScheduleInfos: ((ee = u.value) == null ? void 0 : ee.pricing_plan_schedule_infos) ?? [],
1181
- pricingCurrency: w ? (oe = u.value) == null ? void 0 : oe.billing_currency : void 0,
1182
- billingPeriod: H ? (ue = u.value) == null ? void 0 : ue.billing_period : void 0
1183
- }), G = s.form.value.promotionCode, ae = G && u.value ? (() => {
1184
- var Ce, ke, xe;
1185
- const de = Y ? [...Y] : [], pe = ((Ce = de[0]) == null ? void 0 : Ce.pricing_plan_schedule_id) ?? ((xe = Ne({
1186
- pricingPlanScheduleInfos: ((ke = u.value) == null ? void 0 : ke.pricing_plan_schedule_infos) ?? [],
1187
- type: "DEFAULT"
1188
- })) == null ? void 0 : xe.id);
1189
- if (!pe)
1190
- return Y;
1191
- const Ee = de.find(
1192
- ({ pricing_plan_schedule_id: le }) => le === pe
1193
- );
1194
- if (Ee)
1195
- Ee.promotion_codes = [G];
1196
- else {
1197
- const le = Y == null ? void 0 : Y[0];
1198
- de.push({
1199
- pricing_plan_schedule_id: pe,
1200
- ...(le == null ? void 0 : le.enabled_pricings) && {
1201
- enabled_pricings: le.enabled_pricings
1202
- },
1203
- ...(le == null ? void 0 : le.seats_values) && {
1204
- seats_values: le.seats_values
1205
- },
1206
- ...(le == null ? void 0 : le.units) && {
1207
- units: le.units
1208
- },
1209
- promotion_codes: [G]
1210
- });
1211
- }
1212
- return de;
1213
- })() : Y;
1214
- return {
1215
- type: "INIT_PRICING_PLAN_SUBSCRIPTION",
1216
- init_pricing_plan_subscription: {
1217
- template_pricing_plan_subscription_id: o,
1218
- ...ae && {
1219
- pricing_plan_schedule_customizations: ae
1220
- },
1221
- customer_details: {
1222
- email: s.form.value.email ?? "",
1223
- type: s.form.value.type,
1224
- ...s.form.value.type === "INDIVIDUAL" ? {
1225
- individual: {
1226
- residential_address: r,
1227
- ...y ? { name: y } : {}
1228
- }
1229
- } : {
1230
- organization: {
1231
- registered_address: r,
1232
- legal_name: s.form.value.companyLegalName ?? "",
1233
- ...s.form.value.companyVatNumber && tt.$validator(s.form.value.companyVatNumber, {}, {}) ? {
1234
- tax_ids: [
1235
- {
1236
- id: s.form.value.companyVatNumber,
1237
- type: Ut
1238
- }
1239
- ]
1240
- } : {}
1241
- }
1242
- }
1243
- }
1244
- }
1245
- };
1246
- }), te = b(() => {
1247
- var y, r;
1248
- return ((y = v.trialInvoicePreview.value) == null ? void 0 : y.invoice_amount_including_tax) ?? ((r = v.invoicePreview.value) == null ? void 0 : r.invoice_amount_including_tax);
1249
- });
1250
- we(
1251
- [() => s.form.value.country, te],
1252
- ([y, r]) => {
1253
- !u.value || !y || !r || p(y, r);
1254
- }
1255
- );
1256
- function f() {
1257
- sessionStorage.setItem(Xe, JSON.stringify(s.form.value));
1258
- }
1259
- return Oe(async () => {
1260
- const y = Te("redirect_status"), r = !!Te(Ei), g = !!Te("payment_intent_client_secret") || !!Te("setup_intent_client_secret");
1261
- y === "succeeded" && r && g && (m.value = !0);
1262
- const w = sessionStorage.getItem(Xe);
1263
- let j = null;
1264
- if (w)
1265
- try {
1266
- j = JSON.parse(w);
1267
- } catch {
1268
- }
1269
- j && s.updateInitialState(j);
1270
- try {
1271
- await P();
1272
- } catch (H) {
1273
- throw a.error(
1274
- "SUBSCRIPTION_LOAD_FAILED",
1275
- "Failed to load the subscription the checkout prices",
1276
- {},
1277
- H
1278
- ), H;
1279
- }
1280
- try {
1281
- await R();
1282
- } catch {
1283
- }
1284
- j && (s.updateInitialState(j), sessionStorage.removeItem(Xe));
1285
- }), we(
1286
- M,
1287
- (y) => {
1288
- y && x();
1289
- },
1290
- { once: !0 }
1291
- ), {
1292
- /** What the host configured, once anything unusable has been dropped and reported. */
1293
- validatedEmail: c,
1294
- validatedCountry: l,
1295
- invoicePreview: v.invoicePreview,
1296
- invoicePreviewByBillingPeriod: v.invoicePreviewByBillingPeriod,
1297
- trialInvoicePreview: v.trialInvoicePreview,
1298
- trialPeriod: v.trialPeriod,
1299
- loadInvoicePreview: R,
1300
- updateInvoicePreviewOnBillingInformationChange: Q,
1301
- lastPreviewScheduleId: v.lastPreviewScheduleId,
1302
- paymentMethodOptions: A,
1303
- hasPaymentMethodOptionsError: C,
1304
- retryPaymentMethodOptions: x,
1305
- isPaymentMethodsPending: L,
1306
- isInvoicePreviewPending: v.isPending,
1307
- subscription: u,
1308
- checkoutForm: s,
1309
- authorizationContext: q,
1310
- isPaid: m,
1311
- amount: te,
1312
- saveFormStateForRedirect: f
1313
- };
1314
- }
1315
- function Lo({
1316
- checkoutForm: e,
1317
- updateInvoicePreviewOnBillingInformationChange: i,
1318
- formatErrorMessage: o,
1319
- onInvalidPromotionCode: n,
1320
- onApplyError: a
1321
- }) {
1322
- const l = Me(), c = V(!1), m = V(null), u = (A, d) => {
1323
- m.value = o ? o({ action: A, error: d }) : A === "apply" ? "Promotion code could not be applied. Please try again." : "Promotion code could not be removed. Please try again.";
1324
- }, N = (A) => To(A) && A.field === "promotion_codes", v = async (A) => {
1325
- const d = A == null ? void 0 : A.trim();
1326
- if (d) {
1327
- m.value = null, e.form.value.promotionCode = d, c.value = !0;
1328
- try {
1329
- await i({
1330
- promotionCode: d
1331
- });
1332
- } catch (L) {
1333
- l.capture(L, {
1334
- code: "PROMOTION_CODE_APPLY_FAILED",
1335
- message: "Failed to apply promotion code"
1336
- }), u("apply", L), a == null || a(), N(L) && (n == null || n()), await M({ suppressError: !0, preserveErrorMessage: !0 });
1337
- } finally {
1338
- c.value = !1;
1339
- }
1340
- }
1341
- }, M = async ({
1342
- suppressError: A = !1,
1343
- preserveErrorMessage: d = !1
1344
- } = {}) => {
1345
- d || (m.value = null), delete e.form.value.promotionCode, c.value = !0;
1346
- try {
1347
- await i({});
1348
- } catch (L) {
1349
- l.capture(L, {
1350
- code: "PROMOTION_CODE_REMOVE_FAILED",
1351
- message: "Failed to remove promotion code"
1352
- }), A || u("remove", L);
1353
- } finally {
1354
- c.value = !1;
1355
- }
1356
- };
1357
- return {
1358
- applyPromotionCode: v,
1359
- removePromotionCode: M,
1360
- isPromotionCodePending: c,
1361
- promotionCodeErrorMessage: m
1362
- };
1363
- }
1364
- function To(e) {
1365
- return typeof e == "object" && e !== null && "field" in e;
1366
- }
1367
- function wo({
1368
- subscription: e,
1369
- promotionCode: i,
1370
- appliedPromotionCode: o,
1371
- applyPromotionCode: n
1372
- }) {
1373
- we(
1374
- e,
1375
- (a) => {
1376
- a && i && (o.value = i, n(i));
1377
- },
1378
- { once: !0 }
1379
- );
1380
- }
1381
- const So = { class: "flex items-center gap-2" }, Oo = /* @__PURE__ */ ce({
1382
- __name: "TaxIDCheckNotice",
1383
- props: {
1384
- taxIdValidationResult: { type: Object }
1385
- },
1386
- setup(e) {
1387
- const i = e, { formatMessage: o } = ve(), n = b(() => i.taxIdValidationResult.valid === "VALID"), a = b(() => n.value ? o({
1388
- defaultMessage: "VAT number is valid.",
1389
- id: "tax_check.valid_vat_number",
1390
- description: "The message shown when the VAT number is valid"
1391
- }) : o({
1392
- defaultMessage: "VAT number is invalid.",
1393
- id: "tax_check.invalid_vat_number",
1394
- description: "The message shown when the VAT number is invalid"
1395
- }));
1396
- return (l, c) => (_(), O(t(wi), {
1397
- type: n.value ? "success" : "danger",
1398
- icon: !1
1399
- }, {
1400
- default: I(() => [
1401
- T("div", So, [
1402
- E(t(se), { variant: "body-xs" }, {
1403
- default: I(() => [
1404
- F(U(a.value), 1)
1405
- ]),
1406
- _: 1
1407
- })
1408
- ])
1409
- ]),
1410
- _: 1
1411
- }, 8, ["type"]));
1412
- }
1413
- });
1414
- function ko(e) {
1415
- const { checkTaxID: i } = Si(), o = V(void 0), n = b(() => {
1416
- var M;
1417
- return ((M = e.value.companyVatNumber) == null ? void 0 : M.trim()) ?? "";
1418
- }), a = b(() => e.value.companyLegalName ?? ""), l = b(() => e.value.country), c = V(!1), m = b(() => Ot(l.value ?? "")), u = b(
1419
- () => !!(n.value && a.value && l.value)
1420
- ), N = b(() => m.value && n.value);
1421
- async function v() {
1422
- var M;
1423
- if (!(!u.value || !m.value || !l.value)) {
1424
- c.value = !0;
1425
- try {
1426
- const A = await i({
1427
- type: "ORGANIZATION",
1428
- organization: {
1429
- legal_name: a.value,
1430
- tax_ids: [{ id: n.value, type: "GENERIC_TAX_ID" }],
1431
- registered_address: {
1432
- country: l.value
1433
- }
1434
- }
1435
- });
1436
- (M = A == null ? void 0 : A.data) != null && M.length ? o.value = A.data[0] : o.value = void 0;
1437
- } finally {
1438
- c.value = !1;
1439
- }
1440
- }
1441
- }
1442
- return {
1443
- runTaxIDCheck: v,
1444
- taxIdValidationData: o,
1445
- isTaxIDCheckPending: c,
1446
- isTaxIDCheckEnabled: u,
1447
- showViesCheckNotice: N,
1448
- isSelectedCountryEU: m
1449
- };
1450
- }
1451
- const zo = { class: "grid grid-cols-1 gap-1" }, jo = { class: "grid grid-cols-1 gap-2" }, Ro = { key: 0 }, Bo = { class: "mt-2 flex flex-col gap-3" }, $o = { class: "grid grid-cols-3 gap-2" }, Uo = { key: 0 }, Vo = { class: "mt-4 grid grid-cols-1 gap-3" }, Fo = "checkout-form", Go = /* @__PURE__ */ ce({
1452
- __name: "CheckoutForm",
1453
- props: /* @__PURE__ */ vt({
1454
- validation: { type: null },
1455
- initialState: { type: Object },
1456
- readOnlyEmail: { type: String },
1457
- showCustomerInfoOnTop: { type: Boolean },
1458
- isBillingInformationMandatory: { type: Boolean },
1459
- getIsFieldRequired: { type: Function },
1460
- readOnly: { type: Boolean }
1461
- }, {
1462
- modelValue: { required: !0 },
1463
- modelModifiers: {}
1464
- }),
1465
- emits: /* @__PURE__ */ vt(["submit"], ["update:modelValue"]),
1466
- setup(e) {
1467
- const i = e, o = V(!1), n = ei(e, "modelValue"), a = b({
1468
- get: () => n.value.type === "ORGANIZATION",
1469
- set: (p) => {
1470
- n.value.type = p ? "ORGANIZATION" : "INDIVIDUAL";
1471
- }
1472
- }), l = b(() => n.value.type === "ORGANIZATION"), c = b({
1473
- get: () => n.value.country,
1474
- set: (p) => {
1475
- n.value.country = p && Ge(p) ? p : void 0;
1476
- }
1477
- }), m = b(() => n.value.country !== "US"), { isTaxIDCheckEnabled: u, isTaxIDCheckPending: N, taxIdValidationData: v, runTaxIDCheck: M } = ko(n), { $t: A } = ve(), d = _i(), L = (p) => i.getIsFieldRequired(p) ? "" : " " + A({
1478
- defaultMessage: "(optional)",
1479
- id: "checkout.optional_suffix.label",
1480
- description: "The suffix for optional fields in the checkout form"
1481
- }), k = b(
1482
- () => n.value.country ? Ti(n.value.country) : void 0
1483
- );
1484
- return (p, C) => (_(), W("form", {
1485
- id: Fo,
1486
- onSubmit: C[12] || (C[12] = $e((x) => p.$emit("submit", n.value), ["prevent"]))
1487
- }, [
1488
- T("div", zo, [
1489
- E(t(ge), {
1490
- title: t(d).contactInformationTitle
1491
- }, {
1492
- default: I(() => [
1493
- T("div", jo, [
1494
- e.readOnly ? (_(), W(_e, { key: 0 }, [
1495
- E(t(se), {
1496
- variant: "body",
1497
- tag: "span",
1498
- weight: "semibold",
1499
- "no-spacing": ""
1500
- }, {
1501
- default: I(() => [
1502
- F(U(n.value.email), 1)
1503
- ]),
1504
- _: 1
1505
- }),
1506
- E(t(se), {
1507
- variant: "body-sm",
1508
- tag: "span",
1509
- color: "subtle",
1510
- "no-spacing": ""
1511
- }, {
1512
- default: I(() => [
1513
- F(U(k.value), 1)
1514
- ]),
1515
- _: 1
1516
- })
1517
- ], 64)) : (_(), W(_e, { key: 1 }, [
1518
- E(t(ye), {
1519
- modelValue: n.value.email,
1520
- "onUpdate:modelValue": C[0] || (C[0] = (x) => n.value.email = x),
1521
- required: "",
1522
- type: "email",
1523
- name: "email",
1524
- disabled: !!e.readOnlyEmail,
1525
- label: t(d).emailLabel,
1526
- placeholder: t(d).emailPlaceholder + L("email"),
1527
- error: e.validation.value.email.$errors
1528
- }, null, 8, ["modelValue", "disabled", "label", "placeholder", "error"]),
1529
- E(t(Mi), {
1530
- "single-model-value": c.value,
1531
- "onUpdate:singleModelValue": C[3] || (C[3] = (x) => c.value = x),
1532
- required: "",
1533
- name: "country",
1534
- label: t(d).countryLabel + L("country"),
1535
- error: e.validation.value.country.$errors
1536
- }, {
1537
- "label-suffix": I(() => [
1538
- !o.value && !e.isBillingInformationMandatory ? (_(), O(t(Ae), {
1539
- key: 0,
1540
- size: "xs",
1541
- intent: "subtle",
1542
- "icon-prefix": "add",
1543
- class: "py-0.5",
1544
- onClick: C[1] || (C[1] = (x) => o.value = !0)
1545
- }, {
1546
- default: I(() => [
1547
- F(U(t(A)({
1548
- defaultMessage: "More billing details",
1549
- description: "Label of the button in the checkout that lets you fill out all billing details",
1550
- id: "checkout.billing_details.add_billing_details_button.label"
1551
- })), 1)
1552
- ]),
1553
- _: 1
1554
- })) : B("", !0),
1555
- o.value && !e.isBillingInformationMandatory ? (_(), O(t(Ae), {
1556
- key: 1,
1557
- size: "sm",
1558
- intent: "subtle",
1559
- "icon-prefix": "close",
1560
- class: "py-0.5",
1561
- onClick: C[2] || (C[2] = (x) => o.value = !1)
1562
- }, {
1563
- default: I(() => [
1564
- F(U(t(A)({
1565
- defaultMessage: "Remove billing details",
1566
- id: "checkout.billing_details.remove_billing_details_button.label",
1567
- description: "Label of the button in the checkout that lets you remove the billing details"
1568
- })), 1)
1569
- ]),
1570
- _: 1
1571
- })) : B("", !0)
1572
- ]),
1573
- _: 1
1574
- }, 8, ["single-model-value", "label", "error"])
1575
- ], 64))
1576
- ]),
1577
- E(t(It), {
1578
- "is-open": o.value || !!e.isBillingInformationMandatory
1579
- }, {
1580
- default: I(() => [
1581
- o.value || e.isBillingInformationMandatory ? (_(), W("div", Ro, [
1582
- T("div", Bo, [
1583
- E(t(ye), {
1584
- modelValue: n.value.addressLine1,
1585
- "onUpdate:modelValue": C[4] || (C[4] = (x) => n.value.addressLine1 = x),
1586
- name: "address_line_1",
1587
- label: t(A)({
1588
- defaultMessage: "Billing address",
1589
- id: "checkout.address.title",
1590
- description: "Address line 1 of the customer address in the checkout form"
1591
- }),
1592
- placeholder: t(A)({
1593
- defaultMessage: "Address line 1...",
1594
- id: "checkout.address.line1.placeholder",
1595
- description: "Address line 1 of the customer address in the checkout form"
1596
- }) + L("addressLine1"),
1597
- required: "",
1598
- error: e.validation.value.addressLine1.$errors
1599
- }, null, 8, ["modelValue", "label", "placeholder", "error"]),
1600
- E(t(ye), {
1601
- modelValue: n.value.addressLine2,
1602
- "onUpdate:modelValue": C[5] || (C[5] = (x) => n.value.addressLine2 = x),
1603
- name: "address_line_2",
1604
- placeholder: t(A)({
1605
- defaultMessage: "Address line 2...",
1606
- id: "checkout.address.line2.placeholder",
1607
- description: "Address line 2 of the customer address in the checkout form"
1608
- }) + L("addressLine2")
1609
- }, null, 8, ["modelValue", "placeholder"]),
1610
- T("div", $o, [
1611
- E(t(ye), {
1612
- modelValue: n.value.postalCode,
1613
- "onUpdate:modelValue": C[6] || (C[6] = (x) => n.value.postalCode = x),
1614
- name: "postal_code",
1615
- placeholder: t(d).postalCodePlaceholder + L("postalCode"),
1616
- error: e.validation.value.addressLine1.$errors
1617
- }, null, 8, ["modelValue", "placeholder", "error"]),
1618
- E(t(ye), {
1619
- modelValue: n.value.city,
1620
- "onUpdate:modelValue": C[7] || (C[7] = (x) => n.value.city = x),
1621
- name: "city",
1622
- placeholder: t(d).cityPlaceholder + L("city")
1623
- }, null, 8, ["modelValue", "placeholder"]),
1624
- E(t(ye), {
1625
- modelValue: n.value.state,
1626
- "onUpdate:modelValue": C[8] || (C[8] = (x) => n.value.state = x),
1627
- name: "state",
1628
- placeholder: t(d).statePlaceholder + L("state"),
1629
- error: e.validation.value.state.$errors
1630
- }, null, 8, ["modelValue", "placeholder", "error"])
1631
- ])
1632
- ])
1633
- ])) : B("", !0)
1634
- ]),
1635
- _: 1
1636
- }, 8, ["is-open"])
1637
- ]),
1638
- _: 1
1639
- }, 8, ["title"]),
1640
- e.readOnly ? B("", !0) : (_(), O(t(ge), { key: 0 }, {
1641
- default: I(() => [
1642
- E(hi, {
1643
- modelValue: a.value,
1644
- "onUpdate:modelValue": C[9] || (C[9] = (x) => a.value = x),
1645
- "no-spacing": "",
1646
- class: "!flex"
1647
- }, null, 8, ["modelValue"]),
1648
- E(t(It), { "is-open": l.value }, {
1649
- default: I(() => [
1650
- l.value ? (_(), W("div", Uo, [
1651
- T("div", Vo, [
1652
- E(t(ye), {
1653
- modelValue: n.value.companyLegalName,
1654
- "onUpdate:modelValue": C[10] || (C[10] = (x) => n.value.companyLegalName = x),
1655
- required: "",
1656
- name: "legal_name",
1657
- label: t(d).legalNameLabel,
1658
- placeholder: t(d).legalNamePlaceholder
1659
- }, null, 8, ["modelValue", "label", "placeholder"]),
1660
- m.value ? (_(), O(t(ye), {
1661
- key: 0,
1662
- modelValue: n.value.companyVatNumber,
1663
- "onUpdate:modelValue": C[11] || (C[11] = (x) => n.value.companyVatNumber = x),
1664
- name: "vat_number",
1665
- "input-class": "focus:outline-none focus:ring-0",
1666
- label: t(d).vatNumberLabel,
1667
- placeholder: t(d).vatNumberPlaceholder,
1668
- error: e.validation.value.companyVatNumber.$errors,
1669
- "suffix-class": "px-2 border-l-0"
1670
- }, Je({ _: 2 }, [
1671
- t(Ot)(n.value.country ?? "") ? {
1672
- name: "suffix",
1673
- fn: I(() => [
1674
- E(t(Ae), {
1675
- type: "button",
1676
- size: "sm",
1677
- intent: "secondary",
1678
- disabled: !t(u) || t(N) || e.validation.value.companyVatNumber.$invalid,
1679
- onClick: t(M)
1680
- }, {
1681
- default: I(() => [
1682
- F(U(t(A)({
1683
- defaultMessage: "Check",
1684
- id: "checkout.vat_number.check_button.label",
1685
- description: "The label for the check button in the checkout form"
1686
- })), 1)
1687
- ]),
1688
- _: 1
1689
- }, 8, ["disabled", "onClick"])
1690
- ]),
1691
- key: "0"
1692
- } : void 0
1693
- ]), 1032, ["modelValue", "label", "placeholder", "error"])) : B("", !0),
1694
- t(v) ? (_(), W("div", {
1695
- key: 1,
1696
- class: be({ "opacity-75": t(N) })
1697
- }, [
1698
- E(Oo, { "tax-id-validation-result": t(v) }, null, 8, ["tax-id-validation-result"])
1699
- ], 2)) : B("", !0)
1700
- ])
1701
- ])) : B("", !0)
1702
- ]),
1703
- _: 1
1704
- }, 8, ["is-open"])
1705
- ]),
1706
- _: 1
1707
- }))
1708
- ])
1709
- ], 32));
1710
- }
1711
- }), Yo = {
1712
- key: 0,
1713
- class: "flex items-center"
1714
- }, Ko = ["innerHTML"], Qo = ["innerHTML"], Ho = /* @__PURE__ */ ce({
1715
- __name: "CheckoutTitle",
1716
- props: {
1717
- trialPeriod: { type: Object },
1718
- subscriptionName: { type: String },
1719
- amount: { type: Object },
1720
- billingPeriod: { type: Object },
1721
- countryCode: { type: null },
1722
- trialStartDate: { type: Date },
1723
- subscriptionStartDate: { type: Date }
1724
- },
1725
- setup(e) {
1726
- const { $t: i } = ve();
1727
- return (o, n) => (_(), W("div", null, [
1728
- T("div", null, [
1729
- E(t(se), {
1730
- variant: "heading-1",
1731
- class: "inline-block"
1732
- }, {
1733
- default: I(() => [
1734
- F(U(e.trialStartDate ? e.subscriptionName : t(i)({
1735
- defaultMessage: "Pay and subscribe",
1736
- id: "checkout.page_title",
1737
- description: "The title of the checkout page"
1738
- })) + U(" "), 1),
1739
- e.trialPeriod ? (_(), O(t(ui), {
1740
- key: 0,
1741
- "trial-period": e.trialPeriod,
1742
- size: "lg",
1743
- class: "-translate-y-0.5"
1744
- }, null, 8, ["trial-period"])) : B("", !0)
1745
- ]),
1746
- _: 1
1747
- })
1748
- ]),
1749
- E(t(se), {
1750
- variant: "body-sm",
1751
- color: "subtle",
1752
- "no-spacing": ""
1753
- }, {
1754
- default: I(() => [
1755
- e.countryCode ? (_(), W("span", {
1756
- key: 1,
1757
- innerHTML: e.trialStartDate ? t(i)(
1758
- {
1759
- defaultMessage: "You will be billed <strong>{price}</strong> per {period_name}, starting {startDate, date, long}.",
1760
- id: "checkout.trial_period_description",
1761
- description: "The description of the trial period"
1762
- },
1763
- {
1764
- price: t(Ie)(e.amount),
1765
- // @ts-expect-error formatjs does not support this type yet
1766
- startDate: e.subscriptionStartDate,
1767
- period_name: t(ze)(e.billingPeriod, {
1768
- short: !0,
1769
- hideValueForExactPeriods: !0
1770
- }),
1771
- // @ts-ignore
1772
- strong: (a) => `<strong>${a}</strong>`
1773
- }
1774
- ) : t(i)(
1775
- {
1776
- defaultMessage: "You will be billed <strong>{price}</strong> per {period_name}, starting today.",
1777
- id: "checkout.subscription_description",
1778
- description: "The description of the subscription"
1779
- },
1780
- {
1781
- price: t(Ie)(e.amount),
1782
- period_name: t(ze)(e.billingPeriod, {
1783
- short: !0,
1784
- hideValueForExactPeriods: !0
1785
- }),
1786
- // @ts-ignore
1787
- strong: (a) => `<strong>${a}</strong>`
1788
- }
1789
- )
1790
- }, null, 8, Qo)) : (_(), W("span", Yo, [
1791
- E(t(ji), { "is-dark-mode": "" }, {
1792
- tooltip: I(() => [
1793
- E(t(Ri), null, {
1794
- default: I(() => [
1795
- E(t(Bi), null, {
1796
- default: I(() => [
1797
- F(U(t(i)({
1798
- defaultMessage: "Will be determined by billing information",
1799
- description: "Tooltip content for the invoice preview when taxes are not determined by billing information",
1800
- id: "invoice_preview.taxes_not_determined_by_billing_information_tooltip"
1801
- })), 1)
1802
- ]),
1803
- _: 1
1804
- })
1805
- ]),
1806
- _: 1
1807
- })
1808
- ]),
1809
- default: I(() => [
1810
- E(t(Oi), {
1811
- "width-class": "w-10",
1812
- "height-class": "h-4",
1813
- shade: "darker",
1814
- class: "mr-1.5 inline-block"
1815
- })
1816
- ]),
1817
- _: 1
1818
- }),
1819
- T("span", {
1820
- innerHTML: e.trialStartDate ? t(i)(
1821
- {
1822
- defaultMessage: "per {period_name} starting, {startDate, date, long}",
1823
- id: "checkout.trial_period_description_without_price",
1824
- description: "The description of the trial period, while the price is still being determined"
1825
- },
1826
- {
1827
- // @ts-expect-error formatjs does not support this type yet
1828
- startDate: e.subscriptionStartDate,
1829
- period_name: t(ze)(e.billingPeriod, {
1830
- short: !0,
1831
- hideValueForExactPeriods: !0
1832
- })
1833
- }
1834
- ) : t(i)(
1835
- {
1836
- defaultMessage: "per {period_name}, starting today",
1837
- id: "checkout.subscription_description_without_price",
1838
- description: "The description of the subscription, while the price is still being determined"
1839
- },
1840
- {
1841
- period_name: t(ze)(e.billingPeriod, {
1842
- short: !0,
1843
- hideValueForExactPeriods: !0
1844
- })
1845
- }
1846
- )
1847
- }, null, 8, Ko)
1848
- ]))
1849
- ]),
1850
- _: 1
1851
- })
1852
- ]));
1853
- }
1854
- }), Zo = (e) => {
1855
- var i;
1856
- return ((i = e.periods) == null ? void 0 : i.some(
1857
- (o) => o.groups.some(
1858
- (n) => {
1859
- var a;
1860
- return (a = n.lines) == null ? void 0 : a.some(
1861
- (l) => l.product_items.some(
1862
- (c) => c.model_type === "USAGE_BASED"
1863
- )
1864
- );
1865
- }
1866
- )
1867
- )) ?? !1;
1868
- }, Xo = { class: "flex min-h-96 w-full items-center justify-center" }, Wo = { class: "max-w-sm" }, qo = /* @__PURE__ */ ce({
1869
- __name: "CheckoutNotAvailable",
1870
- setup(e) {
1871
- const { $t: i } = ve(), o = () => {
1872
- window.location.reload();
1873
- };
1874
- return (n, a) => (_(), W("div", Xo, [
1875
- T("div", Wo, [
1876
- E(t(se), { variant: "heading-1" }, {
1877
- default: I(() => [
1878
- F(U(t(i)({
1879
- defaultMessage: "Checkout not available",
1880
- id: "checkout.not_available.title",
1881
- description: "The title of the checkout not available page"
1882
- })), 1)
1883
- ]),
1884
- _: 1
1885
- }),
1886
- E(t(se), {
1887
- variant: "body-sm",
1888
- color: "subtle"
1889
- }, {
1890
- default: I(() => [
1891
- F(U(t(i)({
1892
- defaultMessage: "The checkout is currently not available.",
1893
- id: "checkout.not_available.description",
1894
- description: "The description of the checkout not available page"
1895
- })) + " ", 1),
1896
- T("a", {
1897
- href: "#",
1898
- class: "text-primary-900 hover:underline",
1899
- onClick: $e(o, ["prevent"])
1900
- }, U(t(i)({
1901
- defaultMessage: "Reload",
1902
- id: "checkout.not_available.reload_button",
1903
- description: "The label of the reload button"
1904
- })), 1),
1905
- F(" " + U(t(i)({
1906
- defaultMessage: "this page to try again, or contact customer support.",
1907
- id: "checkout.not_available.contact_support_message",
1908
- description: "The message shown when the user wants to contact customer support"
1909
- })), 1)
1910
- ]),
1911
- _: 1
1912
- })
1913
- ])
1914
- ]));
1915
- }
1916
- }), Jo = /* @__PURE__ */ ce({
1917
- __name: "SubscriptionPaymentCompletedCard",
1918
- emits: ["continue-to-merchant"],
1919
- setup(e) {
1920
- const { $t: i } = ve();
1921
- return (o, n) => (_(), O($i, {
1922
- status: "success",
1923
- title: t(i)({
1924
- defaultMessage: "Payment successful",
1925
- id: "subscription_payment_completed_card.title",
1926
- description: "The title for when a payment has been successful"
1927
- })
1928
- }, {
1929
- default: I(() => [
1930
- E(t(se), {
1931
- variant: "body-xs",
1932
- color: "subtle",
1933
- tag: "span"
1934
- }, {
1935
- default: I(() => [
1936
- F(U(t(i)({
1937
- defaultMessage: "Thank you for subscribing.",
1938
- id: "subscription_payment_completed_card.thank_you_for_subscribing",
1939
- description: "The text shown after a successful message before a redirect"
1940
- })), 1)
1941
- ]),
1942
- _: 1
1943
- })
1944
- ]),
1945
- _: 1
1946
- }, 8, ["title"]));
1947
- }
1948
- }), en = { class: "flex items-start" }, tn = { class: "flex grow flex-col" }, on = { class: "flex items-center gap-1" }, nn = { class: "ml-4 flex items-center self-center" }, an = /* @__PURE__ */ ce({
1949
- __name: "PricingGroupContent",
1950
- props: {
1951
- name: { type: String },
1952
- description: { type: String }
1953
- },
1954
- setup(e) {
1955
- return (i, o) => (_(), W("div", en, [
1956
- T("div", tn, [
1957
- T("div", on, [
1958
- E(t(se), {
1959
- tag: "span",
1960
- variant: "body-sm",
1961
- weight: "semibold"
1962
- }, {
1963
- default: I(() => [
1964
- F(U(e.name), 1)
1965
- ]),
1966
- _: 1
1967
- }),
1968
- We(i.$slots, "badge")
1969
- ]),
1970
- E(t(se), {
1971
- tag: "span",
1972
- variant: "body-xs",
1973
- color: "subtle"
1974
- }, {
1975
- default: I(() => [
1976
- F(U(e.description), 1)
1977
- ]),
1978
- _: 1
1979
- })
1980
- ]),
1981
- T("div", nn, [
1982
- We(i.$slots, "default")
1983
- ])
1984
- ]));
1985
- }
1986
- }), rn = { class: "sv-order-summary__body grid grid-cols-1 gap-1" }, ln = { class: "px-3 py-2" }, sn = { class: "sv-order-summary__billing-period flex flex-col gap-3" }, cn = { class: "px-3 py-2" }, un = {
1987
- key: 3,
1988
- class: "sv-order-summary__items"
1989
- }, xt = /* @__PURE__ */ ce({
1990
- __name: "OrderSummary",
1991
- props: {
1992
- subscription: { type: Object },
1993
- invoice: { type: Object },
1994
- invoicePreviewByBillingPeriod: { type: Object },
1995
- trialInvoice: { type: Object },
1996
- enabledPricingIds: { type: Array },
1997
- trialPeriod: { type: Object },
1998
- avatar: { type: String },
1999
- isPaid: { type: Boolean },
2000
- isUsageBased: { type: Boolean },
2001
- isPreviewAndPaymentMethodsPending: { type: Boolean },
2002
- collapsible: { type: String },
2003
- noTitle: { type: Boolean },
2004
- countryCode: { type: null },
2005
- variant: { type: String }
2006
- },
2007
- emits: ["billing-period-change"],
2008
- setup(e, { emit: i }) {
2009
- const o = e, n = i, { $t: a } = ve(), { map: l, formatTimePeriod: c } = Lt(), { isMobileViewport: m } = St(), u = b(() => m.value ? "sm" : "xs"), N = (r) => `${r.type}:${r.value}`, v = ["DAY", "WEEK", "MONTH", "YEAR"], M = (r) => v.includes(r), A = (r) => {
2010
- if (!r)
2011
- return;
2012
- const [g, h] = r.split(":"), w = Number(h);
2013
- if (!(!w || !M(g)))
2014
- return { type: g, value: w };
2015
- }, d = b({
2016
- get: () => {
2017
- const r = o.subscription.billing_period;
2018
- return r ? `${r.type}:${r.value}` : void 0;
2019
- },
2020
- set: (r) => {
2021
- if (!r) return;
2022
- const [g, h] = r.split(":"), w = Number(h);
2023
- w && M(g) && n("billing-period-change", { type: g, value: w });
2024
- }
2025
- }), L = (r) => {
2026
- var w, j, H, Y;
2027
- const g = (Y = (H = (j = (w = o.invoicePreviewByBillingPeriod) == null ? void 0 : w[N(r)]) == null ? void 0 : j.periods) == null ? void 0 : H[0]) == null ? void 0 : Y.amount_including_tax;
2028
- if (!g)
2029
- return;
2030
- const h = r.type === "MONTH" && r.value === 3 ? a({
2031
- defaultMessage: "/quarter",
2032
- id: "checkout.order_summary_block.billing_period.per_quarter",
2033
- description: "Period label for quarterly billing"
2034
- }) : a(
2035
- {
2036
- defaultMessage: "/{period}",
2037
- id: "checkout.order_summary_block.billing_period.per_label",
2038
- description: "Period label for billing cycles"
2039
- },
2040
- {
2041
- period: c(r, {
2042
- prefix: !1,
2043
- hideValueForExactPeriods: !0
2044
- })
2045
- }
2046
- );
2047
- return a(
2048
- {
2049
- defaultMessage: "{amount}{period}",
2050
- id: "checkout.order_summary_block.billing_period.sub_label",
2051
- description: "Billing period option sublabel showing price per period"
2052
- },
2053
- {
2054
- amount: Ie(g),
2055
- period: h
2056
- }
2057
- );
2058
- }, k = (r) => {
2059
- var g, h, w, j;
2060
- return (j = (w = (h = (g = o.invoicePreviewByBillingPeriod) == null ? void 0 : g[N(r)]) == null ? void 0 : h.periods) == null ? void 0 : w[0]) == null ? void 0 : j.amount_including_tax;
2061
- }, p = (r) => Number(r.quantity), C = (r, g) => {
2062
- if (!g)
2063
- return;
2064
- const w = {
2065
- DAY: 365,
2066
- WEEK: 52,
2067
- MONTH: 12,
2068
- YEAR: 1
2069
- }[r.type] / Math.max(r.value ?? 1, 1), j = p(g) * w;
2070
- if (Number.isFinite(j))
2071
- return {
2072
- quantity: j.toFixed(2),
2073
- currency: g.currency
2074
- };
2075
- }, x = (r, g) => {
2076
- if (!r || !g)
2077
- return;
2078
- const h = p(r) - p(g);
2079
- if (!(!Number.isFinite(h) || h <= 0))
2080
- return {
2081
- quantity: h.toFixed(2),
2082
- currency: r.currency
2083
- };
2084
- }, R = (r) => {
2085
- if (!r)
2086
- return;
2087
- const g = a(
2088
- {
2089
- defaultMessage: "Save {amount}",
2090
- id: "checkout.order_summary_block.billing_period.save_badge.prefix",
2091
- description: "First line for the savings badge label"
2092
- },
2093
- { amount: Ie(r) }
2094
- ), h = a({
2095
- defaultMessage: "/year",
2096
- id: "checkout.order_summary_block.billing_period.save_badge.suffix",
2097
- description: "Second line for the savings badge label"
2098
- });
2099
- return `${g}${h}`;
2100
- }, Q = b(() => {
2101
- var Z, re, ne;
2102
- const r = Ne({
2103
- pricingPlanScheduleInfos: o.subscription.pricing_plan_schedule_infos ?? [],
2104
- type: "DEFAULT"
2105
- }), g = ((re = (Z = r == null ? void 0 : r.pricing_plan_version) == null ? void 0 : Z.billing_period_settings) == null ? void 0 : re.billing_periods) ?? [], h = /* @__PURE__ */ new Map(), w = ($) => {
2106
- $ && h.set(N($), $);
2107
- }, j = ($) => {
2108
- var ie;
2109
- (ie = $ == null ? void 0 : $.items) == null || ie.forEach((J) => {
2110
- var ee, oe;
2111
- (ee = J.billing_period_configs) == null || ee.forEach(
2112
- (ue) => w(ue.billing_period)
2113
- ), (oe = J.pricing_currency_configs) == null || oe.forEach((ue) => {
2114
- var de;
2115
- (de = ue.billing_period_configs) == null || de.forEach(
2116
- (pe) => w(pe.billing_period)
2117
- );
2118
- });
2119
- });
2120
- };
2121
- if ((((ne = r == null ? void 0 : r.pricing_plan_version) == null ? void 0 : ne.pricing_categories) ?? []).forEach(($) => {
2122
- var ie, J;
2123
- (ie = $.pricings) == null || ie.forEach((ee) => j(ee)), (J = $.pricing_groups) == null || J.forEach(
2124
- (ee) => {
2125
- var oe;
2126
- return (oe = ee.pricings) == null ? void 0 : oe.forEach((ue) => j(ue));
2127
- }
2128
- );
2129
- }), !h.size)
2130
- return [];
2131
- const Y = g.map(($) => h.get(N($.period))).filter(($) => !!$), G = new Set(Y.map(N)), ae = [...h.values()].filter(
2132
- ($) => !G.has(N($))
2133
- );
2134
- return [...Y, ...ae];
2135
- }), s = b(() => {
2136
- const r = Q.value[Q.value.length - 1], g = r ? C(r, k(r)) : void 0;
2137
- return Q.value.map((w) => {
2138
- const j = w.type === "MONTH" && w.value === 3 ? a({
2139
- defaultMessage: "Billed quarterly",
2140
- id: "checkout.order_summary_block.billing_period.quarterly",
2141
- description: "Billing period option label for quarterly billing"
2142
- }) : a(
2143
- {
2144
- defaultMessage: "Billed {period}",
2145
- id: "checkout.order_summary_block.billing_period.label",
2146
- description: "Billing period option label for the selected period"
2147
- },
2148
- { period: l.value[w.type].full }
2149
- ), H = k(w), Y = C(w, H), G = r && w.type === r.type && w.value === r.value ? void 0 : x(Y, g), ae = R(G);
2150
- return {
2151
- label: j,
2152
- subLabel: L(w),
2153
- labelSuffixComponent: ae ? {
2154
- component: At,
2155
- props: {
2156
- color: "primary",
2157
- content: ae,
2158
- size: u.value,
2159
- class: "whitespace-nowrap text-left leading-tight"
2160
- }
2161
- } : void 0,
2162
- hidden: d.value === `${w.type}:${w.value}`,
2163
- value: `${w.type}:${w.value}`
2164
- };
2165
- });
2166
- }), P = b(() => {
2167
- const r = s.value, g = r[0], h = r[r.length - 1];
2168
- return {
2169
- smallestPeriod: g == null ? void 0 : g.value,
2170
- biggestPeriod: h == null ? void 0 : h.value
2171
- };
2172
- }), q = b(
2173
- () => s.value.find((r) => r.value === P.value.biggestPeriod)
2174
- ), te = b(
2175
- () => s.value.find((r) => r.value === d.value)
2176
- ), f = b(() => {
2177
- var Z, re, ne, $, ie, J, ee, oe;
2178
- const r = s.value, g = r[r.length - 1], h = d.value;
2179
- if (!g || !h || h === g.value)
2180
- return "";
2181
- const w = A(g.value);
2182
- if (!w)
2183
- return "";
2184
- const j = ($ = (ne = (re = (Z = o.invoicePreviewByBillingPeriod) == null ? void 0 : Z[g.value]) == null ? void 0 : re.periods) == null ? void 0 : ne[0]) == null ? void 0 : $.amount_including_tax, H = A(h), Y = (oe = (ee = (J = (ie = o.invoicePreviewByBillingPeriod) == null ? void 0 : ie[h]) == null ? void 0 : J.periods) == null ? void 0 : ee[0]) == null ? void 0 : oe.amount_including_tax;
2185
- if (!H || !Y)
2186
- return "";
2187
- const G = C(H, Y), ae = C(w, j);
2188
- return R(x(G, ae)) ?? "";
2189
- }), y = (r) => {
2190
- const { smallestPeriod: g, biggestPeriod: h } = P.value;
2191
- d.value = r ? h : g;
2192
- };
2193
- return (r, g) => (_(), O(t(ge), {
2194
- class: "sv-order-summary",
2195
- "no-border": "",
2196
- "no-spacing": "",
2197
- "content-background": "none",
2198
- title: e.noTitle ? void 0 : t(a)({
2199
- defaultMessage: "Order summary",
2200
- id: "checkout.order_summary_block.title",
2201
- description: "The title of the order summary block that lists the subscription cost in the checkout"
2202
- })
2203
- }, {
2204
- default: I(() => [
2205
- T("div", rn, [
2206
- E(t(ge), {
2207
- "no-spacing": "",
2208
- class: "sv-order-summary__subscription"
2209
- }, {
2210
- default: I(() => [
2211
- e.subscription ? (_(), O(Fi, {
2212
- key: 0,
2213
- avatar: e.avatar,
2214
- invoice: e.invoice,
2215
- subscription: e.subscription,
2216
- "enabled-pricing-ids": e.enabledPricingIds,
2217
- loading: e.isPreviewAndPaymentMethodsPending,
2218
- "trial-period": e.trialPeriod
2219
- }, null, 8, ["avatar", "invoice", "subscription", "enabled-pricing-ids", "loading", "trial-period"])) : B("", !0)
2220
- ]),
2221
- _: 1
2222
- }),
2223
- s.value.length === 2 ? (_(), O(t(ge), {
2224
- key: 0,
2225
- "no-spacing": "",
2226
- "content-classes": d.value === P.value.biggestPeriod ? "border-primary-500" : void 0
2227
- }, {
2228
- default: I(() => {
2229
- var h;
2230
- return [
2231
- T("div", ln, [
2232
- T("div", sn, [
2233
- q.value ? (_(), O(an, {
2234
- key: 0,
2235
- name: q.value.label,
2236
- description: ((h = te.value) == null ? void 0 : h.subLabel) ?? ""
2237
- }, Je({
2238
- default: I(() => [
2239
- E(t(vi), {
2240
- "model-value": d.value === P.value.biggestPeriod,
2241
- "onUpdate:modelValue": y
2242
- }, null, 8, ["model-value"])
2243
- ]),
2244
- _: 2
2245
- }, [
2246
- f.value ? {
2247
- name: "badge",
2248
- fn: I(() => [
2249
- E(t(At), {
2250
- intent: "brand",
2251
- content: f.value,
2252
- size: u.value,
2253
- class: "whitespace-nowrap text-left leading-tight"
2254
- }, null, 8, ["content", "size"])
2255
- ]),
2256
- key: "0"
2257
- } : void 0
2258
- ]), 1032, ["name", "description"])) : B("", !0)
2259
- ])
2260
- ])
2261
- ];
2262
- }),
2263
- _: 1
2264
- }, 8, ["content-classes"])) : s.value.length > 2 ? (_(), O(t(Ui), {
2265
- key: 1,
2266
- "single-model-value": d.value,
2267
- "onUpdate:singleModelValue": g[0] || (g[0] = (h) => d.value = h),
2268
- class: "sv-order-summary__billing-period",
2269
- options: s.value,
2270
- size: "xl",
2271
- "has-large-dropdown": "",
2272
- "show-sub-label-in-input": "",
2273
- "show-suffix-in-closed-input": ""
2274
- }, null, 8, ["single-model-value", "options"])) : B("", !0),
2275
- e.isUsageBased ? (_(), O(t(ge), {
2276
- key: 2,
2277
- "no-spacing": "",
2278
- class: "sv-order-summary__usage"
2279
- }, {
2280
- default: I(() => [
2281
- T("div", cn, [
2282
- E(t(se), {
2283
- "no-spacing": "",
2284
- variant: "body-sm",
2285
- color: "subtle"
2286
- }, {
2287
- default: I(() => [
2288
- F(U(t(a)({
2289
- defaultMessage: "+ Usage",
2290
- id: "checkout.invoice_preview.usage_based_message",
2291
- description: "The message shown for the usage based invoice preview"
2292
- })), 1)
2293
- ]),
2294
- _: 1
2295
- })
2296
- ])
2297
- ]),
2298
- _: 1
2299
- })) : B("", !0),
2300
- e.invoice && e.variant !== "products-inline" ? (_(), W("div", un, [
2301
- E(t(ki), {
2302
- invoice: e.invoice,
2303
- "wrapper-component": t(ge)
2304
- }, null, 8, ["invoice", "wrapper-component"])
2305
- ])) : B("", !0),
2306
- E(t(ge), { class: "sv-order-summary__totals" }, {
2307
- default: I(() => [
2308
- e.invoice ? (_(), O(t(zi), {
2309
- key: 0,
2310
- class: "sv-order-summary__invoice-preview",
2311
- variant: e.variant === "products-inline" ? "default" : "without-products",
2312
- invoice: e.invoice,
2313
- "trial-invoice": e.trialInvoice,
2314
- "is-paid": e.isPaid,
2315
- collapsible: e.collapsible,
2316
- "is-preview-without-taxes": !e.countryCode,
2317
- "is-customer-facing": ""
2318
- }, null, 8, ["variant", "invoice", "trial-invoice", "is-paid", "collapsible", "is-preview-without-taxes"])) : (_(), O(t(se), {
2319
- key: 1,
2320
- variant: "body-sm",
2321
- color: "subtle",
2322
- class: "sv-order-summary__empty"
2323
- }, {
2324
- default: I(() => [
2325
- F(U(t(a)({
2326
- defaultMessage: "Please select a country first",
2327
- description: "The message shown for the invoice preview when no country is set",
2328
- id: "checkout.invoice_preview.no_country_selected_message"
2329
- })), 1)
2330
- ]),
2331
- _: 1
2332
- }))
2333
- ]),
2334
- _: 1
2335
- })
2336
- ])
2337
- ]),
2338
- _: 1
2339
- }, 8, ["title"]));
2340
- }
2341
- });
2342
- async function Ft(e, i) {
2343
- const { AdyenCheckout: o } = await Ve();
2344
- return o(
2345
- Ci({
2346
- locale: e.locale,
2347
- amount: e.amount,
2348
- countryCode: e.countryCode,
2349
- paymentMethodOptionResponse: e.paymentMethodOptionsResponse,
2350
- logger: i
2351
- })
2352
- );
2353
- }
2354
- function Gt({
2355
- props: e,
2356
- create: i,
2357
- onMissingButton: o,
2358
- onMountFailed: n,
2359
- afterMount: a
2360
- }) {
2361
- const l = V(), c = Me(), m = async () => {
2362
- const u = await Ft(e, c), N = await i(u);
2363
- if (!l.value) {
2364
- o();
2365
- return;
2366
- }
2367
- try {
2368
- await N.isAvailable(), N.mount(l.value), a == null || a();
2369
- } catch (v) {
2370
- n(v);
2371
- }
2372
- };
2373
- return Oe(() => {
2374
- m();
2375
- }), { buttonRef: l };
2376
- }
2377
- const dn = {
2378
- key: 0,
2379
- id: "svg-logo",
2380
- viewBox: "0 0 35 15",
2381
- class: "h-[44px]"
2382
- }, pn = {
2383
- key: 1,
2384
- src: "data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iMTAxcHgiIGhlaWdodD0iMzIiIHZpZXdCb3g9IjAgMCAxMDEgMzIiIHByZXNlcnZlQXNwZWN0UmF0aW89InhNaW5ZTWluIG1lZXQiIHhtbG5zPSJodHRwOiYjeDJGOyYjeDJGO3d3dy53My5vcmcmI3gyRjsyMDAwJiN4MkY7c3ZnIj48cGF0aCBmaWxsPSIjMDAzMDg3IiBkPSJNIDEyLjIzNyAyLjggTCA0LjQzNyAyLjggQyAzLjkzNyAyLjggMy40MzcgMy4yIDMuMzM3IDMuNyBMIDAuMjM3IDIzLjcgQyAwLjEzNyAyNC4xIDAuNDM3IDI0LjQgMC44MzcgMjQuNCBMIDQuNTM3IDI0LjQgQyA1LjAzNyAyNC40IDUuNTM3IDI0IDUuNjM3IDIzLjUgTCA2LjQzNyAxOC4xIEMgNi41MzcgMTcuNiA2LjkzNyAxNy4yIDcuNTM3IDE3LjIgTCAxMC4wMzcgMTcuMiBDIDE1LjEzNyAxNy4yIDE4LjEzNyAxNC43IDE4LjkzNyA5LjggQyAxOS4yMzcgNy43IDE4LjkzNyA2IDE3LjkzNyA0LjggQyAxNi44MzcgMy41IDE0LjgzNyAyLjggMTIuMjM3IDIuOCBaIE0gMTMuMTM3IDEwLjEgQyAxMi43MzcgMTIuOSAxMC41MzcgMTIuOSA4LjUzNyAxMi45IEwgNy4zMzcgMTIuOSBMIDguMTM3IDcuNyBDIDguMTM3IDcuNCA4LjQzNyA3LjIgOC43MzcgNy4yIEwgOS4yMzcgNy4yIEMgMTAuNjM3IDcuMiAxMS45MzcgNy4yIDEyLjYzNyA4IEMgMTMuMTM3IDguNCAxMy4zMzcgOS4xIDEzLjEzNyAxMC4xIFoiPjwvcGF0aD48cGF0aCBmaWxsPSIjMDAzMDg3IiBkPSJNIDM1LjQzNyAxMCBMIDMxLjczNyAxMCBDIDMxLjQzNyAxMCAzMS4xMzcgMTAuMiAzMS4xMzcgMTAuNSBMIDMwLjkzNyAxMS41IEwgMzAuNjM3IDExLjEgQyAyOS44MzcgOS45IDI4LjAzNyA5LjUgMjYuMjM3IDkuNSBDIDIyLjEzNyA5LjUgMTguNjM3IDEyLjYgMTcuOTM3IDE3IEMgMTcuNTM3IDE5LjIgMTguMDM3IDIxLjMgMTkuMzM3IDIyLjcgQyAyMC40MzcgMjQgMjIuMTM3IDI0LjYgMjQuMDM3IDI0LjYgQyAyNy4zMzcgMjQuNiAyOS4yMzcgMjIuNSAyOS4yMzcgMjIuNSBMIDI5LjAzNyAyMy41IEMgMjguOTM3IDIzLjkgMjkuMjM3IDI0LjMgMjkuNjM3IDI0LjMgTCAzMy4wMzcgMjQuMyBDIDMzLjUzNyAyNC4zIDM0LjAzNyAyMy45IDM0LjEzNyAyMy40IEwgMzYuMTM3IDEwLjYgQyAzNi4yMzcgMTAuNCAzNS44MzcgMTAgMzUuNDM3IDEwIFogTSAzMC4zMzcgMTcuMiBDIDI5LjkzNyAxOS4zIDI4LjMzNyAyMC44IDI2LjEzNyAyMC44IEMgMjUuMDM3IDIwLjggMjQuMjM3IDIwLjUgMjMuNjM3IDE5LjggQyAyMy4wMzcgMTkuMSAyMi44MzcgMTguMiAyMy4wMzcgMTcuMiBDIDIzLjMzNyAxNS4xIDI1LjEzNyAxMy42IDI3LjIzNyAxMy42IEMgMjguMzM3IDEzLjYgMjkuMTM3IDE0IDI5LjczNyAxNC42IEMgMzAuMjM3IDE1LjMgMzAuNDM3IDE2LjIgMzAuMzM3IDE3LjIgWiI+PC9wYXRoPjxwYXRoIGZpbGw9IiMwMDMwODciIGQ9Ik0gNTUuMzM3IDEwIEwgNTEuNjM3IDEwIEMgNTEuMjM3IDEwIDUwLjkzNyAxMC4yIDUwLjczNyAxMC41IEwgNDUuNTM3IDE4LjEgTCA0My4zMzcgMTAuOCBDIDQzLjIzNyAxMC4zIDQyLjczNyAxMCA0Mi4zMzcgMTAgTCAzOC42MzcgMTAgQyAzOC4yMzcgMTAgMzcuODM3IDEwLjQgMzguMDM3IDEwLjkgTCA0Mi4xMzcgMjMgTCAzOC4yMzcgMjguNCBDIDM3LjkzNyAyOC44IDM4LjIzNyAyOS40IDM4LjczNyAyOS40IEwgNDIuNDM3IDI5LjQgQyA0Mi44MzcgMjkuNCA0My4xMzcgMjkuMiA0My4zMzcgMjguOSBMIDU1LjgzNyAxMC45IEMgNTYuMTM3IDEwLjYgNTUuODM3IDEwIDU1LjMzNyAxMCBaIj48L3BhdGg+PHBhdGggZmlsbD0iIzAwOWNkZSIgZD0iTSA2Ny43MzcgMi44IEwgNTkuOTM3IDIuOCBDIDU5LjQzNyAyLjggNTguOTM3IDMuMiA1OC44MzcgMy43IEwgNTUuNzM3IDIzLjYgQyA1NS42MzcgMjQgNTUuOTM3IDI0LjMgNTYuMzM3IDI0LjMgTCA2MC4zMzcgMjQuMyBDIDYwLjczNyAyNC4zIDYxLjAzNyAyNCA2MS4wMzcgMjMuNyBMIDYxLjkzNyAxOCBDIDYyLjAzNyAxNy41IDYyLjQzNyAxNy4xIDYzLjAzNyAxNy4xIEwgNjUuNTM3IDE3LjEgQyA3MC42MzcgMTcuMSA3My42MzcgMTQuNiA3NC40MzcgOS43IEMgNzQuNzM3IDcuNiA3NC40MzcgNS45IDczLjQzNyA0LjcgQyA3Mi4yMzcgMy41IDcwLjMzNyAyLjggNjcuNzM3IDIuOCBaIE0gNjguNjM3IDEwLjEgQyA2OC4yMzcgMTIuOSA2Ni4wMzcgMTIuOSA2NC4wMzcgMTIuOSBMIDYyLjgzNyAxMi45IEwgNjMuNjM3IDcuNyBDIDYzLjYzNyA3LjQgNjMuOTM3IDcuMiA2NC4yMzcgNy4yIEwgNjQuNzM3IDcuMiBDIDY2LjEzNyA3LjIgNjcuNDM3IDcuMiA2OC4xMzcgOCBDIDY4LjYzNyA4LjQgNjguNzM3IDkuMSA2OC42MzcgMTAuMSBaIj48L3BhdGg+PHBhdGggZmlsbD0iIzAwOWNkZSIgZD0iTSA5MC45MzcgMTAgTCA4Ny4yMzcgMTAgQyA4Ni45MzcgMTAgODYuNjM3IDEwLjIgODYuNjM3IDEwLjUgTCA4Ni40MzcgMTEuNSBMIDg2LjEzNyAxMS4xIEMgODUuMzM3IDkuOSA4My41MzcgOS41IDgxLjczNyA5LjUgQyA3Ny42MzcgOS41IDc0LjEzNyAxMi42IDczLjQzNyAxNyBDIDczLjAzNyAxOS4yIDczLjUzNyAyMS4zIDc0LjgzNyAyMi43IEMgNzUuOTM3IDI0IDc3LjYzNyAyNC42IDc5LjUzNyAyNC42IEMgODIuODM3IDI0LjYgODQuNzM3IDIyLjUgODQuNzM3IDIyLjUgTCA4NC41MzcgMjMuNSBDIDg0LjQzNyAyMy45IDg0LjczNyAyNC4zIDg1LjEzNyAyNC4zIEwgODguNTM3IDI0LjMgQyA4OS4wMzcgMjQuMyA4OS41MzcgMjMuOSA4OS42MzcgMjMuNCBMIDkxLjYzNyAxMC42IEMgOTEuNjM3IDEwLjQgOTEuMzM3IDEwIDkwLjkzNyAxMCBaIE0gODUuNzM3IDE3LjIgQyA4NS4zMzcgMTkuMyA4My43MzcgMjAuOCA4MS41MzcgMjAuOCBDIDgwLjQzNyAyMC44IDc5LjYzNyAyMC41IDc5LjAzNyAxOS44IEMgNzguNDM3IDE5LjEgNzguMjM3IDE4LjIgNzguNDM3IDE3LjIgQyA3OC43MzcgMTUuMSA4MC41MzcgMTMuNiA4Mi42MzcgMTMuNiBDIDgzLjczNyAxMy42IDg0LjUzNyAxNCA4NS4xMzcgMTQuNiBDIDg1LjczNyAxNS4zIDg1LjkzNyAxNi4yIDg1LjczNyAxNy4yIFoiPjwvcGF0aD48cGF0aCBmaWxsPSIjMDA5Y2RlIiBkPSJNIDk1LjMzNyAzLjMgTCA5Mi4xMzcgMjMuNiBDIDkyLjAzNyAyNCA5Mi4zMzcgMjQuMyA5Mi43MzcgMjQuMyBMIDk1LjkzNyAyNC4zIEMgOTYuNDM3IDI0LjMgOTYuOTM3IDIzLjkgOTcuMDM3IDIzLjQgTCAxMDAuMjM3IDMuNSBDIDEwMC4zMzcgMy4xIDEwMC4wMzcgMi44IDk5LjYzNyAyLjggTCA5Ni4wMzcgMi44IEMgOTUuNjM3IDIuOCA5NS40MzcgMyA5NS4zMzcgMy4zIFoiPjwvcGF0aD48L3N2Zz4",
2385
- role: "presentation",
2386
- class: "h-[22px]"
2387
- }, it = /* @__PURE__ */ ce({
2388
- __name: "ExpressPaymentMethodButton",
2389
- props: {
2390
- type: { type: String }
2391
- },
2392
- emits: ["click"],
2393
- setup(e, { emit: i }) {
2394
- const o = e, n = i, a = b(() => {
2395
- switch (o.type) {
2396
- case "applepay":
2397
- return "Apple Pay";
2398
- case "googlepay":
2399
- return "Google Pay";
2400
- case "paypal":
2401
- return "PayPal";
2402
- default:
2403
- return;
2404
- }
2405
- }), l = b(() => {
2406
- switch (o.type) {
2407
- case "applepay":
2408
- return "!bg-black !py-0";
2409
- case "googlepay":
2410
- return "!bg-black bg-[url(https://www.gstatic.com/instantbuy/svg/dark_gpay.svg)] bg-[length:auto_42.5%]";
2411
- case "paypal":
2412
- return "!bg-[#ffc439]";
2413
- default:
2414
- return;
2415
- }
2416
- });
2417
- function c() {
2418
- n("click");
2419
- }
2420
- return (m, u) => (_(), O(t(Ae), {
2421
- size: "lg",
2422
- "aria-label": a.value,
2423
- class: be([l.value, "!block h-11 w-full bg-center bg-no-repeat"]),
2424
- onClick: c
2425
- }, {
2426
- default: I(() => [
2427
- o.type === "applepay" ? (_(), W("svg", dn, [...u[0] || (u[0] = [
2428
- T("svg", {
2429
- id: "svg-logo",
2430
- x: "0",
2431
- y: "3.85",
2432
- height: "7.3",
2433
- width: "35",
2434
- class: "logo",
2435
- viewBox: "0 0 105 43",
2436
- version: "1.1",
2437
- xmlns: "http://www.w3.org/2000/svg"
2438
- }, [
2439
- T("title", null, "Apple Logo"),
2440
- T("g", {
2441
- stroke: "none",
2442
- "stroke-width": "1",
2443
- fill: "none",
2444
- "fill-rule": "evenodd"
2445
- }, [
2446
- T("g", { fill: "#FFF" }, [
2447
- T("path", { d: "M19.4028,5.5674 C20.6008,4.0684 21.4138,2.0564 21.1998,0.0004 C19.4458,0.0874 17.3058,1.1574 16.0668,2.6564 C14.9538,3.9414 13.9688,6.0374 14.2258,8.0074 C16.1948,8.1784 18.1618,7.0244 19.4028,5.5674" }),
2448
- T("path", { d: "M21.1772,8.3926 C18.3182,8.2226 15.8872,10.0156 14.5212,10.0156 C13.1552,10.0156 11.0642,8.4786 8.8022,8.5196 C5.8592,8.5626 3.1282,10.2276 1.6342,12.8746 C-1.4378,18.1696 0.8232,26.0246 3.8112,30.3376 C5.2622,32.4716 7.0102,34.8206 9.3142,34.7366 C11.4912,34.6506 12.3442,33.3266 14.9902,33.3266 C17.6352,33.3266 18.4042,34.7366 20.7082,34.6936 C23.0972,34.6506 24.5922,32.5586 26.0422,30.4226 C27.7072,27.9906 28.3882,25.6426 28.4312,25.5126 C28.3882,25.4706 23.8232,23.7186 23.7812,18.4676 C23.7382,14.0706 27.3652,11.9786 27.5362,11.8496 C25.4882,8.8196 22.2872,8.4786 21.1772,8.3926" }),
2449
- T("path", { d: "M85.5508,43.0381 L85.5508,39.1991 C85.8628,39.2421 86.6158,39.2871 87.0158,39.2871 C89.2138,39.2871 90.4558,38.3551 91.2108,35.9581 L91.6548,34.5371 L83.2428,11.2321 L88.4368,11.2321 L94.2958,30.1421 L94.4068,30.1421 L100.2668,11.2321 L105.3278,11.2321 L96.6048,35.7141 C94.6078,41.3291 92.3208,43.1721 87.4828,43.1721 C87.1048,43.1721 85.8838,43.1271 85.5508,43.0381" }),
2450
- T("path", { d: "M42.6499,19.3555 L48.3549,19.3555 C52.6829,19.3555 55.1469,17.0255 55.1469,12.9855 C55.1469,8.9455 52.6829,6.6375 48.3769,6.6375 L42.6499,6.6375 L42.6499,19.3555 Z M49.6869,2.4425 C55.9009,2.4425 60.2289,6.7265 60.2289,12.9625 C60.2289,19.2225 55.8129,23.5285 49.5309,23.5285 L42.6499,23.5285 L42.6499,34.4705 L37.6779,34.4705 L37.6779,2.4425 L49.6869,2.4425 Z" }),
2451
- T("path", { d: "M76.5547,25.7705 L76.5547,23.9715 L71.0287,24.3275 C67.9207,24.5275 66.3007,25.6815 66.3007,27.7015 C66.3007,29.6545 67.9887,30.9195 70.6287,30.9195 C74.0027,30.9195 76.5547,28.7665 76.5547,25.7705 M61.4617,27.8345 C61.4617,23.7285 64.5917,21.3755 70.3627,21.0205 L76.5547,20.6425 L76.5547,18.8675 C76.5547,16.2705 74.8457,14.8495 71.8057,14.8495 C69.2967,14.8495 67.4777,16.1375 67.0997,18.1125 L62.6167,18.1125 C62.7497,13.9615 66.6567,10.9435 71.9387,10.9435 C77.6207,10.9435 81.3267,13.9175 81.3267,18.5345 L81.3267,34.4705 L76.7327,34.4705 L76.7327,30.6305 L76.6217,30.6305 C75.3127,33.1395 72.4267,34.7145 69.2967,34.7145 C64.6807,34.7145 61.4617,31.9625 61.4617,27.8345" })
2452
- ])
2453
- ])
2454
- ], -1)
2455
- ])])) : o.type === "paypal" ? (_(), W("img", pn)) : B("", !0)
2456
- ]),
2457
- _: 1
2458
- }, 8, ["aria-label", "class"]));
2459
- }
2460
- }), mn = { class: "absolute h-[1px] w-[1px] overflow-hidden opacity-0" }, gn = "ADYEN", yn = /* @__PURE__ */ ce({
2461
- __name: "ExpressPaymentMethodApplePay",
2462
- props: {
2463
- onBillingInformationChange: { type: Function },
2464
- amount: { type: Object },
2465
- countryCode: { type: String },
2466
- locale: { type: String },
2467
- isVisible: { type: Boolean },
2468
- paymentMethodOptionsResponse: { type: Object },
2469
- billingInformation: { type: Object }
2470
- },
2471
- emits: ["ready", "update-billing-information"],
2472
- setup(e, { emit: i }) {
2473
- const o = e, n = i, a = V(), l = Me(), { authorizePayment: c } = Yi(), m = o.paymentMethodOptionsResponse.payment_acceptor.id;
2474
- function u(p) {
2475
- return Ki({
2476
- gateway: "ADYEN",
2477
- paymentAcceptorId: m,
2478
- paymentMethodType: "applepay",
2479
- ...p
2480
- });
2481
- }
2482
- const N = async () => {
2483
- const { ApplePay: p } = await Ve(), C = await Ft(o, l), x = new p(C, {
2484
- isExpress: !0,
2485
- recurringPaymentRequest: {
2486
- paymentDescription: o.billingInformation.description,
2487
- billingAgreement: o.billingInformation.agreement,
2488
- managementURL: "https://www.google.com",
2489
- // Trial
2490
- ...o.billingInformation.trial && {
2491
- trialBilling: {
2492
- label: o.billingInformation.trial.label,
2493
- amount: o.billingInformation.trial.amount.quantity.toString(),
2494
- type: "final",
2495
- paymentTiming: "recurring",
2496
- recurringPaymentStartDate: o.billingInformation.trial.startDate,
2497
- recurringPaymentEndDate: o.billingInformation.trial.endDate
2498
- }
2499
- },
2500
- // Regular
2501
- ...o.billingInformation.regular && {
2502
- regularBilling: {
2503
- label: o.billingInformation.regular.label,
2504
- amount: o.billingInformation.regular.amount.quantity.toString(),
2505
- type: "final",
2506
- paymentTiming: "recurring",
2507
- recurringPaymentStartDate: o.billingInformation.regular.startDate,
2508
- ...v(
2509
- o.billingInformation.regular.interval ?? { type: "MONTH", value: 1 }
2510
- )
2511
- }
2512
- }
2513
- },
2514
- requiredBillingContactFields: ["postalAddress"],
2515
- requiredShippingContactFields: ["email"],
2516
- onPaymentMethodSelected: async (R, Q, s) => {
2517
- var f, y, r, g, h, w, j;
2518
- const { invoicePreview: P, trialInvoicePreview: q } = await o.onBillingInformationChange({
2519
- ...((f = s.paymentMethod.billingContact) == null ? void 0 : f.postalCode) && {
2520
- postal_code: s.paymentMethod.billingContact.postalCode
2521
- },
2522
- ...((y = s.paymentMethod.billingContact) == null ? void 0 : y.locality) && {
2523
- city: s.paymentMethod.billingContact.locality
2524
- },
2525
- ...d((r = s.paymentMethod.billingContact) == null ? void 0 : r.countryCode) && {
2526
- country: d((g = s.paymentMethod.billingContact) == null ? void 0 : g.countryCode)
2527
- }
2528
- }), te = q ? q.invoice_amount_including_tax.quantity.toString() : P.invoice_amount_including_tax.quantity.toString();
2529
- n("update-billing-information", {
2530
- postal_code: (h = s.paymentMethod.billingContact) == null ? void 0 : h.postalCode,
2531
- city: (w = s.paymentMethod.billingContact) == null ? void 0 : w.locality,
2532
- country: (j = s.paymentMethod.billingContact) == null ? void 0 : j.countryCode
2533
- }), R({
2534
- newTotal: {
2535
- label: o.billingInformation.regular.label,
2536
- amount: te,
2537
- type: "final"
2538
- }
2539
- });
2540
- },
2541
- onError: (R) => {
2542
- l.error(
2543
- "APPLE_PAY_ERROR",
2544
- "Apple Pay error",
2545
- u({ reason: "APPLE_PAY_ERROR", cause: R }),
2546
- R
2547
- );
2548
- },
2549
- onAuthorized: async (R, Q) => {
2550
- var s;
2551
- try {
2552
- const P = R.authorizedEvent;
2553
- l.info("APPLE_PAY_AUTHORIZED", "Apple Pay authorized", {
2554
- paymentAcceptorId: m,
2555
- hasPaymentMethod: !!P.payment.token.paymentMethod,
2556
- hasPaymentData: !!P.payment.token.paymentData,
2557
- hasBillingContact: !!P.payment.billingContact
2558
- });
2559
- const q = P.payment.billingContact, te = R.billingAddress;
2560
- q ? n(
2561
- "update-billing-information",
2562
- M(q)
2563
- ) : te && n(
2564
- "update-billing-information",
2565
- A(te)
2566
- );
2567
- const f = {
2568
- payment_method: bt(
2569
- P.payment.token.paymentMethod
2570
- ),
2571
- browser_info: bt(
2572
- P.payment.token.paymentData
2573
- )
2574
- }, y = xi({
2575
- paymentAcceptorId: m,
2576
- redirectUrl: window.location.href
2577
- }), r = await c({
2578
- payment_acceptor_id: m,
2579
- payment_gateway_variant: gn,
2580
- adyen: {
2581
- ...f,
2582
- store_payment_method: !0
2583
- // Required for recurring payments
2584
- },
2585
- amount: o.amount,
2586
- return_url: y
2587
- });
2588
- if (l.info("APPLE_PAY_API_RESPONSE", "Payment API response received", {
2589
- paymentAcceptorId: m,
2590
- status: r.status
2591
- }), r.status === "FAILURE") {
2592
- l.error(
2593
- "APPLE_PAY_AUTHORIZATION_FAILED",
2594
- "Payment authorization failed",
2595
- u({
2596
- reason: "APPLE_PAY_AUTHORIZATION_REJECTED",
2597
- extra: { paymentStatus: r.status }
2598
- })
2599
- ), Q.reject();
2600
- return;
2601
- }
2602
- if (r.status === "ACTION_REQUIRED") {
2603
- l.warn(
2604
- "APPLE_PAY_ACTION_REQUIRED",
2605
- "Payment requires additional action",
2606
- u({
2607
- reason: "APPLE_PAY_ACTION_REQUIRED",
2608
- extra: { actionType: (s = r.action) == null ? void 0 : s.method }
2609
- })
2610
- ), Q.reject();
2611
- return;
2612
- }
2613
- l.info("APPLE_PAY_SUCCESS", "Apple Pay payment successful, resolving"), Q.resolve();
2614
- } catch (P) {
2615
- l.error(
2616
- "APPLE_PAY_AUTHORIZATION_FAILED",
2617
- "Apple Pay authorization failed",
2618
- u({ reason: "APPLE_PAY_AUTHORIZATION_FAILED", cause: P }),
2619
- P
2620
- ), Q.reject();
2621
- }
2622
- }
2623
- });
2624
- if (!a.value) {
2625
- l.error("APPLE_PAY_ERROR", "Apple Pay button ref not found");
2626
- return;
2627
- }
2628
- try {
2629
- await x.isAvailable(), x.mount(a.value), n("ready");
2630
- } catch (R) {
2631
- l.error("APPLE_PAY_ERROR", "Apple Pay not available on this device", {}, R);
2632
- }
2633
- }, v = (p) => {
2634
- if (!p.value)
2635
- return;
2636
- let C = p.value ?? 1, x = p.type.toLowerCase();
2637
- if (p.type === "WEEK" && (x = "day", C = p.value * 7), x === "day" || x === "month" || x === "year" || x === "hour" || x === "minute")
2638
- return {
2639
- recurringPaymentIntervalUnit: x,
2640
- recurringPaymentIntervalCount: C
2641
- };
2642
- }, M = (p) => ({
2643
- postal_code: p.postalCode,
2644
- city: p.locality,
2645
- country: p.countryCode
2646
- }), A = (p) => ({
2647
- postal_code: p.postalCode,
2648
- city: p.city,
2649
- country: p.country
2650
- }), d = (p) => p && L(p) ? p : void 0, L = (p) => Ge(p), k = () => {
2651
- var C;
2652
- const p = (C = a.value) == null ? void 0 : C.querySelector("apple-pay-button");
2653
- if (p) {
2654
- const x = new MouseEvent("click", {
2655
- bubbles: !0,
2656
- cancelable: !0,
2657
- view: window
2658
- });
2659
- p.dispatchEvent(x);
2660
- }
2661
- };
2662
- return Oe(() => {
2663
- N();
2664
- }), (p, C) => (_(), W(_e, null, [
2665
- e.isVisible ? (_(), O(it, {
2666
- key: 0,
2667
- type: "applepay",
2668
- onClick: k
2669
- })) : B("", !0),
2670
- T("div", mn, [
2671
- T("div", {
2672
- ref_key: "applePayButtonRef",
2673
- ref: a
2674
- }, null, 512)
2675
- ])
2676
- ], 64));
2677
- }
2678
- }), vn = { class: "relative overflow-hidden" }, fn = /* @__PURE__ */ ce({
2679
- __name: "ExpressPaymentMethodPaypal",
2680
- props: {
2681
- amount: { type: Object },
2682
- countryCode: { type: String },
2683
- locale: { type: String },
2684
- isVisible: { type: Boolean },
2685
- paymentMethodOptionsResponse: { type: Object },
2686
- billingInformation: { type: Object }
2687
- },
2688
- emits: ["ready", "update-billing-information"],
2689
- setup(e, { emit: i }) {
2690
- const o = e, n = i, a = Me(), { buttonRef: l } = Gt({
2691
- props: o,
2692
- onMissingButton: () => a.error(
2693
- "EXPRESS_CHECKOUT_PAYPAL_ERROR",
2694
- "The PayPal button reference is not found and cannot be mounted"
2695
- ),
2696
- onMountFailed: (c) => a.error("EXPRESS_CHECKOUT_PAYPAL_ERROR", "Failed mounting PayPal express button", {
2697
- error: c
2698
- }),
2699
- create: async (c) => {
2700
- const { PayPal: m } = await Ve();
2701
- return new m(c, {
2702
- isExpress: !0,
2703
- blockPayPalPayLaterButton: !0,
2704
- blockPayPalCreditButton: !0,
2705
- blockPayPalVenmoButton: !0,
2706
- style: {
2707
- height: 55
2708
- },
2709
- onInit: () => {
2710
- n("ready");
2711
- }
2712
- });
2713
- }
2714
- });
2715
- return (c, m) => (_(), W("div", vn, [
2716
- e.isVisible ? (_(), O(it, {
2717
- key: 0,
2718
- type: "paypal",
2719
- class: "w-full"
2720
- })) : B("", !0),
2721
- T("div", {
2722
- ref_key: "paypalButtonRef",
2723
- ref: l,
2724
- class: "absolute inset-0 opacity-[0.0001]"
2725
- }, null, 512)
2726
- ]));
2727
- }
2728
- }), _n = { class: "absolute h-[1px] w-[1px] overflow-hidden opacity-0" }, Mn = /* @__PURE__ */ ce({
2729
- __name: "ExpressPaymentMethodGooglePay",
2730
- props: {
2731
- amount: { type: Object },
2732
- countryCode: { type: String },
2733
- locale: { type: String },
2734
- isVisible: { type: Boolean },
2735
- paymentMethodOptionsResponse: { type: Object },
2736
- billingInformation: { type: Object }
2737
- },
2738
- emits: ["ready", "update-billing-information"],
2739
- setup(e, { emit: i }) {
2740
- const o = e, n = i, a = Me(), { buttonRef: l } = Gt({
2741
- props: o,
2742
- onMissingButton: () => a.error(
2743
- "EXPRESS_CHECKOUT_GOOGLE_PAY_ERROR",
2744
- "The Google Pay button reference is not found and cannot be mounted"
2745
- ),
2746
- onMountFailed: (m) => a.error(
2747
- "EXPRESS_CHECKOUT_GOOGLE_PAY_ERROR",
2748
- "Failed mounting Google Pay express button",
2749
- {},
2750
- m
2751
- ),
2752
- create: async (m) => {
2753
- const { GooglePay: u } = await Ve();
2754
- return new u(m, { isExpress: !0 });
2755
- },
2756
- afterMount: () => n("ready")
2757
- }), c = () => {
2758
- var u;
2759
- const m = (u = l.value) == null ? void 0 : u.querySelector("#gpay-button-online-api-id");
2760
- if (m) {
2761
- const N = new MouseEvent("click", {
2762
- bubbles: !0,
2763
- cancelable: !0,
2764
- view: window
2765
- });
2766
- m.dispatchEvent(N);
2767
- }
2768
- };
2769
- return (m, u) => (_(), W(_e, null, [
2770
- e.isVisible ? (_(), O(it, {
2771
- key: 0,
2772
- type: "googlepay",
2773
- onClick: c
2774
- })) : B("", !0),
2775
- T("div", _n, [
2776
- T("div", {
2777
- ref_key: "googlePayButtonRef",
2778
- ref: l
2779
- }, null, 512)
2780
- ])
2781
- ], 64));
2782
- }
2783
- }), hn = {
2784
- key: 0,
2785
- class: "mt-4n"
2786
- }, bn = { class: "mb-2" }, In = { class: "grid grid-cols-6 gap-1 md:gap-2" }, An = { class: "mt-4 h-4" }, Pn = 2, Dn = /* @__PURE__ */ ce({
2787
- __name: "ExpressPaymentMethods",
2788
- props: {
2789
- amount: { type: Object },
2790
- countryCode: { type: String },
2791
- locale: { type: String },
2792
- paymentMethodsOptionsResponse: { type: null },
2793
- billingInformation: { type: Object },
2794
- onBillingInformationChange: { type: Function }
2795
- },
2796
- emits: ["update-billing-information"],
2797
- setup(e) {
2798
- const i = ["applepay"], o = e, { $t: n } = ve(), a = V(!1), l = V(!1), c = V(!1), m = b(() => {
2799
- var d;
2800
- if (i.includes("applepay"))
2801
- return (d = o.paymentMethodsOptionsResponse) == null ? void 0 : d.find(
2802
- (L) => {
2803
- var k;
2804
- return (k = L.options) == null ? void 0 : k.some(
2805
- (p) => p.name.toLowerCase() === "apple pay" && p.payment_gateway_variant === "ADYEN"
2806
- );
2807
- }
2808
- );
2809
- }), u = b(() => {
2810
- var d;
2811
- if (i.includes("paypal"))
2812
- return (d = o.paymentMethodsOptionsResponse) == null ? void 0 : d.find(
2813
- (L) => {
2814
- var k;
2815
- return (k = L.options) == null ? void 0 : k.some(
2816
- (p) => p.name.toLowerCase() === "paypal" && p.payment_gateway_variant === "ADYEN"
2817
- );
2818
- }
2819
- );
2820
- }), N = b(() => {
2821
- var d;
2822
- if (i.includes("googlepay"))
2823
- return (d = o.paymentMethodsOptionsResponse) == null ? void 0 : d.find(
2824
- (L) => {
2825
- var k;
2826
- return (k = L.options) == null ? void 0 : k.some(
2827
- (p) => p.name.toLowerCase() === "google pay" && p.payment_gateway_variant === "ADYEN"
2828
- );
2829
- }
2830
- );
2831
- }), v = b(() => !!(m.value || N.value || u.value)), M = b(() => {
2832
- var p;
2833
- if (((p = o.paymentMethodsOptionsResponse) == null ? void 0 : p.length) === 0)
2834
- return !1;
2835
- const d = !m.value || a.value, L = !N.value || l.value, k = !u.value || c.value;
2836
- return d && L && k;
2837
- }), A = b(() => M.value ? (m.value ? 1 : 0) + (N.value ? 1 : 0) + (u.value ? 1 : 0) : Pn);
2838
- return (d, L) => v.value ? (_(), W("div", hn, [
2839
- T("div", bn, [
2840
- M.value ? (_(), O(t(se), {
2841
- key: 1,
2842
- variant: "heading-3",
2843
- tag: "h2"
2844
- }, {
2845
- default: I(() => [
2846
- F(U(t(n)({
2847
- defaultMessage: "Subscribe instantly with",
2848
- id: "checkout.express_payment_methods.title",
2849
- description: "The title of the express payment methods block in the checkout form"
2850
- })), 1)
2851
- ]),
2852
- _: 1
2853
- })) : (_(), O(fe, {
2854
- key: 0,
2855
- variant: "title"
2856
- }))
2857
- ]),
2858
- T("div", In, [
2859
- M.value ? B("", !0) : (_(), W(_e, { key: 0 }, [
2860
- E(fe, { class: "col-span-3 h-11" }),
2861
- E(fe, { class: "col-span-3 h-11" })
2862
- ], 64)),
2863
- T("div", {
2864
- class: be(["col-span-3 md:col-span-2", {
2865
- hidden: !m.value,
2866
- "!col-span-6": A.value === 1,
2867
- "md:!col-span-3": A.value === 2,
2868
- "!col-span-6 md:!col-span-2": A.value === 3
2869
- }])
2870
- }, [
2871
- m.value ? (_(), O(yn, {
2872
- key: 0,
2873
- amount: e.amount,
2874
- "billing-information": e.billingInformation,
2875
- "country-code": e.countryCode,
2876
- locale: e.locale,
2877
- "is-visible": M.value,
2878
- "payment-method-options-response": m.value,
2879
- "on-billing-information-change": e.onBillingInformationChange,
2880
- onReady: L[0] || (L[0] = (k) => a.value = !0),
2881
- onUpdateBillingInformation: L[1] || (L[1] = (k) => d.$emit("update-billing-information", k))
2882
- }, null, 8, ["amount", "billing-information", "country-code", "locale", "is-visible", "payment-method-options-response", "on-billing-information-change"])) : B("", !0)
2883
- ], 2),
2884
- T("div", {
2885
- class: be(["col-span-3 md:col-span-2", {
2886
- hidden: !N.value,
2887
- "col-span-6 md:col-span-6": A.value === 1,
2888
- "md:!col-span-3": A.value === 2
2889
- }])
2890
- }, [
2891
- N.value ? (_(), O(Mn, {
2892
- key: 0,
2893
- amount: e.amount,
2894
- "billing-information": e.billingInformation,
2895
- "country-code": e.countryCode,
2896
- locale: e.locale,
2897
- "is-visible": M.value,
2898
- "payment-method-options-response": N.value,
2899
- onReady: L[2] || (L[2] = (k) => l.value = !0)
2900
- }, null, 8, ["amount", "billing-information", "country-code", "locale", "is-visible", "payment-method-options-response"])) : B("", !0)
2901
- ], 2),
2902
- T("div", {
2903
- class: be(["col-span-3 md:col-span-2", {
2904
- hidden: !u.value,
2905
- "col-span-6 md:col-span-6": A.value === 1,
2906
- "md:!col-span-3": A.value === 2
2907
- }])
2908
- }, [
2909
- u.value ? (_(), O(fn, {
2910
- key: 0,
2911
- amount: e.amount,
2912
- "billing-information": e.billingInformation,
2913
- "country-code": e.countryCode,
2914
- locale: e.locale,
2915
- "is-visible": M.value,
2916
- "payment-method-options-response": u.value,
2917
- onReady: L[3] || (L[3] = (k) => c.value = !0)
2918
- }, null, 8, ["amount", "billing-information", "country-code", "locale", "is-visible", "payment-method-options-response"])) : B("", !0)
2919
- ], 2)
2920
- ]),
2921
- T("div", An, [
2922
- M.value ? (_(), O(t(Gi), {
2923
- key: 1,
2924
- text: t(n)({
2925
- defaultMessage: "Or",
2926
- id: "checkout.express_payment_methods.divider_text",
2927
- description: "The text of the divider text in the express payment methods block in the checkout form"
2928
- }),
2929
- "text-position": "center"
2930
- }, null, 8, ["text"])) : (_(), O(fe, {
2931
- key: 0,
2932
- variant: "divider-text"
2933
- }))
2934
- ])
2935
- ])) : B("", !0);
2936
- }
2937
- }), Nn = ["aria-expanded", "aria-label"], En = { class: "flex w-full cursor-pointer flex-row items-center justify-between gap-3 px-3 py-2" }, Cn = { class: "flex flex-row items-center gap-2" }, xn = ["onKeydown"], Ln = ["aria-label"], Tn = { class: "flex w-full cursor-pointer flex-row items-center justify-between gap-3 px-3 py-2" }, wn = { class: "flex flex-row items-center gap-2" }, Sn = {
2938
- class: "sr-only",
2939
- "aria-live": "polite"
2940
- }, On = /* @__PURE__ */ ce({
2941
- inheritAttrs: !1,
2942
- __name: "PromotionCodeSection",
2943
- props: {
2944
- promotionCode: { default: null, type: [String, null] }
2945
- },
2946
- emits: ["update:appliedCode", "apply", "remove"],
2947
- setup(e, { emit: i }) {
2948
- const { $t: o } = ve(), n = e, a = i, l = V(!1), c = V(""), m = V(""), u = V(null), N = V(null), v = Hi("promotion-code-"), M = `${v}-label`, A = `${v}-panel`, d = b(() => n.promotionCode !== null && n.promotionCode !== ""), L = b(() => c.value.trim().length > 0), k = b(
2949
- () => n.promotionCode ?? o({
2950
- defaultMessage: "Promotion applied",
2951
- id: "checkout.promotion_code.applied_label",
2952
- description: "Fallback label for an applied promotion code in checkout"
2953
- })
2954
- ), p = b(
2955
- () => l.value ? o({
2956
- defaultMessage: "Collapse promotion code input",
2957
- id: "checkout.promotion_code.collapse_aria_label",
2958
- description: "Aria label for the promotion code toggle button in checkout, while the input is open"
2959
- }) : o({
2960
- defaultMessage: "Expand promotion code input",
2961
- id: "checkout.promotion_code.expand_aria_label",
2962
- description: "Aria label for the promotion code toggle button in checkout, while the input is closed"
2963
- })
2964
- ), C = b(
2965
- () => o({
2966
- defaultMessage: "Apply promotion code",
2967
- id: "checkout.promotion_code.apply_aria_label",
2968
- description: "Aria label for the promotion code apply button in checkout"
2969
- })
2970
- ), x = b(
2971
- () => o({
2972
- defaultMessage: "Remove promotion code",
2973
- id: "checkout.promotion_code.remove_aria_label",
2974
- description: "Aria label for the promotion code remove button in checkout"
2975
- })
2976
- ), R = () => {
2977
- c.value = "";
2978
- }, Q = () => {
2979
- var y;
2980
- const f = (y = N.value) == null ? void 0 : y.querySelector("input");
2981
- f instanceof HTMLInputElement && f.focus();
2982
- }, s = () => {
2983
- l.value && (l.value = !1);
2984
- }, P = () => {
2985
- d.value || (l.value = !l.value);
2986
- }, q = () => {
2987
- if (!L.value)
2988
- return;
2989
- const f = c.value.trim();
2990
- a("update:appliedCode", f), a("apply", f), m.value = o({
2991
- defaultMessage: "Promotion code applied",
2992
- id: "checkout.promotion_code.applied_status",
2993
- description: "Aria live message when a promotion code is applied in checkout"
2994
- }), l.value = !1;
2995
- }, te = () => {
2996
- a("update:appliedCode", null), a("remove"), m.value = o({
2997
- defaultMessage: "Promotion code removed",
2998
- id: "checkout.promotion_code.removed_status",
2999
- description: "Aria live message when a promotion code is removed in checkout"
3000
- }), R(), He(() => {
3001
- var f;
3002
- (f = u.value) == null || f.focus();
3003
- });
3004
- };
3005
- return we(l, (f) => {
3006
- if (!f) {
3007
- R(), He(() => {
3008
- var y;
3009
- (y = u.value) == null || y.focus();
3010
- });
3011
- return;
3012
- }
3013
- He(() => {
3014
- Q();
3015
- });
3016
- }), we(
3017
- () => n.promotionCode,
3018
- (f) => {
3019
- f || R();
3020
- }
3021
- ), (f, y) => (_(), W(_e, null, [
3022
- d.value ? (_(), O(t(ge), ft({ key: 1 }, f.$attrs, {
3023
- "no-border": "",
3024
- "no-spacing": "",
3025
- "content-background": "none",
3026
- class: "relative w-full"
3027
- }), {
3028
- default: I(() => [
3029
- T("button", {
3030
- type: "button",
3031
- class: "w-full rounded border border-primary-900 bg-white",
3032
- "aria-label": x.value,
3033
- onClick: te
3034
- }, [
3035
- T("div", Tn, [
3036
- T("div", wn, [
3037
- E(t(je), { icon: "local_activity" }),
3038
- E(t(se), {
3039
- variant: "body-sm",
3040
- class: "font-semibold"
3041
- }, {
3042
- default: I(() => [
3043
- F(U(k.value), 1)
3044
- ]),
3045
- _: 1
3046
- })
3047
- ]),
3048
- E(t(je), { icon: "close" })
3049
- ])
3050
- ], 8, Ln)
3051
- ]),
3052
- _: 1
3053
- }, 16)) : (_(), O(t(ge), ft({ key: 0 }, f.$attrs, {
3054
- "no-spacing": "",
3055
- class: "relative w-full"
3056
- }), {
3057
- default: I(() => [
3058
- T("button", {
3059
- ref_key: "toggleRef",
3060
- ref: u,
3061
- type: "button",
3062
- class: "w-full",
3063
- "aria-expanded": l.value,
3064
- "aria-controls": A,
3065
- "aria-label": p.value,
3066
- onClick: P
3067
- }, [
3068
- T("div", En, [
3069
- T("div", Cn, [
3070
- E(t(je), { icon: "local_activity" }),
3071
- E(t(se), {
3072
- id: M,
3073
- variant: "body-sm"
3074
- }, {
3075
- default: I(() => [
3076
- F(U(t(o)({
3077
- defaultMessage: "Add promotion code",
3078
- id: "checkout.promotion_code.add_label",
3079
- description: "Label for adding a promotion code in checkout"
3080
- })), 1)
3081
- ]),
3082
- _: 1
3083
- })
3084
- ]),
3085
- E(t(je), {
3086
- icon: l.value ? "remove" : "add"
3087
- }, null, 8, ["icon"])
3088
- ])
3089
- ], 8, Nn),
3090
- ti(T("div", {
3091
- id: A,
3092
- ref_key: "panelRef",
3093
- ref: N,
3094
- role: "region",
3095
- "aria-labelledby": M,
3096
- class: "flex w-full flex-row items-center gap-2 overflow-hidden border-t px-3 py-2",
3097
- onKeydown: _t($e(s, ["prevent"]), ["esc"])
3098
- }, [
3099
- E(t(ye), {
3100
- modelValue: c.value,
3101
- "onUpdate:modelValue": y[0] || (y[0] = (r) => c.value = r),
3102
- placeholder: t(o)({
3103
- defaultMessage: "Promotion code",
3104
- id: "checkout.promotion_code.placeholder",
3105
- description: "Placeholder for promotion code input in checkout"
3106
- }),
3107
- "aria-label": t(o)({
3108
- defaultMessage: "Promotion code",
3109
- id: "checkout.promotion_code.input_aria_label",
3110
- description: "Aria label for promotion code input in checkout"
3111
- }),
3112
- class: "w-full",
3113
- onKeydown: _t($e(q, ["prevent"]), ["enter"])
3114
- }, null, 8, ["modelValue", "placeholder", "aria-label", "onKeydown"]),
3115
- E(t(Ae), {
3116
- type: "button",
3117
- disabled: !L.value,
3118
- "aria-label": C.value,
3119
- "aria-disabled": !L.value,
3120
- onClick: q
3121
- }, {
3122
- default: I(() => [
3123
- F(U(t(o)({
3124
- defaultMessage: "Apply",
3125
- id: "checkout.promotion_code.apply_button",
3126
- description: "Button label for applying a promotion code in checkout"
3127
- })), 1)
3128
- ]),
3129
- _: 1
3130
- }, 8, ["disabled", "aria-label", "aria-disabled"])
3131
- ], 40, xn), [
3132
- [ii, l.value]
3133
- ])
3134
- ]),
3135
- _: 1
3136
- }, 16)),
3137
- T("span", Sn, U(m.value), 1)
3138
- ], 64));
3139
- }
3140
- }), kn = { class: "sv-checkout__header" }, zn = { class: "sv-checkout__payment-methods" }, jn = {
3141
- key: 0,
3142
- class: "sv-checkout__payment-methods-body"
3143
- }, Rn = {
3144
- key: 3,
3145
- class: "sv-checkout__payment-form"
3146
- }, Bn = { class: "sv-checkout__order-summary" }, $n = { class: "flex flex-col gap-2" }, Un = /* @__PURE__ */ ce({
3147
- __name: "Checkout",
3148
- props: {
3149
- configuration: { type: Object }
3150
- },
3151
- emits: ["error", "ready"],
3152
- setup(e, { emit: i }) {
3153
- var lt, st, ct, ut, dt, pt, mt, gt, yt;
3154
- const o = Mt(
3155
- () => import("./PaymentIntegrationForm-CpOZUf-W.mjs")
3156
- ), n = Mt(
3157
- () => import("./PlanCustomizationEditor-BQqkgmzL.mjs")
3158
- ), a = e, l = i, c = b(() => a.configuration), m = V(), u = V(), N = Me(), { $t: v, locale: M } = ve(), { formatTimePeriod: A } = Lt(), d = Li(), { isMobileViewport: L } = St();
3159
- if (N.info("COMPONENT_INITIALIZED", "Checkout component initialized"), ((lt = d.value) == null ? void 0 : lt.type) !== "INIT_PRICING_PLAN_SUBSCRIPTION")
3160
- throw N.error("INVALID_TOKEN", "Invalid token"), Error("Invalid token");
3161
- d.value.status === "REVOKED" && (m.value = {
3162
- code: "RESOURCE_REVOKED",
3163
- message: `Portal url with resource id "${d.value.id}" is revoked`
3164
- }, N.error("RESOURCE_REVOKED", `Portal url with resource id "${d.value.id}" is revoked`));
3165
- const k = (ct = (st = d.value) == null ? void 0 : st.init_pricing_plan_subscription) == null ? void 0 : ct.pricing_plan_subscription_id, p = (dt = (ut = d.value) == null ? void 0 : ut.init_pricing_plan_subscription) == null ? void 0 : dt.success_url, {
3166
- validatedEmail: C,
3167
- validatedCountry: x,
3168
- paymentMethodOptions: R,
3169
- hasPaymentMethodOptionsError: Q,
3170
- retryPaymentMethodOptions: s,
3171
- subscription: P,
3172
- isPaymentMethodsPending: q,
3173
- isInvoicePreviewPending: te,
3174
- checkoutForm: f,
3175
- invoicePreview: y,
3176
- invoicePreviewByBillingPeriod: r,
3177
- trialInvoicePreview: g,
3178
- trialPeriod: h,
3179
- authorizationContext: w,
3180
- isPaid: j,
3181
- amount: H,
3182
- loadInvoicePreview: Y,
3183
- updateInvoicePreviewOnBillingInformationChange: G,
3184
- saveFormStateForRedirect: ae
3185
- } = xo({
3186
- initialCountry: (pt = a.configuration) == null ? void 0 : pt.countryCode,
3187
- initialEmail: (mt = a.configuration) == null ? void 0 : mt.email,
3188
- subscriptionId: k,
3189
- enabledPricingIds: (gt = a.configuration) == null ? void 0 : gt.enabledPricingIds
3190
- }), Z = V(!1), re = async () => {
3191
- var D;
3192
- await f.validation.value.$validate(), !f.validation.value.$invalid && (Z.value = !0, ae(), (D = u.value) == null || D.submit());
3193
- }, ne = () => {
3194
- Z.value = !1;
3195
- }, $ = async () => (await f.validation.value.$validate(), !f.validation.value.$invalid), ie = b(() => !!g.value), J = b(
3196
- () => y.value ? Zo(y.value) : !1
3197
- ), ee = b(
3198
- () => f.form.value.country && ["US", "CA"].includes(f.form.value.country) || !1
3199
- ), oe = b({
3200
- get: () => f.form.value.enabledPricingIds ?? [],
3201
- set: (D) => {
3202
- f.form.value.enabledPricingIds = D;
3203
- }
3204
- }), ue = b(
3205
- () => P.value ? Ne({
3206
- pricingPlanScheduleInfos: P.value.pricing_plan_schedule_infos,
3207
- type: "DEFAULT"
3208
- }) : void 0
3209
- ), de = b(() => {
3210
- var S, z;
3211
- if (!P.value)
3212
- return;
3213
- const D = (z = (S = ue.value) == null ? void 0 : S.pricing_plan_version) == null ? void 0 : z.pricing_currency_settings;
3214
- return $t({
3215
- country: f.form.value.country,
3216
- pricingCurrencySettings: D,
3217
- fallbackCurrency: P.value.billing_currency
3218
- });
3219
- }), pe = b(() => {
3220
- if (!ue.value || !P.value)
3221
- return /* @__PURE__ */ new Set();
3222
- const D = mi({
3223
- pricingPlanScheduleInfo: ue.value
3224
- }), S = de.value, z = P.value.billing_period, X = /* @__PURE__ */ new Set();
3225
- return D.forEach((K, me) => {
3226
- S && K.currency !== S || z && K.billingPeriod && (K.billingPeriod.type !== z.type || K.billingPeriod.value !== z.value) || X.add(me);
3227
- }), X;
3228
- }), Ee = b({
3229
- get: () => {
3230
- const D = f.form.value.seatsValues ?? [], S = pe.value;
3231
- return S.size ? D.filter(({ pricing_item_config_id: z }) => S.has(z)) : D;
3232
- },
3233
- set: (D) => {
3234
- const S = f.form.value.seatsValues ?? [], z = pe.value;
3235
- if (!z.size) {
3236
- f.form.value.seatsValues = D;
3237
- return;
3238
- }
3239
- const X = S.filter(
3240
- ({ pricing_item_config_id: K }) => !z.has(K)
3241
- );
3242
- f.form.value.seatsValues = X.concat(D);
3243
- }
3244
- }), Ce = b({
3245
- get: () => {
3246
- const D = f.form.value.unitsValues ?? [], S = pe.value;
3247
- return S.size ? D.filter(({ pricing_item_config_id: z }) => S.has(z)) : D;
3248
- },
3249
- set: (D) => {
3250
- const S = f.form.value.unitsValues ?? [], z = pe.value;
3251
- if (!z.size) {
3252
- f.form.value.unitsValues = D;
3253
- return;
3254
- }
3255
- const X = S.filter(
3256
- ({ pricing_item_config_id: K }) => !z.has(K)
3257
- );
3258
- f.form.value.unitsValues = X.concat(D);
3259
- }
3260
- }), ke = b(() => {
3261
- var D, S, z, X, K;
3262
- return g.value ? v(
3263
- {
3264
- defaultMessage: "{discounted_amount} for {trial_period}, then {subscription_amount}/{billing_period} until canceled, starting {start_date, date, ::MMMMd}.",
3265
- id: "checkout.agreement.trial",
3266
- description: "The agreement for the trial period"
3267
- },
3268
- {
3269
- discounted_amount: g.value.tax_summary.total_amount.quantity === "0.00" ? v({
3270
- defaultMessage: "Free",
3271
- id: "checkout.agreement.trial.free",
3272
- description: "The free amount for the trial period"
3273
- }) : Ie(g.value.tax_summary.total_amount),
3274
- trial_period: A(h.value, { short: !0 }),
3275
- subscription_amount: Ie(
3276
- ((D = y.value) == null ? void 0 : D.tax_summary.total_amount) ?? {
3277
- quantity: "0.00",
3278
- currency: "EUR"
3279
- }
3280
- ),
3281
- billing_period: A(
3282
- ((S = y.value) == null ? void 0 : S.billing_period) ?? { type: "MONTH", value: 1 },
3283
- { short: !0, singular: !0, hideValueForExactPeriods: !0 }
3284
- ),
3285
- // @ts-expect-error formatjs does not support this type yet
3286
- start_date: new Date(Pe.value)
3287
- }
3288
- ) : v(
3289
- {
3290
- defaultMessage: "{subscription_amount}/{billing_period} until canceled, starting {start_date, date, long}.",
3291
- id: "checkout.agreement.subscription",
3292
- description: "The agreement for the subscription"
3293
- },
3294
- {
3295
- subscription_amount: (z = y.value) != null && z.tax_summary.total_amount ? Ie((X = y.value) == null ? void 0 : X.tax_summary.total_amount) : "",
3296
- billing_period: A(
3297
- ((K = y.value) == null ? void 0 : K.billing_period) ?? { type: "MONTH", value: 1 },
3298
- { short: !0, singular: !0, hideValueForExactPeriods: !0 }
3299
- ),
3300
- // @ts-expect-error formatjs does not support this type yet
3301
- start_date: new Date(Pe.value)
3302
- }
3303
- );
3304
- }), xe = b(() => {
3305
- var S;
3306
- if (!y.value)
3307
- return;
3308
- const D = Ai({
3309
- subscription: P.value,
3310
- fallback: v({
3311
- defaultMessage: "Subscription",
3312
- description: "The fallback name for when no subscription name can be determined",
3313
- id: "customer_overview.subscriptions_block.fallback_subscription_name"
3314
- })
3315
- });
3316
- return {
3317
- description: D,
3318
- managementURL: "https://www.solvimon.com/account/billing",
3319
- agreement: ke.value,
3320
- ...g.value && h.value && {
3321
- trial: {
3322
- label: v({
3323
- defaultMessage: "Trial",
3324
- id: "checkout.trial.label",
3325
- description: "The label of the trial"
3326
- }),
3327
- amount: g.value.tax_summary.total_amount,
3328
- startDate: Ye.value ? new Date(Ye.value) : void 0,
3329
- endDate: ot.value ? new Date(ot.value) : void 0
3330
- }
3331
- },
3332
- regular: {
3333
- label: D,
3334
- amount: y.value.tax_summary.total_amount,
3335
- startDate: Pe.value ? new Date(Pe.value) : void 0,
3336
- interval: ((S = P.value) == null ? void 0 : S.billing_period) ?? { type: "MONTH", value: 1 }
3337
- }
3338
- };
3339
- }), le = (D) => Ge(D), Yt = (D) => {
3340
- const { country: S, ...z } = D;
3341
- f.updateInitialState({
3342
- ...z,
3343
- ...S && le(S) ? { country: S } : {}
3344
- });
3345
- }, Kt = b(() => !(C && x)), Ye = b(() => {
3346
- var z, X, K;
3347
- const D = (X = (z = g.value) == null ? void 0 : z.periods) == null ? void 0 : X[0], S = (K = Ke.value) == null ? void 0 : K.trialStartDate;
3348
- return D != null && D.start_at ? new Date(D.start_at) : S;
3349
- }), Ke = b(() => Pi(P.value)), ot = b(() => {
3350
- var z, X, K;
3351
- const D = (X = (z = g.value) == null ? void 0 : z.periods) == null ? void 0 : X[0], S = (K = Ke.value) == null ? void 0 : K.trialEndDate;
3352
- return D != null && D.end_at ? new Date(D.end_at) : S;
3353
- }), Pe = b(() => {
3354
- var z, X, K;
3355
- const D = (X = (z = y.value) == null ? void 0 : z.periods) == null ? void 0 : X[0], S = (K = Ke.value) == null ? void 0 : K.subscriptionStartDate;
3356
- return D != null && D.start_at ? new Date(D.start_at) : S;
3357
- }), Qt = b(() => !!(f.form.value.seatsValues && f.form.value.seatsValues.length > 0 || f.form.value.unitsValues && f.form.value.unitsValues.length > 0 || P.value && bo(P.value) || P.value && Io(P.value))), Le = V(null), {
3358
- applyPromotionCode: nt,
3359
- removePromotionCode: Ht,
3360
- isPromotionCodePending: Zt,
3361
- promotionCodeErrorMessage: Qe
3362
- } = Lo({
3363
- checkoutForm: f,
3364
- updateInvoicePreviewOnBillingInformationChange: G,
3365
- formatErrorMessage: ({ action: D }) => v(D === "apply" ? {
3366
- defaultMessage: "Promotion code could not be applied. Please try again.",
3367
- id: "checkout.promotion_code.apply_failed",
3368
- description: "Error message when applying a promotion code in checkout failed"
3369
- } : {
3370
- defaultMessage: "Promotion code could not be removed. Please try again.",
3371
- id: "checkout.promotion_code.remove_failed",
3372
- description: "Error message when removing a promotion code in checkout failed"
3373
- }),
3374
- onInvalidPromotionCode: () => {
3375
- Le.value = null;
3376
- },
3377
- onApplyError: () => {
3378
- Le.value = null;
3379
- }
3380
- });
3381
- wo({
3382
- subscription: P,
3383
- promotionCode: (yt = a.configuration) == null ? void 0 : yt.couponCode,
3384
- appliedPromotionCode: Le,
3385
- applyPromotionCode: nt
3386
- });
3387
- const at = () => {
3388
- p && Ni(p);
3389
- }, Xt = b(
3390
- () => {
3391
- var D;
3392
- return !((D = a.configuration) != null && D.onPaymentSuccess) && !!p;
3393
- }
3394
- ), Wt = () => {
3395
- var D;
3396
- if (j.value = !0, Qe.value = null, (D = a.configuration) != null && D.onPaymentSuccess) {
3397
- a.configuration.onPaymentSuccess();
3398
- return;
3399
- }
3400
- if (p) {
3401
- at();
3402
- return;
3403
- }
3404
- }, rt = (D) => {
3405
- P.value && (P.value = {
3406
- ...P.value,
3407
- billing_period: D
3408
- }, Y());
3409
- };
3410
- return Oe(() => {
3411
- l("ready");
3412
- }), (D, S) => m.value ? (_(), O(qo, {
3413
- key: 0,
3414
- class: "sv-checkout sv-root sv-screen sv-checkout--error"
3415
- })) : (_(), O(t(Qi), {
3416
- key: 1,
3417
- class: be(["sv-checkout sv-root sv-screen", { "sv-checkout--paid": t(j) }])
3418
- }, {
3419
- header: I(() => [
3420
- T("div", kn, [
3421
- E(fe, { class: "min-h-[52px] w-96" }, {
3422
- default: I(() => {
3423
- var z, X, K;
3424
- return [
3425
- t(y) && t(P) && Pe.value ? (_(), O(Ho, {
3426
- key: 0,
3427
- class: "sv-checkout__title",
3428
- "trial-start-date": Ye.value,
3429
- "trial-period": t(h),
3430
- "subscription-start-date": Pe.value,
3431
- "subscription-name": ((z = t(P)) == null ? void 0 : z.name) ?? "",
3432
- amount: (X = t(y)) == null ? void 0 : X.invoice_amount_including_tax,
3433
- "billing-period": (K = t(P)) == null ? void 0 : K.billing_period,
3434
- "country-code": t(f).form.value.country
3435
- }, null, 8, ["trial-start-date", "trial-period", "subscription-start-date", "subscription-name", "amount", "billing-period", "country-code"])) : B("", !0)
3436
- ];
3437
- }),
3438
- _: 1
3439
- })
3440
- ])
3441
- ]),
3442
- content: I(() => {
3443
- var z, X, K;
3444
- return [
3445
- t(j) ? (_(), O(Jo, {
3446
- key: 0,
3447
- class: "sv-checkout__completed-payment",
3448
- onContinueToMerchant: at
3449
- })) : (_(), W(_e, { key: 1 }, [
3450
- t(P) && t(L) ? (_(), O(xt, {
3451
- key: 0,
3452
- class: "sv-checkout__mobile-order-summary",
3453
- subscription: t(P),
3454
- invoice: t(y),
3455
- "invoice-preview-by-billing-period": t(r),
3456
- "trial-invoice": t(g),
3457
- "enabled-pricing-ids": oe.value,
3458
- "trial-period": t(h),
3459
- avatar: (z = c.value) == null ? void 0 : z.avatar,
3460
- "is-paid": t(j),
3461
- "is-usage-based": J.value,
3462
- "is-preview-and-payment-methods-pending": t(q) || t(te),
3463
- "country-code": t(f).form.value.country,
3464
- collapsible: "collapsed",
3465
- variant: "products-inline",
3466
- onBillingPeriodChange: rt
3467
- }, null, 8, ["subscription", "invoice", "invoice-preview-by-billing-period", "trial-invoice", "enabled-pricing-ids", "trial-period", "avatar", "is-paid", "is-usage-based", "is-preview-and-payment-methods-pending", "country-code"])) : B("", !0),
3468
- Qt.value && t(P) ? (_(), O(t(n), {
3469
- key: 1,
3470
- "seats-values": Ee.value,
3471
- "onUpdate:seatsValues": S[0] || (S[0] = (me) => Ee.value = me),
3472
- "units-values": Ce.value,
3473
- "onUpdate:unitsValues": S[1] || (S[1] = (me) => Ce.value = me),
3474
- "enabled-pricing-ids": oe.value,
3475
- "onUpdate:enabledPricingIds": S[2] || (S[2] = (me) => oe.value = me),
3476
- class: "sv-checkout__plan-customization",
3477
- subscription: t(P),
3478
- "initial-seats-values": (X = t(f).initialState) == null ? void 0 : X.value.seatsValues,
3479
- "initial-units-values": (K = t(f).initialState) == null ? void 0 : K.value.unitsValues,
3480
- "billing-period": t(P).billing_period,
3481
- currency: de.value
3482
- }, null, 8, ["seats-values", "units-values", "enabled-pricing-ids", "subscription", "initial-seats-values", "initial-units-values", "billing-period", "currency"])) : B("", !0),
3483
- t(f).form.value.country && t(H) && xe.value ? (_(), O(Dn, {
3484
- key: 2,
3485
- class: "sv-checkout__express-payment-methods",
3486
- amount: t(H),
3487
- "country-code": t(f).form.value.country,
3488
- locale: t(M),
3489
- "payment-methods-options-response": t(R) ?? [],
3490
- "billing-information": xe.value,
3491
- "on-billing-information-change": t(G),
3492
- onUpdateBillingInformation: Yt
3493
- }, null, 8, ["amount", "country-code", "locale", "payment-methods-options-response", "billing-information", "on-billing-information-change"])) : B("", !0),
3494
- E(Go, {
3495
- modelValue: t(f).form.value,
3496
- "onUpdate:modelValue": S[3] || (S[3] = (me) => t(f).form.value = me),
3497
- class: "sv-checkout__customer-form",
3498
- validation: t(f).validation,
3499
- "read-only-email": t(C),
3500
- "show-customer-info-on-top": Kt.value || t(j),
3501
- "is-billing-information-mandatory": ee.value,
3502
- "get-is-field-required": t(f).getIsFieldRequired,
3503
- "read-only": t(j)
3504
- }, null, 8, ["modelValue", "validation", "read-only-email", "show-customer-info-on-top", "is-billing-information-mandatory", "get-is-field-required", "read-only"]),
3505
- T("div", zn, [
3506
- E(fe, {
3507
- variant: "section",
3508
- class: "min-h-[130px]"
3509
- }, {
3510
- default: I(() => [
3511
- !t(q) || t(q) && t(R).length > 0 ? (_(), W("div", jn, [
3512
- E(t(se), {
3513
- variant: "heading-3",
3514
- tag: "h2",
3515
- class: "sv-checkout__payment-methods-title mb-2"
3516
- }, {
3517
- default: I(() => [
3518
- F(U(t(v)({
3519
- defaultMessage: "Payment method",
3520
- id: "checkout.payment_method_block.title",
3521
- description: "The title of the payment method block in the checkout form"
3522
- })), 1)
3523
- ]),
3524
- _: 1
3525
- }),
3526
- t(f).form.value.country ? t(Q) ? (_(), O(Ze, {
3527
- key: 1,
3528
- class: "sv-checkout__payment-methods-error",
3529
- icon: "error"
3530
- }, {
3531
- title: I(() => [
3532
- F(U(t(v)({
3533
- defaultMessage: "Could not load payment methods",
3534
- id: "checkout.payment_method_block.load_failed_title",
3535
- description: "The title shown when the payment methods failed to load"
3536
- })), 1)
3537
- ]),
3538
- message: I(() => [
3539
- F(U(t(v)({
3540
- defaultMessage: "Check your connection and try again.",
3541
- id: "checkout.payment_method_block.load_failed_message",
3542
- description: "The message shown when the payment methods failed to load"
3543
- })), 1)
3544
- ]),
3545
- action: I(() => [
3546
- E(t(Ae), {
3547
- type: "button",
3548
- intent: "secondary",
3549
- size: "sm",
3550
- class: "sv-action sv-action--secondary sv-checkout__payment-methods-retry",
3551
- onClick: t(s)
3552
- }, {
3553
- default: I(() => [
3554
- F(U(t(v)({
3555
- defaultMessage: "Try again",
3556
- id: "checkout.payment_method_block.load_failed_retry_button.label",
3557
- description: "The label of the button that loads the payment methods again"
3558
- })), 1)
3559
- ]),
3560
- _: 1
3561
- }, 8, ["onClick"])
3562
- ]),
3563
- _: 1
3564
- })) : t(R).length === 0 ? (_(), O(Ze, {
3565
- key: 2,
3566
- class: "sv-checkout__payment-methods-empty",
3567
- icon: "credit_card_off"
3568
- }, {
3569
- title: I(() => [
3570
- F(U(t(v)({
3571
- defaultMessage: "No payment methods available",
3572
- id: "checkout.payment_method_block.no_payment_methods_available_title",
3573
- description: "The title shown when there are no available payment methods"
3574
- })), 1)
3575
- ]),
3576
- _: 1
3577
- })) : t(H) && t(f).form.value.country ? (_(), W("div", Rn, [
3578
- T("div", {
3579
- class: be({ "pointer-events-none opacity-60": Z.value })
3580
- }, [
3581
- E(t(o), {
3582
- ref_key: "paymentIntegrationFormRef",
3583
- ref: u,
3584
- "country-code": t(f).form.value.country,
3585
- context: t(w),
3586
- amount: t(H),
3587
- email: t(f).form.value.email,
3588
- variant: "AUTHORIZE",
3589
- "payment-method-options": t(R) ?? [],
3590
- "validate-on-submit": $,
3591
- "redirects-on-success": Xt.value,
3592
- "force-store-payment-method": "",
3593
- onPaymentSuccess: Wt,
3594
- onPaymentFailed: ne,
3595
- onReady: S[4] || (S[4] = (me) => l("ready"))
3596
- }, null, 8, ["country-code", "context", "amount", "email", "payment-method-options", "redirects-on-success"])
3597
- ], 2)
3598
- ])) : B("", !0) : (_(), O(Ze, {
3599
- key: 0,
3600
- class: "sv-checkout__payment-methods-empty",
3601
- icon: "captive_portal"
3602
- }, {
3603
- title: I(() => [
3604
- F(U(t(v)({
3605
- defaultMessage: "Select your billing country",
3606
- id: "checkout.payment_method_block.no_country_selected_title",
3607
- description: "The title shown when no country is selected"
3608
- })), 1)
3609
- ]),
3610
- message: I(() => [
3611
- F(U(t(v)({
3612
- defaultMessage: "Payment methods will be shown after you select the billing country.",
3613
- id: "checkout.payment_method_block.no_country_selected_message",
3614
- description: "The message shown when no country is selected"
3615
- })), 1)
3616
- ]),
3617
- _: 1
3618
- }))
3619
- ])) : B("", !0)
3620
- ]),
3621
- _: 1
3622
- })
3623
- ])
3624
- ], 64))
3625
- ];
3626
- }),
3627
- aside: I(() => [
3628
- T("div", Bn, [
3629
- E(fe, {
3630
- variant: "section",
3631
- class: "min-h-[220px]"
3632
- }, {
3633
- default: I(() => {
3634
- var z;
3635
- return [
3636
- t(P) && t(y) ? (_(), O(xt, {
3637
- key: 0,
3638
- subscription: t(P),
3639
- invoice: t(y),
3640
- "invoice-preview-by-billing-period": t(r),
3641
- "trial-invoice": t(g),
3642
- "enabled-pricing-ids": oe.value,
3643
- "trial-period": t(h),
3644
- "country-code": t(f).form.value.country,
3645
- avatar: (z = c.value) == null ? void 0 : z.avatar,
3646
- "is-paid": t(j),
3647
- "is-usage-based": J.value,
3648
- "is-preview-and-payment-methods-pending": t(q) || t(te),
3649
- onBillingPeriodChange: rt
3650
- }, null, 8, ["subscription", "invoice", "invoice-preview-by-billing-period", "trial-invoice", "enabled-pricing-ids", "trial-period", "country-code", "avatar", "is-paid", "is-usage-based", "is-preview-and-payment-methods-pending"])) : B("", !0)
3651
- ];
3652
- }),
3653
- _: 1
3654
- })
3655
- ]),
3656
- t(j) ? B("", !0) : (_(), W(_e, { key: 0 }, [
3657
- E(On, {
3658
- class: "sv-checkout__promotion-code",
3659
- "promotion-code": Le.value,
3660
- "onUpdate:appliedCode": S[5] || (S[5] = (z) => Le.value = z),
3661
- onRemove: t(Ht),
3662
- onApply: t(nt)
3663
- }, null, 8, ["promotion-code", "onRemove", "onApply"]),
3664
- t(Qe) ? (_(), O(t(ri), {
3665
- key: 0,
3666
- class: "sv-checkout__promotion-error mt-2",
3667
- title: t(Qe)
3668
- }, null, 8, ["title"])) : B("", !0),
3669
- T("div", $n, [
3670
- E(fe, { class: "sv-checkout__submit-skeleton min-h-[44px]" }, {
3671
- default: I(() => [
3672
- t(y) ? (_(), O(t(Ae), {
3673
- key: 0,
3674
- type: "button",
3675
- size: "lg",
3676
- class: "sv-action sv-action--primary sv-action--full-width sv-checkout__submit w-full",
3677
- disabled: t(Zt) || t(R).length === 0 || Z.value,
3678
- loading: Z.value,
3679
- onClick: re
3680
- }, {
3681
- default: I(() => [
3682
- F(U(ie.value ? t(v)({
3683
- defaultMessage: "Start trial",
3684
- id: "checkout.pay_and_subscribe_button_trial.label",
3685
- description: "The label of the start trial button in the checkout form"
3686
- }) : t(v)({
3687
- defaultMessage: "Pay and subscribe",
3688
- id: "checkout.pay_and_subscribe_button.label",
3689
- description: "The label of the pay and subscribe button in the checkout form"
3690
- })), 1)
3691
- ]),
3692
- _: 1
3693
- }, 8, ["disabled", "loading"])) : B("", !0)
3694
- ]),
3695
- _: 1
3696
- }),
3697
- E(Vi, { "payment-method-options": t(R) }, null, 8, ["payment-method-options"])
3698
- ])
3699
- ], 64))
3700
- ]),
3701
- _: 1
3702
- }, 8, ["class"]));
3703
- }
3704
- }), Vn = /* @__PURE__ */ ce({
3705
- __name: "Checkout.entry",
3706
- props: {
3707
- environment: { type: String },
3708
- locale: { type: String },
3709
- dateLocale: { type: String },
3710
- messages: { type: Object },
3711
- primaryColor: { type: String },
3712
- secondaryColor: { type: String },
3713
- isShadowRoot: { type: Boolean },
3714
- experimentalFeatures: { type: Array },
3715
- logLevel: { type: String },
3716
- onLog: { type: Function },
3717
- allowedPortalTypes: { type: Array },
3718
- portalObject: { type: Object },
3719
- cssOverrides: { type: [String, Array] },
3720
- branding: { type: Object },
3721
- configuration: { type: Object }
3722
- },
3723
- emits: ["error", "ready"],
3724
- setup(e, { emit: i }) {
3725
- var c;
3726
- const o = Zi("checkout"), n = e, a = i, l = ((c = n.configuration) == null ? void 0 : c.couponCode) ?? Te("coupon_code") ?? void 0;
3727
- return (m, u) => (_(), O(t(ni), {
3728
- entry: m.$props,
3729
- "component-name": t(o),
3730
- "allowed-portal-types": ["INIT_PRICING_PLAN_SUBSCRIPTION"],
3731
- onError: u[1] || (u[1] = (N) => m.$emit("error", N))
3732
- }, {
3733
- default: I(() => {
3734
- var N, v, M, A, d;
3735
- return [
3736
- E(Un, {
3737
- configuration: {
3738
- avatar: (v = (N = e.branding) == null ? void 0 : N.emblem) == null ? void 0 : v.public_url,
3739
- email: (M = e.configuration) == null ? void 0 : M.email,
3740
- countryCode: (A = e.configuration) == null ? void 0 : A.countryCode,
3741
- enabledPricingIds: (d = e.configuration) == null ? void 0 : d.enabledPricingIds,
3742
- couponCode: t(l)
3743
- },
3744
- onReady: u[0] || (u[0] = (L) => a("ready"))
3745
- }, Je({ _: 2 }, [
3746
- m.$slots["terms-and-conditions"] ? {
3747
- name: "terms-and-conditions",
3748
- fn: I(() => [
3749
- We(m.$slots, "terms-and-conditions")
3750
- ]),
3751
- key: "0"
3752
- } : void 0
3753
- ]), 1032, ["configuration"])
3754
- ];
3755
- }),
3756
- _: 3
3757
- }, 8, ["entry", "component-name"]));
3758
- }
3759
- }), { define: Sa } = ai(
3760
- Vn,
3761
- "checkout"
3762
- );
3763
- export {
3764
- Ao as F,
3765
- an as _,
3766
- No as a,
3767
- Sa as d,
3768
- wa as g
3769
- };