@solvimon/solvimon-web 0.1.0-alpha.20 → 0.1.0-alpha.22

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 (636) hide show
  1. package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Co3XAxaY.js +1 -0
  2. package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DFv-awxb.mjs +223 -0
  3. package/dist/Amount.vue.es-DExaYBqm.js +1 -0
  4. package/dist/Amount.vue.es-DPqHB8Xd.mjs +22 -0
  5. package/dist/Avatar.vue.es-D42J_izE.js +1 -0
  6. package/dist/Avatar.vue.es-DNJ-jexx.mjs +81 -0
  7. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-BEVkWJXT.js +1 -0
  8. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-D1uVidXk.mjs +60 -0
  9. package/dist/Button.vue.es-Dz-2L8dJ.mjs +368 -0
  10. package/dist/Button.vue.es-M_jXZda4.js +1 -0
  11. package/dist/Checkout.entry.ce-B5-0AM67.mjs +3747 -0
  12. package/dist/Checkout.entry.ce-C52gkrNZ.js +1 -0
  13. package/dist/Chip.vue.es-DMK9C78d.mjs +114 -0
  14. package/dist/Chip.vue.es-G8doKsZb.js +1 -0
  15. package/dist/Comparators.vue.es-CwhX3rbx.mjs +93 -0
  16. package/dist/Comparators.vue.es-DmkxV0gb.js +1 -0
  17. package/dist/ContentWithAsideLayout-Bnbsq8_5.mjs +32 -0
  18. package/dist/ContentWithAsideLayout-C6yMIVJF.js +1 -0
  19. package/dist/ContextMenu.vue.es-B3Rz6Ojk.js +1 -0
  20. package/dist/ContextMenu.vue.es-CzkkNoJG.mjs +573 -0
  21. package/dist/CustomerBillingInformation.vue.es-BmtU9Pk0.js +1 -0
  22. package/dist/CustomerBillingInformation.vue.es-Db6bN2RZ.mjs +153 -0
  23. package/dist/CustomerPaymentMethods.lib-B_753rau.mjs +4 -0
  24. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BGHaTx1A.js +1 -0
  25. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-fESZVyPe.mjs +140 -0
  26. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-Cnlbp0om.js +1 -0
  27. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DdMHG1_Y.mjs +2684 -0
  28. package/dist/Divider.vue.es-DnP_HqLz.mjs +22 -0
  29. package/dist/Divider.vue.es-UwnWvUTl.js +1 -0
  30. package/dist/DividerText.vue.es-D-QxT2OD.js +1 -0
  31. package/dist/DividerText.vue.es-IK2fns6f.mjs +56 -0
  32. package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CM_8Asmw.js +1 -0
  33. package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-lhJnqrrh.mjs +335 -0
  34. package/dist/ErrorNotification.vue.es-BGckEwHf.mjs +31 -0
  35. package/dist/ErrorNotification.vue.es-Cd2UKPAz.js +1 -0
  36. package/dist/Expand.vue.es-BleuAfDz.mjs +32 -0
  37. package/dist/Expand.vue.es-BtM0EZEr.js +1 -0
  38. package/dist/FormMessage.vue.es-dqATjC2N.js +1 -0
  39. package/dist/FormMessage.vue.es-jG3fQZms.mjs +29 -0
  40. package/dist/IconButton.vue.es-BTAkuFsm.js +1 -0
  41. package/dist/IconButton.vue.es-C4dQEQAc.mjs +198 -0
  42. package/dist/IconTitle.vue.es-BmX68uJx.mjs +103 -0
  43. package/dist/IconTitle.vue.es-CmR2xoeu.js +1 -0
  44. package/dist/Input.vue.es-BGPELaZU.mjs +235 -0
  45. package/dist/Input.vue.es-CTOrmrcB.js +1 -0
  46. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-CMEOOuSU.mjs +92 -0
  47. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-bheNAKzK.js +1 -0
  48. package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-Xo9BR6AD.js +1 -0
  49. package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-avhwysNq.mjs +41 -0
  50. package/dist/InvoiceSummary.vue.es-BWLiwlNs.mjs +2585 -0
  51. package/dist/InvoiceSummary.vue.es-hpG8Tq1D.js +1 -0
  52. package/dist/Modal.vue.es-BD4vUaOQ.js +1 -0
  53. package/dist/Modal.vue.es-B_G8NQS2.mjs +387 -0
  54. package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-BnilyGBO.mjs +144 -0
  55. package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-CSv-Luvz.js +1 -0
  56. package/dist/PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DIJbzWMV.js +1 -0
  57. package/dist/PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DuorCFo9.mjs +51 -0
  58. package/dist/PaymentHistoryBlock-ComJzB3H.mjs +4 -0
  59. package/dist/{PaymentHistoryBlock-Ci8aSJeb.js → PaymentHistoryBlock-DSHW_eW1.js} +1 -1
  60. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DUN0Hf2v.js +1 -0
  61. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-hjtksV2D.mjs +93 -0
  62. package/dist/PaymentIntegrationForm-CH5B6BY5.mjs +4 -0
  63. package/dist/{PaymentIntegrationForm-CsuueDE0.js → PaymentIntegrationForm-CwfCLnKt.js} +1 -1
  64. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-BqYk4_T9.mjs +138 -0
  65. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-DzSQC951.js +1 -0
  66. package/dist/PaymentIntegrationFormAdyen-DfN7cPYZ.mjs +621 -0
  67. package/dist/PaymentIntegrationFormAdyen-Q48aDXR7.js +98 -0
  68. package/dist/PaymentIntegrationFormStripe-BSEqarl7.js +102 -0
  69. package/dist/PaymentIntegrationFormStripe-CBsXDuhy.mjs +488 -0
  70. package/dist/PaymentMethod.vue.es-D18g-QB4.js +1 -0
  71. package/dist/PaymentMethod.vue.es-DkQdPXfk.mjs +623 -0
  72. package/dist/PaymentMethodForm-CpIZKfPH.mjs +4 -0
  73. package/dist/{PaymentMethodForm-hZuVHAti.js → PaymentMethodForm-DK8ntFA0.js} +1 -1
  74. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-C1tGJsay.mjs +167 -0
  75. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-D7fDguwa.js +1 -0
  76. package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-C6BcIkEV.mjs +169 -0
  77. package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-H3vrPllf.js +1 -0
  78. package/dist/PlanCustomizationEditor-0zCXN-cv.mjs +877 -0
  79. package/dist/PlanCustomizationEditor-XpofGULc.js +1 -0
  80. package/dist/PricingGroupRangeInput.vue.es-8_5nfZDI.mjs +627 -0
  81. package/dist/PricingGroupRangeInput.vue.es-QnpfHxaY.js +185 -0
  82. package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-CGJhKKNL.js +1 -0
  83. package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-t6h1j6WD.mjs +131 -0
  84. package/dist/RadioGroupExtended.vue.es-C92xlCFQ.mjs +163 -0
  85. package/dist/RadioGroupExtended.vue.es-Cb1iD73r.js +1 -0
  86. package/dist/Section.vue.es-Btff-cLY.js +1 -0
  87. package/dist/Section.vue.es-DQ5H7mqW.mjs +72 -0
  88. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BfvX14E3.js +1 -0
  89. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DKsunuGT.mjs +687 -0
  90. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-DRLoYWGY.mjs +51 -0
  91. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-DypW8aNJ.js +1 -0
  92. package/dist/SubscriptionSchedules-Dc0rUnnf.mjs +4 -0
  93. package/dist/SubscriptionSchedules-pzNsego6.js +1 -0
  94. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-Brs9qDs5.mjs +5291 -0
  95. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-nmVRb6hj.js +1 -0
  96. package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-C1mkIPMr.mjs +91 -0
  97. package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-s5_uhyuB.js +1 -0
  98. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-CFmCJK8M.js +1 -0
  99. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-DSoNs7Xx.mjs +284 -0
  100. package/dist/TooltipParagraph.vue.es-BaqCDjl8.js +1 -0
  101. package/dist/TooltipParagraph.vue.es-CIedcXGT.mjs +129 -0
  102. package/dist/TrialChip.vue.es-BzNI94k0.js +1 -0
  103. package/dist/TrialChip.vue.es-DkBuMNr_.mjs +35 -0
  104. package/dist/accel.svg.es-C0hqmmEY.mjs +4 -0
  105. package/dist/accel.svg.es-DFJXdioD.js +1 -0
  106. package/dist/ach.svg.es-BYP873jU.js +1 -0
  107. package/dist/ach.svg.es-DduMiYM2.mjs +4 -0
  108. package/dist/adyen-BJfC7N6f.js +1 -0
  109. package/dist/adyen-Bugab0JE.mjs +4 -0
  110. package/dist/adyen-CvsH5fok.mjs +117 -0
  111. package/dist/adyen-Druit6gz.js +1 -0
  112. package/dist/adyenSdk-B01MB9Ia.mjs +58 -0
  113. package/dist/adyenSdk-BP2XXzeJ.js +1 -0
  114. package/dist/amazon-pay.svg.es-BACIX6C7.mjs +4 -0
  115. package/dist/amazon-pay.svg.es-CQWgtowB.js +1 -0
  116. package/dist/amex.svg.es-DKhW4Txt.js +1 -0
  117. package/dist/amex.svg.es-DjTEMRVg.mjs +4 -0
  118. package/dist/api.es-QaC926Xu.mjs +43 -0
  119. package/dist/api.es-duCDtZD9.js +1 -0
  120. package/dist/apple-pay.svg.es-B3tkA54p.mjs +4 -0
  121. package/dist/apple-pay.svg.es-Dyojd0F-.js +1 -0
  122. package/dist/bacs.svg.es-CZIjZIE8.mjs +4 -0
  123. package/dist/bacs.svg.es-GJpZs1sD.js +1 -0
  124. package/dist/bancontact.svg.es-B26-JwdE.mjs +4 -0
  125. package/dist/bancontact.svg.es-BQh7nAup.js +1 -0
  126. package/dist/carnet.svg.es-BtO3AmNu.mjs +4 -0
  127. package/dist/carnet.svg.es-DY04-F2L.js +1 -0
  128. package/dist/cartes-bancaires.svg.es-BleHMlkN.js +1 -0
  129. package/dist/cartes-bancaires.svg.es-DEPpdLvi.mjs +4 -0
  130. package/dist/cashapp.svg.es-DOGwRjXp.mjs +4 -0
  131. package/dist/cashapp.svg.es-MwXGYom6.js +1 -0
  132. package/dist/{cn.es-BEU5D0Wz.mjs → cn.es-BGqYNPM3.mjs} +657 -927
  133. package/dist/cn.es-CvmLj7KH.js +1 -0
  134. package/dist/comparators.es-D8WGL-c4.mjs +153 -0
  135. package/dist/comparators.es-OGt19O9U.js +1 -0
  136. package/dist/component-5wqcK7yz.mjs +8 -0
  137. package/dist/component-B7ZDyqBp.js +1 -0
  138. package/dist/components/BillingInformation/BillingInformation.cjs +1 -1
  139. package/dist/components/BillingInformation/BillingInformation.mjs +39 -48
  140. package/dist/components/BillingInformationForm/BillingInformationForm.cjs +1 -1
  141. package/dist/components/BillingInformationForm/BillingInformationForm.mjs +256 -307
  142. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs +1 -1
  143. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +43 -52
  144. package/dist/components/Invoice/Invoice.cjs +1 -1
  145. package/dist/components/Invoice/Invoice.mjs +372 -430
  146. package/dist/components/InvoiceDetails/InvoiceDetails.cjs +1 -1
  147. package/dist/components/InvoiceDetails/InvoiceDetails.mjs +55 -65
  148. package/dist/components/InvoiceHeader/InvoiceHeader.cjs +1 -1
  149. package/dist/components/InvoiceHeader/InvoiceHeader.mjs +41 -46
  150. package/dist/components/InvoicesList/InvoicesList.cjs +1 -1
  151. package/dist/components/InvoicesList/InvoicesList.mjs +43 -53
  152. package/dist/components/PaymentHistory/PaymentHistory.cjs +1 -1
  153. package/dist/components/PaymentHistory/PaymentHistory.mjs +58 -68
  154. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs +1 -1
  155. package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +51 -63
  156. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs +1 -1
  157. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +41 -50
  158. package/dist/components/SubscriptionsList/SubscriptionsList.cjs +1 -1
  159. package/dist/components/SubscriptionsList/SubscriptionsList.mjs +49 -60
  160. package/dist/components/WalletBalances/WalletBalances.cjs +1 -1
  161. package/dist/components/WalletBalances/WalletBalances.mjs +59 -70
  162. package/dist/configuration-BytDBAWs.mjs +14 -0
  163. package/dist/configuration-akTS7Wiw.js +1 -0
  164. package/dist/core/index.cjs +1 -1
  165. package/dist/core/index.mjs +89 -104
  166. package/dist/{countryData.es--zJAd6LA.mjs → countryData.es-BegoD-cZ.mjs} +2 -2
  167. package/dist/countryData.es-C4jHBzfo.js +1 -0
  168. package/dist/customElements-CSE7dwUr.mjs +6561 -0
  169. package/dist/customElements-Vox1PB6G.js +1211 -0
  170. package/dist/customer-5krPxZ8i.mjs +31 -0
  171. package/dist/customer-Dsq-Moea.js +1 -0
  172. package/dist/customer.es-B5ppZf0j.mjs +20 -0
  173. package/dist/customer.es-BButyYo0.js +1 -0
  174. package/dist/dana.svg.es-BDtZLpwd.js +1 -0
  175. package/dist/dana.svg.es-Cy8Q6DZi.mjs +4 -0
  176. package/dist/dankort.svg.es-B7VqJdWq.mjs +4 -0
  177. package/dist/dankort.svg.es-CksaipXF.js +1 -0
  178. package/dist/{de-DE-_40QfLNJ.js → de-DE-BSlbAnPE.js} +1 -1
  179. package/dist/de-DE-C3DzP1nj.js +1 -0
  180. package/dist/{de-DE-BeyQVhTv.mjs → de-DE-DXsG-vXA.mjs} +46 -59
  181. package/dist/{de-DE-CI2zQkiP.mjs → de-DE-DsFtpLsx.mjs} +7 -5
  182. package/dist/diners.svg.es-BP9enCow.mjs +4 -0
  183. package/dist/diners.svg.es-D6Mu1pqP.js +1 -0
  184. package/dist/discover.svg.es-DEsEJBYh.mjs +4 -0
  185. package/dist/discover.svg.es-DgqWCMUM.js +1 -0
  186. package/dist/eftpos.svg.es--js6-yfk.mjs +4 -0
  187. package/dist/eftpos.svg.es-Dk2DOT8W.js +1 -0
  188. package/dist/elo.svg.es-C-BzjuRP.js +1 -0
  189. package/dist/elo.svg.es-CMZPAxcn.mjs +4 -0
  190. package/dist/{en-US--NRsi7Hz.js → en-US-9xdcz3T5.js} +1 -1
  191. package/dist/{en-US-5YWNEi-V.mjs → en-US-C939IZ5i.mjs} +50 -63
  192. package/dist/{en-US-DksUWPIu.mjs → en-US-DvkvbV0p.mjs} +7 -5
  193. package/dist/en-US-X_pSFsNm.js +1 -0
  194. package/dist/eps.svg.es-B_85bP-W.js +1 -0
  195. package/dist/eps.svg.es-CzIPBSb9.mjs +4 -0
  196. package/dist/error-BHVZJGwD.mjs +13 -0
  197. package/dist/error-CmduqgVq.js +1 -0
  198. package/dist/floating-ui.vue.es-Bly3DGWm.js +1 -0
  199. package/dist/floating-ui.vue.es-CYt0fSY7.mjs +1108 -0
  200. package/dist/formatting.es-C72Nsrmh.js +1 -0
  201. package/dist/formatting.es-RclXHhKo.mjs +61 -0
  202. package/dist/gcash.svg.es-BKAdhWzv.js +1 -0
  203. package/dist/gcash.svg.es-BpDtvraq.mjs +4 -0
  204. package/dist/getComposedString.es-C__uhJpd.mjs +10 -0
  205. package/dist/getComposedString.es-haS4bAj7.js +1 -0
  206. package/dist/getCountryNameByCode.es-BDHua7VM.mjs +8 -0
  207. package/dist/getCountryNameByCode.es-Xxc0nZsH.js +1 -0
  208. package/dist/girocard.svg.es-HSOEvDif.js +1 -0
  209. package/dist/girocard.svg.es-Riswtk8Z.mjs +4 -0
  210. package/dist/go-pay.svg.es-CiIyLELZ.mjs +4 -0
  211. package/dist/go-pay.svg.es-DQjtunZ_.js +1 -0
  212. package/dist/google-pay.svg.es-Dgj_N6nz.mjs +4 -0
  213. package/dist/google-pay.svg.es-hzc_EgiJ.js +1 -0
  214. package/dist/hipercard.svg.es-B80bu8Vd.mjs +4 -0
  215. package/dist/hipercard.svg.es-CbCsRY2q.js +1 -0
  216. package/dist/icon-sprite.svg.es-Bt21fMEt.mjs +4 -0
  217. package/dist/icon-sprite.svg.es-Dauis9LS.js +1 -0
  218. package/dist/ideal.svg.es-Booz1IML.js +1 -0
  219. package/dist/ideal.svg.es-DaqTS2Ax.mjs +4 -0
  220. package/dist/index-BPU8tIml.mjs +828 -0
  221. package/dist/index-BPZPnOQQ.js +7 -0
  222. package/dist/index-CTwLxoOS.mjs +7250 -0
  223. package/dist/index-DwueOtPi.js +1 -0
  224. package/dist/index.cjs +1 -1
  225. package/dist/index.es-BclokHQX.js +1 -0
  226. package/dist/index.es-CXkP_k3u.mjs +345 -0
  227. package/dist/index.mjs +40 -40
  228. package/dist/invoices-DRgfpkJ6.mjs +118 -0
  229. package/dist/invoices-xOV2YaEV.js +1 -0
  230. package/dist/{it-IT-B6blp8MI.mjs → it-IT-BxpwB3oJ.mjs} +46 -59
  231. package/dist/it-IT-DT3rfjOY.js +1 -0
  232. package/dist/{it-IT-CMy1tHKZ.mjs → it-IT-TE7oqvXa.mjs} +7 -5
  233. package/dist/it-IT-YBtHAao1.js +1 -0
  234. package/dist/jcb.svg.es-B3WPB8c2.js +1 -0
  235. package/dist/jcb.svg.es-Couw-2p9.mjs +4 -0
  236. package/dist/kakao-pay.svg.es-CIFT8fob.mjs +4 -0
  237. package/dist/kakao-pay.svg.es-Cs-lCW74.js +1 -0
  238. package/dist/klarna.svg.es-Cs6XaHD7.js +1 -0
  239. package/dist/klarna.svg.es-WKt8_NZa.mjs +4 -0
  240. package/dist/maestro.svg.es-BvK4oPg4.js +1 -0
  241. package/dist/maestro.svg.es-DbdxwYUE.mjs +4 -0
  242. package/dist/mastercard.svg.es-B7T3PS12.mjs +4 -0
  243. package/dist/mastercard.svg.es-lp4AXyyV.js +1 -0
  244. package/dist/momo.svg.es-C5aLYf_R.js +1 -0
  245. package/dist/momo.svg.es-X5XB25fM.mjs +4 -0
  246. package/dist/nl-NL-C8wnyKju.js +1 -0
  247. package/dist/nl-NL-DfkhOJKc.js +1 -0
  248. package/dist/{nl-NL-CckNM7R9.mjs → nl-NL-Di3-JArV.mjs} +7 -5
  249. package/dist/{nl-NL-CjoW8r_M.mjs → nl-NL-na2I4aiP.mjs} +46 -59
  250. package/dist/nyce.svg.es-ArAivAZW.js +1 -0
  251. package/dist/nyce.svg.es-DcPsO_sh.mjs +4 -0
  252. package/dist/object.es-8aLDIncs.mjs +12 -0
  253. package/dist/object.es-CdriXMPs.js +1 -0
  254. package/dist/open-banking.svg.es-C4mPhwsn.mjs +4 -0
  255. package/dist/open-banking.svg.es-Q3rRkCvP.js +1 -0
  256. package/dist/paymentMethods-CRDIw9lz.js +1 -0
  257. package/dist/paymentMethods-PmkHYomw.mjs +75 -0
  258. package/dist/payments-Dvqh6CGW.mjs +45 -0
  259. package/dist/payments-jAgXhdp_.js +1 -0
  260. package/dist/paypal.svg.es-BC2AP20j.mjs +4 -0
  261. package/dist/paypal.svg.es-Cjp5sNI3.js +1 -0
  262. package/dist/pricing-BVAld27Y.js +1 -0
  263. package/dist/pricing-DLOeiAIB.mjs +16 -0
  264. package/dist/pricingItemConfigs.es-D4aYkYcf.js +1 -0
  265. package/dist/pricingItemConfigs.es-ORxsk_YS.mjs +77 -0
  266. package/dist/pricingPlanSchedule-BM8vsKkV.js +1 -0
  267. package/dist/pricingPlanSchedule-BPrS2WRd.mjs +132 -0
  268. package/dist/pulse.svg.es-Dit33E8S.js +1 -0
  269. package/dist/pulse.svg.es-Rmoz-9Ej.mjs +4 -0
  270. package/dist/screens/Checkout/Checkout.cjs +1 -1
  271. package/dist/screens/Checkout/Checkout.mjs +3 -5237
  272. package/dist/screens/CustomerOverview/CustomerOverview.cjs +1 -1
  273. package/dist/screens/CustomerOverview/CustomerOverview.mjs +112 -138
  274. package/dist/screens/PayInvoice/PayInvoice.cjs +1 -1
  275. package/dist/screens/PayInvoice/PayInvoice.mjs +348 -397
  276. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs +1 -1
  277. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +153 -170
  278. package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs +1 -1
  279. package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +609 -720
  280. package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs +1 -1
  281. package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +466 -555
  282. package/dist/sepa.svg.es-0t4DKeA1.js +1 -0
  283. package/dist/sepa.svg.es-DIO_K345.mjs +4 -0
  284. package/dist/slots.es-BA4MyEAa.mjs +5 -0
  285. package/dist/slots.es-T9ZJRGtG.js +1 -0
  286. package/dist/sorting.es-DCihKqD2.mjs +77 -0
  287. package/dist/sorting.es-DQsjKr8A.js +1 -0
  288. package/dist/star.svg.es-BUZNUnYq.mjs +4 -0
  289. package/dist/star.svg.es-D2JncY7b.js +1 -0
  290. package/dist/subscription-CrVOr5MF.mjs +69 -0
  291. package/dist/subscription-ZA62t4E9.js +1 -0
  292. package/dist/subscriptions-XDyI2Cqm.mjs +55 -0
  293. package/dist/subscriptions-fJcj88X9.js +1 -0
  294. package/dist/trustly.svg.es-AM7Ha-3Y.mjs +4 -0
  295. package/dist/trustly.svg.es-GJByiFAs.js +1 -0
  296. package/dist/twint.svg.es-BJ2f48og.js +1 -0
  297. package/dist/twint.svg.es-DZogAQG6.mjs +4 -0
  298. package/dist/typeGuards.es-B4XMtlkM.mjs +8 -0
  299. package/dist/typeGuards.es-DS3vZaJn.js +1 -0
  300. package/dist/types/components/customer/CheckoutForm/CheckoutForm.types.d.ts +1 -0
  301. package/dist/types/components/payments/PaymentCompletedCard/PaymentCompletedCard.types.d.ts +6 -0
  302. package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +7 -0
  303. package/dist/types/components/payments/PaymentIntegrationFormStripe/PaymentIntegrationFormStripeFrame.types.d.ts +2 -1
  304. package/dist/types/components/subscriptions/PlanCustomizationForm/PlanCustomizationEditor.types.d.ts +1 -0
  305. package/dist/types/components/subscriptions/PlanCustomizationForm/UnitsEditor.types.d.ts +6 -0
  306. package/dist/types/components/subscriptions/PlanCustomizationForm/UnitsEditorItem.types.d.ts +6 -0
  307. package/dist/types/composables/useInvoicePreview.types.d.ts +1 -0
  308. package/dist/types/public/components/Invoice/Invoice.types.d.ts +1 -1
  309. package/dist/types/public/components/InvoiceHeader/InvoiceHeader.types.d.ts +1 -1
  310. package/dist/types/public/components/PaymentMethodForm/PaymentMethodForm.types.d.ts +7 -0
  311. package/dist/types/public/screens/PayInvoice/PayInvoice.types.d.ts +1 -1
  312. package/dist/unionpay.svg.es-DjFZ5EMQ.js +1 -0
  313. package/dist/unionpay.svg.es-me7q-nTI.mjs +4 -0
  314. package/dist/url-BNKStNY9.js +1 -0
  315. package/dist/url-DwiuKYpu.mjs +20 -0
  316. package/dist/useActionDispatchProvider-B8-oycQk.mjs +11 -0
  317. package/dist/useActionDispatchProvider-CNAuaHdm.js +1 -0
  318. package/dist/useCustomer-CP8eWUZV.mjs +20 -0
  319. package/dist/useCustomer-DSx-wN-6.js +1 -0
  320. package/dist/useCustomerFormLabels-DW6jnDYH.mjs +968 -0
  321. package/dist/useCustomerFormLabels-TVTgy0MT.js +1 -0
  322. package/dist/useExperimentalFeature-BvE_EOX-.mjs +6 -0
  323. package/dist/useExperimentalFeature-CC-DrIcL.js +1 -0
  324. package/dist/useIncrementalLoading-CaWOE8Xl.js +1 -0
  325. package/dist/useIncrementalLoading-Cgxw2GD7.mjs +48 -0
  326. package/dist/useInvoiceData-CRRPdXc6.js +1 -0
  327. package/dist/useInvoiceData-D8ds05CX.mjs +38 -0
  328. package/dist/useInvoicesList-DIfQcvER.js +1 -0
  329. package/dist/useInvoicesList-SJU5YWBQ.mjs +500 -0
  330. package/dist/useLoadInitialData-DsabgMLZ.js +1 -0
  331. package/dist/useLoadInitialData-MUljS38K.mjs +15 -0
  332. package/dist/usePaymentMethodAvailability-Bt7P9InI.js +1 -0
  333. package/dist/usePaymentMethodAvailability-D0NUanyF.mjs +118 -0
  334. package/dist/usePaymentMethodOptions-B7JYkGsw.mjs +37 -0
  335. package/dist/usePaymentMethodOptions-cT1o-BA1.js +1 -0
  336. package/dist/usePaymentMethods-CpzqXQUT.mjs +15 -0
  337. package/dist/usePaymentMethods-DNVw2eVg.js +1 -0
  338. package/dist/usePayments-D9Eo-uBk.js +1 -0
  339. package/dist/usePayments-Gx9kBvNB.mjs +318 -0
  340. package/dist/usePortal-3VCZwSUE.mjs +11 -0
  341. package/dist/usePortal-DsebXdhx.js +1 -0
  342. package/dist/useService-Bh47bllz.mjs +50 -0
  343. package/dist/useService-H7BjLg8P.js +1 -0
  344. package/dist/useSubscription-DnL1wVh1.mjs +210 -0
  345. package/dist/useSubscription-K_gP9TeX.js +1 -0
  346. package/dist/useTimePeriod.es-CmltiTE-.js +1 -0
  347. package/dist/useTimePeriod.es-DMtKzcoB.mjs +93 -0
  348. package/dist/useViewport-BgdA2PPt.mjs +29 -0
  349. package/dist/useViewport-hPRVDWCm.js +1 -0
  350. package/dist/useWatchDebounced-CAU1WI1P.js +1 -0
  351. package/dist/useWatchDebounced-DT5IicPp.mjs +14 -0
  352. package/dist/visa.svg.es-B0T5Su99.mjs +4 -0
  353. package/dist/visa.svg.es-NY3BHhda.js +1 -0
  354. package/dist/vpay.svg.es-VViQi42w.js +1 -0
  355. package/dist/vpay.svg.es-Zt3rrmCy.mjs +4 -0
  356. package/dist/wallets.es-CNIMW5ay.js +1 -0
  357. package/dist/wallets.es-eH2C2ygn.mjs +102 -0
  358. package/dist/zip.svg.es-C9S_F31W.js +1 -0
  359. package/dist/zip.svg.es-QC6dxzC7.mjs +4 -0
  360. package/package.json +3 -3
  361. package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Ce30EXY5.mjs +0 -240
  362. package/dist/AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-kmam2c7P.js +0 -1
  363. package/dist/Amount.vue.es-BO5sS1UX.mjs +0 -25
  364. package/dist/Amount.vue.es-JDVa_3H-.js +0 -1
  365. package/dist/Avatar.vue.es-BGTZSAqU.js +0 -1
  366. package/dist/Avatar.vue.es-DJzJiYtv.mjs +0 -91
  367. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-Bq2mTdUs.mjs +0 -66
  368. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-BtNTRSqH.js +0 -1
  369. package/dist/Button.vue.es-Cm9pLU9i.mjs +0 -421
  370. package/dist/Button.vue.es-O8mNivLL.js +0 -1
  371. package/dist/Chip.vue.es-BBmn-qJp.mjs +0 -120
  372. package/dist/Chip.vue.es-DmCjC1hi.js +0 -1
  373. package/dist/Comparators.vue.es-CYfxd5H-.mjs +0 -120
  374. package/dist/Comparators.vue.es-DK8wGjxM.js +0 -1
  375. package/dist/ContentWithAsideLayout-DHpnJfGA.js +0 -1
  376. package/dist/ContentWithAsideLayout-Dy9xgxuF.mjs +0 -39
  377. package/dist/ContextMenu.vue.es-CTc1ktXb.mjs +0 -681
  378. package/dist/ContextMenu.vue.es-DaW0yp4Y.js +0 -1
  379. package/dist/CustomerBillingInformation.vue.es-BX0Da7Kr.js +0 -1
  380. package/dist/CustomerBillingInformation.vue.es-CMZO8oLj.mjs +0 -175
  381. package/dist/CustomerPaymentMethods.lib-CcSt0sl1.mjs +0 -4
  382. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-Bi_dCntQ.js +0 -1
  383. package/dist/CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-CtdFharm.mjs +0 -150
  384. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-BDqBXbJq.mjs +0 -3264
  385. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-ZyN2vlNu.js +0 -1
  386. package/dist/Divider.vue.es-ClFG8QtG.js +0 -1
  387. package/dist/Divider.vue.es-wKkIVBgb.mjs +0 -24
  388. package/dist/DividerText.vue.es-CeAHAe_Y.mjs +0 -72
  389. package/dist/DividerText.vue.es-DjT4i_YD.js +0 -1
  390. package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-DLE5-9wz.mjs +0 -562
  391. package/dist/EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-DkIK-lID.js +0 -1
  392. package/dist/ErrorNotification.vue.es-CHyVTBGs.mjs +0 -38
  393. package/dist/ErrorNotification.vue.es-CaEFTi2k.js +0 -1
  394. package/dist/Expand.vue.es-C-lnbA1v.js +0 -1
  395. package/dist/Expand.vue.es-C4_XmqbR.mjs +0 -50
  396. package/dist/FormMessage.vue.es-Bd4_NG9H.js +0 -1
  397. package/dist/FormMessage.vue.es-C3oxwq_8.mjs +0 -46
  398. package/dist/IconButton.vue.es-BHdQskx0.js +0 -1
  399. package/dist/IconButton.vue.es-KywqWWvr.mjs +0 -228
  400. package/dist/IconTitle.vue.es-BmjBdZb_.mjs +0 -107
  401. package/dist/IconTitle.vue.es-D9Wc3PIq.js +0 -1
  402. package/dist/Input.vue.es-DqKJhFTr.js +0 -1
  403. package/dist/Input.vue.es-WZGF8dfr.mjs +0 -251
  404. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-B6efz7NU.mjs +0 -97
  405. package/dist/InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-LE6zBLKM.js +0 -1
  406. package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-C2aLMfu6.mjs +0 -49
  407. package/dist/InvoiceEntryView.vue_vue_type_script_setup_true_lang-CtpFzWU3.js +0 -1
  408. package/dist/InvoiceSummary.vue.es-BI5sD_8F.mjs +0 -2944
  409. package/dist/InvoiceSummary.vue.es-BWYIHezU.js +0 -1
  410. package/dist/Modal.vue.es-B_1aqm_m.js +0 -1
  411. package/dist/Modal.vue.es-qdUHDOnU.mjs +0 -483
  412. package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-BKKXQbge.js +0 -1
  413. package/dist/PaymentErrorCard.vue_vue_type_script_setup_true_lang-Ch1TFO7x.mjs +0 -154
  414. package/dist/PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-CsH47WSM.mjs +0 -54
  415. package/dist/PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-mKNNYnMU.js +0 -1
  416. package/dist/PaymentHistoryBlock-CgNUV8Gy.mjs +0 -4
  417. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DZwnDzha.js +0 -1
  418. package/dist/PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-Uj1aK-dp.mjs +0 -101
  419. package/dist/PaymentIntegrationForm-CLokpXvK.mjs +0 -4
  420. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CRUs7sP4.mjs +0 -167
  421. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-kKkzRi6w.js +0 -1
  422. package/dist/PaymentIntegrationFormAdyen-C885o8IE.mjs +0 -699
  423. package/dist/PaymentIntegrationFormAdyen-Co19AgvG.js +0 -1
  424. package/dist/PaymentIntegrationFormStripe-BjMdJmDC.mjs +0 -547
  425. package/dist/PaymentIntegrationFormStripe-DWff6wzK.js +0 -1
  426. package/dist/PaymentMethod.vue.es-CdskNJ3Z.js +0 -1
  427. package/dist/PaymentMethod.vue.es-rv-pu1CC.mjs +0 -677
  428. package/dist/PaymentMethodForm-IEuDxEPN.mjs +0 -4
  429. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-Cj60U90J.js +0 -1
  430. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-gA74Rak9.mjs +0 -172
  431. package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-B3H_AWMM.js +0 -1
  432. package/dist/PaymentMethodsList.vue_vue_type_script_setup_true_lang-CTn-OxM6.mjs +0 -189
  433. package/dist/PricingGroupRangeInput.vue.es-ButaePib.mjs +0 -632
  434. package/dist/PricingGroupRangeInput.vue.es-Cls2lm80.js +0 -1
  435. package/dist/Section.vue.es-CAJvEDn6.js +0 -1
  436. package/dist/Section.vue.es-DX_9ueCG.mjs +0 -79
  437. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-CQAkPfJz.js +0 -1
  438. package/dist/SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DVtMzgjc.mjs +0 -1044
  439. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-DGMxHc20.mjs +0 -78
  440. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-DfMgIsGm.js +0 -1
  441. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-BJVXCHny.js +0 -1
  442. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-ByO-L6nm.mjs +0 -6171
  443. package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-C5zB3CgZ.mjs +0 -101
  444. package/dist/SubscriptionSummary.vue_vue_type_script_setup_true_lang-CabskT-r.js +0 -1
  445. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-D-T1wGg7.js +0 -1
  446. package/dist/SubscriptionsList.vue_vue_type_script_setup_true_lang-DKd2DIVb.mjs +0 -309
  447. package/dist/TooltipParagraph.vue.es-C5RTcrid.mjs +0 -136
  448. package/dist/TooltipParagraph.vue.es-H9fI7zzt.js +0 -1
  449. package/dist/TrialChip.vue.es-B1puKyR-.mjs +0 -56
  450. package/dist/TrialChip.vue.es-CCs50m02.js +0 -1
  451. package/dist/accel.svg.es-CE5tIWtm.mjs +0 -4
  452. package/dist/accel.svg.es-Dt_1wJmV.js +0 -1
  453. package/dist/ach.svg.es-B4tn0_IV.js +0 -1
  454. package/dist/ach.svg.es-D4QPcIU-.mjs +0 -4
  455. package/dist/adyen-51SvcyqV.mjs +0 -4
  456. package/dist/adyen-BXi_D9TQ.mjs +0 -123
  457. package/dist/adyen-DZsyEXkw.js +0 -1
  458. package/dist/adyen-VS2sDW0m.js +0 -1
  459. package/dist/amazon-pay.svg.es-B428S4f3.js +0 -1
  460. package/dist/amazon-pay.svg.es-DUScOW15.mjs +0 -4
  461. package/dist/amex.svg.es-BCXkaVLN.mjs +0 -4
  462. package/dist/amex.svg.es-Bn9e31C3.js +0 -1
  463. package/dist/api.es-C5pe8LUl.mjs +0 -62
  464. package/dist/api.es-Czekkp_X.js +0 -1
  465. package/dist/apple-pay.svg.es-Cfgn0K28.js +0 -1
  466. package/dist/apple-pay.svg.es-DlCfkt39.mjs +0 -4
  467. package/dist/bacs.svg.es-BKsvSeIP.mjs +0 -4
  468. package/dist/bacs.svg.es-hL7hLPkQ.js +0 -1
  469. package/dist/bancontact.svg.es-BbRqGgZ9.mjs +0 -4
  470. package/dist/bancontact.svg.es-DU2ejvNL.js +0 -1
  471. package/dist/carnet.svg.es-C5SFaOsa.js +0 -1
  472. package/dist/carnet.svg.es-Db-KEb13.mjs +0 -4
  473. package/dist/cartes-bancaires.svg.es-ByD-JAAi.mjs +0 -4
  474. package/dist/cartes-bancaires.svg.es-CbBJQZrk.js +0 -1
  475. package/dist/cashapp.svg.es-CnS5r_D8.mjs +0 -4
  476. package/dist/cashapp.svg.es-DE4vMu_p.js +0 -1
  477. package/dist/cn.es-DxSeYcoP.js +0 -1
  478. package/dist/comparators.es-9VsCB-JI.mjs +0 -175
  479. package/dist/comparators.es-wrKHduVq.js +0 -1
  480. package/dist/component-BG6DmXcy.mjs +0 -9
  481. package/dist/component-hDuDTBt5.js +0 -1
  482. package/dist/configuration-BjYwV4_B.js +0 -1
  483. package/dist/configuration-CD8cOXAJ.mjs +0 -15
  484. package/dist/countryData.es-D3MFzU92.js +0 -1
  485. package/dist/customElements-B-89a5oH.mjs +0 -6810
  486. package/dist/customElements-DD7bpqkx.js +0 -1
  487. package/dist/customer-DozNwS_a.js +0 -1
  488. package/dist/customer-Dzj1g9lV.mjs +0 -32
  489. package/dist/customer.es-C_vSWcVA.mjs +0 -30
  490. package/dist/customer.es-D42Md24r.js +0 -1
  491. package/dist/dana.svg.es-Bbn6_ktN.mjs +0 -4
  492. package/dist/dana.svg.es-DKZaseoJ.js +0 -1
  493. package/dist/dankort.svg.es-D8FgSiFf.js +0 -1
  494. package/dist/dankort.svg.es-DtAdliQq.mjs +0 -4
  495. package/dist/de-DE-BvHD68Ay.js +0 -1
  496. package/dist/diners.svg.es-DhchsD1D.mjs +0 -4
  497. package/dist/diners.svg.es-SydF_H-Z.js +0 -1
  498. package/dist/discover.svg.es-B8vgzVNG.js +0 -1
  499. package/dist/discover.svg.es-BnqYPvnV.mjs +0 -4
  500. package/dist/eftpos.svg.es-DO0YPaY1.js +0 -1
  501. package/dist/eftpos.svg.es-DRLaafYa.mjs +0 -4
  502. package/dist/elo.svg.es-CTOm1rvj.js +0 -1
  503. package/dist/elo.svg.es-CgkEOP_O.mjs +0 -4
  504. package/dist/en-US-dqfKx3GS.js +0 -1
  505. package/dist/eps.svg.es-CApyGjyU.js +0 -1
  506. package/dist/eps.svg.es-D6IHsRYP.mjs +0 -4
  507. package/dist/error-Cg-i7gGl.js +0 -1
  508. package/dist/error-DY_I2hPx.mjs +0 -13
  509. package/dist/floating-ui.vue.es-Bv94BfDm.js +0 -1
  510. package/dist/floating-ui.vue.es-DWY7pdz8.mjs +0 -1573
  511. package/dist/formatting.es-DBtYnvI5.js +0 -1
  512. package/dist/formatting.es-eYgXv_AK.mjs +0 -70
  513. package/dist/gcash.svg.es-BhJ-eA2z.mjs +0 -4
  514. package/dist/gcash.svg.es-JaL4fpZr.js +0 -1
  515. package/dist/getComposedString.es-CELkn0I7.mjs +0 -14
  516. package/dist/getComposedString.es-DvSNX-_z.js +0 -1
  517. package/dist/getCountryNameByCode.es-fP52nO_7.js +0 -1
  518. package/dist/getCountryNameByCode.es-ymC9R46j.mjs +0 -8
  519. package/dist/girocard.svg.es-D_3LML4l.mjs +0 -4
  520. package/dist/girocard.svg.es-tVgtT23w.js +0 -1
  521. package/dist/go-pay.svg.es-6UtgwVBA.mjs +0 -4
  522. package/dist/go-pay.svg.es-fYX6yMzJ.js +0 -1
  523. package/dist/google-pay.svg.es-BYXX1em8.js +0 -1
  524. package/dist/google-pay.svg.es-CRxXgFVl.mjs +0 -4
  525. package/dist/hipercard.svg.es-Ct1-mF9F.mjs +0 -4
  526. package/dist/hipercard.svg.es-D-nmiFXB.js +0 -1
  527. package/dist/icon-sprite.svg.es-BpwT0GQ5.js +0 -1
  528. package/dist/icon-sprite.svg.es-YYqtl2IP.mjs +0 -4
  529. package/dist/ideal.svg.es-D23EhJJ2.mjs +0 -4
  530. package/dist/ideal.svg.es-DXtHE0Jb.js +0 -1
  531. package/dist/index-Cai7laNY.mjs +0 -1069
  532. package/dist/index-DIFK3mcJ.js +0 -6
  533. package/dist/index-DyvRdSR7.mjs +0 -9673
  534. package/dist/index-IZaUTAsE.js +0 -1
  535. package/dist/index.es-2JWHHSgP.js +0 -1
  536. package/dist/index.es-D5xOw_SJ.mjs +0 -542
  537. package/dist/invoices-1oYkdQQV.mjs +0 -121
  538. package/dist/invoices-BAoh6X2a.js +0 -1
  539. package/dist/it-IT-CEP3oeWs.js +0 -1
  540. package/dist/it-IT-aPQY57ht.js +0 -1
  541. package/dist/jcb.svg.es-Bz6J-c0s.js +0 -1
  542. package/dist/jcb.svg.es-CcH08OoO.mjs +0 -4
  543. package/dist/kakao-pay.svg.es-DcgRDAsc.mjs +0 -4
  544. package/dist/kakao-pay.svg.es-qVTABboW.js +0 -1
  545. package/dist/klarna.svg.es-Clu-7zkp.js +0 -1
  546. package/dist/klarna.svg.es-DfIPX0gr.mjs +0 -4
  547. package/dist/maestro.svg.es-CVmNVokN.mjs +0 -4
  548. package/dist/maestro.svg.es-e8E_H2QU.js +0 -1
  549. package/dist/mastercard.svg.es-B8z0ZySS.mjs +0 -4
  550. package/dist/mastercard.svg.es-YO3_jGD6.js +0 -1
  551. package/dist/momo.svg.es-BXTQlQRy.js +0 -1
  552. package/dist/momo.svg.es-Bm5zCTOT.mjs +0 -4
  553. package/dist/nl-NL-e_vf6OuT.js +0 -1
  554. package/dist/nl-NL-zRUAuEHg.js +0 -1
  555. package/dist/nyce.svg.es-CgurqLKH.mjs +0 -4
  556. package/dist/nyce.svg.es-DM6esO47.js +0 -1
  557. package/dist/object.es-DFXiU9p3.js +0 -1
  558. package/dist/object.es-jvvnR8Kr.mjs +0 -12
  559. package/dist/open-banking.svg.es-DUM360xB.js +0 -1
  560. package/dist/open-banking.svg.es-DzzLCVp_.mjs +0 -4
  561. package/dist/paymentMethods-CZ3ydybI.js +0 -1
  562. package/dist/paymentMethods-DIV78w0O.mjs +0 -78
  563. package/dist/payments--lkjiwCt.js +0 -1
  564. package/dist/payments-Cvqdrprv.mjs +0 -47
  565. package/dist/paypal.svg.es-BdkNTf3c.js +0 -1
  566. package/dist/paypal.svg.es-DltWzW4V.mjs +0 -4
  567. package/dist/pricing-3W7XLwL6.js +0 -1
  568. package/dist/pricing-CJxS2hr2.mjs +0 -17
  569. package/dist/pricingItemConfigs.es-BPIm6S8M.mjs +0 -107
  570. package/dist/pricingItemConfigs.es-C73cQlxQ.js +0 -1
  571. package/dist/pricingPlanSchedule-B9HFiXy-.js +0 -1
  572. package/dist/pricingPlanSchedule-CXG3CQ61.mjs +0 -146
  573. package/dist/pulse.svg.es-BdpWAuIN.js +0 -1
  574. package/dist/pulse.svg.es-BecAwT-p.mjs +0 -4
  575. package/dist/sepa.svg.es-BF8PYKZg.js +0 -1
  576. package/dist/sepa.svg.es-cbE9g8gV.mjs +0 -4
  577. package/dist/slots.es-BpwYO3A3.mjs +0 -18
  578. package/dist/slots.es-Dq1PTUOv.js +0 -1
  579. package/dist/sorting.es-CjTrRfSW.mjs +0 -105
  580. package/dist/sorting.es-RyvcgbSL.js +0 -1
  581. package/dist/star.svg.es-DsCD-tSp.mjs +0 -4
  582. package/dist/star.svg.es-Q50IzqXr.js +0 -1
  583. package/dist/subscription-C41lG-rH.mjs +0 -89
  584. package/dist/subscription-b0OPx8Du.js +0 -1
  585. package/dist/subscriptions-300o4ae0.js +0 -1
  586. package/dist/subscriptions-DcMHBPVJ.mjs +0 -58
  587. package/dist/trustly.svg.es-C0Ou1HWk.mjs +0 -4
  588. package/dist/trustly.svg.es-CHojqNqm.js +0 -1
  589. package/dist/twint.svg.es-CQ-ZDfy8.js +0 -1
  590. package/dist/twint.svg.es-WrZYquRs.mjs +0 -4
  591. package/dist/typeGuards.es-C4nR5FkL.js +0 -1
  592. package/dist/typeGuards.es-fwUoeMCe.mjs +0 -12
  593. package/dist/unionpay.svg.es-DYgo83Hf.mjs +0 -4
  594. package/dist/unionpay.svg.es-YqJKKFEj.js +0 -1
  595. package/dist/url-CjULBkjW.js +0 -1
  596. package/dist/url-CvNDq4wp.mjs +0 -22
  597. package/dist/useActionDispatchProvider-BVOBO0Jx.mjs +0 -12
  598. package/dist/useActionDispatchProvider-Cv9amjTf.js +0 -1
  599. package/dist/useCustomer-DLHOs4BR.js +0 -1
  600. package/dist/useCustomer-EDhref7T.mjs +0 -25
  601. package/dist/useCustomerFormLabels-B61-4xQ7.mjs +0 -1168
  602. package/dist/useCustomerFormLabels-C6wW4n2e.js +0 -1
  603. package/dist/useExperimentalFeature-0yFoaEzV.js +0 -1
  604. package/dist/useExperimentalFeature-DvxOrFPU.mjs +0 -9
  605. package/dist/useIncrementalLoading-BK9pRYAU.mjs +0 -71
  606. package/dist/useIncrementalLoading-CdtGJm_Y.js +0 -1
  607. package/dist/useInvoiceData-BSjVeJrI.js +0 -1
  608. package/dist/useInvoiceData-C0Y5WrbT.mjs +0 -45
  609. package/dist/useInvoicesList-BRDZqsaB.js +0 -1
  610. package/dist/useInvoicesList-CYoE7q0u.mjs +0 -580
  611. package/dist/useLoadInitialData-Cp1OA8y6.mjs +0 -18
  612. package/dist/useLoadInitialData-u7IyXqb6.js +0 -1
  613. package/dist/usePaymentMethodAvailability-B3s1lqQ2.js +0 -1
  614. package/dist/usePaymentMethodAvailability-EuhZPghG.mjs +0 -141
  615. package/dist/usePaymentMethodOptions--8QpMvNm.js +0 -1
  616. package/dist/usePaymentMethodOptions-Cljh7HYp.mjs +0 -36
  617. package/dist/usePaymentMethods-BJzoI8dZ.mjs +0 -16
  618. package/dist/usePaymentMethods-DvEnJWmB.js +0 -1
  619. package/dist/usePayments-CANj0QVc.js +0 -1
  620. package/dist/usePayments-CaT1CBzE.mjs +0 -362
  621. package/dist/usePortal-BjGoSeLy.js +0 -1
  622. package/dist/usePortal-CMPQ0M9R.mjs +0 -12
  623. package/dist/useService-D73FNBjT.js +0 -1
  624. package/dist/useService-W3Kxems4.mjs +0 -72
  625. package/dist/useSubscription-D1UKnZAx.mjs +0 -250
  626. package/dist/useSubscription-DZfRHbL7.js +0 -1
  627. package/dist/useViewport-Bu0cyeSi.mjs +0 -38
  628. package/dist/useViewport-CKRY1CKR.js +0 -1
  629. package/dist/useWatchDebounced-C_YxgoQ6.js +0 -1
  630. package/dist/useWatchDebounced-Zmxd6InB.mjs +0 -16
  631. package/dist/visa.svg.es-B6aU_qRs.mjs +0 -4
  632. package/dist/visa.svg.es-D6sc4YTE.js +0 -1
  633. package/dist/vpay.svg.es-4qIqS4aX.mjs +0 -4
  634. package/dist/vpay.svg.es-CLGTyB09.js +0 -1
  635. package/dist/zip.svg.es-3PzSBe1E.mjs +0 -4
  636. package/dist/zip.svg.es-BRsgmur-.js +0 -1
