@zeniai/web-cockpit-ui 1.14.10-qa → 1.14.11-dev

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 (249) hide show
  1. package/dist/assets/ACHDetailsPage-D6-Uk4xr-CqCQg7ha.js +21 -0
  2. package/dist/assets/{AIPerformancePage-FvDkFQx9-DcdCslTz.js → AIPerformancePage-pQP8EI_S-DOdJRYuT.js} +49 -49
  3. package/dist/assets/{AccountInfoPage-RM6DvvVS-Dg1PKEt4.js → AccountInfoPage-DxAa9GD7-BDuKQBCM.js} +5 -5
  4. package/dist/assets/{AccountInfoPageContent-DEG1tMaK-B-d3bj1J.js → AccountInfoPageContent-tNTpX5pA-DZsnTAw6.js} +17 -17
  5. package/dist/assets/{AccountReconDetailsDrawerPage-CiegEtwy-C9r2CYLq.js → AccountReconDetailsDrawerPage-CbZaDfU0-D6InUwmP.js} +13 -13
  6. package/dist/assets/{AccountRow-DDUdlArT-CdXNJ8jC.js → AccountRow-BpBK8mVs-D3-rIOZV.js} +33 -33
  7. package/dist/assets/{AccountsPromoCardStack-Q7ppOy47-BGGU4_sD.js → AccountsPromoCardStack-DBCYok4Z-BX2c8K6j.js} +35 -35
  8. package/dist/assets/{AddAddressForCardDrawer-C2us9OcV-B8z5J7QB.js → AddAddressForCardDrawer-BP8sDedz-fAvU3zAk.js} +2 -2
  9. package/dist/assets/{AddToWalletPage-B75ejfsy-DpB5cFz0.js → AddToWalletPage-Dsw1GIbh-C-TkI1oG.js} +26 -26
  10. package/dist/assets/{AgingReportsPage-mEhdjkho-hcvDKcgL.js → AgingReportsPage-COC3iACh-ihUmY_za.js} +8 -8
  11. package/dist/assets/{AllUserItems-o4xGLdQM-BpAFbzz9.js → AllUserItems-DKoDASKq-BK1HOlxO.js} +10 -10
  12. package/dist/assets/{ApAgingDetailPage-C0Y88nfk-DI6bAf1B.js → ApAgingDetailPage-BKAJMyRm-D4FAXjMB.js} +2 -2
  13. package/dist/assets/{AppBasePage-DKAxmkIN-B5cIKVeZ.js → AppBasePage-6fgXwSBv-PwB9ZP6-.js} +6 -6
  14. package/dist/assets/{AppDrawerContent-DLn3w253-BfJPK8Sb.js → AppDrawerContent-DnYw60Xv-DEM6VfAx.js} +19 -19
  15. package/dist/assets/{ApprovalRulesSettingsPage-vBjp3xy--CbC8uzzu.js → ApprovalRulesSettingsPage-X4EYoBfl-BbXFDQ_-.js} +5 -5
  16. package/dist/assets/{ArAgingChart-C3yYcTfo-Cp6SttRr.js → ArAgingChart-CNghm3pm-Dc-aS72N.js} +6 -6
  17. package/dist/assets/ArAgingDetailPage-DD4M5tUJ-CHn9GwO8.js +46 -0
  18. package/dist/assets/{AttachmentView-B4hoO1b8-BTGm5cj6.js → AttachmentView-Bp678glv-Bz7vnOLP.js} +7 -7
  19. package/dist/assets/{BankAccountSection-CdIpgwVZ-UKuk-CyP.js → BankAccountSection-DCHOrv1O-CHEMQ8hk.js} +5 -5
  20. package/dist/assets/{BankAccountWarningSection-COSdSiAy-Bu35qgEq.js → BankAccountWarningSection-Bof6a4Ai-D6cSyNpo.js} +11 -11
  21. package/dist/assets/{BankConnectionsSettingsPage-hNpSoqlw-N7cxSBLs.js → BankConnectionsSettingsPage-KWPfd_oN-Cw1WYpDv.js} +11 -11
  22. package/dist/assets/{BillDetailPage-CJX3QbcW-C0-YF6Gp.js → BillDetailPage-D5FyJKQZ-F16Zazrc.js} +8 -8
  23. package/dist/assets/{BillPayApprovalRuleDetailPage-CUxCgQSj-BqWIDd56.js → BillPayApprovalRuleDetailPage-C17DUKc8-dVTzDWJq.js} +1 -1
  24. package/dist/assets/{BillPayApprovalRulesPage-BAfgqIvl-BWZ3pAoi.js → BillPayApprovalRulesPage-C6b0Dx9D-GKQByTVv.js} +10 -10
  25. package/dist/assets/{BillPayPromoPage-D25teFTJ-BkPBQsPI.js → BillPayPromoPage-BhbcKNjD-Dc50ymZA.js} +8 -8
  26. package/dist/assets/{BillPaySetUpPage-D9ovPwFv-DX53TV_h.js → BillPaySetUpPage-DFkYsW2C-ejvkAWu2.js} +2 -2
  27. package/dist/assets/{BillingSettingsPage-DBEk-yIg-Ch8FGWV2.js → BillingSettingsPage-DQ-GDRoK-DLGZh1Tj.js} +8 -8
  28. package/dist/assets/{BillsBulkReviewDrawerPage-CZUNCQ7j-CP0pFg0D.js → BillsBulkReviewDrawerPage-DzTwDeIy-Ds5BqJGh.js} +1 -1
  29. package/dist/assets/{BoxItem-BtIxBKUQ-DtJ3R-PB.js → BoxItem-a04JWA45-DJp9lW-u.js} +1 -1
  30. package/dist/assets/{BusinessVerificationPage-CXeA666i-BPWT62Lw.js → BusinessVerificationPage-BCr_ObVJ-OqegkAuZ.js} +12 -12
  31. package/dist/assets/{CardNumberSubText-Bakmjdzp-lSIgWyzd.js → CardNumberSubText-B5ejHnml-CLY9anWS.js} +1 -1
  32. package/dist/assets/{CashbackDetailPage-yC6NiWvx-DcDuCeaB.js → CashbackDetailPage-DX_XsNhS-BMZOysYo.js} +25 -25
  33. package/dist/assets/{ChargeCardDetailPage-DD0_CjGJ-BzEh2X_h.js → ChargeCardDetailPage-Ckbi7U9j-D_fwMr5K.js} +57 -57
  34. package/dist/assets/{ChargeCardListPage-C_Wxtym7-j7bJNLel.js → ChargeCardListPage-CglfbPqr-D7muWz7z.js} +20 -20
  35. package/dist/assets/{ChargeCardListTable-tXjQM1HV-Dzwl1fw-.js → ChargeCardListTable-BxAeA97m-C-BUBRdZ.js} +41 -41
  36. package/dist/assets/{ChargeCardPromoPage-BAovEsQH-Ek96Dkwb.js → ChargeCardPromoPage-BfsQUUYb-D4zqkYsh.js} +31 -31
  37. package/dist/assets/{ChargeCardSetupPage-BFjo3XpM-CdAKgoQN.js → ChargeCardSetupPage-Bq953HsV-BJMN-xIh.js} +1 -1
  38. package/dist/assets/{ChargeCardStatementsPage-CvC1casY-b7_8UBZI.js → ChargeCardStatementsPage-B_5uvkaq-QS7pzZOg.js} +10 -10
  39. package/dist/assets/ChargeCardUtils-Bivw83fy-L79bEW0e.js +1 -0
  40. package/dist/assets/{ChaseOverlay-DONL-nDR-De0YjgVf.js → ChaseOverlay-LcVAgdoT-D1Jb2EIj.js} +7 -7
  41. package/dist/assets/CheckDepositDrawerPage-SpI62oU7-Q03dZELD.js +206 -0
  42. package/dist/assets/{CollapsableReportTable-C2cQTlA6-CvrNaDb7.js → CollapsableReportTable-CKmPwC_x-DvM2BIk1.js} +57 -57
  43. package/dist/assets/{CompanyOfficerDetailsSection-ChVkSOtw-B7Y0Et92.js → CompanyOfficerDetailsSection-BlLsNJaD-grOU-fb_.js} +28 -28
  44. package/dist/assets/{CompanyPassportCard-CLWfLYZT-DVRouOGL.js → CompanyPassportCard-ElwK6uOD-uKq6JSMM.js} +8 -8
  45. package/dist/assets/{CompanyPassportPage-B6_oWdN9-w2LzORF3.js → CompanyPassportPage-B6mGjsJZ-QyXjNlOK.js} +7 -7
  46. package/dist/assets/CompleteProfile-C1PIn6EM-BoaPrgBO.js +52 -0
  47. package/dist/assets/{ConfettiBurst-CfEQKUn_-BJZZqkje.js → ConfettiBurst-CjhkW_Be-tE_S1zJ3.js} +1 -1
  48. package/dist/assets/{CreateOrEditVendorPage-7mYLNzcH-OQ44iBIB.js → CreateOrEditVendorPage-DHvmRSee-B7H_LsnK.js} +15 -15
  49. package/dist/assets/{CreditCardPaymentDrawerPage-DM0awVZu-BvoWvCAp.js → CreditCardPaymentDrawerPage-BIaTYAUf-Rj5ttUPd.js} +11 -11
  50. package/dist/assets/{CreditCardPaymentPlgSection-C3pH8AzC-xAcXkp7A.js → CreditCardPaymentPlgSection-mUqReF9z-IZFYMes7.js} +12 -12
  51. package/dist/assets/CurrencySelectField-DS-pGcuE-DLCIpnvb.js +139 -0
  52. package/dist/assets/{CustomerOnboardingActivationPage-DfQCMxvl-CfW_8NyT.js → CustomerOnboardingActivationPage-CIOyRd8r-BQMewqvn.js} +5 -5
  53. package/dist/assets/CustomerOnboardingContainerPage-Lh0xH_Pl-cw9bBAdD.js +1 -0
  54. package/dist/assets/{CustomerOnboardingDetailPageSkeleton-m2chMg_F-DP-_bCgy.js → CustomerOnboardingDetailPageSkeleton-A_l9Qen8-BtaF5eWl.js} +13 -13
  55. package/dist/assets/{CustomerOnboardingNoStepsPage-C4_D_p4k-CVpSN_84.js → CustomerOnboardingNoStepsPage-D5BcbVEK-CYF4Do82.js} +9 -9
  56. package/dist/assets/{CustomerOnboardingPage-XbpuMewL-BK1qx-Jf.js → CustomerOnboardingPage-N-8Zd7M_-BLw-RmQq.js} +6 -6
  57. package/dist/assets/{CustomerOnboardingProductSuitePage-DD3ipEqZ-gVuFEpCL.js → CustomerOnboardingProductSuitePage-DZwacur5-CHyEWXN_.js} +8 -8
  58. package/dist/assets/{Dashboard-zs5L4G5s-BLp57MMW.js → Dashboard-CQoNm84Z-CGt51QX0.js} +1 -1
  59. package/dist/assets/{DashboardReportPage-BRkeSLqR-D4ftlofc.js → DashboardReportPage-D4BoWobJ-DB51j3mA.js} +13 -13
  60. package/dist/assets/{DepositAccTransactionItem-DdxEaiop-BBckVxk_.js → DepositAccTransactionItem-C6_OrohL-DcY3deV_.js} +6 -6
  61. package/dist/assets/DepositAccTransactionListPage-Cxvs7tMg-CslTnL-f.js +66 -0
  62. package/dist/assets/{DocumentSecurityBanner-BmCXnsqt-DLm91H5a.js → DocumentSecurityBanner-Bo9Hgo-I-DBmSgZgH.js} +2 -2
  63. package/dist/assets/DomesticWireDetailsPage-DzKlJFvy-D6rsk0GH.js +21 -0
  64. package/dist/assets/{DownloadOverlay-D18IYrMS-DZ5Hslzj.js → DownloadOverlay-BoIyiJ9R-BzDhGwzl.js} +25 -25
  65. package/dist/assets/{DrawerPage-EcuR8TES-qibKglza.js → DrawerPage-C_kxrXIc-CYxcqhiW.js} +5 -5
  66. package/dist/assets/EditPeoplePage-auUWC3gB-DhunvsTv.js +55 -0
  67. package/dist/assets/{EditReimbursementDetailPage-z7CJ9Vy4-BdjzHntY.js → EditReimbursementDetailPage-C-Lj-_YG-D3CWZXPH.js} +68 -68
  68. package/dist/assets/{EntityDetailPage-OvuxHiOz-BB6uo_VR.js → EntityDetailPage-Cqkhzu9O-CQdpKsUY.js} +3 -3
  69. package/dist/assets/{EntitySummarySection-D5L6gsZR-ICyFTmrF.js → EntitySummarySection-Dqgxknt6-CcorkWsq.js} +3 -3
  70. package/dist/assets/{ExpenseAutomationOverviewPage-CM7a5B8w-BqZToXAr.js → ExpenseAutomationOverviewPage-CEsyeJ9u-IlYsieJj.js} +22 -22
  71. package/dist/assets/{ExpenseAutomationPage-C0HfVK2q-Bjwf1eOa.js → ExpenseAutomationPage-DxpK2JR5-b76Jf9fI.js} +84 -84
  72. package/dist/assets/{ExpressPayPage-CeHVuoHN-CQaWJLyc.js → ExpressPayPage-DBWJERD9-DkcgiQRL.js} +12 -12
  73. package/dist/assets/FeaturePreviewPage-CwGJVCMk-c-nKLWL3.js +11 -0
  74. package/dist/assets/{FollowStepsSection-BazOZlaE-DDXU5Ssd.js → FollowStepsSection-BrJecw-e-CQdWJjWJ.js} +13 -13
  75. package/dist/assets/{GlobalReviewListPage-B7OzhHDj-sxly0nyY.js → GlobalReviewListPage-Duoi9mD_-Der2mhxZ.js} +8 -8
  76. package/dist/assets/{HelpButton-DY1MpMsB-KbKqlw38.js → HelpButton-C1djo0zO-BW6NBTNW.js} +5 -5
  77. package/dist/assets/{InformationCardStack-DTZ5U5HN-CApUz4e2.js → InformationCardStack-BE5eaq-x-7TOfUxxA.js} +5 -5
  78. package/dist/assets/InsightsCardStack-EzAsNm_U-Cm_xrDcd.js +79 -0
  79. package/dist/assets/{InsightsSection-CLnISnUP-MBzDtn2E.js → InsightsSection-nzKuS0T9-CcXyZxZ8.js} +5 -5
  80. package/dist/assets/{IntegrationsSettingsPage-_Z5zEjw7-Bb2Qdxl-.js → IntegrationsSettingsPage-45ETlpC6-ClhfPkcQ.js} +7 -7
  81. package/dist/assets/{InternationalWireSwiftDetailsPage-Dz-fxrmb-CpUwldlm.js → InternationalWireSwiftDetailsPage-B21X5YFS-DWJjZuCw.js} +15 -15
  82. package/dist/assets/{InternationalWireVerificationPage-ncEPxfAh-C6NGfmNG.js → InternationalWireVerificationPage-BzagdPaG-Cl81RiNZ.js} +17 -17
  83. package/dist/assets/{InviteFormPage-DWlnBCXL-SVZhUt0X.js → InviteFormPage-BNdBP-Mm-BdFbqKES.js} +25 -25
  84. package/dist/assets/{InvitePageListView-Cmi49FoL-FaQb5PXP.js → InvitePageListView-ChzmK7Rt-D29gFXI6.js} +51 -51
  85. package/dist/assets/InvitePeoplePage-DgqE2Y-0-DKu709Rv.js +12 -0
  86. package/dist/assets/{InvoiceUploadSection-BYgUZr3e-B5ZzCOUA.js → InvoiceUploadSection-B8o-l15n-Da7WgU-0.js} +41 -41
  87. package/dist/assets/{IssueChargeCardPage-Bmoi1yP8-7XttLy41.js → IssueChargeCardPage-BW0cXQqh-BmbmlACe.js} +27 -27
  88. package/dist/assets/{LabeledAddressValue-OqCEk1VW-CIF29038.js → LabeledAddressValue-BioQUVCV-fsudcvfQ.js} +1 -1
  89. package/dist/assets/LabeledAddressValueField-Cw-p18du-D9T5QqTG.js +45 -0
  90. package/dist/assets/{LabeledControlledCheckBoxField-BZrJseng-9-Obm_Rv.js → LabeledControlledCheckBoxField-CGT7KsYZ-jRPtCjyI.js} +1 -1
  91. package/dist/assets/{LabeledCreatableSingleSelectField-BjjLKIq--CKme-Zbq.js → LabeledCreatableSingleSelectField-nys9pbO0-0SJcSq-w.js} +3 -3
  92. package/dist/assets/LabeledDocumentField-Y6TKpyZ8-CW27Za_m.js +41 -0
  93. package/dist/assets/{LabeledDropDownFormattedTextField-1sZGnKTM-y7e2QJmr.js → LabeledDropDownFormattedTextField-DWP9oUzM-TYwr2dWi.js} +7 -7
  94. package/dist/assets/{LabeledText-DZTriBfN-CwwPr2Y1.js → LabeledText-QrjXGWwJ-Csl1kB9E.js} +3 -3
  95. package/dist/assets/{LabeledUserSingleSelectWithSubtitlesField-BNPUM7x0-B-sTwPBI.js → LabeledUserSingleSelectWithSubtitlesField-BK9XCXKo-CRz-dhMo.js} +17 -17
  96. package/dist/assets/{LabeledZeniRolesDropDownField-Ce4KKZiS-B6byb8PO.js → LabeledZeniRolesDropDownField-C2PAZOPW-ChSwcxj4.js} +11 -11
  97. package/dist/assets/{LinkJETransactionPage-DoaNWTmr-odUN47aO.js → LinkJETransactionPage-BF6-BdWE-DO5i53f_.js} +8 -8
  98. package/dist/assets/{LowBalancePopup-BOTHNsR0-CoxyAFcB.js → LowBalancePopup-ZZ8Ap8Ls-CO5moJjL.js} +5 -5
  99. package/dist/assets/{MagicLinkACHDetailsPage-CD76NDYI-Ve2NJ-iM.js → MagicLinkACHDetailsPage-BDXiOwx_-D5AHGKn1.js} +1 -1
  100. package/dist/assets/{MagicLinkDomesticWireDetailsPage-BsikAXMr-DhE6Ut2B.js → MagicLinkDomesticWireDetailsPage-B1-CK91r-BBsb3LWh.js} +1 -1
  101. package/dist/assets/{MagicLinkInternationalWireDetailsPage-zu3TnX0Y-lP-Se4cs.js → MagicLinkInternationalWireDetailsPage-D2rnWzME-pHczJsmC.js} +1 -1
  102. package/dist/assets/MagicLinkSuccessPage-IHajRicG-TvKR0rcg.js +31 -0
  103. package/dist/assets/{MagicLinkTitleSection-CD_v3J8N-DW6D0fJX.js → MagicLinkTitleSection-CmTUPCA1-crT0_cjI.js} +4 -4
  104. package/dist/assets/MailingDetailsSection-AiehjqI1-CrcmbjEa.js +21 -0
  105. package/dist/assets/{MeetingCalenderPopup-gItmg01b-Cu9NWj0e.js → MeetingCalenderPopup-COpKcBhx-C1b7HyPI.js} +1 -1
  106. package/dist/assets/{Menu-vFgR8B3A-uLxvXXvL.js → Menu-frAXxk4e-ChxiZJil.js} +2 -2
  107. package/dist/assets/{MyBankConnectionsSettingsPage-NhLBy2nV-CLratIrJ.js → MyBankConnectionsSettingsPage-BtC6C9fL-CIbylXW-.js} +13 -13
  108. package/dist/assets/{MyPendingActivationChargeCardListPage-CNb4v74Q-D4I0sjao.js → MyPendingActivationChargeCardListPage-tXIpyxdq-DyLbYr-a.js} +1 -1
  109. package/dist/assets/{MyProfileSettingsPage-CXcH5h3K-Cic_ZJ4q.js → MyProfileSettingsPage-BmMskLyK-BRbEv4qP.js} +8 -8
  110. package/dist/assets/{NavBarWithPicker-B1g4GR8h-BHoASNPV.js → NavBarWithPicker-ByLynfu6-DkhTP5l5.js} +6 -6
  111. package/dist/assets/{NavigationArrow-CKb8oJym-BKEHFfza.js → NavigationArrow-D5-YpdfE-BYBuxDoB.js} +5 -5
  112. package/dist/assets/{NavigationDots-Bgh-o0zo-K6CBNKPZ.js → NavigationDots-MA8SVlUT-BNaROjbH.js} +1 -1
  113. package/dist/assets/{NewGlobalMerchantPage-CTavGrPU-D58PJEdd.js → NewGlobalMerchantPage-DtTW2Du8-teWW5fR7.js} +21 -21
  114. package/dist/assets/{NoDataChart-CtPlddxs-DjKWZv7Z.js → NoDataChart-BdzVnx59-Zwl7GRg0.js} +1 -1
  115. package/dist/assets/{NoDataTable-Dibdh8Pj-QVM7mj96.js → NoDataTable-B4J5Ou18-BjRs61V8.js} +1 -1
  116. package/dist/assets/{NotFoundPage-yGvtm3rH-Bd-Bemtd.js → NotFoundPage-BeAXQOme-HRJfFoZt.js} +1 -1
  117. package/dist/assets/{NotificationSettingsPage-DOmx9OZh-CqYXpA0c.js → NotificationSettingsPage-CRZRet42-B4tscA88.js} +13 -13
  118. package/dist/assets/{NotificationsListConfig-Bz1-bZtB-FVI5Vj_m.js → NotificationsListConfig-CkSDaMij-aj-ed0aI.js} +1 -1
  119. package/dist/assets/{NotificationsPage-CQ_3esFr-BqBUQ__h.js → NotificationsPage-Dqe96fU8-DGXpNPVr.js} +32 -32
  120. package/dist/assets/{OpExByVendorPage-BjqGlQrk-BFgfXC36.js → OpExByVendorPage-CXtkN87m-D6OjOLM9.js} +7 -7
  121. package/dist/assets/{OverlayContainerPage-GWXnlbZH-ei-9RlC_.js → OverlayContainerPage-Cy_Jxf8N-B2CxgCWd.js} +1 -1
  122. package/dist/assets/{PandLWithForecastPage-juNL-o7I-DMQaebm1.js → PandLWithForecastPage-DTOqkynU-9NyuYxx1.js} +8 -8
  123. package/dist/assets/{PaymentAccountSetupBillingAddressSection-BxQrIZmE-B_q4GQV2.js → PaymentAccountSetupBillingAddressSection-C6WFeB3A-C9tSnFrF.js} +11 -11
  124. package/dist/assets/{PeoplePage-BfwpGELm-DqbV3EEG.js → PeoplePage-D-j114xg-s5ngzrYI.js} +1 -1
  125. package/dist/assets/PortfolioAllocationFormPage-C4XzSjzr-AaZTXsTp.js +207 -0
  126. package/dist/assets/{PortfolioDetails-BaLVprV9-s_70y1hl.js → PortfolioDetails-Bbfo0XDo-F8wi_TkN.js} +29 -29
  127. package/dist/assets/{ProductsCarousel-DSwEQiRo-wKmJuLus.js → ProductsCarousel-COUx0Xdj-Bk25WJ5z.js} +6 -6
  128. package/dist/assets/{PromoBaseCards-CDbwBfld-DHXh6Jz5.js → PromoBaseCards-DG1CAZvU-Kp-BaaPo.js} +3 -3
  129. package/dist/assets/{QBOConnectionDialog-BKEVg_Tw-DfDc7Zj1.js → QBOConnectionDialog-DLVcifji-BzsFl8lU.js} +10 -10
  130. package/dist/assets/QBOSetupSection-BeRZZ-Q_-a6rhf4W-.js +79 -0
  131. package/dist/assets/ReimbursementApprovalRuleDetailPage-CrbiufS3-Bj0-a-7-.js +26 -0
  132. package/dist/assets/{ReimbursementApprovalRulesPage-BaI1dJWO-hai_N-Le.js → ReimbursementApprovalRulesPage-CTk2aZMz-oZhsGYfa.js} +8 -8
  133. package/dist/assets/{ReimbursementDetailPage-CDoMkRc0-D7z4FCni.js → ReimbursementDetailPage-BofsP0W--DVgChjvg.js} +17 -17
  134. package/dist/assets/ReimbursementPromoPage-CA2cUBsx-DqpwfsT0.js +112 -0
  135. package/dist/assets/{ReimbursementSetUpPage-C6ZSl21b-BhOccRNG.js → ReimbursementSetUpPage-Em6S1wkj-DAxU1I0b.js} +8 -8
  136. package/dist/assets/{ReimbursementsBulkReviewDrawerPage-DRm_RSSq-CMj-h4BM.js → ReimbursementsBulkReviewDrawerPage-DpWChhvB-CNq5fdbL.js} +1 -1
  137. package/dist/assets/{ReloadCard-B1X0QtRR-BXScvMmg.js → ReloadCard-CZ1Ix5em-CJhVpNi9.js} +5 -5
  138. package/dist/assets/{ReportTableViewSelector-2gwwu23O-D4SUAhgu.js → ReportTableViewSelector-BRA3CT_O-BWHSw_d5.js} +28 -28
  139. package/dist/assets/{ReportsPage-C4ry6Xjl-DWRSq16N.js → ReportsPage-CauV3wnZ-Bfok01xk.js} +5 -5
  140. package/dist/assets/{RevenueChart--mJZgy8C-Cgs7A_Xi.js → RevenueChart-BeM_1hYw-DP9fkCbH.js} +12 -12
  141. package/dist/assets/{ReviewDetailsPage-Dg_NdNMf-C6JTFr2b.js → ReviewDetailsPage-C5xC8Cf1-Bcj2cFMw.js} +16 -16
  142. package/dist/assets/{ReviewOverlay-C-9oLsRU-CZUg6lpm.js → ReviewOverlay-DdWa7GLG-YdWdWayu.js} +15 -15
  143. package/dist/assets/RoleWithToolTip-BP8MTZdU-BOm9Us2_.js +22 -0
  144. package/dist/assets/{ScheduleDetailsFixedAssetsPage-DICnGQP9-eOvUkGGr.js → ScheduleDetailsFixedAssetsPage-BlhhW9A6-Cgf6Hq7_.js} +8 -8
  145. package/dist/assets/{ScheduleDetailsPage-BvkYaxXa-C15O7RkB.js → ScheduleDetailsPage-BKWKZuAL-CQ6iSQsN.js} +3 -3
  146. package/dist/assets/{ScheduleSequenceTable-Cv62faKa-M34Bvr--.js → ScheduleSequenceTable-BzWPTqDM-Dgu5c0RS.js} +50 -50
  147. package/dist/assets/{ScreenRoutes-DF9_ndl0.js → ScreenRoutes-BBcvidtT.js} +62 -62
  148. package/dist/assets/{SetUpAccountSection-DwkklztZ-CvvkeLO0.js → SetUpAccountSection-Trj1x2HL-CiAxSNYR.js} +23 -23
  149. package/dist/assets/{SetUpDefaultSection-Chh_3U0h-DP32jEG1.js → SetUpDefaultSection-BQzNGjO7-an74W3Da.js} +8 -8
  150. package/dist/assets/{SignIn-CoM3gLF4-CxYJZHsh.js → SignIn-Duk9PNwU-Y2eo5FDG.js} +12 -12
  151. package/dist/assets/{SignInScreen-CgRLE79n.js → SignInScreen-BDl851xo.js} +1 -1
  152. package/dist/assets/{SpendManagementListViewPage-rf8IhIOU-BST9K3MV.js → SpendManagementListViewPage-CREdM633-Cg0NFbb7.js} +6 -6
  153. package/dist/assets/{SpendManagementPerTabPage-KLrMZOg6-pZeNXzmX.js → SpendManagementPerTabPage-BZ6ISWXe-BYNegFz5.js} +28 -28
  154. package/dist/assets/{SpendManagementSection-CbbqZI-h-CVwzMKo9.js → SpendManagementSection-bMsztUap-upI-ZdzC.js} +13 -13
  155. package/dist/assets/{SpendMgmtSetupAccountSection-BfwEbse9-CCE4LYic.js → SpendMgmtSetupAccountSection-Btdtp-ry-M7exC_NJ.js} +18 -18
  156. package/dist/assets/{StatementItem-DEvMOqc4-CScSh11D.js → StatementItem-XLqlrHIu-VoU4RUpG.js} +5 -5
  157. package/dist/assets/{StatementsPage-DNsm7q52-ajRuJ1oP.js → StatementsPage-DWiXiOFU-DZPVh_4x.js} +4 -4
  158. package/dist/assets/{StatusSwitcher-BdfUDJ2e-D4dCUyMA.js → StatusSwitcher-D1XZ-pbx-DwwsmfkA.js} +4 -4
  159. package/dist/assets/{SubTabSwitcher-o0RxZAky-CeSW8fRP.js → SubTabSwitcher-Bt3F7ANv-e4DBICdr.js} +7 -7
  160. package/dist/assets/{SummaryCard-DQ4ZyfBH-D9XxMBaO.js → SummaryCard-edbbHOmb-DIbjh5sC.js} +1 -1
  161. package/dist/assets/{TaskManagementPage-BVNWrtPC-D_5VYMB9.js → TaskManagementPage-BhtJBdco-CawcFnLk.js} +26 -26
  162. package/dist/assets/{TimeRangeSwitcher-CD16lox0-Bi5yNRU7.js → TimeRangeSwitcher-D9KzhRYO-DSUt4L30.js} +5 -5
  163. package/dist/assets/{TimeframeSwitcher-C7i0JFHk-Y8yZXQA6.js → TimeframeSwitcher-CbEHKZvd-CUipNC15.js} +4 -4
  164. package/dist/assets/{TimeframeSwitcherWithToggle-D35sc3g8-CG8BhQxV.js → TimeframeSwitcherWithToggle-Cb91RXpD-Bqbdu9xs.js} +2 -2
  165. package/dist/assets/{TopExCard-bgf-w40u-DTYDqUmn.js → TopExCard-DD9Rf9T6-CfNVkG6m.js} +5 -5
  166. package/dist/assets/{TopExDetailPage-CUiZ2o0r-Cjf8s50F.js → TopExDetailPage-DaDuwFrj-BOsQHlTA.js} +16 -16
  167. package/dist/assets/{TransactionDetailPage-C50JQjnc-BhybCWFY.js → TransactionDetailPage-0fIW4o-6-BKhKFulx.js} +34 -34
  168. package/dist/assets/{TransactionList-nnfPsJZc-BFMNvdxG.js → TransactionList-CLjBadiP-By9OtkVt.js} +8 -8
  169. package/dist/assets/{TransactionListBig-BNanyUhE-B8m5ZzrI.js → TransactionListBig-CwBxP1xB-DEm91bPU.js} +24 -24
  170. package/dist/assets/{TransactionListPage-kQOGZBz8-7Xlasrzv.js → TransactionListPage-S1nTM7Yy-Hu_PcxrN.js} +3 -3
  171. package/dist/assets/TransactionVendorDetailPage-CTTTAais-CKKUnVWe.js +80 -0
  172. package/dist/assets/{TransferDrawerPage-NOLm9zmx-BS3ryUJB.js → TransferDrawerPage-BJDNWagE-B5RBpIT8.js} +26 -26
  173. package/dist/assets/{TreasuryOverviewPage-Doo6fmEl-l6_Fc322.js → TreasuryOverviewPage-DB-ZH19K-0cVLv_tv.js} +31 -31
  174. package/dist/assets/{TreasuryPromoPage-CyowAl6A-B4fxQydj.js → TreasuryPromoPage-3MwRPpCt-B5X2lU4M.js} +21 -21
  175. package/dist/assets/{TreasurySetupPage-DZdd0DpR-vdFV4pXJ.js → TreasurySetupPage--G4JCzdh-Ck5w0LPU.js} +10 -10
  176. package/dist/assets/TreasuryStatementsPage-DBykLGfz-gFLjSnAI.js +58 -0
  177. package/dist/assets/TreasuryTaxLetterPage-DgbrzE9u-BsWgo8r5.js +58 -0
  178. package/dist/assets/{TreasuryTransferOrReviewPage-BuL0YxIE-PNl-v8dv.js → TreasuryTransferOrReviewPage-ByM1UIiU-CjSaFqgC.js} +44 -44
  179. package/dist/assets/{TrendChart-C5-sKlos-DGmmfqs4.js → TrendChart-B0CS3MXT-D7qhkgQT.js} +3 -3
  180. package/dist/assets/{TrendWithTransactions-CZx5tt-z-CQJe1m4b.js → TrendWithTransactions-D4OAA6yK-BF-AbaMY.js} +9 -9
  181. package/dist/assets/{UncategorizedAccountsMappingPage-BVma5qcZ-Dbxb7bjD.js → UncategorizedAccountsMappingPage-C6jaWqrE-zTG-_1nm.js} +5 -5
  182. package/dist/assets/{UnitIntegrationPage-ZRhbEzdQ-ClCYRwoC.js → UnitIntegrationPage-5LOvIFvr-Bzw8mu6B.js} +5 -5
  183. package/dist/assets/{UploadAdditionalDocumentOverlay-BpJ_tRy_-9uQh_UHt.js → UploadAdditionalDocumentOverlay-CLQLrn0v-SNsFu9LY.js} +2 -2
  184. package/dist/assets/{Vendor2FAPopup-CQbY2KbX-DxjPrntR.js → Vendor2FAPopup-BOl520xa-LnECkqk5.js} +1 -1
  185. package/dist/assets/{VendorACHDetailsPage-DcDtOkiR-C2D4Yw60.js → VendorACHDetailsPage-B5jKUOjo-CQSiDv6a.js} +1 -1
  186. package/dist/assets/{VendorDetailPage-CHhJsnOa-Bqq4fZva.js → VendorDetailPage-B0GRXPKg--VPcZWOw.js} +15 -15
  187. package/dist/assets/{VendorDomesticWireDetailsPage-BIwYrLOl-RRT_tSUL.js → VendorDomesticWireDetailsPage-CeI3QihK-q_cf3oNF.js} +1 -1
  188. package/dist/assets/{VendorFiling1099EditablePage-gnNbtQoj-DGAYWfCe.js → VendorFiling1099EditablePage-aNGSdZBf-MeHUgDES.js} +11 -11
  189. package/dist/assets/{VendorFirstReviewPage-Bj3eqx7P-CZXmjVPM.js → VendorFirstReviewPage-CjwnZLcm-DmkymrJ0.js} +40 -40
  190. package/dist/assets/{VendorInternationalWireDetailsPage-B_jwfV7H-BL3lT3ir.js → VendorInternationalWireDetailsPage-w-46Xxg--xMskWvbV.js} +15 -15
  191. package/dist/assets/{VendorInternationalWireSwiftDetailsPage-CvIV-HFr-D1Hc50Za.js → VendorInternationalWireSwiftDetailsPage-C5dogij9-DD3MG-8Z.js} +1 -1
  192. package/dist/assets/{VendorsAccountsSection-B2hWDuz0-YoT_oAP8.js → VendorsAccountsSection-DBYoP6us-C4im8TRF.js} +8 -8
  193. package/dist/assets/VerifyDevice-C-ZVbaIJ-BL0Q3Y3x.js +67 -0
  194. package/dist/assets/{WarningsDrawerPage-BBC1azy1-z1JqhFaT.js → WarningsDrawerPage-CZcR7kH4-sqfZfsTI.js} +22 -22
  195. package/dist/assets/{ZeniAccountDetailPage-mfrQO3zP-DHbG-Qat.js → ZeniAccountDetailPage-C-NQEE2--DiLlSCD5.js} +28 -28
  196. package/dist/assets/{ZeniAccountListViewPage-CCurA7tm-B1ByeEoa.js → ZeniAccountListViewPage-Cb8Ptf-w-Bz8qB5Gm.js} +20 -20
  197. package/dist/assets/ZeniAccountNavBarPieces-DX2iXF2E-CQG9bWdR.js +14 -0
  198. package/dist/assets/{ZeniAccountPromoPage-DgGD7ggF-FgyRM55s.js → ZeniAccountPromoPage-D5ihjbrM-uye9J5Yp.js} +29 -29
  199. package/dist/assets/{ZeniAccountSetupPage-D4z2k7G7-D3CuRZMF.js → ZeniAccountSetupPage-BRxz_tnh-hDbWbkKw.js} +5 -5
  200. package/dist/assets/{ZeniCopyright-BdLzk7SF-CQiuH4cG.js → ZeniCopyright-Bi82glrb-Dz0CNsex.js} +1 -1
  201. package/dist/assets/ZeniTransferAmountSlider-B4d4bp7D-Cs4p2KhU.js +63 -0
  202. package/dist/assets/{analyticsHelper-CzlOBCzS-Ba5yCVi8.js → analyticsHelper-D3DK7bgU-BvVFcTDm.js} +1 -1
  203. package/dist/assets/{analyticsHelper-BUf1K4hx.js → analyticsHelper-DijVlDk5.js} +1 -1
  204. package/dist/assets/{chartTypes-D-nEr9EI-C0zQa7Wt.js → chartTypes-DJY-6KK0-Bzq8Fcov.js} +1 -1
  205. package/dist/assets/{commonDimensions-DtXIXXfP-CxfCVUIm.js → commonDimensions-DRK1vfDX-CO7PCzy1.js} +1 -1
  206. package/dist/assets/{detailCommon-DZhn8ANF-DY0XYP-1.js → detailCommon-6K-6m9pv-2y9fI_2t.js} +9 -9
  207. package/dist/assets/{downloadPdf-BaFOiUYP-BhMvbAM3.js → downloadPdf-DAA4T-qo-CPXN54rf.js} +1 -1
  208. package/dist/assets/{index-C7yzTmij.js → index-CIAgrDi2.js} +4247 -4147
  209. package/dist/assets/{mapLoadingInProgressToTreeNode-VAL73To4-9VVcQ3qA.js → mapLoadingInProgressToTreeNode-BAlOrI07-CQVT-QlQ.js} +1 -1
  210. package/dist/assets/{mapSectionWithAcOnlyToTreeNode-C-2C7Gbr-Cj6NIyHy.js → mapSectionWithAcOnlyToTreeNode-Bk-EXs-E-B9fPZZTu.js} +1 -1
  211. package/dist/assets/{mapSpacerToTreeNode-vdqGP9FL-vsW_sRyC.js → mapSpacerToTreeNode-Cxd9BEJr--PDlNxOC.js} +1 -1
  212. package/dist/assets/{mapTimeframeBalancesToTreeNode-BwlF2Rvj-B2Id_UlX.js → mapTimeframeBalancesToTreeNode-BzFUtqqU-DR76PT1e.js} +1 -1
  213. package/dist/assets/{mapTimeframeBalancesToTreeNode-BFzyitoJ-DfU4qVFa.js → mapTimeframeBalancesToTreeNode-Cf8fsAZJ-D1uR1QLu.js} +1 -1
  214. package/dist/assets/{mapTimeframeHeaderLoadingInProgressToTreeNode-BhkQsZRW-Cbnmx738.js → mapTimeframeHeaderLoadingInProgressToTreeNode-CZMzZg1q-oHDpC_ju.js} +1 -1
  215. package/dist/assets/{play-icon-Dzfx02ir-dG88rl_z.js → play-icon-DY_hSiAf-DitmQkz7.js} +1 -1
  216. package/dist/assets/{toCOABalancesWithID-DN6cSuKb-DdLSsatB.js → toCOABalancesWithID-BaqBVqJ_-1rnUe3A4.js} +1 -1
  217. package/dist/assets/{toChartData-Bc3LMl7f-CXw-Y0dZ.js → toChartData-7MYPev1U-zJcYDtq1.js} +1 -1
  218. package/dist/assets/{treasuryColorHelper-Cv4RwMTx-Bw9OTLfX.js → treasuryColorHelper-CDhLDRLr-CltoUNO8.js} +1 -1
  219. package/dist/assets/{uploadAttachment-CxtYyGQy-CCbkX8ir.js → uploadAttachment-DqCoxBNU-CxpASWHI.js} +24 -24
  220. package/dist/assets/{uploadReceipts-D80JLNY4-COsGXapR.js → uploadReceipts-CU1mDxNv-0vPSSd-N.js} +1 -1
  221. package/dist/index.html +1 -1
  222. package/package.json +4 -4
  223. package/dist/assets/ACHDetailsPage-fN9d1vam-BnY47sVD.js +0 -21
  224. package/dist/assets/ArAgingDetailPage-DlmXkANV-D50f3oY6.js +0 -46
  225. package/dist/assets/ChargeCardUtils-EeXYTubM-APgPlZEM.js +0 -1
  226. package/dist/assets/CheckDepositDrawerPage-Da9ApPLD-DB3AcRhF.js +0 -206
  227. package/dist/assets/CompleteProfile-D_6UvHbF-Zc2ZxSIy.js +0 -36
  228. package/dist/assets/CurrencySelectField-DuZRNdJ7--Tr2SnT9.js +0 -139
  229. package/dist/assets/CustomerOnboardingContainerPage-BuVNUdQ_-BSSyR5Rm.js +0 -1
  230. package/dist/assets/DepositAccTransactionListPage-C-4zU6U_-CAplFsmy.js +0 -66
  231. package/dist/assets/DomesticWireDetailsPage-D3nSUYmr-DrDa4yas.js +0 -21
  232. package/dist/assets/EditPeoplePage-66twBgmc-pJSx1vDb.js +0 -55
  233. package/dist/assets/FeaturePreviewPage-FQsE4Qv8-rwV6xMgo.js +0 -11
  234. package/dist/assets/InsightsCardStack-D0wOSPaM-DgAtskKg.js +0 -79
  235. package/dist/assets/InvitePeoplePage-CL18FIeI-B4oObmQg.js +0 -12
  236. package/dist/assets/LabeledAddressValueField-fBxHfsjV-B45FeAVL.js +0 -45
  237. package/dist/assets/LabeledDocumentField-54KXTRM_-BBD50qxr.js +0 -41
  238. package/dist/assets/MagicLinkSuccessPage-BICciyLs-C8NFMe8v.js +0 -31
  239. package/dist/assets/MailingDetailsSection-Cce0Hg2V-fhJvFQv1.js +0 -21
  240. package/dist/assets/PortfolioAllocationFormPage-CmUaCrrW-CYMtoDWk.js +0 -207
  241. package/dist/assets/QBOSetupSection-CAtx-T_9-o42Omplj.js +0 -79
  242. package/dist/assets/ReimbursementApprovalRuleDetailPage-D0YkHEiY-Cd6_u7cb.js +0 -26
  243. package/dist/assets/ReimbursementPromoPage-DpBahcUT-CBe_bgtf.js +0 -112
  244. package/dist/assets/RoleWithToolTip-BPrl2KpS-CivGY3G2.js +0 -22
  245. package/dist/assets/TransactionVendorDetailPage-D2OO73Ia-CN6sZZEi.js +0 -80
  246. package/dist/assets/TreasuryStatementsPage-Dfw94h0a-BYoZAju1.js +0 -58
  247. package/dist/assets/TreasuryTaxLetterPage-D83IlTZG-C592xnfc.js +0 -58
  248. package/dist/assets/ZeniAccountNavBarPieces-CV5znR_M-WVZrWgkt.js +0 -14
  249. package/dist/assets/ZeniTransferAmountSlider-BN1YPh8H-Cut1vMY1.js +0 -63
