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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (302) hide show
  1. package/README.md +16 -11
  2. package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-BM1_31Tl.js → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-081H9T3X.js} +1 -1
  3. package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-Dh_a0NRB.mjs → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DNepCMRp.mjs} +6 -6
  4. package/dist/{Avatar.vue.es-CvxRdCes.js → Avatar.vue.es-BJxSCU76.js} +1 -1
  5. package/dist/{Avatar.vue.es-C9Jkfuvp.mjs → Avatar.vue.es-sfMZiX7A.mjs} +1 -1
  6. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-BV5iEOxn.js +1 -0
  7. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BRSUpMPU.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-DmY3a-Wi.mjs} +15 -16
  8. package/dist/{Button.vue.es-CeUTAc2n.js → Button.vue.es-BzkuglKw.js} +1 -1
  9. package/dist/{Button.vue.es-BbSN0uOk.mjs → Button.vue.es-Cmjfm4jw.mjs} +1 -1
  10. package/dist/ChargeOnDemandModal-CB4mrvkU.mjs +975 -0
  11. package/dist/ChargeOnDemandModal-b17YswWA.js +1 -0
  12. package/dist/Checkout.entry.ce-HlUrJ1kh.js +2 -0
  13. package/dist/Checkout.entry.ce-X2zGo6hG.mjs +4381 -0
  14. package/dist/{Chip.vue.es-BN83K3Tk.js → Chip.vue.es-B2jjzIOc.js} +1 -1
  15. package/dist/{Chip.vue.es-T22Q7AF9.mjs → Chip.vue.es-DksjbJO8.mjs} +2 -2
  16. package/dist/{ContextMenu.vue.es-DXKR7WFg.js → ContextMenu.vue.es-DUU43tCy.js} +1 -1
  17. package/dist/{ContextMenu.vue.es-0PRmCAzL.mjs → ContextMenu.vue.es-zRvoEJlV.mjs} +10 -10
  18. package/dist/{CustomerBillingInformation.vue.es-yrLGc7oL.js → CustomerBillingInformation.vue.es-BfPEB42w.js} +1 -1
  19. package/dist/{CustomerBillingInformation.vue.es-C2j40TYP.mjs → CustomerBillingInformation.vue.es-DhFbpZPK.mjs} +2 -2
  20. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BZwGWhaL.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-B41la-T7.mjs} +14 -15
  21. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-C8diNL5x.js → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BISD6n8X.js} +1 -1
  22. package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-xqMsbuU6.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DssxYPSA.mjs} +895 -891
  23. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-XufY6bdV.js +1 -0
  24. package/dist/{DividerText.vue.es-DsYRZzuE.js → DividerText.vue.es-CoyDk9eH.js} +1 -1
  25. package/dist/{DividerText.vue.es-CV1XK_Vz.mjs → DividerText.vue.es-nAo1eRMV.mjs} +1 -1
  26. package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-srXOpUb0.js → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CQ0KrXHJ.js} +1 -1
  27. package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-kpjrC-4q.mjs → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-QW9NdxyZ.mjs} +4 -4
  28. package/dist/{ErrorNotification.vue.es-CiUJva6S.mjs → ErrorNotification.vue.es-h-D37rfG.mjs} +1 -1
  29. package/dist/{ErrorNotification.vue.es-QfRoDhkn.js → ErrorNotification.vue.es-tS9vySUZ.js} +1 -1
  30. package/dist/{IconButton.vue.es-CytBZUkZ.js → IconButton.vue.es-DgQN18Am.js} +1 -1
  31. package/dist/{IconButton.vue.es-ChvsCZQG.mjs → IconButton.vue.es-DvfErUOq.mjs} +2 -2
  32. package/dist/{IconTitle.vue.es-DPruIJ6l.mjs → IconTitle.vue.es-B_8bS0tn.mjs} +3 -3
  33. package/dist/{IconTitle.vue.es-DtnpBObk.js → IconTitle.vue.es-Dn2xcPHj.js} +1 -1
  34. package/dist/{Input.vue.es-BkzQDkrz.js → Input.vue.es-B60eK8Ds.js} +1 -1
  35. package/dist/{Input.vue.es-DJQqJrsb.mjs → Input.vue.es-CU9u5yKH.mjs} +2 -2
  36. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Do0dDtkA.js → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Dqdezse7.js} +1 -1
  37. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-BC-zyUqe.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-gpMtYNzn.mjs} +2 -2
  38. package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-DQFS7SfE.js → InvoiceEntryView.vue_vue_type_script_setup_true_lang-Cl6HU243.js} +1 -1
  39. package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-CFhhhwId.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-DNqawlYV.mjs} +2 -2
  40. package/dist/InvoiceSummary.vue.es-CAmA8g0t.js +1 -0
  41. package/dist/{InvoiceSummary.vue.es-6qpbyymg.mjs → InvoiceSummary.vue.es-CRiFJ5x-.mjs} +576 -565
  42. package/dist/{Modal.vue.es-BuRlbyZw.mjs → Modal.vue.es-BeI5C9-9.mjs} +5 -5
  43. package/dist/{Modal.vue.es-JpE0eh_Q.js → Modal.vue.es-DvLB3uCG.js} +1 -1
  44. package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-nAuhIopc.js → PaymentErrorCard.vue_vue_type_script_setup_true_lang-Dg4rn1cm.js} +1 -1
  45. package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-UmKgVvdj.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-DqHcOnZp.mjs} +5 -6
  46. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-YpcWHm24.js → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-B9R5JRJv.js} +1 -1
  47. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DggCusgC.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DlqoWKQq.mjs} +3 -3
  48. package/dist/{PaymentHistoryBlock-uWuWjr8I.js → PaymentHistoryBlock-Uw8xeKUk.js} +1 -1
  49. package/dist/{PaymentHistoryBlock-DnmParhQ.mjs → PaymentHistoryBlock-mCqdFjnL.mjs} +1 -1
  50. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BS8N4yt9.js → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-ALI5f0py.js} +1 -1
  51. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-BziIf86i.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DxaY3eFN.mjs} +4 -4
  52. package/dist/{PaymentIntegrationForm-DTXm56QQ.js → PaymentIntegrationForm-Cx0zCf_C.js} +1 -1
  53. package/dist/{PaymentIntegrationForm-DL55i0HD.mjs → PaymentIntegrationForm-DVx4DEtD.mjs} +1 -1
  54. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-B-viSd_i.js +1 -0
  55. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CCKCXXZX.mjs +154 -0
  56. package/dist/PaymentIntegrationFormAdyen-B-v-4nlj.js +98 -0
  57. package/dist/{PaymentIntegrationFormAdyen-Cqsy82To.mjs → PaymentIntegrationFormAdyen-Yr8p5Fly.mjs} +202 -192
  58. package/dist/PaymentIntegrationFormStripe-CoLmAzas.js +102 -0
  59. package/dist/{PaymentIntegrationFormStripe-DIU1rnwH.mjs → PaymentIntegrationFormStripe-Ds0BXt89.mjs} +247 -220
  60. package/dist/{PaymentMethod.vue.es-m1NasGqw.mjs → PaymentMethod.vue.es-4YRmQZHX.mjs} +168 -148
  61. package/dist/PaymentMethod.vue.es-D0D9jW8s.js +1 -0
  62. package/dist/{PaymentMethodForm-BEVdWCrH.js → PaymentMethodForm-CMP5FLRO.js} +1 -1
  63. package/dist/{PaymentMethodForm-BYzt1PVP.mjs → PaymentMethodForm-Dnj_7mJU.mjs} +1 -1
  64. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-fdRTp7sc.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-DsD3UjkC.mjs} +60 -58
  65. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-nxnGyJmE.js +1 -0
  66. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-FhMBZqtI.js → PaymentMethodsList.vue_vue_type_script_setup_true_lang-CIrrQUS6.js} +1 -1
  67. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-FChyZp2v.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-CjECKNi_.mjs} +6 -6
  68. package/dist/PlanCustomizationEditor-DS1r2vBO.js +1 -0
  69. package/dist/PlanCustomizationEditor-DlVSCKGN.mjs +722 -0
  70. package/dist/{PricingGroupRangeInput.vue.es-B4ZbKxUw.mjs → PricingGroupRangeInput.vue.es-BhNcjD7z.mjs} +4 -4
  71. package/dist/{PricingGroupRangeInput.vue.es-Ba3v0J_R.js → PricingGroupRangeInput.vue.es-VoOTnHjk.js} +1 -1
  72. package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-CmJITenR.mjs +141 -0
  73. package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-hS6A-KcP.js +1 -0
  74. package/dist/{RadioGroupExtended.vue.es-CkhBp9kI.mjs → RadioGroupExtended.vue.es-9YzXzZF0.mjs} +2 -2
  75. package/dist/{RadioGroupExtended.vue.es-CHrcqSRq.js → RadioGroupExtended.vue.es-DlbURHQN.js} +1 -1
  76. package/dist/{Section.vue.es-CSrVPlUK.js → Section.vue.es-Bbt0RITt.js} +1 -1
  77. package/dist/{Section.vue.es-D5svcVS_.mjs → Section.vue.es-DVEpre9O.mjs} +1 -1
  78. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BqOSBdFQ.js → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Dl7MbMlk.js} +1 -1
  79. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BM9Y4Cy3.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-xzjqB-v-.mjs} +6 -6
  80. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-CJWE7wVi.mjs +41 -0
  81. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-otI7Hz2w.js +1 -0
  82. package/dist/StepInput.vue.es-H-3R4jJq.js +1 -0
  83. package/dist/StepInput.vue.es-o-3Lg4Ai.mjs +199 -0
  84. package/dist/SubscriptionDetails.entry.ce-CGl6Z5ql.mjs +1057 -0
  85. package/dist/SubscriptionDetails.entry.ce-CQUO_uXH.js +1 -0
  86. package/dist/{SubscriptionSchedules-yDcsD1hd.mjs → SubscriptionSchedules-DuWZmnD2.mjs} +1 -1
  87. package/dist/{SubscriptionSchedules-CMVoB2bw.js → SubscriptionSchedules-Dy0fUgx5.js} +1 -1
  88. package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DZHsQImd.mjs → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-C1kTiW-H.mjs} +2284 -2341
  89. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-Dd_Rr6qn.js +1 -0
  90. package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-BgXZMihr.js → SubscriptionSummary.vue_vue_type_script_setup_true_lang-CYyP4ra9.js} +1 -1
  91. package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-BmNl5u8R.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-CsekphtV.mjs} +3 -3
  92. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DOJ0t_fo.js → SubscriptionsList.vue_vue_type_script_setup_true_lang-B4j8Clbj.js} +1 -1
  93. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-BUzdZHah.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BsdevoeT.mjs} +9 -10
  94. package/dist/{TooltipParagraph.vue.es-CxdL8-B7.mjs → TooltipParagraph.vue.es-B9A17aG7.mjs} +3 -3
  95. package/dist/TooltipParagraph.vue.es-DvC5Wjaz.js +1 -0
  96. package/dist/{TrialChip.vue.es-BCc8q5j0.js → TrialChip.vue.es-CLQZ5F0n.js} +1 -1
  97. package/dist/{TrialChip.vue.es-BK7m7e7q.mjs → TrialChip.vue.es-Dmv3lPiQ.mjs} +2 -2
  98. package/dist/{cn.es-71nFUose.js → cn.es-C9Yqq4tg.js} +1 -1
  99. package/dist/{cn.es-ZXNzpauQ.mjs → cn.es-Cvt6TIwv.mjs} +2 -2
  100. package/dist/components/BillingInformation/BillingInformation.cjs +1 -1
  101. package/dist/components/BillingInformation/BillingInformation.mjs +4 -4
  102. package/dist/components/BillingInformationForm/BillingInformationForm.cjs +1 -1
  103. package/dist/components/BillingInformationForm/BillingInformationForm.mjs +246 -230
  104. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs +1 -1
  105. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +4 -4
  106. package/dist/components/Invoice/Invoice.cjs +1 -1
  107. package/dist/components/Invoice/Invoice.mjs +201 -212
  108. package/dist/components/InvoiceDetails/InvoiceDetails.cjs +1 -1
  109. package/dist/components/InvoiceDetails/InvoiceDetails.mjs +15 -16
  110. package/dist/components/InvoiceHeader/InvoiceHeader.cjs +1 -1
  111. package/dist/components/InvoiceHeader/InvoiceHeader.mjs +2 -2
  112. package/dist/components/InvoicesList/InvoicesList.cjs +1 -1
  113. package/dist/components/InvoicesList/InvoicesList.mjs +3 -3
  114. package/dist/components/PaymentHistory/PaymentHistory.cjs +1 -1
  115. package/dist/components/PaymentHistory/PaymentHistory.mjs +14 -15
  116. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs +1 -1
  117. package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +5 -5
  118. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs +1 -1
  119. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +4 -4
  120. package/dist/components/SubscriptionsList/SubscriptionsList.cjs +1 -1
  121. package/dist/components/SubscriptionsList/SubscriptionsList.mjs +5 -5
  122. package/dist/components/WalletBalances/WalletBalances.cjs +1 -1
  123. package/dist/components/WalletBalances/WalletBalances.mjs +3 -3
  124. package/dist/{customElements-q_i9y0Ph.mjs → customElements-B58FcXIN.mjs} +231 -196
  125. package/dist/{customElements-hH6pju3X.js → customElements-DUMRMFQ5.js} +36 -32
  126. package/dist/{customer-BDoOIAFr.mjs → customer-B3LPAhaD.mjs} +4 -4
  127. package/dist/{customer-C9q6ti8s.js → customer-CisTPaXj.js} +1 -1
  128. package/dist/{de-DE-BSlbAnPE.js → de-DE-B4TUdnUf.js} +1 -1
  129. package/dist/{de-DE-B_ik9VNt.mjs → de-DE-DKp5LCu0.mjs} +53 -7
  130. package/dist/de-DE-DL74pMLb.js +1 -0
  131. package/dist/{de-DE-DXsG-vXA.mjs → de-DE-jkW2dJrX.mjs} +28 -14
  132. package/dist/en-US-B2XFj-_p.js +1 -0
  133. package/dist/{en-US-DkCltadt.mjs → en-US-DQ5vlv9Z.mjs} +53 -7
  134. package/dist/en-US-J85TQRI8.js +1 -0
  135. package/dist/{en-US-C939IZ5i.mjs → en-US-SDhjlY_v.mjs} +20 -5
  136. package/dist/formControl-ODrpUvcA.js +1 -0
  137. package/dist/{index-BPU8tIml.mjs → formControl-dX7l8o3c.mjs} +160 -143
  138. package/dist/icon-sprite.svg.es-BZIz7-0d.mjs +4 -0
  139. package/dist/icon-sprite.svg.es-Ds6lDf5p.js +1 -0
  140. package/dist/index.cjs +1 -1
  141. package/dist/index.mjs +4 -4
  142. package/dist/{invoices-DIzkXntV.mjs → invoices-3520M5AN.mjs} +1 -1
  143. package/dist/{invoices-CHp75zZI.js → invoices-CKQBLar2.js} +1 -1
  144. package/dist/{it-IT-CHj2McbF.mjs → it-IT-BgFVsO5S.mjs} +53 -7
  145. package/dist/{it-IT-DT3rfjOY.js → it-IT-CSYvGmpT.js} +1 -1
  146. package/dist/{it-IT-BxpwB3oJ.mjs → it-IT-CaaFToGB.mjs} +20 -6
  147. package/dist/it-IT-CqNK62qe.js +1 -0
  148. package/dist/{nl-NL-DfkhOJKc.js → nl-NL-CpE4IgwO.js} +1 -1
  149. package/dist/{nl-NL-na2I4aiP.mjs → nl-NL-D0MQKaql.mjs} +34 -20
  150. package/dist/nl-NL-Dx-TNXQ1.js +1 -0
  151. package/dist/{nl-NL-Cdvd_XMN.mjs → nl-NL-UiRWbO9S.mjs} +53 -7
  152. package/dist/{paymentMethods-DEKp_4QM.mjs → paymentMethods-CWlvwK5V.mjs} +16 -14
  153. package/dist/paymentMethods-Cw-i95mM.js +1 -0
  154. package/dist/{payments-C0-Hq2a4.mjs → payments-2qeQdpiW.mjs} +6 -6
  155. package/dist/{payments-DBvregE8.js → payments-CS7_YcOW.js} +1 -1
  156. package/dist/pricing-BIMpDI_p.mjs +29 -0
  157. package/dist/pricing-BOqG21f9.js +1 -0
  158. package/dist/pricing.es-C07bgEZx.js +1 -0
  159. package/dist/pricing.es-QYWrKMUJ.mjs +30 -0
  160. package/dist/pricingPlanSchedules-B_sTAIgU.js +1 -0
  161. package/dist/pricingPlanSchedules-ChQCbMfe.mjs +32 -0
  162. package/dist/screens/Checkout/Checkout.cjs +1 -1
  163. package/dist/screens/Checkout/Checkout.mjs +2 -2
  164. package/dist/screens/CustomerOverview/CustomerOverview.cjs +1 -1
  165. package/dist/screens/CustomerOverview/CustomerOverview.mjs +10 -10
  166. package/dist/screens/PayInvoice/PayInvoice.cjs +1 -1
  167. package/dist/screens/PayInvoice/PayInvoice.mjs +57 -55
  168. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs +1 -1
  169. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +9 -9
  170. package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs +1 -1
  171. package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +3 -769
  172. package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs +1 -1
  173. package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +243 -270
  174. package/dist/{subscription-CrVOr5MF.mjs → subscription-D1yHKUNc.mjs} +2 -2
  175. package/dist/{subscriptions--9MaTXMb.mjs → subscriptions-DcfcBYAq.mjs} +1 -1
  176. package/dist/{subscriptions-BArXBCFr.js → subscriptions-DwVsf4Ev.js} +1 -1
  177. package/dist/types/components/checkout/CheckoutTitle.types.d.ts +10 -0
  178. package/dist/types/components/payments/ExpressPaymentMethod/ExpressPaymentMethod.types.d.ts +9 -5
  179. package/dist/types/components/payments/ExpressPaymentMethod/ExpressPaymentMethodApplePay.types.d.ts +3 -1
  180. package/dist/types/components/payments/ExpressPaymentMethods/ExpressPaymentMethods.types.d.ts +5 -1
  181. package/dist/types/components/{wallets/WalletModalShell.types.d.ts → payments/OnDemandPaymentModalShell/OnDemandPaymentModalShell.types.d.ts} +3 -3
  182. package/dist/types/components/payments/PaymentIntegrationForm/PaymentIntegrationForm.types.d.ts +5 -0
  183. package/dist/types/components/payments/PaymentIntegrationFormStripe/PaymentIntegrationFormStripeFrame.types.d.ts +5 -9
  184. package/dist/types/components/providers/ActionDispatchProvider/ActionDispatchProvider.vue.d.ts +7 -11
  185. package/dist/types/components/providers/AuthProvider/AuthProvider.vue.d.ts +7 -11
  186. package/dist/types/components/providers/ConfigProvider/ConfigProvider.vue.d.ts +7 -11
  187. package/dist/types/components/providers/CssOverridesProvider/CssOverridesProvider.vue.d.ts +7 -11
  188. package/dist/types/components/providers/EntryProvider/EntryProvider.vue.d.ts +7 -11
  189. package/dist/types/components/providers/ErrorBoundary/ErrorBoundary.vue.d.ts +7 -11
  190. package/dist/types/components/providers/ExperimentalFeatureProvider/ExperimentalFeatureProvider.vue.d.ts +7 -11
  191. package/dist/types/components/providers/HostElementProvider/HostElementProvider.vue.d.ts +7 -11
  192. package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +2 -2
  193. package/dist/types/components/providers/LoggerProvider/LoggerProvider.vue.d.ts +7 -11
  194. package/dist/types/components/providers/PortalProvider/PortalProvider.vue.d.ts +7 -11
  195. package/dist/types/components/providers/Provider/Provider.vue.d.ts +7 -11
  196. package/dist/types/components/providers/TeleportProvider/TeleportProvider.vue.d.ts +7 -11
  197. package/dist/types/components/providers/TranslationProvider/TranslationOverride.vue.d.ts +7 -11
  198. package/dist/types/components/providers/TranslationProvider/TranslationProvider.vue.d.ts +7 -11
  199. package/dist/types/components/subscriptions/ChargeOnDemandModal/ChargeOnDemandModal.types.d.ts +21 -0
  200. package/dist/types/components/subscriptions/OnDemandItemsCard/OnDemandItemsCard.types.d.ts +7 -0
  201. package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.configuration.types.d.ts +27 -0
  202. package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.entry.types.d.ts +1 -1
  203. package/dist/types/public/screens/SubscriptionDetails/SubscriptionDetails.types.d.ts +6 -5
  204. package/dist/types/services/paymentMethods.types.d.ts +4 -2
  205. package/dist/types/services/requests.types.d.ts +5 -0
  206. package/dist/types/vendor/@solvimon/solvimon-types/index.d.ts +5 -0
  207. package/dist/types/vendor/@solvimon/solvimon-types/types/AgentContext.d.ts +3 -0
  208. package/dist/types/vendor/@solvimon/solvimon-types/types/ApprovalPolicies.d.ts +6 -1
  209. package/dist/types/vendor/@solvimon/solvimon-types/types/ChargeOnDemandPricingItems.d.ts +23 -0
  210. package/dist/types/vendor/@solvimon/solvimon-types/types/CustomFields.d.ts +16 -4
  211. package/dist/types/vendor/@solvimon/solvimon-types/types/Embeddable.d.ts +8 -0
  212. package/dist/types/vendor/@solvimon/solvimon-types/types/Invoice.d.ts +21 -6
  213. package/dist/types/vendor/@solvimon/solvimon-types/types/OAuth.d.ts +28 -0
  214. package/dist/types/vendor/@solvimon/solvimon-types/types/PaymentAcceptor.d.ts +2 -1
  215. package/dist/types/vendor/@solvimon/solvimon-types/types/Permission.d.ts +1 -1
  216. package/dist/types/vendor/@solvimon/solvimon-types/types/Platform.d.ts +6 -1
  217. package/dist/types/vendor/@solvimon/solvimon-types/types/Portal.d.ts +5 -0
  218. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingItemConfig.d.ts +5 -0
  219. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanGroups.d.ts +31 -0
  220. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSchedule.d.ts +9 -1
  221. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanScheduleInfo.d.ts +1 -1
  222. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlanSubscription.d.ts +3 -3
  223. package/dist/types/vendor/@solvimon/solvimon-types/types/PricingPlans.d.ts +3 -0
  224. package/dist/types/vendor/@solvimon/solvimon-types/types/Product.d.ts +2 -0
  225. package/dist/types/vendor/@solvimon/solvimon-types/types/ProductItem.d.ts +2 -0
  226. package/dist/types/vendor/@solvimon/solvimon-types/types/QuoteTemplates.d.ts +2 -0
  227. package/dist/types/vendor/@solvimon/solvimon-types/types/ResourceStatus.d.ts +1 -1
  228. package/dist/types/vendor/@solvimon/solvimon-types/types/SeatAssignment.d.ts +22 -0
  229. package/dist/types/vendor/@solvimon/solvimon-types/types/Wallet.d.ts +6 -0
  230. package/dist/types/vendor/@solvimon/solvimon-types/types/Workflows.d.ts +128 -1
  231. package/dist/{useActionDispatchProvider-BdciAX8T.mjs → useActionDispatchProvider-B3AvkLL2.mjs} +1 -1
  232. package/dist/{useActionDispatchProvider-CKzeqXzY.js → useActionDispatchProvider-DFhppdve.js} +1 -1
  233. package/dist/{useCustomer-D8ixhuuj.mjs → useCustomer-B-jyJIVy.mjs} +1 -1
  234. package/dist/{useCustomer-DSYr0F58.js → useCustomer-BwZKd9i5.js} +1 -1
  235. package/dist/{useCustomerFormLabels-htMZ0xqB.mjs → useCustomerFormLabels-BQk3d9PZ.mjs} +6 -6
  236. package/dist/useCustomerFormLabels-DV9QiMYh.js +1 -0
  237. package/dist/useExperimentalFeature-BciA3Ok9.mjs +135 -0
  238. package/dist/useExperimentalFeature-CGIkgFR4.js +1 -0
  239. package/dist/{useInvoiceData-Bpbog3zW.mjs → useInvoiceData-BocKdeg7.mjs} +3 -3
  240. package/dist/{useInvoiceData-DhrItfv7.js → useInvoiceData-CNV_FMV8.js} +1 -1
  241. package/dist/{useInvoicesList-BGwcJn4I.mjs → useInvoicesList-C8nsXMJ6.mjs} +7 -7
  242. package/dist/{useInvoicesList-duu_b5GW.js → useInvoicesList-S0IbQcrD.js} +1 -1
  243. package/dist/{useLoadInitialData-BDmmpcfb.mjs → useLoadInitialData-D9GkzY8t.mjs} +1 -1
  244. package/dist/{useLoadInitialData-U2WvBmXT.js → useLoadInitialData-D_R6Jy1s.js} +1 -1
  245. package/dist/usePaymentMethodAvailability-BO_guwAw.js +1 -0
  246. package/dist/{usePaymentMethodAvailability-adqRujTA.mjs → usePaymentMethodAvailability-DAcsKGeh.mjs} +5 -6
  247. package/dist/{usePaymentMethodOptions-DlZtTQNQ.mjs → usePaymentMethodOptions-1vRAo6Ib.mjs} +15 -13
  248. package/dist/usePaymentMethodOptions-CuzOoi2k.js +1 -0
  249. package/dist/{usePaymentMethods-BnmSo_rr.mjs → usePaymentMethods-CbwnGONc.mjs} +1 -1
  250. package/dist/{usePaymentMethods-DZ1a0mnr.js → usePaymentMethods-DDaTZQZp.js} +1 -1
  251. package/dist/{usePayments-s-Z1di8d.mjs → usePayments-Cr6NlGaW.mjs} +46 -41
  252. package/dist/usePayments-DDSjo0rH.js +1 -0
  253. package/dist/{usePortal-Hm7wvtgQ.js → usePortal-C27omjhz.js} +1 -1
  254. package/dist/{usePortal-C4rR5Rhu.mjs → usePortal-C5AsegpS.mjs} +1 -1
  255. package/dist/{useSubscription-DSsXVO0h.mjs → useSubscription-BZJL0VOA.mjs} +1 -1
  256. package/dist/{useSubscription-DMAEJves.js → useSubscription-D787IXY-.js} +1 -1
  257. package/dist/{useTimePeriod.es-CW8ycmpT.mjs → useTimePeriod.es-DWLsLFqs.mjs} +1 -1
  258. package/dist/{useTimePeriod.es-anHB63am.js → useTimePeriod.es-rzxqUCTu.js} +1 -1
  259. package/dist/useWatchDebounced-B8iX7ykx.js +1 -0
  260. package/dist/useWatchDebounced-BHlBPcXB.mjs +20 -0
  261. package/package.json +20 -14
  262. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-7wQAw6Lv.js +0 -1
  263. package/dist/Checkout.entry.ce-BMzK8nQg.mjs +0 -3900
  264. package/dist/Checkout.entry.ce-DgA0ckyl.js +0 -2
  265. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DzbPUvHN.js +0 -1
  266. package/dist/InvoiceSummary.vue.es-v1TkOUhA.js +0 -1
  267. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-4RmdLbzY.js +0 -1
  268. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CvpFnl9V.mjs +0 -141
  269. package/dist/PaymentIntegrationFormAdyen-C9KoiqMh.js +0 -98
  270. package/dist/PaymentIntegrationFormStripe-DTLgGutU.js +0 -102
  271. package/dist/PaymentMethod.vue.es-ZWda5GqF.js +0 -1
  272. package/dist/PaymentMethodForm.vue_vue_type_script_setup_true_lang-CzUwtVEI.js +0 -1
  273. package/dist/PlanCustomizationEditor-CunwwXTw.js +0 -1
  274. package/dist/PlanCustomizationEditor-NLVkEYFF.mjs +0 -877
  275. package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-Dvuj-fos.mjs +0 -131
  276. package/dist/PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-iE4dLawA.js +0 -1
  277. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-DRLoYWGY.mjs +0 -51
  278. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-DypW8aNJ.js +0 -1
  279. package/dist/SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DH7IZrNT.js +0 -1
  280. package/dist/TooltipParagraph.vue.es-DS_69pl1.js +0 -1
  281. package/dist/adyen-CvsH5fok.mjs +0 -117
  282. package/dist/adyen-Druit6gz.js +0 -1
  283. package/dist/de-DE-npBTLtKL.js +0 -1
  284. package/dist/en-US-9xdcz3T5.js +0 -1
  285. package/dist/en-US-kGduGoka.js +0 -1
  286. package/dist/icon-sprite.svg.es-Bt21fMEt.mjs +0 -4
  287. package/dist/icon-sprite.svg.es-Dauis9LS.js +0 -1
  288. package/dist/index-DwueOtPi.js +0 -1
  289. package/dist/it-IT-BayNIAy7.js +0 -1
  290. package/dist/nl-NL-0rV4nFLw.js +0 -1
  291. package/dist/paymentMethods-CZGP6_4W.js +0 -1
  292. package/dist/pricing-BVAld27Y.js +0 -1
  293. package/dist/pricing-DLOeiAIB.mjs +0 -16
  294. package/dist/types/components/subscriptions/SubscriptionManagement/SubscriptionManagement.types.d.ts +0 -47
  295. package/dist/useCustomerFormLabels-CRumh405.js +0 -1
  296. package/dist/useExperimentalFeature-D29-TO3R.js +0 -1
  297. package/dist/useExperimentalFeature-JK_kAUQQ.mjs +0 -6
  298. package/dist/usePaymentMethodAvailability-DwtT5Czz.js +0 -1
  299. package/dist/usePaymentMethodOptions-CXdFKFqZ.js +0 -1
  300. package/dist/usePayments-DL4agK2i.js +0 -1
  301. package/dist/useWatchDebounced-CAU1WI1P.js +0 -1
  302. package/dist/useWatchDebounced-DT5IicPp.mjs +0 -14
