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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (215) hide show
  1. package/README.md +12 -10
  2. package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DwbIiJBY.js → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-081H9T3X.js} +1 -1
  3. package/dist/{AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DcrLNA_x.mjs → AddPaymentMethodPane.vue_vue_type_script_setup_true_lang-DNepCMRp.mjs} +6 -6
  4. package/dist/{Avatar.vue.es-Bm6MCMAL.js → Avatar.vue.es-BJxSCU76.js} +1 -1
  5. package/dist/{Avatar.vue.es-BqQHvLGA.mjs → Avatar.vue.es-sfMZiX7A.mjs} +1 -1
  6. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-BV5iEOxn.js +1 -0
  7. package/dist/{BillingInformation.vue_vue_type_script_setup_true_lang-BFza7Nf9.mjs → BillingInformation.vue_vue_type_script_setup_true_lang-DmY3a-Wi.mjs} +14 -15
  8. package/dist/{Button.vue.es-qGvnOKnK.js → Button.vue.es-BzkuglKw.js} +1 -1
  9. package/dist/{Button.vue.es-C32_baQN.mjs → Button.vue.es-Cmjfm4jw.mjs} +1 -1
  10. package/dist/{ChargeOnDemandModal-CIiI74ls.mjs → ChargeOnDemandModal-CB4mrvkU.mjs} +145 -153
  11. package/dist/{ChargeOnDemandModal-DIQaGnRs.js → ChargeOnDemandModal-b17YswWA.js} +1 -1
  12. package/dist/Checkout.entry.ce-HlUrJ1kh.js +2 -0
  13. package/dist/Checkout.entry.ce-X2zGo6hG.mjs +4381 -0
  14. package/dist/{Chip.vue.es-D60gTbfe.js → Chip.vue.es-B2jjzIOc.js} +1 -1
  15. package/dist/{Chip.vue.es-CKCOY5T6.mjs → Chip.vue.es-DksjbJO8.mjs} +2 -2
  16. package/dist/{ContextMenu.vue.es-C7KI8Gz6.js → ContextMenu.vue.es-DUU43tCy.js} +1 -1
  17. package/dist/{ContextMenu.vue.es-Da-lAmTl.mjs → ContextMenu.vue.es-zRvoEJlV.mjs} +4 -4
  18. package/dist/{CustomerBillingInformation.vue.es-bFUx81Ig.js → CustomerBillingInformation.vue.es-BfPEB42w.js} +1 -1
  19. package/dist/{CustomerBillingInformation.vue.es-BxBQt4Q0.mjs → CustomerBillingInformation.vue.es-DhFbpZPK.mjs} +2 -2
  20. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BcTZgshS.mjs → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-B41la-T7.mjs} +14 -15
  21. package/dist/{CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-C0lJ_ESU.js → CustomerPaymentMethods.vue_vue_type_script_setup_true_lang-BISD6n8X.js} +1 -1
  22. package/dist/{CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DkbQ2MiR.mjs → CustomerWalletBalances.vue_vue_type_script_setup_true_lang-DssxYPSA.mjs} +110 -123
  23. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-XufY6bdV.js +1 -0
  24. package/dist/{DividerText.vue.es-BF3gnr4e.js → DividerText.vue.es-CoyDk9eH.js} +1 -1
  25. package/dist/{DividerText.vue.es-DKl3FnDJ.mjs → DividerText.vue.es-nAo1eRMV.mjs} +1 -1
  26. package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-cSQeqr0A.js → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-CQ0KrXHJ.js} +1 -1
  27. package/dist/{EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-C3QYra1x.mjs → EmptyStatePlaceholder.vue_vue_type_script_setup_true_lang-QW9NdxyZ.mjs} +4 -4
  28. package/dist/{ErrorNotification.vue.es-rRKgmkzV.mjs → ErrorNotification.vue.es-h-D37rfG.mjs} +1 -1
  29. package/dist/{ErrorNotification.vue.es-BX9dHEc-.js → ErrorNotification.vue.es-tS9vySUZ.js} +1 -1
  30. package/dist/{IconButton.vue.es-Bwdfu-jm.js → IconButton.vue.es-DgQN18Am.js} +1 -1
  31. package/dist/{IconButton.vue.es-UlqwNPAX.mjs → IconButton.vue.es-DvfErUOq.mjs} +2 -2
  32. package/dist/{IconTitle.vue.es-CK9k69tV.mjs → IconTitle.vue.es-B_8bS0tn.mjs} +3 -3
  33. package/dist/{IconTitle.vue.es-Cei98MBw.js → IconTitle.vue.es-Dn2xcPHj.js} +1 -1
  34. package/dist/{Input.vue.es-B47l_feL.js → Input.vue.es-B60eK8Ds.js} +1 -1
  35. package/dist/{Input.vue.es-D9IjIWc-.mjs → Input.vue.es-CU9u5yKH.mjs} +2 -2
  36. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DKlPrxQS.js → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-Dqdezse7.js} +1 -1
  37. package/dist/{InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-DUfJl07Y.mjs → InvoiceDetailsBlock.vue_vue_type_script_setup_true_lang-gpMtYNzn.mjs} +2 -2
  38. package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-DlJ6lELc.js → InvoiceEntryView.vue_vue_type_script_setup_true_lang-Cl6HU243.js} +1 -1
  39. package/dist/{InvoiceEntryView.vue_vue_type_script_setup_true_lang-D9Rtgapa.mjs → InvoiceEntryView.vue_vue_type_script_setup_true_lang-DNqawlYV.mjs} +2 -2
  40. package/dist/{InvoiceSummary.vue.es-DBnR9Hs7.js → InvoiceSummary.vue.es-CAmA8g0t.js} +1 -1
  41. package/dist/{InvoiceSummary.vue.es-DQ4KvTaw.mjs → InvoiceSummary.vue.es-CRiFJ5x-.mjs} +7 -7
  42. package/dist/{Modal.vue.es-B9xMiyn3.mjs → Modal.vue.es-BeI5C9-9.mjs} +5 -5
  43. package/dist/{Modal.vue.es-8LN4gBh0.js → Modal.vue.es-DvLB3uCG.js} +1 -1
  44. package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-B1yGKkWN.js → PaymentErrorCard.vue_vue_type_script_setup_true_lang-Dg4rn1cm.js} +1 -1
  45. package/dist/{PaymentErrorCard.vue_vue_type_script_setup_true_lang-BVzL2PGe.mjs → PaymentErrorCard.vue_vue_type_script_setup_true_lang-DqHcOnZp.mjs} +5 -6
  46. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DSGf6uFP.js → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-B9R5JRJv.js} +1 -1
  47. package/dist/{PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-nLTPnH4j.mjs → PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DlqoWKQq.mjs} +3 -3
  48. package/dist/{PaymentHistoryBlock-Ds93gNvh.js → PaymentHistoryBlock-Uw8xeKUk.js} +1 -1
  49. package/dist/{PaymentHistoryBlock-DYa99P1M.mjs → PaymentHistoryBlock-mCqdFjnL.mjs} +1 -1
  50. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-CBZhXQfC.js → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-ALI5f0py.js} +1 -1
  51. package/dist/{PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-D0KnSy0y.mjs → PaymentHistoryBlock.vue_vue_type_script_setup_true_lang-DxaY3eFN.mjs} +4 -4
  52. package/dist/{PaymentIntegrationForm-B_Db4DG1.js → PaymentIntegrationForm-Cx0zCf_C.js} +1 -1
  53. package/dist/{PaymentIntegrationForm-UWoyZgsR.mjs → PaymentIntegrationForm-DVx4DEtD.mjs} +1 -1
  54. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-B-viSd_i.js +1 -0
  55. package/dist/{PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-J15IDbMc.mjs → PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-CCKCXXZX.mjs} +4 -4
  56. package/dist/PaymentIntegrationFormAdyen-B-v-4nlj.js +98 -0
  57. package/dist/{PaymentIntegrationFormAdyen-D4qfNtZ_.mjs → PaymentIntegrationFormAdyen-Yr8p5Fly.mjs} +16 -20
  58. package/dist/{PaymentIntegrationFormStripe-DUCJTIAq.js → PaymentIntegrationFormStripe-CoLmAzas.js} +3 -3
  59. package/dist/{PaymentIntegrationFormStripe-BIiMCWlV.mjs → PaymentIntegrationFormStripe-Ds0BXt89.mjs} +5 -5
  60. package/dist/{PaymentMethod.vue.es-CKu5nApX.mjs → PaymentMethod.vue.es-4YRmQZHX.mjs} +3 -3
  61. package/dist/{PaymentMethod.vue.es-CJcSZ9lN.js → PaymentMethod.vue.es-D0D9jW8s.js} +1 -1
  62. package/dist/{PaymentMethodForm-1d0YIGOu.js → PaymentMethodForm-CMP5FLRO.js} +1 -1
  63. package/dist/{PaymentMethodForm-B05sHWcW.mjs → PaymentMethodForm-Dnj_7mJU.mjs} +1 -1
  64. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-D1yIYsb_.mjs → PaymentMethodForm.vue_vue_type_script_setup_true_lang-DsD3UjkC.mjs} +33 -35
  65. package/dist/{PaymentMethodForm.vue_vue_type_script_setup_true_lang-BDm8l_6N.js → PaymentMethodForm.vue_vue_type_script_setup_true_lang-nxnGyJmE.js} +1 -1
  66. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-BE4S26JX.js → PaymentMethodsList.vue_vue_type_script_setup_true_lang-CIrrQUS6.js} +1 -1
  67. package/dist/{PaymentMethodsList.vue_vue_type_script_setup_true_lang-DGpXRtp4.mjs → PaymentMethodsList.vue_vue_type_script_setup_true_lang-CjECKNi_.mjs} +6 -6
  68. package/dist/PlanCustomizationEditor-DS1r2vBO.js +1 -0
  69. package/dist/{PlanCustomizationEditor-CpZeilm5.mjs → PlanCustomizationEditor-DlVSCKGN.mjs} +234 -206
  70. package/dist/{PricingGroupRangeInput.vue.es-CJpvUP3-.mjs → PricingGroupRangeInput.vue.es-BhNcjD7z.mjs} +4 -4
  71. package/dist/{PricingGroupRangeInput.vue.es-DZSJ5Mz0.js → PricingGroupRangeInput.vue.es-VoOTnHjk.js} +1 -1
  72. package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-DJ81eUJX.mjs → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-CmJITenR.mjs} +6 -6
  73. package/dist/{PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-jrkraJMu.js → PricingGroupSingleEditor.vue_vue_type_script_setup_true_lang-hS6A-KcP.js} +1 -1
  74. package/dist/{RadioGroupExtended.vue.es-BalV7gwp.mjs → RadioGroupExtended.vue.es-9YzXzZF0.mjs} +2 -2
  75. package/dist/{RadioGroupExtended.vue.es-Dt6LH9Yh.js → RadioGroupExtended.vue.es-DlbURHQN.js} +1 -1
  76. package/dist/{Section.vue.es-zVXBHAL6.js → Section.vue.es-Bbt0RITt.js} +1 -1
  77. package/dist/{Section.vue.es-D7eiXUbk.mjs → Section.vue.es-DVEpre9O.mjs} +1 -1
  78. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-BdjYFrVC.js → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-Dl7MbMlk.js} +1 -1
  79. package/dist/{SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-DudMRVka.mjs → SecurePaymentsKPI.vue_vue_type_script_setup_true_lang-xzjqB-v-.mjs} +6 -6
  80. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-CJWE7wVi.mjs +41 -0
  81. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-otI7Hz2w.js +1 -0
  82. package/dist/{StepInput.vue.es-mAnuCuDQ.js → StepInput.vue.es-H-3R4jJq.js} +1 -1
  83. package/dist/{StepInput.vue.es-C3Zm6Wc9.mjs → StepInput.vue.es-o-3Lg4Ai.mjs} +4 -4
  84. package/dist/{SubscriptionDetails.entry.ce-WEimiOex.mjs → SubscriptionDetails.entry.ce-CGl6Z5ql.mjs} +22 -22
  85. package/dist/{SubscriptionDetails.entry.ce-D4CsSoR9.js → SubscriptionDetails.entry.ce-CQUO_uXH.js} +1 -1
  86. package/dist/{SubscriptionSchedules-DrrEAPlx.mjs → SubscriptionSchedules-DuWZmnD2.mjs} +1 -1
  87. package/dist/{SubscriptionSchedules-Cm5Dt-1H.js → SubscriptionSchedules-Dy0fUgx5.js} +1 -1
  88. package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-DHp_KtbF.mjs → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-C1kTiW-H.mjs} +11 -11
  89. package/dist/{SubscriptionSchedules.vue_vue_type_script_setup_true_lang-t2Awijf5.js → SubscriptionSchedules.vue_vue_type_script_setup_true_lang-Dd_Rr6qn.js} +1 -1
  90. package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-B41qZmcL.js → SubscriptionSummary.vue_vue_type_script_setup_true_lang-CYyP4ra9.js} +1 -1
  91. package/dist/{SubscriptionSummary.vue_vue_type_script_setup_true_lang-3VYfm6Hm.mjs → SubscriptionSummary.vue_vue_type_script_setup_true_lang-CsekphtV.mjs} +2 -2
  92. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-Bu-_clEa.js → SubscriptionsList.vue_vue_type_script_setup_true_lang-B4j8Clbj.js} +1 -1
  93. package/dist/{SubscriptionsList.vue_vue_type_script_setup_true_lang-DFU0IULg.mjs → SubscriptionsList.vue_vue_type_script_setup_true_lang-BsdevoeT.mjs} +8 -9
  94. package/dist/{TooltipParagraph.vue.es-BXbOJmjr.mjs → TooltipParagraph.vue.es-B9A17aG7.mjs} +1 -1
  95. package/dist/{TooltipParagraph.vue.es-Cph6zT31.js → TooltipParagraph.vue.es-DvC5Wjaz.js} +1 -1
  96. package/dist/{TrialChip.vue.es-C_wgHGuN.js → TrialChip.vue.es-CLQZ5F0n.js} +1 -1
  97. package/dist/{TrialChip.vue.es-C_yRujip.mjs → TrialChip.vue.es-Dmv3lPiQ.mjs} +2 -2
  98. package/dist/{cn.es-D9YMDvG2.js → cn.es-C9Yqq4tg.js} +1 -1
  99. package/dist/{cn.es-CGa6b2Lt.mjs → cn.es-Cvt6TIwv.mjs} +2 -2
  100. package/dist/components/BillingInformation/BillingInformation.cjs +1 -1
  101. package/dist/components/BillingInformation/BillingInformation.mjs +4 -4
  102. package/dist/components/BillingInformationForm/BillingInformationForm.cjs +1 -1
  103. package/dist/components/BillingInformationForm/BillingInformationForm.mjs +6 -6
  104. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.cjs +1 -1
  105. package/dist/components/CustomerPaymentMethods/CustomerPaymentMethods.mjs +4 -4
  106. package/dist/components/Invoice/Invoice.cjs +1 -1
  107. package/dist/components/Invoice/Invoice.mjs +9 -9
  108. package/dist/components/InvoiceDetails/InvoiceDetails.cjs +1 -1
  109. package/dist/components/InvoiceDetails/InvoiceDetails.mjs +15 -16
  110. package/dist/components/InvoiceHeader/InvoiceHeader.cjs +1 -1
  111. package/dist/components/InvoiceHeader/InvoiceHeader.mjs +2 -2
  112. package/dist/components/InvoicesList/InvoicesList.cjs +1 -1
  113. package/dist/components/InvoicesList/InvoicesList.mjs +3 -3
  114. package/dist/components/PaymentHistory/PaymentHistory.cjs +1 -1
  115. package/dist/components/PaymentHistory/PaymentHistory.mjs +14 -15
  116. package/dist/components/PaymentMethodForm/PaymentMethodForm.cjs +1 -1
  117. package/dist/components/PaymentMethodForm/PaymentMethodForm.mjs +5 -5
  118. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.cjs +1 -1
  119. package/dist/components/SubscriptionSchedules/SubscriptionSchedules.mjs +4 -4
  120. package/dist/components/SubscriptionsList/SubscriptionsList.cjs +1 -1
  121. package/dist/components/SubscriptionsList/SubscriptionsList.mjs +5 -5
  122. package/dist/components/WalletBalances/WalletBalances.cjs +1 -1
  123. package/dist/components/WalletBalances/WalletBalances.mjs +3 -3
  124. package/dist/{customElements-D5DAoHRI.mjs → customElements-B58FcXIN.mjs} +5 -5
  125. package/dist/{customElements-C963-LtW.js → customElements-DUMRMFQ5.js} +2 -2
  126. package/dist/{customer-DKa1B2vp.mjs → customer-B3LPAhaD.mjs} +1 -1
  127. package/dist/{customer-TE1FnGT0.js → customer-CisTPaXj.js} +1 -1
  128. package/dist/{de-DE-CLfzTbbX.mjs → de-DE-DKp5LCu0.mjs} +15 -1
  129. package/dist/de-DE-DL74pMLb.js +1 -0
  130. package/dist/en-US-B2XFj-_p.js +1 -0
  131. package/dist/{en-US-D6SGRAch.mjs → en-US-DQ5vlv9Z.mjs} +15 -1
  132. package/dist/index.cjs +1 -1
  133. package/dist/index.mjs +2 -2
  134. package/dist/{invoices-DJTwftJv.mjs → invoices-3520M5AN.mjs} +1 -1
  135. package/dist/{invoices-ClqTWYF9.js → invoices-CKQBLar2.js} +1 -1
  136. package/dist/{it-IT-Cym1UvvK.mjs → it-IT-BgFVsO5S.mjs} +15 -1
  137. package/dist/it-IT-CqNK62qe.js +1 -0
  138. package/dist/nl-NL-Dx-TNXQ1.js +1 -0
  139. package/dist/{nl-NL-D0c4x5C0.mjs → nl-NL-UiRWbO9S.mjs} +15 -1
  140. package/dist/{paymentMethods-CWzJhcWK.mjs → paymentMethods-CWlvwK5V.mjs} +1 -1
  141. package/dist/{paymentMethods-AL2U_byg.js → paymentMethods-Cw-i95mM.js} +1 -1
  142. package/dist/{payments-aXyfylwk.mjs → payments-2qeQdpiW.mjs} +1 -1
  143. package/dist/{payments-BmiHMlQt.js → payments-CS7_YcOW.js} +1 -1
  144. package/dist/pricing-BIMpDI_p.mjs +29 -0
  145. package/dist/pricing-BOqG21f9.js +1 -0
  146. package/dist/{pricingPlanSchedules-BfsMSvN0.js → pricingPlanSchedules-B_sTAIgU.js} +1 -1
  147. package/dist/{pricingPlanSchedules-BD4GIP_F.mjs → pricingPlanSchedules-ChQCbMfe.mjs} +1 -1
  148. package/dist/screens/Checkout/Checkout.cjs +1 -1
  149. package/dist/screens/Checkout/Checkout.mjs +2 -2
  150. package/dist/screens/CustomerOverview/CustomerOverview.cjs +1 -1
  151. package/dist/screens/CustomerOverview/CustomerOverview.mjs +10 -10
  152. package/dist/screens/PayInvoice/PayInvoice.cjs +1 -1
  153. package/dist/screens/PayInvoice/PayInvoice.mjs +12 -12
  154. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.cjs +1 -1
  155. package/dist/screens/PaymentMethodsManagement/PaymentMethodsManagement.mjs +9 -9
  156. package/dist/screens/SubscriptionDetails/SubscriptionDetails.cjs +1 -1
  157. package/dist/screens/SubscriptionDetails/SubscriptionDetails.mjs +2 -2
  158. package/dist/screens/SubscriptionManagement/SubscriptionManagement.cjs +1 -1
  159. package/dist/screens/SubscriptionManagement/SubscriptionManagement.mjs +20 -20
  160. package/dist/{subscriptions-cnR5fnf7.mjs → subscriptions-DcfcBYAq.mjs} +1 -1
  161. package/dist/{subscriptions-Cm83ckfl.js → subscriptions-DwVsf4Ev.js} +1 -1
  162. package/dist/types/components/checkout/CheckoutTitle.types.d.ts +10 -0
  163. package/dist/types/components/payments/ExpressPaymentMethod/ExpressPaymentMethod.types.d.ts +9 -5
  164. package/dist/types/components/payments/ExpressPaymentMethod/ExpressPaymentMethodApplePay.types.d.ts +3 -1
  165. package/dist/types/components/payments/ExpressPaymentMethods/ExpressPaymentMethods.types.d.ts +5 -1
  166. package/dist/types/components/providers/LoggerProvider/LoggerProvider.types.d.ts +1 -1
  167. package/dist/{useActionDispatchProvider-DDYqIh3r.mjs → useActionDispatchProvider-B3AvkLL2.mjs} +1 -1
  168. package/dist/{useActionDispatchProvider-CHkVQMaE.js → useActionDispatchProvider-DFhppdve.js} +1 -1
  169. package/dist/{useCustomer-XZKWsolE.mjs → useCustomer-B-jyJIVy.mjs} +1 -1
  170. package/dist/{useCustomer-DGYtowRy.js → useCustomer-BwZKd9i5.js} +1 -1
  171. package/dist/{useCustomerFormLabels-CcnkJLcB.mjs → useCustomerFormLabels-BQk3d9PZ.mjs} +5 -5
  172. package/dist/{useCustomerFormLabels-DAZziqYt.js → useCustomerFormLabels-DV9QiMYh.js} +1 -1
  173. package/dist/useExperimentalFeature-BciA3Ok9.mjs +135 -0
  174. package/dist/useExperimentalFeature-CGIkgFR4.js +1 -0
  175. package/dist/{useInvoiceData-BEK-7msA.mjs → useInvoiceData-BocKdeg7.mjs} +2 -2
  176. package/dist/{useInvoiceData-CQRn8l9C.js → useInvoiceData-CNV_FMV8.js} +1 -1
  177. package/dist/{useInvoicesList-C4I118KM.mjs → useInvoicesList-C8nsXMJ6.mjs} +7 -7
  178. package/dist/{useInvoicesList-BQkKyyXa.js → useInvoicesList-S0IbQcrD.js} +1 -1
  179. package/dist/{useLoadInitialData-CR0kbYw8.mjs → useLoadInitialData-D9GkzY8t.mjs} +1 -1
  180. package/dist/{useLoadInitialData-CrKnBZs_.js → useLoadInitialData-D_R6Jy1s.js} +1 -1
  181. package/dist/usePaymentMethodAvailability-BO_guwAw.js +1 -0
  182. package/dist/{usePaymentMethodAvailability-ZH-m3B-A.mjs → usePaymentMethodAvailability-DAcsKGeh.mjs} +13 -14
  183. package/dist/{usePaymentMethodOptions-Ciifjo6c.mjs → usePaymentMethodOptions-1vRAo6Ib.mjs} +1 -1
  184. package/dist/{usePaymentMethodOptions-Cqe92ZBn.js → usePaymentMethodOptions-CuzOoi2k.js} +1 -1
  185. package/dist/{usePaymentMethods-B-OKRyKd.mjs → usePaymentMethods-CbwnGONc.mjs} +1 -1
  186. package/dist/{usePaymentMethods-BKwrl82-.js → usePaymentMethods-DDaTZQZp.js} +1 -1
  187. package/dist/{usePayments-CV85OV8V.mjs → usePayments-Cr6NlGaW.mjs} +6 -6
  188. package/dist/{usePayments-Bauj16B-.js → usePayments-DDSjo0rH.js} +1 -1
  189. package/dist/{usePortal-DSLImEfr.js → usePortal-C27omjhz.js} +1 -1
  190. package/dist/{usePortal-H8Tv2TnZ.mjs → usePortal-C5AsegpS.mjs} +1 -1
  191. package/dist/{useSubscription-DqnxWNKg.mjs → useSubscription-BZJL0VOA.mjs} +1 -1
  192. package/dist/{useSubscription-BiYNJT2e.js → useSubscription-D787IXY-.js} +1 -1
  193. package/dist/{useTimePeriod.es-B22-fno3.mjs → useTimePeriod.es-DWLsLFqs.mjs} +1 -1
  194. package/dist/{useTimePeriod.es-D2aiyfd-.js → useTimePeriod.es-rzxqUCTu.js} +1 -1
  195. package/package.json +10 -7
  196. package/dist/BillingInformation.vue_vue_type_script_setup_true_lang-0JHnqIpC.js +0 -1
  197. package/dist/Checkout.entry.ce-8EcavNgT.js +0 -2
  198. package/dist/Checkout.entry.ce-BA5ljKj8.mjs +0 -3924
  199. package/dist/CustomerWalletBalances.vue_vue_type_script_setup_true_lang-hBo2Y2mJ.js +0 -1
  200. package/dist/PaymentIntegrationForm.vue_vue_type_script_setup_true_lang-C0J37ZVe.js +0 -1
  201. package/dist/PaymentIntegrationFormAdyen-HeA9XIj-.js +0 -98
  202. package/dist/PlanCustomizationEditor-CEMP_Dhz.js +0 -1
  203. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-D4sbq9nA.js +0 -1
  204. package/dist/Skeleton.vue_vue_type_script_setup_true_lang-D60YtA9z.mjs +0 -51
  205. package/dist/adyen-CvsH5fok.mjs +0 -117
  206. package/dist/adyen-Druit6gz.js +0 -1
  207. package/dist/de-DE-DaBBl-Ak.js +0 -1
  208. package/dist/en-US-BNevqm0M.js +0 -1
  209. package/dist/it-IT-BkPbTueL.js +0 -1
  210. package/dist/nl-NL-jIfAVGv0.js +0 -1
  211. package/dist/pricing-BVAld27Y.js +0 -1
  212. package/dist/pricing-DLOeiAIB.mjs +0 -16
  213. package/dist/useExperimentalFeature-COOU6IZd.js +0 -1
  214. package/dist/useExperimentalFeature-ierhOt9Q.mjs +0 -6
  215. package/dist/usePaymentMethodAvailability-Ci6LeYKt.js +0 -1