@@ -1,32 +1,32 @@
1
- import{u as Z,X as ie,bC as me,a as fe,j as o,p as ge,M as Q,bD as ee,F as xe,C as P,a4 as be,o as n,bE as ye,bF as _e,bG as we,bH as $e,bI as ve,m as ce,bJ as Ce,q as p,v as ke,H as X,aY as je,a8 as Ne,e as Se,b0 as Ie}from"./index-C7yzTmij.js";import{b as f,f as de,n as d}from"./vendor-CnQcJ2Lu.js";import{W as D,R as Pe}from"./CollapsableReportTable-C2cQTlA6-CvrNaDb7.js";const z=Q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat,De=e=>({this_period:{start_date:e.thisPeriod.startDate.format(z),end_date:e.thisPeriod.endDate.format(z)},number_of_periods:e.numberOfPeriods,order_by:e.orderBy}),Fe=e=>e!=null?{start_date:e.startDate.format(z),end_date:e.endDate.format(z)}:void 0;function Oe(e){return{locale_id:e.localeId,show_negative_amount_in_parenthesis:e.showNegativeAmountInParenthesis,filter_accounts_with_nil_balances:e.filterAccountsWithNilBalances,filter_account_groups_with_nil_balances:e.filterAccountGroupsWithNilBalances,include_cover_page:e.includeCoverPage,company_name:e.companyName,statement_file_type:e.statementFileType,statements:e.statements,first_month_of_fy:e.firstMonthOfFY,book_close_date:e.bookCloseDate!=null?e.bookCloseDate.format(z):void 0,timeframe:e.timeframe,additional_balances:e.additionalBalances,format:e.format,balances_filter:De(e.balancesFilter),account_view_mode:e.accountViewMode,classes_to_filter_out:e.classesToFilterOut,data_available:Fe(e.dataAvailable),is_zeni_coa_used:e.isZeniCOAUsed}}async function no(e,c,a){const t=Q.getLocalizedStrings().downloadReport,r=`${e}?query=${encodeURIComponent(JSON.stringify(Oe(a)))}`;try{const h=await ye({urlEndPoint:r,authParams:c,fileType:a.statementFileType});if(h.ok){const b=_e(h.headers,t.defaultFileName),y=await h.arrayBuffer();we(y,b)}else console.error(`${t.reportErrorMessage} ${h.statusText}`)}catch(h){console.error(`${t.reportErrorMessage} ${JSON.stringify(h)}`)}}const Ee=d.div`
2
- padding: 0 ${n.sp3} 0 ${n.sp3};
1
+ import{u as Z,X as ie,bF as me,a as fe,j as o,r as ge,B as Q,bG as ee,F as xe,C as P,a4 as be,o as a,bH as ye,bI as _e,bJ as we,bK as $e,bL as ve,M as ce,bM as Ce,s as p,$ as ke,J as X,aY as je,a8 as Ne,n as Se,b0 as Ie}from"./index-CIAgrDi2.js";import{b as f,f as de,n as d}from"./vendor-CnQcJ2Lu.js";import{W as F,R as Pe}from"./CollapsableReportTable-CKmPwC_x-DvM2BIk1.js";const z=Q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat,Fe=e=>({this_period:{start_date:e.thisPeriod.startDate.format(z),end_date:e.thisPeriod.endDate.format(z)},number_of_periods:e.numberOfPeriods,order_by:e.orderBy}),Oe=e=>e!=null?{start_date:e.startDate.format(z),end_date:e.endDate.format(z)}:void 0;function De(e){return{locale_id:e.localeId,show_negative_amount_in_parenthesis:e.showNegativeAmountInParenthesis,filter_accounts_with_nil_balances:e.filterAccountsWithNilBalances,filter_account_groups_with_nil_balances:e.filterAccountGroupsWithNilBalances,include_cover_page:e.includeCoverPage,company_name:e.companyName,statement_file_type:e.statementFileType,statements:e.statements,first_month_of_fy:e.firstMonthOfFY,book_close_date:e.bookCloseDate!=null?e.bookCloseDate.format(z):void 0,timeframe:e.timeframe,additional_balances:e.additionalBalances,format:e.format,balances_filter:Fe(e.balancesFilter),account_view_mode:e.accountViewMode,classes_to_filter_out:e.classesToFilterOut,data_available:Oe(e.dataAvailable),is_zeni_coa_used:e.isZeniCOAUsed}}async function ao(e,c,n){const t=Q.getLocalizedStrings().downloadReport,r=`${e}?query=${encodeURIComponent(JSON.stringify(De(n)))}`;try{const h=await ye({urlEndPoint:r,authParams:c,fileType:n.statementFileType});if(h.ok){const b=_e(h.headers,t.defaultFileName),y=await h.arrayBuffer();we(y,b)}else console.error(`${t.reportErrorMessage} ${h.statusText}`)}catch(h){console.error(`${t.reportErrorMessage} ${JSON.stringify(h)}`)}}const Be=d.div`
2
+ padding: 0 ${a.sp3} 0 ${a.sp3};
3
3
  border: 1px solid ${e=>e.theme.colors.primary};
4
4
  background: ${e=>e.theme.colors.grey5};
5
- border-radius: ${n.sp1};
5
+ border-radius: ${a.sp1};
6
6
  display: flex;
7
7
  justify-content: space-between;
8
8
  align-items: center;
9
9
  position: relative;
10
- height: ${n.sp8};
10
+ height: ${a.sp8};
11
11
  cursor: pointer;
12
- `,Be=d(Se)`
12
+ `,Ee=d(Se)`
13
13
  color: ${e=>e.theme.colors.primary};
14
14
  margin-top: -2px;
15
15
  `,Le=d(Ie)`
16
16
  color: ${e=>e.theme.colors.hero};
17
17
  width: 12px;
18
18
  height: 12px;
19
- margin: auto ${n.sp0};
19
+ margin: auto ${a.sp0};
20
20
  :hover {
21
21
  color: ${e=>e.theme.colors.primary};
22
22
  }
23
- `,Ae=e=>{const{value:c,onClick:a}=e,t=Z();return o.jsxs(Ee,{onClick:a,children:[o.jsx(Be,{style:{color:t.colors.primary},children:c}),o.jsx(Le,{})]})},Te=de.memo(Ae);function Me({backgroundColor:e,foregroundColor:c,animated:a,width:t,height:r}){return o.jsxs(je,{speed:2,width:t,height:r,viewBox:`0 0 ${t} ${r}`,animate:a!=!1,backgroundColor:e,foregroundColor:c,style:{marginBottom:n.sp2},children:[o.jsx("rect",{x:"45",y:p[3],rx:"5",ry:"5",width:"120",height:p[4]}),o.jsx("rect",{x:"45",y:p[8],rx:"5",ry:"5",width:"120",height:p[4]}),o.jsx("rect",{x:"45",y:"96",rx:"5",ry:"5",width:"120",height:p[4]}),o.jsx("rect",{x:"45",y:"136",rx:"5",ry:"5",width:"120",height:p[4]})]})}function he({nestedClass:e,isLastNode:c,config:a,parentNodeIDs:t}){const r=D("checkbox_and_name_only",[],e.classId[0]),h={children:[],id:r,isLastNode:c,reportElementData:{element:{kind:"checkbox_and_name_only",title:e.className,data:e,numOfBalances:0},config:a}};return h.children=e.children.map((b,y)=>he({nestedClass:b,config:a,isLastNode:y===e.children.length-1,parentNodeIDs:[...t,r]})),h}function We(e,c){const a=e.map((t,r)=>{const h=D("checkbox_and_name_only",[],t.classId[0]),b={children:[],id:h,isLastNode:t.children.length!==0,reportElementData:{element:{kind:"checkbox_and_name_only",title:t.className,data:t,numOfBalances:0},config:c}},y=t.children.map(F=>he({nestedClass:F,config:c,isLastNode:r===t.children.length-1,parentNodeIDs:[h]}));return b.children.push(...y),b});return{config:c,headerNodes:[],contentNodes:[...a]}}function Re(e,c){Object.assign(e.config,c);const a=e.contentNodes;return a.forEach(t=>ue(t,c)),{config:c,headerNodes:[],contentNodes:[...a]}}function ue(e,c){Object.assign(e.reportElementData.config,c),e.children.forEach(a=>ue(a,c))}const oe={contentPaddingLeft:new P(p[3],p[3],p[2]),contentPaddingRight:new P(p[3],p[3],p[2])},ze=d.div`
23
+ `,Ae=e=>{const{value:c,onClick:n}=e,t=Z();return o.jsxs(Be,{onClick:n,children:[o.jsx(Ee,{style:{color:t.colors.primary},children:c}),o.jsx(Le,{})]})},Te=de.memo(Ae);function Me({backgroundColor:e,foregroundColor:c,animated:n,width:t,height:r}){return o.jsxs(je,{speed:2,width:t,height:r,viewBox:`0 0 ${t} ${r}`,animate:n!=!1,backgroundColor:e,foregroundColor:c,style:{marginBottom:a.sp2},children:[o.jsx("rect",{x:"45",y:p[3],rx:"5",ry:"5",width:"120",height:p[4]}),o.jsx("rect",{x:"45",y:p[8],rx:"5",ry:"5",width:"120",height:p[4]}),o.jsx("rect",{x:"45",y:"96",rx:"5",ry:"5",width:"120",height:p[4]}),o.jsx("rect",{x:"45",y:"136",rx:"5",ry:"5",width:"120",height:p[4]})]})}function he({nestedClass:e,isLastNode:c,config:n,parentNodeIDs:t}){const r=F("checkbox_and_name_only",[],e.classId[0]),h={children:[],id:r,isLastNode:c,reportElementData:{element:{kind:"checkbox_and_name_only",title:e.className,data:e,numOfBalances:0},config:n}};return h.children=e.children.map((b,y)=>he({nestedClass:b,config:n,isLastNode:y===e.children.length-1,parentNodeIDs:[...t,r]})),h}function Re(e,c){const n=e.map((t,r)=>{const h=F("checkbox_and_name_only",[],t.classId[0]),b={children:[],id:h,isLastNode:t.children.length!==0,reportElementData:{element:{kind:"checkbox_and_name_only",title:t.className,data:t,numOfBalances:0},config:c}},y=t.children.map(O=>he({nestedClass:O,config:c,isLastNode:r===t.children.length-1,parentNodeIDs:[h]}));return b.children.push(...y),b});return{config:c,headerNodes:[],contentNodes:[...n]}}function We(e,c){Object.assign(e.config,c);const n=e.contentNodes;return n.forEach(t=>ue(t,c)),{config:c,headerNodes:[],contentNodes:[...n]}}function ue(e,c){Object.assign(e.reportElementData.config,c),e.children.forEach(n=>ue(n,c))}const oe={contentPaddingLeft:new P(p[3],p[3],p[2]),contentPaddingRight:new P(p[3],p[3],p[2])},ze=d.div`
24
24
  height: ${e=>e.height}px;
25
25
  width: 100%;
26
- `,He=({reportId:e,firstMonthOfFY:c,nestedClassHierarchy:a,classesToBeFilteredOut:t,selectedView:r,showClassAccountNumber:h,scrollPosition:b,onScroll:y,nodeOpenStatus:F,onNodeCollapseToggled:U,onToggleCheck:O})=>{const H=Z(),Y=ie(),[$,j]=f.useState(void 0),[T,_]=f.useState(!1),[M,E]=f.useState({}),[g,W]=f.useState(void 0),[B,v]=f.useState(r),V="none",L=i=>r==="account_group"?!0:t?.length>0?t.find(l=>l[0]===i[0])!=null:!1,N=(i,l)=>{_(!0),E(i),O?.(i,l,r==="account_group"?!0:void 0),w(i,l)},w=(i,l)=>{const m=G(i);for(const C of m.children)O?.(C.classId,l),w(C.classId,l)},G=i=>{let l=a.filter(m=>m.classId[0]===i[i.length-1])[0];for(let m=i.length-2;m>=0;m--)l=l.children.filter(C=>C.classId[0]===i[m])[0];return l},q=i=>{if(i.length>1){const l=G(i.slice(1));let m=!1;for(const C of l.children)if(t.find(s=>s[0]===C.classId[0])===void 0){m=!0;break}m===!0?O?.(l.classId,!0):O?.(l.classId,!1),E(l.classId)}};f.useEffect(()=>{T&&q(M)}),f.useEffect(()=>{const i={reportId:e,displayOrder:"ascending_date",reportFormat:"more_detailed",mode:V,firstMonthOfFY:c,filterAccountsWithNilBalances:"off",filterAccountGroupsWithNilBalances:"off",showNegativeAmountInParenthesis:!1,isClassToBeFilteredOut:L,showClassAccountNumber:h};if($==null||!X(g,a)||!X(B,r)||T===!0){const l=We(a,i);W(a),j(l),v(r)}else{const l=Re($,i);j(l),v(r)}},[a,r,t]);const[J,K]=f.useState(5),A=i=>{const l=i+p[6];K(l)};return $!=null?o.jsx(ze,{height:J,children:o.jsx(Pe,{backgroundColor:r==="classes"?new Ne(H.colors.background):void 0,rootNodes:$,type:"name_only",compareMode:"compare_mode_amount",isSticky:{isStickyHeader:!1,isStickyName:!1},treeNodePadding:{left:oe.contentPaddingLeft.value(Y),right:oe.contentPaddingRight.value(Y)},scrollPosition:b,onScroll:y,nodeOpenStatus:F,onNodeCollapseToggled:U,onToggleCheck:N,onReportTableHeightChanged:A})}):null},k={width:new P(350,400,400),height:new P(165,165,165),buttonWidth:new P(62,62),buttonHeight:new P(p[5],p[5]),containerWidth:new P(150,400,400)},Ye=d.div`
26
+ `,He=({reportId:e,firstMonthOfFY:c,nestedClassHierarchy:n,classesToBeFilteredOut:t,selectedView:r,showClassAccountNumber:h,scrollPosition:b,onScroll:y,nodeOpenStatus:O,onNodeCollapseToggled:U,onToggleCheck:D})=>{const H=Z(),V=ie(),[$,j]=f.useState(void 0),[T,_]=f.useState(!1),[M,B]=f.useState({}),[g,R]=f.useState(void 0),[E,v]=f.useState(r),Y="none",L=i=>r==="account_group"?!0:t?.length>0?t.find(l=>l[0]===i[0])!=null:!1,N=(i,l)=>{_(!0),B(i),D?.(i,l,r==="account_group"?!0:void 0),w(i,l)},w=(i,l)=>{const m=G(i);for(const C of m.children)D?.(C.classId,l),w(C.classId,l)},G=i=>{let l=n.filter(m=>m.classId[0]===i[i.length-1])[0];for(let m=i.length-2;m>=0;m--)l=l.children.filter(C=>C.classId[0]===i[m])[0];return l},J=i=>{if(i.length>1){const l=G(i.slice(1));let m=!1;for(const C of l.children)if(t.find(s=>s[0]===C.classId[0])===void 0){m=!0;break}m===!0?D?.(l.classId,!0):D?.(l.classId,!1),B(l.classId)}};f.useEffect(()=>{T&&J(M)}),f.useEffect(()=>{const i={reportId:e,displayOrder:"ascending_date",reportFormat:"more_detailed",mode:Y,firstMonthOfFY:c,filterAccountsWithNilBalances:"off",filterAccountGroupsWithNilBalances:"off",showNegativeAmountInParenthesis:!1,isClassToBeFilteredOut:L,showClassAccountNumber:h};if($==null||!X(g,n)||!X(E,r)||T===!0){const l=Re(n,i);R(n),j(l),v(r)}else{const l=We($,i);j(l),v(r)}},[n,r,t]);const[q,K]=f.useState(5),A=i=>{const l=i+p[6];K(l)};return $!=null?o.jsx(ze,{height:q,children:o.jsx(Pe,{backgroundColor:r==="classes"?new Ne(H.colors.background):void 0,rootNodes:$,type:"name_only",compareMode:"compare_mode_amount",isSticky:{isStickyHeader:!1,isStickyName:!1},treeNodePadding:{left:oe.contentPaddingLeft.value(V),right:oe.contentPaddingRight.value(V)},scrollPosition:b,onScroll:y,nodeOpenStatus:O,onNodeCollapseToggled:U,onToggleCheck:N,onReportTableHeightChanged:A})}):null},k={width:new P(350,400,400),height:new P(165,165,165),buttonWidth:new P(62,62),buttonHeight:new P(p[5],p[5]),containerWidth:new P(150,400,400)},Ve=d.div`
27
27
  position: relative;
