@solvimon/solvimon-web 0.1.0-alpha.25 → 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 (302) hide show
  1. package/README.md +16 -11
  2. package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-BM1_31Tl.js → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-081H9T3X.js} +1 -1
  3. package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Dh_a0NRB.mjs → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DNepCMRp.mjs} +6 -6
  4. package/dist/{Avatar.vue.es-CvxRdCes.js → Avatar.vue.es-BJxSCU76.js} +1 -1
  5. package/dist/{Avatar.vue.es-C9Jkfuvp.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-BRSUpMPU.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-DmY3a-Wi.mjs} +15 -16
  8. package/dist/{Button.vue.es-CeUTAc2n.js → Button.vue.es-BzkuglKw.js} +1 -1
  9. package/dist/{Button.vue.es-BbSN0uOk.mjs → Button.vue.es-Cmjfm4jw.mjs} +1 -1
  10. package/dist/ChargeOnDemandModal-CB4mrvkU.mjs +975 -0
  11. package/dist/ChargeOnDemandModal-b17YswWA.js +1 -0
  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-BN83K3Tk.js → Chip.vue.es-B2jjzIOc.js} +1 -1
  15. package/dist/{Chip.vue.es-T22Q7AF9.mjs → Chip.vue.es-DksjbJO8.mjs} +2 -2
  16. package/dist/{ContextMenu.vue.es-DXKR7WFg.js → ContextMenu.vue.es-DUU43tCy.js} +1 -1
  17. package/dist/{ContextMenu.vue.es-0PRmCAzL.mjs → ContextMenu.vue.es-zRvoEJlV.mjs} +10 -10
  18. package/dist/{CustomerBillingInformation.vue.es-yrLGc7oL.js → CustomerBillingInformation.vue.es-BfPEB42w.js} +1 -1
  19. package/dist/{CustomerBillingInformation.vue.es-C2j40TYP.mjs → CustomerBillingInformation.vue.es-DhFbpZPK.mjs} +2 -2
  20. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BZwGWhaL.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-C8diNL5x.js → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BISD6n8X.js} +1 -1
  22. package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-xqMsbuU6.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DssxYPSA.mjs} +895 -891
  23. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-XufY6bdV.js +1 -0
  24. package/dist/{DividerText.vue.es-DsYRZzuE.js → DividerText.vue.es-CoyDk9eH.js} +1 -1
  25. package/dist/{DividerText.vue.es-CV1XK_Vz.mjs → DividerText.vue.es-nAo1eRMV.mjs} +1 -1
  26. package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-srXOpUb0.js → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CQ0KrXHJ.js} +1 -1
  27. package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-kpjrC-4q.mjs → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-QW9NdxyZ.mjs} +4 -4
  28. package/dist/{ErrorNotification.vue.es-CiUJva6S.mjs → ErrorNotification.vue.es-h-D37rfG.mjs} +1 -1
  29. package/dist/{ErrorNotification.vue.es-QfRoDhkn.js → ErrorNotification.vue.es-tS9vySUZ.js} +1 -1
  30. package/dist/{IconButton.vue.es-CytBZUkZ.js → IconButton.vue.es-DgQN18Am.js} +1 -1
  31. package/dist/{IconButton.vue.es-ChvsCZQG.mjs → IconButton.vue.es-DvfErUOq.mjs} +2 -2
  32. package/dist/{IconTitle.vue.es-DPruIJ6l.mjs → IconTitle.vue.es-B_8bS0tn.mjs} +3 -3
  33. package/dist/{IconTitle.vue.es-DtnpBObk.js → IconTitle.vue.es-Dn2xcPHj.js} +1 -1
  34. package/dist/{Input.vue.es-BkzQDkrz.js → Input.vue.es-B60eK8Ds.js} +1 -1
  35. package/dist/{Input.vue.es-DJQqJrsb.mjs → Input.vue.es-CU9u5yKH.mjs} +2 -2
  36. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Do0dDtkA.js → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Dqdezse7.js} +1 -1
  37. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BC-zyUqe.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-gpMtYNzn.mjs} +2 -2
  38. package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-DQFS7SfE.js → InvoiceEntryView.vue_vue_type_script_setup_true_lang-Cl6HU243.js} +1 -1
  39. package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-CFhhhwId.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-DNqawlYV.mjs} +2 -2
  40. package/dist/InvoiceSummary.vue.es-CAmA8g0t.js +1 -0
  41. package/dist/{InvoiceSummary.vue.es-6qpbyymg.mjs → InvoiceSummary.vue.es-CRiFJ5x-.mjs} +576 -565
  42. package/dist/{Modal.vue.es-BuRlbyZw.mjs → Modal.vue.es-BeI5C9-9.mjs} +5 -5
  43. package/dist/{Modal.vue.es-JpE0eh_Q.js → Modal.vue.es-DvLB3uCG.js} +1 -1
  44. package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-nAuhIopc.js → PaymentErrorCard.vue_vue_type_script_setup_true_lang-Dg4rn1cm.js} +1 -1
  45. package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-UmKgVvdj.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-DqHcOnZp.mjs} +5 -6
  46. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-YpcWHm24.js → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-B9R5JRJv.js} +1 -1
  47. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DggCusgC.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DlqoWKQq.mjs} +3 -3
  48. package/dist/{PaymentHistoryBlock-uWuWjr8I.js → PaymentHistoryBlock-Uw8xeKUk.js} +1 -1
  49. package/dist/{PaymentHistoryBlock-DnmParhQ.mjs → PaymentHistoryBlock-mCqdFjnL.mjs} +1 -1
  50. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BS8N4yt9.js → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-ALI5f0py.js} +1 -1
  51. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BziIf86i.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DxaY3eFN.mjs} +4 -4
  52. package/dist/{PaymentIntegrationForm-DTXm56QQ.js → PaymentIntegrationForm-Cx0zCf_C.js} +1 -1
  53. package/dist/{PaymentIntegrationForm-DL55i0HD.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-CCKCXXZX.mjs +154 -0
  56. package/dist/PaymentIntegrationFormAdyen-B-v-4nlj.js +98 -0
  57. package/dist/{PaymentIntegrationFormAdyen-Cqsy82To.mjs → PaymentIntegrationFormAdyen-Yr8p5Fly.mjs} +202 -192
  58. package/dist/PaymentIntegrationFormStripe-CoLmAzas.js +102 -0
  59. package/dist/{PaymentIntegrationFormStripe-DIU1rnwH.mjs → PaymentIntegrationFormStripe-Ds0BXt89.mjs} +247 -220
  60. package/dist/{PaymentMethod.vue.es-m1NasGqw.mjs → PaymentMethod.vue.es-4YRmQZHX.mjs} +168 -148
  61. package/dist/PaymentMethod.vue.es-D0D9jW8s.js +1 -0
  62. package/dist/{PaymentMethodForm-BEVdWCrH.js → PaymentMethodForm-CMP5FLRO.js} +1 -1
  63. package/dist/{PaymentMethodForm-BYzt1PVP.mjs → PaymentMethodForm-Dnj_7mJU.mjs} +1 -1
  64. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-fdRTp7sc.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-DsD3UjkC.mjs} +60 -58
  65. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-nxnGyJmE.js +1 -0
  66. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-FhMBZqtI.js → PaymentMethodsList.vue_vue_type_script_setup_true_lang-CIrrQUS6.js} +1 -1
  67. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-FChyZp2v.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-DlVSCKGN.mjs +722 -0
  70. package/dist/{PricingGroupRangeInput.vue.es-B4ZbKxUw.mjs → PricingGroupRangeInput.vue.es-BhNcjD7z.mjs} +4 -4
  71. package/dist/{PricingGroupRangeInput.vue.es-Ba3v0J_R.js → PricingGroupRangeInput.vue.es-VoOTnHjk.js} +1 -1
  72. package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-CmJITenR.mjs +141 -0
  73. package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-hS6A-KcP.js +1 -0
  74. package/dist/{RadioGroupExtended.vue.es-CkhBp9kI.mjs → RadioGroupExtended.vue.es-9YzXzZF0.mjs} +2 -2
  75. package/dist/{RadioGroupExtended.vue.es-CHrcqSRq.js → RadioGroupExtended.vue.es-DlbURHQN.js} +1 -1
  76. package/dist/{Section.vue.es-CSrVPlUK.js → Section.vue.es-Bbt0RITt.js} +1 -1
  77. package/dist/{Section.vue.es-D5svcVS_.mjs → Section.vue.es-DVEpre9O.mjs} +1 -1
  78. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BqOSBdFQ.js → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Dl7MbMlk.js} +1 -1
  79. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BM9Y4Cy3.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-H-3R4jJq.js +1 -0
  83. package/dist/StepInput.vue.es-o-3Lg4Ai.mjs +199 -0
  84. package/dist/SubscriptionDetails.entry.ce-CGl6Z5ql.mjs +1057 -0
  85. package/dist/SubscriptionDetails.entry.ce-CQUO_uXH.js +1 -0
  86. package/dist/{SubscriptionSchedules-yDcsD1hd.mjs → SubscriptionSchedules-DuWZmnD2.mjs} +1 -1
  87. package/dist/{SubscriptionSchedules-CMVoB2bw.js → SubscriptionSchedules-Dy0fUgx5.js} +1 -1
  88. package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DZHsQImd.mjs → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-C1kTiW-H.mjs} +2284 -2341
  89. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-Dd_Rr6qn.js +1 -0
  90. package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-BgXZMihr.js → SubscriptionSummary.vue_vue_type_script_setup_true_lang-CYyP4ra9.js} +1 -1
  91. package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-BmNl5u8R.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-CsekphtV.mjs} +3 -3
  92. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DOJ0t_fo.js → SubscriptionsList.vue_vue_type_script_setup_true_lang-B4j8Clbj.js} +1 -1
  93. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-BUzdZHah.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BsdevoeT.mjs} +9 -10
  94. package/dist/{TooltipParagraph.vue.es-CxdL8-B7.mjs → TooltipParagraph.vue.es-B9A17aG7.mjs} +3 -3
  95. package/dist/TooltipParagraph.vue.es-DvC5Wjaz.js +1 -0
  96. package/dist/{TrialChip.vue.es-BCc8q5j0.js → TrialChip.vue.es-CLQZ5F0n.js} +1 -1
  97. package/dist/{TrialChip.vue.es-BK7m7e7q.mjs → TrialChip.vue.es-Dmv3lPiQ.mjs} +2 -2
  98. package/dist/{cn.es-71nFUose.js → cn.es-C9Yqq4tg.js} +1 -1
  99. package/dist/{cn.es-ZXNzpauQ.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 +246 -230
  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 +201 -212
  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-q_i9y0Ph.mjs → customElements-B58FcXIN.mjs} +231 -196
  125. package/dist/{customElements-hH6pju3X.js → customElements-DUMRMFQ5.js} +36 -32
  126. package/dist/{customer-BDoOIAFr.mjs → customer-B3LPAhaD.mjs} +4 -4
  127. package/dist/{customer-C9q6ti8s.js → customer-CisTPaXj.js} +1 -1
  128. package/dist/{de-DE-BSlbAnPE.js → de-DE-B4TUdnUf.js} +1 -1
  129. package/dist/{de-DE-B_ik9VNt.mjs → de-DE-DKp5LCu0.mjs} +53 -7
  130. package/dist/de-DE-DL74pMLb.js +1 -0
  131. package/dist/{de-DE-DXsG-vXA.mjs → de-DE-jkW2dJrX.mjs} +28 -14
  132. package/dist/en-US-B2XFj-_p.js +1 -0
  133. package/dist/{en-US-DkCltadt.mjs → en-US-DQ5vlv9Z.mjs} +53 -7
  134. package/dist/en-US-J85TQRI8.js +1 -0
  135. package/dist/{en-US-C939IZ5i.mjs → en-US-SDhjlY_v.mjs} +20 -5
  136. package/dist/formControl-ODrpUvcA.js +1 -0
  137. package/dist/{index-BPU8tIml.mjs → formControl-dX7l8o3c.mjs} +160 -143
  138. package/dist/icon-sprite.svg.es-BZIz7-0d.mjs +4 -0
  139. package/dist/icon-sprite.svg.es-Ds6lDf5p.js +1 -0
  140. package/dist/index.cjs +1 -1
  141. package/dist/index.mjs +4 -4
  142. package/dist/{invoices-DIzkXntV.mjs → invoices-3520M5AN.mjs} +1 -1
  143. package/dist/{invoices-CHp75zZI.js → invoices-CKQBLar2.js} +1 -1
  144. package/dist/{it-IT-CHj2McbF.mjs → it-IT-BgFVsO5S.mjs} +53 -7
  145. package/dist/{it-IT-DT3rfjOY.js → it-IT-CSYvGmpT.js} +1 -1
  146. package/dist/{it-IT-BxpwB3oJ.mjs → it-IT-CaaFToGB.mjs} +20 -6
  147. package/dist/it-IT-CqNK62qe.js +1 -0
  148. package/dist/{nl-NL-DfkhOJKc.js → nl-NL-CpE4IgwO.js} +1 -1
  149. package/dist/{nl-NL-na2I4aiP.mjs → nl-NL-D0MQKaql.mjs} +34 -20
  150. package/dist/nl-NL-Dx-TNXQ1.js +1 -0
  151. package/dist/{nl-NL-Cdvd_XMN.mjs → nl-NL-UiRWbO9S.mjs} +53 -7
  152. package/dist/{paymentMethods-DEKp_4QM.mjs → paymentMethods-CWlvwK5V.mjs} +16 -14
  153. package/dist/paymentMethods-Cw-i95mM.js +1 -0
  154. package/dist/{payments-C0-Hq2a4.mjs → payments-2qeQdpiW.mjs} +6 -6
  155. package/dist/{payments-DBvregE8.js → payments-CS7_YcOW.js} +1 -1
  156. package/dist/pricing-BIMpDI_p.mjs +29 -0
  157. package/dist/pricing-BOqG21f9.js +1 -0
  158. package/dist/pricing.es-C07bgEZx.js +1 -0
  159. package/dist/pricing.es-QYWrKMUJ.mjs +30 -0
  160. package/dist/pricingPlanSchedules-B_sTAIgU.js +1 -0
  161. package/dist/pricingPlanSchedules-ChQCbMfe.mjs +32 -0
  162. package/dist/screens/Checkout/Checkout.cjs +1 -1
  163. package/dist/screens/Checkout/Checkout.mjs +2 -2
  164. package/dist/screens/CustomerOverview/CustomerOverview.cjs +1 -1
  165. package/dist/screens/CustomerOverview/CustomerOverview.mjs +10 -10
  166. package/dist/screens/PayInvoice/PayInvoice.cjs +1 -1
  167. package/dist/screens/PayInvoice/PayInvoice.mjs +57 -55
  168. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs +1 -1
  169. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +9 -9
  170. package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs +1 -1
  171. package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +3 -769
  172. package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs +1 -1
  173. package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +243 -270
  174. package/dist/{subscription-CrVOr5MF.mjs → subscription-D1yHKUNc.mjs} +2 -2
  175. package/dist/{subscriptions--9MaTXMb.mjs → subscriptions-DcfcBYAq.mjs} +1 -1
  176. package/dist/{subscriptions-BArXBCFr.js → subscriptions-DwVsf4Ev.js} +1 -1
  177. package/dist/types/components/checkout/CheckoutTitle.types.d.ts +10 -0
  178. package/dist/types/components/payments/ExpressPaymentMethod/ExpressPaymentMethod.types.d.ts +9 -5
  179. package/dist/types/components/payments/ExpressPaymentMethod/ExpressPaymentMethodApplePay.types.d.ts +3 -1
  180. package/dist/types/components/payments/ExpressPaymentMethods/ExpressPaymentMethods.types.d.ts +5 -1
  181. package/dist/types/components/{wallets/WalletModalShell.types.d.ts → payments/OnDemandPaymentModalShell/OnDemandPaymentModalShell.types.d.ts} +3 -3
  182. package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +5 -0
  183. package/dist/types/components/payments/PaymentIntegrationFormStripe/PaymentIntegrationFormStripeFrame.types.d.ts +5 -9
  184. package/dist/types/components/providers/ActionDispatchProvider/ActionDispatchProvider.vue.d.ts +7 -11
  185. package/dist/types/components/providers/AuthProvider/AuthProvider.vue.d.ts +7 -11
  186. package/dist/types/components/providers/ConfigProvider/ConfigProvider.vue.d.ts +7 -11
  187. package/dist/types/components/providers/CssOverridesProvider/CssOverridesProvider.vue.d.ts +7 -11
  188. package/dist/types/components/providers/EntryProvider/EntryProvider.vue.d.ts +7 -11
  189. package/dist/types/components/providers/ErrorBoundary/ErrorBoundary.vue.d.ts +7 -11
  190. package/dist/types/components/providers/ExperimentalFeatureProvider/ExperimentalFeatureProvider.vue.d.ts +7 -11
  191. package/dist/types/components/providers/HostElementProvider/HostElementProvider.vue.d.ts +7 -11
  192. package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +2 -2
  193. package/dist/types/components/providers/LoggerProvider/LoggerProvider.vue.d.ts +7 -11
  194. package/dist/types/components/providers/PortalProvider/PortalProvider.vue.d.ts +7 -11
  195. package/dist/types/components/providers/Provider/Provider.vue.d.ts +7 -11
  196. package/dist/types/components/providers/TeleportProvider/TeleportProvider.vue.d.ts +7 -11
  197. package/dist/types/components/providers/TranslationProvider/TranslationOverride.vue.d.ts +7 -11
  198. package/dist/types/components/providers/TranslationProvider/TranslationProvider.vue.d.ts +7 -11
  199. package/dist/types/components/subscriptions/ChargeOnDemandModal/ChargeOnDemandModal.types.d.ts +21 -0
  200. package/dist/types/components/subscriptions/OnDemandItemsCard/OnDemandItemsCard.types.d.ts +7 -0
  201. package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.configuration.types.d.ts +27 -0
  202. package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.entry.types.d.ts +1 -1
  203. package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.types.d.ts +6 -5
  204. package/dist/types/services/paymentMethods.types.d.ts +4 -2
  205. package/dist/types/services/requests.types.d.ts +5 -0
  206. package/dist/types/vendor/@solvimon/solvimon-types/index.d.ts +5 -0
  207. package/dist/types/vendor/@solvimon/solvimon-types/types/AgentContext.d.ts +3 -0
  208. package/dist/types/vendor/@solvimon/solvimon-types/types/ApprovalPolicies.d.ts +6 -1
  209. package/dist/types/vendor/@solvimon/solvimon-types/types/ChargeOnDemandPricingItems.d.ts +23 -0
  210. package/dist/types/vendor/@solvimon/solvimon-types/types/CustomFields.d.ts +16 -4
  211. package/dist/types/vendor/@solvimon/solvimon-types/types/Embeddable.d.ts +8 -0
  212. package/dist/types/vendor/@solvimon/solvimon-types/types/Invoice.d.ts +21 -6
  213. package/dist/types/vendor/@solvimon/solvimon-types/types/OAuth.d.ts +28 -0
  214. package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentAcceptor.d.ts +2 -1
  215. package/dist/types/vendor/@solvimon/solvimon-types/types/Permission.d.ts +1 -1
  216. package/dist/types/vendor/@solvimon/solvimon-types/types/Platform.d.ts +6 -1
  217. package/dist/types/vendor/@solvimon/solvimon-types/types/Portal.d.ts +5 -0
  218. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingItemConfig.d.ts +5 -0
  219. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanGroups.d.ts +31 -0
  220. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSchedule.d.ts +9 -1
  221. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanScheduleInfo.d.ts +1 -1
  222. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSubscription.d.ts +3 -3
  223. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlans.d.ts +3 -0
  224. package/dist/types/vendor/@solvimon/solvimon-types/types/Product.d.ts +2 -0
  225. package/dist/types/vendor/@solvimon/solvimon-types/types/ProductItem.d.ts +2 -0
  226. package/dist/types/vendor/@solvimon/solvimon-types/types/QuoteTemplates.d.ts +2 -0
  227. package/dist/types/vendor/@solvimon/solvimon-types/types/ResourceStatus.d.ts +1 -1
  228. package/dist/types/vendor/@solvimon/solvimon-types/types/SeatAssignment.d.ts +22 -0
  229. package/dist/types/vendor/@solvimon/solvimon-types/types/Wallet.d.ts +6 -0
  230. package/dist/types/vendor/@solvimon/solvimon-types/types/Workflows.d.ts +128 -1
  231. package/dist/{useActionDispatchProvider-BdciAX8T.mjs → useActionDispatchProvider-B3AvkLL2.mjs} +1 -1
  232. package/dist/{useActionDispatchProvider-CKzeqXzY.js → useActionDispatchProvider-DFhppdve.js} +1 -1
  233. package/dist/{useCustomer-D8ixhuuj.mjs → useCustomer-B-jyJIVy.mjs} +1 -1
  234. package/dist/{useCustomer-DSYr0F58.js → useCustomer-BwZKd9i5.js} +1 -1
  235. package/dist/{useCustomerFormLabels-htMZ0xqB.mjs → useCustomerFormLabels-BQk3d9PZ.mjs} +6 -6
  236. package/dist/useCustomerFormLabels-DV9QiMYh.js +1 -0
  237. package/dist/useExperimentalFeature-BciA3Ok9.mjs +135 -0
  238. package/dist/useExperimentalFeature-CGIkgFR4.js +1 -0
  239. package/dist/{useInvoiceData-Bpbog3zW.mjs → useInvoiceData-BocKdeg7.mjs} +3 -3
  240. package/dist/{useInvoiceData-DhrItfv7.js → useInvoiceData-CNV_FMV8.js} +1 -1
  241. package/dist/{useInvoicesList-BGwcJn4I.mjs → useInvoicesList-C8nsXMJ6.mjs} +7 -7
  242. package/dist/{useInvoicesList-duu_b5GW.js → useInvoicesList-S0IbQcrD.js} +1 -1
  243. package/dist/{useLoadInitialData-BDmmpcfb.mjs → useLoadInitialData-D9GkzY8t.mjs} +1 -1
  244. package/dist/{useLoadInitialData-U2WvBmXT.js → useLoadInitialData-D_R6Jy1s.js} +1 -1
  245. package/dist/usePaymentMethodAvailability-BO_guwAw.js +1 -0
  246. package/dist/{usePaymentMethodAvailability-adqRujTA.mjs → usePaymentMethodAvailability-DAcsKGeh.mjs} +5 -6
  247. package/dist/{usePaymentMethodOptions-DlZtTQNQ.mjs → usePaymentMethodOptions-1vRAo6Ib.mjs} +15 -13
  248. package/dist/usePaymentMethodOptions-CuzOoi2k.js +1 -0
  249. package/dist/{usePaymentMethods-BnmSo_rr.mjs → usePaymentMethods-CbwnGONc.mjs} +1 -1
  250. package/dist/{usePaymentMethods-DZ1a0mnr.js → usePaymentMethods-DDaTZQZp.js} +1 -1
  251. package/dist/{usePayments-s-Z1di8d.mjs → usePayments-Cr6NlGaW.mjs} +46 -41
  252. package/dist/usePayments-DDSjo0rH.js +1 -0
  253. package/dist/{usePortal-Hm7wvtgQ.js → usePortal-C27omjhz.js} +1 -1
  254. package/dist/{usePortal-C4rR5Rhu.mjs → usePortal-C5AsegpS.mjs} +1 -1
  255. package/dist/{useSubscription-DSsXVO0h.mjs → useSubscription-BZJL0VOA.mjs} +1 -1
  256. package/dist/{useSubscription-DMAEJves.js → useSubscription-D787IXY-.js} +1 -1
  257. package/dist/{useTimePeriod.es-CW8ycmpT.mjs → useTimePeriod.es-DWLsLFqs.mjs} +1 -1
  258. package/dist/{useTimePeriod.es-anHB63am.js → useTimePeriod.es-rzxqUCTu.js} +1 -1
  259. package/dist/useWatchDebounced-B8iX7ykx.js +1 -0
  260. package/dist/useWatchDebounced-BHlBPcXB.mjs +20 -0
  261. package/package.json +20 -14
  262. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-7wQAw6Lv.js +0 -1
  263. package/dist/Checkout.entry.ce-BMzK8nQg.mjs +0 -3900
  264. package/dist/Checkout.entry.ce-DgA0ckyl.js +0 -2
  265. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DzbPUvHN.js +0 -1
  266. package/dist/InvoiceSummary.vue.es-v1TkOUhA.js +0 -1
  267. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-4RmdLbzY.js +0 -1
  268. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CvpFnl9V.mjs +0 -141
  269. package/dist/PaymentIntegrationFormAdyen-C9KoiqMh.js +0 -98
  270. package/dist/PaymentIntegrationFormStripe-DTLgGutU.js +0 -102
  271. package/dist/PaymentMethod.vue.es-ZWda5GqF.js +0 -1
  272. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-CzUwtVEI.js +0 -1
  273. package/dist/PlanCustomizationEditor-CunwwXTw.js +0 -1
  274. package/dist/PlanCustomizationEditor-NLVkEYFF.mjs +0 -877
  275. package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-Dvuj-fos.mjs +0 -131
  276. package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-iE4dLawA.js +0 -1
  277. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-DRLoYWGY.mjs +0 -51
  278. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-DypW8aNJ.js +0 -1
  279. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DH7IZrNT.js +0 -1
  280. package/dist/TooltipParagraph.vue.es-DS_69pl1.js +0 -1
  281. package/dist/adyen-CvsH5fok.mjs +0 -117
  282. package/dist/adyen-Druit6gz.js +0 -1
  283. package/dist/de-DE-npBTLtKL.js +0 -1
  284. package/dist/en-US-9xdcz3T5.js +0 -1
  285. package/dist/en-US-kGduGoka.js +0 -1
  286. package/dist/icon-sprite.svg.es-Bt21fMEt.mjs +0 -4
  287. package/dist/icon-sprite.svg.es-Dauis9LS.js +0 -1
  288. package/dist/index-DwueOtPi.js +0 -1
  289. package/dist/it-IT-BayNIAy7.js +0 -1
  290. package/dist/nl-NL-0rV4nFLw.js +0 -1
  291. package/dist/paymentMethods-CZGP6_4W.js +0 -1
  292. package/dist/pricing-BVAld27Y.js +0 -1
  293. package/dist/pricing-DLOeiAIB.mjs +0 -16
  294. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagement.types.d.ts +0 -47
  295. package/dist/useCustomerFormLabels-CRumh405.js +0 -1
  296. package/dist/useExperimentalFeature-D29-TO3R.js +0 -1
  297. package/dist/useExperimentalFeature-JK_kAUQQ.mjs +0 -6
  298. package/dist/usePaymentMethodAvailability-DwtT5Czz.js +0 -1
  299. package/dist/usePaymentMethodOptions-CXdFKFqZ.js +0 -1
  300. package/dist/usePayments-DL4agK2i.js +0 -1
  301. package/dist/useWatchDebounced-CAU1WI1P.js +0 -1
  302. package/dist/useWatchDebounced-DT5IicPp.mjs +0 -14
