@zeniai/web-cockpit-ui 1.14.6-qa → 1.14.7-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 (231) hide show
  1. package/dist/assets/{ACHDetailsPage-DgGGv2hx-DhGqxCnw.js → ACHDetailsPage-CYMIIaPh-C8Zl6MLV.js} +3 -3
  2. package/dist/assets/{AIPerformancePage-cpZUms56-qBalK6QF.js → AIPerformancePage-DpQIi2ZW-BO0NE_2F.js} +35 -35
  3. package/dist/assets/{AccountInfoPage-CFLaCiT5-DqoBEOc-.js → AccountInfoPage-Sh-82JXU-CKtI4bnL.js} +5 -5
  4. package/dist/assets/{AccountInfoPageContent-DtAZ50Qc-BeekofSV.js → AccountInfoPageContent-CsHvwqHd-BlW8CgcU.js} +13 -13
  5. package/dist/assets/{AccountReconDetailsDrawerPage-CMN1zNHW-CL-ockWE.js → AccountReconDetailsDrawerPage-DlKlKwh2-DpdK7fsT.js} +16 -16
  6. package/dist/assets/{AccountRow-DAc1wwY9-C0HqOA9-.js → AccountRow-CtIoeB6x-B01gigKX.js} +17 -17
  7. package/dist/assets/{AccountsPromoCardStack-Bp1wRT6M-CYo6jPNU.js → AccountsPromoCardStack-XGoMEJWB-ClZD8Pkf.js} +15 -15
  8. package/dist/assets/{AddAddressForCardDrawer-ChDzvTVq-GLR6_t5g.js → AddAddressForCardDrawer-C6Sfh784-BO6CLNaD.js} +2 -2
  9. package/dist/assets/{AddToWalletPage-BvrcjDhk-NkMR8hRQ.js → AddToWalletPage-CzD2AhWP-GEi12jel.js} +13 -13
  10. package/dist/assets/{AgingReportsPage-CzYUWOIt-CJFG9hw0.js → AgingReportsPage-D9YcQ7A--jEVrKNWY.js} +7 -7
  11. package/dist/assets/{AllUserItems-XxV2Tu4Y-sbn-nokE.js → AllUserItems-BtS-YtE0-oBJempiY.js} +7 -7
  12. package/dist/assets/{ApAgingDetailPage-DTXhjXRb-tDKmCLbA.js → ApAgingDetailPage-BTJqRp9j-CVJ5DZ9g.js} +4 -4
  13. package/dist/assets/{AppBasePage-Cfiv8Ecs-UJWdcIkl.js → AppBasePage-B5fgkJHL-nKspGTEB.js} +4 -4
  14. package/dist/assets/{AppDrawerContent-ggBgpYsv-BhuQV-gE.js → AppDrawerContent-C1lzepXw-Dt703jdK.js} +6 -6
  15. package/dist/assets/{ApprovalRulesSettingsPage-BlRSdCTV-LrZASIni.js → ApprovalRulesSettingsPage-Bqt15rR_-CJ2-js2Y.js} +7 -7
  16. package/dist/assets/{ArAgingChart-C7_e1ezL-Cfi6j3Jg.js → ArAgingChart-BGVvhkR5-CfmO25FB.js} +6 -6
  17. package/dist/assets/{ArAgingDetailPage-DhjFbj4K-sRIzddV0.js → ArAgingDetailPage-Ddp7z3e8-BWaOoITE.js} +2 -2
  18. package/dist/assets/{AttachmentView-CQD-yy-o-1NVaWP30.js → AttachmentView-pcpYs-s8-D808dzO5.js} +5 -5
  19. package/dist/assets/{BankAccountSection-CmOHWLFq-vSt2i69h.js → BankAccountSection-CmXQQBck-BXf6w0tF.js} +4 -4
  20. package/dist/assets/{BankAccountWarningSection-DsBsO84p-Br5XLEf9.js → BankAccountWarningSection-Dp7qMaI2-DCN96rsg.js} +5 -5
  21. package/dist/assets/{BankConnectionsSettingsPage-Cz6smhXo-Cdgop5x9.js → BankConnectionsSettingsPage-ldzD1a4O-CXgyrIw4.js} +38 -38
  22. package/dist/assets/{BillDetailPage-CYa0EITJ-0aSYVKGp.js → BillDetailPage-CBubcYMe-BO_dFsg-.js} +11 -11
  23. package/dist/assets/{BillPayApprovalRuleDetailPage-BbU_Q81T-BVCvUvRL.js → BillPayApprovalRuleDetailPage-BxiRr1tP-COYx8jcO.js} +1 -1
  24. package/dist/assets/{BillPayApprovalRulesPage-D8ehXeiO-I0Ym-A1W.js → BillPayApprovalRulesPage-CLBGuxUe-fnAlfa5X.js} +8 -8
  25. package/dist/assets/{BillPayPromoPage-DuaA85G4-CW37fYt2.js → BillPayPromoPage-C3takK8D-DwgwIjWq.js} +1 -1
  26. package/dist/assets/{BillPaySetUpPage-BH06l9Hv-BQ5XuNfG.js → BillPaySetUpPage-CweOkcc2-D46-_5BW.js} +2 -2
  27. package/dist/assets/{BillingSettingsPage-BUas93LA-Bw3kXQzV.js → BillingSettingsPage-BQSZ6DMP-DRARmVD3.js} +7 -7
  28. package/dist/assets/{BillsBulkReviewDrawerPage-D6cSAH1--Dypef8h4.js → BillsBulkReviewDrawerPage-3trPH78u-CF22gH7n.js} +1 -1
  29. package/dist/assets/{BoxItem-D88gMTQn-D46Yo25S.js → BoxItem-Bf7JemSM-D8tvXCvN.js} +1 -1
  30. package/dist/assets/{BusinessVerificationPage-rX7_wUAW-C4OzNGUb.js → BusinessVerificationPage-DXODyk9C-B5e28vsE.js} +8 -8
  31. package/dist/assets/{CardNumberSubText-CxTVkF4V-iWi8Ysv4.js → CardNumberSubText-ByVXSDZX-CD-Gw7wf.js} +1 -1
  32. package/dist/assets/{CashbackDetailPage-DdDMDW2I-DEFkWzKF.js → CashbackDetailPage-9RLOXq5b-DSEoSjiZ.js} +23 -23
  33. package/dist/assets/{ChargeCardDetailPage-JrO7h-ff-CM_N7uQT.js → ChargeCardDetailPage-lkNsxEdO-e-8D7tkI.js} +1 -1
  34. package/dist/assets/{ChargeCardListPage-CelWKqSg-Dhoo911d.js → ChargeCardListPage-DV25pQMP-BgesY_b4.js} +1 -1
  35. package/dist/assets/{ChargeCardListTable-B4c4WFSq-DJFUY7lB.js → ChargeCardListTable-CSWl05jK-CRlk7PbR.js} +25 -25
  36. package/dist/assets/ChargeCardPromoPage-Cv34m9BS-BmZiFW4y.js +219 -0
  37. package/dist/assets/{ChargeCardSetupPage-PQAwr78u-msQYLFMS.js → ChargeCardSetupPage-7mEdImT--BWhFbFIQ.js} +1 -1
  38. package/dist/assets/{ChargeCardStatementsPage-DVPKN4xX-BDfS62On.js → ChargeCardStatementsPage-D_rKdZ5c-DUDd82r_.js} +3 -3
  39. package/dist/assets/{ChargeCardUtils-BQZTS-KQ-DN5emI4w.js → ChargeCardUtils-BB7l65Bf-DfL6sW6K.js} +1 -1
  40. package/dist/assets/{ChaseOverlay-DveM_aY_-SrUhZ-KA.js → ChaseOverlay-hsrWeA5X-B3bQwtbG.js} +5 -5
  41. package/dist/assets/{CheckDepositDrawerPage-DoMhVKPu-BWBUN8tI.js → CheckDepositDrawerPage-CZNH4rCm-CxSsvi_m.js} +19 -19
  42. package/dist/assets/{CollapsableReportTable-CWIVhYku-DzNE0ECl.js → CollapsableReportTable-C73RBmaZ-A1Br721z.js} +46 -46
  43. package/dist/assets/{CompanyOfficerDetailsSection-Ci47swN_-GWpqyiJH.js → CompanyOfficerDetailsSection-CZWTSWyp-BOVUWJjT.js} +34 -34
  44. package/dist/assets/{CompanyPassportCard-Bw2TdWs0-BiZohcbB.js → CompanyPassportCard-D-hYeDRN-Bo9rwkQb.js} +3 -3
  45. package/dist/assets/{CompanyPassportPage-CKIihOM0-D1cXLT0P.js → CompanyPassportPage-fQ60DR7u-DD7YvAPU.js} +12 -12
  46. package/dist/assets/CompleteProfile-DnBzaAdT-JcsdBGpZ.js +52 -0
  47. package/dist/assets/{ConfettiBurst-CU6fcwCz-CJlWrE_E.js → ConfettiBurst-D5XTvsuG-Dl2X4lye.js} +1 -1
  48. package/dist/assets/{CreateOrEditVendorPage-BoDt1Ez7-DgN-5P6-.js → CreateOrEditVendorPage-7KdDJirx--0K-JjCB.js} +10 -10
  49. package/dist/assets/{CreditCardPaymentDrawerPage-D7Hka4sI-XMOTHoN6.js → CreditCardPaymentDrawerPage-BNJLUnlH-D5HY42Lo.js} +15 -15
  50. package/dist/assets/{CreditCardPaymentPlgSection-C86KVs5o-CMHP3c_1.js → CreditCardPaymentPlgSection-BwqznNRc-DXBqgi-A.js} +10 -10
  51. package/dist/assets/{CurrencySelectField-B0VTg3Rt-Dd3IQIDs.js → CurrencySelectField-PwurThUn-qsqObS4L.js} +5 -5
  52. package/dist/assets/{CustomerOnboardingActivationPage-oegOz3kP-D9IgnjCf.js → CustomerOnboardingActivationPage-CHJLyOyf-vC6AUxAJ.js} +1 -1
  53. package/dist/assets/CustomerOnboardingContainerPage-DyM4sCZd-DLhRqrqJ.js +1 -0
  54. package/dist/assets/{CustomerOnboardingDetailPageSkeleton-DhuLaWYK-DcG6KMpl.js → CustomerOnboardingDetailPageSkeleton-BqdhqyL7-D5d_8a27.js} +11 -11
  55. package/dist/assets/{CustomerOnboardingNoStepsPage-BxwT2uzY-D7TcqLpN.js → CustomerOnboardingNoStepsPage-DDio10hZ-Bwj4xg2w.js} +9 -9
  56. package/dist/assets/{CustomerOnboardingPage-L_1XcD2Y-DKNCW3S2.js → CustomerOnboardingPage-k2OYvIqe-DW9-8aDi.js} +9 -9
  57. package/dist/assets/CustomerOnboardingProductSuitePage-CxB32dUM-D8l5mASB.js +202 -0
  58. package/dist/assets/{Dashboard-CWSUiuiJ-CkG7yAH9.js → Dashboard-DhMPjLVy-BPpidTU7.js} +1 -1
  59. package/dist/assets/{DashboardReportPage-D79gYgHb-BVvCBIWA.js → DashboardReportPage-C9YvD_24-CnK8XRxa.js} +1 -1
  60. package/dist/assets/{DepositAccTransactionItem-BCJn6a_d-BT-feK8R.js → DepositAccTransactionItem-BYFOUvho-D1tjwPkv.js} +4 -4
  61. package/dist/assets/{DepositAccTransactionListPage-6QMW3q5S-DniMW2S1.js → DepositAccTransactionListPage-DeN4-lBP-CBJVTEU-.js} +7 -7
  62. package/dist/assets/{DocumentSecurityBanner-C7TAyvIZ-DjIw6AYV.js → DocumentSecurityBanner-6cQ2cW7e-Bf5Osic5.js} +1 -1
  63. package/dist/assets/{DomesticWireDetailsPage-DGOgMHF5-CR1jD4GL.js → DomesticWireDetailsPage-BmMEth4c-Duh2OS1c.js} +1 -1
  64. package/dist/assets/{DownloadOverlay-BrVMY7u8-nMRk4mVN.js → DownloadOverlay-D0_pmb7k-BhK-Q9wQ.js} +6 -6
  65. package/dist/assets/{DrawerPage-DbmFkDa9-Djje95q9.js → DrawerPage-C5u676VK-BwyTjOJX.js} +1 -1
  66. package/dist/assets/EditPeoplePage-DAM71X8m-kukHxW_0.js +55 -0
  67. package/dist/assets/{EditReimbursementDetailPage-BSXwufQy-BGfoaRvB.js → EditReimbursementDetailPage-BxjNoyj8-mj8ySbuq.js} +43 -43
  68. package/dist/assets/{EntityDetailPage-ClKvTCns-CiI4yzJ7.js → EntityDetailPage-BfscGvkI-DlE98_0K.js} +3 -3
  69. package/dist/assets/{EntitySummarySection-BcyWfLW_-llSGPYnB.js → EntitySummarySection-BCkLY2Py-lpTrhfnW.js} +5 -5
  70. package/dist/assets/{ExpenseAutomationOverviewPage-CQ5_4jtz-Dwom5i2h.js → ExpenseAutomationOverviewPage-C4SCxViu-BAakN-WZ.js} +18 -18
  71. package/dist/assets/{ExpenseAutomationPage-SDYsJmGO-CNd8g10S.js → ExpenseAutomationPage-DF1-Q4X5-DubLusUH.js} +33 -33
  72. package/dist/assets/{ExpressPayPage-S33czP_U-wOnUG70H.js → ExpressPayPage-Cdtx03yB-BxTU3id1.js} +10 -10
  73. package/dist/assets/{FeaturePreviewPage-COWIqmTf-CyZ-Ngo6.js → FeaturePreviewPage-nQYT4moR-CobwvrFz.js} +2 -2
  74. package/dist/assets/{FollowStepsSection-Cw8htUBe-KlacKTEI.js → FollowStepsSection-CRBm3eL9-Bz_q7qOo.js} +8 -8
  75. package/dist/assets/{GlobalReviewListPage-DKBYTVNe-B054__m6.js → GlobalReviewListPage-3iXmpaXt-BpdqjyXr.js} +1 -1
  76. package/dist/assets/{HelpButton-BvPX8uxd-B7O0Ne6B.js → HelpButton-Cv7-d_qL-CciztHgu.js} +1 -1
  77. package/dist/assets/{InformationCardStack-CtueyMCq-B3RHQtJt.js → InformationCardStack-JCre21xs-BlkeDU23.js} +3 -3
  78. package/dist/assets/{InsightsCardStack-BKtPGTdt-rc65DXp-.js → InsightsCardStack-Dekfw94R-VqCo_XNV.js} +8 -8
  79. package/dist/assets/{InsightsSection-BFIeAUrz-CogsOJk3.js → InsightsSection-CLqfyvOO-CKwkK2Sj.js} +4 -4
  80. package/dist/assets/{IntegrationsSettingsPage-BSyZC7Kg-CHF3rylS.js → IntegrationsSettingsPage-o9w1-WIT-BCMJ43n5.js} +5 -5
  81. package/dist/assets/{InternationalWireSwiftDetailsPage-C9Z04pG5-ChUNSNNN.js → InternationalWireSwiftDetailsPage-DBG1ni7g-DMTAsaCM.js} +18 -18
  82. package/dist/assets/{InternationalWireVerificationPage-iRa0YMo6-BqMlSuW7.js → InternationalWireVerificationPage-BLU4F--p-BFU2uuwn.js} +19 -19
  83. package/dist/assets/{InviteFormPage-CbSJssAT-C5BLeKFh.js → InviteFormPage-Bf8Mqb7S-BtjdSecG.js} +13 -13
  84. package/dist/assets/{InvitePageListView-BrUBTz5B-DxiDTLU3.js → InvitePageListView-6oeT1vaB-Bpmua81S.js} +52 -52
  85. package/dist/assets/InvitePeoplePage-CLvVDRca-CLtgUYZW.js +12 -0
  86. package/dist/assets/{InvoiceUploadSection-CRgtSthn-CdJu9_SZ.js → InvoiceUploadSection-BiIfE0Mk-DzhUPeCE.js} +7 -7
  87. package/dist/assets/{IssueChargeCardPage-CdOs81el-CaQjXLma.js → IssueChargeCardPage-Dd312Qu7-BymELIm-.js} +20 -20
  88. package/dist/assets/{LabeledAddressValue-CoQKG0Vs-XiBnAGSr.js → LabeledAddressValue-BplX--OG-BBD4K47a.js} +1 -1
  89. package/dist/assets/{LabeledAddressValueField-D5zB7wnP-C-ACJntJ.js → LabeledAddressValueField-DkhJs5ky-DLdSr7t1.js} +4 -4
  90. package/dist/assets/{LabeledControlledCheckBoxField-DSefRIxV-fZ095MYZ.js → LabeledControlledCheckBoxField-SJfjkDzA-q46TDnxw.js} +1 -1
  91. package/dist/assets/{LabeledCreatableSingleSelectField-DOv10RFp-Do8dWxGN.js → LabeledCreatableSingleSelectField-CPwrvNjy-C-LowpML.js} +3 -3
  92. package/dist/assets/LabeledDocumentField-DLd6UnEn-DtqGgdoi.js +41 -0
  93. package/dist/assets/{LabeledDropDownFormattedTextField-D6qgntCW-BJC3ifVH.js → LabeledDropDownFormattedTextField-D70GX0HR-7dIEmO5F.js} +7 -7
  94. package/dist/assets/{LabeledText-DiD_FvMm-CCwT2lQh.js → LabeledText-mTAE2dvH-e6RXkC8i.js} +2 -2
  95. package/dist/assets/{LabeledUserSingleSelectWithSubtitlesField-rBaXx4JB-DR0Xw0HO.js → LabeledUserSingleSelectWithSubtitlesField-Dx8TfHuB-hRPyJuOY.js} +10 -10
  96. package/dist/assets/{LabeledZeniRolesDropDownField-DI9XLkn7-BHhuV6HF.js → LabeledZeniRolesDropDownField-ZGHinaTy-14IF6Cak.js} +12 -12
  97. package/dist/assets/{LinkJETransactionPage-BI9rvDWF-CfBfl5Qd.js → LinkJETransactionPage-CNYQO-AQ-BO9clNns.js} +8 -8
  98. package/dist/assets/{LowBalancePopup-ChqqEeWk-BM4fEMD_.js → LowBalancePopup-hdwaJezh-B0CYMe4t.js} +5 -5
  99. package/dist/assets/{MagicLinkACHDetailsPage-DYDNDN_--DivIHnp3.js → MagicLinkACHDetailsPage--DRHcaKz-BBtLo6wh.js} +1 -1
  100. package/dist/assets/{MagicLinkDomesticWireDetailsPage-DQuuLyWQ-DMuYoH5t.js → MagicLinkDomesticWireDetailsPage-B5hbI4dU-0vD7L8pJ.js} +1 -1
  101. package/dist/assets/{MagicLinkInternationalWireDetailsPage-CnUTecpU-D_T2GhHn.js → MagicLinkInternationalWireDetailsPage-BdwVZCRt-BzFpmTJD.js} +1 -1
  102. package/dist/assets/{MagicLinkSuccessPage-Dyhk5vnq-BIlvFeEv.js → MagicLinkSuccessPage-DOUrPdD--h771bDUh.js} +1 -1
  103. package/dist/assets/{MagicLinkTitleSection-CAwqT4_X-BZUCaIfF.js → MagicLinkTitleSection-Bb27jU2a-DQOPYd-Z.js} +3 -3
  104. package/dist/assets/{MailingDetailsSection-Cpu-qwub-DXvamX34.js → MailingDetailsSection-CdKFQB_8-K5G0AaPG.js} +2 -2
  105. package/dist/assets/{MeetingCalenderPopup-B5M2lm-y-C_FrJz7Q.js → MeetingCalenderPopup-B3sIZU3d-DuEMLObz.js} +3 -3
  106. package/dist/assets/{Menu-D0NUi1FB-BawltZy9.js → Menu-Bsk58l8k-kRDchKev.js} +1 -1
  107. package/dist/assets/{MyBankConnectionsSettingsPage-SYlGHINJ-UgY1mvLj.js → MyBankConnectionsSettingsPage-P1Zh6SFD-C4DvQ61H.js} +12 -12
  108. package/dist/assets/{MyPendingActivationChargeCardListPage-EBaDVcO8-BUhvlg7Q.js → MyPendingActivationChargeCardListPage-Cs7rVAdh-B9AXkK-5.js} +1 -1
  109. package/dist/assets/{MyProfileSettingsPage-a1LKde_U-C-CluQ5D.js → MyProfileSettingsPage-Cc4XfbBQ-C9qNtbAb.js} +6 -6
  110. package/dist/assets/{NavBarWithPicker-D3YzfX06-BOvWanjk.js → NavBarWithPicker-DFD5LZ4o-CjFvYGu-.js} +3 -3
  111. package/dist/assets/{NavigationArrow-C81m-KZF-DiGpo5fD.js → NavigationArrow-mL8dVddD-CApZjvsF.js} +5 -5
  112. package/dist/assets/{NavigationDots-CB3WQq54-bd5dE2x5.js → NavigationDots-MPqPjbnr-gK408Eu4.js} +1 -1
  113. package/dist/assets/{NewGlobalMerchantPage-BwuCbGQ_-BWfS6c1K.js → NewGlobalMerchantPage-QTvziNPs-DJ7dMRKm.js} +6 -6
  114. package/dist/assets/{NoDataChart-B0CMrh6X-CjUp7yyw.js → NoDataChart-C1BY1riw-DoqrJEIG.js} +1 -1
  115. package/dist/assets/{NoDataTable-BgcSvfNz-CZM6fS2_.js → NoDataTable-C_4AqyDp-cxOm3TqL.js} +1 -1
  116. package/dist/assets/{NotFoundPage-BnPqLAwW-DXn1vq6B.js → NotFoundPage-U8Zqpzgy-DGacTch6.js} +4 -4
  117. package/dist/assets/{NotificationSettingsPage-wigFcdhu-BCVXYCAc.js → NotificationSettingsPage-2A4Pahmq-ugOY8DfW.js} +13 -13
  118. package/dist/assets/NotificationsListConfig-BIw5ASx2-BpsD8zMo.js +1 -0
  119. package/dist/assets/{NotificationsPage-BC-f8rc3-Cv1jpZ5r.js → NotificationsPage-B6yKJmGI-ABrq9lsr.js} +36 -36
  120. package/dist/assets/{OpExByVendorPage-CIh1CcAU-DhceACAT.js → OpExByVendorPage-BnTlBXeu-CtQ9Rudi.js} +4 -4
  121. package/dist/assets/{OverlayContainerPage-GWXnlbZH-D_pF8lEg.js → OverlayContainerPage-BxBOhoib-0U2mSFzb.js} +1 -1
  122. package/dist/assets/{PandLWithForecastPage-Dj21XOWq-Bil3pCly.js → PandLWithForecastPage-CKW73tr8-DQuvWZ35.js} +5 -5
  123. package/dist/assets/{PaymentAccountSetupBillingAddressSection-C0eGjv2q-hYajAvBR.js → PaymentAccountSetupBillingAddressSection-CSEVISAI-Bq0DuZcX.js} +6 -6
  124. package/dist/assets/{PeoplePage-DHWuODjG-BG9mOlzv.js → PeoplePage-BJxZJT-l-FSQqwOWI.js} +16 -16
  125. package/dist/assets/{PortfolioAllocationFormPage-CYoVD723-JNLkou6k.js → PortfolioAllocationFormPage-C4pRhyet-Wf_11Z3Y.js} +4 -4
  126. package/dist/assets/PortfolioDetails-4fbkArz6-0_-lQYOm.js +218 -0
  127. package/dist/assets/{ProductsCarousel-DcSxZECS-DlL_nQ7i.js → ProductsCarousel-gGbLzHle-BYrndM43.js} +1 -1
  128. package/dist/assets/{PromoBaseCards-B-s9wF0Q-C_JFN1l_.js → PromoBaseCards-DUlZEg5E-CbxyeszU.js} +1 -1
  129. package/dist/assets/{QBOConnectionDialog-CQlXDalh-pYOnv0Lz.js → QBOConnectionDialog-C_Z2lvUz-DLhuJ1u0.js} +6 -6
  130. package/dist/assets/{QBOSetupSection-Dpib3Rx5-CvOyCasF.js → QBOSetupSection-DqWiwHwl-DIb9XM9r.js} +11 -11
  131. package/dist/assets/{ReimbursementApprovalRuleDetailPage-CutUv2m2-DV8JJchD.js → ReimbursementApprovalRuleDetailPage-JWdrVgqW-CFvIiw2A.js} +1 -1
  132. package/dist/assets/{ReimbursementApprovalRulesPage-Cyye_Ayg-D3NnZeto.js → ReimbursementApprovalRulesPage-BnBNwFzM-C_gjNu0y.js} +33 -33
  133. package/dist/assets/{ReimbursementDetailPage-C4Tsi1io-C3Ydj8yn.js → ReimbursementDetailPage-Dyjb0qZE-BT9Piz6e.js} +7 -7
  134. package/dist/assets/{ReimbursementPromoPage-4BFu3jYR-DJOp85Xg.js → ReimbursementPromoPage-D1EqiXEa-DCne6gHN.js} +3 -3
  135. package/dist/assets/{ReimbursementSetUpPage-Cpl4wfuS-CLF96wxU.js → ReimbursementSetUpPage-ClJ_4WMp-Rk-zjJTF.js} +5 -5
  136. package/dist/assets/{ReimbursementsBulkReviewDrawerPage-iGaIl0hj-Ez4D4cLW.js → ReimbursementsBulkReviewDrawerPage-B-uGRv6i-04ZwLpFl.js} +1 -1
  137. package/dist/assets/{ReloadCard-F-DEmw51-DLqR0F5O.js → ReloadCard-DVYCtjFP-BRGDk89Q.js} +1 -1
  138. package/dist/assets/{ReportTableViewSelector-BSPNRs-f-BSuMcYEk.js → ReportTableViewSelector-BTu2hum1-C1Mbyqo-.js} +7 -7
  139. package/dist/assets/{ReportsPage-BQF-yVRz-qmz-Tsud.js → ReportsPage-BJEqtDDR-D_PksdU9.js} +5 -5
  140. package/dist/assets/{RevenueChart-ClRH1Vei-DMmGXmTr.js → RevenueChart-BFS-A4qa-BBXnyto4.js} +13 -13
  141. package/dist/assets/{ReviewDetailsPage-BKfSEXv--BulgMAR_.js → ReviewDetailsPage-C6qSCmDQ-B2yUNAOk.js} +13 -13
  142. package/dist/assets/{ReviewOverlay-Dgnr47GU-pLIXYebD.js → ReviewOverlay-DItEmr7f-J3VxEX04.js} +1 -1
  143. package/dist/assets/{RoleWithToolTip-Bcjjd_2M-CEhXe82J.js → RoleWithToolTip-CqtMdboJ-Do2co-59.js} +6 -6
  144. package/dist/assets/{ScheduleDetailsFixedAssetsPage-Bq6XAACj-b2tW9Mlc.js → ScheduleDetailsFixedAssetsPage-CKcDbns8-CVYGhsoz.js} +8 -8
  145. package/dist/assets/{ScheduleDetailsPage-DTLTxgOx-BSog8pZ6.js → ScheduleDetailsPage-CYqYYvix-CdBl7QS5.js} +3 -3
  146. package/dist/assets/{ScheduleSequenceTable-CEZL4GA8-Bz6Z5iY2.js → ScheduleSequenceTable-DUYFGZvc-B-XLebxH.js} +18 -18
  147. package/dist/assets/{ScreenRoutes-CPSDcwH4.js → ScreenRoutes-BFh5xZjd.js} +35 -35
  148. package/dist/assets/{SetUpAccountSection-CJsY-S6w-C1WEKP8_.js → SetUpAccountSection-DfuZHlL6-sva6HoSx.js} +21 -21
  149. package/dist/assets/{SetUpDefaultSection-Dbzui0hL-iIB8Rf0_.js → SetUpDefaultSection-Jl4dtzx3-CDDnDgUz.js} +10 -10
  150. package/dist/assets/{SignIn-yFG7aeiJ-ckyRX-3p.js → SignIn-OTT_6lLp-4uioYcss.js} +4 -4
  151. package/dist/assets/{SignInScreen-CezO9Lof.js → SignInScreen-VsVK9Vz1.js} +1 -1
  152. package/dist/assets/{SpendManagementListViewPage-cw0B29Ux-C5QKbiAX.js → SpendManagementListViewPage-BkL-3WNh-DhY9QPd5.js} +3 -3
  153. package/dist/assets/{SpendManagementPerTabPage-Bkw1eegW-6YGIDLoT.js → SpendManagementPerTabPage-Buppd61y-KX81e_1p.js} +14 -14
  154. package/dist/assets/{SpendManagementSection-DuYMRljT-Bdg69CKN.js → SpendManagementSection-BGcBRKGN-CG3uT_ZE.js} +10 -10
  155. package/dist/assets/{SpendMgmtSetupAccountSection-DF3XzW-2-DYLliU2g.js → SpendMgmtSetupAccountSection-Cswh297O-5u1iK010.js} +13 -13
  156. package/dist/assets/{StatementItem-DGX-Yd6i-BY_yCToE.js → StatementItem-C3tUNT5A-D9LIbCmi.js} +4 -4
  157. package/dist/assets/{StatementsPage-BJ3A9NXT-DMgbNE2o.js → StatementsPage-DGryRE6z-C-mT3zfT.js} +3 -3
  158. package/dist/assets/{StatusSwitcher-Duc8UFd8-CiSz19gK.js → StatusSwitcher-BgWlxay9-Mp4PEzEM.js} +2 -2
  159. package/dist/assets/{SubTabSwitcher-U04APwPI-BuE6OItd.js → SubTabSwitcher-DwwAqq_R-DBNFWy_6.js} +1 -1
  160. package/dist/assets/{SummaryCard-BPy7YF4F-CCR3LVUp.js → SummaryCard-Dm0Tx9is-BV25EA5P.js} +1 -1
  161. package/dist/assets/{TaskManagementPage-CaPSMhTy-CpyLEYTY.js → TaskManagementPage-59XAl_cs-BbyBf_KE.js} +31 -31
  162. package/dist/assets/{TimeRangeSwitcher-DR2s6McL-3_tMweub.js → TimeRangeSwitcher-D7-Jph-G-Cn7zeCi8.js} +3 -3
  163. package/dist/assets/{TimeframeSwitcher-CR_Pithb-DBISxzXu.js → TimeframeSwitcher-CWYQWFLF-B37Mzr7G.js} +1 -1
  164. package/dist/assets/{TimeframeSwitcherWithToggle-CxsK8B8h-Cc3bm2cD.js → TimeframeSwitcherWithToggle-QOhQ3sac-BtE_j2V5.js} +1 -1
  165. package/dist/assets/{TopExCard-CykkX8Ny-DVQt4RbM.js → TopExCard-CTlizsDD-CdK-gYL3.js} +5 -5
  166. package/dist/assets/{TopExDetailPage-D9lST5M2-BxtgAaio.js → TopExDetailPage-Df3JbgcF-BUIhSfiv.js} +2 -2
  167. package/dist/assets/{TransactionDetailPage-CdEYjFbk-B6ledmKA.js → TransactionDetailPage-DvNpTjAp-3mOQ99vo.js} +30 -30
  168. package/dist/assets/{TransactionList-Dybq00u0-BjLYzc0q.js → TransactionList-SkSPfIsE-CE8kQBAe.js} +8 -8
  169. package/dist/assets/{TransactionListBig-C08_BfqV-BbvbiTrP.js → TransactionListBig-CZCV_kmJ-DVUvA7le.js} +9 -9
  170. package/dist/assets/{TransactionListPage-B1Yrd7M3-DonBnBnw.js → TransactionListPage-CBbyagWp-Da8WpQzF.js} +1 -1
  171. package/dist/assets/{TransactionVendorDetailPage-C4c-gk4U-BJLuJ4bf.js → TransactionVendorDetailPage-BXnlFdHR-DkKO-vTr.js} +3 -3
  172. package/dist/assets/{TransferDrawerPage-R6BJFqqt-DlAyhuZ7.js → TransferDrawerPage-CxXLyKwW-pf6KUagR.js} +29 -29
  173. package/dist/assets/{TreasuryOverviewPage-BsLzvGJ9-B1GjNHT4.js → TreasuryOverviewPage-3JlXZfCV-Dx_gGX5K.js} +16 -16
  174. package/dist/assets/{TreasuryPromoPage-k4TR0X4_-eC19CXAQ.js → TreasuryPromoPage-BhAicq7r-CWtB-Ior.js} +15 -15
  175. package/dist/assets/{TreasurySetupPage-xA9wkaxu-DOCNmlPJ.js → TreasurySetupPage-BQG_Wd5U-DotUWNKW.js} +2 -2
  176. package/dist/assets/{TreasuryStatementsPage-BeGMnFii-YfwK-mig.js → TreasuryStatementsPage-dCAtvvZk-CQC0pKh5.js} +5 -5
  177. package/dist/assets/{TreasuryTaxLetterPage-D6xf_HNB-DiYrdqjP.js → TreasuryTaxLetterPage-irA0Cgkj-CtL9UaTH.js} +5 -5
  178. package/dist/assets/{TreasuryTransferOrReviewPage-Cy90K2k1-BwaHgqNm.js → TreasuryTransferOrReviewPage-Dd1oLBma-BqeITAG-.js} +80 -80
  179. package/dist/assets/{TrendChart-CJ4ymPpY-4Nl5mDmM.js → TrendChart-Ctquh3qH-BiYWLM8X.js} +2 -2
  180. package/dist/assets/{TrendWithTransactions-B1FMv4RR-BXjd6gRu.js → TrendWithTransactions-CoXTnQK7-BLlEO5rp.js} +1 -1
  181. package/dist/assets/{UncategorizedAccountsMappingPage-MX9qLxmy-NN0GCNcI.js → UncategorizedAccountsMappingPage-Cq49D6V9-TgKDL_ek.js} +1 -1
  182. package/dist/assets/{UnitIntegrationPage-B1wIRNw1-DQCY0VyM.js → UnitIntegrationPage-CR0nZ7NM-R_gwAwZ8.js} +4 -4
  183. package/dist/assets/{UploadAdditionalDocumentOverlay-DiX5Dbc--DMKXpGlq.js → UploadAdditionalDocumentOverlay-B_DFEIlC-D-vyB1J1.js} +1 -1
  184. package/dist/assets/{Vendor2FAPopup-Cljy86Us-CqvodjDD.js → Vendor2FAPopup-KsRgKz_Z-j8koIFf4.js} +1 -1
  185. package/dist/assets/{VendorACHDetailsPage-BZG4bwOp-CtpzzPJH.js → VendorACHDetailsPage-MRaehbhm-DmI12dQp.js} +1 -1
  186. package/dist/assets/{VendorDetailPage-B8m4FkG5-D-auLoHo.js → VendorDetailPage-Cji21PBc-B3adWyVF.js} +18 -18
  187. package/dist/assets/{VendorDomesticWireDetailsPage-D7Mt3s3R-_HscDehj.js → VendorDomesticWireDetailsPage-DhUIW9g--qdYZ8d9x.js} +1 -1
  188. package/dist/assets/{VendorFiling1099EditablePage-B1FNkNlL-Sg-MnT3r.js → VendorFiling1099EditablePage-BWFbXLhQ-C5qvIENm.js} +11 -11
  189. package/dist/assets/{VendorFirstReviewPage-CDmMppJJ-CtMKXiJP.js → VendorFirstReviewPage-tvh5pcvQ-B2Kk7Crs.js} +26 -26
  190. package/dist/assets/{VendorInternationalWireDetailsPage-X-j8j32p-CWI0CPWX.js → VendorInternationalWireDetailsPage-CfmZSb8O-B-ILWyNn.js} +11 -11
  191. package/dist/assets/{VendorInternationalWireSwiftDetailsPage-eJXY7B89-B0ExbgQf.js → VendorInternationalWireSwiftDetailsPage-V_1s9mWi-hnkkHj00.js} +1 -1
  192. package/dist/assets/{VendorsAccountsSection-DH0v9LaU-DHJI7MF_.js → VendorsAccountsSection-b9s5nqGq-DfS13Vrv.js} +6 -6
  193. package/dist/assets/VerifyDevice-CJgD3UmO-uodXssPo.js +67 -0
  194. package/dist/assets/{WarningsDrawerPage-0XqR-WSe-anF5_tw2.js → WarningsDrawerPage-CB4mJGTB-fzxOGtfc.js} +9 -9
  195. package/dist/assets/{ZeniAccountDetailPage-poRKOvKO-DKb8kmv1.js → ZeniAccountDetailPage-CgSyyen1-PEjv41n1.js} +33 -33
  196. package/dist/assets/{ZeniAccountListViewPage-DAwsHVFu-BGWKwgu8.js → ZeniAccountListViewPage-DjGZpdh_-BsFv0aAo.js} +14 -14
  197. package/dist/assets/{ZeniAccountNavBarPieces-CK1z6uDE-EtXKthio.js → ZeniAccountNavBarPieces-BJC4d2Iu-BjaYs6wQ.js} +2 -2
  198. package/dist/assets/{ZeniAccountPromoPage-D_AeQXK0-BigsavEn.js → ZeniAccountPromoPage-D3Yt6FIj-ypiLoIIl.js} +9 -9
  199. package/dist/assets/{ZeniAccountSetupPage-B5KmPY23-C7MeYCAt.js → ZeniAccountSetupPage-BeCPekI4-BoIQB_8y.js} +3 -3
  200. package/dist/assets/{ZeniCopyright-DawBwguL-CoKChncL.js → ZeniCopyright-Dhdl9kqY-CRu5oNtE.js} +1 -1
  201. package/dist/assets/{ZeniTransferAmountSlider-BBQgQPfw-CW26dOpf.js → ZeniTransferAmountSlider-B8VFb2l--enqH4TrQ.js} +1 -1
  202. package/dist/assets/{analyticsHelper-mARzqEfV-glOPluPl.js → analyticsHelper-Cawv3PXO-DqLgneHd.js} +1 -1
  203. package/dist/assets/{analyticsHelper-DTaSIWBm.js → analyticsHelper-DBiIeSgZ.js} +1 -1
  204. package/dist/assets/{chartTypes-CedtWDkU-D_XzUeW6.js → chartTypes-5p7NWUHx-6R9pye-p.js} +1 -1
  205. package/dist/assets/{commonDimensions-ZxGdYNGR-BLBlsCik.js → commonDimensions-CQlLUBWG-C3nTCVjo.js} +1 -1
  206. package/dist/assets/{detailCommon-C0urnGcj-AeDRs0j5.js → detailCommon-CoAmJ6pY-B0Qu3snC.js} +4 -4
  207. package/dist/assets/{downloadPdf-C1cvLEsi-rU2eYPue.js → downloadPdf-CCJjnfCZ-ODxWAPRh.js} +1 -1
  208. package/dist/assets/{index-BEYLWYh7.js → index-C2JVdK9x.js} +2597 -2579
  209. package/dist/assets/{mapLoadingInProgressToTreeNode-D9ofcMAJ-DzcUuzrj.js → mapLoadingInProgressToTreeNode-CwyU1xs5-DTtIWEnS.js} +1 -1
  210. package/dist/assets/{mapSectionWithAcOnlyToTreeNode-CAhuUnXV-B-V1WxKb.js → mapSectionWithAcOnlyToTreeNode-IKJYFM7_-BiH-dZ1q.js} +1 -1
  211. package/dist/assets/{mapSpacerToTreeNode-BPXOBdsi-fkjPbAs6.js → mapSpacerToTreeNode-D5XTLzM7-CZeCl2Hx.js} +1 -1
  212. package/dist/assets/{mapTimeframeBalancesToTreeNode-BYB1q7M0-BG-ucR_V.js → mapTimeframeBalancesToTreeNode-CJMbtmIl-DGh10zzw.js} +1 -1
  213. package/dist/assets/{mapTimeframeBalancesToTreeNode-BU0Ph9My-DP-H6YbL.js → mapTimeframeBalancesToTreeNode-SX6fBp6e-DSWmrMTg.js} +1 -1
  214. package/dist/assets/{mapTimeframeHeaderLoadingInProgressToTreeNode-Bkav2l0W-kqY2QYd9.js → mapTimeframeHeaderLoadingInProgressToTreeNode-Ts5lOZtX-DZNSlCJx.js} +1 -1
  215. package/dist/assets/{play-icon-BaaR5WkW-bsECe0gv.js → play-icon-oQKnPjZi-D1s2fk0_.js} +3 -3
  216. package/dist/assets/{toCOABalancesWithID-CCW7YVfm-BLH1CPxw.js → toCOABalancesWithID-DwvFse7w-YhdHXdmt.js} +1 -1
  217. package/dist/assets/{toChartData-C3kVg0fD-Dm5_eyYk.js → toChartData-BBvMC_VQ-D9RVT7PQ.js} +1 -1
  218. package/dist/assets/{treasuryColorHelper-Cc1DTnhB-C-kSfp9f.js → treasuryColorHelper-CUDK9KvQ-DUBVC7I-.js} +1 -1
  219. package/dist/assets/{uploadAttachment-C56u0Q20-DnHCC04X.js → uploadAttachment-P4S_2L_v-CgBJ3cvv.js} +13 -13
  220. package/dist/assets/{uploadReceipts-D80JLNY4-dIgIudSI.js → uploadReceipts-DhDnr0ap-Dmr6ZzO6.js} +1 -1
  221. package/dist/index.html +1 -1
  222. package/package.json +4 -4
  223. package/dist/assets/ChargeCardPromoPage-BiyYawq5-C06aowQC.js +0 -219
  224. package/dist/assets/CompleteProfile-CikcmDmg-BRscmvQ1.js +0 -36
  225. package/dist/assets/CustomerOnboardingContainerPage-56mBQg5m-P-4bO2TI.js +0 -1
  226. package/dist/assets/CustomerOnboardingProductSuitePage-Xqdww5iU-DE5MK9MP.js +0 -202
  227. package/dist/assets/EditPeoplePage-CKiV3DO3-CiLuq48J.js +0 -55
  228. package/dist/assets/InvitePeoplePage-BbDUlUjQ-BFnCmfU7.js +0 -12
  229. package/dist/assets/LabeledDocumentField-CO6_e65U-C8oWnxyV.js +0 -41
  230. package/dist/assets/NotificationsListConfig-D2ndsr4D-C04oDiNr.js +0 -1
  231. package/dist/assets/PortfolioDetails-5xc1wonC-DS3ORnSc.js +0 -218
