@solvimon/solvimon-web 0.1.0-alpha.26 → 0.1.0-alpha.27

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 (215) hide show
  1. package/README.md +12 -10
  2. package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DwbIiJBY.js → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-081H9T3X.js} +1 -1
  3. package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DcrLNA_x.mjs → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DNepCMRp.mjs} +6 -6
  4. package/dist/{Avatar.vue.es-Bm6MCMAL.js → Avatar.vue.es-BJxSCU76.js} +1 -1
  5. package/dist/{Avatar.vue.es-BqQHvLGA.mjs → Avatar.vue.es-sfMZiX7A.mjs} +1 -1
  6. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-BV5iEOxn.js +1 -0
  7. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BFza7Nf9.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-DmY3a-Wi.mjs} +14 -15
  8. package/dist/{Button.vue.es-qGvnOKnK.js → Button.vue.es-BzkuglKw.js} +1 -1
  9. package/dist/{Button.vue.es-C32_baQN.mjs → Button.vue.es-Cmjfm4jw.mjs} +1 -1
  10. package/dist/{ChargeOnDemandModal-CIiI74ls.mjs → ChargeOnDemandModal-CB4mrvkU.mjs} +145 -153
  11. package/dist/{ChargeOnDemandModal-DIQaGnRs.js → ChargeOnDemandModal-b17YswWA.js} +1 -1
  12. package/dist/Checkout.entry.ce-HlUrJ1kh.js +2 -0
  13. package/dist/Checkout.entry.ce-X2zGo6hG.mjs +4381 -0
  14. package/dist/{Chip.vue.es-D60gTbfe.js → Chip.vue.es-B2jjzIOc.js} +1 -1
  15. package/dist/{Chip.vue.es-CKCOY5T6.mjs → Chip.vue.es-DksjbJO8.mjs} +2 -2
  16. package/dist/{ContextMenu.vue.es-C7KI8Gz6.js → ContextMenu.vue.es-DUU43tCy.js} +1 -1
  17. package/dist/{ContextMenu.vue.es-Da-lAmTl.mjs → ContextMenu.vue.es-zRvoEJlV.mjs} +4 -4
  18. package/dist/{CustomerBillingInformation.vue.es-bFUx81Ig.js → CustomerBillingInformation.vue.es-BfPEB42w.js} +1 -1
  19. package/dist/{CustomerBillingInformation.vue.es-BxBQt4Q0.mjs → CustomerBillingInformation.vue.es-DhFbpZPK.mjs} +2 -2
  20. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BcTZgshS.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-B41la-T7.mjs} +14 -15
  21. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-C0lJ_ESU.js → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BISD6n8X.js} +1 -1
  22. package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DkbQ2MiR.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DssxYPSA.mjs} +110 -123
  23. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-XufY6bdV.js +1 -0
  24. package/dist/{DividerText.vue.es-BF3gnr4e.js → DividerText.vue.es-CoyDk9eH.js} +1 -1
  25. package/dist/{DividerText.vue.es-DKl3FnDJ.mjs → DividerText.vue.es-nAo1eRMV.mjs} +1 -1
  26. package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-cSQeqr0A.js → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CQ0KrXHJ.js} +1 -1
  27. package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-C3QYra1x.mjs → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-QW9NdxyZ.mjs} +4 -4
  28. package/dist/{ErrorNotification.vue.es-rRKgmkzV.mjs → ErrorNotification.vue.es-h-D37rfG.mjs} +1 -1
  29. package/dist/{ErrorNotification.vue.es-BX9dHEc-.js → ErrorNotification.vue.es-tS9vySUZ.js} +1 -1
  30. package/dist/{IconButton.vue.es-Bwdfu-jm.js → IconButton.vue.es-DgQN18Am.js} +1 -1
  31. package/dist/{IconButton.vue.es-UlqwNPAX.mjs → IconButton.vue.es-DvfErUOq.mjs} +2 -2
  32. package/dist/{IconTitle.vue.es-CK9k69tV.mjs → IconTitle.vue.es-B_8bS0tn.mjs} +3 -3
  33. package/dist/{IconTitle.vue.es-Cei98MBw.js → IconTitle.vue.es-Dn2xcPHj.js} +1 -1
  34. package/dist/{Input.vue.es-B47l_feL.js → Input.vue.es-B60eK8Ds.js} +1 -1
  35. package/dist/{Input.vue.es-D9IjIWc-.mjs → Input.vue.es-CU9u5yKH.mjs} +2 -2
  36. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DKlPrxQS.js → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Dqdezse7.js} +1 -1
  37. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DUfJl07Y.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-gpMtYNzn.mjs} +2 -2
  38. package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-DlJ6lELc.js → InvoiceEntryView.vue_vue_type_script_setup_true_lang-Cl6HU243.js} +1 -1
  39. package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-D9Rtgapa.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-DNqawlYV.mjs} +2 -2
  40. package/dist/{InvoiceSummary.vue.es-DBnR9Hs7.js → InvoiceSummary.vue.es-CAmA8g0t.js} +1 -1
  41. package/dist/{InvoiceSummary.vue.es-DQ4KvTaw.mjs → InvoiceSummary.vue.es-CRiFJ5x-.mjs} +7 -7
  42. package/dist/{Modal.vue.es-B9xMiyn3.mjs → Modal.vue.es-BeI5C9-9.mjs} +5 -5
  43. package/dist/{Modal.vue.es-8LN4gBh0.js → Modal.vue.es-DvLB3uCG.js} +1 -1
  44. package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-B1yGKkWN.js → PaymentErrorCard.vue_vue_type_script_setup_true_lang-Dg4rn1cm.js} +1 -1
  45. package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-BVzL2PGe.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-DqHcOnZp.mjs} +5 -6
  46. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DSGf6uFP.js → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-B9R5JRJv.js} +1 -1
  47. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-nLTPnH4j.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DlqoWKQq.mjs} +3 -3
  48. package/dist/{PaymentHistoryBlock-Ds93gNvh.js → PaymentHistoryBlock-Uw8xeKUk.js} +1 -1
  49. package/dist/{PaymentHistoryBlock-DYa99P1M.mjs → PaymentHistoryBlock-mCqdFjnL.mjs} +1 -1
  50. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CBZhXQfC.js → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-ALI5f0py.js} +1 -1
  51. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-D0KnSy0y.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DxaY3eFN.mjs} +4 -4
  52. package/dist/{PaymentIntegrationForm-B_Db4DG1.js → PaymentIntegrationForm-Cx0zCf_C.js} +1 -1
  53. package/dist/{PaymentIntegrationForm-UWoyZgsR.mjs → PaymentIntegrationForm-DVx4DEtD.mjs} +1 -1
  54. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-B-viSd_i.js +1 -0
  55. package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-J15IDbMc.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CCKCXXZX.mjs} +4 -4
  56. package/dist/PaymentIntegrationFormAdyen-B-v-4nlj.js +98 -0
  57. package/dist/{PaymentIntegrationFormAdyen-D4qfNtZ_.mjs → PaymentIntegrationFormAdyen-Yr8p5Fly.mjs} +16 -20
  58. package/dist/{PaymentIntegrationFormStripe-DUCJTIAq.js → PaymentIntegrationFormStripe-CoLmAzas.js} +3 -3
  59. package/dist/{PaymentIntegrationFormStripe-BIiMCWlV.mjs → PaymentIntegrationFormStripe-Ds0BXt89.mjs} +5 -5
  60. package/dist/{PaymentMethod.vue.es-CKu5nApX.mjs → PaymentMethod.vue.es-4YRmQZHX.mjs} +3 -3
  61. package/dist/{PaymentMethod.vue.es-CJcSZ9lN.js → PaymentMethod.vue.es-D0D9jW8s.js} +1 -1
  62. package/dist/{PaymentMethodForm-1d0YIGOu.js → PaymentMethodForm-CMP5FLRO.js} +1 -1
  63. package/dist/{PaymentMethodForm-B05sHWcW.mjs → PaymentMethodForm-Dnj_7mJU.mjs} +1 -1
  64. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-D1yIYsb_.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-DsD3UjkC.mjs} +33 -35
  65. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-BDm8l_6N.js → PaymentMethodForm.vue_vue_type_script_setup_true_lang-nxnGyJmE.js} +1 -1
  66. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-BE4S26JX.js → PaymentMethodsList.vue_vue_type_script_setup_true_lang-CIrrQUS6.js} +1 -1
  67. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-DGpXRtp4.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-CjECKNi_.mjs} +6 -6
  68. package/dist/PlanCustomizationEditor-DS1r2vBO.js +1 -0
  69. package/dist/{PlanCustomizationEditor-CpZeilm5.mjs → PlanCustomizationEditor-DlVSCKGN.mjs} +234 -206
  70. package/dist/{PricingGroupRangeInput.vue.es-CJpvUP3-.mjs → PricingGroupRangeInput.vue.es-BhNcjD7z.mjs} +4 -4
  71. package/dist/{PricingGroupRangeInput.vue.es-DZSJ5Mz0.js → PricingGroupRangeInput.vue.es-VoOTnHjk.js} +1 -1
  72. package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DJ81eUJX.mjs → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-CmJITenR.mjs} +6 -6
  73. package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-jrkraJMu.js → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-hS6A-KcP.js} +1 -1
  74. package/dist/{RadioGroupExtended.vue.es-BalV7gwp.mjs → RadioGroupExtended.vue.es-9YzXzZF0.mjs} +2 -2
  75. package/dist/{RadioGroupExtended.vue.es-Dt6LH9Yh.js → RadioGroupExtended.vue.es-DlbURHQN.js} +1 -1
  76. package/dist/{Section.vue.es-zVXBHAL6.js → Section.vue.es-Bbt0RITt.js} +1 -1
  77. package/dist/{Section.vue.es-D7eiXUbk.mjs → Section.vue.es-DVEpre9O.mjs} +1 -1
  78. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BdjYFrVC.js → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Dl7MbMlk.js} +1 -1
  79. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DudMRVka.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-xzjqB-v-.mjs} +6 -6
  80. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-CJWE7wVi.mjs +41 -0
  81. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-otI7Hz2w.js +1 -0
  82. package/dist/{StepInput.vue.es-mAnuCuDQ.js → StepInput.vue.es-H-3R4jJq.js} +1 -1
  83. package/dist/{StepInput.vue.es-C3Zm6Wc9.mjs → StepInput.vue.es-o-3Lg4Ai.mjs} +4 -4
  84. package/dist/{SubscriptionDetails.entry.ce-WEimiOex.mjs → SubscriptionDetails.entry.ce-CGl6Z5ql.mjs} +22 -22
  85. package/dist/{SubscriptionDetails.entry.ce-D4CsSoR9.js → SubscriptionDetails.entry.ce-CQUO_uXH.js} +1 -1
  86. package/dist/{SubscriptionSchedules-DrrEAPlx.mjs → SubscriptionSchedules-DuWZmnD2.mjs} +1 -1
  87. package/dist/{SubscriptionSchedules-Cm5Dt-1H.js → SubscriptionSchedules-Dy0fUgx5.js} +1 -1
  88. package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DHp_KtbF.mjs → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-C1kTiW-H.mjs} +11 -11
  89. package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-t2Awijf5.js → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-Dd_Rr6qn.js} +1 -1
  90. package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-B41qZmcL.js → SubscriptionSummary.vue_vue_type_script_setup_true_lang-CYyP4ra9.js} +1 -1
  91. package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-3VYfm6Hm.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-CsekphtV.mjs} +2 -2
  92. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-Bu-_clEa.js → SubscriptionsList.vue_vue_type_script_setup_true_lang-B4j8Clbj.js} +1 -1
  93. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DFU0IULg.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BsdevoeT.mjs} +8 -9
  94. package/dist/{TooltipParagraph.vue.es-BXbOJmjr.mjs → TooltipParagraph.vue.es-B9A17aG7.mjs} +1 -1
  95. package/dist/{TooltipParagraph.vue.es-Cph6zT31.js → TooltipParagraph.vue.es-DvC5Wjaz.js} +1 -1
  96. package/dist/{TrialChip.vue.es-C_wgHGuN.js → TrialChip.vue.es-CLQZ5F0n.js} +1 -1
  97. package/dist/{TrialChip.vue.es-C_yRujip.mjs → TrialChip.vue.es-Dmv3lPiQ.mjs} +2 -2
  98. package/dist/{cn.es-D9YMDvG2.js → cn.es-C9Yqq4tg.js} +1 -1
  99. package/dist/{cn.es-CGa6b2Lt.mjs → cn.es-Cvt6TIwv.mjs} +2 -2
  100. package/dist/components/BillingInformation/BillingInformation.cjs +1 -1
  101. package/dist/components/BillingInformation/BillingInformation.mjs +4 -4
  102. package/dist/components/BillingInformationForm/BillingInformationForm.cjs +1 -1
  103. package/dist/components/BillingInformationForm/BillingInformationForm.mjs +6 -6
  104. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs +1 -1
  105. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +4 -4
  106. package/dist/components/Invoice/Invoice.cjs +1 -1
  107. package/dist/components/Invoice/Invoice.mjs +9 -9
  108. package/dist/components/InvoiceDetails/InvoiceDetails.cjs +1 -1
  109. package/dist/components/InvoiceDetails/InvoiceDetails.mjs +15 -16
  110. package/dist/components/InvoiceHeader/InvoiceHeader.cjs +1 -1
  111. package/dist/components/InvoiceHeader/InvoiceHeader.mjs +2 -2
  112. package/dist/components/InvoicesList/InvoicesList.cjs +1 -1
  113. package/dist/components/InvoicesList/InvoicesList.mjs +3 -3
  114. package/dist/components/PaymentHistory/PaymentHistory.cjs +1 -1
  115. package/dist/components/PaymentHistory/PaymentHistory.mjs +14 -15
  116. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs +1 -1
  117. package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +5 -5
  118. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs +1 -1
  119. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +4 -4
  120. package/dist/components/SubscriptionsList/SubscriptionsList.cjs +1 -1
  121. package/dist/components/SubscriptionsList/SubscriptionsList.mjs +5 -5
  122. package/dist/components/WalletBalances/WalletBalances.cjs +1 -1
  123. package/dist/components/WalletBalances/WalletBalances.mjs +3 -3
  124. package/dist/{customElements-D5DAoHRI.mjs → customElements-B58FcXIN.mjs} +5 -5
  125. package/dist/{customElements-C963-LtW.js → customElements-DUMRMFQ5.js} +2 -2
  126. package/dist/{customer-DKa1B2vp.mjs → customer-B3LPAhaD.mjs} +1 -1
  127. package/dist/{customer-TE1FnGT0.js → customer-CisTPaXj.js} +1 -1
  128. package/dist/{de-DE-CLfzTbbX.mjs → de-DE-DKp5LCu0.mjs} +15 -1
  129. package/dist/de-DE-DL74pMLb.js +1 -0
  130. package/dist/en-US-B2XFj-_p.js +1 -0
  131. package/dist/{en-US-D6SGRAch.mjs → en-US-DQ5vlv9Z.mjs} +15 -1
  132. package/dist/index.cjs +1 -1
  133. package/dist/index.mjs +2 -2
  134. package/dist/{invoices-DJTwftJv.mjs → invoices-3520M5AN.mjs} +1 -1
  135. package/dist/{invoices-ClqTWYF9.js → invoices-CKQBLar2.js} +1 -1
  136. package/dist/{it-IT-Cym1UvvK.mjs → it-IT-BgFVsO5S.mjs} +15 -1
  137. package/dist/it-IT-CqNK62qe.js +1 -0
  138. package/dist/nl-NL-Dx-TNXQ1.js +1 -0
  139. package/dist/{nl-NL-D0c4x5C0.mjs → nl-NL-UiRWbO9S.mjs} +15 -1
  140. package/dist/{paymentMethods-CWzJhcWK.mjs → paymentMethods-CWlvwK5V.mjs} +1 -1
  141. package/dist/{paymentMethods-AL2U_byg.js → paymentMethods-Cw-i95mM.js} +1 -1
  142. package/dist/{payments-aXyfylwk.mjs → payments-2qeQdpiW.mjs} +1 -1
  143. package/dist/{payments-BmiHMlQt.js → payments-CS7_YcOW.js} +1 -1
  144. package/dist/pricing-BIMpDI_p.mjs +29 -0
  145. package/dist/pricing-BOqG21f9.js +1 -0
  146. package/dist/{pricingPlanSchedules-BfsMSvN0.js → pricingPlanSchedules-B_sTAIgU.js} +1 -1
  147. package/dist/{pricingPlanSchedules-BD4GIP_F.mjs → pricingPlanSchedules-ChQCbMfe.mjs} +1 -1
  148. package/dist/screens/Checkout/Checkout.cjs +1 -1
  149. package/dist/screens/Checkout/Checkout.mjs +2 -2
  150. package/dist/screens/CustomerOverview/CustomerOverview.cjs +1 -1
  151. package/dist/screens/CustomerOverview/CustomerOverview.mjs +10 -10
  152. package/dist/screens/PayInvoice/PayInvoice.cjs +1 -1
  153. package/dist/screens/PayInvoice/PayInvoice.mjs +12 -12
  154. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs +1 -1
  155. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +9 -9
  156. package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs +1 -1
  157. package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +2 -2
  158. package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs +1 -1
  159. package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +20 -20
  160. package/dist/{subscriptions-cnR5fnf7.mjs → subscriptions-DcfcBYAq.mjs} +1 -1
  161. package/dist/{subscriptions-Cm83ckfl.js → subscriptions-DwVsf4Ev.js} +1 -1
  162. package/dist/types/components/checkout/CheckoutTitle.types.d.ts +10 -0
  163. package/dist/types/components/payments/ExpressPaymentMethod/ExpressPaymentMethod.types.d.ts +9 -5
  164. package/dist/types/components/payments/ExpressPaymentMethod/ExpressPaymentMethodApplePay.types.d.ts +3 -1
  165. package/dist/types/components/payments/ExpressPaymentMethods/ExpressPaymentMethods.types.d.ts +5 -1
  166. package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +1 -1
  167. package/dist/{useActionDispatchProvider-DDYqIh3r.mjs → useActionDispatchProvider-B3AvkLL2.mjs} +1 -1
  168. package/dist/{useActionDispatchProvider-CHkVQMaE.js → useActionDispatchProvider-DFhppdve.js} +1 -1
  169. package/dist/{useCustomer-XZKWsolE.mjs → useCustomer-B-jyJIVy.mjs} +1 -1
  170. package/dist/{useCustomer-DGYtowRy.js → useCustomer-BwZKd9i5.js} +1 -1
  171. package/dist/{useCustomerFormLabels-CcnkJLcB.mjs → useCustomerFormLabels-BQk3d9PZ.mjs} +5 -5
  172. package/dist/{useCustomerFormLabels-DAZziqYt.js → useCustomerFormLabels-DV9QiMYh.js} +1 -1
  173. package/dist/useExperimentalFeature-BciA3Ok9.mjs +135 -0
  174. package/dist/useExperimentalFeature-CGIkgFR4.js +1 -0
  175. package/dist/{useInvoiceData-BEK-7msA.mjs → useInvoiceData-BocKdeg7.mjs} +2 -2
  176. package/dist/{useInvoiceData-CQRn8l9C.js → useInvoiceData-CNV_FMV8.js} +1 -1
  177. package/dist/{useInvoicesList-C4I118KM.mjs → useInvoicesList-C8nsXMJ6.mjs} +7 -7
  178. package/dist/{useInvoicesList-BQkKyyXa.js → useInvoicesList-S0IbQcrD.js} +1 -1
  179. package/dist/{useLoadInitialData-CR0kbYw8.mjs → useLoadInitialData-D9GkzY8t.mjs} +1 -1
  180. package/dist/{useLoadInitialData-CrKnBZs_.js → useLoadInitialData-D_R6Jy1s.js} +1 -1
  181. package/dist/usePaymentMethodAvailability-BO_guwAw.js +1 -0
  182. package/dist/{usePaymentMethodAvailability-ZH-m3B-A.mjs → usePaymentMethodAvailability-DAcsKGeh.mjs} +13 -14
  183. package/dist/{usePaymentMethodOptions-Ciifjo6c.mjs → usePaymentMethodOptions-1vRAo6Ib.mjs} +1 -1
  184. package/dist/{usePaymentMethodOptions-Cqe92ZBn.js → usePaymentMethodOptions-CuzOoi2k.js} +1 -1
  185. package/dist/{usePaymentMethods-B-OKRyKd.mjs → usePaymentMethods-CbwnGONc.mjs} +1 -1
  186. package/dist/{usePaymentMethods-BKwrl82-.js → usePaymentMethods-DDaTZQZp.js} +1 -1
  187. package/dist/{usePayments-CV85OV8V.mjs → usePayments-Cr6NlGaW.mjs} +6 -6
  188. package/dist/{usePayments-Bauj16B-.js → usePayments-DDSjo0rH.js} +1 -1
  189. package/dist/{usePortal-DSLImEfr.js → usePortal-C27omjhz.js} +1 -1
  190. package/dist/{usePortal-H8Tv2TnZ.mjs → usePortal-C5AsegpS.mjs} +1 -1
  191. package/dist/{useSubscription-DqnxWNKg.mjs → useSubscription-BZJL0VOA.mjs} +1 -1
  192. package/dist/{useSubscription-BiYNJT2e.js → useSubscription-D787IXY-.js} +1 -1
  193. package/dist/{useTimePeriod.es-B22-fno3.mjs → useTimePeriod.es-DWLsLFqs.mjs} +1 -1
  194. package/dist/{useTimePeriod.es-D2aiyfd-.js → useTimePeriod.es-rzxqUCTu.js} +1 -1
  195. package/package.json +10 -7
  196. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-0JHnqIpC.js +0 -1
  197. package/dist/Checkout.entry.ce-8EcavNgT.js +0 -2
  198. package/dist/Checkout.entry.ce-BA5ljKj8.mjs +0 -3924
  199. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-hBo2Y2mJ.js +0 -1
  200. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-C0J37ZVe.js +0 -1
  201. package/dist/PaymentIntegrationFormAdyen-HeA9XIj-.js +0 -98
  202. package/dist/PlanCustomizationEditor-CEMP_Dhz.js +0 -1
  203. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-D4sbq9nA.js +0 -1
  204. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-D60YtA9z.mjs +0 -51
  205. package/dist/adyen-CvsH5fok.mjs +0 -117
  206. package/dist/adyen-Druit6gz.js +0 -1
  207. package/dist/de-DE-DaBBl-Ak.js +0 -1
  208. package/dist/en-US-BNevqm0M.js +0 -1
  209. package/dist/it-IT-BkPbTueL.js +0 -1
  210. package/dist/nl-NL-jIfAVGv0.js +0 -1
  211. package/dist/pricing-BVAld27Y.js +0 -1
  212. package/dist/pricing-DLOeiAIB.mjs +0 -16
  213. package/dist/useExperimentalFeature-COOU6IZd.js +0 -1
  214. package/dist/useExperimentalFeature-ierhOt9Q.mjs +0 -6
  215. package/dist/usePaymentMethodAvailability-Ci6LeYKt.js +0 -1