@@ -1,82 +1,82 @@
1
- import { defineComponent as z, ref as E, onMounted as xt, onBeforeUnmount as Pe, computed as s, openBlock as w, createBlock as C, withCtx as h, createElementVNode as k, toDisplayString as N, createVNode as A, createTextVNode as F, createElementBlock as W, unref as r, createCommentVNode as R, renderSlot as se, createSlots as re, Fragment as ge, renderList as he, useModel as $t, watch as ee, isRef as Et, mergeModels as Ot, mergeProps as le, reactive as Ae, normalizeClass as ze, withModifiers as Ne, normalizeStyle as ke } from "vue";
1
+ import { defineComponent as z, ref as $, onMounted as xt, onBeforeUnmount as Se, computed as s, openBlock as w, createBlock as C, withCtx as _, createElementVNode as N, toDisplayString as I, createVNode as A, createTextVNode as F, createElementBlock as W, unref as r, createCommentVNode as R, renderSlot as se, createSlots as re, Fragment as he, renderList as ge, watch as X, useModel as $t, isRef as Et, mergeModels as Ot, mergeProps as le, reactive as Ae, normalizeClass as ze, withModifiers as Ne, normalizeStyle as Re } from "vue";
2
2
  import { w as Bt } from "./api.es-QaC926Xu.mjs";
3
- import { u as Q, _ as X, c as Qe, a as Ge, b as _e, g as It } from "./customElements-q_i9y0Ph.mjs";
3
+ import { a as Q, _ as K, c as Qe, u as Ge, b as _e, g as It } from "./customElements-B58FcXIN.mjs";
4
4
  import { E as Dt } from "./sessionReference-3h-6FdrC.mjs";
5
5
  import { u as Nt } from "./useService-Bh47bllz.mjs";
6
- import { _ as Ke } from "./ErrorNotification.vue.es-CiUJva6S.mjs";
7
- import { i as kt, a as Me, h as Rt } from "./pricingItemConfigs.es-ORxsk_YS.mjs";
6
+ import { _ as Ke } from "./ErrorNotification.vue.es-h-D37rfG.mjs";
7
+ import { i as Rt, a as Me, h as kt } from "./pricingItemConfigs.es-ORxsk_YS.mjs";
8
8
  import { b as Ce } from "./wallets.es-eH2C2ygn.mjs";
9
- import { _ as ue, a as Vt } from "./Button.vue.es-BbSN0uOk.mjs";
10
- import { _ as Xe, T as Je, a as Ze } from "./TooltipParagraph.vue.es-CxdL8-B7.mjs";
11
- import { _ as fe } from "./Section.vue.es-D5svcVS_.mjs";
12
- import { _ as et } from "./Skeleton.vue_vue_type_script_setup_true_lang-DRLoYWGY.mjs";
13
- import { _ as tt } from "./RadioGroupExtended.vue.es-CkhBp9kI.mjs";
14
- import { u as xe, c as ie, _ as qt, a as Ft, r as ot } from "./index-BPU8tIml.mjs";
9
+ import { _ as ue, a as qt } from "./Button.vue.es-Cmjfm4jw.mjs";
10
+ import { _ as Xe, T as Je, a as Ze } from "./TooltipParagraph.vue.es-B9A17aG7.mjs";
11
+ import { _ as ve } from "./Section.vue.es-DVEpre9O.mjs";
12
+ import { _ as et } from "./Skeleton.vue_vue_type_script_setup_true_lang-CJWE7wVi.mjs";
13
+ import { _ as tt } from "./RadioGroupExtended.vue.es-9YzXzZF0.mjs";
14
+ import { a as Vt, u as xe, c as ie, _ as Ft, d as Lt, r as ot } from "./formControl-dX7l8o3c.mjs";
15
15
  import { f as $e } from "./formatting.es-RclXHhKo.mjs";
16
- import { _ as Lt } from "./Divider.vue.es-DnP_HqLz.mjs";
16
+ import { _ as Yt } from "./Divider.vue.es-DnP_HqLz.mjs";
17
17
  import { _ as nt } from "./Expand.vue.es-BleuAfDz.mjs";