@@ -1,4 +1,4 @@
1
- import{u as Ee,X as Ve,a1 as N,a as qe,c3 as Ge,M as Te,l as Ke,a7 as be,j as t,cI as Ze,g as K,C as r,aV as Je,c as Ye,F as Qe,c_ as Xe,aQ as et,c$ as tt,a3 as it,o as a,m as n,bH as nt,cg as ot,co as at,eY as ve,eZ as ke,fH as lt,K as rt,Y as $e,Q as Pe,bc as st,v as ct,aN as dt}from"./index-BEYLWYh7.js";import{b as o,n as i}from"./vendor-CnQcJ2Lu.js";import{F as ut}from"./HelpButton-BvPX8uxd-B7O0Ne6B.js";import{K as je}from"./SetUpDefaultSection-Dbzui0hL-iIB8Rf0_.js";import{f as mt}from"./SpendMgmtSetupAccountSection-DF3XzW-2-DYLliU2g.js";import{g as pt}from"./UploadAdditionalDocumentOverlay-DiX5Dbc--DMKXpGlq.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"./MeetingCalenderPopup-B5M2lm-y-C_FrJz7Q.js";import"./ChargeCardUtils-BQZTS-KQ-DN5emI4w.js";import"./CreditCardPaymentPlgSection-C86KVs5o-CMHP3c_1.js";import"./ChaseOverlay-DveM_aY_-SrUhZ-KA.js";const gt=e=>o.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},o.createElement("path",{d:"M12.7113 3H2.89261C2.39963 3 2 3.39963 2 3.89261V20.8522C2 21.3451 2.39963 21.7448 2.89261 21.7448H12.7113C13.2043 21.7448 13.6039 21.3451 13.6039 20.8522V3.89261C13.6039 3.39963 13.2043 3 12.7113 3Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M10.4798 13.7113H9.58719C9.3407 13.7113 9.14088 13.9111 9.14088 14.1576V16.8354C9.14088 17.0819 9.3407 17.2817 9.58719 17.2817H10.4798C10.7263 17.2817 10.9261 17.0819 10.9261 16.8354V14.1576C10.9261 13.9111 10.7263 13.7113 10.4798 13.7113Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M21.6374 16.1133C21.6374 16.1961 21.6143 16.2773 21.5708 16.3477C21.5273 16.4182 21.4651 16.4752 21.391 16.5123L19.8522 17.2817V14.6039H21.1911C21.3095 14.6039 21.423 14.6509 21.5067 14.7346C21.5904 14.8183 21.6374 14.9318 21.6374 15.0502V16.1133Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M19.8522 14.6039V13.265C19.8522 12.5268 22.53 10.1409 22.53 10.1409",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M19.8522 17.2817V19.9596C19.8522 20.433 19.6641 20.8871 19.3293 21.2219C18.9945 21.5567 18.5404 21.7448 18.067 21.7448C17.5935 21.7448 17.1394 21.5567 16.8046 21.2219C16.4698 20.8871 16.2817 20.433 16.2817 19.9596V7.90935C16.2817 7.55424 16.1407 7.21369 15.8896 6.96259C15.6385 6.7115 15.2979 6.57043 14.9428 6.57043H13.6039",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M2 10.1409H13.6039",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M11.3724 4.78528H4.23154C3.98505 4.78528 3.78523 4.9851 3.78523 5.23158V7.90941C3.78523 8.15589 3.98505 8.35571 4.23154 8.35571H11.3724C11.6189 8.35571 11.8187 8.15589 11.8187 7.90941V5.23158C11.8187 4.9851 11.6189 4.78528 11.3724 4.78528Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M9.14088 19.0669H10.9261",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),h={sectionWidth:new r(343,580,726),iconContainerMaxWidthHeight:new r(n[6],n[7]),iconContainerMarginRight:new r(12,n[3]),infoLabelPaddingLeft:new r(n[0],n[3]),iconPadding:new r(10,12),iconWidthHeight:new r(20,n[4]),rowGap:new r(n[2],n[3]),containerPadding:new r(n[3],n[4])},ge={title:new Pe("standardSemiBold","largeSemiBold"),infoLabel:new Pe("extraSmallRegular","smallRegular")};function ht({companyMileageConfigInfo:e,mileageDetails:y,analytics:j,style:A,sectionId:$,isActive:d=!0,isDisabled:s,onSaveMileageClick:Z}){const l=Ve(),D=Ee(),{formState:{errors:J},trigger:Y}=ot(),E=ft($,"mileageAmountInDenomination"),f=at(J,E),{localData:c,updateStatus:R,mileageStatus:C}=y,U=e?.denominationConversions.amount==null||e.denominationConversions.amount!==c?.mileageAmountInDenomination,{commonSetUp:Q,spendManagement:X}=Te.getLocalizedStrings(),{reimbursement:ee}=X,[S,V]=o.useState(U),[te,H]=o.useState(!1);o.useEffect(()=>{f||Y(E)},[]),o.useEffect(()=>{e?.denominationConversions.amount!=null&&e.denominationConversions.amount===c?.mileageAmountInDenomination&&V(!1)},[e?.denominationConversions.amount]),o.useEffect(()=>{S||H(S)},[S]);const{reimbursementSetup:x}=ee,{setUp:ie}=Q,ne=S===!1||R.fetchState==="In-Progress"?"readonly":s,oe=c&&c?.denominationSymbol?`${c?.denominationSymbol} `:"",ae=c&&c?.mileageUnit?c?.mileageUnit:"";return t.jsxs(xt,{windowSize:l,style:A,isActive:d&&s==null,children:[t.jsxs(Pt,{windowSize:l,children:[x.mileageHeader,d===!1?t.jsx(Dt,{children:ie.comingSoon}):null]}),t.jsxs(kt,{windowSize:l,children:[t.jsx(vt,{windowSize:l,isDarkMode:D.mode==="dark",children:t.jsx(gt,{width:h.iconWidthHeight.valuePx(l),height:h.iconWidthHeight.valuePx(l)})}),t.jsxs(wt,{children:[t.jsxs($t,{children:[t.jsxs(jt,{children:[t.jsxs(At,{children:[t.jsx(Ct,{windowSize:l,children:e?.denominationConversions.amount==null?x.mileageAddTitle:x.mileageEditTitle}),t.jsx(St,{children:x.mileageSubTitle})]}),C!=null&&e?.denominationConversions.amount!=null&&l==="small"?t.jsx(ve,{style:{width:"max-content",padding:a.sp0,marginTop:a.sp2},tagTitle:C.name,textColor:ke(C.code)}):null]}),t.jsxs(yt,{children:[C!=null&&e?.denominationConversions.amount!=null&&l!=="small"?t.jsx(ve,{style:{width:"max-content"},tagTitle:C.name,textColor:ke(C.code)}):null,t.jsx(bt,{})]})]}),t.jsxs(Et,{children:[t.jsxs(Vt,{children:[t.jsx(lt,{style:{height:a.sp6,textAlign:"left"},inputStyle:{textAlign:"left",paddingRight:a.sp10,backgroundColor:f?void 0:D.colors.background,color:S||f?void 0:D.colors.grey1},isFieldError:f,type:"number",autoFocus:!1,focus:te,name:E,defaultValue:c?.mileageAmountInDenomination,returnValueType:"floatValue",allowEmptyFormatting:!0,prefix:oe,suffix:` ${x.perText} ${ae}`,decimalScale:1,allowNegative:!1,isNumericString:!1,registerOptions:{min:1,validate:T=>T!=null||s!=null,required:s==null},isDisabled:ne}),t.jsx(It,{children:S?t.jsx(rt,{label:x.save,"data-testid":$e("save-mileage"),onClick:()=>{c?.mileageAmountInDenomination!=null&&U&&!f&&Z?.(c.mileageAmountInDenomination)},style:{outline:"none"},size:"small",disabled:s!=null,variant:"light_transparent",reverseSpinnerColor:!1,loading:R.fetchState==="In-Progress"}):t.jsx(Lt,{isDisabled:s,"data-testid":$e("edit-mileage"),onClick:T=>{T.stopPropagation(),V(!0),H(!0),j.trackReimbursementMileageRateEdit()}})})]}),c?.description!=null?t.jsx(Tt,{size:l,hasError:f,children:f&&e?.defaultMileageUnitAmount!=null?x.yourMileage.replace("__defaultMileageUnitAmount__",(e.defaultMileageUnitAmount*100).toString()):c.description}):null]})]})]})]})}const ft=(e,y)=>`${e}.${y}`,xt=i.div`
1
+ import{u as Ee,X as Ve,a1 as N,a as Ge,c6 as qe,M as Te,l as Ke,a7 as be,j as t,cL as Je,g as K,C as r,aV as Ze,d as Qe,F as Ye,d1 as Xe,aQ as et,d2 as tt,a3 as it,o as a,p as n,bK as nt,cj as ot,cr as at,e_ as ve,e$ as ke,fJ as lt,K as rt,Y as $e,Q as Pe,bc as st,v as ct,aN as dt}from"./index-C2JVdK9x.js";import{b as o,n as i}from"./vendor-CnQcJ2Lu.js";import{F as ut}from"./HelpButton-Cv7-d_qL-CciztHgu.js";import{K as je}from"./SetUpDefaultSection-Jl4dtzx3-CDDnDgUz.js";import{f as mt}from"./SpendMgmtSetupAccountSection-Cswh297O-5u1iK010.js";import{g as pt}from"./UploadAdditionalDocumentOverlay-B_DFEIlC-D-vyB1J1.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"./MeetingCalenderPopup-B3sIZU3d-DuEMLObz.js";import"./ChargeCardUtils-BB7l65Bf-DfL6sW6K.js";import"./CreditCardPaymentPlgSection-BwqznNRc-DXBqgi-A.js";import"./ChaseOverlay-hsrWeA5X-B3bQwtbG.js";const gt=e=>o.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},o.createElement("path",{d:"M12.7113 3H2.89261C2.39963 3 2 3.39963 2 3.89261V20.8522C2 21.3451 2.39963 21.7448 2.89261 21.7448H12.7113C13.2043 21.7448 13.6039 21.3451 13.6039 20.8522V3.89261C13.6039 3.39963 13.2043 3 12.7113 3Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M10.4798 13.7113H9.58719C9.3407 13.7113 9.14088 13.9111 9.14088 14.1576V16.8354C9.14088 17.0819 9.3407 17.2817 9.58719 17.2817H10.4798C10.7263 17.2817 10.9261 17.0819 10.9261 16.8354V14.1576C10.9261 13.9111 10.7263 13.7113 10.4798 13.7113Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M21.6374 16.1133C21.6374 16.1961 21.6143 16.2773 21.5708 16.3477C21.5273 16.4182 21.4651 16.4752 21.391 16.5123L19.8522 17.2817V14.6039H21.1911C21.3095 14.6039 21.423 14.6509 21.5067 14.7346C21.5904 14.8183 21.6374 14.9318 21.6374 15.0502V16.1133Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M19.8522 14.6039V13.265C19.8522 12.5268 22.53 10.1409 22.53 10.1409",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M19.8522 17.2817V19.9596C19.8522 20.433 19.6641 20.8871 19.3293 21.2219C18.9945 21.5567 18.5404 21.7448 18.067 21.7448C17.5935 21.7448 17.1394 21.5567 16.8046 21.2219C16.4698 20.8871 16.2817 20.433 16.2817 19.9596V7.90935C16.2817 7.55424 16.1407 7.21369 15.8896 6.96259C15.6385 6.7115 15.2979 6.57043 14.9428 6.57043H13.6039",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M2 10.1409H13.6039",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M11.3724 4.78528H4.23154C3.98505 4.78528 3.78523 4.9851 3.78523 5.23158V7.90941C3.78523 8.15589 3.98505 8.35571 4.23154 8.35571H11.3724C11.6189 8.35571 11.8187 8.15589 11.8187 7.90941V5.23158C11.8187 4.9851 11.6189 4.78528 11.3724 4.78528Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),o.createElement("path",{d:"M9.14088 19.0669H10.9261",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),h={sectionWidth:new r(343,580,726),iconContainerMaxWidthHeight:new r(n[6],n[7]),iconContainerMarginRight:new r(12,n[3]),infoLabelPaddingLeft:new r(n[0],n[3]),iconPadding:new r(10,12),iconWidthHeight:new r(20,n[4]),rowGap:new r(n[2],n[3]),containerPadding:new r(n[3],n[4])},ge={title:new Pe("standardSemiBold","largeSemiBold"),infoLabel:new Pe("extraSmallRegular","smallRegular")};function ht({companyMileageConfigInfo:e,mileageDetails:y,analytics:j,style:A,sectionId:$,isActive:d=!0,isDisabled:s,onSaveMileageClick:J}){const l=Ve(),D=Ee(),{formState:{errors:Z},trigger:Q}=ot(),E=ft($,"mileageAmountInDenomination"),f=at(Z,E),{localData:c,updateStatus:R,mileageStatus:C}=y,U=e?.denominationConversions.amount==null||e.denominationConversions.amount!==c?.mileageAmountInDenomination,{commonSetUp:Y,spendManagement:X}=Te.getLocalizedStrings(),{reimbursement:ee}=X,[S,V]=o.useState(U),[te,W]=o.useState(!1);o.useEffect(()=>{f||Q(E)},[]),o.useEffect(()=>{e?.denominationConversions.amount!=null&&e.denominationConversions.amount===c?.mileageAmountInDenomination&&V(!1)},[e?.denominationConversions.amount]),o.useEffect(()=>{S||W(S)},[S]);const{reimbursementSetup:x}=ee,{setUp:ie}=Y,ne=S===!1||R.fetchState==="In-Progress"?"readonly":s,oe=c&&c?.denominationSymbol?`${c?.denominationSymbol} `:"",ae=c&&c?.mileageUnit?c?.mileageUnit:"";return t.jsxs(xt,{windowSize:l,style:A,isActive:d&&s==null,children:[t.jsxs(Pt,{windowSize:l,children:[x.mileageHeader,d===!1?t.jsx(Dt,{children:ie.comingSoon}):null]}),t.jsxs(kt,{windowSize:l,children:[t.jsx(vt,{windowSize:l,isDarkMode:D.mode==="dark",children:t.jsx(gt,{width:h.iconWidthHeight.valuePx(l),height:h.iconWidthHeight.valuePx(l)})}),t.jsxs(wt,{children:[t.jsxs($t,{children:[t.jsxs(jt,{children:[t.jsxs(At,{children:[t.jsx(Ct,{windowSize:l,children:e?.denominationConversions.amount==null?x.mileageAddTitle:x.mileageEditTitle}),t.jsx(St,{children:x.mileageSubTitle})]}),C!=null&&e?.denominationConversions.amount!=null&&l==="small"?t.jsx(ve,{style:{width:"max-content",padding:a.sp0,marginTop:a.sp2},tagTitle:C.name,textColor:ke(C.code)}):null]}),t.jsxs(yt,{children:[C!=null&&e?.denominationConversions.amount!=null&&l!=="small"?t.jsx(ve,{style:{width:"max-content"},tagTitle:C.name,textColor:ke(C.code)}):null,t.jsx(bt,{})]})]}),t.jsxs(Et,{children:[t.jsxs(Vt,{children:[t.jsx(lt,{style:{height:a.sp6,textAlign:"left"},inputStyle:{textAlign:"left",paddingRight:a.sp10,backgroundColor:f?void 0:D.colors.background,color:S||f?void 0:D.colors.grey1},isFieldError:f,type:"number",autoFocus:!1,focus:te,name:E,defaultValue:c?.mileageAmountInDenomination,returnValueType:"floatValue",allowEmptyFormatting:!0,prefix:oe,suffix:` ${x.perText} ${ae}`,decimalScale:1,allowNegative:!1,isNumericString:!1,registerOptions:{min:1,validate:T=>T!=null||s!=null,required:s==null},isDisabled:ne}),t.jsx(Lt,{children:S?t.jsx(rt,{label:x.save,"data-testid":$e("save-mileage"),onClick:()=>{c?.mileageAmountInDenomination!=null&&U&&!f&&J?.(c.mileageAmountInDenomination)},style:{outline:"none"},size:"small",disabled:s!=null,variant:"light_transparent",reverseSpinnerColor:!1,loading:R.fetchState==="In-Progress"}):t.jsx(It,{isDisabled:s,"data-testid":$e("edit-mileage"),onClick:T=>{T.stopPropagation(),V(!0),W(!0),j.trackReimbursementMileageRateEdit()}})})]}),c?.description!=null?t.jsx(Tt,{size:l,hasError:f,children:f&&e?.defaultMileageUnitAmount!=null?x.yourMileage.replace("__defaultMileageUnitAmount__",(e.defaultMileageUnitAmount*100).toString()):c.description}):null]})]})]})]})}const ft=(e,y)=>`${e}.${y}`,xt=i.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  pointer-events: ${e=>e.isLoading===!0||e.isActive===!1?"none":"initial"};
@@ -88,13 +88,13 @@ import{u as Ee,X as Ve,a1 as N,a as qe,c3 as Ge,M as Te,l as Ke,a7 as be,j as t,
88
88
  color: ${e=>e.hasError===!0?K.important:e.additionalInfoTextColor??e.theme.colors.hero};
89
89
  ${e=>`${ge.infoLabel.style(e.size)}`};
90
90
  margin-top: ${a.sp1};
91
- `,It=i.div`
91
+ `,Lt=i.div`
92
92
  display: flex;
93
93
  position: absolute;
94
94
  top: 50%;
95
95
  transform: translateY(-50%);
96
96
  right: ${a.sp3};
97
- `,Lt=i(dt)`
97
+ `,It=i(dt)`
98
98
  width: ${a.sp3};
99
99
  height: ${a.sp3};
100
100
  cursor: ${e=>e.isDisabled==null?"pointer":"default"};
@@ -103,7 +103,7 @@ import{u as Ee,X as Ve,a1 as N,a as qe,c3 as Ge,M as Te,l as Ke,a7 as be,j as t,
103
103
  &:hover {
104
104
  color: ${e=>e.theme.colors.primary};
105
105
  }
106
- `,p={titleWidth:new r(343,580,726,826),setupDetailsRowGap:new r(12,n[5],n[5]),sectionRowGap:new r(n[5],n[9],n[9]),lastSectionPaddingBottom:new r(n[7],n[10],n[10]),iconWidthHeight:new r(20,n[4]),subTitlePaddingTop:new r(12,n[3]),subTitlePaddingBottom:new r(n[3],n[3]),overlayWidth:new r(100,100,59)},Ae="remiSetupPage",q="remiAccount",G="remiMileage",ni=({remiSetupView:e,isDisabled:y,remiApprovalView:j,connectedAccountProvider:A,isAccountsEnabled:$,filesEndPoint:d,authParams:s,meetingUrl:Z,analytics:l,accountsPromoConfig:D,onBackClick:J,onBusinessVerificationSectionClick:Y,onSetupApprovalRulesSectionClick:E,onFetchLinkTokenClick:f,onEstablishConnectionClick:c,onEstablishConnectionSuccess:R,updateMileageDetails:C,onUpdateAccountClick:U,onUpdatePrimaryFundingAccount:Q,onUpdatePaymentAccountStatus:X,onUpdatePaymentAccountLoginStatus:ee,onEnableRemiClick:S,onEnableRemiSuccess:V,onSaveMileageClick:te,onClickMenuIcon:H,onEditFileName:x,onDeleteFile:ie,updateFilesEntity:ne,onCompanyOfficerUpdated:oe,onSendForVerificationClick:ae,onSignUpClick:T})=>{const W=Ee(),u=Ve(),[B,I]=o.useState(!1),{fetchState:v,primaryFundingAccount:b,allFundingAccounts:he,updateStatus:L,accountUpdateStatus:Ie,plaidConnectionDetails:le,allBankAccounts:Le,companyRemiInfo:ze,companyBillPayInfo:fe,mileageRateConfig:Me,isRefreshingViewInBackground:Fe,selectedCompanyOfficer:g}=e,{fetchState:xe,allApprovalRules:O,approvalRulesStatus:Re}=j,re=le.link_account.updateStatus,se=le.update_account.updateStatus,_=N(v),we=N(L.fetchState),ye=N(re.fetchState),Ce=N(se.fetchState),z=qe({mode:"all",reValidateMode:"onChange",defaultValues:o.useMemo(()=>pe(e),[e]),values:pe(e)});o.useEffect(()=>{!B&&g?.additionalDocumentTypesRequestedForVerification.includes("social_security_card")===!0&&g.areAdditionalDocumentsRequestedForVerification&&!g.areAdditionalDocumentsSubmittedForVerification&&g.userVerificationStatus?.code==="require_info"&&I(!0),B&&_==="In-Progress"&&v==="Completed"&&I(!1)},[g,v,_]),o.useEffect(()=>{(_==="In-Progress"&&v==="Completed"||ye==="In-Progress"&&re.fetchState==="Completed"||Ce==="In-Progress"&&se.fetchState==="Completed")&&z.reset(pe(e))},[_,v,z,e,ye,re.fetchState,Ce,se.fetchState]);const Ue=z.handleSubmit(P=>{l.trackEnableReimbursement(),S()}),He=async(P,F)=>{const m=F[q];if(P.includes(q)){if(P.includes("fundingAccount")){if(m.fundingAccount.selectedOption!=null&&b?.id!=m.fundingAccount.selectedOption){const w=he.find(me=>me.id===m.fundingAccount.selectedOption);w!=null&&Q(m.fundingAccount.selectedOption,w.accType)}}else if(m.account.selectedOption!=null&&b?.id!=null&&b?.zeniAccountId!=m.account.selectedOption){const w=m.account.allOptions.find(me=>me.value===m.account.selectedOption);w!=null&&typeof w.label=="string"&&l.trackConnectBankLink(w.value,w.label,"reimbursement"),U(m.account.selectedOption,b.id,b.accType)}}else if(P.includes(G)){const w=F[G];C(w)}};o.useEffect(()=>{const P=z.watch((F,{name:m})=>{m!=null&&F!=null&&Ge(()=>He(m,F))});return()=>{P.unsubscribe()}}),o.useEffect(()=>{we==="In-Progress"&&L.fetchState==="Completed"&&V()},[V,we,L.fetchState]);const{commonSetUp:Se,spendManagement:We}=Te.getLocalizedStrings(),{reimbursement:Be}=We,{reimbursementSetup:M}=Be,{setUp:k}=Se,ce=fe?.isBusinessVerified===!0&&(b?.accType==="depositAccount"||Ke.isVerifiedPaymentAccountProviderStatusCode(b?.providerVerificationStatus?.code??""))&&Me?.denominationConversions.amount!=null,de=ze?.isReimbursementEnabled===!0,Oe=ce?Se.setUp.setupVerifiedSubTitle:M.setupSubTitle,_e=v==="In-Progress"||v==="Not-Started"||xe==="In-Progress"||xe==="Not-Started",ue=W.mode==="light"?new be(W.colors.brandColorJadeLight):new be(W.colors.brandColorJadeDark),Ne=()=>{!B&&g?.additionalDocumentTypesRequestedForVerification.includes("social_security_card")===!0&&g.areAdditionalDocumentsRequestedForVerification&&!g.areAdditionalDocumentsSubmittedForVerification&&g.userVerificationStatus?.code==="require_info"?I(!0):Y?.()};return t.jsxs(zt,{children:[t.jsx(Ze,{anchor:"right",PaperProps:{style:{width:p.overlayWidth.valuePercentage(u),boxShadow:"none"}},open:B,onClose:()=>I(!1),style:{backgroundColor:K.drawerBackground},transitionDuration:250,children:t.jsx(pt,{authParams:s,filesEndPoint:d,updateStatus:L,onEditFileName:x,onDeleteFile:ie,updateFilesEntity:ne,companyOfficer:g,onClose:()=>I(!1),onCompanyOfficerUpdated:oe,onSendForVerificationClick:ae})}),t.jsx(Je,{title:M.setupTitle,backgroundColor:W.colors.grey4,style:{zIndex:3},onBackClick:J,showMenuIcon:!de&&(u==="medium-compact"||u==="small"),onClickMenuIcon:H,source:"ReimbursementSetUpPage"}),t.jsxs(Ft,{windowSize:u,children:[t.jsx(Mt,{windowSize:u,children:Oe}),_e?t.jsx(Rt,{children:t.jsx(Ye,{size:"ExtraLarge",start:!0})}):t.jsx(Qe,{...z,children:t.jsx("form",{id:De(Ae),onSubmit:Ue,children:t.jsxs(Ut,{windowSize:u,children:[t.jsx(je,{onClick:Ne,title:k.businessVerificationTitle,subTitle:k.businessVerificationSubTitle,header:k.businessVerificationHeader,icon:{element:t.jsx(Xe,{width:p.iconWidthHeight.valuePx(u),height:p.iconWidthHeight.valuePx(u)}),color:ue},status:fe?.businessVerificationStatus,isTagLoading:Fe}),t.jsx(mt,{connectedAccountProvider:A,primaryFundingAccount:b,plaidConnectionDetails:le,allBankAccounts:Le,allFundingAccounts:he,sectionId:q,isDisabled:y,onFetchLinkTokenClick:f,onEstablishConnectionClick:c,onUpdatePaymentAccountStatus:X,onUpdatePaymentAccountLoginStatus:ee,onEstablishConnectionSuccess:R,icon:{element:t.jsx(et,{width:p.iconWidthHeight.valuePx(u)}),color:ue},analytics:l,productType:"reimbursement",isAccountsEnabled:$,onSignUpClick:T,pageName:"Reimbursement Setup",accountsPromoConfig:D}),t.jsx(ht,{mileageDetails:e.mileageDetails,companyMileageConfigInfo:e.mileageRateConfig,sectionId:G,onSaveMileageClick:te,analytics:l}),t.jsx(je,{title:O.length>0?k.approvalTitle:k.createApprovalTitle,subTitle:M.approvalSubTitle,header:O.length>0?k.approvalHeader:k.setupApprovalHeader,icon:{element:t.jsx(tt,{height:p.iconWidthHeight.valuePx(u)}),color:ue},style:{paddingBottom:p.lastSectionPaddingBottom.valuePx(u)},onClick:E,status:O.length>0?Re:void 0})]})})})]}),ce&&!de&&O.length>0?t.jsx(it,{formId:De(Ae),primaryBtn:{label:M.enableReimbursements,style:{width:"auto",minWidth:u==="small"?"auto":"181px"},isLoading:L.fetchState==="In-Progress"||Ie.fetchState==="In-Progress",isDisabled:y!=null},showCancel:!1,helperText:M.terms,cancelBtn:{label:""},style:{padding:`12px ${a.sp3}`}}):null,t.jsx(ut,{isFooterRendered:ce&&!de,meetingUrl:Z,analytics:l,productType:"reimbursement"})]})},zt=i.div`
106
+ `,p={titleWidth:new r(343,580,726,826),setupDetailsRowGap:new r(12,n[5],n[5]),sectionRowGap:new r(n[5],n[9],n[9]),lastSectionPaddingBottom:new r(n[7],n[10],n[10]),iconWidthHeight:new r(20,n[4]),subTitlePaddingTop:new r(12,n[3]),subTitlePaddingBottom:new r(n[3],n[3]),overlayWidth:new r(100,100,59)},Ae="remiSetupPage",G="remiAccount",q="remiMileage",ni=({remiSetupView:e,isDisabled:y,remiApprovalView:j,connectedAccountProvider:A,isAccountsEnabled:$,filesEndPoint:d,authParams:s,meetingUrl:J,analytics:l,accountsPromoConfig:D,onBackClick:Z,onBusinessVerificationSectionClick:Q,onSetupApprovalRulesSectionClick:E,onFetchLinkTokenClick:f,onEstablishConnectionClick:c,onEstablishConnectionSuccess:R,updateMileageDetails:C,onUpdateAccountClick:U,onUpdatePrimaryFundingAccount:Y,onUpdatePaymentAccountStatus:X,onUpdatePaymentAccountLoginStatus:ee,onEnableRemiClick:S,onEnableRemiSuccess:V,onSaveMileageClick:te,onClickMenuIcon:W,onEditFileName:x,onDeleteFile:ie,updateFilesEntity:ne,onCompanyOfficerUpdated:oe,onSendForVerificationClick:ae,onSignUpClick:T})=>{const H=Ee(),u=Ve(),[O,L]=o.useState(!1),{fetchState:v,primaryFundingAccount:b,allFundingAccounts:he,updateStatus:I,accountUpdateStatus:Le,plaidConnectionDetails:le,allBankAccounts:Ie,companyRemiInfo:ze,companyBillPayInfo:fe,mileageRateConfig:Me,isRefreshingViewInBackground:Fe,selectedCompanyOfficer:g}=e,{fetchState:xe,allApprovalRules:B,approvalRulesStatus:Re}=j,re=le.link_account.updateStatus,se=le.update_account.updateStatus,_=N(v),we=N(I.fetchState),ye=N(re.fetchState),Ce=N(se.fetchState),z=Ge({mode:"all",reValidateMode:"onChange",defaultValues:o.useMemo(()=>pe(e),[e]),values:pe(e)});o.useEffect(()=>{!O&&g?.additionalDocumentTypesRequestedForVerification.includes("social_security_card")===!0&&g.areAdditionalDocumentsRequestedForVerification&&!g.areAdditionalDocumentsSubmittedForVerification&&g.userVerificationStatus?.code==="require_info"&&L(!0),O&&_==="In-Progress"&&v==="Completed"&&L(!1)},[g,v,_]),o.useEffect(()=>{(_==="In-Progress"&&v==="Completed"||ye==="In-Progress"&&re.fetchState==="Completed"||Ce==="In-Progress"&&se.fetchState==="Completed")&&z.reset(pe(e))},[_,v,z,e,ye,re.fetchState,Ce,se.fetchState]);const Ue=z.handleSubmit(P=>{l.trackEnableReimbursement(),S()}),We=async(P,F)=>{const m=F[G];if(P.includes(G)){if(P.includes("fundingAccount")){if(m.fundingAccount.selectedOption!=null&&b?.id!=m.fundingAccount.selectedOption){const w=he.find(me=>me.id===m.fundingAccount.selectedOption);w!=null&&Y(m.fundingAccount.selectedOption,w.accType)}}else if(m.account.selectedOption!=null&&b?.id!=null&&b?.zeniAccountId!=m.account.selectedOption){const w=m.account.allOptions.find(me=>me.value===m.account.selectedOption);w!=null&&typeof w.label=="string"&&l.trackConnectBankLink(w.value,w.label,"reimbursement"),U(m.account.selectedOption,b.id,b.accType)}}else if(P.includes(q)){const w=F[q];C(w)}};o.useEffect(()=>{const P=z.watch((F,{name:m})=>{m!=null&&F!=null&&qe(()=>We(m,F))});return()=>{P.unsubscribe()}}),o.useEffect(()=>{we==="In-Progress"&&I.fetchState==="Completed"&&V()},[V,we,I.fetchState]);const{commonSetUp:Se,spendManagement:He}=Te.getLocalizedStrings(),{reimbursement:Oe}=He,{reimbursementSetup:M}=Oe,{setUp:k}=Se,ce=fe?.isBusinessVerified===!0&&(b?.accType==="depositAccount"||Ke.isVerifiedPaymentAccountProviderStatusCode(b?.providerVerificationStatus?.code??""))&&Me?.denominationConversions.amount!=null,de=ze?.isReimbursementEnabled===!0,Be=ce?Se.setUp.setupVerifiedSubTitle:M.setupSubTitle,_e=v==="In-Progress"||v==="Not-Started"||xe==="In-Progress"||xe==="Not-Started",ue=H.mode==="light"?new be(H.colors.brandColorJadeLight):new be(H.colors.brandColorJadeDark),Ne=()=>{!O&&g?.additionalDocumentTypesRequestedForVerification.includes("social_security_card")===!0&&g.areAdditionalDocumentsRequestedForVerification&&!g.areAdditionalDocumentsSubmittedForVerification&&g.userVerificationStatus?.code==="require_info"?L(!0):Q?.()};return t.jsxs(zt,{children:[t.jsx(Je,{anchor:"right",PaperProps:{style:{width:p.overlayWidth.valuePercentage(u),boxShadow:"none"}},open:O,onClose:()=>L(!1),style:{backgroundColor:K.drawerBackground},transitionDuration:250,children:t.jsx(pt,{authParams:s,filesEndPoint:d,updateStatus:I,onEditFileName:x,onDeleteFile:ie,updateFilesEntity:ne,companyOfficer:g,onClose:()=>L(!1),onCompanyOfficerUpdated:oe,onSendForVerificationClick:ae})}),t.jsx(Ze,{title:M.setupTitle,backgroundColor:H.colors.grey4,style:{zIndex:3},onBackClick:Z,showMenuIcon:!de&&(u==="medium-compact"||u==="small"),onClickMenuIcon:W,source:"ReimbursementSetUpPage"}),t.jsxs(Ft,{windowSize:u,children:[t.jsx(Mt,{windowSize:u,children:Be}),_e?t.jsx(Rt,{children:t.jsx(Qe,{size:"ExtraLarge",start:!0})}):t.jsx(Ye,{...z,children:t.jsx("form",{id:De(Ae),onSubmit:Ue,children:t.jsxs(Ut,{windowSize:u,children:[t.jsx(je,{onClick:Ne,title:k.businessVerificationTitle,subTitle:k.businessVerificationSubTitle,header:k.businessVerificationHeader,icon:{element:t.jsx(Xe,{width:p.iconWidthHeight.valuePx(u),height:p.iconWidthHeight.valuePx(u)}),color:ue},status:fe?.businessVerificationStatus,isTagLoading:Fe}),t.jsx(mt,{connectedAccountProvider:A,primaryFundingAccount:b,plaidConnectionDetails:le,allBankAccounts:Ie,allFundingAccounts:he,sectionId:G,isDisabled:y,onFetchLinkTokenClick:f,onEstablishConnectionClick:c,onUpdatePaymentAccountStatus:X,onUpdatePaymentAccountLoginStatus:ee,onEstablishConnectionSuccess:R,icon:{element:t.jsx(et,{width:p.iconWidthHeight.valuePx(u)}),color:ue},analytics:l,productType:"reimbursement",isAccountsEnabled:$,onSignUpClick:T,pageName:"Reimbursement Setup",accountsPromoConfig:D}),t.jsx(ht,{mileageDetails:e.mileageDetails,companyMileageConfigInfo:e.mileageRateConfig,sectionId:q,onSaveMileageClick:te,analytics:l}),t.jsx(je,{title:B.length>0?k.approvalTitle:k.createApprovalTitle,subTitle:M.approvalSubTitle,header:B.length>0?k.approvalHeader:k.setupApprovalHeader,icon:{element:t.jsx(tt,{height:p.iconWidthHeight.valuePx(u)}),color:ue},style:{paddingBottom:p.lastSectionPaddingBottom.valuePx(u)},onClick:E,status:B.length>0?Re:void 0})]})})})]}),ce&&!de&&B.length>0?t.jsx(it,{formId:De(Ae),primaryBtn:{label:M.enableReimbursements,style:{width:"auto",minWidth:u==="small"?"auto":"181px"},isLoading:I.fetchState==="In-Progress"||Le.fetchState==="In-Progress",isDisabled:y!=null},showCancel:!1,helperText:M.terms,cancelBtn:{label:""},style:{padding:`12px ${a.sp3}`}}):null,t.jsx(ut,{isFooterRendered:ce&&!de,meetingUrl:J,analytics:l,productType:"reimbursement"})]})},zt=i.div`
107
107
  display: flex;
108
108
  min-height: 100%;
109
109
  flex-direction: column;
@@ -137,4 +137,4 @@ import{u as Ee,X as Ve,a1 as N,a as qe,c3 as Ge,M as Te,l as Ke,a7 as be,j as t,
137
137
  display: flex;
138
138
  flex-direction: column;
139
139
  row-gap: ${e=>p.sectionRowGap.valuePx(e.windowSize)};
140
- `,pe=e=>{const{allBankAccounts:y,allFundingAccounts:j,mileageDetails:A,primaryFundingAccount:$}=e,{localData:d}=A;return{[q]:{fundingAccount:{selectedOption:$?.id,allOptions:j.map(s=>({label:s.label,value:s.id,isRecommended:s.accType==="depositAccount"}))},account:{selectedOption:$?.zeniAccountId,allOptions:y.map(s=>({label:s.accountName,value:s.accountId}))}},[G]:{mileageAmount:d?.mileageUnitAmount?.amount,mileageCurrencyCode:d?.mileageCurrencyCode??"USD",mileageCurrencySymbol:d?.mileageCurrencySymbol??"$",mileageUnit:d?.mileageUnit??"",description:d?.description??"",mileageAmountInDenomination:d?.mileageAmountInDenomination,denomination:d?.denomination??"dollars",denominationSymbol:d?.denominationSymbol??""}}},De=e=>`${e}_form`;export{ni as default,De as uniqueName};
140
+ `,pe=e=>{const{allBankAccounts:y,allFundingAccounts:j,mileageDetails:A,primaryFundingAccount:$}=e,{localData:d}=A;return{[G]:{fundingAccount:{selectedOption:$?.id,allOptions:j.map(s=>({label:s.label,value:s.id,isRecommended:s.accType==="depositAccount"}))},account:{selectedOption:$?.zeniAccountId,allOptions:y.map(s=>({label:s.accountName,value:s.accountId}))}},[q]:{mileageAmount:d?.mileageUnitAmount?.amount,mileageCurrencyCode:d?.mileageCurrencyCode??"USD",mileageCurrencySymbol:d?.mileageCurrencySymbol??"$",mileageUnit:d?.mileageUnit??"",description:d?.description??"",mileageAmountInDenomination:d?.mileageAmountInDenomination,denomination:d?.denomination??"dollars",denominationSymbol:d?.denominationSymbol??""}}},De=e=>`${e}_form`;export{ni as default,De as uniqueName};
@@ -1 +1 @@
1
- import{M as N,j as b,bO as z,bQ as V,bR as W,jl as q,aa as G,l as Q}from"./index-BEYLWYh7.js";import{b as f}from"./vendor-CnQcJ2Lu.js";import{m as X}from"./ReviewOverlay-Dgnr47GU-pLIXYebD.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";const{common:n,spendManagement:{reimbursement:k}}=N.getLocalizedStrings(),o=k.bulkActions;let I;const ae=({remisReviewView:e,isAdmin:l,analytics:i,onProceedForBulkActionClick:d,onCloseReviewItem:r,onCloseOverlay:s})=>{const{fetchState:p,bulkSubmissionFetchState:c,bulkOperationTypeSelected:t,currentTab:v,currentSubTab:g}=e,h=!1,[w,a]=f.useState(!1),[m,_]=f.useState(R(e,h,l)),[x,P]=f.useState(h),[B,H]=f.useState(0),[y,A]=f.useState({type:"",title:"",description:"",primaryButtonText:"",secondaryButtonText:""});f.useEffect(()=>(B===m.length&&x&&(P(!1),clearInterval(I)),e.fetchState==="Completed"&&_(R(e,!1,l)),()=>{clearInterval(I)}),[m.length,B,x,e.fetchState,h,e,l]);const E=m.length,S=m.filter(u=>u.reviewStatus.code!=="error").length,F=()=>{const{title:u,description:T}=Y(S);A({type:"reject",title:u,description:T,primaryButtonText:n.texts.confirm,secondaryButtonText:n.texts.close}),i.trackReimbursementBulkSubmit(t,v,g),a(!0)},$={onOkClick:u=>{a(!1);const T=e.remisForReview.map(j=>j.reimbursement);i.trackReimbursementBulkPopupConfirm(t,v,g,Q.getRemiListUniqueType(T.map(j=>j?.reimbursementTypesIncluded??[]))),d("reject",u)},onCancelClick:()=>{a(!1)}},{title:L,description:U}=Z(p,S,E,x),C=e.fetchState==="Completed"&&S===0,O=()=>{i.trackReimbursementBulkSubmit(t,v,g),d(t)},D=()=>{let u=n.footer.approve;return C?u=n.texts.close:t==="send_for_approval"&&(u=n.footer.submit),{label:u,isDisabled:p!=="Completed"||t==="reject"&&c==="In-Progress",isLoading:c==="In-Progress"&&(t==="send_for_approval"||t==="approve"),onClick:C?s:O,style:t==="send_for_approval"?{minWidth:"92px"}:{}}},M={label:t==="send_for_approval"?n.texts.goBack:n.footer.reject,isDisabled:t!=="reject"&&c==="In-Progress",isLoading:t==="reject"&&c==="In-Progress",reverseSpinnerColor:!1,onClick:t==="send_for_approval"?s:F,style:t==="approve"?{minWidth:"92px"}:{}};return b.jsxs(b.Fragment,{children:[w?b.jsx(z,{titleComponent:b.jsx(W,{children:y.title}),descriptionComponent:b.jsx(V,{children:y.description}),primaryButtonText:y.primaryButtonText,proceedButtonVariant:"danger",secondaryButtonText:y.secondaryButtonText,action:$,isNotesIncluded:!0,isEditPopup:!0}):null,b.jsx(X,{title:L,description:{content:U,isError:e.fetchState==="Completed"&&S===0},reviewItems:m,onCloseReviewItem:r,onCloseOverlay:s,showFooter:e.fetchState==="Completed"&&!x,footerProps:{primaryButton:D(),cancelButton:M,hideCancel:C}})]})},R=(e,l,i)=>{const d=e.fetchState==="In-Progress";return e.remisForReview.map(r=>{const s=q(i,r.submittedBy);return{id:r.transactionId,leftSideText:{title:r.reimbursement?.reportTitle!=null?r.reimbursement.reportTitle:k.reimbursementDetail.newReimbursementTitle,subTitle:s!=null?`${n.by} ${s?.firstName} ${s?.lastName}`:n.strings.empty},rightSideText:{title:G("0,0.[00]",r.reimbursement?.amount?.amount,r.reimbursement?.amount?.currencySymbol),showThunderIcon:!1,subTitle:r.reviewInfoMessage??""},reviewStatus:{isLoading:d,code:r.reviewStatus??""}}})},Y=e=>{const{this_:l,these:i,report:d,reports:r,payment:s,payments:p}=n.texts;return e>1?{title:o.popUps.reject.title.replace("__report__",o.reports),description:o.popUps.reject.description.replaceAll("<_this_>",i).replaceAll("<_payment_>",p).replaceAll("__report__",r)}:{title:o.popUps.reject.title.replace("__report__",o.report),description:o.popUps.reject.description.replaceAll("<_this_>",l).replaceAll("<_payment_>",s).replaceAll("__report__",d)}},Z=(e,l,i,d)=>{const{has:r,have:s,report:p,reports:c,are:t,is:v,do_:g,does:h}=n.texts,w=l>1,a=i>1;let m="",_="";return e==="Completed"&&!d?(m=o.reviewPage.reportsReviewed.title.replace("__report__",a?k.bulkActions.reports:o.report).replace("<_has_>",a?s:r),l===0?_=o.reviewPage.reportsReviewed.descriptionError.replace("__report__",a?c:p).replace("<_do_>",a?g:h):_=`${l}/${i} ${o.reviewPage.reportsReviewed.description.replace("__report__",i>1?c:p).replace("<_is_>",w?t:v)}`):(m=o.reviewPage.reportsReviewing.title.replace("__report__",a?c:p),_=o.reviewPage.reportsReviewing.description.replace("__report__",a?c:p)),{title:m,description:_}};export{ae as default};
1
+ import{M as O,j as b,bR as z,bT as V,bU as W,jo as q,aa as G,l as X}from"./index-C2JVdK9x.js";import{b as f}from"./vendor-CnQcJ2Lu.js";import{m as Y}from"./ReviewOverlay-DItEmr7f-J3VxEX04.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";const{common:n,spendManagement:{reimbursement:k}}=O.getLocalizedStrings(),o=k.bulkActions;let I;const le=({remisReviewView:e,isAdmin:a,analytics:i,onProceedForBulkActionClick:d,onCloseReviewItem:r,onCloseOverlay:s})=>{const{fetchState:p,bulkSubmissionFetchState:c,bulkOperationTypeSelected:t,currentTab:v,currentSubTab:g}=e,h=!1,[w,l]=f.useState(!1),[m,_]=f.useState(R(e,h,a)),[x,P]=f.useState(h),[B,J]=f.useState(0),[y,A]=f.useState({type:"",title:"",description:"",primaryButtonText:"",secondaryButtonText:""});f.useEffect(()=>(B===m.length&&x&&(P(!1),clearInterval(I)),e.fetchState==="Completed"&&_(R(e,!1,a)),()=>{clearInterval(I)}),[m.length,B,x,e.fetchState,h,e,a]);const E=m.length,S=m.filter(u=>u.reviewStatus.code!=="error").length,F=()=>{const{title:u,description:C}=Z(S);A({type:"reject",title:u,description:C,primaryButtonText:n.texts.confirm,secondaryButtonText:n.texts.close}),i.trackReimbursementBulkSubmit(t,v,g),l(!0)},U={onOkClick:u=>{l(!1);const C=e.remisForReview.map(j=>j.reimbursement);i.trackReimbursementBulkPopupConfirm(t,v,g,X.getRemiListUniqueType(C.map(j=>j?.reimbursementTypesIncluded??[]))),d("reject",u)},onCancelClick:()=>{l(!1)}},{title:$,description:L}=H(p,S,E,x),T=e.fetchState==="Completed"&&S===0,D=()=>{i.trackReimbursementBulkSubmit(t,v,g),d(t)},M=()=>{let u=n.footer.approve;return T?u=n.texts.close:t==="send_for_approval"&&(u=n.footer.submit),{label:u,isDisabled:p!=="Completed"||t==="reject"&&c==="In-Progress",isLoading:c==="In-Progress"&&(t==="send_for_approval"||t==="approve"),onClick:T?s:D,style:t==="send_for_approval"?{minWidth:"92px"}:{}}},N={label:t==="send_for_approval"?n.texts.goBack:n.footer.reject,isDisabled:t!=="reject"&&c==="In-Progress",isLoading:t==="reject"&&c==="In-Progress",reverseSpinnerColor:!1,onClick:t==="send_for_approval"?s:F,style:t==="approve"?{minWidth:"92px"}:{}};return b.jsxs(b.Fragment,{children:[w?b.jsx(z,{titleComponent:b.jsx(W,{children:y.title}),descriptionComponent:b.jsx(V,{children:y.description}),primaryButtonText:y.primaryButtonText,proceedButtonVariant:"danger",secondaryButtonText:y.secondaryButtonText,action:U,isNotesIncluded:!0,isEditPopup:!0}):null,b.jsx(Y,{title:$,description:{content:L,isError:e.fetchState==="Completed"&&S===0},reviewItems:m,onCloseReviewItem:r,onCloseOverlay:s,showFooter:e.fetchState==="Completed"&&!x,footerProps:{primaryButton:M(),cancelButton:N,hideCancel:T}})]})},R=(e,a,i)=>{const d=e.fetchState==="In-Progress";return e.remisForReview.map(r=>{const s=q(i,r.submittedBy);return{id:r.transactionId,leftSideText:{title:r.reimbursement?.reportTitle!=null?r.reimbursement.reportTitle:k.reimbursementDetail.newReimbursementTitle,subTitle:s!=null?`${n.by} ${s?.firstName} ${s?.lastName}`:n.strings.empty},rightSideText:{title:G("0,0.[00]",r.reimbursement?.amount?.amount,r.reimbursement?.amount?.currencySymbol),showThunderIcon:!1,subTitle:r.reviewInfoMessage??""},reviewStatus:{isLoading:d,code:r.reviewStatus??""}}})},Z=e=>{const{this_:a,these:i,report:d,reports:r,payment:s,payments:p}=n.texts;return e>1?{title:o.popUps.reject.title.replace("__report__",o.reports),description:o.popUps.reject.description.replaceAll("<_this_>",i).replaceAll("<_payment_>",p).replaceAll("__report__",r)}:{title:o.popUps.reject.title.replace("__report__",o.report),description:o.popUps.reject.description.replaceAll("<_this_>",a).replaceAll("<_payment_>",s).replaceAll("__report__",d)}},H=(e,a,i,d)=>{const{has:r,have:s,report:p,reports:c,are:t,is:v,do_:g,does:h}=n.texts,w=a>1,l=i>1;let m="",_="";return e==="Completed"&&!d?(m=o.reviewPage.reportsReviewed.title.replace("__report__",l?k.bulkActions.reports:o.report).replace("<_has_>",l?s:r),a===0?_=o.reviewPage.reportsReviewed.descriptionError.replace("__report__",l?c:p).replace("<_do_>",l?g:h):_=`${a}/${i} ${o.reviewPage.reportsReviewed.description.replace("__report__",i>1?c:p).replace("<_is_>",w?t:v)}`):(m=o.reviewPage.reportsReviewing.title.replace("__report__",l?c:p),_=o.reviewPage.reportsReviewing.description.replace("__report__",l?c:p)),{title:m,description:_}};export{le as default};
@@ -1,4 +1,4 @@
1
- import{u as h,j as r,W as a,Y as m,ah as j,M as C,a4 as l,aY as x,v as g,o as c,ai as f}from"./index-BEYLWYh7.js";import{n as s,b as d}from"./vendor-CnQcJ2Lu.js";function p({backgroundColor:e,foregroundColor:o,animated:t,width:i,height:n}){return r.jsxs(x,{speed:2,width:i,height:n,viewBox:`0 0 ${i} ${n}`,animate:t!=!1,backgroundColor:e,foregroundColor:o,children:[r.jsx("rect",{x:"64",y:"0",rx:"4",ry:"4",width:`${i-128}`,height:"21"}),r.jsx("rect",{x:"24",y:"45",rx:"4",ry:"4",width:`${i-48}`,height:"228"})]})}function w({backgroundColor:e,foregroundColor:o,animated:t}){return r.jsxs(x,{speed:2,width:240,height:98,viewBox:"0 0 240 98",animate:t!=!1,backgroundColor:e,foregroundColor:o,children:[r.jsx("rect",{x:"66",y:"0",rx:"4",ry:"4",width:"108",height:"21"}),r.jsx("rect",{x:"44",y:"77",rx:"4",ry:"4",width:"152",height:"21"}),r.jsx("rect",{x:"0",y:"29",rx:"4",ry:"4",width:"240",height:"40"})]})}const u=s(l)`
1
+ import{u as h,j as r,W as a,Y as m,ah as j,M as C,a4 as l,aY as x,v as g,o as c,ai as f}from"./index-C2JVdK9x.js";import{n as s,b as d}from"./vendor-CnQcJ2Lu.js";function p({backgroundColor:e,foregroundColor:o,animated:t,width:i,height:n}){return r.jsxs(x,{speed:2,width:i,height:n,viewBox:`0 0 ${i} ${n}`,animate:t!=!1,backgroundColor:e,foregroundColor:o,children:[r.jsx("rect",{x:"64",y:"0",rx:"4",ry:"4",width:`${i-128}`,height:"21"}),r.jsx("rect",{x:"24",y:"45",rx:"4",ry:"4",width:`${i-48}`,height:"228"})]})}function w({backgroundColor:e,foregroundColor:o,animated:t}){return r.jsxs(x,{speed:2,width:240,height:98,viewBox:"0 0 240 98",animate:t!=!1,backgroundColor:e,foregroundColor:o,children:[r.jsx("rect",{x:"66",y:"0",rx:"4",ry:"4",width:"108",height:"21"}),r.jsx("rect",{x:"44",y:"77",rx:"4",ry:"4",width:"152",height:"21"}),r.jsx("rect",{x:"0",y:"29",rx:"4",ry:"4",width:"240",height:"40"})]})}const u=s(l)`
2
2
  justify-content: flex-start;
3
3
  `;function T({dimension:e,animated:o}){const t=h();return r.jsx(a,{dimension:e,children:r.jsx(u,{children:r.jsx(w,{backgroundColor:t.colors.grey3,foregroundColor:t.colors.grey4,animated:o})})})}function M({dimension:e,animated:o}){const t=h();return r.jsx(a,{dimension:e,children:r.jsx(u,{children:r.jsx("div",{style:{width:"100%",height:"100%"},children:r.jsx(f,{children:({height:i,width:n})=>r.jsx(p,{backgroundColor:t.colors.grey3,foregroundColor:t.colors.grey4,animated:o,width:n,height:i})})})})})}const y=e=>d.createElement("svg",{viewBox:"0 0 72 72",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},d.createElement("rect",{opacity:.2,width:72,height:72,rx:36,fill:"#97C3B9"}),d.createElement("path",{d:"M46.7755 32.5635L43.8368 36.9716L40.4082 33.0533",stroke:"#97C3B9",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),d.createElement("path",{d:"M34.5307 44.8163C32.6902 44.8163 30.8909 44.2705 29.3605 43.248C27.8301 42.2254 26.6374 40.772 25.933 39.0715C25.2286 37.3711 25.0443 35.4999 25.4034 33.6947C25.7625 31.8895 26.6488 30.2313 27.9503 28.9298C29.2518 27.6283 30.91 26.742 32.7152 26.3829C34.5204 26.0238 36.3916 26.2081 38.092 26.9125C39.7925 27.6169 41.2459 28.8096 42.2685 30.34C43.291 31.8704 43.8369 33.6697 43.8369 35.5102V36.9737",stroke:"#97C3B9",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),k=s(l)`
4
4
  justify-content: space-between;
@@ -1,4 +1,4 @@
1
- import{u as X,X as ie,bC as me,a as fe,j as o,f as ge,M as Z,bD as ee,F as xe,C as P,a3 as be,o as n,bE as ye,bF as _e,bG as we,bH as $e,bI as ve,e as ce,bJ as Ce,m as p,v as ke,H as K,aY as je,a7 as Ne,s as Se,b0 as Ie}from"./index-BEYLWYh7.js";import{b as f,f as de,n as d}from"./vendor-CnQcJ2Lu.js";import{W as D,R as Pe}from"./CollapsableReportTable-CWIVhYku-DzNE0ECl.js";const z=Z.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=Z.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`
1
+ import{u as X,X as ie,bF as me,a as fe,j as o,m as ge,M as Z,bG as ee,F as xe,C as P,a3 as be,o as n,bH as ye,bI as _e,bJ as we,bK as $e,bL as ve,f as ce,bM as Ce,p,v as ke,B as Q,aY as je,a7 as Ne,s as Se,b0 as Ie}from"./index-C2JVdK9x.js";import{b as f,f as de,n as d}from"./vendor-CnQcJ2Lu.js";import{W as F,R as Pe}from"./CollapsableReportTable-C73RBmaZ-A1Br721z.js";const z=Z.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 no(e,c,a){const t=Z.getLocalizedStrings().downloadReport,r=`${e}?query=${encodeURIComponent(JSON.stringify(De(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 Be=d.div`
2
2
  padding: 0 ${n.sp3} 0 ${n.sp3};
3
3
  border: 1px solid ${e=>e.theme.colors.primary};
4
4
  background: ${e=>e.theme.colors.grey5};
@@ -9,7 +9,7 @@ import{u as X,X as ie,bC as me,a as fe,j as o,f as ge,M as Z,bD as ee,F as xe,C
9
9
  position: relative;
10
10
  height: ${n.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)`
@@ -20,10 +20,10 @@ import{u as X,X as ie,bC as me,a as fe,j as o,f as ge,M as Z,bD as ee,F as xe,C
20
20
  :hover {
21
21
  color: ${e=>e.theme.colors.primary};
22
22
  }
23
- `,Ae=e=>{const{value:c,onClick:a}=e,t=X();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:a}=e,t=X();return o.jsxs(Be,{onClick:a,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: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=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: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=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:[...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`
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=X(),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),G="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=V(i);for(const C of m.children)O?.(C.classId,l),w(C.classId,l)},V=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},J=i=>{if(i.length>1){const l=V(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&&J(M)}),f.useEffect(()=>{const i={reportId:e,displayOrder:"ascending_date",reportFormat:"more_detailed",mode:G,firstMonthOfFY:c,filterAccountsWithNilBalances:"off",filterAccountGroupsWithNilBalances:"off",showNegativeAmountInParenthesis:!1,isClassToBeFilteredOut:L,showClassAccountNumber:h};if($==null||!K(g,a)||!K(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[q,Q]=f.useState(5),A=i=>{const l=i+p[6];Q(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(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
+ `,Ye=({reportId:e,firstMonthOfFY:c,nestedClassHierarchy:a,classesToBeFilteredOut:t,selectedView:r,showClassAccountNumber:h,scrollPosition:b,onScroll:y,nodeOpenStatus:O,onNodeCollapseToggled:U,onToggleCheck:D})=>{const Y=X(),H=ie(),[$,j]=f.useState(void 0),[T,_]=f.useState(!1),[M,B]=f.useState({}),[g,W]=f.useState(void 0),[E,v]=f.useState(r),G="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=V(i);for(const C of m.children)D?.(C.classId,l),w(C.classId,l)},V=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},J=i=>{if(i.length>1){const l=V(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:G,firstMonthOfFY:c,filterAccountsWithNilBalances:"off",filterAccountGroupsWithNilBalances:"off",showNegativeAmountInParenthesis:!1,isClassToBeFilteredOut:L,showClassAccountNumber:h};if($==null||!Q(g,a)||!Q(E,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[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(Y.colors.background):void 0,rootNodes:$,type:"name_only",compareMode:"compare_mode_amount",isSticky:{isStickyHeader:!1,isStickyName:!1},treeNodePadding:{left:oe.contentPaddingLeft.value(H),right:oe.contentPaddingRight.value(H)},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)},He=d.div`
27
27
  position: relative;
28
28
  pointer-events: ${e=>e.isDisabled===!0?"none":"initial"};
29
29
  `,Ge=d.div`
@@ -117,13 +117,13 @@ import{u as X,X as ie,bC as me,a as fe,j as o,f as ge,M as Z,bD as ee,F as xe,C
117
117
  min-height: 165px;
118
118
  max-height: 353px;
119
119
  overscroll-behavior: contain;
120
- `,Qe=d.div`
120
+ `,Ke=d.div`
121
121
  width: 100%;
122
122
  height: 65px;
123
123
  `,ae=d.label`
124
124
  color: ${e=>e.theme.colors.primary};
125
125
  cursor: ${e=>e.disabled===!0?"default":"pointer"};
126
- `,Ke=d(ce)`
126
+ `,Qe=d(ce)`
127
127
  display: flex;
128
128
  align-items: center;
129
129
  column-gap: ${n.sp2};
@@ -147,4 +147,4 @@ import{u as X,X as ie,bC as me,a as fe,j as o,f as ge,M as Z,bD as ee,F as xe,C
147
147
  margin-left: ${n.sp5};
148
148
  margin-top: -12px;
149
149
  color: ${e=>e.theme.colors.hero};
150
- `,{reportViewSelector:I,common:{footer:ne}}=Z.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=X(),_=ie(),[M,E]=f.useState(!1),[g,W]=f.useState(r),[B,v]=f.useState({}),G=(s,u)=>(s.forEach(x=>{u.push(x.classId),u=G(x.children,u)}),u),L=G(a,[]),[N,w]=f.useState(g==="classes"?h:L),V=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"}),Q=q.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:J(r),onClick:()=>{y?.(),i()}}):o.jsxs(Ge,{windowSize:_,children:[o.jsxs(Ve,{onClick:s=>{s.preventDefault(),y?.(),i()},children:[o.jsx(Je,{className:"dropdownIcon"}),J(r)]}),r==="classes"?o.jsx(Ke,{onClick:C,children:$?I.generatingReportByClass:o.jsxs(o.Fragment,{children:[j&&`${ee(j)}`,o.jsx(Ze,{})]})}):null]}),M?o.jsx(xe,{...q,children:o.jsx("form",{id:le(re),onSubmit:Q,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(ae,{disabled:t!=="Completed",children:H===!0?I.accountGroups.dropdownLabel:I.accounts.dropdownLabel})]})}),o.jsx(Xe,{}),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(Qe,{children:o.jsx(be,{formId:le(re),primaryBtn:{label:ne.save,style:{width:k.buttonWidth.valuePx(_),height:k.buttonHeight.valuePx(_)},isLoading:!1,isDisabled:V,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,K);export{no as c,ro as h};
150
+ `,{reportViewSelector:I,common:{footer:ne}}=Z.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:O,isClassViewDisabled:U,downloadPage:D,showAccountGroups:Y=!0,onResyncReports:H,isPageFetchInProgress:$=!1,lastRefreshSuccessTime:j}){const T=X(),_=ie(),[M,B]=f.useState(!1),[g,W]=f.useState(r),[E,v]=f.useState({}),G=(s,u)=>(s.forEach(x=>{u.push(x.classId),u=G(x.children,u)}),u),L=G(a,[]),[N,w]=f.useState(g==="classes"?h:L),V=t!=="Completed"||g==="classes"&&N.length===L.length;me({componentName:`reports.${e}`});const J=s=>s==="classes"?I.classes.label:Y===!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(W(s),s==="classes")v({}),w([]);else{w(L);let u={};a.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={};a.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&&(W("classes"),w(L)),u===!0){const S=F("checkbox_and_name_only",[],s[0]);E[S]=!0,v(E),w(R=>R.filter(pe=>pe[0]!==s[0]))}else{const S=F("checkbox_and_name_only",[],s[0]);E[S]=!1,N.find(R=>R[0]===s[0])===void 0&&w(R=>[...R,s])}},m=()=>{B(!1),W(r),w(h)},C=()=>{$===!1&&H?.()};return f.useEffect(()=>{if(t==="Completed"&&g==="account_group"){let s={};a.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(He,{isDisabled:U??!1,children:[D===!0?o.jsx(Te,{value:J(r),onClick:()=>{y?.(),i()}}):o.jsxs(Ge,{windowSize:_,children:[o.jsxs(Ve,{onClick:s=>{s.preventDefault(),y?.(),i()},children:[o.jsx(Je,{className:"dropdownIcon"}),J(r)]}),r==="classes"?o.jsx(Qe,{onClick:C,children:$?I.generatingReportByClass:o.jsxs(o.Fragment,{children:[j&&`${ee(j)}`,o.jsx(Ze,{})]})}):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(ae,{disabled:t!=="Completed",children:Y===!0?I.accountGroups.dropdownLabel:I.accounts.dropdownLabel})]})}),o.jsx(Xe,{}),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: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:ne.save,style:{width:k.buttonWidth.valuePx(_),height:k.buttonHeight.valuePx(_)},isLoading:!1,isDisabled:V,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(Ye,Q);export{no 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,Y as k,be as fe,aX as me,aV as ge,C as v,o as C,a5 as _e,c as be,bf as Se,m as w,D as B,H as J,bg as we,a7 as Ce,aB as ye,a_ as xe}from"./index-BEYLWYh7.js";import{b as P,f as K,n as b}from"./vendor-CnQcJ2Lu.js";import{m as z,l as Z}from"./analyticsHelper-mARzqEfV-glOPluPl.js";import{h as Oe}from"./ReportTableViewSelector-BSPNRs-f-BSuMcYEk.js";import{a as Q,p as Re}from"./TimeRangeSwitcher-DR2s6McL-3_tMweub.js";import{M as Ae}from"./TimeframeSwitcherWithToggle-CxsK8B8h-Cc3bm2cD.js";import{DownloadOverlayButton as Be}from"./DownloadOverlay-BrVMY7u8-nMRk4mVN.js";import{R as ve,W as F,x as ee}from"./CollapsableReportTable-CWIVhYku-DzNE0ECl.js";import{T as te,I as se,L as j,D as Le,g as ne}from"./mapSectionWithAcOnlyToTreeNode-CAhuUnXV-B-V1WxKb.js";import{s as Y}from"./mapTimeframeBalancesToTreeNode-BU0Ph9My-DP-H6YbL.js";import{d as Te,l as Pe}from"./mapTimeframeHeaderLoadingInProgressToTreeNode-Bkav2l0W-kqY2QYd9.js";import{d as ke}from"./mapLoadingInProgressToTreeNode-D9ofcMAJ-DzcUuzrj.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-CR_Pithb-DBISxzXu.js";import"./page-detail-CWX5S47F-B6DjZ3Gi.js";import"./AccountRow-DAc1wwY9-C0HqOA9-.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,M as y,V as he,l as _,j as r,Y as k,be as fe,aX as me,aV as ge,C as v,o as C,a5 as _e,d as be,bf as Se,p as w,A as B,B as J,bg as we,a7 as Ce,aB as ye,a_ as xe}from"./index-C2JVdK9x.js";import{b as P,f as K,n as b}from"./vendor-CnQcJ2Lu.js";import{m as z,l as H}from"./analyticsHelper-Cawv3PXO-DqLgneHd.js";import{h as Oe}from"./ReportTableViewSelector-BTu2hum1-C1Mbyqo-.js";import{a as Q,p as Re}from"./TimeRangeSwitcher-D7-Jph-G-Cn7zeCi8.js";import{M as Ae}from"./TimeframeSwitcherWithToggle-QOhQ3sac-BtE_j2V5.js";import{DownloadOverlayButton as Be}from"./DownloadOverlay-D0_pmb7k-BhK-Q9wQ.js";import{R as ve,W as F,x as ee}from"./CollapsableReportTable-C73RBmaZ-A1Br721z.js";import{T as te,I as se,L as j,D as Le,g as ne}from"./mapSectionWithAcOnlyToTreeNode-IKJYFM7_-BiH-dZ1q.js";import{s as Y}from"./mapTimeframeBalancesToTreeNode-SX6fBp6e-DSWmrMTg.js";import{d as Te,l as Pe}from"./mapTimeframeHeaderLoadingInProgressToTreeNode-Ts5lOZtX-DZNSlCJx.js";import{d as ke}from"./mapLoadingInProgressToTreeNode-CwyU1xs5-DTtIWEnS.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-CWYQWFLF-B37Mzr7G.js";import"./page-detail-CWX5S47F-B6DjZ3Gi.js";import"./AccountRow-CtIoeB6x-B01gigKX.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,Z=D??pe;Z?.additionalBalances!=null&&(m=Z.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`
7
7
  display: flex;
8
8
  flex-direction: row;
9
9
  border-bottom: 1px solid ${e=>e.theme.colors.grey3};
@@ -24,7 +24,7 @@ import{X as U,u as G,M as y,w as he,l as _,j as r,Y as k,be as fe,aX as me,aV as
24
24
  &:hover {
25
25
  color: ${e=>e.theme.colors.primary};
26
26
  }
27
- `,He=b.div`
27
+ `,Ze=b.div`
28
28
  height: 2px;
29
29
  background-color: ${e=>e.theme.colors.primary};
30
30
  border-radius: 1px;
@@ -49,7 +49,7 @@ import{X as U,u as G,M as y,w as he,l as _,j as r,Y 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 He({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(He,{reportId:n,isSelected:t===n,onClick:a}),r.jsx(Ze,{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`
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,Y 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=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,H(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,H(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`
102
102
  padding-right: ${e=>I.contentRightPadding.valuePx(e.windowSize)};
103
103
  `,ut=b.div`
104
104
  margin-top: ${C.sp3};
@@ -1,4 +1,4 @@
1
- import{u as A,j as a,M as S,X as de,Y as Ae,ai as Q,b5 as Te,m as E,b6 as J,au as ee,p as M,at as ae,aa 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,s as R,bd as F,ao as V}from"./index-BEYLWYh7.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-CedtWDkU-D_XzUeW6.js";import{i as K,h as se,c as I}from"./toCOABalancesWithID-CCW7YVfm-BLH1CPxw.js";import{V as Z}from"./toChartData-C3kVg0fD-Dm5_eyYk.js";const X={legendLabelMarginLeft:new xe(2,2),legendLabelMarginRight:new xe(E[3],E[4])},Ve=x.div`
1
+ import{u as A,j as a,M as S,X as de,Y as Ae,ai as Q,b5 as Te,p as E,b6 as J,au as ee,q as M,at as ae,aa as re,b7 as oe,b8 as ge,o as m,b9 as te,g,B as Fe,ba as pe,bb as me,C as xe,bc as fe,s as R,bd as F,ao as V}from"./index-C2JVdK9x.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-5p7NWUHx-6R9pye-p.js";import{i as K,h as se,c as I}from"./toCOABalancesWithID-DwvFse7w-YhdHXdmt.js";import{V as Z}from"./toChartData-BBvMC_VQ-D9RVT7PQ.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};
@@ -13,13 +13,13 @@ import{u as A,j as a,M as S,X as de,Y as Ae,ai as Q,b5 as Te,m as E,b6 as J,au a
13
13
  flex-direction: column;
14
14
  padding: ${m.sp3};
15
15
  background-color: ${e=>e.theme.colors.black};
16
- `,Xe=x(R)`
16
+ `,qe=x(R)`
17
17
  color: ${e=>e.color??g.neutralGrey2Light};
18
18
  text-align: left;
19
19
  display: flex;
20
20
  align-items: center;
21
21
  justify-content: space-between;
22
- `,qe=x(R)`
22
+ `,Xe=x(R)`
23
23
  background-color: ${e=>e.color};
24
24
  height: 12px;
25
25
  width: 12px;
@@ -29,18 +29,18 @@ import{u as A,j as a,M as S,X as de,Y as Ae,ai as Q,b5 as Te,m as E,b6 as J,au a
29
29
  text-align: left;
30
30
  `,Ze=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(Xe,{color:r.color,children:[a.jsxs(Ue,{children:[a.jsx(qe,{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
+ `,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`
33
33
  width: ${e=>e.width}px;
34
34
  height: ${e=>e.height}px;
35
35
 
36
36
  .recharts-legend-item {
37
- margin-right: ${e=>X.legendLabelMarginRight.valuePx(e.windowSize)} !important;
37
+ margin-right: ${e=>q.legendLabelMarginRight.valuePx(e.windowSize)} !important;
38
38
  :last-of-type {
39
39
  margin-right: ${m.sp0} !important;
40
40
  }
41
41
  }
42
42
  `,oa=x(fe)`
43
- margin-left: ${e=>X.legendLabelMarginLeft.valuePx(e.windowSize)};
43
+ margin-left: ${e=>q.legendLabelMarginLeft.valuePx(e.windowSize)};
44
44
  color: ${e=>e.theme.colors.primary};
45
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`
46
46
  display: flex;
@@ -133,13 +133,13 @@ import{u as A,j as a,M as S,X as de,Y as Ae,ai as Q,b5 as Te,m as E,b6 as J,au a
133
133
  height: ${e=>e.height}px;
134
134
 
135
135
  .recharts-legend-item {
136
- margin-right: ${e=>X.legendLabelMarginRight.valuePx(e.windowSize)} !important;
136
+ margin-right: ${e=>q.legendLabelMarginRight.valuePx(e.windowSize)} !important;
137
137
  :last-of-type {
138
138
  margin-right: ${m.sp0} !important;
139
139
  }
140
140
  }
141
141
  `,Ta=x(fe)`
142
- margin-left: ${e=>X.legendLabelMarginLeft.valuePx(e.windowSize)};
142
+ margin-left: ${e=>q.legendLabelMarginLeft.valuePx(e.windowSize)};
143
143
  color: ${e=>e.theme.colors.primary};
144
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`
145
145
  display: flex;
@@ -189,10 +189,10 @@ import{u as A,j as a,M as S,X as de,Y as Ae,ai as Q,b5 as Te,m as E,b6 as J,au a
189
189
  `,Fa=x(R)`
190
190
  text-align: left;
191
191
  width: 162px;
192
- `,q=x(V)`
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(q,{children:e.actual!=null?`${T(e.actual)}`:"-"}),a.jsx(q,{children:e.forecast!=null?`${T(e.forecast.value)}`:"-"}),e.forecast!=null?a.jsx(q,{isChange:!0,children:`${T(e.forecast.change)}`}):a.jsx(q,{children:"-"}),e.forecast!=null?a.jsx(q,{isChange:!0,children:F("0,0.0%",e.forecast.percent)}):a.jsx(q,{children:"-"})]}),Ya=e=>{if(e.length>0){for(const r of e)if(r.actual!=null)return r.actual.currencySymbol}return""},Xa=({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)}`})]})}),qa=({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(qa,{barLabelsWithValues:r}):a.jsx(Xa,{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})})},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`
196
196
  width: ${e=>e.width}px;
197
197
  height: ${e=>e.height}px;
198
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`
@@ -268,13 +268,13 @@ import{u as A,j as a,M as S,X as de,Y as Ae,ai as Q,b5 as Te,m as E,b6 as J,au a
268
268
  height: ${e=>e.height}px;
269
269
 
270
270
  .recharts-legend-item {
271
- margin-right: ${e=>X.legendLabelMarginRight.valuePx(e.windowSize)} !important;
271
+ margin-right: ${e=>q.legendLabelMarginRight.valuePx(e.windowSize)} !important;
272
272
  :last-of-type {
273
273
  margin-right: ${m.sp0} !important;
274
274
  }
275
275
  }
276
276
  `,_r=x(fe)`
277
- margin-left: ${e=>X.legendLabelMarginLeft.valuePx(e.windowSize)};
278
- margin-right: ${e=>X.legendLabelMarginRight.valuePx(e.windowSize)};
277
+ margin-left: ${e=>q.legendLabelMarginLeft.valuePx(e.windowSize)};
278
+ margin-right: ${e=>q.legendLabelMarginRight.valuePx(e.windowSize)};
279
279
  color: ${e=>e.theme.colors.primary};
280
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};