28
28
  pointer-events: ${e=>e.isDisabled===!0?"none":"initial"};
29
- `,Ve=d.div`
29
+ `,Ye=d.div`
30
30
  display: flex;
31
31
  flex-direction: column;
32
32
  width: ${e=>k.containerWidth.valuePx(e.windowSize)};
@@ -44,27 +44,27 @@ import{u as Z,X as ie,bC as me,a as fe,j as o,p as ge,M as Q,bD as ee,F as xe,C
44
44
  color: ${e=>e.theme.colors.primary};
45
45
  }
46
46
  }
47
- gap: ${n.sp2};
47
+ gap: ${a.sp2};
48
48
  margin-top: 12px;
49
49
  align-items: center;
50
- `,qe=d(ve)`
50
+ `,Je=d(ve)`
51
51
  color: ${e=>e.theme.colors.hero};
52
- width: ${n.sp4};
53
- height: ${n.sp4};
52
+ width: ${a.sp4};
53
+ height: ${a.sp4};
54
54
  &:hover {
55
55
  color: ${e=>e.theme.colors.primary};
56
56
  }
57
- `,Je=d.div`
57
+ `,qe=d.div`
58
58
  display: flex;
59
59
  width: ${e=>e.width}px;
60
60
  align-items: flex-start;
61
61
  justify-content: space-between;
62
62
  flex-direction: column;
63
63
  border: 1px solid ${e=>e.theme.colors.grey5};
64
- border-radius: ${n.sp1};
65
- box-shadow: ${e=>`${n.sp0} 2px ${n.sp2} ${e.theme.colors.dropShadowHover}`};
64
+ border-radius: ${a.sp1};
65
+ box-shadow: ${e=>`${a.sp0} 2px ${a.sp2} ${e.theme.colors.dropShadowHover}`};
66
66
  margin-top: 10px;
67
- padding-top: ${n.sp1};
67
+ padding-top: ${a.sp1};
68
68
  background: ${e=>e.theme.colors.grey5};
69
69
  `,te=d.div`
70
70
  display: flex;
@@ -78,13 +78,13 @@ import{u as Z,X as ie,bC as me,a as fe,j as o,p as ge,M as Q,bD as ee,F as xe,C
78
78
  -moz-appearance: none;
79
79
  appearance: none;
80
80
  display: inline-block;
81
- width: ${n.sp3};
82
- height: ${n.sp3};
81
+ width: ${a.sp3};
82
+ height: ${a.sp3};
83
83
  padding: 2px;
84
84
  background-clip: content-box;
85
85
  border: 1px solid ${e=>e.theme.colors.primary};
86
86
  border-radius: 50%;
87
- margin: ${n.sp0} ${n.sp2} ${n.sp0} ${n.sp2};
87
+ margin: ${a.sp0} ${a.sp2} ${a.sp0} ${a.sp2};
88
88
  cursor: pointer;
89
89
  }
90
90
 
@@ -100,7 +100,7 @@ import{u as Z,X as ie,bC as me,a as fe,j as o,p as ge,M as Q,bD as ee,F as xe,C
100
100
  background: ${e=>e.theme.colors.background};
101
101
  }
102
102
  `,se=d(ke)`
103
- height: ${n.sp6};
103
+ height: ${a.sp6};
104
104
  display: flex;
105
105
  justify-content: center;
106
106
  align-items: center;