@@ -1 +0,0 @@
1
- const e=require("vue"),C=require("./customElements-hH6pju3X.js"),v=require("./Amount.vue.es-DExaYBqm.js"),ce=require("./useService-H7BjLg8P.js"),O=require("./Button.vue.es-CeUTAc2n.js"),de=require("./floating-ui.vue.es-Bly3DGWm.js"),ae=require("./customer.es-BButyYo0.js"),q=require("./formatting.es-C72Nsrmh.js"),W=require("./Comparators.vue.es-DmkxV0gb.js"),se=require("./Chip.vue.es-BN83K3Tk.js"),Y=require("./getComposedString.es-haS4bAj7.js"),P=require("./TooltipParagraph.vue.es-DS_69pl1.js"),ue=require("./index.es-BclokHQX.js"),K=require("./wallets.es-CNIMW5ay.js"),me=require("./DividerText.vue.es-DsYRZzuE.js"),fe=require("./IconTitle.vue.es-DtnpBObk.js"),ge=require("./ContextMenu.vue.es-DXKR7WFg.js"),J=(t=[])=>{const n=e.ref(t);return[n,i=>{typeof n.value.find(o=>o===i)=="number"?n.value=n.value.filter(o=>o!==i):n.value=[...n.value,i]}]},pe={},ve={class:"w-full table-fixed"};function xe(t,n){return e.openBlock(),e.createElementBlock("table",ve,[e.renderSlot(t.$slots,"default")])}const $=de._export_sfc(pe,[["render",xe]]),m=e.defineComponent({__name:"InvoiceTableData",props:{number:{type:Boolean,default:!1},hasPadding:{type:Boolean,default:!0}},setup(t){return(n,a)=>(e.openBlock(),e.createElementBlock("td",{class:e.normalizeClass({"text-right tabular-nums":t.number,"py-2":t.hasPadding})},[e.renderSlot(n.$slots,"default")],2))}}),x=e.defineComponent({__name:"InvoiceTableHeader",props:{left:{type:Boolean,default:!1},right:{type:Boolean,default:!1}},setup(t){return(n,a)=>(e.openBlock(),e.createElementBlock("th",{class:e.normalizeClass(["border-b py-1.5 text-xs font-bold uppercase text-subtle",{"text-left":t.left,"text-right":t.right}])},[e.renderSlot(n.$slots,"default")],2))}}),ye="INVOICE_PERIOD",ke="INVOICE_PERIOD_SUBTOTAL",R="INVOICE_PERIOD_TOTAL",X="SUMMARY_LINE_AMOUNT",he="SUMMARY_TOTAL_TAX",be="SUMMARY_TOTAL_INCLUDING_TAX",Be="SUMMARY_TOTAL_EXCLUDING_TAX",_e="SUMMARY_TOTAL_DISCOUNT",Ne="SUMMARY_AMOUNT_DUE",Ce="DEDUCTION",Te="HAS_SUBLINES",Ve={class:"flex items-center"},Ee={key:0,class:"text-xs text-secondary"},we={class:"flex items-center"},Q=e.defineComponent({__name:"InvoiceSubLineRow",props:{subLines:{},isOpen:{type:Boolean},lineOrder:{},periodOrder:{},groupOrder:{},processingOnlyCustomers:{},displayInvoiceSubLinesPerProcessingOnlyCustomer:{type:Boolean},showTaxPerLineItem:{type:Boolean,default:!0}},setup(t){const{formatMessage:n,formatNumber:a}=C.useIntl(),i=t,r=l=>{var s;const c=(s=i.processingOnlyCustomers)==null?void 0:s.find(u=>u.id===l);return c?ae.getCustomerName(c):n({id:"generic.not_available",defaultMessage:"N/A",description:"Used in scenarios where no data is available to be displayed"})},o=l=>{var s;return((s=l.usage_based_conversion)==null?void 0:s.conditions)??l.conditions},d=l=>{var s,c;const u=(c=(s=l.details.conversion)==null?void 0:s.credits)==null?void 0:c.quantity;return u===void 0?n({id:"generic.not_available",defaultMessage:"N/A",description:"Used in scenarios where no data is available to be displayed"}):a(+u,{maximumFractionDigits:q.MAX_FRACTION_DIGITS})};return(l,s)=>t.subLines&&t.isOpen?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.subLines,(c,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:u},[c.processing_only_customer_resource_id?t.displayInvoiceSubLinesPerProcessingOnlyCustomer&&t.processingOnlyCustomers?(e.openBlock(),e.createElementBlock("tr",{key:1,class:e.normalizeClass(["group",{"border-t":u>0}])},[e.createVNode(m,{class:"pl-4"},{default:e.withCtx(()=>[e.createElementVNode("div",we,[e.createElementVNode("div",null,e.toDisplayString(r(c.processing_only_customer_resource_id)),1)])]),_:2},1024),e.renderSlot(l.$slots,"subline-content",{details:c.details,hideTaxDetails:!0})],2)):e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("tr",{key:0,class:e.normalizeClass(u>0?"border-t":"")},[e.createVNode(m,null,{default:e.withCtx(()=>{var g,p,b,B,_,y;return[e.createElementVNode("div",Ve,[e.renderSlot(l.$slots,"invoice-line-prefix",{lineOrder:t.lineOrder,periodOrder:t.periodOrder,groupOrder:t.groupOrder}),e.createElementVNode("div",null,[e.createElementVNode("div",null,[c.description?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(c.description),1)],64)):c.details.description?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(c.details.description),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(" N/A ")],64))]),(g=o(c))!=null&&g.name||(p=o(c))!=null&&p.meter_properties?(e.openBlock(),e.createElementBlock("div",Ee,[(b=o(c))!=null&&b.name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString((B=o(c))==null?void 0:B.name),1)],64)):(_=o(c))!=null&&_.meter_properties?(e.openBlock(),e.createBlock(e.unref(W._sfc_main),{key:1,comparators:(y=o(c))==null?void 0:y.meter_properties},null,8,["comparators"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)])])]}),_:2},1024),e.createVNode(m,{number:"",class:"text-right tabular-nums"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d(c)),1)]),_:2},1024),e.createVNode(m,{class:"text-right tabular-nums"},{default:e.withCtx(()=>{var g,p;return[(g=c.details.band)!=null&&g.amount?(e.openBlock(),e.createBlock(v._sfc_main,{key:0,value:c.details.band.amount},null,8,["value"])):(p=c.details.band)!=null&&p.percentage?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(c.details.band.percentage)+"% ",1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(" N/A ")],64))]}),_:2},1024),t.showTaxPerLineItem?(e.openBlock(),e.createBlock(m,{key:0},{default:e.withCtx(()=>[...s[0]||(s[0]=[e.createTextVNode(" ",-1)])]),_:1})):e.createCommentVNode("",!0),c.details.amount?(e.openBlock(),e.createBlock(m,{key:1,class:"text-right tabular-nums"},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:c.details.amount,"data-testid":e.unref(ke)},null,8,["value","data-testid"])]),_:2},1024)):e.createCommentVNode("",!0)],2))],64))),128)):e.createCommentVNode("",!0)}}),Oe={class:"flex gap-4"},Ie={class:"flex items-center gap-2"},G=e.defineComponent({__name:"PricingClauseChip",props:{iconName:{}},setup(t){return(n,a)=>(e.openBlock(),e.createElementBlock("div",Oe,[e.createVNode(se._sfc_main,null,{default:e.withCtx(()=>[e.createElementVNode("div",Ie,[e.createVNode(O._sfc_main$1,{icon:t.iconName,size:"xs"},null,8,["icon"]),e.createElementVNode("span",null,[e.renderSlot(n.$slots,"chip-content")])])]),_:3}),e.renderSlot(n.$slots,"chip-postfix")]))}}),Se={class:"flex flex-col gap-2"},ie=e.defineComponent({__name:"InvoicePricingClauseChip",props:{clauseType:{},priceDetailsBand:{},invoiceLineDescription:{}},setup(t){const n=C.useIntl();return(a,i)=>(e.openBlock(),e.createElementBlock("div",Se,[e.createElementVNode("span",null,e.toDisplayString(t.invoiceLineDescription),1),t.clauseType==="DISCOUNT"&&t.priceDetailsBand?(e.openBlock(),e.createBlock(e.unref(G),{key:0,"icon-name":"south_east"},e.createSlots({_:2},[t.priceDetailsBand.amount?{name:"chip-content",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.amount_discount",defaultMessage:"{amount} discount",description:"Represents a certain amount of discount, where {amount} is replaced with the amount"},{amount:e.unref(q.formatAmount)(t.priceDetailsBand.amount)}).toUpperCase()),1)]),key:"0"}:t.priceDetailsBand.percentage?{name:"chip-content",fn:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.percentage_discount",defaultMessage:"{percentage}% discount",description:"Represents a certain percentage of discount, where {percentage} is replaced with the percentage (number only)"},{percentage:t.priceDetailsBand.percentage??"0"}).toUpperCase()),1)]),key:"1"}:void 0]),1024)):t.clauseType==="ADJUSTMENT"?(e.openBlock(),e.createBlock(e.unref(G),{key:1,"icon-name":"info"},{"chip-content":e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.adjustment_chip_body",defaultMessage:"Adjustment",description:"Used on invoice lines to mark as adjusted"}).toUpperCase()),1)]),_:1})):t.clauseType==="MARKUP"?(e.openBlock(),e.createBlock(e.unref(G),{key:2,"icon-name":"north_east"},{"chip-content":e.withCtx(()=>{var r;return[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.markup_percentage",defaultMessage:"{percentage}% markup",description:"Markup percentage, where {percentage} is replaced with the percentage (number only)"},{percentage:((r=t.priceDetailsBand)==null?void 0:r.percentage)??"0"}).toUpperCase()),1)]}),_:1})):t.clauseType==="COMMITMENT"?(e.openBlock(),e.createBlock(e.unref(G),{key:3,"icon-name":"sell"},{"chip-content":e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.commitment",defaultMessage:"commitment",description:"Used on invoice lines to mark as commitment"}).toUpperCase()),1)]),_:1})):e.createCommentVNode("",!0)]))}}),$e=["tabindex","onClick"],Me={class:"flex items-center"},De=e.defineComponent({__name:"InvoiceCommitment",props:{commitments:{},groupOrder:{},invoicePeriodOrder:{},processingOnlyCustomers:{},displayInvoiceSubLinesPerProcessingOnlyCustomer:{type:Boolean}},setup(t){const n=C.useIntl(),{getIsOpen:a,toggle:i}=W.useToggleList(),r=(l,s)=>{i(o(l,s))},o=(l,s)=>`${l}-line-${s}`,d=l=>{var s;return l.description??((s=l.details)==null?void 0:s.description)??n.$t({id:"generic.not_available",defaultMessage:"N/A",description:"Used in scenarios where no data is available to be displayed"})};return(l,s)=>(e.openBlock(),e.createBlock($,null,{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(x,{left:"",colspan:"5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.unit",defaultMessage:"Unit",description:"Table header for the column containing the number of units of invoice groups"})),1)]),_:1}),e.createVNode(x,{right:"",class:"w-60"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.sub_total",defaultMessage:"Subtotal",description:"Table header for the column containing the subtotal for invoices"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.commitments,(c,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:u},[e.createElementVNode("tr",{class:e.normalizeClass(["border-t",{"cursor-pointer":c.sub_lines}]),tabindex:c.sub_lines?0:void 0,onClick:g=>r(t.groupOrder,c.line_order)},[e.createVNode(m,{colspan:"2"},{default:e.withCtx(()=>{var g;return[c.sub_lines?(e.openBlock(),e.createBlock(O._sfc_main$1,{key:0,icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!e.unref(a)(o(t.groupOrder,c.line_order))}])},null,8,["class"])):e.createCommentVNode("",!0),e.createElementVNode("div",Me,[e.renderSlot(l.$slots,"invoice-line-prefix",{lineOrder:c.line_order,periodOrder:t.invoicePeriodOrder,groupOrder:t.groupOrder}),e.createVNode(ie,{"clause-type":"COMMITMENT","invoice-line-description":d(c),"price-details-band":(g=c.details)==null?void 0:g.band},null,8,["invoice-line-description","price-details-band"])])]}),_:2},1024),e.createVNode(m,{colspan:"3"},{default:e.withCtx(()=>[...s[0]||(s[0]=[e.createTextVNode(" ",-1)])]),_:1}),e.createVNode(m,{number:""},{default:e.withCtx(()=>{var g,p;return[(g=c.details)!=null&&g.amount?(e.openBlock(),e.createBlock(v._sfc_main,{key:0,value:(p=c.details)==null?void 0:p.amount,"data-testid":e.unref(X)},null,8,["value","data-testid"])):e.createCommentVNode("",!0)]}),_:2},1024)],10,$e),e.createVNode(Q,{ref_for:!0,ref:o(t.groupOrder,c.line_order),"sub-lines":c.sub_lines??[],"line-order":c.line_order,"period-order":t.invoicePeriodOrder,"group-order":t.groupOrder,"is-open":e.unref(a)(o(t.groupOrder,c.line_order)),"processing-only-customers":t.processingOnlyCustomers,"display-invoice-sub-lines-per-processing-only-customer":t.displayInvoiceSubLinesPerProcessingOnlyCustomer},null,8,["sub-lines","line-order","period-order","group-order","is-open","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer"])],64))),128))]),_:3}))}}),Pe=["tabindex","onClick"],Ae={class:"flex items-center"},Le=e.defineComponent({__name:"InvoiceDiscountMarkup",props:{lines:{},type:{},handleToggleItems:{type:Function},formatIndex:{type:Function},expandedItems:{},isExpandable:{type:Boolean},invoicePeriodOrder:{},groupOrder:{},processingOnlyCustomers:{},displayInvoiceSubLinesPerProcessingOnlyCustomer:{type:Boolean}},setup(t){const n=C.useIntl(),{getIsOpen:a,toggle:i}=W.useToggleList(),r=(d,l)=>{i(o(d,l))},o=(d,l)=>`${d}-line-${l}`;return(d,l)=>(e.openBlock(),e.createBlock($,null,{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(x,{left:"",class:"w-3/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.quantity",defaultMessage:"Quantity",description:"Table header for quantity column"})),1)]),_:1}),e.createVNode(x,{colspan:"2"},{default:e.withCtx(()=>[...l[0]||(l[0]=[e.createTextVNode(" ",-1)])]),_:1}),e.createVNode(x,{left:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.type==="DISCOUNT"?e.unref(n).$t({id:"invoice.table_header.discount",defaultMessage:"Discount",description:"Table header for discount column"}):e.unref(n).$t({id:"invoice.table_header.markup",defaultMessage:"Markup",description:"Table header for markup column"})),1)]),_:1}),e.createVNode(x,{left:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.type==="DISCOUNT"?e.unref(n).$t({id:"invoice.table_header.total",defaultMessage:"Total",description:"Table header for total column"}):" "),1)]),_:1}),e.createVNode(x,{right:"",class:"w-1/5"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.sub_total",defaultMessage:"Subtotal",description:"Table header for the column containing the subtotal for invoices"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.lines,(s,c)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:c},[e.createElementVNode("tr",{class:e.normalizeClass(["border-t",{"cursor-pointer":t.isExpandable}]),tabindex:t.isExpandable?0:void 0,onClick:u=>r(t.groupOrder,s.line_order)},[e.createVNode(m,{class:"w-3/5"},{default:e.withCtx(()=>{var u,g;return[s.sub_lines?(e.openBlock(),e.createBlock(O._sfc_main$1,{key:0,icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!e.unref(a)(o(t.groupOrder,s.line_order))}])},null,8,["class"])):e.createCommentVNode("",!0),e.createElementVNode("div",Ae,[e.renderSlot(d.$slots,"invoice-line-prefix",{lineOrder:s.line_order,periodOrder:t.invoicePeriodOrder,groupOrder:t.groupOrder}),s.description?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(s.description),1)],64)):(u=s.details)!=null&&u.description?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString((g=s.details)==null?void 0:g.description),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode("N/A")],64))])]}),_:2},1024),e.createVNode(m,{colspan:"2"},{default:e.withCtx(()=>[...l[1]||(l[1]=[e.createTextVNode(" ",-1)])]),_:1}),e.createVNode(m,{class:"w-1/5 tabular-nums"},{default:e.withCtx(()=>{var u,g,p;return[e.createTextVNode(e.toDisplayString((g=(u=s.details)==null?void 0:u.band)!=null&&g.percentage?`${(p=s.details)==null?void 0:p.band.percentage}%`:" "),1)]}),_:2},1024),e.createVNode(m,{class:"w-1/5"},{default:e.withCtx(()=>[...l[2]||(l[2]=[e.createTextVNode(" ",-1)])]),_:1}),e.createVNode(m,{number:"",class:"w-1/5"},{default:e.withCtx(()=>{var u;return[(u=s.details)!=null&&u.amount?(e.openBlock(),e.createBlock(v._sfc_main,{key:0,value:s.details.amount,"data-testid":e.unref(X)},null,8,["value","data-testid"])):e.createCommentVNode("",!0)]}),_:2},1024)],10,Pe),e.createVNode(Q,{ref_for:!0,ref:o(t.groupOrder,s.line_order),"sub-lines":s.sub_lines??[],"line-order":s.line_order,"is-open":e.unref(a)(o(t.groupOrder,s.line_order)),"period-order":t.invoicePeriodOrder,"group-order":t.groupOrder,"processing-only-customers":t.processingOnlyCustomers,"display-invoice-sub-lines-per-processing-only-customer":t.displayInvoiceSubLinesPerProcessingOnlyCustomer},null,8,["sub-lines","line-order","is-open","period-order","group-order","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer"])],64))),128))]),_:3}))}}),z=t=>{var n;return(n=t.lines)!=null&&n.some(a=>!!a.sub_lines)?Te:void 0},Fe=["tabindex"],Ue={key:0},Re={colspan:"2",class:"p-0"},ze={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},qe=e.defineComponent({__name:"InvoiceGroupCommitment",props:{group:{},expandedItems:{},handleToggleItems:{type:Function},formatIndex:{type:Function},invoicePeriodOrder:{},groupOrder:{},isExpandable:{type:Boolean},forceExpanded:{type:Boolean},amountType:{},processingOnlyCustomers:{},displayInvoiceSubLinesPerProcessingOnlyCustomer:{type:Boolean},showTaxPerLineItem:{type:Boolean}},setup(t){const n=C.useIntl();return(a,i)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("tr",{class:e.normalizeClass(["border-t break-inside-avoid",{"cursor-pointer":t.isExpandable}]),tabindex:t.isExpandable?0:void 0,onClick:i[0]||(i[0]=r=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))),onKeyup:[i[1]||(i[1]=e.withKeys(r=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["enter"])),i[2]||(i[2]=e.withKeys(r=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["space"]))]},[e.createVNode(m,{class:"p-0"},{default:e.withCtx(()=>[t.isExpandable?(e.openBlock(),e.createBlock(O._sfc_main$1,{key:0,icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!t.expandedItems.includes(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))}])},null,8,["class"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(e.unref(n).$t({id:"invoice.commitment_heading",defaultMessage:"Commitment",description:"Heading used for commitment in invoice tables"})),1)]),_:1}),e.createVNode(m,{number:""},{default:e.withCtx(()=>[t.amountType==="INCLUDING_TAX"?(e.openBlock(),e.createBlock(v._sfc_main,{key:0,value:t.group.amount_including_tax,"data-testid":e.unref(R),"data-type":e.unref(z)(t.group)},null,8,["value","data-testid","data-type"])):(e.openBlock(),e.createBlock(v._sfc_main,{key:1,value:t.group.amount_excluding_tax,"data-testid":e.unref(R),"data-type":e.unref(z)(t.group)},null,8,["value","data-testid","data-type"]))]),_:1})],42,Fe),(t.forceExpanded||t.expandedItems.includes(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)))&&t.group.lines?(e.openBlock(),e.createElementBlock("tr",Ue,[e.createElementVNode("td",Re,[e.createElementVNode("div",ze,[e.createVNode(De,{commitments:t.group.lines,"format-index":t.formatIndex,"handle-toggle-items":t.handleToggleItems,"expanded-items":t.expandedItems,"is-expandable":t.isExpandable,"invoice-period-order":t.invoicePeriodOrder,"group-order":t.groupOrder,"processing-only-customers":t.processingOnlyCustomers,"display-invoice-sub-lines-per-processing-only-customer":t.displayInvoiceSubLinesPerProcessingOnlyCustomer},{"invoice-line-prefix":e.withCtx(r=>[e.renderSlot(a.$slots,"invoice-line-prefix",e.normalizeProps(e.guardReactiveProps(r)))]),_:3},8,["commitments","format-index","handle-toggle-items","expanded-items","is-expandable","invoice-period-order","group-order","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer"])])])])):e.createCommentVNode("",!0)],64))}}),We=["tabindex"],He={key:0},Ge={colspan:"2",class:"p-0"},Xe={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},Ke=e.defineComponent({__name:"InvoiceGroupDiscountMarkup",props:{heading:{},group:{},expandedItems:{},handleToggleItems:{type:Function},formatIndex:{type:Function},invoicePeriodOrder:{},groupOrder:{},isExpandable:{type:Boolean},forceExpanded:{type:Boolean},amountType:{},processingOnlyCustomers:{},displayInvoiceSubLinesPerProcessingOnlyCustomer:{type:Boolean},showTaxPerLineItem:{type:Boolean}},setup(t){return(n,a)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("tr",{class:e.normalizeClass(["border-t break-inside-avoid",{"cursor-pointer":t.isExpandable}]),tabindex:t.isExpandable?0:void 0,onClick:a[0]||(a[0]=i=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))),onKeyup:[a[1]||(a[1]=e.withKeys(i=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["enter"])),a[2]||(a[2]=e.withKeys(i=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["space"]))]},[e.createVNode(m,{class:"p-0"},{default:e.withCtx(()=>[t.isExpandable?(e.openBlock(),e.createBlock(O._sfc_main$1,{key:0,icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!t.expandedItems.includes(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))}])},null,8,["class"])):e.createCommentVNode("",!0),e.createTextVNode(" "+e.toDisplayString(t.heading),1)]),_:1}),e.createVNode(m,{number:""},{default:e.withCtx(()=>[t.amountType==="INCLUDING_TAX"?(e.openBlock(),e.createBlock(v._sfc_main,{key:0,value:t.group.amount_including_tax,"data-testid":e.unref(R),"data-type":e.unref(z)(t.group)},null,8,["value","data-testid","data-type"])):(e.openBlock(),e.createBlock(v._sfc_main,{key:1,value:t.group.amount_excluding_tax,"data-testid":e.unref(R),"data-type":e.unref(z)(t.group)},null,8,["value","data-testid","data-type"]))]),_:1})],42,We),(t.forceExpanded||t.expandedItems.includes(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)))&&t.group.lines?(e.openBlock(),e.createElementBlock("tr",He,[e.createElementVNode("td",Ge,[e.createElementVNode("div",Xe,[e.createVNode(Le,{type:t.group.type,lines:t.group.lines,"format-index":t.formatIndex,"handle-toggle-items":t.handleToggleItems,"expanded-items":t.expandedItems,"is-expandable":t.isExpandable,"invoice-period-order":t.invoicePeriodOrder,"group-order":t.groupOrder,"processing-only-customers":t.processingOnlyCustomers,"display-invoice-sub-lines-per-processing-only-customer":t.displayInvoiceSubLinesPerProcessingOnlyCustomer},{"invoice-line-prefix":e.withCtx(i=>[e.renderSlot(n.$slots,"invoice-line-prefix",e.normalizeProps(e.guardReactiveProps(i)))]),_:3},8,["type","lines","format-index","handle-toggle-items","expanded-items","is-expandable","invoice-period-order","group-order","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer"])])])])):e.createCommentVNode("",!0)],64))}}),je=(t,n)=>{if(n)return t.forwarded_from_customer_id},Ye=t=>{let n={kind:"default"},a={kind:"default"};if(t.tier_lower_bound&&"number"in t.tier_lower_bound)n={kind:"number",value:+t.tier_lower_bound.number};else if(t.tier_lower_bound&&"amount"in t.tier_lower_bound){const{quantity:i,currency:r}=t.tier_lower_bound.amount;n={kind:"amount",currency:r,quantity:i??0}}if(t.tier_top_bound&&"number"in t.tier_top_bound)a={kind:"number",value:+t.tier_top_bound.number};else if(t.tier_top_bound&&"amount"in t.tier_top_bound){const{quantity:i,currency:r}=t.tier_top_bound.amount;a={kind:"amount",currency:r,quantity:i}}return{lowerBound:n,topBound:a}},Qe=t=>{var n,a,i,r;switch(t==null?void 0:t.price_bound){case"BELOW_MINIMUM_AMOUNT":return{kind:"band_minimum_amount",amount:(n=t.band)==null?void 0:n.minimum_amount};case"NOT_HIT":return{kind:"price_bound_within_bounds"};case"ABOVE_MAXIMUM_AMOUNT":return{kind:"price_bound_maximum_amount",amount:(a=t.band)==null?void 0:a.maximum_amount};case"BELOW_MINIMUM_NUMBER":return{kind:"band_minimum_number",value:(i=t.band)==null?void 0:i.minimum_number};case"ABOVE_MAXIMUM_NUMBER":return{kind:"band_maximum_number",value:(r=t.band)==null?void 0:r.maximum_number};default:return{kind:"none"}}},Je={class:"items-left flex flex-col gap-1 leading-none"},Ze={class:"flex items-center"},et={key:0,class:"ml-1 text-xs text-secondary"},tt={key:0},nt={key:1,class:"text-xs text-secondary"},ot={key:2,class:"text-xs text-secondary"},at={class:"text-[9pt] text-secondary"},it=e.defineComponent({__name:"InvoiceLineRow",props:{data:{},isLast:{type:Boolean},periodOrder:{},groupOrder:{},groupType:{},isExpanded:{type:Boolean}},setup(t){const{$t:n,formatNumber:a}=C.useIntl(),i=t,r=c=>{if(c.kind!=="default")return c.kind==="number"?a(c.value):`${c.currency} ${c.quantity}`},o=c=>{if(!c)return"";const{lowerBound:u,topBound:g}=Ye(c),p=r(g);return(r(u)??"0")+(p?` - ${p}`:"+")},d=e.computed(()=>{var c;return(c=i.data.details)==null?void 0:c.included_volume_details}),l=e.computed(()=>Qe(i.data.details)),s=e.computed(()=>{var c,u;return(c=i.data)!=null&&c.product_items?Y.getComposedString(i.data.product_items.map(g=>g.name)):((u=i.data)==null?void 0:u.description)??"N/A"});return(c,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(m,{class:"align-top"},{default:e.withCtx(()=>{var g,p,b,B,_,y,E,k,w;return[e.createElementVNode("div",Je,[e.createElementVNode("div",null,[t.data.sub_lines?(e.openBlock(),e.createBlock(O._sfc_main$1,{key:0,icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 -translate-y-2 text-slate-400",{"-rotate-90":!t.isExpanded}])},null,8,["class"])):e.createCommentVNode("",!0),e.createElementVNode("div",Ze,[e.renderSlot(c.$slots,"invoice-line-prefix",{lineOrder:t.data.line_order,periodOrder:t.periodOrder,groupOrder:t.groupOrder}),["PRICING","REVENUE","ONE_OFF"].includes(t.data.type)?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(s.value)+" ",1),t.data.type==="ONE_OFF"&&t.groupType!=="ONE_OFF"?(e.openBlock(),e.createElementBlock("div",et,e.toDisplayString(e.unref(q.formatEnum)(t.data.type)),1)):e.createCommentVNode("",!0)],64)):(e.openBlock(),e.createBlock(ie,{key:1,"invoice-line-description":s.value,"clause-type":t.data.type,"price-details-band":(g=t.data.details)==null?void 0:g.band},null,8,["invoice-line-description","clause-type","price-details-band"]))])]),["TIERED","STAIR_STEP","TOP_TIERED"].includes(t.data.pricing_type)&&!d.value&&((p=t.data.details)!=null&&p.band)?(e.openBlock(),e.createElementBlock("div",tt,e.toDisplayString(o((b=t.data.details)==null?void 0:b.band)),1)):e.createCommentVNode("",!0),(_=(B=t.data.details)==null?void 0:B.split_pricing)!=null&&_.meter_properties?(e.openBlock(),e.createElementBlock("span",nt,[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList((E=(y=t.data.details)==null?void 0:y.split_pricing)==null?void 0:E.meter_properties,(I,S)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createTextVNode(e.toDisplayString(I.meter_property.name)+": "+e.toDisplayString(I.value),1),S<t.data.details.split_pricing.meter_properties.length-1?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(", "))],64)):e.createCommentVNode("",!0)],64))),256))])):e.createCommentVNode("",!0),(k=t.data.conditions)!=null&&k.name||(w=t.data.conditions)!=null&&w.meter_properties?(e.openBlock(),e.createElementBlock("div",ot,[t.data.conditions.name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(t.data.conditions.name),1)],64)):t.data.conditions.meter_properties?(e.openBlock(),e.createBlock(e.unref(W._sfc_main),{key:1,comparators:t.data.conditions.meter_properties},null,8,["comparators"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),e.createElementVNode("span",at,[l.value.kind==="band_minimum_amount"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(e.unref(n)({id:"invoice.line.band_minimum_amount",defaultMessage:"Band minimum amount",description:"Minimum amount specified in a band"}))+" ",1),l.value.amount?(e.openBlock(),e.createBlock(v._sfc_main,{key:0,value:l.value.amount},null,8,["value"])):e.createCommentVNode("",!0)],64)):l.value.kind==="price_bound_within_bounds"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(e.unref(n)({id:"invoice.line.price_bound_within_bounds",defaultMessage:"Within bounds",description:"Label used when min and max bounds are specified but reached"})),1)],64)):l.value.kind==="price_bound_maximum_amount"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(e.unref(n)({id:"invoice.line.price_bound_maximum_amount",defaultMessage:"Maximum amount",description:"Maximum amount specified in a band"}))+" ",1),l.value.amount?(e.openBlock(),e.createBlock(v._sfc_main,{key:0,value:l.value.amount},null,8,["value"])):e.createCommentVNode("",!0)],64)):l.value.kind==="band_minimum_number"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createTextVNode(e.toDisplayString(e.unref(n)({id:"invoice.line.band_minimum_number",defaultMessage:"Minimum number",description:"Minimum number of units specified in a band"}))+" "+e.toDisplayString(l.value.value),1)],64)):l.value.kind==="band_maximum_number"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createTextVNode(e.toDisplayString(e.unref(n)({id:"invoice.line.band_maximum_number",defaultMessage:"Maximum number",description:"Maximum number of units specified in a band"}))+" "+e.toDisplayString(l.value.value),1)],64)):e.createCommentVNode("",!0)])]}),_:3}),e.renderSlot(c.$slots,"line-content",{details:t.data.details})],64))}}),rt=(t,n,a)=>{var i,r;if(t==="PASS_THROUGH")return{kind:"hidden"};if(a&&((r=(i=n==null?void 0:n.conversion)==null?void 0:i.credits)!=null&&r.quantity))return{kind:"conversion-credits",value:n.conversion.credits.quantity};if(n!=null&&n.price_bound){const{price_bound:o,meter_value:d,band:l}=n;return o==="BELOW_MINIMUM_AMOUNT"||o==="ABOVE_MAXIMUM_AMOUNT"?{kind:"raw",value:d.count}:o==="NOT_HIT"&&"amount"in d&&d.amount?{kind:"amount",amount:d.amount}:o==="NOT_HIT"&&"number"in d&&d.number?{kind:"raw",value:d.number}:o==="RATIO"&&d.number?{kind:"number",value:+d.number}:o==="BELOW_MINIMUM_NUMBER"&&(l!=null&&l.minimum_number)?{kind:"number",value:+l.minimum_number}:o==="ABOVE_MAXIMUM_NUMBER"&&(l!=null&&l.maximum_number)?{kind:"number",value:+l.maximum_number}:{kind:"hidden"}}return n!=null&&n.meter_value&&"number"in n.meter_value?{kind:"number",value:+n.meter_value.number}:n!=null&&n.meter_value&&"amount"in n.meter_value?{kind:"amount",amount:n.meter_value.amount}:{kind:"one"}},lt=["NOT_HIT","BELOW_MINIMUM_NUMBER","ABOVE_MAXIMUM_NUMBER"],ct=(t,n,a)=>{if(t==="PASS_THROUGH")return{kind:"pass-through"};if(n!=null&&n.price_bound){const{price_bound:o,band:d,amount:l}=n;if(o==="BELOW_MINIMUM_AMOUNT"&&(d!=null&&d.minimum_amount))return{kind:"amount",amount:d.minimum_amount};if(o==="ABOVE_MAXIMUM_AMOUNT"&&(d!=null&&d.maximum_amount))return{kind:"amount",amount:d.maximum_amount};if(o==="RATIO")return{kind:"amount",amount:(a==="PER_SEAT"?d==null?void 0:d.amount:void 0)??l,suffix:{kind:"tier-top-bound"}};if(lt.includes(o)){if(d&&d.amount)return{kind:"amount",amount:d.amount};if(d&&"percentage"in d)return{kind:"percentage",value:d.percentage};if(d&&l)return{kind:"amount",amount:l,suffix:{kind:"fixed-amount"}}}return{kind:"hidden"}}const i=n==null?void 0:n.band,r=n==null?void 0:n.amount;return i&&i.amount?{kind:"amount",amount:i.amount,suffix:{kind:"block-size-or-per-unit"}}:i&&"percentage"in i?{kind:"percentage",value:i.percentage}:i&&r?t==="STAIR_STEP"||t==="STAIR_STEP_TOP_UP"?{kind:"amount",amount:r,suffix:{kind:"fixed-amount"}}:t==="TOP_TIERED"?{kind:"amount",amount:r,suffix:{kind:"per-unit"}}:t==="FLAT"?{kind:"amount",amount:r,suffix:{kind:"flat-fee"}}:{kind:"amount",amount:r}:{kind:"hidden"}},dt={key:5,class:"text-xs text-secondary"},st={key:1,class:"tabular-nums"},ut={key:0,class:"text-2xs text-secondary"},mt={key:1,class:"text-2xs text-secondary"},ft={key:0,class:"text-2xs text-secondary"},gt={key:1,class:"text-2xs text-secondary"},pt={key:2,class:"text-2xs text-secondary"},vt={key:3,class:"text-2xs text-secondary"},xt={key:4,class:"text-2xs text-secondary"},yt={class:"text-2xs text-secondary"},kt={key:0,class:"flex justify-end"},ht={class:"flex items-center justify-end gap-1"},bt={key:0,class:"text-2xs tabular-nums text-secondary"},Bt={key:1,class:"inline-block"},_t={class:"flex items-center justify-end gap-1"},Z=e.defineComponent({__name:"InvoiceRowContent",props:{pricingType:{},details:{},taxCategories:{},amountType:{},hideTaxDetails:{type:Boolean},modelType:{},showTaxPerLineItem:{type:Boolean,default:!0},preferConversionCredits:{type:Boolean}},setup(t){const n=t,a=e.computed(()=>{var y;return(y=n.details)==null?void 0:y.included_volume_details}),i=e.computed(()=>{var y;return(y=a.value)==null?void 0:y.available_included_volume}),r=e.computed(()=>rt(n.pricingType,n.details,n.preferConversionCredits)),o=e.computed(()=>ct(n.pricingType,n.details,n.modelType)),{$t:d,formatNumber:l}=C.useIntl(),s=e.computed(()=>d({id:"invoice.line.fixed_amount",defaultMessage:"Fixed amount",description:"Label shown when a price band charges a fixed amount regardless of usage"})),c=e.computed(()=>d({id:"invoice.line.flat_fee",defaultMessage:"Flat fee",description:"Label shown for a flat, usage-independent fee"})),u=e.computed(()=>{var y,E;const k=(E=(y=n.details)==null?void 0:y.band)==null?void 0:E.tier_top_bound;return k&&"number"in k?k.number:void 0}),g=e.computed(()=>{if(u.value!==void 0)return d({id:"invoice.line.per_units_tier_top_bound",defaultMessage:"per {count, plural, one {unit} other {{formattedCount} units}}",description:"Number of units a tiered price band applies per. Singular form omits the count."},{count:+u.value,formattedCount:u.value})}),p=e.computed(()=>{var y,E;return n.modelType==="PER_SEAT"?(E=(y=n.details)==null?void 0:y.band)==null?void 0:E.amount:void 0}),b=e.computed(()=>n.modelType==="PER_SEAT"?d({id:"invoice.line.per_seat",defaultMessage:"Per seat",description:"Label shown when a price band applies per single seat"}):d({id:"invoice.line.per_unit",defaultMessage:"Per unit",description:"Label shown when a price band applies per single unit"})),B=e.computed(()=>{var y,E;const k=(E=(y=n.details)==null?void 0:y.band)==null?void 0:E.block_size;return k&&"number"in k?k.number:void 0}),_=e.computed(()=>{if(B.value!==void 0)return d({id:"invoice.line.per_units_block_size",defaultMessage:"Per {count, plural, one {unit} other {{formattedCount} units}}",description:"Number of units a price band block applies per. Singular form omits the count."},{count:+B.value,formattedCount:l(+B.value)})});return(y,E)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(m,{number:"",class:"align-top"},{default:e.withCtx(()=>{var k;return[r.value.kind==="raw"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(r.value.value),1)],64)):r.value.kind==="amount"?(e.openBlock(),e.createBlock(v._sfc_main,{key:1,value:r.value.amount},null,8,["value"])):r.value.kind==="number"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(e.unref(l)(r.value.value)),1)],64)):r.value.kind==="conversion-credits"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createTextVNode(e.toDisplayString(e.unref(l)(+r.value.value,{maximumFractionDigits:e.unref(q.MAX_FRACTION_DIGITS)})),1)],64)):r.value.kind==="one"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createTextVNode("1")],64)):e.createCommentVNode("",!0),r.value.kind!=="conversion-credits"&&r.value.kind!=="hidden"&&!((k=t.details)!=null&&k.price_bound)&&i.value?(e.openBlock(),e.createElementBlock("div",dt,[i.value.type==="AMOUNT"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(v._sfc_main,{value:i.value.amount},null,8,["value"]),e.createTextVNode(" "+e.toDisplayString(e.unref(d)({id:"invoice.line.included",defaultMessage:"included",description:"Used to specify an included amount. Should be lowercase."})),1)],64)):i.value.type==="NUMBER"?(e.openBlock(),e.createElementBlock("span",st,e.toDisplayString(i.value.number)+" "+e.toDisplayString(e.unref(d)({id:"invoice.line.units_included",defaultMessage:"units included",description:"Used to specify an included units. Should be lowercase."})),1)):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]}),_:1}),o.value.kind==="pass-through"?(e.openBlock(),e.createBlock(m,{key:0,class:"text-right align-top"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)({id:"invoice.line.pass_through",defaultMessage:"Pass through",description:"Name of the pass through pricing type"})),1)]),_:1})):(e.openBlock(),e.createBlock(m,{key:1,number:"",class:"align-top"},{default:e.withCtx(()=>{var k,w,I,S,A;return[o.value.kind==="amount"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(v._sfc_main,{value:o.value.amount},null,8,["value"]),((k=o.value.suffix)==null?void 0:k.kind)==="tier-top-bound"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[g.value?(e.openBlock(),e.createElementBlock("div",ut,e.toDisplayString(g.value),1)):p.value?(e.openBlock(),e.createElementBlock("div",mt,e.toDisplayString(b.value),1)):e.createCommentVNode("",!0)],64)):((w=o.value.suffix)==null?void 0:w.kind)==="block-size-or-per-unit"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[_.value?(e.openBlock(),e.createElementBlock("div",ft,e.toDisplayString(_.value),1)):t.modelType!=="RECURRING"?(e.openBlock(),e.createElementBlock("div",gt,e.toDisplayString(b.value),1)):e.createCommentVNode("",!0)],64)):((I=o.value.suffix)==null?void 0:I.kind)==="per-unit"?(e.openBlock(),e.createElementBlock("div",pt,e.toDisplayString(b.value),1)):((S=o.value.suffix)==null?void 0:S.kind)==="fixed-amount"?(e.openBlock(),e.createElementBlock("div",vt,e.toDisplayString(s.value),1)):((A=o.value.suffix)==null?void 0:A.kind)==="flat-fee"?(e.openBlock(),e.createElementBlock("div",xt,e.toDisplayString(c.value),1)):e.createCommentVNode("",!0)],64)):o.value.kind==="percentage"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(o.value.value)+"% ",1)],64)):e.createCommentVNode("",!0)]}),_:1})),t.showTaxPerLineItem?(e.openBlock(),e.createBlock(m,{key:2,number:"",class:"align-top"},{default:e.withCtx(()=>[t.hideTaxDetails?e.createCommentVNode("",!0):(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.taxCategories,(k,w)=>(e.openBlock(),e.createElementBlock("div",{key:w,class:"tabular-nums"},[e.createElementVNode("div",null,e.toDisplayString(k.percentage)+"%",1),e.createElementVNode("div",yt,[e.createVNode(v._sfc_main,{value:k.tax_amount},null,8,["value"])])]))),128))]),_:1})):e.createCommentVNode("",!0),e.createVNode(m,{number:"",class:"align-top"},{default:e.withCtx(()=>{var k,w,I,S,A;return[(w=(k=t.details)==null?void 0:k.amount)!=null&&w.currency&&((S=(I=t.details)==null?void 0:I.amount)!=null&&S.quantity)?(e.openBlock(),e.createElementBlock("div",kt,[t.showTaxPerLineItem?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.taxCategories,(H,f)=>{var N;return e.openBlock(),e.createElementBlock("div",{key:f,class:"inline-block"},[e.createElementVNode("div",ht,[e.createVNode(v._sfc_main,{value:t.details.amount,"data-testid":e.unref(X)},null,8,["value","data-testid"]),((N=t.details)==null?void 0:N.pricing_amount.quantity)!==t.details.amount.quantity?(e.openBlock(),e.createBlock(P._sfc_main,{key:0,placement:"top-end"},{tooltip:e.withCtx(()=>[e.createVNode(P.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(P._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)({id:"invoice.line.original_currency",defaultMessage:"Original currency",description:"Original currency"}))+" ",1),e.createVNode(v._sfc_main,{value:t.details.pricing_amount,class:"font-semibold"},null,8,["value"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(O._sfc_main$1,{icon:"info",size:"2xs"})]),_:1})):e.createCommentVNode("",!0)]),t.hideTaxDetails?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",bt,[t.amountType==="INCLUDING_TAX"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(e.unref(d)({id:"invoice.line.excl.tax",defaultMessage:"Excl. tax",description:"Value excludes tax"}))+" ",1),e.createVNode(v._sfc_main,{value:H.base_amount},null,8,["value"])],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(e.unref(d)({id:"invoice.line.incl.tax",defaultMessage:"Incl. tax",description:"Value includes tax"}))+" ",1),e.createVNode(v._sfc_main,{value:H.total_amount},null,8,["value"])],64))]))])}),128)):(e.openBlock(),e.createElementBlock("div",Bt,[e.createElementVNode("div",_t,[e.createVNode(v._sfc_main,{value:t.details.amount,"data-testid":e.unref(X)},null,8,["value","data-testid"]),((A=t.details)==null?void 0:A.pricing_amount.quantity)!==t.details.amount.quantity?(e.openBlock(),e.createBlock(P._sfc_main,{key:0,placement:"top-end"},{tooltip:e.withCtx(()=>[e.createVNode(P.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(P._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(d)({id:"invoice.line.original_currency",defaultMessage:"Original currency",description:"Original currency"}))+" ",1),e.createVNode(v._sfc_main,{value:t.details.pricing_amount,class:"font-semibold"},null,8,["value"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(O._sfc_main$1,{icon:"info",size:"2xs"})]),_:1})):e.createCommentVNode("",!0)])])),e.renderSlot(y.$slots,"one-off-line-context-menu")])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode("-")],64))]}),_:3})],64))}}),Nt=["tabindex","onClick"],re=e.defineComponent({__name:"InvoiceLineGroup",props:{group:{},startDate:{},endDate:{},total:{},amountType:{},invoicePeriodOrder:{},processingOnlyCustomers:{},displayInvoiceSubLinesPerProcessingOnlyCustomer:{type:Boolean},showTaxPerLineItem:{type:Boolean,default:!0},isExpandable:{type:Boolean,default:!0}},setup(t){const n=t,a=e.computed(()=>{var s;return(s=[...n.group.lines??[]])==null?void 0:s.sort((c,u)=>c.line_order-u.line_order)}),i=C.useIntl(),{getIsOpen:r,toggle:o}=W.useToggleList(),d=(s,c)=>{o(l(s,c))},l=(s,c)=>`${s}-line-${c}`;return(s,c)=>(e.openBlock(),e.createElementBlock("div",null,[e.createVNode($,null,{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(x,{left:"",class:"w-1/5 text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).$t({id:"invoice.table_header.unit",defaultMessage:"Unit",description:"Table header for the column containing the number of units of invoice groups"})),1)]),_:1}),e.createVNode(x,{right:"",class:"w-1/5 text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).$t({id:"invoice.table_header.quantity",defaultMessage:"Quantity",description:"Table header for quantity column"})),1)]),_:1}),e.createVNode(x,{right:"",class:"w-1/5 text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).$t({id:"invoice.table_header.price",defaultMessage:"Price",description:"Table header for the column containing the number of units of invoice groups"})),1)]),_:1}),t.showTaxPerLineItem?(e.openBlock(),e.createBlock(x,{key:0,right:"",class:"w-1/5 text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).$t({id:"invoice.table_header.tax_rate",defaultMessage:"Tax rate",description:"Table header for the column containing the tax percentage of invoice groups"})),1)]),_:1})):e.createCommentVNode("",!0),e.createVNode(x,{right:"",class:"w-1/5 text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i).$t({id:"invoice.table_header.sub_total",defaultMessage:"Subtotal",description:"Table header for the column containing the subtotal for invoices"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(a.value,(u,g)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:g},[e.createElementVNode("tr",{tabindex:t.isExpandable&&u.sub_lines?0:void 0,class:e.normalizeClass(["group",{"cursor-pointer":t.isExpandable&&u.sub_lines,"border-t":g!==0}]),onClick:p=>d(t.group.group_order,u.line_order)},[(e.openBlock(),e.createBlock(it,{key:g,data:u,"period-order":t.invoicePeriodOrder,"group-order":t.group.group_order,"is-last":g===a.value.length-1,"group-type":t.group.type,"is-expanded":e.unref(r)(l(t.group.group_order,u.line_order))},{"invoice-line-prefix":e.withCtx(p=>[e.renderSlot(s.$slots,"invoice-line-prefix",e.mergeProps({ref_for:!0},p))]),"line-content":e.withCtx(p=>{var b,B;return[e.createVNode(Z,{details:p.details,"pricing-type":u.pricing_type,"tax-categories":u.tax_categories,"amount-type":t.amountType,"model-type":(B=(b=u.product_items)==null?void 0:b[0])==null?void 0:B.model_type,"show-tax-per-line-item":t.showTaxPerLineItem},e.createSlots({_:2},[u.type==="ONE_OFF"?{name:"one-off-line-context-menu",fn:e.withCtx(_=>[e.renderSlot(s.$slots,"one-off-line-context-menu",e.mergeProps({ref_for:!0},_,{lineOrder:u.line_order}))]),key:"0"}:void 0]),1032,["details","pricing-type","tax-categories","amount-type","model-type","show-tax-per-line-item"])]}),_:2},1032,["data","period-order","group-order","is-last","group-type","is-expanded"]))],10,Nt),e.createVNode(Q,{ref_for:!0,ref:l(t.group.group_order,u.line_order),"sub-lines":u.sub_lines??[],"processing-only-customers":t.processingOnlyCustomers,"display-invoice-sub-lines-per-processing-only-customer":t.displayInvoiceSubLinesPerProcessingOnlyCustomer,"line-order":u.line_order,"is-open":e.unref(r)(l(t.group.group_order,u.line_order)),"period-order":t.invoicePeriodOrder,"group-order":t.group.group_order,"show-tax-per-line-item":t.showTaxPerLineItem},{"invoice-line-prefix":e.withCtx(p=>[e.renderSlot(s.$slots,"invoice-line-prefix",e.mergeProps({ref_for:!0},p))]),"subline-content":e.withCtx(p=>{var b,B;return[e.createVNode(Z,{details:p.details,"hide-tax-details":p.hideTaxDetails,"prefer-conversion-credits":"","pricing-type":u.pricing_type,"tax-categories":u.tax_categories,"amount-type":t.amountType,"model-type":(B=(b=u.product_items)==null?void 0:b[0])==null?void 0:B.model_type,"show-tax-per-line-item":t.showTaxPerLineItem},null,8,["details","hide-tax-details","pricing-type","tax-categories","amount-type","model-type","show-tax-per-line-item"])]}),_:2},1032,["sub-lines","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer","line-order","is-open","period-order","group-order","show-tax-per-line-item"])],64))),128))]),_:3})]))}}),Ct={class:"flex items-center"},Tt={key:2,class:"ml-1 inline-flex h-3.5 w-3.5 shrink-0 items-center justify-center rounded-full bg-primary-100 text-2xs font-bold text-primary-600"},j=e.defineComponent({__name:"InvoiceTableRowLabel",props:{label:{},count:{}},setup(t){const n=e.ref(),a=e.ref(!1);return ue.useResizeObserver(n,([i])=>{a.value=i.target.clientWidth<i.target.scrollWidth}),(i,r)=>(e.openBlock(),e.createElementBlock("div",Ct,[a.value?(e.openBlock(),e.createBlock(P._sfc_main,{key:0,placement:"bottom-start",class:"min-w-0 leading-normal"},{tooltip:e.withCtx(()=>[e.createVNode(P.TooltipContent,null,{default:e.withCtx(()=>[e.createVNode(P._sfc_main$1,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.label),1)]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createElementVNode("span",{ref_key:"labelElement",ref:n,class:"block truncate"},e.toDisplayString(t.label),513)]),_:1})):(e.openBlock(),e.createElementBlock("span",{key:1,ref_key:"labelElement",ref:n,class:e.normalizeClass(["block",{truncate:t.count!==void 0}])},e.toDisplayString(t.label),3)),t.count!==void 0?(e.openBlock(),e.createElementBlock("span",Tt,e.toDisplayString(t.count),1)):e.createCommentVNode("",!0)]))}}),Vt=["tabindex"],Et={key:0},wt={colspan:"2",class:"p-0"},Ot={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},It=e.defineComponent({__name:"InvoiceGroupRevenue",props:{forwardedFromCustomers:{},showOriginalCustomerInvoiceLine:{},group:{},expandedItems:{},handleToggleItems:{},formatIndex:{},invoicePeriodOrder:{},groupOrder:{},isExpandable:{type:Boolean},forceExpanded:{type:Boolean},amountType:{},processingOnlyCustomers:{},displayInvoiceSubLinesPerProcessingOnlyCustomer:{type:Boolean},showTaxPerLineItem:{type:Boolean,default:!0}},setup(t){const n=t,a=e.computed(()=>{var i,r,o;const d=[(i=n.group.pricing)==null?void 0:i.name,Y.getComposedString(((r=n.group.products)==null?void 0:r.map(c=>c.name))??[])].filter(Boolean).join(" - "),l=je(n.group,!!n.showOriginalCustomerInvoiceLine);if(!l)return d;const s=(o=n.forwardedFromCustomers)==null?void 0:o.find(c=>c.id===l);return[s&&ae.getCustomerName(s),d].filter(Boolean).join(" - ")});return(i,r)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("tr",{class:e.normalizeClass(["border-t break-inside-avoid",{"cursor-pointer":t.isExpandable}]),tabindex:t.isExpandable?0:void 0,onClick:r[0]||(r[0]=o=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))),onKeyup:[r[1]||(r[1]=e.withKeys(o=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["enter"])),r[2]||(r[2]=e.withKeys(o=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["space"]))]},[e.createVNode(m,{class:"p-0"},{default:e.withCtx(()=>{var o;return[t.isExpandable?(e.openBlock(),e.createBlock(O._sfc_main$1,{key:0,icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!t.expandedItems.includes(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))}])},null,8,["class"])):e.createCommentVNode("",!0),e.createVNode(j,{label:a.value,count:t.isExpandable?((o=t.group.lines)==null?void 0:o.length)??0:void 0},null,8,["label","count"])]}),_:1}),e.createVNode(m,{number:""},{default:e.withCtx(()=>[t.amountType==="INCLUDING_TAX"?(e.openBlock(),e.createBlock(v._sfc_main,{key:0,value:t.group.amount_including_tax,"data-testid":e.unref(R),"data-type":e.unref(z)(t.group)},null,8,["value","data-testid","data-type"])):(e.openBlock(),e.createBlock(v._sfc_main,{key:1,value:t.group.amount_excluding_tax,"data-testid":e.unref(R),"data-type":e.unref(z)(t.group)},null,8,["value","data-testid","data-type"]))]),_:1})],42,Vt),t.forceExpanded||t.expandedItems.includes(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))?(e.openBlock(),e.createElementBlock("tr",Et,[e.createElementVNode("td",wt,[e.createElementVNode("div",Ot,[e.createVNode(re,{"invoice-period-order":t.invoicePeriodOrder,"start-date":t.group.start_at,"end-date":t.group.end_at,total:t.group.amount_excluding_tax,group:t.group,"amount-type":t.amountType,"processing-only-customers":t.processingOnlyCustomers,"display-invoice-sub-lines-per-processing-only-customer":t.displayInvoiceSubLinesPerProcessingOnlyCustomer,"show-tax-per-line-item":t.showTaxPerLineItem,"is-expandable":t.isExpandable},{"invoice-line-prefix":e.withCtx(o=>[e.renderSlot(i.$slots,"invoice-line-prefix",e.normalizeProps(e.guardReactiveProps(o)))]),"one-off-line-context-menu":e.withCtx(o=>[e.renderSlot(i.$slots,"one-off-line-context-menu",e.mergeProps(o,{groupOrder:t.groupOrder}))]),_:3},8,["invoice-period-order","start-date","end-date","total","group","amount-type","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer","show-tax-per-line-item","is-expandable"])])])])):e.createCommentVNode("",!0)],64))}}),ee=e.defineComponent({__name:"InvoiceGroupWalletBalance",props:{lines:{},creditTypes:{}},setup(t){const n=t,{$t:a}=C.useIntl(),i=e.computed(()=>K.getLabelledInvoiceWalletBalanceRows(K.getInvoiceWalletBalanceRows(n.lines),{creditTypes:n.creditTypes,creditsLabel:a({defaultMessage:"Credits",description:"Generic fallback label for a wallet balance row with no known credit type",id:"invoiceGroupWalletBalance.creditsLabel"}),walletLabel:a({defaultMessage:"Wallet balance",description:"Label for a wallet balance row of a wallet that pays in money",id:"invoiceGroupWalletBalance.walletBalanceLabel"})})),r=o=>K.formatInvoiceWalletBalanceValue(o,{formatMoney:q.formatAmount,formatQuantity:d=>d});return(o,d)=>i.value.length?(e.openBlock(),e.createBlock($,{key:0},{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(x,{left:"",class:"w-2/5 text-gray-400"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Wallet breakdown",description:"Table heading for the wallet column in the wallet balance table",id:"invoiceGroupWalletBalance.walletBreakdownHeading"})),1)]),_:1}),e.createVNode(x,{right:"",class:"w-1/5 text-gray-400"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Balance",description:"Table heading for the balance column in the wallet balance table",id:"invoiceGroupWalletBalance.balanceHeading"})),1)]),_:1}),e.createVNode(x,{right:"",class:"w-1/5 text-gray-400"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Used",description:"Table heading for the used-balance column in the wallet balance table",id:"invoiceGroupWalletBalance.usedHeading"})),1)]),_:1}),e.createVNode(x,{right:"",class:"w-1/5 text-gray-400"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a)({defaultMessage:"Remaining",description:"Table heading for the remaining-balance column in the wallet balance table",id:"invoiceGroupWalletBalance.remainingHeading"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(i.value,l=>(e.openBlock(),e.createElementBlock("tr",{key:l.key},[e.createVNode(m,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.label),1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r(l.availableBalance)),1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r(l.usedBalance)),1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r(l.leftBalance)),1)]),_:2},1024)]))),128))]),_:1})):e.createCommentVNode("",!0)}});function te(t){return typeof t=="function"?t():e.unref(t)}typeof WorkerGlobalScope<"u"&&globalThis instanceof WorkerGlobalScope;function St(t=!1,n={}){const{truthyValue:a=!0,falsyValue:i=!1}=n,r=e.isRef(t),o=e.ref(t);function d(l){if(arguments.length)return o.value=l,o.value;{const s=te(a);return o.value=o.value===s?te(i):s,o.value}}return r?d:[o,d]}const $t={key:0,totals:"",class:"border-t break-inside-avoid"},ne=e.defineComponent({__name:"InvoiceSummaryTotalExcludingTax",props:{baseAmount:{}},setup(t){const n=C.useIntl();return(a,i)=>t.baseAmount?(e.openBlock(),e.createElementBlock("tr",$t,[e.createVNode(m,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.total_excluding_taxes",defaultMessage:"Total excluding taxes",description:"Table row header for the total excluding taxes column in the invoice table"})),1)]),_:1}),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:t.baseAmount,"data-testid":e.unref(Be)},null,8,["value","data-testid"])]),_:1})])):e.createCommentVNode("",!0)}}),Mt={key:0,class:"border-t font-bold break-inside-avoid"},oe=e.defineComponent({__name:"InvoiceSummaryTotalIncludingTax",props:{totalAmount:{},isCustomerFacing:{type:Boolean}},setup(t){const n=C.useIntl();return(a,i)=>t.totalAmount?(e.openBlock(),e.createElementBlock("tr",Mt,[e.createVNode(m,{class:"font-bold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.isCustomerFacing?e.unref(n).$t({id:"invoice.table_header.total_including_taxes_customer_facing",defaultMessage:"Total due today",description:"Table row header for the total including taxes column in the invoice table for a customer facing component"}):e.unref(n).$t({id:"invoice.table_header.total_including_taxes",defaultMessage:"Total including taxes",description:"Table row header for the total including taxes column in the invoice table"})),1)]),_:1}),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:t.totalAmount,"data-testid":e.unref(be)},null,8,["value","data-testid"])]),_:1})])):e.createCommentVNode("",!0)}}),Dt={key:0,colspan:"4",class:"p-0"},Pt=e.defineComponent({__name:"InvoiceTaxes",props:{taxCategories:{}},setup(t){const n=C.useIntl();return(a,i)=>(e.openBlock(),e.createBlock($,{class:"table-fixed"},{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(x,{left:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.tax type",defaultMessage:"Tax type",description:"Table header for the column containing the tax type"})),1)]),_:1}),e.createVNode(x,{right:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.base amount",defaultMessage:"Base amount",description:"Table header for the column containing the base amount"})),1)]),_:1}),e.createVNode(x,{right:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.tax_percentage",defaultMessage:"Percentage",description:"Table header for the column containing the tax percentage"})),1)]),_:1}),e.createVNode(x,{right:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(n).$t({id:"invoice.table_header.tax amount",defaultMessage:"Tax amount",description:"Table header for the column containing the tax amount"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.taxCategories,(r,o)=>(e.openBlock(),e.createElementBlock("tr",{key:o},[r.rates?(e.openBlock(),e.createElementBlock("td",Dt,[e.createVNode($,{class:"table-fixed"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(r.rates,(d,l)=>(e.openBlock(),e.createElementBlock("tr",{key:l},[e.createVNode(m,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.name)+" ("+e.toDisplayString(r.category)+") ",1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:r.base_amount},null,8,["value"])]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(d.percentage)+"%",1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:d.tax_amount},null,8,["value"])]),_:2},1024)]))),128))]),_:2},1024)])):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createVNode(m,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.name)+" ("+e.toDisplayString(r.category)+") ",1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:r.base_amount},null,8,["value"])]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.percentage)+"%",1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:r.tax_amount},null,8,["value"])]),_:2},1024)],64))]))),128))]),_:1}))}}),At={class:"flex items-start justify-between"},Lt={key:0,class:"max-h-9"},Ft={class:"flex flex-col gap-2"},Ut={key:0},Rt={key:3},zt={colspan:"2",class:"p-0"},qt=["tabindex"],Wt={key:1},Ht={colspan:"2",class:"p-0"},Gt={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},Xt=["tabindex","onClick","onKeyup"],Kt={key:0},jt={colspan:"2",class:"p-0"},Yt={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},Qt={key:1},Jt={colspan:"2",class:"p-0"},Zt={key:0,class:"break-inside-avoid border-t font-bold"},en=e.defineComponent({__name:"InvoiceSummary",props:{invoice:{},isExpandable:{type:Boolean,default:!1},forceExpanded:{type:Boolean,default:!1},heading:{default:"details"},isInvoiceLineCreatable:{type:Boolean,default:!1},isNoteCreatable:{type:Boolean,default:!1},showRenderedServicesHeader:{type:Boolean,default:!0},isCustomerFacing:{type:Boolean},showTotals:{type:Boolean,default:!0},hideOneOffWalletBalance:{type:Boolean,default:!1},showWalletBalance:{type:Boolean,default:!0}},emits:["add-invoice-line","add-note"],setup(t,{emit:n}){const a=C.useIntl(),{formatMessage:i}=a,r=n,o=t,[d,l]=J(),[s,c]=J(),[u,g]=St(),p=(...f)=>{o.isExpandable&&l(...f)},b=f=>{o.isExpandable&&c(f)},B=()=>{!o.invoice.tax_categories||!o.isExpandable||g()},_=(f,N)=>+`${f}${N}`,y=f=>a.$t({id:"invoice.service_period_heading",defaultMessage:"Service period - {start_at} - {end_at}",description:"Heading for rendered services where {start_at} is replaced for the start date and {end_at} for the end date in invoice summary"},{start_at:a.formatDate({date:f.start_at,format:"date",timezone:C.formatTimezone(o.invoice.customer.timezone),offsetType:"offsetted"}),end_at:a.formatDate({date:f.end_at,format:"date",timezone:C.formatTimezone(o.invoice.customer.timezone),offsetType:"offsetted"})}),E=f=>{switch(f){case"PRICING":case"REVENUE":return a.$t({id:"invoice.table_heading.products",defaultMessage:"Products",description:"Table heading for the column containing the products of the invoice"});case"COMMITMENT":return a.$t({id:"invoice.table_heading.commitments",defaultMessage:"Commitments",description:"Table heading for the column containing the commitments of the invoice"});case"DISCOUNT":return a.$t({id:"invoice.table_heading.discounts",defaultMessage:"Discounts",description:"Table heading for the column containing the discounts of the invoice"});case"MARKUP":return a.$t({id:"invoice.table_heading.markups",defaultMessage:"Markups",description:"Table heading for the column containing the markups of the invoice"});case"ONE_OFF":return a.$t({id:"invoice.table_heading.one_offs",defaultMessage:"One-off's",description:"Table heading for the column containing the one-offs of the invoice"})}},k=f=>{var N,T;return(N=f.products)!=null&&N.length?[(T=f.pricing)==null?void 0:T.name,Y.getComposedString(f.products.map(V=>V.name))].filter(Boolean).join(" - "):f.description??""},w=f=>o.showWalletBalance&&!(o.hideOneOffWalletBalance&&f.type==="ONE_OFF")&&(f.lines??[]).some(N=>{var T,V;return!!((V=(T=N.details)==null?void 0:T.wallet_balances)!=null&&V.length)}),I=f=>f.groups.reduce((N,T)=>T.type in N?{...N,[T.type]:[...N[T.type],T]}:{...N,[T.type]:[T]},{}),S=e.computed(()=>{const f=[];return["ONE_OFF","STANDARD","ONE_OFF_CREDIT"].includes(o.invoice.type)&&["DRAFT","OPEN"].includes(o.invoice.status)&&o.isInvoiceLineCreatable&&f.push({label:i({defaultMessage:"Invoice line",id:"JlhdD2",description:"Label for adding an invoice line"}),onClick:()=>r("add-invoice-line")}),o.isNoteCreatable&&f.push({label:i({defaultMessage:"Note",id:"jB8+k/",description:"Label for adding a note to an invoice"}),onClick:()=>r("add-note")}),f}),A=e.computed(()=>o.invoice.show_tax_per_line_item!==!1),H=e.computed(()=>{if(o.heading==="summary")return a.$t({id:"invoice.summaryTitle",defaultMessage:"Invoice summary",description:"Title for the compact, always-shown invoice summary section"});switch(o.invoice.type){case"CREDIT":return a.$t({id:"invoice.creditDetailsTitle",defaultMessage:"Credit details",description:"Title for the invoice summary of a credit-note invoice"});case"ONE_OFF":return a.$t({id:"invoice.oneOffDetailsTitle",defaultMessage:"One-off details",description:"Title for the invoice summary of a one-off invoice"});case"ONE_OFF_CREDIT":return a.$t({id:"invoice.oneOffCreditDetailsTitle",defaultMessage:"One-off credit details",description:"Title for the invoice summary of a one-off credit-note invoice"});default:return a.$t({id:"invoice.title",defaultMessage:"Details",description:"Title for the invoice summary"})}});return(f,N)=>{var T;return e.openBlock(),e.createElementBlock("div",null,[e.createElementVNode("div",At,[f.$slots.logo?(e.openBlock(),e.createElementBlock("div",Lt,[e.renderSlot(f.$slots,"logo")])):(e.openBlock(),e.createBlock(fe._sfc_main,{key:1,title:H.value,variant:"neutral",icon:"draft","icon-class":"print:hidden","title-class":"print:text-sm"},null,8,["title"])),f.$slots.intro?e.renderSlot(f.$slots,"intro",{},void 0,void 0,2):e.createCommentVNode("",!0),e.createElementVNode("div",Ft,[(T=S.value)!=null&&T.length?(e.openBlock(),e.createBlock(ge._sfc_main$1,{key:0,items:S.value,width:"auto"},{trigger:e.withCtx(()=>[e.createVNode(O._sfc_main,{"icon-prefix":"add",size:"sm",intent:"secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)({defaultMessage:"Add",id:"YnK/yF",description:"Label for adding an item to an invoice"})),1)]),_:1})]),_:1},8,["items"])):e.createCommentVNode("",!0),e.renderSlot(f.$slots,"child-customers-selector")])]),f.$slots.total?e.renderSlot(f.$slots,"total",{},void 0,void 0,0):e.createCommentVNode("",!0),e.renderSlot(f.$slots,"notes"),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.invoice.periods,(V,M)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:M},[t.showRenderedServicesHeader?(e.openBlock(),e.createBlock(me._sfc_main,{key:0,class:"mt-6"},{default:e.withCtx(()=>[e.createVNode(C._sfc_main,{tag:"h2",variant:"caps-heading"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(y(V)),1)]),_:2},1024)]),_:2},1024)):e.createCommentVNode("",!0),V.groups?(e.openBlock(),e.createBlock($,{key:1,class:e.normalizeClass(["text-sm",{"mt-3":t.showRenderedServicesHeader}]),"data-testid":e.unref(ye)},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(Object.entries(I(V)),([h,L],D)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:h},[D>0?(e.openBlock(),e.createElementBlock("tr",Ut,[...N[0]||(N[0]=[e.createElementVNode("td",null,[e.createElementVNode("div",{class:"h-4"})],-1)])])):e.createCommentVNode("",!0),e.createElementVNode("tr",null,[e.createVNode(x,{left:"",class:"text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(E(h)),1)]),_:2},1024),e.createVNode(x,{right:"",class:"w-28 text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a).$t({id:"invoice.amount_table_heading",defaultMessage:"Amount",description:"Table heading for the amount column in the invoice table"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(L,(F,le)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:le},[h==="REVENUE"||h==="PRICING"||h==="ONE_OFF"?(e.openBlock(),e.createBlock(It,{key:0,group:F,"expanded-items":e.unref(d),"handle-toggle-items":p,"is-expandable":t.isExpandable,"force-expanded":t.forceExpanded,"format-index":_,"invoice-period-order":V.period_order,"group-order":F.group_order,"amount-type":t.invoice.pricing_amount_type,"processing-only-customers":t.invoice.processing_only_customers,"display-invoice-sub-lines-per-processing-only-customer":t.invoice.display_invoice_sub_lines_per_processing_only_customer,"show-tax-per-line-item":A.value,"forwarded-from-customers":t.invoice.forwarded_from_customers,"show-original-customer-invoice-line":t.invoice.show_original_customer_invoice_line},{"invoice-line-prefix":e.withCtx(U=>[e.renderSlot(f.$slots,"invoice-line-prefix",e.mergeProps({ref_for:!0},U))]),"one-off-line-context-menu":e.withCtx(U=>[e.renderSlot(f.$slots,"one-off-line-context-menu",e.mergeProps({ref_for:!0},U,{periodOrder:V.period_order}))]),_:2},1032,["group","expanded-items","is-expandable","force-expanded","invoice-period-order","group-order","amount-type","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer","show-tax-per-line-item","forwarded-from-customers","show-original-customer-invoice-line"])):h==="DISCOUNT"||h==="MARKUP"?(e.openBlock(),e.createBlock(Ke,{key:1,group:F,"expanded-items":e.unref(d),"handle-toggle-items":p,"is-expandable":t.isExpandable,"force-expanded":t.forceExpanded,"format-index":_,"invoice-period-order":V.period_order,"group-order":F.group_order,"amount-type":t.invoice.pricing_amount_type,heading:h==="DISCOUNT"?e.unref(a).$t({id:"invoice.discounts_table_heading",defaultMessage:"Discounts",description:"Heading for discounts in the invoice table"}):e.unref(a).$t({id:"invoice.markups_table_heading",defaultMessage:"Markups",description:"Heading for markups in the invoice table"})},{"invoice-line-prefix":e.withCtx(U=>[e.renderSlot(f.$slots,"invoice-line-prefix",e.mergeProps({ref_for:!0},U))]),_:3},8,["group","expanded-items","is-expandable","force-expanded","invoice-period-order","group-order","amount-type","heading"])):h==="COMMITMENT"?(e.openBlock(),e.createBlock(qe,{key:2,group:F,"expanded-items":e.unref(d),"handle-toggle-items":p,"is-expandable":t.isExpandable,"force-expanded":t.forceExpanded,"format-index":_,"invoice-period-order":V.period_order,"group-order":F.group_order,"amount-type":t.invoice.pricing_amount_type},{"invoice-line-prefix":e.withCtx(U=>[e.renderSlot(f.$slots,"invoice-line-prefix",e.mergeProps({ref_for:!0},U))]),_:3},8,["group","expanded-items","is-expandable","force-expanded","invoice-period-order","group-order","amount-type"])):e.createCommentVNode("",!0),w(F)?(e.openBlock(),e.createElementBlock("tr",Rt,[e.createElementVNode("td",zt,[e.createVNode(ee,{lines:F.lines,"credit-types":t.invoice.credit_types},null,8,["lines","credit-types"])])])):e.createCommentVNode("",!0)],64))),128))],64))),128))]),_:2},1032,["class","data-testid"])):e.createCommentVNode("",!0)],64))),128)),t.invoice.tax_summary&&(t.showTotals||(t.forceExpanded||e.unref(u))&&t.invoice.tax_categories)?(e.openBlock(),e.createBlock($,{key:1,class:"mt-6 text-sm print:ml-auto print:w-2/3"},{default:e.withCtx(()=>[t.showTotals?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createElementVNode("tr",null,[e.createVNode(x,{left:"",class:"text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a).$t({id:"invoice.totals_table_heading",defaultMessage:"Totals",description:"Table heading for the totals column in the invoice table"})),1)]),_:1}),e.createVNode(x,{right:"",class:"w-28 text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a).$t({id:"invoice.amount_table_heading",defaultMessage:"Amount",description:"Table heading for the amount column in the invoice table"})),1)]),_:1})]),t.invoice.pricing_amount_type==="INCLUDING_TAX"?(e.openBlock(),e.createBlock(oe,{key:0,"total-amount":t.invoice.tax_summary.total_amount,"is-customer-facing":t.isCustomerFacing},null,8,["total-amount","is-customer-facing"])):(e.openBlock(),e.createBlock(ne,{key:1,"base-amount":t.invoice.tax_summary.base_amount},null,8,["base-amount"])),t.invoice.tax_summary.tax_amount?(e.openBlock(),e.createElementBlock("tr",{key:2,class:e.normalizeClass([{"cursor-pointer":t.invoice.tax_categories&&t.isExpandable},"break-inside-avoid border-t"]),tabindex:t.isExpandable?0:void 0,onClick:B,onKeyup:[e.withKeys(B,["enter"]),e.withKeys(B,["space"])]},[e.createVNode(m,null,{default:e.withCtx(()=>[t.isExpandable&&t.invoice.tax_categories&&t.invoice.tax_categories.length?(e.openBlock(),e.createBlock(O._sfc_main$1,{key:0,icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!e.unref(u)}])},null,8,["class"])):e.createCommentVNode("",!0),e.createVNode(j,{label:e.unref(a).$t({id:"invoice.taxes_table_heading",defaultMessage:"Taxes",description:"Table heading for the taxes column in the invoice table"}),count:t.isExpandable&&t.invoice.tax_categories?t.invoice.tax_categories.length:void 0},null,8,["label","count"])]),_:1}),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:t.invoice.tax_summary.tax_amount,"data-testid":e.unref(he)},null,8,["value","data-testid"])]),_:1})],42,qt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),(t.forceExpanded||e.unref(u))&&t.invoice.tax_categories?(e.openBlock(),e.createElementBlock("tr",Wt,[e.createElementVNode("td",Ht,[e.createElementVNode("div",Gt,[e.createVNode(Pt,{"tax-categories":t.invoice.tax_categories},null,8,["tax-categories"])])])])):e.createCommentVNode("",!0),t.showTotals?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[t.invoice.pricing_amount_type==="INCLUDING_TAX"?(e.openBlock(),e.createBlock(ne,{key:0,"base-amount":t.invoice.tax_summary.base_amount},null,8,["base-amount"])):(e.openBlock(),e.createBlock(oe,{key:1,"total-amount":t.invoice.tax_summary.total_amount},null,8,["total-amount"]))],64)):e.createCommentVNode("",!0)]),_:1})):e.createCommentVNode("",!0),e.unref(ce.isEmpty)(t.invoice.closed_periods)?e.createCommentVNode("",!0):(e.openBlock(),e.createBlock($,{key:2,class:"mt-6 text-sm"},{default:e.withCtx(()=>[e.createElementVNode("tr",null,[e.createVNode(x,{left:"",class:"text-secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a).$t({id:"invoice.already_deducted_table_heading",defaultMessage:"Already deducted",description:"Table heading for the already deducted rows in the invoice table"})),1)]),_:1})]),(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(t.invoice.closed_periods,(V,M)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:M},[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(V.groups,(h,L)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:L},[e.createElementVNode("tr",{class:e.normalizeClass(["break-inside-avoid border-t",{"pt-6":M===0,"cursor-pointer":t.isExpandable}]),tabindex:t.isExpandable?0:void 0,onClick:D=>b(_(M,L)),onKeyup:[e.withKeys(D=>b(_(M,L)),["enter"]),e.withKeys(D=>b(_(M,L)),["space"])]},[e.createVNode(m,{class:"p-0"},{default:e.withCtx(()=>{var D;return[t.isExpandable?(e.openBlock(),e.createBlock(O._sfc_main$1,{key:0,icon:"keyboard_arrow_down",size:"md",class:e.normalizeClass(["absolute -translate-x-7 text-slate-400",{"-rotate-90":!e.unref(s).includes(_(M,L))}])},null,8,["class"])):e.createCommentVNode("",!0),e.createVNode(j,{label:k(h),count:t.isExpandable?((D=h.lines)==null?void 0:D.length)??0:void 0},null,8,["label","count"])]}),_:2},1024),e.createVNode(m,{number:"",class:"w-28"},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:h.amount_excluding_tax,"data-testid":e.unref(_e),"data-type":e.unref(Ce)},null,8,["value","data-testid","data-type"])]),_:2},1024)],42,Xt),t.forceExpanded||e.unref(s).includes(_(M,L))?(e.openBlock(),e.createElementBlock("tr",Kt,[e.createElementVNode("td",jt,[e.createElementVNode("div",Yt,[e.createVNode(re,{"start-date":h.start_at,"end-date":h.end_at,total:h.amount_excluding_tax,group:h,"amount-type":t.invoice.pricing_amount_type,"show-tax-per-line-item":A.value,"processing-only-customers":t.invoice.processing_only_customers,"display-invoice-sub-lines-per-processing-only-customer":t.invoice.display_invoice_sub_lines_per_processing_only_customer},{"one-off-line-context-menu":e.withCtx(D=>[e.renderSlot(f.$slots,"one-off-line-context-menu",e.mergeProps({ref_for:!0},D,{groupOrder:h.group_order,periodOrder:V.period_order}))]),_:2},1032,["start-date","end-date","total","group","amount-type","show-tax-per-line-item","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer"])])])])):e.createCommentVNode("",!0),w(h)?(e.openBlock(),e.createElementBlock("tr",Qt,[e.createElementVNode("td",Jt,[e.createVNode(ee,{lines:h.lines,"credit-types":t.invoice.credit_types},null,8,["lines","credit-types"])])])):e.createCommentVNode("",!0)],64))),128))],64))),128)),t.invoice.open_invoice_amount&&!t.invoice.paid&&t.showTotals?(e.openBlock(),e.createElementBlock("tr",Zt,[e.createVNode(m,{class:"font-bold"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(a).$t({id:"invoice.amount_due_table_heading",defaultMessage:"Amount due",description:"Table heading for the amount due row in the invoice table"})),1)]),_:1}),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(v._sfc_main,{value:t.invoice.open_invoice_amount,"data-testid":e.unref(Ne)},null,8,["value","data-testid"])]),_:1})])):e.createCommentVNode("",!0)]),_:3}))])}}});exports.InvoiceTable=$;exports._sfc_main=en;exports._sfc_main$1=x;exports._sfc_main$2=m;
@@ -1 +0,0 @@
1
- const t=require("vue"),B=require("./FormMessage.vue.es-dqATjC2N.js"),E=require("./customElements-hH6pju3X.js"),$=require("./adyen-Druit6gz.js"),S=e=>{var o;return((o=e.integration.payment_gateway)==null?void 0:o.variant)==="ADYEN"},I=e=>{var o;return((o=e.integration.payment_gateway)==null?void 0:o.variant)==="STRIPE"},v=({selectedIntegration:e,paymentMethodOption:o})=>{var i,s;return e===((s=(i=o.integration)==null?void 0:i.payment_gateway)==null?void 0:s.variant)},w=(e,{excludeExpressPaymentMethods:o=!1}={})=>{var i;return S(e)?$.getAdyenDropInPaymentMethods(e,{excludeExpressPaymentMethods:o}).length>0:I(e)?!!((i=e.integration.payment_gateway.stripe)!=null&&i.public_key):!1},F=(e,o={})=>e.some(i=>w(i,o)),C=t.defineComponent({__name:"PaymentIntegrationForm",props:{customerId:{type:String},variant:{type:String},context:{type:Object},paymentMethodOptions:{type:Array},countryCode:{type:String},invoiceId:{type:String},amount:{type:Object},selectedOption:{type:String},email:{type:String},name:{type:String},validateOnSubmit:{type:Function},forceStorePaymentMethod:{type:Boolean},storePaymentMethod:{type:Boolean,default:void 0},redirectsOnSuccess:{type:Boolean},billingEntityName:{type:String}},emits:["select","payment-failed","payment-success","ready"],setup(e,{expose:o,emit:i}){const s=t.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./PaymentIntegrationFormStripe-DTLgGutU.js")).then(a=>a.default)),b=t.defineAsyncComponent(()=>Promise.resolve().then(()=>require("./PaymentIntegrationFormAdyen-C9KoiqMh.js")).then(a=>a.default)),c=e,P=i;o({submit:h});const{$t:k}=E.useIntl(),d=t.ref(),l=t.computed(()=>{var a,n;return d.value??((n=(a=c.paymentMethodOptions[0])==null?void 0:a.integration.payment_gateway)==null?void 0:n.variant)}),y=t.ref(new Map),u=t.ref(!1),g=({paymentGatewayVariant:a,paymentMethodType:n})=>{u.value=!1,d.value=a,P("select",{paymentGatewayVariant:a,paymentMethodType:n})},f=a=>n=>{var r;return y.value.set((r=a.integration.payment_gateway)==null?void 0:r.variant,n)};function h(){var a,n;l.value||(u.value=!0,(a=c.validateOnSubmit)==null||a.call(c)),(n=y.value.get(l.value))==null||n.submit()}return(a,n)=>(t.openBlock(),t.createElementBlock(t.Fragment,null,[(t.openBlock(!0),t.createElementBlock(t.Fragment,null,t.renderList(e.paymentMethodOptions,r=>(t.openBlock(),t.createElementBlock(t.Fragment,{key:r.integration.id},[t.unref(S)(r)?(t.openBlock(),t.createBlock(t.unref(b),{key:0,ref_for:!0,ref:f(r),context:e.context,"payment-method-option-response-entry":r,"country-code":e.countryCode,"customer-id":e.customerId,variant:e.variant,amount:e.amount,"invoice-id":e.invoiceId,selected:t.unref(v)({selectedIntegration:l.value,paymentMethodOption:r}),"validate-on-submit":e.validateOnSubmit,"force-store-payment-method":e.forceStorePaymentMethod,"store-payment-method":e.storePaymentMethod,"redirects-on-success":e.redirectsOnSuccess,"billing-entity-name":e.billingEntityName,onSelect:g,onPaymentFailed:n[0]||(n[0]=m=>a.$emit("payment-failed",m)),onPaymentSuccess:n[1]||(n[1]=m=>a.$emit("payment-success")),onReady:n[2]||(n[2]=m=>a.$emit("ready"))},null,8,["context","payment-method-option-response-entry","country-code","customer-id","variant","amount","invoice-id","selected","validate-on-submit","force-store-payment-method","store-payment-method","redirects-on-success","billing-entity-name"])):t.unref(I)(r)?(t.openBlock(),t.createBlock(t.unref(s),{key:1,ref_for:!0,ref:f(r),context:e.context,"payment-method-option-response-entry":r,"country-code":e.countryCode,"customer-id":e.customerId,variant:e.variant,amount:e.amount,"invoice-id":e.invoiceId,selected:t.unref(v)({selectedIntegration:l.value,paymentMethodOption:r}),email:e.email,name:e.name,"validate-on-submit":e.validateOnSubmit,"force-store-payment-method":e.forceStorePaymentMethod,"store-payment-method":e.storePaymentMethod,"redirects-on-success":e.redirectsOnSuccess,"billing-entity-name":e.billingEntityName,onSelect:g,onPaymentFailed:n[3]||(n[3]=m=>a.$emit("payment-failed",m)),onPaymentSuccess:n[4]||(n[4]=m=>a.$emit("payment-success")),onReady:n[5]||(n[5]=m=>a.$emit("ready"))},null,8,["context","payment-method-option-response-entry","country-code","customer-id","variant","amount","invoice-id","selected","email","name","validate-on-submit","force-store-payment-method","store-payment-method","redirects-on-success","billing-entity-name"])):t.createCommentVNode("",!0)],64))),128)),u.value?(t.openBlock(),t.createBlock(t.unref(B._sfc_main),{key:0,variant:"error",class:"mt-2"},{default:t.withCtx(()=>[t.createTextVNode(t.toDisplayString(t.unref(k)({defaultMessage:"Select a payment method",id:"payment_integration_form.select_payment_method_error",description:"Error shown when no payment method is selected"})),1)]),_:1})):t.createCommentVNode("",!0)],64))}});exports._sfc_main=C;exports.hasRenderablePaymentIntegration=F;
@@ -1,141 +0,0 @@
1
- import { defineComponent as x, defineAsyncComponent as h, ref as u, computed as A, openBlock as s, createElementBlock as g, Fragment as v, renderList as B, unref as r, createBlock as f, createCommentVNode as $, withCtx as N, createTextVNode as D, toDisplayString as j } from "vue";
2
- import { _ as O } from "./FormMessage.vue.es-jG3fQZms.mjs";
3
- import { u as T } from "./customElements-q_i9y0Ph.mjs";
4
- import { g as L } from "./adyen-CvsH5fok.mjs";
5
- const k = (e) => {
6
- var a;
7
- return ((a = e.integration.payment_gateway) == null ? void 0 : a.variant) === "ADYEN";
8
- }, E = (e) => {
9
- var a;
10
- return ((a = e.integration.payment_gateway) == null ? void 0 : a.variant) === "STRIPE";
11
- }, w = ({
12
- selectedIntegration: e,
13
- paymentMethodOption: a
14
- }) => {
15
- var o, c;
16
- return e === ((c = (o = a.integration) == null ? void 0 : o.payment_gateway) == null ? void 0 : c.variant);
17
- }, M = (e, { excludeExpressPaymentMethods: a = !1 } = {}) => {
18
- var o;
19
- return k(e) ? L(e, { excludeExpressPaymentMethods: a }).length > 0 : E(e) ? !!((o = e.integration.payment_gateway.stripe) != null && o.public_key) : !1;
20
- }, H = (e, a = {}) => e.some(
21
- (o) => M(o, a)
22
- ), J = /* @__PURE__ */ x({
23
- __name: "PaymentIntegrationForm",
24
- props: {
25
- customerId: { type: String },
26
- variant: { type: String },
27
- context: { type: Object },
28
- paymentMethodOptions: { type: Array },
29
- countryCode: { type: String },
30
- invoiceId: { type: String },
31
- amount: { type: Object },
32
- selectedOption: { type: String },
33
- email: { type: String },
34
- name: { type: String },
35
- validateOnSubmit: { type: Function },
36
- forceStorePaymentMethod: { type: Boolean },
37
- storePaymentMethod: { type: Boolean, default: void 0 },
38
- redirectsOnSuccess: { type: Boolean },
39
- billingEntityName: { type: String }
40
- },
41
- emits: ["select", "payment-failed", "payment-success", "ready"],
42
- setup(e, { expose: a, emit: o }) {
43
- const c = h(
44
- () => import("./PaymentIntegrationFormStripe-DIU1rnwH.mjs").then(
45
- (n) => n.default
46
- )
47
- ), C = h(
48
- () => import("./PaymentIntegrationFormAdyen-Cqsy82To.mjs").then(
49
- (n) => n.default
50
- )
51
- ), d = e, F = o;
52
- a({ submit: p });
53
- const { $t: R } = T(), S = u(), l = A(
54
- () => {
55
- var n, t;
56
- return S.value ?? ((t = (n = d.paymentMethodOptions[0]) == null ? void 0 : n.integration.payment_gateway) == null ? void 0 : t.variant);
57
- }
58
- ), I = u(/* @__PURE__ */ new Map()), y = u(!1), b = ({
59
- paymentGatewayVariant: n,
60
- paymentMethodType: t
61
- }) => {
62
- y.value = !1, S.value = n, F("select", { paymentGatewayVariant: n, paymentMethodType: t });
63
- }, P = (n) => (t) => {
64
- var i;
65
- return I.value.set((i = n.integration.payment_gateway) == null ? void 0 : i.variant, t);
66
- };
67
- function p() {
68
- var n, t;
69
- l.value || (y.value = !0, (n = d.validateOnSubmit) == null || n.call(d)), (t = I.value.get(l.value)) == null || t.submit();
70
- }
71
- return (n, t) => (s(), g(v, null, [
72
- (s(!0), g(v, null, B(e.paymentMethodOptions, (i) => (s(), g(v, {
73
- key: i.integration.id
74
- }, [
75
- r(k)(i) ? (s(), f(r(C), {
76
- key: 0,
77
- ref_for: !0,
78
- ref: P(i),
79
- context: e.context,
80
- "payment-method-option-response-entry": i,
81
- "country-code": e.countryCode,
82
- "customer-id": e.customerId,
83
- variant: e.variant,
84
- amount: e.amount,
85
- "invoice-id": e.invoiceId,
86
- selected: r(w)({ selectedIntegration: l.value, paymentMethodOption: i }),
87
- "validate-on-submit": e.validateOnSubmit,
88
- "force-store-payment-method": e.forceStorePaymentMethod,
89
- "store-payment-method": e.storePaymentMethod,
90
- "redirects-on-success": e.redirectsOnSuccess,
91
- "billing-entity-name": e.billingEntityName,
92
- onSelect: b,
93
- onPaymentFailed: t[0] || (t[0] = (m) => n.$emit("payment-failed", m)),
94
- onPaymentSuccess: t[1] || (t[1] = (m) => n.$emit("payment-success")),
95
- onReady: t[2] || (t[2] = (m) => n.$emit("ready"))
96
- }, null, 8, ["context", "payment-method-option-response-entry", "country-code", "customer-id", "variant", "amount", "invoice-id", "selected", "validate-on-submit", "force-store-payment-method", "store-payment-method", "redirects-on-success", "billing-entity-name"])) : r(E)(i) ? (s(), f(r(c), {
97
- key: 1,
98
- ref_for: !0,
99
- ref: P(i),
100
- context: e.context,
101
- "payment-method-option-response-entry": i,
102
- "country-code": e.countryCode,
103
- "customer-id": e.customerId,
104
- variant: e.variant,
105
- amount: e.amount,
106
- "invoice-id": e.invoiceId,
107
- selected: r(w)({ selectedIntegration: l.value, paymentMethodOption: i }),
108
- email: e.email,
109
- name: e.name,
110
- "validate-on-submit": e.validateOnSubmit,
111
- "force-store-payment-method": e.forceStorePaymentMethod,
112
- "store-payment-method": e.storePaymentMethod,
113
- "redirects-on-success": e.redirectsOnSuccess,
114
- "billing-entity-name": e.billingEntityName,
115
- onSelect: b,
116
- onPaymentFailed: t[3] || (t[3] = (m) => n.$emit("payment-failed", m)),
117
- onPaymentSuccess: t[4] || (t[4] = (m) => n.$emit("payment-success")),
118
- onReady: t[5] || (t[5] = (m) => n.$emit("ready"))
119
- }, null, 8, ["context", "payment-method-option-response-entry", "country-code", "customer-id", "variant", "amount", "invoice-id", "selected", "email", "name", "validate-on-submit", "force-store-payment-method", "store-payment-method", "redirects-on-success", "billing-entity-name"])) : $("", !0)
120
- ], 64))), 128)),
121
- y.value ? (s(), f(r(O), {
122
- key: 0,
123
- variant: "error",
124
- class: "mt-2"
125
- }, {
126
- default: N(() => [
127
- D(j(r(R)({
128
- defaultMessage: "Select a payment method",
129
- id: "payment_integration_form.select_payment_method_error",
130
- description: "Error shown when no payment method is selected"
131
- })), 1)
132
- ]),
133
- _: 1
134
- })) : $("", !0)
135
- ], 64));
136
- }
137
- });
138
- export {
139
- J as _,
140
- H as h
141
- };
@@ -1,98 +0,0 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),re=require("./useService-H7BjLg8P.js"),N=require("./customElements-hH6pju3X.js"),F=require("./PaymentErrorCard.vue_vue_type_script_setup_true_lang-nAuhIopc.js"),ie=require("./payments-DBvregE8.js"),U=require("./url-vloPOiXd.js"),de=require("./paymentMethods-CZGP6_4W.js"),p=require("./adyen-Druit6gz.js"),ce=require("./adyenSdk-BP2XXzeJ.js"),se=require("./useExperimentalFeature-D29-TO3R.js"),Y=require("./paymentFailure-Cki8c5BX.js"),ue=".adyen-checkout__payment-method--sepadirectdebit .adyen-checkout__payment-method__details__content";function me(s){return(s==null?void 0:s.querySelector(ue))??null}function pe(s,m){return!!s&&!!m&&!s.contains(m)}const ye=s=>{let m={};return s==="TOKENIZE"&&(m={"en-US":{payButton:"Add payment method",confirmPurchase:"Add payment method"},"fr-FR":{payButton:"Ajouter un moyen de paiement",confirmPurchase:"Ajouter un moyen de paiement"},"de-DE":{payButton:"Zahlungsmethode hinzufügen",confirmPurchase:"Zahlungsmethode hinzufügen"},"it-IT":{payButton:"Aggiungi metodo di pagamento",confirmPurchase:"Aggiungi metodo di pagamento"},"es-ES":{payButton:"Añadir método de pago",confirmPurchase:"Añadir método de pago"},"nl-NL":{payButton:"Betaalmethode toevoegen",confirmPurchase:"Betaalmethode toevoegen"},"pt-BR":{payButton:"Adicionar método de pagamento",confirmPurchase:"Adicionar método de pagamento"},"pt-PT":{payButton:"Adicionar método de pagamento",confirmPurchase:"Adicionar método de pagamento"},"pl-PL":{payButton:"Dodaj metodę płatności",confirmPurchase:"Dodaj metodę płatności"},"ru-RU":{payButton:"Добавить способ оплаты",confirmPurchase:"Добавить способ оплаты"},"sv-SE":{payButton:"Lägg till betalningsmetod",confirmPurchase:"Lägg till betalningsmetod"},"da-DK":{payButton:"Tilføj betalingsmetode",confirmPurchase:"Tilføj betalingsmetode"},"fi-FI":{payButton:"Lisää maksutapa",confirmPurchase:"Lisää maksutapa"},"no-NO":{payButton:"Legg til betalingsmetode",confirmPurchase:"Legg til betalingsmetode"},"cs-CZ":{payButton:"Přidat platební metodu",confirmPurchase:"Přidat platební metodu"},"hu-HU":{payButton:"Fizetési mód hozzáadása",confirmPurchase:"Fizetési mód hozzáadása"},"ro-RO":{payButton:"Adăugați metodă de plată",confirmPurchase:"Adăugați metodă de plată"},"ja-JP":{payButton:"支払い方法を追加",confirmPurchase:"支払い方法を追加"},"ko-KR":{payButton:"결제 수단 추가",confirmPurchase:"결제 수단 추가"},"zh-CN":{payButton:"添加支付方式",confirmPurchase:"添加支付方式"},"zh-TW":{payButton:"新增付款方式",confirmPurchase:"新增付款方式"},ar:{payButton:"إضافة وسيلة دفع",confirmPurchase:"إضافة وسيلة دفع"},"hr-HR":{payButton:"Dodajte način plačanja",confirmPurchase:"Dodajte način plačanja"},"el-GR":{payButton:"Προσθήκη μεθόδου πληρωμής",confirmPurchase:"Προσθήκη μεθόδου πληρωμής"},"sk-SK":{payButton:"Pridať spôsob platby",confirmPurchase:"Pridať spôsob platby"},"sl-SI":{payButton:"Dodajte način plačanja",confirmPurchase:"Dodajte način plačanja"},"bg-BG":{payButton:"Добавяне на начин на плащане",confirmPurchase:"Добавяне на начин на плащане"},"ca-ES":{payButton:"Afegir mètode de pagament",confirmPurchase:"Afegir mètode de pagament"},"et-EE":{payButton:"Lisa makseviis",confirmPurchase:"Lisa makseviis"},"lv-LV":{payButton:"Pievienot maksājuma veidu",confirmPurchase:"Pievienot maksājuma veidu"},"lt-LT":{payButton:"Pridėti mokėjimo metodą",confirmPurchase:"Pridėti mokėjimo metodą"}}),m},le={class:"sv-sepa-mandate mt-3","data-testid":"sepa-mandate-notice"},he=n.defineComponent({__name:"SepaMandateNotice",props:{billingEntityName:{type:String}},setup(s){const m=s,{$t:E}=N.useIntl(),y=n.computed(()=>E({defaultMessage:"SEPA Direct Debit mandate — recurring payments",description:"Title of the SEPA direct debit mandate shown inside the SEPA payment form",id:"payments.sepa_mandate.title"})),b=n.computed(()=>m.billingEntityName?E({defaultMessage:"By confirming this mandate, you authorise {billingEntityName} to instruct your bank to collect payments from your account, and you authorise your bank to carry out those instructions.",description:"SEPA direct debit mandate authorisation, naming the billing entity",id:"payments.sepa_mandate.authorisation"},{billingEntityName:m.billingEntityName}):E({defaultMessage:"By confirming this mandate, you authorise us to instruct your bank to collect payments from your account, and you authorise your bank to carry out those instructions.",description:"SEPA direct debit mandate authorisation, where the billing entity is not known",id:"payments.sepa_mandate.authorisation_unnamed"})),a=n.computed(()=>m.billingEntityName?E({defaultMessage:"This bank account will be used automatically to pay subsequent invoices from {billingEntityName} until you cancel this mandate.",description:"Explains that the SEPA mandate covers later invoices, naming the billing entity",id:"payments.sepa_mandate.recurrence"},{billingEntityName:m.billingEntityName}):E({defaultMessage:"This bank account will be used automatically to pay subsequent invoices until you cancel this mandate.",description:"Explains that the SEPA mandate covers later invoices, where the billing entity is not known",id:"payments.sepa_mandate.recurrence_unnamed"})),g=n.computed(()=>E({defaultMessage:"As part of your rights, you're entitled to a refund from your bank under the terms and conditions of your agreement with your bank. You must claim a refund within 8 weeks from the date your account was debited. You can request a statement from your bank explaining your rights.",description:"SEPA direct debit mandate refund rights, held against the payer's own bank",id:"payments.sepa_mandate.refund_rights"}));return(l,v)=>(n.openBlock(),n.createElementBlock("div",le,[n.createVNode(n.unref(N._sfc_main),{tag:"p",variant:"body-xs",class:"font-semibold"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(y.value),1)]),_:1}),n.createVNode(n.unref(N._sfc_main),{tag:"p",variant:"body-xs",color:"subtle"},{default:n.withCtx(()=>[n.createTextVNode(n.toDisplayString(b.value)+" "+n.toDisplayString(a.value)+" "+n.toDisplayString(g.value),1)]),_:1})]))}}),T="ADYEN",_e=n.defineComponent({__name:"PaymentIntegrationFormAdyen",props:{context:{type:Object},countryCode:{type:String},customerId:{type:String},invoiceId:{type:String},paymentMethodOptionResponseEntry:{type:Object},variant:{type:String},selected:{type:Boolean},amount:{type:Object},validateOnSubmit:{type:Function,default:()=>Promise.resolve(!0)},forceStorePaymentMethod:{type:Boolean},storePaymentMethod:{type:Boolean,default:void 0},redirectsOnSuccess:{type:Boolean},billingEntityName:{type:String}},emits:["select","payment-failed","payment-success","ready"],setup(s,{expose:m,emit:E}){let y=null,b=null;const a=s,g=E;m({submit:V});const l=n.ref(),v=n.ref(null),A=n.ref(null);let h;const O=n.ref(!1),P=n.ref(),i=N.useLogger(),{locale:j}=N.useIntl(),{authorizePayment:Z,getPaymentDetails:z}=ie.createPaymentsService(),{tokenizePaymentMethod:G}=de.createPaymentMethodsService(),k=se.useExperimentalFeature(),M=n.computed(()=>{var e;return p.getAdyenDropInPaymentMethods(a.paymentMethodOptionResponseEntry,{excludeExpressPaymentMethods:!!((e=k==null?void 0:k.value)!=null&&e["express-checkout"])})}),S=n.computed(()=>M.value.length>0);function u(e){return Y.createPaymentFailureContext({gateway:T,paymentAcceptorId:a.paymentMethodOptionResponseEntry.payment_acceptor.id,variant:a.variant,invoiceId:a.invoiceId,customerId:a.customerId,...e})}function f(e){const t=Y.createPaymentFailureError(e);P.value=t,g("payment-failed",t)}function V(){try{y==null||y.submit()}catch(e){i.error("ADYEN_SUBMIT_FAILED","Failed to submit Adyen drop-in",u({reason:"ADYEN_SUBMIT_FAILED",cause:e}),e)}}async function K(){const e=p.toMinorUnitAmount(a.amount),t=M.value;return{checkoutConfig:{amount:e,clientKey:p.getAdyenClientKeyFromPaymentMethodOptionsResponse(a.paymentMethodOptionResponseEntry),environment:p.getAdyenEnvironmentFromPaymentMethodOptionsResponse(a.paymentMethodOptionResponseEntry,i),locale:j,translations:ye(a.variant),countryCode:a.countryCode,analytics:{enabled:!1},paymentMethodsResponse:{paymentMethods:t},onSubmit:J,onAdditionalDetails:X,onPaymentCompleted:ne,onPaymentFailed:te,onError:ae,showPayButton:!1},dropInConfig:{disableFinalAnimation:!0,paymentMethodsConfiguration:{card:{hasHolderName:!0,holderNameRequired:!0,enableStoreDetails:!a.forceStorePaymentMethod&&a.storePaymentMethod===void 0&&a.variant==="AUTHORIZE"},paypal:{intent:e.value>0?"authorize":"tokenize",showPayButton:!0}},openFirstPaymentMethod:a.selected,onSelect:({props:{type:r}})=>{r&&g("select",{paymentMethodType:r,paymentGatewayVariant:"ADYEN"})},onReady:()=>g("ready")}}}function H(){return Promise.all([ce.loadAdyenSdk(),Promise.resolve().then(()=>require("./adyen-BJfC7N6f.js")).then(e=>e.default)])}async function D(){if(await w(),P.value=void 0,!S.value){const{payment_acceptor:e,integration:t}=a.paymentMethodOptionResponseEntry;i.warn("PAYMENT_INTEGRATION_NOT_RENDERABLE","No Adyen payment methods to offer",{fingerprint:["PAYMENT_INTEGRATION_NOT_RENDERABLE",e.id],paymentAcceptorId:e.id,integrationId:t.id,...a.invoiceId?{invoiceId:a.invoiceId}:{}});return}if(await n.nextTick(),!!l.value)try{const[e,t]=await H(),{checkoutConfig:r,dropInConfig:o}=await K();b=await e.AdyenCheckout(r),y=new e.Dropin(b,{...o,paymentMethodComponents:e.dropInPaymentMethodComponents}).mount(l.value),Q(t),q()}catch(e){i.error("PAYMENT_INTEGRATION_INITIALIZATION_FAILED","Failed to mount Adyen web drop-in",u({reason:"ADYEN_DROP_IN_MOUNT_FAILED",cause:e}),e),f({code:"PAYMENT_INTEGRATION_INITIALIZATION_FAILED",message:"Failed to mount Adyen web drop-in",error:e})}}function C(){const e=me(l.value);if(pe(e,v.value)){A.value=null,n.nextTick(()=>A.value=e);return}A.value=e}function q(){h==null||h.disconnect(),l.value&&(h=new MutationObserver(()=>C()),h.observe(l.value,{childList:!0,subtree:!0}),C())}function $(){h==null||h.disconnect(),h=void 0,A.value=null}async function w(){$(),y&&(y.unmount(),y=null),l.value&&(l.value.innerHTML="")}function Q(e){var r;const t=(r=l.value)==null?void 0:r.getRootNode();if(t instanceof ShadowRoot){const o=document.createElement("style");o.textContent=e,t.appendChild(o);const d=document.createElement("style");d.textContent=`
2
- :host {
3
- --adyen-sdk-color-background-secondary: transparent;
4
- --adyen-sdk-color-background-primary: rgb(243 244 246 / 0.5);
5
- --adyen-sdk-color-outline-secondary: #e5e7eb;
6
- --adyen-sdk-color-outline-primary: transparent;
7
- --adyen-sdk-color-background-always-dark: var(--color-primary-500);
8
- --adyen-sdk-color-background-inverse-primary-hover: var(--color-primary-600);
9
- }
10
-
11
- .adyen-checkout__payment-method__image__wrapper {
12
- width: 32px;
13
- height: 32px;
14
- }
15
-
16
- .adyen-checkout__payment-method__image {
17
- height: 32px;
18
- }
19
-
20
- .adyen-checkout__input-wrapper,
21
- .adyen-checkout__input {
22
- border-color: rgb(229, 231, 235);
23
- border-radius: var(--adyen-sdk-border-radius-s, 4px);
24
- }
25
-
26
- .adyen-checkout__button,
27
- .adyen-checkout__payment-method {
28
- border-radius: var(--adyen-sdk-border-radius-s, 4px);
29
- }
30
-
31
- .adyen-checkout__payment-method {
32
- border-color: rgb(229, 231, 235);
33
- box-shadow: 0 1px 2px 0 rgb(0 0 0 / 0.05);
34
- transition: box-shadow 0.2s ease-in-out;
35
- }
36
-
37
- .adyen-checkout__payment-method--selected {
38
- box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
39
- }
40
-
41
- .adyen-checkout__payment-method:after {
42
- transform: scale(0%);
43
- }
44
-
45
- .adyen-checkout__paypal__button {
46
- display: block !important;
47
- }
48
-
49
- .adyen-checkout__payment-methods-list {
50
- gap: 4px;
51
- }
52
-
53
- .adyen-checkout__dropdown__list {
54
- background-color: white;
55
- border-radius: var(--adyen-sdk-border-radius-s, 4px);
56
- }
57
-
58
- .adyen-checkout__payment-method.adyen-checkout__payment-method--selected:after {
59
- content: '✓';
60
- width: 20px;
61
- height: 20px;
62
- border-radius: 10px;
63
- background-color: var(--color-primary-600);
64
- position: absolute;
65
- top: 14px;
66
- right: 14px;
67
- text-align: center;
68
- line-height: 20px;
69
- color: white;
70
- transform: scale(100%);
71
- font-size: 12px;
72
- }
73
-
74
- .adyen-checkout__payment-method__header {
75
- padding: 8px 16px !important;
76
- }
77
-
78
- .adyen-checkout__payment-method__brands {
79
- align-items: center;
80
- }
81
- .adyen-checkout__payment-method__brand-number {
82
- line-height: 1;
83
- }
84
- .adyen-checkout__button__text {
85
- font-size: 14px;
86
- }
87
- .adyen-checkout__store-details {
88
- background: transparent;
89
- padding: 0;
90
- }
91
- .adyen-checkout__checkbox__input + .adyen-checkout__checkbox__label:after {
92
- border-color: rgb(229, 231, 235);
93
- }
94
- `,a.variant==="AUTHORIZE"&&(d.textContent+=`
95
- .adyen-checkout__payment-method--cashapp .adyen-checkout-pm-details-wrapper {
96
- display: none;
97
- }
98
- `),t.appendChild(d)}}function L(e,{paymentMethodType:t,actions:r,logFailure:o}){if(e.status==="ACTION_REQUIRED"&&e.action.payment_gateway_variant===T){const d=W(e,t);if(!d){o(e);return}y.handleAction(d),r.resolve({resultCode:e.action.adyen.result_code,action:d});return}if(e.payment.result==="AUTHORIZED"){O.value=!0,r.resolve({resultCode:"Authorised"});return}o(e),r.resolve({resultCode:"Error"})}function J(...e){const[t,r,o]=e;a.validateOnSubmit().then(d=>{if(!d)return;const c=a.paymentMethodOptionResponseEntry.payment_acceptor.id,B={risk_data:p.transformObjectToAdyenObject(t.data.riskData),payment_method:p.transformObjectToAdyenObject(t.data.paymentMethod),browser_info:p.transformObjectToAdyenObject(t.data.browserInfo)};if(a.variant==="AUTHORIZE"){const R=p.createReturnUrl({paymentAcceptorId:a.paymentMethodOptionResponseEntry.payment_acceptor.id,redirectUrl:window.location.href});Z({payment_acceptor_id:c,...a.customerId?{customer_id:a.customerId}:{},payment_gateway_variant:T,adyen:{...B,store_payment_method:a.storePaymentMethod??(a.forceStorePaymentMethod||t.data.storePaymentMethod)},amount:a.amount,...a.context?{context:a.context}:{},return_url:R}).then(_=>L(_,{paymentMethodType:t.data.paymentMethod.type,actions:o,logFailure:I=>i.error("PAYMENT_AUTHORIZATION_FAILED",`Failed payment authorization for payment acceptor with id ${c}`,u({reason:"PAYMENT_AUTHORIZATION_REJECTED",paymentMethodType:t.data.paymentMethod.type,cause:I}),I)})).catch(_=>{i.error("PAYMENT_AUTHORIZATION_FAILED",`Failed payment authorization for payment acceptor with id ${c}`,u({reason:"PAYMENT_AUTHORIZATION_FAILED",paymentMethodType:t.data.paymentMethod.type,cause:_}),_),o.resolve({resultCode:"Error"})});return}if(a.variant==="TOKENIZE"){const R=p.createReturnUrl({paymentAcceptorId:a.paymentMethodOptionResponseEntry.payment_acceptor.id,redirectUrl:window.location.href});if(!a.customerId){i.error("TOKENIZATION_FAILED",`Missing customer id for payment acceptor with id ${c}`,u({reason:"TOKENIZATION_FAILED_NO_CUSTOMER"})),f({code:"TOKENIZE_FAILED",message:"Missing customer id"});return}G({customer_id:a.customerId,payment_acceptor_id:c,payment_gateway_variant:T,adyen:B,return_url:R}).then(_=>L(_,{paymentMethodType:t.data.paymentMethod.type,actions:o,logFailure:I=>i.error("TOKENIZATION_FAILED",`Tokenization failed for payment acceptor with id ${c}`,u({reason:"TOKENIZATION_REJECTED",paymentMethodType:t.data.paymentMethod.type,cause:I}),I)})).catch(_=>{i.error("TOKENIZATION_FAILED",`Tokenization failed for payment acceptor with id ${c}`,u({reason:"TOKENIZATION_FAILED",paymentMethodType:t.data.paymentMethod.type,cause:_}),_),o.resolve({resultCode:"Error"})})}}).catch(d=>{i.error("INTEGRATION_ERROR","Unhandled error in payment submission flow",u({reason:"ADYEN_SUBMISSION_FLOW_FAILED",cause:d}),d)})}function W(e,t){if(e.status!=="ACTION_REQUIRED")return;const r=e.action;if(r.payment_gateway_variant!="ADYEN")return;const o=r.adyen;return{paymentMethodType:(o==null?void 0:o.payment_method_type)??t,method:r.method,url:r.url,data:r.data,type:o==null?void 0:o.action_type,paymentData:o==null?void 0:o.payment_data,sdkData:o==null?void 0:o.sdk_data}}function X(...e){const[t]=e,r=t.data.details,o=t.data.paymentData;if(a.paymentMethodOptionResponseEntry.payment_acceptor.id){x({detailsResult:r?ee(r):void 0,paymentDataResult:o,paymentAcceptorId:a.paymentMethodOptionResponseEntry.payment_acceptor.id});return}i.error("PAYMENT_ACCEPTOR_MISSING","Additional details arrived without a payment acceptor id",u({reason:"PAYMENT_ACCEPTOR_MISSING"})),f({code:"REDIRECT_RESULT_PAYMENT_ACCEPTOR_MISSING",message:"Payment failed",error:e})}function ee(e){return Object.fromEntries(Object.entries(e).filter(([,t])=>t!=null))}function te(...e){const[t]=e;i.error("ADYEN_PAYMENT_FAILED","Adyen reported the payment as failed",u({reason:"ADYEN_PAYMENT_FAILED",extra:{resultCode:t==null?void 0:t.resultCode}}),t),f({code:"AUTHORIZATION_FAILED",message:"Payment failed",error:t})}function ne(...e){const[,t]=e;t==null||t.unmount(),g("payment-success")}function ae(...e){const[t,r]=e;t.name!=="CANCEL"&&(i.error("INTEGRATION_ERROR","The Adyen drop-in reported an error",u({reason:"ADYEN_INTEGRATION_ERROR",cause:t,extra:{adyenErrorName:t.name}}),t),f({code:"UNKNOWN_ERROR",message:"Something went wrong",error:t}),r==null||r.unmount())}function x({detailsResult:e,threeDSResult:t,redirectResult:r,paymentDataResult:o,paymentAcceptorId:d}){z({paymentAcceptorId:d,paymentGatewayVariant:T,adyen:{...e?{details:e}:{},...r?{redirect_result:r}:{},...t?{threeds_result:t}:{},...o?{payment_data:o}:{}}}).then(c=>{if(c.payment_status==="FAILURE"){i.error("PAYMENT_DETAILS_REJECTED","Payment details returned a failed payment",u({reason:"PAYMENT_DETAILS_REJECTED",paymentAcceptorId:d,extra:{paymentStatus:c.payment_status}})),f({code:"AUTHORIZATION_FAILED",message:"Failed getting payment details",error:c});return}if(c.payment_status==="SUCCESS"){g("payment-success");return}}).catch(c=>{i.error("PAYMENT_DETAILS_CALL_FAILED","Failed fetching payment details",u({reason:"PAYMENT_DETAILS_CALL_FAILED",paymentAcceptorId:d,cause:c}),c),f({code:"PAYMENT_DETAILS_CALL_FAILED",message:"Failed fetching payment details",error:c})})}function oe(){const e=U.getQueryParam(p.REDIRECT_RESULT_QUERY_STRING),t=U.getQueryParam(p.PAYMENT_ACCEPTOR_ID_QUERY_STRING);if(e){if(!t){i.error("INVALID_REDIRECT_RESULT","Redirect result is set but payment acceptor id is missing",u({reason:"INVALID_REDIRECT_RESULT"})),f({code:"REDIRECT_RESULT_PAYMENT_ACCEPTOR_MISSING",message:"Redirect result is set but payment acceptor id is missing"});return}x({paymentAcceptorId:t,detailsResult:{redirectResult:decodeURI(e)}})}}return n.onMounted(()=>{D(),oe()}),n.onBeforeUnmount(()=>{w()}),n.watch(()=>a.paymentMethodOptionResponseEntry,(e,t)=>{re.isEqual(e,t)||D()},{deep:!0}),(e,t)=>(n.openBlock(),n.createElementBlock(n.Fragment,null,[O.value?(n.openBlock(),n.createBlock(F._sfc_main,{key:0,variant:s.variant,redirecting:s.redirectsOnSuccess},null,8,["variant","redirecting"])):P.value?(n.openBlock(),n.createBlock(F._sfc_main$1,{key:1,error:P.value},null,8,["error"])):n.createCommentVNode("",!0),S.value?(n.openBlock(),n.createElementBlock("div",{key:2,ref_key:"dropInContainerRef",ref:l},null,512)):n.createCommentVNode("",!0),A.value?(n.openBlock(),n.createBlock(n.Teleport,{key:3,to:A.value},[n.createElementVNode("div",{ref_key:"sepaNoticeRef",ref:v},[n.createVNode(he,{"billing-entity-name":s.billingEntityName},null,8,["billing-entity-name"])],512)],8,["to"])):n.createCommentVNode("",!0)],64))}});exports.default=_e;
@@ -1,102 +0,0 @@
1
- Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("vue"),K=require("./useService-H7BjLg8P.js"),O=require("./adyen-Druit6gz.js"),P=require("./PaymentErrorCard.vue_vue_type_script_setup_true_lang-nAuhIopc.js"),j=require("./payments-DBvregE8.js"),H=require("./paymentMethods-CZGP6_4W.js"),v=require("./url-vloPOiXd.js"),z=require("./customElements-hH6pju3X.js"),N=require("./paymentFailure-Cki8c5BX.js"),D="https://js.stripe.com/dahlia/stripe.js",q=`<!DOCTYPE html>
2
- <html>
3
- <head>
4
- <meta charset="UTF-8">
5
- <meta name="viewport" content="width=device-width, initial-scale=1">
6
- <style>
7
- * { box-sizing: border-box; margin: 0; padding: 0; }
8
- body { overflow: hidden; }
9
- </style>
10
- </head>
11
- <body>
12
- <div id="stripe-root"></div>
13
- <script src="${D}"><\/script>
14
- <script>
15
- (function () {
16
- let stripe, elements, countryCode, email, name, parentOrigin;
17
-
18
- window.addEventListener('message', function (event) {
19
- if (!event.data || typeof event.data !== 'object') return;
20
- if (event.source !== window.parent) return;
21
-
22
- if (event.data.type === 'stripe:init') {
23
- parentOrigin = event.origin;
24
- countryCode = event.data.countryCode;
25
- email = event.data.email;
26
- name = event.data.name;
27
- stripe = Stripe(event.data.publicKey);
28
- elements = stripe.elements(event.data.options);
29
- const paymentElement = elements.create('payment', { layout: { type: 'accordion', defaultCollapsed: false }, wallets: event.data.options.wallets, fields: event.data.options.fields });
30
-
31
- paymentElement.on('ready', function () {
32
- parent.postMessage({ type: 'stripe:ready' }, parentOrigin);
33
- });
34
-
35
- paymentElement.on('change', function (e) {
36
- parent.postMessage({ type: 'stripe:change', paymentMethodType: e.value.type }, parentOrigin);
37
- });
38
-
39
- paymentElement.on('loaderror', function (e) {
40
- parent.postMessage({
41
- type: 'stripe:loaderror',
42
- error: { message: e.error.message, type: e.error.type }
43
- }, parentOrigin);
44
- });
45
-
46
- paymentElement.mount('#stripe-root');
47
-
48
- new ResizeObserver(function () {
49
- parent.postMessage({
50
- type: 'stripe:resize',
51
- height: document.documentElement.scrollHeight
52
- }, parentOrigin);
53
- }).observe(document.documentElement);
54
- }
55
-
56
- if (event.data.type === 'stripe:submit') {
57
- if (!elements || !parentOrigin || event.origin !== parentOrigin) return;
58
- const submitEmail = 'email' in event.data ? event.data.email : email;
59
- const submitName = 'name' in event.data ? event.data.name : name;
60
- elements.submit().then(function (submitResult) {
61
- if (submitResult.error) {
62
- parent.postMessage({
63
- type: 'stripe:submit:error',
64
- error: {
65
- message: submitResult.error.message,
66
- type: submitResult.error.type,
67
- code: submitResult.error.code
68
- }
69
- }, parentOrigin);
70
- return;
71
- }
72
- const billingDetails = {};
73
- if (countryCode) billingDetails.address = { country: countryCode };
74
- if (submitEmail) billingDetails.email = submitEmail;
75
- if (submitName) billingDetails.name = submitName;
76
- const tokenParams = Object.keys(billingDetails).length
77
- ? { payment_method_data: { billing_details: billingDetails } }
78
- : {};
79
- stripe.createConfirmationToken({ elements: elements, params: tokenParams }).then(function (tokenResult) {
80
- if (tokenResult.error) {
81
- parent.postMessage({
82
- type: 'stripe:submit:error',
83
- error: {
84
- message: tokenResult.error.message,
85
- type: tokenResult.error.type,
86
- code: tokenResult.error.code
87
- }
88
- }, parentOrigin);
89
- return;
90
- }
91
- parent.postMessage({
92
- type: 'stripe:submit:success',
93
- confirmationTokenId: tokenResult.confirmationToken.id
94
- }, parentOrigin);
95
- });
96
- });
97
- }
98
- });
99
- })();
100
- <\/script>
101
- </body>
102
- </html>`,Y=["src","height"],G=n.defineComponent({__name:"PaymentIntegrationFormStripeFrame",props:{publicKey:{type:String},options:{type:Object},countryCode:{type:String},email:{type:String},name:{type:String}},emits:["ready","change","loaderror","submit-success","submit-error"],setup(m,{expose:I,emit:A}){const t=m,u=A;I({triggerSubmit:b});const d=n.ref(),l=n.ref(0),_=n.ref();function S(){var s,o;(o=(s=d.value)==null?void 0:s.contentWindow)==null||o.postMessage({type:"stripe:init",publicKey:t.publicKey,options:t.options,countryCode:t.countryCode,email:t.email,name:t.name},"*")}function b(){var s,o;(o=(s=d.value)==null?void 0:s.contentWindow)==null||o.postMessage({type:"stripe:submit",email:t.email,name:t.name},"*")}function f(s){return typeof s=="object"&&s!==null}function p(s){if(!d.value||s.source!==d.value.contentWindow||!f(s.data))return;const o=s.data,g=o.type;if(!(typeof g!="string"||!g.startsWith("stripe:")))switch(g){case"stripe:ready":u("ready");break;case"stripe:change":u("change",typeof o.paymentMethodType=="string"?o.paymentMethodType:"card");break;case"stripe:loaderror":{const a=f(o.error)?o.error:{};u("loaderror",{message:typeof a.message=="string"?a.message:void 0,type:typeof a.type=="string"?a.type:void 0});break}case"stripe:resize":typeof o.height=="number"&&(l.value=o.height);break;case"stripe:submit:success":typeof o.confirmationTokenId=="string"&&u("submit-success",o.confirmationTokenId);break;case"stripe:submit:error":{const a=f(o.error)?o.error:{};u("submit-error",{message:typeof a.message=="string"?a.message:void 0,type:typeof a.type=="string"?a.type:void 0,code:typeof a.code=="string"?a.code:void 0});break}}}return n.onMounted(()=>{const s=new Blob([q],{type:"text/html"});_.value=URL.createObjectURL(s),window.addEventListener("message",p)}),n.onBeforeUnmount(()=>{window.removeEventListener("message",p),_.value&&URL.revokeObjectURL(_.value)}),n.watch(()=>t.options,(s,o)=>{K.isEqual(s,o)||S()},{deep:!0}),(s,o)=>(n.openBlock(),n.createElementBlock("iframe",{ref_key:"iframeRef",ref:d,src:_.value,height:l.value||void 0,frameborder:"0",style:{width:"100%",display:"block",border:"none"},title:"Payment form",onLoad:S},null,40,Y))}}),w={link:"never"},C={variables:{borderRadius:"4px",colorBackground:"rgba(243, 244, 246, 0.5)"},rules:{".TermsText":{fontSize:"14px"},".Input":{backgroundColor:"rgba(243, 244, 246, 0.5)",fontSize:"14px",borderColor:"rgb(229, 231, 235)"}}};function Q(m,I){return{billingDetails:{address:{country:"never"},...m?{email:"never"}:{},...I?{name:"never"}:{}}}}function W({amount:m,email:I,name:A,variant:t,storePaymentMethod:u=!1}){const d=m.currency.toLowerCase(),l=Q(I,A);return t==="TOKENIZE"?{mode:"setup",currency:d,setup_future_usage:"off_session",wallets:w,fields:l,appearance:C}:{mode:"payment",currency:d,amount:O.toMinorUnitAmount(m).value,...u?{setup_future_usage:"off_session"}:{},wallets:w,fields:l,appearance:C}}const R="STRIPE",$=n.defineComponent({__name:"PaymentIntegrationFormStripe",props:{email:{type:String},name:{type:String},countryCode:{type:String},customerId:{type:String},invoiceId:{type:String},paymentMethodOptionResponseEntry:{type:Object},variant:{type:String},selected:{type:Boolean},amount:{type:Object},validateOnSubmit:{type:Function,default:()=>Promise.resolve(!0)},context:{type:Object},forceStorePaymentMethod:{type:Boolean},storePaymentMethod:{type:Boolean},redirectsOnSuccess:{type:Boolean},billingEntityName:{type:String}},emits:["select","payment-failed","payment-success","ready"],setup(m,{expose:I,emit:A}){const t=m,u=A;I({submit:M});const d=n.ref(!1),l=n.ref(),_=n.ref(),S=n.computed(()=>t.storePaymentMethod??t.forceStorePaymentMethod??!1),b=n.computed(()=>W({amount:t.amount,email:t.email,name:t.name,variant:t.variant,storePaymentMethod:S.value})),f=n.ref(null),p=z.useLogger(),{authorizePayment:s}=j.createPaymentsService(),{tokenizePaymentMethod:o}=H.createPaymentMethodsService(),g=n.computed(()=>{var e,r;return(r=(e=t.paymentMethodOptionResponseEntry.integration.payment_gateway)==null?void 0:e.stripe)==null?void 0:r.public_key});function a(e){return N.createPaymentFailureContext({gateway:R,paymentAcceptorId:t.paymentMethodOptionResponseEntry.payment_acceptor.id,variant:t.variant,invoiceId:t.invoiceId,customerId:t.customerId,...e})}function M(){L().catch(e=>{p.error("STRIPE_SUBMIT_FAILED","Unexpected error during Stripe submission",a({reason:"STRIPE_SUBMIT_FAILED",cause:e}),e)})}async function L(){var r;await t.validateOnSubmit()&&((r=_.value)==null||r.triggerSubmit())}function F(e){return new Promise((r,c)=>{if(window.Stripe){r(window.Stripe(e));return}const i=document.createElement("script");i.src=D,i.onload=()=>{if(!window.Stripe){c(new Error("Stripe not available after script load"));return}r(window.Stripe(e))},i.onerror=()=>c(new Error("Failed to load Stripe.js")),document.head.appendChild(i)})}async function k(){if(f.value)return f.value;const e=g.value;if(!e)throw new Error("Missing Stripe public key");const r=await F(e);return f.value=r,r}async function U(e){const r=t.paymentMethodOptionResponseEntry.payment_acceptor.id,c=O.createReturnUrl({paymentAcceptorId:r,redirectUrl:window.location.href});if(t.variant==="AUTHORIZE"){try{const i=await s({payment_acceptor_id:r,...t.customerId?{customer_id:t.customerId}:{},payment_gateway_variant:R,stripe:{confirmation_token_id:e},amount:t.amount,...t.context&&t.context.type!=="CHARGE_ON_DEMAND"?{context:t.context}:{},return_url:c});await h(i)}catch(i){p.error("PAYMENT_AUTHORIZATION_FAILED",`Failed payment authorization for payment acceptor with id ${r}`,a({reason:"PAYMENT_AUTHORIZATION_FAILED",cause:i}),i),y({code:"AUTHORIZATION_FAILED",message:"Payment authorization failed",error:i})}return}if(t.variant==="TOKENIZE"){if(!t.customerId){p.error("TOKENIZATION_FAILED",`Missing customer id for payment acceptor with id ${r}`,a({reason:"TOKENIZATION_FAILED_NO_CUSTOMER"})),y({code:"TOKENIZE_FAILED",message:"Missing customer id"});return}try{const i=await o({customer_id:t.customerId,payment_acceptor_id:r,payment_gateway_variant:R,stripe:{confirmation_token_id:e},return_url:c});await h(i)}catch(i){p.error("TOKENIZATION_FAILED",`Tokenization failed for payment acceptor with id ${r}`,a({reason:"TOKENIZATION_FAILED",cause:i}),i),y({code:"TOKENIZE_FAILED",message:"Tokenization failed",error:i})}}}async function h(e){var r;if(e.status==="ACTION_REQUIRED"&&e.action.payment_gateway_variant===R){const c=e.action.client_secret||((r=e.action.data)==null?void 0:r.client_secret);if(!c){p.error("STRIPE_ACTION_FAILED","Missing client_secret in Stripe ACTION_REQUIRED response",a({reason:"STRIPE_ACTION_MISSING_CLIENT_SECRET",extra:{paymentStatus:e.status}})),y({code:"AUTHORIZATION_FAILED",message:"Payment action failed",error:e});return}let i;try{i=await k()}catch(T){p.error("STRIPE_ACTION_FAILED","Failed to load Stripe.js",a({reason:"STRIPE_SDK_LOAD_FAILED",cause:T}),T),y({code:"AUTHORIZATION_FAILED",message:"Payment action failed",error:T});return}const{error:E}=await i.handleNextAction({clientSecret:c});if(E){p.error("STRIPE_ACTION_FAILED","Stripe handleNextAction failed",a({reason:"STRIPE_NEXT_ACTION_FAILED",cause:E,extra:{stripeErrorCode:E.code,stripeErrorType:E.type}}),E),y({code:"AUTHORIZATION_FAILED",message:"Payment action failed",error:E});return}d.value=!0,u("payment-success");return}if(e.status==="SUCCESS"){d.value=!0,u("payment-success");return}p.error("STRIPE_ACTION_FAILED","Unexpected payment result status",a({reason:"STRIPE_UNEXPECTED_PAYMENT_STATUS",extra:{paymentStatus:e.status}})),y({code:"AUTHORIZATION_FAILED",message:"Payment failed",error:e})}async function x(){const e=t.paymentMethodOptionResponseEntry.payment_acceptor.id;if(v.getQueryParam(O.PAYMENT_ACCEPTOR_ID_QUERY_STRING)!==e)return;const c=v.getQueryParam("redirect_status"),i=v.getQueryParam("payment_intent_client_secret"),E=v.getQueryParam("setup_intent_client_secret");if(!c||!i&&!E)return;if(c==="succeeded"){d.value=!0,u("payment-success");return}const T=new globalThis.Error(`Stripe redirect returned status: ${c}`);p.error("STRIPE_REDIRECT_RETURN_FAILED","Stripe redirect returned non-succeeded status",a({reason:"STRIPE_REDIRECT_RETURN_FAILED",extra:{redirectStatus:c}}),T),y({code:"AUTHORIZATION_FAILED",message:"Payment failed",error:T})}function Z(){u("select",{paymentMethodType:"card",paymentGatewayVariant:R}),u("ready")}function B(e){p.error("PAYMENT_INTEGRATION_INITIALIZATION_FAILED","Failed to load the Stripe payment form",a({reason:"STRIPE_FORM_LOAD_FAILED",cause:e,extra:{stripeErrorType:e.type}}),e),y({code:"PAYMENT_INTEGRATION_INITIALIZATION_FAILED",message:e.message??"Failed to load payment form",error:e})}function y(e){const r=N.createPaymentFailureError(e);l.value=r,u("payment-failed",r)}return n.onMounted(()=>{x().catch(e=>{p.error("STRIPE_REDIRECT_RETURN_FAILED","handleRedirectReturn threw unexpectedly",a({reason:"STRIPE_REDIRECT_RETURN_THREW",cause:e}),e)})}),n.onBeforeUnmount(()=>{f.value=null}),(e,r)=>d.value?(n.openBlock(),n.createBlock(P._sfc_main,{key:0,variant:m.variant,redirecting:m.redirectsOnSuccess},null,8,["variant","redirecting"])):l.value?(n.openBlock(),n.createBlock(P._sfc_main$1,{key:1,error:l.value},null,8,["error"])):g.value?(n.openBlock(),n.createBlock(G,{key:2,ref_key:"frameRef",ref:_,"public-key":g.value,options:b.value,"country-code":m.countryCode,email:m.email,name:m.name,onReady:Z,onChange:r[0]||(r[0]=c=>u("select",{paymentMethodType:c,paymentGatewayVariant:R})),onLoaderror:B,onSubmitSuccess:U,onSubmitError:r[1]||(r[1]=c=>n.unref(p).error("STRIPE_CONFIRMATION_TOKEN_FAILED","Stripe submission failed",a({reason:"STRIPE_CONFIRMATION_TOKEN_FAILED",cause:c}),c))},null,8,["public-key","options","country-code","email","name"])):n.createCommentVNode("",!0)}});exports.default=$;