@@ -0,0 +1,153 @@
1
+ import { defineComponent as x, computed as v, openBlock as c, createBlock as C, withCtx as i, createElementBlock as d, createVNode as o, createTextVNode as a, toDisplayString as r, unref as u, createCommentVNode as b, renderSlot as B } from "vue";
2
+ import { u as N, _ as l } from "./customElements-CSE7dwUr.mjs";
3
+ import { _ as S } from "./Section.vue.es-DQ5H7mqW.mjs";
4
+ import { g as k } from "./getCountryNameByCode.es-BDHua7VM.mjs";
5
+ import { a as A } from "./customer.es-B5ppZf0j.mjs";
6
+ import { a as M } from "./typeGuards.es-B4XMtlkM.mjs";
7
+ const V = ["US", "CA"];
8
+ function z(e) {
9
+ if (V.includes(e.country)) {
10
+ const _ = m([e.line1, e.line2], ", "), s = m([e.state, e.postal_code], " "), h = k(e.country);
11
+ return m([_, e.city, s, h], ", ");
12
+ }
13
+ const t = m([e.line1, e.line2], " "), f = m([e.postal_code, e.city], " "), g = k(e.country);
14
+ return m([t, f, e.state, g], ", ");
15
+ }
16
+ function m(e, n) {
17
+ return e.filter(Boolean).join(n);
18
+ }
19
+ const E = {
20
+ key: 0,
21
+ class: "flex flex-col gap-2"
22
+ }, I = { key: 0 }, R = { key: 1 }, $ = { key: 2 }, w = { key: 3 }, j = { key: 1 }, P = /* @__PURE__ */ x({
23
+ __name: "CustomerBillingInformation",
24
+ props: {
25
+ customer: {},
26
+ title: {},
27
+ fallbackToReference: { type: Boolean, default: !0 }
28
+ },
29
+ setup(e) {
30
+ const { $t: n } = N(), t = e, f = v(() => {
31
+ if (!t.customer) return;
32
+ const s = A(t.customer);
33
+ if (t.fallbackToReference && s === "")
34
+ return t.customer.reference;
35
+ if (!(!t.fallbackToReference && s === ""))
36
+ return s;
37
+ }), g = v(() => t.title || n({
38
+ defaultMessage: "Billing information",
39
+ description: "Title for the billing information",
40
+ id: "customer_billing_information.title"
41
+ })), _ = v(() => {
42
+ if (t.customer) {
43
+ if ("individual" in t.customer) return t.customer.individual.residential_address;
44
+ if ("organization" in t.customer) return t.customer.organization.registered_address;
45
+ }
46
+ });
47
+ return (s, h) => (c(), C(S, { title: g.value }, {
48
+ right: i(() => [
49
+ B(s.$slots, "settings")
50
+ ]),
51
+ default: i(() => {
52
+ var y;
53
+ return [
54
+ e.customer ? (c(), d("div", E, [
55
+ f.value ? (c(), d("div", I, [
56
+ o(l, { variant: "caps-heading" }, {
57
+ default: i(() => [
58
+ a(r(u(n)({
59
+ defaultMessage: "Name",
60
+ description: "The label for the customer name in the billing information",
61
+ id: "customer_billing_information.name_label"
62
+ })), 1)
63
+ ]),
64
+ _: 1
65
+ }),
66
+ o(l, { variant: "body-xs" }, {
67
+ default: i(() => [
68
+ a(r(f.value), 1)
69
+ ]),
70
+ _: 1
71
+ })
72
+ ])) : b("", !0),
73
+ (y = _.value) != null && y.line1 ? (c(), d("div", R, [
74
+ o(l, { variant: "caps-heading" }, {
75
+ default: i(() => [
76
+ a(r(u(n)({
77
+ defaultMessage: "Billing address",
78
+ description: "The label for the customer billing address in the billing information",
79
+ id: "customer_billing_information.billing_address_label"
80
+ })), 1)
81
+ ]),
82
+ _: 1
83
+ }),
84
+ o(l, { variant: "body-xs" }, {
85
+ default: i(() => [
86
+ a(r(u(z)(_.value)), 1)
87
+ ]),
88
+ _: 1
89
+ })
90
+ ])) : b("", !0),
91
+ e.customer.email ? (c(), d("div", $, [
92
+ o(l, { variant: "caps-heading" }, {
93
+ default: i(() => [
94
+ a(r(u(n)({
95
+ defaultMessage: "Email address",
96
+ description: "The label for the customer email address in the billing information",
97
+ id: "customer_billing_information.email_address_label"
98
+ })), 1)
99
+ ]),
100
+ _: 1
101
+ }),
102
+ o(l, { variant: "body-xs" }, {
103
+ default: i(() => [
104
+ a(r(e.customer.email), 1)
105
+ ]),
106
+ _: 1
107
+ })
108
+ ])) : b("", !0),
109
+ u(M)(e.customer) ? (c(), d("div", w, [
110
+ o(l, { variant: "caps-heading" }, {
111
+ default: i(() => [
112
+ a(r(u(n)({
113
+ defaultMessage: "VAT number",
114
+ description: "The label for the customer Vat number in the billing information",
115
+ id: "customer_billing_information.vat_number_label"
116
+ })), 1)
117
+ ]),
118
+ _: 1
119
+ }),
120
+ o(l, { variant: "body-xs" }, {
121
+ default: i(() => {
122
+ var p, T;
123
+ return [
124
+ a(r((T = (p = e.customer.organization.tax_ids) == null ? void 0 : p[0]) == null ? void 0 : T.id), 1)
125
+ ];
126
+ }),
127
+ _: 1
128
+ })
129
+ ])) : b("", !0)
130
+ ])) : (c(), d("div", j, [
131
+ o(l, {
132
+ variant: "body-xs",
133
+ color: "secondary"
134
+ }, {
135
+ default: i(() => [
136
+ a(r(u(n)({
137
+ defaultMessage: "No billing information to display.",
138
+ description: "Text that is being displayed when there is no active subscription in the subscriptions block",
139
+ id: "customer_overview.billing_information.no_billing_information_available"
140
+ })), 1)
141
+ ]),
142
+ _: 1
143
+ })
144
+ ]))
145
+ ];
146
+ }),
147
+ _: 3
148
+ }, 8, ["title"]));
149
+ }
150
+ });
151
+ export {
152
+ P as _
153
+ };
@@ -0,0 +1,4 @@
1
+ const o = 3;
2
+ export {
3
+ o as D
4
+ };
@@ -0,0 +1 @@
1
+ const e=require("vue"),m=require("./Button.vue.es-M_jXZda4.js"),r=require("./Section.vue.es-Btff-cLY.js"),l=require("./customElements-Vox1PB6G.js"),u=require("./PaymentMethodsList.vue_vue_type_script_setup_true_lang-H3vrPllf.js"),p=require("./Skeleton.vue_vue_type_script_setup_true_lang-DypW8aNJ.js"),h=require("./useActionDispatchProvider-CNAuaHdm.js"),y=require("./configuration-akTS7Wiw.js"),_=e.defineComponent({__name:"CustomerPaymentMethodsBlock",props:{paymentMethods:{type:Array},limit:{default:2,type:Number},isLoading:{type:Boolean},showViewAllButton:{type:Boolean},showAddButton:{type:Boolean}},emits:["view-all-payment-methods","add-payment-method"],setup(t){const d=t,{$t:o}=l.useIntl(),i=e.computed(()=>d.paymentMethods.length>0);return(s,a)=>(e.openBlock(),e.createBlock(e.unref(r._sfc_main),{class:"sv-payment-methods","no-spacing":"","no-border":"",title:e.unref(o)({defaultMessage:"{count, plural, one {Payment method} other {Payment methods}}",description:"Title for the payment methods block on the customer overview page",id:"customer_overview.payment_methods.title"},{count:String(t.paymentMethods.length)})},e.createSlots({default:e.withCtx(()=>[i.value?(e.openBlock(),e.createBlock(u._sfc_main,{key:0,"payment-methods":t.paymentMethods},null,8,["payment-methods"])):(e.openBlock(),e.createBlock(e.unref(r._sfc_main),{key:1,class:"sv-empty-state sv-payment-methods__empty"},{default:e.withCtx(()=>[e.createVNode(e.unref(l._sfc_main),{variant:"body-sm",color:"subtle","no-spacing":"",class:"sv-payment-methods__empty-message"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Add a payment method for recurring invoice payments.",description:"Helper text for adding a payment method when no payment methods are configured",id:"customer_overview.payment_methods_block.add_payment_method_helper_text"})),1)]),_:1}),t.showAddButton?(e.openBlock(),e.createBlock(e.unref(m._sfc_main),{key:0,class:"sv-action sv-action--secondary sv-action--full-width sv-payment-methods__add mt-4 w-full",intent:"secondary","icon-prefix":"add",type:"button",onClick:a[1]||(a[1]=n=>s.$emit("add-payment-method"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Add payment method",description:"Text for the add payment method button that is shown when no payment methods have been configured",id:"customer_overview.payment_methods_block.add_payment_method_button_label"})),1)]),_:1})):e.createCommentVNode("",!0)]),_:1}))]),_:2},[t.showViewAllButton?{name:"right",fn:e.withCtx(()=>[e.createVNode(e.unref(m._sfc_main),{size:"sm",intent:"subtle","icon-suffix":"arrow_right_alt",class:"sv-action sv-action--ghost sv-payment-methods__view-all",type:"button",onClick:a[0]||(a[0]=n=>s.$emit("view-all-payment-methods"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"View all",id:"customer_overview.payment_methods_block.view_all_payment_methods_link_label",description:"The link text that links to the overview page of the customer invoices"})),1)]),_:1})]),key:"0"}:void 0]),1032,["title"]))}}),v=e.defineComponent({__name:"CustomerPaymentMethods",props:{isLoading:{type:Boolean},paymentMethods:{type:Array},maxPaymentMethods:{type:Number},configuration:{type:Object}},setup(t){const d={showViewAllButton:!0,showAddButton:!0},o=t,i=e.computed(()=>y.resolveConfiguration(d,o.configuration)),{dispatchAction:s}=h.useActionDispatchProvider();return(a,n)=>t.isLoading?(e.openBlock(),e.createBlock(p._sfc_main,{key:0,variant:"section",class:"sv-payment-methods sv-root sv-component sv-loading h-72","data-testid":"customer-payment-methods-skeleton"})):(e.openBlock(),e.createBlock(_,{key:1,class:"sv-payment-methods sv-root sv-component","is-loading":t.isLoading,"payment-methods":t.paymentMethods,"show-view-all-button":i.value.showViewAllButton,"show-add-button":i.value.showAddButton,onViewAllPaymentMethods:n[0]||(n[0]=c=>e.unref(s)({action:"view-all-payment-methods"})),onAddPaymentMethod:n[1]||(n[1]=c=>e.unref(s)({action:"add-payment-method"}))},null,8,["is-loading","payment-methods","show-view-all-button","show-add-button"]))}});exports._sfc_main=v;
@@ -0,0 +1,140 @@
1
+ import { defineComponent as v, computed as f, openBlock as s, createBlock as m, unref as t, createSlots as w, withCtx as a, createVNode as y, createTextVNode as p, toDisplayString as h, createCommentVNode as g } from "vue";
2
+ import { _ as u } from "./Button.vue.es-Dz-2L8dJ.mjs";
3
+ import { _ as c } from "./Section.vue.es-DQ5H7mqW.mjs";
4
+ import { u as b, _ as k } from "./customElements-CSE7dwUr.mjs";
5
+ import { _ as A } from "./PaymentMethodsList.vue_vue_type_script_setup_true_lang-C6BcIkEV.mjs";
6
+ import { _ as M } from "./Skeleton.vue_vue_type_script_setup_true_lang-DRLoYWGY.mjs";
7
+ import { u as B } from "./useActionDispatchProvider-B8-oycQk.mjs";
8
+ import { r as $ } from "./configuration-BytDBAWs.mjs";
9
+ const x = /* @__PURE__ */ v({
10
+ __name: "CustomerPaymentMethodsBlock",
11
+ props: {
12
+ paymentMethods: { type: Array },
13
+ limit: { default: 2, type: Number },
14
+ isLoading: { type: Boolean },
15
+ showViewAllButton: { type: Boolean },
16
+ showAddButton: { type: Boolean }
17
+ },
18
+ emits: ["view-all-payment-methods", "add-payment-method"],
19
+ setup(e) {
20
+ const r = e, { $t: o } = b(), l = f(() => r.paymentMethods.length > 0);
21
+ return (d, i) => (s(), m(t(c), {
22
+ class: "sv-payment-methods",
23
+ "no-spacing": "",
24
+ "no-border": "",
25
+ title: t(o)(
26
+ {
27
+ defaultMessage: "{count, plural, one {Payment method} other {Payment methods}}",
28
+ description: "Title for the payment methods block on the customer overview page",
29
+ id: "customer_overview.payment_methods.title"
30
+ },
31
+ { count: String(e.paymentMethods.length) }
32
+ )
33
+ }, w({
34
+ default: a(() => [
35
+ l.value ? (s(), m(A, {
36
+ key: 0,
37
+ "payment-methods": e.paymentMethods
38
+ }, null, 8, ["payment-methods"])) : (s(), m(t(c), {
39
+ key: 1,
40
+ class: "sv-empty-state sv-payment-methods__empty"
41
+ }, {
42
+ default: a(() => [
43
+ y(t(k), {
44
+ variant: "body-sm",
45
+ color: "subtle",
46
+ "no-spacing": "",
47
+ class: "sv-payment-methods__empty-message"
48
+ }, {
49
+ default: a(() => [
50
+ p(h(t(o)({
51
+ defaultMessage: "Add a payment method for recurring invoice payments.",
52
+ description: "Helper text for adding a payment method when no payment methods are configured",
53
+ id: "customer_overview.payment_methods_block.add_payment_method_helper_text"
54
+ })), 1)
55
+ ]),
56
+ _: 1
57
+ }),
58
+ e.showAddButton ? (s(), m(t(u), {
59
+ key: 0,
60
+ class: "sv-action sv-action--secondary sv-action--full-width sv-payment-methods__add mt-4 w-full",
61
+ intent: "secondary",
62
+ "icon-prefix": "add",
63
+ type: "button",
64
+ onClick: i[1] || (i[1] = (n) => d.$emit("add-payment-method"))
65
+ }, {
66
+ default: a(() => [
67
+ p(h(t(o)({
68
+ defaultMessage: "Add payment method",
69
+ description: "Text for the add payment method button that is shown when no payment methods have been configured",
70
+ id: "customer_overview.payment_methods_block.add_payment_method_button_label"
71
+ })), 1)
72
+ ]),
73
+ _: 1
74
+ })) : g("", !0)
75
+ ]),
76
+ _: 1
77
+ }))
78
+ ]),
79
+ _: 2
80
+ }, [
81
+ e.showViewAllButton ? {
82
+ name: "right",
83
+ fn: a(() => [
84
+ y(t(u), {
85
+ size: "sm",
86
+ intent: "subtle",
87
+ "icon-suffix": "arrow_right_alt",
88
+ class: "sv-action sv-action--ghost sv-payment-methods__view-all",
89
+ type: "button",
90
+ onClick: i[0] || (i[0] = (n) => d.$emit("view-all-payment-methods"))
91
+ }, {
92
+ default: a(() => [
93
+ p(h(t(o)({
94
+ defaultMessage: "View all",
95
+ id: "customer_overview.payment_methods_block.view_all_payment_methods_link_label",
96
+ description: "The link text that links to the overview page of the customer invoices"
97
+ })), 1)
98
+ ]),
99
+ _: 1
100
+ })
101
+ ]),
102
+ key: "0"
103
+ } : void 0
104
+ ]), 1032, ["title"]));
105
+ }
106
+ }), O = /* @__PURE__ */ v({
107
+ __name: "CustomerPaymentMethods",
108
+ props: {
109
+ isLoading: { type: Boolean },
110
+ paymentMethods: { type: Array },
111
+ maxPaymentMethods: { type: Number },
112
+ configuration: { type: Object }
113
+ },
114
+ setup(e) {
115
+ const r = {
116
+ showViewAllButton: !0,
117
+ showAddButton: !0
118
+ }, o = e, l = f(
119
+ () => $(r, o.configuration)
120
+ ), { dispatchAction: d } = B();
121
+ return (i, n) => e.isLoading ? (s(), m(M, {
122
+ key: 0,
123
+ variant: "section",
124
+ class: "sv-payment-methods sv-root sv-component sv-loading h-72",
125
+ "data-testid": "customer-payment-methods-skeleton"
126
+ })) : (s(), m(x, {
127
+ key: 1,
128
+ class: "sv-payment-methods sv-root sv-component",
129
+ "is-loading": e.isLoading,
130
+ "payment-methods": e.paymentMethods,
131
+ "show-view-all-button": l.value.showViewAllButton,
132
+ "show-add-button": l.value.showAddButton,
133
+ onViewAllPaymentMethods: n[0] || (n[0] = (_) => t(d)({ action: "view-all-payment-methods" })),
134
+ onAddPaymentMethod: n[1] || (n[1] = (_) => t(d)({ action: "add-payment-method" }))
135
+ }, null, 8, ["is-loading", "payment-methods", "show-view-all-button", "show-add-button"]));
136
+ }
137
+ });
138
+ export {
139
+ O as _
140
+ };
@@ -0,0 +1 @@
1
+ const e=require("vue"),Je=require("./api.es-duCDtZD9.js"),M=require("./customElements-Vox1PB6G.js"),Ze=require("./component-B7ZDyqBp.js"),et=require("./useService-H7BjLg8P.js"),Me=require("./ErrorNotification.vue.es-Cd2UKPAz.js"),J=require("./pricingItemConfigs.es-D4aYkYcf.js"),ue=require("./wallets.es-CNIMW5ay.js"),z=require("./Button.vue.es-M_jXZda4.js"),j=require("./TooltipParagraph.vue.es-BaqCDjl8.js"),Z=require("./Section.vue.es-Btff-cLY.js"),Se=require("./Skeleton.vue_vue_type_script_setup_true_lang-DypW8aNJ.js"),xe=require("./RadioGroupExtended.vue.es-Cb1iD73r.js"),I=require("./index-DwueOtPi.js"),le=require("./formatting.es-C72Nsrmh.js"),tt=require("./Divider.vue.es-UwnWvUTl.js"),Be=require("./Expand.vue.es-BtM0EZEr.js"),Ue=require("./EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CM_8Asmw.js"),ot=require("./cn.es-CvmLj7KH.js"),Pe=require("./invoices-xOV2YaEV.js"),nt=require("./useWatchDebounced-CAU1WI1P.js"),at=require("./Input.vue.es-CTOrmrcB.js"),re=require("./AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Co3XAxaY.js"),it=require("./SubscriptionSummary.vue_vue_type_script_setup_true_lang-s5_uhyuB.js"),st=require("./customer.es-BButyYo0.js"),ut=require("./usePaymentMethodOptions-cT1o-BA1.js"),Ae=require("./Modal.vue.es-BD4vUaOQ.js"),lt=3e4,ne=60,ae=12,rt=e.defineComponent({__name:"DateTimeAgo",props:{date:{},actionVerb:{}},setup(t){const o=60*ne,n=24*o,a=t,{$t:i,formatDate:s}=M.useIntl(),l=e.ref(Date.now());let u;e.onMounted(()=>{u=setInterval(()=>{l.value=Date.now()},lt)}),e.onBeforeUnmount(()=>{clearInterval(u)});const d=(f,v)=>{const p=(v.getFullYear()-f.getFullYear())*ae+(v.getMonth()-f.getMonth());return v.getDate()<f.getDate()?p-1:p},g=e.computed(()=>{const f=Math.max(0,(l.value-a.date.getTime())/1e3);if(f<ne)return i({defaultMessage:"{count, plural, one {# second} other {# seconds}} ago",id:"dateTimeAgo.seconds",description:"Relative time in whole seconds"},{count:Math.trunc(f)});if(f<o)return i({defaultMessage:"{count, plural, one {# minute} other {# minutes}} ago",id:"dateTimeAgo.minutes",description:"Relative time in whole minutes"},{count:Math.trunc(f/ne)});if(f<n)return i({defaultMessage:"{count, plural, one {# hour} other {# hours}} ago",id:"dateTimeAgo.hours",description:"Relative time in whole hours"},{count:Math.trunc(f/o)});const v=d(a.date,new Date(l.value));if(v<1){const p=Math.trunc(f/n);return p===1?i({defaultMessage:"yesterday",id:"dateTimeAgo.yesterday",description:'Relative time for a single day ago, reading as "updated yesterday" once the action verb is in front'}):i({defaultMessage:"{count, plural, one {# day} other {# days}} ago",id:"dateTimeAgo.days",description:"Relative time in whole days"},{count:p})}return v<ae?i({defaultMessage:"{count, plural, one {# month} other {# months}} ago",id:"dateTimeAgo.months",description:"Relative time in whole months"},{count:v}):i({defaultMessage:"{count, plural, one {# year} other {# years}} ago",id:"dateTimeAgo.years",description:"Relative time in whole years"},{count:Math.trunc(v/ae)})}),y=e.computed(()=>a.actionVerb?`${a.actionVerb} ${g.value}`:g.value),S=e.computed(()=>s({date:a.date,format:"dateTime",offsetType:"local"}));return(f,v)=>(e.openBlock(),e.createBlock(j._sfc_main,null,{tooltip:e.withCtx(()=>[e.createVNode(j.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(j._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(S.value),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("span",null,e.toDisplayString(y.value),1)]),_:1}))}}),ct=t=>{const{$t:o,formatNumber:n}=M.useIntl(),a=h=>ue.formatWalletBalanceValue(o,n,h),i=e.computed(()=>{var h,T;return((T=(h=t.walletBalance.wallet)==null?void 0:h.wallet_type)==null?void 0:T.name)||o({defaultMessage:"Balance",id:"wallet_balance.balance_label",description:"Label shown above a wallet's balance amount"})}),s=h=>{var T;return(((T=h.pricing_item)==null?void 0:T.configs)??[]).filter(m=>!!m.on_demand)},l=e.computed(()=>(t.walletBalance.charge_on_demand_pricing_items??[]).filter(h=>s(h).some(T=>J.isFixedPricing(T)||J.isFlexiblePricing(T)))),u=e.computed(()=>l.value.find(h=>s(h).some(T=>J.isFlexiblePricing(T)))),d=e.computed(()=>!!t.showManualTopUp&&l.value.length>0),g=e.computed(()=>!!t.showAutoTopUp&&!!u.value),y=e.computed(()=>{var h,T;return(T=(h=t.walletBalance.wallet)==null?void 0:h.auto_top_up_configs)==null?void 0:T.find(m=>m.status==="ACTIVE")}),S=e.computed(()=>{var h,T;return(T=(h=t.walletBalance.wallet_balance.open_balance)==null?void 0:h.credits)==null?void 0:T.credit_type}),f=(h,T)=>a({credits:{quantity:h,credit_type_id:T,credit_type:S.value}}),v=h=>h.amount?a({amount:h.amount}):h.credits?f(h.credits.quantity,h.credits.credit_type_id):"",p=e.computed(()=>{var h,T;const m=(h=y.value)==null?void 0:h.pricing_item_id;if(!m)return;const C=(t.walletBalance.charge_on_demand_pricing_items??[]).filter(A=>A.pricing_item_id===m).flatMap(A=>s(A)).flatMap(A=>A.wallet_grants??[]),B=(T=t.walletBalance.wallet)==null?void 0:T.wallet_type_id;return C.find(A=>A.wallet_type_id===B)??C[0]}),w=e.computed(()=>{var h,T;const m=(h=y.value)==null?void 0:h.topup_amount,C=(T=p.value)==null?void 0:T.credits_grant;if(!m||!C)return"";if(C.credits)return f(C.credits.quantity,C.credits.credit_type_id);if(C.conversion){const B=Number(m.quantity)*Number(C.conversion.rate);return f(String(B),C.conversion.credit_type_id)}return""}),P=e.computed(()=>y.value?o({defaultMessage:"Auto top-up enabled",id:"wallet_balance.auto_top_up_enabled_label",description:"Label shown when a wallet tops itself up automatically"}):o({defaultMessage:"No auto top-up enabled",id:"wallet_balance.auto_top_up_disabled_label",description:"Label shown when a wallet has no automatic top-up configured"})),D=e.computed(()=>{const h=y.value;if(!h)return o({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.",id:"wallet_balance.auto_top_up_setup_explanation",description:"Tooltip explaining what automatic top-ups do, shown when none is configured yet"});const T=h.topup_amount?a({amount:h.topup_amount}):"",m=v(h.threshold);return!T||!m?o({defaultMessage:"Your balance is topped up automatically once it runs low.",id:"wallet_balance.auto_top_up_generic_explanation",description:"Tooltip shown for an active automatic top-up whose amount or threshold is unknown"}):w.value?o({defaultMessage:"Your balance is automatically increased with {topUpCredits} ({topUpAmount}) when it drops below {threshold}.",id:"wallet_balance.auto_top_up_credits_explanation",description:"Tooltip explaining an automatic top-up that grants credits for a paid amount"},{topUpCredits:w.value,topUpAmount:T,threshold:m}):o({defaultMessage:"Your balance is automatically increased with {topUpAmount} when it drops below {threshold}.",id:"wallet_balance.auto_top_up_explanation",description:"Tooltip explaining how the automatic top-up of a wallet balance works"},{topUpAmount:T,threshold:m})});return{walletName:i,formatBalance:a,manualTopUpItems:l,flexibleManualTopUpItem:u,showManualTopUp:d,showAutoTopUp:g,activeTopUpConfig:y,autoTopUpLabel:P,autoTopUpExplanation:D}},dt={class:"flex flex-col gap-3 py-3"},pt={class:"flex flex-col gap-1 px-4"},mt={class:"flex w-full justify-between gap-3"},ft={class:"flex w-full items-center gap-4"},vt={key:0},ht={key:1,class:"flex w-full justify-between gap-3 px-4"},gt={class:"flex min-w-0 items-center gap-1"},_t={class:"flex min-w-0 items-center gap-1"},yt={class:"shrink-0"},bt=e.defineComponent({__name:"WalletBalancesItem",props:{walletBalance:{},showAutoTopUp:{type:Boolean},showManualTopUp:{type:Boolean}},emits:["top-up","auto-top-up","cancel-auto-top-up"],setup(t){const o=t,{$t:n}=M.useIntl(),{walletName:a,formatBalance:i,manualTopUpItems:s,flexibleManualTopUpItem:l,showManualTopUp:u,showAutoTopUp:d,activeTopUpConfig:g,autoTopUpLabel:y,autoTopUpExplanation:S}=ct(o);return(f,v)=>(e.openBlock(),e.createElementBlock("div",dt,[e.createElementVNode("div",pt,[e.createElementVNode("div",mt,[e.createVNode(M._sfc_main,{variant:"body-xs",color:"subtle","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)),1)]),_:1}),e.createVNode(M._sfc_main,{variant:"body-xs",color:"subtle","no-spacing":""},{default:e.withCtx(()=>{var p,w;return[(p=t.walletBalance.wallet_balance)!=null&&p.balance_at?(e.openBlock(),e.createBlock(rt,{key:0,date:new Date((w=t.walletBalance.wallet_balance)==null?void 0:w.balance_at),"action-verb":e.unref(n)({defaultMessage:"updated",id:"wallet_balance.updated_action_verb",description:"Verb in front of when a wallet balance was last updated, e.g. 'updated 5 minutes ago'"})},null,8,["date","action-verb"])):e.createCommentVNode("",!0)]}),_:1})]),e.createElementVNode("div",ft,[e.createVNode(M._sfc_main,{variant:"body-lg",weight:"semibold","no-spacing":"",class:"grow"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)(o.walletBalance.wallet_balance.open_balance)),1)]),_:1}),e.unref(u)?(e.openBlock(),e.createBlock(e.unref(z._sfc_main),{key:0,size:"xs",onClick:v[0]||(v[0]=p=>f.$emit("top-up",e.unref(s)[0]))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"Top up",id:"v1V8kA",description:"Button to top up a wallet balance"})),1)]),_:1})):e.createCommentVNode("",!0)])]),f.$slots.graph?(e.openBlock(),e.createElementBlock("div",vt,[e.renderSlot(f.$slots,"graph")])):e.createCommentVNode("",!0),e.unref(d)?(e.openBlock(),e.createElementBlock("div",ht,[e.createElementVNode("div",gt,[e.createVNode(j._sfc_main,{class:"min-w-0"},{tooltip:e.withCtx(()=>[e.createVNode(j.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(j._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(S)),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("div",_t,[e.createVNode(M._sfc_main,{variant:"body-sm",color:"secondary","no-spacing":"",class:"truncate"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(y)),1)]),_:1}),e.createVNode(z._sfc_main$1,{icon:"info",size:"2xs",class:"shrink-0 cursor-help text-gray-400"})])]),_:1})]),e.createElementVNode("div",yt,[e.unref(g)?(e.openBlock(),e.createBlock(e.unref(z._sfc_main),{key:0,size:"xs",intent:"secondary",onClick:v[1]||(v[1]=p=>f.$emit("cancel-auto-top-up",e.unref(g)))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"Disable",id:"wallet_balance.auto_top_up_disable_button",description:"Button to turn off a wallet's automatic top-up"})),1)]),_:1})):(e.openBlock(),e.createBlock(e.unref(z._sfc_main),{key:1,size:"xs",intent:"secondary",onClick:v[2]||(v[2]=p=>f.$emit("auto-top-up",e.unref(l)))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"Enable",id:"wallet_balance.auto_top_up_enable_button",description:"Button to set up a wallet's automatic top-up"})),1)]),_:1}))])])):e.createCommentVNode("",!0)]))}}),wt={class:"flex flex-col gap-2"},Tt=e.defineComponent({__name:"WalletBalances",props:{customerWalletBalances:{},title:{default:void 0},showAutoTopUp:{type:Boolean,default:!1},showManualTopUp:{type:Boolean,default:!1}},emits:["top-up","auto-top-up","cancel-auto-top-up"],setup(t){return(o,n)=>(e.openBlock(),e.createBlock(Z._sfc_main,{"no-spacing":"","no-border":"",title:t.title},e.createSlots({default:e.withCtx(()=>[e.createElementVNode("div",wt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.customerWalletBalances,a=>(e.openBlock(),e.createBlock(Z._sfc_main,{key:a.wallet_id,"no-spacing":""},{default:e.withCtx(()=>[e.createVNode(bt,{"wallet-balance":a,"show-auto-top-up":t.showAutoTopUp,"show-manual-top-up":t.showManualTopUp,onTopUp:n[0]||(n[0]=i=>o.$emit("top-up",i)),onAutoTopUp:n[1]||(n[1]=i=>o.$emit("auto-top-up",i)),onCancelAutoTopUp:n[2]||(n[2]=i=>o.$emit("cancel-auto-top-up",i))},null,8,["wallet-balance","show-auto-top-up","show-manual-top-up"])]),_:2},1024))),128))])]),_:2},[o.$slots["heading-right"]?{name:"right",fn:e.withCtx(()=>[e.renderSlot(o.$slots,"heading-right")]),key:"0"}:void 0]),1032,["title"]))}});function Ct(){const t=M.createRequestService(),o=M.useConfig();function n(a){return t({url:`${o.apiUrls.config}/portal/customers/${a}/wallets/balance`,query:Je.withExpand({expandParams:Ze.EXPAND_ALL}),options:{method:"POST"},data:{}})}return{getCustomerWalletBalances:n}}function Mt({customerId:t}){const{getCustomerWalletBalances:o}=Ct(),{data:n,execute:a,apiStatus:i,error:s,isPending:l}=et.useService({service:()=>o(t)});return{walletBalances:e.computed(()=>n.value??null),apiStatus:i,error:s,fetch:a,isPending:l}}const ve=(t=[],o)=>{if(o!=null&&o.pricing_item_id)return t.find(n=>(n.charge_on_demand_pricing_items??[]).some(({pricing_item_id:a})=>a===o.pricing_item_id))},St=["TOP_UP","ADD_PAYMENT_METHOD","SUCCESS"],ce=t=>typeof t=="object"&&t!==null&&"pricing_item"in t,xt=t=>[...new Set(((t==null?void 0:t.charge_on_demand_pricing_items)??[]).flatMap(o=>ce(o)&&o.pricing_plan_schedule_id?[o.pricing_plan_schedule_id]:[]))],Bt=(t,o)=>{const n=new Set(xt(t));return o.flatMap(a=>{const i=(a.pricing_plan_schedule_infos??[]).filter(({id:s})=>n.has(s));return i.length===0?[]:[{id:a.id,name:a.name||a.reference||a.id,scheduleIds:i.map(({id:s})=>s),enabledPricingIds:i.flatMap(s=>{var l;return(((l=s.pricing_plan_schedule)==null?void 0:l.enabled_pricings)??[]).flatMap(({pricing_id:u})=>u?[u]:[])})}]})},Ut=(t,o)=>{if(!t||o.length===0)return t;const n=new Set(o);return{...t,charge_on_demand_pricing_items:(t.charge_on_demand_pricing_items??[]).filter(a=>ce(a)&&!!a.pricing_plan_schedule_id&&n.has(a.pricing_plan_schedule_id))}},Ne=t=>((t==null?void 0:t.charge_on_demand_pricing_items)??[]).flatMap(o=>{var a,i;if(!ce(o))return[];const n=o.pricing_item_id??((a=o.pricing_item)==null?void 0:a.id);return n?(((i=o.pricing_item)==null?void 0:i.configs)??[]).map(s=>{const l=kt(s,t),u=Pt(s,t);return{pricingItemId:n,...o.pricing_plan_schedule_id&&{pricingPlanScheduleId:o.pricing_plan_schedule_id},config:s,...l&&{flexiblePricing:l},...u&&{fixedPricing:u}}}):[]});function Pt(t,o){var s,l,u;if(!t.on_demand||!J.hasOneOfPricingTypes(t,["FIXED"]))return;const n=(u=(l=(s=t.details)==null?void 0:s.bands)==null?void 0:l[0])==null?void 0:u.fixed_amount;if(!n)return;const a=ke(o),i=a?Nt(t,o):void 0;return{amount:n,value:i&&a?de(i.quantity,a):{amount:n}}}const ke=t=>{var o;return(o=t==null?void 0:t.wallet_balance.balance)==null?void 0:o.credits},Ee=(t,o)=>{var a;const n=(a=o==null?void 0:o.wallet)==null?void 0:a.wallet_type_id;return(t.wallet_grants??[]).filter(({wallet_type_id:i})=>!n||i===n)},At=(t,o)=>{var n,a;return(a=(n=Ee(t,o).find(({credits_grant:i})=>i==null?void 0:i.conversion))==null?void 0:n.credits_grant)==null?void 0:a.conversion},Nt=(t,o)=>{var n,a;return(a=(n=Ee(t,o).find(({credits_grant:i})=>i==null?void 0:i.credits))==null?void 0:n.credits_grant)==null?void 0:a.credits},de=(t,o)=>({credits:{...o,quantity:t}}),Ve=(t,o)=>{const n=Number(t),a=Number(o);return Number.isFinite(n)&&Number.isFinite(a)?String(n*a):void 0};function kt(t,o){var d,g,y,S,f,v,p;if(!t.on_demand||!J.isFlexiblePricing(t))return;const n=(g=(d=t.details)==null?void 0:d.bands)==null?void 0:g[0],a=((y=n==null?void 0:n.minimum_amount)==null?void 0:y.currency)??((S=n==null?void 0:n.maximum_amount)==null?void 0:S.currency)??((v=(f=o==null?void 0:o.wallet_balance.balance)==null?void 0:f.amount)==null?void 0:v.currency);if(!a)return;const i=ke(o),s=i?At(t,o):void 0,l=(p=i==null?void 0:i.credit_type)==null?void 0:p.unit_name,u=w=>{if(!w)return;const P=i&&s?Ve(w.quantity,s.rate):void 0;return P!==void 0&&i?de(P,i):{amount:w}};return{config:{...(n==null?void 0:n.minimum_amount)&&{minimum_amount:n.minimum_amount},...(n==null?void 0:n.maximum_amount)&&{maximum_amount:n.maximum_amount}},currency:a,...s&&{creditsConfiguration:{conversionRate:s.rate,...(l==null?void 0:l.singular)&&{unitNameSingle:l.singular},...(l==null?void 0:l.plural)&&{unitNamePlural:l.plural}}},bounds:{...u(n==null?void 0:n.minimum_amount)&&{minimum:u(n==null?void 0:n.minimum_amount)},...u(n==null?void 0:n.maximum_amount)&&{maximum:u(n==null?void 0:n.maximum_amount)}}}}const Et=t=>{var o,n,a,i,s;return!!((o=t.fixedPricing)!=null&&o.value.credits)||!!((n=t.flexiblePricing)!=null&&n.creditsConfiguration)||!!((s=((a=t.flexiblePricing)==null?void 0:a.bounds.minimum)??((i=t.flexiblePricing)==null?void 0:i.bounds.maximum))!=null&&s.credits)},Vt=t=>{var o;for(const{fixedPricing:n,flexiblePricing:a}of t){const i=(n==null?void 0:n.value.credits)??((o=(a==null?void 0:a.bounds.minimum)??(a==null?void 0:a.bounds.maximum))==null?void 0:o.credits);if(i!=null&&i.credit_type_id)return i.credit_type_id}},$t=(t=[])=>{for(const{flexiblePricing:o,fixedPricing:n}of t){const a=(o==null?void 0:o.currency)??(n==null?void 0:n.amount.currency);if(a)return a}},$e=(t=[])=>{var o,n,a;for(const{fixedPricing:i,flexiblePricing:s}of t){const l=(i==null?void 0:i.value.credits)??((o=(s==null?void 0:s.bounds.minimum)??(s==null?void 0:s.bounds.maximum))==null?void 0:o.credits);if((a=(n=l==null?void 0:l.credit_type)==null?void 0:n.unit_name)!=null&&a.plural)return l.credit_type.unit_name.plural}},Ot=(t=[])=>{var o;for(const{flexiblePricing:n}of t){const a=(o=n==null?void 0:n.creditsConfiguration)==null?void 0:o.conversionRate;if(a)return a}},It=(t=[])=>{for(const{flexiblePricing:o}of t){const{minimum_amount:n,maximum_amount:a}=(o==null?void 0:o.config)??{};if(n||a)return{...n&&{minimum:n},...a&&{maximum:a}}}return{}},Dt=(t=[])=>{if(t.some(Et)){const o=Vt(t);return o?{creditTypeId:o}:void 0}for(const{flexiblePricing:o,fixedPricing:n}of t){const a=(o==null?void 0:o.currency)??(n==null?void 0:n.amount.currency);if(a)return{currency:a}}},qt=(t,o)=>{var l;if(t.fixedPricing)return t.fixedPricing.value;if(!t.flexiblePricing||!o)return;const{bounds:n,creditsConfiguration:a}=t.flexiblePricing,i=(l=n.minimum??n.maximum)==null?void 0:l.credits,s=a?Ve(o.quantity,a.conversionRate):void 0;return i&&s!==void 0?de(s,i):{amount:o}},Oe=(t=[])=>{const o=Dt(t);if(o)return{denomination:o,chargeCurrency:$t(t)??"",creditUnitName:$e(t),conversionRate:Ot(t),topUpBounds:It(t)}},Rt=400;function Ft({pricingPlanScheduleId:t,pricingItems:o}){const{previewChargeOnDemandPricingItems:n}=Pe.createInvoicesService(),a=M.useLogger(),i=e.ref(),s=e.ref(!1),l=M.createLatestGuard(),u=async()=>{const d=t.value,g=l();if(!d||!o.value){o.value&&!d&&a.warn("INVOICE_PREVIEW_SKIPPED","Skipped the top-up invoice preview: no schedule to charge it on",{missing:["pricingPlanScheduleId"]}),i.value=void 0,s.value=!1;return}s.value=!0;try{const y=await n({pricingPlanScheduleId:d,pricingItems:o.value});g()&&(i.value=y)}catch(y){g()&&(i.value=void 0),a.error("INVOICE_PREVIEW_FAILED","Failed to load top-up invoice preview",{},y)}finally{g()&&(s.value=!1)}};return nt.useWatchDebounced(o,()=>void u(),{debounce:Rt,deep:!0}),u(),{invoicePreview:i,isPreviewPending:s,loadPreview:u}}const Lt={key:0},Ie=e.defineComponent({__name:"TopUpInvoicePreview",props:{pricingPlanScheduleId:{type:String},pricingItems:{type:Array}},setup(t){const o=t,{$t:n}=M.useIntl(),a=e.computed(()=>o.pricingPlanScheduleId),i=e.computed(()=>o.pricingItems),{invoicePreview:s}=Ft({pricingPlanScheduleId:a,pricingItems:i});return(l,u)=>(e.openBlock(),e.createBlock(Se._sfc_main,{class:"sv-top-up-invoice-preview h-[152px]","data-testid":"top-up-invoice-preview-skeleton"},{default:e.withCtx(()=>[e.unref(s)?(e.openBlock(),e.createElementBlock("div",Lt,[e.createVNode(e.unref(ot._sfc_main),{required:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n)({defaultMessage:"You will pay",description:"Label above the preview of what topping up will be invoiced for",id:"topup_modal.invoice_preview.label"})),1)]),_:1}),e.createVNode(e.unref(Z._sfc_main),{"content-background":"none"},{default:e.withCtx(()=>[e.createVNode(e.unref(Ue._sfc_main$1),{invoice:e.unref(s),"is-customer-facing":""},null,8,["invoice"])]),_:1})])):e.createCommentVNode("",!0)]),_:1}))}}),De=(t,o)=>t.currency??o??t.creditTypeId??"",he=(t,o)=>({quantity:t??null,currency:o}),ie=(t,{denomination:o,chargeCurrency:n,creditUnitName:a,minimumTopUp:i})=>{var s,l,u,d,g;return{enabled:(t==null?void 0:t.status)==="ACTIVE",threshold:he(((l=(s=t==null?void 0:t.threshold)==null?void 0:s.amount)==null?void 0:l.quantity)??((d=(u=t==null?void 0:t.threshold)==null?void 0:u.credits)==null?void 0:d.quantity),De(o,a)),topUpAmount:he(((g=t==null?void 0:t.topup_amount)==null?void 0:g.quantity)??i,n)}},Yt=(t,o)=>{var a;const n=(a=t.threshold)==null?void 0:a.quantity;return n?o.creditTypeId?{credits:{quantity:n,credit_type_id:o.creditTypeId}}:{amount:{quantity:n,currency:o.currency??""}}:{}},ge=(t,o)=>{var n;return(n=t.topUpAmount)!=null&&n.quantity?{quantity:t.topUpAmount.quantity,currency:t.topUpAmount.currency??o}:void 0},qe=(t,{denomination:o,chargeCurrency:n})=>({status:t.enabled?"ACTIVE":"INACTIVE",threshold:Yt(t,o),...ge(t,n)&&{topup_amount:ge(t,n)}}),_e=(t,o)=>qe(ie(t,o),o),ye=(t,o)=>JSON.stringify(t)===JSON.stringify(o),be=t=>{const o=Number(t==null?void 0:t.quantity);return t!=null&&t.quantity&&Number.isFinite(o)?o:void 0},Wt=(t,o)=>{const n=Number(o==null?void 0:o.quantity);return t===null||!(o!=null&&o.quantity)||!Number.isFinite(n)||t>=n},Ht=(t,o)=>{const n=Number(o==null?void 0:o.quantity);return t===null||!(o!=null&&o.quantity)||!Number.isFinite(n)||t<=n},ee=t=>{const o=Number(t);return t!=null&&t!==""&&Number.isFinite(o)?o:void 0},pe=(t,o,n)=>{const a=ee(t),i=ee(n);if(!(a===void 0||i===void 0||i<=0))return o==="CREDITS"?a/i:a*i},we=(t,o,n,a)=>o===n?ee(t):pe(t,o,a),zt=(t,o,n)=>o==="CREDITS"?pe(t,"AMOUNT",n):ee(t),me=t=>t.toFixed(2),Te=(t,o)=>o==="AMOUNT"?me(t):String(Number(t.toFixed(6))),Re=(t,o,n,a)=>{const i=zt(t==null?void 0:t.quantity,o,n);if(i!==void 0)return o==="CREDITS"?a(i):me(i)},jt=["data-testid"],se=e.defineComponent({__name:"ConvertedAmountInput",props:e.mergeModels({unit:{type:String},modelBase:{type:String},entryBase:{type:String},conversionRate:{type:String},showConversionHint:{type:Boolean},currency:{type:String},creditUnitName:{type:String},bounds:{type:Object},label:{type:String},name:{type:String},required:{type:Boolean},disabled:{type:Boolean},error:{type:[String,Object,Array]}},{modelValue:{default:""},modelModifiers:{}}),emits:["update:modelValue"],setup(t){const o=t,n=e.useModel(t,"modelValue"),{$t:a,formatNumber:i}=M.useIntl(),s=e.computed(()=>o.entryBase??o.modelBase),l=e.computed(()=>s.value!==o.modelBase&&ee(o.conversionRate)!==void 0),u=e.ref("");e.watch(()=>[n.value,s.value,o.modelBase,o.conversionRate],([m])=>{if(!l.value){u.value=m??"";return}if(m===g(u.value))return;const C=we(m,o.modelBase,s.value,o.conversionRate);u.value=C===void 0?"":Te(C,s.value)},{immediate:!0});function d(m){return typeof m=="string"?m:typeof m=="number"?String(m):""}function g(m){const C=we(m,s.value,o.modelBase,o.conversionRate);return C===void 0?"":Te(C,o.modelBase)}const y=e.computed({get:()=>u.value,set:m=>{u.value=d(m),n.value=l.value?g(u.value):u.value}}),S=e.computed(()=>pe(u.value,s.value,o.conversionRate)),f=e.computed(()=>o.creditUnitName?o.creditUnitName:s.value==="CREDITS"?o.unit:a({defaultMessage:"credits",description:"Generic name for a wallet credit, where its credit type does not name one",id:"converted_amount_input.credits"})),v=(m,C)=>le.formatAmount({quantity:me(m),currency:C}),p=m=>`${i(m)} ${f.value}`,w=e.computed(()=>{const m=o.error;return Array.isArray(m)?m.length>0:!!(e.isRef(m)?m.value:m)}),P=e.computed(()=>{const m=S.value;if(!(w.value||!o.showConversionHint||m===void 0))return s.value==="CREDITS"?o.currency?a({defaultMessage:"Will cost {amount} excluding taxes",description:"Helper text under a credits field, naming what those credits cost in money",id:"converted_amount_input.cost"},{amount:v(m,o.currency)}):void 0:a({defaultMessage:"Buys about {credits}",description:"Helper text under a money field, naming the credits that amount converts into",id:"converted_amount_input.buys"},{credits:p(m)})}),D=m=>Re(m,s.value,o.conversionRate,i),h=e.computed(()=>{var m,C,B,A;return s.value==="CREDITS"?f.value:((C=(m=o.bounds)==null?void 0:m.minimum)==null?void 0:C.currency)??((A=(B=o.bounds)==null?void 0:B.maximum)==null?void 0:A.currency)??o.unit}),T=e.computed(()=>{var A,_;const m=D((A=o.bounds)==null?void 0:A.minimum),C=D((_=o.bounds)==null?void 0:_.maximum),B=h.value;if(m&&C)return a({defaultMessage:"Between {minimum} and {maximum} {unit}",description:"Range of what a flexible top-up may be charged for, beside its label",id:"converted_amount_input.bounds.range"},{minimum:m,maximum:C,unit:B});if(m)return a({defaultMessage:"At least {minimum} {unit}",description:"Smallest amount a flexible top-up may be charged for, beside its label",id:"converted_amount_input.bounds.minimum"},{minimum:m,unit:B});if(C)return a({defaultMessage:"Up to {maximum} {unit}",description:"Largest amount a flexible top-up may be charged for, beside its label",id:"converted_amount_input.bounds.maximum"},{maximum:C,unit:B})});return(m,C)=>(e.openBlock(),e.createBlock(e.unref(at._sfc_main),{modelValue:y.value,"onUpdate:modelValue":C[0]||(C[0]=B=>y.value=B),class:"sv-converted-amount-input",type:"number","as-text-type":"",name:t.name,label:t.label,required:t.required,disabled:t.disabled,error:t.error},e.createSlots({suffix:e.withCtx(()=>[e.createElementVNode("span",{"data-testid":`${t.name}-unit`},e.toDisplayString(t.unit),9,jt)]),_:2},[T.value?{name:"label-suffix",fn:e.withCtx(()=>[e.createVNode(e.unref(M._sfc_main),{tag:"span",variant:"body-xs",color:"subtle","no-spacing":"","data-testid":`${t.name}-bounds`},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(T.value),1)]),_:1},8,["data-testid"])]),key:"0"}:void 0,P.value?{name:"helper",fn:e.withCtx(()=>[e.createVNode(e.unref(M._sfc_main),{tag:"span",variant:"body-xs",color:"subtle","no-spacing":"","data-testid":`${t.name}-conversion`},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(P.value),1)]),_:1},8,["data-testid"])]),key:"1"}:void 0]),1032,["modelValue","name","label","required","disabled","error"]))}}),Qt=e.defineComponent({__name:"Section",props:{emphasized:{type:Boolean,default:!1},contentClasses:{type:String},contentBackground:{type:String},title:{type:String},noSpacing:{type:Boolean},hasError:{type:Boolean},noBorder:{type:Boolean}},setup(t){const o=t,n=["sv-section__accent relative","before:absolute before:inset-y-0.5 before:left-0.5 before:w-0.5","before:rounded-full before:bg-primary-600"].join(" "),a=e.computed(()=>[o.emphasized?n:void 0,o.contentClasses].filter(Boolean).join(" ")),i=e.computed(()=>{const{emphasized:s,...l}=o;return l});return(s,l)=>(e.openBlock(),e.createBlock(e.unref(Z._sfc_main),e.mergeProps(i.value,{class:"sv-section","content-classes":a.value}),e.createSlots({default:e.withCtx(()=>[e.renderSlot(s.$slots,"default")]),_:2},[s.$slots.right?{name:"right",fn:e.withCtx(()=>[e.renderSlot(s.$slots,"right")]),key:"0"}:void 0]),1040,["content-classes"]))}}),Gt={class:"flex grow flex-col"},Fe=e.defineComponent({__name:"AutoTopUpConfig",props:{config:{type:Object},denomination:{type:Object},creditUnitName:{type:String},chargeCurrency:{type:String},conversionRate:{type:String},topUpBounds:{type:Object},showThresholdConversion:{type:Boolean,default:!0},contained:{type:Boolean},alwaysEnabled:{type:Boolean},disabled:{type:Boolean}},emits:["save"],setup(t,{expose:o,emit:n}){const a=t,i=n,{$t:s,formatNumber:l}=M.useIntl(),u=e.computed(()=>{var _,x;return{denomination:a.denomination,chargeCurrency:a.chargeCurrency,creditUnitName:a.creditUnitName,minimumTopUp:(x=(_=a.topUpBounds)==null?void 0:_.minimum)==null?void 0:x.quantity}}),d=e.ref(ie(a.config,u.value)),g=e.computed(()=>De(a.denomination,a.creditUnitName)),y=e.computed(()=>a.denomination.creditTypeId?"CREDITS":"AMOUNT"),S=e.computed(()=>y.value==="CREDITS"?g.value:a.chargeCurrency),f=e.computed({get:()=>{var _;return((_=d.value.threshold)==null?void 0:_.quantity)??""},set:_=>{d.value.threshold={quantity:_||null,currency:g.value}}}),v=e.computed({get:()=>{var _;return((_=d.value.topUpAmount)==null?void 0:_.quantity)??""},set:_=>{d.value.topUpAmount={quantity:_||null,currency:a.chargeCurrency}}});e.watch(()=>[a.config,u.value],([_,x])=>{ye(_e(_,x),P())||(d.value=ie(_,x))});const p=e.computed({get:()=>a.alwaysEnabled||d.value.enabled,set:_=>{d.value.enabled=_}}),w=e.computed(()=>qe({...d.value,enabled:p.value},u.value)),P=()=>w.value,D=e.reactive({threshold:e.computed(()=>be(d.value.threshold)??null),topUpAmount:e.computed(()=>be(d.value.topUpAmount)??null)}),h=_=>{if(!_)return"";const x=Re(_,y.value,a.conversionRate,l);return x===void 0?le.formatAmount(_):`${x} ${S.value}`},T=I.requiredIf(()=>p.value),m=I.useValidation({threshold:{required:I.common.withMessage(()=>s({defaultMessage:"Enter the balance to top up at.",description:"Error shown under the auto top-up threshold when it is left empty",id:"auto_topup_config.threshold.required"}),T),notNegative:I.common.withMessage(()=>s({defaultMessage:"The balance to top up at cannot be negative.",description:"Error shown under the auto top-up threshold when it is below zero",id:"auto_topup_config.threshold.not_negative"}),_=>_===null||_>=0)},topUpAmount:{required:I.common.withMessage(()=>s({defaultMessage:"Enter the amount to top up with.",description:"Error shown under the auto top-up amount when it is left empty",id:"auto_topup_config.amount.required"}),T),positive:I.common.withMessage(()=>s({defaultMessage:"Top up with more than zero.",description:"Error shown under the auto top-up amount when it is zero or negative",id:"auto_topup_config.amount.positive"}),_=>_===null||_>0),atLeastMinimum:I.common.withMessage(()=>{var _;return s({defaultMessage:"Top up with at least {minimum}.",description:"Error shown under the auto top-up amount when it is below what the pricing allows",id:"auto_topup_config.amount.at_least_minimum"},{minimum:h((_=a.topUpBounds)==null?void 0:_.minimum)})},_=>{var x;return Wt(_,(x=a.topUpBounds)==null?void 0:x.minimum)}),withinMaximum:I.common.withMessage(()=>{var _;return s({defaultMessage:"Top up with at most {maximum}.",description:"Error shown under the auto top-up amount when it is above what the pricing allows",id:"auto_topup_config.amount.within_maximum"},{maximum:h((_=a.topUpBounds)==null?void 0:_.maximum)})},_=>{var x;return Ht(_,(x=a.topUpBounds)==null?void 0:x.maximum)})}},D),C=e.computed(()=>!ye(P(),_e(a.config,u.value)));function B(){return m.value.$touch(),m.value.$invalid?void 0:P()}function A(){const _=B();_&&i("save",_)}return o({submit:A,validate:B,rule:w,hasChanges:C,isInvalid:e.computed(()=>m.value.$invalid)}),(_,x)=>(e.openBlock(),e.createBlock(Qt,{class:"sv-auto-topup-config","content-background":t.contained?"gray":"none","no-spacing":!t.contained,"no-border":!t.contained},{default:e.withCtx(()=>[t.alwaysEnabled?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock(e.unref(I._sfc_main),{key:0,modelValue:p.value,"onUpdate:modelValue":x[0]||(x[0]=q=>p.value=q),"no-spacing":"","label-position":"before",class:"!flex",disabled:t.disabled},{"inline-label":e.withCtx(()=>[e.createElementVNode("div",Gt,[e.createVNode(e.unref(M._sfc_main),{tag:"span",variant:"body-sm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Auto top-up",description:"Title of the automatic wallet top-up settings",id:"auto_topup_config.title"})),1)]),_:1}),e.createVNode(e.unref(M._sfc_main),{tag:"span",variant:"body-xs",color:"subtle"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)({defaultMessage:"Automatically top up your balance when it runs low.",description:"Subtitle of the automatic wallet top-up settings",id:"auto_topup_config.subtitle"})),1)]),_:1})])]),_:1},8,["modelValue","disabled"])),e.createVNode(e.unref(Be._sfc_main),{"is-open":p.value},{default:e.withCtx(()=>[p.value?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["grid grid-cols-1 gap-3",{"mt-4":!t.alwaysEnabled}])},[e.createVNode(se,{modelValue:f.value,"onUpdate:modelValue":x[1]||(x[1]=q=>f.value=q),name:"auto-top-up-threshold",unit:g.value,"model-base":y.value,"entry-base":y.value,currency:t.chargeCurrency,"conversion-rate":t.conversionRate,"show-conversion-hint":t.showThresholdConversion,required:"",disabled:t.disabled,error:e.unref(m).threshold.$errors,label:e.unref(s)({defaultMessage:"When your balance falls below",description:"Label of the balance at which an automatic top-up is charged",id:"auto_topup_config.threshold.label"})},null,8,["modelValue","unit","model-base","entry-base","currency","conversion-rate","show-conversion-hint","disabled","error","label"]),e.createVNode(se,{modelValue:v.value,"onUpdate:modelValue":x[2]||(x[2]=q=>v.value=q),name:"auto-top-up-amount",unit:S.value,"model-base":"AMOUNT","entry-base":y.value,currency:t.chargeCurrency,"credit-unit-name":t.creditUnitName,"conversion-rate":t.conversionRate,bounds:t.topUpBounds,"show-conversion-hint":"",required:"",disabled:t.disabled,error:e.unref(m).topUpAmount.$errors,label:e.unref(s)({defaultMessage:"Top-up with",description:"Label of the amount every automatic top-up adds",id:"auto_topup_config.amount.label"})},null,8,["modelValue","unit","entry-base","currency","credit-unit-name","conversion-rate","bounds","disabled","error","label"])],2)):e.createCommentVNode("",!0)]),_:1},8,["is-open"])]),_:1},8,["content-background","no-spacing","no-border"]))}}),Ce=t=>{const o=Date.parse(t??"");return Number.isFinite(o)?o:0};function Le({paymentMethods:t,selectedPaymentMethodId:o,preferredPaymentMethodId:n}){const a=e.computed(()=>[...t.value??[]].sort((i,s)=>Ce(s.created_at)-Ce(i.created_at)));return e.watch(()=>[t.value,n==null?void 0:n.value,o.value],([i,s,l],u)=>{var S;const d=u==null?void 0:u[0],g=i==null?void 0:i.find(({id:f})=>!(d!=null&&d.some(v=>v.id===f)));if(g&&(d!=null&&d.length)){o.value=g.id;return}const y=f=>!!f&&!!(i!=null&&i.some(v=>v.id===f));y(l)||(o.value=y(s)?s:(S=(i==null?void 0:i.find(({is_default:f})=>f))??a.value[0])==null?void 0:S.id)},{immediate:!0}),{sortedPaymentMethods:a}}function te(){const{$t:t,formatNumber:o}=M.useIntl(),n=i=>ue.formatWalletBalanceValue(t,o,i);return{formatValue:n,formatOpenBalance:i=>n(i==null?void 0:i.wallet_balance.open_balance)}}const Kt={class:"sv-top-up-form"},Xt={class:"grid grid-cols-1 gap-4"},Jt={class:"grid grid-cols-1 gap-1"},Zt={class:"sv-top-up-form__option-details"},eo={key:0},to=e.defineComponent({__name:"TopUpModalForm",props:{topUpPricingItems:{type:null},paymentMethods:{type:Array},paymentMethodOptions:{type:Array},autoTopUpConfig:{type:Object}},emits:["add-payment-method","success","save-auto-top-up","failure"],setup(t,{expose:o,emit:n}){const a=t,i=n,{$t:s}=M.useIntl(),{formatValue:l}=te(),u=e.ref({pricing_plan_schedule_id:"",pricing_items:[],start_at:"",finalize_immediately:!1,payment_method_id:void 0,preview:!0}),d=e.computed(()=>{const r=(a.topUpPricingItems??[]).filter(c=>c.flexiblePricing||c.fixedPricing);return[...r.filter(({flexiblePricing:c})=>c),...r.filter(({flexiblePricing:c})=>!c)]}),g=r=>d.value.find(c=>c.pricingItemId===r),y=e.computed(()=>{var r,c;return(c=(r=a.topUpPricingItems)==null?void 0:r.find(b=>b.pricingPlanScheduleId))==null?void 0:c.pricingPlanScheduleId});e.watch(y,r=>{u.value.pricing_plan_schedule_id=r??""},{immediate:!0});const S=r=>{const{config:c,currency:b}=r.flexiblePricing??{},N=c==null?void 0:c.minimum_amount;return N&&b?{quantity:N.quantity,currency:b}:void 0},f=e.computed({get:()=>{var r;return(r=u.value.pricing_items[0])==null?void 0:r.pricing_item_id},set:r=>{const c=g(typeof r=="string"?r:void 0);if(!c){u.value.pricing_items=[];return}const b=S(c);u.value.pricing_items=[{pricing_item_id:c.pricingItemId,...b&&{flexible_amount:b}}]}});e.watch(d,r=>{if(r.some(({pricingItemId:N})=>{var V;return N===((V=u.value.pricing_items[0])==null?void 0:V.pricing_item_id)}))return;const b=r.find(({flexiblePricing:N})=>N)??r[0];f.value=b==null?void 0:b.pricingItemId},{immediate:!0});const v=e.computed({get:()=>{var r;return(r=u.value.pricing_items[0])==null?void 0:r.flexible_amount},set:r=>{var b;const c=(b=u.value.pricing_items[0])==null?void 0:b.pricing_item_id;c&&(u.value.pricing_items=[{pricing_item_id:c,...r&&{flexible_amount:r}}])}}),p=r=>{var b;const c=(b=g(String(r)))==null?void 0:b.fixedPricing;return c!=null&&c.value.credits?le.formatAmount(c.amount):void 0},w=e.computed(()=>{var r;return(r=g(String(f.value)))==null?void 0:r.flexiblePricing}),P=e.computed({get:()=>{var r;return((r=v.value)==null?void 0:r.quantity)??""},set:r=>{var b;const c=(b=w.value)==null?void 0:b.currency;v.value=r&&c?{quantity:r,currency:c}:void 0}}),D=r=>r.creditsConfiguration?"CREDITS":"AMOUNT",h=e.computed(()=>$e(a.topUpPricingItems)),T=r=>r.creditsConfiguration?h.value??r.creditsConfiguration.unitNamePlural??r.creditsConfiguration.unitNameSingle??"":r.currency,m=r=>{var b;const c=(b=g(String(r)))==null?void 0:b.flexiblePricing;return c?[c]:[]},C=r=>{var c;return!!((c=g(String(r)))!=null&&c.flexiblePricing)},B=e.computed(()=>d.value.map(r=>{var c;return{value:r.pricingItemId,label:r.fixedPricing?l(r.fixedPricing.value):s({defaultMessage:"Choose your own amount",description:"Label of the choose-your-amount option in the top-up modal",id:"topup_modal.flexible_option.label"}),...((c=r.flexiblePricing)==null?void 0:c.bounds.minimum)&&r.flexiblePricing.bounds.maximum&&{description:s({defaultMessage:"Between {minimum} and {maximum}",description:"Bounds of the choose-your-amount option in the top-up modal",id:"topup_modal.flexible_option.bounds"},{minimum:l(r.flexiblePricing.bounds.minimum),maximum:l(r.flexiblePricing.bounds.maximum)})}}})),A=e.computed(()=>{const r=u.value.pricing_items.filter(c=>{var b;return!((b=g(c.pricing_item_id))!=null&&b.flexiblePricing)||!!c.flexible_amount});return r.length>0?r:void 0}),_=e.computed(()=>!a.autoTopUpConfig&&d.value.some(({flexiblePricing:c})=>c)?Oe(a.topUpPricingItems):void 0),x=e.ref(),{chargeOnDemandPricingItems:q}=Pe.createInvoicesService(),Q=M.useLogger(),R=e.ref(!1),L=e.computed(()=>!!u.value.pricing_plan_schedule_id&&!!A.value&&!!u.value.payment_method_id),G=e.reactive({paymentMethodId:e.computed(()=>u.value.payment_method_id??null)}),W=I.useValidation({paymentMethodId:{required:I.common.withMessage(()=>s({defaultMessage:"Select a payment method to pay for this top-up.",description:"Error shown under the payment methods in the top-up modal when none is selected on submit",id:"topup_modal.payment_method_required"}),I.required)}},G),Y=e.computed(()=>{const[r]=u.value.pricing_items,c=g(r==null?void 0:r.pricing_item_id);return c?qt(c,r==null?void 0:r.flexible_amount):void 0});async function K(){var c,b,N;W.value.$touch();const r=(c=x.value)==null?void 0:c.validate();if(!(W.value.$invalid||(b=x.value)!=null&&b.isInvalid||!L.value||R.value)){R.value=!0;try{const V=await q({pricing_plan_schedule_id:u.value.pricing_plan_schedule_id,pricing_items:A.value??[],payment_method_id:u.value.payment_method_id,preview:!1});r&&((N=x.value)!=null&&N.hasChanges)&&u.value.payment_method_id&&i("save-auto-top-up",{rule:r,paymentMethodId:u.value.payment_method_id}),i("success",V)}catch(V){Q.error("TOP_UP_FAILED","Failed to charge the wallet top-up",{},V),i("failure",V)}finally{R.value=!1}}}o({submit:K,isCharging:R,canSubmit:L,chargedValue:Y});const H=e.computed({get:()=>u.value.payment_method_id??void 0,set:r=>{u.value.payment_method_id=r}}),{sortedPaymentMethods:X}=Le({paymentMethods:e.computed(()=>a.paymentMethods),selectedPaymentMethodId:H});return(r,c)=>(e.openBlock(),e.createElementBlock("form",Kt,[e.createElementVNode("div",Xt,[e.createElementVNode("div",Jt,[B.value.length>0?(e.openBlock(),e.createBlock(e.unref(xe._sfc_main),{key:0,modelValue:f.value,"onUpdate:modelValue":c[3]||(c[3]=b=>f.value=b),class:"sv-top-up-form__options",name:"top-up-pricing-item",direction:"column",required:"",disabled:R.value,options:B.value,"show-radio":!1,label:e.unref(s)({defaultMessage:"Top up amount",description:"Label above the list of ways to top up the wallet in the top-up modal",id:"topup_modal.pricing_items.label"})},{label:e.withCtx(({option:b,optionValue:N})=>[e.createElementVNode("span",null,e.toDisplayString(b.label),1),p(N)?(e.openBlock(),e.createBlock(e.unref(M._sfc_main),{key:0,tag:"span",variant:"body-sm",color:"subtle",weight:"normal","no-spacing":"",class:"sv-top-up-form__option-cost"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(p(N)),1)]),_:2},1024)):e.createCommentVNode("",!0)]),description:e.withCtx(({option:b,optionValue:N})=>[e.createElementVNode("div",Zt,[b.description&&!C(N)?(e.openBlock(),e.createBlock(e.unref(M._sfc_main),{key:0,tag:"span",variant:"body-xs",color:"subtle","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.description),1)]),_:2},1024)):e.createCommentVNode("",!0),m(N).length>0?(e.openBlock(),e.createBlock(e.unref(Be._sfc_main),{key:1,"is-open":String(N)===f.value,lazy:""},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(m(N),V=>{var k;return e.openBlock(),e.createElementBlock("div",{key:V.currency,class:"sv-top-up-form__amount grid grid-cols-1 gap-3",onClick:c[1]||(c[1]=e.withModifiers(()=>{},["stop"])),onKeydown:c[2]||(c[2]=e.withModifiers(()=>{},["stop"]))},[b.description?(e.openBlock(),e.createBlock(e.unref(M._sfc_main),{key:0,tag:"span",variant:"body-xs",color:"subtle","no-spacing":""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(b.description),1)]),_:2},1024)):e.createCommentVNode("",!0),e.createVNode(se,{modelValue:P.value,"onUpdate:modelValue":c[0]||(c[0]=O=>P.value=O),name:"top-up-amount","model-base":"AMOUNT",unit:T(V),"entry-base":D(V),currency:V.currency,"conversion-rate":(k=V.creditsConfiguration)==null?void 0:k.conversionRate,required:"",disabled:R.value},null,8,["modelValue","unit","entry-base","currency","conversion-rate","disabled"])],32)}),128))]),_:2},1032,["is-open"])):e.createCommentVNode("",!0)])]),_:1},8,["modelValue","disabled","options","label"])):e.createCommentVNode("",!0)]),e.createElementVNode("div",null,[e.createVNode(Ie,{"pricing-plan-schedule-id":y.value,"pricing-items":A.value},null,8,["pricing-plan-schedule-id","pricing-items"])]),_.value?(e.openBlock(),e.createElementBlock("div",eo,[e.createVNode(Fe,e.mergeProps({ref_key:"autoTopUpFormRef",ref:x,class:"sv-top-up-form__auto-top-up"},_.value,{contained:"","show-threshold-conversion":!1,disabled:R.value}),null,16,["disabled"])])):e.createCommentVNode("",!0),e.createElementVNode("div",null,[e.createVNode(e.unref(tt._sfc_main),{spacing:"xs"})]),e.createElementVNode("div",null,[e.renderSlot(r.$slots,"payment-method",{},()=>[e.createVNode(re._sfc_main,{modelValue:H.value,"onUpdate:modelValue":c[4]||(c[4]=b=>H.value=b),class:"sv-top-up-form__payment-methods","payment-methods":e.unref(X),required:"",error:e.unref(W).paymentMethodId.$errors,"payment-method-options":t.paymentMethodOptions,disabled:R.value,label:e.unref(s)({defaultMessage:"Payment method",description:"Label above the payment method that pays for the top-up, in the top-up modal",id:"topup_modal.payment_method_selector.label"}),onAddPaymentMethod:c[5]||(c[5]=b=>i("add-payment-method"))},null,8,["modelValue","payment-methods","error","payment-method-options","disabled","label"])])])])]))}}),oo={class:"sv-top-up-success grid grid-cols-1 gap-4"},no=e.defineComponent({__name:"TopUpModalSuccess",props:{addedValue:{type:Object},invoice:{type:Object}},setup(t){const{$t:o}=M.useIntl();return(n,a)=>(e.openBlock(),e.createElementBlock("div",oo,[t.invoice?(e.openBlock(),e.createBlock(e.unref(Z._sfc_main),{key:0,"content-background":"none"},{default:e.withCtx(()=>[e.createVNode(e.unref(M._sfc_main),{tag:"span",variant:"body-sm",weight:"semibold",class:"mb-2 block"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)({defaultMessage:"Receipt",description:"Heading above the invoice a completed top-up produced",id:"topup_modal.success.receipt.heading"})),1)]),_:1}),e.createVNode(e.unref(Ue._sfc_main$1),{invoice:t.invoice,"is-customer-facing":""},null,8,["invoice"])]),_:1})):e.createCommentVNode("",!0)]))}});function ao({step:t,currentBalance:o,topUpValue:n}){const{$t:a,formatNumber:i}=M.useIntl(),s=e.computed(()=>t.value==="ADD_PAYMENT_METHOD"?a({defaultMessage:"Add payment method",description:"Title of the top-up modal while the customer is adding a payment method",id:"topup_modal.add_payment_method.title"}):t.value==="SUCCESS"?a({defaultMessage:"Top-up complete",description:"Title of the top-up modal once the top-up has been charged",id:"topup_modal.success.modal_title"}):a({defaultMessage:"Top up balance",description:"Title of the wallet top-up modal",id:"topup_modal.title"})),l=e.computed(()=>t.value==="ADD_PAYMENT_METHOD"?a({defaultMessage:"Add a new payment method for topping up your balance.",description:"Subtitle of the top-up modal while the customer is adding a payment method",id:"topup_modal.add_payment_method.subtitle"}):t.value==="SUCCESS"?a({defaultMessage:"Your payment went through.",description:"Subtitle of the top-up modal once the top-up has been charged",id:"topup_modal.success.modal_subtitle"}):a({defaultMessage:"Your current balance is {balance}.",description:"Subtitle of the top-up modal showing the current wallet balance",id:"topup_modal.subtitle"},{balance:o.value})),u=e.computed(()=>t.value==="ADD_PAYMENT_METHOD"?a({defaultMessage:"Back",description:"Label of the button that leaves the add payment method step in the top-up modal",id:"topup_modal.back_button.label"}):a({defaultMessage:"Cancel",description:"Label of the button that closes the top-up modal",id:"topup_modal.cancel_button.label"})),d=e.computed(()=>t.value==="ADD_PAYMENT_METHOD"?a({defaultMessage:"Save payment method",description:"Label of the confirm button in the top-up modal while adding a payment method",id:"topup_modal.save_payment_method.label"}):t.value==="SUCCESS"?a({defaultMessage:"Done",description:"Label of the button that dismisses the top-up modal once the top-up has been charged",id:"topup_modal.done_button.label"}):n.value?a({defaultMessage:"Top up balance with {value}",description:"Label of the confirm button in the top-up modal once an amount is entered",id:"topup_modal.confirm_button.label"},{value:ue.formatWalletBalanceValue(a,i,n.value)}):a({defaultMessage:"Top up balance",description:"Label of the confirm button in the top-up modal while no amount is entered",id:"topup_modal.confirm_button.empty.label"}));return{title:s,subTitle:l,cancelButtonText:u,confirmButtonText:d}}function Ye({isOpen:t,customer:o}){const{paymentMethodOptions:n,get:a,isPending:i}=ut.usePaymentMethodOptions();e.watch(()=>[t.value,o.value],([l,u])=>{!l||!u||a({customerId:u.id,country:st.getCustomerCountry(u)})},{immediate:!0});const s=e.computed(()=>i.value?void 0:n.value);return{paymentMethodOptions:n,settledOptions:s,isPending:i}}function io(t){const o=e.ref(0),n=i=>{o.value=(i==null?void 0:i.offsetHeight)??0},a=typeof ResizeObserver>"u"?void 0:new ResizeObserver(i=>{var l;const s=(l=i[0])==null?void 0:l.target;n(s instanceof HTMLElement?s:void 0)});return e.watch(t,(i,s)=>{s&&(a==null||a.unobserve(s)),n(i),i&&(a==null||a.observe(i))},{immediate:!0,flush:"post"}),e.onBeforeUnmount(()=>{a==null||a.disconnect()}),o}const so=["inert"],uo=300,lo="1rem",ro=e.defineComponent({__name:"SlidingPanes",props:{panes:{type:Array},current:{type:String}},setup(t){const o=t,n=e.ref(!1);let a;e.watch(()=>o.current,()=>{n.value=!0,clearTimeout(a),a=setTimeout(()=>{n.value=!1},uo)}),e.onBeforeUnmount(()=>{clearTimeout(a)});const i=e.ref({}),s={},l=y=>s[y]??(s[y]=S=>{i.value[y]=S instanceof HTMLElement?S:void 0}),u=e.computed(()=>i.value[o.current]),d=io(u),g=e.computed(()=>{const y=o.panes.indexOf(o.current);return y>0?`translateX(calc(${-y} * (100% + ${lo})))`:"translateX(0px)"});return(y,S)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["sv-sliding-panes__viewport relative -mx-2 overflow-hidden px-2",n.value?"transition-[height] duration-300 ease-in-out motion-reduce:transition-none":""]),style:e.normalizeStyle(e.unref(d)?{height:`${e.unref(d)}px`}:void 0)},[e.createElementVNode("div",{class:"sv-sliding-panes__track flex items-start gap-4 transition-transform duration-300 ease-in-out motion-reduce:transition-none",style:e.normalizeStyle({transform:g.value})},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.panes,f=>(e.openBlock(),e.createElementBlock("div",{key:f,class:"sv-sliding-panes__pane w-full shrink-0",inert:f!==t.current||void 0},[e.createElementVNode("div",{ref_for:!0,ref:l(f)},[e.renderSlot(y.$slots,f)],512)],8,so))),128))],4)],6))}}),co={class:"grid grid-cols-1 gap-4 pb-4"},We=e.defineComponent({__name:"WalletModalShell",props:{showModal:{type:Boolean},title:{type:String},subTitle:{type:String},cancelButtonText:{type:String},confirmButtonText:{type:String},isPending:{type:Boolean},panes:{type:Array},step:{type:String},addPaymentMethodPane:{type:String},customer:{type:Object},paymentMethodOptions:{type:Array},isPaymentMethodOptionsPending:{type:Boolean},isAddingPaymentMethod:{type:Boolean}},emits:["confirm","cancel","payment-success","payment-failed"],setup(t,{expose:o}){const n=t,a=e.ref(),i=e.computed(()=>n.panes.filter(s=>s!==n.addPaymentMethodPane));return o({submit:()=>{var s;return(s=a.value)==null?void 0:s.submit()},isSaving:e.computed(()=>{var s;return!!((s=a.value)!=null&&s.isSaving)})}),(s,l)=>(e.openBlock(),e.createBlock(e.unref(Ae.Modal),{"no-click-away":"","show-modal":t.showModal,size:"lg",title:t.title,"sub-title":t.subTitle,"cancel-button-text":t.cancelButtonText,"confirm-button-text":t.confirmButtonText,"is-loading":t.isPending,onConfirm:l[2]||(l[2]=u=>s.$emit("confirm")),onClose:l[3]||(l[3]=u=>s.$emit("cancel"))},e.createSlots({body:e.withCtx(()=>[e.createElementVNode("div",co,[e.createVNode(ro,{panes:t.panes,current:t.step},e.createSlots({[t.addPaymentMethodPane]:e.withCtx(()=>[e.createVNode(re._sfc_main$1,{ref_key:"paneRef",ref:a,customer:t.customer,"payment-method-options":t.paymentMethodOptions,"is-loading":t.isPaymentMethodOptionsPending,"is-active":t.isAddingPaymentMethod,onSuccess:l[0]||(l[0]=u=>s.$emit("payment-success")),onFailure:l[1]||(l[1]=u=>s.$emit("payment-failed",u))},null,8,["customer","payment-method-options","is-loading","is-active"])]),_:2},[e.renderList(i.value,u=>({name:u,fn:e.withCtx(()=>[e.renderSlot(s.$slots,u)])}))]),1032,["panes","current"])])]),_:2},[s.$slots.footer?{name:"footer",fn:e.withCtx(()=>[e.renderSlot(s.$slots,"footer")]),key:"0"}:void 0]),1032,["show-modal","title","sub-title","cancel-button-text","confirm-button-text","is-loading"]))}}),He=t=>{var o;return(((o=t==null?void 0:t.wallet)==null?void 0:o.auto_top_up_configs)??[]).find(({status:n})=>n==="ACTIVE")},ze=t=>t?{status:t.status,threshold:t.threshold,...t.topup_amount&&{topup_amount:t.topup_amount}}:void 0,je=(t,o=[])=>{if(t!=null&&t.pricing_item_id&&t.pricing_plan_schedule_id)return{pricingItemId:t.pricing_item_id,pricingPlanScheduleId:t.pricing_plan_schedule_id};const n=o.find(({flexiblePricing:a,pricingPlanScheduleId:i})=>a&&i);return n!=null&&n.pricingPlanScheduleId?{pricingItemId:n.pricingItemId,pricingPlanScheduleId:n.pricingPlanScheduleId}:void 0},Qe=({rule:t,walletBalanceItem:o,chargeTarget:n,paymentMethodId:a})=>{var s,l;const i=!!(((s=t==null?void 0:t.threshold)==null?void 0:s.amount)??((l=t==null?void 0:t.threshold)==null?void 0:l.credits));if(!(!t||!i||!(o!=null&&o.wallet_id)||!n||!a))return{wallet_id:o.wallet_id,status:t.status,threshold:t.threshold,pricing_plan_schedule_id:n.pricingPlanScheduleId,pricing_item_id:n.pricingItemId,payment_method_id:a,...t.topup_amount&&{topup_amount:t.topup_amount}}};function Ge({step:t,name:o,returnTo:n}){const a=e.ref();return{paneRef:a,isActive:e.computed(()=>t.value===o),isSaving:e.computed(()=>{var i;return!!((i=a.value)!=null&&i.isSaving)}),open:()=>{t.value=o},leave:()=>{t.value=n},submit:()=>{var i;return(i=a.value)==null?void 0:i.submit()}}}function Ke(){const t=M.createRequestService(),o=M.useConfig(),n="/portal/auto-top-up-configs";function a(u){return t({url:`${o.apiUrls.config}${n}`,query:{...u},isCollection:!0})}function i(u){return t({url:`${o.apiUrls.config}${n}/${u}`})}function s(u){return t({url:`${o.apiUrls.config}${n}`,options:{method:"POST"},data:u})}function l(u){return t({url:`${o.apiUrls.config}${n}/${u}/deactivate`,options:{method:"POST"}})}return{getAutoTopUpConfigs:a,getAutoTopUpConfig:i,createAutoTopUpConfig:s,deactivateAutoTopUpConfig:l}}function Xe(){const{createAutoTopUpConfig:t}=Ke(),o=M.useLogger(),n=e.ref(!1);return{save:async i=>{if(!i||n.value)return{saved:!1};n.value=!0;try{return await t(i),{saved:!0}}catch(s){return o.error("AUTO_TOP_UP_SAVE_FAILED","Failed to save the automatic top-up rule",{},s),{saved:!1,error:s}}finally{n.value=!1}},isSaving:n}}const po={key:0,class:"mb-4"},mo={class:"sr-only"},fo={class:"flex flex-col gap-2"},vo=e.defineComponent({__name:"TopUpModal",props:{showModal:{type:Boolean},selectedBalanceItem:{type:Object},paymentMethods:{type:Array},customer:{type:Object},subscriptions:{type:Array}},emits:["confirm","close","auto-top-up-saved","payment-success","payment-failed"],setup(t,{emit:o}){const n=t,a=o,{$t:i}=M.useIntl(),{formatOpenBalance:s}=te(),l=e.computed(()=>ze(He(n.selectedBalanceItem))),u=e.computed(()=>s(n.selectedBalanceItem)),d=e.computed(()=>Bt(n.selectedBalanceItem,n.subscriptions??[])),g=e.ref();e.watch(d,U=>{var E;U.some(({id:oe})=>oe===g.value)||(g.value=(E=U[0])==null?void 0:E.id)},{immediate:!0});const y=e.computed(()=>d.value.length>1),S=e.computed(()=>d.value.map(({id:U,name:$})=>({value:U,label:$}))),f=e.computed(()=>Object.fromEntries(d.value.flatMap(({id:U,enabledPricingIds:$})=>{const E=(n.subscriptions??[]).find(({id:oe})=>oe===U);return E?[[U,{subscription:E,enabledPricingIds:$}]]:[]}))),v=e.computed(()=>{var $;if(!n.selectedBalanceItem||!(($=n.subscriptions)!=null&&$.length))return n.selectedBalanceItem;const U=d.value.find(({id:E})=>E===g.value);return U?Ut(n.selectedBalanceItem,U.scheduleIds):{...n.selectedBalanceItem,charge_on_demand_pricing_items:[]}}),p=e.computed(()=>Ne(v.value)),{paymentMethodOptions:w,settledOptions:P,isPending:D}=Ye({isOpen:e.computed(()=>n.showModal),customer:e.computed(()=>n.customer)}),h=e.ref("TOP_UP"),T=e.computed(()=>(n.paymentMethods??[]).length>0),m=e.computed(()=>!D.value&&(w.value??[]).length===0),C=e.computed(()=>h.value==="TOP_UP"&&!T.value&&m.value),B=e.ref(),A=e.ref(),_=()=>{L(),a("payment-success")},{paneRef:x,isActive:q,isSaving:Q,open:R,leave:L,submit:G}=Ge({step:h,name:"ADD_PAYMENT_METHOD",returnTo:"TOP_UP"}),{save:W}=Xe(),Y=e.ref(),K=e.computed(()=>{var U;return(U=Y.value)==null?void 0:U.chargedValue}),H=e.computed(()=>{var U;return Q.value||!!((U=Y.value)!=null&&U.isCharging)}),{title:X,subTitle:r,cancelButtonText:c,confirmButtonText:b}=ao({step:h,currentBalance:u,topUpValue:K}),N=()=>{var U;if(q.value){G();return}(U=Y.value)==null||U.submit()},V=async({rule:U,paymentMethodId:$})=>{const{saved:E}=await W(Qe({rule:U,walletBalanceItem:n.selectedBalanceItem,chargeTarget:je(void 0,p.value),paymentMethodId:$}));E&&a("auto-top-up-saved")},k=U=>{var $;B.value=U,A.value=($=Y.value)==null?void 0:$.chargedValue,h.value="SUCCESS"},O=()=>{a("confirm"),a("close")},F=()=>{if(!H.value){if(q.value){L();return}if(h.value==="SUCCESS"){O();return}a("close")}},fe=e.ref(0);return e.watch(()=>n.showModal,U=>{U&&(h.value="TOP_UP",B.value=void 0,A.value=void 0,fe.value+=1)}),(U,$)=>(e.openBlock(),e.createBlock(We,{ref_key:"addPaymentMethodRef",ref:x,"show-modal":t.showModal,title:e.unref(X),"sub-title":e.unref(r),"cancel-button-text":e.unref(c),"confirm-button-text":e.unref(b),"is-pending":H.value,panes:e.unref(St),step:h.value,"add-payment-method-pane":"ADD_PAYMENT_METHOD",customer:t.customer,"payment-method-options":e.unref(w),"is-payment-method-options-pending":e.unref(D),"is-adding-payment-method":e.unref(q),onConfirm:N,onCancel:F,onPaymentSuccess:_,onPaymentFailed:$[1]||($[1]=E=>U.$emit("payment-failed",E))},e.createSlots({TOP_UP:e.withCtx(()=>[y.value?(e.openBlock(),e.createElementBlock("div",po,[e.createVNode(e.unref(xe._sfc_main),{modelValue:g.value,"onUpdate:modelValue":$[0]||($[0]=E=>g.value=E),class:"sv-topup-modal__subscription",name:"top-up-subscription",direction:"column",required:"",options:S.value,"show-radio":!1,label:e.unref(i)({defaultMessage:"Subscription to top up",description:"Label above the list of subscriptions a top-up can be charged against, in the top-up modal",id:"topup_modal.subscriptions.label"})},{prefix:e.withCtx(({optionValue:E})=>[f.value[String(E)]?(e.openBlock(),e.createBlock(it._sfc_main,{key:0,class:"sv-topup-modal__subscription-option grow","no-spacing":"",subscription:f.value[String(E)].subscription,"enabled-pricing-ids":f.value[String(E)].enabledPricingIds},null,8,["subscription","enabled-pricing-ids"])):e.createCommentVNode("",!0)]),label:e.withCtx(({option:E})=>[e.createElementVNode("span",mo,e.toDisplayString(E.label),1)]),_:1},8,["modelValue","options","label"])])):e.createCommentVNode("",!0),(e.openBlock(),e.createBlock(to,{key:fe.value,ref_key:"topUpFormRef",ref:Y,"top-up-pricing-items":p.value,"payment-methods":t.paymentMethods,"auto-top-up-config":l.value,"payment-method-options":e.unref(P),onAddPaymentMethod:e.unref(R),onSuccess:k,onSaveAutoTopUp:V},null,8,["top-up-pricing-items","payment-methods","auto-top-up-config","payment-method-options","onAddPaymentMethod"]))]),SUCCESS:e.withCtx(()=>[B.value?(e.openBlock(),e.createBlock(no,{key:0,"added-value":A.value,invoice:B.value},null,8,["added-value","invoice"])):e.createCommentVNode("",!0)]),_:2},[h.value==="SUCCESS"||C.value?{name:"footer",fn:e.withCtx(()=>[e.createElementVNode("div",fo,[h.value==="SUCCESS"?(e.openBlock(),e.createBlock(e.unref(z._sfc_main),{key:0,size:"lg","data-testid":"done",onClick:O},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(b)),1)]),_:1})):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(e.unref(z._sfc_main),{size:"lg",disabled:"","data-testid":"confirm"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(b)),1)]),_:1}),e.createVNode(e.unref(z._sfc_main),{size:"lg",intent:"subtle","data-testid":"cancel",onClick:F},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)),1)]),_:1})],64))])]),key:"0"}:void 0]),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"]))}}),ho=["AUTO_TOP_UP","ADD_PAYMENT_METHOD"],go={class:"grid grid-cols-1 gap-4"},_o=e.defineComponent({__name:"AutoTopUpModal",props:{showModal:{type:Boolean},walletBalanceItem:{type:Object},topUpItem:{type:Object},paymentMethods:{type:Array},customer:{type:Object}},emits:["saved","close","payment-success","payment-failed"],setup(t,{emit:o}){const n=t,a=o,{$t:i}=M.useIntl(),{formatOpenBalance:s}=te(),l=e.ref("AUTO_TOP_UP"),u=e.computed(()=>s(n.walletBalanceItem)),d=e.computed(()=>Ne(n.walletBalanceItem)),g=e.computed(()=>Oe(d.value)),y=e.computed(()=>He(n.walletBalanceItem)),S=e.computed(()=>ze(y.value)),f=e.computed(()=>je(n.topUpItem,d.value)),v=e.ref(),p=e.computed(()=>{var O,F;const k=(F=(O=v.value)==null?void 0:O.rule)==null?void 0:F.topup_amount;return k!=null&&k.quantity&&f.value?[{pricing_item_id:f.value.pricingItemId,flexible_amount:k}]:void 0}),w=e.computed(()=>{var k;return(k=f.value)==null?void 0:k.pricingPlanScheduleId}),P=e.ref(),{sortedPaymentMethods:D}=Le({paymentMethods:e.computed(()=>n.paymentMethods),selectedPaymentMethodId:P,preferredPaymentMethodId:e.computed(()=>{var k;return(k=y.value)==null?void 0:k.payment_method_id})}),{paymentMethodOptions:h,settledOptions:T,isPending:m}=Ye({isOpen:e.computed(()=>n.showModal),customer:e.computed(()=>n.customer)}),{paneRef:C,isActive:B,isSaving:A,open:_,leave:x,submit:q}=Ge({step:l,name:"ADD_PAYMENT_METHOD",returnTo:"AUTO_TOP_UP"}),{save:Q,isSaving:R}=Xe(),L=e.computed(()=>A.value||R.value),G=e.reactive({paymentMethodId:e.computed(()=>P.value??null)}),W=I.useValidation({paymentMethodId:{required:I.common.withMessage(()=>i({defaultMessage:"Select a payment method to pay for automatic top-ups.",description:"Error shown in the auto top-up modal when no payment method is selected",id:"auto_topup_modal.payment_method.required"}),I.required)}},G),Y=e.computed(()=>l.value==="ADD_PAYMENT_METHOD"?i({defaultMessage:"Add payment method",description:"Title of the auto top-up modal while the customer is adding a payment method",id:"auto_topup_modal.add_payment_method.title"}):i({defaultMessage:"Automatic top-up",description:"Title of the automatic wallet top-up modal",id:"auto_topup_modal.title"})),K=e.computed(()=>l.value==="ADD_PAYMENT_METHOD"?i({defaultMessage:"This method pays for every automatic top-up.",description:"Subtitle of the auto top-up modal while the customer is adding a payment method",id:"auto_topup_modal.add_payment_method.subtitle"}):i({defaultMessage:"Your current balance is {balance}. Enable auto top so you can stay productive",description:"Subtitle of the automatic wallet top-up modal, naming the balance",id:"auto_topup_modal.subtitle"},{balance:u.value})),H=e.computed(()=>l.value==="ADD_PAYMENT_METHOD"?i({defaultMessage:"Back",description:"Button returning from adding a payment method to the auto top-up rule",id:"auto_topup_modal.add_payment_method.cancel"}):i({defaultMessage:"Cancel",description:"Button dismissing the auto top-up modal",id:"auto_topup_modal.cancel"})),X=e.computed(()=>l.value==="ADD_PAYMENT_METHOD"?i({defaultMessage:"Add payment method",description:"Button storing the payment method being added in the auto top-up modal",id:"auto_topup_modal.add_payment_method.confirm"}):i({defaultMessage:"Save",description:"Button saving the automatic top-up rule",id:"auto_topup_modal.confirm"}));async function r(){var F;if(W.value.$touch(),L.value)return;const{saved:k,error:O}=await Q(Qe({rule:(F=v.value)==null?void 0:F.validate(),walletBalanceItem:n.walletBalanceItem,chargeTarget:f.value,paymentMethodId:P.value}));if(k){a("saved"),a("close");return}O&&a("payment-failed",O)}const c=()=>{if(B.value){q();return}r()},b=()=>{x(),a("payment-success")},N=()=>{if(!L.value){if(B.value){x();return}a("close")}},V=e.ref(0);return e.watch(()=>n.showModal,k=>{k&&(l.value="AUTO_TOP_UP",P.value=void 0,V.value+=1)}),(k,O)=>(e.openBlock(),e.createBlock(We,{ref_key:"addPaymentMethodRef",ref:C,"show-modal":t.showModal,title:Y.value,"sub-title":K.value,"cancel-button-text":H.value,"confirm-button-text":X.value,"is-pending":L.value,panes:e.unref(ho),step:l.value,"add-payment-method-pane":"ADD_PAYMENT_METHOD",customer:t.customer,"payment-method-options":e.unref(h),"is-payment-method-options-pending":e.unref(m),"is-adding-payment-method":e.unref(B),onConfirm:c,onCancel:N,onPaymentSuccess:b,onPaymentFailed:O[1]||(O[1]=F=>k.$emit("payment-failed",F))},{AUTO_TOP_UP:e.withCtx(()=>[e.createElementVNode("div",go,[g.value?(e.openBlock(),e.createBlock(Fe,e.mergeProps({key:V.value,ref_key:"autoTopUpFormRef",ref:v,class:"sv-auto-topup-modal__rule"},g.value,{config:S.value,"always-enabled":"",disabled:L.value}),null,16,["config","disabled"])):e.createCommentVNode("",!0),e.createVNode(Ie,{"pricing-plan-schedule-id":w.value,"pricing-items":p.value},null,8,["pricing-plan-schedule-id","pricing-items"]),e.createVNode(re._sfc_main,{modelValue:P.value,"onUpdate:modelValue":O[0]||(O[0]=F=>P.value=F),class:"sv-auto-topup-modal__payment-method","payment-methods":e.unref(D),"payment-method-options":e.unref(T),disabled:L.value,error:e.unref(W).paymentMethodId.$errors,label:e.unref(i)({defaultMessage:"Pay automatic top-ups with",description:"Label above the payment method an automatic top-up is charged to",id:"auto_topup_modal.payment_method.label"}),onAddPaymentMethod:e.unref(_)},null,8,["modelValue","payment-methods","payment-method-options","disabled","error","label","onAddPaymentMethod"])])]),_:1},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"]))}}),yo={class:"sv-auto-topup-cancellation-modal sv-auto-topup-cancellation-modal__body flex flex-col gap-3"},bo=e.defineComponent({__name:"AutoTopUpCancellationModal",props:{showModal:{type:Boolean},config:{type:Object}},emits:["confirmed","close"],setup(t,{emit:o}){const n=t,a=o,{$t:i}=M.useIntl(),s=M.useLogger(),{formatValue:l}=te(),{deactivateAutoTopUpConfig:u}=Ke(),d=e.ref(!1),g=e.ref(!1);e.watch(()=>n.showModal,v=>{v&&(g.value=!1)});const y=e.computed(()=>{var w,P;const v=(w=n.config)==null?void 0:w.threshold,p=(P=n.config)==null?void 0:P.topup_amount;return!(v!=null&&v.amount)&&!(v!=null&&v.credits)?i({defaultMessage:"Your balance will no longer be topped up automatically. You can still top up whenever you want to.",description:"Explanation in the modal that turns a wallet automatic top-up off",id:"auto_topup_cancellation_modal.explanation"}):p?i({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.",description:"Explanation in the modal that turns a wallet automatic top-up off, naming what it charged and when",id:"auto_topup_cancellation_modal.explanation_with_amount"},{amount:l({amount:p}),threshold:l(v)}):i({defaultMessage:"Your balance will no longer be topped up automatically when it falls below {threshold}. You can still top up whenever you want to.",description:"Explanation in the modal that turns a wallet automatic top-up off, naming the threshold",id:"auto_topup_cancellation_modal.explanation_with_threshold"},{threshold:l(v)})}),S=async()=>{var p;const v=(p=n.config)==null?void 0:p.id;if(!(!v||d.value)){d.value=!0,g.value=!1;try{await u(v),a("confirmed"),a("close")}catch(w){s.error("AUTO_TOP_UP_CANCELLATION_FAILED","Failed to turn off a wallet's automatic top-up",{},w),g.value=!0}finally{d.value=!1}}},f=()=>{d.value||a("close")};return(v,p)=>(e.openBlock(),e.createBlock(e.unref(Ae.Modal),{size:"sm","show-modal":t.showModal,"is-loading":d.value,"no-click-away":d.value,"no-backdrop-close":d.value,title:e.unref(i)({defaultMessage:"Turn off automatic top-up",description:"Title of the modal that turns a wallet automatic top-up off",id:"auto_topup_cancellation_modal.title"}),"confirm-button-text":e.unref(i)({defaultMessage:"Yes, turn it off",description:"Button confirming that a wallet automatic top-up is turned off",id:"auto_topup_cancellation_modal.confirm"}),"cancel-button-text":e.unref(i)({defaultMessage:"Cancel",description:"Button dismissing the modal that turns a wallet automatic top-up off",id:"auto_topup_cancellation_modal.cancel"}),onConfirm:S,onClose:f},{body:e.withCtx(()=>[e.createElementVNode("div",yo,[e.createVNode(e.unref(M._sfc_main),{variant:"body-sm",color:"subtle",tag:"p",class:"sv-auto-topup-cancellation-modal__explanation"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y.value),1)]),_:1}),g.value?(e.openBlock(),e.createBlock(e.unref(Me._sfc_main),{key:0,class:"sv-auto-topup-cancellation-modal__error sv-error",title:e.unref(i)({defaultMessage:"Could not turn off the automatic top-up. Please try again later.",description:"Error shown when turning a wallet automatic top-up off failed",id:"auto_topup_cancellation_modal.failed"})},null,8,["title"])):e.createCommentVNode("",!0)])]),_:1},8,["show-modal","is-loading","no-click-away","no-backdrop-close","title","confirm-button-text","cancel-button-text"]))}}),wo=e.defineComponent({inheritAttrs:!1,__name:"CustomerWalletBalances",props:{hasError:{type:Boolean},isLoading:{type:Boolean},walletBalances:{type:Array},showTopUpButton:{type:Boolean},customer:{type:Object},paymentMethods:{type:Array},subscriptions:{type:Array}},emits:["top-up-charged","auto-top-up-saved","auto-top-up-cancelled","payment-method-stored","payment-failed"],setup(t,{emit:o}){const n=t,a=o,{$t:i}=M.useIntl(),s=e.ref(),l=e.computed(()=>ve(n.walletBalances,s.value)),u=e.computed(()=>!!l.value),d=e.ref(),g=e.computed(()=>!!d.value),y=e.computed(()=>ve(n.walletBalances,d.value)),S=e.ref(),f=e.computed(()=>!!S.value);return(v,p)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[t.isLoading?(e.openBlock(),e.createBlock(Se._sfc_main,e.mergeProps({key:0,variant:"section"},v.$attrs,{class:"sv-wallet-balances sv-root sv-component sv-loading min-h-48","data-testid":"customer-wallet-balances-skeleton"}),null,16)):t.hasError?(e.openBlock(),e.createBlock(e.unref(Me._sfc_main),e.mergeProps({key:1},v.$attrs,{class:"sv-wallet-balances sv-root sv-component sv-error",title:e.unref(i)({defaultMessage:"Could not load wallet balances",description:"Error shown when wallet balances fail to load",id:"wallet_balance.load_failed"})}),null,16,["title"])):t.walletBalances.length>0?(e.openBlock(),e.createBlock(e.unref(Tt),e.mergeProps({key:2},v.$attrs,{class:"sv-wallet-balances sv-root sv-component","customer-wallet-balances":t.walletBalances,"show-auto-top-up":"","show-manual-top-up":"",title:e.unref(i)({defaultMessage:"{count, plural, one {Wallet} other {Wallets}}",description:"Title for the wallets block on the customer overview page",id:"customer_overview.wallet_balances_block.title"},{count:String(t.walletBalances.length)}),onTopUp:p[0]||(p[0]=w=>s.value=w),onAutoTopUp:p[1]||(p[1]=w=>d.value=w),onCancelAutoTopUp:p[2]||(p[2]=w=>S.value=w)}),null,16,["customer-wallet-balances","title"])):e.createCommentVNode("",!0),t.showTopUpButton?(e.openBlock(),e.createBlock(vo,{key:3,"show-modal":u.value,"selected-balance-item":l.value,"payment-methods":t.paymentMethods,customer:t.customer,subscriptions:t.subscriptions,onClose:p[3]||(p[3]=w=>s.value=void 0),onConfirm:p[4]||(p[4]=w=>a("top-up-charged")),onPaymentSuccess:p[5]||(p[5]=w=>a("payment-method-stored")),onPaymentFailed:p[6]||(p[6]=w=>a("payment-failed",w))},null,8,["show-modal","selected-balance-item","payment-methods","customer","subscriptions"])):e.createCommentVNode("",!0),t.showTopUpButton?(e.openBlock(),e.createBlock(_o,{key:4,"show-modal":g.value,"wallet-balance-item":y.value,"top-up-item":d.value,"payment-methods":t.paymentMethods,customer:t.customer,onClose:p[7]||(p[7]=w=>d.value=void 0),onSaved:p[8]||(p[8]=w=>a("auto-top-up-saved")),onPaymentSuccess:p[9]||(p[9]=w=>a("payment-method-stored")),onPaymentFailed:p[10]||(p[10]=w=>a("payment-failed",w))},null,8,["show-modal","wallet-balance-item","top-up-item","payment-methods","customer"])):e.createCommentVNode("",!0),t.showTopUpButton?(e.openBlock(),e.createBlock(bo,{key:5,"show-modal":f.value,config:S.value,onClose:p[11]||(p[11]=w=>S.value=void 0),onConfirmed:p[12]||(p[12]=w=>a("auto-top-up-cancelled"))},null,8,["show-modal","config"])):e.createCommentVNode("",!0)],64))}});exports._sfc_main=wo;exports.useCustomerWalletBalances=Mt;