@@ -1 +1 @@
1
- const e=require("vue"),F=require("./Alert.vue.es-RyK53a2P.js"),D=require("./Button.vue.es-qGvnOKnK.js"),L=require("./ErrorNotification.vue.es-BX9dHEc-.js"),m=require("./customElements-C963-LtW.js"),j=require("./ContentWithAsideLayout-RSdKXqAf.js"),O=require("./useActionDispatchProvider-CHkVQMaE.js"),E=require("./subscription-ZA62t4E9.js"),$=require("./CustomerWalletBalances.vue_vue_type_script_setup_true_lang-hBo2Y2mJ.js"),W=require("./CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-C0lJ_ESU.js"),Y=require("./EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-cSQeqr0A.js"),z=require("./Skeleton.vue_vue_type_script_setup_true_lang-D4sbq9nA.js"),M=require("./Section.vue.es-zVXBHAL6.js"),X=require("./pricing-BVAld27Y.js"),P=require("./formatting.es-C72Nsrmh.js"),G=require("./PaymentMethod.vue.es-CJcSZ9lN.js"),H=require("./Modal.vue.es-8LN4gBh0.js"),Z=require("./subscriptions-Cm83ckfl.js"),J=require("./SubscriptionSummary.vue_vue_type_script_setup_true_lang-B41qZmcL.js"),K=require("./api.es-duCDtZD9.js"),Q=require("./useIncrementalLoading-CaWOE8Xl.js"),ee=require("./paymentMethods-AL2U_byg.js"),te=require("./error-CmduqgVq.js"),ne=require("./useSubscription-BiYNJT2e.js"),ie=require("./useCustomer-DGYtowRy.js"),ae=require("./usePaymentMethods-BKwrl82-.js"),oe=require("./useLoadInitialData-CrKnBZs_.js"),se=require("./pricingPlanSchedules-BfsMSvN0.js"),re=require("./useService-H7BjLg8P.js"),ce=require("./pricingPlanSchedule-BM8vsKkV.js"),A=require("./getComposedString.es-haS4bAj7.js"),q=require("./pricing.es-C07bgEZx.js"),le=require("./pricingItemConfigs.es-D4aYkYcf.js"),de=require("./sessionReference-m_6Rp4X1.js"),R=()=>{const{$t:t}=m.useIntl();return{getPriceLabel:n=>{if(!n.price)return;const i=P.formatAmount(n.price);return n.priceType==="FIXED"?i:t({defaultMessage:"{price} per unit",description:"The listed price of an on-demand item charged per unit",id:"charge_on_demand.item.price_per_unit"},{price:i})}}};function ue({subscription:t}){const{dispatchAction:a}=O.useActionDispatchProvider(),n=e.computed(()=>{if(!t.value)return!1;const l=t.value.inactive_periods;return!l||l.length===0}),i=e.computed(()=>{var g;const l=(g=t.value)==null?void 0:g.inactive_periods;return Array.isArray(l)&&l.length>0}),o=e.ref();return{isCancellable:n,isRenewable:i,pendingVariant:o,cancel:()=>{t.value&&(o.value="CANCEL")},renew:()=>{t.value&&(o.value="RENEW")},dismiss:()=>{o.value=void 0},manage:()=>{t.value&&a({action:"manage-subscription",data:{subscriptionId:t.value.id}})}}}function pe(t){var i,o,s,c,r,f,l;const a=(s=(o=(i=t.items)==null?void 0:i[0])==null?void 0:o.configs)==null?void 0:s[0],n=(r=(c=a==null?void 0:a.details)==null?void 0:c.bands)==null?void 0:r[0];return{amount:(n==null?void 0:n.amount)??(n==null?void 0:n.fixed_amount),billingPeriod:((f=a==null?void 0:a.details)==null?void 0:f.pricing_period)??((l=a==null?void 0:a.details)==null?void 0:l.billing_period)}}function me(t){var i,o,s;const a=new Set((((i=t.pricing_plan_schedule)==null?void 0:i.enabled_pricings)??[]).map(({pricing_id:c})=>c));return a.size===0?[]:(((s=(o=t.pricing_plan_version)==null?void 0:o.pricing_categories)==null?void 0:s.flatMap(c=>c.pricing_groups??[]))??[]).flatMap(c=>(c.pricings??[]).filter(r=>a.has(r.id)).map(r=>({pricingId:r.id,pricingGroupId:c.id,groupName:c.name,name:X.getNameFromPricing(r)||c.name,...pe(r)})))}const fe={class:"sv-enabled-pricings-list__item-body flex items-center gap-4"},ge={class:"sv-enabled-pricings-list__item-content grow"},be=e.defineComponent({__name:"EnabledPricingsListItem",props:{entry:{type:Object}},emits:["upgrade"],setup(t){const a=t,{$t:n}=m.useIntl(),i=e.computed(()=>{const{amount:o,billingPeriod:s}=a.entry;if(o)return s?n({defaultMessage:"{amount} per {period}",id:"enabled_pricings_list.item.price",description:'The recurring price of an enabled pricing, e.g. "€ 100,00 per month"'},{amount:P.formatAmount(o),period:P.formatBillingPeriod(s,{short:!0,hideValueForExactPeriods:!0})}):P.formatAmount(o)});return(o,s)=>(e.openBlock(),e.createBlock(e.unref(M._sfc_main),{class:"sv-enabled-pricings-list__item"},{default:e.withCtx(()=>[e.createElementVNode("div",fe,[e.createElementVNode("div",ge,[e.createVNode(e.unref(m._sfc_main),{tag:"span",variant:"body-xs",color:"subtle",class:"sv-enabled-pricings-list__item-group"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.entry.groupName),1)]),_:1}),e.createVNode(e.unref(m._sfc_main),{tag:"h3",variant:"heading-3","no-spacing":"",class:"sv-enabled-pricings-list__item-name"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.entry.name),1)]),_:1}),i.value?(e.openBlock(),e.createBlock(e.unref(m._sfc_main),{key:0,tag:"span",variant:"body-sm",color:"subtle",class:"sv-enabled-pricings-list__item-price"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value),1)]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(e.unref(D._sfc_main),{intent:"secondary",class:"sv-action sv-action--secondary sv-enabled-pricings-list__item-upgrade shrink-0",type:"button",size:"xs",onClick:s[0]||(s[0]=c=>o.$emit("upgrade",t.entry))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"Upgrade",id:"enabled_pricings_list.item.upgrade_button.label",description:"Label for the button that changes which pricing is enabled for a group"})),1)]),_:1})])]),_:1}))}}),he={class:"sv-enabled-pricings-list__items grid grid-cols-1 gap-2"},_e=e.defineComponent({__name:"EnabledPricingsList",props:{pricingPlanSchedule:{type:Object}},emits:["upgrade"],setup(t){const a=t,{$t:n}=m.useIntl(),i=e.computed(()=>me(a.pricingPlanSchedule));return(o,s)=>i.value.length>0?(e.openBlock(),e.createBlock(e.unref(M._sfc_main),{key:0,class:"sv-enabled-pricings-list","content-background":"none","no-border":"","no-spacing":"",title:e.unref(n)({defaultMessage:"Upgrades",id:"enabled_pricings_list.title",description:"Title for the block listing the pricings enabled on a subscription"})},{default:e.withCtx(()=>[e.createElementVNode("div",he,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,c=>(e.openBlock(),e.createBlock(be,{key:c.pricingId,entry:c,onUpgrade:s[0]||(s[0]=r=>o.$emit("upgrade",r))},null,8,["entry"]))),128))])]),_:1},8,["title"])):e.createCommentVNode("",!0)}}),ve={class:"sv-on-demand-items-card__items grid grid-cols-1 gap-1"},ye={key:0,class:"sv-on-demand-items-card__more"},T=2,we=e.defineComponent({__name:"OnDemandItemsCard",props:{items:{type:Array}},emits:["order"],setup(t){const a=t,{$t:n}=m.useIntl(),{getPriceLabel:i}=R(),o=e.computed(()=>a.items.slice(0,T).map(c=>({item:c,priceLabel:i(c)}))),s=e.computed(()=>Math.max(a.items.length-T,0));return(c,r)=>(e.openBlock(),e.createBlock(e.unref(M._sfc_main),{class:"sv-on-demand-items-card","content-background":"none","no-border":"","no-spacing":"",title:e.unref(n)({defaultMessage:"Available on demand items",id:"on_demand_items_card.title",description:"Title for the block that offers the on-demand items of a subscription"})},{right:e.withCtx(()=>[e.createVNode(e.unref(D._sfc_main),{class:"sv-action sv-action--secondary sv-on-demand-items-card__order",type:"button",size:"sm",intent:"secondary",onClick:r[0]||(r[0]=f=>c.$emit("order"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"Purchase",id:"on_demand_items_card.order_button.label",description:"Label for the button that opens the on-demand order form"})),1)]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("ul",ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,({item:f,priceLabel:l})=>(e.openBlock(),e.createElementBlock("li",{key:f.pricingItemId,class:"sv-on-demand-items-card__item"},[e.createVNode(e.unref(M._sfc_main),{"no-spacing":"","content-classes":"flex flex-col px-4 py-3"},{default:e.withCtx(()=>[e.createVNode(e.unref(m._sfc_main),{tag:"span",weight:"semibold","no-spacing":"",class:"sv-on-demand-items-card__item-name break-words"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.name),1)]),_:2},1024),l?(e.openBlock(),e.createBlock(e.unref(m._sfc_main),{key:0,tag:"span",variant:"body-sm",color:"subtle","no-spacing":"",class:"sv-on-demand-items-card__item-price"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l),1)]),_:2},1024)):e.createCommentVNode("",!0)]),_:2},1024)]))),128)),s.value>0?(e.openBlock(),e.createElementBlock("li",ye,[e.createVNode(e.unref(M._sfc_main),{"no-spacing":"","content-classes":"px-4 py-3 text-center"},{default:e.withCtx(()=>[e.createVNode(e.unref(m._sfc_main),{tag:"span",weight:"semibold",color:"secondary","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"+ {count} available",id:"on_demand_items_card.more_available",description:"Shown below the first on-demand items with the number of items not listed"},{count:String(s.value)})),1)]),_:1})]),_:1})])):e.createCommentVNode("",!0)])]),_:1},8,["title"]))}});function Ce({variant:t,renewableUntil:a,billingPeriodEndsAt:n}){const{$t:i}=m.useIntl(),o=e.computed(()=>t.value==="RENEW"),s=e.computed(()=>o.value?i({defaultMessage:"Renew subscription",description:"Title of the renew subscription confirmation modal",id:"subscription_cancellation_modal.renew.title"}):i({defaultMessage:"Cancel subscription",description:"Title of the cancel subscription confirmation modal",id:"subscription_cancellation_modal.cancel.title"})),c=e.computed(()=>o.value?a.value?i({defaultMessage:"You can renew your subscription until {date}. After this period you can only create a new subscription.",description:"Explanation of the deadline for undoing a cancellation, shown in the renew subscription modal",id:"subscription_cancellation_modal.renew.explanation_with_date"},{date:a.value}):i({defaultMessage:"Your subscription will continue as before, and billing will resume on its usual schedule.",description:"Explanation of what happens when a cancellation is undone, shown in the renew subscription modal when no end date is known",id:"subscription_cancellation_modal.renew.explanation"}):n.value?i({defaultMessage:"Your subscription will be canceled, but you’ll continue to have access until {date}.",description:"Explanation of what happens when a running subscription is cancelled, naming the date access ends, shown in the cancel subscription modal",id:"subscription_cancellation_modal.cancel.explanation_with_date"},{date:n.value}):i({defaultMessage:"Your subscription will be canceled, but you’ll continue to have access until the end of the billing period.",description:"Explanation of what happens when a running subscription is cancelled, shown in the cancel subscription modal",id:"subscription_cancellation_modal.cancel.explanation"})),r=e.computed(()=>o.value?i({defaultMessage:"Renew subscription",description:"Label of the confirm button in the renew subscription modal",id:"subscription_cancellation_modal.renew.confirm_button.label"}):i({defaultMessage:"Cancel subscription",description:"Label of the confirm button in the cancel subscription modal",id:"subscription_cancellation_modal.cancel.confirm_button.label"})),f=e.computed(()=>i({defaultMessage:"Cancel",description:"Label of the button that dismisses the cancellation modal",id:"subscription_cancellation_modal.cancel_button.label"})),l=e.computed(()=>o.value?i({defaultMessage:"We could not renew your subscription. Please try again.",description:"Error shown when undoing a cancellation fails",id:"subscription_cancellation_modal.renew.error"}):i({defaultMessage:"We could not cancel your subscription. Please try again.",description:"Error shown when cancelling a subscription fails",id:"subscription_cancellation_modal.cancel.error"}));return{title:s,explanation:c,confirmButtonText:r,cancelButtonText:f,errorMessage:l}}const Se=50;function ke(){const{getPaymentMethods:t}=ee.createPaymentMethodsService(),a=e.shallowRef();return{paymentMethod:a,get:async({customerId:i,paymentMethodId:o})=>{const s=await K.getPaginatedFullList(async c=>{const r=await t({customerId:i,pagination:{page:c,pageSize:Se}});if(!Q.isApiSuccessCollectionResponse(r))throw new Error("Could not load the customer’s payment methods.");return r});return a.value=s.data.find(({id:c})=>c===o),a.value}}}const Be={class:"sv-subscription-cancellation-modal sv-subscription-cancellation-modal__body flex flex-col gap-3"},xe={key:0,class:"sv-subscription-cancellation-modal__meta flex flex-wrap items-center gap-x-6 gap-y-2 px-3 pb-2"},Ie={key:0,class:"sv-subscription-cancellation-modal__renews flex gap-1"},Me=e.defineComponent({__name:"SubscriptionCancellationModal",props:{showModal:{type:Boolean},variant:{type:null},subscription:{type:Object},avatar:{type:String}},emits:["confirmed","close"],setup(t,{emit:a}){const n=t,i=a,{$t:o,formatDate:s}=m.useIntl(),c=m.useLogger(),{setSubscriptionCancellation:r}=Z.createSubscriptionsService(),f=e.computed(()=>n.variant),l=e.computed(()=>{var d;const p=((d=n.subscription)==null?void 0:d.inactive_periods)??[],u=p.find(({type:h})=>h==="CANCEL")??p[0];if(u)return s({date:u.start_at,format:"date",offsetType:"local"})}),g=e.computed(()=>{var u,d;const p=(d=(u=n.subscription)==null?void 0:u.next_invoice)==null?void 0:d.invoice_date;if(p)return s({date:p,format:"date",offsetType:"local"})}),v=g,k=e.computed(()=>{var p,u;return(((u=(p=E.getMostRecentScheduleInfo(n.subscription))==null?void 0:p.pricing_plan_schedule)==null?void 0:u.enabled_pricings)??[]).map(({pricing_id:d})=>d).filter(d=>!!d)}),{title:C,explanation:B,confirmButtonText:_,cancelButtonText:x,errorMessage:S}=Ce({variant:f,renewableUntil:l,billingPeriodEndsAt:g}),{paymentMethod:y,get:I}=ke();e.watch([()=>n.showModal,()=>{var p;return(p=n.subscription)==null?void 0:p.payment_method_id},()=>{var p;return(p=n.subscription)==null?void 0:p.customer_id}],([p,u,d])=>{var h;!p||!u||!d||u!==((h=y.value)==null?void 0:h.id)&&I({customerId:d,paymentMethodId:u}).catch(()=>{})},{immediate:!0});const b=e.ref(!1),w=e.ref(!1);e.watch(()=>n.showModal,p=>{p&&(w.value=!1)});const N=async()=>{if(!(!n.subscription||!n.variant||b.value)){b.value=!0,w.value=!1;try{await r({id:n.subscription.id,variant:n.variant}),i("confirmed"),i("close")}catch(p){c.error("SUBSCRIPTION_CANCELLATION_FAILED","Failed to change the cancellation state of a subscription",{variant:n.variant},p),w.value=!0}finally{b.value=!1}}},V=()=>{b.value||i("close")};return(p,u)=>(e.openBlock(),e.createBlock(e.unref(H.Modal),{size:"md","show-modal":t.showModal,title:e.unref(C),"confirm-button-text":e.unref(_),"cancel-button-text":e.unref(x),"is-loading":b.value,"no-click-away":b.value,"no-backdrop-close":b.value,onConfirm:N,onClose:V},{body:e.withCtx(()=>[e.createElementVNode("div",Be,[e.createVNode(e.unref(m._sfc_main),{variant:"body-sm",color:"subtle",tag:"p",class:"sv-subscription-cancellation-modal__explanation"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(B)),1)]),_:1}),t.subscription?(e.openBlock(),e.createBlock(e.unref(M._sfc_main),{key:0,"no-spacing":"",class:"sv-subscription-cancellation-modal__subscription"},{default:e.withCtx(()=>[e.createVNode(J._sfc_main,{subscription:t.subscription,avatar:t.avatar,"enabled-pricing-ids":k.value},null,8,["subscription","avatar","enabled-pricing-ids"]),e.unref(v)||e.unref(y)?(e.openBlock(),e.createElementBlock("div",xe,[e.unref(v)?(e.openBlock(),e.createElementBlock("div",Ie,[e.createVNode(e.unref(m._sfc_main),{tag:"span",variant:"body-xs",color:"secondary",weight:"semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Renews",description:"Label before the date the subscription renews, shown in the cancel subscription modal",id:"subscription_cancellation_modal.renews_label"})),1)]),_:1}),e.createVNode(e.unref(m._sfc_main),{tag:"span",variant:"body-xs",color:"secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(v)),1)]),_:1})])):e.createCommentVNode("",!0),e.unref(y)?(e.openBlock(),e.createBlock(e.unref(G._sfc_main),{key:1,variant:"condensed",class:"sv-subscription-cancellation-modal__payment-method","payment-method":e.unref(y)},null,8,["payment-method"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0),w.value?(e.openBlock(),e.createBlock(e.unref(L._sfc_main),{key:1,class:"sv-subscription-cancellation-modal__error sv-error",title:e.unref(S)},null,8,["title"])):e.createCommentVNode("",!0)])]),_:1},8,["show-modal","title","confirm-button-text","cancel-button-text","is-loading","no-click-away","no-backdrop-close"]))}}),Ne={class:"sv-subscription-details__header flex flex-col gap-2 md:flex-row md:items-center"},Pe=e.defineComponent({__name:"SubscriptionDetails",props:{subscription:{type:Object},schedulesData:{type:Array},customer:{type:Object},paymentMethods:{type:Array},walletBalances:{default:()=>[],type:Array},onDemandItems:{default:()=>[],type:Array},onDemandScheduleId:{type:String},hasWalletBalancesError:{type:Boolean},avatar:{type:String},canViewCreatedInvoice:{type:Boolean},isLoading:{type:Boolean},error:{type:null}},emits:["top-up-charged","auto-top-up-saved","auto-top-up-cancelled","payment-method-stored","subscription-changed","invoice-created"],setup(t,{emit:a}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./SubscriptionSchedules-Cm5Dt-1H.js"))),i=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./ChargeOnDemandModal-DIQaGnRs.js"))),o=t,s=a,{dispatchAction:c}=O.useActionDispatchProvider(),{$t:r}=m.useIntl(),{isCancellable:f,isRenewable:l,pendingVariant:g,cancel:v,renew:k,dismiss:C,manage:B}=ue({subscription:e.toRef(o,"subscription")}),_=e.ref();e.watch(g,u=>{u&&(_.value=void 0)});const x=()=>{_.value=g.value,s("subscription-changed")},S=e.computed(()=>{if(_.value)return _.value==="RENEW"?r({defaultMessage:"Your subscription has been renewed.",id:"subscription_details.renew_success",description:"Confirmation shown after a cancellation has been undone"}):r({defaultMessage:"Your subscription has been cancelled. You keep access until the end of the billing period.",id:"subscription_details.cancel_success",description:"Confirmation shown after a subscription has been cancelled"})}),y=e.computed(()=>E.getMostRecentScheduleInfo(o.subscription)),I=e.computed(()=>(o.paymentMethods??[]).find(({id:u})=>{var d;return u===((d=o.subscription)==null?void 0:d.payment_method_id)})),b=e.computed(()=>o.subscription?[o.subscription]:[]),w=e.ref(!1),N=e.ref(!1),V=()=>{N.value=!0,w.value=!0},p=e.computed(()=>E.getSubscriptionName({subscription:o.subscription,fallback:r({defaultMessage:"Subscription details",id:"subscription_details.title",description:"Title for the subscription details page"})}));return(u,d)=>(e.openBlock(),e.createBlock(e.unref(j.ContentWithAsideLayout),{class:"sv-subscription-details sv-root sv-screen"},{header:e.withCtx(()=>[e.createElementVNode("div",Ne,[e.createVNode(e.unref(m._sfc_main),{variant:"heading-2",tag:"h1",class:"sv-subscription-details__title grow"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.value),1)]),_:1}),e.unref(l)?(e.openBlock(),e.createBlock(e.unref(D._sfc_main),{key:0,intent:"secondary",class:"sv-action sv-action--secondary sv-subscription-details__renew w-full md:w-auto",type:"button",onClick:e.unref(k)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Renew subscription",id:"subscription_details.renew_button.label",description:"Label for the renew subscription button on the subscription details page"})),1)]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(f)?(e.openBlock(),e.createBlock(e.unref(D._sfc_main),{key:1,intent:"secondary",class:"sv-action sv-action--secondary sv-subscription-details__cancel w-full md:w-auto",type:"button",onClick:e.unref(v)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Cancel subscription",id:"subscription_details.cancel_button.label",description:"Label for the cancel subscription button on the subscription details page"})),1)]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])]),content:e.withCtx(()=>[S.value?(e.openBlock(),e.createBlock(e.unref(F._sfc_main),{key:0,class:"sv-subscription-details__cancellation-success",type:"success",title:S.value},null,8,["title"])):e.createCommentVNode("",!0),t.error?(e.openBlock(),e.createBlock(e.unref(L._sfc_main),{key:1,class:"sv-subscription-details__error sv-error",title:e.unref(r)({defaultMessage:"Unable to load this subscription. Please try again later.",id:"subscription_details.load_error",description:"Error message shown when the subscription cannot be loaded on the subscription details page"})},null,8,["title"])):t.isLoading?(e.openBlock(),e.createBlock(z._sfc_main,{key:2,variant:"section",class:"min-h-[220px]"})):t.subscription?(e.openBlock(),e.createBlock(e.unref(n),{key:3,class:"sv-subscription-details__schedules","schedules-data":t.schedulesData??[],configuration:{subscriptionId:t.subscription.id},"is-loading":t.isLoading},null,8,["schedules-data","configuration","is-loading"])):(e.openBlock(),e.createBlock(Y._sfc_main,{key:4,class:"sv-subscription-details__empty-state",icon:"receipt_long"},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Subscription not found",id:"subscription_details.empty_state.title",description:"Title shown when the requested subscription does not exist"})),1)]),message:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"This subscription is no longer available.",id:"subscription_details.empty_state.message",description:"Message shown when the requested subscription does not exist"})),1)]),_:1}))]),aside:e.withCtx(()=>[e.createVNode($._sfc_main,{class:"sv-subscription-details__wallet-balances","has-error":!!t.hasWalletBalancesError,"is-loading":t.isLoading,"wallet-balances":t.walletBalances,"show-top-up-button":"",customer:t.customer,"payment-methods":t.paymentMethods,subscriptions:b.value,onTopUpCharged:d[0]||(d[0]=h=>u.$emit("top-up-charged")),onAutoTopUpSaved:d[1]||(d[1]=h=>u.$emit("auto-top-up-saved")),onAutoTopUpCancelled:d[2]||(d[2]=h=>u.$emit("auto-top-up-cancelled")),onPaymentMethodStored:d[3]||(d[3]=h=>u.$emit("payment-method-stored"))},null,8,["has-error","is-loading","wallet-balances","customer","payment-methods","subscriptions"]),!t.isLoading&&t.onDemandItems.length>0?(e.openBlock(),e.createBlock(we,{key:0,items:t.onDemandItems,class:"sv-subscription-details__on-demand-items",onOrder:V},null,8,["items"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createBlock(_e,{key:1,class:"sv-subscription-details__upgrades","pricing-plan-schedule":y.value,onUpgrade:e.unref(B)},null,8,["pricing-plan-schedule","onUpgrade"])):e.createCommentVNode("",!0),I.value?(e.openBlock(),e.createBlock(W._sfc_main,{key:2,class:"sv-subscription-details__payment-method","is-loading":t.isLoading,"payment-methods":[I.value],configuration:{showViewAllButton:!1,showAddButton:!1}},null,8,["is-loading","payment-methods"])):e.createCommentVNode("",!0),N.value&&t.subscription&&t.onDemandScheduleId?(e.openBlock(),e.createBlock(e.unref(i),{key:3,"show-modal":w.value,subscription:t.subscription,"schedule-id":t.onDemandScheduleId,items:t.onDemandItems,customer:t.customer,"payment-methods":t.paymentMethods,"can-view-created-invoice":t.canViewCreatedInvoice,onClose:d[4]||(d[4]=h=>w.value=!1),onPaymentMethodStored:d[5]||(d[5]=h=>u.$emit("payment-method-stored")),onInvoiceCreated:d[6]||(d[6]=h=>u.$emit("invoice-created",h)),onViewInvoice:d[7]||(d[7]=h=>e.unref(c)({action:"view-invoice",data:{invoiceId:h}}))},null,8,["show-modal","subscription","schedule-id","items","customer","payment-methods","can-view-created-invoice"])):e.createCommentVNode("",!0),e.createVNode(Me,{"show-modal":!!e.unref(g),variant:e.unref(g),subscription:t.subscription,avatar:t.avatar,onConfirmed:x,onClose:e.unref(C)},null,8,["show-modal","variant","subscription","avatar","onClose"])]),_:1}))}}),De=["FIXED","FLAT"],Ve=(t,a)=>{var i;const n=(i=t.details.bands)==null?void 0:i[0];return a==="FIXED"?n==null?void 0:n.fixed_amount:n==null?void 0:n.amount},U=t=>typeof t=="number"&&Number.isInteger(t)&&t>=1,Ee=t=>{var n;const a=Number((n=t.default_units)==null?void 0:n.number);return U(a)?a:1},Ae=t=>{const a=t.flatMap(q.getAllPricings);return{productItems:new Map(a.flatMap(n=>n.items??[]).flatMap(n=>n.product_items??[]).map(({id:n,name:i})=>[n,i])),products:new Map(a.flatMap(n=>n.products??[]).map(({id:n,name:i})=>[n,i]))}},Te=(t,a,n)=>A.getComposedString(a.product_item_ids.map(i=>n.productItems.get(i)))||t.name||A.getComposedString(t.product_ids.map(i=>n.products.get(i)))||"",Le=(t,a,n)=>{var s,c;const i=(s=a.configs)==null?void 0:s.find(r=>r.on_demand);if(!i||(c=i.wallet_grants)!=null&&c.length||!le.hasOneOfPricingTypes(i,De))return;const o=i.details.pricing_type==="FIXED"?"FIXED":"FLAT";return{pricingItemId:a.id,pricingItemConfigId:i.id,name:Te(t,a,n),priceType:o,price:Ve(i,o),defaultUnits:Ee(i)}},Oe=(t,{pricingPlanVersions:a=[]}={})=>{const n=Ae(a);return q.getAllPricings(t).flatMap(i=>(i.items??[]).flatMap(o=>Le(i,o,n)??[]))},$e=(t,a)=>{const n=new Set((a.payment_acceptors??[]).flatMap(i=>{var o;return((o=i.payment_gateway)==null?void 0:o.integration_id)??[]}));return t.filter(i=>i.status==="ACTIVE"&&!!i.integration_id&&n.has(i.integration_id)).sort((i,o)=>+(o.id===a.payment_method_id)-+(i.id===a.payment_method_id))},qe=(t,a)=>t.flatMap(({pricingItemId:n,units:i})=>{const o=a.find(s=>s.pricingItemId===n);return o?o.priceType==="FLAT"&&i!==void 0?[{pricing_item_id:n,units:{number:String(i)}}]:[{pricing_item_id:n}]:[]});function Re({subscription:t}){const{getOnDemandPricingItems:a}=se.createPricingPlanSchedulesService(),n=m.useLogger(),{data:i,execute:o,error:s}=re.useService({service:a}),c=e.computed(()=>{var l;return((l=t.value)==null?void 0:l.variant)==="DEFAULT"?ce.getActiveDefaultScheduleInfo(t.value.pricing_plan_schedule_infos):void 0}),r=e.computed(()=>{var l;return(l=c.value)==null?void 0:l.id});return e.watch(r,l=>{l&&o({scheduleId:l}).catch(()=>n.error("ON_DEMAND_ITEMS_LOAD_FAILED","Failed to load the on-demand items of the subscription",{scheduleId:l},s.value))},{immediate:!0}),{items:e.computed(()=>{var l,g;return r.value&&((l=i.value)==null?void 0:l.pricing_plan_schedule_id)===r.value?Oe(i.value,{pricingPlanVersions:(g=t.value)==null?void 0:g.pricing_plan_schedule_infos.map(v=>v.pricing_plan_version)}):[]}),scheduleId:r}}const Ue=e.defineComponent({__name:"SubscriptionDetails.entry.view",props:{configuration:{type:Object},environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object}},setup(t){const a=t,n=a.portalObject.customer_id,{subscription:i,withPlanData:o,get:s,error:c}=ne.useSubscription({subscriptionId:a.configuration.subscriptionId}),{customer:r,get:f}=ie.useCustomer({customerId:n}),{items:l,fetchAll:g}=ae.usePaymentMethods({customerId:n}),{walletBalances:v,apiStatus:k,fetch:C}=$.useCustomerWalletBalances({customerId:n}),{isLoading:B}=oe.useLoadInitialData(s(),f.execute(),g(),C()),{items:_,scheduleId:x}=Re({subscription:i}),S=e.computed(()=>i.value?o(i.value):[]),y=e.computed(()=>{var b;return((b=v.value)==null?void 0:b.wallet_balances)??[]}),I=e.computed(()=>k.value===te.ApiStatus.Failed);return(b,w)=>e.renderSlot(b.$slots,"default",{subscription:e.unref(i),schedulesData:S.value,customer:e.unref(r),paymentMethods:e.unref(l),walletBalances:y.value,onDemandItems:e.unref(_),onDemandScheduleId:e.unref(x),hasWalletBalancesError:I.value,isLoading:e.unref(B),error:e.unref(c),refreshWalletBalances:e.unref(C),refreshPaymentMethods:e.unref(g),refreshSubscription:e.unref(s)})}});function Fe({invoice:t,configuration:a}){var n;(n=a.onInvoiceCreated)==null||n.call(a,{invoiceId:t.id,paymentStatus:t.payment_status})}const je=e.defineComponent({__name:"SubscriptionDetails.entry",props:{configuration:{type:Object},environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object}},setup(t){const a=de.getComponentName("subscription-details"),n=t;return(i,o)=>(e.openBlock(),e.createBlock(e.unref(m._sfc_main$1),{entry:i.$props,"component-name":e.unref(a),"allowed-portal-types":["CUSTOMER"],onError:o[1]||(o[1]=s=>i.$emit("error",s))},{default:e.withCtx(()=>[e.createVNode(Ue,e.normalizeProps(e.guardReactiveProps(i.$props)),{default:e.withCtx(({subscription:s,schedulesData:c,customer:r,paymentMethods:f,walletBalances:l,onDemandItems:g,onDemandScheduleId:v,hasWalletBalancesError:k,isLoading:C,error:B,refreshWalletBalances:_,refreshPaymentMethods:x,refreshSubscription:S})=>[e.createVNode(Pe,{subscription:s,"schedules-data":c,customer:r,avatar:t.configuration.avatar,"can-view-created-invoice":t.configuration.canViewCreatedInvoice,"payment-methods":f,"wallet-balances":l,"on-demand-items":g,"on-demand-schedule-id":v,"has-wallet-balances-error":k,"is-loading":C,error:B,onTopUpCharged:_,onAutoTopUpSaved:_,onAutoTopUpCancelled:_,onPaymentMethodStored:x,onSubscriptionChanged:S,onInvoiceCreated:o[0]||(o[0]=y=>e.unref(Fe)({invoice:y,configuration:n.configuration}))},null,8,["subscription","schedules-data","customer","avatar","can-view-created-invoice","payment-methods","wallet-balances","on-demand-items","on-demand-schedule-id","has-wallet-balances-error","is-loading","error","onTopUpCharged","onAutoTopUpSaved","onAutoTopUpCancelled","onPaymentMethodStored","onSubscriptionChanged"])]),_:1},16)]),_:1},8,["entry","component-name"]))}}),{define:We}=m.createSolvimonElement(je,"subscription-details");exports.defineSolvimonSubscriptionDetails=We;exports.getPayablePaymentMethods=$e;exports.isOrderableUnits=U;exports.toChargePricingItems=qe;exports.useChargeOnDemandPriceLabel=R;
1
+ const e=require("vue"),F=require("./Alert.vue.es-RyK53a2P.js"),D=require("./Button.vue.es-BzkuglKw.js"),L=require("./ErrorNotification.vue.es-tS9vySUZ.js"),m=require("./customElements-DUMRMFQ5.js"),j=require("./ContentWithAsideLayout-RSdKXqAf.js"),O=require("./useActionDispatchProvider-DFhppdve.js"),E=require("./subscription-ZA62t4E9.js"),$=require("./CustomerWalletBalances.vue_vue_type_script_setup_true_lang-XufY6bdV.js"),W=require("./CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BISD6n8X.js"),Y=require("./EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CQ0KrXHJ.js"),z=require("./Skeleton.vue_vue_type_script_setup_true_lang-otI7Hz2w.js"),M=require("./Section.vue.es-Bbt0RITt.js"),X=require("./pricing-BOqG21f9.js"),P=require("./formatting.es-C72Nsrmh.js"),G=require("./PaymentMethod.vue.es-D0D9jW8s.js"),H=require("./Modal.vue.es-DvLB3uCG.js"),Z=require("./subscriptions-DwVsf4Ev.js"),J=require("./SubscriptionSummary.vue_vue_type_script_setup_true_lang-CYyP4ra9.js"),K=require("./api.es-duCDtZD9.js"),Q=require("./useIncrementalLoading-CaWOE8Xl.js"),ee=require("./paymentMethods-Cw-i95mM.js"),te=require("./error-CmduqgVq.js"),ne=require("./useSubscription-D787IXY-.js"),ie=require("./useCustomer-BwZKd9i5.js"),ae=require("./usePaymentMethods-DDaTZQZp.js"),oe=require("./useLoadInitialData-D_R6Jy1s.js"),se=require("./pricingPlanSchedules-B_sTAIgU.js"),re=require("./useService-H7BjLg8P.js"),ce=require("./pricingPlanSchedule-BM8vsKkV.js"),A=require("./getComposedString.es-haS4bAj7.js"),q=require("./pricing.es-C07bgEZx.js"),le=require("./pricingItemConfigs.es-D4aYkYcf.js"),de=require("./sessionReference-m_6Rp4X1.js"),R=()=>{const{$t:t}=m.useIntl();return{getPriceLabel:n=>{if(!n.price)return;const i=P.formatAmount(n.price);return n.priceType==="FIXED"?i:t({defaultMessage:"{price} per unit",description:"The listed price of an on-demand item charged per unit",id:"charge_on_demand.item.price_per_unit"},{price:i})}}};function ue({subscription:t}){const{dispatchAction:a}=O.useActionDispatchProvider(),n=e.computed(()=>{if(!t.value)return!1;const l=t.value.inactive_periods;return!l||l.length===0}),i=e.computed(()=>{var g;const l=(g=t.value)==null?void 0:g.inactive_periods;return Array.isArray(l)&&l.length>0}),o=e.ref();return{isCancellable:n,isRenewable:i,pendingVariant:o,cancel:()=>{t.value&&(o.value="CANCEL")},renew:()=>{t.value&&(o.value="RENEW")},dismiss:()=>{o.value=void 0},manage:()=>{t.value&&a({action:"manage-subscription",data:{subscriptionId:t.value.id}})}}}function pe(t){var i,o,s,c,r,f,l;const a=(s=(o=(i=t.items)==null?void 0:i[0])==null?void 0:o.configs)==null?void 0:s[0],n=(r=(c=a==null?void 0:a.details)==null?void 0:c.bands)==null?void 0:r[0];return{amount:(n==null?void 0:n.amount)??(n==null?void 0:n.fixed_amount),billingPeriod:((f=a==null?void 0:a.details)==null?void 0:f.pricing_period)??((l=a==null?void 0:a.details)==null?void 0:l.billing_period)}}function me(t){var i,o,s;const a=new Set((((i=t.pricing_plan_schedule)==null?void 0:i.enabled_pricings)??[]).map(({pricing_id:c})=>c));return a.size===0?[]:(((s=(o=t.pricing_plan_version)==null?void 0:o.pricing_categories)==null?void 0:s.flatMap(c=>c.pricing_groups??[]))??[]).flatMap(c=>(c.pricings??[]).filter(r=>a.has(r.id)).map(r=>({pricingId:r.id,pricingGroupId:c.id,groupName:c.name,name:X.getNameFromPricing(r)||c.name,...pe(r)})))}const fe={class:"sv-enabled-pricings-list__item-body flex items-center gap-4"},ge={class:"sv-enabled-pricings-list__item-content grow"},be=e.defineComponent({__name:"EnabledPricingsListItem",props:{entry:{type:Object}},emits:["upgrade"],setup(t){const a=t,{$t:n}=m.useIntl(),i=e.computed(()=>{const{amount:o,billingPeriod:s}=a.entry;if(o)return s?n({defaultMessage:"{amount} per {period}",id:"enabled_pricings_list.item.price",description:'The recurring price of an enabled pricing, e.g. "€ 100,00 per month"'},{amount:P.formatAmount(o),period:P.formatBillingPeriod(s,{short:!0,hideValueForExactPeriods:!0})}):P.formatAmount(o)});return(o,s)=>(e.openBlock(),e.createBlock(e.unref(M._sfc_main),{class:"sv-enabled-pricings-list__item"},{default:e.withCtx(()=>[e.createElementVNode("div",fe,[e.createElementVNode("div",ge,[e.createVNode(e.unref(m._sfc_main),{tag:"span",variant:"body-xs",color:"subtle",class:"sv-enabled-pricings-list__item-group"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.entry.groupName),1)]),_:1}),e.createVNode(e.unref(m._sfc_main),{tag:"h3",variant:"heading-3","no-spacing":"",class:"sv-enabled-pricings-list__item-name"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.entry.name),1)]),_:1}),i.value?(e.openBlock(),e.createBlock(e.unref(m._sfc_main),{key:0,tag:"span",variant:"body-sm",color:"subtle",class:"sv-enabled-pricings-list__item-price"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.value),1)]),_:1})):e.createCommentVNode("",!0)]),e.createVNode(e.unref(D._sfc_main),{intent:"secondary",class:"sv-action sv-action--secondary sv-enabled-pricings-list__item-upgrade shrink-0",type:"button",size:"xs",onClick:s[0]||(s[0]=c=>o.$emit("upgrade",t.entry))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"Upgrade",id:"enabled_pricings_list.item.upgrade_button.label",description:"Label for the button that changes which pricing is enabled for a group"})),1)]),_:1})])]),_:1}))}}),he={class:"sv-enabled-pricings-list__items grid grid-cols-1 gap-2"},_e=e.defineComponent({__name:"EnabledPricingsList",props:{pricingPlanSchedule:{type:Object}},emits:["upgrade"],setup(t){const a=t,{$t:n}=m.useIntl(),i=e.computed(()=>me(a.pricingPlanSchedule));return(o,s)=>i.value.length>0?(e.openBlock(),e.createBlock(e.unref(M._sfc_main),{key:0,class:"sv-enabled-pricings-list","content-background":"none","no-border":"","no-spacing":"",title:e.unref(n)({defaultMessage:"Upgrades",id:"enabled_pricings_list.title",description:"Title for the block listing the pricings enabled on a subscription"})},{default:e.withCtx(()=>[e.createElementVNode("div",he,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,c=>(e.openBlock(),e.createBlock(be,{key:c.pricingId,entry:c,onUpgrade:s[0]||(s[0]=r=>o.$emit("upgrade",r))},null,8,["entry"]))),128))])]),_:1},8,["title"])):e.createCommentVNode("",!0)}}),ve={class:"sv-on-demand-items-card__items grid grid-cols-1 gap-1"},ye={key:0,class:"sv-on-demand-items-card__more"},T=2,we=e.defineComponent({__name:"OnDemandItemsCard",props:{items:{type:Array}},emits:["order"],setup(t){const a=t,{$t:n}=m.useIntl(),{getPriceLabel:i}=R(),o=e.computed(()=>a.items.slice(0,T).map(c=>({item:c,priceLabel:i(c)}))),s=e.computed(()=>Math.max(a.items.length-T,0));return(c,r)=>(e.openBlock(),e.createBlock(e.unref(M._sfc_main),{class:"sv-on-demand-items-card","content-background":"none","no-border":"","no-spacing":"",title:e.unref(n)({defaultMessage:"Available on demand items",id:"on_demand_items_card.title",description:"Title for the block that offers the on-demand items of a subscription"})},{right:e.withCtx(()=>[e.createVNode(e.unref(D._sfc_main),{class:"sv-action sv-action--secondary sv-on-demand-items-card__order",type:"button",size:"sm",intent:"secondary",onClick:r[0]||(r[0]=f=>c.$emit("order"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"Purchase",id:"on_demand_items_card.order_button.label",description:"Label for the button that opens the on-demand order form"})),1)]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("ul",ve,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(o.value,({item:f,priceLabel:l})=>(e.openBlock(),e.createElementBlock("li",{key:f.pricingItemId,class:"sv-on-demand-items-card__item"},[e.createVNode(e.unref(M._sfc_main),{"no-spacing":"","content-classes":"flex flex-col px-4 py-3"},{default:e.withCtx(()=>[e.createVNode(e.unref(m._sfc_main),{tag:"span",weight:"semibold","no-spacing":"",class:"sv-on-demand-items-card__item-name break-words"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(f.name),1)]),_:2},1024),l?(e.openBlock(),e.createBlock(e.unref(m._sfc_main),{key:0,tag:"span",variant:"body-sm",color:"subtle","no-spacing":"",class:"sv-on-demand-items-card__item-price"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l),1)]),_:2},1024)):e.createCommentVNode("",!0)]),_:2},1024)]))),128)),s.value>0?(e.openBlock(),e.createElementBlock("li",ye,[e.createVNode(e.unref(M._sfc_main),{"no-spacing":"","content-classes":"px-4 py-3 text-center"},{default:e.withCtx(()=>[e.createVNode(e.unref(m._sfc_main),{tag:"span",weight:"semibold",color:"secondary","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"+ {count} available",id:"on_demand_items_card.more_available",description:"Shown below the first on-demand items with the number of items not listed"},{count:String(s.value)})),1)]),_:1})]),_:1})])):e.createCommentVNode("",!0)])]),_:1},8,["title"]))}});function Ce({variant:t,renewableUntil:a,billingPeriodEndsAt:n}){const{$t:i}=m.useIntl(),o=e.computed(()=>t.value==="RENEW"),s=e.computed(()=>o.value?i({defaultMessage:"Renew subscription",description:"Title of the renew subscription confirmation modal",id:"subscription_cancellation_modal.renew.title"}):i({defaultMessage:"Cancel subscription",description:"Title of the cancel subscription confirmation modal",id:"subscription_cancellation_modal.cancel.title"})),c=e.computed(()=>o.value?a.value?i({defaultMessage:"You can renew your subscription until {date}. After this period you can only create a new subscription.",description:"Explanation of the deadline for undoing a cancellation, shown in the renew subscription modal",id:"subscription_cancellation_modal.renew.explanation_with_date"},{date:a.value}):i({defaultMessage:"Your subscription will continue as before, and billing will resume on its usual schedule.",description:"Explanation of what happens when a cancellation is undone, shown in the renew subscription modal when no end date is known",id:"subscription_cancellation_modal.renew.explanation"}):n.value?i({defaultMessage:"Your subscription will be canceled, but you’ll continue to have access until {date}.",description:"Explanation of what happens when a running subscription is cancelled, naming the date access ends, shown in the cancel subscription modal",id:"subscription_cancellation_modal.cancel.explanation_with_date"},{date:n.value}):i({defaultMessage:"Your subscription will be canceled, but you’ll continue to have access until the end of the billing period.",description:"Explanation of what happens when a running subscription is cancelled, shown in the cancel subscription modal",id:"subscription_cancellation_modal.cancel.explanation"})),r=e.computed(()=>o.value?i({defaultMessage:"Renew subscription",description:"Label of the confirm button in the renew subscription modal",id:"subscription_cancellation_modal.renew.confirm_button.label"}):i({defaultMessage:"Cancel subscription",description:"Label of the confirm button in the cancel subscription modal",id:"subscription_cancellation_modal.cancel.confirm_button.label"})),f=e.computed(()=>i({defaultMessage:"Cancel",description:"Label of the button that dismisses the cancellation modal",id:"subscription_cancellation_modal.cancel_button.label"})),l=e.computed(()=>o.value?i({defaultMessage:"We could not renew your subscription. Please try again.",description:"Error shown when undoing a cancellation fails",id:"subscription_cancellation_modal.renew.error"}):i({defaultMessage:"We could not cancel your subscription. Please try again.",description:"Error shown when cancelling a subscription fails",id:"subscription_cancellation_modal.cancel.error"}));return{title:s,explanation:c,confirmButtonText:r,cancelButtonText:f,errorMessage:l}}const Se=50;function ke(){const{getPaymentMethods:t}=ee.createPaymentMethodsService(),a=e.shallowRef();return{paymentMethod:a,get:async({customerId:i,paymentMethodId:o})=>{const s=await K.getPaginatedFullList(async c=>{const r=await t({customerId:i,pagination:{page:c,pageSize:Se}});if(!Q.isApiSuccessCollectionResponse(r))throw new Error("Could not load the customer’s payment methods.");return r});return a.value=s.data.find(({id:c})=>c===o),a.value}}}const Be={class:"sv-subscription-cancellation-modal sv-subscription-cancellation-modal__body flex flex-col gap-3"},xe={key:0,class:"sv-subscription-cancellation-modal__meta flex flex-wrap items-center gap-x-6 gap-y-2 px-3 pb-2"},Ie={key:0,class:"sv-subscription-cancellation-modal__renews flex gap-1"},Me=e.defineComponent({__name:"SubscriptionCancellationModal",props:{showModal:{type:Boolean},variant:{type:null},subscription:{type:Object},avatar:{type:String}},emits:["confirmed","close"],setup(t,{emit:a}){const n=t,i=a,{$t:o,formatDate:s}=m.useIntl(),c=m.useLogger(),{setSubscriptionCancellation:r}=Z.createSubscriptionsService(),f=e.computed(()=>n.variant),l=e.computed(()=>{var d;const p=((d=n.subscription)==null?void 0:d.inactive_periods)??[],u=p.find(({type:h})=>h==="CANCEL")??p[0];if(u)return s({date:u.start_at,format:"date",offsetType:"local"})}),g=e.computed(()=>{var u,d;const p=(d=(u=n.subscription)==null?void 0:u.next_invoice)==null?void 0:d.invoice_date;if(p)return s({date:p,format:"date",offsetType:"local"})}),v=g,k=e.computed(()=>{var p,u;return(((u=(p=E.getMostRecentScheduleInfo(n.subscription))==null?void 0:p.pricing_plan_schedule)==null?void 0:u.enabled_pricings)??[]).map(({pricing_id:d})=>d).filter(d=>!!d)}),{title:C,explanation:B,confirmButtonText:_,cancelButtonText:x,errorMessage:S}=Ce({variant:f,renewableUntil:l,billingPeriodEndsAt:g}),{paymentMethod:y,get:I}=ke();e.watch([()=>n.showModal,()=>{var p;return(p=n.subscription)==null?void 0:p.payment_method_id},()=>{var p;return(p=n.subscription)==null?void 0:p.customer_id}],([p,u,d])=>{var h;!p||!u||!d||u!==((h=y.value)==null?void 0:h.id)&&I({customerId:d,paymentMethodId:u}).catch(()=>{})},{immediate:!0});const b=e.ref(!1),w=e.ref(!1);e.watch(()=>n.showModal,p=>{p&&(w.value=!1)});const N=async()=>{if(!(!n.subscription||!n.variant||b.value)){b.value=!0,w.value=!1;try{await r({id:n.subscription.id,variant:n.variant}),i("confirmed"),i("close")}catch(p){c.error("SUBSCRIPTION_CANCELLATION_FAILED","Failed to change the cancellation state of a subscription",{variant:n.variant},p),w.value=!0}finally{b.value=!1}}},V=()=>{b.value||i("close")};return(p,u)=>(e.openBlock(),e.createBlock(e.unref(H.Modal),{size:"md","show-modal":t.showModal,title:e.unref(C),"confirm-button-text":e.unref(_),"cancel-button-text":e.unref(x),"is-loading":b.value,"no-click-away":b.value,"no-backdrop-close":b.value,onConfirm:N,onClose:V},{body:e.withCtx(()=>[e.createElementVNode("div",Be,[e.createVNode(e.unref(m._sfc_main),{variant:"body-sm",color:"subtle",tag:"p",class:"sv-subscription-cancellation-modal__explanation"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(B)),1)]),_:1}),t.subscription?(e.openBlock(),e.createBlock(e.unref(M._sfc_main),{key:0,"no-spacing":"",class:"sv-subscription-cancellation-modal__subscription"},{default:e.withCtx(()=>[e.createVNode(J._sfc_main,{subscription:t.subscription,avatar:t.avatar,"enabled-pricing-ids":k.value},null,8,["subscription","avatar","enabled-pricing-ids"]),e.unref(v)||e.unref(y)?(e.openBlock(),e.createElementBlock("div",xe,[e.unref(v)?(e.openBlock(),e.createElementBlock("div",Ie,[e.createVNode(e.unref(m._sfc_main),{tag:"span",variant:"body-xs",color:"secondary",weight:"semibold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Renews",description:"Label before the date the subscription renews, shown in the cancel subscription modal",id:"subscription_cancellation_modal.renews_label"})),1)]),_:1}),e.createVNode(e.unref(m._sfc_main),{tag:"span",variant:"body-xs",color:"secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(v)),1)]),_:1})])):e.createCommentVNode("",!0),e.unref(y)?(e.openBlock(),e.createBlock(e.unref(G._sfc_main),{key:1,variant:"condensed",class:"sv-subscription-cancellation-modal__payment-method","payment-method":e.unref(y)},null,8,["payment-method"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0),w.value?(e.openBlock(),e.createBlock(e.unref(L._sfc_main),{key:1,class:"sv-subscription-cancellation-modal__error sv-error",title:e.unref(S)},null,8,["title"])):e.createCommentVNode("",!0)])]),_:1},8,["show-modal","title","confirm-button-text","cancel-button-text","is-loading","no-click-away","no-backdrop-close"]))}}),Ne={class:"sv-subscription-details__header flex flex-col gap-2 md:flex-row md:items-center"},Pe=e.defineComponent({__name:"SubscriptionDetails",props:{subscription:{type:Object},schedulesData:{type:Array},customer:{type:Object},paymentMethods:{type:Array},walletBalances:{default:()=>[],type:Array},onDemandItems:{default:()=>[],type:Array},onDemandScheduleId:{type:String},hasWalletBalancesError:{type:Boolean},avatar:{type:String},canViewCreatedInvoice:{type:Boolean},isLoading:{type:Boolean},error:{type:null}},emits:["top-up-charged","auto-top-up-saved","auto-top-up-cancelled","payment-method-stored","subscription-changed","invoice-created"],setup(t,{emit:a}){const n=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./SubscriptionSchedules-Dy0fUgx5.js"))),i=e.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./ChargeOnDemandModal-b17YswWA.js"))),o=t,s=a,{dispatchAction:c}=O.useActionDispatchProvider(),{$t:r}=m.useIntl(),{isCancellable:f,isRenewable:l,pendingVariant:g,cancel:v,renew:k,dismiss:C,manage:B}=ue({subscription:e.toRef(o,"subscription")}),_=e.ref();e.watch(g,u=>{u&&(_.value=void 0)});const x=()=>{_.value=g.value,s("subscription-changed")},S=e.computed(()=>{if(_.value)return _.value==="RENEW"?r({defaultMessage:"Your subscription has been renewed.",id:"subscription_details.renew_success",description:"Confirmation shown after a cancellation has been undone"}):r({defaultMessage:"Your subscription has been cancelled. You keep access until the end of the billing period.",id:"subscription_details.cancel_success",description:"Confirmation shown after a subscription has been cancelled"})}),y=e.computed(()=>E.getMostRecentScheduleInfo(o.subscription)),I=e.computed(()=>(o.paymentMethods??[]).find(({id:u})=>{var d;return u===((d=o.subscription)==null?void 0:d.payment_method_id)})),b=e.computed(()=>o.subscription?[o.subscription]:[]),w=e.ref(!1),N=e.ref(!1),V=()=>{N.value=!0,w.value=!0},p=e.computed(()=>E.getSubscriptionName({subscription:o.subscription,fallback:r({defaultMessage:"Subscription details",id:"subscription_details.title",description:"Title for the subscription details page"})}));return(u,d)=>(e.openBlock(),e.createBlock(e.unref(j.ContentWithAsideLayout),{class:"sv-subscription-details sv-root sv-screen"},{header:e.withCtx(()=>[e.createElementVNode("div",Ne,[e.createVNode(e.unref(m._sfc_main),{variant:"heading-2",tag:"h1",class:"sv-subscription-details__title grow"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p.value),1)]),_:1}),e.unref(l)?(e.openBlock(),e.createBlock(e.unref(D._sfc_main),{key:0,intent:"secondary",class:"sv-action sv-action--secondary sv-subscription-details__renew w-full md:w-auto",type:"button",onClick:e.unref(k)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Renew subscription",id:"subscription_details.renew_button.label",description:"Label for the renew subscription button on the subscription details page"})),1)]),_:1},8,["onClick"])):e.createCommentVNode("",!0),e.unref(f)?(e.openBlock(),e.createBlock(e.unref(D._sfc_main),{key:1,intent:"secondary",class:"sv-action sv-action--secondary sv-subscription-details__cancel w-full md:w-auto",type:"button",onClick:e.unref(v)},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Cancel subscription",id:"subscription_details.cancel_button.label",description:"Label for the cancel subscription button on the subscription details page"})),1)]),_:1},8,["onClick"])):e.createCommentVNode("",!0)])]),content:e.withCtx(()=>[S.value?(e.openBlock(),e.createBlock(e.unref(F._sfc_main),{key:0,class:"sv-subscription-details__cancellation-success",type:"success",title:S.value},null,8,["title"])):e.createCommentVNode("",!0),t.error?(e.openBlock(),e.createBlock(e.unref(L._sfc_main),{key:1,class:"sv-subscription-details__error sv-error",title:e.unref(r)({defaultMessage:"Unable to load this subscription. Please try again later.",id:"subscription_details.load_error",description:"Error message shown when the subscription cannot be loaded on the subscription details page"})},null,8,["title"])):t.isLoading?(e.openBlock(),e.createBlock(z._sfc_main,{key:2,variant:"section",class:"min-h-[220px]"})):t.subscription?(e.openBlock(),e.createBlock(e.unref(n),{key:3,class:"sv-subscription-details__schedules","schedules-data":t.schedulesData??[],configuration:{subscriptionId:t.subscription.id},"is-loading":t.isLoading},null,8,["schedules-data","configuration","is-loading"])):(e.openBlock(),e.createBlock(Y._sfc_main,{key:4,class:"sv-subscription-details__empty-state",icon:"receipt_long"},{title:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Subscription not found",id:"subscription_details.empty_state.title",description:"Title shown when the requested subscription does not exist"})),1)]),message:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"This subscription is no longer available.",id:"subscription_details.empty_state.message",description:"Message shown when the requested subscription does not exist"})),1)]),_:1}))]),aside:e.withCtx(()=>[e.createVNode($._sfc_main,{class:"sv-subscription-details__wallet-balances","has-error":!!t.hasWalletBalancesError,"is-loading":t.isLoading,"wallet-balances":t.walletBalances,"show-top-up-button":"",customer:t.customer,"payment-methods":t.paymentMethods,subscriptions:b.value,onTopUpCharged:d[0]||(d[0]=h=>u.$emit("top-up-charged")),onAutoTopUpSaved:d[1]||(d[1]=h=>u.$emit("auto-top-up-saved")),onAutoTopUpCancelled:d[2]||(d[2]=h=>u.$emit("auto-top-up-cancelled")),onPaymentMethodStored:d[3]||(d[3]=h=>u.$emit("payment-method-stored"))},null,8,["has-error","is-loading","wallet-balances","customer","payment-methods","subscriptions"]),!t.isLoading&&t.onDemandItems.length>0?(e.openBlock(),e.createBlock(we,{key:0,items:t.onDemandItems,class:"sv-subscription-details__on-demand-items",onOrder:V},null,8,["items"])):e.createCommentVNode("",!0),y.value?(e.openBlock(),e.createBlock(_e,{key:1,class:"sv-subscription-details__upgrades","pricing-plan-schedule":y.value,onUpgrade:e.unref(B)},null,8,["pricing-plan-schedule","onUpgrade"])):e.createCommentVNode("",!0),I.value?(e.openBlock(),e.createBlock(W._sfc_main,{key:2,class:"sv-subscription-details__payment-method","is-loading":t.isLoading,"payment-methods":[I.value],configuration:{showViewAllButton:!1,showAddButton:!1}},null,8,["is-loading","payment-methods"])):e.createCommentVNode("",!0),N.value&&t.subscription&&t.onDemandScheduleId?(e.openBlock(),e.createBlock(e.unref(i),{key:3,"show-modal":w.value,subscription:t.subscription,"schedule-id":t.onDemandScheduleId,items:t.onDemandItems,customer:t.customer,"payment-methods":t.paymentMethods,"can-view-created-invoice":t.canViewCreatedInvoice,onClose:d[4]||(d[4]=h=>w.value=!1),onPaymentMethodStored:d[5]||(d[5]=h=>u.$emit("payment-method-stored")),onInvoiceCreated:d[6]||(d[6]=h=>u.$emit("invoice-created",h)),onViewInvoice:d[7]||(d[7]=h=>e.unref(c)({action:"view-invoice",data:{invoiceId:h}}))},null,8,["show-modal","subscription","schedule-id","items","customer","payment-methods","can-view-created-invoice"])):e.createCommentVNode("",!0),e.createVNode(Me,{"show-modal":!!e.unref(g),variant:e.unref(g),subscription:t.subscription,avatar:t.avatar,onConfirmed:x,onClose:e.unref(C)},null,8,["show-modal","variant","subscription","avatar","onClose"])]),_:1}))}}),De=["FIXED","FLAT"],Ve=(t,a)=>{var i;const n=(i=t.details.bands)==null?void 0:i[0];return a==="FIXED"?n==null?void 0:n.fixed_amount:n==null?void 0:n.amount},U=t=>typeof t=="number"&&Number.isInteger(t)&&t>=1,Ee=t=>{var n;const a=Number((n=t.default_units)==null?void 0:n.number);return U(a)?a:1},Ae=t=>{const a=t.flatMap(q.getAllPricings);return{productItems:new Map(a.flatMap(n=>n.items??[]).flatMap(n=>n.product_items??[]).map(({id:n,name:i})=>[n,i])),products:new Map(a.flatMap(n=>n.products??[]).map(({id:n,name:i})=>[n,i]))}},Te=(t,a,n)=>A.getComposedString(a.product_item_ids.map(i=>n.productItems.get(i)))||t.name||A.getComposedString(t.product_ids.map(i=>n.products.get(i)))||"",Le=(t,a,n)=>{var s,c;const i=(s=a.configs)==null?void 0:s.find(r=>r.on_demand);if(!i||(c=i.wallet_grants)!=null&&c.length||!le.hasOneOfPricingTypes(i,De))return;const o=i.details.pricing_type==="FIXED"?"FIXED":"FLAT";return{pricingItemId:a.id,pricingItemConfigId:i.id,name:Te(t,a,n),priceType:o,price:Ve(i,o),defaultUnits:Ee(i)}},Oe=(t,{pricingPlanVersions:a=[]}={})=>{const n=Ae(a);return q.getAllPricings(t).flatMap(i=>(i.items??[]).flatMap(o=>Le(i,o,n)??[]))},$e=(t,a)=>{const n=new Set((a.payment_acceptors??[]).flatMap(i=>{var o;return((o=i.payment_gateway)==null?void 0:o.integration_id)??[]}));return t.filter(i=>i.status==="ACTIVE"&&!!i.integration_id&&n.has(i.integration_id)).sort((i,o)=>+(o.id===a.payment_method_id)-+(i.id===a.payment_method_id))},qe=(t,a)=>t.flatMap(({pricingItemId:n,units:i})=>{const o=a.find(s=>s.pricingItemId===n);return o?o.priceType==="FLAT"&&i!==void 0?[{pricing_item_id:n,units:{number:String(i)}}]:[{pricing_item_id:n}]:[]});function Re({subscription:t}){const{getOnDemandPricingItems:a}=se.createPricingPlanSchedulesService(),n=m.useLogger(),{data:i,execute:o,error:s}=re.useService({service:a}),c=e.computed(()=>{var l;return((l=t.value)==null?void 0:l.variant)==="DEFAULT"?ce.getActiveDefaultScheduleInfo(t.value.pricing_plan_schedule_infos):void 0}),r=e.computed(()=>{var l;return(l=c.value)==null?void 0:l.id});return e.watch(r,l=>{l&&o({scheduleId:l}).catch(()=>n.error("ON_DEMAND_ITEMS_LOAD_FAILED","Failed to load the on-demand items of the subscription",{scheduleId:l},s.value))},{immediate:!0}),{items:e.computed(()=>{var l,g;return r.value&&((l=i.value)==null?void 0:l.pricing_plan_schedule_id)===r.value?Oe(i.value,{pricingPlanVersions:(g=t.value)==null?void 0:g.pricing_plan_schedule_infos.map(v=>v.pricing_plan_version)}):[]}),scheduleId:r}}const Ue=e.defineComponent({__name:"SubscriptionDetails.entry.view",props:{configuration:{type:Object},environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object}},setup(t){const a=t,n=a.portalObject.customer_id,{subscription:i,withPlanData:o,get:s,error:c}=ne.useSubscription({subscriptionId:a.configuration.subscriptionId}),{customer:r,get:f}=ie.useCustomer({customerId:n}),{items:l,fetchAll:g}=ae.usePaymentMethods({customerId:n}),{walletBalances:v,apiStatus:k,fetch:C}=$.useCustomerWalletBalances({customerId:n}),{isLoading:B}=oe.useLoadInitialData(s(),f.execute(),g(),C()),{items:_,scheduleId:x}=Re({subscription:i}),S=e.computed(()=>i.value?o(i.value):[]),y=e.computed(()=>{var b;return((b=v.value)==null?void 0:b.wallet_balances)??[]}),I=e.computed(()=>k.value===te.ApiStatus.Failed);return(b,w)=>e.renderSlot(b.$slots,"default",{subscription:e.unref(i),schedulesData:S.value,customer:e.unref(r),paymentMethods:e.unref(l),walletBalances:y.value,onDemandItems:e.unref(_),onDemandScheduleId:e.unref(x),hasWalletBalancesError:I.value,isLoading:e.unref(B),error:e.unref(c),refreshWalletBalances:e.unref(C),refreshPaymentMethods:e.unref(g),refreshSubscription:e.unref(s)})}});function Fe({invoice:t,configuration:a}){var n;(n=a.onInvoiceCreated)==null||n.call(a,{invoiceId:t.id,paymentStatus:t.payment_status})}const je=e.defineComponent({__name:"SubscriptionDetails.entry",props:{configuration:{type:Object},environment:{type:String},locale:{type:String},dateLocale:{type:String},messages:{type:Object},primaryColor:{type:String},secondaryColor:{type:String},isShadowRoot:{type:Boolean},experimentalFeatures:{type:Array},logLevel:{type:String},onLog:{type:Function},allowedPortalTypes:{type:Array},portalObject:{type:Object},cssOverrides:{type:[String,Array]},branding:{type:Object}},setup(t){const a=de.getComponentName("subscription-details"),n=t;return(i,o)=>(e.openBlock(),e.createBlock(e.unref(m._sfc_main$1),{entry:i.$props,"component-name":e.unref(a),"allowed-portal-types":["CUSTOMER"],onError:o[1]||(o[1]=s=>i.$emit("error",s))},{default:e.withCtx(()=>[e.createVNode(Ue,e.normalizeProps(e.guardReactiveProps(i.$props)),{default:e.withCtx(({subscription:s,schedulesData:c,customer:r,paymentMethods:f,walletBalances:l,onDemandItems:g,onDemandScheduleId:v,hasWalletBalancesError:k,isLoading:C,error:B,refreshWalletBalances:_,refreshPaymentMethods:x,refreshSubscription:S})=>[e.createVNode(Pe,{subscription:s,"schedules-data":c,customer:r,avatar:t.configuration.avatar,"can-view-created-invoice":t.configuration.canViewCreatedInvoice,"payment-methods":f,"wallet-balances":l,"on-demand-items":g,"on-demand-schedule-id":v,"has-wallet-balances-error":k,"is-loading":C,error:B,onTopUpCharged:_,onAutoTopUpSaved:_,onAutoTopUpCancelled:_,onPaymentMethodStored:x,onSubscriptionChanged:S,onInvoiceCreated:o[0]||(o[0]=y=>e.unref(Fe)({invoice:y,configuration:n.configuration}))},null,8,["subscription","schedules-data","customer","avatar","can-view-created-invoice","payment-methods","wallet-balances","on-demand-items","on-demand-schedule-id","has-wallet-balances-error","is-loading","error","onTopUpCharged","onAutoTopUpSaved","onAutoTopUpCancelled","onPaymentMethodStored","onSubscriptionChanged"])]),_:1},16)]),_:1},8,["entry","component-name"]))}}),{define:We}=m.createSolvimonElement(je,"subscription-details");exports.defineSolvimonSubscriptionDetails=We;exports.getPayablePaymentMethods=$e;exports.isOrderableUnits=U;exports.toChargePricingItems=qe;exports.useChargeOnDemandPriceLabel=R;
@@ -1,4 +1,4 @@
1
- import { _ as f } from "./SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DHp_KtbF.mjs";
1
+ import { _ as f } from "./SubscriptionSchedules.vue_vue_type_script_setup_true_lang-C1kTiW-H.mjs";
2
2
  export {
3
3
  f as default
4
4
  };
@@ -1 +1 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./SubscriptionSchedules.vue_vue_type_script_setup_true_lang-t2Awijf5.js");exports.default=e._sfc_main;
1
+ Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const e=require("./SubscriptionSchedules.vue_vue_type_script_setup_true_lang-Dd_Rr6qn.js");exports.default=e._sfc_main;
@@ -1,29 +1,29 @@
1
1
  import { onMounted as Ji, onUnmounted as Pn, ref as be, watch as Be, onBeforeUnmount as In, computed as C, unref as B, nextTick as Cn, provide as Ge, reactive as En, inject as Xi, defineComponent as U, openBlock as l, createElementBlock as g, normalizeClass as H, renderSlot as k, createBlock as T, resolveDynamicComponent as wn, withCtx as o, createElementVNode as w, createCommentVNode as b, createVNode as S, createTextVNode as O, toDisplayString as h, useSlots as Qi, normalizeProps as q, guardReactiveProps as Y, mergeProps as j, Fragment as z, renderList as Q, toRef as en, withKeys as Ai, withModifiers as we, createSlots as Sn, resolveComponent as Tn, normalizeStyle as Bn } from "vue";
2
- import { _ as Dn } from "./Section.vue.es-D7eiXUbk.mjs";
2
+ import { _ as Dn } from "./Section.vue.es-DVEpre9O.mjs";
3
3
  import { f as Ne, c as On, b as nn, a as Nn } from "./formatting.es-RclXHhKo.mjs";
4
4
  import { c as Ln, a as Vn } from "./comparators.es-D8WGL-c4.mjs";
5
- import { _ as le } from "./Chip.vue.es-CKCOY5T6.mjs";
5
+ import { _ as le } from "./Chip.vue.es-DksjbJO8.mjs";
6
6
  import { _ as _e } from "./Expand.vue.es-BleuAfDz.mjs";
7
- import { c as ke } from "./cn.es-CGa6b2Lt.mjs";
8
- import { _ as Z, a as ae } from "./customElements-D5DAoHRI.mjs";
7
+ import { c as ke } from "./cn.es-Cvt6TIwv.mjs";
8
+ import { _ as Z, a as ae } from "./customElements-B58FcXIN.mjs";
9
9
  import { _ as se } from "./floating-ui.vue.es-CYt0fSY7.mjs";
10
- import { _ as tn } from "./IconTitle.vue.es-CK9k69tV.mjs";
11
- import { _ as De, a as te } from "./Button.vue.es-C32_baQN.mjs";
10
+ import { _ as tn } from "./IconTitle.vue.es-B_8bS0tn.mjs";
11
+ import { _ as De, a as te } from "./Button.vue.es-Cmjfm4jw.mjs";
12
12
  import { g as Ri, h as Mn } from "./index.es-CXkP_k3u.mjs";
13
13
  import { _ as ze } from "./Alert.vue.es-lIiAWf2S.mjs";
14
14
  import { g as An } from "./getComposedString.es-C__uhJpd.mjs";
15
15
  import { g as je, i as Oe, a as Ce, b as Rn, c as zi, d as zn, F as $e, h as Zn } from "./pricing.es-QYWrKMUJ.mjs";
16
16
  import { i as ie } from "./useService-Bh47bllz.mjs";
17
- import { _ as Ae } from "./DividerText.vue.es-DKl3FnDJ.mjs";
17
+ import { _ as Ae } from "./DividerText.vue.es-nAo1eRMV.mjs";
18
18
  import { _ as J } from "./Amount.vue.es-DPqHB8Xd.mjs";
19
19
  import { _ as Ze, u as Un } from "./Comparators.vue.es-CwhX3rbx.mjs";
20
- import { _ as re, T as de, a as he } from "./TooltipParagraph.vue.es-BXbOJmjr.mjs";
20
+ import { _ as re, T as de, a as he } from "./TooltipParagraph.vue.es-B9A17aG7.mjs";
21
21
  import { b as Pe, c as qe, g as Le, d as We, e as Fn, r as Hn, f as ln, j as Gn, h as jn, k as qn, l as Wn, a as Yn } from "./pricingItemConfigs.es-ORxsk_YS.mjs";
22
22
  import { i as Ue } from "./slots.es-BA4MyEAa.mjs";
23
23
  import { b as Ie, c as on, d as Ye } from "./typeGuards.es-B4XMtlkM.mjs";
24
- import { u as Kn, _ as Jn } from "./PricingGroupRangeInput.vue.es-CJpvUP3-.mjs";
25
- import { _ as Xn } from "./Avatar.vue.es-BqQHvLGA.mjs";
26
- import { _ as Qn, c as et } from "./TrialChip.vue.es-C_yRujip.mjs";
24
+ import { u as Kn, _ as Jn } from "./PricingGroupRangeInput.vue.es-BhNcjD7z.mjs";
25
+ import { _ as Xn } from "./Avatar.vue.es-sfMZiX7A.mjs";
26
+ import { _ as Qn, c as et } from "./TrialChip.vue.es-Dmv3lPiQ.mjs";
27
27
  import { p as Re } from "./object.es-8aLDIncs.mjs";
28
28
  const it = 1122.515625;
29
29
  function nt(e, i, n, t) {