18
- import { a as at } from "./EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-kpjrC-4q.mjs";
19
- import { _ as Yt } from "./cn.es-ZXNzpauQ.mjs";
20
- import { c as it } from "./invoices-DIzkXntV.mjs";
21
- import { u as Ht } from "./useWatchDebounced-DT5IicPp.mjs";
22
- import { _ as Wt } from "./Input.vue.es-DJQqJrsb.mjs";
23
- import { _ as st, a as jt } from "./AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Dh_a0NRB.mjs";
24
- import { _ as zt } from "./SubscriptionSummary.vue_vue_type_script_setup_true_lang-BmNl5u8R.mjs";
25
- import { g as Qt } from "./customer.es-B5ppZf0j.mjs";
26
- import { u as Gt } from "./usePaymentMethodOptions-DlZtTQNQ.mjs";
27
- import { M as lt } from "./Modal.vue.es-BuRlbyZw.mjs";
28
- const Kt = 3e4, we = 60, Te = 12, Xt = /* @__PURE__ */ z({
18
+ import { a as at } from "./EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-QW9NdxyZ.mjs";
19
+ import { _ as Ht } from "./cn.es-Cvt6TIwv.mjs";
20
+ import { c as it } from "./invoices-3520M5AN.mjs";
21
+ import { u as Wt } from "./useWatchDebounced-BHlBPcXB.mjs";
22
+ import { _ as jt } from "./Input.vue.es-CU9u5yKH.mjs";
23
+ import { _ as st, a as zt } from "./AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DNepCMRp.mjs";
24
+ import { _ as Qt } from "./SubscriptionSummary.vue_vue_type_script_setup_true_lang-CsekphtV.mjs";
25
+ import { g as Gt } from "./customer.es-B5ppZf0j.mjs";
26
+ import { u as Kt } from "./usePaymentMethodOptions-1vRAo6Ib.mjs";
27
+ import { M as lt } from "./Modal.vue.es-BeI5C9-9.mjs";
28
+ const Xt = 3e4, we = 60, Te = 12, Jt = /* @__PURE__ */ z({
29
29
  __name: "DateTimeAgo",
30
30
  props: {
31
31
  date: {},
32
32
  actionVerb: {}
33
33
  },
34
34
  setup(e) {
35
- const t = 60 * we, o = 24 * t, n = e, { $t: a, formatDate: i } = Q(), u = E(Date.now());
36
- let l;
35
+ const t = 60 * we, o = 24 * t, n = e, { $t: a, formatDate: i } = Q(), l = $(Date.now());
36
+ let u;
37
37
  xt(() => {
38
- l = setInterval(() => {
39
- u.value = Date.now();
40
- }, Kt);
41
- }), Pe(() => {
42
- clearInterval(l);
38
+ u = setInterval(() => {
39
+ l.value = Date.now();
40
+ }, Xt);
41
+ }), Se(() => {
42
+ clearInterval(u);
43
43
  });
44
- const p = (v, g) => {
45
- const m = (g.getFullYear() - v.getFullYear()) * Te + (g.getMonth() - v.getMonth());
46
- return g.getDate() < v.getDate() ? m - 1 : m;
47
- }, y = s(() => {
48
- const v = Math.max(0, (u.value - n.date.getTime()) / 1e3);
49
- if (v < we)
44
+ const c = (f, h) => {
45
+ const v = (h.getFullYear() - f.getFullYear()) * Te + (h.getMonth() - f.getMonth());
46
+ return h.getDate() < f.getDate() ? v - 1 : v;
47
+ }, g = s(() => {
48
+ const f = Math.max(0, (l.value - n.date.getTime()) / 1e3);
49
+ if (f < we)
50
50
  return a(
51
51
  {
52
52
  defaultMessage: "{count, plural, one {# second} other {# seconds}} ago",
53
53
  id: "dateTimeAgo.seconds",
54
54
  description: "Relative time in whole seconds"
55
55
  },
56
- { count: Math.trunc(v) }
56
+ { count: Math.trunc(f) }
57
57
  );
58
- if (v < t)
58
+ if (f < t)
59
59
  return a(
60
60
  {
61
61
  defaultMessage: "{count, plural, one {# minute} other {# minutes}} ago",
62
62
  id: "dateTimeAgo.minutes",
63
63
  description: "Relative time in whole minutes"
64
64
  },
65
- { count: Math.trunc(v / we) }
65
+ { count: Math.trunc(f / we) }
66
66
  );
67
- if (v < o)
67
+ if (f < o)
68
68
  return a(
69
69
  {
70
70
  defaultMessage: "{count, plural, one {# hour} other {# hours}} ago",
71
71
  id: "dateTimeAgo.hours",
72
72
  description: "Relative time in whole hours"
73
73
  },
74
- { count: Math.trunc(v / t) }
74
+ { count: Math.trunc(f / t) }
75
75
  );
76
- const g = p(n.date, new Date(u.value));
77
- if (g < 1) {
78
- const m = Math.trunc(v / o);
79
- return m === 1 ? a({
76
+ const h = c(n.date, new Date(l.value));
77
+ if (h < 1) {
78
+ const v = Math.trunc(f / o);
79
+ return v === 1 ? a({
80
80
  defaultMessage: "yesterday",
81
81
  id: "dateTimeAgo.yesterday",
82
82
  description: 'Relative time for a single day ago, reading as "updated yesterday" once the action verb is in front'
@@ -86,36 +86,36 @@ const Kt = 3e4, we = 60, Te = 12, Xt = /* @__PURE__ */ z({
86
86
  id: "dateTimeAgo.days",
87
87
  description: "Relative time in whole days"
88
88
  },
89
- { count: m }
89
+ { count: v }
90
90
  );
91
91
  }
92
- return g < Te ? a(
92
+ return h < Te ? a(
93
93
  {
94
94
  defaultMessage: "{count, plural, one {# month} other {# months}} ago",
95
95
  id: "dateTimeAgo.months",
96
96
  description: "Relative time in whole months"
97
97
  },
98
- { count: g }
98
+ { count: h }
99
99
  ) : a(
100
100
  {
101
101
  defaultMessage: "{count, plural, one {# year} other {# years}} ago",
102
102
  id: "dateTimeAgo.years",
103
103
  description: "Relative time in whole years"
104
104
  },
105
- { count: Math.trunc(g / Te) }
105
+ { count: Math.trunc(h / Te) }
106
106
  );
107
- }), T = s(
108
- () => n.actionVerb ? `${n.actionVerb} ${y.value}` : y.value
109
- ), x = s(
107
+ }), b = s(
108
+ () => n.actionVerb ? `${n.actionVerb} ${g.value}` : g.value
109
+ ), S = s(
110
110
  () => i({ date: n.date, format: "dateTime", offsetType: "local" })
111
111
  );
112
- return (v, g) => (w(), C(Xe, null, {
113
- tooltip: h(() => [
112
+ return (f, h) => (w(), C(Xe, null, {
113
+ tooltip: _(() => [
114
114
  A(Je, null, {
115
- default: h(() => [
115
+ default: _(() => [
116
116
  A(Ze, null, {
117
- default: h(() => [
118
- F(N(x.value), 1)
117
+ default: _(() => [
118
+ F(I(S.value), 1)
119
119
  ]),
120
120
  _: 1
121
121
  })
@@ -123,79 +123,79 @@ const Kt = 3e4, we = 60, Te = 12, Xt = /* @__PURE__ */ z({
123
123
  _: 1
124
124
  })
125
125
  ]),
126
- default: h(() => [
127
- k("span", null, N(T.value), 1)
126
+ default: _(() => [
127
+ N("span", null, I(b.value), 1)
128
128
  ]),
129
129
  _: 1
130
130
  }));
131
131
  }
132
- }), Jt = (e) => {
133
- const { $t: t, formatNumber: o } = Q(), n = (_) => Ce(t, o, _), a = s(
132
+ }), Zt = (e) => {
133
+ const { $t: t, formatNumber: o } = Q(), n = (y) => Ce(t, o, y), a = s(
134
134
  () => {
135
- var _, S;
136
- return ((S = (_ = e.walletBalance.wallet) == null ? void 0 : _.wallet_type) == null ? void 0 : S.name) || t({
135
+ var y, p;
136
+ return ((p = (y = e.walletBalance.wallet) == null ? void 0 : y.wallet_type) == null ? void 0 : p.name) || t({
137
137
  defaultMessage: "Balance",
138
138
  id: "wallet_balance.balance_label",
139
139
  description: "Label shown above a wallet's balance amount"
140
140
  });
141
141
  }
142
- ), i = (_) => {
143
- var S;
144
- return (((S = _.pricing_item) == null ? void 0 : S.configs) ?? []).filter((f) => !!f.on_demand);
145
- }, u = s(
142
+ ), i = (y) => {
143
+ var p;
144
+ return (((p = y.pricing_item) == null ? void 0 : p.configs) ?? []).filter((P) => !!P.on_demand);
145
+ }, l = s(
146
146
  () => (e.walletBalance.charge_on_demand_pricing_items ?? []).filter(
147
- (_) => i(_).some(
148
- (S) => kt(S) || Me(S)
147
+ (y) => i(y).some(
148
+ (p) => Rt(p) || Me(p)
149
149
  )
150
150
  )
151
- ), l = s(
152
- () => u.value.find(
153
- (_) => i(_).some((S) => Me(S))
151
+ ), u = s(
152
+ () => l.value.find(
153
+ (y) => i(y).some((p) => Me(p))
154
154
  )
155
- ), p = s(
156
- () => !!e.showManualTopUp && u.value.length > 0
157
- ), y = s(() => !!e.showAutoTopUp && !!l.value), T = s(
155
+ ), c = s(
156
+ () => !!e.showManualTopUp && l.value.length > 0
157
+ ), g = s(() => !!e.showAutoTopUp && !!u.value), b = s(
158
158
  () => {
159
- var _, S;
160
- return (S = (_ = e.walletBalance.wallet) == null ? void 0 : _.auto_top_up_configs) == null ? void 0 : S.find(
161
- (f) => f.status === "ACTIVE"
159
+ var y, p;
160
+ return (p = (y = e.walletBalance.wallet) == null ? void 0 : y.auto_top_up_configs) == null ? void 0 : p.find(
161
+ (P) => P.status === "ACTIVE"
162
162
  );
163
163
  }
164
- ), x = s(
164
+ ), S = s(
165
165
  () => {
166
- var _, S;
167
- return (S = (_ = e.walletBalance.wallet_balance.open_balance) == null ? void 0 : _.credits) == null ? void 0 : S.credit_type;
166
+ var y, p;
167
+ return (p = (y = e.walletBalance.wallet_balance.open_balance) == null ? void 0 : y.credits) == null ? void 0 : p.credit_type;
168
168
  }
169
- ), v = (_, S) => n({
169
+ ), f = (y, p) => n({
170
170
  credits: {
171
- quantity: _,
172
- credit_type_id: S,
173
- credit_type: x.value
171
+ quantity: y,
172
+ credit_type_id: p,
173
+ credit_type: S.value
174
174
  }
175
- }), g = (_) => _.amount ? n({ amount: _.amount }) : _.credits ? v(_.credits.quantity, _.credits.credit_type_id) : "", m = s(() => {
176
- var _, S;
177
- const f = (_ = T.value) == null ? void 0 : _.pricing_item_id;
178
- if (!f)
175
+ }), h = (y) => y.amount ? n({ amount: y.amount }) : y.credits ? f(y.credits.quantity, y.credits.credit_type_id) : "", v = s(() => {
176
+ var y, p;
177
+ const P = (y = b.value) == null ? void 0 : y.pricing_item_id;
178
+ if (!P)
179
179
  return;
180
- const P = (e.walletBalance.charge_on_demand_pricing_items ?? []).filter((D) => D.pricing_item_id === f).flatMap((D) => i(D)).flatMap((D) => D.wallet_grants ?? []), O = (S = e.walletBalance.wallet) == null ? void 0 : S.wallet_type_id;
181
- return P.find((D) => D.wallet_type_id === O) ?? P[0];
180
+ const E = (e.walletBalance.charge_on_demand_pricing_items ?? []).filter((k) => k.pricing_item_id === P).flatMap((k) => i(k)).flatMap((k) => k.wallet_grants ?? []), D = (p = e.walletBalance.wallet) == null ? void 0 : p.wallet_type_id;
181
+ return E.find((k) => k.wallet_type_id === D) ?? E[0];
182
182
  }), U = s(() => {
183
- var _, S;
184
- const f = (_ = T.value) == null ? void 0 : _.topup_amount, P = (S = m.value) == null ? void 0 : S.credits_grant;
185
- if (!f || !P)
183
+ var y, p;
184
+ const P = (y = b.value) == null ? void 0 : y.topup_amount, E = (p = v.value) == null ? void 0 : p.credits_grant;
185
+ if (!P || !E)
186
186
  return "";
187
- if (P.credits)
188
- return v(
189
- P.credits.quantity,
190
- P.credits.credit_type_id
187
+ if (E.credits)
188
+ return f(
189
+ E.credits.quantity,
190
+ E.credits.credit_type_id
191
191
  );
192
- if (P.conversion) {
193
- const O = Number(f.quantity) * Number(P.conversion.rate);
194
- return v(String(O), P.conversion.credit_type_id);
192
+ if (E.conversion) {
193
+ const D = Number(P.quantity) * Number(E.conversion.rate);
194
+ return f(String(D), E.conversion.credit_type_id);
195
195
  }
196
196
  return "";
197
- }), I = s(
198
- () => T.value ? t({
197
+ }), B = s(
198
+ () => b.value ? t({
199
199
  defaultMessage: "Auto top-up enabled",
200
200
  id: "wallet_balance.auto_top_up_enabled_label",
201
201
  description: "Label shown when a wallet tops itself up automatically"
@@ -204,16 +204,16 @@ const Kt = 3e4, we = 60, Te = 12, Xt = /* @__PURE__ */ z({
204
204
  id: "wallet_balance.auto_top_up_disabled_label",
205
205
  description: "Label shown when a wallet has no automatic top-up configured"
206
206
  })
207
- ), G = s(() => {
208
- const _ = T.value;
209
- if (!_)
207
+ ), J = s(() => {
208
+ const y = b.value;
209
+ if (!y)
210
210
  return t({
211
211
  defaultMessage: "Set up an automatic top-up and your balance is increased for you whenever it drops below an amount you choose, so you never run out.",
212
212
  id: "wallet_balance.auto_top_up_setup_explanation",
213
213
  description: "Tooltip explaining what automatic top-ups do, shown when none is configured yet"
214
214
  });
215
- const S = _.topup_amount ? n({ amount: _.topup_amount }) : "", f = g(_.threshold);
216
- return !S || !f ? t({
215
+ const p = y.topup_amount ? n({ amount: y.topup_amount }) : "", P = h(y.threshold);
216
+ return !p || !P ? t({
217
217
  defaultMessage: "Your balance is topped up automatically once it runs low.",
218
218
  id: "wallet_balance.auto_top_up_generic_explanation",
219
219
  description: "Tooltip shown for an active automatic top-up whose amount or threshold is unknown"
@@ -223,31 +223,31 @@ const Kt = 3e4, we = 60, Te = 12, Xt = /* @__PURE__ */ z({
223
223
  id: "wallet_balance.auto_top_up_credits_explanation",
224
224
  description: "Tooltip explaining an automatic top-up that grants credits for a paid amount"
225
225
  },
226
- { topUpCredits: U.value, topUpAmount: S, threshold: f }
226
+ { topUpCredits: U.value, topUpAmount: p, threshold: P }
227
227
  ) : t(
228
228
  {
229
229
  defaultMessage: "Your balance is automatically increased with {topUpAmount} when it drops below {threshold}.",
230
230
  id: "wallet_balance.auto_top_up_explanation",
231
231
  description: "Tooltip explaining how the automatic top-up of a wallet balance works"
232
232
  },
233
- { topUpAmount: S, threshold: f }
233
+ { topUpAmount: p, threshold: P }
234
234
  );
235
235
  });
236
236
  return {
237
237
  walletName: a,
238
238
  formatBalance: n,
239
- manualTopUpItems: u,
240
- flexibleManualTopUpItem: l,
241
- showManualTopUp: p,
242
- showAutoTopUp: y,
243
- activeTopUpConfig: T,
244
- autoTopUpLabel: I,
245
- autoTopUpExplanation: G
239
+ manualTopUpItems: l,
240
+ flexibleManualTopUpItem: u,
241
+ showManualTopUp: c,
242
+ showAutoTopUp: g,
243
+ activeTopUpConfig: b,
244
+ autoTopUpLabel: B,
245
+ autoTopUpExplanation: J
246
246
  };
247
- }, Zt = { class: "flex flex-col gap-3 py-3" }, eo = { class: "flex flex-col gap-1 px-4" }, to = { class: "flex w-full justify-between gap-3" }, oo = { class: "flex w-full items-center gap-4" }, no = { key: 0 }, ao = {
247
+ }, eo = { class: "flex flex-col gap-3 py-3" }, to = { class: "flex flex-col gap-1 px-4" }, oo = { class: "flex w-full justify-between gap-3" }, no = { class: "flex w-full items-center gap-4" }, ao = { key: 0 }, io = {
248
248
  key: 1,
249
249
  class: "flex w-full justify-between gap-3 px-4"
250
- }, io = { class: "flex min-w-0 items-center gap-1" }, so = { class: "flex min-w-0 items-center gap-1" }, lo = { class: "shrink-0" }, uo = /* @__PURE__ */ z({
250
+ }, so = { class: "flex min-w-0 items-center gap-1" }, lo = { class: "flex min-w-0 items-center gap-1" }, uo = { class: "shrink-0" }, ro = /* @__PURE__ */ z({
251
251
  __name: "WalletBalancesItem",
252
252
  props: {
253
253
  walletBalance: {},
@@ -260,35 +260,35 @@ const Kt = 3e4, we = 60, Te = 12, Xt = /* @__PURE__ */ z({
260
260
  walletName: n,
261
261
  formatBalance: a,
262
262
  manualTopUpItems: i,
263
- flexibleManualTopUpItem: u,
264
- showManualTopUp: l,
265
- showAutoTopUp: p,
266
- activeTopUpConfig: y,
267
- autoTopUpLabel: T,
268
- autoTopUpExplanation: x
269
- } = Jt(t);
270
- return (v, g) => (w(), W("div", Zt, [
271
- k("div", eo, [
272
- k("div", to, [
273
- A(X, {
263
+ flexibleManualTopUpItem: l,
264
+ showManualTopUp: u,
265
+ showAutoTopUp: c,
266
+ activeTopUpConfig: g,
267
+ autoTopUpLabel: b,
268
+ autoTopUpExplanation: S
269
+ } = Zt(t);
270
+ return (f, h) => (w(), W("div", eo, [
271
+ N("div", to, [
272
+ N("div", oo, [
273
+ A(K, {
274
274
  variant: "body-xs",
275
275
  color: "subtle",
276
276
  "no-spacing": ""
277
277
  }, {
278
- default: h(() => [
279
- F(N(r(n)), 1)
278
+ default: _(() => [
279
+ F(I(r(n)), 1)
280
280
  ]),
281
281
  _: 1
282
282
  }),
283
- A(X, {
283
+ A(K, {
284
284
  variant: "body-xs",
285
285
  color: "subtle",
286
286
  "no-spacing": ""
287
287
  }, {
288
- default: h(() => {
289
- var m, U;
288
+ default: _(() => {
289
+ var v, U;
290
290
  return [
291
- (m = e.walletBalance.wallet_balance) != null && m.balance_at ? (w(), C(Xt, {
291
+ (v = e.walletBalance.wallet_balance) != null && v.balance_at ? (w(), C(Jt, {
292
292
  key: 0,
293
293
  date: new Date((U = e.walletBalance.wallet_balance) == null ? void 0 : U.balance_at),
294
294
  "action-verb": r(o)({
@@ -302,25 +302,25 @@ const Kt = 3e4, we = 60, Te = 12, Xt = /* @__PURE__ */ z({
302
302
  _: 1
303
303
  })
304
304
  ]),
305
- k("div", oo, [
306
- A(X, {
305
+ N("div", no, [
306
+ A(K, {
307
307
  variant: "body-lg",
308
308
  weight: "semibold",
309
309
  "no-spacing": "",
310
310
  class: "grow"
311
311
  }, {
312
- default: h(() => [
313
- F(N(r(a)(t.walletBalance.wallet_balance.open_balance)), 1)
312
+ default: _(() => [
313
+ F(I(r(a)(t.walletBalance.wallet_balance.open_balance)), 1)
314
314
  ]),
315
315
  _: 1
316
316
  }),
317
- r(l) ? (w(), C(r(ue), {
317
+ r(u) ? (w(), C(r(ue), {
318
318
  key: 0,
319
319
  size: "xs",
320
- onClick: g[0] || (g[0] = (m) => v.$emit("top-up", r(i)[0]))
320
+ onClick: h[0] || (h[0] = (v) => f.$emit("top-up", r(i)[0]))
321
321
  }, {
322
- default: h(() => [
323
- F(N(r(o)({
322
+ default: _(() => [
323
+ F(I(r(o)({
324
324
  defaultMessage: "Top up",
325
325
  id: "v1V8kA",
326
326
  description: "Button to top up a wallet balance"
@@ -330,18 +330,18 @@ const Kt = 3e4, we = 60, Te = 12, Xt = /* @__PURE__ */ z({
330
330
  })) : R("", !0)
331
331
  ])
332
332
  ]),
333
- v.$slots.graph ? (w(), W("div", no, [
334
- se(v.$slots, "graph")
333
+ f.$slots.graph ? (w(), W("div", ao, [
334
+ se(f.$slots, "graph")
335
335
  ])) : R("", !0),
336
- r(p) ? (w(), W("div", ao, [
337
- k("div", io, [
336
+ r(c) ? (w(), W("div", io, [
337
+ N("div", so, [
338
338
  A(Xe, { class: "min-w-0" }, {
339
- tooltip: h(() => [
339
+ tooltip: _(() => [
340
340
  A(Je, null, {
341
- default: h(() => [
341
+ default: _(() => [
342
342
  A(Ze, null, {
343
- default: h(() => [
344
- F(N(r(x)), 1)
343
+ default: _(() => [
344
+ F(I(r(S)), 1)
345
345
  ]),
346
346
  _: 1
347
347
  })
@@ -349,20 +349,20 @@ const Kt = 3e4, we = 60, Te = 12, Xt = /* @__PURE__ */ z({
349
349
  _: 1
350
350
  })
351
351
  ]),
352
- default: h(() => [
353
- k("div", so, [
354
- A(X, {
352
+ default: _(() => [
353
+ N("div", lo, [
354
+ A(K, {
355
355
  variant: "body-sm",
356
356
  color: "secondary",
357
357
  "no-spacing": "",
358
358
  class: "truncate"
359
359
  }, {
360
- default: h(() => [
361
- F(N(r(T)), 1)
360
+ default: _(() => [
361
+ F(I(r(b)), 1)
362
362
  ]),
363
363
  _: 1
364
364
  }),
365
- A(Vt, {
365
+ A(qt, {
366
366
  icon: "info",
367
367
  size: "2xs",
368
368
  class: "shrink-0 cursor-help text-gray-400"
@@ -372,15 +372,15 @@ const Kt = 3e4, we = 60, Te = 12, Xt = /* @__PURE__ */ z({
372
372
  _: 1
373
373
  })
374
374
  ]),
375
- k("div", lo, [
376
- r(y) ? (w(), C(r(ue), {
375
+ N("div", uo, [
376
+ r(g) ? (w(), C(r(ue), {
377
377
  key: 0,
378
378
  size: "xs",
379
379
  intent: "secondary",
380
- onClick: g[1] || (g[1] = (m) => v.$emit("cancel-auto-top-up", r(y)))
380
+ onClick: h[1] || (h[1] = (v) => f.$emit("cancel-auto-top-up", r(g)))
381
381
  }, {
382
- default: h(() => [
383
- F(N(r(o)({
382
+ default: _(() => [
383
+ F(I(r(o)({
384
384
  defaultMessage: "Disable",
385
385
  id: "wallet_balance.auto_top_up_disable_button",
386
386
  description: "Button to turn off a wallet's automatic top-up"
@@ -391,10 +391,10 @@ const Kt = 3e4, we = 60, Te = 12, Xt = /* @__PURE__ */ z({
391
391
  key: 1,
392
392
  size: "xs",
393
393
  intent: "secondary",
394
- onClick: g[2] || (g[2] = (m) => v.$emit("auto-top-up", r(u)))
394
+ onClick: h[2] || (h[2] = (v) => f.$emit("auto-top-up", r(l)))
395
395
  }, {
396
- default: h(() => [
397
- F(N(r(o)({
396
+ default: _(() => [
397
+ F(I(r(o)({
398
398
  defaultMessage: "Enable",
399
399
  id: "wallet_balance.auto_top_up_enable_button",
400
400
  description: "Button to set up a wallet's automatic top-up"
@@ -406,7 +406,7 @@ const Kt = 3e4, we = 60, Te = 12, Xt = /* @__PURE__ */ z({
406
406
  ])) : R("", !0)
407
407
  ]));
408
408
  }
409
- }), ro = { class: "flex flex-col gap-2" }, co = /* @__PURE__ */ z({
409
+ }), co = { class: "flex flex-col gap-2" }, po = /* @__PURE__ */ z({
410
410
  __name: "WalletBalances",
411
411
  props: {
412
412
  customerWalletBalances: {},
@@ -416,19 +416,19 @@ const Kt = 3e4, we = 60, Te = 12, Xt = /* @__PURE__ */ z({
416
416
  },
417
417
  emits: ["top-up", "auto-top-up", "cancel-auto-top-up"],
418
418
  setup(e) {
419
- return (t, o) => (w(), C(fe, {
419
+ return (t, o) => (w(), C(ve, {
420
420
  "no-spacing": "",
421
421
  "no-border": "",
422
422
  title: e.title
423
423
  }, re({
424
- default: h(() => [
425
- k("div", ro, [
426
- (w(!0), W(ge, null, he(e.customerWalletBalances, (n) => (w(), C(fe, {
424
+ default: _(() => [
425
+ N("div", co, [
426
+ (w(!0), W(he, null, ge(e.customerWalletBalances, (n) => (w(), C(ve, {
427
427
  key: n.wallet_id,
428
428
  "no-spacing": ""
429
429
  }, {
430
- default: h(() => [
431
- A(uo, {
430
+ default: _(() => [
431
+ A(ro, {
432
432
  "wallet-balance": n,
433
433
  "show-auto-top-up": e.showAutoTopUp,
434
434
  "show-manual-top-up": e.showManualTopUp,
@@ -445,7 +445,7 @@ const Kt = 3e4, we = 60, Te = 12, Xt = /* @__PURE__ */ z({
445
445
  }, [
446
446
  t.$slots["heading-right"] ? {
447
447
  name: "right",
448
- fn: h(() => [
448
+ fn: _(() => [
449
449
  se(t.$slots, "heading-right")
450
450
  ]),
451
451
  key: "0"
@@ -453,7 +453,7 @@ const Kt = 3e4, we = 60, Te = 12, Xt = /* @__PURE__ */ z({
453
453
  ]), 1032, ["title"]));
454
454
  }
455
455
  });
456
- function po() {
456
+ function mo() {
457
457
  const e = Qe(), t = Ge();
458
458
  function o(n) {
459
459
  return e({
@@ -467,28 +467,28 @@ function po() {
467
467
  getCustomerWalletBalances: o
468
468
  };
469
469
  }
470
- function Nn({ customerId: e }) {
471
- const { getCustomerWalletBalances: t } = po(), { data: o, execute: n, apiStatus: a, error: i, isPending: u } = Nt({
470
+ function Dn({ customerId: e }) {
471
+ const { getCustomerWalletBalances: t } = mo(), { data: o, execute: n, apiStatus: a, error: i, isPending: l } = Nt({
472
472
  service: () => t(e)
473
473
  });
474
474
  return { walletBalances: s(
475
475
  () => o.value ?? null
476
- ), apiStatus: a, error: i, fetch: n, isPending: u };
476
+ ), apiStatus: a, error: i, fetch: n, isPending: l };
477
477
  }
478
- const Re = (e = [], t) => {
478
+ const ke = (e = [], t) => {
479
479
  if (t != null && t.pricing_item_id)
480
480
  return e.find(
481
481
  (o) => (o.charge_on_demand_pricing_items ?? []).some(
482
482
  ({ pricing_item_id: n }) => n === t.pricing_item_id
483
483
  )
484
484
  );
485
- }, mo = ["TOP_UP", "ADD_PAYMENT_METHOD", "SUCCESS"], Ee = (e) => typeof e == "object" && e !== null && "pricing_item" in e, fo = (e) => [
485
+ }, vo = ["TOP_UP", "ADD_PAYMENT_METHOD", "SUCCESS"], Ee = (e) => typeof e == "object" && e !== null && "pricing_item" in e, fo = (e) => [
486
486
  ...new Set(
487
487
  ((e == null ? void 0 : e.charge_on_demand_pricing_items) ?? []).flatMap(
488
488
  (t) => Ee(t) && t.pricing_plan_schedule_id ? [t.pricing_plan_schedule_id] : []
489
489
  )
490
490
  )
491
- ], vo = (e, t) => {
491
+ ], ho = (e, t) => {
492
492
  const o = new Set(fo(e));
493
493
  return t.flatMap((n) => {
494
494
  const a = (n.pricing_plan_schedule_infos ?? []).filter(
@@ -501,9 +501,9 @@ const Re = (e = [], t) => {
501
501
  scheduleIds: a.map(({ id: i }) => i),
502
502
  enabledPricingIds: a.flatMap(
503
503
  (i) => {
504
- var u;
505
- return (((u = i.pricing_plan_schedule) == null ? void 0 : u.enabled_pricings) ?? []).flatMap(
506
- ({ pricing_id: l }) => l ? [l] : []
504
+ var l;
505
+ return (((l = i.pricing_plan_schedule) == null ? void 0 : l.enabled_pricings) ?? []).flatMap(
506
+ ({ pricing_id: u }) => u ? [u] : []
507
507
  );
508
508
  }
509
509
  )
@@ -526,26 +526,26 @@ const Re = (e = [], t) => {
526
526
  return [];
527
527
  const o = t.pricing_item_id ?? ((n = t.pricing_item) == null ? void 0 : n.id);
528
528
  return o ? (((a = t.pricing_item) == null ? void 0 : a.configs) ?? []).map((i) => {
529
- const u = bo(i, e), l = ho(i, e);
529
+ const l = wo(i, e), u = _o(i, e);
530
530
  return {
531
531
  pricingItemId: o,
532
532
  ...t.pricing_plan_schedule_id && {
533
533
  pricingPlanScheduleId: t.pricing_plan_schedule_id
534
534
  },
535
535
  config: i,
536
- ...u && { flexiblePricing: u },
537
- ...l && { fixedPricing: l }
536
+ ...l && { flexiblePricing: l },
537
+ ...u && { fixedPricing: u }
538
538
  };
539
539
  }) : [];
540
540
  });
541
- function ho(e, t) {
542
- var i, u, l;
543
- if (!e.on_demand || !Rt(e, ["FIXED"]))
541
+ function _o(e, t) {
542
+ var i, l, u;
543
+ if (!e.on_demand || !kt(e, ["FIXED"]))
544
544
  return;
545
- const o = (l = (u = (i = e.details) == null ? void 0 : i.bands) == null ? void 0 : u[0]) == null ? void 0 : l.fixed_amount;
545
+ const o = (u = (l = (i = e.details) == null ? void 0 : i.bands) == null ? void 0 : l[0]) == null ? void 0 : u.fixed_amount;
546
546
  if (!o)
547
547
  return;
548
- const n = rt(t), a = n ? yo(e, t) : void 0;
548
+ const n = rt(t), a = n ? bo(e, t) : void 0;
549
549
  return {
550
550
  amount: o,
551
551
  value: a && n ? Oe(a.quantity, n) : { amount: o }
@@ -560,30 +560,30 @@ const rt = (e) => {
560
560
  return (e.wallet_grants ?? []).filter(
561
561
  ({ wallet_type_id: a }) => !o || a === o
562
562
  );
563
- }, _o = (e, t) => {
563
+ }, yo = (e, t) => {
564
564
  var o, n;
565
565
  return (n = (o = dt(e, t).find(
566
566
  ({ credits_grant: a }) => a == null ? void 0 : a.conversion
567
567
  )) == null ? void 0 : o.credits_grant) == null ? void 0 : n.conversion;
568
- }, yo = (e, t) => {
568
+ }, bo = (e, t) => {
569
569
  var o, n;
570
570
  return (n = (o = dt(e, t).find(({ credits_grant: a }) => a == null ? void 0 : a.credits)) == null ? void 0 : o.credits_grant) == null ? void 0 : n.credits;
571
571
  }, Oe = (e, t) => ({ credits: { ...t, quantity: e } }), ct = (e, t) => {
572
572
  const o = Number(e), n = Number(t);
573
573
  return Number.isFinite(o) && Number.isFinite(n) ? String(o * n) : void 0;
574
574
  };
575
- function bo(e, t) {
576
- var p, y, T, x, v, g, m;
575
+ function wo(e, t) {
576
+ var c, g, b, S, f, h, v;
577
577
  if (!e.on_demand || !Me(e))
578
578
  return;
579
- const o = (y = (p = e.details) == null ? void 0 : p.bands) == null ? void 0 : y[0], n = ((T = o == null ? void 0 : o.minimum_amount) == null ? void 0 : T.currency) ?? ((x = o == null ? void 0 : o.maximum_amount) == null ? void 0 : x.currency) ?? ((g = (v = t == null ? void 0 : t.wallet_balance.balance) == null ? void 0 : v.amount) == null ? void 0 : g.currency);
579
+ const o = (g = (c = e.details) == null ? void 0 : c.bands) == null ? void 0 : g[0], n = ((b = o == null ? void 0 : o.minimum_amount) == null ? void 0 : b.currency) ?? ((S = o == null ? void 0 : o.maximum_amount) == null ? void 0 : S.currency) ?? ((h = (f = t == null ? void 0 : t.wallet_balance.balance) == null ? void 0 : f.amount) == null ? void 0 : h.currency);
580
580
  if (!n)
581
581
  return;
582
- const a = rt(t), i = a ? _o(e, t) : void 0, u = (m = a == null ? void 0 : a.credit_type) == null ? void 0 : m.unit_name, l = (U) => {
582
+ const a = rt(t), i = a ? yo(e, t) : void 0, l = (v = a == null ? void 0 : a.credit_type) == null ? void 0 : v.unit_name, u = (U) => {
583
583
  if (!U)
584
584
  return;
585
- const I = a && i ? ct(U.quantity, i.rate) : void 0;
586
- return I !== void 0 && a ? Oe(I, a) : { amount: U };
585
+ const B = a && i ? ct(U.quantity, i.rate) : void 0;
586
+ return B !== void 0 && a ? Oe(B, a) : { amount: U };
587
587
  };
588
588
  return {
589
589
  config: {
@@ -594,27 +594,27 @@ function bo(e, t) {
594
594
  ...i && {
595
595
  creditsConfiguration: {
596
596
  conversionRate: i.rate,
597
- ...(u == null ? void 0 : u.singular) && { unitNameSingle: u.singular },
598
- ...(u == null ? void 0 : u.plural) && { unitNamePlural: u.plural }
597
+ ...(l == null ? void 0 : l.singular) && { unitNameSingle: l.singular },
598
+ ...(l == null ? void 0 : l.plural) && { unitNamePlural: l.plural }
599
599
  }
600
600
  },
601
601
  bounds: {
602
- ...l(o == null ? void 0 : o.minimum_amount) && { minimum: l(o == null ? void 0 : o.minimum_amount) },
603
- ...l(o == null ? void 0 : o.maximum_amount) && { maximum: l(o == null ? void 0 : o.maximum_amount) }
602
+ ...u(o == null ? void 0 : o.minimum_amount) && { minimum: u(o == null ? void 0 : o.minimum_amount) },
603
+ ...u(o == null ? void 0 : o.maximum_amount) && { maximum: u(o == null ? void 0 : o.maximum_amount) }
604
604
  }
605
605
  };
606
606
  }
607
- const wo = (e) => {
607
+ const To = (e) => {
608
608
  var t, o, n, a, i;
609
609
  return !!((t = e.fixedPricing) != null && t.value.credits) || !!((o = e.flexiblePricing) != null && o.creditsConfiguration) || !!((i = ((n = e.flexiblePricing) == null ? void 0 : n.bounds.minimum) ?? ((a = e.flexiblePricing) == null ? void 0 : a.bounds.maximum)) != null && i.credits);
610
- }, To = (e) => {
610
+ }, Mo = (e) => {
611
611
  var t;
612
612
  for (const { fixedPricing: o, flexiblePricing: n } of e) {
613
613
  const a = (o == null ? void 0 : o.value.credits) ?? ((t = (n == null ? void 0 : n.bounds.minimum) ?? (n == null ? void 0 : n.bounds.maximum)) == null ? void 0 : t.credits);
614
614
  if (a != null && a.credit_type_id)
615
615
  return a.credit_type_id;
616
616
  }
617
- }, Mo = (e = []) => {
617
+ }, Uo = (e = []) => {
618
618
  for (const { flexiblePricing: t, fixedPricing: o } of e) {
619
619
  const n = (t == null ? void 0 : t.currency) ?? (o == null ? void 0 : o.amount.currency);
620
620
  if (n)
@@ -623,11 +623,11 @@ const wo = (e) => {
623
623
  }, pt = (e = []) => {
624
624
  var t, o, n;
625
625
  for (const { fixedPricing: a, flexiblePricing: i } of e) {
626
- const u = (a == null ? void 0 : a.value.credits) ?? ((t = (i == null ? void 0 : i.bounds.minimum) ?? (i == null ? void 0 : i.bounds.maximum)) == null ? void 0 : t.credits);
627
- if ((n = (o = u == null ? void 0 : u.credit_type) == null ? void 0 : o.unit_name) != null && n.plural)
628
- return u.credit_type.unit_name.plural;
626
+ const l = (a == null ? void 0 : a.value.credits) ?? ((t = (i == null ? void 0 : i.bounds.minimum) ?? (i == null ? void 0 : i.bounds.maximum)) == null ? void 0 : t.credits);
627
+ if ((n = (o = l == null ? void 0 : l.credit_type) == null ? void 0 : o.unit_name) != null && n.plural)
628
+ return l.credit_type.unit_name.plural;
629
629
  }
630
- }, Uo = (e = []) => {
630
+ }, Po = (e = []) => {
631
631
  var t;
632
632
  for (const { flexiblePricing: o } of e) {
633
633
  const n = (t = o == null ? void 0 : o.creditsConfiguration) == null ? void 0 : t.conversionRate;
@@ -641,9 +641,9 @@ const wo = (e) => {
641
641
  return { ...o && { minimum: o }, ...n && { maximum: n } };
642
642
  }
643
643
  return {};
644
- }, Po = (e = []) => {
645
- if (e.some(wo)) {
646
- const t = To(e);
644
+ }, Ao = (e = []) => {
645
+ if (e.some(To)) {
646
+ const t = Mo(e);
647
647
  return t ? { creditTypeId: t } : void 0;
648
648
  }
649
649
  for (const { flexiblePricing: t, fixedPricing: o } of e) {
@@ -651,79 +651,82 @@ const wo = (e) => {
651
651
  if (n)
652
652
  return { currency: n };
653
653
  }
654
- }, Ao = (e, t) => {
655
- var u;
654
+ }, Co = (e, t) => {
655
+ var l;
656
656
  if (e.fixedPricing)
657
657
  return e.fixedPricing.value;
658
658
  if (!e.flexiblePricing || !t)
659
659
  return;
660
- const { bounds: o, creditsConfiguration: n } = e.flexiblePricing, a = (u = o.minimum ?? o.maximum) == null ? void 0 : u.credits, i = n ? ct(t.quantity, n.conversionRate) : void 0;
660
+ const { bounds: o, creditsConfiguration: n } = e.flexiblePricing, a = (l = o.minimum ?? o.maximum) == null ? void 0 : l.credits, i = n ? ct(t.quantity, n.conversionRate) : void 0;
661
661
  return a && i !== void 0 ? Oe(i, a) : { amount: t };
662
662
  }, mt = (e = []) => {
663
- const t = Po(e);
663
+ const t = Ao(e);
664
664
  if (t)
665
665
  return {
666
666
  denomination: t,
667
- chargeCurrency: Mo(e) ?? "",
667
+ chargeCurrency: Uo(e) ?? "",
668
668
  creditUnitName: pt(e),
669
- conversionRate: Uo(e),
669
+ conversionRate: Po(e),
670
670
  topUpBounds: So(e)
671
671
  };
672
- }, Co = 400;
673
- function xo({
672
+ }, xo = 400;
673
+ function $o({
674
674
  pricingPlanScheduleId: e,
675
675
  pricingItems: t
676
676
  }) {
677
- const { previewChargeOnDemandPricingItems: o } = it(), n = _e(), a = E(), i = E(!1), u = It(), l = async () => {
678
- const p = e.value, y = u();
679
- if (!p || !t.value) {
680
- t.value && !p && n.warn(
677
+ const { previewChargeOnDemandPricingItems: o } = it(), n = _e(), a = $(), i = $(!1), l = $(!1), u = s(() => i.value || l.value), c = $(!1), g = It(), b = async () => {
678
+ const S = e.value, f = g();
679
+ if (l.value = !1, !S || !t.value) {
680
+ t.value && !S && n.warn(
681
681
  "INVOICE_PREVIEW_SKIPPED",
682
- "Skipped the top-up invoice preview: no schedule to charge it on",
682
+ "Skipped the on-demand charge invoice preview: no schedule to charge it on",
683
683
  { missing: ["pricingPlanScheduleId"] }
684
- ), a.value = void 0, i.value = !1;
684
+ ), a.value = void 0, i.value = !1, c.value = !1;
685
685
  return;
686
686
  }
687
- i.value = !0;
687
+ i.value = !0, c.value = !1;
688
688
  try {
689
- const T = await o({
690
- pricingPlanScheduleId: p,
689
+ const h = await o({
690
+ pricingPlanScheduleId: S,
691
691
  pricingItems: t.value
692
692
  });
693
- y() && (a.value = T);
694
- } catch (T) {
695
- y() && (a.value = void 0), n.error(
693
+ f() && (a.value = h);
694
+ } catch (h) {
695
+ f() && (a.value = void 0, c.value = !0), n.error(
696
696
  "INVOICE_PREVIEW_FAILED",
697
- "Failed to load top-up invoice preview",
698
- {},
699
- T
697
+ "Failed to load the invoice preview",
698
+ { preview: "ON_DEMAND_CHARGE" },
699
+ h
700
700
  );
701
701
  } finally {
702
- y() && (i.value = !1);
702
+ f() && (i.value = !1);
703
703
  }
704
704
  };
705
- return Ht(t, () => void l(), {
706
- debounce: Co,
705
+ return Wt(t, () => void b(), {
706
+ debounce: () => a.value || i.value || c.value ? xo : 0,
707
707
  deep: !0
708
- }), l(), { invoicePreview: a, isPreviewPending: i, loadPreview: l };
708
+ }), X(
709
+ t,
710
+ (S) => {
711
+ l.value = !!S, S || (g(), a.value = void 0, c.value = !1, i.value = !1);
712
+ },
713
+ { deep: !0, flush: "sync" }
714
+ ), b(), { invoicePreview: a, isPreviewPending: u, hasPreviewFailed: c, loadPreview: b };
709
715
  }
710
- const $o = { key: 0 }, ft = /* @__PURE__ */ z({
716
+ const Eo = { key: 0 }, vt = /* @__PURE__ */ z({
711
717
  __name: "TopUpInvoicePreview",
712
718
  props: {
713
719
  pricingPlanScheduleId: { type: String },
714
720
  pricingItems: { type: Array }
715
721
  },
716
722
  setup(e) {
717
- const t = e, { $t: o } = Q(), n = s(() => t.pricingPlanScheduleId), a = s(() => t.pricingItems), { invoicePreview: i } = xo({ pricingPlanScheduleId: n, pricingItems: a });
718
- return (u, l) => (w(), C(et, {
719
- class: "sv-top-up-invoice-preview h-[152px]",
720
- "data-testid": "top-up-invoice-preview-skeleton"
721
- }, {
722
- default: h(() => [
723
- r(i) ? (w(), W("div", $o, [
724
- A(r(Yt), { required: "" }, {
725
- default: h(() => [
726
- F(N(r(o)({
723
+ const t = e, { $t: o } = Q(), n = s(() => t.pricingPlanScheduleId), a = s(() => t.pricingItems), { invoicePreview: i } = $o({ pricingPlanScheduleId: n, pricingItems: a });
724
+ return (l, u) => (w(), C(et, { class: "sv-top-up-invoice-preview h-[152px]" }, {
725
+ default: _(() => [
726
+ r(i) ? (w(), W("div", Eo, [
727
+ A(r(Ht), { required: "" }, {
728
+ default: _(() => [
729
+ F(I(r(o)({
727
730
  defaultMessage: "You will pay",
728
731
  description: "Label above the preview of what topping up will be invoiced for",
729
732
  id: "topup_modal.invoice_preview.label"
@@ -731,8 +734,8 @@ const $o = { key: 0 }, ft = /* @__PURE__ */ z({
731
734
  ]),
732
735
  _: 1
733
736
  }),
734
- A(r(fe), { "content-background": "none" }, {
735
- default: h(() => [
737
+ A(r(ve), { "content-background": "none" }, {
738
+ default: _(() => [
736
739
  A(r(at), {
737
740
  invoice: r(i),
738
741
  "is-customer-facing": ""
@@ -745,56 +748,56 @@ const $o = { key: 0 }, ft = /* @__PURE__ */ z({
745
748
  _: 1
746
749
  }));
747
750
  }
748
- }), vt = (e, t) => e.currency ?? t ?? e.creditTypeId ?? "", Ve = (e, t) => ({
751
+ }), ft = (e, t) => e.currency ?? t ?? e.creditTypeId ?? "", qe = (e, t) => ({
749
752
  quantity: e ?? null,
750
753
  currency: t
751
754
  }), Ue = (e, { denomination: t, chargeCurrency: o, creditUnitName: n, minimumTopUp: a }) => {
752
- var i, u, l, p, y;
755
+ var i, l, u, c, g;
753
756
  return {
754
757
  enabled: (e == null ? void 0 : e.status) === "ACTIVE",
755
- threshold: Ve(
756
- ((u = (i = e == null ? void 0 : e.threshold) == null ? void 0 : i.amount) == null ? void 0 : u.quantity) ?? ((p = (l = e == null ? void 0 : e.threshold) == null ? void 0 : l.credits) == null ? void 0 : p.quantity),
757
- vt(t, n)
758
+ threshold: qe(
759
+ ((l = (i = e == null ? void 0 : e.threshold) == null ? void 0 : i.amount) == null ? void 0 : l.quantity) ?? ((c = (u = e == null ? void 0 : e.threshold) == null ? void 0 : u.credits) == null ? void 0 : c.quantity),
760
+ ft(t, n)
758
761
  ),
759
- topUpAmount: Ve(((y = e == null ? void 0 : e.topup_amount) == null ? void 0 : y.quantity) ?? a, o)
762
+ topUpAmount: qe(((g = e == null ? void 0 : e.topup_amount) == null ? void 0 : g.quantity) ?? a, o)
760
763
  };
761
- }, Eo = (e, t) => {
764
+ }, Oo = (e, t) => {
762
765
  var n;
763
766
  const o = (n = e.threshold) == null ? void 0 : n.quantity;
764
767
  return o ? t.creditTypeId ? { credits: { quantity: o, credit_type_id: t.creditTypeId } } : { amount: { quantity: o, currency: t.currency ?? "" } } : {};
765
- }, qe = (e, t) => {
768
+ }, Ve = (e, t) => {
766
769
  var o;
767
770
  return (o = e.topUpAmount) != null && o.quantity ? {
768
771
  quantity: e.topUpAmount.quantity,
769
772
  currency: e.topUpAmount.currency ?? t
770
773
  } : void 0;
771
- }, gt = (e, { denomination: t, chargeCurrency: o }) => ({
774
+ }, ht = (e, { denomination: t, chargeCurrency: o }) => ({
772
775
  status: e.enabled ? "ACTIVE" : "INACTIVE",
773
- threshold: Eo(e, t),
774
- ...qe(e, o) && {
775
- topup_amount: qe(e, o)
776
+ threshold: Oo(e, t),
777
+ ...Ve(e, o) && {
778
+ topup_amount: Ve(e, o)
776
779
  }
777
- }), Fe = (e, t) => gt(Ue(e, t), t), Le = (e, t) => JSON.stringify(e) === JSON.stringify(t), Ye = (e) => {
780
+ }), Fe = (e, t) => ht(Ue(e, t), t), Le = (e, t) => JSON.stringify(e) === JSON.stringify(t), Ye = (e) => {
778
781
  const t = Number(e == null ? void 0 : e.quantity);
779
782
  return e != null && e.quantity && Number.isFinite(t) ? t : void 0;
780
- }, Oo = (e, t) => {
783
+ }, Bo = (e, t) => {
781
784
  const o = Number(t == null ? void 0 : t.quantity);
782
785
  return e === null || !(t != null && t.quantity) || !Number.isFinite(o) || e >= o;
783
- }, Bo = (e, t) => {
786
+ }, Io = (e, t) => {
784
787
  const o = Number(t == null ? void 0 : t.quantity);
785
788
  return e === null || !(t != null && t.quantity) || !Number.isFinite(o) || e <= o;
786
- }, ve = (e) => {
789
+ }, fe = (e) => {
787
790
  const t = Number(e);
788
791
  return e != null && e !== "" && Number.isFinite(t) ? t : void 0;
789
792
  }, Be = (e, t, o) => {
790
- const n = ve(e), a = ve(o);
793
+ const n = fe(e), a = fe(o);
791
794
  if (!(n === void 0 || a === void 0 || a <= 0))
792
795
  return t === "CREDITS" ? n / a : n * a;
793
- }, He = (e, t, o, n) => t === o ? ve(e) : Be(e, t, n), Io = (e, t, o) => t === "CREDITS" ? Be(e, "AMOUNT", o) : ve(e), Ie = (e) => e.toFixed(2), We = (e, t) => t === "AMOUNT" ? Ie(e) : String(Number(e.toFixed(6))), ht = (e, t, o, n) => {
794
- const a = Io(e == null ? void 0 : e.quantity, t, o);
796
+ }, He = (e, t, o, n) => t === o ? fe(e) : Be(e, t, n), Do = (e, t, o) => t === "CREDITS" ? Be(e, "AMOUNT", o) : fe(e), Ie = (e) => e.toFixed(2), We = (e, t) => t === "AMOUNT" ? Ie(e) : String(Number(e.toFixed(6))), gt = (e, t, o, n) => {
797
+ const a = Do(e == null ? void 0 : e.quantity, t, o);
795
798
  if (a !== void 0)
796
799
  return t === "CREDITS" ? n(a) : Ie(a);
797
- }, Do = ["data-testid"], Se = /* @__PURE__ */ z({
800
+ }, Pe = /* @__PURE__ */ z({
798
801
  __name: "ConvertedAmountInput",
799
802
  props: /* @__PURE__ */ Ot({
800
803
  unit: { type: String },
@@ -816,92 +819,89 @@ const $o = { key: 0 }, ft = /* @__PURE__ */ z({
816
819
  }),
817
820
  emits: ["update:modelValue"],
818
821
  setup(e) {
819
- const t = e, o = $t(e, "modelValue"), { $t: n, formatNumber: a } = Q(), i = s(() => t.entryBase ?? t.modelBase), u = s(
820
- () => i.value !== t.modelBase && ve(t.conversionRate) !== void 0
821
- ), l = E("");
822
- ee(
822
+ const t = e, o = $t(e, "modelValue"), { $t: n, formatNumber: a } = Q(), i = s(() => t.entryBase ?? t.modelBase), l = s(
823
+ () => i.value !== t.modelBase && fe(t.conversionRate) !== void 0
824
+ ), u = $("");
825
+ X(
823
826
  () => [o.value, i.value, t.modelBase, t.conversionRate],
824
- ([f]) => {
825
- if (!u.value) {
826
- l.value = f ?? "";
827
+ ([p]) => {
828
+ if (!l.value) {
829
+ u.value = p ?? "";
827
830
  return;
828
831
  }
829
- if (f === y(l.value))
832
+ if (p === c(u.value))
830
833
  return;
831
834
  const P = He(
832
- f,
835
+ p,
833
836
  t.modelBase,
834
837
  i.value,
835
838
  t.conversionRate
836
839
  );
837
- l.value = P === void 0 ? "" : We(P, i.value);
840
+ u.value = P === void 0 ? "" : We(P, i.value);
838
841
  },
839
842
  { immediate: !0 }
840
843
  );
841
- function p(f) {
842
- return typeof f == "string" ? f : typeof f == "number" ? String(f) : "";
843
- }
844
- function y(f) {
845
- const P = He(f, i.value, t.modelBase, t.conversionRate);
844
+ function c(p) {
845
+ const P = He(p, i.value, t.modelBase, t.conversionRate);
846
846
  return P === void 0 ? "" : We(P, t.modelBase);
847
847
  }
848
- const T = s({
849
- get: () => l.value,
850
- set: (f) => {
851
- l.value = p(f), o.value = u.value ? y(l.value) : l.value;
848
+ const g = s({
849
+ get: () => u.value,
850
+ set: (p) => {
851
+ u.value = Vt(p), o.value = l.value ? c(u.value) : u.value;
852
852
  }
853
- }), x = s(
854
- () => Be(l.value, i.value, t.conversionRate)
855
- ), v = s(() => t.creditUnitName ? t.creditUnitName : i.value === "CREDITS" ? t.unit : n({
853
+ }), b = s(
854
+ () => Be(u.value, i.value, t.conversionRate)
855
+ ), S = s(() => t.creditUnitName ? t.creditUnitName : i.value === "CREDITS" ? t.unit : n({
856
856
  defaultMessage: "credits",
857
857
  description: "Generic name for a wallet credit, where its credit type does not name one",
858
858
  id: "converted_amount_input.credits"
859
- })), g = (f, P) => $e({ quantity: Ie(f), currency: P }), m = (f) => `${a(f)} ${v.value}`, U = s(() => {
860
- const f = t.error;
861
- return Array.isArray(f) ? f.length > 0 : !!(Et(f) ? f.value : f);
862
- }), I = s(() => {
863
- const f = x.value;
864
- if (!(U.value || !t.showConversionHint || f === void 0))
859
+ })), f = (p, P) => $e({ quantity: Ie(p), currency: P }), h = (p) => `${a(p)} ${S.value}`, v = s(() => {
860
+ const p = t.error;
861
+ return Array.isArray(p) ? p.length > 0 : !!(Et(p) ? p.value : p);
862
+ }), U = s(() => {
863
+ const p = b.value;
864
+ if (!(v.value || !t.showConversionHint || p === void 0))
865
865
  return i.value === "CREDITS" ? t.currency ? n(
866
866
  {
867
867
  defaultMessage: "Will cost {amount} excluding taxes",
868
868
  description: "Helper text under a credits field, naming what those credits cost in money",
869
869
  id: "converted_amount_input.cost"
870
870
  },
871
- { amount: g(f, t.currency) }
871
+ { amount: f(p, t.currency) }
872
872
  ) : void 0 : n(
873
873
  {
874
874
  defaultMessage: "Buys about {credits}",
875
875
  description: "Helper text under a money field, naming the credits that amount converts into",
876
876
  id: "converted_amount_input.buys"
877
877
  },
878
- { credits: m(f) }
878
+ { credits: h(p) }
879
879
  );
880
- }), G = (f) => ht(f, i.value, t.conversionRate, a), _ = s(
880
+ }), B = (p) => gt(p, i.value, t.conversionRate, a), J = s(
881
881
  () => {
882
- var f, P, O, D;
883
- return i.value === "CREDITS" ? v.value : ((P = (f = t.bounds) == null ? void 0 : f.minimum) == null ? void 0 : P.currency) ?? ((D = (O = t.bounds) == null ? void 0 : O.maximum) == null ? void 0 : D.currency) ?? t.unit;
882
+ var p, P, E, D;
883
+ return i.value === "CREDITS" ? S.value : ((P = (p = t.bounds) == null ? void 0 : p.minimum) == null ? void 0 : P.currency) ?? ((D = (E = t.bounds) == null ? void 0 : E.maximum) == null ? void 0 : D.currency) ?? t.unit;
884
884
  }
885
- ), S = s(() => {
886
- var D, b;
887
- const f = G((D = t.bounds) == null ? void 0 : D.minimum), P = G((b = t.bounds) == null ? void 0 : b.maximum), O = _.value;
888
- if (f && P)
885
+ ), y = s(() => {
886
+ var D, k;
887
+ const p = B((D = t.bounds) == null ? void 0 : D.minimum), P = B((k = t.bounds) == null ? void 0 : k.maximum), E = J.value;
888
+ if (p && P)
889
889
  return n(
890
890
  {
891
891
  defaultMessage: "Between {minimum} and {maximum} {unit}",
892
892
  description: "Range of what a flexible top-up may be charged for, beside its label",
893
893
  id: "converted_amount_input.bounds.range"
894
894
  },
895
- { minimum: f, maximum: P, unit: O }
895
+ { minimum: p, maximum: P, unit: E }
896
896
  );
897
- if (f)
897
+ if (p)
898
898
  return n(
899
899
  {
900
900
  defaultMessage: "At least {minimum} {unit}",
901
901
  description: "Smallest amount a flexible top-up may be charged for, beside its label",
902
902
  id: "converted_amount_input.bounds.minimum"
903
903
  },
904
- { minimum: f, unit: O }
904
+ { minimum: p, unit: E }
905
905
  );
906
906
  if (P)
907
907
  return n(
@@ -910,12 +910,12 @@ const $o = { key: 0 }, ft = /* @__PURE__ */ z({
910
910
  description: "Largest amount a flexible top-up may be charged for, beside its label",
911
911
  id: "converted_amount_input.bounds.maximum"
912
912
  },
913
- { maximum: P, unit: O }
913
+ { maximum: P, unit: E }
914
914
  );
915
915
  });
916
- return (f, P) => (w(), C(r(Wt), {
917
- modelValue: T.value,
918
- "onUpdate:modelValue": P[0] || (P[0] = (O) => T.value = O),
916
+ return (p, P) => (w(), C(r(jt), {
917
+ modelValue: g.value,
918
+ "onUpdate:modelValue": P[0] || (P[0] = (E) => g.value = E),
919
919
  class: "sv-converted-amount-input",
920
920
  type: "number",
921
921
  "as-text-type": "",
@@ -925,46 +925,42 @@ const $o = { key: 0 }, ft = /* @__PURE__ */ z({
925
925
  disabled: e.disabled,
926
926
  error: e.error
927
927
  }, re({
928
- suffix: h(() => [
929
- k("span", {
930
- "data-testid": `${e.name}-unit`
931
- }, N(e.unit), 9, Do)
928
+ suffix: _(() => [
929
+ N("span", null, I(e.unit), 1)
932
930
  ]),
933
931
  _: 2
934
932
  }, [
935
- S.value ? {
933
+ y.value ? {
936
934
  name: "label-suffix",
937
- fn: h(() => [
938
- A(r(X), {
935
+ fn: _(() => [
936
+ A(r(K), {
939
937
  tag: "span",
940
938
  variant: "body-xs",
941
939
  color: "subtle",
942
- "no-spacing": "",
943
- "data-testid": `${e.name}-bounds`
940
+ "no-spacing": ""
944
941
  }, {
945
- default: h(() => [
946
- F(N(S.value), 1)
942
+ default: _(() => [
943
+ F(I(y.value), 1)
947
944
  ]),
948
945
  _: 1
949
- }, 8, ["data-testid"])
946
+ })
950
947
  ]),
951
948
  key: "0"
952
949
  } : void 0,
953
- I.value ? {
950
+ U.value ? {
954
951
  name: "helper",
955
- fn: h(() => [
956
- A(r(X), {
952
+ fn: _(() => [
953
+ A(r(K), {
957
954
  tag: "span",
958
955
  variant: "body-xs",
959
956
  color: "subtle",
960
- "no-spacing": "",
961
- "data-testid": `${e.name}-conversion`
957
+ "no-spacing": ""
962
958
  }, {
963
- default: h(() => [
964
- F(N(I.value), 1)
959
+ default: _(() => [
960
+ F(I(U.value), 1)
965
961
  ]),
966
962
  _: 1
967
- }, 8, ["data-testid"])
963
+ })
968
964
  ]),
969
965
  key: "1"
970
966
  } : void 0
@@ -989,28 +985,28 @@ const $o = { key: 0 }, ft = /* @__PURE__ */ z({
989
985
  ].join(" "), n = s(
990
986
  () => [t.emphasized ? o : void 0, t.contentClasses].filter(Boolean).join(" ")
991
987
  ), a = s(() => {
992
- const { emphasized: i, ...u } = t;
993
- return u;
988
+ const { emphasized: i, ...l } = t;
989
+ return l;
994
990
  });
995
- return (i, u) => (w(), C(r(fe), le(a.value, {
991
+ return (i, l) => (w(), C(r(ve), le(a.value, {
996
992
  class: "sv-section",
997
993
  "content-classes": n.value
998
994
  }), re({
999
- default: h(() => [
995
+ default: _(() => [
1000
996
  se(i.$slots, "default")
1001
997
  ]),
1002
998
  _: 2
1003
999
  }, [
1004
1000
  i.$slots.right ? {
1005
1001
  name: "right",
1006
- fn: h(() => [
1002
+ fn: _(() => [
1007
1003
  se(i.$slots, "right")
1008
1004
  ]),
1009
1005
  key: "0"
1010
1006
  } : void 0
1011
1007
  ]), 1040, ["content-classes"]));
1012
1008
  }
1013
- }), ko = { class: "flex grow flex-col" }, _t = /* @__PURE__ */ z({
1009
+ }), Ro = { class: "flex grow flex-col" }, _t = /* @__PURE__ */ z({
1014
1010
  __name: "AutoTopUpConfig",
1015
1011
  props: {
1016
1012
  config: { type: Object },
@@ -1026,57 +1022,57 @@ const $o = { key: 0 }, ft = /* @__PURE__ */ z({
1026
1022
  },
1027
1023
  emits: ["save"],
1028
1024
  setup(e, { expose: t, emit: o }) {
1029
- const n = e, a = o, { $t: i, formatNumber: u } = Q(), l = s(() => {
1030
- var b, $;
1025
+ const n = e, a = o, { $t: i, formatNumber: l } = Q(), u = s(() => {
1026
+ var T, x;
1031
1027
  return {
1032
1028
  denomination: n.denomination,
1033
1029
  chargeCurrency: n.chargeCurrency,
1034
1030
  creditUnitName: n.creditUnitName,
1035
- minimumTopUp: ($ = (b = n.topUpBounds) == null ? void 0 : b.minimum) == null ? void 0 : $.quantity
1031
+ minimumTopUp: (x = (T = n.topUpBounds) == null ? void 0 : T.minimum) == null ? void 0 : x.quantity
1036
1032
  };
1037
- }), p = E(Ue(n.config, l.value)), y = s(() => vt(n.denomination, n.creditUnitName)), T = s(
1033
+ }), c = $(Ue(n.config, u.value)), g = s(() => ft(n.denomination, n.creditUnitName)), b = s(
1038
1034
  () => n.denomination.creditTypeId ? "CREDITS" : "AMOUNT"
1039
- ), x = s(
1040
- () => T.value === "CREDITS" ? y.value : n.chargeCurrency
1041
- ), v = s({
1035
+ ), S = s(
1036
+ () => b.value === "CREDITS" ? g.value : n.chargeCurrency
1037
+ ), f = s({
1042
1038
  get: () => {
1043
- var b;
1044
- return ((b = p.value.threshold) == null ? void 0 : b.quantity) ?? "";
1039
+ var T;
1040
+ return ((T = c.value.threshold) == null ? void 0 : T.quantity) ?? "";
1045
1041
  },
1046
- set: (b) => {
1047
- p.value.threshold = { quantity: b || null, currency: y.value };
1042
+ set: (T) => {
1043
+ c.value.threshold = { quantity: T || null, currency: g.value };
1048
1044
  }
1049
- }), g = s({
1045
+ }), h = s({
1050
1046
  get: () => {
1051
- var b;
1052
- return ((b = p.value.topUpAmount) == null ? void 0 : b.quantity) ?? "";
1047
+ var T;
1048
+ return ((T = c.value.topUpAmount) == null ? void 0 : T.quantity) ?? "";
1053
1049
  },
1054
- set: (b) => {
1055
- p.value.topUpAmount = { quantity: b || null, currency: n.chargeCurrency };
1050
+ set: (T) => {
1051
+ c.value.topUpAmount = { quantity: T || null, currency: n.chargeCurrency };
1056
1052
  }
1057
1053
  });
1058
- ee(
1059
- () => [n.config, l.value],
1060
- ([b, $]) => {
1061
- Le(Fe(b, $), I()) || (p.value = Ue(b, $));
1054
+ X(
1055
+ () => [n.config, u.value],
1056
+ ([T, x]) => {
1057
+ Le(Fe(T, x), B()) || (c.value = Ue(T, x));
1062
1058
  }
1063
1059
  );
1064
- const m = s({
1065
- get: () => n.alwaysEnabled || p.value.enabled,
1066
- set: (b) => {
1067
- p.value.enabled = b;
1060
+ const v = s({
1061
+ get: () => n.alwaysEnabled || c.value.enabled,
1062
+ set: (T) => {
1063
+ c.value.enabled = T;
1068
1064
  }
1069
1065
  }), U = s(
1070
- () => gt({ ...p.value, enabled: m.value }, l.value)
1071
- ), I = () => U.value, G = Ae({
1072
- threshold: s(() => Ye(p.value.threshold) ?? null),
1073
- topUpAmount: s(() => Ye(p.value.topUpAmount) ?? null)
1074
- }), _ = (b) => {
1075
- if (!b)
1066
+ () => ht({ ...c.value, enabled: v.value }, u.value)
1067
+ ), B = () => U.value, J = Ae({
1068
+ threshold: s(() => Ye(c.value.threshold) ?? null),
1069
+ topUpAmount: s(() => Ye(c.value.topUpAmount) ?? null)
1070
+ }), y = (T) => {
1071
+ if (!T)
1076
1072
  return "";
1077
- const $ = ht(b, T.value, n.conversionRate, u);
1078
- return $ === void 0 ? $e(b) : `${$} ${x.value}`;
1079
- }, S = Ft(() => m.value), f = xe(
1073
+ const x = gt(T, b.value, n.conversionRate, l);
1074
+ return x === void 0 ? $e(T) : `${x} ${S.value}`;
1075
+ }, p = Lt(() => v.value), P = xe(
1080
1076
  {
1081
1077
  threshold: {
1082
1078
  required: ie.withMessage(
@@ -1085,7 +1081,7 @@ const $o = { key: 0 }, ft = /* @__PURE__ */ z({
1085
1081
  description: "Error shown under the auto top-up threshold when it is left empty",
1086
1082
  id: "auto_topup_config.threshold.required"
1087
1083
  }),
1088
- S
1084
+ p
1089
1085
  ),
1090
1086
  notNegative: ie.withMessage(
1091
1087
  () => i({
@@ -1093,7 +1089,7 @@ const $o = { key: 0 }, ft = /* @__PURE__ */ z({
1093
1089
  description: "Error shown under the auto top-up threshold when it is below zero",
1094
1090
  id: "auto_topup_config.threshold.not_negative"
1095
1091
  }),
1096
- (b) => b === null || b >= 0
1092
+ (T) => T === null || T >= 0
1097
1093
  )
1098
1094
  },
1099
1095
  topUpAmount: {
@@ -1103,7 +1099,7 @@ const $o = { key: 0 }, ft = /* @__PURE__ */ z({
1103
1099
  description: "Error shown under the auto top-up amount when it is left empty",
1104
1100
  id: "auto_topup_config.amount.required"
1105
1101
  }),
1106
- S
1102
+ p
1107
1103
  ),
1108
1104
  positive: ie.withMessage(
1109
1105
  () => i({
@@ -1111,88 +1107,88 @@ const $o = { key: 0 }, ft = /* @__PURE__ */ z({
1111
1107
  description: "Error shown under the auto top-up amount when it is zero or negative",
1112
1108
  id: "auto_topup_config.amount.positive"
1113
1109
  }),
1114
- (b) => b === null || b > 0
1110
+ (T) => T === null || T > 0
1115
1111
  ),
1116
1112
  atLeastMinimum: ie.withMessage(
1117
1113
  () => {
1118
- var b;
1114
+ var T;
1119
1115
  return i(
1120
1116
  {
1121
1117
  defaultMessage: "Top up with at least {minimum}.",
1122
1118
  description: "Error shown under the auto top-up amount when it is below what the pricing allows",
1123
1119
  id: "auto_topup_config.amount.at_least_minimum"
1124
1120
  },
1125
- { minimum: _((b = n.topUpBounds) == null ? void 0 : b.minimum) }
1121
+ { minimum: y((T = n.topUpBounds) == null ? void 0 : T.minimum) }
1126
1122
  );
1127
1123
  },
1128
- (b) => {
1129
- var $;
1130
- return Oo(b, ($ = n.topUpBounds) == null ? void 0 : $.minimum);
1124
+ (T) => {
1125
+ var x;
1126
+ return Bo(T, (x = n.topUpBounds) == null ? void 0 : x.minimum);
1131
1127
  }
1132
1128
  ),
1133
1129
  withinMaximum: ie.withMessage(
1134
1130
  () => {
1135
- var b;
1131
+ var T;
1136
1132
  return i(
1137
1133
  {
1138
1134
  defaultMessage: "Top up with at most {maximum}.",
1139
1135
  description: "Error shown under the auto top-up amount when it is above what the pricing allows",
1140
1136
  id: "auto_topup_config.amount.within_maximum"
1141
1137
  },
1142
- { maximum: _((b = n.topUpBounds) == null ? void 0 : b.maximum) }
1138
+ { maximum: y((T = n.topUpBounds) == null ? void 0 : T.maximum) }
1143
1139
  );
1144
1140
  },
1145
- (b) => {
1146
- var $;
1147
- return Bo(b, ($ = n.topUpBounds) == null ? void 0 : $.maximum);
1141
+ (T) => {
1142
+ var x;
1143
+ return Io(T, (x = n.topUpBounds) == null ? void 0 : x.maximum);
1148
1144
  }
1149
1145
  )
1150
1146
  }
1151
1147
  },
1152
- G
1153
- ), P = s(
1148
+ J
1149
+ ), E = s(
1154
1150
  () => !Le(
1155
- I(),
1156
- Fe(n.config, l.value)
1151
+ B(),
1152
+ Fe(n.config, u.value)
1157
1153
  )
1158
1154
  );
1159
- function O() {
1160
- return f.value.$touch(), f.value.$invalid ? void 0 : I();
1161
- }
1162
1155
  function D() {
1163
- const b = O();
1164
- b && a("save", b);
1156
+ return P.value.$touch(), P.value.$invalid ? void 0 : B();
1157
+ }
1158
+ function k() {
1159
+ const T = D();
1160
+ T && a("save", T);
1165
1161
  }
1166
1162
  return t({
1167
- submit: D,
1168
- validate: O,
1163
+ submit: k,
1164
+ validate: D,
1169
1165
  rule: U,
1170
- hasChanges: P,
1171
- isInvalid: s(() => f.value.$invalid)
1172
- }), (b, $) => (w(), C(No, {
1166
+ hasChanges: E,
1167
+ isInvalid: s(() => P.value.$invalid)
1168
+ }), (T, x) => (w(), C(No, {
1173
1169
  class: "sv-auto-topup-config",
1174
1170
  "content-background": e.contained ? "gray" : "none",
1175
1171
  "no-spacing": !e.contained,
1176
1172
  "no-border": !e.contained
1177
1173
  }, {
1178
- default: h(() => [
1179
- e.alwaysEnabled ? R("", !0) : (w(), C(r(qt), {
1174
+ default: _(() => [
1175
+ e.alwaysEnabled ? R("", !0) : (w(), C(r(Ft), {
1180
1176
  key: 0,
1181
- modelValue: m.value,
1182
- "onUpdate:modelValue": $[0] || ($[0] = (K) => m.value = K),
1177
+ modelValue: v.value,
1178
+ "onUpdate:modelValue": x[0] || (x[0] = (G) => v.value = G),
1183
1179
  "no-spacing": "",
1184
1180
  "label-position": "before",
1185
1181
  class: "!flex",
1186
1182
  disabled: e.disabled
1187
1183
  }, {
1188
- "inline-label": h(() => [
1189
- k("div", ko, [
1190
- A(r(X), {
1184
+ "inline-label": _(() => [
1185
+ N("div", Ro, [
1186
+ A(r(K), {
1191
1187
  tag: "span",
1192
1188
  variant: "body-sm"
1193
1189
  }, {
1194
- default: h(() => [
1195
- F(N(r(i)({
1190
+ default: _(() => [
1191
+ F(I(r(i)({
1196
1192
  defaultMessage: "Auto top-up",
1197
1193
  description: "Title of the automatic wallet top-up settings",
1198
1194
  id: "auto_topup_config.title"
@@ -1200,13 +1196,13 @@ const $o = { key: 0 }, ft = /* @__PURE__ */ z({
1200
1196
  ]),
1201
1197
  _: 1
1202
1198
  }),
1203
- A(r(X), {
1199
+ A(r(K), {
1204
1200
  tag: "span",
1205
1201
  variant: "body-xs",
1206
1202
  color: "subtle"
1207
1203
  }, {
1208
- default: h(() => [
1209
- F(N(r(i)({
1204
+ default: _(() => [
1205
+ F(I(r(i)({
1210
1206
  defaultMessage: "Automatically top up your balance when it runs low.",
1211
1207
  description: "Subtitle of the automatic wallet top-up settings",
1212
1208
  id: "auto_topup_config.subtitle"
@@ -1218,38 +1214,38 @@ const $o = { key: 0 }, ft = /* @__PURE__ */ z({
1218
1214
  ]),
1219
1215
  _: 1
1220
1216
  }, 8, ["modelValue", "disabled"])),
1221
- A(r(nt), { "is-open": m.value }, {
1222
- default: h(() => [
1223
- m.value ? (w(), W("div", {
1217
+ A(r(nt), { "is-open": v.value }, {
1218
+ default: _(() => [
1219
+ v.value ? (w(), W("div", {
1224
1220
  key: 0,
1225
1221
  class: ze(["grid grid-cols-1 gap-3", { "mt-4": !e.alwaysEnabled }])
1226
1222
  }, [
1227
- A(Se, {
1228
- modelValue: v.value,
1229
- "onUpdate:modelValue": $[1] || ($[1] = (K) => v.value = K),
1223
+ A(Pe, {
1224
+ modelValue: f.value,
1225
+ "onUpdate:modelValue": x[1] || (x[1] = (G) => f.value = G),
1230
1226
  name: "auto-top-up-threshold",
1231
- unit: y.value,
1232
- "model-base": T.value,
1233
- "entry-base": T.value,
1227
+ unit: g.value,
1228
+ "model-base": b.value,
1229
+ "entry-base": b.value,
1234
1230
  currency: e.chargeCurrency,
1235
1231
  "conversion-rate": e.conversionRate,
1236
1232
  "show-conversion-hint": e.showThresholdConversion,
1237
1233
  required: "",
1238
1234
  disabled: e.disabled,
1239
- error: r(f).threshold.$errors,
1235
+ error: r(P).threshold.$errors,
1240
1236
  label: r(i)({
1241
1237
  defaultMessage: "When your balance falls below",
1242
1238
  description: "Label of the balance at which an automatic top-up is charged",
1243
1239
  id: "auto_topup_config.threshold.label"
1244
1240
  })
1245
1241
  }, null, 8, ["modelValue", "unit", "model-base", "entry-base", "currency", "conversion-rate", "show-conversion-hint", "disabled", "error", "label"]),
1246
- A(Se, {
1247
- modelValue: g.value,
1248
- "onUpdate:modelValue": $[2] || ($[2] = (K) => g.value = K),
1242
+ A(Pe, {
1243
+ modelValue: h.value,
1244
+ "onUpdate:modelValue": x[2] || (x[2] = (G) => h.value = G),
1249
1245
  name: "auto-top-up-amount",
1250
- unit: x.value,
1246
+ unit: S.value,
1251
1247
  "model-base": "AMOUNT",
1252
- "entry-base": T.value,
1248
+ "entry-base": b.value,
1253
1249
  currency: e.chargeCurrency,
1254
1250
  "credit-unit-name": e.creditUnitName,
1255
1251
  "conversion-rate": e.conversionRate,
@@ -1257,7 +1253,7 @@ const $o = { key: 0 }, ft = /* @__PURE__ */ z({
1257
1253
  "show-conversion-hint": "",
1258
1254
  required: "",
1259
1255
  disabled: e.disabled,
1260
- error: r(f).topUpAmount.$errors,
1256
+ error: r(P).topUpAmount.$errors,
1261
1257
  label: r(i)({
1262
1258
  defaultMessage: "Top-up with",
1263
1259
  description: "Label of the amount every automatic top-up adds",
@@ -1286,23 +1282,23 @@ function yt({
1286
1282
  (a, i) => je(i.created_at) - je(a.created_at)
1287
1283
  )
1288
1284
  );
1289
- return ee(
1285
+ return X(
1290
1286
  () => [
1291
1287
  e.value,
1292
1288
  o == null ? void 0 : o.value,
1293
1289
  t.value
1294
1290
  ],
1295
- ([a, i, u], l) => {
1296
- var x;
1297
- const p = l == null ? void 0 : l[0], y = a == null ? void 0 : a.find(
1298
- ({ id: v }) => !(p != null && p.some((g) => g.id === v))
1291
+ ([a, i, l], u) => {
1292
+ var S;
1293
+ const c = u == null ? void 0 : u[0], g = a == null ? void 0 : a.find(
1294
+ ({ id: f }) => !(c != null && c.some((h) => h.id === f))
1299
1295
  );
1300
- if (y && (p != null && p.length)) {
1301
- t.value = y.id;
1296
+ if (g && (c != null && c.length)) {
1297
+ t.value = g.id;
1302
1298
  return;
1303
1299
  }
1304
- const T = (v) => !!v && !!(a != null && a.some((g) => g.id === v));
1305
- T(u) || (t.value = T(i) ? i : (x = (a == null ? void 0 : a.find(({ is_default: v }) => v)) ?? n.value[0]) == null ? void 0 : x.id);
1300
+ const b = (f) => !!f && !!(a != null && a.some((h) => h.id === f));
1301
+ b(l) || (t.value = b(i) ? i : (S = (a == null ? void 0 : a.find(({ is_default: f }) => f)) ?? n.value[0]) == null ? void 0 : S.id);
1306
1302
  },
1307
1303
  { immediate: !0 }
1308
1304
  ), { sortedPaymentMethods: n };
@@ -1311,7 +1307,7 @@ function ye() {
1311
1307
  const { $t: e, formatNumber: t } = Q(), o = (a) => Ce(e, t, a);
1312
1308
  return { formatValue: o, formatOpenBalance: (a) => o(a == null ? void 0 : a.wallet_balance.open_balance) };
1313
1309
  }
1314
- const Ro = { class: "sv-top-up-form" }, Vo = { class: "grid grid-cols-1 gap-4" }, qo = { class: "grid grid-cols-1 gap-1" }, Fo = { class: "sv-top-up-form__option-details" }, Lo = { key: 0 }, Yo = /* @__PURE__ */ z({
1310
+ const ko = { class: "sv-top-up-form" }, qo = { class: "grid grid-cols-1 gap-4" }, Vo = { class: "grid grid-cols-1 gap-1" }, Fo = { class: "sv-top-up-form__option-details" }, Lo = { key: 0 }, Yo = /* @__PURE__ */ z({
1315
1311
  __name: "TopUpModalForm",
1316
1312
  props: {
1317
1313
  topUpPricingItems: { type: null },
@@ -1321,121 +1317,121 @@ const Ro = { class: "sv-top-up-form" }, Vo = { class: "grid grid-cols-1 gap-4" }
1321
1317
  },
1322
1318
  emits: ["add-payment-method", "success", "save-auto-top-up", "failure"],
1323
1319
  setup(e, { expose: t, emit: o }) {
1324
- const n = e, a = o, { $t: i } = Q(), { formatValue: u } = ye(), l = E({
1320
+ const n = e, a = o, { $t: i } = Q(), { formatValue: l } = ye(), u = $({
1325
1321
  pricing_plan_schedule_id: "",
1326
1322
  pricing_items: [],
1327
1323
  start_at: "",
1328
1324
  finalize_immediately: !1,
1329
1325
  payment_method_id: void 0,
1330
1326
  preview: !0
1331
- }), p = s(() => {
1327
+ }), c = s(() => {
1332
1328
  const d = (n.topUpPricingItems ?? []).filter(
1333
- (c) => c.flexiblePricing || c.fixedPricing
1329
+ (m) => m.flexiblePricing || m.fixedPricing
1334
1330
  );
1335
1331
  return [
1336
- ...d.filter(({ flexiblePricing: c }) => c),
1337
- ...d.filter(({ flexiblePricing: c }) => !c)
1332
+ ...d.filter(({ flexiblePricing: m }) => m),
1333
+ ...d.filter(({ flexiblePricing: m }) => !m)
1338
1334
  ];
1339
- }), y = (d) => p.value.find((c) => c.pricingItemId === d), T = s(
1335
+ }), g = (d) => c.value.find((m) => m.pricingItemId === d), b = s(
1340
1336
  () => {
1341
- var d, c;
1342
- return (c = (d = n.topUpPricingItems) == null ? void 0 : d.find((M) => M.pricingPlanScheduleId)) == null ? void 0 : c.pricingPlanScheduleId;
1337
+ var d, m;
1338
+ return (m = (d = n.topUpPricingItems) == null ? void 0 : d.find((M) => M.pricingPlanScheduleId)) == null ? void 0 : m.pricingPlanScheduleId;
1343
1339
  }
1344
1340
  );
1345
- ee(
1346
- T,
1341
+ X(
1342
+ b,
1347
1343
  (d) => {
1348
- l.value.pricing_plan_schedule_id = d ?? "";
1344
+ u.value.pricing_plan_schedule_id = d ?? "";
1349
1345
  },
1350
1346
  { immediate: !0 }
1351
1347
  );
1352
- const x = (d) => {
1353
- const { config: c, currency: M } = d.flexiblePricing ?? {}, V = c == null ? void 0 : c.minimum_amount;
1354
- return V && M ? { quantity: V.quantity, currency: M } : void 0;
1355
- }, v = s({
1348
+ const S = (d) => {
1349
+ const { config: m, currency: M } = d.flexiblePricing ?? {}, q = m == null ? void 0 : m.minimum_amount;
1350
+ return q && M ? { quantity: q.quantity, currency: M } : void 0;
1351
+ }, f = s({
1356
1352
  get: () => {
1357
1353
  var d;
1358
- return (d = l.value.pricing_items[0]) == null ? void 0 : d.pricing_item_id;
1354
+ return (d = u.value.pricing_items[0]) == null ? void 0 : d.pricing_item_id;
1359
1355
  },
1360
1356
  set: (d) => {
1361
- const c = y(typeof d == "string" ? d : void 0);
1362
- if (!c) {
1363
- l.value.pricing_items = [];
1357
+ const m = g(typeof d == "string" ? d : void 0);
1358
+ if (!m) {
1359
+ u.value.pricing_items = [];
1364
1360
  return;
1365
1361
  }
1366
- const M = x(c);
1367
- l.value.pricing_items = [
1362
+ const M = S(m);
1363
+ u.value.pricing_items = [
1368
1364
  {
1369
- pricing_item_id: c.pricingItemId,
1365
+ pricing_item_id: m.pricingItemId,
1370
1366
  ...M && { flexible_amount: M }
1371
1367
  }
1372
1368
  ];
1373
1369
  }
1374
1370
  });
1375
- ee(
1376
- p,
1371
+ X(
1372
+ c,
1377
1373
  (d) => {
1378
1374
  if (d.some(
1379
- ({ pricingItemId: V }) => {
1375
+ ({ pricingItemId: q }) => {
1380
1376
  var Y;
1381
- return V === ((Y = l.value.pricing_items[0]) == null ? void 0 : Y.pricing_item_id);
1377
+ return q === ((Y = u.value.pricing_items[0]) == null ? void 0 : Y.pricing_item_id);
1382
1378
  }
1383
1379
  ))
1384
1380
  return;
1385
- const M = d.find(({ flexiblePricing: V }) => V) ?? d[0];
1386
- v.value = M == null ? void 0 : M.pricingItemId;
1381
+ const M = d.find(({ flexiblePricing: q }) => q) ?? d[0];
1382
+ f.value = M == null ? void 0 : M.pricingItemId;
1387
1383
  },
1388
1384
  { immediate: !0 }
1389
1385
  );
1390
- const g = s({
1386
+ const h = s({
1391
1387
  get: () => {
1392
1388
  var d;
1393
- return (d = l.value.pricing_items[0]) == null ? void 0 : d.flexible_amount;
1389
+ return (d = u.value.pricing_items[0]) == null ? void 0 : d.flexible_amount;
1394
1390
  },
1395
1391
  set: (d) => {
1396
1392
  var M;
1397
- const c = (M = l.value.pricing_items[0]) == null ? void 0 : M.pricing_item_id;
1398
- c && (l.value.pricing_items = [
1399
- { pricing_item_id: c, ...d && { flexible_amount: d } }
1393
+ const m = (M = u.value.pricing_items[0]) == null ? void 0 : M.pricing_item_id;
1394
+ m && (u.value.pricing_items = [
1395
+ { pricing_item_id: m, ...d && { flexible_amount: d } }
1400
1396
  ]);
1401
1397
  }
1402
- }), m = (d) => {
1398
+ }), v = (d) => {
1403
1399
  var M;
1404
- const c = (M = y(String(d))) == null ? void 0 : M.fixedPricing;
1405
- return c != null && c.value.credits ? $e(c.amount) : void 0;
1400
+ const m = (M = g(String(d))) == null ? void 0 : M.fixedPricing;
1401
+ return m != null && m.value.credits ? $e(m.amount) : void 0;
1406
1402
  }, U = s(
1407
1403
  () => {
1408
1404
  var d;
1409
- return (d = y(String(v.value))) == null ? void 0 : d.flexiblePricing;
1405
+ return (d = g(String(f.value))) == null ? void 0 : d.flexiblePricing;
1410
1406
  }
1411
- ), I = s({
1407
+ ), B = s({
1412
1408
  get: () => {
1413
1409
  var d;
1414
- return ((d = g.value) == null ? void 0 : d.quantity) ?? "";
1410
+ return ((d = h.value) == null ? void 0 : d.quantity) ?? "";
1415
1411
  },
1416
1412
  set: (d) => {
1417
1413
  var M;
1418
- const c = (M = U.value) == null ? void 0 : M.currency;
1419
- g.value = d && c ? { quantity: d, currency: c } : void 0;
1414
+ const m = (M = U.value) == null ? void 0 : M.currency;
1415
+ h.value = d && m ? { quantity: d, currency: m } : void 0;
1420
1416
  }
1421
- }), G = (d) => d.creditsConfiguration ? "CREDITS" : "AMOUNT", _ = s(() => pt(n.topUpPricingItems)), S = (d) => d.creditsConfiguration ? _.value ?? d.creditsConfiguration.unitNamePlural ?? d.creditsConfiguration.unitNameSingle ?? "" : d.currency, f = (d) => {
1417
+ }), J = (d) => d.creditsConfiguration ? "CREDITS" : "AMOUNT", y = s(() => pt(n.topUpPricingItems)), p = (d) => d.creditsConfiguration ? y.value ?? d.creditsConfiguration.unitNamePlural ?? d.creditsConfiguration.unitNameSingle ?? "" : d.currency, P = (d) => {
1422
1418
  var M;
1423
- const c = (M = y(String(d))) == null ? void 0 : M.flexiblePricing;
1424
- return c ? [c] : [];
1425
- }, P = (d) => {
1426
- var c;
1427
- return !!((c = y(String(d))) != null && c.flexiblePricing);
1428
- }, O = s(
1429
- () => p.value.map((d) => {
1430
- var c;
1419
+ const m = (M = g(String(d))) == null ? void 0 : M.flexiblePricing;
1420
+ return m ? [m] : [];
1421
+ }, E = (d) => {
1422
+ var m;
1423
+ return !!((m = g(String(d))) != null && m.flexiblePricing);
1424
+ }, D = s(
1425
+ () => c.value.map((d) => {
1426
+ var m;
1431
1427
  return {
1432
1428
  value: d.pricingItemId,
1433
- label: d.fixedPricing ? u(d.fixedPricing.value) : i({
1429
+ label: d.fixedPricing ? l(d.fixedPricing.value) : i({
1434
1430
  defaultMessage: "Choose your own amount",
1435
1431
  description: "Label of the choose-your-amount option in the top-up modal",
1436
1432
  id: "topup_modal.flexible_option.label"
1437
1433
  }),
1438
- ...((c = d.flexiblePricing) == null ? void 0 : c.bounds.minimum) && d.flexiblePricing.bounds.maximum && {
1434
+ ...((m = d.flexiblePricing) == null ? void 0 : m.bounds.minimum) && d.flexiblePricing.bounds.maximum && {
1439
1435
  description: i(
1440
1436
  {
1441
1437
  defaultMessage: "Between {minimum} and {maximum}",
@@ -1443,25 +1439,25 @@ const Ro = { class: "sv-top-up-form" }, Vo = { class: "grid grid-cols-1 gap-4" }
1443
1439
  id: "topup_modal.flexible_option.bounds"
1444
1440
  },
1445
1441
  {
1446
- minimum: u(d.flexiblePricing.bounds.minimum),
1447
- maximum: u(d.flexiblePricing.bounds.maximum)
1442
+ minimum: l(d.flexiblePricing.bounds.minimum),
1443
+ maximum: l(d.flexiblePricing.bounds.maximum)
1448
1444
  }
1449
1445
  )
1450
1446
  }
1451
1447
  };
1452
1448
  })
1453
- ), D = s(() => {
1454
- const d = l.value.pricing_items.filter(
1455
- (c) => {
1449
+ ), k = s(() => {
1450
+ const d = u.value.pricing_items.filter(
1451
+ (m) => {
1456
1452
  var M;
1457
- return !((M = y(c.pricing_item_id)) != null && M.flexiblePricing) || !!c.flexible_amount;
1453
+ return !((M = g(m.pricing_item_id)) != null && M.flexiblePricing) || !!m.flexible_amount;
1458
1454
  }
1459
1455
  );
1460
1456
  return d.length > 0 ? d : void 0;
1461
- }), b = s(() => !n.autoTopUpConfig && p.value.some(({ flexiblePricing: c }) => c) ? mt(n.topUpPricingItems) : void 0), $ = E(), { chargeOnDemandPricingItems: K } = it(), de = _e(), J = E(!1), te = s(
1462
- () => !!l.value.pricing_plan_schedule_id && !!D.value && !!l.value.payment_method_id
1457
+ }), T = s(() => !n.autoTopUpConfig && c.value.some(({ flexiblePricing: m }) => m) ? mt(n.topUpPricingItems) : void 0), x = $(), { chargeOnDemandPricingItems: G } = it(), de = _e(), Z = $(!1), te = s(
1458
+ () => !!u.value.pricing_plan_schedule_id && !!k.value && !!u.value.payment_method_id
1463
1459
  ), ce = Ae({
1464
- paymentMethodId: s(() => l.value.payment_method_id ?? null)
1460
+ paymentMethodId: s(() => u.value.payment_method_id ?? null)
1465
1461
  }), ne = xe(
1466
1462
  {
1467
1463
  paymentMethodId: {
@@ -1477,56 +1473,56 @@ const Ro = { class: "sv-top-up-form" }, Vo = { class: "grid grid-cols-1 gap-4" }
1477
1473
  },
1478
1474
  ce
1479
1475
  ), oe = s(() => {
1480
- const [d] = l.value.pricing_items, c = y(d == null ? void 0 : d.pricing_item_id);
1481
- return c ? Ao(c, d == null ? void 0 : d.flexible_amount) : void 0;
1476
+ const [d] = u.value.pricing_items, m = g(d == null ? void 0 : d.pricing_item_id);
1477
+ return m ? Co(m, d == null ? void 0 : d.flexible_amount) : void 0;
1482
1478
  });
1483
1479
  async function pe() {
1484
- var c, M, V;
1480
+ var m, M, q;
1485
1481
  ne.value.$touch();
1486
- const d = (c = $.value) == null ? void 0 : c.validate();
1487
- if (!(ne.value.$invalid || (M = $.value) != null && M.isInvalid || !te.value || J.value)) {
1488
- J.value = !0;
1482
+ const d = (m = x.value) == null ? void 0 : m.validate();
1483
+ if (!(ne.value.$invalid || (M = x.value) != null && M.isInvalid || !te.value || Z.value)) {
1484
+ Z.value = !0;
1489
1485
  try {
1490
- const Y = await K({
1491
- pricing_plan_schedule_id: l.value.pricing_plan_schedule_id,
1492
- pricing_items: D.value ?? [],
1493
- payment_method_id: l.value.payment_method_id,
1486
+ const Y = await G({
1487
+ pricing_plan_schedule_id: u.value.pricing_plan_schedule_id,
1488
+ pricing_items: k.value ?? [],
1489
+ payment_method_id: u.value.payment_method_id,
1494
1490
  preview: !1
1495
1491
  });
1496
- d && ((V = $.value) != null && V.hasChanges) && l.value.payment_method_id && a("save-auto-top-up", {
1492
+ d && ((q = x.value) != null && q.hasChanges) && u.value.payment_method_id && a("save-auto-top-up", {
1497
1493
  rule: d,
1498
- paymentMethodId: l.value.payment_method_id
1494
+ paymentMethodId: u.value.payment_method_id
1499
1495
  }), a("success", Y);
1500
1496
  } catch (Y) {
1501
1497
  de.error("TOP_UP_FAILED", "Failed to charge the wallet top-up", {}, Y), a("failure", Y);
1502
1498
  } finally {
1503
- J.value = !1;
1499
+ Z.value = !1;
1504
1500
  }
1505
1501
  }
1506
1502
  }
1507
- t({ submit: pe, isCharging: J, canSubmit: te, chargedValue: oe });
1503
+ t({ submit: pe, isCharging: Z, canSubmit: te, chargedValue: oe });
1508
1504
  const ae = s({
1509
- get: () => l.value.payment_method_id ?? void 0,
1505
+ get: () => u.value.payment_method_id ?? void 0,
1510
1506
  set: (d) => {
1511
- l.value.payment_method_id = d;
1507
+ u.value.payment_method_id = d;
1512
1508
  }
1513
1509
  }), { sortedPaymentMethods: me } = yt({
1514
1510
  paymentMethods: s(() => n.paymentMethods),
1515
1511
  selectedPaymentMethodId: ae
1516
1512
  });
1517
- return (d, c) => (w(), W("form", Ro, [
1518
- k("div", Vo, [
1519
- k("div", qo, [
1520
- O.value.length > 0 ? (w(), C(r(tt), {
1513
+ return (d, m) => (w(), W("form", ko, [
1514
+ N("div", qo, [
1515
+ N("div", Vo, [
1516
+ D.value.length > 0 ? (w(), C(r(tt), {
1521
1517
  key: 0,
1522
- modelValue: v.value,
1523
- "onUpdate:modelValue": c[3] || (c[3] = (M) => v.value = M),
1518
+ modelValue: f.value,
1519
+ "onUpdate:modelValue": m[3] || (m[3] = (M) => f.value = M),
1524
1520
  class: "sv-top-up-form__options",
1525
1521
  name: "top-up-pricing-item",
1526
1522
  direction: "column",
1527
1523
  required: "",
1528
- disabled: J.value,
1529
- options: O.value,
1524
+ disabled: Z.value,
1525
+ options: D.value,
1530
1526
  "show-radio": !1,
1531
1527
  label: r(i)({
1532
1528
  defaultMessage: "Top up amount",
@@ -1534,9 +1530,9 @@ const Ro = { class: "sv-top-up-form" }, Vo = { class: "grid grid-cols-1 gap-4" }
1534
1530
  id: "topup_modal.pricing_items.label"
1535
1531
  })
1536
1532
  }, {
1537
- label: h(({ option: M, optionValue: V }) => [
1538
- k("span", null, N(M.label), 1),
1539
- m(V) ? (w(), C(r(X), {
1533
+ label: _(({ option: M, optionValue: q }) => [
1534
+ N("span", null, I(M.label), 1),
1535
+ v(q) ? (w(), C(r(K), {
1540
1536
  key: 0,
1541
1537
  tag: "span",
1542
1538
  variant: "body-sm",
@@ -1545,65 +1541,65 @@ const Ro = { class: "sv-top-up-form" }, Vo = { class: "grid grid-cols-1 gap-4" }
1545
1541
  "no-spacing": "",
1546
1542
  class: "sv-top-up-form__option-cost"
1547
1543
  }, {
1548
- default: h(() => [
1549
- F(N(m(V)), 1)
1544
+ default: _(() => [
1545
+ F(I(v(q)), 1)
1550
1546
  ]),
1551
1547
  _: 2
1552
1548
  }, 1024)) : R("", !0)
1553
1549
  ]),
1554
- description: h(({ option: M, optionValue: V }) => [
1555
- k("div", Fo, [
1556
- M.description && !P(V) ? (w(), C(r(X), {
1550
+ description: _(({ option: M, optionValue: q }) => [
1551
+ N("div", Fo, [
1552
+ M.description && !E(q) ? (w(), C(r(K), {
1557
1553
  key: 0,
1558
1554
  tag: "span",
1559
1555
  variant: "body-xs",
1560
1556
  color: "subtle",
1561
1557
  "no-spacing": ""
1562
1558
  }, {
1563
- default: h(() => [
1564
- F(N(M.description), 1)
1559
+ default: _(() => [
1560
+ F(I(M.description), 1)
1565
1561
  ]),
1566
1562
  _: 2
1567
1563
  }, 1024)) : R("", !0),
1568
- f(V).length > 0 ? (w(), C(r(nt), {
1564
+ P(q).length > 0 ? (w(), C(r(nt), {
1569
1565
  key: 1,
1570
- "is-open": String(V) === v.value,
1566
+ "is-open": String(q) === f.value,
1571
1567
  lazy: ""
1572
1568
  }, {
1573
- default: h(() => [
1574
- (w(!0), W(ge, null, he(f(V), (Y) => {
1575
- var q;
1569
+ default: _(() => [
1570
+ (w(!0), W(he, null, ge(P(q), (Y) => {
1571
+ var V;
1576
1572
  return w(), W("div", {
1577
1573
  key: Y.currency,
1578
1574
  class: "sv-top-up-form__amount grid grid-cols-1 gap-3",
1579
- onClick: c[1] || (c[1] = Ne(() => {
1575
+ onClick: m[1] || (m[1] = Ne(() => {
1580
1576
  }, ["stop"])),
1581
- onKeydown: c[2] || (c[2] = Ne(() => {
1577
+ onKeydown: m[2] || (m[2] = Ne(() => {
1582
1578
  }, ["stop"]))
1583
1579
  }, [
1584
- M.description ? (w(), C(r(X), {
1580
+ M.description ? (w(), C(r(K), {
1585
1581
  key: 0,
1586
1582
  tag: "span",
1587
1583
  variant: "body-xs",
1588
1584
  color: "subtle",
1589
1585
  "no-spacing": ""
1590
1586
  }, {
1591
- default: h(() => [
1592
- F(N(M.description), 1)
1587
+ default: _(() => [
1588
+ F(I(M.description), 1)
1593
1589
  ]),
1594
1590
  _: 2
1595
1591
  }, 1024)) : R("", !0),
1596
- A(Se, {
1597
- modelValue: I.value,
1598
- "onUpdate:modelValue": c[0] || (c[0] = (j) => I.value = j),
1592
+ A(Pe, {
1593
+ modelValue: B.value,
1594
+ "onUpdate:modelValue": m[0] || (m[0] = (j) => B.value = j),
1599
1595
  name: "top-up-amount",
1600
1596
  "model-base": "AMOUNT",
1601
- unit: S(Y),
1602
- "entry-base": G(Y),
1597
+ unit: p(Y),
1598
+ "entry-base": J(Y),
1603
1599
  currency: Y.currency,
1604
- "conversion-rate": (q = Y.creditsConfiguration) == null ? void 0 : q.conversionRate,
1600
+ "conversion-rate": (V = Y.creditsConfiguration) == null ? void 0 : V.conversionRate,
1605
1601
  required: "",
1606
- disabled: J.value
1602
+ disabled: Z.value
1607
1603
  }, null, 8, ["modelValue", "unit", "entry-base", "currency", "conversion-rate", "disabled"])
1608
1604
  ], 32);
1609
1605
  }), 128))
@@ -1615,43 +1611,43 @@ const Ro = { class: "sv-top-up-form" }, Vo = { class: "grid grid-cols-1 gap-4" }
1615
1611
  _: 1
1616
1612
  }, 8, ["modelValue", "disabled", "options", "label"])) : R("", !0)
1617
1613
  ]),
1618
- k("div", null, [
1619
- A(ft, {
1620
- "pricing-plan-schedule-id": T.value,
1621
- "pricing-items": D.value
1614
+ N("div", null, [
1615
+ A(vt, {
1616
+ "pricing-plan-schedule-id": b.value,
1617
+ "pricing-items": k.value
1622
1618
  }, null, 8, ["pricing-plan-schedule-id", "pricing-items"])
1623
1619
  ]),
1624
- b.value ? (w(), W("div", Lo, [
1620
+ T.value ? (w(), W("div", Lo, [
1625
1621
  A(_t, le({
1626
1622
  ref_key: "autoTopUpFormRef",
1627
- ref: $,
1623
+ ref: x,
1628
1624
  class: "sv-top-up-form__auto-top-up"
1629
- }, b.value, {
1625
+ }, T.value, {
1630
1626
  contained: "",
1631
1627
  "show-threshold-conversion": !1,
1632
- disabled: J.value
1628
+ disabled: Z.value
1633
1629
  }), null, 16, ["disabled"])
1634
1630
  ])) : R("", !0),
1635
- k("div", null, [
1636
- A(r(Lt), { spacing: "xs" })
1631
+ N("div", null, [
1632
+ A(r(Yt), { spacing: "xs" })
1637
1633
  ]),
1638
- k("div", null, [
1634
+ N("div", null, [
1639
1635
  se(d.$slots, "payment-method", {}, () => [
1640
1636
  A(st, {
1641
1637
  modelValue: ae.value,
1642
- "onUpdate:modelValue": c[4] || (c[4] = (M) => ae.value = M),
1638
+ "onUpdate:modelValue": m[4] || (m[4] = (M) => ae.value = M),
1643
1639
  class: "sv-top-up-form__payment-methods",
1644
1640
  "payment-methods": r(me),
1645
1641
  required: "",
1646
1642
  error: r(ne).paymentMethodId.$errors,
1647
1643
  "payment-method-options": e.paymentMethodOptions,
1648
- disabled: J.value,
1644
+ disabled: Z.value,
1649
1645
  label: r(i)({
1650
1646
  defaultMessage: "Payment method",
1651
1647
  description: "Label above the payment method that pays for the top-up, in the top-up modal",
1652
1648
  id: "topup_modal.payment_method_selector.label"
1653
1649
  }),
1654
- onAddPaymentMethod: c[5] || (c[5] = (M) => a("add-payment-method"))
1650
+ onAddPaymentMethod: m[5] || (m[5] = (M) => a("add-payment-method"))
1655
1651
  }, null, 8, ["modelValue", "payment-methods", "error", "payment-method-options", "disabled", "label"])
1656
1652
  ])
1657
1653
  ])
@@ -1667,19 +1663,19 @@ const Ro = { class: "sv-top-up-form" }, Vo = { class: "grid grid-cols-1 gap-4" }
1667
1663
  setup(e) {
1668
1664
  const { $t: t } = Q();
1669
1665
  return (o, n) => (w(), W("div", Ho, [
1670
- e.invoice ? (w(), C(r(fe), {
1666
+ e.invoice ? (w(), C(r(ve), {
1671
1667
  key: 0,
1672
1668
  "content-background": "none"
1673
1669
  }, {
1674
- default: h(() => [
1675
- A(r(X), {
1670
+ default: _(() => [
1671
+ A(r(K), {
1676
1672
  tag: "span",
1677
1673
  variant: "body-sm",
1678
1674
  weight: "semibold",
1679
1675
  class: "mb-2 block"
1680
1676
  }, {
1681
- default: h(() => [
1682
- F(N(r(t)({
1677
+ default: _(() => [
1678
+ F(I(r(t)({
1683
1679
  defaultMessage: "Receipt",
1684
1680
  description: "Heading above the invoice a completed top-up produced",
1685
1681
  id: "topup_modal.success.receipt.heading"
@@ -1714,7 +1710,7 @@ function jo({
1714
1710
  defaultMessage: "Top up balance",
1715
1711
  description: "Title of the wallet top-up modal",
1716
1712
  id: "topup_modal.title"
1717
- })), u = s(() => e.value === "ADD_PAYMENT_METHOD" ? n({
1713
+ })), l = s(() => e.value === "ADD_PAYMENT_METHOD" ? n({
1718
1714
  defaultMessage: "Add a new payment method for topping up your balance.",
1719
1715
  description: "Subtitle of the top-up modal while the customer is adding a payment method",
1720
1716
  id: "topup_modal.add_payment_method.subtitle"
@@ -1729,7 +1725,7 @@ function jo({
1729
1725
  id: "topup_modal.subtitle"
1730
1726
  },
1731
1727
  { balance: t.value }
1732
- )), l = s(
1728
+ )), u = s(
1733
1729
  () => e.value === "ADD_PAYMENT_METHOD" ? n({
1734
1730
  defaultMessage: "Back",
1735
1731
  description: "Label of the button that leaves the add payment method step in the top-up modal",
@@ -1739,7 +1735,7 @@ function jo({
1739
1735
  description: "Label of the button that closes the top-up modal",
1740
1736
  id: "topup_modal.cancel_button.label"
1741
1737
  })
1742
- ), p = s(() => e.value === "ADD_PAYMENT_METHOD" ? n({
1738
+ ), c = s(() => e.value === "ADD_PAYMENT_METHOD" ? n({
1743
1739
  defaultMessage: "Save payment method",
1744
1740
  description: "Label of the confirm button in the top-up modal while adding a payment method",
1745
1741
  id: "topup_modal.save_payment_method.label"
@@ -1759,44 +1755,53 @@ function jo({
1759
1755
  description: "Label of the confirm button in the top-up modal while no amount is entered",
1760
1756
  id: "topup_modal.confirm_button.empty.label"
1761
1757
  }));
1762
- return { title: i, subTitle: u, cancelButtonText: l, confirmButtonText: p };
1758
+ return { title: i, subTitle: l, cancelButtonText: u, confirmButtonText: c };
1763
1759
  }
1764
1760
  function bt({
1765
1761
  isOpen: e,
1766
- customer: t
1762
+ customer: t,
1763
+ subscriptionId: o,
1764
+ onError: n
1767
1765
  }) {
1768
- const { paymentMethodOptions: o, get: n, isPending: a } = Gt();
1769
- ee(
1770
- () => [e.value, t.value],
1771
- ([u, l]) => {
1772
- !u || !l || n({
1773
- customerId: l.id,
1774
- country: Qt(l)
1775
- });
1776
- },
1766
+ const { paymentMethodOptions: a, get: i, isPending: l } = Kt(), u = async () => {
1767
+ const g = t.value;
1768
+ if (!(!e.value || !g))
1769
+ try {
1770
+ await i({
1771
+ customerId: g.id,
1772
+ ...o != null && o.value ? { subscriptionId: o.value } : {},
1773
+ country: Gt(g)
1774
+ });
1775
+ } catch (b) {
1776
+ n == null || n(b);
1777
+ }
1778
+ };
1779
+ X(
1780
+ () => [e.value, t.value, o == null ? void 0 : o.value],
1781
+ () => void u(),
1777
1782
  { immediate: !0 }
1778
1783
  );
1779
- const i = s(
1780
- () => a.value ? void 0 : o.value
1784
+ const c = s(
1785
+ () => l.value ? void 0 : a.value
1781
1786
  );
1782
- return { paymentMethodOptions: o, settledOptions: i, isPending: a };
1787
+ return { paymentMethodOptions: a, settledOptions: c, isPending: l, load: u };
1783
1788
  }
1784
1789
  function zo(e) {
1785
- const t = E(0), o = (a) => {
1790
+ const t = $(0), o = (a) => {
1786
1791
  t.value = (a == null ? void 0 : a.offsetHeight) ?? 0;
1787
1792
  }, n = typeof ResizeObserver > "u" ? void 0 : new ResizeObserver((a) => {
1788
- var u;
1789
- const i = (u = a[0]) == null ? void 0 : u.target;
1793
+ var l;
1794
+ const i = (l = a[0]) == null ? void 0 : l.target;
1790
1795
  o(i instanceof HTMLElement ? i : void 0);
1791
1796
  });
1792
- return ee(
1797
+ return X(
1793
1798
  e,
1794
1799
  (a, i) => {
1795
1800
  i && (n == null || n.unobserve(i)), o(a), a && (n == null || n.observe(a));
1796
1801
  },
1797
1802
  // `post` so the callback runs after the render that assigns the template ref, not before.
1798
1803
  { immediate: !0, flush: "post" }
1799
- ), Pe(() => {
1804
+ ), Se(() => {
1800
1805
  n == null || n.disconnect();
1801
1806
  }), t;
1802
1807
  }
@@ -1807,52 +1812,53 @@ const Qo = ["inert"], Go = 300, Ko = "1rem", Xo = /* @__PURE__ */ z({
1807
1812
  current: { type: String }
1808
1813
  },
1809
1814
  setup(e) {
1810
- const t = e, o = E(!1);
1815
+ const t = e, o = $(!1);
1811
1816
  let n;
1812
- ee(
1817
+ X(
1813
1818
  () => t.current,
1814
1819
  () => {
1815
1820
  o.value = !0, clearTimeout(n), n = setTimeout(() => {
1816
1821
  o.value = !1;
1817
1822
  }, Go);
1818
1823
  }
1819
- ), Pe(() => {
1824
+ ), Se(() => {
1820
1825
  clearTimeout(n);
1821
1826
  });
1822
- const a = E({}), i = {}, u = (T) => i[T] ?? (i[T] = (x) => {
1823
- a.value[T] = x instanceof HTMLElement ? x : void 0;
1824
- }), l = s(() => a.value[t.current]), p = zo(l), y = s(() => {
1825
- const T = t.panes.indexOf(t.current);
1826
- return T > 0 ? `translateX(calc(${-T} * (100% + ${Ko})))` : "translateX(0px)";
1827
+ const a = $({}), i = {}, l = (b) => i[b] ?? (i[b] = (S) => {
1828
+ a.value[b] = S instanceof HTMLElement ? S : void 0;
1829
+ }), u = s(() => a.value[t.current]), c = zo(u), g = s(() => {
1830
+ const b = t.panes.indexOf(t.current);
1831
+ return b > 0 ? `translateX(calc(${-b} * (100% + ${Ko})))` : "translateX(0px)";
1827
1832
  });
1828
- return (T, x) => (w(), W("div", {
1833
+ return (b, S) => (w(), W("div", {
1829
1834
  class: ze([
1830
1835
  "sv-sliding-panes__viewport relative -mx-2 overflow-hidden px-2",
1831
1836
  o.value ? "transition-[height] duration-300 ease-in-out motion-reduce:transition-none" : ""
1832
1837
  ]),
1833
- style: ke(r(p) ? { height: `${r(p)}px` } : void 0)
1838
+ style: Re(r(c) ? { height: `${r(c)}px` } : void 0)
1834
1839
  }, [
1835
- k("div", {
1840
+ N("div", {
1836
1841
  class: "sv-sliding-panes__track flex items-start gap-4 transition-transform duration-300 ease-in-out motion-reduce:transition-none",
1837
- style: ke({ transform: y.value })
1842
+ style: Re({ transform: g.value })
1838
1843
  }, [
1839
- (w(!0), W(ge, null, he(e.panes, (v) => (w(), W("div", {
1840
- key: v,
1844
+ (w(!0), W(he, null, ge(e.panes, (f) => (w(), W("div", {
1845
+ key: f,
1841
1846
  class: "sv-sliding-panes__pane w-full shrink-0",
1842
- inert: v !== e.current || void 0
1847
+ inert: f !== e.current || void 0
1843
1848
  }, [
1844
- k("div", {
1849
+ N("div", {
1845
1850
  ref_for: !0,
1846
- ref: u(v)
1851
+ ref: l(f)
1847
1852
  }, [
1848
- se(T.$slots, v)
1853
+ se(b.$slots, f)
1849
1854
  ], 512)
1850
1855
  ], 8, Qo))), 128))
1851
1856
  ], 4)
1852
1857
  ], 6));
1853
1858
  }
1854
- }), Jo = { class: "grid grid-cols-1 gap-4 pb-4" }, wt = /* @__PURE__ */ z({
1855
- __name: "WalletModalShell",
1859
+ }), wt = /* @__PURE__ */ z({
1860
+ inheritAttrs: !1,
1861
+ __name: "OnDemandPaymentModalShell",
1856
1862
  props: {
1857
1863
  showModal: { type: Boolean },
1858
1864
  title: { type: String },
@@ -1870,7 +1876,7 @@ const Qo = ["inert"], Go = 300, Ko = "1rem", Xo = /* @__PURE__ */ z({
1870
1876
  },
1871
1877
  emits: ["confirm", "cancel", "payment-success", "payment-failed"],
1872
1878
  setup(e, { expose: t }) {
1873
- const o = e, n = E(), a = s(() => o.panes.filter((i) => i !== o.addPaymentMethodPane));
1879
+ const o = e, n = $(), a = s(() => o.panes.filter((i) => i !== o.addPaymentMethodPane));
1874
1880
  return t({
1875
1881
  submit: () => {
1876
1882
  var i;
@@ -1880,7 +1886,7 @@ const Qo = ["inert"], Go = 300, Ko = "1rem", Xo = /* @__PURE__ */ z({
1880
1886
  var i;
1881
1887
  return !!((i = n.value) != null && i.isSaving);
1882
1888
  })
1883
- }), (i, u) => (w(), C(r(lt), {
1889
+ }), (i, l) => (w(), C(r(lt), {
1884
1890
  "no-click-away": "",
1885
1891
  "show-modal": e.showModal,
1886
1892
  size: "lg",
@@ -1889,43 +1895,43 @@ const Qo = ["inert"], Go = 300, Ko = "1rem", Xo = /* @__PURE__ */ z({
1889
1895
  "cancel-button-text": e.cancelButtonText,
1890
1896
  "confirm-button-text": e.confirmButtonText,
1891
1897
  "is-loading": e.isPending,
1892
- onConfirm: u[2] || (u[2] = (l) => i.$emit("confirm")),
1893
- onClose: u[3] || (u[3] = (l) => i.$emit("cancel"))
1898
+ onConfirm: l[2] || (l[2] = (u) => i.$emit("confirm")),
1899
+ onClose: l[3] || (l[3] = (u) => i.$emit("cancel"))
1894
1900
  }, re({
1895
- body: h(() => [
1896
- k("div", Jo, [
1901
+ body: _(() => [
1902
+ N("div", le({ class: "grid grid-cols-1 gap-4 pb-4" }, i.$attrs), [
1897
1903
  A(Xo, {
1898
1904
  panes: e.panes,
1899
1905
  current: e.step
1900
1906
  }, re({
1901
- [e.addPaymentMethodPane]: h(() => [
1902
- A(jt, {
1907
+ [e.addPaymentMethodPane]: _(() => [
1908
+ A(zt, {
1903
1909
  ref_key: "paneRef",
1904
1910
  ref: n,
1905
1911
  customer: e.customer,
1906
1912
  "payment-method-options": e.paymentMethodOptions,
1907
1913
  "is-loading": e.isPaymentMethodOptionsPending,
1908
1914
  "is-active": e.isAddingPaymentMethod,
1909
- onSuccess: u[0] || (u[0] = (l) => i.$emit("payment-success")),
1910
- onFailure: u[1] || (u[1] = (l) => i.$emit("payment-failed", l))
1915
+ onSuccess: l[0] || (l[0] = (u) => i.$emit("payment-success")),
1916
+ onFailure: l[1] || (l[1] = (u) => i.$emit("payment-failed", u))
1911
1917
  }, null, 8, ["customer", "payment-method-options", "is-loading", "is-active"])
1912
1918
  ]),
1913
1919
  _: 2
1914
1920
  }, [
1915
- he(a.value, (l) => ({
1916
- name: l,
1917
- fn: h(() => [
1918
- se(i.$slots, l)
1921
+ ge(a.value, (u) => ({
1922
+ name: u,
1923
+ fn: _(() => [
1924
+ se(i.$slots, u)
1919
1925
  ])
1920
1926
  }))
1921
1927
  ]), 1032, ["panes", "current"])
1922
- ])
1928
+ ], 16)
1923
1929
  ]),
1924
1930
  _: 2
1925
1931
  }, [
1926
1932
  i.$slots.footer ? {
1927
1933
  name: "footer",
1928
- fn: h(() => [
1934
+ fn: _(() => [
1929
1935
  se(i.$slots, "footer")
1930
1936
  ]),
1931
1937
  key: "0"
@@ -1954,14 +1960,14 @@ const Qo = ["inert"], Go = 300, Ko = "1rem", Xo = /* @__PURE__ */ z({
1954
1960
  pricingItemId: o.pricingItemId,
1955
1961
  pricingPlanScheduleId: o.pricingPlanScheduleId
1956
1962
  } : void 0;
1957
- }, St = ({
1963
+ }, Pt = ({
1958
1964
  rule: e,
1959
1965
  walletBalanceItem: t,
1960
1966
  chargeTarget: o,
1961
1967
  paymentMethodId: n
1962
1968
  }) => {
1963
- var i, u;
1964
- const a = !!(((i = e == null ? void 0 : e.threshold) == null ? void 0 : i.amount) ?? ((u = e == null ? void 0 : e.threshold) == null ? void 0 : u.credits));
1969
+ var i, l;
1970
+ const a = !!(((i = e == null ? void 0 : e.threshold) == null ? void 0 : i.amount) ?? ((l = e == null ? void 0 : e.threshold) == null ? void 0 : l.credits));
1965
1971
  if (!(!e || !a || !(t != null && t.wallet_id) || !o || !n))
1966
1972
  return {
1967
1973
  wallet_id: t.wallet_id,
@@ -1973,12 +1979,12 @@ const Qo = ["inert"], Go = 300, Ko = "1rem", Xo = /* @__PURE__ */ z({
1973
1979
  ...e.topup_amount && { topup_amount: e.topup_amount }
1974
1980
  };
1975
1981
  };
1976
- function Pt({
1982
+ function St({
1977
1983
  step: e,
1978
1984
  name: t,
1979
1985
  returnTo: o
1980
1986
  }) {
1981
- const n = E();
1987
+ const n = $();
1982
1988
  return {
1983
1989
  paneRef: n,
1984
1990
  isActive: s(() => e.value === t),
@@ -2000,28 +2006,28 @@ function Pt({
2000
2006
  }
2001
2007
  function At() {
2002
2008
  const e = Qe(), t = Ge(), o = "/portal/auto-top-up-configs";
2003
- function n(l) {
2009
+ function n(u) {
2004
2010
  return e({
2005
2011
  url: `${t.apiUrls.config}${o}`,
2006
- query: { ...l },
2012
+ query: { ...u },
2007
2013
  isCollection: !0
2008
2014
  });
2009
2015
  }
2010
- function a(l) {
2016
+ function a(u) {
2011
2017
  return e({
2012
- url: `${t.apiUrls.config}${o}/${l}`
2018
+ url: `${t.apiUrls.config}${o}/${u}`
2013
2019
  });
2014
2020
  }
2015
- function i(l) {
2021
+ function i(u) {
2016
2022
  return e({
2017
2023
  url: `${t.apiUrls.config}${o}`,
2018
2024
  options: { method: "POST" },
2019
- data: l
2025
+ data: u
2020
2026
  });
2021
2027
  }
2022
- function u(l) {
2028
+ function l(u) {
2023
2029
  return e({
2024
- url: `${t.apiUrls.config}${o}/${l}/deactivate`,
2030
+ url: `${t.apiUrls.config}${o}/${u}/deactivate`,
2025
2031
  options: { method: "POST" }
2026
2032
  });
2027
2033
  }
@@ -2029,11 +2035,11 @@ function At() {
2029
2035
  getAutoTopUpConfigs: n,
2030
2036
  getAutoTopUpConfig: a,
2031
2037
  createAutoTopUpConfig: i,
2032
- deactivateAutoTopUpConfig: u
2038
+ deactivateAutoTopUpConfig: l
2033
2039
  };
2034
2040
  }
2035
2041
  function Ct() {
2036
- const { createAutoTopUpConfig: e } = At(), t = _e(), o = E(!1);
2042
+ const { createAutoTopUpConfig: e } = At(), t = _e(), o = $(!1);
2037
2043
  return { save: async (a) => {
2038
2044
  if (!a || o.value)
2039
2045
  return { saved: !1 };
@@ -2052,10 +2058,10 @@ function Ct() {
2052
2058
  }
2053
2059
  }, isSaving: o };
2054
2060
  }
2055
- const Zo = {
2061
+ const Jo = {
2056
2062
  key: 0,
2057
2063
  class: "mb-4"
2058
- }, en = { class: "sr-only" }, tn = { class: "flex flex-col gap-2" }, on = /* @__PURE__ */ z({
2064
+ }, Zo = { class: "sr-only" }, en = { class: "flex flex-col gap-2" }, tn = /* @__PURE__ */ z({
2059
2065
  __name: "TopUpModal",
2060
2066
  props: {
2061
2067
  showModal: { type: Boolean },
@@ -2066,140 +2072,140 @@ const Zo = {
2066
2072
  },
2067
2073
  emits: ["confirm", "close", "auto-top-up-saved", "payment-success", "payment-failed"],
2068
2074
  setup(e, { emit: t }) {
2069
- const o = e, n = t, { $t: a } = Q(), { formatOpenBalance: i } = ye(), u = s(
2075
+ const o = e, n = t, { $t: a } = Q(), { formatOpenBalance: i } = ye(), l = s(
2070
2076
  () => Mt(Tt(o.selectedBalanceItem))
2071
- ), l = s(() => i(o.selectedBalanceItem)), p = s(
2072
- () => vo(o.selectedBalanceItem, o.subscriptions ?? [])
2073
- ), y = E();
2074
- ee(
2075
- p,
2076
- (B) => {
2077
+ ), u = s(() => i(o.selectedBalanceItem)), c = s(
2078
+ () => ho(o.selectedBalanceItem, o.subscriptions ?? [])
2079
+ ), g = $();
2080
+ X(
2081
+ c,
2082
+ (O) => {
2077
2083
  var L;
2078
- B.some(
2079
- ({ id: be }) => be === y.value
2080
- ) || (y.value = (L = B[0]) == null ? void 0 : L.id);
2084
+ O.some(
2085
+ ({ id: be }) => be === g.value
2086
+ ) || (g.value = (L = O[0]) == null ? void 0 : L.id);
2081
2087
  },
2082
2088
  { immediate: !0 }
2083
2089
  );
2084
- const T = s(() => p.value.length > 1), x = s(
2085
- () => p.value.map(({ id: B, name: H }) => ({ value: B, label: H }))
2086
- ), v = s(
2090
+ const b = s(() => c.value.length > 1), S = s(
2091
+ () => c.value.map(({ id: O, name: H }) => ({ value: O, label: H }))
2092
+ ), f = s(
2087
2093
  () => Object.fromEntries(
2088
- p.value.flatMap(({ id: B, enabledPricingIds: H }) => {
2089
- const L = (o.subscriptions ?? []).find(({ id: be }) => be === B);
2090
- return L ? [[B, { subscription: L, enabledPricingIds: H }]] : [];
2094
+ c.value.flatMap(({ id: O, enabledPricingIds: H }) => {
2095
+ const L = (o.subscriptions ?? []).find(({ id: be }) => be === O);
2096
+ return L ? [[O, { subscription: L, enabledPricingIds: H }]] : [];
2091
2097
  })
2092
2098
  )
2093
- ), g = s(() => {
2099
+ ), h = s(() => {
2094
2100
  var H;
2095
2101
  if (!o.selectedBalanceItem || !((H = o.subscriptions) != null && H.length))
2096
2102
  return o.selectedBalanceItem;
2097
- const B = p.value.find(({ id: L }) => L === y.value);
2098
- return B ? go(o.selectedBalanceItem, B.scheduleIds) : { ...o.selectedBalanceItem, charge_on_demand_pricing_items: [] };
2099
- }), m = s(() => ut(g.value)), {
2103
+ const O = c.value.find(({ id: L }) => L === g.value);
2104
+ return O ? go(o.selectedBalanceItem, O.scheduleIds) : { ...o.selectedBalanceItem, charge_on_demand_pricing_items: [] };
2105
+ }), v = s(() => ut(h.value)), {
2100
2106
  paymentMethodOptions: U,
2101
- settledOptions: I,
2102
- isPending: G
2107
+ settledOptions: B,
2108
+ isPending: J
2103
2109
  } = bt({
2104
2110
  isOpen: s(() => o.showModal),
2105
2111
  customer: s(() => o.customer)
2106
- }), _ = E("TOP_UP"), S = s(() => (o.paymentMethods ?? []).length > 0), f = s(
2107
- () => !G.value && (U.value ?? []).length === 0
2108
- ), P = s(
2109
- () => _.value === "TOP_UP" && !S.value && f.value
2110
- ), O = E(), D = E(), b = () => {
2112
+ }), y = $("TOP_UP"), p = s(() => (o.paymentMethods ?? []).length > 0), P = s(
2113
+ () => !J.value && (U.value ?? []).length === 0
2114
+ ), E = s(
2115
+ () => y.value === "TOP_UP" && !p.value && P.value
2116
+ ), D = $(), k = $(), T = () => {
2111
2117
  te(), n("payment-success");
2112
2118
  }, {
2113
- paneRef: $,
2114
- isActive: K,
2119
+ paneRef: x,
2120
+ isActive: G,
2115
2121
  isSaving: de,
2116
- open: J,
2122
+ open: Z,
2117
2123
  leave: te,
2118
2124
  submit: ce
2119
- } = Pt({ step: _, name: "ADD_PAYMENT_METHOD", returnTo: "TOP_UP" }), { save: ne } = Ct(), oe = E(), pe = s(() => {
2120
- var B;
2121
- return (B = oe.value) == null ? void 0 : B.chargedValue;
2125
+ } = St({ step: y, name: "ADD_PAYMENT_METHOD", returnTo: "TOP_UP" }), { save: ne } = Ct(), oe = $(), pe = s(() => {
2126
+ var O;
2127
+ return (O = oe.value) == null ? void 0 : O.chargedValue;
2122
2128
  }), ae = s(() => {
2123
- var B;
2124
- return de.value || !!((B = oe.value) != null && B.isCharging);
2125
- }), { title: me, subTitle: d, cancelButtonText: c, confirmButtonText: M } = jo({
2126
- step: _,
2127
- currentBalance: l,
2129
+ var O;
2130
+ return de.value || !!((O = oe.value) != null && O.isCharging);
2131
+ }), { title: me, subTitle: d, cancelButtonText: m, confirmButtonText: M } = jo({
2132
+ step: y,
2133
+ currentBalance: u,
2128
2134
  topUpValue: pe
2129
- }), V = () => {
2130
- var B;
2131
- if (K.value) {
2135
+ }), q = () => {
2136
+ var O;
2137
+ if (G.value) {
2132
2138
  ce();
2133
2139
  return;
2134
2140
  }
2135
- (B = oe.value) == null || B.submit();
2141
+ (O = oe.value) == null || O.submit();
2136
2142
  }, Y = async ({
2137
- rule: B,
2143
+ rule: O,
2138
2144
  paymentMethodId: H
2139
2145
  }) => {
2140
2146
  const { saved: L } = await ne(
2141
- St({
2142
- rule: B,
2147
+ Pt({
2148
+ rule: O,
2143
2149
  walletBalanceItem: o.selectedBalanceItem,
2144
- chargeTarget: Ut(void 0, m.value),
2150
+ chargeTarget: Ut(void 0, v.value),
2145
2151
  paymentMethodId: H
2146
2152
  })
2147
2153
  );
2148
2154
  L && n("auto-top-up-saved");
2149
- }, q = (B) => {
2155
+ }, V = (O) => {
2150
2156
  var H;
2151
- O.value = B, D.value = (H = oe.value) == null ? void 0 : H.chargedValue, _.value = "SUCCESS";
2157
+ D.value = O, k.value = (H = oe.value) == null ? void 0 : H.chargedValue, y.value = "SUCCESS";
2152
2158
  }, j = () => {
2153
2159
  n("confirm"), n("close");
2154
- }, Z = () => {
2160
+ }, ee = () => {
2155
2161
  if (!ae.value) {
2156
- if (K.value) {
2162
+ if (G.value) {
2157
2163
  te();
2158
2164
  return;
2159
2165
  }
2160
- if (_.value === "SUCCESS") {
2166
+ if (y.value === "SUCCESS") {
2161
2167
  j();
2162
2168
  return;
2163
2169
  }
2164
2170
  n("close");
2165
2171
  }
2166
- }, De = E(0);
2167
- return ee(
2172
+ }, De = $(0);
2173
+ return X(
2168
2174
  () => o.showModal,
2169
- (B) => {
2170
- B && (_.value = "TOP_UP", O.value = void 0, D.value = void 0, De.value += 1);
2175
+ (O) => {
2176
+ O && (y.value = "TOP_UP", D.value = void 0, k.value = void 0, De.value += 1);
2171
2177
  }
2172
- ), (B, H) => (w(), C(wt, {
2178
+ ), (O, H) => (w(), C(wt, {
2173
2179
  ref_key: "addPaymentMethodRef",
2174
- ref: $,
2180
+ ref: x,
2175
2181
  "show-modal": e.showModal,
2176
2182
  title: r(me),
2177
2183
  "sub-title": r(d),
2178
- "cancel-button-text": r(c),
2184
+ "cancel-button-text": r(m),
2179
2185
  "confirm-button-text": r(M),
2180
2186
  "is-pending": ae.value,
2181
- panes: r(mo),
2182
- step: _.value,
2187
+ panes: r(vo),
2188
+ step: y.value,
2183
2189
  "add-payment-method-pane": "ADD_PAYMENT_METHOD",
2184
2190
  customer: e.customer,
2185
2191
  "payment-method-options": r(U),
2186
- "is-payment-method-options-pending": r(G),
2187
- "is-adding-payment-method": r(K),
2188
- onConfirm: V,
2189
- onCancel: Z,
2190
- onPaymentSuccess: b,
2191
- onPaymentFailed: H[1] || (H[1] = (L) => B.$emit("payment-failed", L))
2192
+ "is-payment-method-options-pending": r(J),
2193
+ "is-adding-payment-method": r(G),
2194
+ onConfirm: q,
2195
+ onCancel: ee,
2196
+ onPaymentSuccess: T,
2197
+ onPaymentFailed: H[1] || (H[1] = (L) => O.$emit("payment-failed", L))
2192
2198
  }, re({
2193
- TOP_UP: h(() => [
2194
- T.value ? (w(), W("div", Zo, [
2199
+ TOP_UP: _(() => [
2200
+ b.value ? (w(), W("div", Jo, [
2195
2201
  A(r(tt), {
2196
- modelValue: y.value,
2197
- "onUpdate:modelValue": H[0] || (H[0] = (L) => y.value = L),
2202
+ modelValue: g.value,
2203
+ "onUpdate:modelValue": H[0] || (H[0] = (L) => g.value = L),
2198
2204
  class: "sv-topup-modal__subscription",
2199
2205
  name: "top-up-subscription",
2200
2206
  direction: "column",
2201
2207
  required: "",
2202
- options: x.value,
2208
+ options: S.value,
2203
2209
  "show-radio": !1,
2204
2210
  label: r(a)({
2205
2211
  defaultMessage: "Subscription to top up",
@@ -2207,17 +2213,17 @@ const Zo = {
2207
2213
  id: "topup_modal.subscriptions.label"
2208
2214
  })
2209
2215
  }, {
2210
- prefix: h(({ optionValue: L }) => [
2211
- v.value[String(L)] ? (w(), C(zt, {
2216
+ prefix: _(({ optionValue: L }) => [
2217
+ f.value[String(L)] ? (w(), C(Qt, {
2212
2218
  key: 0,
2213
2219
  class: "sv-topup-modal__subscription-option grow",
2214
2220
  "no-spacing": "",
2215
- subscription: v.value[String(L)].subscription,
2216
- "enabled-pricing-ids": v.value[String(L)].enabledPricingIds
2221
+ subscription: f.value[String(L)].subscription,
2222
+ "enabled-pricing-ids": f.value[String(L)].enabledPricingIds
2217
2223
  }, null, 8, ["subscription", "enabled-pricing-ids"])) : R("", !0)
2218
2224
  ]),
2219
- label: h(({ option: L }) => [
2220
- k("span", en, N(L.label), 1)
2225
+ label: _(({ option: L }) => [
2226
+ N("span", Zo, I(L.label), 1)
2221
2227
  ]),
2222
2228
  _: 1
2223
2229
  }, 8, ["modelValue", "options", "label"])
@@ -2226,57 +2232,54 @@ const Zo = {
2226
2232
  key: De.value,
2227
2233
  ref_key: "topUpFormRef",
2228
2234
  ref: oe,
2229
- "top-up-pricing-items": m.value,
2235
+ "top-up-pricing-items": v.value,
2230
2236
  "payment-methods": e.paymentMethods,
2231
- "auto-top-up-config": u.value,
2232
- "payment-method-options": r(I),
2233
- onAddPaymentMethod: r(J),
2234
- onSuccess: q,
2237
+ "auto-top-up-config": l.value,
2238
+ "payment-method-options": r(B),
2239
+ onAddPaymentMethod: r(Z),
2240
+ onSuccess: V,
2235
2241
  onSaveAutoTopUp: Y
2236
2242
  }, null, 8, ["top-up-pricing-items", "payment-methods", "auto-top-up-config", "payment-method-options", "onAddPaymentMethod"]))
2237
2243
  ]),
2238
- SUCCESS: h(() => [
2239
- O.value ? (w(), C(Wo, {
2244
+ SUCCESS: _(() => [
2245
+ D.value ? (w(), C(Wo, {
2240
2246
  key: 0,
2241
- "added-value": D.value,
2242
- invoice: O.value
2247
+ "added-value": k.value,
2248
+ invoice: D.value
2243
2249
  }, null, 8, ["added-value", "invoice"])) : R("", !0)
2244
2250
  ]),
2245
2251
  _: 2
2246
2252
  }, [
2247
- _.value === "SUCCESS" || P.value ? {
2253
+ y.value === "SUCCESS" || E.value ? {
2248
2254
  name: "footer",
2249
- fn: h(() => [
2250
- k("div", tn, [
2251
- _.value === "SUCCESS" ? (w(), C(r(ue), {
2255
+ fn: _(() => [
2256
+ N("div", en, [
2257
+ y.value === "SUCCESS" ? (w(), C(r(ue), {
2252
2258
  key: 0,
2253
2259
  size: "lg",
2254
- "data-testid": "done",
2255
2260
  onClick: j
2256
2261
  }, {
2257
- default: h(() => [
2258
- F(N(r(M)), 1)
2262
+ default: _(() => [
2263
+ F(I(r(M)), 1)
2259
2264
  ]),
2260
2265
  _: 1
2261
- })) : (w(), W(ge, { key: 1 }, [
2266
+ })) : (w(), W(he, { key: 1 }, [
2262
2267
  A(r(ue), {
2263
2268
  size: "lg",
2264
- disabled: "",
2265
- "data-testid": "confirm"
2269
+ disabled: ""
2266
2270
  }, {
2267
- default: h(() => [
2268
- F(N(r(M)), 1)
2271
+ default: _(() => [
2272
+ F(I(r(M)), 1)
2269
2273
  ]),
2270
2274
  _: 1
2271
2275
  }),
2272
2276
  A(r(ue), {
2273
2277
  size: "lg",
2274
2278
  intent: "subtle",
2275
- "data-testid": "cancel",
2276
- onClick: Z
2279
+ onClick: ee
2277
2280
  }, {
2278
- default: h(() => [
2279
- F(N(r(c)), 1)
2281
+ default: _(() => [
2282
+ F(I(r(m)), 1)
2280
2283
  ]),
2281
2284
  _: 1
2282
2285
  })
@@ -2287,7 +2290,7 @@ const Zo = {
2287
2290
  } : void 0
2288
2291
  ]), 1032, ["show-modal", "title", "sub-title", "cancel-button-text", "confirm-button-text", "is-pending", "panes", "step", "customer", "payment-method-options", "is-payment-method-options-pending", "is-adding-payment-method"]));
2289
2292
  }
2290
- }), nn = ["AUTO_TOP_UP", "ADD_PAYMENT_METHOD"], an = { class: "grid grid-cols-1 gap-4" }, sn = /* @__PURE__ */ z({
2293
+ }), on = ["AUTO_TOP_UP", "ADD_PAYMENT_METHOD"], nn = { class: "grid grid-cols-1 gap-4" }, an = /* @__PURE__ */ z({
2291
2294
  __name: "AutoTopUpModal",
2292
2295
  props: {
2293
2296
  showModal: { type: Boolean },
@@ -2298,38 +2301,38 @@ const Zo = {
2298
2301
  },
2299
2302
  emits: ["saved", "close", "payment-success", "payment-failed"],
2300
2303
  setup(e, { emit: t }) {
2301
- const o = e, n = t, { $t: a } = Q(), { formatOpenBalance: i } = ye(), u = E("AUTO_TOP_UP"), l = s(() => i(o.walletBalanceItem)), p = s(() => ut(o.walletBalanceItem)), y = s(() => mt(p.value)), T = s(() => Tt(o.walletBalanceItem)), x = s(() => Mt(T.value)), v = s(
2302
- () => Ut(o.topUpItem, p.value)
2303
- ), g = E(), m = s(() => {
2304
- var j, Z;
2305
- const q = (Z = (j = g.value) == null ? void 0 : j.rule) == null ? void 0 : Z.topup_amount;
2306
- return q != null && q.quantity && v.value ? [{ pricing_item_id: v.value.pricingItemId, flexible_amount: q }] : void 0;
2304
+ const o = e, n = t, { $t: a } = Q(), { formatOpenBalance: i } = ye(), l = $("AUTO_TOP_UP"), u = s(() => i(o.walletBalanceItem)), c = s(() => ut(o.walletBalanceItem)), g = s(() => mt(c.value)), b = s(() => Tt(o.walletBalanceItem)), S = s(() => Mt(b.value)), f = s(
2305
+ () => Ut(o.topUpItem, c.value)
2306
+ ), h = $(), v = s(() => {
2307
+ var j, ee;
2308
+ const V = (ee = (j = h.value) == null ? void 0 : j.rule) == null ? void 0 : ee.topup_amount;
2309
+ return V != null && V.quantity && f.value ? [{ pricing_item_id: f.value.pricingItemId, flexible_amount: V }] : void 0;
2307
2310
  }), U = s(() => {
2308
- var q;
2309
- return (q = v.value) == null ? void 0 : q.pricingPlanScheduleId;
2310
- }), I = E(), { sortedPaymentMethods: G } = yt({
2311
+ var V;
2312
+ return (V = f.value) == null ? void 0 : V.pricingPlanScheduleId;
2313
+ }), B = $(), { sortedPaymentMethods: J } = yt({
2311
2314
  paymentMethods: s(() => o.paymentMethods),
2312
- selectedPaymentMethodId: I,
2315
+ selectedPaymentMethodId: B,
2313
2316
  preferredPaymentMethodId: s(() => {
2314
- var q;
2315
- return (q = T.value) == null ? void 0 : q.payment_method_id;
2317
+ var V;
2318
+ return (V = b.value) == null ? void 0 : V.payment_method_id;
2316
2319
  })
2317
2320
  }), {
2318
- paymentMethodOptions: _,
2319
- settledOptions: S,
2320
- isPending: f
2321
+ paymentMethodOptions: y,
2322
+ settledOptions: p,
2323
+ isPending: P
2321
2324
  } = bt({
2322
2325
  isOpen: s(() => o.showModal),
2323
2326
  customer: s(() => o.customer)
2324
2327
  }), {
2325
- paneRef: P,
2326
- isActive: O,
2327
- isSaving: D,
2328
- open: b,
2329
- leave: $,
2330
- submit: K
2331
- } = Pt({ step: u, name: "ADD_PAYMENT_METHOD", returnTo: "AUTO_TOP_UP" }), { save: de, isSaving: J } = Ct(), te = s(() => D.value || J.value), ce = Ae({
2332
- paymentMethodId: s(() => I.value ?? null)
2328
+ paneRef: E,
2329
+ isActive: D,
2330
+ isSaving: k,
2331
+ open: T,
2332
+ leave: x,
2333
+ submit: G
2334
+ } = St({ step: l, name: "ADD_PAYMENT_METHOD", returnTo: "AUTO_TOP_UP" }), { save: de, isSaving: Z } = Ct(), te = s(() => k.value || Z.value), ce = Ae({
2335
+ paymentMethodId: s(() => B.value ?? null)
2333
2336
  }), ne = xe(
2334
2337
  {
2335
2338
  paymentMethodId: {
@@ -2345,7 +2348,7 @@ const Zo = {
2345
2348
  },
2346
2349
  ce
2347
2350
  ), oe = s(
2348
- () => u.value === "ADD_PAYMENT_METHOD" ? a({
2351
+ () => l.value === "ADD_PAYMENT_METHOD" ? a({
2349
2352
  defaultMessage: "Add payment method",
2350
2353
  description: "Title of the auto top-up modal while the customer is adding a payment method",
2351
2354
  id: "auto_topup_modal.add_payment_method.title"
@@ -2355,7 +2358,7 @@ const Zo = {
2355
2358
  id: "auto_topup_modal.title"
2356
2359
  })
2357
2360
  ), pe = s(
2358
- () => u.value === "ADD_PAYMENT_METHOD" ? a({
2361
+ () => l.value === "ADD_PAYMENT_METHOD" ? a({
2359
2362
  defaultMessage: "This method pays for every automatic top-up.",
2360
2363
  description: "Subtitle of the auto top-up modal while the customer is adding a payment method",
2361
2364
  id: "auto_topup_modal.add_payment_method.subtitle"
@@ -2365,10 +2368,10 @@ const Zo = {
2365
2368
  description: "Subtitle of the automatic wallet top-up modal, naming the balance",
2366
2369
  id: "auto_topup_modal.subtitle"
2367
2370
  },
2368
- { balance: l.value }
2371
+ { balance: u.value }
2369
2372
  )
2370
2373
  ), ae = s(
2371
- () => u.value === "ADD_PAYMENT_METHOD" ? a({
2374
+ () => l.value === "ADD_PAYMENT_METHOD" ? a({
2372
2375
  defaultMessage: "Back",
2373
2376
  description: "Button returning from adding a payment method to the auto top-up rule",
2374
2377
  id: "auto_topup_modal.add_payment_method.cancel"
@@ -2378,7 +2381,7 @@ const Zo = {
2378
2381
  id: "auto_topup_modal.cancel"
2379
2382
  })
2380
2383
  ), me = s(
2381
- () => u.value === "ADD_PAYMENT_METHOD" ? a({
2384
+ () => l.value === "ADD_PAYMENT_METHOD" ? a({
2382
2385
  defaultMessage: "Add payment method",
2383
2386
  description: "Button storing the payment method being added in the auto top-up modal",
2384
2387
  id: "auto_topup_modal.add_payment_method.confirm"
@@ -2389,88 +2392,88 @@ const Zo = {
2389
2392
  })
2390
2393
  );
2391
2394
  async function d() {
2392
- var Z;
2395
+ var ee;
2393
2396
  if (ne.value.$touch(), te.value)
2394
2397
  return;
2395
- const { saved: q, error: j } = await de(
2396
- St({
2397
- rule: (Z = g.value) == null ? void 0 : Z.validate(),
2398
+ const { saved: V, error: j } = await de(
2399
+ Pt({
2400
+ rule: (ee = h.value) == null ? void 0 : ee.validate(),
2398
2401
  walletBalanceItem: o.walletBalanceItem,
2399
- chargeTarget: v.value,
2400
- paymentMethodId: I.value
2402
+ chargeTarget: f.value,
2403
+ paymentMethodId: B.value
2401
2404
  })
2402
2405
  );
2403
- if (q) {
2406
+ if (V) {
2404
2407
  n("saved"), n("close");
2405
2408
  return;
2406
2409
  }
2407
2410
  j && n("payment-failed", j);
2408
2411
  }
2409
- const c = () => {
2410
- if (O.value) {
2411
- K();
2412
+ const m = () => {
2413
+ if (D.value) {
2414
+ G();
2412
2415
  return;
2413
2416
  }
2414
2417
  d();
2415
2418
  }, M = () => {
2416
- $(), n("payment-success");
2417
- }, V = () => {
2419
+ x(), n("payment-success");
2420
+ }, q = () => {
2418
2421
  if (!te.value) {
2419
- if (O.value) {
2420
- $();
2422
+ if (D.value) {
2423
+ x();
2421
2424
  return;
2422
2425
  }
2423
2426
  n("close");
2424
2427
  }
2425
- }, Y = E(0);
2426
- return ee(
2428
+ }, Y = $(0);
2429
+ return X(
2427
2430
  () => o.showModal,
2428
- (q) => {
2429
- q && (u.value = "AUTO_TOP_UP", I.value = void 0, Y.value += 1);
2431
+ (V) => {
2432
+ V && (l.value = "AUTO_TOP_UP", B.value = void 0, Y.value += 1);
2430
2433
  }
2431
- ), (q, j) => (w(), C(wt, {
2434
+ ), (V, j) => (w(), C(wt, {
2432
2435
  ref_key: "addPaymentMethodRef",
2433
- ref: P,
2436
+ ref: E,
2434
2437
  "show-modal": e.showModal,
2435
2438
  title: oe.value,
2436
2439
  "sub-title": pe.value,
2437
2440
  "cancel-button-text": ae.value,
2438
2441
  "confirm-button-text": me.value,
2439
2442
  "is-pending": te.value,
2440
- panes: r(nn),
2441
- step: u.value,
2443
+ panes: r(on),
2444
+ step: l.value,
2442
2445
  "add-payment-method-pane": "ADD_PAYMENT_METHOD",
2443
2446
  customer: e.customer,
2444
- "payment-method-options": r(_),
2445
- "is-payment-method-options-pending": r(f),
2446
- "is-adding-payment-method": r(O),
2447
- onConfirm: c,
2448
- onCancel: V,
2447
+ "payment-method-options": r(y),
2448
+ "is-payment-method-options-pending": r(P),
2449
+ "is-adding-payment-method": r(D),
2450
+ onConfirm: m,
2451
+ onCancel: q,
2449
2452
  onPaymentSuccess: M,
2450
- onPaymentFailed: j[1] || (j[1] = (Z) => q.$emit("payment-failed", Z))
2453
+ onPaymentFailed: j[1] || (j[1] = (ee) => V.$emit("payment-failed", ee))
2451
2454
  }, {
2452
- AUTO_TOP_UP: h(() => [
2453
- k("div", an, [
2454
- y.value ? (w(), C(_t, le({
2455
+ AUTO_TOP_UP: _(() => [
2456
+ N("div", nn, [
2457
+ g.value ? (w(), C(_t, le({
2455
2458
  key: Y.value,
2456
2459
  ref_key: "autoTopUpFormRef",
2457
- ref: g,
2460
+ ref: h,
2458
2461
  class: "sv-auto-topup-modal__rule"
2459
- }, y.value, {
2460
- config: x.value,
2462
+ }, g.value, {
2463
+ config: S.value,
2461
2464
  "always-enabled": "",
2462
2465
  disabled: te.value
2463
2466
  }), null, 16, ["config", "disabled"])) : R("", !0),
2464
- A(ft, {
2467
+ A(vt, {
2465
2468
  "pricing-plan-schedule-id": U.value,
2466
- "pricing-items": m.value
2469
+ "pricing-items": v.value
2467
2470
  }, null, 8, ["pricing-plan-schedule-id", "pricing-items"]),
2468
2471
  A(st, {
2469
- modelValue: I.value,
2470
- "onUpdate:modelValue": j[0] || (j[0] = (Z) => I.value = Z),
2472
+ modelValue: B.value,
2473
+ "onUpdate:modelValue": j[0] || (j[0] = (ee) => B.value = ee),
2471
2474
  class: "sv-auto-topup-modal__payment-method",
2472
- "payment-methods": r(G),
2473
- "payment-method-options": r(S),
2475
+ "payment-methods": r(J),
2476
+ "payment-method-options": r(p),
2474
2477
  disabled: te.value,
2475
2478
  error: r(ne).paymentMethodId.$errors,
2476
2479
  label: r(a)({
@@ -2478,14 +2481,14 @@ const Zo = {
2478
2481
  description: "Label above the payment method an automatic top-up is charged to",
2479
2482
  id: "auto_topup_modal.payment_method.label"
2480
2483
  }),
2481
- onAddPaymentMethod: r(b)
2484
+ onAddPaymentMethod: r(T)
2482
2485
  }, null, 8, ["modelValue", "payment-methods", "payment-method-options", "disabled", "error", "label", "onAddPaymentMethod"])
2483
2486
  ])
2484
2487
  ]),
2485
2488
  _: 1
2486
2489
  }, 8, ["show-modal", "title", "sub-title", "cancel-button-text", "confirm-button-text", "is-pending", "panes", "step", "customer", "payment-method-options", "is-payment-method-options-pending", "is-adding-payment-method"]));
2487
2490
  }
2488
- }), ln = { class: "sv-auto-topup-cancellation-modal sv-auto-topup-cancellation-modal__body flex flex-col gap-3" }, un = /* @__PURE__ */ z({
2491
+ }), sn = { class: "sv-auto-topup-cancellation-modal sv-auto-topup-cancellation-modal__body flex flex-col gap-3" }, ln = /* @__PURE__ */ z({
2489
2492
  __name: "AutoTopUpCancellationModal",
2490
2493
  props: {
2491
2494
  showModal: { type: Boolean },
@@ -2493,62 +2496,62 @@ const Zo = {
2493
2496
  },
2494
2497
  emits: ["confirmed", "close"],
2495
2498
  setup(e, { emit: t }) {
2496
- const o = e, n = t, { $t: a } = Q(), i = _e(), { formatValue: u } = ye(), { deactivateAutoTopUpConfig: l } = At(), p = E(!1), y = E(!1);
2497
- ee(
2499
+ const o = e, n = t, { $t: a } = Q(), i = _e(), { formatValue: l } = ye(), { deactivateAutoTopUpConfig: u } = At(), c = $(!1), g = $(!1);
2500
+ X(
2498
2501
  () => o.showModal,
2499
- (g) => {
2500
- g && (y.value = !1);
2502
+ (h) => {
2503
+ h && (g.value = !1);
2501
2504
  }
2502
2505
  );
2503
- const T = s(() => {
2504
- var U, I;
2505
- const g = (U = o.config) == null ? void 0 : U.threshold, m = (I = o.config) == null ? void 0 : I.topup_amount;
2506
- return !(g != null && g.amount) && !(g != null && g.credits) ? a({
2506
+ const b = s(() => {
2507
+ var U, B;
2508
+ const h = (U = o.config) == null ? void 0 : U.threshold, v = (B = o.config) == null ? void 0 : B.topup_amount;
2509
+ return !(h != null && h.amount) && !(h != null && h.credits) ? a({
2507
2510
  defaultMessage: "Your balance will no longer be topped up automatically. You can still top up whenever you want to.",
2508
2511
  description: "Explanation in the modal that turns a wallet automatic top-up off",
2509
2512
  id: "auto_topup_cancellation_modal.explanation"
2510
- }) : m ? a(
2513
+ }) : v ? a(
2511
2514
  {
2512
2515
  defaultMessage: "Your balance will no longer be topped up with {amount} when it falls below {threshold}. You can still top up whenever you want to.",
2513
2516
  description: "Explanation in the modal that turns a wallet automatic top-up off, naming what it charged and when",
2514
2517
  id: "auto_topup_cancellation_modal.explanation_with_amount"
2515
2518
  },
2516
- { amount: u({ amount: m }), threshold: u(g) }
2519
+ { amount: l({ amount: v }), threshold: l(h) }
2517
2520
  ) : a(
2518
2521
  {
2519
2522
  defaultMessage: "Your balance will no longer be topped up automatically when it falls below {threshold}. You can still top up whenever you want to.",
2520
2523
  description: "Explanation in the modal that turns a wallet automatic top-up off, naming the threshold",
2521
2524
  id: "auto_topup_cancellation_modal.explanation_with_threshold"
2522
2525
  },
2523
- { threshold: u(g) }
2526
+ { threshold: l(h) }
2524
2527
  );
2525
- }), x = async () => {
2526
- var m;
2527
- const g = (m = o.config) == null ? void 0 : m.id;
2528
- if (!(!g || p.value)) {
2529
- p.value = !0, y.value = !1;
2528
+ }), S = async () => {
2529
+ var v;
2530
+ const h = (v = o.config) == null ? void 0 : v.id;
2531
+ if (!(!h || c.value)) {
2532
+ c.value = !0, g.value = !1;
2530
2533
  try {
2531
- await l(g), n("confirmed"), n("close");
2534
+ await u(h), n("confirmed"), n("close");
2532
2535
  } catch (U) {
2533
2536
  i.error(
2534
2537
  "AUTO_TOP_UP_CANCELLATION_FAILED",
2535
2538
  "Failed to turn off a wallet's automatic top-up",
2536
2539
  {},
2537
2540
  U
2538
- ), y.value = !0;
2541
+ ), g.value = !0;
2539
2542
  } finally {
2540
- p.value = !1;
2543
+ c.value = !1;
2541
2544
  }
2542
2545
  }
2543
- }, v = () => {
2544
- p.value || n("close");
2546
+ }, f = () => {
2547
+ c.value || n("close");
2545
2548
  };
2546
- return (g, m) => (w(), C(r(lt), {
2549
+ return (h, v) => (w(), C(r(lt), {
2547
2550
  size: "sm",
2548
2551
  "show-modal": e.showModal,
2549
- "is-loading": p.value,
2550
- "no-click-away": p.value,
2551
- "no-backdrop-close": p.value,
2552
+ "is-loading": c.value,
2553
+ "no-click-away": c.value,
2554
+ "no-backdrop-close": c.value,
2552
2555
  title: r(a)({
2553
2556
  defaultMessage: "Turn off automatic top-up",
2554
2557
  description: "Title of the modal that turns a wallet automatic top-up off",
@@ -2564,23 +2567,23 @@ const Zo = {
2564
2567
  description: "Button dismissing the modal that turns a wallet automatic top-up off",
2565
2568
  id: "auto_topup_cancellation_modal.cancel"
2566
2569
  }),
2567
- onConfirm: x,
2568
- onClose: v
2570
+ onConfirm: S,
2571
+ onClose: f
2569
2572
  }, {
2570
- body: h(() => [
2571
- k("div", ln, [
2572
- A(r(X), {
2573
+ body: _(() => [
2574
+ N("div", sn, [
2575
+ A(r(K), {
2573
2576
  variant: "body-sm",
2574
2577
  color: "subtle",
2575
2578
  tag: "p",
2576
2579
  class: "sv-auto-topup-cancellation-modal__explanation"
2577
2580
  }, {
2578
- default: h(() => [
2579
- F(N(T.value), 1)
2581
+ default: _(() => [
2582
+ F(I(b.value), 1)
2580
2583
  ]),
2581
2584
  _: 1
2582
2585
  }),
2583
- y.value ? (w(), C(r(Ke), {
2586
+ g.value ? (w(), C(r(Ke), {
2584
2587
  key: 0,
2585
2588
  class: "sv-auto-topup-cancellation-modal__error sv-error",
2586
2589
  title: r(a)({
@@ -2594,7 +2597,7 @@ const Zo = {
2594
2597
  _: 1
2595
2598
  }, 8, ["show-modal", "is-loading", "no-click-away", "no-backdrop-close", "title", "confirm-button-text", "cancel-button-text"]));
2596
2599
  }
2597
- }), kn = /* @__PURE__ */ z({
2600
+ }), Nn = /* @__PURE__ */ z({
2598
2601
  inheritAttrs: !1,
2599
2602
  __name: "CustomerWalletBalances",
2600
2603
  props: {
@@ -2608,26 +2611,23 @@ const Zo = {
2608
2611
  },
2609
2612
  emits: ["top-up-charged", "auto-top-up-saved", "auto-top-up-cancelled", "payment-method-stored", "payment-failed"],
2610
2613
  setup(e, { emit: t }) {
2611
- const o = e, n = t, { $t: a } = Q(), i = E(), u = s(
2612
- () => Re(o.walletBalances, i.value)
2613
- ), l = s(() => !!u.value), p = E(), y = s(() => !!p.value), T = s(
2614
- () => Re(o.walletBalances, p.value)
2615
- ), x = E(), v = s(() => !!x.value);
2616
- return (g, m) => (w(), W(ge, null, [
2614
+ const o = e, n = t, { $t: a } = Q(), i = $(), l = s(
2615
+ () => ke(o.walletBalances, i.value)
2616
+ ), u = s(() => !!l.value), c = $(), g = s(() => !!c.value), b = s(
2617
+ () => ke(o.walletBalances, c.value)
2618
+ ), S = $(), f = s(() => !!S.value);
2619
+ return (h, v) => (w(), W(he, null, [
2617
2620
  e.isLoading ? (w(), C(et, le({
2618
2621
  key: 0,
2619
2622
  variant: "section"
2620
- }, g.$attrs, {
2621
- class: "sv-wallet-balances sv-root sv-component sv-loading min-h-48",
2622
- "data-testid": "customer-wallet-balances-skeleton"
2623
- }), null, 16)) : e.hasError ? (w(), C(r(Ke), le({ key: 1 }, g.$attrs, {
2623
+ }, h.$attrs, { class: "sv-wallet-balances sv-root sv-component sv-loading min-h-48" }), null, 16)) : e.hasError ? (w(), C(r(Ke), le({ key: 1 }, h.$attrs, {
2624
2624
  class: "sv-wallet-balances sv-root sv-component sv-error",
2625
2625
  title: r(a)({
2626
2626
  defaultMessage: "Could not load wallet balances",
2627
2627
  description: "Error shown when wallet balances fail to load",
2628
2628
  id: "wallet_balance.load_failed"
2629
2629
  })
2630
- }), null, 16, ["title"])) : e.walletBalances.length > 0 ? (w(), C(r(co), le({ key: 2 }, g.$attrs, {
2630
+ }), null, 16, ["title"])) : e.walletBalances.length > 0 ? (w(), C(r(po), le({ key: 2 }, h.$attrs, {
2631
2631
  class: "sv-wallet-balances sv-root sv-component",
2632
2632
  "customer-wallet-balances": e.walletBalances,
2633
2633
  "show-auto-top-up": "",
@@ -2640,45 +2640,49 @@ const Zo = {
2640
2640
  },
2641
2641
  { count: String(e.walletBalances.length) }
2642
2642
  ),
2643
- onTopUp: m[0] || (m[0] = (U) => i.value = U),
2644
- onAutoTopUp: m[1] || (m[1] = (U) => p.value = U),
2645
- onCancelAutoTopUp: m[2] || (m[2] = (U) => x.value = U)
2643
+ onTopUp: v[0] || (v[0] = (U) => i.value = U),
2644
+ onAutoTopUp: v[1] || (v[1] = (U) => c.value = U),
2645
+ onCancelAutoTopUp: v[2] || (v[2] = (U) => S.value = U)
2646
2646
  }), null, 16, ["customer-wallet-balances", "title"])) : R("", !0),
2647
- e.showTopUpButton ? (w(), C(on, {
2647
+ e.showTopUpButton ? (w(), C(tn, {
2648
2648
  key: 3,
2649
- "show-modal": l.value,
2650
- "selected-balance-item": u.value,
2649
+ "show-modal": u.value,
2650
+ "selected-balance-item": l.value,
2651
2651
  "payment-methods": e.paymentMethods,
2652
2652
  customer: e.customer,
2653
2653
  subscriptions: e.subscriptions,
2654
- onClose: m[3] || (m[3] = (U) => i.value = void 0),
2655
- onConfirm: m[4] || (m[4] = (U) => n("top-up-charged")),
2656
- onPaymentSuccess: m[5] || (m[5] = (U) => n("payment-method-stored")),
2657
- onPaymentFailed: m[6] || (m[6] = (U) => n("payment-failed", U))
2654
+ onClose: v[3] || (v[3] = (U) => i.value = void 0),
2655
+ onConfirm: v[4] || (v[4] = (U) => n("top-up-charged")),
2656
+ onPaymentSuccess: v[5] || (v[5] = (U) => n("payment-method-stored")),
2657
+ onPaymentFailed: v[6] || (v[6] = (U) => n("payment-failed", U))
2658
2658
  }, null, 8, ["show-modal", "selected-balance-item", "payment-methods", "customer", "subscriptions"])) : R("", !0),
2659
- e.showTopUpButton ? (w(), C(sn, {
2659
+ e.showTopUpButton ? (w(), C(an, {
2660
2660
  key: 4,
2661
- "show-modal": y.value,
2662
- "wallet-balance-item": T.value,
2663
- "top-up-item": p.value,
2661
+ "show-modal": g.value,
2662
+ "wallet-balance-item": b.value,
2663
+ "top-up-item": c.value,
2664
2664
  "payment-methods": e.paymentMethods,
2665
2665
  customer: e.customer,
2666
- onClose: m[7] || (m[7] = (U) => p.value = void 0),
2667
- onSaved: m[8] || (m[8] = (U) => n("auto-top-up-saved")),
2668
- onPaymentSuccess: m[9] || (m[9] = (U) => n("payment-method-stored")),
2669
- onPaymentFailed: m[10] || (m[10] = (U) => n("payment-failed", U))
2666
+ onClose: v[7] || (v[7] = (U) => c.value = void 0),
2667
+ onSaved: v[8] || (v[8] = (U) => n("auto-top-up-saved")),
2668
+ onPaymentSuccess: v[9] || (v[9] = (U) => n("payment-method-stored")),
2669
+ onPaymentFailed: v[10] || (v[10] = (U) => n("payment-failed", U))
2670
2670
  }, null, 8, ["show-modal", "wallet-balance-item", "top-up-item", "payment-methods", "customer"])) : R("", !0),
2671
- e.showTopUpButton ? (w(), C(un, {
2671
+ e.showTopUpButton ? (w(), C(ln, {
2672
2672
  key: 5,
2673
- "show-modal": v.value,
2674
- config: x.value,
2675
- onClose: m[11] || (m[11] = (U) => x.value = void 0),
2676
- onConfirmed: m[12] || (m[12] = (U) => n("auto-top-up-cancelled"))
2673
+ "show-modal": f.value,
2674
+ config: S.value,
2675
+ onClose: v[11] || (v[11] = (U) => S.value = void 0),
2676
+ onConfirmed: v[12] || (v[12] = (U) => n("auto-top-up-cancelled"))
2677
2677
  }, null, 8, ["show-modal", "config"])) : R("", !0)
2678
2678
  ], 64));
2679
2679
  }
2680
2680
  });
2681
2681
  export {
2682
- kn as _,
2683
- Nn as u
2682
+ Nn as _,
2683
+ St as a,
2684
+ bt as b,
2685
+ $o as c,
2686
+ wt as d,
2687
+ Dn as u
2684
2688
  };