@@ -120,14 +120,14 @@ import{u as Z,X as ie,bC as me,a as fe,j as o,p as ge,M as Q,bD as ee,F as xe,C
120
120
  `,Ke=d.div`
121
121
  width: 100%;
122
122
  height: 65px;
123
- `,ae=d.label`
123
+ `,ne=d.label`
124
124
  color: ${e=>e.theme.colors.primary};
125
125
  cursor: ${e=>e.disabled===!0?"default":"pointer"};
126
126
  `,Xe=d(ce)`
127
127
  display: flex;
128
128
  align-items: center;
129
- column-gap: ${n.sp2};
130
- margin-left: ${n.sp5};
129
+ column-gap: ${a.sp2};
130
+ margin-left: ${a.sp5};
131
131
  color: ${e=>e.theme.colors.hero};
132
132
  &:hover {
133
133
  cursor: pointer;
@@ -141,10 +141,10 @@ import{u as Z,X as ie,bC as me,a as fe,j as o,p as ge,M as Q,bD as ee,F as xe,C
141
141
  min-height: 1px;
142
142
  max-height: 1px;
143
143
  `,Qe=d(Ce)`
144
- width: ${n.sp3};
145
- height: ${n.sp3};
144
+ width: ${a.sp3};
145
+ height: ${a.sp3};
146
146
  `,eo=d(ce)`
147
- margin-left: ${n.sp5};
147
+ margin-left: ${a.sp5};
148
148
  margin-top: -12px;
149
149
  color: ${e=>e.theme.colors.hero};
150
- `,{reportViewSelector:I,common:{footer:ne}}=Q.getLocalizedStrings(),re="tableViewSelector",le=e=>`${e}_form`;function ro({reportId:e,firstMonthOfFY:c,nodes:a,classesListFetchState:t,selectedView:r,classesToBeFilteredOut:h,showClassAccountNumber:b,onOpenAccountViewMode:y,onSaveClick:F,isClassViewDisabled:U,downloadPage:O,showAccountGroups:H=!0,onResyncReports:Y,isPageFetchInProgress:$=!1,lastRefreshSuccessTime:j}){const T=Z(),_=ie(),[M,E]=f.useState(!1),[g,W]=f.useState(r),[B,v]=f.useState({}),V=(s,u)=>(s.forEach(x=>{u.push(x.classId),u=V(x.children,u)}),u),L=V(a,[]),[N,w]=f.useState(g==="classes"?h:L),G=t!=="Completed"||g==="classes"&&N.length===L.length;me({componentName:`reports.${e}`});const q=s=>s==="classes"?I.classes.label:H===!0?I.accountGroups.label:I.accounts.label,J=fe({mode:"all"}),K=J.handleSubmit(()=>{E(!1),g==="classes"?F?.("classes",N):F?.("account_group")}),A=s=>{if(W(s),s==="classes")v({}),w([]);else{w(L);let u={};a.forEach(x=>{const S=D("checkbox_and_name_only",[],x.classId[0]);u=Object.assign({},u,{[S]:!1})}),v(u)}},i=()=>{M===!0&&m(),E(!M);let s={};a.forEach(u=>{const x=D("checkbox_and_name_only",[],u.classId[0]);r==="account_group"||N.find(S=>S[0]===u.classId[0])!==void 0?s=Object.assign({},s,{[x]:!1}):s=Object.assign({},s,{[x]:!0})}),v(s)},l=(s,u,x)=>{if(x===!0&&(W("classes"),w(L)),u===!0){const S=D("checkbox_and_name_only",[],s[0]);B[S]=!0,v(B),w(R=>R.filter(pe=>pe[0]!==s[0]))}else{const S=D("checkbox_and_name_only",[],s[0]);B[S]=!1,N.find(R=>R[0]===s[0])===void 0&&w(R=>[...R,s])}},m=()=>{E(!1),W(r),w(h)},C=()=>{$===!1&&Y?.()};return f.useEffect(()=>{if(t==="Completed"&&g==="account_group"){let s={};a.forEach(u=>{const x=D("checkbox_and_name_only",[],u.classId[0]);s=Object.assign({},s,{[x]:!1})}),v(s)}},[t]),o.jsx(ge,{onClickAway:m,children:o.jsxs(Ye,{isDisabled:U??!1,children:[O===!0?o.jsx(Te,{value:q(r),onClick:()=>{y?.(),i()}}):o.jsxs(Ve,{windowSize:_,children:[o.jsxs(Ge,{onClick:s=>{s.preventDefault(),y?.(),i()},children:[o.jsx(qe,{className:"dropdownIcon"}),q(r)]}),r==="classes"?o.jsx(Xe,{onClick:C,children:$?I.generatingReportByClass:o.jsxs(o.Fragment,{children:[j&&`${ee(j)}`,o.jsx(Qe,{})]})}):null]}),M?o.jsx(xe,{...J,children:o.jsx("form",{id:le(re),onSubmit:K,children:o.jsxs(Je,{width:k.width.value(_),children:[o.jsx(te,{checked:g==="account_group",children:o.jsxs(se,{onClick:()=>g!=="account_group"?A("account_group"):null,children:[o.jsx("input",{type:"radio",value:"account_group",id:"accountGroups",name:"formgroup",onChange:s=>A(s.currentTarget.value),checked:g==="account_group",disabled:t!=="Completed"}),o.jsx(ae,{disabled:t!=="Completed",children:H===!0?I.accountGroups.dropdownLabel:I.accounts.dropdownLabel})]})}),o.jsx(Ze,{}),o.jsxs(te,{checked:g==="classes",children:[o.jsxs(se,{onClick:()=>t==="Completed"?A("classes"):null,children:[o.jsx("input",{type:"radio",value:"classes",id:"classes",name:"formgroup",onChange:s=>t==="Completed"?A(s.currentTarget.value):null,checked:g==="classes",disabled:t!=="Completed"}),o.jsx(ae,{disabled:t!=="Completed",children:I.classes.dropdownLabel})]}),$||t!=="Completed"?null:o.jsx(eo,{children:j&&`${ee(j)}`}),t==="Completed"?o.jsx(Ue,{id:"sectionformcontainer",children:o.jsx(oo,{reportId:e,firstMonthOfFY:c,nestedClassHierarchy:a,classesToBeFilteredOut:N,selectedView:g,nodeOpenStatus:B,showClassAccountNumber:b,onToggleCheck:l})}):o.jsx(Me,{backgroundColor:T.colors.grey3,foregroundColor:T.colors.grey4,width:k.width.value(_),height:k.height.value(_),animated:!0})]}),o.jsx(Ke,{children:o.jsx(be,{formId:le(re),primaryBtn:{label:ne.save,style:{width:k.buttonWidth.valuePx(_),height:k.buttonHeight.valuePx(_)},isLoading:!1,isDisabled:G,size:"small"},showCancel:!0,cancelBtn:{label:ne.cancel,style:{width:k.buttonWidth.valuePx(_),height:k.buttonHeight.valuePx(_)},onClick:m,size:"small",shouldResetOnCancel:!0},style:{padding:n.sp3}})})]})})}):null]})})}const oo=de.memo(He,X);export{no as c,ro as h};
150
+ `,{reportViewSelector:I,common:{footer:ae}}=Q.getLocalizedStrings(),re="tableViewSelector",le=e=>`${e}_form`;function ro({reportId:e,firstMonthOfFY:c,nodes:n,classesListFetchState:t,selectedView:r,classesToBeFilteredOut:h,showClassAccountNumber:b,onOpenAccountViewMode:y,onSaveClick:O,isClassViewDisabled:U,downloadPage:D,showAccountGroups:H=!0,onResyncReports:V,isPageFetchInProgress:$=!1,lastRefreshSuccessTime:j}){const T=Z(),_=ie(),[M,B]=f.useState(!1),[g,R]=f.useState(r),[E,v]=f.useState({}),Y=(s,u)=>(s.forEach(x=>{u.push(x.classId),u=Y(x.children,u)}),u),L=Y(n,[]),[N,w]=f.useState(g==="classes"?h:L),G=t!=="Completed"||g==="classes"&&N.length===L.length;me({componentName:`reports.${e}`});const J=s=>s==="classes"?I.classes.label:H===!0?I.accountGroups.label:I.accounts.label,q=fe({mode:"all"}),K=q.handleSubmit(()=>{B(!1),g==="classes"?O?.("classes",N):O?.("account_group")}),A=s=>{if(R(s),s==="classes")v({}),w([]);else{w(L);let u={};n.forEach(x=>{const S=F("checkbox_and_name_only",[],x.classId[0]);u=Object.assign({},u,{[S]:!1})}),v(u)}},i=()=>{M===!0&&m(),B(!M);let s={};n.forEach(u=>{const x=F("checkbox_and_name_only",[],u.classId[0]);r==="account_group"||N.find(S=>S[0]===u.classId[0])!==void 0?s=Object.assign({},s,{[x]:!1}):s=Object.assign({},s,{[x]:!0})}),v(s)},l=(s,u,x)=>{if(x===!0&&(R("classes"),w(L)),u===!0){const S=F("checkbox_and_name_only",[],s[0]);E[S]=!0,v(E),w(W=>W.filter(pe=>pe[0]!==s[0]))}else{const S=F("checkbox_and_name_only",[],s[0]);E[S]=!1,N.find(W=>W[0]===s[0])===void 0&&w(W=>[...W,s])}},m=()=>{B(!1),R(r),w(h)},C=()=>{$===!1&&V?.()};return f.useEffect(()=>{if(t==="Completed"&&g==="account_group"){let s={};n.forEach(u=>{const x=F("checkbox_and_name_only",[],u.classId[0]);s=Object.assign({},s,{[x]:!1})}),v(s)}},[t]),o.jsx(ge,{onClickAway:m,children:o.jsxs(Ve,{isDisabled:U??!1,children:[D===!0?o.jsx(Te,{value:J(r),onClick:()=>{y?.(),i()}}):o.jsxs(Ye,{windowSize:_,children:[o.jsxs(Ge,{onClick:s=>{s.preventDefault(),y?.(),i()},children:[o.jsx(Je,{className:"dropdownIcon"}),J(r)]}),r==="classes"?o.jsx(Xe,{onClick:C,children:$?I.generatingReportByClass:o.jsxs(o.Fragment,{children:[j&&`${ee(j)}`,o.jsx(Qe,{})]})}):null]}),M?o.jsx(xe,{...q,children:o.jsx("form",{id:le(re),onSubmit:K,children:o.jsxs(qe,{width:k.width.value(_),children:[o.jsx(te,{checked:g==="account_group",children:o.jsxs(se,{onClick:()=>g!=="account_group"?A("account_group"):null,children:[o.jsx("input",{type:"radio",value:"account_group",id:"accountGroups",name:"formgroup",onChange:s=>A(s.currentTarget.value),checked:g==="account_group",disabled:t!=="Completed"}),o.jsx(ne,{disabled:t!=="Completed",children:H===!0?I.accountGroups.dropdownLabel:I.accounts.dropdownLabel})]})}),o.jsx(Ze,{}),o.jsxs(te,{checked:g==="classes",children:[o.jsxs(se,{onClick:()=>t==="Completed"?A("classes"):null,children:[o.jsx("input",{type:"radio",value:"classes",id:"classes",name:"formgroup",onChange:s=>t==="Completed"?A(s.currentTarget.value):null,checked:g==="classes",disabled:t!=="Completed"}),o.jsx(ne,{disabled:t!=="Completed",children:I.classes.dropdownLabel})]}),$||t!=="Completed"?null:o.jsx(eo,{children:j&&`${ee(j)}`}),t==="Completed"?o.jsx(Ue,{id:"sectionformcontainer",children:o.jsx(oo,{reportId:e,firstMonthOfFY:c,nestedClassHierarchy:n,classesToBeFilteredOut:N,selectedView:g,nodeOpenStatus:E,showClassAccountNumber:b,onToggleCheck:l})}):o.jsx(Me,{backgroundColor:T.colors.grey3,foregroundColor:T.colors.grey4,width:k.width.value(_),height:k.height.value(_),animated:!0})]}),o.jsx(Ke,{children:o.jsx(be,{formId:le(re),primaryBtn:{label:ae.save,style:{width:k.buttonWidth.valuePx(_),height:k.buttonHeight.valuePx(_)},isLoading:!1,isDisabled:G,size:"small"},showCancel:!0,cancelBtn:{label:ae.cancel,style:{width:k.buttonWidth.valuePx(_),height:k.buttonHeight.valuePx(_)},onClick:m,size:"small",shouldResetOnCancel:!0},style:{padding:a.sp3}})})]})})}):null]})})}const oo=de.memo(He,X);export{ao as c,ro as h};
@@ -1,9 +1,9 @@
1
- import{X as U,u as G,M as y,w as he,l as _,j as r,_ as k,be as fe,aX as me,aV as ge,C as v,o as C,a6 as _e,c as be,bf as Se,q as w,D as B,H as J,bg as we,a8 as Ce,aC as ye,a_ as xe}from"./index-C7yzTmij.js";import{b as P,f as K,n as b}from"./vendor-CnQcJ2Lu.js";import{m as z,l as Z}from"./analyticsHelper-CzlOBCzS-Ba5yCVi8.js";import{h as Oe}from"./ReportTableViewSelector-2gwwu23O-D4SUAhgu.js";import{a as Q,p as Re}from"./TimeRangeSwitcher-CD16lox0-Bi5yNRU7.js";import{M as Ae}from"./TimeframeSwitcherWithToggle-D35sc3g8-CG8BhQxV.js";import{DownloadOverlayButton as Be}from"./DownloadOverlay-D18IYrMS-DZ5Hslzj.js";import{R as ve,W as F,x as ee}from"./CollapsableReportTable-C2cQTlA6-CvrNaDb7.js";import{T as te,I as se,L as j,D as Le,g as ne}from"./mapSectionWithAcOnlyToTreeNode-C-2C7Gbr-Cj6NIyHy.js";import{s as Y}from"./mapTimeframeBalancesToTreeNode-BFzyitoJ-DfU4qVFa.js";import{d as Te,l as Pe}from"./mapTimeframeHeaderLoadingInProgressToTreeNode-BhkQsZRW-Cbnmx738.js";import{d as ke}from"./mapLoadingInProgressToTreeNode-VAL73To4-9VVcQ3qA.js";import"./mui-C5LQ0bMa.js";import"./analytics-CBL_L82S.js";import"./routing-Cpaypegg.js";import"./sentry-HDxG13yk.js";import"./redux-ByjIRbhZ.js";import"./liveblocks-sSQ9JElv.js";import"./crypto-BURQLTgV.js";import"./TimeframeSwitcher-C7i0JFHk-Y8yZXQA6.js";import"./page-detail-CWX5S47F-B6DjZ3Gi.js";import"./AccountRow-DDUdlArT-CdXNJ8jC.js";function oe({section:e,sectionId:t,numOfBalances:o,config:a}){return ee("no_filter",a.filterAccountsWithNilBalances,a.filterAccountGroupsWithNilBalances).compactedAccountGroupsSelector(e.accountGroups).map(n=>Ie({accountGroup:n,sectionType:t,numOfBalances:o,title:n.accountGroupName,isLastNode:!0,config:a}))}function Ie({accountGroup:e,sectionType:t,numOfBalances:o,title:a,isLastNode:n,config:d}){const p=F("section",[],a+t),l={children:[],id:p,isLastNode:n,reportElementData:{element:{kind:"section",title:a,sectionType:t,data:e,numOfBalances:o},config:d}},i=ee("no_filter",d.filterAccountsWithNilBalances,d.filterAccountGroupsWithNilBalances).compactedAccountsSelectorVariant(e.accounts),u=i.map((g,h)=>ne({account:g,sectionType:t,numOfBalances:o,title:g.account.accountName,config:d,isLastNode:h===i.length-1,parentNodeIDs:[p],ancestorMetadata:{subAccountAncestorMetadata:[{depth:0,hasSibling:i.length>1,hasChildren:g.children.length>0,isLastNode:h===i.length-1}]}}));return l.children.push(...u),l}function ae({sectionWithAcOnly:e,sectionType:t,numOfBalances:o,config:a}){return e.accounts.map((n,d)=>ne({account:n,sectionType:t,numOfBalances:o,title:n.account.accountName,config:a,isLastNode:d===e.accounts.length-1,parentNodeIDs:[],ancestorMetadata:{subAccountAncestorMetadata:[{depth:0,hasSibling:e.accounts.length>1,hasChildren:n.children.length>0,isLastNode:d===e.accounts.length-1}]}}))}function ie({balances:e,config:t,nodeId:o}){return{children:[],id:o??F("timeframe_header",[]),isLastNode:!1,reportElementData:{element:{kind:t.mode==="actual_vs_forecast"?"timeframe_headers_with_forecast":"timeframe_headers",title:"",data:e,numOfBalances:e.length},config:t}}}function Ne(e,t,o,a=!0){Object.assign(e.config,t);const n=ce(o),d=Y({balances:n,config:t});return{config:t,headerNodes:a?[d]:[],contentNodes:[d,...e.contentNodes.slice(1)]}}const ce=e=>{switch(e.reportId){case"profit_and_loss":{const t=e;return t.sections.expenses.balances.length>0?[...t.sections.expenses.balances,...t.sections.expenses.additionalBalances]:[...t.sections.income.balances,...t.sections.income.additionalBalances]}case"profit_and_loss_by_classes":{const t=e;return t.sections.expenses.balances.length>0?[...t.sections.expenses.balances,...t.sections.expenses.additionalBalances]:[...t.sections.income.balances,...t.sections.income.additionalBalances]}case"cash_flow":{const t=e;return[...t.calculatedSections.operatingActivitiesTotal.balances,...t.calculatedSections.operatingActivitiesTotal.additionalBalances]}case"balance_sheet":{const t=e;let o=[];return Object.keys(t.sections).forEach(a=>{t.sections[a].balances.length>0&&(o=[...t.sections[a].balances,...t.sections[a].additionalBalances])}),o}default:return[]}};function Me(e,t,o=!0){const a=y.getLocalizedStrings().reports.sections,n=y.getLocalizedStrings().reports.balanceSheet,d=ce(e),p=t.mode!=null&&t.mode==="this_period_vs_period_before"&&d.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1,l=ie({balances:d,config:t}),i=[];return i.push(l),Object.keys(e.rootSectionsWithSubSectionIds).forEach(u=>{const g=F("title_string_only",[],u),h={children:[],id:g,isLastNode:!0,reportElementData:{element:{kind:"title_string_only",title:a[u],data:void 0,numOfBalances:0},config:t}};i.push(h),e.rootSectionsWithSubSectionIds[u].forEach(s=>{if(_.isBalanceSheetReportViewSectionID(s)===!0)if(e.sections[s].accountGroups.length>0)if(s==="equity"){const c=oe({sectionId:s,section:e.sections[s],numOfBalances:p,config:t});i.push(...c)}else i.push(te({section:e.sections[s],sectionType:s,numOfBalances:p,title:n[s],isLastNode:!0,config:t}));else if(s==="equity"){const c=ae({sectionWithAcOnly:e.sections[s],sectionType:s,numOfBalances:p,config:t});i.push(...c)}else{const c=e.sections[s];i.push(se({sectionWithAcOnly:c,sectionType:s,numOfBalances:p,title:n[s],isLastNode:!0,config:t}))}else _.isBalanceSheetReportViewCalculatedSectionID(s)===!0&&i.push(j({calculatedSection:e.calculatedSections[s],numOfBalances:p,title:n[s],isLastNode:!0,config:t}))})}),{config:t,headerNodes:o?[l]:[],contentNodes:i}}function Fe({calculatedSection:e,numOfBalances:t,title:o,isLastNode:a,config:n}){return{children:[],id:F("calculated_section_type1",[],o),isLastNode:a,reportElementData:{element:{kind:"calculated_section_type1",title:o,data:e,numOfBalances:t},config:n}}}function $e(e,t,o=!0){const a=y.getLocalizedStrings().reports.sections,n=y.getLocalizedStrings().reports.cashFlow,d=[...e.calculatedSections.operatingActivitiesTotal.balances,...e.calculatedSections.operatingActivitiesTotal.additionalBalances],p=t.mode!=null&&t.mode==="this_period_vs_period_before"&&d.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1,l=ie({balances:d,config:t}),i=[];return Object.keys(e.rootSectionsWithSubSectionIds).forEach(u=>{const g=F("title_string_only",[],u),h={children:[],id:g,isLastNode:!0,reportElementData:{element:{kind:"title_string_only",title:a[u],data:void 0,numOfBalances:0},config:t}};i.push(h),e.rootSectionsWithSubSectionIds[u].forEach(s=>{if(_.isCashFlowReportViewSectionID(s)===!0)if(e.sections[s].accountGroups.length>0){const c=oe({sectionId:s,section:e.sections[s],numOfBalances:p,config:t});i.push(...c)}else{const c=ae({sectionWithAcOnly:e.sections[s],sectionType:s,numOfBalances:p,config:t});i.push(...c)}else _.isCashFlowReportViewCalculatedSectionType1ID(s)===!0?i.push(Fe({calculatedSection:e.calculatedSections[s],numOfBalances:p,title:n[s],isLastNode:!0,config:t})):_.isCashFlowReportViewCalculatedSectionID(s)===!0&&i.push(j({calculatedSection:e.calculatedSections[s],numOfBalances:p,title:n[s],isLastNode:!0,config:t}))})}),{config:t,headerNodes:o?[l]:[],contentNodes:[l,...i]}}function je(e,t,o=!0,a=!1){const n=y.getLocalizedStrings().reports,d=y.getLocalizedStrings().common;let p=[];const l=[];let i=[];if(a===!0){const u=Te({title:d.loading,balances:[],config:t});u.reportElementData.element.numOfBalances=6,o&&(i=[u]),l.push(u),[...Array(8)].forEach((g,h)=>{const s=h%4;let c=Pe[s];const x=ke({title:`${h}+${c}`,balances:p,config:t});x.reportElementData.element.numOfBalances=6,l.push(x)})}else{const u=e.sections.expenses.balances.length>0?[...e.sections.expenses.balances,...e.sections.expenses.additionalBalances]:e.sections.income.balances.length>0?[...e.sections.income.balances,...e.sections.income.additionalBalances]:e.sections.cogs.balances.length>0?[...e.sections.cogs.balances,...e.sections.cogs.additionalBalances]:e.sections.otherIncome.balances.length>0?[...e.sections.otherIncome.balances,...e.sections.otherIncome.additionalBalances]:e.sections.otherExpenses.balances.length>0?[...e.sections.otherExpenses.balances,...e.sections.otherExpenses.additionalBalances]:[],g=Y({balances:u,config:t}),h=t.mode!=null&&t.mode==="this_period_vs_period_before"&&u.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1;l.push(g),o&&(i=[g]),e.idsInOrder.forEach(s=>{if(_.isPandLReportViewSectionID(s)===!0){const c=e.sections[s];c!=null&&l.push(Le({section:c,sectionType:s,numOfBalances:h,title:n.sections[s],isLastNode:!0,config:t}))}else if(_.isPandLReportViewCalculatedSectionID(s)===!0){const c=e.calculatedSections[s];c!=null&&l.push(j({calculatedSection:c,numOfBalances:h,title:n.sections[s],isLastNode:!0,config:t}))}})}return{config:t,headerNodes:i,contentNodes:l}}function Ee(e,t,o=!0){const a=y.getLocalizedStrings().reports,n=e.sections.expenses!=null&&e.sections.expenses.balances.length>0?[...e.sections.expenses.balances,...e.sections.expenses.additionalBalances]:e.sections.income!=null&&e.sections.income.balances.length>0?[...e.sections.income.balances,...e.sections.income.additionalBalances]:e.sections.cogs!=null&&e.sections.cogs.balances.length>0?[...e.sections.cogs.balances,...e.sections.cogs.additionalBalances]:e.sections.otherIncome!=null&&e.sections.otherIncome.balances.length>0?[...e.sections.otherIncome.balances,...e.sections.otherIncome.additionalBalances]:e.sections.otherExpenses!=null&&e.sections.otherExpenses.balances.length>0?[...e.sections.otherExpenses.balances,...e.sections.otherExpenses.additionalBalances]:[],d=t.mode!=null&&t.mode==="this_period_vs_period_before"&&n.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1,p=Y({balances:n,config:t}),l=[];return l.push(p),e.idsInOrder.forEach(i=>{if(_.isPandLReportViewSectionID(i)===!0&&(e.sections[i].accountGroups.length>0?l.push(te({section:e.sections[i],sectionType:i,numOfBalances:d,title:a.sections[i],isLastNode:!0,config:t})):l.push(se({sectionWithAcOnly:e.sections[i],sectionType:i,numOfBalances:d,title:a.sections[i],isLastNode:!0,config:t}))),_.isPandLReportViewCalculatedSectionID(i)===!0){const u=e.calculatedSections[i];u!=null&&l.push(j({calculatedSection:u,numOfBalances:d,title:a.sections[i],isLastNode:!0,config:t}))}}),{config:t,headerNodes:o?[p]:[],contentNodes:l}}const q={contentPaddingLeft:new v(w[0],w[0],w[0]),contentPaddingRight:new v(w[3],w[3],w[8])},Ve=b.div`
1
+ import{X as U,u as G,B as y,y as he,l as _,j as r,_ as k,be as fe,aX as me,aV as ge,C as v,o as C,a6 as _e,i as be,bf as Se,s as w,I as B,J as Q,bg as we,a8 as Ce,aC as ye,a_ as xe}from"./index-CIAgrDi2.js";import{b as P,f as X,n as b}from"./vendor-CnQcJ2Lu.js";import{m as z,l as Z}from"./analyticsHelper-D3DK7bgU-BvVFcTDm.js";import{h as Oe}from"./ReportTableViewSelector-BRA3CT_O-BWHSw_d5.js";import{a as K,p as Re}from"./TimeRangeSwitcher-D9KzhRYO-DSUt4L30.js";import{M as Ae}from"./TimeframeSwitcherWithToggle-Cb91RXpD-Bqbdu9xs.js";import{DownloadOverlayButton as Be}from"./DownloadOverlay-BoIyiJ9R-BzDhGwzl.js";import{R as ve,W as F,x as ee}from"./CollapsableReportTable-CKmPwC_x-DvM2BIk1.js";import{T as te,I as se,L as j,D as Le,g as ne}from"./mapSectionWithAcOnlyToTreeNode-Bk-EXs-E-B9fPZZTu.js";import{s as Y}from"./mapTimeframeBalancesToTreeNode-Cf8fsAZJ-D1uR1QLu.js";import{d as Te,l as Pe}from"./mapTimeframeHeaderLoadingInProgressToTreeNode-CZMzZg1q-oHDpC_ju.js";import{d as ke}from"./mapLoadingInProgressToTreeNode-BAlOrI07-CQVT-QlQ.js";import"./mui-C5LQ0bMa.js";import"./analytics-CBL_L82S.js";import"./routing-Cpaypegg.js";import"./sentry-HDxG13yk.js";import"./redux-ByjIRbhZ.js";import"./liveblocks-sSQ9JElv.js";import"./crypto-BURQLTgV.js";import"./TimeframeSwitcher-CbEHKZvd-CUipNC15.js";import"./page-detail-CWX5S47F-B6DjZ3Gi.js";import"./AccountRow-BpBK8mVs-D3-rIOZV.js";function oe({section:e,sectionId:t,numOfBalances:o,config:a}){return ee("no_filter",a.filterAccountsWithNilBalances,a.filterAccountGroupsWithNilBalances).compactedAccountGroupsSelector(e.accountGroups).map(n=>Ie({accountGroup:n,sectionType:t,numOfBalances:o,title:n.accountGroupName,isLastNode:!0,config:a}))}function Ie({accountGroup:e,sectionType:t,numOfBalances:o,title:a,isLastNode:n,config:d}){const p=F("section",[],a+t),l={children:[],id:p,isLastNode:n,reportElementData:{element:{kind:"section",title:a,sectionType:t,data:e,numOfBalances:o},config:d}},i=ee("no_filter",d.filterAccountsWithNilBalances,d.filterAccountGroupsWithNilBalances).compactedAccountsSelectorVariant(e.accounts),u=i.map((g,h)=>ne({account:g,sectionType:t,numOfBalances:o,title:g.account.accountName,config:d,isLastNode:h===i.length-1,parentNodeIDs:[p],ancestorMetadata:{subAccountAncestorMetadata:[{depth:0,hasSibling:i.length>1,hasChildren:g.children.length>0,isLastNode:h===i.length-1}]}}));return l.children.push(...u),l}function ae({sectionWithAcOnly:e,sectionType:t,numOfBalances:o,config:a}){return e.accounts.map((n,d)=>ne({account:n,sectionType:t,numOfBalances:o,title:n.account.accountName,config:a,isLastNode:d===e.accounts.length-1,parentNodeIDs:[],ancestorMetadata:{subAccountAncestorMetadata:[{depth:0,hasSibling:e.accounts.length>1,hasChildren:n.children.length>0,isLastNode:d===e.accounts.length-1}]}}))}function ie({balances:e,config:t,nodeId:o}){return{children:[],id:o??F("timeframe_header",[]),isLastNode:!1,reportElementData:{element:{kind:t.mode==="actual_vs_forecast"?"timeframe_headers_with_forecast":"timeframe_headers",title:"",data:e,numOfBalances:e.length},config:t}}}function Ne(e,t,o,a=!0){Object.assign(e.config,t);const n=ce(o),d=Y({balances:n,config:t});return{config:t,headerNodes:a?[d]:[],contentNodes:[d,...e.contentNodes.slice(1)]}}const ce=e=>{switch(e.reportId){case"profit_and_loss":{const t=e;return t.sections.expenses.balances.length>0?[...t.sections.expenses.balances,...t.sections.expenses.additionalBalances]:[...t.sections.income.balances,...t.sections.income.additionalBalances]}case"profit_and_loss_by_classes":{const t=e;return t.sections.expenses.balances.length>0?[...t.sections.expenses.balances,...t.sections.expenses.additionalBalances]:[...t.sections.income.balances,...t.sections.income.additionalBalances]}case"cash_flow":{const t=e;return[...t.calculatedSections.operatingActivitiesTotal.balances,...t.calculatedSections.operatingActivitiesTotal.additionalBalances]}case"balance_sheet":{const t=e;let o=[];return Object.keys(t.sections).forEach(a=>{t.sections[a].balances.length>0&&(o=[...t.sections[a].balances,...t.sections[a].additionalBalances])}),o}default:return[]}};function Me(e,t,o=!0){const a=y.getLocalizedStrings().reports.sections,n=y.getLocalizedStrings().reports.balanceSheet,d=ce(e),p=t.mode!=null&&t.mode==="this_period_vs_period_before"&&d.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1,l=ie({balances:d,config:t}),i=[];return i.push(l),Object.keys(e.rootSectionsWithSubSectionIds).forEach(u=>{const g=F("title_string_only",[],u),h={children:[],id:g,isLastNode:!0,reportElementData:{element:{kind:"title_string_only",title:a[u],data:void 0,numOfBalances:0},config:t}};i.push(h),e.rootSectionsWithSubSectionIds[u].forEach(s=>{if(_.isBalanceSheetReportViewSectionID(s)===!0)if(e.sections[s].accountGroups.length>0)if(s==="equity"){const c=oe({sectionId:s,section:e.sections[s],numOfBalances:p,config:t});i.push(...c)}else i.push(te({section:e.sections[s],sectionType:s,numOfBalances:p,title:n[s],isLastNode:!0,config:t}));else if(s==="equity"){const c=ae({sectionWithAcOnly:e.sections[s],sectionType:s,numOfBalances:p,config:t});i.push(...c)}else{const c=e.sections[s];i.push(se({sectionWithAcOnly:c,sectionType:s,numOfBalances:p,title:n[s],isLastNode:!0,config:t}))}else _.isBalanceSheetReportViewCalculatedSectionID(s)===!0&&i.push(j({calculatedSection:e.calculatedSections[s],numOfBalances:p,title:n[s],isLastNode:!0,config:t}))})}),{config:t,headerNodes:o?[l]:[],contentNodes:i}}function Fe({calculatedSection:e,numOfBalances:t,title:o,isLastNode:a,config:n}){return{children:[],id:F("calculated_section_type1",[],o),isLastNode:a,reportElementData:{element:{kind:"calculated_section_type1",title:o,data:e,numOfBalances:t},config:n}}}function $e(e,t,o=!0){const a=y.getLocalizedStrings().reports.sections,n=y.getLocalizedStrings().reports.cashFlow,d=[...e.calculatedSections.operatingActivitiesTotal.balances,...e.calculatedSections.operatingActivitiesTotal.additionalBalances],p=t.mode!=null&&t.mode==="this_period_vs_period_before"&&d.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1,l=ie({balances:d,config:t}),i=[];return Object.keys(e.rootSectionsWithSubSectionIds).forEach(u=>{const g=F("title_string_only",[],u),h={children:[],id:g,isLastNode:!0,reportElementData:{element:{kind:"title_string_only",title:a[u],data:void 0,numOfBalances:0},config:t}};i.push(h),e.rootSectionsWithSubSectionIds[u].forEach(s=>{if(_.isCashFlowReportViewSectionID(s)===!0)if(e.sections[s].accountGroups.length>0){const c=oe({sectionId:s,section:e.sections[s],numOfBalances:p,config:t});i.push(...c)}else{const c=ae({sectionWithAcOnly:e.sections[s],sectionType:s,numOfBalances:p,config:t});i.push(...c)}else _.isCashFlowReportViewCalculatedSectionType1ID(s)===!0?i.push(Fe({calculatedSection:e.calculatedSections[s],numOfBalances:p,title:n[s],isLastNode:!0,config:t})):_.isCashFlowReportViewCalculatedSectionID(s)===!0&&i.push(j({calculatedSection:e.calculatedSections[s],numOfBalances:p,title:n[s],isLastNode:!0,config:t}))})}),{config:t,headerNodes:o?[l]:[],contentNodes:[l,...i]}}function je(e,t,o=!0,a=!1){const n=y.getLocalizedStrings().reports,d=y.getLocalizedStrings().common;let p=[];const l=[];let i=[];if(a===!0){const u=Te({title:d.loading,balances:[],config:t});u.reportElementData.element.numOfBalances=6,o&&(i=[u]),l.push(u),[...Array(8)].forEach((g,h)=>{const s=h%4;let c=Pe[s];const x=ke({title:`${h}+${c}`,balances:p,config:t});x.reportElementData.element.numOfBalances=6,l.push(x)})}else{const u=e.sections.expenses.balances.length>0?[...e.sections.expenses.balances,...e.sections.expenses.additionalBalances]:e.sections.income.balances.length>0?[...e.sections.income.balances,...e.sections.income.additionalBalances]:e.sections.cogs.balances.length>0?[...e.sections.cogs.balances,...e.sections.cogs.additionalBalances]:e.sections.otherIncome.balances.length>0?[...e.sections.otherIncome.balances,...e.sections.otherIncome.additionalBalances]:e.sections.otherExpenses.balances.length>0?[...e.sections.otherExpenses.balances,...e.sections.otherExpenses.additionalBalances]:[],g=Y({balances:u,config:t}),h=t.mode!=null&&t.mode==="this_period_vs_period_before"&&u.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1;l.push(g),o&&(i=[g]),e.idsInOrder.forEach(s=>{if(_.isPandLReportViewSectionID(s)===!0){const c=e.sections[s];c!=null&&l.push(Le({section:c,sectionType:s,numOfBalances:h,title:n.sections[s],isLastNode:!0,config:t}))}else if(_.isPandLReportViewCalculatedSectionID(s)===!0){const c=e.calculatedSections[s];c!=null&&l.push(j({calculatedSection:c,numOfBalances:h,title:n.sections[s],isLastNode:!0,config:t}))}})}return{config:t,headerNodes:i,contentNodes:l}}function Ee(e,t,o=!0){const a=y.getLocalizedStrings().reports,n=e.sections.expenses!=null&&e.sections.expenses.balances.length>0?[...e.sections.expenses.balances,...e.sections.expenses.additionalBalances]:e.sections.income!=null&&e.sections.income.balances.length>0?[...e.sections.income.balances,...e.sections.income.additionalBalances]:e.sections.cogs!=null&&e.sections.cogs.balances.length>0?[...e.sections.cogs.balances,...e.sections.cogs.additionalBalances]:e.sections.otherIncome!=null&&e.sections.otherIncome.balances.length>0?[...e.sections.otherIncome.balances,...e.sections.otherIncome.additionalBalances]:e.sections.otherExpenses!=null&&e.sections.otherExpenses.balances.length>0?[...e.sections.otherExpenses.balances,...e.sections.otherExpenses.additionalBalances]:[],d=t.mode!=null&&t.mode==="this_period_vs_period_before"&&n.length>1?e.filter.balancesRange.numberOfPeriods+2:e.filter.balancesRange.numberOfPeriods+1,p=Y({balances:n,config:t}),l=[];return l.push(p),e.idsInOrder.forEach(i=>{if(_.isPandLReportViewSectionID(i)===!0&&(e.sections[i].accountGroups.length>0?l.push(te({section:e.sections[i],sectionType:i,numOfBalances:d,title:a.sections[i],isLastNode:!0,config:t})):l.push(se({sectionWithAcOnly:e.sections[i],sectionType:i,numOfBalances:d,title:a.sections[i],isLastNode:!0,config:t}))),_.isPandLReportViewCalculatedSectionID(i)===!0){const u=e.calculatedSections[i];u!=null&&l.push(j({calculatedSection:u,numOfBalances:d,title:a.sections[i],isLastNode:!0,config:t}))}}),{config:t,headerNodes:o?[p]:[],contentNodes:l}}const q={contentPaddingLeft:new v(w[0],w[0],w[0]),contentPaddingRight:new v(w[3],w[3],w[8])},Ve=b.div`
2
2
  height: ${e=>e.height}px;
3
3
  width: 99.9%;
4
4
  margin-top: ${C.sp2};
5
5
  background-color: ${e=>e.theme.colors.grey4};
6
- `;function De({report:e,displayOrder:t,reportFormat:o,analytics:a,isZeniUser:n,onAdditionalBalanceSelectionChanged:d,onAccountBalanceClick:p,onTableScroll:l,onElementCollapseStateChanged:i,isCompareModeOn:u,isPageFetchInProgress:g=!1}){const h=U(),s=G(),[c,x]=P.useState(void 0),[O,E]=P.useState(void 0),L=!(h==="small"||h==="medium-compact"),V="name+balances_actual",$=u===!0?"this_period_vs_period_before":"none",R=()=>{let m=[];switch(e.reportId){case"profit_and_loss":{const f=e;m=(f.sections.expenses.balances.length>0?f.sections.expenses:f.sections.income).additionalBalances.map(D=>_.toTimeframeTick(D));break}case"profit_and_loss_by_classes":{const f=e,D=(f.sections.expenses?.balances?.length??0)>0?f.sections.expenses:null,pe=(f.sections.income?.balances?.length??0)>0?f.sections.income:null,H=D??pe;H?.additionalBalances!=null&&(m=H.additionalBalances.map(ue=>_.toTimeframeTick(ue)));break}case"cash_flow":{m=e.calculatedSections.investingActivitiesTotal.additionalBalances.map(f=>_.toTimeframeTick(f));break}case"balance_sheet":{m=e.sections.equity.additionalBalances.map(f=>_.toTimeframeTick(f));break}}return m.length>0&&m.find(f=>f.balanceType==="this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent"};P.useEffect(()=>{const m={reportId:e.reportId,bookCloseDate:e.bookCloseDate,mode:$,firstMonthOfFY:e.firstMonthOfFY,filterAccountsWithNilBalances:"filter_actual_nil_balances",filterAccountGroupsWithNilBalances:"filter_actual_forecast_empty_account_group_balances",displayOrder:t,reportFormat:o,dataAvailable:e.dataAvailable,showNegativeAmountInParenthesis:xe(),showClassAccountNumber:n};if(c==null||!J(O,e)||g===!0){const f=ze(e,m,L,g);E(e),x(f)}else{const f=Ne(c,m,e,L);x(f)}},[u,e,g]);const[A,N]=P.useState(5),M=m=>{const f=m+135;N(f)},de=m=>m?.trackPageLoaded(We(e));return c!=null?r.jsxs(r.Fragment,{children:[r.jsx(we,{analytics:a,onLoad:de}),r.jsx(Ve,{height:A,children:r.jsx(ve,{backgroundColor:new Ce(s.colors.grey4),rootNodes:c,type:V,compareMode:R(),isSticky:{isStickyHeader:L,isStickyName:L},treeNodePadding:{left:q.contentPaddingLeft.value(h),right:q.contentPaddingRight.value(h)},onAccountClick:p==null?void 0:(m,f)=>{p(m,f)},nodeOpenStatus:e.uiState.nodeCollapseState,scrollPosition:e.uiState.scrollPosition,onCompareModeChanged:m=>d?.(m==="compare_mode_amount"?"this_period_vs_last_period":"this_period_vs_last_period_percent","dropdown"),onNodeCollapseToggled:(m,f)=>i?.(e.reportId,m,f),onReportTableHeightChanged:M,onScroll:m=>l?.(e.reportId,m)})})]}):null}const ze=(e,t,o=!0,a=!1)=>{switch(e.reportId){case"profit_and_loss":return Ee(e,t,o);case"profit_and_loss_by_classes":return je(e,t,o,a);case"cash_flow":return $e(e,t,o);case"balance_sheet":return Me(e,t,o);default:return}},We=e=>{switch(e.reportId){case"profit_and_loss":case"profit_and_loss_by_classes":return B.Event.profitAndLoss;case"cash_flow":return B.Event.cashFlow;case"balance_sheet":return B.Event.balanceSheet;default:return B.Event.reports}},Ue=b.div`
6
+ `;function De({report:e,displayOrder:t,reportFormat:o,analytics:a,isZeniUser:n,onAdditionalBalanceSelectionChanged:d,onAccountBalanceClick:p,onTableScroll:l,onElementCollapseStateChanged:i,isCompareModeOn:u,isPageFetchInProgress:g=!1}){const h=U(),s=G(),[c,x]=P.useState(void 0),[O,E]=P.useState(void 0),L=!(h==="small"||h==="medium-compact"),V="name+balances_actual",$=u===!0?"this_period_vs_period_before":"none",R=()=>{let m=[];switch(e.reportId){case"profit_and_loss":{const f=e;m=(f.sections.expenses.balances.length>0?f.sections.expenses:f.sections.income).additionalBalances.map(D=>_.toTimeframeTick(D));break}case"profit_and_loss_by_classes":{const f=e,D=(f.sections.expenses?.balances?.length??0)>0?f.sections.expenses:null,pe=(f.sections.income?.balances?.length??0)>0?f.sections.income:null,H=D??pe;H?.additionalBalances!=null&&(m=H.additionalBalances.map(ue=>_.toTimeframeTick(ue)));break}case"cash_flow":{m=e.calculatedSections.investingActivitiesTotal.additionalBalances.map(f=>_.toTimeframeTick(f));break}case"balance_sheet":{m=e.sections.equity.additionalBalances.map(f=>_.toTimeframeTick(f));break}}return m.length>0&&m.find(f=>f.balanceType==="this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent"};P.useEffect(()=>{const m={reportId:e.reportId,bookCloseDate:e.bookCloseDate,mode:$,firstMonthOfFY:e.firstMonthOfFY,filterAccountsWithNilBalances:"filter_actual_nil_balances",filterAccountGroupsWithNilBalances:"filter_actual_forecast_empty_account_group_balances",displayOrder:t,reportFormat:o,dataAvailable:e.dataAvailable,showNegativeAmountInParenthesis:xe(),showClassAccountNumber:n};if(c==null||!Q(O,e)||g===!0){const f=ze(e,m,L,g);E(e),x(f)}else{const f=Ne(c,m,e,L);x(f)}},[u,e,g]);const[A,N]=P.useState(5),M=m=>{const f=m+135;N(f)},de=m=>m?.trackPageLoaded(We(e));return c!=null?r.jsxs(r.Fragment,{children:[r.jsx(we,{analytics:a,onLoad:de}),r.jsx(Ve,{height:A,children:r.jsx(ve,{backgroundColor:new Ce(s.colors.grey4),rootNodes:c,type:V,compareMode:R(),isSticky:{isStickyHeader:L,isStickyName:L},treeNodePadding:{left:q.contentPaddingLeft.value(h),right:q.contentPaddingRight.value(h)},onAccountClick:p==null?void 0:(m,f)=>{p(m,f)},nodeOpenStatus:e.uiState.nodeCollapseState,scrollPosition:e.uiState.scrollPosition,onCompareModeChanged:m=>d?.(m==="compare_mode_amount"?"this_period_vs_last_period":"this_period_vs_last_period_percent","dropdown"),onNodeCollapseToggled:(m,f)=>i?.(e.reportId,m,f),onReportTableHeightChanged:M,onScroll:m=>l?.(e.reportId,m)})})]}):null}const ze=(e,t,o=!0,a=!1)=>{switch(e.reportId){case"profit_and_loss":return Ee(e,t,o);case"profit_and_loss_by_classes":return je(e,t,o,a);case"cash_flow":return $e(e,t,o);case"balance_sheet":return Me(e,t,o);default:return}},We=e=>{switch(e.reportId){case"profit_and_loss":case"profit_and_loss_by_classes":return B.Event.profitAndLoss;case"cash_flow":return B.Event.cashFlow;case"balance_sheet":return B.Event.balanceSheet;default:return B.Event.reports}},Ue=b.div`
7
7
  display: flex;
8
8
  flex-direction: row;
9
9
  border-bottom: 1px solid ${e=>e.theme.colors.grey3};
@@ -49,7 +49,7 @@ import{X as U,u as G,M as y,w as he,l as _,j as r,_ as k,be as fe,aX as me,aV as
49
49
  width: 160px;
50
50
  left: 63%;
51
51
  }
52
- `;function Ze({reportId:e,isSelected:t,onClick:o}){const a=n=>{switch(n){case"profit_and_loss":case"profit_and_loss_by_classes":case"balance_sheet":case"cash_flow":return y.getLocalizedStrings().reportTitleById[n];default:return console.warn("Unsupported report"),""}};return r.jsx(Ye,{"data-testid":k("reportSwitcher",e),onClick:()=>{t===!1&&o(e)},isSelected:t,spaceAround:e==="balance_sheet",children:a(e)})}function qe({reportIds:e,selectedReport:t,onReportSelectionChanged:o}){const a=n=>{o?.(n)};return r.jsx(Ue,{"data-testid":k("report-switcher-container"),children:r.jsx(Ge,{"data-testid":k("report-switcher-content"),children:e.map(n=>n!=="profit_and_loss_by_classes"&&r.jsxs("div",{children:[r.jsx(Ze,{reportId:n,isSelected:t===n,onClick:a}),r.jsx(He,{className:`Slider ${t}`})]},`reportSegment-${n}`))})})}const I={contentContainerLeftRightMargin:new v(w[3],w[3],w[8]),contentRightPadding:new v(w[3],w[3],w[8]),tickSkelectionContainerWidth:new v(343,600,905,1240)},Xe=new v(4,4),Je=new v(4,4),Ke={selectedNumberOfPeriods:(e,t)=>e?Je.value(t):Xe.value(t)},Qe=b.div`
52
+ `;function Ze({reportId:e,isSelected:t,onClick:o}){const a=n=>{switch(n){case"profit_and_loss":case"profit_and_loss_by_classes":case"balance_sheet":case"cash_flow":return y.getLocalizedStrings().reportTitleById[n];default:return console.warn("Unsupported report"),""}};return r.jsx(Ye,{"data-testid":k("reportSwitcher",e),onClick:()=>{t===!1&&o(e)},isSelected:t,spaceAround:e==="balance_sheet",children:a(e)})}function qe({reportIds:e,selectedReport:t,onReportSelectionChanged:o}){const a=n=>{o?.(n)};return r.jsx(Ue,{"data-testid":k("report-switcher-container"),children:r.jsx(Ge,{"data-testid":k("report-switcher-content"),children:e.map(n=>n!=="profit_and_loss_by_classes"&&r.jsxs("div",{children:[r.jsx(Ze,{reportId:n,isSelected:t===n,onClick:a}),r.jsx(He,{className:`Slider ${t}`})]},`reportSegment-${n}`))})})}const I={contentContainerLeftRightMargin:new v(w[3],w[3],w[8]),contentRightPadding:new v(w[3],w[3],w[8]),tickSkelectionContainerWidth:new v(343,600,905,1240)},Je=new v(4,4),Qe=new v(4,4),Xe={selectedNumberOfPeriods:(e,t)=>e?Qe.value(t):Je.value(t)},Ke=b.div`
53
53
  display: flex;
54
54
  flex: 1 1 auto;
55
55
  min-height: 100%;
@@ -98,7 +98,7 @@ import{X as U,u as G,M as y,w as he,l as _,j as r,_ as k,be as fe,aX as me,aV as
98
98
  `,at=b(_e)`
99
99
  margin-top: ${C.sp3};
100
100
  color: ${e=>e.theme.colors.hero};
101
- `,re=({style:e,isLoading:t})=>t?r.jsx(tt,{style:e,children:r.jsx(be,{size:"ExtraLarge",start:!0})}):null,S=e=>{switch(e.selectedReport){case"cash_flow":return e.cashFlowReport;case"balance_sheet":return e.balanceSheetReport;case"profit_and_loss_by_classes":return e.profitAndLossClassesViewReport;case"profit_and_loss":default:return e.profitAndLossReport}},W=({selectedReport:e,isCompareModeOn:t,windowSize:o})=>{const a=e.availableNumberOfPeriods;let n=Ke.selectedNumberOfPeriods(t,o);return a!=null&&(n=Math.min(n,a)),n};function jt(e){const t=U(),o=G(),{onUpdateAccountViewMode:a,onUpdateClassesToFilterOut:n,onAdditionalBalanceSelectionChanged:d,onTimeframeSelectionChanged:p,isCompareMode:l,selectedReportAndTimeframeFetchState:i,onClickMenuIcon:u}=e,g=(R,A)=>{R!==h?.accountViewMode&&a?.(R),A&&n?.(A)};P.useEffect(()=>{if(e.fetchState==="Completed"){const R=S(e).filter.additionalBalances;e.onUpdateHighlightedNumberOfPeriods?.(R,e.isCompareMode,W({selectedReport:S(e),isCompareModeOn:e.isCompareMode,windowSize:t}),e.balancesInTimeframe)}},[t,e.fetchState]);const h=rt(e),s=y.getLocalizedStrings().reports.common,c=he(),x=c!=null&&_.hasInvestorBankerLevelAccess(c.loggedInUserRole)?"detailed":"more_detailed",O=c!=null&&_.hasInvestorBankerLevelAccess(c.loggedInUserRole)?["more_detailed"]:[];e.showAccountGroups===!1&&h?.accountViewMode==="account_group"&&O.push("detailed");const[E,L]=K.useState(O.includes("more_detailed")?"detailed":"more_detailed"),V={selectedFormat:E,disabledFormatForRole:O,roleBasedClassesSelectedFormat:x,setSelectedFormat:L};if(i.fetchState==="Error"||e.fetchState==="Error")return r.jsxs(nt,{"data-testid":k("report-page-error-reload-page"),children:[r.jsx(ot,{"data-testid":k("report-page-error-reload-icon"),onClick:e.onReloadReport,children:r.jsx(fe,{})}),r.jsx(at,{children:s.failed})]});const $=e.fetchState;if(i.fetchState!=="Completed"&&($==="In-Progress"||$==="Not-Started"))return r.jsx(re,{isLoading:!0});{const R=r.jsx(me,{downloadReportOptions:{type:"detailed_menu",downloadMenu:{detailedMenu:h!=null&&e.dataAvailable!=null?r.jsx(Be,{defaultOptions:h,analytics:e.analytics,referrer:T(e.selectedReport),dataAvailable:e.dataAvailable,downloadState:e.downloadState,statementEndPoint:e.statementEndPoint,authParams:e.authParams,currentTenantCompanyName:e.currentTenantCompanyName,classesFetchState:e.profitAndLossClassesViewReport.fetchState,showAccountGroups:e.showAccountGroups,reportFormatProps:V,updateDownloadStateHandler:e.updateDownloadStateHandler,onUpdateDisplayOrder:e.onUpdateDisplayOrder,onUpdateReportFormat:e.onUpdateReportFormat,onClose:()=>null,onOpenAccountViewMode:e.onOpenAccountViewMode,onSaveClickHandler:g,onThisPeriodChanged:e.onThisPeriodChanged,onAdditionalBalanceSelectionChanged:(A,N,M)=>{d(l,A,N,M)},onTimeframeSelectionChanged:(A,N,M)=>{p?.(A,N,M)}}):r.jsx(r.Fragment,{})}}});return r.jsxs(Qe,{children:[r.jsx(ge,{title:y.getLocalizedStrings().reports.title,backgroundColor:o.colors.grey4,onBackClick:e.onBackClick,showMenuIcon:t==="medium-compact"||t==="small",onClickMenuIcon:u,rightSideComponent:R,downloadPresent:!0,source:"ReportsPage",hideSearchBtn:!0}),r.jsx(it,{...e})]})}}function it(e){const t=U(),o=G(),a=P.useRef(null),{selectedReportAndTimeframeFetchState:n}=e,d=["month","quarter","year"],p=(s,c)=>{e.analytics?.trackCompareFilterChange(s==="this_period_vs_last_period_percent"?"percentage":"amount",T(e.selectedReport),z(e.selectedTimeframe),c);const x=Array.from(new Set(s==="this_period_vs_last_period_percent"?[...S(e).filter.additionalBalances,"this_period_vs_last_period_percent"].filter(O=>O!=="this_period_vs_last_period"):[...S(e).filter.additionalBalances,"this_period_vs_last_period"].filter(O=>O!=="this_period_vs_last_period_percent")));e.onAdditionalBalanceSelectionChanged?.(e.isCompareMode,x,W({selectedReport:S(e),isCompareModeOn:e.isCompareMode,windowSize:t}))},l=(s,c)=>{s!==e.profitAndLossClassesViewReport?.uiState.accountViewMode&&e.onUpdateAccountViewMode?.(s),c&&e.onUpdateClassesToFilterOut?.(c)},i=S(e),u=a.current?.clientWidth??I.tickSkelectionContainerWidth.value(t),g=_.reduceAllFetchState([e.reportsResyncFetchState,e.profitAndLossClassesViewReport]).fetchState==="In-Progress"&&e.profitAndLossClassesViewReport.uiState.accountViewMode==="classes",h=n.fetchState==="In-Progress";return r.jsxs(et,{windowSize:t,"data-testid":k("reports-page-content-container"),children:[r.jsx(pt,{windowSize:t,ref:a,children:r.jsx(Ae,{timeframe:{allowedTimeframes:d,selectedTimeframe:e.selectedTimeframe,onTimeframeSelectionChanged:s=>{e.analytics?.trackTimeframeSwitch(z(s),T(e.selectedReport)),e.onTimeframeSelectionChanged?.(s,!0)}},toggle:{label:y.getLocalizedStrings().compareSwitchLabel,isOn:e.isCompareMode,onValueChanged:s=>{e.analytics?.trackCompareMode(s,T(e.selectedReport),z(e.selectedTimeframe));const c=S(e).filter;e.onAdditionalBalanceSelectionChanged?.(s,c.additionalBalances,c.balancesRange.numberOfPeriods)}}})}),n.fetchState==="Not-Started"||n.fetchState==="In-Progress"?r.jsx(ht,{windowSize:t,children:r.jsx(ft,{children:r.jsx(Se,{width:u,height:Q-w[2],backgroundColor:o.colors.grey3,style:{borderRadius:C.sp2}})})}):r.jsx(ut,{windowSize:t,children:r.jsx(Re,{firstMonthOfFY:i.firstMonthOfFY,timeframe:e.selectedTimeframe,timeframeTicks:e.allTimeframeTicks,selection:{selectedTicks:X(e.allTimeframeTicks,e.selectedCOABalancesRange),highlightedOfSelectedTicks:X(e.allTimeframeTicks,e.selectedCOABalancesRange)},onClick:(s,c)=>{e.analytics?.trackDateRangeFilterChange(T(e.selectedReport),"range filter",e.isCompareMode,Z(i.firstMonthOfFY,e.selectedTimeframe,c)),e.onThisPeriodChanged?.(c,W({selectedReport:S(e),isCompareModeOn:e.isCompareMode,windowSize:t}))},onSelectionChanged:s=>{const c=ct(e.allTimeframeTicks,s.fromEnd);e.analytics?.trackDateRangeFilterChange(T(e.selectedReport),"range filter",e.isCompareMode,Z(i.firstMonthOfFY,e.selectedTimeframe,c.thisPeriod)),e.onCOABalancesRangeChanged?.(c)}})}),r.jsx(mt,{windowSize:t,children:r.jsx(qe,{reportIds:["profit_and_loss","balance_sheet","cash_flow","profit_and_loss_by_classes"],selectedReport:e.selectedReport,onReportSelectionChanged:s=>{e.analytics?.trackPageLoaded(lt(s)),s==="profit_and_loss"&&e.profitAndLossClassesViewReport?.uiState.accountViewMode==="classes"?e.onReportSelectionChanged?.("profit_and_loss_by_classes"):e.onReportSelectionChanged?.(s)}})}),n.fetchState==="Not-Started"||n.fetchState==="In-Progress"?r.jsx(re,{style:{boxShadow:"none",backgroundColor:"inherit"},isLoading:h}):r.jsxs(r.Fragment,{children:[r.jsx(le,{report:S(e),displayOrder:e.displayOrder,reportFormat:e.reportFormat,analytics:e.analytics,onAdditionalBalanceSelectionChanged:p,onAccountBalanceClick:e.onAccountBalanceClick,onElementCollapseStateChanged:e.onElementCollapseStateChanged,onTableScroll:e.onTableScroll,isCompareModeOn:e.isCompareMode,isZeniUser:e.isZeniUser,isPageFetchInProgress:g}),_.isPAndLReport(e.selectedReport)?r.jsx(st,{windowSize:t,children:r.jsx(Oe,{reportId:e.selectedReport,firstMonthOfFY:e.profitAndLossClassesViewReport.firstMonthOfFY,nodes:e.profitAndLossClassesViewReport?.classHierarchy,classesListFetchState:e.profitAndLossClassesViewReport?.fetchState,selectedView:e.profitAndLossClassesViewReport?.uiState.accountViewMode,showClassAccountNumber:e.isZeniUser,showAccountGroups:e.showAccountGroups,onSaveClick:l,classesToBeFilteredOut:e.profitAndLossClassesViewReport?.classesToFilterOut,onOpenAccountViewMode:e.onOpenAccountViewMode,onResyncReports:e.onResyncReports,isPageFetchInProgress:g,lastRefreshSuccessTime:e.profitAndLossClassesViewReport?.status?.lastRefreshSuccessTime})}):null]})]})}const X=(e,t)=>{if(t.orderBy!=="ascending_date")throw new Error("Invalid ordering of dates!!");let o=e.length-1;return t.thisPeriod!=null&&(o=e.findIndex(a=>a.startDate.isSame(t.thisPeriod.startDate,"date")&&a.endDate.isSameOrBefore(t.thisPeriod.endDate))),{startIndex:Math.max(o+1-t.numberOfPeriods,0),length:t.numberOfPeriods}},ct=(e,t)=>{const o=e.length-1-t.offsetFromEnd;return{thisPeriod:e[o],numberOfPeriods:t.length,orderBy:"ascending_date"}};function rt(e){let t=e.selectedCOABalancesRange.thisPeriod;if(t==null){const p=e.displayOrder,l=e.profitAndLossReport.sections.expenses!=null&&e.profitAndLossReport.sections.expenses.balances.length>0?e.profitAndLossReport.sections.expenses:e.profitAndLossReport.sections.income;if(l!=null&&l.balances.length>0){const i=p==="ascending_date"?l.balances.length-1:0;t=l.balances[i]}}const o=S(e).firstMonthOfFY,a=S(e).bookCloseDate,n=S(e).dataAvailable,d=S(e).filter.additionalBalances;if(t!=null)return{localeId:y.getAppLocaleID(),showNegativeAmountInParenthesis:!0,filterAccountsWithNilBalances:"filter_actual_nil_balances",filterAccountGroupsWithNilBalances:"filter_actual_forecast_empty_account_group_balances",includeCoverPage:!0,companyName:e.currentTenantCompanyName,statementFileType:"pdf",statements:e.profitAndLossClassesViewReport.uiState.accountViewMode==="account_group"?["profit_and_loss","balance_sheet","cash_flow"]:["profit_and_loss_by_classes","balance_sheet","cash_flow"],firstMonthOfFY:o,bookCloseDate:a,dataAvailable:n,timeframe:e.selectedTimeframe,additionalBalances:d,format:e.reportFormat,balancesFilter:{thisPeriod:t,numberOfPeriods:e.selectedCOABalancesRange.numberOfPeriods,orderBy:e.displayOrder},accountViewMode:e.profitAndLossClassesViewReport.uiState.accountViewMode,nestedClassHierarchy:e.profitAndLossClassesViewReport?.classHierarchy,classesToFilterOut:e.profitAndLossClassesViewReport.classesToFilterOut,showClassAccountNumber:e.isZeniUser,isZeniCOAUsed:e.isZeniCOAUsed}}const T=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}},lt=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":return B.Event.profitAndLoss;case"cash_flow":return B.Event.cashFlow;case"balance_sheet":return B.Event.balanceSheet;default:return B.Event.reports}},le=K.memo(De,(e,t)=>dt(e,t,["report","analytics","isCompareModeOn","isZeniUser","isPageFetchInProgress"]));le.displayName="Reports table";const dt=(e,t,o)=>o.reduce((a,n)=>a===!0&&J(e[`${n}`],t[`${n}`]),!0),pt=b.div`
101
+ `,re=({style:e,isLoading:t})=>t?r.jsx(tt,{style:e,children:r.jsx(be,{size:"ExtraLarge",start:!0})}):null,S=e=>{switch(e.selectedReport){case"cash_flow":return e.cashFlowReport;case"balance_sheet":return e.balanceSheetReport;case"profit_and_loss_by_classes":return e.profitAndLossClassesViewReport;case"profit_and_loss":default:return e.profitAndLossReport}},W=({selectedReport:e,isCompareModeOn:t,windowSize:o})=>{const a=e.availableNumberOfPeriods;let n=Xe.selectedNumberOfPeriods(t,o);return a!=null&&(n=Math.min(n,a)),n};function jt(e){const t=U(),o=G(),{onUpdateAccountViewMode:a,onUpdateClassesToFilterOut:n,onAdditionalBalanceSelectionChanged:d,onTimeframeSelectionChanged:p,isCompareMode:l,selectedReportAndTimeframeFetchState:i,onClickMenuIcon:u}=e,g=(R,A)=>{R!==h?.accountViewMode&&a?.(R),A&&n?.(A)};P.useEffect(()=>{if(e.fetchState==="Completed"){const R=S(e).filter.additionalBalances;e.onUpdateHighlightedNumberOfPeriods?.(R,e.isCompareMode,W({selectedReport:S(e),isCompareModeOn:e.isCompareMode,windowSize:t}),e.balancesInTimeframe)}},[t,e.fetchState]);const h=rt(e),s=y.getLocalizedStrings().reports.common,c=he(),x=c!=null&&_.hasInvestorBankerLevelAccess(c.loggedInUserRole)?"detailed":"more_detailed",O=c!=null&&_.hasInvestorBankerLevelAccess(c.loggedInUserRole)?["more_detailed"]:[];e.showAccountGroups===!1&&h?.accountViewMode==="account_group"&&O.push("detailed");const[E,L]=X.useState(O.includes("more_detailed")?"detailed":"more_detailed"),V={selectedFormat:E,disabledFormatForRole:O,roleBasedClassesSelectedFormat:x,setSelectedFormat:L};if(i.fetchState==="Error"||e.fetchState==="Error")return r.jsxs(nt,{"data-testid":k("report-page-error-reload-page"),children:[r.jsx(ot,{"data-testid":k("report-page-error-reload-icon"),onClick:e.onReloadReport,children:r.jsx(fe,{})}),r.jsx(at,{children:s.failed})]});const $=e.fetchState;if(i.fetchState!=="Completed"&&($==="In-Progress"||$==="Not-Started"))return r.jsx(re,{isLoading:!0});{const R=r.jsx(me,{downloadReportOptions:{type:"detailed_menu",downloadMenu:{detailedMenu:h!=null&&e.dataAvailable!=null?r.jsx(Be,{defaultOptions:h,analytics:e.analytics,referrer:T(e.selectedReport),dataAvailable:e.dataAvailable,downloadState:e.downloadState,statementEndPoint:e.statementEndPoint,authParams:e.authParams,currentTenantCompanyName:e.currentTenantCompanyName,classesFetchState:e.profitAndLossClassesViewReport.fetchState,showAccountGroups:e.showAccountGroups,reportFormatProps:V,updateDownloadStateHandler:e.updateDownloadStateHandler,onUpdateDisplayOrder:e.onUpdateDisplayOrder,onUpdateReportFormat:e.onUpdateReportFormat,onClose:()=>null,onOpenAccountViewMode:e.onOpenAccountViewMode,onSaveClickHandler:g,onThisPeriodChanged:e.onThisPeriodChanged,onAdditionalBalanceSelectionChanged:(A,N,M)=>{d(l,A,N,M)},onTimeframeSelectionChanged:(A,N,M)=>{p?.(A,N,M)}}):r.jsx(r.Fragment,{})}}});return r.jsxs(Ke,{children:[r.jsx(ge,{title:y.getLocalizedStrings().reports.title,backgroundColor:o.colors.grey4,onBackClick:e.onBackClick,showMenuIcon:t==="medium-compact"||t==="small",onClickMenuIcon:u,rightSideComponent:R,downloadPresent:!0,source:"ReportsPage",hideSearchBtn:!0}),r.jsx(it,{...e})]})}}function it(e){const t=U(),o=G(),a=P.useRef(null),{selectedReportAndTimeframeFetchState:n}=e,d=["month","quarter","year"],p=(s,c)=>{e.analytics?.trackCompareFilterChange(s==="this_period_vs_last_period_percent"?"percentage":"amount",T(e.selectedReport),z(e.selectedTimeframe),c);const x=Array.from(new Set(s==="this_period_vs_last_period_percent"?[...S(e).filter.additionalBalances,"this_period_vs_last_period_percent"].filter(O=>O!=="this_period_vs_last_period"):[...S(e).filter.additionalBalances,"this_period_vs_last_period"].filter(O=>O!=="this_period_vs_last_period_percent")));e.onAdditionalBalanceSelectionChanged?.(e.isCompareMode,x,W({selectedReport:S(e),isCompareModeOn:e.isCompareMode,windowSize:t}))},l=(s,c)=>{s!==e.profitAndLossClassesViewReport?.uiState.accountViewMode&&e.onUpdateAccountViewMode?.(s),c&&e.onUpdateClassesToFilterOut?.(c)},i=S(e),u=a.current?.clientWidth??I.tickSkelectionContainerWidth.value(t),g=_.reduceAllFetchState([e.reportsResyncFetchState,e.profitAndLossClassesViewReport]).fetchState==="In-Progress"&&e.profitAndLossClassesViewReport.uiState.accountViewMode==="classes",h=n.fetchState==="In-Progress";return r.jsxs(et,{windowSize:t,"data-testid":k("reports-page-content-container"),children:[r.jsx(pt,{windowSize:t,ref:a,children:r.jsx(Ae,{timeframe:{allowedTimeframes:d,selectedTimeframe:e.selectedTimeframe,onTimeframeSelectionChanged:s=>{e.analytics?.trackTimeframeSwitch(z(s),T(e.selectedReport)),e.onTimeframeSelectionChanged?.(s,!0)}},toggle:{label:y.getLocalizedStrings().compareSwitchLabel,isOn:e.isCompareMode,onValueChanged:s=>{e.analytics?.trackCompareMode(s,T(e.selectedReport),z(e.selectedTimeframe));const c=S(e).filter;e.onAdditionalBalanceSelectionChanged?.(s,c.additionalBalances,c.balancesRange.numberOfPeriods)}}})}),n.fetchState==="Not-Started"||n.fetchState==="In-Progress"?r.jsx(ht,{windowSize:t,children:r.jsx(ft,{children:r.jsx(Se,{width:u,height:K-w[2],backgroundColor:o.colors.grey3,style:{borderRadius:C.sp2}})})}):r.jsx(ut,{windowSize:t,children:r.jsx(Re,{firstMonthOfFY:i.firstMonthOfFY,timeframe:e.selectedTimeframe,timeframeTicks:e.allTimeframeTicks,selection:{selectedTicks:J(e.allTimeframeTicks,e.selectedCOABalancesRange),highlightedOfSelectedTicks:J(e.allTimeframeTicks,e.selectedCOABalancesRange)},onClick:(s,c)=>{e.analytics?.trackDateRangeFilterChange(T(e.selectedReport),"range filter",e.isCompareMode,Z(i.firstMonthOfFY,e.selectedTimeframe,c)),e.onThisPeriodChanged?.(c,W({selectedReport:S(e),isCompareModeOn:e.isCompareMode,windowSize:t}))},onSelectionChanged:s=>{const c=ct(e.allTimeframeTicks,s.fromEnd);e.analytics?.trackDateRangeFilterChange(T(e.selectedReport),"range filter",e.isCompareMode,Z(i.firstMonthOfFY,e.selectedTimeframe,c.thisPeriod)),e.onCOABalancesRangeChanged?.(c)}})}),r.jsx(mt,{windowSize:t,children:r.jsx(qe,{reportIds:["profit_and_loss","balance_sheet","cash_flow","profit_and_loss_by_classes"],selectedReport:e.selectedReport,onReportSelectionChanged:s=>{e.analytics?.trackPageLoaded(lt(s)),s==="profit_and_loss"&&e.profitAndLossClassesViewReport?.uiState.accountViewMode==="classes"?e.onReportSelectionChanged?.("profit_and_loss_by_classes"):e.onReportSelectionChanged?.(s)}})}),n.fetchState==="Not-Started"||n.fetchState==="In-Progress"?r.jsx(re,{style:{boxShadow:"none",backgroundColor:"inherit"},isLoading:h}):r.jsxs(r.Fragment,{children:[r.jsx(le,{report:S(e),displayOrder:e.displayOrder,reportFormat:e.reportFormat,analytics:e.analytics,onAdditionalBalanceSelectionChanged:p,onAccountBalanceClick:e.onAccountBalanceClick,onElementCollapseStateChanged:e.onElementCollapseStateChanged,onTableScroll:e.onTableScroll,isCompareModeOn:e.isCompareMode,isZeniUser:e.isZeniUser,isPageFetchInProgress:g}),_.isPAndLReport(e.selectedReport)?r.jsx(st,{windowSize:t,children:r.jsx(Oe,{reportId:e.selectedReport,firstMonthOfFY:e.profitAndLossClassesViewReport.firstMonthOfFY,nodes:e.profitAndLossClassesViewReport?.classHierarchy,classesListFetchState:e.profitAndLossClassesViewReport?.fetchState,selectedView:e.profitAndLossClassesViewReport?.uiState.accountViewMode,showClassAccountNumber:e.isZeniUser,showAccountGroups:e.showAccountGroups,onSaveClick:l,classesToBeFilteredOut:e.profitAndLossClassesViewReport?.classesToFilterOut,onOpenAccountViewMode:e.onOpenAccountViewMode,onResyncReports:e.onResyncReports,isPageFetchInProgress:g,lastRefreshSuccessTime:e.profitAndLossClassesViewReport?.status?.lastRefreshSuccessTime})}):null]})]})}const J=(e,t)=>{if(t.orderBy!=="ascending_date")throw new Error("Invalid ordering of dates!!");let o=e.length-1;return t.thisPeriod!=null&&(o=e.findIndex(a=>a.startDate.isSame(t.thisPeriod.startDate,"date")&&a.endDate.isSameOrBefore(t.thisPeriod.endDate))),{startIndex:Math.max(o+1-t.numberOfPeriods,0),length:t.numberOfPeriods}},ct=(e,t)=>{const o=e.length-1-t.offsetFromEnd;return{thisPeriod:e[o],numberOfPeriods:t.length,orderBy:"ascending_date"}};function rt(e){let t=e.selectedCOABalancesRange.thisPeriod;if(t==null){const p=e.displayOrder,l=e.profitAndLossReport.sections.expenses!=null&&e.profitAndLossReport.sections.expenses.balances.length>0?e.profitAndLossReport.sections.expenses:e.profitAndLossReport.sections.income;if(l!=null&&l.balances.length>0){const i=p==="ascending_date"?l.balances.length-1:0;t=l.balances[i]}}const o=S(e).firstMonthOfFY,a=S(e).bookCloseDate,n=S(e).dataAvailable,d=S(e).filter.additionalBalances;if(t!=null)return{localeId:y.getAppLocaleID(),showNegativeAmountInParenthesis:!0,filterAccountsWithNilBalances:"filter_actual_nil_balances",filterAccountGroupsWithNilBalances:"filter_actual_forecast_empty_account_group_balances",includeCoverPage:!0,companyName:e.currentTenantCompanyName,statementFileType:"pdf",statements:e.profitAndLossClassesViewReport.uiState.accountViewMode==="account_group"?["profit_and_loss","balance_sheet","cash_flow"]:["profit_and_loss_by_classes","balance_sheet","cash_flow"],firstMonthOfFY:o,bookCloseDate:a,dataAvailable:n,timeframe:e.selectedTimeframe,additionalBalances:d,format:e.reportFormat,balancesFilter:{thisPeriod:t,numberOfPeriods:e.selectedCOABalancesRange.numberOfPeriods,orderBy:e.displayOrder},accountViewMode:e.profitAndLossClassesViewReport.uiState.accountViewMode,nestedClassHierarchy:e.profitAndLossClassesViewReport?.classHierarchy,classesToFilterOut:e.profitAndLossClassesViewReport.classesToFilterOut,showClassAccountNumber:e.isZeniUser,isZeniCOAUsed:e.isZeniCOAUsed}}const T=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}},lt=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":return B.Event.profitAndLoss;case"cash_flow":return B.Event.cashFlow;case"balance_sheet":return B.Event.balanceSheet;default:return B.Event.reports}},le=X.memo(De,(e,t)=>dt(e,t,["report","analytics","isCompareModeOn","isZeniUser","isPageFetchInProgress"]));le.displayName="Reports table";const dt=(e,t,o)=>o.reduce((a,n)=>a===!0&&Q(e[`${n}`],t[`${n}`]),!0),pt=b.div`
102
102
  padding-right: ${e=>I.contentRightPadding.valuePx(e.windowSize)};
103
103
  `,ut=b.div`
104
104
  margin-top: ${C.sp3};
@@ -110,7 +110,7 @@ import{X as U,u as G,M as y,w as he,l as _,j as r,_ as k,be as fe,aX as me,aV as
110
110
  display: flex;
111
111
  flex-direction: row;
112
112
  justify-content: flex-start;
113
- min-height: ${Q}px;
113
+ min-height: ${K}px;
114
114
  box-sizing: content-box;
115
115
  width: 100%;
116
116
  align-items: center;
@@ -1,4 +1,4 @@
1
- import{u as A,j as a,M as S,X as de,_ as Ae,aj as Q,b5 as Te,q as E,b6 as J,av as ee,f as M,au as ae,ab as re,b7 as oe,b8 as ge,o as m,b9 as te,g,H as Fe,ba as pe,bb as me,C as xe,bc as fe,e as R,bd as F,ap as V}from"./index-C7yzTmij.js";import{b as P,f as le,n as x}from"./vendor-CnQcJ2Lu.js";import{p as b,d as ne,y as W,b as N,g as ce,u as T}from"./chartTypes-D-nEr9EI-C0zQa7Wt.js";import{i as K,h as se,c as I}from"./toCOABalancesWithID-DN6cSuKb-DdLSsatB.js";import{V as Z}from"./toChartData-Bc3LMl7f-CXw-Y0dZ.js";const q={legendLabelMarginLeft:new xe(2,2),legendLabelMarginRight:new xe(E[3],E[4])},Ve=x.div`
1
+ import{u as A,j as a,B as S,X as de,_ as Ae,aj as Z,b5 as Te,s as E,b6 as J,av as ee,v as M,au as ae,ab as re,b7 as oe,b8 as ge,o as m,b9 as te,d as g,J as Fe,ba as pe,bb as me,C as xe,bc as fe,n as R,bd as F,ap as V}from"./index-CIAgrDi2.js";import{b as P,f as le,n as x}from"./vendor-CnQcJ2Lu.js";import{p as b,d as ne,y as W,b as N,g as ce,u as T}from"./chartTypes-DJY-6KK0-Bzq8Fcov.js";import{i as K,h as se,c as I}from"./toCOABalancesWithID-BaqBVqJ_-1rnUe3A4.js";import{V as Q}from"./toChartData-7MYPev1U-zJcYDtq1.js";const q={legendLabelMarginLeft:new xe(2,2),legendLabelMarginRight:new xe(E[3],E[4])},Ve=x.div`
2
2
  display: flex;
3
3
  `,He=x.div`
4
4
  margin: ${m.sp2} ${m.sp0} ${m.sp2} ${m.sp0};
@@ -27,9 +27,9 @@ import{u as A,j as a,M as S,X as de,_ as Ae,aj as Q,b5 as Te,q as E,b6 as J,av a
27
27
  margin-right: ${m.sp2};
28
28
  `,Ue=x(R)`
29
29
  text-align: left;
30
- `,Ze=x(R)`
30
+ `,Qe=x(R)`
31
31
  text-align: right;
32
- `,Qe=({active:e,payload:r})=>{const t=[];return r?.forEach(n=>{const o=n.name;if(e===!0){const l=n.payload,i=n.color,h=o!=null&&l.record[o]!=null?l.record[o].amount:void 0;t.push({barName:S.getLocalizedStrings().chartCard.cashInCashOut[N(o)],value:h,color:i})}}),t},be=e=>e.map((r,t)=>a.jsxs(qe,{color:r.color,children:[a.jsxs(Ue,{children:[a.jsx(Xe,{color:r.color}),`${r.barName}:`]}),a.jsx(Ze,{children:`${T(r.value)}`})]},r.barName+t)),Je=e=>{const r=Qe({...e});return r.length===0?null:a.jsx(Ve,{children:a.jsxs(Ye,{children:[be(r.slice(0,r.length-1)),r.length?a.jsx(He,{}):null,be(r.slice(-1))]})})},ea=le.memo(Je),aa=(e,r,t,n,o)=>{let l=[],i=[],h=[];t!=null&&t.balances.length>0&&(l=K("cash_in","actual",t)),n!=null&&n.balances.length>0&&(i=K("cash_out","actual",n)),o!=null&&o.balances.length>0&&(h=se("net_cash_flow","actual",o));const s=b("cash_in","actual"),c=b("cash_out","actual"),f=b("net_cash_flow","actual"),p=l.length>0?s:i.length>0?c:void 0,d={};return d[s]=l,d[c]=i,d[f]=h,p!=null?Z(e,r,p,d):void 0},ye=[b("cash_in","actual"),b("cash_out","actual"),b("net_cash_flow","actual")],ra=x.div`
32
+ `,Ze=({active:e,payload:r})=>{const t=[];return r?.forEach(n=>{const o=n.name;if(e===!0){const l=n.payload,i=n.color,h=o!=null&&l.record[o]!=null?l.record[o].amount:void 0;t.push({barName:S.getLocalizedStrings().chartCard.cashInCashOut[N(o)],value:h,color:i})}}),t},be=e=>e.map((r,t)=>a.jsxs(qe,{color:r.color,children:[a.jsxs(Ue,{children:[a.jsx(Xe,{color:r.color}),`${r.barName}:`]}),a.jsx(Qe,{children:`${T(r.value)}`})]},r.barName+t)),Je=e=>{const r=Ze({...e});return r.length===0?null:a.jsx(Ve,{children:a.jsxs(Ye,{children:[be(r.slice(0,r.length-1)),r.length?a.jsx(He,{}):null,be(r.slice(-1))]})})},ea=le.memo(Je),aa=(e,r,t,n,o)=>{let l=[],i=[],h=[];t!=null&&t.balances.length>0&&(l=K("cash_in","actual",t)),n!=null&&n.balances.length>0&&(i=K("cash_out","actual",n)),o!=null&&o.balances.length>0&&(h=se("net_cash_flow","actual",o));const s=b("cash_in","actual"),c=b("cash_out","actual"),f=b("net_cash_flow","actual"),p=l.length>0?s:i.length>0?c:void 0,d={};return d[s]=l,d[c]=i,d[f]=h,p!=null?Q(e,r,p,d):void 0},ye=[b("cash_in","actual"),b("cash_out","actual"),b("net_cash_flow","actual")],ra=x.div`
33
33
  width: ${e=>e.width}px;
34
34
  height: ${e=>e.height}px;
35
35
 
@@ -42,7 +42,7 @@ import{u as A,j as a,M as S,X as de,_ as Ae,aj as Q,b5 as Te,q as E,b6 as J,av a
42
42
  `,oa=x(fe)`
43
43
  margin-left: ${e=>q.legendLabelMarginLeft.valuePx(e.windowSize)};
44
44
  color: ${e=>e.theme.colors.primary};
45
- `;function Pr({selectedRangeReport:e,timeframe:r,highlightedRange:t,width:n,height:o,showBarHoverBackground:l,isDetailPage:i,onCOABalancesRangeChanged:h}){const s=A(),c=P.useRef(!1);P.useEffect(()=>{c.current=!0},[]);const f=[s.colors.graphColor33,s.colors.graphColor36,s.colors.graphColor35],p=(_,w=s.colors.graphColor08)=>_<f.length?f[_]:w,d=aa(e.firstMonthOfFY,ye,e.cashIn,e.cashOut,e.netCashFlow),y=()=>{const _=[];return ye.forEach((w,C)=>{const L=i===!0&&!c.current;_.push(a.jsx(te,{name:w,animationDuration:L?500:void 0,style:{cursor:"pointer"},legendType:"square",dataKey:$=>{const k=$.record;return(k[w]!=null&&k[w].amount!=null?k[w].amount:void 0)?.amount??0},fill:p(C)},w))}),_};return d==null?null:a.jsx(ta,{chartData:d,timeframe:r,showBarHoverBackground:l,barElements:y(),customToolTipContent:({active:_,payload:w})=>a.jsx(ea,{active:_,payload:w}),width:n,height:o,onCOABalancesRangeChanged:h,highlightedRange:t,isDetailPage:i===!0})}const ta=({chartData:e,timeframe:r,barElements:t,customToolTipContent:n,highlightedRange:o,width:l,height:i,showBarHoverBackground:h,isDetailPage:s,onCOABalancesRangeChanged:c})=>{const f=de(),p=A(),d=e.timeseries,y=ne(e),_=d.map($=>$.label),w=h!==!1,C=$=>{if(!s||$?.activePayload==null||$?.activePayload.length===0)return;const k=$.activePayload[0];if(k?.payload?.timeLabel?.label==null)return;const v=$.activeTooltipIndex,O=k.payload.timeLabel.label;if(o==null)return;const u=ce(O,_,o.numberOfPeriods),j=u[1]===void 0?_.length-1:_.indexOf(u[1]),D={...o,thisPeriod:{startDate:d[j].startDate,endDate:d[j].endDate}};c?.(d[v],r,D)},L=s?(l-60)/W.cash_in_cash_out*(W.cash_in_cash_out-e.recordByTimeseries.length):20;return a.jsx(ra,{"data-testid":Ae("dashboard-cash-in-cash-out-timeframe",r),width:l,height:i,windowSize:f,children:a.jsx(Q,{children:({height:$,width:k})=>a.jsxs(Te,{data:e.recordByTimeseries,barCategoryGap:s?void 0:"12%",maxBarSize:s?E[10]:22,barGap:s?void 0:2,margin:{top:5,right:L,left:0,bottom:E[4]},height:$,width:k,style:{display:"flex",flex:"1 1 auto"},onClick:C,children:[a.jsx(J,{horizontal:!0,vertical:!1,strokeWidth:.5,stroke:p.colors.grey3}),a.jsx(ee,{dataKey:v=>v.timeLabel.label,type:"category",axisLine:{stroke:p.colors.grey3,strokeWidth:.5},tickLine:!1,tick:{color:p.colors.hero,...M.extraSmallRegular.cssObject}}),a.jsx(ae,{type:"number",axisLine:!1,tickLine:!1,tick:{color:p.colors.hero,...M.extraSmallRegular.cssObject},tickFormatter:v=>re("0,0.[00]a",v,y)}),a.jsx(oe,{wrapperStyle:{zIndex:2},cursor:w?{stroke:p.colors.background,strokeDasharray:"1, 1",strokeWidth:1,fill:p.colors.background}:!1,content:n,allowEscapeViewBox:{x:!1,y:!0}}),t,s?a.jsx(ge,{verticalAlign:"bottom",wrapperStyle:{width:"100%",display:"flex",justifyContent:"center",left:"initial",bottom:m.sp0},formatter:v=>a.jsx(oa,{windowSize:f,children:S.getLocalizedStrings().chartCard.cashInCashOut[N(v)]})}):null]})})})},la=x.div`
45
+ `;function Pr({selectedRangeReport:e,timeframe:r,highlightedRange:t,width:n,height:o,showBarHoverBackground:l,isDetailPage:i,onCOABalancesRangeChanged:h}){const s=A(),c=P.useRef(!1);P.useEffect(()=>{c.current=!0},[]);const f=[s.colors.graphColor33,s.colors.graphColor36,s.colors.graphColor35],p=(_,w=s.colors.graphColor08)=>_<f.length?f[_]:w,d=aa(e.firstMonthOfFY,ye,e.cashIn,e.cashOut,e.netCashFlow),y=()=>{const _=[];return ye.forEach((w,C)=>{const L=i===!0&&!c.current;_.push(a.jsx(te,{name:w,animationDuration:L?500:void 0,style:{cursor:"pointer"},legendType:"square",dataKey:$=>{const k=$.record;return(k[w]!=null&&k[w].amount!=null?k[w].amount:void 0)?.amount??0},fill:p(C)},w))}),_};return d==null?null:a.jsx(ta,{chartData:d,timeframe:r,showBarHoverBackground:l,barElements:y(),customToolTipContent:({active:_,payload:w})=>a.jsx(ea,{active:_,payload:w}),width:n,height:o,onCOABalancesRangeChanged:h,highlightedRange:t,isDetailPage:i===!0})}const ta=({chartData:e,timeframe:r,barElements:t,customToolTipContent:n,highlightedRange:o,width:l,height:i,showBarHoverBackground:h,isDetailPage:s,onCOABalancesRangeChanged:c})=>{const f=de(),p=A(),d=e.timeseries,y=ne(e),_=d.map($=>$.label),w=h!==!1,C=$=>{if(!s||$?.activePayload==null||$?.activePayload.length===0)return;const k=$.activePayload[0];if(k?.payload?.timeLabel?.label==null)return;const v=$.activeTooltipIndex,O=k.payload.timeLabel.label;if(o==null)return;const u=ce(O,_,o.numberOfPeriods),j=u[1]===void 0?_.length-1:_.indexOf(u[1]),D={...o,thisPeriod:{startDate:d[j].startDate,endDate:d[j].endDate}};c?.(d[v],r,D)},L=s?(l-60)/W.cash_in_cash_out*(W.cash_in_cash_out-e.recordByTimeseries.length):20;return a.jsx(ra,{"data-testid":Ae("dashboard-cash-in-cash-out-timeframe",r),width:l,height:i,windowSize:f,children:a.jsx(Z,{children:({height:$,width:k})=>a.jsxs(Te,{data:e.recordByTimeseries,barCategoryGap:s?void 0:"12%",maxBarSize:s?E[10]:22,barGap:s?void 0:2,margin:{top:5,right:L,left:0,bottom:E[4]},height:$,width:k,style:{display:"flex",flex:"1 1 auto"},onClick:C,children:[a.jsx(J,{horizontal:!0,vertical:!1,strokeWidth:.5,stroke:p.colors.grey3}),a.jsx(ee,{dataKey:v=>v.timeLabel.label,type:"category",axisLine:{stroke:p.colors.grey3,strokeWidth:.5},tickLine:!1,tick:{color:p.colors.hero,...M.extraSmallRegular.cssObject}}),a.jsx(ae,{type:"number",axisLine:!1,tickLine:!1,tick:{color:p.colors.hero,...M.extraSmallRegular.cssObject},tickFormatter:v=>re("0,0.[00]a",v,y)}),a.jsx(oe,{wrapperStyle:{zIndex:2},cursor:w?{stroke:p.colors.background,strokeDasharray:"1, 1",strokeWidth:1,fill:p.colors.background}:!1,content:n,allowEscapeViewBox:{x:!1,y:!0}}),t,s?a.jsx(ge,{verticalAlign:"bottom",wrapperStyle:{width:"100%",display:"flex",justifyContent:"center",left:"initial",bottom:m.sp0},formatter:v=>a.jsx(oa,{windowSize:f,children:S.getLocalizedStrings().chartCard.cashInCashOut[N(v)]})}):null]})})})},la=x.div`
46
46
  display: flex;
47
47
  `,na=x.div`
48
48
  flex: display;
@@ -57,10 +57,10 @@ import{u as A,j as a,M as S,X as de,_ as Ae,aj as Q,b5 as Te,q as E,b6 as J,av a
57
57
  display: flex;
58
58
  align-items: center;
59
59
  justify-content: space-between;
60
- `,sa=({active:e,payload:r})=>{const t=[];return r?.forEach(n=>{const o=n.name;if(e===!0){const l=n.payload,i=n.color,h=o!=null&&l.record[o]!=null?l.record[o].amount:void 0;t.push({barName:S.getLocalizedStrings().reportTitleById.cash_position,value:h,color:i})}}),t},ia=e=>{const r=sa(e);return r.length===0?null:a.jsx(la,{children:a.jsx(na,{children:r.map((t,n)=>a.jsx(ca,{color:t.color,children:`${t.barName}: ${T(t.value)}`},t.barName+n))})})},ua=le.memo(ia),ha=(e,r,t)=>{let n=[];t!=null&&t.balances.length>0&&(n=I("cash_position","actual",t));const o=b("cash_position","actual"),l={};return l[o]=n,n.length>0?Z(e,r,o,l):void 0},da=x.div`
60
+ `,sa=({active:e,payload:r})=>{const t=[];return r?.forEach(n=>{const o=n.name;if(e===!0){const l=n.payload,i=n.color,h=o!=null&&l.record[o]!=null?l.record[o].amount:void 0;t.push({barName:S.getLocalizedStrings().reportTitleById.cash_position,value:h,color:i})}}),t},ia=e=>{const r=sa(e);return r.length===0?null:a.jsx(la,{children:a.jsx(na,{children:r.map((t,n)=>a.jsx(ca,{color:t.color,children:`${t.barName}: ${T(t.value)}`},t.barName+n))})})},ua=le.memo(ia),ha=(e,r,t)=>{let n=[];t!=null&&t.balances.length>0&&(n=I("cash_position","actual",t));const o=b("cash_position","actual"),l={};return l[o]=n,n.length>0?Q(e,r,o,l):void 0},da=x.div`
61
61
  width: ${e=>e.width}px;
62
62
  height: ${e=>e.height}px;
63
- `,Ce=[b("cash_position","actual")];function Rr({selectedRangeReport:e,timeframe:r,highlightedRange:t,width:n,height:o,showBarHoverBackground:l,isDetailPage:i,onCOABalancesRangeChanged:h}){const s=A(),c=P.useRef(!1);P.useEffect(()=>{c.current=!0},[]);const f=ha(e.firstMonthOfFY,Ce,e.cashPosition),p=()=>{const d=[];return Ce.forEach(y=>{const _=i===!0&&!c.current;d.push(a.jsx(te,{name:y,animationDuration:_?500:void 0,style:{cursor:"pointer"},dataKey:w=>{const C=w.record;return(C[y]!=null&&C[y].amount!=null?C[y].amount:void 0)?.amount??0},fill:s.colors.graphColor17},y))}),d};return f==null?null:a.jsx(ga,{chartData:f,timeframe:r,showBarHoverBackground:l,barElements:p(),customToolTipContent:({active:d,payload:y})=>a.jsx(ua,{active:d,payload:y}),width:n,height:o,onCOABalancesRangeChanged:h,highlightedRange:t,isDetailPage:i===!0})}const ga=({chartData:e,timeframe:r,barElements:t,customToolTipContent:n,highlightedRange:o,width:l,height:i,showBarHoverBackground:h,isDetailPage:s,onCOABalancesRangeChanged:c})=>{const f=A(),p=e.timeseries,d=ne(e),y=p.map(L=>L.label),_=h!==!1,w=L=>{if(!s||L?.activePayload==null||L?.activePayload.length===0)return;const $=L.activePayload[0];if($?.payload?.timeLabel?.label==null)return;const k=L.activeTooltipIndex,v=$.payload.timeLabel.label;if(o==null)return;const O=ce(v,y,o.numberOfPeriods),u=O[1]===void 0?y.length-1:y.indexOf(O[1]),j={...o,thisPeriod:{startDate:p[u].startDate,endDate:p[u].endDate}};c?.(p[k],r,j)},C=s?(l-60)/W.cash_position*(W.cash_position-e.recordByTimeseries.length):20;return a.jsx(da,{width:l,height:i,children:a.jsx(Q,{children:({height:L,width:$})=>a.jsxs(Te,{width:$,height:L,data:e.recordByTimeseries,barCategoryGap:"25%",maxBarSize:s?E[10]:30,margin:{top:5,right:C,left:0,bottom:5},style:{display:"flex",flex:"1 1 auto"},onClick:w,children:[a.jsx(J,{horizontal:!0,vertical:!1,strokeWidth:.5,stroke:f.colors.grey3}),a.jsx(ee,{dataKey:k=>k.timeLabel.label,type:"category",axisLine:{stroke:f.colors.grey3,strokeWidth:.5},tickLine:!1,tick:{color:f.colors.hero,...M.extraSmallRegular.cssObject}}),a.jsx(ae,{type:"number",axisLine:!1,tickLine:!1,tick:{color:f.colors.hero,...M.extraSmallRegular.cssObject},tickFormatter:k=>re("0,0.[00]a",k,d)}),a.jsx(oe,{wrapperStyle:{zIndex:2},cursor:_?{stroke:f.colors.background,strokeDasharray:"1, 1",strokeWidth:1,fill:f.colors.background}:!1,content:n,allowEscapeViewBox:{x:!1,y:!0}}),t]})})})},pa=x.div`
63
+ `,Ce=[b("cash_position","actual")];function Rr({selectedRangeReport:e,timeframe:r,highlightedRange:t,width:n,height:o,showBarHoverBackground:l,isDetailPage:i,onCOABalancesRangeChanged:h}){const s=A(),c=P.useRef(!1);P.useEffect(()=>{c.current=!0},[]);const f=ha(e.firstMonthOfFY,Ce,e.cashPosition),p=()=>{const d=[];return Ce.forEach(y=>{const _=i===!0&&!c.current;d.push(a.jsx(te,{name:y,animationDuration:_?500:void 0,style:{cursor:"pointer"},dataKey:w=>{const C=w.record;return(C[y]!=null&&C[y].amount!=null?C[y].amount:void 0)?.amount??0},fill:s.colors.graphColor17},y))}),d};return f==null?null:a.jsx(ga,{chartData:f,timeframe:r,showBarHoverBackground:l,barElements:p(),customToolTipContent:({active:d,payload:y})=>a.jsx(ua,{active:d,payload:y}),width:n,height:o,onCOABalancesRangeChanged:h,highlightedRange:t,isDetailPage:i===!0})}const ga=({chartData:e,timeframe:r,barElements:t,customToolTipContent:n,highlightedRange:o,width:l,height:i,showBarHoverBackground:h,isDetailPage:s,onCOABalancesRangeChanged:c})=>{const f=A(),p=e.timeseries,d=ne(e),y=p.map(L=>L.label),_=h!==!1,w=L=>{if(!s||L?.activePayload==null||L?.activePayload.length===0)return;const $=L.activePayload[0];if($?.payload?.timeLabel?.label==null)return;const k=L.activeTooltipIndex,v=$.payload.timeLabel.label;if(o==null)return;const O=ce(v,y,o.numberOfPeriods),u=O[1]===void 0?y.length-1:y.indexOf(O[1]),j={...o,thisPeriod:{startDate:p[u].startDate,endDate:p[u].endDate}};c?.(p[k],r,j)},C=s?(l-60)/W.cash_position*(W.cash_position-e.recordByTimeseries.length):20;return a.jsx(da,{width:l,height:i,children:a.jsx(Z,{children:({height:L,width:$})=>a.jsxs(Te,{width:$,height:L,data:e.recordByTimeseries,barCategoryGap:"25%",maxBarSize:s?E[10]:30,margin:{top:5,right:C,left:0,bottom:5},style:{display:"flex",flex:"1 1 auto"},onClick:w,children:[a.jsx(J,{horizontal:!0,vertical:!1,strokeWidth:.5,stroke:f.colors.grey3}),a.jsx(ee,{dataKey:k=>k.timeLabel.label,type:"category",axisLine:{stroke:f.colors.grey3,strokeWidth:.5},tickLine:!1,tick:{color:f.colors.hero,...M.extraSmallRegular.cssObject}}),a.jsx(ae,{type:"number",axisLine:!1,tickLine:!1,tick:{color:f.colors.hero,...M.extraSmallRegular.cssObject},tickFormatter:k=>re("0,0.[00]a",k,d)}),a.jsx(oe,{wrapperStyle:{zIndex:2},cursor:_?{stroke:f.colors.background,strokeDasharray:"1, 1",strokeWidth:1,fill:f.colors.background}:!1,content:n,allowEscapeViewBox:{x:!1,y:!0}}),t]})})})},pa=x.div`
64
64
  display: flex;
65
65
  `,ma=x.div`
66
66
  display: flex;
@@ -128,7 +128,7 @@ import{u as A,j as a,M as S,X as de,_ as Ae,aj as Q,b5 as Te,q as E,b6 as J,av a
128
128
  `,ve=x(V)`
129
129
  display: flex;
130
130
  flex-direction: column;
131
- `,ke=x(H)``,ka=(e,r)=>{const t=b(N(e),"forecast");if(r.record[t]==null)return;const n=r.record[e].amount,o=r.record[t].amount,l=Math.floor((n.amount-o.amount)*100/100),i={...n,amount:l},h=o.amount!==0?Math.floor((n.amount-o.amount)/o.amount*100)/100:void 0;return{value:o,change:i,percent:h,forecastPercent:r.record[t].percentValue}},$a=({active:e,payload:r,mode:t})=>{const n=[],o={barName:S.getLocalizedStrings().chartCard.netBurnOrIncome.gross_burn,actual:void 0,color:g.neutralGrey2Dark,forecast:void 0};let l={amount:0,currencyCode:"",currencySymbol:""},i={amount:0,currencyCode:"",currencySymbol:""};const h=b("income","actual"),s=b("cogs","actual"),c=b("expenses","actual"),f=b("net_burn_or_income","actual");return r?.forEach(p=>{const d=p.name;if(e===!0){const y=p.payload,_=p.color,w=d!=null&&y.record[d]!=null?y.record[d].amount:void 0;let C;if(d.includes("forecast")!==!0)switch(t==="forecast_mode"&&(C=y.record[d]!=null?ka(d,y):void 0),d){case s:case c:w!=null&&(l.currencyCode===""?l={...w}:l.amount=l.amount+w.amount),C!=null&&(i.currencyCode===""?i={...C.value}:i.amount=i.amount+C.value.amount),n.push({barName:S.getLocalizedStrings().chartCard.netBurnOrIncome[N(d)],actual:w,forecast:C,color:_});break;case f:{const L=w!=null&&w.amount>=0?S.getLocalizedStrings().chartCard.netBurnOrIncome.net_income:S.getLocalizedStrings().chartCard.netBurnOrIncome.net_burn;n.push({barName:L,actual:w,color:_,percent:y.record[d]?.percentValue,forecast:C});break}case h:default:n.push({barName:S.getLocalizedStrings().chartCard.netBurnOrIncome[N(d)],actual:w,color:_,forecast:C})}}}),o.actual=l,o.forecast=i!=null&&l!=null?{value:i,change:{...l,amount:Math.floor((l.amount-i.amount)*100/100)},percent:i.amount!==0?Math.floor((l.amount-i.amount)/i.amount*100)/100:0}:void 0,e===!0&&n.splice(n.length-1,0,o),n},$e=e=>e.map((r,t)=>a.jsxs(Ne,{color:r.color,showPercent:r.percent!=null,children:[a.jsxs(Ca,{children:[a.jsx(Ee,{color:r.barName===S.getLocalizedStrings().chartCard.netBurnOrIncome.gross_burn?"transparent":r.color}),`${r.barName}:`]}),a.jsxs(va,{children:[a.jsx(je,{children:`${T(r.actual)}`}),r.percent!=null?a.jsx(je,{children:F("0,0.0%",r.percent)}):null]})]},r.barName+t)),we=e=>e.map((r,t)=>a.jsxs(Ne,{color:r.color,showPercent:r.percent!=null,children:[a.jsxs(ja,{children:[a.jsx(Ee,{color:r.barName===S.getLocalizedStrings().chartCard.netBurnOrIncome.gross_burn?"transparent":r.color}),`${r.barName}:`]}),a.jsx(H,{children:a.jsxs(ve,{children:[r.actual!=null?`${T(r.actual)}`:"-",a.jsx(ke,{children:r.percent!=null?F("0,0.0%",r.percent):null})]})}),a.jsx(H,{children:a.jsxs(ve,{children:[r.forecast!=null?`${T(r.forecast.value)}`:"-",a.jsx(ke,{children:r.forecast!=null&&r.forecast.forecastPercent!=null?F("0,0.0%",r.forecast.forecastPercent):null})]})}),r.forecast!=null?a.jsx(H,{isChange:!0,children:`${T(r.forecast.change)}`}):a.jsx(H,{children:"-"}),r.forecast!=null?a.jsx(H,{isChange:!0,children:F("0,0.0%",r.forecast.percent)}):a.jsx(H,{children:"-"})]},r.barName+t)),wa=e=>{if(e.length>0){for(const r of e)if(r.actual!=null)return r.actual.currencySymbol}return""},_a=({barLabelsWithValues:e})=>a.jsxs(ma,{children:[a.jsxs(fa,{children:[a.jsx(xa,{}),a.jsx(ie,{children:S.getLocalizedStrings().chartCard.tooltip.actual}),a.jsx(ie,{children:S.getLocalizedStrings().chartCard.tooltip.forecast}),a.jsxs(ie,{children:[S.getLocalizedStrings().chartCard.tooltip.change," ",wa(e)]}),a.jsx(ie,{children:S.getLocalizedStrings().chartCard.tooltip.change_percent})]}),a.jsxs(ya,{children:[we(e.slice(0,e.length-2)),e.length?a.jsx(We,{}):null,we(e.slice(-2))]})]}),La=({barLabelsWithValues:e})=>a.jsx(pa,{children:a.jsxs(ba,{children:[$e(e.slice(0,e.length-2)),e.length?a.jsx(We,{}):null,$e(e.slice(-2))]})}),Sa=e=>{const r=$a({...e});return r.length===0?null:a.jsx(a.Fragment,{children:e.mode==="forecast_mode"?a.jsx(_a,{barLabelsWithValues:r}):a.jsx(La,{barLabelsWithValues:r})})},Da=le.memo(Sa),Ba=(e,r,t,n,o,l,i)=>{let h=[],s=[],c=[],f=[];n!=null&&n.balances.length>0&&(h=K("income","actual",n)),o!=null&&o.balances.length>0&&(s=K("cogs","actual",o)),l!=null&&l.balances.length>0&&(c=I("expenses","actual",l)),i!=null&&i.balances.length>0&&(f=se("net_burn_or_income","actual",i));const p=b("income","actual"),d=b("cogs","actual"),y=b("expenses","actual"),_=b("net_burn_or_income","actual"),w=h.length>0?p:s.length>0?d:c.length>0?y:void 0,C={};return C[p]=h,C[d]=s,C[y]=c,C[_]=f,t==="forecast_mode"&&Object.assign(C,Oa(n,o,l,i)),w!=null?Z(e,r,w,C):void 0},Oa=(e,r,t,n)=>{let o=[],l=[],i=[],h=[];e!=null&&e.balances.length>0&&(o=K("income","forecast",e)),r!=null&&r.balances.length>0&&(l=K("cogs","forecast",r)),t!=null&&t.balances.length>0&&(i=I("expenses","forecast",t)),n!=null&&n.balances.length>0&&(h=se("net_burn_or_income","forecast",n));const s=b("income","forecast"),c=b("cogs","forecast"),f=b("expenses","forecast"),p=b("net_burn_or_income","forecast"),d={};return d[s]=o,d[c]=l,d[f]=i,d[p]=h,d},za=[b("income","actual"),b("cogs","actual"),b("expenses","actual"),b("net_burn_or_income","actual")],Pa=[b("income","actual"),b("cogs","actual"),b("expenses","actual"),b("net_burn_or_income","actual"),b("income","forecast"),b("cogs","forecast"),b("expenses","forecast"),b("net_burn_or_income","forecast")],Ra=x.div`
131
+ `,ke=x(H)``,ka=(e,r)=>{const t=b(N(e),"forecast");if(r.record[t]==null)return;const n=r.record[e].amount,o=r.record[t].amount,l=Math.floor((n.amount-o.amount)*100/100),i={...n,amount:l},h=o.amount!==0?Math.floor((n.amount-o.amount)/o.amount*100)/100:void 0;return{value:o,change:i,percent:h,forecastPercent:r.record[t].percentValue}},$a=({active:e,payload:r,mode:t})=>{const n=[],o={barName:S.getLocalizedStrings().chartCard.netBurnOrIncome.gross_burn,actual:void 0,color:g.neutralGrey2Dark,forecast:void 0};let l={amount:0,currencyCode:"",currencySymbol:""},i={amount:0,currencyCode:"",currencySymbol:""};const h=b("income","actual"),s=b("cogs","actual"),c=b("expenses","actual"),f=b("net_burn_or_income","actual");return r?.forEach(p=>{const d=p.name;if(e===!0){const y=p.payload,_=p.color,w=d!=null&&y.record[d]!=null?y.record[d].amount:void 0;let C;if(d.includes("forecast")!==!0)switch(t==="forecast_mode"&&(C=y.record[d]!=null?ka(d,y):void 0),d){case s:case c:w!=null&&(l.currencyCode===""?l={...w}:l.amount=l.amount+w.amount),C!=null&&(i.currencyCode===""?i={...C.value}:i.amount=i.amount+C.value.amount),n.push({barName:S.getLocalizedStrings().chartCard.netBurnOrIncome[N(d)],actual:w,forecast:C,color:_});break;case f:{const L=w!=null&&w.amount>=0?S.getLocalizedStrings().chartCard.netBurnOrIncome.net_income:S.getLocalizedStrings().chartCard.netBurnOrIncome.net_burn;n.push({barName:L,actual:w,color:_,percent:y.record[d]?.percentValue,forecast:C});break}case h:default:n.push({barName:S.getLocalizedStrings().chartCard.netBurnOrIncome[N(d)],actual:w,color:_,forecast:C})}}}),o.actual=l,o.forecast=i!=null&&l!=null?{value:i,change:{...l,amount:Math.floor((l.amount-i.amount)*100/100)},percent:i.amount!==0?Math.floor((l.amount-i.amount)/i.amount*100)/100:0}:void 0,e===!0&&n.splice(n.length-1,0,o),n},$e=e=>e.map((r,t)=>a.jsxs(Ne,{color:r.color,showPercent:r.percent!=null,children:[a.jsxs(Ca,{children:[a.jsx(Ee,{color:r.barName===S.getLocalizedStrings().chartCard.netBurnOrIncome.gross_burn?"transparent":r.color}),`${r.barName}:`]}),a.jsxs(va,{children:[a.jsx(je,{children:`${T(r.actual)}`}),r.percent!=null?a.jsx(je,{children:F("0,0.0%",r.percent)}):null]})]},r.barName+t)),we=e=>e.map((r,t)=>a.jsxs(Ne,{color:r.color,showPercent:r.percent!=null,children:[a.jsxs(ja,{children:[a.jsx(Ee,{color:r.barName===S.getLocalizedStrings().chartCard.netBurnOrIncome.gross_burn?"transparent":r.color}),`${r.barName}:`]}),a.jsx(H,{children:a.jsxs(ve,{children:[r.actual!=null?`${T(r.actual)}`:"-",a.jsx(ke,{children:r.percent!=null?F("0,0.0%",r.percent):null})]})}),a.jsx(H,{children:a.jsxs(ve,{children:[r.forecast!=null?`${T(r.forecast.value)}`:"-",a.jsx(ke,{children:r.forecast!=null&&r.forecast.forecastPercent!=null?F("0,0.0%",r.forecast.forecastPercent):null})]})}),r.forecast!=null?a.jsx(H,{isChange:!0,children:`${T(r.forecast.change)}`}):a.jsx(H,{children:"-"}),r.forecast!=null?a.jsx(H,{isChange:!0,children:F("0,0.0%",r.forecast.percent)}):a.jsx(H,{children:"-"})]},r.barName+t)),wa=e=>{if(e.length>0){for(const r of e)if(r.actual!=null)return r.actual.currencySymbol}return""},_a=({barLabelsWithValues:e})=>a.jsxs(ma,{children:[a.jsxs(fa,{children:[a.jsx(xa,{}),a.jsx(ie,{children:S.getLocalizedStrings().chartCard.tooltip.actual}),a.jsx(ie,{children:S.getLocalizedStrings().chartCard.tooltip.forecast}),a.jsxs(ie,{children:[S.getLocalizedStrings().chartCard.tooltip.change," ",wa(e)]}),a.jsx(ie,{children:S.getLocalizedStrings().chartCard.tooltip.change_percent})]}),a.jsxs(ya,{children:[we(e.slice(0,e.length-2)),e.length?a.jsx(We,{}):null,we(e.slice(-2))]})]}),La=({barLabelsWithValues:e})=>a.jsx(pa,{children:a.jsxs(ba,{children:[$e(e.slice(0,e.length-2)),e.length?a.jsx(We,{}):null,$e(e.slice(-2))]})}),Sa=e=>{const r=$a({...e});return r.length===0?null:a.jsx(a.Fragment,{children:e.mode==="forecast_mode"?a.jsx(_a,{barLabelsWithValues:r}):a.jsx(La,{barLabelsWithValues:r})})},Da=le.memo(Sa),Ba=(e,r,t,n,o,l,i)=>{let h=[],s=[],c=[],f=[];n!=null&&n.balances.length>0&&(h=K("income","actual",n)),o!=null&&o.balances.length>0&&(s=K("cogs","actual",o)),l!=null&&l.balances.length>0&&(c=I("expenses","actual",l)),i!=null&&i.balances.length>0&&(f=se("net_burn_or_income","actual",i));const p=b("income","actual"),d=b("cogs","actual"),y=b("expenses","actual"),_=b("net_burn_or_income","actual"),w=h.length>0?p:s.length>0?d:c.length>0?y:void 0,C={};return C[p]=h,C[d]=s,C[y]=c,C[_]=f,t==="forecast_mode"&&Object.assign(C,Oa(n,o,l,i)),w!=null?Q(e,r,w,C):void 0},Oa=(e,r,t,n)=>{let o=[],l=[],i=[],h=[];e!=null&&e.balances.length>0&&(o=K("income","forecast",e)),r!=null&&r.balances.length>0&&(l=K("cogs","forecast",r)),t!=null&&t.balances.length>0&&(i=I("expenses","forecast",t)),n!=null&&n.balances.length>0&&(h=se("net_burn_or_income","forecast",n));const s=b("income","forecast"),c=b("cogs","forecast"),f=b("expenses","forecast"),p=b("net_burn_or_income","forecast"),d={};return d[s]=o,d[c]=l,d[f]=i,d[p]=h,d},za=[b("income","actual"),b("cogs","actual"),b("expenses","actual"),b("net_burn_or_income","actual")],Pa=[b("income","actual"),b("cogs","actual"),b("expenses","actual"),b("net_burn_or_income","actual"),b("income","forecast"),b("cogs","forecast"),b("expenses","forecast"),b("net_burn_or_income","forecast")],Ra=x.div`
132
132
  width: ${e=>e.width}px;
133
133
  height: ${e=>e.height}px;
134
134
 
@@ -141,7 +141,7 @@ import{u as A,j as a,M as S,X as de,_ as Ae,aj as Q,b5 as Te,q as E,b6 as J,av a
141
141
  `,Ta=x(fe)`
142
142
  margin-left: ${e=>q.legendLabelMarginLeft.valuePx(e.windowSize)};
143
143
  color: ${e=>e.theme.colors.primary};
144
- `;function Tr({selectedRangeReport:e,timeframe:r,highlightedRange:t,width:n,height:o,showBarHoverBackground:l,isDetailPage:i,mode:h,onCOABalancesRangeChanged:s}){const c=A(),f=P.useRef(!1);P.useEffect(()=>{f.current=!0},[]);const p=[c.colors.graphColor36,c.colors.graphColor06,c.colors.graphColor31,c.colors.graphColor12],d=[c.colors.graphColor04,c.colors.graphColor10,c.colors.graphColor32,c.colors.graphColor13,c.colors.graphColor04Dark,c.colors.graphColor10Dark,c.colors.graphColor32Dark,c.colors.graphColor13Dark],y=h==="forecast_mode"?d:p,_=h==="forecast_mode"?Pa:za,w=(u,j=c.colors.graphColor04)=>u<y.length?y[u]:j,C=(e.reportId,Ba(e.firstMonthOfFY,_,h,e.sections.income,e.sections.cogs,e.sections.expenses,e.calculatedSections.netBurnOrIncome)),L=u=>{const{cx:j,cy:D,fill:B,stroke:z,value:G}=u;return G==null?a.jsx(a.Fragment,{}):a.jsx("circle",{cx:j,cy:D,r:4,stroke:B,strokeWidth:2,fill:z})},$=u=>{const{cx:j,cy:D,fill:B,stroke:z,value:G}=u;return G==null?a.jsx(a.Fragment,{}):a.jsx("circle",{cx:j,cy:D,r:5,stroke:z,strokeWidth:2,fill:B})},k=(u,j)=>a.jsx(pe,{name:u,type:"monotone",legendType:"plainline",isAnimationActive:!1,dataKey:D=>{const B=D.record;return(B[u]!=null&&B[u].amount!=null?B[u].amount:void 0)?.amount},dot:a.jsx(L,{}),strokeWidth:1.5,stroke:w(j),strokeDasharray:"3 3",activeDot:a.jsx($,{})},u),v=(u,j,D)=>a.jsx(te,{name:u,animationDuration:D?500:void 0,style:{cursor:"pointer"},legendType:"square",dataKey:B=>{const z=B.record;return(z[u]!=null&&z[u].amount!=null?z[u].amount:void 0)?.amount??0},fill:w(j)},u),O=()=>{const u=[];return _.forEach((j,D)=>{const B=i===!0&&!f.current;j.endsWith("_forecast")?u.push(k(j,D)):u.push(v(j,D,B))}),u};return C==null?null:a.jsx(Wa,{chartData:C,timeframe:r,showBarHoverBackground:l,barElements:O(),customToolTipContent:({active:u,payload:j})=>a.jsx(Da,{active:u,payload:j,mode:h}),width:n,height:o,onCOABalancesRangeChanged:s,highlightedRange:t,isDetailPage:i===!0})}const Wa=({chartData:e,timeframe:r,barElements:t,customToolTipContent:n,highlightedRange:o,width:l,height:i,showBarHoverBackground:h,isDetailPage:s,onCOABalancesRangeChanged:c})=>{const f=de(),p=A(),d=ne(e),y=e.timeseries,_=y.map($=>$.label),w=h!==!1,C=$=>{if(!s||$?.activePayload==null||$?.activePayload.length===0)return;const k=$.activePayload[0];if(k?.payload?.timeLabel?.label==null)return;const v=$.activeTooltipIndex,O=k.payload.timeLabel.label;if(o==null)return;const u=ce(O,_,o.numberOfPeriods),j=u[1]===void 0?_.length-1:_.indexOf(u[1]),D={...o,thisPeriod:{startDate:y[j].startDate,endDate:y[j].endDate}};c?.(y[v],r,D)},L=s?(l-60)/W.net_burn_or_income*(W.net_burn_or_income-e.recordByTimeseries.length):20;return a.jsx(Ra,{width:l,height:i,windowSize:f,children:a.jsx(Q,{children:({height:$,width:k})=>a.jsxs(me,{data:e.recordByTimeseries,barCategoryGap:s?void 0:"12%",maxBarSize:s?E[10]:22,barGap:s?void 0:2,margin:{top:5,right:L,left:0,bottom:E[4]},height:$,width:k,style:{display:"flex",flex:"1 1 auto"},onClick:C,children:[a.jsx(J,{horizontal:!0,vertical:!1,strokeWidth:.5,stroke:p.colors.grey3}),a.jsx(ee,{dataKey:v=>v.timeLabel.label,type:"category",axisLine:{stroke:p.colors.grey3,strokeWidth:.5},tickLine:!1,tick:{color:p.colors.hero,...M.extraSmallRegular.cssObject}}),a.jsx(ae,{type:"number",axisLine:!1,tickLine:!1,tick:{color:p.colors.hero,...M.extraSmallRegular.cssObject},tickFormatter:v=>re("0,0.[00]a",v,d)}),a.jsx(oe,{wrapperStyle:{zIndex:2},cursor:w?{stroke:p.colors.background,strokeWidth:(k-60)/W.net_burn_or_income,fill:p.colors.background}:!1,content:n,allowEscapeViewBox:{x:!1,y:!0}}),t,s?a.jsx(ge,{verticalAlign:"bottom",wrapperStyle:{width:"100%",display:"flex",justifyContent:"center",left:"initial",bottom:m.sp0},iconSize:E[3],formatter:v=>a.jsx(Ta,{windowSize:f,children:v.endsWith("_forecast")===!0?S.getLocalizedStrings().chartCard.netBurnOrIncome[v]:S.getLocalizedStrings().chartCard.netBurnOrIncome[N(v)]})}):null]})})})},Na=x.div`
144
+ `;function Tr({selectedRangeReport:e,timeframe:r,highlightedRange:t,width:n,height:o,showBarHoverBackground:l,isDetailPage:i,mode:h,onCOABalancesRangeChanged:s}){const c=A(),f=P.useRef(!1);P.useEffect(()=>{f.current=!0},[]);const p=[c.colors.graphColor36,c.colors.graphColor06,c.colors.graphColor31,c.colors.graphColor12],d=[c.colors.graphColor04,c.colors.graphColor10,c.colors.graphColor32,c.colors.graphColor13,c.colors.graphColor04Dark,c.colors.graphColor10Dark,c.colors.graphColor32Dark,c.colors.graphColor13Dark],y=h==="forecast_mode"?d:p,_=h==="forecast_mode"?Pa:za,w=(u,j=c.colors.graphColor04)=>u<y.length?y[u]:j,C=(e.reportId,Ba(e.firstMonthOfFY,_,h,e.sections.income,e.sections.cogs,e.sections.expenses,e.calculatedSections.netBurnOrIncome)),L=u=>{const{cx:j,cy:D,fill:B,stroke:z,value:G}=u;return G==null?a.jsx(a.Fragment,{}):a.jsx("circle",{cx:j,cy:D,r:4,stroke:B,strokeWidth:2,fill:z})},$=u=>{const{cx:j,cy:D,fill:B,stroke:z,value:G}=u;return G==null?a.jsx(a.Fragment,{}):a.jsx("circle",{cx:j,cy:D,r:5,stroke:z,strokeWidth:2,fill:B})},k=(u,j)=>a.jsx(pe,{name:u,type:"monotone",legendType:"plainline",isAnimationActive:!1,dataKey:D=>{const B=D.record;return(B[u]!=null&&B[u].amount!=null?B[u].amount:void 0)?.amount},dot:a.jsx(L,{}),strokeWidth:1.5,stroke:w(j),strokeDasharray:"3 3",activeDot:a.jsx($,{})},u),v=(u,j,D)=>a.jsx(te,{name:u,animationDuration:D?500:void 0,style:{cursor:"pointer"},legendType:"square",dataKey:B=>{const z=B.record;return(z[u]!=null&&z[u].amount!=null?z[u].amount:void 0)?.amount??0},fill:w(j)},u),O=()=>{const u=[];return _.forEach((j,D)=>{const B=i===!0&&!f.current;j.endsWith("_forecast")?u.push(k(j,D)):u.push(v(j,D,B))}),u};return C==null?null:a.jsx(Wa,{chartData:C,timeframe:r,showBarHoverBackground:l,barElements:O(),customToolTipContent:({active:u,payload:j})=>a.jsx(Da,{active:u,payload:j,mode:h}),width:n,height:o,onCOABalancesRangeChanged:s,highlightedRange:t,isDetailPage:i===!0})}const Wa=({chartData:e,timeframe:r,barElements:t,customToolTipContent:n,highlightedRange:o,width:l,height:i,showBarHoverBackground:h,isDetailPage:s,onCOABalancesRangeChanged:c})=>{const f=de(),p=A(),d=ne(e),y=e.timeseries,_=y.map($=>$.label),w=h!==!1,C=$=>{if(!s||$?.activePayload==null||$?.activePayload.length===0)return;const k=$.activePayload[0];if(k?.payload?.timeLabel?.label==null)return;const v=$.activeTooltipIndex,O=k.payload.timeLabel.label;if(o==null)return;const u=ce(O,_,o.numberOfPeriods),j=u[1]===void 0?_.length-1:_.indexOf(u[1]),D={...o,thisPeriod:{startDate:y[j].startDate,endDate:y[j].endDate}};c?.(y[v],r,D)},L=s?(l-60)/W.net_burn_or_income*(W.net_burn_or_income-e.recordByTimeseries.length):20;return a.jsx(Ra,{width:l,height:i,windowSize:f,children:a.jsx(Z,{children:({height:$,width:k})=>a.jsxs(me,{data:e.recordByTimeseries,barCategoryGap:s?void 0:"12%",maxBarSize:s?E[10]:22,barGap:s?void 0:2,margin:{top:5,right:L,left:0,bottom:E[4]},height:$,width:k,style:{display:"flex",flex:"1 1 auto"},onClick:C,children:[a.jsx(J,{horizontal:!0,vertical:!1,strokeWidth:.5,stroke:p.colors.grey3}),a.jsx(ee,{dataKey:v=>v.timeLabel.label,type:"category",axisLine:{stroke:p.colors.grey3,strokeWidth:.5},tickLine:!1,tick:{color:p.colors.hero,...M.extraSmallRegular.cssObject}}),a.jsx(ae,{type:"number",axisLine:!1,tickLine:!1,tick:{color:p.colors.hero,...M.extraSmallRegular.cssObject},tickFormatter:v=>re("0,0.[00]a",v,d)}),a.jsx(oe,{wrapperStyle:{zIndex:2},cursor:w?{stroke:p.colors.background,strokeWidth:(k-60)/W.net_burn_or_income,fill:p.colors.background}:!1,content:n,allowEscapeViewBox:{x:!1,y:!0}}),t,s?a.jsx(ge,{verticalAlign:"bottom",wrapperStyle:{width:"100%",display:"flex",justifyContent:"center",left:"initial",bottom:m.sp0},iconSize:E[3],formatter:v=>a.jsx(Ta,{windowSize:f,children:v.endsWith("_forecast")===!0?S.getLocalizedStrings().chartCard.netBurnOrIncome[v]:S.getLocalizedStrings().chartCard.netBurnOrIncome[N(v)]})}):null]})})})},Na=x.div`
145
145
  display: flex;
146
146
  `,Ea=x.div`
147
147
  flex: display;
@@ -192,10 +192,10 @@ import{u as A,j as a,M as S,X as de,_ as Ae,aj as Q,b5 as Te,q as E,b6 as J,av a
192
192
  `,X=x(V)`
193
193
  text-align: right;
194
194
  flex: 1;
195
- `,Va=({active:e,payload:r,barName:t})=>{const n=[];if(r!=null&&e===!0){const o=r.filter(s=>s.name==t)[0],l=o.payload,i=o.color,h=t!=null&&l.record[t]!=null?l.record[t].amount:void 0;if(!t?.endsWith("_forecast")){let s;if(t.includes("forecast")!==!0){s=l.record[t]!=null?Ha(t,l):void 0;const c={amount:0,currencyCode:"",currencySymbol:""},f={amount:0,currencyCode:"",currencySymbol:""};let p;for(p in l.record){const C=l.record[p].amount;p.endsWith("_actual")?(c.amount+=l.record[p].amount?.amount??0,c.currencyCode=C!=null?C.currencyCode:c.currencyCode,c.currencySymbol=C!=null?C.currencySymbol:c.currencySymbol):p.endsWith("_forecast")&&(f.amount+=l.record[p].amount?.amount??0,f.currencyCode=C!=null?C.currencyCode:f.currencyCode,f.currencySymbol=C!=null?C.currencySymbol:f.currencySymbol)}const d=Math.floor((c?.amount-f?.amount)*100/100),y={...c,amount:d},_=f.amount!==0?Math.floor((c.amount-f.amount)/f.amount*100)/100:0,w={value:f,change:y,percent:_};n.push({barName:N(t),actual:h,forecast:s,color:i}),n.push({barName:S.getLocalizedStrings().chartCard.total,actual:c,forecast:w,color:g.neutralGrey1Light})}}}return n},Ha=(e,r)=>{const t=b(N(e),"forecast");if(r.record[t]==null)return;const n=r.record[e].amount,o=r.record[t].amount,l={...n,amount:o!=null?Math.floor((n.amount-o.amount)*100/100):n.amount},i=o!=null&&o.amount!==0?Math.floor((n.amount-o.amount)/o.amount*100)/100:void 0;return{value:o,change:l,percent:i}},Le=e=>a.jsxs(Ia,{color:e.color,children:[a.jsx(Fa,{children:`${e.barName}:`}),a.jsx(X,{children:e.actual!=null?`${T(e.actual)}`:"-"}),a.jsx(X,{children:e.forecast!=null?`${T(e.forecast.value)}`:"-"}),e.forecast!=null?a.jsx(X,{isChange:!0,children:`${T(e.forecast.change)}`}):a.jsx(X,{children:"-"}),e.forecast!=null?a.jsx(X,{isChange:!0,children:F("0,0.0%",e.forecast.percent)}):a.jsx(X,{children:"-"})]}),Ya=e=>{if(e.length>0){for(const r of e)if(r.actual!=null)return r.actual.currencySymbol}return""},qa=({barLabelsWithValues:e})=>a.jsx(Na,{children:a.jsxs(Ea,{children:[a.jsx(_e,{color:e[0].color,children:`${e[0].barName}: ${T(e[0].actual)}`}),a.jsx(Ge,{}),a.jsx(_e,{children:`${S.getLocalizedStrings().chartCard.total}: ${T(e[1].actual)}`})]})}),Xa=({barLabelsWithValues:e})=>a.jsxs(Ma,{children:[a.jsxs(Ka,{children:[a.jsx(Ga,{}),a.jsx(ue,{children:S.getLocalizedStrings().chartCard.tooltip.actual}),a.jsx(ue,{children:S.getLocalizedStrings().chartCard.tooltip.forecast}),a.jsxs(ue,{children:[S.getLocalizedStrings().chartCard.tooltip.change," ",Ya(e)]}),a.jsx(ue,{children:S.getLocalizedStrings().chartCard.tooltip.change_percent})]}),a.jsxs(Aa,{children:[Le(e[0]),a.jsx(Ge,{}),Le(e[1])]})]}),Ua=e=>{const r=Va({...e});return r.length===0?null:a.jsx(a.Fragment,{children:e.mode==="forecast_mode"?a.jsx(Xa,{barLabelsWithValues:r}):a.jsx(qa,{barLabelsWithValues:r})})},Za=le.memo(Ua),Qa=(e,r)=>{const t=[],n={};let o;return r!=null&&r.classes.length!=0&&r.classes.forEach(l=>{const i=I(l.class.className,"actual",l.childrenBalancesTotal),h=b(l.class.className,"actual");n[h]=i,t.push(h),o==null&&i.length>0&&(o=b(l.class.className,"actual"))}),o!=null?Z(e,t,o,n):void 0},Se=[g.graphColor34,g.graphColor05,g.graphColor08,g.graphColor11,g.graphColor13,g.graphColor19,g.graphColor29,g.graphColor28,g.graphColor20,g.graphColor21,g.graphColor22,g.graphColor14,g.graphColor35,g.graphColor31,g.graphColor33,g.graphColor32,g.graphColor36,g.graphColor02,g.graphColor06,g.graphColor04,g.graphColor10,g.graphColor12,g.graphColor15,g.graphColor18,g.graphColor17,g.graphColor07,g.graphColor34Dark,g.graphColor05Dark,g.graphColor08Dark,g.graphColor11Dark,g.graphColor13Dark,g.graphColor19Dark,g.graphColor29Dark,g.graphColor28Dark,g.graphColor20Dark,g.graphColor21Dark,g.graphColor22Dark,g.graphColor14Dark,g.graphColor35Dark,g.graphColor31Dark,g.graphColor33Dark,g.graphColor32Dark,g.graphColor36Dark,g.graphColor02Dark,g.graphColor06Dark,g.graphColor04Dark,g.graphColor10Dark,g.graphColor12Dark,g.graphColor15Dark,g.graphColor18Dark,g.graphColor17Dark,g.graphColor07Dark];class Y{_barColors;_barColorsKeyWise;_defaultColor;constructor(){this._defaultColor=g.graphColor34,this._barColors=Se.slice(),this._barColorsKeyWise=new Map}static#e=new Y;getBarColor(r){const t=Y.instance();return t._barColorsKeyWise.has(r)||(t._barColors.length===0&&(t._barColors=Se.slice()),t._barColorsKeyWise.set(r,t._barColors.shift()??t._defaultColor)),t._barColorsKeyWise.get(r)}shouldUpdate(r){const t=Y.instance(),n=Array.from(t._barColorsKeyWise.keys()).sort();return!Fe(n,r)}static init(){return this.#e=new Y,this.#e}static instance(){return this.#e}}const Ja=Y.instance(),er=(e,r,t)=>{const n=[],o={};let l,i=!1;if(t!=null&&t.accountGroups.length!=0?t.accountGroups.forEach(h=>{const s=I(h.accountGroupName,"actual",h),c=b(h.accountGroupName,"actual");o[c]=s,n.push(c),l==null&&s.length>0&&(l=b(h.accountGroupName,"actual"))}):t!=null&&t.accounts.length!=0&&(i=!0,t.accounts.forEach(h=>{const s=I(h.account.accountName,"actual",h.account.balancesInTimeframe),c=b(h.account.accountName,"actual");o[c]=s,n.push(c),l==null&&s.length>0&&(l=b(h.account.accountName,"actual"))})),t!=null&&t.accountGroups.length===0&&t.accounts.length===0){const h=S.getLocalizedStrings().chartCard.total,s=I(h,"actual",t);if(s.length!==0){const c=b(h,"actual");o[c]=s,l=c,n.push(c)}}return r==="forecast_mode"&&Object.assign(o,ar(n,t)),l!=null?Z(e,n,l,o,i):void 0},ar=(e,r)=>{const t={};let n;if(r!=null&&r.accountGroups.length!=0?r.accountGroups.forEach(o=>{const l=I(o.accountGroupName,"forecast",o),i=b(o.accountGroupName,"forecast");t[i]=l,e.push(i),n==null&&l.length>0&&(n=b(o.accountGroupName,"forecast"))}):r!=null&&r.accounts.length!=0&&r.accounts.forEach(o=>{const l=I(o.account.accountName,"forecast",o.account.balancesInTimeframe),i=b(o.account.accountName,"forecast");t[i]=l,e.push(i),n==null&&l.length>0&&(n=b(o.account.accountName,"forecast"))}),r!=null&&r.accountGroups.length===0&&r.accounts.length===0){const o=S.getLocalizedStrings().chartCard.total,l=I(o,"forecast",r);if(l.length!==0){const i=b(o,"forecast");t[i]=l,n=i,e.push(i)}}return t},rr=x.div`
195
+ `,Va=({active:e,payload:r,barName:t})=>{const n=[];if(r!=null&&e===!0){const o=r.filter(s=>s.name==t)[0],l=o.payload,i=o.color,h=t!=null&&l.record[t]!=null?l.record[t].amount:void 0;if(!t?.endsWith("_forecast")){let s;if(t.includes("forecast")!==!0){s=l.record[t]!=null?Ha(t,l):void 0;const c={amount:0,currencyCode:"",currencySymbol:""},f={amount:0,currencyCode:"",currencySymbol:""};let p;for(p in l.record){const C=l.record[p].amount;p.endsWith("_actual")?(c.amount+=l.record[p].amount?.amount??0,c.currencyCode=C!=null?C.currencyCode:c.currencyCode,c.currencySymbol=C!=null?C.currencySymbol:c.currencySymbol):p.endsWith("_forecast")&&(f.amount+=l.record[p].amount?.amount??0,f.currencyCode=C!=null?C.currencyCode:f.currencyCode,f.currencySymbol=C!=null?C.currencySymbol:f.currencySymbol)}const d=Math.floor((c?.amount-f?.amount)*100/100),y={...c,amount:d},_=f.amount!==0?Math.floor((c.amount-f.amount)/f.amount*100)/100:0,w={value:f,change:y,percent:_};n.push({barName:N(t),actual:h,forecast:s,color:i}),n.push({barName:S.getLocalizedStrings().chartCard.total,actual:c,forecast:w,color:g.neutralGrey1Light})}}}return n},Ha=(e,r)=>{const t=b(N(e),"forecast");if(r.record[t]==null)return;const n=r.record[e].amount,o=r.record[t].amount,l={...n,amount:o!=null?Math.floor((n.amount-o.amount)*100/100):n.amount},i=o!=null&&o.amount!==0?Math.floor((n.amount-o.amount)/o.amount*100)/100:void 0;return{value:o,change:l,percent:i}},Le=e=>a.jsxs(Ia,{color:e.color,children:[a.jsx(Fa,{children:`${e.barName}:`}),a.jsx(X,{children:e.actual!=null?`${T(e.actual)}`:"-"}),a.jsx(X,{children:e.forecast!=null?`${T(e.forecast.value)}`:"-"}),e.forecast!=null?a.jsx(X,{isChange:!0,children:`${T(e.forecast.change)}`}):a.jsx(X,{children:"-"}),e.forecast!=null?a.jsx(X,{isChange:!0,children:F("0,0.0%",e.forecast.percent)}):a.jsx(X,{children:"-"})]}),Ya=e=>{if(e.length>0){for(const r of e)if(r.actual!=null)return r.actual.currencySymbol}return""},qa=({barLabelsWithValues:e})=>a.jsx(Na,{children:a.jsxs(Ea,{children:[a.jsx(_e,{color:e[0].color,children:`${e[0].barName}: ${T(e[0].actual)}`}),a.jsx(Ge,{}),a.jsx(_e,{children:`${S.getLocalizedStrings().chartCard.total}: ${T(e[1].actual)}`})]})}),Xa=({barLabelsWithValues:e})=>a.jsxs(Ma,{children:[a.jsxs(Ka,{children:[a.jsx(Ga,{}),a.jsx(ue,{children:S.getLocalizedStrings().chartCard.tooltip.actual}),a.jsx(ue,{children:S.getLocalizedStrings().chartCard.tooltip.forecast}),a.jsxs(ue,{children:[S.getLocalizedStrings().chartCard.tooltip.change," ",Ya(e)]}),a.jsx(ue,{children:S.getLocalizedStrings().chartCard.tooltip.change_percent})]}),a.jsxs(Aa,{children:[Le(e[0]),a.jsx(Ge,{}),Le(e[1])]})]}),Ua=e=>{const r=Va({...e});return r.length===0?null:a.jsx(a.Fragment,{children:e.mode==="forecast_mode"?a.jsx(Xa,{barLabelsWithValues:r}):a.jsx(qa,{barLabelsWithValues:r})})},Qa=le.memo(Ua),Za=(e,r)=>{const t=[],n={};let o;return r!=null&&r.classes.length!=0&&r.classes.forEach(l=>{const i=I(l.class.className,"actual",l.childrenBalancesTotal),h=b(l.class.className,"actual");n[h]=i,t.push(h),o==null&&i.length>0&&(o=b(l.class.className,"actual"))}),o!=null?Q(e,t,o,n):void 0},Se=[g.graphColor34,g.graphColor05,g.graphColor08,g.graphColor11,g.graphColor13,g.graphColor19,g.graphColor29,g.graphColor28,g.graphColor20,g.graphColor21,g.graphColor22,g.graphColor14,g.graphColor35,g.graphColor31,g.graphColor33,g.graphColor32,g.graphColor36,g.graphColor02,g.graphColor06,g.graphColor04,g.graphColor10,g.graphColor12,g.graphColor15,g.graphColor18,g.graphColor17,g.graphColor07,g.graphColor34Dark,g.graphColor05Dark,g.graphColor08Dark,g.graphColor11Dark,g.graphColor13Dark,g.graphColor19Dark,g.graphColor29Dark,g.graphColor28Dark,g.graphColor20Dark,g.graphColor21Dark,g.graphColor22Dark,g.graphColor14Dark,g.graphColor35Dark,g.graphColor31Dark,g.graphColor33Dark,g.graphColor32Dark,g.graphColor36Dark,g.graphColor02Dark,g.graphColor06Dark,g.graphColor04Dark,g.graphColor10Dark,g.graphColor12Dark,g.graphColor15Dark,g.graphColor18Dark,g.graphColor17Dark,g.graphColor07Dark];class Y{_barColors;_barColorsKeyWise;_defaultColor;constructor(){this._defaultColor=g.graphColor34,this._barColors=Se.slice(),this._barColorsKeyWise=new Map}static#e=new Y;getBarColor(r){const t=Y.instance();return t._barColorsKeyWise.has(r)||(t._barColors.length===0&&(t._barColors=Se.slice()),t._barColorsKeyWise.set(r,t._barColors.shift()??t._defaultColor)),t._barColorsKeyWise.get(r)}shouldUpdate(r){const t=Y.instance(),n=Array.from(t._barColorsKeyWise.keys()).sort();return!Fe(n,r)}static init(){return this.#e=new Y,this.#e}static instance(){return this.#e}}const Ja=Y.instance(),er=(e,r,t)=>{const n=[],o={};let l,i=!1;if(t!=null&&t.accountGroups.length!=0?t.accountGroups.forEach(h=>{const s=I(h.accountGroupName,"actual",h),c=b(h.accountGroupName,"actual");o[c]=s,n.push(c),l==null&&s.length>0&&(l=b(h.accountGroupName,"actual"))}):t!=null&&t.accounts.length!=0&&(i=!0,t.accounts.forEach(h=>{const s=I(h.account.accountName,"actual",h.account.balancesInTimeframe),c=b(h.account.accountName,"actual");o[c]=s,n.push(c),l==null&&s.length>0&&(l=b(h.account.accountName,"actual"))})),t!=null&&t.accountGroups.length===0&&t.accounts.length===0){const h=S.getLocalizedStrings().chartCard.total,s=I(h,"actual",t);if(s.length!==0){const c=b(h,"actual");o[c]=s,l=c,n.push(c)}}return r==="forecast_mode"&&Object.assign(o,ar(n,t)),l!=null?Q(e,n,l,o,i):void 0},ar=(e,r)=>{const t={};let n;if(r!=null&&r.accountGroups.length!=0?r.accountGroups.forEach(o=>{const l=I(o.accountGroupName,"forecast",o),i=b(o.accountGroupName,"forecast");t[i]=l,e.push(i),n==null&&l.length>0&&(n=b(o.accountGroupName,"forecast"))}):r!=null&&r.accounts.length!=0&&r.accounts.forEach(o=>{const l=I(o.account.accountName,"forecast",o.account.balancesInTimeframe),i=b(o.account.accountName,"forecast");t[i]=l,e.push(i),n==null&&l.length>0&&(n=b(o.account.accountName,"forecast"))}),r!=null&&r.accountGroups.length===0&&r.accounts.length===0){const o=S.getLocalizedStrings().chartCard.total,l=I(o,"forecast",r);if(l.length!==0){const i=b(o,"forecast");t[i]=l,n=i,e.push(i)}}return t},rr=x.div`
196
196
  width: ${e=>e.width}px;
197
197
  height: ${e=>e.height}px;
198
- `,or=e=>{const{cx:r,cy:t,fill:n,stroke:o,value:l}=e;return l==null?a.jsx(a.Fragment,{}):a.jsx("circle",{cx:r,cy:t,r:4,stroke:n,strokeWidth:2,fill:o})},tr=e=>{const{cx:r,cy:t,fill:n,stroke:o,value:l}=e;return l==null?a.jsx(a.Fragment,{}):a.jsx("circle",{cx:r,cy:t,r:5,stroke:o,strokeWidth:2,fill:n})};function Wr({selectedRangeReport:e,timeframe:r,highlightedRange:t,width:n,height:o,showBarHoverBackground:l,isDetailPage:i,mode:h,onCOABalancesRangeChanged:s}){const c=P.useRef(!1),[f,p]=P.useState(Ja),[d,y]=P.useState(void 0),_=A(),w=P.useRef([]);P.useEffect(()=>{c.current=!0},[]),P.useEffect(()=>{f.shouldUpdate(w.current)===!0&&p(Y.init())},[]),P.useEffect(()=>{let k=[];if(e.reportId==="operating_expenses"){const v=e.sections.expenses;v.accountGroups.length===0&&v.accounts.length===0?k.push(S.getLocalizedStrings().chartCard.total):v.accountGroups.length!=0?k=v.accountGroups.map(O=>O.accountGroupName).sort():k=v.accounts.map(O=>O.account).map(O=>O.accountName).sort()}else k=e.sections.expenses.classes.map(v=>v.class.className).sort();w.current=k},[e,f]);const C=P.useMemo(()=>e.reportId==="operating_expenses"?er(e.firstMonthOfFY,h,e.sections.expenses):Qa(e.firstMonthOfFY,e.sections.expenses),[e,h]),L=P.useCallback(()=>{const k=u=>a.jsx(pe,{name:u,type:"monotone",legendType:"plainline",isAnimationActive:!1,dot:a.jsx(or,{}),activeDot:a.jsx(tr,{}),dataKey:j=>{const D=j.record;let B,z;for(z in D)if(z.endsWith("_forecast")){const G=D[z].amount;G!=null&&(B==null?B={...G}:B.amount+=G.amount)}return B?.amount},stroke:_.colors.grey1,strokeDasharray:"3 3",strokeWidth:1.5},u),v=(u,j)=>a.jsx(te,{name:u,animationDuration:j?500:void 0,style:{cursor:"pointer"},dataKey:D=>{const B=D.record;return(B[u]!=null&&B[u].amount!=null?B[u].amount:void 0)?.amount??0},stackId:"a",fill:f.getBarColor(N(u)),onMouseEnter:()=>{d!==u&&y(u)},onMouseLeave:()=>{d!=null&&y(void 0)}},u),O=[];return C?.orderedKeys.forEach(u=>{const j=!c.current;u.endsWith("_forecast")?O.push(k(u)):O.push(v(u,j))}),O},[C]),$=({active:k,payload:v})=>v?.find(O=>O.name===d)!=null&&d!=null&&k===!0?a.jsx(Za,{active:k,payload:v,mode:h,barName:d}):null;return C==null?null:a.jsx(lr,{chartData:C,timeframe:r,showBarHoverBackground:l,barElements:L(),customToolTipContent:a.jsx($,{}),width:n,height:o,onCOABalancesRangeChanged:s,highlightedRange:t,isDetailPage:i===!0})}const lr=({chartData:e,timeframe:r,barElements:t,customToolTipContent:n,highlightedRange:o,width:l,height:i,showBarHoverBackground:h,isDetailPage:s,onCOABalancesRangeChanged:c})=>{const f=A(),p=ne(e),d=e.timeseries,y=d.map(L=>L.label),_=h!==!1,w=L=>{if(!s||L?.activePayload==null||L?.activePayload.length===0)return;const $=L.activePayload[0];if($?.payload?.timeLabel?.label==null)return;const k=L.activeTooltipIndex,v=$.payload.timeLabel.label;if(o==null)return;const O=ce(v,y,o.numberOfPeriods),u=O[1]===void 0?y.length-1:y.indexOf(O[1]),j={...o,thisPeriod:{startDate:d[u].startDate,endDate:d[u].endDate}};c?.(d[k],r,j)},C=s?(l-60)/W.operating_expenses*(W.operating_expenses-e.recordByTimeseries.length):20;return a.jsx(rr,{width:l,height:i,children:a.jsx(Q,{children:({height:L,width:$})=>a.jsxs(me,{width:$,height:L,stackOffset:"sign",data:e.recordByTimeseries,barCategoryGap:"25%",maxBarSize:s?E[10]:30,margin:{top:5,right:C,left:0,bottom:5},style:{display:"flex",flex:"1 1 auto"},onClick:w,children:[a.jsx(J,{horizontal:!0,vertical:!1,strokeWidth:.5,stroke:f.colors.grey3}),a.jsx(ee,{dataKey:k=>k.timeLabel.label,type:"category",axisLine:{stroke:f.colors.grey3,strokeWidth:.5},tickLine:!1,tick:{color:f.colors.hero,...M.extraSmallRegular.cssObject}}),a.jsx(ae,{type:"number",axisLine:!1,tickLine:!1,tick:{color:f.colors.hero,...M.extraSmallRegular.cssObject},tickFormatter:k=>re("0,0.[00]a",k,p)}),a.jsx(oe,{wrapperStyle:{zIndex:2},cursor:_?{stroke:f.colors.background,strokeWidth:($-60)/W.operating_expenses,fill:f.colors.background}:!1,content:n,allowEscapeViewBox:{x:!1,y:!0}}),t]})})})},nr=x.div`
198
+ `,or=e=>{const{cx:r,cy:t,fill:n,stroke:o,value:l}=e;return l==null?a.jsx(a.Fragment,{}):a.jsx("circle",{cx:r,cy:t,r:4,stroke:n,strokeWidth:2,fill:o})},tr=e=>{const{cx:r,cy:t,fill:n,stroke:o,value:l}=e;return l==null?a.jsx(a.Fragment,{}):a.jsx("circle",{cx:r,cy:t,r:5,stroke:o,strokeWidth:2,fill:n})};function Wr({selectedRangeReport:e,timeframe:r,highlightedRange:t,width:n,height:o,showBarHoverBackground:l,isDetailPage:i,mode:h,onCOABalancesRangeChanged:s}){const c=P.useRef(!1),[f,p]=P.useState(Ja),[d,y]=P.useState(void 0),_=A(),w=P.useRef([]);P.useEffect(()=>{c.current=!0},[]),P.useEffect(()=>{f.shouldUpdate(w.current)===!0&&p(Y.init())},[]),P.useEffect(()=>{let k=[];if(e.reportId==="operating_expenses"){const v=e.sections.expenses;v.accountGroups.length===0&&v.accounts.length===0?k.push(S.getLocalizedStrings().chartCard.total):v.accountGroups.length!=0?k=v.accountGroups.map(O=>O.accountGroupName).sort():k=v.accounts.map(O=>O.account).map(O=>O.accountName).sort()}else k=e.sections.expenses.classes.map(v=>v.class.className).sort();w.current=k},[e,f]);const C=P.useMemo(()=>e.reportId==="operating_expenses"?er(e.firstMonthOfFY,h,e.sections.expenses):Za(e.firstMonthOfFY,e.sections.expenses),[e,h]),L=P.useCallback(()=>{const k=u=>a.jsx(pe,{name:u,type:"monotone",legendType:"plainline",isAnimationActive:!1,dot:a.jsx(or,{}),activeDot:a.jsx(tr,{}),dataKey:j=>{const D=j.record;let B,z;for(z in D)if(z.endsWith("_forecast")){const G=D[z].amount;G!=null&&(B==null?B={...G}:B.amount+=G.amount)}return B?.amount},stroke:_.colors.grey1,strokeDasharray:"3 3",strokeWidth:1.5},u),v=(u,j)=>a.jsx(te,{name:u,animationDuration:j?500:void 0,style:{cursor:"pointer"},dataKey:D=>{const B=D.record;return(B[u]!=null&&B[u].amount!=null?B[u].amount:void 0)?.amount??0},stackId:"a",fill:f.getBarColor(N(u)),onMouseEnter:()=>{d!==u&&y(u)},onMouseLeave:()=>{d!=null&&y(void 0)}},u),O=[];return C?.orderedKeys.forEach(u=>{const j=!c.current;u.endsWith("_forecast")?O.push(k(u)):O.push(v(u,j))}),O},[C]),$=({active:k,payload:v})=>v?.find(O=>O.name===d)!=null&&d!=null&&k===!0?a.jsx(Qa,{active:k,payload:v,mode:h,barName:d}):null;return C==null?null:a.jsx(lr,{chartData:C,timeframe:r,showBarHoverBackground:l,barElements:L(),customToolTipContent:a.jsx($,{}),width:n,height:o,onCOABalancesRangeChanged:s,highlightedRange:t,isDetailPage:i===!0})}const lr=({chartData:e,timeframe:r,barElements:t,customToolTipContent:n,highlightedRange:o,width:l,height:i,showBarHoverBackground:h,isDetailPage:s,onCOABalancesRangeChanged:c})=>{const f=A(),p=ne(e),d=e.timeseries,y=d.map(L=>L.label),_=h!==!1,w=L=>{if(!s||L?.activePayload==null||L?.activePayload.length===0)return;const $=L.activePayload[0];if($?.payload?.timeLabel?.label==null)return;const k=L.activeTooltipIndex,v=$.payload.timeLabel.label;if(o==null)return;const O=ce(v,y,o.numberOfPeriods),u=O[1]===void 0?y.length-1:y.indexOf(O[1]),j={...o,thisPeriod:{startDate:d[u].startDate,endDate:d[u].endDate}};c?.(d[k],r,j)},C=s?(l-60)/W.operating_expenses*(W.operating_expenses-e.recordByTimeseries.length):20;return a.jsx(rr,{width:l,height:i,children:a.jsx(Z,{children:({height:L,width:$})=>a.jsxs(me,{width:$,height:L,stackOffset:"sign",data:e.recordByTimeseries,barCategoryGap:"25%",maxBarSize:s?E[10]:30,margin:{top:5,right:C,left:0,bottom:5},style:{display:"flex",flex:"1 1 auto"},onClick:w,children:[a.jsx(J,{horizontal:!0,vertical:!1,strokeWidth:.5,stroke:f.colors.grey3}),a.jsx(ee,{dataKey:k=>k.timeLabel.label,type:"category",axisLine:{stroke:f.colors.grey3,strokeWidth:.5},tickLine:!1,tick:{color:f.colors.hero,...M.extraSmallRegular.cssObject}}),a.jsx(ae,{type:"number",axisLine:!1,tickLine:!1,tick:{color:f.colors.hero,...M.extraSmallRegular.cssObject},tickFormatter:k=>re("0,0.[00]a",k,p)}),a.jsx(oe,{wrapperStyle:{zIndex:2},cursor:_?{stroke:f.colors.background,strokeWidth:($-60)/W.operating_expenses,fill:f.colors.background}:!1,content:n,allowEscapeViewBox:{x:!1,y:!0}}),t]})})})},nr=x.div`
199
199
  display: flex;
200
200
  `,cr=x.div`
201
201
  display: flex;
@@ -263,7 +263,7 @@ import{u as A,j as a,M as S,X as de,_ as Ae,aj as Q,b5 as Te,q as E,b6 as J,av a
263
263
  `,Be=x(V)`
264
264
  display: flex;
265
265
  flex-direction: column;
266
- `,Oe=x(V)``,mr=(e,r)=>{const t=b(N(e),"forecast");if(r.record[t]==null)return;const n=r.record[e].amount,o=r.record[t].amount,l={...n,amount:Math.floor((n.amount-o.amount)*100/100)},i=o.amount!==0?Math.floor((n.amount-o.amount)/o.amount*100)/100:void 0;return{value:o,change:l,percent:i,forecastPercent:r.record[t].percentValue}},fr=({active:e,payload:r,mode:t})=>{const n=[];let o={amount:0,currencyCode:""},l={amount:0,currencyCode:""};const i=b("gross_margin","actual");return r?.forEach(h=>{const s=h.name;if(e===!0){const c=h.payload,f=h.color,p=s!=null&&c.record[s]!=null?c.record[s].amount:void 0;let d;if(s.includes("forecast")!==!0)switch(t==="forecast_mode"&&(d=c.record[s]!=null?mr(s,c):void 0),s){case i:p!=null&&(o.currencyCode===""?o={...p}:o.amount=o.amount+p.amount),d!=null&&(l.currencyCode===""?l={...d.value}:l.amount=l.amount+d.value.amount),n.push({barName:S.getLocalizedStrings().chartCard.revenue[N(s)],actual:p,forecast:d,percent:c.record[s]!=null?c.record[s].percentValue??0:0,color:f});break;default:n.push({barName:S.getLocalizedStrings().chartCard.revenue[N(s)],actual:p,color:f,forecast:d});break}}}),n},ze=e=>e.map((r,t)=>a.jsxs(Me,{color:r.color,showPercent:r.percent!=null,children:[a.jsxs(gr,{children:[a.jsx(Ke,{color:r.color}),`${r.barName}:`]}),a.jsxs(pr,{children:[a.jsx(De,{children:`${T(r.actual)}`}),r.percent!=null?a.jsx(De,{children:F("0,0.0%",r.percent)}):null]})]},r.barName+t)),Pe=e=>e.map((r,t)=>a.jsxs(Me,{color:r.color,showPercent:r.percent!=null,children:[a.jsxs(hr,{children:[a.jsx(Ke,{color:r.color}),`${r.barName}:`]}),a.jsx(U,{children:a.jsxs(Be,{children:[r.actual!=null?`${T(r.actual)}`:"-",a.jsx(Oe,{children:r.percent!=null?F("0,0.0%",r.percent):null})]})}),a.jsx(U,{children:a.jsxs(Be,{children:[r.forecast!=null?`${T(r.forecast.value)}`:"-",a.jsx(Oe,{children:r.forecast!=null&&r.forecast.forecastPercent!=null?F("0,0.0%",r.forecast.forecastPercent):null})]})}),r.forecast!=null?a.jsx(U,{isChange:!0,children:`${T(r.forecast.change)}`}):a.jsx(U,{children:"-"}),r.forecast!=null?a.jsx(U,{isChange:!0,children:F("0,0.0%",r.forecast.percent)}):a.jsx(U,{children:"-"})]},r.barName+t)),xr=e=>{if(e.length>0){for(const r of e)if(r.actual!=null)return r.actual.currencySymbol}return""},br=({barLabelsWithValues:e})=>a.jsxs(cr,{children:[a.jsxs(sr,{children:[a.jsx(ir,{}),a.jsx(he,{children:S.getLocalizedStrings().chartCard.tooltip.actual}),a.jsx(he,{children:S.getLocalizedStrings().chartCard.tooltip.forecast}),a.jsxs(he,{children:[S.getLocalizedStrings().chartCard.tooltip.change," ",xr(e)]}),a.jsx(he,{children:S.getLocalizedStrings().chartCard.tooltip.change_percent})]}),a.jsxs(ur,{children:[Pe(e.slice(0,e.length-1)),e.length?a.jsx(Ie,{}):null,Pe(e.slice(-1))]})]}),yr=({barLabelsWithValues:e})=>a.jsx(nr,{children:a.jsxs(dr,{children:[ze(e.slice(0,e.length-1)),e.length?a.jsx(Ie,{}):null,ze(e.slice(-1))]})}),Cr=e=>{const r=fr({...e});return r.length===0?null:a.jsx(a.Fragment,{children:e.mode==="forecast_mode"?a.jsx(br,{barLabelsWithValues:r}):a.jsx(yr,{barLabelsWithValues:r})})},jr=le.memo(Cr),Re=(e,r,t,n,o,l)=>{let i=[],h=[],s=[];n!=null&&n.balances.length>0&&(i=K("income","actual",n)),o!=null&&o.balances.length>0&&(h=K("cogs","actual",o)),l!=null&&l.balances.length>0&&(s=se("gross_margin","actual",l));const c=b("income","actual"),f=b("cogs","actual"),p=b("gross_margin","actual"),d=i.length>0?c:h.length>0?f:p,y={};return y[c]=i,y[f]=h,y[p]=s,t==="forecast_mode"&&Object.assign(y,vr(n,o,l)),d!=null?Z(e,r,d,y):void 0},vr=(e,r,t)=>{let n=[],o=[],l=[];e!=null&&e.balances.length>0&&(n=K("income","forecast",e)),r!=null&&r.balances.length>0&&(o=K("cogs","forecast",r)),t!=null&&t.balances.length>0&&(l=se("gross_margin","forecast",t));const i=b("income","forecast"),h=b("cogs","forecast"),s=b("gross_margin","forecast"),c={};return c[i]=n,c[h]=o,c[s]=l,c},kr=[b("income","actual"),b("cogs","actual"),b("gross_margin","actual")],$r=[b("income","actual"),b("cogs","actual"),b("gross_margin","actual"),b("income","forecast"),b("cogs","forecast"),b("gross_margin","forecast")],wr=x.div`
266
+ `,Oe=x(V)``,mr=(e,r)=>{const t=b(N(e),"forecast");if(r.record[t]==null)return;const n=r.record[e].amount,o=r.record[t].amount,l={...n,amount:Math.floor((n.amount-o.amount)*100/100)},i=o.amount!==0?Math.floor((n.amount-o.amount)/o.amount*100)/100:void 0;return{value:o,change:l,percent:i,forecastPercent:r.record[t].percentValue}},fr=({active:e,payload:r,mode:t})=>{const n=[];let o={amount:0,currencyCode:""},l={amount:0,currencyCode:""};const i=b("gross_margin","actual");return r?.forEach(h=>{const s=h.name;if(e===!0){const c=h.payload,f=h.color,p=s!=null&&c.record[s]!=null?c.record[s].amount:void 0;let d;if(s.includes("forecast")!==!0)switch(t==="forecast_mode"&&(d=c.record[s]!=null?mr(s,c):void 0),s){case i:p!=null&&(o.currencyCode===""?o={...p}:o.amount=o.amount+p.amount),d!=null&&(l.currencyCode===""?l={...d.value}:l.amount=l.amount+d.value.amount),n.push({barName:S.getLocalizedStrings().chartCard.revenue[N(s)],actual:p,forecast:d,percent:c.record[s]!=null?c.record[s].percentValue??0:0,color:f});break;default:n.push({barName:S.getLocalizedStrings().chartCard.revenue[N(s)],actual:p,color:f,forecast:d});break}}}),n},ze=e=>e.map((r,t)=>a.jsxs(Me,{color:r.color,showPercent:r.percent!=null,children:[a.jsxs(gr,{children:[a.jsx(Ke,{color:r.color}),`${r.barName}:`]}),a.jsxs(pr,{children:[a.jsx(De,{children:`${T(r.actual)}`}),r.percent!=null?a.jsx(De,{children:F("0,0.0%",r.percent)}):null]})]},r.barName+t)),Pe=e=>e.map((r,t)=>a.jsxs(Me,{color:r.color,showPercent:r.percent!=null,children:[a.jsxs(hr,{children:[a.jsx(Ke,{color:r.color}),`${r.barName}:`]}),a.jsx(U,{children:a.jsxs(Be,{children:[r.actual!=null?`${T(r.actual)}`:"-",a.jsx(Oe,{children:r.percent!=null?F("0,0.0%",r.percent):null})]})}),a.jsx(U,{children:a.jsxs(Be,{children:[r.forecast!=null?`${T(r.forecast.value)}`:"-",a.jsx(Oe,{children:r.forecast!=null&&r.forecast.forecastPercent!=null?F("0,0.0%",r.forecast.forecastPercent):null})]})}),r.forecast!=null?a.jsx(U,{isChange:!0,children:`${T(r.forecast.change)}`}):a.jsx(U,{children:"-"}),r.forecast!=null?a.jsx(U,{isChange:!0,children:F("0,0.0%",r.forecast.percent)}):a.jsx(U,{children:"-"})]},r.barName+t)),xr=e=>{if(e.length>0){for(const r of e)if(r.actual!=null)return r.actual.currencySymbol}return""},br=({barLabelsWithValues:e})=>a.jsxs(cr,{children:[a.jsxs(sr,{children:[a.jsx(ir,{}),a.jsx(he,{children:S.getLocalizedStrings().chartCard.tooltip.actual}),a.jsx(he,{children:S.getLocalizedStrings().chartCard.tooltip.forecast}),a.jsxs(he,{children:[S.getLocalizedStrings().chartCard.tooltip.change," ",xr(e)]}),a.jsx(he,{children:S.getLocalizedStrings().chartCard.tooltip.change_percent})]}),a.jsxs(ur,{children:[Pe(e.slice(0,e.length-1)),e.length?a.jsx(Ie,{}):null,Pe(e.slice(-1))]})]}),yr=({barLabelsWithValues:e})=>a.jsx(nr,{children:a.jsxs(dr,{children:[ze(e.slice(0,e.length-1)),e.length?a.jsx(Ie,{}):null,ze(e.slice(-1))]})}),Cr=e=>{const r=fr({...e});return r.length===0?null:a.jsx(a.Fragment,{children:e.mode==="forecast_mode"?a.jsx(br,{barLabelsWithValues:r}):a.jsx(yr,{barLabelsWithValues:r})})},jr=le.memo(Cr),Re=(e,r,t,n,o,l)=>{let i=[],h=[],s=[];n!=null&&n.balances.length>0&&(i=K("income","actual",n)),o!=null&&o.balances.length>0&&(h=K("cogs","actual",o)),l!=null&&l.balances.length>0&&(s=se("gross_margin","actual",l));const c=b("income","actual"),f=b("cogs","actual"),p=b("gross_margin","actual"),d=i.length>0?c:h.length>0?f:p,y={};return y[c]=i,y[f]=h,y[p]=s,t==="forecast_mode"&&Object.assign(y,vr(n,o,l)),d!=null?Q(e,r,d,y):void 0},vr=(e,r,t)=>{let n=[],o=[],l=[];e!=null&&e.balances.length>0&&(n=K("income","forecast",e)),r!=null&&r.balances.length>0&&(o=K("cogs","forecast",r)),t!=null&&t.balances.length>0&&(l=se("gross_margin","forecast",t));const i=b("income","forecast"),h=b("cogs","forecast"),s=b("gross_margin","forecast"),c={};return c[i]=n,c[h]=o,c[s]=l,c},kr=[b("income","actual"),b("cogs","actual"),b("gross_margin","actual")],$r=[b("income","actual"),b("cogs","actual"),b("gross_margin","actual"),b("income","forecast"),b("cogs","forecast"),b("gross_margin","forecast")],wr=x.div`
267
267
  width: ${e=>e.width}px;
268
268
  height: ${e=>e.height}px;
269
269
 
@@ -277,4 +277,4 @@ import{u as A,j as a,M as S,X as de,_ as Ae,aj as Q,b5 as Te,q as E,b6 as J,av a
277
277
  margin-left: ${e=>q.legendLabelMarginLeft.valuePx(e.windowSize)};
278
278
  margin-right: ${e=>q.legendLabelMarginRight.valuePx(e.windowSize)};
279
279
  color: ${e=>e.theme.colors.primary};
280
- `;function Nr({selectedRangeReport:e,timeframe:r,highlightedRange:t,width:n,height:o,showBarHoverBackground:l,isDetailPage:i,mode:h,onCOABalancesRangeChanged:s}){const c=A(),f=P.useRef(!1);P.useEffect(()=>{f.current=!0},[]);const p=[c.colors.graphColor26,c.colors.graphColor17,c.colors.graphColor12],d=[c.colors.graphColor28,c.colors.graphColor17,c.colors.graphColor10,c.colors.graphColor28Dark,c.colors.graphColor17Dark,c.colors.graphColor10Dark],y=h==="forecast_mode"?d:p,_=h==="forecast_mode"?$r:kr,w=(u,j=c.colors.graphColor28)=>u<y.length?y[u]:j,C=e.reportId==="revenue"?Re(e.firstMonthOfFY,_,h,e.sections?.income,e.sections?.cogs,e.calculatedSections?.grossMargin):Re(e.firstMonthOfFY,_,h,e.sections.income,e.sections.cogs,e.calculatedSections.grossMargin),L=u=>{const{cx:j,cy:D,fill:B,stroke:z,value:G}=u;return G==null?a.jsx(a.Fragment,{}):a.jsx("circle",{cx:j,cy:D,r:4,stroke:B,strokeWidth:2,fill:z})},$=u=>{const{cx:j,cy:D,fill:B,stroke:z,value:G}=u;return G==null?a.jsx(a.Fragment,{}):a.jsx("circle",{cx:j,cy:D,r:5,stroke:z,strokeWidth:2,fill:B})},k=(u,j)=>a.jsx(pe,{name:u,type:"monotone",legendType:"plainline",isAnimationActive:!1,dot:a.jsx(L,{}),activeDot:a.jsx($,{}),dataKey:D=>{const B=D.record;return(B[u]!=null&&B[u].amount!=null?B[u].amount:void 0)?.amount},stroke:w(j),strokeDasharray:"3 3",strokeWidth:1.5},u),v=(u,j,D)=>a.jsx(te,{name:u,animationDuration:D?500:void 0,style:{cursor:"pointer"},legendType:"square",dataKey:B=>{const z=B.record;return(z[u]!=null&&z[u].amount!=null?z[u].amount:void 0)?.amount??0},fill:w(j)},u),O=()=>{const u=[];return _.forEach((j,D)=>{const B=i===!0&&!f.current;j.endsWith("_forecast")?u.push(k(j,D)):u.push(v(j,D,B))}),u};return C==null?null:a.jsx(Lr,{chartData:C,timeframe:r,showBarHoverBackground:l,barElements:O(),customToolTipContent:({active:u,payload:j})=>a.jsx(jr,{active:u,payload:j,mode:h}),width:n,height:o,onCOABalancesRangeChanged:s,highlightedRange:t,isDetailPage:i===!0})}const Lr=({chartData:e,timeframe:r,barElements:t,customToolTipContent:n,highlightedRange:o,width:l,height:i,showBarHoverBackground:h,isDetailPage:s,onCOABalancesRangeChanged:c})=>{const f=de(),p=A(),d=ne(e),y=e.timeseries,_=y.map($=>$.label),w=h!==!1,C=$=>{if(!s||$?.activePayload==null||$?.activePayload.length===0)return;const k=$.activePayload[0];if(k?.payload?.timeLabel?.label==null)return;const v=$.activeTooltipIndex,O=k.payload.timeLabel.label;if(o==null)return;const u=ce(O,_,o.numberOfPeriods),j=u[1]===void 0?_.length-1:_.indexOf(u[1]),D={...o,thisPeriod:{startDate:y[j].startDate,endDate:y[j].endDate}};c?.(y[v],r,D)},L=s?(l-60)/W.revenue*(W.revenue-e.recordByTimeseries.length):20;return a.jsx(wr,{width:l,height:i,windowSize:f,children:a.jsx(Q,{children:({height:$,width:k})=>a.jsxs(me,{data:e.recordByTimeseries,barCategoryGap:s?void 0:"12%",maxBarSize:s?E[10]:22,barGap:s?void 0:2,margin:{top:5,right:L,left:0,bottom:E[4]},height:$,width:k,style:{display:"flex",flex:"1 1 auto"},onClick:C,children:[a.jsx(J,{horizontal:!0,vertical:!1,strokeWidth:.5,stroke:p.colors.grey3}),a.jsx(ee,{dataKey:v=>v.timeLabel.label,type:"category",axisLine:{stroke:p.colors.grey3,strokeWidth:.5},tickLine:!1,tick:{color:p.colors.hero,...M.extraSmallRegular.cssObject}}),a.jsx(ae,{type:"number",axisLine:!1,tickLine:!1,tick:{color:p.colors.hero,...M.extraSmallRegular.cssObject},tickFormatter:v=>re("0,0.[00]a",v,d)}),a.jsx(oe,{wrapperStyle:{zIndex:2},cursor:w?{stroke:p.colors.background,strokeWidth:(k-60)/W.revenue,fill:p.colors.background}:!1,content:n,allowEscapeViewBox:{x:!1,y:!0}}),t,s?a.jsx(ge,{verticalAlign:"bottom",wrapperStyle:{width:"100%",display:"flex",justifyContent:"center",left:"initial",bottom:m.sp0},iconSize:E[3],formatter:v=>a.jsx(_r,{windowSize:f,children:v.endsWith("_forecast")===!0?S.getLocalizedStrings().chartCard.revenue[v]:S.getLocalizedStrings().chartCard.revenue[N(v)]})}):null]})})})};export{Rr as G,Wr as H,Pr as N,Tr as P,Nr as Y};
280
+ `;function Nr({selectedRangeReport:e,timeframe:r,highlightedRange:t,width:n,height:o,showBarHoverBackground:l,isDetailPage:i,mode:h,onCOABalancesRangeChanged:s}){const c=A(),f=P.useRef(!1);P.useEffect(()=>{f.current=!0},[]);const p=[c.colors.graphColor26,c.colors.graphColor17,c.colors.graphColor12],d=[c.colors.graphColor28,c.colors.graphColor17,c.colors.graphColor10,c.colors.graphColor28Dark,c.colors.graphColor17Dark,c.colors.graphColor10Dark],y=h==="forecast_mode"?d:p,_=h==="forecast_mode"?$r:kr,w=(u,j=c.colors.graphColor28)=>u<y.length?y[u]:j,C=e.reportId==="revenue"?Re(e.firstMonthOfFY,_,h,e.sections?.income,e.sections?.cogs,e.calculatedSections?.grossMargin):Re(e.firstMonthOfFY,_,h,e.sections.income,e.sections.cogs,e.calculatedSections.grossMargin),L=u=>{const{cx:j,cy:D,fill:B,stroke:z,value:G}=u;return G==null?a.jsx(a.Fragment,{}):a.jsx("circle",{cx:j,cy:D,r:4,stroke:B,strokeWidth:2,fill:z})},$=u=>{const{cx:j,cy:D,fill:B,stroke:z,value:G}=u;return G==null?a.jsx(a.Fragment,{}):a.jsx("circle",{cx:j,cy:D,r:5,stroke:z,strokeWidth:2,fill:B})},k=(u,j)=>a.jsx(pe,{name:u,type:"monotone",legendType:"plainline",isAnimationActive:!1,dot:a.jsx(L,{}),activeDot:a.jsx($,{}),dataKey:D=>{const B=D.record;return(B[u]!=null&&B[u].amount!=null?B[u].amount:void 0)?.amount},stroke:w(j),strokeDasharray:"3 3",strokeWidth:1.5},u),v=(u,j,D)=>a.jsx(te,{name:u,animationDuration:D?500:void 0,style:{cursor:"pointer"},legendType:"square",dataKey:B=>{const z=B.record;return(z[u]!=null&&z[u].amount!=null?z[u].amount:void 0)?.amount??0},fill:w(j)},u),O=()=>{const u=[];return _.forEach((j,D)=>{const B=i===!0&&!f.current;j.endsWith("_forecast")?u.push(k(j,D)):u.push(v(j,D,B))}),u};return C==null?null:a.jsx(Lr,{chartData:C,timeframe:r,showBarHoverBackground:l,barElements:O(),customToolTipContent:({active:u,payload:j})=>a.jsx(jr,{active:u,payload:j,mode:h}),width:n,height:o,onCOABalancesRangeChanged:s,highlightedRange:t,isDetailPage:i===!0})}const Lr=({chartData:e,timeframe:r,barElements:t,customToolTipContent:n,highlightedRange:o,width:l,height:i,showBarHoverBackground:h,isDetailPage:s,onCOABalancesRangeChanged:c})=>{const f=de(),p=A(),d=ne(e),y=e.timeseries,_=y.map($=>$.label),w=h!==!1,C=$=>{if(!s||$?.activePayload==null||$?.activePayload.length===0)return;const k=$.activePayload[0];if(k?.payload?.timeLabel?.label==null)return;const v=$.activeTooltipIndex,O=k.payload.timeLabel.label;if(o==null)return;const u=ce(O,_,o.numberOfPeriods),j=u[1]===void 0?_.length-1:_.indexOf(u[1]),D={...o,thisPeriod:{startDate:y[j].startDate,endDate:y[j].endDate}};c?.(y[v],r,D)},L=s?(l-60)/W.revenue*(W.revenue-e.recordByTimeseries.length):20;return a.jsx(wr,{width:l,height:i,windowSize:f,children:a.jsx(Z,{children:({height:$,width:k})=>a.jsxs(me,{data:e.recordByTimeseries,barCategoryGap:s?void 0:"12%",maxBarSize:s?E[10]:22,barGap:s?void 0:2,margin:{top:5,right:L,left:0,bottom:E[4]},height:$,width:k,style:{display:"flex",flex:"1 1 auto"},onClick:C,children:[a.jsx(J,{horizontal:!0,vertical:!1,strokeWidth:.5,stroke:p.colors.grey3}),a.jsx(ee,{dataKey:v=>v.timeLabel.label,type:"category",axisLine:{stroke:p.colors.grey3,strokeWidth:.5},tickLine:!1,tick:{color:p.colors.hero,...M.extraSmallRegular.cssObject}}),a.jsx(ae,{type:"number",axisLine:!1,tickLine:!1,tick:{color:p.colors.hero,...M.extraSmallRegular.cssObject},tickFormatter:v=>re("0,0.[00]a",v,d)}),a.jsx(oe,{wrapperStyle:{zIndex:2},cursor:w?{stroke:p.colors.background,strokeWidth:(k-60)/W.revenue,fill:p.colors.background}:!1,content:n,allowEscapeViewBox:{x:!1,y:!0}}),t,s?a.jsx(ge,{verticalAlign:"bottom",wrapperStyle:{width:"100%",display:"flex",justifyContent:"center",left:"initial",bottom:m.sp0},iconSize:E[3],formatter:v=>a.jsx(_r,{windowSize:f,children:v.endsWith("_forecast")===!0?S.getLocalizedStrings().chartCard.revenue[v]:S.getLocalizedStrings().chartCard.revenue[N(v)]})}):null]})})})};export{Rr as G,Wr as H,Pr as N,Tr as P,Nr as Y};