@@ -1 +1 @@
1
- const e=require("vue"),C=require("./customElements-C963-LtW.js"),p=require("./Amount.vue.es-DExaYBqm.js"),ce=require("./useService-H7BjLg8P.js"),I=require("./Button.vue.es-qGvnOKnK.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-D60gTbfe.js"),Y=require("./getComposedString.es-haS4bAj7.js"),P=require("./TooltipParagraph.vue.es-Cph6zT31.js"),ue=require("./index.es-BclokHQX.js"),K=require("./wallets.es-CNIMW5ay.js"),me=require("./DividerText.vue.es-BF3gnr4e.js"),fe=require("./IconTitle.vue.es-Cei98MBw.js"),ge=require("./ContextMenu.vue.es-C7KI8Gz6.js"),J=(t=[])=>{const n=e.ref(t);return[n,l=>{typeof n.value.find(o=>o===l)=="number"?n.value=n.value.filter(o=>o!==l):n.value=[...n.value,l]}]},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",H="SUMMARY_LINE_AMOUNT",he="SUMMARY_TOTAL_TAX",be="SUMMARY_TOTAL_INCLUDING_TAX",_e="SUMMARY_TOTAL_EXCLUDING_TAX",Be="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(),l=t,c=r=>{var s;const d=(s=l.processingOnlyCustomers)==null?void 0:s.find(u=>u.id===r);return d?ae.getCustomerName(d):n({id:"generic.not_available",defaultMessage:"N/A",description:"Used in scenarios where no data is available to be displayed"})},o=r=>{var s;return((s=r.usage_based_conversion)==null?void 0:s.conditions)??r.conditions},i=r=>{var s,d;const u=(d=(s=r.details.conversion)==null?void 0:s.credits)==null?void 0:d.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(r,s)=>t.subLines&&t.isOpen?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.subLines,(d,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:u},[d.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(c(d.processing_only_customer_resource_id)),1)])]),_:2},1024),e.renderSlot(r.$slots,"subline-content",{details:d.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,v,b,_,B,y;return[e.createElementVNode("div",Ve,[e.renderSlot(r.$slots,"invoice-line-prefix",{lineOrder:t.lineOrder,periodOrder:t.periodOrder,groupOrder:t.groupOrder}),e.createElementVNode("div",null,[e.createElementVNode("div",null,[d.description?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(d.description),1)],64)):d.details.description?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(d.details.description),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(" N/A ")],64))]),(g=o(d))!=null&&g.name||(v=o(d))!=null&&v.meter_properties?(e.openBlock(),e.createElementBlock("div",Ee,[(b=o(d))!=null&&b.name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString((_=o(d))==null?void 0:_.name),1)],64)):(B=o(d))!=null&&B.meter_properties?(e.openBlock(),e.createBlock(e.unref(W._sfc_main),{key:1,comparators:(y=o(d))==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(i(d)),1)]),_:2},1024),e.createVNode(m,{class:"text-right tabular-nums"},{default:e.withCtx(()=>{var g,v;return[(g=d.details.band)!=null&&g.amount?(e.openBlock(),e.createBlock(p._sfc_main,{key:0,value:d.details.band.amount},null,8,["value"])):(v=d.details.band)!=null&&v.percentage?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(d.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),d.details.amount?(e.openBlock(),e.createBlock(m,{key:1,class:"text-right tabular-nums"},{default:e.withCtx(()=>[e.createVNode(p._sfc_main,{value:d.details.amount,"data-testid":e.unref(ke)},null,8,["value","data-testid"])]),_:2},1024)):e.createCommentVNode("",!0)],2))],64))),128)):e.createCommentVNode("",!0)}}),Ie={class:"flex gap-4"},Oe={class:"flex items-center gap-2"},X=e.defineComponent({__name:"PricingClauseChip",props:{iconName:{}},setup(t){return(n,a)=>(e.openBlock(),e.createElementBlock("div",Ie,[e.createVNode(se._sfc_main,null,{default:e.withCtx(()=>[e.createElementVNode("div",Oe,[e.createVNode(I._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,l)=>(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(X),{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(X),{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(X),{key:2,"icon-name":"north_east"},{"chip-content":e.withCtx(()=>{var c;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:((c=t.priceDetailsBand)==null?void 0:c.percentage)??"0"}).toUpperCase()),1)]}),_:1})):t.clauseType==="COMMITMENT"?(e.openBlock(),e.createBlock(e.unref(X),{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:{},amountType:{},processingOnlyCustomers:{},displayInvoiceSubLinesPerProcessingOnlyCustomer:{type:Boolean}},setup(t){const n=C.useIntl(),{getIsOpen:a,toggle:l}=W.useToggleList(),c=(r,s)=>{l(o(r,s))},o=(r,s)=>`${r}-line-${s}`,i=r=>{var s;return r.description??((s=r.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(r,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,(d,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:u},[e.createElementVNode("tr",{class:e.normalizeClass(["border-t",{"cursor-pointer":d.sub_lines}]),tabindex:d.sub_lines?0:void 0,onClick:g=>c(t.groupOrder,d.line_order)},[e.createVNode(m,{colspan:"2"},{default:e.withCtx(()=>{var g;return[d.sub_lines?(e.openBlock(),e.createBlock(I._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,d.line_order))}])},null,8,["class"])):e.createCommentVNode("",!0),e.createElementVNode("div",Me,[e.renderSlot(r.$slots,"invoice-line-prefix",{lineOrder:d.line_order,periodOrder:t.invoicePeriodOrder,groupOrder:t.groupOrder}),e.createVNode(ie,{"clause-type":"COMMITMENT","invoice-line-description":i(d),"price-details-band":(g=d.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;return[(g=d.details)!=null&&g.amount?(e.openBlock(),e.createBlock(p._sfc_main,{key:0,value:t.amountType==="INCLUDING_TAX"?d.amount_including_tax:d.amount_excluding_tax,"data-testid":e.unref(H)},null,8,["value","data-testid"])):e.createCommentVNode("",!0)]}),_:2},1024)],10,$e),e.createVNode(Q,{ref_for:!0,ref:o(t.groupOrder,d.line_order),"sub-lines":d.sub_lines??[],"line-order":d.line_order,"period-order":t.invoicePeriodOrder,"group-order":t.groupOrder,"is-open":e.unref(a)(o(t.groupOrder,d.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:{},amountType:{},processingOnlyCustomers:{},displayInvoiceSubLinesPerProcessingOnlyCustomer:{type:Boolean}},setup(t){const n=C.useIntl(),{getIsOpen:a,toggle:l}=W.useToggleList(),c=(i,r)=>{l(o(i,r))},o=(i,r)=>`${i}-line-${r}`;return(i,r)=>(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(()=>[...r[0]||(r[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,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:d},[e.createElementVNode("tr",{class:e.normalizeClass(["border-t",{"cursor-pointer":t.isExpandable}]),tabindex:t.isExpandable?0:void 0,onClick:u=>c(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(I._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(i.$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(()=>[...r[1]||(r[1]=[e.createTextVNode(" ",-1)])]),_:1}),e.createVNode(m,{class:"w-1/5 tabular-nums"},{default:e.withCtx(()=>{var u,g,v;return[e.createTextVNode(e.toDisplayString((g=(u=s.details)==null?void 0:u.band)!=null&&g.percentage?`${(v=s.details)==null?void 0:v.band.percentage}%`:" "),1)]}),_:2},1024),e.createVNode(m,{class:"w-1/5"},{default:e.withCtx(()=>[...r[2]||(r[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(p._sfc_main,{key:0,value:t.amountType==="INCLUDING_TAX"?s.amount_including_tax:s.amount_excluding_tax,"data-testid":e.unref(H)},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},Ue=["tabindex"],Fe={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,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("tr",{class:e.normalizeClass(["break-inside-avoid border-t",{"cursor-pointer":t.isExpandable}]),tabindex:t.isExpandable?0:void 0,onClick:l[0]||(l[0]=c=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))),onKeyup:[l[1]||(l[1]=e.withKeys(c=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["enter"])),l[2]||(l[2]=e.withKeys(c=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["space"]))]},[e.createVNode(m,{class:"p-0"},{default:e.withCtx(()=>[t.isExpandable?(e.openBlock(),e.createBlock(I._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(p._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(p._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,Ue),(t.forceExpanded||t.expandedItems.includes(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)))&&t.group.lines?(e.openBlock(),e.createElementBlock("tr",Fe,[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,"amount-type":t.amountType,"processing-only-customers":t.processingOnlyCustomers,"display-invoice-sub-lines-per-processing-only-customer":t.displayInvoiceSubLinesPerProcessingOnlyCustomer},{"invoice-line-prefix":e.withCtx(c=>[e.renderSlot(a.$slots,"invoice-line-prefix",e.normalizeProps(e.guardReactiveProps(c)))]),_:3},8,["commitments","format-index","handle-toggle-items","expanded-items","is-expandable","invoice-period-order","group-order","amount-type","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer"])])])])):e.createCommentVNode("",!0)],64))}}),We=["tabindex"],Ge={key:0},Xe={colspan:"2",class:"p-0"},He={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(["break-inside-avoid border-t",{"cursor-pointer":t.isExpandable}]),tabindex:t.isExpandable?0:void 0,onClick:a[0]||(a[0]=l=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))),onKeyup:[a[1]||(a[1]=e.withKeys(l=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["enter"])),a[2]||(a[2]=e.withKeys(l=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["space"]))]},[e.createVNode(m,{class:"p-0"},{default:e.withCtx(()=>[t.isExpandable?(e.openBlock(),e.createBlock(I._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(p._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(p._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",Ge,[e.createElementVNode("td",Xe,[e.createElementVNode("div",He,[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,"amount-type":t.amountType,"processing-only-customers":t.processingOnlyCustomers,"display-invoice-sub-lines-per-processing-only-customer":t.displayInvoiceSubLinesPerProcessingOnlyCustomer},{"invoice-line-prefix":e.withCtx(l=>[e.renderSlot(n.$slots,"invoice-line-prefix",e.normalizeProps(e.guardReactiveProps(l)))]),_:3},8,["type","lines","format-index","handle-toggle-items","expanded-items","is-expandable","invoice-period-order","group-order","amount-type","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:l,currency:c}=t.tier_lower_bound.amount;n={kind:"amount",currency:c,quantity:l??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:l,currency:c}=t.tier_top_bound.amount;a={kind:"amount",currency:c,quantity:l}}return{lowerBound:n,topBound:a}},Qe=t=>{var n,a,l,c;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:(l=t.band)==null?void 0:l.minimum_number};case"ABOVE_MAXIMUM_NUMBER":return{kind:"band_maximum_number",value:(c=t.band)==null?void 0:c.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(),l=t,c=d=>{if(d.kind!=="default")return d.kind==="number"?a(d.value):`${d.currency} ${d.quantity}`},o=d=>{if(!d)return"";const{lowerBound:u,topBound:g}=Ye(d),v=c(g);return(c(u)??"0")+(v?` - ${v}`:"+")},i=e.computed(()=>{var d;return(d=l.data.details)==null?void 0:d.included_volume_details}),r=e.computed(()=>Qe(l.data.details)),s=e.computed(()=>{var d,u;return(d=l.data)!=null&&d.product_items?Y.getComposedString(l.data.product_items.map(g=>g.name)):((u=l.data)==null?void 0:u.description)??"N/A"});return(d,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(m,{class:"align-top"},{default:e.withCtx(()=>{var g,v,b,_,B,y,E,k,w;return[e.createElementVNode("div",Je,[e.createElementVNode("div",null,[t.data.sub_lines?(e.openBlock(),e.createBlock(I._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(d.$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)&&!i.value&&((v=t.data.details)!=null&&v.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:_.split_pricing)!=null&&B.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,(O,S)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createTextVNode(e.toDisplayString(O.meter_property.name)+": "+e.toDisplayString(O.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,[r.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),r.value.amount?(e.openBlock(),e.createBlock(p._sfc_main,{key:0,value:r.value.amount},null,8,["value"])):e.createCommentVNode("",!0)],64)):r.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)):r.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),r.value.amount?(e.openBlock(),e.createBlock(p._sfc_main,{key:0,value:r.value.amount},null,8,["value"])):e.createCommentVNode("",!0)],64)):r.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(r.value.value),1)],64)):r.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(r.value.value),1)],64)):e.createCommentVNode("",!0)])]}),_:3}),e.renderSlot(d.$slots,"line-content",{details:t.data.details})],64))}}),rt=(t,n,a)=>{var l,c;if(t==="PASS_THROUGH")return{kind:"hidden"};if(a&&((c=(l=n==null?void 0:n.conversion)==null?void 0:l.credits)!=null&&c.quantity))return{kind:"conversion-credits",value:n.conversion.credits.quantity};if(n!=null&&n.price_bound){const{price_bound:o,meter_value:i,band:r}=n;return o==="BELOW_MINIMUM_AMOUNT"||o==="ABOVE_MAXIMUM_AMOUNT"?{kind:"raw",value:i.count}:o==="NOT_HIT"&&"amount"in i&&i.amount?{kind:"amount",amount:i.amount}:o==="NOT_HIT"&&"number"in i&&i.number?{kind:"raw",value:i.number}:o==="RATIO"&&i.number?{kind:"number",value:+i.number}:o==="BELOW_MINIMUM_NUMBER"&&(r!=null&&r.minimum_number)?{kind:"number",value:+r.minimum_number}:o==="ABOVE_MAXIMUM_NUMBER"&&(r!=null&&r.maximum_number)?{kind:"number",value:+r.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:i,amount:r}=n;if(o==="BELOW_MINIMUM_AMOUNT"&&(i!=null&&i.minimum_amount))return{kind:"amount",amount:i.minimum_amount};if(o==="ABOVE_MAXIMUM_AMOUNT"&&(i!=null&&i.maximum_amount))return{kind:"amount",amount:i.maximum_amount};if(o==="RATIO")return{kind:"amount",amount:(a==="PER_SEAT"?i==null?void 0:i.amount:void 0)??r,suffix:{kind:"tier-top-bound"}};if(lt.includes(o)){if(i&&i.amount)return{kind:"amount",amount:i.amount};if(i&&"percentage"in i)return{kind:"percentage",value:i.percentage};if(i&&r)return{kind:"amount",amount:r,suffix:{kind:"fixed-amount"}}}return{kind:"hidden"}}const l=n==null?void 0:n.band,c=n==null?void 0:n.amount;return l&&l.amount?{kind:"amount",amount:l.amount,suffix:{kind:"block-size-or-per-unit"}}:l&&"percentage"in l?{kind:"percentage",value:l.percentage}:l&&c?t==="STAIR_STEP"||t==="STAIR_STEP_TOP_UP"?{kind:"amount",amount:c,suffix:{kind:"fixed-amount"}}:t==="TOP_TIERED"?{kind:"amount",amount:c,suffix:{kind:"per-unit"}}:t==="FLAT"?{kind:"amount",amount:c,suffix:{kind:"flat-fee"}}:{kind:"amount",amount:c}:{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"},_t={key:1,class:"inline-block"},Bt={class:"flex items-center justify-end gap-1"},Z=e.defineComponent({__name:"InvoiceRowContent",props:{pricingType:{},details:{},amount:{},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}),l=e.computed(()=>{var y;return(y=a.value)==null?void 0:y.available_included_volume}),c=e.computed(()=>rt(n.pricingType,n.details,n.preferConversionCredits)),o=e.computed(()=>ct(n.pricingType,n.details,n.modelType)),{$t:i,formatNumber:r}=C.useIntl(),s=e.computed(()=>i({id:"invoice.line.fixed_amount",defaultMessage:"Fixed amount",description:"Label shown when a price band charges a fixed amount regardless of usage"})),d=e.computed(()=>i({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 i({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})}),v=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"?i({id:"invoice.line.per_seat",defaultMessage:"Per seat",description:"Label shown when a price band applies per single seat"}):i({id:"invoice.line.per_unit",defaultMessage:"Per unit",description:"Label shown when a price band applies per single unit"})),_=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}),B=e.computed(()=>{if(_.value!==void 0)return i({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:+_.value,formattedCount:r(+_.value)})});return(y,E)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(m,{number:"",class:"align-top"},{default:e.withCtx(()=>{var k;return[c.value.kind==="raw"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(c.value.value),1)],64)):c.value.kind==="amount"?(e.openBlock(),e.createBlock(p._sfc_main,{key:1,value:c.value.amount},null,8,["value"])):c.value.kind==="number"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(e.unref(r)(c.value.value)),1)],64)):c.value.kind==="conversion-credits"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createTextVNode(e.toDisplayString(e.unref(r)(+c.value.value,{maximumFractionDigits:e.unref(q.MAX_FRACTION_DIGITS)})),1)],64)):c.value.kind==="one"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createTextVNode("1")],64)):e.createCommentVNode("",!0),c.value.kind!=="conversion-credits"&&c.value.kind!=="hidden"&&!((k=t.details)!=null&&k.price_bound)&&l.value?(e.openBlock(),e.createElementBlock("div",dt,[l.value.type==="AMOUNT"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(p._sfc_main,{value:l.value.amount},null,8,["value"]),e.createTextVNode(" "+e.toDisplayString(e.unref(i)({id:"invoice.line.included",defaultMessage:"included",description:"Used to specify an included amount. Should be lowercase."})),1)],64)):l.value.type==="NUMBER"?(e.openBlock(),e.createElementBlock("span",st,e.toDisplayString(l.value.number)+" "+e.toDisplayString(e.unref(i)({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(i)({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,O,S,A;return[o.value.kind==="amount"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(p._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)):v.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},[B.value?(e.openBlock(),e.createElementBlock("div",ft,e.toDisplayString(B.value),1)):t.modelType!=="RECURRING"?(e.openBlock(),e.createElementBlock("div",gt,e.toDisplayString(b.value),1)):e.createCommentVNode("",!0)],64)):((O=o.value.suffix)==null?void 0:O.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(d.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(p._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,O,S,A;return[(w=(k=t.details)==null?void 0:k.amount)!=null&&w.currency&&((S=(O=t.details)==null?void 0:O.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,(G,f)=>{var N;return e.openBlock(),e.createElementBlock("div",{key:f,class:"inline-block"},[e.createElementVNode("div",ht,[e.createVNode(p._sfc_main,{value:t.amount??t.details.amount,"data-testid":f===0?e.unref(H):void 0},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(i)({id:"invoice.line.original_currency",defaultMessage:"Original currency",description:"Original currency"}))+" ",1),e.createVNode(p._sfc_main,{value:t.details.pricing_amount,class:"font-semibold"},null,8,["value"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(I._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(i)({id:"invoice.line.excl.tax",defaultMessage:"Excl. tax",description:"Value excludes tax"}))+" ",1),e.createVNode(p._sfc_main,{value:G.base_amount},null,8,["value"])],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(e.unref(i)({id:"invoice.line.incl.tax",defaultMessage:"Incl. tax",description:"Value includes tax"}))+" ",1),e.createVNode(p._sfc_main,{value:G.total_amount},null,8,["value"])],64))]))])}),128)):(e.openBlock(),e.createElementBlock("div",_t,[e.createElementVNode("div",Bt,[e.createVNode(p._sfc_main,{value:t.amount??t.details.amount,"data-testid":e.unref(H)},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(i)({id:"invoice.line.original_currency",defaultMessage:"Original currency",description:"Original currency"}))+" ",1),e.createVNode(p._sfc_main,{value:t.details.pricing_amount,class:"font-semibold"},null,8,["value"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(I._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=["DISCOUNT","MARKUP"],Ct=t=>{const n=[...t].sort((i,r)=>i.line_order-r.line_order),a=i=>Nt.includes(i.type),l=i=>!!i.pricing_item_config_id&&n.some(r=>!a(r)&&r.pricing_item_config_id===i.pricing_item_config_id),c=n.filter(i=>a(i)&&l(i)),o=n.filter(i=>!c.includes(i));return c.forEach(i=>{const r=o.findLastIndex(s=>s.pricing_item_config_id===i.pricing_item_config_id&&(!a(s)||c.includes(s)));o.splice(r+1,0,i)}),o},Tt=["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(()=>Ct(n.group.lines??[])),l=C.useIntl(),{getIsOpen:c,toggle:o}=W.useToggleList(),i=(s,d)=>{o(r(s,d))},r=(s,d)=>`${s}-line-${d}`;return(s,d)=>(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(l).$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(l).$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(l).$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(l).$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(l).$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:v=>i(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(c)(r(t.group.group_order,u.line_order))},{"invoice-line-prefix":e.withCtx(v=>[e.renderSlot(s.$slots,"invoice-line-prefix",e.mergeProps({ref_for:!0},v))]),"line-content":e.withCtx(v=>{var b,_;return[e.createVNode(Z,{details:v.details,amount:t.amountType==="INCLUDING_TAX"?u.amount_including_tax:u.amount_excluding_tax,"pricing-type":u.pricing_type,"tax-categories":u.tax_categories,"amount-type":t.amountType,"model-type":(_=(b=u.product_items)==null?void 0:b[0])==null?void 0:_.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(B=>[e.renderSlot(s.$slots,"one-off-line-context-menu",e.mergeProps({ref_for:!0},B,{lineOrder:u.line_order}))]),key:"0"}:void 0]),1032,["details","amount","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,Tt),e.createVNode(Q,{ref_for:!0,ref:r(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(c)(r(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(v=>[e.renderSlot(s.$slots,"invoice-line-prefix",e.mergeProps({ref_for:!0},v))]),"subline-content":e.withCtx(v=>{var b,_;return[e.createVNode(Z,{details:v.details,"hide-tax-details":v.hideTaxDetails,"prefer-conversion-credits":"","pricing-type":u.pricing_type,"tax-categories":u.tax_categories,"amount-type":t.amountType,"model-type":(_=(b=u.product_items)==null?void 0:b[0])==null?void 0:_.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})]))}}),Vt={class:"flex items-center"},Et={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,([l])=>{a.value=l.target.clientWidth<l.target.scrollWidth}),(l,c)=>(e.openBlock(),e.createElementBlock("div",Vt,[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",Et,e.toDisplayString(t.count),1)):e.createCommentVNode("",!0)]))}}),wt=["tabindex"],It={key:0},Ot={colspan:"2",class:"p-0"},St={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},$t=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 l,c,o;const i=[(l=n.group.pricing)==null?void 0:l.name,Y.getComposedString(((c=n.group.products)==null?void 0:c.map(d=>d.name))??[])].filter(Boolean).join(" - "),r=je(n.group,!!n.showOriginalCustomerInvoiceLine);if(!r)return i;const s=(o=n.forwardedFromCustomers)==null?void 0:o.find(d=>d.id===r);return[s&&ae.getCustomerName(s),i].filter(Boolean).join(" - ")});return(l,c)=>(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:c[0]||(c[0]=o=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))),onKeyup:[c[1]||(c[1]=e.withKeys(o=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["enter"])),c[2]||(c[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(I._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(p._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(p._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,wt),t.forceExpanded||t.expandedItems.includes(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))?(e.openBlock(),e.createElementBlock("tr",It,[e.createElementVNode("td",Ot,[e.createElementVNode("div",St,[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(l.$slots,"invoice-line-prefix",e.normalizeProps(e.guardReactiveProps(o)))]),"one-off-line-context-menu":e.withCtx(o=>[e.renderSlot(l.$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(),l=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"})})),c=o=>K.formatInvoiceWalletBalanceValue(o,{formatMoney:q.formatAmount,formatQuantity:i=>i});return(o,i)=>l.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(l.value,r=>(e.openBlock(),e.createElementBlock("tr",{key:r.key},[e.createVNode(m,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.label),1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c(r.availableBalance)),1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c(r.usedBalance)),1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c(r.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 Mt(t=!1,n={}){const{truthyValue:a=!0,falsyValue:l=!1}=n,c=e.isRef(t),o=e.ref(t);function i(r){if(arguments.length)return o.value=r,o.value;{const s=te(a);return o.value=o.value===s?te(l):s,o.value}}return c?i:[o,i]}const Dt={key:0,totals:"",class:"border-t break-inside-avoid"},ne=e.defineComponent({__name:"InvoiceSummaryTotalExcludingTax",props:{baseAmount:{}},setup(t){const n=C.useIntl();return(a,l)=>t.baseAmount?(e.openBlock(),e.createElementBlock("tr",Dt,[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(p._sfc_main,{value:t.baseAmount,"data-testid":e.unref(_e)},null,8,["value","data-testid"])]),_:1})])):e.createCommentVNode("",!0)}}),Pt={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,l)=>t.totalAmount?(e.openBlock(),e.createElementBlock("tr",Pt,[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(p._sfc_main,{value:t.totalAmount,"data-testid":e.unref(be)},null,8,["value","data-testid"])]),_:1})])):e.createCommentVNode("",!0)}}),At={key:0,colspan:"4",class:"p-0"},Lt=e.defineComponent({__name:"InvoiceTaxes",props:{taxCategories:{}},setup(t){const n=C.useIntl();return(a,l)=>(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,(c,o)=>(e.openBlock(),e.createElementBlock("tr",{key:o},[c.rates?(e.openBlock(),e.createElementBlock("td",At,[e.createVNode($,{class:"table-fixed"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.rates,(i,r)=>(e.openBlock(),e.createElementBlock("tr",{key:r},[e.createVNode(m,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.name)+" ("+e.toDisplayString(c.category)+") ",1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(p._sfc_main,{value:c.base_amount},null,8,["value"])]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.percentage)+"%",1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(p._sfc_main,{value:i.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(c.name)+" ("+e.toDisplayString(c.category)+") ",1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(p._sfc_main,{value:c.base_amount},null,8,["value"])]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.percentage)+"%",1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(p._sfc_main,{value:c.tax_amount},null,8,["value"])]),_:2},1024)],64))]))),128))]),_:1}))}}),Ut={class:"flex items-start justify-between"},Ft={key:0,class:"max-h-9"},Rt={class:"flex flex-col gap-2"},zt={key:0},qt={key:3},Wt={colspan:"2",class:"p-0"},Gt=["tabindex"],Xt={key:1},Ht={colspan:"2",class:"p-0"},Kt={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},jt=["tabindex","onClick","onKeyup"],Yt={key:0},Qt={colspan:"2",class:"p-0"},Jt={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},Zt={key:1},en={colspan:"2",class:"p-0"},tn={key:0,class:"break-inside-avoid border-t font-bold"},nn=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:l}=a,c=n,o=t,[i,r]=J(),[s,d]=J(),[u,g]=Mt(),v=(...f)=>{o.isExpandable&&r(...f)},b=f=>{o.isExpandable&&d(f)},_=()=>{!o.invoice.tax_categories||!o.isExpandable||g()},B=(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)}),O=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:l({defaultMessage:"Invoice line",id:"JlhdD2",description:"Label for adding an invoice line"}),onClick:()=>c("add-invoice-line")}),o.isNoteCreatable&&f.push({label:l({defaultMessage:"Note",id:"jB8+k/",description:"Label for adding a note to an invoice"}),onClick:()=>c("add-note")}),f}),A=e.computed(()=>o.invoice.show_tax_per_line_item!==!1),G=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",Ut,[f.$slots.logo?(e.openBlock(),e.createElementBlock("div",Ft,[e.renderSlot(f.$slots,"logo")])):(e.openBlock(),e.createBlock(fe._sfc_main,{key:1,title:G.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",Rt,[(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(I._sfc_main,{"icon-prefix":"add",size:"sm",intent:"secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({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(O(V)),([h,L],D)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:h},[D>0?(e.openBlock(),e.createElementBlock("tr",zt,[...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,(U,le)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:le},[h==="REVENUE"||h==="PRICING"||h==="ONE_OFF"?(e.openBlock(),e.createBlock($t,{key:0,group:U,"expanded-items":e.unref(i),"handle-toggle-items":v,"is-expandable":t.isExpandable,"force-expanded":t.forceExpanded,"format-index":B,"invoice-period-order":V.period_order,"group-order":U.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(F=>[e.renderSlot(f.$slots,"invoice-line-prefix",e.mergeProps({ref_for:!0},F))]),"one-off-line-context-menu":e.withCtx(F=>[e.renderSlot(f.$slots,"one-off-line-context-menu",e.mergeProps({ref_for:!0},F,{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:U,"expanded-items":e.unref(i),"handle-toggle-items":v,"is-expandable":t.isExpandable,"force-expanded":t.forceExpanded,"format-index":B,"invoice-period-order":V.period_order,"group-order":U.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(F=>[e.renderSlot(f.$slots,"invoice-line-prefix",e.mergeProps({ref_for:!0},F))]),_: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:U,"expanded-items":e.unref(i),"handle-toggle-items":v,"is-expandable":t.isExpandable,"force-expanded":t.forceExpanded,"format-index":B,"invoice-period-order":V.period_order,"group-order":U.group_order,"amount-type":t.invoice.pricing_amount_type},{"invoice-line-prefix":e.withCtx(F=>[e.renderSlot(f.$slots,"invoice-line-prefix",e.mergeProps({ref_for:!0},F))]),_:3},8,["group","expanded-items","is-expandable","force-expanded","invoice-period-order","group-order","amount-type"])):e.createCommentVNode("",!0),w(U)?(e.openBlock(),e.createElementBlock("tr",qt,[e.createElementVNode("td",Wt,[e.createVNode(ee,{lines:U.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:_,onKeyup:[e.withKeys(_,["enter"]),e.withKeys(_,["space"])]},[e.createVNode(m,null,{default:e.withCtx(()=>[t.isExpandable&&t.invoice.tax_categories&&t.invoice.tax_categories.length?(e.openBlock(),e.createBlock(I._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(p._sfc_main,{value:t.invoice.tax_summary.tax_amount,"data-testid":e.unref(he)},null,8,["value","data-testid"])]),_:1})],42,Gt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),(t.forceExpanded||e.unref(u))&&t.invoice.tax_categories?(e.openBlock(),e.createElementBlock("tr",Xt,[e.createElementVNode("td",Ht,[e.createElementVNode("div",Kt,[e.createVNode(Lt,{"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(B(M,L)),onKeyup:[e.withKeys(D=>b(B(M,L)),["enter"]),e.withKeys(D=>b(B(M,L)),["space"])]},[e.createVNode(m,{class:"p-0"},{default:e.withCtx(()=>{var D;return[t.isExpandable?(e.openBlock(),e.createBlock(I._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(B(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(p._sfc_main,{value:h.amount_excluding_tax,"data-testid":e.unref(Be),"data-type":e.unref(Ce)},null,8,["value","data-testid","data-type"])]),_:2},1024)],42,jt),t.forceExpanded||e.unref(s).includes(B(M,L))?(e.openBlock(),e.createElementBlock("tr",Yt,[e.createElementVNode("td",Qt,[e.createElementVNode("div",Jt,[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",Zt,[e.createElementVNode("td",en,[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",tn,[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(p._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=nn;exports._sfc_main$1=x;exports._sfc_main$2=m;
1
+ const e=require("vue"),C=require("./customElements-DUMRMFQ5.js"),p=require("./Amount.vue.es-DExaYBqm.js"),ce=require("./useService-H7BjLg8P.js"),I=require("./Button.vue.es-BzkuglKw.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-B2jjzIOc.js"),Y=require("./getComposedString.es-haS4bAj7.js"),P=require("./TooltipParagraph.vue.es-DvC5Wjaz.js"),ue=require("./index.es-BclokHQX.js"),K=require("./wallets.es-CNIMW5ay.js"),me=require("./DividerText.vue.es-CoyDk9eH.js"),fe=require("./IconTitle.vue.es-Dn2xcPHj.js"),ge=require("./ContextMenu.vue.es-DUU43tCy.js"),J=(t=[])=>{const n=e.ref(t);return[n,l=>{typeof n.value.find(o=>o===l)=="number"?n.value=n.value.filter(o=>o!==l):n.value=[...n.value,l]}]},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",H="SUMMARY_LINE_AMOUNT",he="SUMMARY_TOTAL_TAX",be="SUMMARY_TOTAL_INCLUDING_TAX",_e="SUMMARY_TOTAL_EXCLUDING_TAX",Be="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(),l=t,c=r=>{var s;const d=(s=l.processingOnlyCustomers)==null?void 0:s.find(u=>u.id===r);return d?ae.getCustomerName(d):n({id:"generic.not_available",defaultMessage:"N/A",description:"Used in scenarios where no data is available to be displayed"})},o=r=>{var s;return((s=r.usage_based_conversion)==null?void 0:s.conditions)??r.conditions},i=r=>{var s,d;const u=(d=(s=r.details.conversion)==null?void 0:s.credits)==null?void 0:d.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(r,s)=>t.subLines&&t.isOpen?(e.openBlock(!0),e.createElementBlock(e.Fragment,{key:0},e.renderList(t.subLines,(d,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:u},[d.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(c(d.processing_only_customer_resource_id)),1)])]),_:2},1024),e.renderSlot(r.$slots,"subline-content",{details:d.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,v,b,_,B,y;return[e.createElementVNode("div",Ve,[e.renderSlot(r.$slots,"invoice-line-prefix",{lineOrder:t.lineOrder,periodOrder:t.periodOrder,groupOrder:t.groupOrder}),e.createElementVNode("div",null,[e.createElementVNode("div",null,[d.description?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(d.description),1)],64)):d.details.description?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(d.details.description),1)],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(" N/A ")],64))]),(g=o(d))!=null&&g.name||(v=o(d))!=null&&v.meter_properties?(e.openBlock(),e.createElementBlock("div",Ee,[(b=o(d))!=null&&b.name?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString((_=o(d))==null?void 0:_.name),1)],64)):(B=o(d))!=null&&B.meter_properties?(e.openBlock(),e.createBlock(e.unref(W._sfc_main),{key:1,comparators:(y=o(d))==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(i(d)),1)]),_:2},1024),e.createVNode(m,{class:"text-right tabular-nums"},{default:e.withCtx(()=>{var g,v;return[(g=d.details.band)!=null&&g.amount?(e.openBlock(),e.createBlock(p._sfc_main,{key:0,value:d.details.band.amount},null,8,["value"])):(v=d.details.band)!=null&&v.percentage?(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(d.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),d.details.amount?(e.openBlock(),e.createBlock(m,{key:1,class:"text-right tabular-nums"},{default:e.withCtx(()=>[e.createVNode(p._sfc_main,{value:d.details.amount,"data-testid":e.unref(ke)},null,8,["value","data-testid"])]),_:2},1024)):e.createCommentVNode("",!0)],2))],64))),128)):e.createCommentVNode("",!0)}}),Ie={class:"flex gap-4"},Oe={class:"flex items-center gap-2"},X=e.defineComponent({__name:"PricingClauseChip",props:{iconName:{}},setup(t){return(n,a)=>(e.openBlock(),e.createElementBlock("div",Ie,[e.createVNode(se._sfc_main,null,{default:e.withCtx(()=>[e.createElementVNode("div",Oe,[e.createVNode(I._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,l)=>(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(X),{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(X),{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(X),{key:2,"icon-name":"north_east"},{"chip-content":e.withCtx(()=>{var c;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:((c=t.priceDetailsBand)==null?void 0:c.percentage)??"0"}).toUpperCase()),1)]}),_:1})):t.clauseType==="COMMITMENT"?(e.openBlock(),e.createBlock(e.unref(X),{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:{},amountType:{},processingOnlyCustomers:{},displayInvoiceSubLinesPerProcessingOnlyCustomer:{type:Boolean}},setup(t){const n=C.useIntl(),{getIsOpen:a,toggle:l}=W.useToggleList(),c=(r,s)=>{l(o(r,s))},o=(r,s)=>`${r}-line-${s}`,i=r=>{var s;return r.description??((s=r.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(r,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,(d,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:u},[e.createElementVNode("tr",{class:e.normalizeClass(["border-t",{"cursor-pointer":d.sub_lines}]),tabindex:d.sub_lines?0:void 0,onClick:g=>c(t.groupOrder,d.line_order)},[e.createVNode(m,{colspan:"2"},{default:e.withCtx(()=>{var g;return[d.sub_lines?(e.openBlock(),e.createBlock(I._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,d.line_order))}])},null,8,["class"])):e.createCommentVNode("",!0),e.createElementVNode("div",Me,[e.renderSlot(r.$slots,"invoice-line-prefix",{lineOrder:d.line_order,periodOrder:t.invoicePeriodOrder,groupOrder:t.groupOrder}),e.createVNode(ie,{"clause-type":"COMMITMENT","invoice-line-description":i(d),"price-details-band":(g=d.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;return[(g=d.details)!=null&&g.amount?(e.openBlock(),e.createBlock(p._sfc_main,{key:0,value:t.amountType==="INCLUDING_TAX"?d.amount_including_tax:d.amount_excluding_tax,"data-testid":e.unref(H)},null,8,["value","data-testid"])):e.createCommentVNode("",!0)]}),_:2},1024)],10,$e),e.createVNode(Q,{ref_for:!0,ref:o(t.groupOrder,d.line_order),"sub-lines":d.sub_lines??[],"line-order":d.line_order,"period-order":t.invoicePeriodOrder,"group-order":t.groupOrder,"is-open":e.unref(a)(o(t.groupOrder,d.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:{},amountType:{},processingOnlyCustomers:{},displayInvoiceSubLinesPerProcessingOnlyCustomer:{type:Boolean}},setup(t){const n=C.useIntl(),{getIsOpen:a,toggle:l}=W.useToggleList(),c=(i,r)=>{l(o(i,r))},o=(i,r)=>`${i}-line-${r}`;return(i,r)=>(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(()=>[...r[0]||(r[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,d)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:d},[e.createElementVNode("tr",{class:e.normalizeClass(["border-t",{"cursor-pointer":t.isExpandable}]),tabindex:t.isExpandable?0:void 0,onClick:u=>c(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(I._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(i.$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(()=>[...r[1]||(r[1]=[e.createTextVNode(" ",-1)])]),_:1}),e.createVNode(m,{class:"w-1/5 tabular-nums"},{default:e.withCtx(()=>{var u,g,v;return[e.createTextVNode(e.toDisplayString((g=(u=s.details)==null?void 0:u.band)!=null&&g.percentage?`${(v=s.details)==null?void 0:v.band.percentage}%`:" "),1)]}),_:2},1024),e.createVNode(m,{class:"w-1/5"},{default:e.withCtx(()=>[...r[2]||(r[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(p._sfc_main,{key:0,value:t.amountType==="INCLUDING_TAX"?s.amount_including_tax:s.amount_excluding_tax,"data-testid":e.unref(H)},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},Ue=["tabindex"],Fe={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,l)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createElementVNode("tr",{class:e.normalizeClass(["break-inside-avoid border-t",{"cursor-pointer":t.isExpandable}]),tabindex:t.isExpandable?0:void 0,onClick:l[0]||(l[0]=c=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))),onKeyup:[l[1]||(l[1]=e.withKeys(c=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["enter"])),l[2]||(l[2]=e.withKeys(c=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["space"]))]},[e.createVNode(m,{class:"p-0"},{default:e.withCtx(()=>[t.isExpandable?(e.openBlock(),e.createBlock(I._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(p._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(p._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,Ue),(t.forceExpanded||t.expandedItems.includes(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)))&&t.group.lines?(e.openBlock(),e.createElementBlock("tr",Fe,[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,"amount-type":t.amountType,"processing-only-customers":t.processingOnlyCustomers,"display-invoice-sub-lines-per-processing-only-customer":t.displayInvoiceSubLinesPerProcessingOnlyCustomer},{"invoice-line-prefix":e.withCtx(c=>[e.renderSlot(a.$slots,"invoice-line-prefix",e.normalizeProps(e.guardReactiveProps(c)))]),_:3},8,["commitments","format-index","handle-toggle-items","expanded-items","is-expandable","invoice-period-order","group-order","amount-type","processing-only-customers","display-invoice-sub-lines-per-processing-only-customer"])])])])):e.createCommentVNode("",!0)],64))}}),We=["tabindex"],Ge={key:0},Xe={colspan:"2",class:"p-0"},He={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(["break-inside-avoid border-t",{"cursor-pointer":t.isExpandable}]),tabindex:t.isExpandable?0:void 0,onClick:a[0]||(a[0]=l=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))),onKeyup:[a[1]||(a[1]=e.withKeys(l=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["enter"])),a[2]||(a[2]=e.withKeys(l=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["space"]))]},[e.createVNode(m,{class:"p-0"},{default:e.withCtx(()=>[t.isExpandable?(e.openBlock(),e.createBlock(I._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(p._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(p._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",Ge,[e.createElementVNode("td",Xe,[e.createElementVNode("div",He,[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,"amount-type":t.amountType,"processing-only-customers":t.processingOnlyCustomers,"display-invoice-sub-lines-per-processing-only-customer":t.displayInvoiceSubLinesPerProcessingOnlyCustomer},{"invoice-line-prefix":e.withCtx(l=>[e.renderSlot(n.$slots,"invoice-line-prefix",e.normalizeProps(e.guardReactiveProps(l)))]),_:3},8,["type","lines","format-index","handle-toggle-items","expanded-items","is-expandable","invoice-period-order","group-order","amount-type","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:l,currency:c}=t.tier_lower_bound.amount;n={kind:"amount",currency:c,quantity:l??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:l,currency:c}=t.tier_top_bound.amount;a={kind:"amount",currency:c,quantity:l}}return{lowerBound:n,topBound:a}},Qe=t=>{var n,a,l,c;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:(l=t.band)==null?void 0:l.minimum_number};case"ABOVE_MAXIMUM_NUMBER":return{kind:"band_maximum_number",value:(c=t.band)==null?void 0:c.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(),l=t,c=d=>{if(d.kind!=="default")return d.kind==="number"?a(d.value):`${d.currency} ${d.quantity}`},o=d=>{if(!d)return"";const{lowerBound:u,topBound:g}=Ye(d),v=c(g);return(c(u)??"0")+(v?` - ${v}`:"+")},i=e.computed(()=>{var d;return(d=l.data.details)==null?void 0:d.included_volume_details}),r=e.computed(()=>Qe(l.data.details)),s=e.computed(()=>{var d,u;return(d=l.data)!=null&&d.product_items?Y.getComposedString(l.data.product_items.map(g=>g.name)):((u=l.data)==null?void 0:u.description)??"N/A"});return(d,u)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(m,{class:"align-top"},{default:e.withCtx(()=>{var g,v,b,_,B,y,E,k,w;return[e.createElementVNode("div",Je,[e.createElementVNode("div",null,[t.data.sub_lines?(e.openBlock(),e.createBlock(I._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(d.$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)&&!i.value&&((v=t.data.details)!=null&&v.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:_.split_pricing)!=null&&B.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,(O,S)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createTextVNode(e.toDisplayString(O.meter_property.name)+": "+e.toDisplayString(O.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,[r.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),r.value.amount?(e.openBlock(),e.createBlock(p._sfc_main,{key:0,value:r.value.amount},null,8,["value"])):e.createCommentVNode("",!0)],64)):r.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)):r.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),r.value.amount?(e.openBlock(),e.createBlock(p._sfc_main,{key:0,value:r.value.amount},null,8,["value"])):e.createCommentVNode("",!0)],64)):r.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(r.value.value),1)],64)):r.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(r.value.value),1)],64)):e.createCommentVNode("",!0)])]}),_:3}),e.renderSlot(d.$slots,"line-content",{details:t.data.details})],64))}}),rt=(t,n,a)=>{var l,c;if(t==="PASS_THROUGH")return{kind:"hidden"};if(a&&((c=(l=n==null?void 0:n.conversion)==null?void 0:l.credits)!=null&&c.quantity))return{kind:"conversion-credits",value:n.conversion.credits.quantity};if(n!=null&&n.price_bound){const{price_bound:o,meter_value:i,band:r}=n;return o==="BELOW_MINIMUM_AMOUNT"||o==="ABOVE_MAXIMUM_AMOUNT"?{kind:"raw",value:i.count}:o==="NOT_HIT"&&"amount"in i&&i.amount?{kind:"amount",amount:i.amount}:o==="NOT_HIT"&&"number"in i&&i.number?{kind:"raw",value:i.number}:o==="RATIO"&&i.number?{kind:"number",value:+i.number}:o==="BELOW_MINIMUM_NUMBER"&&(r!=null&&r.minimum_number)?{kind:"number",value:+r.minimum_number}:o==="ABOVE_MAXIMUM_NUMBER"&&(r!=null&&r.maximum_number)?{kind:"number",value:+r.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:i,amount:r}=n;if(o==="BELOW_MINIMUM_AMOUNT"&&(i!=null&&i.minimum_amount))return{kind:"amount",amount:i.minimum_amount};if(o==="ABOVE_MAXIMUM_AMOUNT"&&(i!=null&&i.maximum_amount))return{kind:"amount",amount:i.maximum_amount};if(o==="RATIO")return{kind:"amount",amount:(a==="PER_SEAT"?i==null?void 0:i.amount:void 0)??r,suffix:{kind:"tier-top-bound"}};if(lt.includes(o)){if(i&&i.amount)return{kind:"amount",amount:i.amount};if(i&&"percentage"in i)return{kind:"percentage",value:i.percentage};if(i&&r)return{kind:"amount",amount:r,suffix:{kind:"fixed-amount"}}}return{kind:"hidden"}}const l=n==null?void 0:n.band,c=n==null?void 0:n.amount;return l&&l.amount?{kind:"amount",amount:l.amount,suffix:{kind:"block-size-or-per-unit"}}:l&&"percentage"in l?{kind:"percentage",value:l.percentage}:l&&c?t==="STAIR_STEP"||t==="STAIR_STEP_TOP_UP"?{kind:"amount",amount:c,suffix:{kind:"fixed-amount"}}:t==="TOP_TIERED"?{kind:"amount",amount:c,suffix:{kind:"per-unit"}}:t==="FLAT"?{kind:"amount",amount:c,suffix:{kind:"flat-fee"}}:{kind:"amount",amount:c}:{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"},_t={key:1,class:"inline-block"},Bt={class:"flex items-center justify-end gap-1"},Z=e.defineComponent({__name:"InvoiceRowContent",props:{pricingType:{},details:{},amount:{},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}),l=e.computed(()=>{var y;return(y=a.value)==null?void 0:y.available_included_volume}),c=e.computed(()=>rt(n.pricingType,n.details,n.preferConversionCredits)),o=e.computed(()=>ct(n.pricingType,n.details,n.modelType)),{$t:i,formatNumber:r}=C.useIntl(),s=e.computed(()=>i({id:"invoice.line.fixed_amount",defaultMessage:"Fixed amount",description:"Label shown when a price band charges a fixed amount regardless of usage"})),d=e.computed(()=>i({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 i({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})}),v=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"?i({id:"invoice.line.per_seat",defaultMessage:"Per seat",description:"Label shown when a price band applies per single seat"}):i({id:"invoice.line.per_unit",defaultMessage:"Per unit",description:"Label shown when a price band applies per single unit"})),_=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}),B=e.computed(()=>{if(_.value!==void 0)return i({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:+_.value,formattedCount:r(+_.value)})});return(y,E)=>(e.openBlock(),e.createElementBlock(e.Fragment,null,[e.createVNode(m,{number:"",class:"align-top"},{default:e.withCtx(()=>{var k;return[c.value.kind==="raw"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createTextVNode(e.toDisplayString(c.value.value),1)],64)):c.value.kind==="amount"?(e.openBlock(),e.createBlock(p._sfc_main,{key:1,value:c.value.amount},null,8,["value"])):c.value.kind==="number"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:2},[e.createTextVNode(e.toDisplayString(e.unref(r)(c.value.value)),1)],64)):c.value.kind==="conversion-credits"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:3},[e.createTextVNode(e.toDisplayString(e.unref(r)(+c.value.value,{maximumFractionDigits:e.unref(q.MAX_FRACTION_DIGITS)})),1)],64)):c.value.kind==="one"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:4},[e.createTextVNode("1")],64)):e.createCommentVNode("",!0),c.value.kind!=="conversion-credits"&&c.value.kind!=="hidden"&&!((k=t.details)!=null&&k.price_bound)&&l.value?(e.openBlock(),e.createElementBlock("div",dt,[l.value.type==="AMOUNT"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(p._sfc_main,{value:l.value.amount},null,8,["value"]),e.createTextVNode(" "+e.toDisplayString(e.unref(i)({id:"invoice.line.included",defaultMessage:"included",description:"Used to specify an included amount. Should be lowercase."})),1)],64)):l.value.type==="NUMBER"?(e.openBlock(),e.createElementBlock("span",st,e.toDisplayString(l.value.number)+" "+e.toDisplayString(e.unref(i)({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(i)({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,O,S,A;return[o.value.kind==="amount"?(e.openBlock(),e.createElementBlock(e.Fragment,{key:0},[e.createVNode(p._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)):v.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},[B.value?(e.openBlock(),e.createElementBlock("div",ft,e.toDisplayString(B.value),1)):t.modelType!=="RECURRING"?(e.openBlock(),e.createElementBlock("div",gt,e.toDisplayString(b.value),1)):e.createCommentVNode("",!0)],64)):((O=o.value.suffix)==null?void 0:O.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(d.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(p._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,O,S,A;return[(w=(k=t.details)==null?void 0:k.amount)!=null&&w.currency&&((S=(O=t.details)==null?void 0:O.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,(G,f)=>{var N;return e.openBlock(),e.createElementBlock("div",{key:f,class:"inline-block"},[e.createElementVNode("div",ht,[e.createVNode(p._sfc_main,{value:t.amount??t.details.amount,"data-testid":f===0?e.unref(H):void 0},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(i)({id:"invoice.line.original_currency",defaultMessage:"Original currency",description:"Original currency"}))+" ",1),e.createVNode(p._sfc_main,{value:t.details.pricing_amount,class:"font-semibold"},null,8,["value"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(I._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(i)({id:"invoice.line.excl.tax",defaultMessage:"Excl. tax",description:"Value excludes tax"}))+" ",1),e.createVNode(p._sfc_main,{value:G.base_amount},null,8,["value"])],64)):(e.openBlock(),e.createElementBlock(e.Fragment,{key:1},[e.createTextVNode(e.toDisplayString(e.unref(i)({id:"invoice.line.incl.tax",defaultMessage:"Incl. tax",description:"Value includes tax"}))+" ",1),e.createVNode(p._sfc_main,{value:G.total_amount},null,8,["value"])],64))]))])}),128)):(e.openBlock(),e.createElementBlock("div",_t,[e.createElementVNode("div",Bt,[e.createVNode(p._sfc_main,{value:t.amount??t.details.amount,"data-testid":e.unref(H)},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(i)({id:"invoice.line.original_currency",defaultMessage:"Original currency",description:"Original currency"}))+" ",1),e.createVNode(p._sfc_main,{value:t.details.pricing_amount,class:"font-semibold"},null,8,["value"])]),_:1})]),_:1})]),default:e.withCtx(()=>[e.createVNode(I._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=["DISCOUNT","MARKUP"],Ct=t=>{const n=[...t].sort((i,r)=>i.line_order-r.line_order),a=i=>Nt.includes(i.type),l=i=>!!i.pricing_item_config_id&&n.some(r=>!a(r)&&r.pricing_item_config_id===i.pricing_item_config_id),c=n.filter(i=>a(i)&&l(i)),o=n.filter(i=>!c.includes(i));return c.forEach(i=>{const r=o.findLastIndex(s=>s.pricing_item_config_id===i.pricing_item_config_id&&(!a(s)||c.includes(s)));o.splice(r+1,0,i)}),o},Tt=["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(()=>Ct(n.group.lines??[])),l=C.useIntl(),{getIsOpen:c,toggle:o}=W.useToggleList(),i=(s,d)=>{o(r(s,d))},r=(s,d)=>`${s}-line-${d}`;return(s,d)=>(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(l).$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(l).$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(l).$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(l).$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(l).$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:v=>i(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(c)(r(t.group.group_order,u.line_order))},{"invoice-line-prefix":e.withCtx(v=>[e.renderSlot(s.$slots,"invoice-line-prefix",e.mergeProps({ref_for:!0},v))]),"line-content":e.withCtx(v=>{var b,_;return[e.createVNode(Z,{details:v.details,amount:t.amountType==="INCLUDING_TAX"?u.amount_including_tax:u.amount_excluding_tax,"pricing-type":u.pricing_type,"tax-categories":u.tax_categories,"amount-type":t.amountType,"model-type":(_=(b=u.product_items)==null?void 0:b[0])==null?void 0:_.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(B=>[e.renderSlot(s.$slots,"one-off-line-context-menu",e.mergeProps({ref_for:!0},B,{lineOrder:u.line_order}))]),key:"0"}:void 0]),1032,["details","amount","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,Tt),e.createVNode(Q,{ref_for:!0,ref:r(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(c)(r(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(v=>[e.renderSlot(s.$slots,"invoice-line-prefix",e.mergeProps({ref_for:!0},v))]),"subline-content":e.withCtx(v=>{var b,_;return[e.createVNode(Z,{details:v.details,"hide-tax-details":v.hideTaxDetails,"prefer-conversion-credits":"","pricing-type":u.pricing_type,"tax-categories":u.tax_categories,"amount-type":t.amountType,"model-type":(_=(b=u.product_items)==null?void 0:b[0])==null?void 0:_.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})]))}}),Vt={class:"flex items-center"},Et={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,([l])=>{a.value=l.target.clientWidth<l.target.scrollWidth}),(l,c)=>(e.openBlock(),e.createElementBlock("div",Vt,[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",Et,e.toDisplayString(t.count),1)):e.createCommentVNode("",!0)]))}}),wt=["tabindex"],It={key:0},Ot={colspan:"2",class:"p-0"},St={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},$t=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 l,c,o;const i=[(l=n.group.pricing)==null?void 0:l.name,Y.getComposedString(((c=n.group.products)==null?void 0:c.map(d=>d.name))??[])].filter(Boolean).join(" - "),r=je(n.group,!!n.showOriginalCustomerInvoiceLine);if(!r)return i;const s=(o=n.forwardedFromCustomers)==null?void 0:o.find(d=>d.id===r);return[s&&ae.getCustomerName(s),i].filter(Boolean).join(" - ")});return(l,c)=>(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:c[0]||(c[0]=o=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))),onKeyup:[c[1]||(c[1]=e.withKeys(o=>t.handleToggleItems(t.formatIndex(t.invoicePeriodOrder,t.groupOrder)),["enter"])),c[2]||(c[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(I._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(p._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(p._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,wt),t.forceExpanded||t.expandedItems.includes(t.formatIndex(t.invoicePeriodOrder,t.groupOrder))?(e.openBlock(),e.createElementBlock("tr",It,[e.createElementVNode("td",Ot,[e.createElementVNode("div",St,[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(l.$slots,"invoice-line-prefix",e.normalizeProps(e.guardReactiveProps(o)))]),"one-off-line-context-menu":e.withCtx(o=>[e.renderSlot(l.$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(),l=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"})})),c=o=>K.formatInvoiceWalletBalanceValue(o,{formatMoney:q.formatAmount,formatQuantity:i=>i});return(o,i)=>l.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(l.value,r=>(e.openBlock(),e.createElementBlock("tr",{key:r.key},[e.createVNode(m,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(r.label),1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c(r.availableBalance)),1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c(r.usedBalance)),1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c(r.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 Mt(t=!1,n={}){const{truthyValue:a=!0,falsyValue:l=!1}=n,c=e.isRef(t),o=e.ref(t);function i(r){if(arguments.length)return o.value=r,o.value;{const s=te(a);return o.value=o.value===s?te(l):s,o.value}}return c?i:[o,i]}const Dt={key:0,totals:"",class:"border-t break-inside-avoid"},ne=e.defineComponent({__name:"InvoiceSummaryTotalExcludingTax",props:{baseAmount:{}},setup(t){const n=C.useIntl();return(a,l)=>t.baseAmount?(e.openBlock(),e.createElementBlock("tr",Dt,[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(p._sfc_main,{value:t.baseAmount,"data-testid":e.unref(_e)},null,8,["value","data-testid"])]),_:1})])):e.createCommentVNode("",!0)}}),Pt={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,l)=>t.totalAmount?(e.openBlock(),e.createElementBlock("tr",Pt,[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(p._sfc_main,{value:t.totalAmount,"data-testid":e.unref(be)},null,8,["value","data-testid"])]),_:1})])):e.createCommentVNode("",!0)}}),At={key:0,colspan:"4",class:"p-0"},Lt=e.defineComponent({__name:"InvoiceTaxes",props:{taxCategories:{}},setup(t){const n=C.useIntl();return(a,l)=>(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,(c,o)=>(e.openBlock(),e.createElementBlock("tr",{key:o},[c.rates?(e.openBlock(),e.createElementBlock("td",At,[e.createVNode($,{class:"table-fixed"},{default:e.withCtx(()=>[(e.openBlock(!0),e.createElementBlock(e.Fragment,null,e.renderList(c.rates,(i,r)=>(e.openBlock(),e.createElementBlock("tr",{key:r},[e.createVNode(m,null,{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.name)+" ("+e.toDisplayString(c.category)+") ",1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(p._sfc_main,{value:c.base_amount},null,8,["value"])]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(i.percentage)+"%",1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(p._sfc_main,{value:i.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(c.name)+" ("+e.toDisplayString(c.category)+") ",1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(p._sfc_main,{value:c.base_amount},null,8,["value"])]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(c.percentage)+"%",1)]),_:2},1024),e.createVNode(m,{number:""},{default:e.withCtx(()=>[e.createVNode(p._sfc_main,{value:c.tax_amount},null,8,["value"])]),_:2},1024)],64))]))),128))]),_:1}))}}),Ut={class:"flex items-start justify-between"},Ft={key:0,class:"max-h-9"},Rt={class:"flex flex-col gap-2"},zt={key:0},qt={key:3},Wt={colspan:"2",class:"p-0"},Gt=["tabindex"],Xt={key:1},Ht={colspan:"2",class:"p-0"},Kt={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},jt=["tabindex","onClick","onKeyup"],Yt={key:0},Qt={colspan:"2",class:"p-0"},Jt={class:"-mx-9 bg-gray-50 px-9 py-3 text-xs"},Zt={key:1},en={colspan:"2",class:"p-0"},tn={key:0,class:"break-inside-avoid border-t font-bold"},nn=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:l}=a,c=n,o=t,[i,r]=J(),[s,d]=J(),[u,g]=Mt(),v=(...f)=>{o.isExpandable&&r(...f)},b=f=>{o.isExpandable&&d(f)},_=()=>{!o.invoice.tax_categories||!o.isExpandable||g()},B=(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)}),O=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:l({defaultMessage:"Invoice line",id:"JlhdD2",description:"Label for adding an invoice line"}),onClick:()=>c("add-invoice-line")}),o.isNoteCreatable&&f.push({label:l({defaultMessage:"Note",id:"jB8+k/",description:"Label for adding a note to an invoice"}),onClick:()=>c("add-note")}),f}),A=e.computed(()=>o.invoice.show_tax_per_line_item!==!1),G=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",Ut,[f.$slots.logo?(e.openBlock(),e.createElementBlock("div",Ft,[e.renderSlot(f.$slots,"logo")])):(e.openBlock(),e.createBlock(fe._sfc_main,{key:1,title:G.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",Rt,[(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(I._sfc_main,{"icon-prefix":"add",size:"sm",intent:"secondary"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(l)({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(O(V)),([h,L],D)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:h},[D>0?(e.openBlock(),e.createElementBlock("tr",zt,[...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,(U,le)=>(e.openBlock(),e.createElementBlock(e.Fragment,{key:le},[h==="REVENUE"||h==="PRICING"||h==="ONE_OFF"?(e.openBlock(),e.createBlock($t,{key:0,group:U,"expanded-items":e.unref(i),"handle-toggle-items":v,"is-expandable":t.isExpandable,"force-expanded":t.forceExpanded,"format-index":B,"invoice-period-order":V.period_order,"group-order":U.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(F=>[e.renderSlot(f.$slots,"invoice-line-prefix",e.mergeProps({ref_for:!0},F))]),"one-off-line-context-menu":e.withCtx(F=>[e.renderSlot(f.$slots,"one-off-line-context-menu",e.mergeProps({ref_for:!0},F,{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:U,"expanded-items":e.unref(i),"handle-toggle-items":v,"is-expandable":t.isExpandable,"force-expanded":t.forceExpanded,"format-index":B,"invoice-period-order":V.period_order,"group-order":U.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(F=>[e.renderSlot(f.$slots,"invoice-line-prefix",e.mergeProps({ref_for:!0},F))]),_: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:U,"expanded-items":e.unref(i),"handle-toggle-items":v,"is-expandable":t.isExpandable,"force-expanded":t.forceExpanded,"format-index":B,"invoice-period-order":V.period_order,"group-order":U.group_order,"amount-type":t.invoice.pricing_amount_type},{"invoice-line-prefix":e.withCtx(F=>[e.renderSlot(f.$slots,"invoice-line-prefix",e.mergeProps({ref_for:!0},F))]),_:3},8,["group","expanded-items","is-expandable","force-expanded","invoice-period-order","group-order","amount-type"])):e.createCommentVNode("",!0),w(U)?(e.openBlock(),e.createElementBlock("tr",qt,[e.createElementVNode("td",Wt,[e.createVNode(ee,{lines:U.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:_,onKeyup:[e.withKeys(_,["enter"]),e.withKeys(_,["space"])]},[e.createVNode(m,null,{default:e.withCtx(()=>[t.isExpandable&&t.invoice.tax_categories&&t.invoice.tax_categories.length?(e.openBlock(),e.createBlock(I._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(p._sfc_main,{value:t.invoice.tax_summary.tax_amount,"data-testid":e.unref(he)},null,8,["value","data-testid"])]),_:1})],42,Gt)):e.createCommentVNode("",!0)],64)):e.createCommentVNode("",!0),(t.forceExpanded||e.unref(u))&&t.invoice.tax_categories?(e.openBlock(),e.createElementBlock("tr",Xt,[e.createElementVNode("td",Ht,[e.createElementVNode("div",Kt,[e.createVNode(Lt,{"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(B(M,L)),onKeyup:[e.withKeys(D=>b(B(M,L)),["enter"]),e.withKeys(D=>b(B(M,L)),["space"])]},[e.createVNode(m,{class:"p-0"},{default:e.withCtx(()=>{var D;return[t.isExpandable?(e.openBlock(),e.createBlock(I._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(B(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(p._sfc_main,{value:h.amount_excluding_tax,"data-testid":e.unref(Be),"data-type":e.unref(Ce)},null,8,["value","data-testid","data-type"])]),_:2},1024)],42,jt),t.forceExpanded||e.unref(s).includes(B(M,L))?(e.openBlock(),e.createElementBlock("tr",Yt,[e.createElementVNode("td",Qt,[e.createElementVNode("div",Jt,[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",Zt,[e.createElementVNode("td",en,[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",tn,[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(p._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=nn;exports._sfc_main$1=x;exports._sfc_main$2=m;
@@ -1,20 +1,20 @@
1
1
  import { ref as re, openBlock as t, createElementBlock as o, renderSlot as $, defineComponent as S, normalizeClass as N, Fragment as p, renderList as V, createVNode as a, withCtx as i, createElementVNode as _, createTextVNode as v, toDisplayString as r, createBlock as h, unref as l, createCommentVNode as b, createSlots as Ie, withKeys as j, normalizeProps as fe, guardReactiveProps as ve, computed as B, mergeProps as Q, isRef as Ae } from "vue";
2
- import { a as G, _ as Pe, l as pe } from "./customElements-D5DAoHRI.mjs";
2
+ import { a as G, _ as Pe, l as pe } from "./customElements-B58FcXIN.mjs";
3
3
  import { _ as I } from "./Amount.vue.es-DPqHB8Xd.mjs";
4
4
  import { i as Ue } from "./useService-Bh47bllz.mjs";
5
- import { a as H, _ as Le } from "./Button.vue.es-C32_baQN.mjs";
5
+ import { a as H, _ as Le } from "./Button.vue.es-Cmjfm4jw.mjs";
6
6
  import { _ as Se } from "./floating-ui.vue.es-CYt0fSY7.mjs";
7
7
  import { a as Me } from "./customer.es-B5ppZf0j.mjs";
8
8
  import { M as $e, f as we, a as De } from "./formatting.es-RclXHhKo.mjs";
9
9
  import { _ as Ee, u as ge } from "./Comparators.vue.es-CwhX3rbx.mjs";
10
- import { _ as Re } from "./Chip.vue.es-CKCOY5T6.mjs";
10
+ import { _ as Re } from "./Chip.vue.es-DksjbJO8.mjs";
11
11
  import { g as ye } from "./getComposedString.es-C__uhJpd.mjs";
12
- import { _ as de, T as ue, a as ce } from "./TooltipParagraph.vue.es-BXbOJmjr.mjs";
12
+ import { _ as de, T as ue, a as ce } from "./TooltipParagraph.vue.es-B9A17aG7.mjs";
13
13
  import { f as Fe } from "./index.es-CXkP_k3u.mjs";
14
14
  import { g as Ve, a as We, f as ze } from "./wallets.es-eH2C2ygn.mjs";
15
- import { _ as Ge } from "./DividerText.vue.es-DKl3FnDJ.mjs";
16
- import { _ as He } from "./IconTitle.vue.es-CK9k69tV.mjs";
17
- import { a as Xe } from "./ContextMenu.vue.es-Da-lAmTl.mjs";
15
+ import { _ as Ge } from "./DividerText.vue.es-nAo1eRMV.mjs";
16
+ import { _ as He } from "./IconTitle.vue.es-B_8bS0tn.mjs";
17
+ import { a as Xe } from "./ContextMenu.vue.es-zRvoEJlV.mjs";
18
18
  const xe = (e = []) => {
19
19
  const n = re(e);
20
20
  return [n, (m) => {
@@ -1,11 +1,11 @@
1
1
  import { defineComponent as V, openBlock as a, createElementBlock as u, normalizeStyle as X, normalizeClass as m, renderSlot as b, createBlock as T, unref as s, createCommentVNode as r, createElementVNode as c, createTextVNode as k, toDisplayString as w, withCtx as g, useSlots as ie, computed as v, ref as h, useId as de, watch as re, onMounted as ue, onBeforeUnmount as ce, createVNode as x, Transition as fe, withModifiers as me, nextTick as be } from "vue";
2
2
  import { o as G } from "./index.es-CXkP_k3u.mjs";
3
- import { _ as ye, F as xe } from "./ContextMenu.vue.es-Da-lAmTl.mjs";
4
- import { b as ve, _ as P } from "./Button.vue.es-C32_baQN.mjs";
3
+ import { _ as ye, F as xe } from "./ContextMenu.vue.es-zRvoEJlV.mjs";
4
+ import { b as ve, _ as P } from "./Button.vue.es-Cmjfm4jw.mjs";
5
5
  import { i as N } from "./slots.es-BA4MyEAa.mjs";
6
- import { _ as he } from "./Avatar.vue.es-BqQHvLGA.mjs";
7
- import { _ as ge, a as we } from "./customElements-D5DAoHRI.mjs";
8
- import { _ as ze } from "./IconButton.vue.es-UlqwNPAX.mjs";
6
+ import { _ as he } from "./Avatar.vue.es-sfMZiX7A.mjs";
7
+ import { _ as ge, a as we } from "./customElements-B58FcXIN.mjs";
8
+ import { _ as ze } from "./IconButton.vue.es-DvfErUOq.mjs";
9
9
  import { _ as ke } from "./floating-ui.vue.es-CYt0fSY7.mjs";
10
10
  const A = 60, Z = "z-index-tracker", Be = () => ({
11
11
  defaultZIndex: A,
@@ -1 +1 @@
1
- const e=require("vue"),M=require("./index.es-BclokHQX.js"),L=require("./ContextMenu.vue.es-C7KI8Gz6.js"),k=require("./Button.vue.es-qGvnOKnK.js"),C=require("./slots.es-T9ZJRGtG.js"),X=require("./Avatar.vue.es-Bm6MCMAL.js"),q=require("./customElements-C963-LtW.js"),Y=require("./IconButton.vue.es-Bwdfu-jm.js"),J=require("./floating-ui.vue.es-Bly3DGWm.js"),w=60,B="z-index-tracker",Q=()=>({defaultZIndex:w,getZIndex:()=>{const o=document.querySelectorAll(`.${B}`);let i=w;return(o??[]).forEach(s=>{const r=window.getComputedStyle(s).getPropertyValue("z-index");r&&+r>=i&&(i=+r+1)}),i},getTopZIndex:()=>{const o=document.querySelectorAll(`.${B}`);let i=w;return(o??[]).forEach(s=>{const r=window.getComputedStyle(s).getPropertyValue("z-index");r&&+r>i&&(i=+r)}),i},trackingClass:B}),W=e.defineComponent({__name:"Backdrop",props:{blurred:{type:Boolean,default:!1},color:{default:"gray"},zIndex:{}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["fixed inset-0",{"bg-white/90 backdrop-blur":t.blurred&&t.color==="white","bg-white/80":!t.blurred&&t.color==="white","bg-gray-200/90 backdrop-blur":t.blurred&&t.color==="gray","bg-gray-200/80":!t.blurred&&t.color==="gray"}]),style:e.normalizeStyle({zIndex:t.zIndex})},[e.renderSlot(n.$slots,"default")],6))}}),_={class:"grow overflow-hidden text-ellipsis"},ee=e.defineComponent({__name:"Title",props:{title:{},subTitle:{},variant:{default:"default"},suffix:{},size:{default:"md"},avatar:{type:Boolean,default:!1},uppercase:{type:Boolean,default:!0},resourceId:{}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex text-left",{"gap-4":["md","lg"].includes(t.size),"gap-3":t.size==="sm","gap-2":t.size==="xs"&&t.variant!=="transparent","gap-1":t.size==="xs"&&t.variant==="transparent"}])},[t.avatar&&t.title?(e.openBlock(),e.createBlock(e.unref(X._sfc_main),{key:0,initials:t.title.slice(0,1),"color-hash":t.title,size:["sm","xs"].includes(t.size)?"lg":"xl"},null,8,["initials","color-hash","size"])):e.createCommentVNode("",!0),e.createElementVNode("div",_,[t.title||n.$slots.default?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([{"text-3xl":t.size==="lg","text-2xl":t.size==="md","text-base":t.size==="sm","text-xs text-subtle":t.size==="xs","text-default":t.size!=="xs",uppercase:t.size==="xs"&&t.uppercase,"font-general-sans":["md","lg"].includes(t.size)},"flex items-center font-semibold"])},[e.renderSlot(n.$slots,"prefix"),e.renderSlot(n.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),e.renderSlot(n.$slots,"suffix",{},()=>[e.createTextVNode(e.toDisplayString(t.suffix),1)])],2)):e.createCommentVNode("",!0),t.subTitle||n.$slots.subTitle&&!e.unref(C.isVnodeEmpty)(n.$slots.subTitle({}))?(e.openBlock(),e.createBlock(e.unref(q._sfc_main),{key:1,variant:"body-sm",color:"secondary","no-spacing":"",class:"mt-1"},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"subTitle",{},()=>[e.createTextVNode(e.toDisplayString(t.subTitle),1)])]),_:3})):e.createCommentVNode("",!0)])],2))}}),te=["aria-label","aria-labelledby","aria-busy"],le={key:0,role:"status",class:"absolute bottom-0 left-0 right-0 top-0 z-10 flex items-center justify-center bg-white/80"},oe={class:"sr-only"},ae={key:1,"data-testid":"modal-top-bar",class:"flex justify-end border-b border-gray-200 py-2 pr-2"},ne={"aria-hidden":"true",class:"sticky top-0 z-10 -mx-6 h-0"},se={"data-testid":"modal-body-content",class:"py-6"},re=["id"],ie={"aria-hidden":"true",class:"sticky bottom-0 z-10 -mx-6 h-0"},de={key:0},ce={key:3,"data-testid":"modal-footer",class:"border-t border-gray-200 px-6 py-3 [&_button]:w-full"},ue={class:"flex flex-col gap-2"},fe=e.defineComponent({__name:"Modal",props:{children:{default:()=>[]},size:{default:"2xl"},noCloseButton:{type:Boolean,default:!1},noClickAway:{type:Boolean,default:!1},noBackdropClose:{type:Boolean,default:!1},showModal:{type:Boolean,default:!1},blurred:{type:Boolean,default:!1},title:{},subTitle:{},confirmButtonText:{},cancelButtonText:{},overflowVisible:{type:Boolean},isLoading:{type:Boolean,default:!1},isEmbedded:{type:Boolean,default:!1},ariaLabel:{},ariaLabelledby:{}},emits:["confirm","close"],setup(t,{emit:n}){const o=t,i=n,s=e.useSlots(),{$t:r}=q.useIntl(),z=e.computed(()=>{var l,a;return!!((l=s.body)!=null&&l.call(s))&&!C.isVnodeEmpty((a=s.body)==null?void 0:a.call(s,{}))}),u=e.computed(()=>{var l,a;return!!o.title||!!((l=s.header)!=null&&l.call(s))&&!C.isVnodeEmpty((a=s.header)==null?void 0:a.call(s,{}))}),D=e.computed(()=>z.value||u.value),{getZIndex:A,getTopZIndex:Z,trackingClass:R,defaultZIndex:E}=Q(),m=e.ref(),c=e.ref(),f=e.ref(E),p=e.useId(),V=e.computed(()=>{if(o.ariaLabelledby)return o.ariaLabelledby;if(!o.ariaLabel&&!o.title&&u.value)return p}),F=e.computed(()=>{if(!V.value)return o.ariaLabel||o.title||void 0}),S=e.ref(!1),N=e.ref(!1),K=e.computed(()=>o.blurred||o.isEmbedded),O={xs:"max-w-xs",sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl","3xl":"max-w-3xl","4xl":"max-w-4xl","5xl":"max-w-5xl","6xl":"max-w-6xl","7xl":"max-w-7xl"},U=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])",'[contenteditable="true"]','[tabindex]:not([tabindex^="-"])'].join(","),y=e.ref(null),T=()=>c.value?Array.from(c.value.querySelectorAll(U)).filter(l=>!l.closest('[aria-hidden="true"]')):[],j=()=>{const l=c.value;if(!l)return;(l.querySelector("[autofocus]")??T()[0]??l).focus()},I=()=>o.showModal&&f.value>=Z(),b=()=>i("close"),H=()=>{o.noBackdropClose||b()},G=()=>{if(!m.value)return;const{scrollTop:l,scrollHeight:a,clientHeight:d}=m.value;S.value=l>0,N.value=l+d<a-1};M.onKeyStroke("Escape",()=>{o.noClickAway||!I()||b()}),M.onKeyStroke("Tab",l=>{const a=c.value;if(!a||!I())return;const d=T();if(!d.length){l.preventDefault(),a.focus();return}const v=d[0],h=d[d.length-1],g=document.activeElement;if(!a.contains(g)){l.preventDefault(),(l.shiftKey?h:v).focus();return}l.shiftKey&&g===v?(l.preventDefault(),h.focus()):!l.shiftKey&&g===h&&(l.preventDefault(),v.focus())});const x=l=>{const a=document.querySelector("body");a&&(a.style.overflowY=l)},$=async()=>{f.value=A(),x("hidden"),y.value=document.activeElement,await e.nextTick(),j()},P=()=>{var l;f.value=E,x("unset"),(l=y.value)==null||l.focus(),y.value=null};return e.watch(()=>o.showModal,l=>l?$():P()),e.onMounted(()=>{o.showModal&&$()}),e.onBeforeUnmount(()=>{x("unset")}),(l,a)=>(e.openBlock(),e.createBlock(e.unref(L._sfc_main),{to:"modal"},{default:e.withCtx(()=>[e.createVNode(e.Transition,{name:"modal",appear:""},{default:e.withCtx(()=>[t.showModal?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["h-modal z-60 fixed left-0 right-0 top-0 flex w-full items-center justify-center overflow-y-auto overflow-x-hidden md:inset-0 md:h-full",e.unref(R)]),style:e.normalizeStyle({zIndex:f.value})},[e.createVNode(e.unref(W),{"aria-hidden":"true",blurred:K.value,color:o.isEmbedded?"white":void 0,onMousedown:e.withModifiers(H,["self"])},null,8,["blurred","color"]),e.createElementVNode("div",{class:e.normalizeClass(["modal-panel relative h-full w-full p-4 md:h-auto",`${O[t.size]}`])},[e.createElementVNode("div",{ref_key:"dialogElementRef",ref:c,role:"dialog","aria-modal":"true",tabindex:"-1","aria-label":F.value,"aria-labelledby":V.value,"aria-busy":t.isLoading,class:"relative flex max-h-[min(95vh,920px)] flex-col rounded-xl bg-white shadow-lg focus:outline-none"},[t.isLoading?(e.openBlock(),e.createElementBlock("div",le,[e.createVNode(k._sfc_main$2,{size:"6","aria-hidden":"true"}),e.createElementVNode("span",oe,e.toDisplayString(e.unref(r)({defaultMessage:"Loading",id:"h+GlcT",description:"Modal loading state"})),1)])):e.createCommentVNode("",!0),t.noCloseButton?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ae,[e.createVNode(e.unref(Y._sfc_main),{icon:"close",size:"xs",intent:"secondary","data-testid":"close-button","aria-label":e.unref(r)({defaultMessage:"Close",id:"U+ONwt",description:"Modal close button"}),onClick:b},null,8,["aria-label"])])),D.value?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"contentElementRef",ref:m,class:e.normalizeClass(["overflow-auto px-6",{"overflow-visible":t.overflowVisible}]),onScroll:G},[e.createElementVNode("div",ne,[e.createElementVNode("div",{class:e.normalizeClass(["transition-duration-700 pointer-events-none h-6 w-full bg-gradient-to-b from-black/[.06] to-transparent transition-opacity",S.value?"opacity-100":"opacity-0"])},null,2)]),e.createElementVNode("div",se,[u.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(p)},[e.renderSlot(l.$slots,"header",{},()=>[t.title?(e.openBlock(),e.createBlock(ee,{key:0,title:t.title,"sub-title":t.subTitle,size:"md"},null,8,["title","sub-title"])):e.createCommentVNode("",!0)],!0)],8,re)):e.createCommentVNode("",!0),z.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass({"mt-4":u.value})},[e.renderSlot(l.$slots,"body",{},void 0,!0)],2)):e.createCommentVNode("",!0)]),e.createElementVNode("div",ie,[e.createElementVNode("div",{class:e.normalizeClass(["transition-duration-700 pointer-events-none h-6 w-full -translate-y-6 bg-gradient-to-t from-black/[.06] to-transparent transition-opacity",N.value?"opacity-100":"opacity-0"])},null,2)])],34)):e.createCommentVNode("",!0),e.createVNode(L.Fade,null,{default:e.withCtx(()=>[l.$slots.error?(e.openBlock(),e.createElementBlock("div",de,[e.renderSlot(l.$slots,"error",{},void 0,!0)])):e.createCommentVNode("",!0)]),_:3}),l.$slots.footer||t.confirmButtonText||t.cancelButtonText?(e.openBlock(),e.createElementBlock("div",ce,[e.renderSlot(l.$slots,"footer",{},()=>[e.createElementVNode("div",ue,[e.createVNode(e.unref(k._sfc_main),{size:"md",autofocus:"",loading:t.isLoading,onClick:a[0]||(a[0]=d=>l.$emit("confirm"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.confirmButtonText||e.unref(r)({defaultMessage:"Confirm",id:"N2IrpM",description:"Modal comfirm button"})),1)]),_:1},8,["loading"]),e.createVNode(e.unref(k._sfc_main),{size:"md",intent:"secondary",onClick:a[1]||(a[1]=d=>l.$emit("close"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.cancelButtonText||e.unref(r)({defaultMessage:"Cancel",id:"47FYwb",description:"Modal cancel button"})),1)]),_:1})])],!0)])):e.createCommentVNode("",!0)],8,te)],2)],6)):e.createCommentVNode("",!0)]),_:3})]),_:3}))}}),me=J._export_sfc(fe,[["__scopeId","data-v-f0b441a8"]]);exports.Modal=me;
1
+ const e=require("vue"),M=require("./index.es-BclokHQX.js"),L=require("./ContextMenu.vue.es-DUU43tCy.js"),k=require("./Button.vue.es-BzkuglKw.js"),C=require("./slots.es-T9ZJRGtG.js"),X=require("./Avatar.vue.es-BJxSCU76.js"),q=require("./customElements-DUMRMFQ5.js"),Y=require("./IconButton.vue.es-DgQN18Am.js"),J=require("./floating-ui.vue.es-Bly3DGWm.js"),w=60,B="z-index-tracker",Q=()=>({defaultZIndex:w,getZIndex:()=>{const o=document.querySelectorAll(`.${B}`);let i=w;return(o??[]).forEach(s=>{const r=window.getComputedStyle(s).getPropertyValue("z-index");r&&+r>=i&&(i=+r+1)}),i},getTopZIndex:()=>{const o=document.querySelectorAll(`.${B}`);let i=w;return(o??[]).forEach(s=>{const r=window.getComputedStyle(s).getPropertyValue("z-index");r&&+r>i&&(i=+r)}),i},trackingClass:B}),W=e.defineComponent({__name:"Backdrop",props:{blurred:{type:Boolean,default:!1},color:{default:"gray"},zIndex:{}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["fixed inset-0",{"bg-white/90 backdrop-blur":t.blurred&&t.color==="white","bg-white/80":!t.blurred&&t.color==="white","bg-gray-200/90 backdrop-blur":t.blurred&&t.color==="gray","bg-gray-200/80":!t.blurred&&t.color==="gray"}]),style:e.normalizeStyle({zIndex:t.zIndex})},[e.renderSlot(n.$slots,"default")],6))}}),_={class:"grow overflow-hidden text-ellipsis"},ee=e.defineComponent({__name:"Title",props:{title:{},subTitle:{},variant:{default:"default"},suffix:{},size:{default:"md"},avatar:{type:Boolean,default:!1},uppercase:{type:Boolean,default:!0},resourceId:{}},setup(t){return(n,o)=>(e.openBlock(),e.createElementBlock("div",{class:e.normalizeClass(["flex text-left",{"gap-4":["md","lg"].includes(t.size),"gap-3":t.size==="sm","gap-2":t.size==="xs"&&t.variant!=="transparent","gap-1":t.size==="xs"&&t.variant==="transparent"}])},[t.avatar&&t.title?(e.openBlock(),e.createBlock(e.unref(X._sfc_main),{key:0,initials:t.title.slice(0,1),"color-hash":t.title,size:["sm","xs"].includes(t.size)?"lg":"xl"},null,8,["initials","color-hash","size"])):e.createCommentVNode("",!0),e.createElementVNode("div",_,[t.title||n.$slots.default?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass([{"text-3xl":t.size==="lg","text-2xl":t.size==="md","text-base":t.size==="sm","text-xs text-subtle":t.size==="xs","text-default":t.size!=="xs",uppercase:t.size==="xs"&&t.uppercase,"font-general-sans":["md","lg"].includes(t.size)},"flex items-center font-semibold"])},[e.renderSlot(n.$slots,"prefix"),e.renderSlot(n.$slots,"default",{},()=>[e.createTextVNode(e.toDisplayString(t.title),1)]),e.renderSlot(n.$slots,"suffix",{},()=>[e.createTextVNode(e.toDisplayString(t.suffix),1)])],2)):e.createCommentVNode("",!0),t.subTitle||n.$slots.subTitle&&!e.unref(C.isVnodeEmpty)(n.$slots.subTitle({}))?(e.openBlock(),e.createBlock(e.unref(q._sfc_main),{key:1,variant:"body-sm",color:"secondary","no-spacing":"",class:"mt-1"},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"subTitle",{},()=>[e.createTextVNode(e.toDisplayString(t.subTitle),1)])]),_:3})):e.createCommentVNode("",!0)])],2))}}),te=["aria-label","aria-labelledby","aria-busy"],le={key:0,role:"status",class:"absolute bottom-0 left-0 right-0 top-0 z-10 flex items-center justify-center bg-white/80"},oe={class:"sr-only"},ae={key:1,"data-testid":"modal-top-bar",class:"flex justify-end border-b border-gray-200 py-2 pr-2"},ne={"aria-hidden":"true",class:"sticky top-0 z-10 -mx-6 h-0"},se={"data-testid":"modal-body-content",class:"py-6"},re=["id"],ie={"aria-hidden":"true",class:"sticky bottom-0 z-10 -mx-6 h-0"},de={key:0},ce={key:3,"data-testid":"modal-footer",class:"border-t border-gray-200 px-6 py-3 [&_button]:w-full"},ue={class:"flex flex-col gap-2"},fe=e.defineComponent({__name:"Modal",props:{children:{default:()=>[]},size:{default:"2xl"},noCloseButton:{type:Boolean,default:!1},noClickAway:{type:Boolean,default:!1},noBackdropClose:{type:Boolean,default:!1},showModal:{type:Boolean,default:!1},blurred:{type:Boolean,default:!1},title:{},subTitle:{},confirmButtonText:{},cancelButtonText:{},overflowVisible:{type:Boolean},isLoading:{type:Boolean,default:!1},isEmbedded:{type:Boolean,default:!1},ariaLabel:{},ariaLabelledby:{}},emits:["confirm","close"],setup(t,{emit:n}){const o=t,i=n,s=e.useSlots(),{$t:r}=q.useIntl(),z=e.computed(()=>{var l,a;return!!((l=s.body)!=null&&l.call(s))&&!C.isVnodeEmpty((a=s.body)==null?void 0:a.call(s,{}))}),u=e.computed(()=>{var l,a;return!!o.title||!!((l=s.header)!=null&&l.call(s))&&!C.isVnodeEmpty((a=s.header)==null?void 0:a.call(s,{}))}),D=e.computed(()=>z.value||u.value),{getZIndex:A,getTopZIndex:Z,trackingClass:R,defaultZIndex:E}=Q(),m=e.ref(),c=e.ref(),f=e.ref(E),p=e.useId(),V=e.computed(()=>{if(o.ariaLabelledby)return o.ariaLabelledby;if(!o.ariaLabel&&!o.title&&u.value)return p}),F=e.computed(()=>{if(!V.value)return o.ariaLabel||o.title||void 0}),S=e.ref(!1),N=e.ref(!1),K=e.computed(()=>o.blurred||o.isEmbedded),O={xs:"max-w-xs",sm:"max-w-sm",md:"max-w-md",lg:"max-w-lg",xl:"max-w-xl","2xl":"max-w-2xl","3xl":"max-w-3xl","4xl":"max-w-4xl","5xl":"max-w-5xl","6xl":"max-w-6xl","7xl":"max-w-7xl"},U=["a[href]","button:not([disabled])",'input:not([disabled]):not([type="hidden"])',"select:not([disabled])","textarea:not([disabled])",'[contenteditable="true"]','[tabindex]:not([tabindex^="-"])'].join(","),y=e.ref(null),T=()=>c.value?Array.from(c.value.querySelectorAll(U)).filter(l=>!l.closest('[aria-hidden="true"]')):[],j=()=>{const l=c.value;if(!l)return;(l.querySelector("[autofocus]")??T()[0]??l).focus()},I=()=>o.showModal&&f.value>=Z(),b=()=>i("close"),H=()=>{o.noBackdropClose||b()},G=()=>{if(!m.value)return;const{scrollTop:l,scrollHeight:a,clientHeight:d}=m.value;S.value=l>0,N.value=l+d<a-1};M.onKeyStroke("Escape",()=>{o.noClickAway||!I()||b()}),M.onKeyStroke("Tab",l=>{const a=c.value;if(!a||!I())return;const d=T();if(!d.length){l.preventDefault(),a.focus();return}const v=d[0],h=d[d.length-1],g=document.activeElement;if(!a.contains(g)){l.preventDefault(),(l.shiftKey?h:v).focus();return}l.shiftKey&&g===v?(l.preventDefault(),h.focus()):!l.shiftKey&&g===h&&(l.preventDefault(),v.focus())});const x=l=>{const a=document.querySelector("body");a&&(a.style.overflowY=l)},$=async()=>{f.value=A(),x("hidden"),y.value=document.activeElement,await e.nextTick(),j()},P=()=>{var l;f.value=E,x("unset"),(l=y.value)==null||l.focus(),y.value=null};return e.watch(()=>o.showModal,l=>l?$():P()),e.onMounted(()=>{o.showModal&&$()}),e.onBeforeUnmount(()=>{x("unset")}),(l,a)=>(e.openBlock(),e.createBlock(e.unref(L._sfc_main),{to:"modal"},{default:e.withCtx(()=>[e.createVNode(e.Transition,{name:"modal",appear:""},{default:e.withCtx(()=>[t.showModal?(e.openBlock(),e.createElementBlock("div",{key:0,class:e.normalizeClass(["h-modal z-60 fixed left-0 right-0 top-0 flex w-full items-center justify-center overflow-y-auto overflow-x-hidden md:inset-0 md:h-full",e.unref(R)]),style:e.normalizeStyle({zIndex:f.value})},[e.createVNode(e.unref(W),{"aria-hidden":"true",blurred:K.value,color:o.isEmbedded?"white":void 0,onMousedown:e.withModifiers(H,["self"])},null,8,["blurred","color"]),e.createElementVNode("div",{class:e.normalizeClass(["modal-panel relative h-full w-full p-4 md:h-auto",`${O[t.size]}`])},[e.createElementVNode("div",{ref_key:"dialogElementRef",ref:c,role:"dialog","aria-modal":"true",tabindex:"-1","aria-label":F.value,"aria-labelledby":V.value,"aria-busy":t.isLoading,class:"relative flex max-h-[min(95vh,920px)] flex-col rounded-xl bg-white shadow-lg focus:outline-none"},[t.isLoading?(e.openBlock(),e.createElementBlock("div",le,[e.createVNode(k._sfc_main$2,{size:"6","aria-hidden":"true"}),e.createElementVNode("span",oe,e.toDisplayString(e.unref(r)({defaultMessage:"Loading",id:"h+GlcT",description:"Modal loading state"})),1)])):e.createCommentVNode("",!0),t.noCloseButton?e.createCommentVNode("",!0):(e.openBlock(),e.createElementBlock("div",ae,[e.createVNode(e.unref(Y._sfc_main),{icon:"close",size:"xs",intent:"secondary","data-testid":"close-button","aria-label":e.unref(r)({defaultMessage:"Close",id:"U+ONwt",description:"Modal close button"}),onClick:b},null,8,["aria-label"])])),D.value?(e.openBlock(),e.createElementBlock("div",{key:2,ref_key:"contentElementRef",ref:m,class:e.normalizeClass(["overflow-auto px-6",{"overflow-visible":t.overflowVisible}]),onScroll:G},[e.createElementVNode("div",ne,[e.createElementVNode("div",{class:e.normalizeClass(["transition-duration-700 pointer-events-none h-6 w-full bg-gradient-to-b from-black/[.06] to-transparent transition-opacity",S.value?"opacity-100":"opacity-0"])},null,2)]),e.createElementVNode("div",se,[u.value?(e.openBlock(),e.createElementBlock("div",{key:0,id:e.unref(p)},[e.renderSlot(l.$slots,"header",{},()=>[t.title?(e.openBlock(),e.createBlock(ee,{key:0,title:t.title,"sub-title":t.subTitle,size:"md"},null,8,["title","sub-title"])):e.createCommentVNode("",!0)],!0)],8,re)):e.createCommentVNode("",!0),z.value?(e.openBlock(),e.createElementBlock("div",{key:1,class:e.normalizeClass({"mt-4":u.value})},[e.renderSlot(l.$slots,"body",{},void 0,!0)],2)):e.createCommentVNode("",!0)]),e.createElementVNode("div",ie,[e.createElementVNode("div",{class:e.normalizeClass(["transition-duration-700 pointer-events-none h-6 w-full -translate-y-6 bg-gradient-to-t from-black/[.06] to-transparent transition-opacity",N.value?"opacity-100":"opacity-0"])},null,2)])],34)):e.createCommentVNode("",!0),e.createVNode(L.Fade,null,{default:e.withCtx(()=>[l.$slots.error?(e.openBlock(),e.createElementBlock("div",de,[e.renderSlot(l.$slots,"error",{},void 0,!0)])):e.createCommentVNode("",!0)]),_:3}),l.$slots.footer||t.confirmButtonText||t.cancelButtonText?(e.openBlock(),e.createElementBlock("div",ce,[e.renderSlot(l.$slots,"footer",{},()=>[e.createElementVNode("div",ue,[e.createVNode(e.unref(k._sfc_main),{size:"md",autofocus:"",loading:t.isLoading,onClick:a[0]||(a[0]=d=>l.$emit("confirm"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.confirmButtonText||e.unref(r)({defaultMessage:"Confirm",id:"N2IrpM",description:"Modal comfirm button"})),1)]),_:1},8,["loading"]),e.createVNode(e.unref(k._sfc_main),{size:"md",intent:"secondary",onClick:a[1]||(a[1]=d=>l.$emit("close"))},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.cancelButtonText||e.unref(r)({defaultMessage:"Cancel",id:"47FYwb",description:"Modal cancel button"})),1)]),_:1})])],!0)])):e.createCommentVNode("",!0)],8,te)],2)],6)):e.createCommentVNode("",!0)]),_:3})]),_:3}))}}),me=J._export_sfc(fe,[["__scopeId","data-v-f0b441a8"]]);exports.Modal=me;
@@ -1 +1 @@
1
- const e=require("vue"),f=require("./formatting.es-C72Nsrmh.js"),l=require("./Button.vue.es-qGvnOKnK.js"),n=require("./customElements-C963-LtW.js"),u=require("./PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-DSGf6uFP.js"),_=require("./IconButton.vue.es-Bwdfu-jm.js"),h=()=>{const t=e.ref(null);return[async r=>{if(!(navigator!=null&&navigator.clipboard))return!1;try{return await navigator.clipboard.writeText(r),t.value=r,!0}catch{return t.value=null,!1}},t.value]},y=e.defineComponent({__name:"PaymentCompletedCard",props:{amount:{type:Object},variant:{type:String},redirecting:{type:Boolean}},setup(t){const a=t,{$t:r}=n.useIntl(),o=e.computed(()=>a.variant==="AUTHORIZE"?r({defaultMessage:"Payment successful",description:"The title for when a payment has been successful",id:"payment_completed_card.title.authorize"}):r({defaultMessage:"Your payment method is added",description:"The title for when a payment method was successfully added",id:"payment_completed_card.title.tokenize"}));return(i,s)=>(e.openBlock(),e.createBlock(u._sfc_main,{status:"success",title:o.value},{default:e.withCtx(()=>[t.amount?(e.openBlock(),e.createBlock(e.unref(n._sfc_main),{key:0,variant:"body-sm",class:"mt-1"},{default:e.withCtx(()=>[e.createVNode(e.unref(l._sfc_main$1),{icon:"check"}),e.createTextVNode(e.toDisplayString(e.unref(f.formatAmount)(t.amount)),1)]),_:1})):e.createCommentVNode("",!0),t.redirecting?(e.openBlock(),e.createBlock(e.unref(n._sfc_main),{key:1,variant:"body-xs",color:"subtle"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"You are being redirected...",description:"The text shown after a successful message before a redirect",id:"payment_completed_card.redirect_message"})),1)]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["title"]))}});function g(t){return{UNKNOWN_ERROR:{title:t({defaultMessage:"Something went wrong",description:"Title of the error card shown when a payment failed for no known reason",id:"payments.error_card.unknown_error.title"}),message:t({defaultMessage:"An unknown error has occurred",description:"Message of the error card shown when a payment failed for no known reason",id:"payments.error_card.unknown_error.message"}),isReloadButtonVisible:!0},AUTHORIZATION_FAILED:{title:t({defaultMessage:"Payment failed",description:"Title of the error card shown when a payment was not authorized",id:"payments.error_card.authorization_failed.title"}),message:t({defaultMessage:"The payment could not be completed. Try again, or use a different payment method.",description:"Message of the error card shown when a payment was not authorized",id:"payments.error_card.authorization_failed.message"}),isReloadButtonVisible:!0},PAYMENT_DETAILS_CALL_FAILED:{title:t({defaultMessage:"Payment could not be confirmed",description:"Title of the error card shown when the payment details could not be retrieved",id:"payments.error_card.payment_details_call_failed.title"}),message:t({defaultMessage:"There was a problem confirming your payment.",description:"Message of the error card shown when the payment details could not be retrieved",id:"payments.error_card.payment_details_call_failed.message"}),isReloadButtonVisible:!0},PAYMENT_METHOD_STORAGE_FAILED:{title:t({defaultMessage:"Payment method could not be saved",description:"Title of the error card shown when storing a payment method failed",id:"payments.error_card.payment_method_storage_failed.title"}),message:t({defaultMessage:"Something went wrong while saving your payment method.",description:"Message of the error card shown when storing a payment method failed",id:"payments.error_card.payment_method_storage_failed.message"}),isReloadButtonVisible:!0},REDIRECT_RESULT_PAYMENT_ACCEPTOR_MISSING:{title:t({defaultMessage:"Payment could not be completed",description:"Title of the error card shown when a redirect returned without a payment acceptor",id:"payments.error_card.redirect_result_payment_acceptor_missing.title"}),message:t({defaultMessage:"Your payment could not be matched to this order.",description:"Message of the error card shown when a redirect returned without a payment acceptor",id:"payments.error_card.redirect_result_payment_acceptor_missing.message"})},TOKENIZE_FAILED:{title:t({defaultMessage:"Payment method could not be saved",description:"Title of the error card shown when tokenization failed",id:"payments.error_card.tokenize_failed.title"}),message:t({defaultMessage:"Your payment method could not be saved. Try again, or use a different one.",description:"Message of the error card shown when tokenization failed",id:"payments.error_card.tokenize_failed.message"}),isReloadButtonVisible:!0},PAYMENT_INTEGRATION_INITIALIZATION_FAILED:{title:t({defaultMessage:"Payment methods could not be loaded",description:"Title of the error card shown when the payment form failed to load",id:"payments.error_card.payment_integration_initialization_failed.title"}),message:t({defaultMessage:"The payment form could not be loaded.",description:"Message of the error card shown when the payment form failed to load",id:"payments.error_card.payment_integration_initialization_failed.message"}),isReloadButtonVisible:!0},RESOURCE_REVOKED:{title:t({defaultMessage:"This page is no longer available",description:"Title of the error card shown when the portal resource was revoked",id:"payments.error_card.resource_revoked.title"}),message:t({defaultMessage:"The link you followed has expired or was withdrawn.",description:"Message of the error card shown when the portal resource was revoked",id:"payments.error_card.resource_revoked.message"}),isReloadButtonVisible:!0}}}const w=2e3;function b({resetAfterMs:t=w}={}){const[a]=h(),r=e.ref(!1);let o;const i=async s=>{const d=await a(s);return r.value=d,d&&(clearTimeout(o),o=setTimeout(()=>{r.value=!1},t)),d};return e.onBeforeUnmount(()=>clearTimeout(o)),{copy:i,hasCopied:r}}const T={class:"flex flex-col items-center gap-6"},v={key:1,class:"flex flex-col items-center gap-1"},C={class:"flex items-center gap-1"},M=e.defineComponent({__name:"PaymentErrorCard",props:{error:{type:Object}},setup(t){const a=t,{$t:r}=n.useIntl(),{copy:o,hasCopied:i}=b(),s=e.computed(()=>g(r)[a.error.code]),d=()=>{window.location.reload()},c=e.computed(()=>r({defaultMessage:"Copy reference",description:"Label of the button that copies the payment error reference",id:"payments.error_card.reference.copy.label"})),m=e.computed(()=>r({defaultMessage:"Copied",description:"Confirmation shown after copying the payment error reference",id:"payments.error_card.reference.copied.label"})),p=()=>{a.error.reference&&o(a.error.reference)};return(k,E)=>(e.openBlock(),e.createBlock(u._sfc_main,{status:"error",title:s.value.title},{default:e.withCtx(()=>[e.createElementVNode("div",T,[e.createVNode(e.unref(n._sfc_main),{variant:"body-xs",color:"subtle",class:"mt-3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.message),1)]),_:1}),s.value.isReloadButtonVisible?(e.openBlock(),e.createBlock(e.unref(l._sfc_main),{key:0,type:"button",intent:"secondary",onClick:d},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Try again",description:"Retry button text when an error has happened during a payment",id:"payments.retry_button.label"})),1)]),_:1})):e.createCommentVNode("",!0),t.error.reference?(e.openBlock(),e.createElementBlock("div",v,[e.createVNode(e.unref(n._sfc_main),{variant:"body-xs",color:"subtle"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Share this reference with support if the problem continues",description:"Explains what the reference below a failed payment is for",id:"payments.error_card.reference.description"})),1)]),_:1}),e.createElementVNode("div",C,[e.createVNode(e.unref(n._sfc_main),{variant:"body-xs",tag:"span",class:"select-all font-mono","data-testid":"payment-error-reference"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.error.reference),1)]),_:1}),e.createVNode(e.unref(_._sfc_main),{type:"button",intent:"subtle",size:"sm",icon:e.unref(i)?"check":"content_copy","aria-label":c.value,tooltip:e.unref(i)?m.value:c.value,onClick:p},null,8,["icon","aria-label","tooltip"])])])):e.createCommentVNode("",!0)])]),_:1},8,["title"]))}});exports._sfc_main=y;exports._sfc_main$1=M;
1
+ const e=require("vue"),f=require("./formatting.es-C72Nsrmh.js"),l=require("./Button.vue.es-BzkuglKw.js"),n=require("./customElements-DUMRMFQ5.js"),u=require("./PaymentFeedbackCard.vue_vue_type_script_setup_true_lang-B9R5JRJv.js"),_=require("./IconButton.vue.es-DgQN18Am.js"),h=()=>{const t=e.ref(null);return[async r=>{if(!(navigator!=null&&navigator.clipboard))return!1;try{return await navigator.clipboard.writeText(r),t.value=r,!0}catch{return t.value=null,!1}},t.value]},y=e.defineComponent({__name:"PaymentCompletedCard",props:{amount:{type:Object},variant:{type:String},redirecting:{type:Boolean}},setup(t){const a=t,{$t:r}=n.useIntl(),o=e.computed(()=>a.variant==="AUTHORIZE"?r({defaultMessage:"Payment successful",description:"The title for when a payment has been successful",id:"payment_completed_card.title.authorize"}):r({defaultMessage:"Your payment method is added",description:"The title for when a payment method was successfully added",id:"payment_completed_card.title.tokenize"}));return(i,s)=>(e.openBlock(),e.createBlock(u._sfc_main,{status:"success",title:o.value},{default:e.withCtx(()=>[t.amount?(e.openBlock(),e.createBlock(e.unref(n._sfc_main),{key:0,variant:"body-sm",class:"mt-1"},{default:e.withCtx(()=>[e.createVNode(e.unref(l._sfc_main$1),{icon:"check"}),e.createTextVNode(e.toDisplayString(e.unref(f.formatAmount)(t.amount)),1)]),_:1})):e.createCommentVNode("",!0),t.redirecting?(e.openBlock(),e.createBlock(e.unref(n._sfc_main),{key:1,variant:"body-xs",color:"subtle"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"You are being redirected...",description:"The text shown after a successful message before a redirect",id:"payment_completed_card.redirect_message"})),1)]),_:1})):e.createCommentVNode("",!0)]),_:1},8,["title"]))}});function g(t){return{UNKNOWN_ERROR:{title:t({defaultMessage:"Something went wrong",description:"Title of the error card shown when a payment failed for no known reason",id:"payments.error_card.unknown_error.title"}),message:t({defaultMessage:"An unknown error has occurred",description:"Message of the error card shown when a payment failed for no known reason",id:"payments.error_card.unknown_error.message"}),isReloadButtonVisible:!0},AUTHORIZATION_FAILED:{title:t({defaultMessage:"Payment failed",description:"Title of the error card shown when a payment was not authorized",id:"payments.error_card.authorization_failed.title"}),message:t({defaultMessage:"The payment could not be completed. Try again, or use a different payment method.",description:"Message of the error card shown when a payment was not authorized",id:"payments.error_card.authorization_failed.message"}),isReloadButtonVisible:!0},PAYMENT_DETAILS_CALL_FAILED:{title:t({defaultMessage:"Payment could not be confirmed",description:"Title of the error card shown when the payment details could not be retrieved",id:"payments.error_card.payment_details_call_failed.title"}),message:t({defaultMessage:"There was a problem confirming your payment.",description:"Message of the error card shown when the payment details could not be retrieved",id:"payments.error_card.payment_details_call_failed.message"}),isReloadButtonVisible:!0},PAYMENT_METHOD_STORAGE_FAILED:{title:t({defaultMessage:"Payment method could not be saved",description:"Title of the error card shown when storing a payment method failed",id:"payments.error_card.payment_method_storage_failed.title"}),message:t({defaultMessage:"Something went wrong while saving your payment method.",description:"Message of the error card shown when storing a payment method failed",id:"payments.error_card.payment_method_storage_failed.message"}),isReloadButtonVisible:!0},REDIRECT_RESULT_PAYMENT_ACCEPTOR_MISSING:{title:t({defaultMessage:"Payment could not be completed",description:"Title of the error card shown when a redirect returned without a payment acceptor",id:"payments.error_card.redirect_result_payment_acceptor_missing.title"}),message:t({defaultMessage:"Your payment could not be matched to this order.",description:"Message of the error card shown when a redirect returned without a payment acceptor",id:"payments.error_card.redirect_result_payment_acceptor_missing.message"})},TOKENIZE_FAILED:{title:t({defaultMessage:"Payment method could not be saved",description:"Title of the error card shown when tokenization failed",id:"payments.error_card.tokenize_failed.title"}),message:t({defaultMessage:"Your payment method could not be saved. Try again, or use a different one.",description:"Message of the error card shown when tokenization failed",id:"payments.error_card.tokenize_failed.message"}),isReloadButtonVisible:!0},PAYMENT_INTEGRATION_INITIALIZATION_FAILED:{title:t({defaultMessage:"Payment methods could not be loaded",description:"Title of the error card shown when the payment form failed to load",id:"payments.error_card.payment_integration_initialization_failed.title"}),message:t({defaultMessage:"The payment form could not be loaded.",description:"Message of the error card shown when the payment form failed to load",id:"payments.error_card.payment_integration_initialization_failed.message"}),isReloadButtonVisible:!0},RESOURCE_REVOKED:{title:t({defaultMessage:"This page is no longer available",description:"Title of the error card shown when the portal resource was revoked",id:"payments.error_card.resource_revoked.title"}),message:t({defaultMessage:"The link you followed has expired or was withdrawn.",description:"Message of the error card shown when the portal resource was revoked",id:"payments.error_card.resource_revoked.message"}),isReloadButtonVisible:!0}}}const w=2e3;function b({resetAfterMs:t=w}={}){const[a]=h(),r=e.ref(!1);let o;const i=async s=>{const d=await a(s);return r.value=d,d&&(clearTimeout(o),o=setTimeout(()=>{r.value=!1},t)),d};return e.onBeforeUnmount(()=>clearTimeout(o)),{copy:i,hasCopied:r}}const T={class:"flex flex-col items-center gap-6"},v={key:1,class:"flex flex-col items-center gap-1"},C={class:"flex items-center gap-1"},M=e.defineComponent({__name:"PaymentErrorCard",props:{error:{type:Object}},setup(t){const a=t,{$t:r}=n.useIntl(),{copy:o,hasCopied:i}=b(),s=e.computed(()=>g(r)[a.error.code]),d=()=>{window.location.reload()},c=e.computed(()=>r({defaultMessage:"Copy reference",description:"Label of the button that copies the payment error reference",id:"payments.error_card.reference.copy.label"})),m=e.computed(()=>r({defaultMessage:"Copied",description:"Confirmation shown after copying the payment error reference",id:"payments.error_card.reference.copied.label"})),p=()=>{a.error.reference&&o(a.error.reference)};return(k,E)=>(e.openBlock(),e.createBlock(u._sfc_main,{status:"error",title:s.value.title},{default:e.withCtx(()=>[e.createElementVNode("div",T,[e.createVNode(e.unref(n._sfc_main),{variant:"body-xs",color:"subtle",class:"mt-3"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(s.value.message),1)]),_:1}),s.value.isReloadButtonVisible?(e.openBlock(),e.createBlock(e.unref(l._sfc_main),{key:0,type:"button",intent:"secondary",onClick:d},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Try again",description:"Retry button text when an error has happened during a payment",id:"payments.retry_button.label"})),1)]),_:1})):e.createCommentVNode("",!0),t.error.reference?(e.openBlock(),e.createElementBlock("div",v,[e.createVNode(e.unref(n._sfc_main),{variant:"body-xs",color:"subtle"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(r)({defaultMessage:"Share this reference with support if the problem continues",description:"Explains what the reference below a failed payment is for",id:"payments.error_card.reference.description"})),1)]),_:1}),e.createElementVNode("div",C,[e.createVNode(e.unref(n._sfc_main),{variant:"body-xs",tag:"span",class:"select-all font-mono"},{default:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(t.error.reference),1)]),_:1}),e.createVNode(e.unref(_._sfc_main),{type:"button",intent:"subtle",size:"sm",icon:e.unref(i)?"check":"content_copy","aria-label":c.value,tooltip:e.unref(i)?m.value:c.value,onClick:p},null,8,["icon","aria-label","tooltip"])])])):e.createCommentVNode("",!0)])]),_:1},8,["title"]))}});exports._sfc_main=y;exports._sfc_main$1=M;