@zeniai/web-cockpit-ui 1.14.88-qa → 1.14.89-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 (232) hide show
  1. package/dist/assets/{ACHDetailsPage-BBq7KpbY-CZpHxE8o.js → ACHDetailsPage-BBq7KpbY-DmD51smT.js} +1 -1
  2. package/dist/assets/{AIPerformancePage-Djq6mgKa-BXA2rEQ3.js → AIPerformancePage-Djq6mgKa-C2iGvIUP.js} +11 -11
  3. package/dist/assets/{AccountInfoPage-CxWBk_t_-C2BQHsrc.js → AccountInfoPage-CxWBk_t_-BI9wbnyE.js} +1 -1
  4. package/dist/assets/{AccountInfoPageContent-DO6aVqBW-BHlSBq6C.js → AccountInfoPageContent-DO6aVqBW-6U18ww_h.js} +1 -1
  5. package/dist/assets/{AccountLockedInfoModal-DVvzKHJQ-XsgYaZ9s.js → AccountLockedInfoModal-DVvzKHJQ-BlItIAEt.js} +1 -1
  6. package/dist/assets/{AccountReconDetailsDrawerPage-DEKzSPCP-IJ1uxgeX.js → AccountReconDetailsDrawerPage-DEKzSPCP-DohPnhDC.js} +14 -14
  7. package/dist/assets/{AccountRow-Ck53DDbT-CKEPVSTV.js → AccountRow-Ck53DDbT-BeebPIea.js} +21 -21
  8. package/dist/assets/{AccountsPromoCardStack-BYjuB-4I-DBGri4Ao.js → AccountsPromoCardStack-BYjuB-4I-DMxflS-k.js} +8 -8
  9. package/dist/assets/{AddAddressForCardDrawer-e8qbO2Y5-CCW44Lbp.js → AddAddressForCardDrawer-e8qbO2Y5-CvQDLLw2.js} +1 -1
  10. package/dist/assets/{AddToWalletPage-DA6AmuaY-D_ysmfWw.js → AddToWalletPage-DA6AmuaY-e01eq7ol.js} +5 -5
  11. package/dist/assets/{AgingReportsPage-B_Hhl_Is-yJ7Ku3Be.js → AgingReportsPage-B_Hhl_Is-4sV-u-EE.js} +5 -5
  12. package/dist/assets/{AllUserItems-BV22Ibpn-D42Co1mB.js → AllUserItems-BV22Ibpn-WegHhloq.js} +1 -1
  13. package/dist/assets/{ApAgingDetailPage-DqV1vOVH-BwJKl2yK.js → ApAgingDetailPage-DqV1vOVH-DDYGtIes.js} +1 -1
  14. package/dist/assets/{AppBasePage-LrgCcvIv-CEyT0Ays.js → AppBasePage-LrgCcvIv-CPbTcwwM.js} +4 -4
  15. package/dist/assets/{AppDrawerContent-aZG5Qc_X-DQOHVYFR.js → AppDrawerContent-aZG5Qc_X-0oLi5_ah.js} +1 -1
  16. package/dist/assets/ApprovalRulesSettingsPage-DQQw30S5-BEsS6TL7.js +47 -0
  17. package/dist/assets/{ArAgingChart-Am7LTkqG-GS7CQpoV.js → ArAgingChart-Am7LTkqG-CEoxIo8X.js} +4 -4
  18. package/dist/assets/{ArAgingDetailPage-BEKsyA9Q-CT83CSJd.js → ArAgingDetailPage-BEKsyA9Q-DyjljPZX.js} +1 -1
  19. package/dist/assets/{AttachmentView-Bujbmx1d-DpzwMH5w.js → AttachmentView-Bujbmx1d-B9I0wNAl.js} +1 -1
  20. package/dist/assets/{BankAccountSection-C5rYUW3V-BgvhKGl7.js → BankAccountSection-C5rYUW3V-B24i3wVy.js} +3 -3
  21. package/dist/assets/{BankAccountWarningSection-DakysSbk-BRLKAJ0a.js → BankAccountWarningSection-DakysSbk-CfJ3ZIAx.js} +1 -1
  22. package/dist/assets/{BankConnectionsSettingsPage-BjZDNgZG-CFbf0DLJ.js → BankConnectionsSettingsPage-BjZDNgZG-CWXR52fl.js} +7 -7
  23. package/dist/assets/{BillDetailPage-DYc_nZRU-vRHIz2Fv.js → BillDetailPage-DYc_nZRU-BRz45yqn.js} +2 -2
  24. package/dist/assets/{BillPayApprovalRuleDetailPage-ppU1Epmy-DfzEevsW.js → BillPayApprovalRuleDetailPage-ppU1Epmy-CKu9yeh6.js} +1 -1
  25. package/dist/assets/{BillPayApprovalRulesPage-UblNi2mR-CaoPaa4o.js → BillPayApprovalRulesPage-UblNi2mR-DDdlB9l6.js} +1 -1
  26. package/dist/assets/{BillPayPromoPage-BK2J56U5-BLwpq2ym.js → BillPayPromoPage-BK2J56U5-BV_HtQh9.js} +5 -5
  27. package/dist/assets/{BillPaySetUpPage-Jic5E25q-C2agN1u5.js → BillPaySetUpPage-Jic5E25q-B-iLCf2O.js} +2 -2
  28. package/dist/assets/{BillingSettingsPage-CKZVChEm-CWf23wA3.js → BillingSettingsPage-CKZVChEm-D4ayDBSH.js} +4 -4
  29. package/dist/assets/{BillsBulkReviewDrawerPage-C4Ra5e82-C3uBULFR.js → BillsBulkReviewDrawerPage-C4Ra5e82-Ci4V1_TC.js} +1 -1
  30. package/dist/assets/{BoxItem-8PfNfaHq-Bc55g4Kz.js → BoxItem-8PfNfaHq-CqIGaIYz.js} +1 -1
  31. package/dist/assets/{BusinessVerificationPage-JGge-Iiw-CLy_qcXB.js → BusinessVerificationPage-JGge-Iiw-DkN8E6Gl.js} +5 -5
  32. package/dist/assets/{CardNumberSubText-W81SQ4GF-OueRQ73F.js → CardNumberSubText-W81SQ4GF-D5AG2b-c.js} +1 -1
  33. package/dist/assets/{CashbackDetailPage-DnOcmx2i-BioqpiiB.js → CashbackDetailPage-DnOcmx2i-DuXs2k0a.js} +7 -7
  34. package/dist/assets/{ChargeCardDetailPage-DNVMsxzE-MbZAmWWA.js → ChargeCardDetailPage-DNVMsxzE-W83HRYcY.js} +1 -1
  35. package/dist/assets/{ChargeCardListPage-Dgj-WWWI-BMNMnKI1.js → ChargeCardListPage-Dgj-WWWI-C1jII8Vl.js} +14 -14
  36. package/dist/assets/{ChargeCardListTable-uJZKWoh7-dd8_7oJW.js → ChargeCardListTable-uJZKWoh7-DGMj8Kk8.js} +16 -16
  37. package/dist/assets/{ChargeCardPromoPage-uqT96W3_-C4nna9JN.js → ChargeCardPromoPage-uqT96W3_-DGpf3zxD.js} +1 -1
  38. package/dist/assets/{ChargeCardSetupPage-BDbJU-vm-KUujiV9J.js → ChargeCardSetupPage-BDbJU-vm-DZJfRa0I.js} +1 -1
  39. package/dist/assets/{ChargeCardStatementsPage-DImRqpH1-CbTc5gcW.js → ChargeCardStatementsPage-DImRqpH1-BlCyBAS3.js} +1 -1
  40. package/dist/assets/{CheckDepositDrawerPage-BVtOOPoa-BZCRYtgW.js → CheckDepositDrawerPage-BVtOOPoa-CKWcHjV6.js} +6 -6
  41. package/dist/assets/{CollapsableReportTable-Crihcv_z-D0yVWEtn.js → CollapsableReportTable-Crihcv_z-B6sIoSI3.js} +1 -1
  42. package/dist/assets/{CompanyOfficerDetailsSection-CNxtAkKM-JM7EOPYb.js → CompanyOfficerDetailsSection-CNxtAkKM-D2joEvpM.js} +8 -8
  43. package/dist/assets/{CompanyPassportCard-DMRQkRPb-BfQft15t.js → CompanyPassportCard-DMRQkRPb-BLaDLsxp.js} +1 -1
  44. package/dist/assets/{CompanyPassportPage-D3XvbSF_-QtfQkOgs.js → CompanyPassportPage-D3XvbSF_-BPFOIUV0.js} +16 -16
  45. package/dist/assets/{CompleteProfile-BqjXO5ze-BVANkRD5.js → CompleteProfile-BqjXO5ze-fJjklbCs.js} +1 -1
  46. package/dist/assets/{ConfettiBurst-DtwLo4WZ-pKVn1Zt5.js → ConfettiBurst-DtwLo4WZ-DhNKCJ7F.js} +1 -1
  47. package/dist/assets/{CreateOrEditVendorPage-FrGRJxMy-BsYkqMbG.js → CreateOrEditVendorPage-FrGRJxMy-lyDeY9QD.js} +1 -1
  48. package/dist/assets/{CreditCardPaymentDrawerPage-BvifQpD3-rvm5_a2M.js → CreditCardPaymentDrawerPage-BvifQpD3-CJD0XzyN.js} +6 -6
  49. package/dist/assets/{CurrencySelectField-ClOg6nnS-Cnr3YkBv.js → CurrencySelectField-ClOg6nnS-wUZ5kAZB.js} +1 -1
  50. package/dist/assets/{CustomerOnboardingActivationPage-Du-zzeL2-DMbpslbv.js → CustomerOnboardingActivationPage-Du-zzeL2-DGgRqDAq.js} +1 -1
  51. package/dist/assets/CustomerOnboardingContainerPage-DMZOvVMM-ly2XWpHL.js +1 -0
  52. package/dist/assets/{CustomerOnboardingDetailPageSkeleton-BgY95XeU-DZVW17dp.js → CustomerOnboardingDetailPageSkeleton-BgY95XeU-Dah0hLGQ.js} +1 -1
  53. package/dist/assets/{CustomerOnboardingNoStepsPage-BsKoqUta-C8ENw_2g.js → CustomerOnboardingNoStepsPage-BsKoqUta-D3bS1mcO.js} +1 -1
  54. package/dist/assets/{CustomerOnboardingPage-DUMQKVfM-0ltubWJk.js → CustomerOnboardingPage-DUMQKVfM-C7dz_0GY.js} +1 -1
  55. package/dist/assets/{CustomerOnboardingProductSuitePage-DGVV8Tkk-Brs1Bm9U.js → CustomerOnboardingProductSuitePage-DGVV8Tkk-CiyIz1Ai.js} +5 -5
  56. package/dist/assets/{Dashboard-CdYlvep--C2xiBWGf.js → Dashboard-CdYlvep--B2Vkh5DQ.js} +1 -1
  57. package/dist/assets/{DashboardReportPage-c6q027Qp-ZzS_4DbW.js → DashboardReportPage-c6q027Qp-B9wSLZAf.js} +16 -16
  58. package/dist/assets/{DashboardSidebarBackgroundAnimation-BdDVYK19-DO3K14XB.js → DashboardSidebarBackgroundAnimation-BdDVYK19-COjDYEak.js} +1 -1
  59. package/dist/assets/{DepositAccTransactionItem-D8kL8enp-DQfKwDtZ.js → DepositAccTransactionItem-D8kL8enp-J-22cTZM.js} +1 -1
  60. package/dist/assets/{DepositAccTransactionListPage-BS-OReem-CrvBML8Q.js → DepositAccTransactionListPage-BS-OReem-Daf8x2X1.js} +1 -1
  61. package/dist/assets/{DomesticWireDetailsPage-CjM1DXnn-BZAEhYC3.js → DomesticWireDetailsPage-CjM1DXnn-ByLr_bfJ.js} +1 -1
  62. package/dist/assets/{DownloadOverlay-Dr4uLNpZ-_3KxAqK4.js → DownloadOverlay-Dr4uLNpZ-PWDmhVak.js} +38 -38
  63. package/dist/assets/{DrawerPage-CbKBsc7w-7kpCQGH8.js → DrawerPage-CbKBsc7w-BANqCEyN.js} +1 -1
  64. package/dist/assets/{EditPeoplePage-BgsR09q8-YfoObQW1.js → EditPeoplePage-BgsR09q8-DQro3ypx.js} +3 -3
  65. package/dist/assets/{EditReimbursementDetailPage-BTrwOX_s-DvpBdlkg.js → EditReimbursementDetailPage-BTrwOX_s-Bpc20RR2.js} +25 -25
  66. package/dist/assets/{EntityDetailPage-Cvd4MG0F-ZDX--4dV.js → EntityDetailPage-Cvd4MG0F-Uu1ExrMV.js} +1 -1
  67. package/dist/assets/{EntitySummarySection-BIV9aAq2-DSoSDfHH.js → EntitySummarySection-BIV9aAq2-CUHksODf.js} +1 -1
  68. package/dist/assets/{ExpenseAutomationOverviewPage-B5MtjO2p-OLmj-clQ.js → ExpenseAutomationOverviewPage-B5MtjO2p-B5sSDEu8.js} +1 -1
  69. package/dist/assets/{ExpenseAutomationPage-DW6Pxoah-DSaMh9BZ.js → ExpenseAutomationPage-DW6Pxoah-DpT-FAIA.js} +62 -62
  70. package/dist/assets/{ExpressPayPage-DnpQuDmt-CuecqGBU.js → ExpressPayPage-DnpQuDmt-CY033VTz.js} +5 -5
  71. package/dist/assets/{FeaturePreviewPage-BmwBZ7ZP-BzM8qDQI.js → FeaturePreviewPage-BmwBZ7ZP-kerQig1g.js} +1 -1
  72. package/dist/assets/{FollowStepsSection-B2I9SddL-B9ISQuf-.js → FollowStepsSection-B2I9SddL-BxrnE678.js} +1 -1
  73. package/dist/assets/{GlobalReviewListPage-D3GCP5Xd-bCzUhauh.js → GlobalReviewListPage-D3GCP5Xd-Bht9J0K_.js} +6 -6
  74. package/dist/assets/{InformationCardStack-mEhasBqu-MnmadQgE.js → InformationCardStack-mEhasBqu-BZ_Gox0K.js} +1 -1
  75. package/dist/assets/{InsightsCardStack-Mj7QcQnH-w9iVNjOS.js → InsightsCardStack-Mj7QcQnH-CT4vpE1x.js} +1 -1
  76. package/dist/assets/{InsightsSection-B3xD0SZ9-CtB9l6g9.js → InsightsSection-B3xD0SZ9-CKtY4Hiz.js} +1 -1
  77. package/dist/assets/{IntegrationsSettingsPage-CsI_agJB-CFVHIylV.js → IntegrationsSettingsPage-CsI_agJB-CclnkA74.js} +1 -1
  78. package/dist/assets/{InternationalWireSwiftDetailsPage-Dszmi69h-DaN3QXGf.js → InternationalWireSwiftDetailsPage-Dszmi69h-BjjhlMpG.js} +1 -1
  79. package/dist/assets/{InternationalWireVerificationPage-DG9Enrpo-CZa6BkZb.js → InternationalWireVerificationPage-DG9Enrpo-DEQAkYYx.js} +11 -11
  80. package/dist/assets/{InviteFormPage-DK6X9Zwi-57NKh16b.js → InviteFormPage-DK6X9Zwi-DR66hPVd.js} +1 -1
  81. package/dist/assets/{InvitePageListView-CwKbcKlM-DEEV83h1.js → InvitePageListView-CwKbcKlM-BOO2EOMw.js} +32 -32
  82. package/dist/assets/{InvitePeoplePage-BqzJOjVI-bufXErI1.js → InvitePeoplePage-BqzJOjVI-hAq8wZOI.js} +1 -1
  83. package/dist/assets/{InvoiceUploadSection-CokNNkKu-zGBNoDhJ.js → InvoiceUploadSection-CokNNkKu-CL4OwcxH.js} +1 -1
  84. package/dist/assets/{IssueChargeCardPage-CRtJDmrZ-2SCD9IjH.js → IssueChargeCardPage-CRtJDmrZ-CFmNSL2f.js} +1 -1
  85. package/dist/assets/{LabeledAddressValue-BhwrrtZX-lh4MyI8q.js → LabeledAddressValue-BhwrrtZX-BVe1F8jA.js} +1 -1
  86. package/dist/assets/{LabeledAddressValueField-DzmwP7hP-CVmcFCuL.js → LabeledAddressValueField-DzmwP7hP-7gvUeBGH.js} +1 -1
  87. package/dist/assets/{LabeledControlledCheckBoxField-B6ndrF2e-DiUrfDZv.js → LabeledControlledCheckBoxField-B6ndrF2e-LWUc8yBI.js} +1 -1
  88. package/dist/assets/{LabeledCreatableSingleSelectField-CfzLlkho-e_gzDVel.js → LabeledCreatableSingleSelectField-CfzLlkho-CxZaZJZN.js} +1 -1
  89. package/dist/assets/{LabeledDocumentField-p3pI5qLu-BpHx3wM1.js → LabeledDocumentField-p3pI5qLu-I9C3lX6x.js} +1 -1
  90. package/dist/assets/{LabeledDropDownFormattedTextField-oQX33Fim-CDrN8oV2.js → LabeledDropDownFormattedTextField-oQX33Fim-Bbplhays.js} +1 -1
  91. package/dist/assets/{LabeledText-Db46hFZY-ZpSE14Xk.js → LabeledText-Db46hFZY-CvrCjgF_.js} +1 -1
  92. package/dist/assets/{LabeledUserSingleSelectWithSubtitlesField-B9Xx3bxn-CrNtOmbd.js → LabeledUserSingleSelectWithSubtitlesField-B9Xx3bxn-f0PElM5i.js} +1 -1
  93. package/dist/assets/{LabeledZeniRolesDropDownField-Docjgj8Y-ByksgDAC.js → LabeledZeniRolesDropDownField-Docjgj8Y-C6xxx7IQ.js} +11 -11
  94. package/dist/assets/{LinkJETransactionPage-BZSRaZqY-BCB3zTz9.js → LinkJETransactionPage-BZSRaZqY-9NIG46T3.js} +6 -6
  95. package/dist/assets/{LockCardPage-KTyESoXL-Do9Bp07f.js → LockCardPage-KTyESoXL-C_hGUeR9.js} +12 -12
  96. package/dist/assets/{LowBalancePopup-B0BDCEui-GkcadyQj.js → LowBalancePopup-B0BDCEui-BMVW4mzF.js} +4 -4
  97. package/dist/assets/MagicLinkACHDetailsPage-DwFvuGwG-C2ShsQ5E.js +1 -0
  98. package/dist/assets/{MagicLinkDomesticWireDetailsPage-CDB2igue-B5PAHJHU.js → MagicLinkDomesticWireDetailsPage-CDB2igue-CMZ17cvq.js} +1 -1
  99. package/dist/assets/{MagicLinkInternationalWireDetailsPage-C2kxncrD-DJsJrwdj.js → MagicLinkInternationalWireDetailsPage-C2kxncrD-DZt4WyHf.js} +1 -1
  100. package/dist/assets/{MagicLinkSuccessPage-DNVe2qMu-Br2ktzLe.js → MagicLinkSuccessPage-DNVe2qMu-BMSr-yiU.js} +1 -1
  101. package/dist/assets/{MagicLinkTitleSection-CWw516D8-Di58AkiA.js → MagicLinkTitleSection-CWw516D8-CjWjg4GW.js} +1 -1
  102. package/dist/assets/{MailingDetailsSection-CugAM90r-CKMbSrBC.js → MailingDetailsSection-CugAM90r-CMuXq6mA.js} +1 -1
  103. package/dist/assets/{Menu-CGN2qO6T-BavKt1PZ.js → Menu-CGN2qO6T-CKP1jX2H.js} +1 -1
  104. package/dist/assets/{MyBankConnectionsSettingsPage-CQUfVa0r-s0_zy8mz.js → MyBankConnectionsSettingsPage-CQUfVa0r-9xTXMtPS.js} +1 -1
  105. package/dist/assets/{MyPendingActivationChargeCardListPage-TOQWRGjp-FPw-YJRK.js → MyPendingActivationChargeCardListPage-TOQWRGjp-DCcWmjzI.js} +1 -1
  106. package/dist/assets/{MyProfileSettingsPage-lCG03Uoh-BSTkZT7y.js → MyProfileSettingsPage-lCG03Uoh-DnrGHNt2.js} +1 -1
  107. package/dist/assets/{NavBarWithPicker-DLLvivn4-B4wus8BB.js → NavBarWithPicker-DLLvivn4-6K-3U9T7.js} +1 -1
  108. package/dist/assets/{NavigationArrow-B4j2t8Qu-I1tY1ram.js → NavigationArrow-B4j2t8Qu-C8IxiTof.js} +1 -1
  109. package/dist/assets/{NavigationDots-DyMqwpgy-DUFU9pI4.js → NavigationDots-DyMqwpgy-DXf5bt3G.js} +1 -1
  110. package/dist/assets/{NewGlobalMerchantPage-Bx7iBsCP-Bgk-R_8-.js → NewGlobalMerchantPage-Bx7iBsCP-DGrKqfpE.js} +1 -1
  111. package/dist/assets/{NoDataChart-Ce1_TZ5w-D3OEJqVU.js → NoDataChart-Ce1_TZ5w-BfNH_4T8.js} +1 -1
  112. package/dist/assets/{NoDataTable-l2T5Hw3t-BocZJJ0_.js → NoDataTable-l2T5Hw3t-Bh_N31mD.js} +1 -1
  113. package/dist/assets/{NotFoundPage-msdN-Eu6-DYqWaTYB.js → NotFoundPage-msdN-Eu6-BKPOdh9t.js} +1 -1
  114. package/dist/assets/{NotificationSettingsPage-_ovcjr8E-DaKenjvb.js → NotificationSettingsPage-_ovcjr8E-Bj-DE2Dk.js} +15 -15
  115. package/dist/assets/{NotificationsListConfig-BJm7A9Mz-B1bUr4jp.js → NotificationsListConfig-BJm7A9Mz-Dg3_VsE9.js} +1 -1
  116. package/dist/assets/{NotificationsPage-Ddxb5kE0-DZUgUKAm.js → NotificationsPage-Ddxb5kE0-DzIBWdK5.js} +13 -13
  117. package/dist/assets/{OpExByVendorPage-BLAHey0l-Bvld9G1i.js → OpExByVendorPage-BLAHey0l-neBDRa7k.js} +4 -4
  118. package/dist/assets/{OverlayContainerPage-CrZuT2Jj-BZc1jNiE.js → OverlayContainerPage-CrZuT2Jj-DMNYxA7f.js} +1 -1
  119. package/dist/assets/{PandLWithForecastPage-B7Z73Sq--CxOY2hjk.js → PandLWithForecastPage-B7Z73Sq--BDluLKs7.js} +5 -5
  120. package/dist/assets/{PaymentAccountSetupBillingAddressSection-pL7omrJk-DPhW5Sbo.js → PaymentAccountSetupBillingAddressSection-pL7omrJk-Cgju1Qqc.js} +1 -1
  121. package/dist/assets/{PeoplePage-BHRFiM0D-Dz2giOXs.js → PeoplePage-BHRFiM0D-FOmgjcav.js} +1 -1
  122. package/dist/assets/{ProductsCarousel-D2bf_6Gb-oPFxud0a.js → ProductsCarousel-D2bf_6Gb-NT7Dhd8p.js} +1 -1
  123. package/dist/assets/{PromoBaseCards-CI7UOpeY-DSvwfl16.js → PromoBaseCards-CI7UOpeY-DI52WXKx.js} +3 -3
  124. package/dist/assets/{QBOConnectionDialog-D7MeKn1t-CNNQde90.js → QBOConnectionDialog-D7MeKn1t-DelTIGIf.js} +4 -4
  125. package/dist/assets/{QBOSetupSection-DWhfA4Xv-DYYPH7Pl.js → QBOSetupSection-DWhfA4Xv-kSdJytyB.js} +7 -7
  126. package/dist/assets/{ReimbursementApprovalRuleDetailPage-C_dTOk5P-B0mAq5_-.js → ReimbursementApprovalRuleDetailPage-C_dTOk5P-Dc_LvsYr.js} +1 -1
  127. package/dist/assets/{ReimbursementApprovalRulesPage-B5lca4qx-DfQkh2sN.js → ReimbursementApprovalRulesPage-B5lca4qx-DAjvVIOI.js} +1 -1
  128. package/dist/assets/{ReimbursementDetailPage-COIRwy7i-BbuWUy3N.js → ReimbursementDetailPage-COIRwy7i-W0eUs7nE.js} +1 -1
  129. package/dist/assets/{ReimbursementPromoPage-Bjm0UHcm-9396bQ9z.js → ReimbursementPromoPage-Bjm0UHcm-Crjakfj5.js} +8 -8
  130. package/dist/assets/{ReimbursementSetUpPage-CMYR8CcH-6GKMqjZm.js → ReimbursementSetUpPage-CMYR8CcH-B6Pjnu_N.js} +4 -4
  131. package/dist/assets/{ReimbursementsBulkReviewDrawerPage-BDdhVfaz-CHdDYICO.js → ReimbursementsBulkReviewDrawerPage-BDdhVfaz-Qu76KNt7.js} +1 -1
  132. package/dist/assets/{ReloadCard-B2sJR97f-BUZQgyMC.js → ReloadCard-B2sJR97f-4aiyry-A.js} +1 -1
  133. package/dist/assets/{ReportTableViewSelector-_IO343vS-DPhVSmcQ.js → ReportTableViewSelector-_IO343vS-DFegVWwX.js} +1 -1
  134. package/dist/assets/{ReportsPage-C-aQ1bdd-B_xkTwrl.js → ReportsPage-C-aQ1bdd-DQkYUdHM.js} +5 -5
  135. package/dist/assets/{RevenueChart-Bgq6My4J-Dt6XAZjz.js → RevenueChart-Bgq6My4J-Bd7qmjtO.js} +1 -1
  136. package/dist/assets/{ReviewDetailsPage-COx9R71r-B7xkHaMk.js → ReviewDetailsPage-COx9R71r-BNEXmQ6j.js} +1 -1
  137. package/dist/assets/{ReviewOverlay-CPU7RPiJ-L4td8Zqd.js → ReviewOverlay-CPU7RPiJ-LkDgAnlD.js} +1 -1
  138. package/dist/assets/{RoleWithToolTip-DSSGBzvw-BjW_p5Ey.js → RoleWithToolTip-DSSGBzvw-1jeqwzcs.js} +2 -2
  139. package/dist/assets/{ScheduleDetailsFixedAssetsPage-DKGBfhAM-BIQ3dSHo.js → ScheduleDetailsFixedAssetsPage-DKGBfhAM-DIiqwEOV.js} +3 -3
  140. package/dist/assets/{ScheduleDetailsPage-B-fKJ7Ct-BuuquQqY.js → ScheduleDetailsPage-B-fKJ7Ct-DSkiCN2O.js} +3 -3
  141. package/dist/assets/{ScheduleSequenceTable-Dh_aT47H-CIlJaOtf.js → ScheduleSequenceTable-Dh_aT47H-BHM_c04w.js} +15 -15
  142. package/dist/assets/{ScreenRoutes-C6VP09xT.js → ScreenRoutes-DuXEW70Q.js} +48 -48
  143. package/dist/assets/{SetUpAccountSection-DrMCC1IY-C-3Yhp84.js → SetUpAccountSection-DrMCC1IY-D33epaX0.js} +4 -4
  144. package/dist/assets/{SignIn-Ij6tlYI5-CCumTqCW.js → SignIn-Ij6tlYI5-DeE6t8Fq.js} +7 -7
  145. package/dist/assets/{SignInScreen-DJ4Bo1S_.js → SignInScreen-LCpnq8M3.js} +1 -1
  146. package/dist/assets/{SpendManagementListViewPage-AI676Urw-Bz122sOj.js → SpendManagementListViewPage-AI676Urw-DJru7ByR.js} +13 -13
  147. package/dist/assets/{SpendManagementPerTabPage-D79c3Xqh-rmjY-vmf.js → SpendManagementPerTabPage-D79c3Xqh-D8DfakVn.js} +1 -1
  148. package/dist/assets/{SpendManagementSection-BqWbsmBW-td2Sn0pd.js → SpendManagementSection-BqWbsmBW-BhpclPa8.js} +7 -7
  149. package/dist/assets/{StatementItem-Aal79YaO-XQmaXixd.js → StatementItem-Aal79YaO-3cBWg-5i.js} +1 -1
  150. package/dist/assets/{StatementsPage-BG_pNQzc-dvNXNLMV.js → StatementsPage-BG_pNQzc-C7UMTTVJ.js} +1 -1
  151. package/dist/assets/{StatusSwitcher-DYRXaLvx-DnQc7FsU.js → StatusSwitcher-DYRXaLvx-GT20DbHu.js} +1 -1
  152. package/dist/assets/{SubTabSwitcher-C75XU1EG-UKyrqTMF.js → SubTabSwitcher-C75XU1EG-BZOngUzL.js} +1 -1
  153. package/dist/assets/{SummaryCard-DEnzgi31-DEAiBXSy.js → SummaryCard-DEnzgi31-BhOErS-o.js} +1 -1
  154. package/dist/assets/{TaskManagementPage-BacWm0wS-B7bDEupg.js → TaskManagementPage-BacWm0wS-tQV5bDZ1.js} +12 -12
  155. package/dist/assets/{TimeRangeSwitcher-BOzR-0O6-Bz_-4Vd_.js → TimeRangeSwitcher-BOzR-0O6-8myc4JmX.js} +1 -1
  156. package/dist/assets/{TimeframeSwitcher-BVgI_VZw-BbnNXYMm.js → TimeframeSwitcher-BVgI_VZw-Re-kZX07.js} +1 -1
  157. package/dist/assets/{TimeframeSwitcherWithToggle-CPVSAvFa-PHeDWcYh.js → TimeframeSwitcherWithToggle-CPVSAvFa-Bg7OmG92.js} +1 -1
  158. package/dist/assets/{TopExCard-ImUx-vXr-DLryJPJU.js → TopExCard-ImUx-vXr--haKJkNG.js} +1 -1
  159. package/dist/assets/{TopExDetailPage-Dg_8DQk8-RpIGLliz.js → TopExDetailPage-Dg_8DQk8-4TF178rD.js} +2 -2
  160. package/dist/assets/{TransactionDetailPage-BzaDB50S-DF5gn3Ir.js → TransactionDetailPage-BzaDB50S-CJmLmWoQ.js} +31 -31
  161. package/dist/assets/{TransactionList-DMd3dgoK-CBav3Qka.js → TransactionList-DMd3dgoK-DFvlE42h.js} +5 -5
  162. package/dist/assets/{TransactionListBig-BxHqh8u6-BYNOxGT0.js → TransactionListBig-BxHqh8u6-eMcF_DZh.js} +1 -1
  163. package/dist/assets/{TransactionListPage-CN9fZznd-Cy5ZEf_j.js → TransactionListPage-CN9fZznd-DZJjs91-.js} +1 -1
  164. package/dist/assets/{TransactionVendorDetailPage-CykcquSh-DmB7J4Ve.js → TransactionVendorDetailPage-CykcquSh-UwSp0CrJ.js} +1 -1
  165. package/dist/assets/{TransferDrawerPage-oV7ickRP-Bq_Xcqnx.js → TransferDrawerPage-oV7ickRP-yOers3_6.js} +1 -1
  166. package/dist/assets/{TreasuryOverviewPage-CECDKjNn-BzVtu32L.js → TreasuryOverviewPage-CECDKjNn-HTBJsJ5M.js} +1 -1
  167. package/dist/assets/{TreasuryPromoPage-Bgt7uGAE-YS83Frko.js → TreasuryPromoPage-Bgt7uGAE-oIwaWu5X.js} +6 -6
  168. package/dist/assets/{TreasuryStatementsPage-QyWxshsI-CQPDqfyA.js → TreasuryStatementsPage-QyWxshsI-BxKUXQKE.js} +1 -1
  169. package/dist/assets/{TreasuryTaxLetterPage-BLmfU0VD-CSvnMnxI.js → TreasuryTaxLetterPage-BLmfU0VD-CZkFVEWV.js} +1 -1
  170. package/dist/assets/{TrendChart-C_6ob-SX-D7KWuN6Y.js → TrendChart-C_6ob-SX-BWR7UfmP.js} +2 -2
  171. package/dist/assets/{TrendWithTransactions-lMD2sZ-C-KD4WKX16.js → TrendWithTransactions-lMD2sZ-C-B_BL8w82.js} +1 -1
  172. package/dist/assets/{UncategorizedAccountsMappingPage-DEgz17_R-01TUtrQ3.js → UncategorizedAccountsMappingPage-DEgz17_R-CooBTMrf.js} +7 -7
  173. package/dist/assets/{UnitIntegrationPage-D9Pzxqju-BOLWJuwD.js → UnitIntegrationPage-D9Pzxqju-CvrKT10L.js} +1 -1
  174. package/dist/assets/{UploadAdditionalDocumentOverlay-CJYvOjh0-D_FvrAyp.js → UploadAdditionalDocumentOverlay-CJYvOjh0-D-S1zfGQ.js} +1 -1
  175. package/dist/assets/{Vendor2FAPopup-D-r0NVE--B3f5wBDW.js → Vendor2FAPopup-D-r0NVE--CwiNcgO0.js} +1 -1
  176. package/dist/assets/{VendorACHDetailsPage-Dv6bTD6Y-OnrOc4ob.js → VendorACHDetailsPage-Dv6bTD6Y-13eGKSpU.js} +1 -1
  177. package/dist/assets/{VendorDetailPage-BhfawsBd-n1Xsq3nw.js → VendorDetailPage-BhfawsBd-Caqe1lVz.js} +11 -11
  178. package/dist/assets/{VendorDomesticWireDetailsPage-BjmlrfTQ-CKSdgGUn.js → VendorDomesticWireDetailsPage-BjmlrfTQ-t6Qb8_Zl.js} +1 -1
  179. package/dist/assets/{VendorFiling1099EditablePage-glvi0GTU-DLw68imQ.js → VendorFiling1099EditablePage-glvi0GTU-Ctoy4jdk.js} +7 -7
  180. package/dist/assets/{VendorFirstReviewPage-DUuUM8ZT-UIFfUs4N.js → VendorFirstReviewPage-DUuUM8ZT-CU9frkxN.js} +23 -23
  181. package/dist/assets/{VendorInternationalWireDetailsPage--Lb-TviQ-CCF4TMxK.js → VendorInternationalWireDetailsPage--Lb-TviQ-DUgeyPBL.js} +13 -13
  182. package/dist/assets/{VendorInternationalWireSwiftDetailsPage-C6KviV2Z-D3kLFHcQ.js → VendorInternationalWireSwiftDetailsPage-C6KviV2Z-CuCByIJB.js} +1 -1
  183. package/dist/assets/{VendorsAccountsSection-EmHO3wQ0-CEeuSUbZ.js → VendorsAccountsSection-EmHO3wQ0-CSPWzKcg.js} +2 -2
  184. package/dist/assets/{VerifyDevice-DE3UbLEe--Pskj1Mq.js → VerifyDevice-DE3UbLEe-DJm7Kfur.js} +1 -1
  185. package/dist/assets/{VideoPlayer-Gw_PLr8F-BcXYYheO.js → VideoPlayer-Gw_PLr8F-BcD3Qyt1.js} +2 -2
  186. package/dist/assets/{VideoPopup-DPZYhLgy-DukYJkLb.js → VideoPopup-DPZYhLgy-CJt98Dbq.js} +1 -1
  187. package/dist/assets/{WarningsDrawerPage-CZvToguS-BXOU7iCW.js → WarningsDrawerPage-CZvToguS-Ba7pscqf.js} +1 -1
  188. package/dist/assets/{ZeniAccountDetailPage-CQhqngBz-HKLobKLw.js → ZeniAccountDetailPage-CQhqngBz-CmRc3epW.js} +6 -6
  189. package/dist/assets/{ZeniAccountListViewPage-CpX8vqYa-D5cFrlFO.js → ZeniAccountListViewPage-CpX8vqYa-CrcimjI_.js} +5 -5
  190. package/dist/assets/{ZeniAccountNavBarPieces-DsUwG15z-DUllEiZw.js → ZeniAccountNavBarPieces-DsUwG15z-DiPlFFTl.js} +1 -1
  191. package/dist/assets/{ZeniAccountPromoPage-DA611IgH-C3rU7vC2.js → ZeniAccountPromoPage-DA611IgH-CipxvQgU.js} +1 -1
  192. package/dist/assets/{ZeniAccountSetupPage-CJv2Fk1i-D14nFBbc.js → ZeniAccountSetupPage-CJv2Fk1i-BEZSbbPm.js} +3 -3
  193. package/dist/assets/{ZeniCopyright-FFqiWypL-DffEEOor.js → ZeniCopyright-FFqiWypL-DiiU36pR.js} +1 -1
  194. package/dist/assets/{ZeniTransferAmountSlider-DSrBZUbA-BK28gg1V.js → ZeniTransferAmountSlider-DSrBZUbA-BFqVxMPD.js} +1 -1
  195. package/dist/assets/{analytics-CThNEnNw.js → analytics-XaDXTZcq.js} +1 -1
  196. package/dist/assets/{analyticsHelper-DZktPTuO.js → analyticsHelper-CPNXs_BN.js} +1 -1
  197. package/dist/assets/{analyticsHelper-CczQLvkM-DIUzCxU0.js → analyticsHelper-CczQLvkM-BG3MqU2b.js} +1 -1
  198. package/dist/assets/{chartTypes-CwQl8aoN-BvppJ7T_.js → chartTypes-CwQl8aoN-DVag5uGx.js} +1 -1
  199. package/dist/assets/{commonDimensions-B1u_MhON-C0I2HTNT.js → commonDimensions-B1u_MhON-D3_HfKhE.js} +1 -1
  200. package/dist/assets/{dash.all.min-BUPngCw6.js → dash.all.min-DBAY9LgI.js} +1 -1
  201. package/dist/assets/{detailCommon-nYxvvV_i-Uo4bq2Po.js → detailCommon-nYxvvV_i-CatRpXM4.js} +1 -1
  202. package/dist/assets/{downloadPdf-yGlKpV2--C-eO59Y8.js → downloadPdf-yGlKpV2--PjZSq5HD.js} +1 -1
  203. package/dist/assets/{epic-Bko4IStj.js → epic-BLwHhkRJ.js} +2 -2
  204. package/dist/assets/{index-KtBRorGi.js → index-CEtuJXY3.js} +1 -1
  205. package/dist/assets/{index-BxXAQ-Kq.js → index-CdTBIE6I.js} +1 -1
  206. package/dist/assets/{index-DKkab5BS.js → index-Ci63exms.js} +6 -6
  207. package/dist/assets/{index-BV-YAw0P.js → index-DYDdrdFx.js} +1 -1
  208. package/dist/assets/{index-CwsnnJzI.js → index-DrmeEdvK.js} +1 -1
  209. package/dist/assets/{liveblocks-B3KbWbMM.js → liveblocks-CNYVvsag.js} +1 -1
  210. package/dist/assets/{lottie-CaGAfnTY.js → lottie-22bRan8M.js} +1 -1
  211. package/dist/assets/{mapLoadingInProgressToTreeNode-DIAuL28N-xsS0oiYX.js → mapLoadingInProgressToTreeNode-DIAuL28N-uQ9ZpPGq.js} +1 -1
  212. package/dist/assets/{mapSectionWithAcOnlyToTreeNode-DRSmQ56_-CG4Donkj.js → mapSectionWithAcOnlyToTreeNode-DRSmQ56_-BfuaGrUM.js} +1 -1
  213. package/dist/assets/{mapSpacerToTreeNode-DOEVwUIo-DvFYvzSg.js → mapSpacerToTreeNode-DOEVwUIo-DiQ0KiMB.js} +1 -1
  214. package/dist/assets/{mapTimeframeBalancesToTreeNode-DbnAvW1M-DwP6n0dB.js → mapTimeframeBalancesToTreeNode-DbnAvW1M-DvZ_ljbo.js} +1 -1
  215. package/dist/assets/{mapTimeframeBalancesToTreeNode-DkrEWOxt-C5viXNzP.js → mapTimeframeBalancesToTreeNode-DkrEWOxt-u1VbFdjk.js} +1 -1
  216. package/dist/assets/{mapTimeframeHeaderLoadingInProgressToTreeNode-BucoS7vN-DI0_1Fs5.js → mapTimeframeHeaderLoadingInProgressToTreeNode-BucoS7vN-DJb78S-u.js} +1 -1
  217. package/dist/assets/{react-C2wGlvWj.js → react-BUQtf2po.js} +2 -2
  218. package/dist/assets/{recharts-CXSQ4XPK.js → recharts-h5iNQbFd.js} +1 -1
  219. package/dist/assets/{sentry-DxvQlcJu.js → sentry-cYFeB6Pw.js} +1 -1
  220. package/dist/assets/{toCOABalancesWithID-rZFEkHuM-BoVabqyh.js → toCOABalancesWithID-rZFEkHuM-BjqaEj9u.js} +1 -1
  221. package/dist/assets/{toChartData-C-dHC-Oz-BVDbQmqa.js → toChartData-C-dHC-Oz-CLJWjMkx.js} +1 -1
  222. package/dist/assets/{uploadAttachment-D3clfqPu-BH3cXou6.js → uploadAttachment-D3clfqPu-NbmOED_L.js} +15 -15
  223. package/dist/assets/{uploadReceipts-Bkf_PaOH-BF2MpIUs.js → uploadReceipts-Bkf_PaOH-DuaAGaHX.js} +1 -1
  224. package/dist/assets/{url-DuX7Wo4B.js → url-B-8T_WZb.js} +1 -1
  225. package/dist/assets/{url-y5lCWhwX.js → url-DPKHmOp_.js} +1 -1
  226. package/dist/assets/{utils-C70QTjQC.js → utils-fBOyu0sO.js} +1 -1
  227. package/dist/assets/{zeni-epic-state-xFtF3OLs.js → zeni-epic-state-BwKvATgd.js} +5 -5
  228. package/dist/index.html +1 -1
  229. package/package.json +3 -3
  230. package/dist/assets/ApprovalRulesSettingsPage-DQQw30S5-BhIGD0MP.js +0 -47
  231. package/dist/assets/CustomerOnboardingContainerPage-DMZOvVMM-KhP9qsWJ.js +0 -1
  232. package/dist/assets/MagicLinkACHDetailsPage-DwFvuGwG-B16BKcOV.js +0 -1
@@ -1,4 +1,4 @@
1
- import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO as ns,u as g,cn as ua,d as St,bz as ha,h_ as pa,aL as We,bQ as fe,y as ee,bt as ma,aK as z,hY as ga,ak as Fe,gR as xa,gK as os,bu as fa,bM as Bt,b5 as is,ag as jt,bI as ss,p as Ge,k8 as ya,g1 as Ca,al as gt,_ as wa,ge as ba,gf as as,bm as va,ch as Sa,b$ as ja,eC as fn,bY as jo,a8 as Kt,bL as ko,ab as Jt,k9 as ka,ka as Ia,kb as $a,kc as dn,kd as rs,ke as ls,kf as Ta,kg as No,kh as La,dm as cs,ki as Aa,kj as Ra,kk as Ea,kl as Da,km as Oa,kn as Ba,ko as Fa,kp as Ma,kq as za,kr as _a,ks as ds,kt as Pa,ku as Na,kv as Va,kw as Ha,gt as us,b1 as Fn,cq as Mn,A as hs,k as ps,D as ms,cB as yn,dU as Io,gp as Wa,fK as Ua,gT as qa,ap as Ka,c as Ja,fv as Za,aA as gs,kx as Ya,aS as $o,aN as Vo,ky as Ga,kz as Xa,gM as xs,kA as Qa,bC as fs,aQ as er,gA as Ot,hM as Vn,eA as Rn,cO as To,ax as tr,cX as ys,dp as nr,iK as or,du as Lo,cv as zn,cy as _n,ir as nt,b as Et,hB as ir,gu as Hn,jb as Ho,dk as Cs,c_ as mn,kB as sr,aY as ar,dt as ws,n as gn,ih as bs,is as yo,kC as on,d_ as vs,d$ as Ss,iN as js,iO as ks,kD as rr,cY as Pn,ii as Is,fk as $s,es as Wn,aH as Ao,kE as lr,cU as cr,aV as Ts,iz as dr,dS as ur,an as Ct,kF as hr,kG as pr,a$ as Un,d7 as mr,a7 as gr,ep as xr,eq as fr,er as yr,et as Wo,eu as Uo,ev as Cr,kH as wr,aZ as br,eE as vr,eF as Sr,eG as jr}from"./index-DKkab5BS.js";import{a as s,w as Ls}from"./core-3dlyNYRL.js";import{n as a,b as Ye,k as Ro}from"./mui-bYXq4XMS.js";import{bj as qn,gg as qo,gh as xn,gi as kr,gj as Ir,cy as $r,bO as Co,cz as Tr,eK as Ko,cA as Lr,cB as Ar,c3 as As,fu as un,bG as Vt,gk as Jo,gl as Rr,b_ as Er,bp as Ht,gm as Dr,gn as Rs,go as Es,gp as Ds,gq as Os,gr as Bs,gs as Eo,gt as Or}from"./zeni-epic-state-xFtF3OLs.js";import{r as Fs,I as Ms,n as sn,R as mt}from"./CollapsableReportTable-Crihcv_z-D0yVWEtn.js";import{N as Kn}from"./AccountRow-Ck53DDbT-CKEPVSTV.js";import{o as zs}from"./mapTimeframeBalancesToTreeNode-DbnAvW1M-DwP6n0dB.js";import{d as Zo}from"./mapLoadingInProgressToTreeNode-DIAuL28N-xsS0oiYX.js";import{h as Br}from"./VendorsAccountsSection-EmHO3wQ0-CEeuSUbZ.js";import{u as Fr,c as Yo,d as Mr,m as zr}from"./uploadAttachment-D3clfqPu-BH3cXou6.js";import"./sentry-DxvQlcJu.js";import"./lottie-CaGAfnTY.js";import"./liveblocks-B3KbWbMM.js";import"./utils-C70QTjQC.js";import"./analytics-CThNEnNw.js";import"./recharts-CXSQ4XPK.js";import"./lexical-DPEnH3HH.js";const{common:{navBar:{back:_r},texts:{refresh:Pr,close:Nr,copy:Vr,copied:Hr,open:Wr}},expenseAutomation:{common:{numbers:{maximumCount:Ur}}}}=je.getLocalizedStrings(),qr=a(Wa)`
1
+ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO as ns,u as g,cn as ua,d as St,bz as ha,h_ as pa,aL as We,bQ as fe,y as ee,bt as ma,aK as z,hY as ga,ak as Fe,gR as xa,gK as os,bu as fa,bM as Bt,b5 as is,ag as jt,bI as ss,p as Ye,k8 as ya,g1 as Ca,al as gt,_ as wa,ge as ba,gf as as,bm as va,ch as Sa,b$ as ja,ey as fn,bY as jo,a8 as Kt,bL as ko,ab as Jt,k9 as ka,ka as Ia,kb as $a,kc as dn,kd as rs,ke as ls,kf as Ta,kg as No,kh as La,dh as cs,ki as Aa,kj as Ra,kk as Ea,kl as Da,km as Oa,kn as Ba,ko as Fa,kp as Ma,kq as za,kr as _a,ks as ds,kt as Pa,ku as Na,kv as Va,kw as Ha,gt as us,b1 as Fn,cq as Mn,A as hs,k as ps,D as ms,cB as yn,dP as Io,gp as Wa,fK as Ua,gT as qa,ap as Ka,c as Ja,fv as Ga,aA as gs,kx as Za,aS as $o,aN as Vo,ky as Ya,kz as Xa,gM as xs,kA as Qa,bC as fs,aQ as er,gA as Ot,hM as Vn,ew as Rn,cO as To,ax as tr,cX as ys,dj as nr,iK as or,dp as Lo,cv as zn,cy as _n,ir as nt,b as Et,hB as ir,gu as Hn,jb as Ho,df as Cs,c_ as mn,kB as sr,aY as ar,dn as ws,n as gn,ih as bs,is as yo,kC as on,dV as vs,dW as Ss,iN as js,iO as ks,kD as rr,cY as Pn,ii as Is,fk as $s,eo as Wn,aH as Ao,kE as lr,cU as cr,aV as Ts,iz as dr,dN as ur,an as Ct,kF as hr,kG as pr,a$ as Un,ek as mr,a7 as gr,el as xr,em as fr,en as yr,ep as Wo,eq as Uo,er as Cr,kH as wr,aZ as br,eA as vr,eB as Sr,eC as jr}from"./index-Ci63exms.js";import{a as s,w as Ls}from"./core-3dlyNYRL.js";import{n as a,b as Ze,k as Ro}from"./mui-bYXq4XMS.js";import{bj as qn,FX as qo,FY as xn,FZ as kr,F_ as Ir,cy as $r,bO as Co,cz as Tr,Et as Ko,cA as Lr,cB as Ar,c3 as As,l6 as un,bG as Vt,F$ as Jo,G0 as Rr,b_ as Er,bp as Ht,G1 as Dr,G2 as Rs,G3 as Es,G4 as Ds,G5 as Os,G6 as Bs,G7 as Eo,kN as Or}from"./zeni-epic-state-BwKvATgd.js";import{r as Fs,I as Ms,n as sn,R as mt}from"./CollapsableReportTable-Crihcv_z-B6sIoSI3.js";import{N as Kn}from"./AccountRow-Ck53DDbT-BeebPIea.js";import{o as zs}from"./mapTimeframeBalancesToTreeNode-DbnAvW1M-DvZ_ljbo.js";import{d as Go}from"./mapLoadingInProgressToTreeNode-DIAuL28N-uQ9ZpPGq.js";import{h as Br}from"./VendorsAccountsSection-EmHO3wQ0-CSPWzKcg.js";import{u as Fr,c as Zo,d as Mr,m as zr}from"./uploadAttachment-D3clfqPu-NbmOED_L.js";import"./sentry-cYFeB6Pw.js";import"./lottie-22bRan8M.js";import"./liveblocks-CNYVvsag.js";import"./utils-fBOyu0sO.js";import"./analytics-XaDXTZcq.js";import"./recharts-h5iNQbFd.js";import"./lexical-DPEnH3HH.js";const{common:{navBar:{back:_r},texts:{refresh:Pr,close:Nr,copy:Vr,copied:Hr,open:Wr}},expenseAutomation:{common:{numbers:{maximumCount:Ur}}}}=je.getLocalizedStrings(),qr=a(Wa)`
2
2
  display: flex;
3
3
  width: ${o.sp4};
4
4
  height: ${o.sp4};
@@ -24,19 +24,19 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
24
24
  position: sticky;
25
25
  top: 0;
26
26
  z-index: 6;
27
- `,Zr=a.div`
27
+ `,Gr=a.div`
28
28
  display: flex;
29
29
  flex-direction: column;
30
30
  align-items: center;
31
31
  padding-left: ${e=>Xo.subSectionContainerLeftRightPadding.valuePx(e.windowSize)};
32
32
  padding-right: ${e=>Xo.subSectionContainerLeftRightPadding.valuePx(e.windowSize)};
33
- `,Yr=a.div`
33
+ `,Zr=a.div`
34
34
  display: flex;
35
35
  align-items: baseline;
36
36
  justify-content: end;
37
37
  gap: ${o.sp4};
38
38
  flex: 1 1 ${o.sp0};
39
- `,Gr=a.div`
39
+ `,Yr=a.div`
40
40
  display: flex;
41
41
  align-items: baseline;
42
42
  justify-content: start;
@@ -52,7 +52,7 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
52
52
  width: ${o.sp3};
53
53
  height: ${o.sp3};
54
54
  margin-left: ${o.sp1};
55
- color: ${Ge.success};
55
+ color: ${Ye.success};
56
56
  `,el=a(wa)`
57
57
  cursor: pointer;
58
58
  width: ${o.sp4};
@@ -74,7 +74,7 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
74
74
  width: ${o.sp4};
75
75
  height: ${o.sp4};
76
76
  color: ${e=>e.theme.colors.hero};
77
- animation: ${e=>e.$spinning?Ye`
77
+ animation: ${e=>e.$spinning?Ze`
78
78
  ${ol} 2s linear infinite;
79
79
  `:"none"};
80
80
  &:hover {
@@ -90,7 +90,7 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
90
90
  `,il=a.div`
91
91
  padding-top: ${o.sp0};
92
92
  padding-bottom: ${o.sp0};
93
- `,Go=a(Fe)`
93
+ `,Yo=a(Fe)`
94
94
  color: ${e=>e.theme.colors.hero};
95
95
  text-align: center;
96
96
  display: flex;
@@ -151,7 +151,7 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
151
151
  }
152
152
  text-decoration-color: ${e=>e.theme.colors.primary};
153
153
  }
154
- `,Xo={subSectionContainerLeftRightPadding:new ee(g[3],g[6],g[8])},pl=({onAllThreadsClick:e,companyId:n,companyName:d})=>{const c={application:"cockpit",companyId:n,entityId:n,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:d,url:window.location.href},{url:h,...p}=c,i={...p},{threads:l,isLoading:r}=ba(i,!1,!1),m=l.filter(u=>u.id.includes(as)===!1);return t.jsxs(Kr,{isDisabled:r,onClick:e,"data-testid":z("comment-icon"),children:[t.jsx(va,{count:m.length,isLoading:r}),t.jsx(qr,{})]})},ml=({headerData:e,refreshStatus:n,searchText:d,companyName:c,companyId:h,isZeniUser:p,onAllThreadsClick:i,onClose:l,onRefresh:r,onSearchTextChanged:m})=>{const u=()=>{n!=="In-Progress"&&r()};return t.jsx(Yr,{children:e.rightSection.map((x,y)=>{switch(x){case"search":return t.jsx(ga,{isSearchOpen:(d.length??0)>0,searchPlaceHolder:e.searchPlaceholder,searchText:d,searchTextBoxStyle:{position:"initial",height:"fit-content"},styledSearchIconContainerStyle:{height:o.sp4},searchIconMarginRight:o.sp0,onSearchTextChanged:w=>{m(w)},downloadPresent:!1},y+x);case"refresh":return t.jsx(fe,{display:"block",placement:"bottom",title:Pr,style:{marginTop:"2px"},enterDelay:600,children:t.jsx(nl,{onClick:u,$spinning:n==="In-Progress","data-testid":z("refresh-icon")})},y+x);case"comment":return p===!1?null:t.jsx(pl,{companyId:h,companyName:c,onAllThreadsClick:i});case"close":default:return t.jsx(fe,{display:"block",placement:"bottom",title:Nr,enterDelay:600,style:{marginTop:"2px"},children:t.jsx(el,{onClick:l,"data-testid":z("close-icon")})},y+x)}})})},gl=({headerData:e,onBack:n})=>t.jsx(Gr,{children:e.leftSection.map((d,c)=>{switch(d){case"back":default:return t.jsx(fe,{display:"block",placement:"bottom",title:_r,enterDelay:600,style:{marginTop:"-14px"},children:t.jsx(tl,{onClick:n,"data-testid":z("back-button")})},c+d)}})}),Qo=({text:e,linkText:n,windowSize:d,isCopied:c,onLinkClick:h})=>{if(n==null||!n)return t.jsxs(Cn,{windowSize:d,children:[e," "]});const p=e.indexOf(n);if(p===-1)return t.jsxs(Cn,{windowSize:d,children:[e," "]});const i=e.substring(0,p),l=e.substring(p+n.length);return t.jsxs(t.Fragment,{children:[i?t.jsxs(Cn,{windowSize:d,children:[i.trim()," "]}):null,t.jsx(fe,{display:"flex",placement:"right",title:os.test(n)?c?Hr:Vr:Wr,enterTouchDelay:600,children:t.jsxs(hl,{onClick:()=>h?.(n),"data-testid":z("pre-link"),children:[n,c?t.jsx(Qr,{className:"success-icon"}):t.jsx(Xr,{className:"copy-icon"})]})}),l?t.jsxs(Cn,{windowSize:d,children:[l," "]}):null]})},ei=({subTitles:e})=>{const n=Se(),[,d]=xa(),[c,h]=s.useState(!1),p=s.useRef(null),i=s.useCallback(l=>{os.test(l)?(d(l),h(!0),p.current&&clearTimeout(p.current),p.current=setTimeout(()=>{h(!1)},2e3)):window.open(l,"_blank","noopener,noreferrer")},[d]);return s.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]),t.jsx(cl,{children:e.map((l,r)=>t.jsxs(ll,{children:[l.pre?t.jsx(Qo,{text:l.pre,linkText:l.preLink,windowSize:n,isCopied:c,onLinkClick:i}):null,l.prefixIconName?t.jsx(t.Fragment,{children:l.prefixIconName==="zeniAIIcon"?t.jsx(dl,{}):t.jsx(t.Fragment,{})}):null,l.bold?t.jsx(t.Fragment,{children:t.jsxs(ul,{windowSize:n,children:[l.bold," "]})}):null,l.post?t.jsx(Qo,{text:l.post,linkText:l.postLink,windowSize:n,isCopied:c,onLinkClick:i}):null]},r+l.bold+l.pre+l.post))})};function xl(e){const{headerData:n,currentTab:d,completionStatus:c,onUpdateTab:h,selectedReconAccountId:p,getTabCountAndFetchState:i,reconcileDetailPageFetchState:l,forceShowSubtitle:r,currentSelectedView:m,onReconTabUpdate:u,currentRecontab:x,navBarCustomElement:y,titleStyle:w={}}=e,b=i("autoCategorized")?.count??0,C=i("review")?.count??0,I=i("reconcile")?.count??0,f=n.tabs.length>0||n.subTitle.length>0,$=m==="transaction_categorization"&&d==="autoCategorized",E=m==="reconciliation"&&x==="review"&&p!=null,L=m==="reconciliation"&&x==="reconcile"&&p!=null,B=$?b>0:E?l==="In-Progress"?!0:C>0:L?l==="In-Progress"?!0:I>0:c!=="complete",S=St(),j=Se();let A=[];return n.tabs.length>0&&(A=n.tabs.map(T=>({label:T.label,id:T.id,countDetails:i(T.id)}))),t.jsxs(Jr,{children:[t.jsx(ha,{title:n.title,subTitle:n.subText,titleTextStyles:{flex:"1 1 0px"},backgroundColor:S.colors.grey4,onBackClick:()=>null,titleStyle:w,ignoreScrollAction:m!=="month_end_insights",keepBackgroundOnScroll:m!=="month_end_insights",leftSideComponent:t.jsx(gl,{...e}),rightSideComponent:t.jsx(ml,{...e}),source:"NavBarWithHeader"}),y??null,t.jsx(_e,{controller:f===!0,children:t.jsx(Zr,{windowSize:j,children:n.tabs.length>0?t.jsxs(t.Fragment,{children:[t.jsx(il,{windowSize:j,children:t.jsx(pa,{allTabs:A,selectedTab:m==="transaction_categorization"?d??A[0].id:x??A[0].id,onTabChange:T=>{if(m==="transaction_categorization"){const W=kr(T.id);W!=null&&h(W)}else if(m==="reconciliation"){const W=Ir(T.id);W!=null&&u(W)}},maximumCountLimit:Ur})}),t.jsx(al,{windowSize:j}),t.jsx(rl,{}),t.jsx(_e,{controller:B===!0||r===!0,children:t.jsx(Go,{windowSize:j,children:n.tabs.map((T,W)=>(m==="reconciliation"?T.id===x:T.id===d)?t.jsx(sl,{children:t.jsx(ei,{subTitles:T.subTitle})},W+T.id):null)})})]}):t.jsx(_e,{controller:B===!0||r===!0,children:t.jsx(Go,{windowSize:j,children:t.jsx(ei,{subTitles:n.subTitle})})})})})]})}const fl=1;function yl({name:e,checkBoxes:n,mode:d,isDisabled:c,style:h,labelStyle:p,labelCheckBoxStyle:i,checkBoxStyle:l,width:r,registerOptions:m,checkedIconColor:u,checkBoxIconStyle:x,checkBoxContainerStyle:y,draggable:w=!1,selectionLimit:b,infoIconContainerStyle:C,onDragStart:I,rowHeight:f=40,initialScrollOffSet:$,onScroll:E}){const L=Se(),B=s.useRef(null),{control:S}=To(),j=n.find(F=>F.groupLabel),A=n.filter(F=>!F.groupLabel),T=[];for(const F of A)if(F.isException||T.push(F.value),b!=null&&T.length===b+1)break;const W=n.filter(F=>F.defaultChecked).map(F=>F.value);return t.jsx(ys,{control:S,name:e,rules:m,defaultValue:W,render:({field:{value:F,ref:H,onChange:V}})=>{const K=Z=>{wl({event:Z,value:F,allCheckBoxValues:T,groupLabelCheckBox:j,onChange:V})};return t.jsxs(bl,{style:h,windowSize:L,children:[j&&t.jsx(Do,{checkBox:j,index:0,value:F,allCheckBoxValues:T,mode:d,name:e,checkBoxContainerStyle:y,checkBoxIconStyle:x,checkBoxStyle:l,labelCheckBoxStyle:i,labelStyle:p,width:r,draggable:w,groupLabelCheckBox:j,infoIconContainerStyle:C,checkedIconColor:u,isDisabled:c,selectionLimit:b,onDragStart:I,ref:H,onChangeHandler:K}),t.jsx(vl,{children:t.jsx(Fn,{style:{height:"100%",width:"100%"},children:({height:Z,width:q})=>t.jsx(Mn,{ref:B,height:Z,width:q,itemCount:A.length,itemSize:()=>f,estimatedItemSize:f,initialScrollOffset:$??0,onScroll:({scrollOffset:M})=>{E?.(M)},overscanCount:fl,itemKey:M=>A[M].value,itemData:{checkBoxes:A,value:F,allCheckBoxValues:T,mode:d,name:e,checkBoxContainerStyle:y,checkBoxIconStyle:x,checkBoxStyle:l,labelCheckBoxStyle:i,labelStyle:p,width:r,draggable:w,groupLabelCheckBox:j,infoIconContainerStyle:C,checkedIconColor:u,isDisabled:c,selectionLimit:b,onDragStart:I,ref:H,onChange:V,handleChangeEvent:K,rowHeight:f},children:Cl})})})]})}})}const Cl=({index:e,style:n,data:d})=>{const c=s.useRef(null),{checkBoxes:h,value:p,allCheckBoxValues:i,mode:l,name:r,checkBoxContainerStyle:m,checkBoxIconStyle:u,checkBoxStyle:x,labelCheckBoxStyle:y,labelStyle:w,width:b,draggable:C,groupLabelCheckBox:I,infoIconContainerStyle:f,checkedIconColor:$,isDisabled:E,selectionLimit:L,onDragStart:B,ref:S,handleChangeEvent:j}=d,A=h[e];return t.jsx(Tl,{style:{...n,width:"100%"},ref:c,children:t.jsx(Do,{checkBox:A,index:e,value:p,allCheckBoxValues:i,mode:l,name:r,checkBoxContainerStyle:m,checkBoxIconStyle:u,checkBoxStyle:x,labelCheckBoxStyle:y,labelStyle:w,width:b,draggable:C,groupLabelCheckBox:I,infoIconContainerStyle:f,checkedIconColor:$,isDisabled:E,selectionLimit:L,onDragStart:B,ref:S,onChangeHandler:j})})},Do=s.forwardRef((e,n)=>{const{value:d,checkBox:c,groupLabelCheckBox:h,allCheckBoxValues:p,selectionLimit:i,mode:l,checkBoxStyle:r,labelCheckBoxStyle:m,isDisabled:u,draggable:x,checkBoxContainerStyle:y,infoIconContainerStyle:w,name:b,index:C,width:I,checkedIconColor:f,checkBoxIconStyle:$,labelStyle:E,onDragStart:L,onChangeHandler:B}=e,S=Se(),j=F=>{typeof n=="function"?n(F):n&&(n.current=F)};let A=d.includes(c.value);const T=Array.from(new Set([...d,c.value]));h?.value===c.value&&d.length>0&&(i!=null?A=T.length===p.length||T.length===i+1:A=p.every(F=>T.includes(F)===!0));const W=()=>l==="off"||c.isException?S==="small"?{display:"none",...r}:{visibility:"hidden",...r}:c.groupLabel?p.length===1&&p[0]===h?.value?{visibility:"hidden",...m}:m:r;return t.jsxs(jl,{mode:l,draggable:x===!0,onDragStart:F=>{L?.(F,c.value)},style:y,isDisabled:u,isSelected:A,exceptionMode:c.exceptionMode,children:[c.prefix?t.jsx(Sl,{className:"prefix-box",children:c.prefix}):null,c.isException?t.jsx(kl,{style:w,className:"checkbox-alert",children:t.jsx(fe,{style:{padding:`12px ${o.sp3}`},title:c.exceptionInfo??"",placement:"bottom-start",children:c.exceptionType==="info"?t.jsx(Il,{}):t.jsx($l,{})})}):t.jsx(lr,{name:`${b}.${c.value}`,checkBoxValue:c.value,value:A,checkedIconColor:f,isDisabled:u||!c.groupLabel&&!A&&i!=null&&T.length===i+1?"disabled":void 0,checkBoxStyle:W(),checkBoxIconStyle:$,ref:j,onChange:B}),typeof c.label=="string"&&c.label?t.jsx(cr,{isDisabled:u,label:c.label,labelStyle:E,htmlFor:`${b}.${c.value}`,style:{display:"flex",flex:1,minHeight:o.sp4,marginLeft:o.sp2,width:I,backgroundColor:"inherit",...E}}):c.label]},`${c.value}_${C}`)});Do.displayName="CheckBoxWithLabel";const wl=({event:e,value:n,allCheckBoxValues:d,groupLabelCheckBox:c,onChange:h})=>{const p=e.currentTarget.value,i=e.currentTarget.checked,l=c?.value,r=new Set(n);if(p===l){h(i?Array.from(new Set([l,...d])):[]);return}i?r.add(p):r.delete(p);const m=d.every(u=>r.has(u));l!=null&&(m&&!r.has(l)?r.add(l):!m&&r.has(l)&&r.delete(l)),h(Array.from(r))},bl=a.div`
154
+ `,Xo={subSectionContainerLeftRightPadding:new ee(g[3],g[6],g[8])},pl=({onAllThreadsClick:e,companyId:n,companyName:d})=>{const c={application:"cockpit",companyId:n,entityId:n,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:d,url:window.location.href},{url:h,...p}=c,i={...p},{threads:l,isLoading:r}=ba(i,!1,!1),m=l.filter(u=>u.id.includes(as)===!1);return t.jsxs(Kr,{isDisabled:r,onClick:e,"data-testid":z("comment-icon"),children:[t.jsx(va,{count:m.length,isLoading:r}),t.jsx(qr,{})]})},ml=({headerData:e,refreshStatus:n,searchText:d,companyName:c,companyId:h,isZeniUser:p,onAllThreadsClick:i,onClose:l,onRefresh:r,onSearchTextChanged:m})=>{const u=()=>{n!=="In-Progress"&&r()};return t.jsx(Zr,{children:e.rightSection.map((x,y)=>{switch(x){case"search":return t.jsx(ga,{isSearchOpen:(d.length??0)>0,searchPlaceHolder:e.searchPlaceholder,searchText:d,searchTextBoxStyle:{position:"initial",height:"fit-content"},styledSearchIconContainerStyle:{height:o.sp4},searchIconMarginRight:o.sp0,onSearchTextChanged:w=>{m(w)},downloadPresent:!1},y+x);case"refresh":return t.jsx(fe,{display:"block",placement:"bottom",title:Pr,style:{marginTop:"2px"},enterDelay:600,children:t.jsx(nl,{onClick:u,$spinning:n==="In-Progress","data-testid":z("refresh-icon")})},y+x);case"comment":return p===!1?null:t.jsx(pl,{companyId:h,companyName:c,onAllThreadsClick:i});case"close":default:return t.jsx(fe,{display:"block",placement:"bottom",title:Nr,enterDelay:600,style:{marginTop:"2px"},children:t.jsx(el,{onClick:l,"data-testid":z("close-icon")})},y+x)}})})},gl=({headerData:e,onBack:n})=>t.jsx(Yr,{children:e.leftSection.map((d,c)=>{switch(d){case"back":default:return t.jsx(fe,{display:"block",placement:"bottom",title:_r,enterDelay:600,style:{marginTop:"-14px"},children:t.jsx(tl,{onClick:n,"data-testid":z("back-button")})},c+d)}})}),Qo=({text:e,linkText:n,windowSize:d,isCopied:c,onLinkClick:h})=>{if(n==null||!n)return t.jsxs(Cn,{windowSize:d,children:[e," "]});const p=e.indexOf(n);if(p===-1)return t.jsxs(Cn,{windowSize:d,children:[e," "]});const i=e.substring(0,p),l=e.substring(p+n.length);return t.jsxs(t.Fragment,{children:[i?t.jsxs(Cn,{windowSize:d,children:[i.trim()," "]}):null,t.jsx(fe,{display:"flex",placement:"right",title:os.test(n)?c?Hr:Vr:Wr,enterTouchDelay:600,children:t.jsxs(hl,{onClick:()=>h?.(n),"data-testid":z("pre-link"),children:[n,c?t.jsx(Qr,{className:"success-icon"}):t.jsx(Xr,{className:"copy-icon"})]})}),l?t.jsxs(Cn,{windowSize:d,children:[l," "]}):null]})},ei=({subTitles:e})=>{const n=Se(),[,d]=xa(),[c,h]=s.useState(!1),p=s.useRef(null),i=s.useCallback(l=>{os.test(l)?(d(l),h(!0),p.current&&clearTimeout(p.current),p.current=setTimeout(()=>{h(!1)},2e3)):window.open(l,"_blank","noopener,noreferrer")},[d]);return s.useEffect(()=>()=>{p.current&&clearTimeout(p.current)},[]),t.jsx(cl,{children:e.map((l,r)=>t.jsxs(ll,{children:[l.pre?t.jsx(Qo,{text:l.pre,linkText:l.preLink,windowSize:n,isCopied:c,onLinkClick:i}):null,l.prefixIconName?t.jsx(t.Fragment,{children:l.prefixIconName==="zeniAIIcon"?t.jsx(dl,{}):t.jsx(t.Fragment,{})}):null,l.bold?t.jsx(t.Fragment,{children:t.jsxs(ul,{windowSize:n,children:[l.bold," "]})}):null,l.post?t.jsx(Qo,{text:l.post,linkText:l.postLink,windowSize:n,isCopied:c,onLinkClick:i}):null]},r+l.bold+l.pre+l.post))})};function xl(e){const{headerData:n,currentTab:d,completionStatus:c,onUpdateTab:h,selectedReconAccountId:p,getTabCountAndFetchState:i,reconcileDetailPageFetchState:l,forceShowSubtitle:r,currentSelectedView:m,onReconTabUpdate:u,currentRecontab:x,navBarCustomElement:y,titleStyle:w={}}=e,b=i("autoCategorized")?.count??0,C=i("review")?.count??0,I=i("reconcile")?.count??0,f=n.tabs.length>0||n.subTitle.length>0,$=m==="transaction_categorization"&&d==="autoCategorized",E=m==="reconciliation"&&x==="review"&&p!=null,L=m==="reconciliation"&&x==="reconcile"&&p!=null,B=$?b>0:E?l==="In-Progress"?!0:C>0:L?l==="In-Progress"?!0:I>0:c!=="complete",S=St(),j=Se();let A=[];return n.tabs.length>0&&(A=n.tabs.map(T=>({label:T.label,id:T.id,countDetails:i(T.id)}))),t.jsxs(Jr,{children:[t.jsx(ha,{title:n.title,subTitle:n.subText,titleTextStyles:{flex:"1 1 0px"},backgroundColor:S.colors.grey4,onBackClick:()=>null,titleStyle:w,ignoreScrollAction:m!=="month_end_insights",keepBackgroundOnScroll:m!=="month_end_insights",leftSideComponent:t.jsx(gl,{...e}),rightSideComponent:t.jsx(ml,{...e}),source:"NavBarWithHeader"}),y??null,t.jsx(_e,{controller:f===!0,children:t.jsx(Gr,{windowSize:j,children:n.tabs.length>0?t.jsxs(t.Fragment,{children:[t.jsx(il,{windowSize:j,children:t.jsx(pa,{allTabs:A,selectedTab:m==="transaction_categorization"?d??A[0].id:x??A[0].id,onTabChange:T=>{if(m==="transaction_categorization"){const W=kr(T.id);W!=null&&h(W)}else if(m==="reconciliation"){const W=Ir(T.id);W!=null&&u(W)}},maximumCountLimit:Ur})}),t.jsx(al,{windowSize:j}),t.jsx(rl,{}),t.jsx(_e,{controller:B===!0||r===!0,children:t.jsx(Yo,{windowSize:j,children:n.tabs.map((T,W)=>(m==="reconciliation"?T.id===x:T.id===d)?t.jsx(sl,{children:t.jsx(ei,{subTitles:T.subTitle})},W+T.id):null)})})]}):t.jsx(_e,{controller:B===!0||r===!0,children:t.jsx(Yo,{windowSize:j,children:t.jsx(ei,{subTitles:n.subTitle})})})})})]})}const fl=1;function yl({name:e,checkBoxes:n,mode:d,isDisabled:c,style:h,labelStyle:p,labelCheckBoxStyle:i,checkBoxStyle:l,width:r,registerOptions:m,checkedIconColor:u,checkBoxIconStyle:x,checkBoxContainerStyle:y,draggable:w=!1,selectionLimit:b,infoIconContainerStyle:C,onDragStart:I,rowHeight:f=40,initialScrollOffSet:$,onScroll:E}){const L=Se(),B=s.useRef(null),{control:S}=To(),j=n.find(F=>F.groupLabel),A=n.filter(F=>!F.groupLabel),T=[];for(const F of A)if(F.isException||T.push(F.value),b!=null&&T.length===b+1)break;const W=n.filter(F=>F.defaultChecked).map(F=>F.value);return t.jsx(ys,{control:S,name:e,rules:m,defaultValue:W,render:({field:{value:F,ref:H,onChange:V}})=>{const K=G=>{wl({event:G,value:F,allCheckBoxValues:T,groupLabelCheckBox:j,onChange:V})};return t.jsxs(bl,{style:h,windowSize:L,children:[j&&t.jsx(Do,{checkBox:j,index:0,value:F,allCheckBoxValues:T,mode:d,name:e,checkBoxContainerStyle:y,checkBoxIconStyle:x,checkBoxStyle:l,labelCheckBoxStyle:i,labelStyle:p,width:r,draggable:w,groupLabelCheckBox:j,infoIconContainerStyle:C,checkedIconColor:u,isDisabled:c,selectionLimit:b,onDragStart:I,ref:H,onChangeHandler:K}),t.jsx(vl,{children:t.jsx(Fn,{style:{height:"100%",width:"100%"},children:({height:G,width:q})=>t.jsx(Mn,{ref:B,height:G,width:q,itemCount:A.length,itemSize:()=>f,estimatedItemSize:f,initialScrollOffset:$??0,onScroll:({scrollOffset:M})=>{E?.(M)},overscanCount:fl,itemKey:M=>A[M].value,itemData:{checkBoxes:A,value:F,allCheckBoxValues:T,mode:d,name:e,checkBoxContainerStyle:y,checkBoxIconStyle:x,checkBoxStyle:l,labelCheckBoxStyle:i,labelStyle:p,width:r,draggable:w,groupLabelCheckBox:j,infoIconContainerStyle:C,checkedIconColor:u,isDisabled:c,selectionLimit:b,onDragStart:I,ref:H,onChange:V,handleChangeEvent:K,rowHeight:f},children:Cl})})})]})}})}const Cl=({index:e,style:n,data:d})=>{const c=s.useRef(null),{checkBoxes:h,value:p,allCheckBoxValues:i,mode:l,name:r,checkBoxContainerStyle:m,checkBoxIconStyle:u,checkBoxStyle:x,labelCheckBoxStyle:y,labelStyle:w,width:b,draggable:C,groupLabelCheckBox:I,infoIconContainerStyle:f,checkedIconColor:$,isDisabled:E,selectionLimit:L,onDragStart:B,ref:S,handleChangeEvent:j}=d,A=h[e];return t.jsx(Tl,{style:{...n,width:"100%"},ref:c,children:t.jsx(Do,{checkBox:A,index:e,value:p,allCheckBoxValues:i,mode:l,name:r,checkBoxContainerStyle:m,checkBoxIconStyle:u,checkBoxStyle:x,labelCheckBoxStyle:y,labelStyle:w,width:b,draggable:C,groupLabelCheckBox:I,infoIconContainerStyle:f,checkedIconColor:$,isDisabled:E,selectionLimit:L,onDragStart:B,ref:S,onChangeHandler:j})})},Do=s.forwardRef((e,n)=>{const{value:d,checkBox:c,groupLabelCheckBox:h,allCheckBoxValues:p,selectionLimit:i,mode:l,checkBoxStyle:r,labelCheckBoxStyle:m,isDisabled:u,draggable:x,checkBoxContainerStyle:y,infoIconContainerStyle:w,name:b,index:C,width:I,checkedIconColor:f,checkBoxIconStyle:$,labelStyle:E,onDragStart:L,onChangeHandler:B}=e,S=Se(),j=F=>{typeof n=="function"?n(F):n&&(n.current=F)};let A=d.includes(c.value);const T=Array.from(new Set([...d,c.value]));h?.value===c.value&&d.length>0&&(i!=null?A=T.length===p.length||T.length===i+1:A=p.every(F=>T.includes(F)===!0));const W=()=>l==="off"||c.isException?S==="small"?{display:"none",...r}:{visibility:"hidden",...r}:c.groupLabel?p.length===1&&p[0]===h?.value?{visibility:"hidden",...m}:m:r;return t.jsxs(jl,{mode:l,draggable:x===!0,onDragStart:F=>{L?.(F,c.value)},style:y,isDisabled:u,isSelected:A,exceptionMode:c.exceptionMode,children:[c.prefix?t.jsx(Sl,{className:"prefix-box",children:c.prefix}):null,c.isException?t.jsx(kl,{style:w,className:"checkbox-alert",children:t.jsx(fe,{style:{padding:`12px ${o.sp3}`},title:c.exceptionInfo??"",placement:"bottom-start",children:c.exceptionType==="info"?t.jsx(Il,{}):t.jsx($l,{})})}):t.jsx(lr,{name:`${b}.${c.value}`,checkBoxValue:c.value,value:A,checkedIconColor:f,isDisabled:u||!c.groupLabel&&!A&&i!=null&&T.length===i+1?"disabled":void 0,checkBoxStyle:W(),checkBoxIconStyle:$,ref:j,onChange:B}),typeof c.label=="string"&&c.label?t.jsx(cr,{isDisabled:u,label:c.label,labelStyle:E,htmlFor:`${b}.${c.value}`,style:{display:"flex",flex:1,minHeight:o.sp4,marginLeft:o.sp2,width:I,backgroundColor:"inherit",...E}}):c.label]},`${c.value}_${C}`)});Do.displayName="CheckBoxWithLabel";const wl=({event:e,value:n,allCheckBoxValues:d,groupLabelCheckBox:c,onChange:h})=>{const p=e.currentTarget.value,i=e.currentTarget.checked,l=c?.value,r=new Set(n);if(p===l){h(i?Array.from(new Set([l,...d])):[]);return}i?r.add(p):r.delete(p);const m=d.every(u=>r.has(u));l!=null&&(m&&!r.has(l)?r.add(l):!m&&r.has(l)&&r.delete(l)),h(Array.from(r))},bl=a.div`
155
155
  display: flex;
156
156
  flex-direction: column;
157
157
  width: 100%;
@@ -168,7 +168,7 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
168
168
  width: 100%;
169
169
  min-height: ${o.sp4};
170
170
 
171
- ${e=>e.mode==="checked_or_hover"&&Ye`
171
+ ${e=>e.mode==="checked_or_hover"&&Ze`
172
172
  input:not(:checked) ~ .unchecked-icon {
173
173
  opacity: 0;
174
174
  }
@@ -181,7 +181,7 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
181
181
  }
182
182
  `};
183
183
 
184
- ${e=>e.mode==="hover_only"&&Ye`
184
+ ${e=>e.mode==="hover_only"&&Ze`
185
185
  input:not(:checked) ~ .unchecked-icon,
186
186
  input:checked ~ .checked-icon {
187
187
  opacity: 0;
@@ -198,7 +198,7 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
198
198
 
199
199
  label {
200
200
  color: ${e=>e.isSelected?e.theme.colors.primary:e.theme.colors.hero};
201
- ${e=>e.isDisabled==="disabled"&&Ye`
201
+ ${e=>e.isDisabled==="disabled"&&Ze`
202
202
  color: ${e.theme.colors.grey2};
203
203
  `};
204
204
  cursor: ${e=>e.isDisabled==="disabled"?"not-allowed":"pointer"};
@@ -209,7 +209,7 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
209
209
  opacity: 0;
210
210
  }
211
211
 
212
- ${e=>e.exceptionMode==="hover_only"&&Ye`
212
+ ${e=>e.exceptionMode==="hover_only"&&Ze`
213
213
  :hover {
214
214
  .checkbox-alert {
215
215
  opacity: 1;
@@ -217,7 +217,7 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
217
217
  }
218
218
  `}
219
219
 
220
- ${e=>e.exceptionMode==="checked_or_hover"&&Ye`
220
+ ${e=>e.exceptionMode==="checked_or_hover"&&Ze`
221
221
  .checkbox-alert {
222
222
  opacity: 1;
223
223
  }
@@ -269,7 +269,7 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
269
269
  color: ${e=>e.theme.colors.brandColorJade};
270
270
  `,Pl=a(Ja)`
271
271
  color: ${e=>e.theme.colors.primary};
272
- `,Nl=e=>{const{tab:n}=e;switch(n){case"transaction_categorization":return t.jsx(Ol,{});case"je_schedules":case"reconciliation":return t.jsx(Ml,{});case"flux_analysis":return t.jsx(Fl,{});case"missing_receipts":default:return t.jsx(Bl,{})}};function vt(e){const{title:n,subTitle:d}=e;return t.jsx(Dl,{children:t.jsxs(zl,{children:[t.jsx(Nl,{...e}),t.jsx(_l,{children:n}),t.jsx(Pl,{children:d})]})})}const{common:{headers:{transactions:Vl,jeSchedules:Hl,fluxAnalysis:Wl,missingReceipts:Ul,insights:ql,reconciliation:ti},strings:{empty:_t}},expenseAutomation:{transactions:{tabs:ni,subTitles:{review:{item1:wn,item2:bn},autoCategorized:{item1:vn,item2:Kl}},searchPlaceholder:Jl,allDoneText:Zl},jeSchedules:{subTitles:{item1:Yl,item2:Gl},searchPlaceholder:Xl,allDoneText:Ql},missingReceipts:{subTitles:ec,searchPlaceholder:tc,allDoneText:nc},fluxAnalysis:{subTitles:{item1:oc,item2:ic},searchPlaceholder:sc,emptyPageTexts:{youDidIt:ac,allReviewed:rc}},accountRecon:{review:{allDoneText:oi},reconcile:{allDoneText:lc},tabs:ii,titles:{item1:cc,item2:dc},subTitles:{review:{item1:uc,item2:Sn},reconcile:{item1:jn,item2:hc}}}}}=je.getLocalizedStrings(),Ne=(e,n,d,c,h)=>{switch(e){case"transaction_categorization":return{key:"transaction_categorization",title:Vl,subTitle:[],tabs:[{label:ni.review,id:"review",subTitle:[{pre:wn.pre,bold:wn.bold,prefixIconName:wn.prefixIconName,post:wn.post},{pre:bn.pre,bold:bn.bold,prefixIconName:bn.prefixIconName,post:bn.post}]},{label:ni.autoCategorized,id:"autoCategorized",subTitle:[{pre:vn.pre,bold:vn.bold,prefixIconName:vn.prefixIconName,post:vn.post.replace("#number",n!=null&&n!=0?n.toString():"")},Kl]}],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Jl,allDoneText:Zl};case"je_schedules":return{key:"je_schedules",title:Hl,subTitle:[Yl,Gl],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Xl,allDoneText:Ql};case"missing_receipts":return{key:"missing_receipts",title:Ul,subTitle:[ec],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:tc,allDoneText:nc};case"flux_analysis":return{key:"flux_analysis",title:Wl,subTitle:[oc,ic],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:sc,allDoneText:{title:ac,subTitle:rc}};case"month_end_insights":return{key:"month_end_insights",title:ql,subTitle:[],tabs:[],rightSection:["comment","refresh","close"],leftSection:[],searchPlaceholder:_t,allDoneText:{title:_t,subTitle:_t}};case"reconciliation":return d==null?{key:"reconciliation",title:ti,subTitle:[cc,dc],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:_t,allDoneText:{title:_t,subTitle:_t}}:{key:"reconciliation",title:c??ti,subText:h??void 0,subTitle:[],tabs:[{label:ii.review,id:"review",subTitle:[uc,{pre:Sn.pre,bold:Sn.bold,prefixIconName:Sn.prefixIconName,post:Sn.post}],allDoneText:oi},{label:ii.reconcile,id:"reconcile",subTitle:[{pre:jn.pre,bold:jn.bold,prefixIconName:jn.prefixIconName,post:jn.post},hc],allDoneText:lc}],rightSection:["refresh"],leftSection:["back"],searchPlaceholder:_t,allDoneText:oi}}},{common:{strings:{empty:pc}},expenseAutomation:{accountRecon:{reconcile:{header:Ft}}}}=je.getLocalizedStrings(),mc={key:"date",value:Ft.date,sortOrder:"ascending",width:new ee(12.75,12.75,12.75),customStyle:{marginLeft:g[4],marginRight:g[3]}},gc={key:"clearedDate",value:Ft.clearedDate,sortOrder:"ascending",width:new ee(12.75,12.75,12.75),customStyle:{marginRight:g[3],display:"none"}},xc={key:"type",value:Ft.type,sortOrder:"ascending",width:new ee(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},fc={key:"payee",value:Ft.payee,sortOrder:"ascending",width:new ee(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},yc={key:"account",value:Ft.account,sortOrder:"ascending",width:new ee(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},Cc={key:"transactionDirection",value:Ft.direction,sortOrder:"ascending",width:new ee(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},wc={key:"memo",value:Ft.memo,sortOrder:"ascending",width:new ee(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},bc={key:"amount",value:Ft.amount,sortOrder:"ascending",width:new ee(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},vc={key:"recommended",value:pc,sortOrder:"ascending",width:new ee(1.25,1.25,1.25),customStyle:{marginRight:g[4],marginLeft:g[0]}},Ee=[mc,gc,xc,fc,yc,Cc,wc,bc,vc],Sc=50,cn={sortKey:"date",sortOrder:"descending"};function jc({sortConfig:e,onReconTabColumnSortConfigChanged:n}){const d=Se(),[c,h]=s.useState(Ao(Ee));s.useEffect(()=>{const l=[...c];for(const r of l)r.key===e.sortKey?r.sortOrder=e.sortOrder:r.sortOrder="ascending";h(l)},[e.sortKey,e.sortOrder]);const p=(l,r)=>{let m=r;e.sortKey===l&&(m=r==="ascending"?"descending":"ascending"),n(l,m)},i=l=>{p(l.key,l.sortOrder)};return t.jsx(Tc,{headerHeight:Sc,children:c.map(l=>t.jsx(Ic,{columnWidth:l.width,windowSize:d,sortDataValue:e.sortKey,actualDataValue:l.key,style:l.customStyle,children:t.jsxs(Dc,{isVisible:l.key!=="recommended",children:[t.jsx($c,{"data-testid":z("reconcile-tab-list-sort",l.value),onClick:()=>i(l),children:t.jsx(gt,{children:l.value})}),t.jsx(Lc,{sortConfig:e,headerData:l,children:t.jsx(Ac,{})}),t.jsx(Rc,{isVisible:e.sortKey===l.key&&(e.sortKey!==cn.sortKey||e.sortOrder!==cn.sortOrder),children:t.jsx(Ec,{"data-testid":z("reconcile-tab-list-reset-sort",cn.sortKey),onClick:()=>n(cn.sortKey,cn.sortOrder)})})]})},l.key))})}const kc=Ls.memo(jc),Ic=a.div`
272
+ `,Nl=e=>{const{tab:n}=e;switch(n){case"transaction_categorization":return t.jsx(Ol,{});case"je_schedules":case"reconciliation":return t.jsx(Ml,{});case"flux_analysis":return t.jsx(Fl,{});case"missing_receipts":default:return t.jsx(Bl,{})}};function vt(e){const{title:n,subTitle:d}=e;return t.jsx(Dl,{children:t.jsxs(zl,{children:[t.jsx(Nl,{...e}),t.jsx(_l,{children:n}),t.jsx(Pl,{children:d})]})})}const{common:{headers:{transactions:Vl,jeSchedules:Hl,fluxAnalysis:Wl,missingReceipts:Ul,insights:ql,reconciliation:ti},strings:{empty:_t}},expenseAutomation:{transactions:{tabs:ni,subTitles:{review:{item1:wn,item2:bn},autoCategorized:{item1:vn,item2:Kl}},searchPlaceholder:Jl,allDoneText:Gl},jeSchedules:{subTitles:{item1:Zl,item2:Yl},searchPlaceholder:Xl,allDoneText:Ql},missingReceipts:{subTitles:ec,searchPlaceholder:tc,allDoneText:nc},fluxAnalysis:{subTitles:{item1:oc,item2:ic},searchPlaceholder:sc,emptyPageTexts:{youDidIt:ac,allReviewed:rc}},accountRecon:{review:{allDoneText:oi},reconcile:{allDoneText:lc},tabs:ii,titles:{item1:cc,item2:dc},subTitles:{review:{item1:uc,item2:Sn},reconcile:{item1:jn,item2:hc}}}}}=je.getLocalizedStrings(),Ne=(e,n,d,c,h)=>{switch(e){case"transaction_categorization":return{key:"transaction_categorization",title:Vl,subTitle:[],tabs:[{label:ni.review,id:"review",subTitle:[{pre:wn.pre,bold:wn.bold,prefixIconName:wn.prefixIconName,post:wn.post},{pre:bn.pre,bold:bn.bold,prefixIconName:bn.prefixIconName,post:bn.post}]},{label:ni.autoCategorized,id:"autoCategorized",subTitle:[{pre:vn.pre,bold:vn.bold,prefixIconName:vn.prefixIconName,post:vn.post.replace("#number",n!=null&&n!=0?n.toString():"")},Kl]}],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Jl,allDoneText:Gl};case"je_schedules":return{key:"je_schedules",title:Hl,subTitle:[Zl,Yl],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:Xl,allDoneText:Ql};case"missing_receipts":return{key:"missing_receipts",title:Ul,subTitle:[ec],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:tc,allDoneText:nc};case"flux_analysis":return{key:"flux_analysis",title:Wl,subTitle:[oc,ic],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:sc,allDoneText:{title:ac,subTitle:rc}};case"month_end_insights":return{key:"month_end_insights",title:ql,subTitle:[],tabs:[],rightSection:["comment","refresh","close"],leftSection:[],searchPlaceholder:_t,allDoneText:{title:_t,subTitle:_t}};case"reconciliation":return d==null?{key:"reconciliation",title:ti,subTitle:[cc,dc],tabs:[],rightSection:["refresh","close"],leftSection:[],searchPlaceholder:_t,allDoneText:{title:_t,subTitle:_t}}:{key:"reconciliation",title:c??ti,subText:h??void 0,subTitle:[],tabs:[{label:ii.review,id:"review",subTitle:[uc,{pre:Sn.pre,bold:Sn.bold,prefixIconName:Sn.prefixIconName,post:Sn.post}],allDoneText:oi},{label:ii.reconcile,id:"reconcile",subTitle:[{pre:jn.pre,bold:jn.bold,prefixIconName:jn.prefixIconName,post:jn.post},hc],allDoneText:lc}],rightSection:["refresh"],leftSection:["back"],searchPlaceholder:_t,allDoneText:oi}}},{common:{strings:{empty:pc}},expenseAutomation:{accountRecon:{reconcile:{header:Ft}}}}=je.getLocalizedStrings(),mc={key:"date",value:Ft.date,sortOrder:"ascending",width:new ee(12.75,12.75,12.75),customStyle:{marginLeft:g[4],marginRight:g[3]}},gc={key:"clearedDate",value:Ft.clearedDate,sortOrder:"ascending",width:new ee(12.75,12.75,12.75),customStyle:{marginRight:g[3],display:"none"}},xc={key:"type",value:Ft.type,sortOrder:"ascending",width:new ee(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},fc={key:"payee",value:Ft.payee,sortOrder:"ascending",width:new ee(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},yc={key:"account",value:Ft.account,sortOrder:"ascending",width:new ee(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},Cc={key:"transactionDirection",value:Ft.direction,sortOrder:"ascending",width:new ee(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},wc={key:"memo",value:Ft.memo,sortOrder:"ascending",width:new ee(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},bc={key:"amount",value:Ft.amount,sortOrder:"ascending",width:new ee(12.75,12.75,12.75),customStyle:{marginRight:g[3]}},vc={key:"recommended",value:pc,sortOrder:"ascending",width:new ee(1.25,1.25,1.25),customStyle:{marginRight:g[4],marginLeft:g[0]}},Ee=[mc,gc,xc,fc,yc,Cc,wc,bc,vc],Sc=50,cn={sortKey:"date",sortOrder:"descending"};function jc({sortConfig:e,onReconTabColumnSortConfigChanged:n}){const d=Se(),[c,h]=s.useState(Ao(Ee));s.useEffect(()=>{const l=[...c];for(const r of l)r.key===e.sortKey?r.sortOrder=e.sortOrder:r.sortOrder="ascending";h(l)},[e.sortKey,e.sortOrder]);const p=(l,r)=>{let m=r;e.sortKey===l&&(m=r==="ascending"?"descending":"ascending"),n(l,m)},i=l=>{p(l.key,l.sortOrder)};return t.jsx(Tc,{headerHeight:Sc,children:c.map(l=>t.jsx(Ic,{columnWidth:l.width,windowSize:d,sortDataValue:e.sortKey,actualDataValue:l.key,style:l.customStyle,children:t.jsxs(Dc,{isVisible:l.key!=="recommended",children:[t.jsx($c,{"data-testid":z("reconcile-tab-list-sort",l.value),onClick:()=>i(l),children:t.jsx(gt,{children:l.value})}),t.jsx(Lc,{sortConfig:e,headerData:l,children:t.jsx(Ac,{})}),t.jsx(Rc,{isVisible:e.sortKey===l.key&&(e.sortKey!==cn.sortKey||e.sortOrder!==cn.sortOrder),children:t.jsx(Ec,{"data-testid":z("reconcile-tab-list-reset-sort",cn.sortKey),onClick:()=>n(cn.sortKey,cn.sortOrder)})})]})},l.key))})}const kc=Ls.memo(jc),Ic=a.div`
273
273
  color: ${e=>e.sortDataValue===e.actualDataValue?e.theme.colors.primary:e.theme.colors.grey1};
274
274
  :hover {
275
275
  color: ${e=>e.theme.colors.primary};
@@ -366,9 +366,9 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
366
366
  padding: 1px 6px;
367
367
  border-radius: ${o.sp1};
368
368
  border: ${e=>`1px solid ${e.isSelected?e.theme.colors.primary:e.theme.colors.hero}`};
369
- `,Vc=je.getLocalizedStrings(),{common:{all:ai,strings:{empty:ri}}}=Vc,li="selectedTransactionIds",Hc="expenseAutomationBankReconReconcilePage",Wc=e=>`${e}_form`;function Uc({currentFooterFormId:e,localData:n,matchedTransactions:d,sortConfig:c,onSaveReconciliation:h,selectedAccountId:p,onReconTabColumnSortConfigChanged:i,onUpdateReconcileTabLocalData:l,setCurrentFooterFormId:r}){const m=Kt({mode:"all",defaultValues:{selectedTransactionIds:n.selectedTransactionIds},values:{selectedTransactionIds:n.selectedTransactionIds}}),u={label:t.jsx(kc,{onReconTabColumnSortConfigChanged:i,sortConfig:c}),value:ai.toLocaleLowerCase(),defaultChecked:!1,groupLabel:!0},x=d.map(C=>({label:t.jsx(Fc,{transaction:C,selectedTransactionIds:n.selectedTransactionIds,transactionId:C.id}),value:C.id,defaultChecked:!1,groupLabel:!1})),y=[u,...x],w=async C=>{const I=C[li].filter(f=>f!=ai.toLocaleLowerCase());l(I)};s.useEffect(()=>{const C=m.watch(I=>{I!=null&&yn(()=>w(I))});return()=>{C.unsubscribe()}}),s.useEffect(()=>(e!=="expenseAutomationBankReconReconcilePage"&&r("expenseAutomationBankReconReconcilePage"),()=>{r("expenseAutomationPage")}),[]);const b=s.useCallback(()=>{h({reconcileAction:"reconcile"})},[h]);if(d.length===0){const C=Ne("reconciliation",void 0,p).tabs.find(I=>I.id==="reconcile")?.allDoneText;return t.jsx(Zc,{children:t.jsx(vt,{tab:"missing_receipts",title:C?.title??ri,subTitle:C?.subTitle??ri})})}return t.jsx(qc,{children:t.jsx(Jt,{...m,children:t.jsx(Kc,{onSubmit:m.handleSubmit(b),id:Wc(Hc),children:t.jsx(Jc,{children:t.jsx(yl,{name:li,checkBoxes:y,checkBoxStyle:{padding:20},labelCheckBoxStyle:{padding:20},rowHeight:Bc,mode:n.selectedTransactionIds.length>0?"always_on":"checked_or_hover",checkBoxContainerStyle:{boxSizing:"border-box"}})})})})})}const qc=a.div``,Kc=a.form``,Jc=a.div`
369
+ `,Vc=je.getLocalizedStrings(),{common:{all:ai,strings:{empty:ri}}}=Vc,li="selectedTransactionIds",Hc="expenseAutomationBankReconReconcilePage",Wc=e=>`${e}_form`;function Uc({currentFooterFormId:e,localData:n,matchedTransactions:d,sortConfig:c,onSaveReconciliation:h,selectedAccountId:p,onReconTabColumnSortConfigChanged:i,onUpdateReconcileTabLocalData:l,setCurrentFooterFormId:r}){const m=Kt({mode:"all",defaultValues:{selectedTransactionIds:n.selectedTransactionIds},values:{selectedTransactionIds:n.selectedTransactionIds}}),u={label:t.jsx(kc,{onReconTabColumnSortConfigChanged:i,sortConfig:c}),value:ai.toLocaleLowerCase(),defaultChecked:!1,groupLabel:!0},x=d.map(C=>({label:t.jsx(Fc,{transaction:C,selectedTransactionIds:n.selectedTransactionIds,transactionId:C.id}),value:C.id,defaultChecked:!1,groupLabel:!1})),y=[u,...x],w=async C=>{const I=C[li].filter(f=>f!=ai.toLocaleLowerCase());l(I)};s.useEffect(()=>{const C=m.watch(I=>{I!=null&&yn(()=>w(I))});return()=>{C.unsubscribe()}}),s.useEffect(()=>(e!=="expenseAutomationBankReconReconcilePage"&&r("expenseAutomationBankReconReconcilePage"),()=>{r("expenseAutomationPage")}),[]);const b=s.useCallback(()=>{h({reconcileAction:"reconcile"})},[h]);if(d.length===0){const C=Ne("reconciliation",void 0,p).tabs.find(I=>I.id==="reconcile")?.allDoneText;return t.jsx(Gc,{children:t.jsx(vt,{tab:"missing_receipts",title:C?.title??ri,subTitle:C?.subTitle??ri})})}return t.jsx(qc,{children:t.jsx(Jt,{...m,children:t.jsx(Kc,{onSubmit:m.handleSubmit(b),id:Wc(Hc),children:t.jsx(Jc,{children:t.jsx(yl,{name:li,checkBoxes:y,checkBoxStyle:{padding:20},labelCheckBoxStyle:{padding:20},rowHeight:Bc,mode:n.selectedTransactionIds.length>0?"always_on":"checked_or_hover",checkBoxContainerStyle:{boxSizing:"border-box"}})})})})})}const qc=a.div``,Kc=a.form``,Jc=a.div`
370
370
  height: calc(100vh - 350px);
371
- `,Zc=a.div`
371
+ `,Gc=a.div`
372
372
  height: 100%;
373
373
  display: flex;
374
374
  justify-content: center;
@@ -406,14 +406,14 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
406
406
  justify-content: space-between;
407
407
  padding: ${o.sp2};
408
408
  padding-right: ${o.sp3};
409
- `,Yc=a.div`
409
+ `,Zc=a.div`
410
410
  border-top: ${e=>`1px solid ${e.theme.colors.grey3}`};
411
411
  display: flex;
412
412
  flex-direction: row;
413
413
  justify-content: space-between;
414
414
  padding: ${o.sp2};
415
415
  padding-right: ${o.sp3};
416
- `,Gc=a.div`
416
+ `,Yc=a.div`
417
417
  padding: ${o.sp2} ${o.sp3};
418
418
  `,Fo=a.div`
419
419
  display: flex;
@@ -511,8 +511,8 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
511
511
  flex: 1;
512
512
  `,Hs=a(gt)`
513
513
  padding: ${o.sp0} 6px;
514
- color: ${Ge.info};
515
- border: 1px solid ${Ge.info};
514
+ color: ${Ye.info};
515
+ border: 1px solid ${Ye.info};
516
516
  border-radius: ${o.sp1};
517
517
  margin-top: ${o.sp1};
518
518
  `,En=a(jt)`
@@ -522,7 +522,7 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
522
522
  border-radius: ${o.sp1};
523
523
  `,He=a(En)`
524
524
  padding: 2px ${o.sp2};
525
- `,Gt=je.getLocalizedStrings().expenseAutomation.accountRecon.review.header,wt=[{key:"date",value:Gt.date,sortOrder:"ascending",width:new ee(20,20),loaderWidth:120},{key:"payee",value:Gt.payee,sortOrder:"ascending",width:new ee(20,20),loaderWidth:212},{key:"memo",value:Gt.memo,sortOrder:"ascending",width:new ee(20,20),loaderWidth:192},{key:"direction",value:Gt.direction,sortOrder:"ascending",width:new ee(15,15),loaderWidth:84},{key:"match",value:Gt.match,sortOrder:"ascending",width:new ee(15,15),loaderWidth:152},{key:"amount",value:Gt.amount,sortOrder:"ascending",width:new ee(10,10),loaderWidth:64}],Qc=e=>{const{sortConfig:n,onColumnSortConfigChanged:d}=e,c=Se(),[h,p]=s.useState(Ao(wt));s.useEffect(()=>{const l=[...h];for(const r of l)r.key===n.sortKey?r.sortOrder=n.sortOrder:r.sortOrder="ascending";p(l)},[n.sortKey,n.sortOrder]);const i=(l,r)=>{let m=r;n.sortKey===l&&(m=r==="ascending"?"descending":"ascending"),d(l,m)};return t.jsx(td,{children:h.map(l=>t.jsxs(nd,{sortDataValue:n.sortKey,actualDataValue:l.key,wrapperWidth:l.width,windowSize:c,isLastColumn:l.key==="amount",children:[t.jsxs(od,{"data-testid":z("account-reconciliation-review-header",l.value),sortKey:l.key,onClick:()=>i(l.key,l.sortOrder),children:[t.jsx(gt,{children:l.value}),t.jsx(id,{sortDataValue:n.sortKey,headerData:l,children:t.jsx(sd,{})})]}),t.jsx(ad,{sortDataValue:n.sortKey,windowSize:c,isVisible:n.sortKey===l.key&&(n.sortKey!=="date"||n.sortOrder==="ascending"),children:t.jsx(rd,{"data-testid":z("account-reconciliation-review-sort-by-date"),onClick:()=>i("date","ascending")})})]},l.key))})},ed=Ls.memo(Qc),td=a(jt)`
525
+ `,Yt=je.getLocalizedStrings().expenseAutomation.accountRecon.review.header,wt=[{key:"date",value:Yt.date,sortOrder:"ascending",width:new ee(20,20),loaderWidth:120},{key:"payee",value:Yt.payee,sortOrder:"ascending",width:new ee(20,20),loaderWidth:212},{key:"memo",value:Yt.memo,sortOrder:"ascending",width:new ee(20,20),loaderWidth:192},{key:"direction",value:Yt.direction,sortOrder:"ascending",width:new ee(15,15),loaderWidth:84},{key:"match",value:Yt.match,sortOrder:"ascending",width:new ee(15,15),loaderWidth:152},{key:"amount",value:Yt.amount,sortOrder:"ascending",width:new ee(10,10),loaderWidth:64}],Qc=e=>{const{sortConfig:n,onColumnSortConfigChanged:d}=e,c=Se(),[h,p]=s.useState(Ao(wt));s.useEffect(()=>{const l=[...h];for(const r of l)r.key===n.sortKey?r.sortOrder=n.sortOrder:r.sortOrder="ascending";p(l)},[n.sortKey,n.sortOrder]);const i=(l,r)=>{let m=r;n.sortKey===l&&(m=r==="ascending"?"descending":"ascending"),d(l,m)};return t.jsx(td,{children:h.map(l=>t.jsxs(nd,{sortDataValue:n.sortKey,actualDataValue:l.key,wrapperWidth:l.width,windowSize:c,isLastColumn:l.key==="amount",children:[t.jsxs(od,{"data-testid":z("account-reconciliation-review-header",l.value),sortKey:l.key,onClick:()=>i(l.key,l.sortOrder),children:[t.jsx(gt,{children:l.value}),t.jsx(id,{sortDataValue:n.sortKey,headerData:l,children:t.jsx(sd,{})})]}),t.jsx(ad,{sortDataValue:n.sortKey,windowSize:c,isVisible:n.sortKey===l.key&&(n.sortKey!=="date"||n.sortOrder==="ascending"),children:t.jsx(rd,{"data-testid":z("account-reconciliation-review-sort-by-date"),onClick:()=>i("date","ascending")})})]},l.key))})},ed=Ls.memo(Qc),td=a(jt)`
526
526
  top: 0;
527
527
  left: 0;
528
528
  width: fit-content;
@@ -556,9 +556,9 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
556
556
  display: flex;
557
557
  align-items: center;
558
558
  transform: ${e=>e.sortDataValue===e.headerData.key&&e.headerData.sortOrder==="descending"?"rotate(180deg)":"rotate(0deg)"};
559
- ${e=>e.headerData.sortOrder==="ascending"?Ye`
559
+ ${e=>e.headerData.sortOrder==="ascending"?Ze`
560
560
  padding-top: 2px;
561
- `:Ye`
561
+ `:Ze`
562
562
  padding-bottom: 2px;
563
563
  `}
564
564
  `,sd=a(zn)`
@@ -575,7 +575,7 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
575
575
  height: 12px;
576
576
  cursor: pointer;
577
577
  color: ${e=>e.theme.colors.hero};
578
- `,at="accountReconReviewTableSection",{dateFormat:ld,expenseAutomation:cd,common:pt}=je.getLocalizedStrings(),{visual:Ws}=ld,{accountRecon:xe}=cd,Us=e=>[{label:xe.review.formLabels.allBankAccounts,options:e.map(n=>({label:n.accountName,value:n.accountId}))}],qs=e=>[{label:xe.review.formLabels.allCreditCards,options:e.map(n=>({label:n.accountName,value:n.accountId}))}],ci=e=>`${at}_${e}_form`,$e=(e,n)=>`${at}.${e}.${n}`,dd=e=>{const{sortKey:n,sortOrder:d,accountReconEntity:c,entitySearchAutoCompleteActions:h,allAccountList:p,classList:i,localData:l,accountListNestedAccountHierarchy:r,classListNestedAccountHierarchy:m,selectedAccountId:u,entitySearchAutoCompleteData:x,excludeFetchById:y,saveFetchById:w,reviewTabSelectedVendorByTransactionId:b,refreshStatus:C,updateLocalData:I,onColumnSortConfigChanged:f,onSaveReconciliation:$,onSaveReconciliationReview:E,onReconMatchedTransactionClick:L,bankAccounts:B,creditCards:S}=e,{transactionsToReview:j}=c,A=s.useRef(null),[T,W]=s.useState(null),F=V=>{const K=j[V],Z=Rs(K),q=Es(K),M=Ds(K),re=Os(K),Ce=Bs(K),Q=Eo(K),G=K.recommendedAction.recommendedTransactions[0]?.merchantName!=null;return K.transactionId===T?q||M||re||Ce||Q?275+(G?25:0):Z?185+K.recommendedAction.recommendedTransactions.length*40+(G?25:0):146:72},H=s.useMemo(()=>({onColumnSortConfigChanged:f,sortConfig:{sortKey:n,sortOrder:d}}),[f,n,d]);if(s.useEffect(()=>{W(j[0]?.transactionId??null),A.current?.resetAfterIndex(0)},[n,d]),s.useEffect(()=>{A.current?.resetAfterIndex(0)},[T]),s.useEffect(()=>{A.current?.resetAfterIndex(0)},[j.length]),s.useEffect(()=>{C.fetchState==="Completed"&&A.current?.resetAfterIndex(0)},[C]),j.length===0){const V=Ne("reconciliation",void 0,u).tabs.find(K=>K.id==="review")?.allDoneText;return t.jsx(Ed,{children:t.jsx(vt,{tab:"reconciliation",title:V?.title??pt.strings.empty,subTitle:V?.subTitle??pt.strings.empty})})}return t.jsx(yd,{children:t.jsx(Ks.Provider,{value:H,children:t.jsx(Fn,{children:({height:V,width:K})=>t.jsx(Mn,{width:K,height:V,innerElementType:Js,ref:A,itemCount:j.length,itemSize:F,itemKey:Z=>j[Z].transactionId,overscanCount:or,itemData:{transactionsList:j,expandedRowId:T,allAccountList:p,classList:i,accountListNestedAccountHierarchy:r,classListNestedAccountHierarchy:m,localData:l,entitySearchAutoCompleteData:x,entitySearchAutoCompleteActions:h,excludeFetchById:y,saveFetchById:w,reviewTabSelectedVendorByTransactionId:b,bankAccounts:B,creditCards:S,updateLocalData:I,setExpandedRowId:W,onSaveReconciliation:$,onSaveReconciliationReview:E,onReconMatchedTransactionClick:L},initialScrollOffset:0,children:ud})})})})},Ks=s.createContext(void 0),Js=s.forwardRef((e,n)=>{const{children:d,style:c,...h}=e,{sortConfig:p,onColumnSortConfigChanged:i}=s.useContext(Ks);return t.jsxs(Cd,{ref:n,style:{...c,width:"auto",padding:`${o.sp0} ${o.sp8}`},...h,children:[t.jsx(ed,{onColumnSortConfigChanged:i,sortConfig:p}),t.jsx(wd,{children:d})]})});Js.displayName="Account recon review table inner element type";const ud=({index:e,style:n,data:d})=>{const{transactionsList:c,expandedRowId:h,setExpandedRowId:p,entitySearchAutoCompleteActions:i,allAccountList:l,classList:r,localData:m,updateLocalData:u,accountListNestedAccountHierarchy:x,classListNestedAccountHierarchy:y,entitySearchAutoCompleteData:w,onSaveReconciliation:b,onSaveReconciliationReview:C,onReconMatchedTransactionClick:I,excludeFetchById:f,saveFetchById:$,reviewTabSelectedVendorByTransactionId:E,bankAccounts:L,creditCards:B}=d,S=c[e];return t.jsx(fd,{style:{...n,width:"100%"},children:t.jsx(hd,{transaction:S,expandedRowId:h,setExpandedRowId:p,entitySearchAutoCompleteActions:i,accountListNestedAccountHierarchy:x,allAccountList:l,classList:r,localData:m,updateLocalData:u,entitySearchAutoCompleteData:w,classListNestedAccountHierarchy:y,onSaveReconciliation:b,onSaveReconciliationReview:C,onReconMatchedTransactionClick:I,excludeFetchById:f,saveFetchById:$,selectedVendor:E[S.transactionId],bankAccounts:L,creditCards:B})})},hd=({transaction:e,expandedRowId:n,accountListNestedAccountHierarchy:d,entitySearchAutoCompleteActions:c,allAccountList:h,classList:p,classListNestedAccountHierarchy:i,localData:l,entitySearchAutoCompleteData:r,excludeFetchById:m,saveFetchById:u,selectedVendor:x,bankAccounts:y,creditCards:w,setExpandedRowId:b,updateLocalData:C,onSaveReconciliation:I,onSaveReconciliationReview:f,onReconMatchedTransactionClick:$})=>{const E=n===e.transactionId,L=Se(),B=l[e.transactionId],S=e.recommendedAction.action==="record_bill_payment",j=e.recommendedAction.action==="record_expense",A=Eo(e),T=h.find(H=>H.accountId===e.recommendedAction.recommendedTransactions[0]?.accountId),W=H=>H.recommendedAction.recommendedTransactions.length>0&&H.recommendedAction.recommendedTransactions[0].merchantName!=null?H.recommendedAction.recommendedTransactions[0].merchantName:pt.strings.hyphen,F=e.recommendedAction.recommendedTransactions[0]?.merchantName;return t.jsxs(md,{isExpanded:E,children:[t.jsxs(gd,{isExpanded:E,onClick:()=>b(e.transactionId),"data-testid":z("account-reconciliation-review-row",e.transactionId),children:[t.jsx(Qt,{windowSize:L,responsiveWidth:wt[0].width,children:t.jsx(Xt,{children:e.transactionDate.format(Ws.MMMDCommaYYYYformat)})}),t.jsx(Qt,{windowSize:L,responsiveWidth:wt[1].width,children:t.jsx(Xt,{children:t.jsx(nt,{itemTextStyle:{...Et.standardRegular.cssObject,color:"inherit"},text:W(e)})})}),t.jsx(Qt,{windowSize:L,responsiveWidth:wt[2].width,children:t.jsx(Xt,{children:t.jsx(nt,{itemTextStyle:{...Et.standardRegular.cssObject,color:"inherit"},text:e.memo})})}),t.jsx(Qt,{windowSize:L,responsiveWidth:wt[3].width,children:t.jsx(Xt,{style:{textTransform:"capitalize"},children:e.transactionDirection})}),t.jsxs(Qt,{windowSize:L,responsiveWidth:wt[4].width,children:[t.jsx(_e,{controller:S,children:t.jsx(Dd,{children:t.jsx(Od,{children:xe.review.matchesCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())})})}),t.jsx(_e,{controller:!S,children:t.jsx(Xt,{children:T!=null?t.jsxs(t.Fragment,{children:[t.jsx(Zs,{}),t.jsx(nt,{itemTextStyle:{...Et.standardRegular.cssObject,color:"inherit"},text:T.accountName})]}):pt.strings.hyphen})})]}),t.jsx(Qt,{windowSize:L,isLastColumn:!0,responsiveWidth:wt[5].width,children:t.jsx(Xt,{children:Ts("0,0.00",e.amount.amount,e.amount.currencySymbol)})})]}),t.jsxs(_e,{controller:E&&B!=null,children:[t.jsx(pd,{onSaveReconciliation:I,onSaveReconciliationReview:f,updateLocalData:C,saveFetchById:u,excludeFetchById:m,localData:B,classListNestedAccountHierarchy:i,allAccountList:h,classList:p,transaction:e,accountListNestedAccountHierarchy:d,entitySearchAutoCompleteActions:c,entitySearchAutoCompleteData:r,selectedVendor:x,bankAccounts:y,creditCards:w,onReconMatchedTransactionClick:$}),t.jsx(_e,{controller:(S||j||A)&&F!=null,children:t.jsx(Fd,{children:t.jsxs(Md,{children:[xe.review.bankDetail,pt.strings.colon," ",F]})})})]})]})},pd=({transaction:e,accountListNestedAccountHierarchy:n,entitySearchAutoCompleteActions:d,allAccountList:c,classList:h,classListNestedAccountHierarchy:p,localData:i,entitySearchAutoCompleteData:l,excludeFetchById:r,saveFetchById:m,selectedVendor:u,bankAccounts:x,creditCards:y,updateLocalData:w,onSaveReconciliation:b,onSaveReconciliationReview:C,onReconMatchedTransactionClick:I})=>{const f=St(),[$,E]=s.useState(!i.vendor?.id),[L,B]=s.useState(!i.customer?.id),[S,j]=s.useState(i.categoryId==null),[A,T]=s.useState(i.classId==null),[W,F]=s.useState(i.bankAccountId==null),[H,V]=s.useState(i.creditCardId==null),[K,Z]=s.useState(!i.memo),q=Rs(e),M=Es(e),re=Os(e),Ce=Ds(e),Q=Bs(e),G=Eo(e),me=s.useMemo(()=>{if(!M&&!G)return Ot(n);if(u!=null&&u.id!==e.recommendedAction.recommendedTransactions[0]?.merchantId)return Ot(n,u?.recommendations);const v=c.find(we=>we.accountId===e.recommendedAction.recommendedTransactions[0]?.accountId),ie=v!=null?{...v,reason:xe.review.zeniGptRecommendation,min:0,max:0}:void 0;return Ot(n,[{account:ie}])},[M,G,u,e.recommendedAction.recommendedTransactions,c,n]),_=s.useMemo(()=>{if(!M&&!G)return Rn(p);if(u!=null&&u.id!==e.recommendedAction.recommendedTransactions[0]?.merchantId)return Rn(p,u?.recommendations);const v=h.find(we=>we.classId===e.recommendedAction.recommendedTransactions[0]?.classId),ie=v!=null?{...v,reason:xe.review.zeniGptRecommendation,min:0,max:0}:void 0;return Rn(p,[{class:ie}])},[M,G,u,e.recommendedAction.recommendedTransactions,h,p]),D=Kt({mode:"onSubmit",reValidateMode:"onSubmit",shouldFocusError:!0,defaultValues:s.useMemo(()=>di(e,i,me,c,_,x,y,l),[e,i,_,c,me,x,y,l]),values:s.useMemo(()=>di(e,i,me,c,_,x,y,l),[e,i,_,c,me,x,y,l])}),Y=async(v,ie)=>{v.includes("memo")||w(ui(ie,e,l,c),e.transactionId,v.includes("vendor"))};s.useEffect(()=>{const v=D.watch((ie,{name:we})=>{we!=null&&ie!=null&&yn(()=>Y(we,ie))});return()=>{v.unsubscribe()}});const P=s.useCallback(v=>{if(M||Q||G){if((M||G)&&i.vendor==null){E(!1),D.setError($e(e.transactionId,"vendor"),{type:"required"});return}if(Q&&i.customer==null){B(!1),D.setError($e(e.transactionId,"customer"),{type:"required"});return}if(i.categoryId==null){j(!1),D.setError($e(e.transactionId,"category"),{type:"required"});return}}w(ui(v,e,l,c),e.transactionId,!1),C(e.transactionId)},[M,G,Q,w,e,l,c,C,i.categoryId,i.vendor,i.customer]),k=D.watch($e(e.transactionId,"vendor")),O=D.watch($e(e.transactionId,"customer")),U=s.useRef(),oe=s.useMemo(()=>M||G?"vendor":Q?"customer":null,[M,G,Q]),R=(v,ie)=>{oe!=null&&d.onAutoCompleteInputChange?.(v,oe),U.current=ie};s.useEffect(()=>{l.entityAutoCompleteView.fetchState==="Completed"&&((M||G)&&U.current?.(bs(l.entityAutoCompleteView)),Q&&U.current?.(pr(l.entityAutoCompleteView)))},[l.entityAutoCompleteView,Q,M,G]);const ne=v=>h.filter(ie=>ie.classId===v)[0]?.accountingClassNumber??void 0,N=v=>c.filter(ie=>ie.qboId===v)[0]?.qboId,J=s.useMemo(()=>{switch(e.recommendedAction.action){case"record_bill_payment":return["record_bill_payment"];case"record_cc_payment":case"record_expense":case"record_transfer":return["record_expense","record_transfer","record_cc_payment"];default:return["record_deposit","record_cc_credit"]}},[e.recommendedAction.action]),ye=()=>{j(!1)},ke=()=>{F(!1)},ge=()=>{V(!1)};return s.useEffect(()=>{S===!1&&i.categoryId==null&&D.setFocus($e(e.transactionId,"category"))},[S]),s.useEffect(()=>{A===!1&&i.classId==null&&D.setFocus($e(e.transactionId,"class"))},[A]),s.useEffect(()=>{$===!1&&i.vendor==null&&D.setFocus($e(e.transactionId,"vendor"))},[$]),s.useEffect(()=>{L===!1&&i.customer==null&&D.setFocus($e(e.transactionId,"customer"))},[L]),s.useEffect(()=>{W===!1&&i.bankAccountId==null&&D.setFocus($e(e.transactionId,"bankAccount"))},[W]),s.useEffect(()=>{H===!1&&i.creditCardId==null&&D.setFocus($e(e.transactionId,"creditCard"))},[H]),t.jsx(Jt,{...D,children:t.jsx("form",{onSubmit:D.handleSubmit(P),id:ci(e.transactionId),children:t.jsxs(xd,{children:[t.jsxs(bd,{children:[t.jsxs(jd,{children:[t.jsxs(kd,{children:[t.jsx(Zs,{}),t.jsx(Un,{label:{label:q?xe.review.formLabels.match:xe.review.formLabels.categorize},radioField:{name:$e(e.transactionId,"match_radio"),id:q?"match":"categorize",value:q?"match":"categorize",checked:!0,style:{width:o.sp3,height:o.sp3,padding:"2px"}},style:{width:"auto"}})]}),t.jsx(_e,{controller:!q,children:t.jsxs(t.Fragment,{children:[t.jsx(hi,{}),J.map(v=>t.jsx(Un,{label:{label:xe.review.formLabels[v]},style:{width:"auto"},isDisabled:"readonly",changeLabelColorInDisableMode:!0,radioField:{name:$e(e.transactionId,"recommendedActionType"),id:v,value:v,style:{width:o.sp3,height:o.sp3,padding:"2px"}}},v))]})})]}),t.jsxs(Sd,{children:[t.jsx(gn,{variant:"secondary",size:"small",label:xe.review.formLabels.exclude,loading:r[e.transactionId]?.fetchState==="In-Progress","data-testid":z("account-reconciliation-review-exclude-button",e.transactionId),style:{width:o.sp10},reverseSpinnerColor:!1,onClick:()=>{b({reconcileAction:"exclude",excludeTransactionId:e.transactionId})}}),t.jsx(gn,{form:ci(e.transactionId),"data-testid":z("account-reconciliation-review-save-button",e.transactionId),label:pt.footer.save,style:{width:o.sp10},variant:"primary",size:"small",type:"submit",loading:m[e.transactionId]?.fetchState==="In-Progress"})]})]}),t.jsx(_e,{controller:M||Q||G,children:t.jsxs(Zn,{children:[t.jsx(_e,{controller:M||G,children:t.jsx(Ct,{onClickAway:()=>{i.vendor==null&&$===!1&&E(!0)},children:t.jsx(X,{style:{flex:1,padding:g[0],justifyContent:"center"},showHoverEffect:!0,forceHoverEffect:!1,children:t.jsxs(ut,{className:"hover-background",style:{padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(te,{style:{display:"flex",alignItems:"center",gap:g[1]},children:pt.texts.vendor}),t.jsx(se,{style:{gap:g[3]},className:"item-value-container",children:t.jsx(t.Fragment,{children:$===!0?t.jsxs(de,{onClick:v=>{v.stopPropagation(),E(!1)},"data-testid":z("account-reconciliation-review-add-vendor-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:f.colors.champion,cursor:"pointer"},children:[t.jsx(Nt,{}),xe.review.formLabels.addVendor]}):t.jsx(yo,{name:$e(e.transactionId,"vendor"),allowEmpty:!1,placeholder:xe.review.formLabels.addVendor,valueToId:v=>v,defaultValue:{selectedOption:k?.selectedOption,defaultOptions:k?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:o.sp4})},registerOptions:{required:!0,validate:v=>!!v.selectedOption},loadOptions:R})})})]})})})}),t.jsx(_e,{controller:Q,children:t.jsx(Ct,{onClickAway:()=>{i.customer==null&&L===!1&&B(!0)},children:t.jsx(X,{style:{flex:1,padding:g[0],justifyContent:"center"},showHoverEffect:!0,forceHoverEffect:!1,children:t.jsxs(ut,{className:"hover-background",style:{padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(te,{style:{display:"flex",alignItems:"center",gap:g[1]},children:pt.texts.customer}),t.jsx(se,{style:{gap:g[3]},className:"item-value-container",children:t.jsx(t.Fragment,{children:L===!0?t.jsxs(de,{onClick:v=>{v.stopPropagation(),B(!1)},"data-testid":z("account-reconciliation-review-add-customer-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:f.colors.champion,cursor:"pointer"},children:[t.jsx(Nt,{}),xe.review.formLabels.addCustomer]}):t.jsx(yo,{name:$e(e.transactionId,"customer"),allowEmpty:!1,placeholder:xe.review.formLabels.addCustomer,valueToId:v=>v,defaultValue:{selectedOption:O?.selectedOption,defaultOptions:O?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:o.sp4})},registerOptions:{required:!0,validate:v=>!!v.selectedOption},loadOptions:R})})})]})})})}),t.jsx(Ct,{onClickAway:()=>{i.categoryId==null&&S===!1&&j(!0)},children:t.jsx(X,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(ut,{className:"hover-background",children:[t.jsx(te,{style:{display:"flex",alignItems:"center",gap:g[1]},children:pt.texts.category}),t.jsx(se,{className:"item-value-container",children:t.jsx(t.Fragment,{children:S===!0?t.jsxs(de,{onClick:v=>{v.stopPropagation(),ye()},"data-testid":z("account-reconciliation-review-add-category-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:f.colors.champion,cursor:"pointer"},children:[t.jsx(Nt,{}),xe.review.formLabels.addCategory]}):t.jsx(on,{shouldShowChevronIcon:!1,menuPortal:document.body,name:$e(e.transactionId,"category"),placeholder:xe.review.formLabels.addCategory,valueToId:v=>N(v),defaultValue:{allOptions:me,selectedOption:c.find(v=>v.accountId===i.categoryId)?.qboId},registerOptions:{required:!0,validate:v=>!!v.selectedOption},customStyleConfig:kn})})})]})})}),t.jsx(Ct,{onClickAway:()=>{i.classId==null&&A===!1&&T(!0)},children:t.jsx(X,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(ut,{className:"hover-background",children:[t.jsx(te,{style:{display:"flex",alignItems:"center",gap:g[1]},children:pt.texts.class}),t.jsx(se,{className:"item-value-container",children:t.jsx(t.Fragment,{children:A===!0?t.jsxs(de,{onClick:v=>{v.stopPropagation(),T(!1)},"data-testid":z("account-reconciliation-review-add-class-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:f.colors.champion,cursor:"pointer"},children:[t.jsx(Nt,{}),xe.review.formLabels.addClass]}):t.jsx(on,{shouldShowChevronIcon:!1,menuPortal:document.body,name:$e(e.transactionId,"class"),placeholder:xe.review.formLabels.addClass,valueToId:v=>ne(v),defaultValue:{allOptions:_,selectedOption:i.classId},registerOptions:{required:!0,validate:v=>!!v.selectedOption},customStyleConfig:kn})})})]})})})]})}),t.jsx(_e,{controller:q,children:t.jsxs(Id,{children:[t.jsxs($d,{children:[t.jsx("span",{className:"matched-text",children:`${xe.review.matchedFoundCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())} `}),xe.review.matchesFoundFullInfo]}),t.jsx(Ld,{children:e.recommendedAction.recommendedTransactions.map(v=>v.bookTransactionId!=null?t.jsxs(Ad,{children:[t.jsx(Un,{label:{label:t.jsxs(Td,{children:[t.jsx(Fe,{children:v.date.format(Ws.MMMDCommaYYYYformat)}),t.jsx(Fe,{children:v.memo})]})},style:{width:"auto"},isDisabled:void 0,changeLabelColorInDisableMode:!0,radioField:{name:$e(e.transactionId,"matchedTransaction"),registerOptions:{required:!0},id:v.bookTransactionId,value:v.bookTransactionId,style:{width:o.sp3,height:o.sp3,padding:"2px"}}}),t.jsxs(Bd,{"data-testid":z("account-reconciliation-review-matched-transaction-amount",v.bookTransactionId),onClick:()=>{v.bookTransactionId!=null&&I(v.bookTransactionId)},children:[t.jsx(Rd,{children:Ts("0,0.00",v.amount.amount,v.amount.currencySymbol)}),t.jsx(hi,{})]})]},v.bookTransactionId):null)})]})}),t.jsx(_e,{controller:re,children:t.jsx(Zn,{children:t.jsx(Ct,{onClickAway:()=>{i.bankAccountId==null&&W===!1&&F(!0)},children:t.jsx(X,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(ut,{className:"hover-background",children:[t.jsx(te,{style:{display:"flex",alignItems:"center",gap:g[1]},children:xe.review.formLabels.transferTo}),t.jsx(se,{className:"item-value-container",children:t.jsx(t.Fragment,{children:W===!0?t.jsxs(de,{onClick:v=>{v.stopPropagation(),ke()},"data-testid":z("account-reconciliation-review-add-account-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:f.colors.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(Nt,{}),xe.review.formLabels.selectAccount]}):t.jsx(on,{shouldShowChevronIcon:!1,menuPortal:document.body,name:$e(e.transactionId,"bankAccount"),placeholder:xe.review.formLabels.selectAccount,defaultValue:{allOptions:Us(x),selectedOption:i.bankAccountId},registerOptions:{required:!0,validate:v=>!!v.selectedOption},customStyleConfig:kn})})})]})})})})}),t.jsx(_e,{controller:Ce,children:t.jsx(Zn,{children:t.jsx(Ct,{onClickAway:()=>{i.creditCardId==null&&H===!1&&V(!0)},children:t.jsx(X,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(ut,{className:"hover-background",children:[t.jsx(te,{style:{display:"flex",alignItems:"center",gap:g[1]},children:xe.review.formLabels.creditCard}),t.jsx(se,{className:"item-value-container",children:t.jsx(t.Fragment,{children:H===!0?t.jsxs(de,{onClick:v=>{v.stopPropagation(),ge()},"data-testid":z("account-reconciliation-review-add-credit-card-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:f.colors.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(Nt,{}),xe.review.formLabels.selectCard]}):t.jsx(on,{shouldShowChevronIcon:!1,menuPortal:document.body,name:$e(e.transactionId,"creditCard"),placeholder:xe.review.formLabels.selectCard,defaultValue:{allOptions:qs(y),selectedOption:i.creditCardId},registerOptions:{required:!0,validate:v=>!!v.selectedOption},customStyleConfig:kn})})})]})})})})}),t.jsx(_e,{controller:!q,children:t.jsx(vd,{children:t.jsx(X,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",width:"100%"},children:t.jsxs(ut,{className:"hover-background",children:[t.jsx(te,{style:{display:"flex",alignItems:"center",gap:g[1]},children:xe.review.header.memo}),t.jsx(se,{className:"item-value-container",children:t.jsx(t.Fragment,{children:K===!0?t.jsxs(de,{onClick:v=>{v.stopPropagation(),Z(!1)},"data-testid":z("account-reconciliation-review-add-memo-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:f.colors.champion,cursor:"pointer"},children:[t.jsx(Nt,{}),xe.review.formLabels.addMemo]}):t.jsx(mr,{name:$e(e.transactionId,"memo"),placeholder:xe.review.formLabels.addMemo,type:"text",style:{padding:0,textAlign:"left",width:"100%",background:"transparent"}})})})]})})})})]})})})},kn={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:o.sp4}),singleValue:()=>({margin:0}),menuPortal:()=>({zIndex:9999}),menu:()=>({width:`calc(100% + ${o.sp5})`,marginRight:`-${o.sp3}`,marginLeft:`-${o.sp3}`})},di=(e,n,d,c,h,p,i,l)=>{const r=c.find(m=>m.accountId===n.categoryId);return{[at]:{[e.transactionId]:{category:{selectedOption:r?.qboId,allOptions:d},class:{selectedOption:n?.classId,allOptions:h},bankAccount:{selectedOption:n?.bankAccountId,allOptions:Us(p)},creditCard:{selectedOption:n?.creditCardId,allOptions:qs(i)},memo:n?.memo,recommendedActionType:e.recommendedAction.action,matchedTransaction:n?.matchedTransactionId,vendor:{selectedOption:n?.vendor?.id,defaultOptions:Is(l.entityAutoCompleteView,n?.vendor)},customer:{selectedOption:n?.customer?.id,defaultOptions:wr(n?.customer,l.entityAutoCompleteView)}}}}},ui=(e,n,d,c)=>{const{vendor:h,customer:p}=e[at][n.transactionId];let i;if(h.selectedOption!=null){const r=h.defaultOptions.find(m=>m.value===h.selectedOption);if(r!=null)i={id:h.selectedOption,name:r.label};else{const m=d.entityAutoCompleteView.vendor.find(u=>u.id===h.selectedOption||u.zeniId===h.selectedOption);m!=null&&(i={id:m.zeniId,name:m.name})}}let l;if(p.selectedOption!=null){const r=p.defaultOptions.find(m=>m.value===p.selectedOption);if(r!=null)l={id:p.selectedOption,name:r.label};else{const m=d.entityAutoCompleteView.customer.find(u=>u.id===p.selectedOption||u.zeniId===p.selectedOption);m!=null&&(l={id:m.zeniId,name:m.name})}}return{categoryId:c.find(r=>r.qboId===e[at][n.transactionId].category.selectedOption)?.accountId??e[at][n.transactionId].category.selectedOption,classId:e[at][n.transactionId].class.selectedOption,memo:e[at][n.transactionId].memo,matchedTransactionId:e[at][n.transactionId].matchedTransaction,vendor:i,bankAccountId:e[at][n.transactionId].bankAccount.selectedOption,creditCardId:e[at][n.transactionId].creditCard.selectedOption,customer:l}},Xt=a(Fe)`
578
+ `,at="accountReconReviewTableSection",{dateFormat:ld,expenseAutomation:cd,common:pt}=je.getLocalizedStrings(),{visual:Ws}=ld,{accountRecon:xe}=cd,Us=e=>[{label:xe.review.formLabels.allBankAccounts,options:e.map(n=>({label:n.accountName,value:n.accountId}))}],qs=e=>[{label:xe.review.formLabels.allCreditCards,options:e.map(n=>({label:n.accountName,value:n.accountId}))}],ci=e=>`${at}_${e}_form`,$e=(e,n)=>`${at}.${e}.${n}`,dd=e=>{const{sortKey:n,sortOrder:d,accountReconEntity:c,entitySearchAutoCompleteActions:h,allAccountList:p,classList:i,localData:l,accountListNestedAccountHierarchy:r,classListNestedAccountHierarchy:m,selectedAccountId:u,entitySearchAutoCompleteData:x,excludeFetchById:y,saveFetchById:w,reviewTabSelectedVendorByTransactionId:b,refreshStatus:C,updateLocalData:I,onColumnSortConfigChanged:f,onSaveReconciliation:$,onSaveReconciliationReview:E,onReconMatchedTransactionClick:L,bankAccounts:B,creditCards:S}=e,{transactionsToReview:j}=c,A=s.useRef(null),[T,W]=s.useState(null),F=V=>{const K=j[V],G=Rs(K),q=Es(K),M=Ds(K),re=Os(K),Ce=Bs(K),Q=Eo(K),Y=K.recommendedAction.recommendedTransactions[0]?.merchantName!=null;return K.transactionId===T?q||M||re||Ce||Q?275+(Y?25:0):G?185+K.recommendedAction.recommendedTransactions.length*40+(Y?25:0):146:72},H=s.useMemo(()=>({onColumnSortConfigChanged:f,sortConfig:{sortKey:n,sortOrder:d}}),[f,n,d]);if(s.useEffect(()=>{W(j[0]?.transactionId??null),A.current?.resetAfterIndex(0)},[n,d]),s.useEffect(()=>{A.current?.resetAfterIndex(0)},[T]),s.useEffect(()=>{A.current?.resetAfterIndex(0)},[j.length]),s.useEffect(()=>{C.fetchState==="Completed"&&A.current?.resetAfterIndex(0)},[C]),j.length===0){const V=Ne("reconciliation",void 0,u).tabs.find(K=>K.id==="review")?.allDoneText;return t.jsx(Ed,{children:t.jsx(vt,{tab:"reconciliation",title:V?.title??pt.strings.empty,subTitle:V?.subTitle??pt.strings.empty})})}return t.jsx(yd,{children:t.jsx(Ks.Provider,{value:H,children:t.jsx(Fn,{children:({height:V,width:K})=>t.jsx(Mn,{width:K,height:V,innerElementType:Js,ref:A,itemCount:j.length,itemSize:F,itemKey:G=>j[G].transactionId,overscanCount:or,itemData:{transactionsList:j,expandedRowId:T,allAccountList:p,classList:i,accountListNestedAccountHierarchy:r,classListNestedAccountHierarchy:m,localData:l,entitySearchAutoCompleteData:x,entitySearchAutoCompleteActions:h,excludeFetchById:y,saveFetchById:w,reviewTabSelectedVendorByTransactionId:b,bankAccounts:B,creditCards:S,updateLocalData:I,setExpandedRowId:W,onSaveReconciliation:$,onSaveReconciliationReview:E,onReconMatchedTransactionClick:L},initialScrollOffset:0,children:ud})})})})},Ks=s.createContext(void 0),Js=s.forwardRef((e,n)=>{const{children:d,style:c,...h}=e,{sortConfig:p,onColumnSortConfigChanged:i}=s.useContext(Ks);return t.jsxs(Cd,{ref:n,style:{...c,width:"auto",padding:`${o.sp0} ${o.sp8}`},...h,children:[t.jsx(ed,{onColumnSortConfigChanged:i,sortConfig:p}),t.jsx(wd,{children:d})]})});Js.displayName="Account recon review table inner element type";const ud=({index:e,style:n,data:d})=>{const{transactionsList:c,expandedRowId:h,setExpandedRowId:p,entitySearchAutoCompleteActions:i,allAccountList:l,classList:r,localData:m,updateLocalData:u,accountListNestedAccountHierarchy:x,classListNestedAccountHierarchy:y,entitySearchAutoCompleteData:w,onSaveReconciliation:b,onSaveReconciliationReview:C,onReconMatchedTransactionClick:I,excludeFetchById:f,saveFetchById:$,reviewTabSelectedVendorByTransactionId:E,bankAccounts:L,creditCards:B}=d,S=c[e];return t.jsx(fd,{style:{...n,width:"100%"},children:t.jsx(hd,{transaction:S,expandedRowId:h,setExpandedRowId:p,entitySearchAutoCompleteActions:i,accountListNestedAccountHierarchy:x,allAccountList:l,classList:r,localData:m,updateLocalData:u,entitySearchAutoCompleteData:w,classListNestedAccountHierarchy:y,onSaveReconciliation:b,onSaveReconciliationReview:C,onReconMatchedTransactionClick:I,excludeFetchById:f,saveFetchById:$,selectedVendor:E[S.transactionId],bankAccounts:L,creditCards:B})})},hd=({transaction:e,expandedRowId:n,accountListNestedAccountHierarchy:d,entitySearchAutoCompleteActions:c,allAccountList:h,classList:p,classListNestedAccountHierarchy:i,localData:l,entitySearchAutoCompleteData:r,excludeFetchById:m,saveFetchById:u,selectedVendor:x,bankAccounts:y,creditCards:w,setExpandedRowId:b,updateLocalData:C,onSaveReconciliation:I,onSaveReconciliationReview:f,onReconMatchedTransactionClick:$})=>{const E=n===e.transactionId,L=Se(),B=l[e.transactionId],S=e.recommendedAction.action==="record_bill_payment",j=e.recommendedAction.action==="record_expense",A=Eo(e),T=h.find(H=>H.accountId===e.recommendedAction.recommendedTransactions[0]?.accountId),W=H=>H.recommendedAction.recommendedTransactions.length>0&&H.recommendedAction.recommendedTransactions[0].merchantName!=null?H.recommendedAction.recommendedTransactions[0].merchantName:pt.strings.hyphen,F=e.recommendedAction.recommendedTransactions[0]?.merchantName;return t.jsxs(md,{isExpanded:E,children:[t.jsxs(gd,{isExpanded:E,onClick:()=>b(e.transactionId),"data-testid":z("account-reconciliation-review-row",e.transactionId),children:[t.jsx(Qt,{windowSize:L,responsiveWidth:wt[0].width,children:t.jsx(Xt,{children:e.transactionDate.format(Ws.MMMDCommaYYYYformat)})}),t.jsx(Qt,{windowSize:L,responsiveWidth:wt[1].width,children:t.jsx(Xt,{children:t.jsx(nt,{itemTextStyle:{...Et.standardRegular.cssObject,color:"inherit"},text:W(e)})})}),t.jsx(Qt,{windowSize:L,responsiveWidth:wt[2].width,children:t.jsx(Xt,{children:t.jsx(nt,{itemTextStyle:{...Et.standardRegular.cssObject,color:"inherit"},text:e.memo})})}),t.jsx(Qt,{windowSize:L,responsiveWidth:wt[3].width,children:t.jsx(Xt,{style:{textTransform:"capitalize"},children:e.transactionDirection})}),t.jsxs(Qt,{windowSize:L,responsiveWidth:wt[4].width,children:[t.jsx(_e,{controller:S,children:t.jsx(Dd,{children:t.jsx(Od,{children:xe.review.matchesCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())})})}),t.jsx(_e,{controller:!S,children:t.jsx(Xt,{children:T!=null?t.jsxs(t.Fragment,{children:[t.jsx(Gs,{}),t.jsx(nt,{itemTextStyle:{...Et.standardRegular.cssObject,color:"inherit"},text:T.accountName})]}):pt.strings.hyphen})})]}),t.jsx(Qt,{windowSize:L,isLastColumn:!0,responsiveWidth:wt[5].width,children:t.jsx(Xt,{children:Ts("0,0.00",e.amount.amount,e.amount.currencySymbol)})})]}),t.jsxs(_e,{controller:E&&B!=null,children:[t.jsx(pd,{onSaveReconciliation:I,onSaveReconciliationReview:f,updateLocalData:C,saveFetchById:u,excludeFetchById:m,localData:B,classListNestedAccountHierarchy:i,allAccountList:h,classList:p,transaction:e,accountListNestedAccountHierarchy:d,entitySearchAutoCompleteActions:c,entitySearchAutoCompleteData:r,selectedVendor:x,bankAccounts:y,creditCards:w,onReconMatchedTransactionClick:$}),t.jsx(_e,{controller:(S||j||A)&&F!=null,children:t.jsx(Fd,{children:t.jsxs(Md,{children:[xe.review.bankDetail,pt.strings.colon," ",F]})})})]})]})},pd=({transaction:e,accountListNestedAccountHierarchy:n,entitySearchAutoCompleteActions:d,allAccountList:c,classList:h,classListNestedAccountHierarchy:p,localData:i,entitySearchAutoCompleteData:l,excludeFetchById:r,saveFetchById:m,selectedVendor:u,bankAccounts:x,creditCards:y,updateLocalData:w,onSaveReconciliation:b,onSaveReconciliationReview:C,onReconMatchedTransactionClick:I})=>{const f=St(),[$,E]=s.useState(!i.vendor?.id),[L,B]=s.useState(!i.customer?.id),[S,j]=s.useState(i.categoryId==null),[A,T]=s.useState(i.classId==null),[W,F]=s.useState(i.bankAccountId==null),[H,V]=s.useState(i.creditCardId==null),[K,G]=s.useState(!i.memo),q=Rs(e),M=Es(e),re=Os(e),Ce=Ds(e),Q=Bs(e),Y=Eo(e),me=s.useMemo(()=>{if(!M&&!Y)return Ot(n);if(u!=null&&u.id!==e.recommendedAction.recommendedTransactions[0]?.merchantId)return Ot(n,u?.recommendations);const v=c.find(we=>we.accountId===e.recommendedAction.recommendedTransactions[0]?.accountId),ie=v!=null?{...v,reason:xe.review.zeniGptRecommendation,min:0,max:0}:void 0;return Ot(n,[{account:ie}])},[M,Y,u,e.recommendedAction.recommendedTransactions,c,n]),_=s.useMemo(()=>{if(!M&&!Y)return Rn(p);if(u!=null&&u.id!==e.recommendedAction.recommendedTransactions[0]?.merchantId)return Rn(p,u?.recommendations);const v=h.find(we=>we.classId===e.recommendedAction.recommendedTransactions[0]?.classId),ie=v!=null?{...v,reason:xe.review.zeniGptRecommendation,min:0,max:0}:void 0;return Rn(p,[{class:ie}])},[M,Y,u,e.recommendedAction.recommendedTransactions,h,p]),D=Kt({mode:"onSubmit",reValidateMode:"onSubmit",shouldFocusError:!0,defaultValues:s.useMemo(()=>di(e,i,me,c,_,x,y,l),[e,i,_,c,me,x,y,l]),values:s.useMemo(()=>di(e,i,me,c,_,x,y,l),[e,i,_,c,me,x,y,l])}),Z=async(v,ie)=>{v.includes("memo")||w(ui(ie,e,l,c),e.transactionId,v.includes("vendor"))};s.useEffect(()=>{const v=D.watch((ie,{name:we})=>{we!=null&&ie!=null&&yn(()=>Z(we,ie))});return()=>{v.unsubscribe()}});const P=s.useCallback(v=>{if(M||Q||Y){if((M||Y)&&i.vendor==null){E(!1),D.setError($e(e.transactionId,"vendor"),{type:"required"});return}if(Q&&i.customer==null){B(!1),D.setError($e(e.transactionId,"customer"),{type:"required"});return}if(i.categoryId==null){j(!1),D.setError($e(e.transactionId,"category"),{type:"required"});return}}w(ui(v,e,l,c),e.transactionId,!1),C(e.transactionId)},[M,Y,Q,w,e,l,c,C,i.categoryId,i.vendor,i.customer]),k=D.watch($e(e.transactionId,"vendor")),O=D.watch($e(e.transactionId,"customer")),U=s.useRef(),oe=s.useMemo(()=>M||Y?"vendor":Q?"customer":null,[M,Y,Q]),R=(v,ie)=>{oe!=null&&d.onAutoCompleteInputChange?.(v,oe),U.current=ie};s.useEffect(()=>{l.entityAutoCompleteView.fetchState==="Completed"&&((M||Y)&&U.current?.(bs(l.entityAutoCompleteView)),Q&&U.current?.(pr(l.entityAutoCompleteView)))},[l.entityAutoCompleteView,Q,M,Y]);const ne=v=>h.filter(ie=>ie.classId===v)[0]?.accountingClassNumber??void 0,N=v=>c.filter(ie=>ie.qboId===v)[0]?.qboId,J=s.useMemo(()=>{switch(e.recommendedAction.action){case"record_bill_payment":return["record_bill_payment"];case"record_cc_payment":case"record_expense":case"record_transfer":return["record_expense","record_transfer","record_cc_payment"];default:return["record_deposit","record_cc_credit"]}},[e.recommendedAction.action]),ye=()=>{j(!1)},ke=()=>{F(!1)},ge=()=>{V(!1)};return s.useEffect(()=>{S===!1&&i.categoryId==null&&D.setFocus($e(e.transactionId,"category"))},[S]),s.useEffect(()=>{A===!1&&i.classId==null&&D.setFocus($e(e.transactionId,"class"))},[A]),s.useEffect(()=>{$===!1&&i.vendor==null&&D.setFocus($e(e.transactionId,"vendor"))},[$]),s.useEffect(()=>{L===!1&&i.customer==null&&D.setFocus($e(e.transactionId,"customer"))},[L]),s.useEffect(()=>{W===!1&&i.bankAccountId==null&&D.setFocus($e(e.transactionId,"bankAccount"))},[W]),s.useEffect(()=>{H===!1&&i.creditCardId==null&&D.setFocus($e(e.transactionId,"creditCard"))},[H]),t.jsx(Jt,{...D,children:t.jsx("form",{onSubmit:D.handleSubmit(P),id:ci(e.transactionId),children:t.jsxs(xd,{children:[t.jsxs(bd,{children:[t.jsxs(jd,{children:[t.jsxs(kd,{children:[t.jsx(Gs,{}),t.jsx(Un,{label:{label:q?xe.review.formLabels.match:xe.review.formLabels.categorize},radioField:{name:$e(e.transactionId,"match_radio"),id:q?"match":"categorize",value:q?"match":"categorize",checked:!0,style:{width:o.sp3,height:o.sp3,padding:"2px"}},style:{width:"auto"}})]}),t.jsx(_e,{controller:!q,children:t.jsxs(t.Fragment,{children:[t.jsx(hi,{}),J.map(v=>t.jsx(Un,{label:{label:xe.review.formLabels[v]},style:{width:"auto"},isDisabled:"readonly",changeLabelColorInDisableMode:!0,radioField:{name:$e(e.transactionId,"recommendedActionType"),id:v,value:v,style:{width:o.sp3,height:o.sp3,padding:"2px"}}},v))]})})]}),t.jsxs(Sd,{children:[t.jsx(gn,{variant:"secondary",size:"small",label:xe.review.formLabels.exclude,loading:r[e.transactionId]?.fetchState==="In-Progress","data-testid":z("account-reconciliation-review-exclude-button",e.transactionId),style:{width:o.sp10},reverseSpinnerColor:!1,onClick:()=>{b({reconcileAction:"exclude",excludeTransactionId:e.transactionId})}}),t.jsx(gn,{form:ci(e.transactionId),"data-testid":z("account-reconciliation-review-save-button",e.transactionId),label:pt.footer.save,style:{width:o.sp10},variant:"primary",size:"small",type:"submit",loading:m[e.transactionId]?.fetchState==="In-Progress"})]})]}),t.jsx(_e,{controller:M||Q||Y,children:t.jsxs(Gn,{children:[t.jsx(_e,{controller:M||Y,children:t.jsx(Ct,{onClickAway:()=>{i.vendor==null&&$===!1&&E(!0)},children:t.jsx(X,{style:{flex:1,padding:g[0],justifyContent:"center"},showHoverEffect:!0,forceHoverEffect:!1,children:t.jsxs(ut,{className:"hover-background",style:{padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(te,{style:{display:"flex",alignItems:"center",gap:g[1]},children:pt.texts.vendor}),t.jsx(se,{style:{gap:g[3]},className:"item-value-container",children:t.jsx(t.Fragment,{children:$===!0?t.jsxs(de,{onClick:v=>{v.stopPropagation(),E(!1)},"data-testid":z("account-reconciliation-review-add-vendor-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:f.colors.champion,cursor:"pointer"},children:[t.jsx(Nt,{}),xe.review.formLabels.addVendor]}):t.jsx(yo,{name:$e(e.transactionId,"vendor"),allowEmpty:!1,placeholder:xe.review.formLabels.addVendor,valueToId:v=>v,defaultValue:{selectedOption:k?.selectedOption,defaultOptions:k?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:o.sp4})},registerOptions:{required:!0,validate:v=>!!v.selectedOption},loadOptions:R})})})]})})})}),t.jsx(_e,{controller:Q,children:t.jsx(Ct,{onClickAway:()=>{i.customer==null&&L===!1&&B(!0)},children:t.jsx(X,{style:{flex:1,padding:g[0],justifyContent:"center"},showHoverEffect:!0,forceHoverEffect:!1,children:t.jsxs(ut,{className:"hover-background",style:{padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(te,{style:{display:"flex",alignItems:"center",gap:g[1]},children:pt.texts.customer}),t.jsx(se,{style:{gap:g[3]},className:"item-value-container",children:t.jsx(t.Fragment,{children:L===!0?t.jsxs(de,{onClick:v=>{v.stopPropagation(),B(!1)},"data-testid":z("account-reconciliation-review-add-customer-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:f.colors.champion,cursor:"pointer"},children:[t.jsx(Nt,{}),xe.review.formLabels.addCustomer]}):t.jsx(yo,{name:$e(e.transactionId,"customer"),allowEmpty:!1,placeholder:xe.review.formLabels.addCustomer,valueToId:v=>v,defaultValue:{selectedOption:O?.selectedOption,defaultOptions:O?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:o.sp4})},registerOptions:{required:!0,validate:v=>!!v.selectedOption},loadOptions:R})})})]})})})}),t.jsx(Ct,{onClickAway:()=>{i.categoryId==null&&S===!1&&j(!0)},children:t.jsx(X,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(ut,{className:"hover-background",children:[t.jsx(te,{style:{display:"flex",alignItems:"center",gap:g[1]},children:pt.texts.category}),t.jsx(se,{className:"item-value-container",children:t.jsx(t.Fragment,{children:S===!0?t.jsxs(de,{onClick:v=>{v.stopPropagation(),ye()},"data-testid":z("account-reconciliation-review-add-category-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:f.colors.champion,cursor:"pointer"},children:[t.jsx(Nt,{}),xe.review.formLabels.addCategory]}):t.jsx(on,{shouldShowChevronIcon:!1,menuPortal:document.body,name:$e(e.transactionId,"category"),placeholder:xe.review.formLabels.addCategory,valueToId:v=>N(v),defaultValue:{allOptions:me,selectedOption:c.find(v=>v.accountId===i.categoryId)?.qboId},registerOptions:{required:!0,validate:v=>!!v.selectedOption},customStyleConfig:kn})})})]})})}),t.jsx(Ct,{onClickAway:()=>{i.classId==null&&A===!1&&T(!0)},children:t.jsx(X,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(ut,{className:"hover-background",children:[t.jsx(te,{style:{display:"flex",alignItems:"center",gap:g[1]},children:pt.texts.class}),t.jsx(se,{className:"item-value-container",children:t.jsx(t.Fragment,{children:A===!0?t.jsxs(de,{onClick:v=>{v.stopPropagation(),T(!1)},"data-testid":z("account-reconciliation-review-add-class-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:f.colors.champion,cursor:"pointer"},children:[t.jsx(Nt,{}),xe.review.formLabels.addClass]}):t.jsx(on,{shouldShowChevronIcon:!1,menuPortal:document.body,name:$e(e.transactionId,"class"),placeholder:xe.review.formLabels.addClass,valueToId:v=>ne(v),defaultValue:{allOptions:_,selectedOption:i.classId},registerOptions:{required:!0,validate:v=>!!v.selectedOption},customStyleConfig:kn})})})]})})})]})}),t.jsx(_e,{controller:q,children:t.jsxs(Id,{children:[t.jsxs($d,{children:[t.jsx("span",{className:"matched-text",children:`${xe.review.matchedFoundCount.replace("__count__",e.recommendedAction.recommendedTransactions.length.toString())} `}),xe.review.matchesFoundFullInfo]}),t.jsx(Ld,{children:e.recommendedAction.recommendedTransactions.map(v=>v.bookTransactionId!=null?t.jsxs(Ad,{children:[t.jsx(Un,{label:{label:t.jsxs(Td,{children:[t.jsx(Fe,{children:v.date.format(Ws.MMMDCommaYYYYformat)}),t.jsx(Fe,{children:v.memo})]})},style:{width:"auto"},isDisabled:void 0,changeLabelColorInDisableMode:!0,radioField:{name:$e(e.transactionId,"matchedTransaction"),registerOptions:{required:!0},id:v.bookTransactionId,value:v.bookTransactionId,style:{width:o.sp3,height:o.sp3,padding:"2px"}}}),t.jsxs(Bd,{"data-testid":z("account-reconciliation-review-matched-transaction-amount",v.bookTransactionId),onClick:()=>{v.bookTransactionId!=null&&I(v.bookTransactionId)},children:[t.jsx(Rd,{children:Ts("0,0.00",v.amount.amount,v.amount.currencySymbol)}),t.jsx(hi,{})]})]},v.bookTransactionId):null)})]})}),t.jsx(_e,{controller:re,children:t.jsx(Gn,{children:t.jsx(Ct,{onClickAway:()=>{i.bankAccountId==null&&W===!1&&F(!0)},children:t.jsx(X,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(ut,{className:"hover-background",children:[t.jsx(te,{style:{display:"flex",alignItems:"center",gap:g[1]},children:xe.review.formLabels.transferTo}),t.jsx(se,{className:"item-value-container",children:t.jsx(t.Fragment,{children:W===!0?t.jsxs(de,{onClick:v=>{v.stopPropagation(),ke()},"data-testid":z("account-reconciliation-review-add-account-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:f.colors.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(Nt,{}),xe.review.formLabels.selectAccount]}):t.jsx(on,{shouldShowChevronIcon:!1,menuPortal:document.body,name:$e(e.transactionId,"bankAccount"),placeholder:xe.review.formLabels.selectAccount,defaultValue:{allOptions:Us(x),selectedOption:i.bankAccountId},registerOptions:{required:!0,validate:v=>!!v.selectedOption},customStyleConfig:kn})})})]})})})})}),t.jsx(_e,{controller:Ce,children:t.jsx(Gn,{children:t.jsx(Ct,{onClickAway:()=>{i.creditCardId==null&&H===!1&&V(!0)},children:t.jsx(X,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",flex:1},children:t.jsxs(ut,{className:"hover-background",children:[t.jsx(te,{style:{display:"flex",alignItems:"center",gap:g[1]},children:xe.review.formLabels.creditCard}),t.jsx(se,{className:"item-value-container",children:t.jsx(t.Fragment,{children:H===!0?t.jsxs(de,{onClick:v=>{v.stopPropagation(),ge()},"data-testid":z("account-reconciliation-review-add-credit-card-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:f.colors.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(Nt,{}),xe.review.formLabels.selectCard]}):t.jsx(on,{shouldShowChevronIcon:!1,menuPortal:document.body,name:$e(e.transactionId,"creditCard"),placeholder:xe.review.formLabels.selectCard,defaultValue:{allOptions:qs(y),selectedOption:i.creditCardId},registerOptions:{required:!0,validate:v=>!!v.selectedOption},customStyleConfig:kn})})})]})})})})}),t.jsx(_e,{controller:!q,children:t.jsx(vd,{children:t.jsx(X,{showHoverEffect:!0,forceHoverEffect:!1,style:{padding:"unset",justifyContent:"center",width:"100%"},children:t.jsxs(ut,{className:"hover-background",children:[t.jsx(te,{style:{display:"flex",alignItems:"center",gap:g[1]},children:xe.review.header.memo}),t.jsx(se,{className:"item-value-container",children:t.jsx(t.Fragment,{children:K===!0?t.jsxs(de,{onClick:v=>{v.stopPropagation(),G(!1)},"data-testid":z("account-reconciliation-review-add-memo-button",e.transactionId),style:{display:"inline-flex",alignItems:"center",gap:g[1],color:f.colors.champion,cursor:"pointer"},children:[t.jsx(Nt,{}),xe.review.formLabels.addMemo]}):t.jsx(mr,{name:$e(e.transactionId,"memo"),placeholder:xe.review.formLabels.addMemo,type:"text",style:{padding:0,textAlign:"left",width:"100%",background:"transparent"}})})})]})})})})]})})})},kn={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:o.sp4}),singleValue:()=>({margin:0}),menuPortal:()=>({zIndex:9999}),menu:()=>({width:`calc(100% + ${o.sp5})`,marginRight:`-${o.sp3}`,marginLeft:`-${o.sp3}`})},di=(e,n,d,c,h,p,i,l)=>{const r=c.find(m=>m.accountId===n.categoryId);return{[at]:{[e.transactionId]:{category:{selectedOption:r?.qboId,allOptions:d},class:{selectedOption:n?.classId,allOptions:h},bankAccount:{selectedOption:n?.bankAccountId,allOptions:Us(p)},creditCard:{selectedOption:n?.creditCardId,allOptions:qs(i)},memo:n?.memo,recommendedActionType:e.recommendedAction.action,matchedTransaction:n?.matchedTransactionId,vendor:{selectedOption:n?.vendor?.id,defaultOptions:Is(l.entityAutoCompleteView,n?.vendor)},customer:{selectedOption:n?.customer?.id,defaultOptions:wr(n?.customer,l.entityAutoCompleteView)}}}}},ui=(e,n,d,c)=>{const{vendor:h,customer:p}=e[at][n.transactionId];let i;if(h.selectedOption!=null){const r=h.defaultOptions.find(m=>m.value===h.selectedOption);if(r!=null)i={id:h.selectedOption,name:r.label};else{const m=d.entityAutoCompleteView.vendor.find(u=>u.id===h.selectedOption||u.zeniId===h.selectedOption);m!=null&&(i={id:m.zeniId,name:m.name})}}let l;if(p.selectedOption!=null){const r=p.defaultOptions.find(m=>m.value===p.selectedOption);if(r!=null)l={id:p.selectedOption,name:r.label};else{const m=d.entityAutoCompleteView.customer.find(u=>u.id===p.selectedOption||u.zeniId===p.selectedOption);m!=null&&(l={id:m.zeniId,name:m.name})}}return{categoryId:c.find(r=>r.qboId===e[at][n.transactionId].category.selectedOption)?.accountId??e[at][n.transactionId].category.selectedOption,classId:e[at][n.transactionId].class.selectedOption,memo:e[at][n.transactionId].memo,matchedTransactionId:e[at][n.transactionId].matchedTransaction,vendor:i,bankAccountId:e[at][n.transactionId].bankAccount.selectedOption,creditCardId:e[at][n.transactionId].creditCard.selectedOption,customer:l}},Xt=a(Fe)`
579
579
  display: flex;
580
580
  align-items: center;
581
581
  column-gap: ${o.sp1};
@@ -635,7 +635,7 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
635
635
  padding: 12px ${o.sp3};
636
636
  background-color: ${e=>e.theme.colors.background};
637
637
  border-radius: ${o.sp2};
638
- `,Zn=a.div`
638
+ `,Gn=a.div`
639
639
  display: flex;
640
640
  flex-direction: row;
641
641
  align-items: center;
@@ -714,7 +714,7 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
714
714
  border-top: 1px solid ${e=>e.theme.colors.grey3};
715
715
  `,Md=a(gt)`
716
716
  color: ${e=>e.theme.colors.hero};
717
- `,Zs=a(fn)`
717
+ `,Gs=a(fn)`
718
718
  width: ${o.sp3};
719
719
  height: ${o.sp3};
720
720
  margin-right: ${o.sp1};
@@ -742,13 +742,13 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
742
742
  display: flex;
743
743
  gap: ${o.sp3};
744
744
  flex-direction: column;
745
- `;function Vd({title:e,config:n,nodeId:d}){return{children:[],id:d??mt("loading_in_progress",[],e),isLastNode:!1,reportElementData:{element:{kind:"loading_in_progress",title:"",data:[],numOfBalances:0},config:n}}}function Hd({account:e,numOfBalances:n,title:d,isLastNode:c,config:h}){const p=mt("ac_group_report",[],d);return{children:[],id:p,isLastNode:c,reportElementData:{element:{kind:"ac_group_report",title:d,data:e,numOfBalances:n},config:h}}}function Wd({title:e,section:n,config:d,numOfBalances:c,nodeId:h}){return{children:[],id:h??mt("total",[]),isLastNode:!1,reportElementData:{element:{kind:"total",title:e,data:n,numOfBalances:c},config:d}}}function mi({section:e,allAccountReconciliations:n,title:d,subTitle:c,isLastNode:h,isTitleRowRequired:p,config:i}){const l=mt("section",[],d),r={children:[],id:l,isLastNode:h,reportElementData:{element:{kind:"section",title:d,data:e,numOfBalances:0},config:i}};if(p){const u=mt("title_string_only",[],d),x={children:[],id:u,isLastNode:!0,reportElementData:{element:{kind:"title_string_only",title:d,data:e,numOfBalances:0},config:i}};r.children.push(x)}const m=Wd({title:c,section:e,config:i,numOfBalances:0});return r.children.push(m),e.accountIDs.forEach((u,x)=>{const y=n[u],w=Hd({account:y,numOfBalances:0,title:y.accountReconEntity.account.accountName,isLastNode:x===e.accountIDs.length-1,config:i});r.children.push(w)}),r}function Ys({config:e,accountReconForSection:n,nodeId:d}){return{children:[],id:d??mt("timeframe_header",[]),isLastNode:!1,reportElementData:{element:{kind:"timeframe_headers",title:"",data:n,numOfBalances:0},config:e}}}function Ud(e,n){return n?Kn("section")+Kn("total")+e*Kn("ac_group_report"):1/0}const qd=(e,n,d,c,h=!0,p="assets")=>{const i=p==="liabilities"&&e.accountReconciliationBySectionID.liabilities.accountIDs.length>0?e.accountReconciliationBySectionID.liabilities:e.accountReconciliationBySectionID.assets,l=Ys({config:n,accountReconForSection:i}),r=[];r.push(l);const m=Array.isArray(d[c])?d[c]:[],{expenseAutomation:{accountRecon:{reconciliation:u}},common:{loading:x}}=je.getLocalizedStrings(),y=e.fetchStatus.fetchState==="Not-Started"||e.fetchStatus.fetchState==="In-Progress",w=b=>b.filter(C=>!m.includes(C));if(y)[...Array(3)].forEach((b,C)=>{r.push(Vd({title:`${C}+${x}`,config:n}))});else{const b=w(e.accountReconciliationBySectionID.assets.accountIDs),C=mi({section:{...e.accountReconciliationBySectionID.assets,accountIDs:b},allAccountReconciliations:e.accountReconciliationsByAccountID,title:u.headers.section.assets.title,subTitle:u.headers.section.assets.subTitle,isLastNode:!1,isTitleRowRequired:!1,config:n});if(r.push(C),e.accountReconciliationBySectionID.liabilities.accountIDs.length>0){const I=w(e.accountReconciliationBySectionID.liabilities.accountIDs),f=mi({section:{...e.accountReconciliationBySectionID.liabilities,accountIDs:I},allAccountReconciliations:e.accountReconciliationsByAccountID,title:u.headers.section.liabilities.title,subTitle:u.headers.section.liabilities.subTitle,isLastNode:!1,isTitleRowRequired:!0,config:n});r.push(f)}}return{config:n,headerNodes:h?[l]:[],contentNodes:r}};function Kd(e,n,d,c=!1,h="assets"){Object.assign(e.config,d);const p=h==="liabilities"&&n.accountReconciliationBySectionID.liabilities.accountIDs.length>0?n.accountReconciliationBySectionID.liabilities:n.accountReconciliationBySectionID.assets,i=Ys({config:d,accountReconForSection:p});return{config:d,headerNodes:c?[i]:[],contentNodes:[i,...e.contentNodes.slice(1)]}}const bo={wrapperPadding:new ee(g[2],g[2],g[2],g[8]),contentPaddingLeft:new ee(g[2],g[2],g[2],g[2]),contentPaddingRight:new ee(g[2],g[2],g[2],g[2])},Jd=a.div`
745
+ `;function Vd({title:e,config:n,nodeId:d}){return{children:[],id:d??mt("loading_in_progress",[],e),isLastNode:!1,reportElementData:{element:{kind:"loading_in_progress",title:"",data:[],numOfBalances:0},config:n}}}function Hd({account:e,numOfBalances:n,title:d,isLastNode:c,config:h}){const p=mt("ac_group_report",[],d);return{children:[],id:p,isLastNode:c,reportElementData:{element:{kind:"ac_group_report",title:d,data:e,numOfBalances:n},config:h}}}function Wd({title:e,section:n,config:d,numOfBalances:c,nodeId:h}){return{children:[],id:h??mt("total",[]),isLastNode:!1,reportElementData:{element:{kind:"total",title:e,data:n,numOfBalances:c},config:d}}}function mi({section:e,allAccountReconciliations:n,title:d,subTitle:c,isLastNode:h,isTitleRowRequired:p,config:i}){const l=mt("section",[],d),r={children:[],id:l,isLastNode:h,reportElementData:{element:{kind:"section",title:d,data:e,numOfBalances:0},config:i}};if(p){const u=mt("title_string_only",[],d),x={children:[],id:u,isLastNode:!0,reportElementData:{element:{kind:"title_string_only",title:d,data:e,numOfBalances:0},config:i}};r.children.push(x)}const m=Wd({title:c,section:e,config:i,numOfBalances:0});return r.children.push(m),e.accountIDs.forEach((u,x)=>{const y=n[u],w=Hd({account:y,numOfBalances:0,title:y.accountReconEntity.account.accountName,isLastNode:x===e.accountIDs.length-1,config:i});r.children.push(w)}),r}function Zs({config:e,accountReconForSection:n,nodeId:d}){return{children:[],id:d??mt("timeframe_header",[]),isLastNode:!1,reportElementData:{element:{kind:"timeframe_headers",title:"",data:n,numOfBalances:0},config:e}}}function Ud(e,n){return n?Kn("section")+Kn("total")+e*Kn("ac_group_report"):1/0}const qd=(e,n,d,c,h=!0,p="assets")=>{const i=p==="liabilities"&&e.accountReconciliationBySectionID.liabilities.accountIDs.length>0?e.accountReconciliationBySectionID.liabilities:e.accountReconciliationBySectionID.assets,l=Zs({config:n,accountReconForSection:i}),r=[];r.push(l);const m=Array.isArray(d[c])?d[c]:[],{expenseAutomation:{accountRecon:{reconciliation:u}},common:{loading:x}}=je.getLocalizedStrings(),y=e.fetchStatus.fetchState==="Not-Started"||e.fetchStatus.fetchState==="In-Progress",w=b=>b.filter(C=>!m.includes(C));if(y)[...Array(3)].forEach((b,C)=>{r.push(Vd({title:`${C}+${x}`,config:n}))});else{const b=w(e.accountReconciliationBySectionID.assets.accountIDs),C=mi({section:{...e.accountReconciliationBySectionID.assets,accountIDs:b},allAccountReconciliations:e.accountReconciliationsByAccountID,title:u.headers.section.assets.title,subTitle:u.headers.section.assets.subTitle,isLastNode:!1,isTitleRowRequired:!1,config:n});if(r.push(C),e.accountReconciliationBySectionID.liabilities.accountIDs.length>0){const I=w(e.accountReconciliationBySectionID.liabilities.accountIDs),f=mi({section:{...e.accountReconciliationBySectionID.liabilities,accountIDs:I},allAccountReconciliations:e.accountReconciliationsByAccountID,title:u.headers.section.liabilities.title,subTitle:u.headers.section.liabilities.subTitle,isLastNode:!1,isTitleRowRequired:!0,config:n});r.push(f)}}return{config:n,headerNodes:h?[l]:[],contentNodes:r}};function Kd(e,n,d,c=!1,h="assets"){Object.assign(e.config,d);const p=h==="liabilities"&&n.accountReconciliationBySectionID.liabilities.accountIDs.length>0?n.accountReconciliationBySectionID.liabilities:n.accountReconciliationBySectionID.assets,i=Zs({config:d,accountReconForSection:p});return{config:d,headerNodes:c?[i]:[],contentNodes:[i,...e.contentNodes.slice(1)]}}const bo={wrapperPadding:new ee(g[2],g[2],g[2],g[8]),contentPaddingLeft:new ee(g[2],g[2],g[2],g[2]),contentPaddingRight:new ee(g[2],g[2],g[2],g[2])},Jd=a.div`
746
746
  display: flex;
747
747
  height: 100%;
748
748
  width: 100%;
749
749
  justify-content: center;
750
750
  align-items: center;
751
- `,Zd=a.div`
751
+ `,Gd=a.div`
752
752
  display: flex;
753
753
  height: 100%;
754
754
  min-height: 100%;
@@ -757,10 +757,10 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
757
757
  justify-content: center;
758
758
  padding-left: ${e=>bo.wrapperPadding.valuePx(e.windowSize)};
759
759
  background-color: ${e=>e.theme.colors.grey4};
760
- `,Yd=a.div`
760
+ `,Zd=a.div`
761
761
  width: 100%;
762
762
  height: 100%;
763
- `,{common:Gd}=je.getLocalizedStrings();function Xd({reconciliation:e,companyId:n,onScroll:d,onReload:c,onReviewClicked:h,setOpenDrawerClicked:p,onFetchLinkTokenClick:i,onEstablishConnectionClick:l,onAddStatementClick:r}){const[m,u]=s.useState(void 0),[x,y]=s.useState(void 0),w=e.plaidConnectionDetails.link_account_no_microdeposit,b=e.plaidConnectionDetails.update_account,C=x==="update_account"?b:w,[I,f]=s.useState(C.linkToken??null),[$,E]=s.useState(!1),{useDynamicConfig:L}=ps(),{configValue:B}=L(ms.accountReconGLAccountsConfig),S=s.useCallback(N=>{u(N),y("link_account_no_microdeposit")},[]),j=s.useCallback(N=>{const J=F.current.accountReconciliationsByAccountID[N]?.paymentAccountId;u(N),y("update_account"),i("update_account",J)},[]),A=s.useCallback(N=>{p(N)},[]),T=s.useRef(m),W=s.useRef(x),F=s.useRef(e);s.useEffect(()=>{T.current=m},[m]),s.useEffect(()=>{W.current=x},[x]),s.useEffect(()=>{F.current=e},[e]);const H=s.useCallback(N=>{l(N,T.current??"",W.current),u(void 0),y(void 0),E(!1)},[l]),V=s.useCallback((N,J)=>{N!=null&&console.log("Plaid Connection Error",N,J),u(void 0),y(void 0),E(!1)},[]),{open:K,ready:Z}=Za({token:I,onSuccess:H,onExit:V});s.useEffect(()=>{(Co(new Date().toISOString()).isAfter(C.expiration)||C.linkToken==null)&&C.fetchStatus.fetchState==="Not-Started"&&i("link_account_no_microdeposit")},[C.fetchStatus.fetchState]),s.useEffect(()=>{!$&&x!=null&&C.linkToken===I&&C.fetchStatus.fetchState==="Completed"&&Z&&E(!0)},[Z,I,C.fetchStatus.fetchState,C.linkToken,x,$]),s.useEffect(()=>{C.fetchStatus.fetchState==="Completed"&&C.linkToken!=null&&C.linkToken!==I&&f(C.linkToken)},[C.fetchStatus.fetchState,C.linkToken,I]),s.useEffect(()=>{$&&K()},[$,K]);const[q,M]=s.useState(void 0),[re,Ce]=s.useState(void 0),[Q,G]=s.useState("assets"),me=Co("2025-03-31"),_=1,D="account_reconciliation",Y=Se(),P=St(),k=!0,O=Array.isArray(B?.[n])?B[n]:[],U=e.accountReconciliationBySectionID.assets.accountIDs.filter(N=>!O.includes(N)).length,oe=e.accountReconciliationBySectionID.liabilities.accountIDs.length>0,R=Ud(U,oe),ne=s.useCallback(N=>{const J=N.scrollTop>=R?"liabilities":"assets";J!==Q&&G(J),d?.(N)},[R,Q,d]);return s.useEffect(()=>{const N={reportId:D,mode:"none",displayOrder:"ascending_date",reportFormat:"more_detailed",bookCloseDate:me,firstMonthOfFY:_,filterAccountsWithNilBalances:"off",filterAccountGroupsWithNilBalances:"off",showNegativeAmountInParenthesis:!1,dataAvailable:void 0,accountReconciliationConfig:{selectedDrawerAccountId:e.selectedDrawerAccountId,onReviewClicked:h,onConnectClicked:S,onReconnectClicked:j,onOpenDrawerClicked:A,onStatementAddClicked:r}};if(q==null||!gs(re,e)){const J=qd(e,N,B,n,k,Q);Ce(e),M(J)}else{const J=Kd(q,e,N,k,Q);M(J)}},[e,Q]),e.fetchStatus.fetchState==="Error"?t.jsx(Jd,{children:t.jsx(Ya,{onReload:c,message:Gd.errorMessage.somethingWentWrong})}):t.jsx(Zd,{windowSize:Y,children:q!=null?t.jsx(Yd,{windowSize:Y,children:t.jsx(Ms,{backgroundColor:new $o(P.colors.grey4),rootNodes:q,type:"name+balances_actual",compareMode:"compare_mode_percent",isSticky:{isStickyHeader:k,isStickyName:k},treeNodePadding:{left:bo.contentPaddingLeft.value(Y),right:bo.contentPaddingRight.value(Y)},nodeOpenStatus:{},scrollPosition:e.reconListUIState.scrollPosition,onCompareModeChanged:()=>{},onScroll:ne})}):null})}function Qd({currentFooterFormId:e,vendorSearchAutoCompleteData:n,vendorSearchAutoCompleteActions:d,reconciliation:c,companyId:h,onReconTabColumnSortConfigChanged:p,updateReconReviewTabLocalData:i,onUpdateReconcileTabLocalData:l,setCurrentFooterFormId:r,onReloadReconciliationListPage:m,onReviewClicked:u,onFetchLinkTokenClick:x,onEstablishConnectionClick:y,onAddStatementClick:w,onReconReviewTabColumnSortConfigChanged:b,onSaveReconciliation:C,onSaveReconciliationReview:I,setOpenDrawerClicked:f,onReconMatchedTransactionClick:$,onReconListPageScroll:E}){return c.selectedAccountId==null?t.jsx(Xd,{companyId:h,onScroll:E,reconciliation:c,onReload:m,onReviewClicked:u,onFetchLinkTokenClick:x,onEstablishConnectionClick:y,setOpenDrawerClicked:f,onAddStatementClick:w}):t.jsx(zd,{currentFooterFormId:e,setCurrentFooterFormId:r,onUpdateReconcileTabLocalData:l,onReconTabColumnSortConfigChanged:p,reconciliation:c,updateReviewTabLocalData:i,entitySearchAutoCompleteActions:d,onReconReviewTabColumnSortConfigChanged:b,entitySearchAutoCompleteData:n,selectedAccountId:c.selectedAccountId,onSaveReconciliation:C,onSaveReconciliationReview:I,onReconMatchedTransactionClick:$})}function eu({accountAndClassReport:e,numOfBalances:n,title:d,isLastNode:c,isFirstNode:h,config:p,parentNodeIDs:i,ancestorMetadata:l}){let r="";return e.accountBase&&e.classBase?r=`${e.accountBase.accountId}_${e.classBase.classId}`:e.accountBase?r=e.accountBase.accountId:e.classBase&&(r=e.classBase.classId),{children:[],id:mt("flux_vendor_account_class_row",i,r),isLastNode:c,isFirstNode:h,reportElementData:{element:{kind:"flux_vendor_account_class_row",title:d,data:e,metadata:l,numOfBalances:n},config:p}}}function tu({vendorView:e,numOfBalances:n,title:d,isLastNode:c,config:h,parentNodeIDs:p}){const i=mt("flux_vendor_row",p,e.vendor.id),l={children:[],id:i,isLastNode:c,reportElementData:{element:{kind:"flux_vendor_row",title:d,data:e,numOfBalances:n},config:h}},r=e.vendorAccountsAndClasses;return l.children=r.map((m,u)=>eu({accountAndClassReport:m,numOfBalances:n,title:m.accountBase?.accountName??"",config:h,isLastNode:u===r.length-1,isFirstNode:u===0,parentNodeIDs:[...p,i],ancestorMetadata:{accountAndClassRowMetadata:{depth:0,hasSibling:r.length>1,hasChildren:!1,isLastNode:u===r.length-1,isFirstNode:u===0,name:m.accountBase?.accountName},isVendorLastChild:c,vendorId:e.vendor.id}})),l}function nu({section:e,numOfBalances:n,title:d,isLastNode:c,config:h}){const p=e.sectionId,i={children:[],id:p,isLastNode:c,reportElementData:{element:{kind:"section",title:d,data:e,numOfBalances:n,sectionType:e.sectionId},config:h}},l=(e.vendors??[]).map((r,m)=>tu({vendorView:r,numOfBalances:n,title:r.vendor.name,isLastNode:m===e.vendors.length-1,config:h,parentNodeIDs:[p]}));return i.children.push(...l),i}function ou({title:e,balances:n,config:d,nodeId:c}){return{children:[],id:c??mt("headers_loading_in_progress",[],e),isLastNode:!1,reportElementData:{element:{kind:"headers_loading_in_progress",title:"",data:n,numOfBalances:n.length},config:d}}}function iu({title:e,data:n,isLastNode:d,config:c,numOfBalances:h}){const p=mt("total",[],e);return{children:[],id:p,isLastNode:d,reportElementData:{element:{kind:"total",title:e,data:n,numOfBalances:h},config:c}}}const{common:In,expenseAutomation:{fluxAnalysis:su}}=je.getLocalizedStrings(),au=(e,n,d=!0)=>{const c=e.sections.generalExpense.balancesByMonth?Object.keys(e.sections.generalExpense.balancesByMonth).length:e.sections.reimbursement.balancesByMonth?Object.keys(e.sections.reimbursement.balancesByMonth).length:2,h=e.sections.generalExpense.balancesByMonth?sn(e.sections.generalExpense.balancesByMonth):e.sections.reimbursement.balancesByMonth?sn(e.sections.reimbursement.balancesByMonth):[],p=zs({balances:h,config:n}),i=[],l=e.sections.generalExpense.fetchStatus.fetchState==="In-Progress"&&e.uiState.paginationInfoByGroup.generalExpense.pageToken==null,r=e.sections.generalExpense.fetchStatus.fetchState==="In-Progress"&&e.uiState.paginationInfoByGroup.generalExpense.pageToken!=null||e.sections.reimbursement.fetchStatus.fetchState==="In-Progress";if(l===!0)i.push(ou({title:`${In.loading}`,balances:h,config:n})),[...Array(10)].forEach((m,u)=>{i.push(Zo({title:`${u}+${In.loading}`,balances:h,config:n}))});else{if(i.push(p),["generalExpense","reimbursement"].forEach(m=>{const u=e.sections[m];if(u.vendors.length>0||u.fetchStatus.fetchState==="Completed"){const x=sn(u.balancesByMonth);i.push(nu({section:{sectionId:m,reportId:"flux_analysis_operating_expense",balances:x,vendors:u.vendors,varianceAmount:u.varianceAmount,variancePercentage:u.variancePercentage,currency:e.currency},numOfBalances:c,title:ru(m),isLastNode:!1,config:n}))}}),e.totalBalancesAndVariance){const m=e.totalBalancesAndVariance.balancesByMonth?sn(e.totalBalancesAndVariance.balancesByMonth):[],u=iu({title:In.texts.total,data:{balances:m,varianceAmount:e.totalBalancesAndVariance.varianceAmount,variancePercentage:e.totalBalancesAndVariance.variancePercentage,currency:e.currency},config:n,isLastNode:!0,numOfBalances:c});i.push(u)}r===!0&&[...Array(1)].forEach((m,u)=>{i.push(Zo({title:`${u}+${In.loading}`,balances:h,config:n}))})}return{config:n,headerNodes:d&&!l?[p]:[],contentNodes:i}},ru=e=>su.sectionTitle[e];function lu(e,n,d,c=!0){Object.assign(e.config,n);const h=cu(d),p=zs({balances:h,config:n});return{config:n,headerNodes:c?[p]:[],contentNodes:[p,...e.contentNodes.slice(1)]}}const cu=e=>e.sections.generalExpense.balancesByMonth?sn(e.sections.generalExpense.balancesByMonth):e.sections.reimbursement.balancesByMonth?sn(e.sections.reimbursement.balancesByMonth):[],vo={contentPaddingLeft:new ee(g[0],g[0],g[0]),contentPaddingRight:new ee(g[3],g[3],g[8]),wrapperPadding:new ee(g[3],g[3],g[8])},du=a.div`
763
+ `,{common:Yd}=je.getLocalizedStrings();function Xd({reconciliation:e,companyId:n,onScroll:d,onReload:c,onReviewClicked:h,setOpenDrawerClicked:p,onFetchLinkTokenClick:i,onEstablishConnectionClick:l,onAddStatementClick:r}){const[m,u]=s.useState(void 0),[x,y]=s.useState(void 0),w=e.plaidConnectionDetails.link_account_no_microdeposit,b=e.plaidConnectionDetails.update_account,C=x==="update_account"?b:w,[I,f]=s.useState(C.linkToken??null),[$,E]=s.useState(!1),{useDynamicConfig:L}=ps(),{configValue:B}=L(ms.accountReconGLAccountsConfig),S=s.useCallback(N=>{u(N),y("link_account_no_microdeposit")},[]),j=s.useCallback(N=>{const J=F.current.accountReconciliationsByAccountID[N]?.paymentAccountId;u(N),y("update_account"),i("update_account",J)},[]),A=s.useCallback(N=>{p(N)},[]),T=s.useRef(m),W=s.useRef(x),F=s.useRef(e);s.useEffect(()=>{T.current=m},[m]),s.useEffect(()=>{W.current=x},[x]),s.useEffect(()=>{F.current=e},[e]);const H=s.useCallback(N=>{l(N,T.current??"",W.current),u(void 0),y(void 0),E(!1)},[l]),V=s.useCallback((N,J)=>{N!=null&&console.log("Plaid Connection Error",N,J),u(void 0),y(void 0),E(!1)},[]),{open:K,ready:G}=Ga({token:I,onSuccess:H,onExit:V});s.useEffect(()=>{(Co(new Date().toISOString()).isAfter(C.expiration)||C.linkToken==null)&&C.fetchStatus.fetchState==="Not-Started"&&i("link_account_no_microdeposit")},[C.fetchStatus.fetchState]),s.useEffect(()=>{!$&&x!=null&&C.linkToken===I&&C.fetchStatus.fetchState==="Completed"&&G&&E(!0)},[G,I,C.fetchStatus.fetchState,C.linkToken,x,$]),s.useEffect(()=>{C.fetchStatus.fetchState==="Completed"&&C.linkToken!=null&&C.linkToken!==I&&f(C.linkToken)},[C.fetchStatus.fetchState,C.linkToken,I]),s.useEffect(()=>{$&&K()},[$,K]);const[q,M]=s.useState(void 0),[re,Ce]=s.useState(void 0),[Q,Y]=s.useState("assets"),me=Co("2025-03-31"),_=1,D="account_reconciliation",Z=Se(),P=St(),k=!0,O=Array.isArray(B?.[n])?B[n]:[],U=e.accountReconciliationBySectionID.assets.accountIDs.filter(N=>!O.includes(N)).length,oe=e.accountReconciliationBySectionID.liabilities.accountIDs.length>0,R=Ud(U,oe),ne=s.useCallback(N=>{const J=N.scrollTop>=R?"liabilities":"assets";J!==Q&&Y(J),d?.(N)},[R,Q,d]);return s.useEffect(()=>{const N={reportId:D,mode:"none",displayOrder:"ascending_date",reportFormat:"more_detailed",bookCloseDate:me,firstMonthOfFY:_,filterAccountsWithNilBalances:"off",filterAccountGroupsWithNilBalances:"off",showNegativeAmountInParenthesis:!1,dataAvailable:void 0,accountReconciliationConfig:{selectedDrawerAccountId:e.selectedDrawerAccountId,onReviewClicked:h,onConnectClicked:S,onReconnectClicked:j,onOpenDrawerClicked:A,onStatementAddClicked:r}};if(q==null||!gs(re,e)){const J=qd(e,N,B,n,k,Q);Ce(e),M(J)}else{const J=Kd(q,e,N,k,Q);M(J)}},[e,Q]),e.fetchStatus.fetchState==="Error"?t.jsx(Jd,{children:t.jsx(Za,{onReload:c,message:Yd.errorMessage.somethingWentWrong})}):t.jsx(Gd,{windowSize:Z,children:q!=null?t.jsx(Zd,{windowSize:Z,children:t.jsx(Ms,{backgroundColor:new $o(P.colors.grey4),rootNodes:q,type:"name+balances_actual",compareMode:"compare_mode_percent",isSticky:{isStickyHeader:k,isStickyName:k},treeNodePadding:{left:bo.contentPaddingLeft.value(Z),right:bo.contentPaddingRight.value(Z)},nodeOpenStatus:{},scrollPosition:e.reconListUIState.scrollPosition,onCompareModeChanged:()=>{},onScroll:ne})}):null})}function Qd({currentFooterFormId:e,vendorSearchAutoCompleteData:n,vendorSearchAutoCompleteActions:d,reconciliation:c,companyId:h,onReconTabColumnSortConfigChanged:p,updateReconReviewTabLocalData:i,onUpdateReconcileTabLocalData:l,setCurrentFooterFormId:r,onReloadReconciliationListPage:m,onReviewClicked:u,onFetchLinkTokenClick:x,onEstablishConnectionClick:y,onAddStatementClick:w,onReconReviewTabColumnSortConfigChanged:b,onSaveReconciliation:C,onSaveReconciliationReview:I,setOpenDrawerClicked:f,onReconMatchedTransactionClick:$,onReconListPageScroll:E}){return c.selectedAccountId==null?t.jsx(Xd,{companyId:h,onScroll:E,reconciliation:c,onReload:m,onReviewClicked:u,onFetchLinkTokenClick:x,onEstablishConnectionClick:y,setOpenDrawerClicked:f,onAddStatementClick:w}):t.jsx(zd,{currentFooterFormId:e,setCurrentFooterFormId:r,onUpdateReconcileTabLocalData:l,onReconTabColumnSortConfigChanged:p,reconciliation:c,updateReviewTabLocalData:i,entitySearchAutoCompleteActions:d,onReconReviewTabColumnSortConfigChanged:b,entitySearchAutoCompleteData:n,selectedAccountId:c.selectedAccountId,onSaveReconciliation:C,onSaveReconciliationReview:I,onReconMatchedTransactionClick:$})}function eu({accountAndClassReport:e,numOfBalances:n,title:d,isLastNode:c,isFirstNode:h,config:p,parentNodeIDs:i,ancestorMetadata:l}){let r="";return e.accountBase&&e.classBase?r=`${e.accountBase.accountId}_${e.classBase.classId}`:e.accountBase?r=e.accountBase.accountId:e.classBase&&(r=e.classBase.classId),{children:[],id:mt("flux_vendor_account_class_row",i,r),isLastNode:c,isFirstNode:h,reportElementData:{element:{kind:"flux_vendor_account_class_row",title:d,data:e,metadata:l,numOfBalances:n},config:p}}}function tu({vendorView:e,numOfBalances:n,title:d,isLastNode:c,config:h,parentNodeIDs:p}){const i=mt("flux_vendor_row",p,e.vendor.id),l={children:[],id:i,isLastNode:c,reportElementData:{element:{kind:"flux_vendor_row",title:d,data:e,numOfBalances:n},config:h}},r=e.vendorAccountsAndClasses;return l.children=r.map((m,u)=>eu({accountAndClassReport:m,numOfBalances:n,title:m.accountBase?.accountName??"",config:h,isLastNode:u===r.length-1,isFirstNode:u===0,parentNodeIDs:[...p,i],ancestorMetadata:{accountAndClassRowMetadata:{depth:0,hasSibling:r.length>1,hasChildren:!1,isLastNode:u===r.length-1,isFirstNode:u===0,name:m.accountBase?.accountName},isVendorLastChild:c,vendorId:e.vendor.id}})),l}function nu({section:e,numOfBalances:n,title:d,isLastNode:c,config:h}){const p=e.sectionId,i={children:[],id:p,isLastNode:c,reportElementData:{element:{kind:"section",title:d,data:e,numOfBalances:n,sectionType:e.sectionId},config:h}},l=(e.vendors??[]).map((r,m)=>tu({vendorView:r,numOfBalances:n,title:r.vendor.name,isLastNode:m===e.vendors.length-1,config:h,parentNodeIDs:[p]}));return i.children.push(...l),i}function ou({title:e,balances:n,config:d,nodeId:c}){return{children:[],id:c??mt("headers_loading_in_progress",[],e),isLastNode:!1,reportElementData:{element:{kind:"headers_loading_in_progress",title:"",data:n,numOfBalances:n.length},config:d}}}function iu({title:e,data:n,isLastNode:d,config:c,numOfBalances:h}){const p=mt("total",[],e);return{children:[],id:p,isLastNode:d,reportElementData:{element:{kind:"total",title:e,data:n,numOfBalances:h},config:c}}}const{common:In,expenseAutomation:{fluxAnalysis:su}}=je.getLocalizedStrings(),au=(e,n,d=!0)=>{const c=e.sections.generalExpense.balancesByMonth?Object.keys(e.sections.generalExpense.balancesByMonth).length:e.sections.reimbursement.balancesByMonth?Object.keys(e.sections.reimbursement.balancesByMonth).length:2,h=e.sections.generalExpense.balancesByMonth?sn(e.sections.generalExpense.balancesByMonth):e.sections.reimbursement.balancesByMonth?sn(e.sections.reimbursement.balancesByMonth):[],p=zs({balances:h,config:n}),i=[],l=e.sections.generalExpense.fetchStatus.fetchState==="In-Progress"&&e.uiState.paginationInfoByGroup.generalExpense.pageToken==null,r=e.sections.generalExpense.fetchStatus.fetchState==="In-Progress"&&e.uiState.paginationInfoByGroup.generalExpense.pageToken!=null||e.sections.reimbursement.fetchStatus.fetchState==="In-Progress";if(l===!0)i.push(ou({title:`${In.loading}`,balances:h,config:n})),[...Array(10)].forEach((m,u)=>{i.push(Go({title:`${u}+${In.loading}`,balances:h,config:n}))});else{if(i.push(p),["generalExpense","reimbursement"].forEach(m=>{const u=e.sections[m];if(u.vendors.length>0||u.fetchStatus.fetchState==="Completed"){const x=sn(u.balancesByMonth);i.push(nu({section:{sectionId:m,reportId:"flux_analysis_operating_expense",balances:x,vendors:u.vendors,varianceAmount:u.varianceAmount,variancePercentage:u.variancePercentage,currency:e.currency},numOfBalances:c,title:ru(m),isLastNode:!1,config:n}))}}),e.totalBalancesAndVariance){const m=e.totalBalancesAndVariance.balancesByMonth?sn(e.totalBalancesAndVariance.balancesByMonth):[],u=iu({title:In.texts.total,data:{balances:m,varianceAmount:e.totalBalancesAndVariance.varianceAmount,variancePercentage:e.totalBalancesAndVariance.variancePercentage,currency:e.currency},config:n,isLastNode:!0,numOfBalances:c});i.push(u)}r===!0&&[...Array(1)].forEach((m,u)=>{i.push(Go({title:`${u}+${In.loading}`,balances:h,config:n}))})}return{config:n,headerNodes:d&&!l?[p]:[],contentNodes:i}},ru=e=>su.sectionTitle[e];function lu(e,n,d,c=!0){Object.assign(e.config,n);const h=cu(d),p=zs({balances:h,config:n});return{config:n,headerNodes:c?[p]:[],contentNodes:[p,...e.contentNodes.slice(1)]}}const cu=e=>e.sections.generalExpense.balancesByMonth?sn(e.sections.generalExpense.balancesByMonth):e.sections.reimbursement.balancesByMonth?sn(e.sections.reimbursement.balancesByMonth):[],vo={contentPaddingLeft:new ee(g[0],g[0],g[0]),contentPaddingRight:new ee(g[3],g[3],g[8]),wrapperPadding:new ee(g[3],g[3],g[8])},du=a.div`
764
764
  display: flex;
765
765
  position: sticky;
766
766
  width: 100%;
@@ -771,7 +771,7 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
771
771
  `,uu=a.div`
772
772
  width: 100%;
773
773
  height: calc(100vh - ${o.sp11});
774
- `,hu=e=>{const{fluxView:n,handleRedirectToVendorDetailPage:d,updateOperatingExpensesIdsForReview:c,updateSectionIdsForReview:h,onSortOrderChanged:p,updateNodeCollapsableStatus:i,fetchReimbursementView:l,fetchGeneralExpenseView:r}=e,m=Se(),u=St(),[x,y]=s.useState(null),[w,b]=s.useState(null),[C,I]=s.useState(null),f=Ko([n.sections.generalExpense.fetchStatus,n.sections.reimbursement.fetchStatus]).fetchState,[$,E]=s.useState(!1),L=Vo(f),B=Vo(n.refreshStatus.fetchState),S=()=>{n.uiState.collapsableStatus.generalExpense?n.uiState.paginationInfoByGroup.generalExpense.hasMore===!0&&n.sections.generalExpense.fetchStatus.fetchState==="Completed"?r(n.uiState.paginationInfoByGroup.generalExpense.pageToken):n.sections.reimbursement.fetchStatus.fetchState==="Not-Started"&&l(n.uiState.paginationInfoByGroup.reimbursement.pageToken):n.uiState.collapsableStatus.reimbursement&&n.uiState.paginationInfoByGroup.reimbursement.hasMore===!0&&n.sections.reimbursement.fetchStatus.fetchState==="Completed"&&l(n.uiState.paginationInfoByGroup.reimbursement.pageToken)},j=()=>Object.keys(n.uiState.collapsableStatus).reduce((V,K)=>(V[K]=n.uiState.collapsableStatus[K],V),{}),A=s.useCallback(V=>{const K=!(n.uiState.collapsableStatus[V]??!0);i({...n.uiState.collapsableStatus,[V]:K})},[n.uiState.collapsableStatus,i]),T=s.useCallback((V,K)=>{let Z=n.reviewOperatingExpensesIds;const q=[];let M=n.selectedSectionIds;const re=n.sections[V].vendors;q.push(...re.map(Q=>Q.fluxAnalysisEntityId));let Ce=Fs-Z.length;K?(q.forEach(Q=>{!Z.includes(Q)&&Ce>0&&(Z=[...Z,Q],Ce--)}),M=[...M,V]):(Z=Z.filter(Q=>!q.includes(Q)),M=M.filter(Q=>Q!==V)),c(Z),h(M)},[n.reviewOperatingExpensesIds,n.selectedSectionIds,n.sections,c,h]),W=s.useCallback(V=>{const K=n.uiState.collapsableStatus[V]===!1;V==="generalExpense"&&!K&&n.sections.reimbursement.fetchStatus.fetchState==="Not-Started"&&l(n.uiState.paginationInfoByGroup.reimbursement.pageToken),A(V)},[n.uiState.collapsableStatus,n.sections.reimbursement.fetchStatus.fetchState,n.uiState.paginationInfoByGroup.reimbursement.pageToken,l,A]),F=n.sections.generalExpense.vendors.length+n.sections.reimbursement.vendors.length,H=V=>V<F;return s.useEffect(()=>{const V={reportId:"flux_analysis_operating_expense",mode:"none",displayOrder:"ascending_date",reportFormat:"summary",firstMonthOfFY:1,filterAccountsWithNilBalances:"off",filterAccountGroupsWithNilBalances:"off",showNegativeAmountInParenthesis:!1,fluxAnalysisConfig:{sortOrder:n.uiState.sortOrder,sortKey:n.uiState.sortKey,sortOrSearchInProgress:!1,reviewOpExIds:n.reviewOperatingExpensesIds,reviewSectionIds:n.selectedSectionIds,fetchStatus:n.fetchStatus.fetchState,setIsSortApplied:E,onSectionRowClick:W,updateNodeCollapsableStatus:A,updateOperatingExpensesIdsForReview:c,handleRedirectToVendorDetailPage:d,onSectionCheckboxClick:T,onSortOrderChanged:p}};if(x==null||!gs(w,n)){const K=au(n,V,!0);b(n),y(K)}else{const K=lu(x,V,n,!0);y(K)}},[n,w,d,T,W,p,A,c]),t.jsx(du,{windowSize:m,children:t.jsx(uu,{children:x?t.jsx(Ms,{backgroundColor:new $o(u.colors.grey4),rootNodes:x,type:"name+balances_actual",isSticky:{isStickyHeader:!0,isStickyName:!0},treeNodePadding:{left:vo.contentPaddingLeft.value(m),right:vo.contentPaddingRight.value(m)},nodeOpenStatus:j(),compareMode:"compare_mode_amount",infiniteLoadingProps:{isItemLoaded:H,itemCount:F,loadMoreItems:S},variableNodeHeightTree:{prevFetchState:L??"Not-Started",fetchState:n.fetchStatus.fetchState,isSortApplied:$,setIsSortApplied:E,reducedFetchState:Ko([n.sections.generalExpense.fetchStatus,n.sections.reimbursement.fetchStatus]).fetchState,prevRefreshFetchState:B??"Not-Started",refreshFetchState:n.refreshStatus.fetchState},hoveredParentIdProps:{hoveredParentId:C,setHoveredParentId:I}}):null})})},pu="expenseAutomationFluxPage",{reports:{common:mu}}=je.getLocalizedStrings(),gu=({selectedPeriod:e,fluxAnalysis:n,onFetchFluxViewList:d,markAsReview:c,onReloadPage:h,setCurrentFooterFormId:p,updateOperatingExpensesIdsForReview:i,updateSectionIdsForReview:l,onUpdateFluxAnalysisUIState:r,redirectToVendorDetailPage:m,fetchFluxViewOnScroll:u,onFetchReimbursementView:x})=>{const{fetchStatus:y,reviewOperatingExpensesIds:w,uiState:b}=n,C=s.useRef(null),I=s.useRef(!1),f=Kt({mode:"all",reValidateMode:"onChange",resetOptions:{keepDefaultValues:!0},defaultValues:xu(w)}),$=Se();s.useEffect(()=>()=>{p("expenseAutomationPage")},[p]),s.useEffect(()=>{I.current&&C?.current?.scrollLeft!=null&&b.scrollPosition?.scrollLeft!==C.current.scrollLeft&&b.scrollPosition!=null&&r({scrollPosition:{scrollTop:b.scrollPosition?.scrollTop,scrollLeft:C.current.scrollLeft}})},[b.scrollPosition?.scrollLeft,C.current?.scrollLeft,b.scrollPosition,r]),s.useEffect(()=>{p(w.length>0?"expenseAutomationFluxPage":"expenseAutomationPage")},[w,p]);const E=j=>{m(j)},L=j=>{u(e,j)},B=(j,A)=>{r({sortOrder:j,sortKey:A}),d(),x(e,null,!1)},S=()=>{const j=Gs(n.sections,w);c(w,j===!0?"review":"unreview",e,!0)};if(y.fetchState==="Error")return t.jsxs(yu,{children:[t.jsx(Cu,{onClick:h,children:t.jsx(ko,{})}),t.jsx(wu,{children:mu.failed})]});{const j=T=>{r({collapsableStatus:T})},A=T=>{x(e,T,!0)};return t.jsx(Jt,{...f,children:t.jsx("form",{id:ka(pu),onSubmit:f.handleSubmit(S),style:{height:"100%",width:"100%"},children:t.jsx(fu,{windowSize:$,children:t.jsx(hu,{fluxView:n,handleRedirectToVendorDetailPage:E,onSortOrderChanged:B,updateOperatingExpensesIdsForReview:i,updateNodeCollapsableStatus:j,fetchReimbursementView:A,updateSectionIdsForReview:l,fetchGeneralExpenseView:L,reportId:"flux_analysis_operating_expense"})})})})}},Gs=(e,n)=>{const d=[...e.generalExpense.vendors,...e.reimbursement.vendors].filter(h=>h.status==="Pending Review");let c;return d.forEach(h=>{n.includes(h.fluxAnalysisEntityId)&&(c=!0)}),c},xu=e=>({fluxAnalysisRowIds:e}),fu=a.div`
774
+ `,hu=e=>{const{fluxView:n,handleRedirectToVendorDetailPage:d,updateOperatingExpensesIdsForReview:c,updateSectionIdsForReview:h,onSortOrderChanged:p,updateNodeCollapsableStatus:i,fetchReimbursementView:l,fetchGeneralExpenseView:r}=e,m=Se(),u=St(),[x,y]=s.useState(null),[w,b]=s.useState(null),[C,I]=s.useState(null),f=Ko([n.sections.generalExpense.fetchStatus,n.sections.reimbursement.fetchStatus]).fetchState,[$,E]=s.useState(!1),L=Vo(f),B=Vo(n.refreshStatus.fetchState),S=()=>{n.uiState.collapsableStatus.generalExpense?n.uiState.paginationInfoByGroup.generalExpense.hasMore===!0&&n.sections.generalExpense.fetchStatus.fetchState==="Completed"?r(n.uiState.paginationInfoByGroup.generalExpense.pageToken):n.sections.reimbursement.fetchStatus.fetchState==="Not-Started"&&l(n.uiState.paginationInfoByGroup.reimbursement.pageToken):n.uiState.collapsableStatus.reimbursement&&n.uiState.paginationInfoByGroup.reimbursement.hasMore===!0&&n.sections.reimbursement.fetchStatus.fetchState==="Completed"&&l(n.uiState.paginationInfoByGroup.reimbursement.pageToken)},j=()=>Object.keys(n.uiState.collapsableStatus).reduce((V,K)=>(V[K]=n.uiState.collapsableStatus[K],V),{}),A=s.useCallback(V=>{const K=!(n.uiState.collapsableStatus[V]??!0);i({...n.uiState.collapsableStatus,[V]:K})},[n.uiState.collapsableStatus,i]),T=s.useCallback((V,K)=>{let G=n.reviewOperatingExpensesIds;const q=[];let M=n.selectedSectionIds;const re=n.sections[V].vendors;q.push(...re.map(Q=>Q.fluxAnalysisEntityId));let Ce=Fs-G.length;K?(q.forEach(Q=>{!G.includes(Q)&&Ce>0&&(G=[...G,Q],Ce--)}),M=[...M,V]):(G=G.filter(Q=>!q.includes(Q)),M=M.filter(Q=>Q!==V)),c(G),h(M)},[n.reviewOperatingExpensesIds,n.selectedSectionIds,n.sections,c,h]),W=s.useCallback(V=>{const K=n.uiState.collapsableStatus[V]===!1;V==="generalExpense"&&!K&&n.sections.reimbursement.fetchStatus.fetchState==="Not-Started"&&l(n.uiState.paginationInfoByGroup.reimbursement.pageToken),A(V)},[n.uiState.collapsableStatus,n.sections.reimbursement.fetchStatus.fetchState,n.uiState.paginationInfoByGroup.reimbursement.pageToken,l,A]),F=n.sections.generalExpense.vendors.length+n.sections.reimbursement.vendors.length,H=V=>V<F;return s.useEffect(()=>{const V={reportId:"flux_analysis_operating_expense",mode:"none",displayOrder:"ascending_date",reportFormat:"summary",firstMonthOfFY:1,filterAccountsWithNilBalances:"off",filterAccountGroupsWithNilBalances:"off",showNegativeAmountInParenthesis:!1,fluxAnalysisConfig:{sortOrder:n.uiState.sortOrder,sortKey:n.uiState.sortKey,sortOrSearchInProgress:!1,reviewOpExIds:n.reviewOperatingExpensesIds,reviewSectionIds:n.selectedSectionIds,fetchStatus:n.fetchStatus.fetchState,setIsSortApplied:E,onSectionRowClick:W,updateNodeCollapsableStatus:A,updateOperatingExpensesIdsForReview:c,handleRedirectToVendorDetailPage:d,onSectionCheckboxClick:T,onSortOrderChanged:p}};if(x==null||!gs(w,n)){const K=au(n,V,!0);b(n),y(K)}else{const K=lu(x,V,n,!0);y(K)}},[n,w,d,T,W,p,A,c]),t.jsx(du,{windowSize:m,children:t.jsx(uu,{children:x?t.jsx(Ms,{backgroundColor:new $o(u.colors.grey4),rootNodes:x,type:"name+balances_actual",isSticky:{isStickyHeader:!0,isStickyName:!0},treeNodePadding:{left:vo.contentPaddingLeft.value(m),right:vo.contentPaddingRight.value(m)},nodeOpenStatus:j(),compareMode:"compare_mode_amount",infiniteLoadingProps:{isItemLoaded:H,itemCount:F,loadMoreItems:S},variableNodeHeightTree:{prevFetchState:L??"Not-Started",fetchState:n.fetchStatus.fetchState,isSortApplied:$,setIsSortApplied:E,reducedFetchState:Ko([n.sections.generalExpense.fetchStatus,n.sections.reimbursement.fetchStatus]).fetchState,prevRefreshFetchState:B??"Not-Started",refreshFetchState:n.refreshStatus.fetchState},hoveredParentIdProps:{hoveredParentId:C,setHoveredParentId:I}}):null})})},pu="expenseAutomationFluxPage",{reports:{common:mu}}=je.getLocalizedStrings(),gu=({selectedPeriod:e,fluxAnalysis:n,onFetchFluxViewList:d,markAsReview:c,onReloadPage:h,setCurrentFooterFormId:p,updateOperatingExpensesIdsForReview:i,updateSectionIdsForReview:l,onUpdateFluxAnalysisUIState:r,redirectToVendorDetailPage:m,fetchFluxViewOnScroll:u,onFetchReimbursementView:x})=>{const{fetchStatus:y,reviewOperatingExpensesIds:w,uiState:b}=n,C=s.useRef(null),I=s.useRef(!1),f=Kt({mode:"all",reValidateMode:"onChange",resetOptions:{keepDefaultValues:!0},defaultValues:xu(w)}),$=Se();s.useEffect(()=>()=>{p("expenseAutomationPage")},[p]),s.useEffect(()=>{I.current&&C?.current?.scrollLeft!=null&&b.scrollPosition?.scrollLeft!==C.current.scrollLeft&&b.scrollPosition!=null&&r({scrollPosition:{scrollTop:b.scrollPosition?.scrollTop,scrollLeft:C.current.scrollLeft}})},[b.scrollPosition?.scrollLeft,C.current?.scrollLeft,b.scrollPosition,r]),s.useEffect(()=>{p(w.length>0?"expenseAutomationFluxPage":"expenseAutomationPage")},[w,p]);const E=j=>{m(j)},L=j=>{u(e,j)},B=(j,A)=>{r({sortOrder:j,sortKey:A}),d(),x(e,null,!1)},S=()=>{const j=Ys(n.sections,w);c(w,j===!0?"review":"unreview",e,!0)};if(y.fetchState==="Error")return t.jsxs(yu,{children:[t.jsx(Cu,{onClick:h,children:t.jsx(ko,{})}),t.jsx(wu,{children:mu.failed})]});{const j=T=>{r({collapsableStatus:T})},A=T=>{x(e,T,!0)};return t.jsx(Jt,{...f,children:t.jsx("form",{id:ka(pu),onSubmit:f.handleSubmit(S),style:{height:"100%",width:"100%"},children:t.jsx(fu,{windowSize:$,children:t.jsx(hu,{fluxView:n,handleRedirectToVendorDetailPage:E,onSortOrderChanged:B,updateOperatingExpensesIdsForReview:i,updateNodeCollapsableStatus:j,fetchReimbursementView:A,updateSectionIdsForReview:l,fetchGeneralExpenseView:L,reportId:"flux_analysis_operating_expense"})})})})}},Ys=(e,n)=>{const d=[...e.generalExpense.vendors,...e.reimbursement.vendors].filter(h=>h.status==="Pending Review");let c;return d.forEach(h=>{n.includes(h.fluxAnalysisEntityId)&&(c=!0)}),c},xu=e=>({fluxAnalysisRowIds:e}),fu=a.div`
775
775
  display: flex;
776
776
  flex: 1 1 auto;
777
777
  min-height: 100%;
@@ -842,13 +842,13 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
842
842
  color: ${e=>e.theme.colors.brandColorSapphire};
843
843
  `,Eu=a(Fe)`
844
844
  color: ${e=>e.theme.colors.primary};
845
- `,{jeSchedules:{scheduleDetails:{scheduleTransactionsHeader:{addVendor:xi}}},expenseAutomation:{jeSchedules:ze},common:{currency:dt,retry:Du,strings:{hyphen:Ve,empty:fi},texts:en},dateFormat:yi}=je.getLocalizedStrings(),{common:Ou,timeframe:{month:Ci}}=je.getLocalizedStrings(),tt="jeSchedulePage",wi=e=>`${e}_form`,Po=(e,n)=>`${e}.${n}`,bi=Po(tt,"vendor"),vi=Po(tt,"scheduleExpenseCategory"),Si=Po(tt,"accumulatedDepreciationCategory"),Bu=({allAccountGroupedOptions:e,allAccountList:n,allClassGroupedOptions:d,allClassList:c,allDepAccountGroupedOptions:h,allDepAccountList:p,draft:i,localData:l,postStatus:r,uncategorizedAccounts:m,vendorSearchAutoCompleteActions:u,vendorSearchAutoCompleteData:x,jeScheduleClickHandler:y,onFormDataChange:w,onPostJESchedule:b})=>{const{updatedAccumulatedDepreciationCategoryID:C,updatedCategoryId:I,updatedVendor:f}=l,$={vendor_deleted:"updatedVendor",debit_category_deleted:"updatedCategoryId",credit_category_deleted:"updatedAccumulatedDepreciationCategoryID",qbo_authorization_error:"jeScheduleID",qbo_book_close_date_error:"jeScheduleID",qbo_error:"jeScheduleID",qbo_invalid_company_status_error:"jeScheduleID"},E=s.useRef(),L=Kt({mode:"all",reValidateMode:"onChange",defaultValues:ji(l,e,d,h,n,c,p,x.entityAutoCompleteView),values:ji(l,e,d,h,n,c,p,x.entityAutoCompleteView)}),B={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:o.sp4}),menu:()=>({width:300})},S={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:o.sp4}),menu:()=>({width:350})},j=(i?.scheduledJournalEntry.error??[]).every(k=>{const O=$[k];return!(l!=null&&O&&(O==="updatedAccumulatedDepreciationCategoryID"&&l.updatedAccumulatedDepreciationCategoryID==null||O==="updatedCategoryId"&&l.updatedCategoryId==null||O==="updatedVendor"&&(l.updatedVendor?.id==null||l.updatedVendor?.id===""||l.updatedVendor?.name==null||l.updatedVendor?.name==="")))}),A=async(k,O)=>{if(k!=null){const U=O[tt],{scheduledJournalEntryID:oe,vendor:R}=U;if(k.includes("vendor")){const ne=R?.defaultOptions.map(N=>N.value);if(R?.selectedOption!=null&&ne?.includes(R.selectedOption)!==!0){const N=x.entityAutoCompleteView.vendor.find(J=>J.id===R.selectedOption);N!=null&&L.setValue(`${tt}.vendor.defaultOptions`,[{label:N.name??Ou.strings.empty,value:N.id}])}else R?.selectedOption==null&&R?.defaultOptions.length!==0&&L.setValue(`${tt}.vendor`,{selectedOption:void 0,defaultOptions:[]})}w(oe,{...U,vendor:R})}};s.useEffect(()=>{const k=L.watch((O,{name:U})=>{U!=null&&O!=null&&yn(()=>A(U,O))});return()=>{k.unsubscribe()}}),s.useEffect(()=>{x.entityAutoCompleteView.fetchState==="Completed"&&E.current?.(bs(x.entityAutoCompleteView))},[x.entityAutoCompleteView.fetchState]);const T=L.handleSubmit(()=>{b(i.scheduledJournalEntry.scheduledJournalEntryID,i.jeScheduleTransactionKey)}),W=k=>n.filter(O=>O.qboId===k)[0]?.qboId,F=k=>p.filter(O=>O.qboId===k)[0]?.qboId,H=k=>[m.expense?.qboId,m.income?.qboId].includes(k),V=L.watch("jeSchedulePage.vendor"),K=(k,O)=>{u.onAutoCompleteInputChange?.(k,"vendor"),E.current=O},Z=i.scheduledJournalEntry.error?.includes("vendor_deleted")===!0,q=i.scheduledJournalEntry.error?.includes("debit_category_deleted")===!0,M=i.scheduledJournalEntry.error?.includes("credit_category_deleted")===!0,re=i.vendor.name.split("(deleted)")[0]?.toString(),Ce=i.jeDebit.account?.accountName.split("(deleted)")?.[0]?.toString()??fi,Q=i.jeCredit.account?.accountName.split("(deleted)")[0]?.toString()??fi,[G,me]=s.useState(q===!0&&I==null),[_,D]=s.useState(M===!0&&C==null),[Y,P]=s.useState(Z&&(f?.id==null||f?.id==""));return s.useEffect(()=>{G===!1&&l.updatedCategoryId==null&&L.setFocus(vi),_===!1&&l.updatedAccumulatedDepreciationCategoryID==null&&L.setFocus(Si),Y===!1&&l.updatedVendor?.id==null&&L.setFocus(bi)},[G,_,Y,l,L]),t.jsx(Jt,{...L,children:t.jsx("form",{style:{width:"100%"},id:wi(`${tt}_${i.jeScheduleId}`),onSubmit:T,children:t.jsx(Mo,{showBorder:j,onClick:k=>{i.jeScheduleType!=null&&i.jeScheduleId!=null&&y(k,i.jeScheduleId,i.jeScheduleTransactionKey,i.jeScheduleType)},"data-testid":z("je-schedule-resolve-component-schedule",`${tt}_${i.jeScheduleId}`),children:t.jsxs(Fo,{children:[t.jsxs(_o,{children:[t.jsxs(Oo,{children:[Z===!0?t.jsx(X,{style:{width:he.COLUMN_ONE,padding:g[0],justifyContent:"center"},showHoverEffect:Z,forceHoverEffect:Y===!1&&(l?.updatedVendor?.id==null||l?.updatedVendor?.id==""),children:t.jsxs(ut,{className:"hover-background",style:{padding:`${o.sp2} ${o.sp3}`},children:[t.jsxs(te,{style:{display:"flex",alignItems:"center",gap:g[1]},children:[en.vendor,t.jsx(fe,{display:"flex",placement:"top-start",title:t.jsx(En,{children:ze.tooltipText.missingVendor.replace("_deleted_vendor_",re)}),children:t.jsx(Gn,{})})]}),t.jsx(se,{style:{gap:g[3],marginLeft:-2},className:"item-value-container",children:t.jsx(t.Fragment,{children:Y===!0?t.jsxs(de,{onClick:k=>{k.stopPropagation(),P(!1)},"data-testid":z("je-schedule-resolve-component-add-vendor-button",`${tt}_${i.jeScheduleId}`),style:{display:"inline-flex",alignItems:"center",gap:g[2],color:Ge.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(Yn,{}),xi]}):t.jsx(yo,{name:bi,placeholder:xi,valueToId:k=>k,defaultValue:{selectedOption:V?.selectedOption,defaultOptions:V?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:o.sp4})},registerOptions:{required:!0,validate:k=>!!k.selectedOption},loadOptions:K})})})]})}):t.jsxs(X,{style:{width:he.COLUMN_ONE,padding:`${o.sp2} ${o.sp0} ${o.sp2} ${o.sp3}`},children:[t.jsx(te,{children:en.vendor}),t.jsx(se,{children:t.jsxs(t.Fragment,{children:[i.vendor.logo?.href!=null?t.jsx(ws,{photoUrl:i.vendor.logo.href,styles:{width:g[4],height:g[4]}}):t.jsx(mn,{name:i.vendor.name}),t.jsx(fe,{display:"block",placement:"bottom",style:{width:"100%"},title:i.vendor.name!==null?t.jsx(He,{children:i.vendor.name}):t.jsx(t.Fragment,{}),children:t.jsx(de,{className:"highlight",children:i.vendor.name??Ve})})]})})]}),t.jsxs(X,{children:[t.jsx(te,{children:ze.scheduleHeaders.scheduleCategory}),t.jsx(se,{children:t.jsx(fe,{display:"block",placement:"bottom",style:{width:"100%"},title:i.baseTransaction.account.accountName!=null?t.jsx(He,{children:i.baseTransaction.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(de,{className:"highlight",children:i.baseTransaction.account.accountName??Ve})})})]}),t.jsxs(X,{style:{width:he.COLUMN_THREE},children:[t.jsx(te,{children:ze.scheduleHeaders.startMonth}),t.jsx(se,{children:t.jsx(de,{className:"highlight",children:i.startDate?.format(yi.visual.MMMCommaYYYYFormat)??Ve})})]}),t.jsxs(X,{style:{width:he.COLUMN_FOUR,paddingLeft:g[3]},children:[t.jsx(te,{children:ze.scheduleHeaders.period}),t.jsx(se,{children:t.jsx(de,{className:"highlight",children:i.period!=null?`${i.period} ${i.period===1?Ci.slice(0,-1):Ci}`:Ve})})]}),t.jsxs(X,{style:{alignItems:"flex-end",width:he.COLUMN_FIVE},children:[t.jsx(te,{children:en.totalAmount}),t.jsx(se,{children:t.jsx(fe,{display:"block",placement:"bottom",title:t.jsx(He,{children:We("0,0.[00]",Ht(i.baseTransaction.amount.amount,dt.currencyCode,dt.currencySymbol))??Ve}),children:t.jsx(de,{className:"highlight",children:We("0,0.[00]",Ht(i.baseTransaction.amount.amount,dt.currencyCode,dt.currencySymbol))??Ve})})})]})]}),t.jsxs(Bo,{children:[q===!0?t.jsx(X,{showHoverEffect:q===!0,forceHoverEffect:l?.updatedCategoryId==null&&G===!1,style:{padding:"unset",justifyContent:"center",width:he.COLUMN_ONE},children:t.jsxs(ut,{className:"hover-background",children:[t.jsxs(te,{style:{display:"flex",alignItems:"center",gap:g[1]},children:[en.category,q===!0?t.jsx(fe,{display:"flex",placement:"top-start",title:t.jsx(En,{children:ze.tooltipText.missingCategory.replace("_deleted_category_",Ce)}),children:t.jsx(Gn,{})}):null]}),t.jsx(se,{className:"item-value-container",style:{marginLeft:q===!0?-2:0},children:q===!0?t.jsx(t.Fragment,{children:G===!0?t.jsxs(de,{onClick:k=>{k.stopPropagation(),me(!1)},style:{display:"inline-flex",alignItems:"center",gap:g[1],color:Ge.brandColorGoldDark,cursor:"pointer"},"data-testid":z("je-schedule-resolve-component-add-category-button",`${tt}_${i.jeScheduleId}`),children:[t.jsx(Yn,{}),ze.addCategory]}):t.jsx(on,{shouldShowChevronIcon:!1,name:vi,placeholder:ze.addCategory,valueToId:k=>W(k),defaultValue:{allOptions:e},registerOptions:{required:!0,validate:k=>!!k.selectedOption},disableCurrentOption:H,customStyleConfig:B})}):t.jsx(fe,{display:"block",placement:"bottom",style:{width:"100%"},title:i.jeDebit.account?.accountName!=null?t.jsx(He,{children:i.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(de,{className:"highlight",children:i.jeDebit.account?.accountName??Ve})})})]})}):t.jsxs(X,{style:{width:he.COLUMN_ONE,padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(te,{style:{display:"flex",alignItems:"center",gap:g[1]},children:en.category}),t.jsx(se,{className:"item-value-container",children:t.jsx(fe,{display:"block",placement:"bottom",style:{width:"100%"},title:i.jeDebit.account?.accountName!=null?t.jsx(He,{children:i.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(de,{className:"highlight",children:i.jeDebit.account?.accountName??Ve})})})]}),t.jsxs(X,{children:[t.jsx(te,{style:{display:"flex",alignItems:"center",gap:g[1]},children:en.classText}),t.jsx(se,{children:t.jsx(fe,{display:"block",placement:"bottom",style:{width:"100%"},title:i.jeDebit.accountingClass?.className!=null?t.jsx(He,{children:i.jeDebit.accountingClass.className}):t.jsx(t.Fragment,{}),children:t.jsx(de,{className:"highlight",children:i.jeDebit.accountingClass?.className??Ve})})})]}),t.jsxs(X,{style:{width:he.COLUMN_THREE},children:[t.jsx(te,{children:ze.scheduleHeaders.type}),t.jsx(se,{className:"test",children:t.jsx(de,{className:"highlight",style:{width:"unset"},children:t.jsx(Hs,{children:ze.scheduleTypes[i.jeScheduleType??"prepaid_expenses"]})})})]}),i.jeScheduleType==="fixed_assets"?t.jsx(t.Fragment,{children:M===!0?t.jsx(X,{style:{width:he.COLUMN_FOUR,padding:"unset",justifyContent:"center"},showHoverEffect:M,forceHoverEffect:l.updatedAccumulatedDepreciationCategoryID==null&&_===!1,children:t.jsxs(ut,{className:"hover-background",style:{padding:g[2],paddingLeft:g[3]},children:[t.jsxs(te,{style:{display:"flex",alignItems:"center",gap:g[1]},children:[ze.scheduleHeaders.accumulatedCategory,M===!0?t.jsx(fe,{display:"flex",placement:"top-end",title:t.jsx(En,{children:ze.tooltipText.missingDepCategory.replace("_deleted_dep_category_",Q)}),children:t.jsx(Gn,{})}):null]}),t.jsx(se,{className:"item-value-container",style:{marginLeft:M===!0?-2:0},children:M===!0?t.jsx(t.Fragment,{children:_===!0?t.jsxs(de,{onClick:k=>{k.stopPropagation(),D(!1)},style:{display:"inline-flex",alignItems:"center",gap:g[1],color:Ge.brandColorGoldDark,cursor:"pointer"},"data-testid":z("je-schedule-resolve-component-add-depreciation-category-button",`${tt}_${i.jeScheduleId}`),children:[t.jsx(Yn,{}),ze.addDepCategory]}):t.jsx(on,{shouldShowChevronIcon:!1,showDownChevronWithValue:!1,name:Si,placeholder:ze.addDepCategory,valueToId:k=>F(k),defaultValue:{allOptions:h},registerOptions:{required:!0,validate:k=>!!k.selectedOption},customStyleConfig:S,disableCurrentOption:H})}):t.jsx(fe,{display:"block",placement:"bottom",title:i.jeCredit.account?.accountName!=null?t.jsx(He,{children:i.jeCredit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(de,{className:"highlight",children:i.jeCredit.account?.accountName??Ve})})})]})}):t.jsxs(X,{style:{width:he.COLUMN_FOUR,padding:`${o.sp2} ${o.sp2} ${o.sp2} ${o.sp3}`,justifyContent:"center"},children:[t.jsx(te,{style:{display:"flex",alignItems:"center",gap:g[1]},children:ze.scheduleHeaders.accumulatedCategory}),t.jsx(fe,{display:"block",placement:"bottom",title:i.jeCredit.account?.accountName!=null?t.jsx(He,{children:i.jeCredit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(de,{className:"highlight",children:i.jeCredit.account?.accountName??Ve})})]})}):null,i.jeScheduleType!=="fixed_assets"?t.jsx(X,{style:{width:he.COLUMN_FOUR}}):null,t.jsx(X,{style:{width:he.COLUMN_FIVE}})]}),t.jsxs(Yc,{children:[t.jsx(X,{style:{padding:"unset",width:he.COLUMN_ONE},children:t.jsxs(Gc,{children:[t.jsx(te,{children:ze.scheduleHeaders.jePostingDate}),t.jsx(se,{children:t.jsx(de,{className:"highlight",children:i.scheduledJournalEntry.expectedPostDate.format(yi.visual.MMMDCommaYYFormat)??Ve})})]})}),t.jsxs(X,{children:[t.jsx(te,{children:ze.scheduleHeaders.balance}),t.jsx(se,{children:t.jsx(fe,{display:"block",placement:"bottom",style:{width:"100%"},title:t.jsx(He,{children:We("0,0.[00]",Ht(i?.scheduledJournalEntry?.runningBalance?.amount??0,dt.currencyCode,dt.currencySymbol))??Ve}),children:t.jsx(de,{className:"highlight",children:We("0,0.[00]",Ht(i?.scheduledJournalEntry?.runningBalance?.amount??0,dt.currencyCode,dt.currencySymbol))??Ve})})})]}),t.jsxs(X,{style:{width:he.COLUMN_THREE},children:[t.jsx(te,{children:ze.scheduleHeaders.months}),t.jsx(se,{children:t.jsxs(de,{className:"highlight",children:[i.scheduledJournalEntry.expectedPostDate.diff(i.startDate,"month")+1,"/",i.period]})})]}),t.jsx(X,{style:{width:he.COLUMN_FOUR}}),t.jsxs(X,{style:{alignItems:"flex-end",width:he.COLUMN_FIVE},children:[t.jsx(te,{children:ze.scheduleHeaders.amountForMonth}),t.jsx(se,{children:t.jsx(de,{className:"highlight",children:We("0,0.[00]",Ht(i.scheduledJournalEntry.amount?.amount??0,dt.currencyCode,dt.currencySymbol))??Ve})})]})]})]}),t.jsx(zo,{children:t.jsx(gn,{form:wi(`${tt}_${i.jeScheduleId}`),label:Du,variant:"primary",className:"item-value-container",type:"submit",loading:r?.fetchState==="In-Progress",size:"small",disabled:!j,style:{minWidth:wo}})})]})})})})},ji=(e,n,d,c,h,p,i,l)=>{const r=e.updatedCategoryId,m=e.updatedVendor,u=m!=null?l.vendor.find(I=>I.zeniId===m.id):void 0,x=e.updatedAccumulatedDepreciationCategoryID,y=e.updatedClassId,w=r!=null?h.find(I=>I.accountId===r):void 0,b=x!=null?i.find(I=>I.accountId===x):void 0,C=y!=null?p.find(I=>I.classId===y):void 0;return{[tt]:{jeScheduleID:e.jeScheduleID,scheduledJournalEntryID:e.scheduledJournalEntryID,jeScheduleType:e.jeScheduleType,scheduleExpenseCategory:{selectedOption:w?.qboId,allOptions:n},accumulatedDepreciationCategory:{selectedOption:b?.qboId,allOptions:c},vendor:{selectedOption:u?.id??m?.id,defaultOptions:Is(l,u??m)},scheduleClass:{selectedOption:C?.classId,allOptions:d}}}},Yn=a(Pn)`
845
+ `,{jeSchedules:{scheduleDetails:{scheduleTransactionsHeader:{addVendor:xi}}},expenseAutomation:{jeSchedules:ze},common:{currency:dt,retry:Du,strings:{hyphen:Ve,empty:fi},texts:en},dateFormat:yi}=je.getLocalizedStrings(),{common:Ou,timeframe:{month:Ci}}=je.getLocalizedStrings(),tt="jeSchedulePage",wi=e=>`${e}_form`,Po=(e,n)=>`${e}.${n}`,bi=Po(tt,"vendor"),vi=Po(tt,"scheduleExpenseCategory"),Si=Po(tt,"accumulatedDepreciationCategory"),Bu=({allAccountGroupedOptions:e,allAccountList:n,allClassGroupedOptions:d,allClassList:c,allDepAccountGroupedOptions:h,allDepAccountList:p,draft:i,localData:l,postStatus:r,uncategorizedAccounts:m,vendorSearchAutoCompleteActions:u,vendorSearchAutoCompleteData:x,jeScheduleClickHandler:y,onFormDataChange:w,onPostJESchedule:b})=>{const{updatedAccumulatedDepreciationCategoryID:C,updatedCategoryId:I,updatedVendor:f}=l,$={vendor_deleted:"updatedVendor",debit_category_deleted:"updatedCategoryId",credit_category_deleted:"updatedAccumulatedDepreciationCategoryID",qbo_authorization_error:"jeScheduleID",qbo_book_close_date_error:"jeScheduleID",qbo_error:"jeScheduleID",qbo_invalid_company_status_error:"jeScheduleID"},E=s.useRef(),L=Kt({mode:"all",reValidateMode:"onChange",defaultValues:ji(l,e,d,h,n,c,p,x.entityAutoCompleteView),values:ji(l,e,d,h,n,c,p,x.entityAutoCompleteView)}),B={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:o.sp4}),menu:()=>({width:300})},S={valueContainer:()=>({justifyContent:"flex-start",paddingLeft:0}),control:()=>({height:o.sp4}),menu:()=>({width:350})},j=(i?.scheduledJournalEntry.error??[]).every(k=>{const O=$[k];return!(l!=null&&O&&(O==="updatedAccumulatedDepreciationCategoryID"&&l.updatedAccumulatedDepreciationCategoryID==null||O==="updatedCategoryId"&&l.updatedCategoryId==null||O==="updatedVendor"&&(l.updatedVendor?.id==null||l.updatedVendor?.id===""||l.updatedVendor?.name==null||l.updatedVendor?.name==="")))}),A=async(k,O)=>{if(k!=null){const U=O[tt],{scheduledJournalEntryID:oe,vendor:R}=U;if(k.includes("vendor")){const ne=R?.defaultOptions.map(N=>N.value);if(R?.selectedOption!=null&&ne?.includes(R.selectedOption)!==!0){const N=x.entityAutoCompleteView.vendor.find(J=>J.id===R.selectedOption);N!=null&&L.setValue(`${tt}.vendor.defaultOptions`,[{label:N.name??Ou.strings.empty,value:N.id}])}else R?.selectedOption==null&&R?.defaultOptions.length!==0&&L.setValue(`${tt}.vendor`,{selectedOption:void 0,defaultOptions:[]})}w(oe,{...U,vendor:R})}};s.useEffect(()=>{const k=L.watch((O,{name:U})=>{U!=null&&O!=null&&yn(()=>A(U,O))});return()=>{k.unsubscribe()}}),s.useEffect(()=>{x.entityAutoCompleteView.fetchState==="Completed"&&E.current?.(bs(x.entityAutoCompleteView))},[x.entityAutoCompleteView.fetchState]);const T=L.handleSubmit(()=>{b(i.scheduledJournalEntry.scheduledJournalEntryID,i.jeScheduleTransactionKey)}),W=k=>n.filter(O=>O.qboId===k)[0]?.qboId,F=k=>p.filter(O=>O.qboId===k)[0]?.qboId,H=k=>[m.expense?.qboId,m.income?.qboId].includes(k),V=L.watch("jeSchedulePage.vendor"),K=(k,O)=>{u.onAutoCompleteInputChange?.(k,"vendor"),E.current=O},G=i.scheduledJournalEntry.error?.includes("vendor_deleted")===!0,q=i.scheduledJournalEntry.error?.includes("debit_category_deleted")===!0,M=i.scheduledJournalEntry.error?.includes("credit_category_deleted")===!0,re=i.vendor.name.split("(deleted)")[0]?.toString(),Ce=i.jeDebit.account?.accountName.split("(deleted)")?.[0]?.toString()??fi,Q=i.jeCredit.account?.accountName.split("(deleted)")[0]?.toString()??fi,[Y,me]=s.useState(q===!0&&I==null),[_,D]=s.useState(M===!0&&C==null),[Z,P]=s.useState(G&&(f?.id==null||f?.id==""));return s.useEffect(()=>{Y===!1&&l.updatedCategoryId==null&&L.setFocus(vi),_===!1&&l.updatedAccumulatedDepreciationCategoryID==null&&L.setFocus(Si),Z===!1&&l.updatedVendor?.id==null&&L.setFocus(bi)},[Y,_,Z,l,L]),t.jsx(Jt,{...L,children:t.jsx("form",{style:{width:"100%"},id:wi(`${tt}_${i.jeScheduleId}`),onSubmit:T,children:t.jsx(Mo,{showBorder:j,onClick:k=>{i.jeScheduleType!=null&&i.jeScheduleId!=null&&y(k,i.jeScheduleId,i.jeScheduleTransactionKey,i.jeScheduleType)},"data-testid":z("je-schedule-resolve-component-schedule",`${tt}_${i.jeScheduleId}`),children:t.jsxs(Fo,{children:[t.jsxs(_o,{children:[t.jsxs(Oo,{children:[G===!0?t.jsx(X,{style:{width:he.COLUMN_ONE,padding:g[0],justifyContent:"center"},showHoverEffect:G,forceHoverEffect:Z===!1&&(l?.updatedVendor?.id==null||l?.updatedVendor?.id==""),children:t.jsxs(ut,{className:"hover-background",style:{padding:`${o.sp2} ${o.sp3}`},children:[t.jsxs(te,{style:{display:"flex",alignItems:"center",gap:g[1]},children:[en.vendor,t.jsx(fe,{display:"flex",placement:"top-start",title:t.jsx(En,{children:ze.tooltipText.missingVendor.replace("_deleted_vendor_",re)}),children:t.jsx(Yn,{})})]}),t.jsx(se,{style:{gap:g[3],marginLeft:-2},className:"item-value-container",children:t.jsx(t.Fragment,{children:Z===!0?t.jsxs(de,{onClick:k=>{k.stopPropagation(),P(!1)},"data-testid":z("je-schedule-resolve-component-add-vendor-button",`${tt}_${i.jeScheduleId}`),style:{display:"inline-flex",alignItems:"center",gap:g[2],color:Ye.brandColorGoldDark,cursor:"pointer"},children:[t.jsx(Zn,{}),xi]}):t.jsx(yo,{name:bi,placeholder:xi,valueToId:k=>k,defaultValue:{selectedOption:V?.selectedOption,defaultOptions:V?.defaultOptions??[]},style:{width:"100%"},customStyleConfig:{valueContainer:()=>({justifyContent:"flex-start"}),control:()=>({height:o.sp4})},registerOptions:{required:!0,validate:k=>!!k.selectedOption},loadOptions:K})})})]})}):t.jsxs(X,{style:{width:he.COLUMN_ONE,padding:`${o.sp2} ${o.sp0} ${o.sp2} ${o.sp3}`},children:[t.jsx(te,{children:en.vendor}),t.jsx(se,{children:t.jsxs(t.Fragment,{children:[i.vendor.logo?.href!=null?t.jsx(ws,{photoUrl:i.vendor.logo.href,styles:{width:g[4],height:g[4]}}):t.jsx(mn,{name:i.vendor.name}),t.jsx(fe,{display:"block",placement:"bottom",style:{width:"100%"},title:i.vendor.name!==null?t.jsx(He,{children:i.vendor.name}):t.jsx(t.Fragment,{}),children:t.jsx(de,{className:"highlight",children:i.vendor.name??Ve})})]})})]}),t.jsxs(X,{children:[t.jsx(te,{children:ze.scheduleHeaders.scheduleCategory}),t.jsx(se,{children:t.jsx(fe,{display:"block",placement:"bottom",style:{width:"100%"},title:i.baseTransaction.account.accountName!=null?t.jsx(He,{children:i.baseTransaction.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(de,{className:"highlight",children:i.baseTransaction.account.accountName??Ve})})})]}),t.jsxs(X,{style:{width:he.COLUMN_THREE},children:[t.jsx(te,{children:ze.scheduleHeaders.startMonth}),t.jsx(se,{children:t.jsx(de,{className:"highlight",children:i.startDate?.format(yi.visual.MMMCommaYYYYFormat)??Ve})})]}),t.jsxs(X,{style:{width:he.COLUMN_FOUR,paddingLeft:g[3]},children:[t.jsx(te,{children:ze.scheduleHeaders.period}),t.jsx(se,{children:t.jsx(de,{className:"highlight",children:i.period!=null?`${i.period} ${i.period===1?Ci.slice(0,-1):Ci}`:Ve})})]}),t.jsxs(X,{style:{alignItems:"flex-end",width:he.COLUMN_FIVE},children:[t.jsx(te,{children:en.totalAmount}),t.jsx(se,{children:t.jsx(fe,{display:"block",placement:"bottom",title:t.jsx(He,{children:We("0,0.[00]",Ht(i.baseTransaction.amount.amount,dt.currencyCode,dt.currencySymbol))??Ve}),children:t.jsx(de,{className:"highlight",children:We("0,0.[00]",Ht(i.baseTransaction.amount.amount,dt.currencyCode,dt.currencySymbol))??Ve})})})]})]}),t.jsxs(Bo,{children:[q===!0?t.jsx(X,{showHoverEffect:q===!0,forceHoverEffect:l?.updatedCategoryId==null&&Y===!1,style:{padding:"unset",justifyContent:"center",width:he.COLUMN_ONE},children:t.jsxs(ut,{className:"hover-background",children:[t.jsxs(te,{style:{display:"flex",alignItems:"center",gap:g[1]},children:[en.category,q===!0?t.jsx(fe,{display:"flex",placement:"top-start",title:t.jsx(En,{children:ze.tooltipText.missingCategory.replace("_deleted_category_",Ce)}),children:t.jsx(Yn,{})}):null]}),t.jsx(se,{className:"item-value-container",style:{marginLeft:q===!0?-2:0},children:q===!0?t.jsx(t.Fragment,{children:Y===!0?t.jsxs(de,{onClick:k=>{k.stopPropagation(),me(!1)},style:{display:"inline-flex",alignItems:"center",gap:g[1],color:Ye.brandColorGoldDark,cursor:"pointer"},"data-testid":z("je-schedule-resolve-component-add-category-button",`${tt}_${i.jeScheduleId}`),children:[t.jsx(Zn,{}),ze.addCategory]}):t.jsx(on,{shouldShowChevronIcon:!1,name:vi,placeholder:ze.addCategory,valueToId:k=>W(k),defaultValue:{allOptions:e},registerOptions:{required:!0,validate:k=>!!k.selectedOption},disableCurrentOption:H,customStyleConfig:B})}):t.jsx(fe,{display:"block",placement:"bottom",style:{width:"100%"},title:i.jeDebit.account?.accountName!=null?t.jsx(He,{children:i.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(de,{className:"highlight",children:i.jeDebit.account?.accountName??Ve})})})]})}):t.jsxs(X,{style:{width:he.COLUMN_ONE,padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(te,{style:{display:"flex",alignItems:"center",gap:g[1]},children:en.category}),t.jsx(se,{className:"item-value-container",children:t.jsx(fe,{display:"block",placement:"bottom",style:{width:"100%"},title:i.jeDebit.account?.accountName!=null?t.jsx(He,{children:i.jeDebit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(de,{className:"highlight",children:i.jeDebit.account?.accountName??Ve})})})]}),t.jsxs(X,{children:[t.jsx(te,{style:{display:"flex",alignItems:"center",gap:g[1]},children:en.classText}),t.jsx(se,{children:t.jsx(fe,{display:"block",placement:"bottom",style:{width:"100%"},title:i.jeDebit.accountingClass?.className!=null?t.jsx(He,{children:i.jeDebit.accountingClass.className}):t.jsx(t.Fragment,{}),children:t.jsx(de,{className:"highlight",children:i.jeDebit.accountingClass?.className??Ve})})})]}),t.jsxs(X,{style:{width:he.COLUMN_THREE},children:[t.jsx(te,{children:ze.scheduleHeaders.type}),t.jsx(se,{className:"test",children:t.jsx(de,{className:"highlight",style:{width:"unset"},children:t.jsx(Hs,{children:ze.scheduleTypes[i.jeScheduleType??"prepaid_expenses"]})})})]}),i.jeScheduleType==="fixed_assets"?t.jsx(t.Fragment,{children:M===!0?t.jsx(X,{style:{width:he.COLUMN_FOUR,padding:"unset",justifyContent:"center"},showHoverEffect:M,forceHoverEffect:l.updatedAccumulatedDepreciationCategoryID==null&&_===!1,children:t.jsxs(ut,{className:"hover-background",style:{padding:g[2],paddingLeft:g[3]},children:[t.jsxs(te,{style:{display:"flex",alignItems:"center",gap:g[1]},children:[ze.scheduleHeaders.accumulatedCategory,M===!0?t.jsx(fe,{display:"flex",placement:"top-end",title:t.jsx(En,{children:ze.tooltipText.missingDepCategory.replace("_deleted_dep_category_",Q)}),children:t.jsx(Yn,{})}):null]}),t.jsx(se,{className:"item-value-container",style:{marginLeft:M===!0?-2:0},children:M===!0?t.jsx(t.Fragment,{children:_===!0?t.jsxs(de,{onClick:k=>{k.stopPropagation(),D(!1)},style:{display:"inline-flex",alignItems:"center",gap:g[1],color:Ye.brandColorGoldDark,cursor:"pointer"},"data-testid":z("je-schedule-resolve-component-add-depreciation-category-button",`${tt}_${i.jeScheduleId}`),children:[t.jsx(Zn,{}),ze.addDepCategory]}):t.jsx(on,{shouldShowChevronIcon:!1,showDownChevronWithValue:!1,name:Si,placeholder:ze.addDepCategory,valueToId:k=>F(k),defaultValue:{allOptions:h},registerOptions:{required:!0,validate:k=>!!k.selectedOption},customStyleConfig:S,disableCurrentOption:H})}):t.jsx(fe,{display:"block",placement:"bottom",title:i.jeCredit.account?.accountName!=null?t.jsx(He,{children:i.jeCredit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(de,{className:"highlight",children:i.jeCredit.account?.accountName??Ve})})})]})}):t.jsxs(X,{style:{width:he.COLUMN_FOUR,padding:`${o.sp2} ${o.sp2} ${o.sp2} ${o.sp3}`,justifyContent:"center"},children:[t.jsx(te,{style:{display:"flex",alignItems:"center",gap:g[1]},children:ze.scheduleHeaders.accumulatedCategory}),t.jsx(fe,{display:"block",placement:"bottom",title:i.jeCredit.account?.accountName!=null?t.jsx(He,{children:i.jeCredit.account.accountName}):t.jsx(t.Fragment,{}),children:t.jsx(de,{className:"highlight",children:i.jeCredit.account?.accountName??Ve})})]})}):null,i.jeScheduleType!=="fixed_assets"?t.jsx(X,{style:{width:he.COLUMN_FOUR}}):null,t.jsx(X,{style:{width:he.COLUMN_FIVE}})]}),t.jsxs(Zc,{children:[t.jsx(X,{style:{padding:"unset",width:he.COLUMN_ONE},children:t.jsxs(Yc,{children:[t.jsx(te,{children:ze.scheduleHeaders.jePostingDate}),t.jsx(se,{children:t.jsx(de,{className:"highlight",children:i.scheduledJournalEntry.expectedPostDate.format(yi.visual.MMMDCommaYYFormat)??Ve})})]})}),t.jsxs(X,{children:[t.jsx(te,{children:ze.scheduleHeaders.balance}),t.jsx(se,{children:t.jsx(fe,{display:"block",placement:"bottom",style:{width:"100%"},title:t.jsx(He,{children:We("0,0.[00]",Ht(i?.scheduledJournalEntry?.runningBalance?.amount??0,dt.currencyCode,dt.currencySymbol))??Ve}),children:t.jsx(de,{className:"highlight",children:We("0,0.[00]",Ht(i?.scheduledJournalEntry?.runningBalance?.amount??0,dt.currencyCode,dt.currencySymbol))??Ve})})})]}),t.jsxs(X,{style:{width:he.COLUMN_THREE},children:[t.jsx(te,{children:ze.scheduleHeaders.months}),t.jsx(se,{children:t.jsxs(de,{className:"highlight",children:[i.scheduledJournalEntry.expectedPostDate.diff(i.startDate,"month")+1,"/",i.period]})})]}),t.jsx(X,{style:{width:he.COLUMN_FOUR}}),t.jsxs(X,{style:{alignItems:"flex-end",width:he.COLUMN_FIVE},children:[t.jsx(te,{children:ze.scheduleHeaders.amountForMonth}),t.jsx(se,{children:t.jsx(de,{className:"highlight",children:We("0,0.[00]",Ht(i.scheduledJournalEntry.amount?.amount??0,dt.currencyCode,dt.currencySymbol))??Ve})})]})]})]}),t.jsx(zo,{children:t.jsx(gn,{form:wi(`${tt}_${i.jeScheduleId}`),label:Du,variant:"primary",className:"item-value-container",type:"submit",loading:r?.fetchState==="In-Progress",size:"small",disabled:!j,style:{minWidth:wo}})})]})})})})},ji=(e,n,d,c,h,p,i,l)=>{const r=e.updatedCategoryId,m=e.updatedVendor,u=m!=null?l.vendor.find(I=>I.zeniId===m.id):void 0,x=e.updatedAccumulatedDepreciationCategoryID,y=e.updatedClassId,w=r!=null?h.find(I=>I.accountId===r):void 0,b=x!=null?i.find(I=>I.accountId===x):void 0,C=y!=null?p.find(I=>I.classId===y):void 0;return{[tt]:{jeScheduleID:e.jeScheduleID,scheduledJournalEntryID:e.scheduledJournalEntryID,jeScheduleType:e.jeScheduleType,scheduleExpenseCategory:{selectedOption:w?.qboId,allOptions:n},accumulatedDepreciationCategory:{selectedOption:b?.qboId,allOptions:c},vendor:{selectedOption:u?.id??m?.id,defaultOptions:Is(l,u??m)},scheduleClass:{selectedOption:C?.classId,allOptions:d}}}},Zn=a(Pn)`
846
846
  width: ${o.sp3};
847
847
  height: ${o.sp3};
848
- `,Gn=a($s)`
848
+ `,Yn=a($s)`
849
849
  width: 12px;
850
850
  height: 12px;
851
- color: ${Ge.important};
851
+ color: ${Ye.important};
852
852
  `;function Qs(){return t.jsx(_s,{children:t.jsxs(Ps,{children:[t.jsxs(Ns,{children:[t.jsx(De,{width:g[9],height:27,style:{marginBottom:g[2]}}),t.jsx(ki,{})]}),t.jsxs(Vs,{children:[t.jsx(De,{width:g[9],height:27,style:{marginBottom:g[2]}}),t.jsx(ki,{})]})]})})}const ki=()=>t.jsx(Mo,{style:{minWidth:1088},children:t.jsxs(Fo,{children:[t.jsxs(_o,{children:[t.jsxs(Oo,{children:[t.jsxs(X,{style:{width:he.COLUMN_ONE,padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(te,{children:t.jsx(De,{width:g[10],height:14})}),t.jsxs(se,{style:{gap:g[2]},children:[t.jsx(Lo,{height:g[4],width:g[4]}),t.jsx(De,{height:g[4],width:g[10]})]})]}),t.jsxs(X,{children:[t.jsx(te,{children:t.jsx(De,{width:101,height:14})}),t.jsx(se,{children:t.jsx(De,{height:g[4],width:203})})]}),t.jsxs(X,{style:{width:he.COLUMN_THREE},children:[t.jsx(te,{children:t.jsx(De,{width:g[9],height:14})}),t.jsx(se,{children:t.jsx(De,{height:g[4],width:71})})]}),t.jsxs(X,{style:{width:he.COLUMN_FOUR,paddingLeft:g[3]},children:[t.jsx(te,{children:t.jsx(De,{width:107,height:14})}),t.jsx(De,{height:g[4],width:68})]}),t.jsxs(X,{style:{alignItems:"flex-end",width:he.COLUMN_FIVE},children:[t.jsx(te,{children:t.jsx(De,{width:73,height:14})}),t.jsx(se,{children:t.jsx(De,{height:g[4],width:49})})]})]}),t.jsxs(Bo,{children:[t.jsxs(X,{style:{width:he.COLUMN_ONE,padding:`${o.sp2} ${o.sp3}`},children:[t.jsx(te,{children:t.jsx(De,{width:49,height:14})}),t.jsx(se,{children:t.jsx(De,{height:g[4],width:158})})]}),t.jsxs(X,{children:[t.jsx(te,{children:t.jsx(De,{width:36,height:14})}),t.jsx(se,{children:t.jsx(De,{height:g[4],width:88})})]}),t.jsxs(X,{style:{width:he.COLUMN_THREE},children:[t.jsx(te,{children:t.jsx(De,{width:36,height:14})}),t.jsx(se,{children:t.jsx(De,{height:g[4],width:100})})]}),t.jsx(X,{style:{width:he.COLUMN_FOUR,paddingLeft:g[3]}}),t.jsx(X,{style:{width:he.COLUMN_FIVE}})]})]}),t.jsxs(zo,{children:[t.jsx(De,{height:29,width:53,style:{margin:`${o.sp0} ${o.sp3}`}}),t.jsx(De,{height:29,width:53,style:{margin:`${o.sp0} ${o.sp3}`}})]})]})}),De=a(Bt)`
853
853
  border-radius: ${o.sp1};
854
854
  `,{common:{create:Fu,resolve:Mu}}=je.getLocalizedStrings();function zu({jeSchedules:e,vendorSearchAutoCompleteData:n,handleJeScheduleClick:d,onJESchedulesFormDataChange:c,onPostJESchedule:h,ignoreRecommendedJeSchedule:p,vendorSearchAutoCompleteActions:i,setCurrentFooterFormId:l}){const r=e.draftSchedules,m=e.jeScheduleLocalDataById,u=e.postStatusById,x=e.ignoreStatusById,y=e.resolveSchedules,w=e.uncategorizedAccounts,{allAccountList:b,allClassList:C,allDepreciationAccountList:I}=e,f=Ot(e.accountListNestedAccountHierarchy),$=Ot(e.allDepreciationAccountListNestedAccountHierarchy),E=Rn(e.classListNestedAccountHierarchy),L=(S,j,A)=>{d(S,j,A)},B=(S,j,A,T)=>{let W=S.target;for(;W;){if(W.classList.contains("item-value-container")||W.classList.contains("hover-background")||W.classList.contains("auto-complete-single-select-field__input")||W.classList.contains("auto-complete-single-select-field__option")||W.classList.contains("grouped-single-select-field__input")||W.classList.contains("grouped-single-select-field__menu"))return;W=W.parentElement}d(j,A,T)};return s.useEffect(()=>{if(y.length!==0){for(const S in m)if(Object.prototype.hasOwnProperty.call(m,S)){const{updatedAccumulatedDepreciationCategoryID:j,updatedCategoryId:A,updatedVendor:T}=m[S];if(j!=null||A!=null||T!=null&&T?.id!==""){l("expenseAutomationJESchedulePage");break}else l("expenseAutomationPage")}}else y.length===0&&l("expenseAutomationPage")}),s.useEffect(()=>()=>{l("expenseAutomationPage")},[]),e.fetchState==="In-Progress"?t.jsx(Qs,{}):r.length!==0||y.length!==0?t.jsx(_s,{children:t.jsxs(Ps,{children:[r.length>0?t.jsxs(Ns,{children:[t.jsxs($i,{children:[Fu,t.jsx(Ti,{isCircular:r.length<10,children:t.jsx(Li,{children:r.length})})]}),t.jsx(Ii,{"data-testid":z("expense-automation","draft-je-schedules"),children:r.map((S,j)=>t.jsx(Lu,{ignoreStatus:x[S.jeScheduleTransactionKey],ignoreRecommendedJeSchedule:p,onReviewClickHandler:L,jeScheduleClickHandler:B,draft:S},`${j}_${S.jeScheduleId}`))})]}):null,y.length>0?t.jsxs(Vs,{children:[t.jsxs($i,{children:[Mu,t.jsx(Ti,{isCircular:y.length<10,children:t.jsx(Li,{children:y.length})})]}),t.jsx(Ii,{"data-testid":z("expense-automation","resolve-je-schedules"),children:y.map((S,j)=>m[S.scheduledJournalEntry.scheduledJournalEntryID]==null?null:t.jsx(Bu,{vendorSearchAutoCompleteActions:i,vendorSearchAutoCompleteData:n,jeScheduleClickHandler:B,onPostJESchedule:h,uncategorizedAccounts:w,allAccountList:b,allAccountGroupedOptions:f,allClassGroupedOptions:E,allClassList:C,allDepAccountGroupedOptions:$,allDepAccountList:I,draft:S,postStatus:u[S.scheduledJournalEntry.scheduledJournalEntryID],localData:m[S.scheduledJournalEntry.scheduledJournalEntryID],onFormDataChange:c},`${j}_${S.jeScheduleTransactionKey}`))})]}):null]})}):null}const Ii=a.div`
@@ -868,11 +868,11 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
868
868
  justify-content: center;
869
869
  border: ${e=>`1px solid ${e.theme.colors.grey1}`};
870
870
  color: ${e=>e.theme.colors.hero};
871
- ${e=>e.isCircular?Ye`
871
+ ${e=>e.isCircular?Ze`
872
872
  height: ${o.sp3};
873
873
  width: ${o.sp3};
874
874
  padding: ${o.sp0};
875
- `:Ye`
875
+ `:Ze`
876
876
  height: 18px;
877
877
  padding: ${sr.padding};
878
878
  `}
@@ -884,7 +884,7 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
884
884
  align-items: center;
885
885
  justify-content: center;
886
886
  color: inherit;
887
- `;function _u({expenseAutomationViewSelector:e,currentFooterFormId:n,setResetJeAccountSettingsForm:d,vendorSearchAutoCompleteData:c,onJESchedulesFormDataChange:h,onPostJESchedule:p,handleJeScheduleClick:i,onJeAccountSettingsChange:l,onSaveJeAccountSettingsClick:r,ignoreRecommendedJeSchedule:m,vendorSearchAutoCompleteActions:u,setCurrentFooterFormId:x,setIsJeAccountSettingsOpened:y}){const{jeSchedules:w}=e;return w.fetchState==="In-Progress"||w.accountSettingsView.fetchState==="In-Progress"?t.jsx(Qs,{}):w.accountSettingsView.fetchState==="Completed"&&w.accountSettingsView.accountSettingsLocalData.previousPrepaidExpensesAccount.length===0&&w.accountSettingsView.accountSettingsLocalData.previousFixedAssetsAccount.length===0?t.jsx(Su,{setIsJeAccountSettingsOpened:y,setResetJeAccountSettingsForm:d,currentFooterFormId:n,onJeAccountSettingsChange:l,onSaveJeAccountSettingsClick:r,accountSettings:w.accountSettingsView,setCurrentFooterFormId:x}):w.fetchState==="Completed"&&w.draftSchedules.length===0&&w.resolveSchedules.length===0?t.jsx(vt,{tab:e.currentSelectedView,title:Ne(e.currentSelectedView).allDoneText.title,subTitle:Ne(e.currentSelectedView).allDoneText.subTitle}):w.fetchState==="Completed"?t.jsx(zu,{setCurrentFooterFormId:x,handleJeScheduleClick:i,ignoreRecommendedJeSchedule:m,jeSchedules:e.jeSchedules,onJESchedulesFormDataChange:h,onPostJESchedule:p,vendorSearchAutoCompleteActions:u,vendorSearchAutoCompleteData:c}):null}const Pu=72,ea=50,Nu=1,Vu=["receipts"],Ai=e=>As(e,Vu),{common:{texts:{vendor:Hu,amount:Wu,receipts:Uu,category:qu,classText:Ku,date:Ju}}}=je.getLocalizedStrings(),Zu={key:"vendor",value:Hu,sortOrder:"ascending",width:new ee(18,18)},Yu={key:"category",value:qu,sortOrder:"ascending",width:new ee(18,18)},Gu={key:"class",value:Ku,sortOrder:"ascending",width:new ee(18,18)},Xu={key:"date",value:Ju,sortOrder:"descending",width:new ee(11,11)},Qu={key:"receipts",value:Uu,sortOrder:"descending",width:new ee(6,6)},eh={key:"amount",value:Wu,sortOrder:"ascending",width:new ee(10,10)},ht=[Zu,Yu,Gu,Xu,Qu,eh],Xn={sortKey:"date",sortOrder:"descending"},Ri={containerPaddingLeftRight:new ee(g[3],g[4])},ta=({sortConfig:e,isDisabled:n,onColumnSortConfigChanged:d})=>{const c=Se(),[h,p]=s.useState(ht);s.useEffect(()=>{const r=[...h];for(const m of r)m.key===e.sortKey?m.sortOrder=e.sortOrder:m.sortOrder="ascending";p(r)},[e.sortKey,e.sortOrder]);const i=(r,m)=>{let u=m;e.sortKey===r&&(u=m==="ascending"?"descending":"ascending"),d(r,u)},l=r=>{Ai(r.key)==null&&i(Rr(r.key),r.sortOrder)};return t.jsx(th,{windowSize:c,children:h.map((r,m)=>{const u=n!=null||Ai(r.key)!=null;return t.jsxs(nh,{sortDataValue:e.sortKey,actualDataValue:r.key,wrapperWidth:r.width,isSortDisabled:u,windowSize:c,isLastItem:m===h.length-1,style:r.key==="receipts"?{justifyContent:"center"}:void 0,children:[t.jsxs(rh,{onClick:()=>u?null:l(r),isSortDisabled:u,children:[t.jsx(lh,{children:r.value}),u?null:t.jsx(ih,{sortConfig:e,headerData:r,children:t.jsx(ah,{})})]}),u?null:t.jsx(sh,{isSortDisabled:u,sortDataValue:e.sortKey,isVisible:e.sortKey===r.key&&e.sortKey!==Xn.sortKey,children:t.jsx(oh,{onClick:()=>{u||i(Xn.sortKey,Xn.sortOrder)},"data-testid":z("missing-receipts-header-close-icon",r.key)})})]},r.key)})})},th=a.div`
887
+ `;function _u({expenseAutomationViewSelector:e,currentFooterFormId:n,setResetJeAccountSettingsForm:d,vendorSearchAutoCompleteData:c,onJESchedulesFormDataChange:h,onPostJESchedule:p,handleJeScheduleClick:i,onJeAccountSettingsChange:l,onSaveJeAccountSettingsClick:r,ignoreRecommendedJeSchedule:m,vendorSearchAutoCompleteActions:u,setCurrentFooterFormId:x,setIsJeAccountSettingsOpened:y}){const{jeSchedules:w}=e;return w.fetchState==="In-Progress"||w.accountSettingsView.fetchState==="In-Progress"?t.jsx(Qs,{}):w.accountSettingsView.fetchState==="Completed"&&w.accountSettingsView.accountSettingsLocalData.previousPrepaidExpensesAccount.length===0&&w.accountSettingsView.accountSettingsLocalData.previousFixedAssetsAccount.length===0?t.jsx(Su,{setIsJeAccountSettingsOpened:y,setResetJeAccountSettingsForm:d,currentFooterFormId:n,onJeAccountSettingsChange:l,onSaveJeAccountSettingsClick:r,accountSettings:w.accountSettingsView,setCurrentFooterFormId:x}):w.fetchState==="Completed"&&w.draftSchedules.length===0&&w.resolveSchedules.length===0?t.jsx(vt,{tab:e.currentSelectedView,title:Ne(e.currentSelectedView).allDoneText.title,subTitle:Ne(e.currentSelectedView).allDoneText.subTitle}):w.fetchState==="Completed"?t.jsx(zu,{setCurrentFooterFormId:x,handleJeScheduleClick:i,ignoreRecommendedJeSchedule:m,jeSchedules:e.jeSchedules,onJESchedulesFormDataChange:h,onPostJESchedule:p,vendorSearchAutoCompleteActions:u,vendorSearchAutoCompleteData:c}):null}const Pu=72,ea=50,Nu=1,Vu=["receipts"],Ai=e=>As(e,Vu),{common:{texts:{vendor:Hu,amount:Wu,receipts:Uu,category:qu,classText:Ku,date:Ju}}}=je.getLocalizedStrings(),Gu={key:"vendor",value:Hu,sortOrder:"ascending",width:new ee(18,18)},Zu={key:"category",value:qu,sortOrder:"ascending",width:new ee(18,18)},Yu={key:"class",value:Ku,sortOrder:"ascending",width:new ee(18,18)},Xu={key:"date",value:Ju,sortOrder:"descending",width:new ee(11,11)},Qu={key:"receipts",value:Uu,sortOrder:"descending",width:new ee(6,6)},eh={key:"amount",value:Wu,sortOrder:"ascending",width:new ee(10,10)},ht=[Gu,Zu,Yu,Xu,Qu,eh],Xn={sortKey:"date",sortOrder:"descending"},Ri={containerPaddingLeftRight:new ee(g[3],g[4])},ta=({sortConfig:e,isDisabled:n,onColumnSortConfigChanged:d})=>{const c=Se(),[h,p]=s.useState(ht);s.useEffect(()=>{const r=[...h];for(const m of r)m.key===e.sortKey?m.sortOrder=e.sortOrder:m.sortOrder="ascending";p(r)},[e.sortKey,e.sortOrder]);const i=(r,m)=>{let u=m;e.sortKey===r&&(u=m==="ascending"?"descending":"ascending"),d(r,u)},l=r=>{Ai(r.key)==null&&i(Rr(r.key),r.sortOrder)};return t.jsx(th,{windowSize:c,children:h.map((r,m)=>{const u=n!=null||Ai(r.key)!=null;return t.jsxs(nh,{sortDataValue:e.sortKey,actualDataValue:r.key,wrapperWidth:r.width,isSortDisabled:u,windowSize:c,isLastItem:m===h.length-1,style:r.key==="receipts"?{justifyContent:"center"}:void 0,children:[t.jsxs(rh,{onClick:()=>u?null:l(r),isSortDisabled:u,children:[t.jsx(lh,{children:r.value}),u?null:t.jsx(ih,{sortConfig:e,headerData:r,children:t.jsx(ah,{})})]}),u?null:t.jsx(sh,{isSortDisabled:u,sortDataValue:e.sortKey,isVisible:e.sortKey===r.key&&e.sortKey!==Xn.sortKey,children:t.jsx(oh,{onClick:()=>{u||i(Xn.sortKey,Xn.sortOrder)},"data-testid":z("missing-receipts-header-close-icon",r.key)})})]},r.key)})})},th=a.div`
888
888
  top: ${o.sp0};
889
889
  left: ${o.sp0};
890
890
  height: ${ea}px;
@@ -966,7 +966,7 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
966
966
  :last-of-type {
967
967
  padding-right: ${o.sp0};
968
968
  }
969
- `,xh=Ye`
969
+ `,xh=Ze`
970
970
  word-break: break-all;
971
971
  white-space: normal;
972
972
  -webkit-line-clamp: 1;
@@ -974,7 +974,7 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
974
974
  overflow: hidden;
975
975
  text-overflow: ellipsis;
976
976
  display: -webkit-box;
977
- `,fh=Ye`
977
+ `,fh=Ze`
978
978
  height: ${o.sp3};
979
979
  width: ${o.sp3};
980
980
  cursor: pointer;
@@ -1137,13 +1137,13 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
1137
1137
  `,Jh=a(jt)`
1138
1138
  color: ${e=>e.theme.colors.grey1};
1139
1139
  user-select: none;
1140
- `,Zh=a(xs)`
1140
+ `,Gh=a(xs)`
1141
1141
  color: ${e=>e.theme.colors.primary};
1142
- `,Yh=a.div`
1142
+ `,Zh=a.div`
1143
1143
  flex-direction: column;
1144
1144
  row-gap: ${o.sp3};
1145
1145
  display: flex;
1146
- `,Gh=Ro`
1146
+ `,Yh=Ro`
1147
1147
  0% {
1148
1148
  transform: translateX(100%);
1149
1149
  }
@@ -1158,7 +1158,7 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
1158
1158
  transform: translateX(100%)
1159
1159
  }
1160
1160
  `,Qh=a.div`
1161
- animation: ${e=>e.allThreadsSectionOpen?Gh:Xh}
1161
+ animation: ${e=>e.allThreadsSectionOpen?Yh:Xh}
1162
1162
  0.5s forwards;
1163
1163
  height: 100vh;
1164
1164
  position: fixed;
@@ -1167,7 +1167,7 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
1167
1167
  z-index: ${g[2]};
1168
1168
  min-width: ${ls}px;
1169
1169
  max-width: ${rs}px;
1170
- `,On="monthEndReportFormSection",Oi="monthEndReportPage",Je=je.getLocalizedStrings();function ep({companyId:e,enableZeniGPTFeature:n,monthEndReportView:d,previewMode:c,customerRequestData:h,allThreadsSectionOpen:p,filterMetaData:i,newThreadMetadata:l,isZeniUser:r,selectedPeriod:m,improveUsingZeniGPTClick:u,onRemoveFileAttachment:x,onUpdateFileAttachment:y,onCloseAllThreadsSection:w,previewMonthEndReport:b,saveMonthEndReport:C,onEditClick:I,onOpenFileAttachmentSnackBar:f,onClickCustomerRequest:$,sendMonthEndReport:E}){const L=St(),[B,S]=s.useState(),[j,A]=s.useState(0),[T,W]=s.useState(0),F=s.useRef(),H=s.useRef(null),V=s.useRef(null),{html:K,subject:Z,improveUsingZeniGPTStatus:q}=d,[M,re]=s.useState(),[Ce,Q]=s.useState(!1),[G,me]=s.useState(!1),_=s.useRef(null),D=s.useRef(null),Y=Ia(p,250),P=d.fetchState==="Not-Started"||d.fetchState==="In-Progress"||d.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||d.companyMonthEndReportTemplatesData.fetchState==="In-Progress",{threadsRefs:k,sortedThreads:O,threadsPositions:U,observer:oe,unresolvedThreadsMap:R,handleRemoveFloatingThread:ne}=$a(i,_,!c,P,r),N=s.useCallback(()=>{p?D.current!=null&&W(Math.min((D.current.offsetWidth-dn-g[4])/2,D.current.offsetWidth-dn-rs-g[4])):D.current!=null&&A(Math.min((D.current.offsetWidth-dn-g[4])/2,D.current.offsetWidth-dn-ls-g[4]))},[p]);s.useEffect(()=>{N()},[p,N]),s.useEffect(()=>(window.addEventListener("resize",N),()=>{window.removeEventListener("resize",N)}),[N]);const J=r?es:ts,{openThread:ye,addThread:ke,setOpenThread:ge}=s.useContext(J),v=Ta(No,!1,!c),ie=_.current?.getBoundingClientRect(),we=v!=null&&v.coords&&ie?{left:v.coords.left-ie.left,top:v.coords.top-ie.top}:void 0,Oe=s.useCallback(()=>{const Be=window.getSelection()?.getRangeAt(0),le=La();if(!Be||le==null)return;const ve={...l,...le,startPath:le.startPath.join(),endPath:le.endPath.join()},Ie=`${cs()}${as}`,ae=`cockpit_${e}`;ke(Ie,{type:"thread",id:Ie,roomId:ae,createdAt:new Date,comments:[],metadata:ve,updatedAt:new Date,resolved:!1}),ge(Ie)},[ke,e,l,ge]);s.useEffect(()=>{ye!=null&&p&&w()},[p,ye,w]);const Le=q.fetchState==="In-Progress",Ae=Kt({mode:"all",defaultValues:Bi(d),values:Bi(d)}),pe=Ae.handleSubmit(Be=>{const{recipientEmailList:le,subject:ve}=Be[On];if(c===!0)E?.(M?.id);else{const Ie=B?.replace(Aa,Je.common.strings.empty);le!=null&&ve!=null&&b(le,ve,M?.id,Ie!=null&&Ie.length>0?B:void 0)}}),Xe=()=>{H.current!=null&&H.current.click()},Ue=()=>{M!==void 0&&M!=null&&(x([M.id]),re(void 0),Q(!1))},qe=Be=>{const le=Be.target.files?Be.target.files[0]:null;if(le)if(!Lr(le.type)||G)console.warn("Please select a valid file.");else{const ve=new FileReader;ve.onload=function(Ie){const ae=Ie.target?.result;if(typeof ae=="string"){const Qe={data:ae.split(",")[1],name:le.name,id:Ar(e,le.name)};re(Qe),Q(!0),y([Qe])}},ve.readAsDataURL(le)}},ce=()=>{V.current&&V.current.scrollIntoView({behavior:"smooth"})},Pe=()=>{const Be=Ae.getValues(),{recipientEmailList:le,subject:ve}=Be[On];le!=null&&ve!=null&&C(le,ve,M?.id,B)};s.useEffect(()=>{S(d.zeniRequestsHtml)},[d.zeniRequestsHtml]),s.useEffect(()=>{F.current=M},[M]),s.useEffect(()=>{re($r(d.attachmentFile)),Q(!1)},[d.attachmentFile]),s.useEffect(()=>{G&&f()},[G,f]);const ot=Co(`${m.year}-${m.month}-01`).format(Je.dateFormat.visual.MMMMFormat),lt=K!=null?K.split(Ra):[],kt=d.concatenatedHtml,xt=()=>d.lastDraftSavedDate!=null&&c===!1?t.jsx(Qa,{time:d.lastDraftSavedDate,user:d.reportLastSavedByUser,timeStampLabel:Je.cockpit.monthEndReport.timeStampLabel}):null,It=()=>r===!0?Y?t.jsxs(t.Fragment,{children:[t.jsx(Qh,{allThreadsSectionOpen:p,children:t.jsx(Ga,{autoExpand:!0,autoFocus:!1,style:{borderLeft:`1px solid ${L.colors.grey3}`,boxShadow:`${o.sp0} 1px 2px ${o.sp0} ${Ge.boxShadowElevation}`},drawerSectionStyle:{width:`calc(100% - ${o.sp5} - ${o.sp5})`,backgroundColor:L.colors.background},threadsContainerStyle:{paddingBottom:c?"160px":o.sp12},collapsibleThreadStyle:{width:`calc(100% - ${o.sp4})`},allowComposer:!1,drawerTitle:Je.common.texts.comments,filter:i,textOverrides:{},preventResolvedThreadClick:!0,onThreadClick:(Be,le)=>{ge(le);const ve=O.findIndex(Ie=>Ie[0]===le);w(),k.current?.[ve]?.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},onCloseAllThreadsDrawer:()=>w()})}),t.jsx(eo,{availableWidth:j})]}):t.jsx(Xa,{observer:oe,canvasContainerRef:_,sortedThreads:O,threadsPositions:U,threadsRefs:k,unresolvedThreadsMap:R,editorMode:!c,style:{minWidth:`${j}px`,position:"relative",height:"fit-content",top:`${_.current?.offsetTop}px`,minHeight:o.sp12},handleRemoveFloatingThread:ne}):t.jsx(eo,{availableWidth:j}),$t=(d.zeniRequestsData??[]).length+Ea(d.companyMonthEndReportTemplatesData).length;return t.jsxs(t.Fragment,{children:[t.jsxs(Nh,{ref:D,children:[t.jsx(eo,{availableWidth:p?T:j}),t.jsxs(Ph,{children:[t.jsx(Jt,{...Ae,children:t.jsx("form",{id:Fi(Oi),onSubmit:pe,children:t.jsxs(Yh,{children:[t.jsx(Da,{sectionId:On,previewMode:c,subject:Z}),!c&&$t>0?t.jsx(Oa,{totalItems:$t,onClickCustomerRequest:$}):null,t.jsxs(Wh,{id:No,ref:_,children:[t.jsxs(Uh,{className:"monthEndReportCanvasWrapper",children:[M!=null||G?t.jsx(qh,{"data-testid":z("email-attachment-container"),onClick:ce,children:t.jsx(Ba,{fileSizeError:G,setFileSizeError:me,loading:!1,showAnimation:!c&&Ce})}):null,c?t.jsx(Di,{dangerouslySetInnerHTML:{__html:Fa(kt)}}):t.jsxs(t.Fragment,{children:[t.jsxs(Hh,{id:Ma,children:[t.jsx(Fe,{dangerouslySetInnerHTML:{__html:lt[0]!=null?lt[0]+"</body></html>":Je.common.strings.empty}}),t.jsxs(Vh,{children:[t.jsx(Zh,{children:Je.cockpit.monthEndReport.editorTitle}),t.jsx(Jh,{children:Je.cockpit.monthEndReport.editorNote})]})]}),t.jsx(Kh,{id:za,children:t.jsx(_a,{handleFileInputClick:Xe,fileAttached:M!=null,enableZeniGPTFeature:n,isZeniGPTResponseLoading:Le,initialHtmlString:d.zeniRequestsHtml,improveUsingZeniGPTClick:u,setZeniRequestsHtml:S,customerRequestData:h})}),t.jsx(Di,{id:ds,dangerouslySetInnerHTML:{__html:lt[1]!=null?"<html><body>"+lt[1]:Je.common.strings.empty}})]}),M!=null?t.jsx(Pa,{ref:V,fileName:M.name,fileSize:Na(M.data),onRemove:Ue,isRemovable:!c}):null]}),we?t.jsx(Va,{style:{zIndex:15},coords:we,alignment:v.alignment,onClick:Oe}):null,t.jsx(Ha,{canvasContainerRef:_,sortedThreads:O,editorMode:!c,isZeniUser:r})]})]})})}),t.jsx(us,{name:M?.name??Je.common.strings.empty,fileRef:H,sizeLimit:_h,acceptableTypes:zh,onFileChange:async Be=>{qe(Be)},onFileSizeError:Be=>me(Be),multiple:!1})]}),It()]}),t.jsx(ns,{style:{zIndex:10},leftSideComponent:xt(),formId:Fi(Oi),cancelBtn:{isDisabled:Le,label:c===!0?Je.cockpit.monthEndReport.editButtonLabel:Je.cockpit.monthEndReport.saveChanges,onClick:c===!0?I:Pe,style:{width:"136px",padding:`${o.sp0} ${o.sp3}`,boxSizing:"border-box"},size:"medium",isLoading:d.saveMonthEndReportStatus.fetchState==="In-Progress",reverseSpinnerColor:!1},primaryBtn:{isDisabled:Le,isLoading:c===!0?d.sendMonthEndReportStatus.fetchState==="In-Progress":d.previewMonthEndReportStatus.fetchState==="In-Progress",style:{width:c===!0?"unset":"136px"},label:c===!0?Je.cockpit.monthEndReport.sendEmailButtonLabel.replace("__month__",ot):Je.cockpit.monthEndReport.preview,size:"medium"}})]})}const Bi=e=>({[On]:{recipientEmailList:e.recipientEmailList,subject:e.subject??Je.common.strings.empty}}),Fi=e=>`${e}_form`;Et.smallBold.lineHeightValue;const tp=1,np=50,Mi=56,op=["memo"],zi=e=>As(e,op),{common:{strings:{empty:ip}},expenseAutomation:{transactions:{header:{vendors:sp,category:ap,classText:rp,date:lp,type:cp,amount:dp}}}}=je.getLocalizedStrings(),up={key:"vendor",value:sp,sortOrder:"ascending",width:new ee(18,18),customStyle:{common:{paddingLeft:g[7]}}},hp={key:"category",value:ap,sortOrder:"ascending",width:new ee(20,20),customStyle:{common:{paddingLeft:g[7]}}},pp={key:"class",value:rp,sortOrder:"ascending",width:new ee(18,18),customStyle:{common:{paddingLeft:g[7]}}},mp={key:"date",value:lp,sortOrder:"descending",width:new ee(11,11),customStyle:{common:{paddingLeft:12}}},gp={key:"transaction_type",value:cp,sortOrder:"descending",width:new ee(13,13),customStyle:{common:{paddingLeft:g[3]}}},xp={key:"memo",value:ip,sortOrder:"ascending",width:new ee(6,6),customStyle:{common:{}}},fp={key:"amount",value:dp,sortOrder:"ascending",width:new ee(10,10),customStyle:{common:{paddingRight:g[4]}}},bt=[up,hp,pp,mp,gp,xp,fp],to={sortKey:"date",sortOrder:"descending"},ia=({sortConfig:e,isDisabled:n,onColumnSortConfigChanged:d})=>{const c=Se(),[h,p]=s.useState(Ao(bt));s.useEffect(()=>{const r=[...h];for(const m of r)m.key===e.sortKey?m.sortOrder=e.sortOrder:m.sortOrder="ascending";p(r)},[e.sortKey,e.sortOrder]);const i=(r,m)=>{let u=m;e.sortKey===r&&(u=m==="ascending"?"descending":"ascending"),d(r,u)},l=r=>{zi(r.key)==null&&i(Or(r.key),r.sortOrder)};return t.jsx(yp,{windowSize:c,"data-testid":z("transaction-categorization-header-container"),children:h.map((r,m)=>{const u=n!=null||zi(r.key)!=null;return t.jsxs(Cp,{sortDataValue:e.sortKey,actualDataValue:r.key,wrapperWidth:r.width,style:r.customStyle?.common,isSortDisabled:u,windowSize:c,isLastItem:m===h.length-1,"data-testid":z("transaction-categorization-header-wrapper",r.key),children:[t.jsxs(jp,{"data-testid":z("transaction-categorization-header",r.value?r.value:r.key),onClick:()=>l(r),isSortDisabled:u,children:[t.jsx(kp,{children:r.value}),u?null:t.jsx(bp,{sortConfig:e,headerData:r,"data-testid":z("transaction-categorization-sort-icon",r.key),children:t.jsx(Sp,{})})]}),u?null:t.jsx(vp,{isSortDisabled:u,sortDataValue:e.sortKey,isVisible:e.sortKey===r.key&&e.sortKey!==to.sortKey,"data-testid":z("transaction-categorization-close-icon",r.key),children:t.jsx(wp,{onClick:()=>{i(to.sortKey,to.sortOrder)},"data-testid":z("transaction-categorization-close-icon-button",r.key)})})]},r.key)})})},yp=a.div`
1170
+ `,On="monthEndReportFormSection",Oi="monthEndReportPage",Je=je.getLocalizedStrings();function ep({companyId:e,enableZeniGPTFeature:n,monthEndReportView:d,previewMode:c,customerRequestData:h,allThreadsSectionOpen:p,filterMetaData:i,newThreadMetadata:l,isZeniUser:r,selectedPeriod:m,improveUsingZeniGPTClick:u,onRemoveFileAttachment:x,onUpdateFileAttachment:y,onCloseAllThreadsSection:w,previewMonthEndReport:b,saveMonthEndReport:C,onEditClick:I,onOpenFileAttachmentSnackBar:f,onClickCustomerRequest:$,sendMonthEndReport:E}){const L=St(),[B,S]=s.useState(),[j,A]=s.useState(0),[T,W]=s.useState(0),F=s.useRef(),H=s.useRef(null),V=s.useRef(null),{html:K,subject:G,improveUsingZeniGPTStatus:q}=d,[M,re]=s.useState(),[Ce,Q]=s.useState(!1),[Y,me]=s.useState(!1),_=s.useRef(null),D=s.useRef(null),Z=Ia(p,250),P=d.fetchState==="Not-Started"||d.fetchState==="In-Progress"||d.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||d.companyMonthEndReportTemplatesData.fetchState==="In-Progress",{threadsRefs:k,sortedThreads:O,threadsPositions:U,observer:oe,unresolvedThreadsMap:R,handleRemoveFloatingThread:ne}=$a(i,_,!c,P,r),N=s.useCallback(()=>{p?D.current!=null&&W(Math.min((D.current.offsetWidth-dn-g[4])/2,D.current.offsetWidth-dn-rs-g[4])):D.current!=null&&A(Math.min((D.current.offsetWidth-dn-g[4])/2,D.current.offsetWidth-dn-ls-g[4]))},[p]);s.useEffect(()=>{N()},[p,N]),s.useEffect(()=>(window.addEventListener("resize",N),()=>{window.removeEventListener("resize",N)}),[N]);const J=r?es:ts,{openThread:ye,addThread:ke,setOpenThread:ge}=s.useContext(J),v=Ta(No,!1,!c),ie=_.current?.getBoundingClientRect(),we=v!=null&&v.coords&&ie?{left:v.coords.left-ie.left,top:v.coords.top-ie.top}:void 0,Oe=s.useCallback(()=>{const Be=window.getSelection()?.getRangeAt(0),le=La();if(!Be||le==null)return;const ve={...l,...le,startPath:le.startPath.join(),endPath:le.endPath.join()},Ie=`${cs()}${as}`,ae=`cockpit_${e}`;ke(Ie,{type:"thread",id:Ie,roomId:ae,createdAt:new Date,comments:[],metadata:ve,updatedAt:new Date,resolved:!1}),ge(Ie)},[ke,e,l,ge]);s.useEffect(()=>{ye!=null&&p&&w()},[p,ye,w]);const Le=q.fetchState==="In-Progress",Ae=Kt({mode:"all",defaultValues:Bi(d),values:Bi(d)}),pe=Ae.handleSubmit(Be=>{const{recipientEmailList:le,subject:ve}=Be[On];if(c===!0)E?.(M?.id);else{const Ie=B?.replace(Aa,Je.common.strings.empty);le!=null&&ve!=null&&b(le,ve,M?.id,Ie!=null&&Ie.length>0?B:void 0)}}),Xe=()=>{H.current!=null&&H.current.click()},Ue=()=>{M!==void 0&&M!=null&&(x([M.id]),re(void 0),Q(!1))},qe=Be=>{const le=Be.target.files?Be.target.files[0]:null;if(le)if(!Lr(le.type)||Y)console.warn("Please select a valid file.");else{const ve=new FileReader;ve.onload=function(Ie){const ae=Ie.target?.result;if(typeof ae=="string"){const Qe={data:ae.split(",")[1],name:le.name,id:Ar(e,le.name)};re(Qe),Q(!0),y([Qe])}},ve.readAsDataURL(le)}},ce=()=>{V.current&&V.current.scrollIntoView({behavior:"smooth"})},Pe=()=>{const Be=Ae.getValues(),{recipientEmailList:le,subject:ve}=Be[On];le!=null&&ve!=null&&C(le,ve,M?.id,B)};s.useEffect(()=>{S(d.zeniRequestsHtml)},[d.zeniRequestsHtml]),s.useEffect(()=>{F.current=M},[M]),s.useEffect(()=>{re($r(d.attachmentFile)),Q(!1)},[d.attachmentFile]),s.useEffect(()=>{Y&&f()},[Y,f]);const ot=Co(`${m.year}-${m.month}-01`).format(Je.dateFormat.visual.MMMMFormat),lt=K!=null?K.split(Ra):[],kt=d.concatenatedHtml,xt=()=>d.lastDraftSavedDate!=null&&c===!1?t.jsx(Qa,{time:d.lastDraftSavedDate,user:d.reportLastSavedByUser,timeStampLabel:Je.cockpit.monthEndReport.timeStampLabel}):null,It=()=>r===!0?Z?t.jsxs(t.Fragment,{children:[t.jsx(Qh,{allThreadsSectionOpen:p,children:t.jsx(Ya,{autoExpand:!0,autoFocus:!1,style:{borderLeft:`1px solid ${L.colors.grey3}`,boxShadow:`${o.sp0} 1px 2px ${o.sp0} ${Ye.boxShadowElevation}`},drawerSectionStyle:{width:`calc(100% - ${o.sp5} - ${o.sp5})`,backgroundColor:L.colors.background},threadsContainerStyle:{paddingBottom:c?"160px":o.sp12},collapsibleThreadStyle:{width:`calc(100% - ${o.sp4})`},allowComposer:!1,drawerTitle:Je.common.texts.comments,filter:i,textOverrides:{},preventResolvedThreadClick:!0,onThreadClick:(Be,le)=>{ge(le);const ve=O.findIndex(Ie=>Ie[0]===le);w(),k.current?.[ve]?.scrollIntoView({behavior:"smooth",block:"center",inline:"center"})},onCloseAllThreadsDrawer:()=>w()})}),t.jsx(eo,{availableWidth:j})]}):t.jsx(Xa,{observer:oe,canvasContainerRef:_,sortedThreads:O,threadsPositions:U,threadsRefs:k,unresolvedThreadsMap:R,editorMode:!c,style:{minWidth:`${j}px`,position:"relative",height:"fit-content",top:`${_.current?.offsetTop}px`,minHeight:o.sp12},handleRemoveFloatingThread:ne}):t.jsx(eo,{availableWidth:j}),$t=(d.zeniRequestsData??[]).length+Ea(d.companyMonthEndReportTemplatesData).length;return t.jsxs(t.Fragment,{children:[t.jsxs(Nh,{ref:D,children:[t.jsx(eo,{availableWidth:p?T:j}),t.jsxs(Ph,{children:[t.jsx(Jt,{...Ae,children:t.jsx("form",{id:Fi(Oi),onSubmit:pe,children:t.jsxs(Zh,{children:[t.jsx(Da,{sectionId:On,previewMode:c,subject:G}),!c&&$t>0?t.jsx(Oa,{totalItems:$t,onClickCustomerRequest:$}):null,t.jsxs(Wh,{id:No,ref:_,children:[t.jsxs(Uh,{className:"monthEndReportCanvasWrapper",children:[M!=null||Y?t.jsx(qh,{"data-testid":z("email-attachment-container"),onClick:ce,children:t.jsx(Ba,{fileSizeError:Y,setFileSizeError:me,loading:!1,showAnimation:!c&&Ce})}):null,c?t.jsx(Di,{dangerouslySetInnerHTML:{__html:Fa(kt)}}):t.jsxs(t.Fragment,{children:[t.jsxs(Hh,{id:Ma,children:[t.jsx(Fe,{dangerouslySetInnerHTML:{__html:lt[0]!=null?lt[0]+"</body></html>":Je.common.strings.empty}}),t.jsxs(Vh,{children:[t.jsx(Gh,{children:Je.cockpit.monthEndReport.editorTitle}),t.jsx(Jh,{children:Je.cockpit.monthEndReport.editorNote})]})]}),t.jsx(Kh,{id:za,children:t.jsx(_a,{handleFileInputClick:Xe,fileAttached:M!=null,enableZeniGPTFeature:n,isZeniGPTResponseLoading:Le,initialHtmlString:d.zeniRequestsHtml,improveUsingZeniGPTClick:u,setZeniRequestsHtml:S,customerRequestData:h})}),t.jsx(Di,{id:ds,dangerouslySetInnerHTML:{__html:lt[1]!=null?"<html><body>"+lt[1]:Je.common.strings.empty}})]}),M!=null?t.jsx(Pa,{ref:V,fileName:M.name,fileSize:Na(M.data),onRemove:Ue,isRemovable:!c}):null]}),we?t.jsx(Va,{style:{zIndex:15},coords:we,alignment:v.alignment,onClick:Oe}):null,t.jsx(Ha,{canvasContainerRef:_,sortedThreads:O,editorMode:!c,isZeniUser:r})]})]})})}),t.jsx(us,{name:M?.name??Je.common.strings.empty,fileRef:H,sizeLimit:_h,acceptableTypes:zh,onFileChange:async Be=>{qe(Be)},onFileSizeError:Be=>me(Be),multiple:!1})]}),It()]}),t.jsx(ns,{style:{zIndex:10},leftSideComponent:xt(),formId:Fi(Oi),cancelBtn:{isDisabled:Le,label:c===!0?Je.cockpit.monthEndReport.editButtonLabel:Je.cockpit.monthEndReport.saveChanges,onClick:c===!0?I:Pe,style:{width:"136px",padding:`${o.sp0} ${o.sp3}`,boxSizing:"border-box"},size:"medium",isLoading:d.saveMonthEndReportStatus.fetchState==="In-Progress",reverseSpinnerColor:!1},primaryBtn:{isDisabled:Le,isLoading:c===!0?d.sendMonthEndReportStatus.fetchState==="In-Progress":d.previewMonthEndReportStatus.fetchState==="In-Progress",style:{width:c===!0?"unset":"136px"},label:c===!0?Je.cockpit.monthEndReport.sendEmailButtonLabel.replace("__month__",ot):Je.cockpit.monthEndReport.preview,size:"medium"}})]})}const Bi=e=>({[On]:{recipientEmailList:e.recipientEmailList,subject:e.subject??Je.common.strings.empty}}),Fi=e=>`${e}_form`;Et.smallBold.lineHeightValue;const tp=1,np=50,Mi=56,op=["memo"],zi=e=>As(e,op),{common:{strings:{empty:ip}},expenseAutomation:{transactions:{header:{vendors:sp,category:ap,classText:rp,date:lp,type:cp,amount:dp}}}}=je.getLocalizedStrings(),up={key:"vendor",value:sp,sortOrder:"ascending",width:new ee(18,18),customStyle:{common:{paddingLeft:g[7]}}},hp={key:"category",value:ap,sortOrder:"ascending",width:new ee(20,20),customStyle:{common:{paddingLeft:g[7]}}},pp={key:"class",value:rp,sortOrder:"ascending",width:new ee(18,18),customStyle:{common:{paddingLeft:g[7]}}},mp={key:"date",value:lp,sortOrder:"descending",width:new ee(11,11),customStyle:{common:{paddingLeft:12}}},gp={key:"transaction_type",value:cp,sortOrder:"descending",width:new ee(13,13),customStyle:{common:{paddingLeft:g[3]}}},xp={key:"memo",value:ip,sortOrder:"ascending",width:new ee(6,6),customStyle:{common:{}}},fp={key:"amount",value:dp,sortOrder:"ascending",width:new ee(10,10),customStyle:{common:{paddingRight:g[4]}}},bt=[up,hp,pp,mp,gp,xp,fp],to={sortKey:"date",sortOrder:"descending"},ia=({sortConfig:e,isDisabled:n,onColumnSortConfigChanged:d})=>{const c=Se(),[h,p]=s.useState(Ao(bt));s.useEffect(()=>{const r=[...h];for(const m of r)m.key===e.sortKey?m.sortOrder=e.sortOrder:m.sortOrder="ascending";p(r)},[e.sortKey,e.sortOrder]);const i=(r,m)=>{let u=m;e.sortKey===r&&(u=m==="ascending"?"descending":"ascending"),d(r,u)},l=r=>{zi(r.key)==null&&i(Or(r.key),r.sortOrder)};return t.jsx(yp,{windowSize:c,"data-testid":z("transaction-categorization-header-container"),children:h.map((r,m)=>{const u=n!=null||zi(r.key)!=null;return t.jsxs(Cp,{sortDataValue:e.sortKey,actualDataValue:r.key,wrapperWidth:r.width,style:r.customStyle?.common,isSortDisabled:u,windowSize:c,isLastItem:m===h.length-1,"data-testid":z("transaction-categorization-header-wrapper",r.key),children:[t.jsxs(jp,{"data-testid":z("transaction-categorization-header",r.value?r.value:r.key),onClick:()=>l(r),isSortDisabled:u,children:[t.jsx(kp,{children:r.value}),u?null:t.jsx(bp,{sortConfig:e,headerData:r,"data-testid":z("transaction-categorization-sort-icon",r.key),children:t.jsx(Sp,{})})]}),u?null:t.jsx(vp,{isSortDisabled:u,sortDataValue:e.sortKey,isVisible:e.sortKey===r.key&&e.sortKey!==to.sortKey,"data-testid":z("transaction-categorization-close-icon",r.key),children:t.jsx(wp,{onClick:()=>{i(to.sortKey,to.sortOrder)},"data-testid":z("transaction-categorization-close-icon-button",r.key)})})]},r.key)})})},yp=a.div`
1171
1171
  top: ${o.sp0};
1172
1172
  left: ${o.sp0};
1173
1173
  height: ${np}px;
@@ -1219,7 +1219,7 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
1219
1219
  }
1220
1220
  `,kp=a(gt)`
1221
1221
  display: flex;
1222
- `,no="expenseAutomationTransactionsPage",qt="transactionCategorizationListTable",Te="account",Ze="class",rt="lineEntitySelection",Ip="lineEntity",$p="recommendations",sa="lineInfo",Tp="vendorDetails",Lp="customerDetails",Bn="selectedTransactionIds",At=(e,n,d)=>`${e}.${d}.${n}`,Ap=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M21.7995 14.6384L14.7656 21.6723L11.3086 22.3637L12 18.9067L19.0339 11.8728C19.3997 11.5071 19.8958 11.3016 20.413 11.3016C20.9303 11.3016 21.4263 11.5071 21.7922 11.8728L21.7995 11.8811C21.9808 12.062 22.1246 12.2769 22.2227 12.5134C22.3208 12.75 22.3713 13.0036 22.3713 13.2597C22.3713 13.5158 22.3208 13.7694 22.2227 14.006C22.1246 14.2426 21.9808 14.4575 21.7995 14.6384Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M8.54295 19.5981H3.0117C2.82886 19.6026 2.64701 19.57 2.47718 19.5021C2.30735 19.4342 2.15309 19.3325 2.02376 19.2032C1.89444 19.0739 1.79275 18.9196 1.72487 18.7498C1.65699 18.58 1.62433 18.3981 1.62888 18.2153V4.48579C1.61644 4.10613 1.75499 3.73703 2.01419 3.45934C2.27339 3.18165 2.63209 3.01804 3.0117 3.00433H16.8398C17.2194 3.01804 17.5781 3.18165 17.8373 3.45934C18.0965 3.73703 18.2351 4.10613 18.2226 4.48579V8.53558",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M14.055 8.06982L5.80499 8.06982",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M10.305 12.5698L5.80499 12.5698",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),{common:{strings:{underscore:Rp,hyphen:An,empty:tn}},expenseAutomation:{transactions:Rt},dateFormat:Ep}=je.getLocalizedStrings(),Dt={containerPaddingLeftRight:new ee(g[3],g[4]),containerPaddingTopBottom:new ee(g[1],g[2]),containerPaddingTopBottomEmpty:new ee(g[2],g[3]),nameLogoWidth:new ee(g[2],g[4]),nameLogoHeight:new ee(g[2],g[4])},Dp=({transactionView:e,transaction:n,sectionId:d,vendorSearchAutoCompleteData:c,vendorSearchAutoCompleteActions:h,selectedTab:p,containerRef:i,listContainerRef:l,isCOTEnabled:r,cotTracking:m,onTransactionCategorizationRowClick:u,setCurrentTransactionInAction:x,vendorLoadOptions:y,openTooltipId:w,setOpenTooltipId:b,isUncategorizedExpenseCategoryEnabled:C})=>{const I=Se(),[f,$]=s.useState(!1),{lineItemById:E,sortedLineItems:L}=n.transactionReviewLocalData,B=n.transactionReviewLocalData.tabSpecificLineItems?.[p]||[],S=L.filter(P=>B.indexOf(P)!==-1),j=[];S.forEach(P=>{j.push(E[P])});const{accountList:A,accountsHierarchyList:T,classHierarchyList:W,classList:F,uncategorizedAccounts:H,transactions:V,selectedCheckBoxTransactionIds:K}=e,Z=K.includes(n.transactionId),q=St(),M={control:()=>({marginLeft:-2,backgroundColor:f?q.colors.background:q.colors.grey5}),valueContainer:()=>({justifyContent:"flex-start",paddingLeft:g[0]}),menu:()=>({width:"150%",background:q.colors.grey5}),singleValue:()=>({color:f||Z?q.colors.primary:q.colors.hero,paddingLeft:g[2]}),input:P=>({...P,color:f||Z?q.colors.primary:q.colors.hero,textAlign:"left",paddingLeft:g[2]}),menuPortal:P=>({...P,zIndex:10})},re={...M,singleValue:P=>({...P,color:f||Z?q.colors.primary:q.colors.hero}),menu:()=>({marginTop:g[1],marginLeft:-8}),input:P=>({...P,color:f||Z?q.colors.primary:q.colors.hero,textAlign:"left"})},Ce=V.find(P=>P.id===n.transactionId),Q=(P,k)=>{const{transactionType:O}=k.transactionReviewLocalData;let U=P.target;for(;U;){if(U.classList.contains("select-value-container")||U.classList.contains("item-value-container")||U.classList.contains("grouped-single-select-field__value-container")||U.classList.contains("auto-complete-grouped-creatable-single-custom-group-select-field__option")||U.classList.contains("grouped-single-select-field__input")||U.classList.contains("grouped-single-select-field__menu"))return;U=U.parentElement}O!=null&&u(k.transactionId,O)},G=s.useRef(null),[me,_]=s.useState(void 0),[D,Y]=s.useState("bottom");return s.useEffect(()=>{if(me===void 0)return;const P=l?.current?._outerRef??null,k=()=>{const O=G.current;if(O==null||P==null)return;const U=O.getBoundingClientRect(),oe=P.getBoundingClientRect(),R=P.scrollTop+(U.bottom-oe.top),ne=P.scrollHeight-R;Y(ne>=288?"bottom":"top")};return k(),window.addEventListener("resize",k),P?.addEventListener("scroll",k),()=>{window.removeEventListener("resize",k),P?.removeEventListener("scroll",k)}},[l,me]),t.jsx(Fp,{onMouseEnter:()=>$(!0),onMouseLeave:()=>$(!1),windowSize:I,isSelected:Z,isHovered:f,children:t.jsx(Mp,{children:j.map((P,k)=>t.jsx(zp,{ref:me===k?G:void 0,"data-testid":z("transaction-categorization-list-row",P.lineId),windowSize:I,onClick:O=>Q(O,n),children:t.jsx(Op,{line:P,isHovered:f||Z,isSelected:Z,lineIndex:k,sectionId:d,transaction:n,currentTransaction:Ce,windowSize:I,accountsHierarchyList:T,classHierarchyList:W,allAccountList:A,allClassList:F,uncategorizedAccounts:H,vendorSearchAutoCompleteData:c,vendorSearchAutoCompleteActions:h,setCurrentTransactionInAction:x,vendorLoadOptions:y,customStyle:M,customStyleAutoComplete:re,recommendations:P.recommendationsWithCOT,selectedTab:p,isCOTEnabled:r,menuPlacement:D,cotTracking:m,openTooltipId:w,setOpenTooltipId:b,isUncategorizedExpenseCategoryEnabled:C,onDropdownClose:()=>_(void 0),onDropdownOpen:()=>_(k)})},`${n.transactionId}.${P.lineId}`))},n.transactionId)},n.transactionId)},Op=({accountsHierarchyList:e,allAccountList:n,allClassList:d,classHierarchyList:c,customStyle:h,customStyleAutoComplete:p,line:i,lineIndex:l,transaction:r,currentTransaction:m,windowSize:u,uncategorizedAccounts:x,isHovered:y=!1,isSelected:w=!1,sectionId:b,recommendations:C,vendorSearchAutoCompleteData:I,selectedTab:f,isCOTEnabled:$,menuPlacement:E,cotTracking:L,openTooltipId:B,setCurrentTransactionInAction:S,vendorLoadOptions:j,setOpenTooltipId:A,isUncategorizedExpenseCategoryEnabled:T,onDropdownClose:W,onDropdownOpen:F})=>{const{transactionDate:H,transactionType:V,transactionTypeName:K,memo:Z}=r.transactionReviewLocalData,{setValue:q}=To(),M=s.useCallback((ue,be)=>{L?.onCOTView!=null&&L.onCOTView(i.lineId,r.transactionId,ue,be)},[L,i.lineId,r.transactionId]),re=i.lineDescription,Ce=s.useMemo(()=>{if(re||Z)return[{title:Rt.description,description:re||An},{title:Rt.header.memo,description:Z||An}]},[Z,re]),Q=At(b,rt,l.toString()),G=At(b,Te,l.toString()),me=At(b,Ze,l.toString()),_=(ue,be)=>{let Me;switch(be){case"vendor":Me=Q;break;case"category":Me=G;break;case"class":Me=me;break;default:return}q(`${Me}.selectedOption`,ue,{shouldValidate:!0,shouldDirty:!0})},D=St(),Y=s.useMemo(()=>m!=null&&Vt(m)===!0?{id:r.transactionReviewLocalData.customer?.id??"",logo:r.transactionReviewLocalData.customer?.logo,name:r.transactionReviewLocalData.customer?.name??""}:{id:i.customer?.id??"",logo:i.customer?.logo,name:i.customer?.name??""},[m,i.customer?.id,i.customer?.logo,i.customer?.name,r.transactionReviewLocalData.customer?.id,r.transactionReviewLocalData.customer?.logo,r.transactionReviewLocalData.customer?.name]),P=s.useMemo(()=>m!=null&&Vt(m)===!0?{id:r.transactionReviewLocalData.vendor?.id??"",logo:r.transactionReviewLocalData.vendor?.logo,name:r.transactionReviewLocalData.vendor?.name??""}:{id:i.vendor?.id??"",logo:i.vendor?.logo,name:i.vendor?.name??""},[m,i.vendor?.id,i.vendor?.logo,i.vendor?.name,r.transactionReviewLocalData.vendor?.id,r.transactionReviewLocalData.vendor?.logo,r.transactionReviewLocalData.vendor?.name]),k=i[Ze]?.classId,O=i[Te]?.qboId??i[Te]?.accountId,U=Y?.id,oe=P?.id,R=P?.name,[ne,N]=s.useState(!k),[J,ye]=s.useState(!O||i[Te]?.qboId!=null&&un(x,i[Te].qboId,T===!0?["income"]:void 0)===!0),[ke,ge]=s.useState(!oe||!U),v=ue=>C?.find(be=>be.vendor?.qboId===ue||be.vendor?.id===ue||be.vendor?.name===ue)?.vendor?.reason??"",ie=r.transactionReviewLocalData.lineItemById[i.lineId]?.recommendationsWithCOT||[],we=Ss(e,ie),Oe=vs(c,ie),Le=ue=>n.filter(be=>be.qboId===ue)[0]?.qboId,Ae=ue=>d.filter(be=>be.classId===ue)[0]?.accountingClassNumber??void 0,pe=s.useCallback(ue=>un(x,ue,T===!0?["income"]:void 0),[x,T]),[Xe,Ue]=s.useState(!1),[qe,ce]=s.useState(!1),[Pe,ot]=s.useState(!1),lt=(ue,be)=>{S({transactionId:r.transactionId,lineItemId:i.lineId}),j(ue,be)},kt=()=>{ge(!(oe||U)),Ue(!1),W?.()},xt=()=>{O&&i[Te]?.qboId!=null&&un(x,i[Te].qboId,T===!0?["income"]:void 0)===!1?ye(!1):ye(!0),ot(!1),W?.()},It=()=>{N(!k),ce(!1),W?.()},$t=()=>{(oe||U)&&(Ue(!0),F?.())},Be=()=>{ce(!0),F?.()},le=()=>{ot(!0),F?.()};s.useEffect(()=>{O&&i[Te]?.qboId!=null&&un(x,i[Te].qboId,T===!0?["income"]:void 0)===!1?ye(!1):ye(!0)},[O]),s.useEffect(()=>{N(!k)},[k]),s.useEffect(()=>{ge(!(oe||U))},[oe,U]);const ve=r.transactionReviewLocalData.selectedEntity,Ie=r.transactionReviewLocalData.lineItemById[i.lineId].selectedEntityLine,ae=m!=null&&Vt(m)===!0?ve:Ie,Qe=s.useMemo(()=>{const ue=r.transactionReviewLocalData.lineItemById[i.lineId]?.recommendationsWithCOT||[],be=I.entityAutoCompleteView;return{selectedOption:ae?.qboId??ae?.id,defaultOptions:Io(be,ae,ue??[])}},[ae,r.transactionReviewLocalData.lineItemById,i.lineId,I.entityAutoCompleteView]),ct=()=>ae!=null&&ae.logo!=null?t.jsx(Cs,{photoUrl:ae.logo.toString(),styles:{width:Dt.nameLogoWidth.valuePx(u),height:Dt.nameLogoHeight.valuePx(u)},fallbackAvatar:t.jsx(Ni,{children:t.jsx(mn,{name:ae.name,size:o.sp4})})}):ae!=null&&ae.name!=null?t.jsx(Ni,{children:t.jsx(mn,{name:ae.name,size:o.sp4})}):null,Tt=(ue,be)=>{if(be==null||!be)return;let Me=[];return ue.forEach(Ke=>{Me=Me.concat(Ke.options)}),Me.find(Ke=>Ke.value===be)?.label??be},it=Tt(Oe,k),Zt=Tt(we,O),et=f==="review",Mt=Wn("vendor",Qe.defaultOptions,Qe.selectedOption),ln=Wn("category",we,O),Yt=Wn("class",Oe,k),Nn=()=>bt.map((ue,be)=>{const Me=`${r.transactionId}_${ue.key}_${i.lineId}`;if(l>0&&m!=null&&Vt(m)===!0&&ue.key==="vendor")return t.jsx(st,{windowSize:u,wrapperWidth:ue.width},Me);if(l>0&&ue.key==="transaction_type")return t.jsx(st,{windowSize:u,wrapperWidth:ue.width},Me);switch(ue.key){case"vendor":default:return t.jsxs(st,{windowSize:u,wrapperWidth:ue.width,className:"item-value-container",children:[t.jsx(oo,{isCOTEnabled:$,recommendations:ie,type:"vendor",isFirstColumn:!0,isEnabled:!!ae?.isPreFilled,isMisCategorized:Mt,onRecommendationClick:_,selectedValue:oe,selectedValueLabel:R,isReviewTab:et,isAccountOptionDisabled:pe,existingOption:{label:m!=null&&Vt(m)===!0?m?.vendor?.name:void 0,value:m!=null&&Vt(m)===!0?m?.vendor?.id:void 0},cotTracking:L,lineId:i.lineId,transactionId:r.transactionId,openTooltipId:B,setOpenTooltipId:A}),t.jsx(lo,{children:ke===!0?t.jsx(ao,{isHovered:y,children:t.jsxs(io,{onClick:Ke=>{Ke.stopPropagation(),F?.(),ge(!1),Ue(!0)},"data-testid":z("add-vendor-button",b),style:{display:"inline-flex",alignItems:"center",color:Ge.brandColorGoldDark,cursor:"pointer",height:o.sp6},children:[t.jsx(so,{}),Rt.addPayee]})}):Xe===!0?t.jsx(Ct,{onClickAway:kt,children:t.jsx(Gp,{"data-testid":z("vendor-selection-dropdown-container",At(b,rt,l.toString())),children:t.jsx(hr,{name:Q,placeholder:Rt.addPayee,valueToInfo:v,defaultValue:{selectedOption:Qe.selectedOption,defaultOptions:Qe.defaultOptions},type:"vendor",autoFocus:!ke,style:{width:"100%"},pageSource:"list_page",transactionStatus:et?"pending_review":"auto_categorized",isOptionRemovable:!1,customStyleConfig:p,menuIsOpen:Xe,onMenuClose:kt,registerOptions:{required:!1},loadOptions:lt,showCOT:$,onCOTView:M,menuPlacement:E})})}):t.jsx(Qp,{children:t.jsxs(ro,{isHovered:y,showOutline:Mt&&ae?.isPreFilled!==!0&&!w&&et,children:[ct(),t.jsx(Yp,{onClick:$t,"data-testid":z("vendor-name-text",b),children:ae!=null&&ae.name?t.jsx(nt,{text:ae.name,itemTextStyle:{color:y?D.colors.primary:D.colors.hero}}):t.jsx(Xp,{children:An})})]})})})]},Me);case"category":{const Ke=m?.lines!=null?m?.lines[l]:void 0;return t.jsxs(st,{windowSize:u,wrapperWidth:ue.width,className:"item-value-container",children:[t.jsx(oo,{isCOTEnabled:$,recommendations:ie,type:"category",isFirstColumn:!1,isReviewTab:et,isEnabled:!!i[Te]?.isPreFilled,isAccountOptionDisabled:pe,isMisCategorized:ln,onRecommendationClick:_,selectedValue:O,selectedValueLabel:Zt,existingOption:{label:Ke?.account?.accountName,value:Ke?.account?.qboId??Ke?.account?.accountId},cotTracking:L,lineId:i.lineId,transactionId:r.transactionId,openTooltipId:B,setOpenTooltipId:A}),t.jsx(lo,{children:J===!0?t.jsx(ao,{isHovered:y,children:t.jsxs(io,{onClick:zt=>{zt.stopPropagation(),F?.(),ye(!1),ot(!0)},"data-testid":z("category-selection-field",G),style:{display:"inline-flex",alignItems:"center",color:Ge.brandColorGoldDark,cursor:"pointer",height:o.sp6},children:[t.jsx(so,{}),Rt.addCategory]})}):Pe===!0?t.jsx(Ct,{onClickAway:xt,children:t.jsx(Vi,{isHovered:y,"data-testid":z("category-selection-dropdown-container",G),children:t.jsx(Yo,{name:G,placeholder:Rt.addCategory,valueToId:zt=>Le(zt),type:"category",pageSource:"list_page",transactionStatus:et?"pending_review":"auto_categorized",showCOT:$,defaultValue:{selectedOption:O,allOptions:we},style:{display:"flex",flexGrow:1,width:"100%",cursor:"inherit"},registerOptions:{required:!1},menuIsOpen:Pe,autoFocus:!J&&(!O||i[Te]?.qboId!=null&&[x.expense?.qboId,x.income?.qboId].includes(i[Te].qboId)),onMenuClose:xt,customStyleConfig:h,disableCurrentOption:pe,menuPlacement:E,onCOTView:M})})}):t.jsx(ro,{isHovered:y,showOutline:ln&&i[Te]?.isPreFilled!==!0&&!w&&et,children:t.jsx(Hi,{onClick:le,"data-testid":z("category-label-text",G),children:t.jsx(nt,{text:Zt??"",itemTextStyle:{color:y?D.colors.primary:D.colors.hero}})})})})]},Me)}case"class":{const Ke=m?.lines!=null?m?.lines[l]:void 0;return t.jsxs(st,{windowSize:u,wrapperWidth:ue.width,className:"item-value-container",children:[t.jsx(oo,{isCOTEnabled:$,recommendations:ie,type:"class",isFirstColumn:!1,isReviewTab:et,isEnabled:!!i[Ze]?.isPreFilled,isAccountOptionDisabled:pe,isMisCategorized:Yt,onRecommendationClick:_,selectedValue:k,selectedValueLabel:it,existingOption:{label:Ke?.class?.className,value:Ke?.class?.classId},cotTracking:L,lineId:i.lineId,transactionId:r.transactionId,openTooltipId:B,setOpenTooltipId:A}),t.jsx(lo,{children:ne===!0?t.jsx(ao,{isHovered:y,children:t.jsxs(io,{onClick:zt=>{zt.stopPropagation(),F?.(),N(!1),ce(!0)},"data-testid":z("class-selection-field",me),style:{display:"inline-flex",alignItems:"center",color:Ge.brandColorGoldDark,cursor:"pointer",height:o.sp6},children:[t.jsx(so,{}),Rt.addClass]})}):qe===!0?t.jsx(Ct,{onClickAway:It,children:t.jsx(Vi,{isHovered:y,"data-testid":z("class-selection-dropdown-container",me),children:t.jsx(Yo,{name:me,placeholder:Rt.addClass,valueToId:zt=>Ae(zt),type:"class",showCOT:$,defaultValue:{selectedOption:k,allOptions:Oe},pageSource:"list_page",transactionStatus:et?"pending_review":"auto_categorized",menuIsOpen:qe,registerOptions:{required:!1},style:{width:"100%"},autoFocus:!ne&&!k,customStyleConfig:h,onMenuClose:It,menuPlacement:E,onCOTView:M})})}):t.jsx(ro,{isHovered:y,showOutline:Yt&&i[Ze]?.isPreFilled!==!0&&!w&&et,children:t.jsx(Hi,{"data-testid":z("class-selection-field",me),onClick:Be,children:t.jsx(nt,{text:it??"",itemTextStyle:{color:y?D.colors.primary:D.colors.hero}})})})})]},Me)}case"date":return t.jsx(st,{windowSize:u,wrapperWidth:ue.width,children:t.jsx(an,{windowSize:u,isLastItem:be===bt.length-1,children:t.jsx(So,{"data-testid":z("date-field",At(b,Ze,l.toString())),children:t.jsx(Pp,{style:{color:y?D.colors.primary:D.colors.hero},children:H!=null?H.format(Ep.visual.MMMDCommaYYYYformat):null})})})},Me);case"transaction_type":return t.jsx(st,{windowSize:u,wrapperWidth:ue.width,children:t.jsx(an,{windowSize:u,"data-testid":z("transaction-type-field",At(b,Ze,l.toString())),isLastItem:be===bt.length-1,children:K!=null?t.jsx(dr,{textColor:y?new $o(D.colors.primary):ur(void 0,D),text:K??V}):null})},Me);case"memo":return t.jsx(st,{windowSize:u,wrapperWidth:ue.width,children:t.jsx(an,{style:{lineHeight:o.sp3},windowSize:u,isLastItem:be===bt.length-1,"data-testid":z("memo-field",At(b,Ze,l.toString())),children:Ce!=null?t.jsx(fe,{placement:"bottom",data:Ce,variant:"multi-information-points",children:t.jsx(Vp,{style:{color:y?D.colors.primary:D.colors.hero}})}):t.jsx(Np,{children:An})})},Me);case"amount":{const Ke=We("0,0.[00]",i.amount,!0);return t.jsx(st,{windowSize:u,style:{paddingRight:g[4]},wrapperWidth:ue.width,children:t.jsx(an,{windowSize:u,isLastItem:be===bt.length-1,children:t.jsx(So,{"data-testid":z("transaction-amount-field",At(b,Ze,l.toString())),style:{color:y?D.colors.primary:D.colors.hero},children:Ke})})},Me)}}});return t.jsx(t.Fragment,{children:Nn()})},_i=({isEnabled:e,isReviewTab:n,isMisCategorized:d,hasRecommendations:c,isTooltipVisible:h=!1})=>e?n?h?t.jsx(Up,{}):t.jsx(Hp,{}):h?t.jsx(Wp,{}):t.jsx(qp,{className:"ai-icon-selected-plain"}):!e&&d||c?h?t.jsx(Jp,{}):t.jsx(Kp,{}):null,Pi=({isFirstColumn:e,children:n})=>t.jsx(ra,{isFirstColumn:e,children:n}),oo=({recommendations:e,isCOTEnabled:n,type:d,isReviewTab:c,selectedValueLabel:h,isFirstColumn:p,isEnabled:i=!1,isMisCategorized:l=!1,selectedValue:r,existingOption:m,cotTracking:u,lineId:x,openTooltipId:y,transactionId:w,isAccountOptionDisabled:b,onRecommendationClick:C,setOpenTooltipId:I})=>{const f=s.useMemo(()=>`${w}:${x}:${d}`,[w,x,d]),$=y===f,E=gr().analytics,{createAlternateRecommendationCallback:L}=xr(),B=s.useCallback(H=>{const V=e[1],K=e[0];L(d,{currentValue:h??tn,transactionCurrentStatus:c?"pending_review":"auto_categorized",transactionPage:"list_page",cotTracking:u?{transactionId:w,lineId:x,onCOTView:(Z,q,M,re)=>{u.onCOTView?.(Z,q,M,re)}}:void 0},V,K)(H)},[L,e,h,c,d,u,x,w]),S=fr(e,d,n,m,"list_page",c?"pending_review":"auto_categorized",C,B,r,b),j=yr(e,d),A=s.useCallback(()=>{I(f);const H=S?.recommendations[0]?.cot??[],V=S?.recommendations[1]?.cot??[],K=V.length>0;if(E.trackTransactionCotView({recommendationFor:d,currentValue:h??tn,recommendation:S?.recommendations[0]?.name??tn,recommendationCot:H,isRecommendationCotAvailable:H.length>0,recommendationReason:S?.recommendations[0]?.reason??tn,recommendationConfidencePercentage:S?.recommendations[0]?.confidencePercentage??null,recommendationConfidenceLevel:Wo(Uo(S?.recommendations[0]?.confidencePercentage).toLocaleLowerCase()),alternativeRecommendation:S?.recommendations[1]?.name??tn,alternativeRecommendationCot:V,isAlternativeRecommendationCotAvailable:K,alternativeRecommendationReason:S?.recommendations[1]?.reason??tn,alternativeRecommendationConfidencePercentage:S?.recommendations[1]?.confidencePercentage??null,alternativeRecommendationConfidenceLevel:K?Wo(Uo(S?.recommendations[1]?.confidencePercentage).toLocaleLowerCase()):null,transactionCurrentStatus:c?"pending_review":"auto_categorized",transactionPage:"list_page"}),u?.onCOTView!=null){const Z=Cr(S);Z!=null&&u.onCOTView(x,w,d,Z)}},[E,S,c,h,d,x,w,f,I]),T=s.useCallback(()=>{y===f&&I(void 0)},[y,f,I]),W=s.useMemo(()=>!r||!j?!1:e.some(H=>d==="vendor"&&H.vendor!=null?H.vendor.id===r||H.vendor.qboId===r:d==="category"&&H.account!=null?H.account.qboId===r||H.account.accountId===r:d==="class"&&H.class!=null?H.class.classId===r:!1),[r,j,e,d]);if(!j)return t.jsx(ra,{isFirstColumn:p});const F=i||W;return S?t.jsx(Pi,{isFirstColumn:p,children:t.jsx(fe,{variant:"chain-of-thought",data:S,placement:"bottom-start",disableIntersectionObserver:!0,position:"static",display:"block",open:$,style:{width:"auto",height:"auto"},leaveDelay:200,onOpen:A,onClose:T,children:t.jsx(Zp,{children:t.jsx(_i,{isEnabled:F,isReviewTab:c,isMisCategorized:l,hasRecommendations:j,isTooltipVisible:$})})})}):t.jsx(Pi,{isFirstColumn:p,children:t.jsx(_i,{isEnabled:F,isReviewTab:c,isMisCategorized:l,hasRecommendations:j,isTooltipVisible:$})})},aa=()=>{const e=Se(),n=s.useRef(null),[d,c]=s.useState(0);return s.useLayoutEffect(()=>{n.current&&c(n.current.offsetWidth)},[e]),t.jsx(Bp,{windowSize:e,ref:n,children:bt.map((h,p)=>{const i=`${p}${Rp}${h.key}`;switch(h.key){case"vendor":return t.jsx(st,{windowSize:e,wrapperWidth:h.width,children:t.jsx(an,{windowSize:e,isLastItem:p===bt.length-1,children:t.jsxs(So,{children:[t.jsx(Lo,{width:g[4],height:g[4]}),t.jsx(Bt,{width:d*h.width.value(e)/100,height:g[4],style:{display:"flex",alignItems:"center"}})]})})},i);default:return t.jsx(st,{windowSize:e,wrapperWidth:h.width,children:t.jsx(an,{windowSize:e,isLastItem:p===bt.length-1,children:t.jsx(Bt,{width:d*h.width.value(e)/100,height:g[4],style:{display:"flex",alignItems:"center"}})})},i)}})})},Bp=a.div`
1222
+ `,no="expenseAutomationTransactionsPage",qt="transactionCategorizationListTable",Te="account",Ge="class",rt="lineEntitySelection",Ip="lineEntity",$p="recommendations",sa="lineInfo",Tp="vendorDetails",Lp="customerDetails",Bn="selectedTransactionIds",At=(e,n,d)=>`${e}.${d}.${n}`,Ap=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M21.7995 14.6384L14.7656 21.6723L11.3086 22.3637L12 18.9067L19.0339 11.8728C19.3997 11.5071 19.8958 11.3016 20.413 11.3016C20.9303 11.3016 21.4263 11.5071 21.7922 11.8728L21.7995 11.8811C21.9808 12.062 22.1246 12.2769 22.2227 12.5134C22.3208 12.75 22.3713 13.0036 22.3713 13.2597C22.3713 13.5158 22.3208 13.7694 22.2227 14.006C22.1246 14.2426 21.9808 14.4575 21.7995 14.6384Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M8.54295 19.5981H3.0117C2.82886 19.6026 2.64701 19.57 2.47718 19.5021C2.30735 19.4342 2.15309 19.3325 2.02376 19.2032C1.89444 19.0739 1.79275 18.9196 1.72487 18.7498C1.65699 18.58 1.62433 18.3981 1.62888 18.2153V4.48579C1.61644 4.10613 1.75499 3.73703 2.01419 3.45934C2.27339 3.18165 2.63209 3.01804 3.0117 3.00433H16.8398C17.2194 3.01804 17.5781 3.18165 17.8373 3.45934C18.0965 3.73703 18.2351 4.10613 18.2226 4.48579V8.53558",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M14.055 8.06982L5.80499 8.06982",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M10.305 12.5698L5.80499 12.5698",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),{common:{strings:{underscore:Rp,hyphen:An,empty:tn}},expenseAutomation:{transactions:Rt},dateFormat:Ep}=je.getLocalizedStrings(),Dt={containerPaddingLeftRight:new ee(g[3],g[4]),containerPaddingTopBottom:new ee(g[1],g[2]),containerPaddingTopBottomEmpty:new ee(g[2],g[3]),nameLogoWidth:new ee(g[2],g[4]),nameLogoHeight:new ee(g[2],g[4])},Dp=({transactionView:e,transaction:n,sectionId:d,vendorSearchAutoCompleteData:c,vendorSearchAutoCompleteActions:h,selectedTab:p,containerRef:i,listContainerRef:l,isCOTEnabled:r,cotTracking:m,onTransactionCategorizationRowClick:u,setCurrentTransactionInAction:x,vendorLoadOptions:y,openTooltipId:w,setOpenTooltipId:b,isUncategorizedExpenseCategoryEnabled:C})=>{const I=Se(),[f,$]=s.useState(!1),{lineItemById:E,sortedLineItems:L}=n.transactionReviewLocalData,B=n.transactionReviewLocalData.tabSpecificLineItems?.[p]||[],S=L.filter(P=>B.indexOf(P)!==-1),j=[];S.forEach(P=>{j.push(E[P])});const{accountList:A,accountsHierarchyList:T,classHierarchyList:W,classList:F,uncategorizedAccounts:H,transactions:V,selectedCheckBoxTransactionIds:K}=e,G=K.includes(n.transactionId),q=St(),M={control:()=>({marginLeft:-2,backgroundColor:f?q.colors.background:q.colors.grey5}),valueContainer:()=>({justifyContent:"flex-start",paddingLeft:g[0]}),menu:()=>({width:"150%",background:q.colors.grey5}),singleValue:()=>({color:f||G?q.colors.primary:q.colors.hero,paddingLeft:g[2]}),input:P=>({...P,color:f||G?q.colors.primary:q.colors.hero,textAlign:"left",paddingLeft:g[2]}),menuPortal:P=>({...P,zIndex:10})},re={...M,singleValue:P=>({...P,color:f||G?q.colors.primary:q.colors.hero}),menu:()=>({marginTop:g[1],marginLeft:-8}),input:P=>({...P,color:f||G?q.colors.primary:q.colors.hero,textAlign:"left"})},Ce=V.find(P=>P.id===n.transactionId),Q=(P,k)=>{const{transactionType:O}=k.transactionReviewLocalData;let U=P.target;for(;U;){if(U.classList.contains("select-value-container")||U.classList.contains("item-value-container")||U.classList.contains("grouped-single-select-field__value-container")||U.classList.contains("auto-complete-grouped-creatable-single-custom-group-select-field__option")||U.classList.contains("grouped-single-select-field__input")||U.classList.contains("grouped-single-select-field__menu"))return;U=U.parentElement}O!=null&&u(k.transactionId,O)},Y=s.useRef(null),[me,_]=s.useState(void 0),[D,Z]=s.useState("bottom");return s.useEffect(()=>{if(me===void 0)return;const P=l?.current?._outerRef??null,k=()=>{const O=Y.current;if(O==null||P==null)return;const U=O.getBoundingClientRect(),oe=P.getBoundingClientRect(),R=P.scrollTop+(U.bottom-oe.top),ne=P.scrollHeight-R;Z(ne>=288?"bottom":"top")};return k(),window.addEventListener("resize",k),P?.addEventListener("scroll",k),()=>{window.removeEventListener("resize",k),P?.removeEventListener("scroll",k)}},[l,me]),t.jsx(Fp,{onMouseEnter:()=>$(!0),onMouseLeave:()=>$(!1),windowSize:I,isSelected:G,isHovered:f,children:t.jsx(Mp,{children:j.map((P,k)=>t.jsx(zp,{ref:me===k?Y:void 0,"data-testid":z("transaction-categorization-list-row",P.lineId),windowSize:I,onClick:O=>Q(O,n),children:t.jsx(Op,{line:P,isHovered:f||G,isSelected:G,lineIndex:k,sectionId:d,transaction:n,currentTransaction:Ce,windowSize:I,accountsHierarchyList:T,classHierarchyList:W,allAccountList:A,allClassList:F,uncategorizedAccounts:H,vendorSearchAutoCompleteData:c,vendorSearchAutoCompleteActions:h,setCurrentTransactionInAction:x,vendorLoadOptions:y,customStyle:M,customStyleAutoComplete:re,recommendations:P.recommendationsWithCOT,selectedTab:p,isCOTEnabled:r,menuPlacement:D,cotTracking:m,openTooltipId:w,setOpenTooltipId:b,isUncategorizedExpenseCategoryEnabled:C,onDropdownClose:()=>_(void 0),onDropdownOpen:()=>_(k)})},`${n.transactionId}.${P.lineId}`))},n.transactionId)},n.transactionId)},Op=({accountsHierarchyList:e,allAccountList:n,allClassList:d,classHierarchyList:c,customStyle:h,customStyleAutoComplete:p,line:i,lineIndex:l,transaction:r,currentTransaction:m,windowSize:u,uncategorizedAccounts:x,isHovered:y=!1,isSelected:w=!1,sectionId:b,recommendations:C,vendorSearchAutoCompleteData:I,selectedTab:f,isCOTEnabled:$,menuPlacement:E,cotTracking:L,openTooltipId:B,setCurrentTransactionInAction:S,vendorLoadOptions:j,setOpenTooltipId:A,isUncategorizedExpenseCategoryEnabled:T,onDropdownClose:W,onDropdownOpen:F})=>{const{transactionDate:H,transactionType:V,transactionTypeName:K,memo:G}=r.transactionReviewLocalData,{setValue:q}=To(),M=s.useCallback((ue,be)=>{L?.onCOTView!=null&&L.onCOTView(i.lineId,r.transactionId,ue,be)},[L,i.lineId,r.transactionId]),re=i.lineDescription,Ce=s.useMemo(()=>{if(re||G)return[{title:Rt.description,description:re||An},{title:Rt.header.memo,description:G||An}]},[G,re]),Q=At(b,rt,l.toString()),Y=At(b,Te,l.toString()),me=At(b,Ge,l.toString()),_=(ue,be)=>{let Me;switch(be){case"vendor":Me=Q;break;case"category":Me=Y;break;case"class":Me=me;break;default:return}q(`${Me}.selectedOption`,ue,{shouldValidate:!0,shouldDirty:!0})},D=St(),Z=s.useMemo(()=>m!=null&&Vt(m)===!0?{id:r.transactionReviewLocalData.customer?.id??"",logo:r.transactionReviewLocalData.customer?.logo,name:r.transactionReviewLocalData.customer?.name??""}:{id:i.customer?.id??"",logo:i.customer?.logo,name:i.customer?.name??""},[m,i.customer?.id,i.customer?.logo,i.customer?.name,r.transactionReviewLocalData.customer?.id,r.transactionReviewLocalData.customer?.logo,r.transactionReviewLocalData.customer?.name]),P=s.useMemo(()=>m!=null&&Vt(m)===!0?{id:r.transactionReviewLocalData.vendor?.id??"",logo:r.transactionReviewLocalData.vendor?.logo,name:r.transactionReviewLocalData.vendor?.name??""}:{id:i.vendor?.id??"",logo:i.vendor?.logo,name:i.vendor?.name??""},[m,i.vendor?.id,i.vendor?.logo,i.vendor?.name,r.transactionReviewLocalData.vendor?.id,r.transactionReviewLocalData.vendor?.logo,r.transactionReviewLocalData.vendor?.name]),k=i[Ge]?.classId,O=i[Te]?.qboId??i[Te]?.accountId,U=Z?.id,oe=P?.id,R=P?.name,[ne,N]=s.useState(!k),[J,ye]=s.useState(!O||i[Te]?.qboId!=null&&un(x,i[Te].qboId,T===!0?["income"]:void 0)===!0),[ke,ge]=s.useState(!oe||!U),v=ue=>C?.find(be=>be.vendor?.qboId===ue||be.vendor?.id===ue||be.vendor?.name===ue)?.vendor?.reason??"",ie=r.transactionReviewLocalData.lineItemById[i.lineId]?.recommendationsWithCOT||[],we=Ss(e,ie),Oe=vs(c,ie),Le=ue=>n.filter(be=>be.qboId===ue)[0]?.qboId,Ae=ue=>d.filter(be=>be.classId===ue)[0]?.accountingClassNumber??void 0,pe=s.useCallback(ue=>un(x,ue,T===!0?["income"]:void 0),[x,T]),[Xe,Ue]=s.useState(!1),[qe,ce]=s.useState(!1),[Pe,ot]=s.useState(!1),lt=(ue,be)=>{S({transactionId:r.transactionId,lineItemId:i.lineId}),j(ue,be)},kt=()=>{ge(!(oe||U)),Ue(!1),W?.()},xt=()=>{O&&i[Te]?.qboId!=null&&un(x,i[Te].qboId,T===!0?["income"]:void 0)===!1?ye(!1):ye(!0),ot(!1),W?.()},It=()=>{N(!k),ce(!1),W?.()},$t=()=>{(oe||U)&&(Ue(!0),F?.())},Be=()=>{ce(!0),F?.()},le=()=>{ot(!0),F?.()};s.useEffect(()=>{O&&i[Te]?.qboId!=null&&un(x,i[Te].qboId,T===!0?["income"]:void 0)===!1?ye(!1):ye(!0)},[O]),s.useEffect(()=>{N(!k)},[k]),s.useEffect(()=>{ge(!(oe||U))},[oe,U]);const ve=r.transactionReviewLocalData.selectedEntity,Ie=r.transactionReviewLocalData.lineItemById[i.lineId].selectedEntityLine,ae=m!=null&&Vt(m)===!0?ve:Ie,Qe=s.useMemo(()=>{const ue=r.transactionReviewLocalData.lineItemById[i.lineId]?.recommendationsWithCOT||[],be=I.entityAutoCompleteView;return{selectedOption:ae?.qboId??ae?.id,defaultOptions:Io(be,ae,ue??[])}},[ae,r.transactionReviewLocalData.lineItemById,i.lineId,I.entityAutoCompleteView]),ct=()=>ae!=null&&ae.logo!=null?t.jsx(Cs,{photoUrl:ae.logo.toString(),styles:{width:Dt.nameLogoWidth.valuePx(u),height:Dt.nameLogoHeight.valuePx(u)},fallbackAvatar:t.jsx(Ni,{children:t.jsx(mn,{name:ae.name,size:o.sp4})})}):ae!=null&&ae.name!=null?t.jsx(Ni,{children:t.jsx(mn,{name:ae.name,size:o.sp4})}):null,Tt=(ue,be)=>{if(be==null||!be)return;let Me=[];return ue.forEach(Ke=>{Me=Me.concat(Ke.options)}),Me.find(Ke=>Ke.value===be)?.label??be},it=Tt(Oe,k),Gt=Tt(we,O),et=f==="review",Mt=Wn("vendor",Qe.defaultOptions,Qe.selectedOption),ln=Wn("category",we,O),Zt=Wn("class",Oe,k),Nn=()=>bt.map((ue,be)=>{const Me=`${r.transactionId}_${ue.key}_${i.lineId}`;if(l>0&&m!=null&&Vt(m)===!0&&ue.key==="vendor")return t.jsx(st,{windowSize:u,wrapperWidth:ue.width},Me);if(l>0&&ue.key==="transaction_type")return t.jsx(st,{windowSize:u,wrapperWidth:ue.width},Me);switch(ue.key){case"vendor":default:return t.jsxs(st,{windowSize:u,wrapperWidth:ue.width,className:"item-value-container",children:[t.jsx(oo,{isCOTEnabled:$,recommendations:ie,type:"vendor",isFirstColumn:!0,isEnabled:!!ae?.isPreFilled,isMisCategorized:Mt,onRecommendationClick:_,selectedValue:oe,selectedValueLabel:R,isReviewTab:et,isAccountOptionDisabled:pe,existingOption:{label:m!=null&&Vt(m)===!0?m?.vendor?.name:void 0,value:m!=null&&Vt(m)===!0?m?.vendor?.id:void 0},cotTracking:L,lineId:i.lineId,transactionId:r.transactionId,openTooltipId:B,setOpenTooltipId:A}),t.jsx(lo,{children:ke===!0?t.jsx(ao,{isHovered:y,children:t.jsxs(io,{onClick:Ke=>{Ke.stopPropagation(),F?.(),ge(!1),Ue(!0)},"data-testid":z("add-vendor-button",b),style:{display:"inline-flex",alignItems:"center",color:Ye.brandColorGoldDark,cursor:"pointer",height:o.sp6},children:[t.jsx(so,{}),Rt.addPayee]})}):Xe===!0?t.jsx(Ct,{onClickAway:kt,children:t.jsx(Yp,{"data-testid":z("vendor-selection-dropdown-container",At(b,rt,l.toString())),children:t.jsx(hr,{name:Q,placeholder:Rt.addPayee,valueToInfo:v,defaultValue:{selectedOption:Qe.selectedOption,defaultOptions:Qe.defaultOptions},type:"vendor",autoFocus:!ke,style:{width:"100%"},pageSource:"list_page",transactionStatus:et?"pending_review":"auto_categorized",isOptionRemovable:!1,customStyleConfig:p,menuIsOpen:Xe,onMenuClose:kt,registerOptions:{required:!1},loadOptions:lt,showCOT:$,onCOTView:M,menuPlacement:E})})}):t.jsx(Qp,{children:t.jsxs(ro,{isHovered:y,showOutline:Mt&&ae?.isPreFilled!==!0&&!w&&et,children:[ct(),t.jsx(Zp,{onClick:$t,"data-testid":z("vendor-name-text",b),children:ae!=null&&ae.name?t.jsx(nt,{text:ae.name,itemTextStyle:{color:y?D.colors.primary:D.colors.hero}}):t.jsx(Xp,{children:An})})]})})})]},Me);case"category":{const Ke=m?.lines!=null?m?.lines[l]:void 0;return t.jsxs(st,{windowSize:u,wrapperWidth:ue.width,className:"item-value-container",children:[t.jsx(oo,{isCOTEnabled:$,recommendations:ie,type:"category",isFirstColumn:!1,isReviewTab:et,isEnabled:!!i[Te]?.isPreFilled,isAccountOptionDisabled:pe,isMisCategorized:ln,onRecommendationClick:_,selectedValue:O,selectedValueLabel:Gt,existingOption:{label:Ke?.account?.accountName,value:Ke?.account?.qboId??Ke?.account?.accountId},cotTracking:L,lineId:i.lineId,transactionId:r.transactionId,openTooltipId:B,setOpenTooltipId:A}),t.jsx(lo,{children:J===!0?t.jsx(ao,{isHovered:y,children:t.jsxs(io,{onClick:zt=>{zt.stopPropagation(),F?.(),ye(!1),ot(!0)},"data-testid":z("category-selection-field",Y),style:{display:"inline-flex",alignItems:"center",color:Ye.brandColorGoldDark,cursor:"pointer",height:o.sp6},children:[t.jsx(so,{}),Rt.addCategory]})}):Pe===!0?t.jsx(Ct,{onClickAway:xt,children:t.jsx(Vi,{isHovered:y,"data-testid":z("category-selection-dropdown-container",Y),children:t.jsx(Zo,{name:Y,placeholder:Rt.addCategory,valueToId:zt=>Le(zt),type:"category",pageSource:"list_page",transactionStatus:et?"pending_review":"auto_categorized",showCOT:$,defaultValue:{selectedOption:O,allOptions:we},style:{display:"flex",flexGrow:1,width:"100%",cursor:"inherit"},registerOptions:{required:!1},menuIsOpen:Pe,autoFocus:!J&&(!O||i[Te]?.qboId!=null&&[x.expense?.qboId,x.income?.qboId].includes(i[Te].qboId)),onMenuClose:xt,customStyleConfig:h,disableCurrentOption:pe,menuPlacement:E,onCOTView:M})})}):t.jsx(ro,{isHovered:y,showOutline:ln&&i[Te]?.isPreFilled!==!0&&!w&&et,children:t.jsx(Hi,{onClick:le,"data-testid":z("category-label-text",Y),children:t.jsx(nt,{text:Gt??"",itemTextStyle:{color:y?D.colors.primary:D.colors.hero}})})})})]},Me)}case"class":{const Ke=m?.lines!=null?m?.lines[l]:void 0;return t.jsxs(st,{windowSize:u,wrapperWidth:ue.width,className:"item-value-container",children:[t.jsx(oo,{isCOTEnabled:$,recommendations:ie,type:"class",isFirstColumn:!1,isReviewTab:et,isEnabled:!!i[Ge]?.isPreFilled,isAccountOptionDisabled:pe,isMisCategorized:Zt,onRecommendationClick:_,selectedValue:k,selectedValueLabel:it,existingOption:{label:Ke?.class?.className,value:Ke?.class?.classId},cotTracking:L,lineId:i.lineId,transactionId:r.transactionId,openTooltipId:B,setOpenTooltipId:A}),t.jsx(lo,{children:ne===!0?t.jsx(ao,{isHovered:y,children:t.jsxs(io,{onClick:zt=>{zt.stopPropagation(),F?.(),N(!1),ce(!0)},"data-testid":z("class-selection-field",me),style:{display:"inline-flex",alignItems:"center",color:Ye.brandColorGoldDark,cursor:"pointer",height:o.sp6},children:[t.jsx(so,{}),Rt.addClass]})}):qe===!0?t.jsx(Ct,{onClickAway:It,children:t.jsx(Vi,{isHovered:y,"data-testid":z("class-selection-dropdown-container",me),children:t.jsx(Zo,{name:me,placeholder:Rt.addClass,valueToId:zt=>Ae(zt),type:"class",showCOT:$,defaultValue:{selectedOption:k,allOptions:Oe},pageSource:"list_page",transactionStatus:et?"pending_review":"auto_categorized",menuIsOpen:qe,registerOptions:{required:!1},style:{width:"100%"},autoFocus:!ne&&!k,customStyleConfig:h,onMenuClose:It,menuPlacement:E,onCOTView:M})})}):t.jsx(ro,{isHovered:y,showOutline:Zt&&i[Ge]?.isPreFilled!==!0&&!w&&et,children:t.jsx(Hi,{"data-testid":z("class-selection-field",me),onClick:Be,children:t.jsx(nt,{text:it??"",itemTextStyle:{color:y?D.colors.primary:D.colors.hero}})})})})]},Me)}case"date":return t.jsx(st,{windowSize:u,wrapperWidth:ue.width,children:t.jsx(an,{windowSize:u,isLastItem:be===bt.length-1,children:t.jsx(So,{"data-testid":z("date-field",At(b,Ge,l.toString())),children:t.jsx(Pp,{style:{color:y?D.colors.primary:D.colors.hero},children:H!=null?H.format(Ep.visual.MMMDCommaYYYYformat):null})})})},Me);case"transaction_type":return t.jsx(st,{windowSize:u,wrapperWidth:ue.width,children:t.jsx(an,{windowSize:u,"data-testid":z("transaction-type-field",At(b,Ge,l.toString())),isLastItem:be===bt.length-1,children:K!=null?t.jsx(dr,{textColor:y?new $o(D.colors.primary):ur(void 0,D),text:K??V}):null})},Me);case"memo":return t.jsx(st,{windowSize:u,wrapperWidth:ue.width,children:t.jsx(an,{style:{lineHeight:o.sp3},windowSize:u,isLastItem:be===bt.length-1,"data-testid":z("memo-field",At(b,Ge,l.toString())),children:Ce!=null?t.jsx(fe,{placement:"bottom",data:Ce,variant:"multi-information-points",children:t.jsx(Vp,{style:{color:y?D.colors.primary:D.colors.hero}})}):t.jsx(Np,{children:An})})},Me);case"amount":{const Ke=We("0,0.[00]",i.amount,!0);return t.jsx(st,{windowSize:u,style:{paddingRight:g[4]},wrapperWidth:ue.width,children:t.jsx(an,{windowSize:u,isLastItem:be===bt.length-1,children:t.jsx(So,{"data-testid":z("transaction-amount-field",At(b,Ge,l.toString())),style:{color:y?D.colors.primary:D.colors.hero},children:Ke})})},Me)}}});return t.jsx(t.Fragment,{children:Nn()})},_i=({isEnabled:e,isReviewTab:n,isMisCategorized:d,hasRecommendations:c,isTooltipVisible:h=!1})=>e?n?h?t.jsx(Up,{}):t.jsx(Hp,{}):h?t.jsx(Wp,{}):t.jsx(qp,{className:"ai-icon-selected-plain"}):!e&&d||c?h?t.jsx(Jp,{}):t.jsx(Kp,{}):null,Pi=({isFirstColumn:e,children:n})=>t.jsx(ra,{isFirstColumn:e,children:n}),oo=({recommendations:e,isCOTEnabled:n,type:d,isReviewTab:c,selectedValueLabel:h,isFirstColumn:p,isEnabled:i=!1,isMisCategorized:l=!1,selectedValue:r,existingOption:m,cotTracking:u,lineId:x,openTooltipId:y,transactionId:w,isAccountOptionDisabled:b,onRecommendationClick:C,setOpenTooltipId:I})=>{const f=s.useMemo(()=>`${w}:${x}:${d}`,[w,x,d]),$=y===f,E=gr().analytics,{createAlternateRecommendationCallback:L}=xr(),B=s.useCallback(H=>{const V=e[1],K=e[0];L(d,{currentValue:h??tn,transactionCurrentStatus:c?"pending_review":"auto_categorized",transactionPage:"list_page",cotTracking:u?{transactionId:w,lineId:x,onCOTView:(G,q,M,re)=>{u.onCOTView?.(G,q,M,re)}}:void 0},V,K)(H)},[L,e,h,c,d,u,x,w]),S=fr(e,d,n,m,"list_page",c?"pending_review":"auto_categorized",C,B,r,b),j=yr(e,d),A=s.useCallback(()=>{I(f);const H=S?.recommendations[0]?.cot??[],V=S?.recommendations[1]?.cot??[],K=V.length>0;if(E.trackTransactionCotView({recommendationFor:d,currentValue:h??tn,recommendation:S?.recommendations[0]?.name??tn,recommendationCot:H,isRecommendationCotAvailable:H.length>0,recommendationReason:S?.recommendations[0]?.reason??tn,recommendationConfidencePercentage:S?.recommendations[0]?.confidencePercentage??null,recommendationConfidenceLevel:Wo(Uo(S?.recommendations[0]?.confidencePercentage).toLocaleLowerCase()),alternativeRecommendation:S?.recommendations[1]?.name??tn,alternativeRecommendationCot:V,isAlternativeRecommendationCotAvailable:K,alternativeRecommendationReason:S?.recommendations[1]?.reason??tn,alternativeRecommendationConfidencePercentage:S?.recommendations[1]?.confidencePercentage??null,alternativeRecommendationConfidenceLevel:K?Wo(Uo(S?.recommendations[1]?.confidencePercentage).toLocaleLowerCase()):null,transactionCurrentStatus:c?"pending_review":"auto_categorized",transactionPage:"list_page"}),u?.onCOTView!=null){const G=Cr(S);G!=null&&u.onCOTView(x,w,d,G)}},[E,S,c,h,d,x,w,f,I]),T=s.useCallback(()=>{y===f&&I(void 0)},[y,f,I]),W=s.useMemo(()=>!r||!j?!1:e.some(H=>d==="vendor"&&H.vendor!=null?H.vendor.id===r||H.vendor.qboId===r:d==="category"&&H.account!=null?H.account.qboId===r||H.account.accountId===r:d==="class"&&H.class!=null?H.class.classId===r:!1),[r,j,e,d]);if(!j)return t.jsx(ra,{isFirstColumn:p});const F=i||W;return S?t.jsx(Pi,{isFirstColumn:p,children:t.jsx(fe,{variant:"chain-of-thought",data:S,placement:"bottom-start",disableIntersectionObserver:!0,position:"static",display:"block",open:$,style:{width:"auto",height:"auto"},leaveDelay:200,onOpen:A,onClose:T,children:t.jsx(Gp,{children:t.jsx(_i,{isEnabled:F,isReviewTab:c,isMisCategorized:l,hasRecommendations:j,isTooltipVisible:$})})})}):t.jsx(Pi,{isFirstColumn:p,children:t.jsx(_i,{isEnabled:F,isReviewTab:c,isMisCategorized:l,hasRecommendations:j,isTooltipVisible:$})})},aa=()=>{const e=Se(),n=s.useRef(null),[d,c]=s.useState(0);return s.useLayoutEffect(()=>{n.current&&c(n.current.offsetWidth)},[e]),t.jsx(Bp,{windowSize:e,ref:n,children:bt.map((h,p)=>{const i=`${p}${Rp}${h.key}`;switch(h.key){case"vendor":return t.jsx(st,{windowSize:e,wrapperWidth:h.width,children:t.jsx(an,{windowSize:e,isLastItem:p===bt.length-1,children:t.jsxs(So,{children:[t.jsx(Lo,{width:g[4],height:g[4]}),t.jsx(Bt,{width:d*h.width.value(e)/100,height:g[4],style:{display:"flex",alignItems:"center"}})]})})},i);default:return t.jsx(st,{windowSize:e,wrapperWidth:h.width,children:t.jsx(an,{windowSize:e,isLastItem:p===bt.length-1,children:t.jsx(Bt,{width:d*h.width.value(e)/100,height:g[4],style:{display:"flex",alignItems:"center"}})})},i)}})})},Bp=a.div`
1223
1223
  display: flex;
1224
1224
  background-color: ${e=>e.theme.colors.grey5};
1225
1225
  padding-left: ${e=>Dt.containerPaddingLeftRight.valuePx(e.windowSize)};
@@ -1261,7 +1261,7 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
1261
1261
  color: ${e=>e.theme.colors.hero};
1262
1262
  }
1263
1263
 
1264
- ${({isHovered:e,theme:n})=>e?Ye`
1264
+ ${({isHovered:e,theme:n})=>e?Ze`
1265
1265
  .ai-icon-selected-plain {
1266
1266
  color: ${n.colors.primary};
1267
1267
  }
@@ -1294,7 +1294,7 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
1294
1294
  :last-of-type {
1295
1295
  padding-right: ${o.sp0};
1296
1296
  }
1297
- `,_p=Ye`
1297
+ `,_p=Ze`
1298
1298
  word-break: break-word;
1299
1299
  white-space: nowrap;
1300
1300
  -webkit-line-clamp: 1;
@@ -1356,13 +1356,13 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
1356
1356
  width: ${o.sp5};
1357
1357
  margin-left: ${e=>e.isFirstColumn?o.sp2:o.sp0};
1358
1358
  height: 100%;
1359
- `,Zp=a.div`
1359
+ `,Gp=a.div`
1360
1360
  display: flex;
1361
1361
  align-items: center;
1362
1362
  justify-content: center;
1363
1363
  width: auto;
1364
1364
  cursor: pointer;
1365
- `,Yp=a(Fe)`
1365
+ `,Zp=a(Fe)`
1366
1366
  display: flex;
1367
1367
  max-width: calc(100% - ${o.sp6});
1368
1368
  flex: 1 1 auto;
@@ -1373,7 +1373,7 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
1373
1373
  display: flex;
1374
1374
  `,Ni=a.div`
1375
1375
  display: flex;
1376
- `,Gp=a.div`
1376
+ `,Yp=a.div`
1377
1377
  width: 100%;
1378
1378
  padding-left: 10px;
1379
1379
  margin-left: ${o.sp0};
@@ -1430,7 +1430,7 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
1430
1430
  min-height: 100%;
1431
1431
  flex-direction: column;
1432
1432
  row-gap: ${o.sp3};
1433
- `,{common:om,transactionDetail:{notCategorizedTooltipText:im}}=je.getLocalizedStrings(),co={rowGap:new ee(g[0],g[2],g[3])},sm=({selectedTab:e,transactionView:n,receiptUploadEndpoint:d,authParams:c,sectionId:h,isCOTEnabled:p,isDisabled:i,vendorSearchAutoCompleteActions:l,vendorSearchAutoCompleteData:r,setCurrentTransactionInAction:m,vendorLoadOptions:u,onTransactionCategorizationRowClick:x,onUpdateTransactionCategorizationUIState:y,onUpdateScrollYOffSetTransactionCategorizationUIState:w,onFetchTransactionCategorizationList:b,containerRef:C,cotTracking:I,isUncategorizedExpenseCategoryEnabled:f})=>{const $=Se(),[E,L]=s.useState(void 0),{fetchState:B,uiState:S,transactionLocalData:j,selectedCheckBoxTransactionIds:A,transactionIdsWithUnsavedData:T,transactions:W,uncategorizedAccounts:F}=n,H=s.useRef(null),V=s.useRef({}),{control:K}=To();s.useEffect(()=>{H.current?.resetAfterIndex(0,!0)},[$,H,j]),s.useEffect(()=>{H.current?.scrollTo(S.scrollPosition?.scrollTop??0)},[e]);const Z=s.useCallback(R=>{if(V.current?.[R]!=null){const J=$==="small"&&S.pageToken==null&&R===j.length-1?co.rowGap.value("medium-regular"):co.rowGap.value($);return V.current[R]+J}if(j[R]==null)return 0;const ne=j[R].transactionReviewLocalData,N=Object.keys(ne.lineItemById).length;return N!=null&&!isNaN(N)&&N>1?Mi*N+co.rowGap.value($)*(N-1):Mi},[j,$,S.pageToken,S.sortKey,S.sortOrder]),q=s.useCallback((R,ne)=>{V.current={...V.current,[R]:ne},H.current?.resetAfterIndex(0,!0)},[$,H,j,S.sortKey,S.sortOrder]),M=s.useCallback(()=>{(S.pageToken!=null&&n.refreshStatus.fetchState!=="In-Progress"||n.refreshStatus.fetchState==="Completed")&&b(e,S.searchString,!0,S.pageToken,!0,!1)},[n.refreshStatus.fetchState,b,e,S.pageToken,S.searchString,S.sortKey,S.sortOrder]),re=s.useCallback(()=>{S.pageToken!=null&&M()},[M,S.pageToken,S.sortKey,S.sortOrder]),Ce=tr(R=>w(e,{scrollPosition:{scrollTop:R}}),1e3,{trailing:!0}),Q=R=>R<n.transactionLocalData.length,G=(R,ne)=>{y(e,{sortOrder:ne,sortKey:R}),b(e,S.searchString,!1,null,!1,!0)},me=R=>{if(e==="autoCategorized")return!A.includes(R);const ne=j.find(J=>J.transactionId===R)?.transactionReviewLocalData,N=W.find(J=>J.id===R);return N!=null&&ne!=null?Dr(N,ne,F,f)?f===!0&&Jo(F,ne.lineItemById,["expense"])?T.includes(R)===!1:!1:!0:A.length===0?!0:!A.includes(R)};let _=[],D=[];(B==="Completed"||n.transactionLocalData.length>0)&&(D=n.transactionLocalData.map((R,ne)=>{const N=me(R.transactionId);let J=!1;f===!0&&N===!0&&e==="review"&&Jo(F,R.transactionReviewLocalData.lineItemById,["expense"])&&(J=!T.includes(R.transactionId));const ye=R.transactionReviewLocalData;return{label:t.jsx(Dp,{transactionView:n,sectionId:`${h}.${ne}.${sa}`,transaction:R,receiptUploadEndpoint:d,authParams:c,onTransactionCategorizationRowClick:x,vendorLoadOptions:u,setCurrentTransactionInAction:m,vendorSearchAutoCompleteActions:l,vendorSearchAutoCompleteData:r,selectedTab:e,containerRef:C,listContainerRef:H,isCOTEnabled:p,cotTracking:I,openTooltipId:E,setOpenTooltipId:L,isUncategorizedExpenseCategoryEnabled:f},`${R.transactionId}.${ye.transactionType}`),value:R.transactionId,defaultChecked:!1,groupLabel:!1,isException:J,exceptionMode:J===!0?"checked_or_hover":void 0,isSticky:!0,isDisabled:N===!0?"readonly":void 0,exceptionType:J===!0?"alert":void 0,exceptionInfo:J===!0?im:void 0,exceptionTooltipStyle:{textAlign:"center",maxWidth:"250px",padding:`12px ${o.sp2}`}}}),_=D.map(R=>R.value));const Y={label:"All",value:"allTransactionOptionId",defaultChecked:!1,groupLabel:!1},{title:P,subTitle:k}=Ne("transaction_categorization").allDoneText,O=j.map(R=>R.transactionId),U=s.useMemo(()=>n.totalCountByTab[e],[e,n.totalCountByTab]),oe=s.useMemo(()=>j.reduce((R,ne)=>{const N=Object.keys(ne.transactionReviewLocalData.lineItemById).length;return R+(N>0?N:1)},0)<n.totalCountByTab[e]?j.length+1:j.length,[j,n.totalCountByTab,e]);return t.jsx(dm,{windowSize:$,"data-testid":z("transaction-categorization-list-wrapper"),children:t.jsx(um,{windowSize:$,"data-testid":z("transaction-categorization-list-container"),children:B==="Error"?t.jsxs(pm,{windowSize:$,"data-testid":z("transaction-categorization-reload-page"),children:[t.jsx(mm,{onClick:()=>b(e,void 0,!0,null,!1,!0),"data-testid":z("transaction-categorization-reload-icon"),children:t.jsx(ko,{})}),t.jsx(gm,{"data-testid":z("transaction-categorization-reload-label"),children:om.reloadPage.label})]}):B==="Completed"&&j.length===0?t.jsx(vt,{tab:"transaction_categorization",title:P,subTitle:k,"data-testid":z("transaction-categorization-empty-table-section")}):B==="Not-Started"||B==="In-Progress"&&j.length===0?t.jsx(em,{sortConfig:{sortKey:S.sortKey,sortOrder:S.sortOrder},fetchState:B,onColumnSortConfigChanged:G,"data-testid":z("transaction-categorization-list-empty-table")}):t.jsx(hm,{windowSize:$,"data-testid":z("transaction-categorization-list-view"),children:t.jsx(ys,{control:K,name:"selectedTransactionIds",defaultValue:[],render:({field:{value:R,ref:ne,onChange:N}})=>t.jsx(la.Provider,{value:{value:R,mode:"off",allCheckBoxValues:_,index:0,sortKey:S.sortKey,sortOrder:S.sortOrder,fetchState:B,isDisabled:i,groupLabelCheckBox:Y,onColumnSortConfigChanged:G,ref:ne,onChange:N,selectedTab:e},children:t.jsx(Fn,{children:({height:J,width:ye})=>t.jsx(nr,{isItemLoaded:Q,itemCount:U,loadMoreItems:re,children:({onItemsRendered:ke,ref:ge})=>t.jsx(Mn,{ref:v=>{ge(v),H.current=v},height:J,itemCount:oe,itemKey:v=>j[v]?.transactionId,innerElementType:am,onItemsRendered:ke,width:ye,style:{willChange:"auto"},overscanCount:tp,itemSize:Z,itemData:{checkboxes:D,value:R,allCheckBoxValues:_,groupLabelCheckBox:Y,categorizationGroupValue:O,transactionLocalData:j,mode:"always_on",setRowHeight:q,isItemLoaded:Q,ref:ge,onChange:N,selectedCheckBoxTransactionIds:A},initialScrollOffset:n.uiState.scrollPosition?.scrollTop,onScroll:({scrollOffset:v})=>{Ce(v)},children:lm})})})})})})})})},am=e=>{const{value:n,allCheckBoxValues:d,groupLabelCheckBox:c,index:h,isDisabled:p,fetchState:i,sortKey:l,sortOrder:r,mode:m,ref:u,onChange:x,onColumnSortConfigChanged:y}=rm(),{children:w,style:b,...C}=e;return i==="Completed"?t.jsxs(xm,{ref:u,style:{...b,width:"auto"},...C,children:[t.jsx(fm,{children:t.jsx(js,{selectionLimit:xn,value:n,checkBox:{label:t.jsx(cm,{children:t.jsx(ia,{sortConfig:{sortKey:l,sortOrder:r},isDisabled:p,onColumnSortConfigChanged:y})}),value:"allTransactionOptionId",defaultChecked:!1,groupLabel:!1},isDisabled:"disabled",groupLabelCheckBox:c,allCheckBoxValues:d,mode:m,draggable:!1,checkBoxStyle:{padding:20},labelCheckBoxStyle:{padding:o.sp3},name:"transactionCategorizationHeader",index:h,onChangeHandler:I=>ks({event:I,value:n,allCheckBoxValues:d,groupLabelCheckBox:c,onChange:x}),ref:u})}),t.jsx(ym,{children:w})]},`${d[h]}-${h}`):null},la=s.createContext(void 0),rm=()=>{const e=s.useContext(la);if(!e)throw new Error("useStickyContext must be used within a StickyProvider");return e},lm=({index:e,style:n,data:d})=>{const{checkboxes:c,value:h,groupLabelCheckBox:p,categorizationGroupValue:i,allCheckBoxValues:l,transactionLocalData:r,isItemLoaded:m,setRowHeight:u,ref:x,onChange:y,selectedCheckBoxTransactionIds:w}=d,b=s.useRef(null),C=Se();if(s.useEffect(()=>{b.current?.firstElementChild!=null&&u(e,b.current.firstElementChild.clientHeight)},[e,b,C,r[e]?.transactionReviewLocalData]),m(e)===!0){const I=c[e];return t.jsx(Wi,{style:{...n,paddingBottom:o.sp0,paddingRight:o.sp8,width:"100%",flex:"1"},ref:b,children:t.jsx(js,{selectionLimit:xn,checkBox:I,value:h,groupLabelCheckBox:p,allCheckBoxValues:l,mode:I.isDisabled==="readonly"||w.includes(I.value)===!1&&w.length>=xn?"off":"always_on",draggable:!1,isDisabled:I.isDisabled,checkBoxStyle:{padding:20},labelCheckBoxStyle:{padding:o.sp3},infoIconContainerStyle:{padding:20},name:`${qt}.${h}`,ref:x,index:e,onChangeHandler:f=>ks({event:f,value:h,allCheckBoxValues:l,groupLabelCheckBox:p,onChange:y})})},i[e])}else return t.jsx(Wi,{style:{...n,paddingBottom:o.sp0,paddingRight:o.sp8,width:"100%",flex:"1"},ref:b,children:t.jsx(Cm,{children:t.jsx(aa,{})})},cs())},cm=a.div`
1433
+ `,{common:om,transactionDetail:{notCategorizedTooltipText:im}}=je.getLocalizedStrings(),co={rowGap:new ee(g[0],g[2],g[3])},sm=({selectedTab:e,transactionView:n,receiptUploadEndpoint:d,authParams:c,sectionId:h,isCOTEnabled:p,isDisabled:i,vendorSearchAutoCompleteActions:l,vendorSearchAutoCompleteData:r,setCurrentTransactionInAction:m,vendorLoadOptions:u,onTransactionCategorizationRowClick:x,onUpdateTransactionCategorizationUIState:y,onUpdateScrollYOffSetTransactionCategorizationUIState:w,onFetchTransactionCategorizationList:b,containerRef:C,cotTracking:I,isUncategorizedExpenseCategoryEnabled:f})=>{const $=Se(),[E,L]=s.useState(void 0),{fetchState:B,uiState:S,transactionLocalData:j,selectedCheckBoxTransactionIds:A,transactionIdsWithUnsavedData:T,transactions:W,uncategorizedAccounts:F}=n,H=s.useRef(null),V=s.useRef({}),{control:K}=To();s.useEffect(()=>{H.current?.resetAfterIndex(0,!0)},[$,H,j]),s.useEffect(()=>{H.current?.scrollTo(S.scrollPosition?.scrollTop??0)},[e]);const G=s.useCallback(R=>{if(V.current?.[R]!=null){const J=$==="small"&&S.pageToken==null&&R===j.length-1?co.rowGap.value("medium-regular"):co.rowGap.value($);return V.current[R]+J}if(j[R]==null)return 0;const ne=j[R].transactionReviewLocalData,N=Object.keys(ne.lineItemById).length;return N!=null&&!isNaN(N)&&N>1?Mi*N+co.rowGap.value($)*(N-1):Mi},[j,$,S.pageToken,S.sortKey,S.sortOrder]),q=s.useCallback((R,ne)=>{V.current={...V.current,[R]:ne},H.current?.resetAfterIndex(0,!0)},[$,H,j,S.sortKey,S.sortOrder]),M=s.useCallback(()=>{(S.pageToken!=null&&n.refreshStatus.fetchState!=="In-Progress"||n.refreshStatus.fetchState==="Completed")&&b(e,S.searchString,!0,S.pageToken,!0,!1)},[n.refreshStatus.fetchState,b,e,S.pageToken,S.searchString,S.sortKey,S.sortOrder]),re=s.useCallback(()=>{S.pageToken!=null&&M()},[M,S.pageToken,S.sortKey,S.sortOrder]),Ce=tr(R=>w(e,{scrollPosition:{scrollTop:R}}),1e3,{trailing:!0}),Q=R=>R<n.transactionLocalData.length,Y=(R,ne)=>{y(e,{sortOrder:ne,sortKey:R}),b(e,S.searchString,!1,null,!1,!0)},me=R=>{if(e==="autoCategorized")return!A.includes(R);const ne=j.find(J=>J.transactionId===R)?.transactionReviewLocalData,N=W.find(J=>J.id===R);return N!=null&&ne!=null?Dr(N,ne,F,f)?f===!0&&Jo(F,ne.lineItemById,["expense"])?T.includes(R)===!1:!1:!0:A.length===0?!0:!A.includes(R)};let _=[],D=[];(B==="Completed"||n.transactionLocalData.length>0)&&(D=n.transactionLocalData.map((R,ne)=>{const N=me(R.transactionId);let J=!1;f===!0&&N===!0&&e==="review"&&Jo(F,R.transactionReviewLocalData.lineItemById,["expense"])&&(J=!T.includes(R.transactionId));const ye=R.transactionReviewLocalData;return{label:t.jsx(Dp,{transactionView:n,sectionId:`${h}.${ne}.${sa}`,transaction:R,receiptUploadEndpoint:d,authParams:c,onTransactionCategorizationRowClick:x,vendorLoadOptions:u,setCurrentTransactionInAction:m,vendorSearchAutoCompleteActions:l,vendorSearchAutoCompleteData:r,selectedTab:e,containerRef:C,listContainerRef:H,isCOTEnabled:p,cotTracking:I,openTooltipId:E,setOpenTooltipId:L,isUncategorizedExpenseCategoryEnabled:f},`${R.transactionId}.${ye.transactionType}`),value:R.transactionId,defaultChecked:!1,groupLabel:!1,isException:J,exceptionMode:J===!0?"checked_or_hover":void 0,isSticky:!0,isDisabled:N===!0?"readonly":void 0,exceptionType:J===!0?"alert":void 0,exceptionInfo:J===!0?im:void 0,exceptionTooltipStyle:{textAlign:"center",maxWidth:"250px",padding:`12px ${o.sp2}`}}}),_=D.map(R=>R.value));const Z={label:"All",value:"allTransactionOptionId",defaultChecked:!1,groupLabel:!1},{title:P,subTitle:k}=Ne("transaction_categorization").allDoneText,O=j.map(R=>R.transactionId),U=s.useMemo(()=>n.totalCountByTab[e],[e,n.totalCountByTab]),oe=s.useMemo(()=>j.reduce((R,ne)=>{const N=Object.keys(ne.transactionReviewLocalData.lineItemById).length;return R+(N>0?N:1)},0)<n.totalCountByTab[e]?j.length+1:j.length,[j,n.totalCountByTab,e]);return t.jsx(dm,{windowSize:$,"data-testid":z("transaction-categorization-list-wrapper"),children:t.jsx(um,{windowSize:$,"data-testid":z("transaction-categorization-list-container"),children:B==="Error"?t.jsxs(pm,{windowSize:$,"data-testid":z("transaction-categorization-reload-page"),children:[t.jsx(mm,{onClick:()=>b(e,void 0,!0,null,!1,!0),"data-testid":z("transaction-categorization-reload-icon"),children:t.jsx(ko,{})}),t.jsx(gm,{"data-testid":z("transaction-categorization-reload-label"),children:om.reloadPage.label})]}):B==="Completed"&&j.length===0?t.jsx(vt,{tab:"transaction_categorization",title:P,subTitle:k,"data-testid":z("transaction-categorization-empty-table-section")}):B==="Not-Started"||B==="In-Progress"&&j.length===0?t.jsx(em,{sortConfig:{sortKey:S.sortKey,sortOrder:S.sortOrder},fetchState:B,onColumnSortConfigChanged:Y,"data-testid":z("transaction-categorization-list-empty-table")}):t.jsx(hm,{windowSize:$,"data-testid":z("transaction-categorization-list-view"),children:t.jsx(ys,{control:K,name:"selectedTransactionIds",defaultValue:[],render:({field:{value:R,ref:ne,onChange:N}})=>t.jsx(la.Provider,{value:{value:R,mode:"off",allCheckBoxValues:_,index:0,sortKey:S.sortKey,sortOrder:S.sortOrder,fetchState:B,isDisabled:i,groupLabelCheckBox:Z,onColumnSortConfigChanged:Y,ref:ne,onChange:N,selectedTab:e},children:t.jsx(Fn,{children:({height:J,width:ye})=>t.jsx(nr,{isItemLoaded:Q,itemCount:U,loadMoreItems:re,children:({onItemsRendered:ke,ref:ge})=>t.jsx(Mn,{ref:v=>{ge(v),H.current=v},height:J,itemCount:oe,itemKey:v=>j[v]?.transactionId,innerElementType:am,onItemsRendered:ke,width:ye,style:{willChange:"auto"},overscanCount:tp,itemSize:G,itemData:{checkboxes:D,value:R,allCheckBoxValues:_,groupLabelCheckBox:Z,categorizationGroupValue:O,transactionLocalData:j,mode:"always_on",setRowHeight:q,isItemLoaded:Q,ref:ge,onChange:N,selectedCheckBoxTransactionIds:A},initialScrollOffset:n.uiState.scrollPosition?.scrollTop,onScroll:({scrollOffset:v})=>{Ce(v)},children:lm})})})})})})})})},am=e=>{const{value:n,allCheckBoxValues:d,groupLabelCheckBox:c,index:h,isDisabled:p,fetchState:i,sortKey:l,sortOrder:r,mode:m,ref:u,onChange:x,onColumnSortConfigChanged:y}=rm(),{children:w,style:b,...C}=e;return i==="Completed"?t.jsxs(xm,{ref:u,style:{...b,width:"auto"},...C,children:[t.jsx(fm,{children:t.jsx(js,{selectionLimit:xn,value:n,checkBox:{label:t.jsx(cm,{children:t.jsx(ia,{sortConfig:{sortKey:l,sortOrder:r},isDisabled:p,onColumnSortConfigChanged:y})}),value:"allTransactionOptionId",defaultChecked:!1,groupLabel:!1},isDisabled:"disabled",groupLabelCheckBox:c,allCheckBoxValues:d,mode:m,draggable:!1,checkBoxStyle:{padding:20},labelCheckBoxStyle:{padding:o.sp3},name:"transactionCategorizationHeader",index:h,onChangeHandler:I=>ks({event:I,value:n,allCheckBoxValues:d,groupLabelCheckBox:c,onChange:x}),ref:u})}),t.jsx(ym,{children:w})]},`${d[h]}-${h}`):null},la=s.createContext(void 0),rm=()=>{const e=s.useContext(la);if(!e)throw new Error("useStickyContext must be used within a StickyProvider");return e},lm=({index:e,style:n,data:d})=>{const{checkboxes:c,value:h,groupLabelCheckBox:p,categorizationGroupValue:i,allCheckBoxValues:l,transactionLocalData:r,isItemLoaded:m,setRowHeight:u,ref:x,onChange:y,selectedCheckBoxTransactionIds:w}=d,b=s.useRef(null),C=Se();if(s.useEffect(()=>{b.current?.firstElementChild!=null&&u(e,b.current.firstElementChild.clientHeight)},[e,b,C,r[e]?.transactionReviewLocalData]),m(e)===!0){const I=c[e];return t.jsx(Wi,{style:{...n,paddingBottom:o.sp0,paddingRight:o.sp8,width:"100%",flex:"1"},ref:b,children:t.jsx(js,{selectionLimit:xn,checkBox:I,value:h,groupLabelCheckBox:p,allCheckBoxValues:l,mode:I.isDisabled==="readonly"||w.includes(I.value)===!1&&w.length>=xn?"off":"always_on",draggable:!1,isDisabled:I.isDisabled,checkBoxStyle:{padding:20},labelCheckBoxStyle:{padding:o.sp3},infoIconContainerStyle:{padding:20},name:`${qt}.${h}`,ref:x,index:e,onChangeHandler:f=>ks({event:f,value:h,allCheckBoxValues:l,groupLabelCheckBox:p,onChange:y})})},i[e])}else return t.jsx(Wi,{style:{...n,paddingBottom:o.sp0,paddingRight:o.sp8,width:"100%",flex:"1"},ref:b,children:t.jsx(Cm,{children:t.jsx(aa,{})})},cs())},cm=a.div`
1434
1434
  flex: 1;
1435
1435
  width: auto;
1436
1436
  padding-right: ${o.sp8};
@@ -1493,7 +1493,7 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
1493
1493
  height: 100%;
1494
1494
  `,Cm=a.div`
1495
1495
  padding-left: ${o.sp8};
1496
- `,wm=({selectedTab:e,transactionView:n,receiptUploadEndpoint:d,authParams:c,sectionId:h,vendorSearchAutoCompleteData:p,vendorSearchAutoCompleteActions:i,isCOTEnabled:l,setCurrentFooterFormId:r,setLocalDataForCategoryAndClass:m,onTransactionCategorizationRowClick:u,onUpdateTransactionCategorizationUIState:x,onUpdateScrollYOffSetTransactionCategorizationUIState:y,onFetchTransactionCategorizationList:w,onSaveUpdateTransactionCategorization:b,onUpdateSelectedCheckboxTransactionIds:C,onFetchRecommendationsForEntityCategorization:I,onFetchRecommendationsForEntityCategorizationWithCustomer:f})=>{const[$,E]=s.useState({transactionId:void 0,lineItemId:void 0}),L=s.useRef(),B=s.useRef({}),{useDynamicConfig:S}=ps(),{configValue:j}=S(ms.enableUncategorizedExpenseCategory),A=j?.uncategorized_expense_category_enabled===!0,T=(_,D,Y,P)=>{const k={...B.current};k[D]==null&&(k[D]=[]);let O=k[D].findIndex(U=>U.lineId===_);if(O===-1){const U={lineId:_,category:{recommendationTypesViewed:[]},class:{recommendationTypesViewed:[]},vendor:{recommendationTypesViewed:[]}};k[D].push(U),O=k[D].length-1}else{const U=k[D][O];k[D][O]={...U,category:{...U.category,recommendationTypesViewed:[...U.category.recommendationTypesViewed]},class:{...U.class,recommendationTypesViewed:[...U.class.recommendationTypesViewed]},vendor:{...U.vendor,recommendationTypesViewed:[...U.vendor.recommendationTypesViewed]}}}P!=null&&P!==""&&!k[D][O][Y].recommendationTypesViewed.includes(P)&&k[D][O][Y].recommendationTypesViewed.push(P),B.current=k},{transactions:W,transactionLocalData:F,accountsHierarchyList:H,classHierarchyList:V,accountList:K,classList:Z,selectedCheckBoxTransactionIds:q,uncategorizedAccounts:M}=n,re=Kt({mode:"all",reValidateMode:"onChange",defaultValues:s.useMemo(()=>qi(q,F,H,V,p.entityAutoCompleteView),[H,V,q,F,p.entityAutoCompleteView]),values:s.useMemo(()=>qi(q,F,H,V,p.entityAutoCompleteView),[H,V,q,F,p.entityAutoCompleteView]),resetOptions:{keepDefaultValues:!0,keepDirty:!1}});s.useEffect(()=>()=>{r("expenseAutomationPage")},[]),s.useEffect(()=>{q.length>0?r(no):r("expenseAutomationPage")},[q,r]);const Ce=re.handleSubmit(_=>{const D=_[Bn],Y=B.current;b(e,D,Y),D.forEach(P=>{delete B.current[P]})}),Q=async(_,D)=>{if(_!=null){if(_===Bn){const Y=re.getValues(Bn);if(Y.length<q.length){C(e,Y);return}if(Y.length===xn){C(e,Y);return}const P=Y[Y.length-1],k=D[qt].findIndex(U=>U.transactionId===P),O=re.getValues(`${qt}.${k}.lineInfo`);if(O!=null){let U=!1;if(O.every(oe=>(U=un(M,oe[Te].selectedOption,A?["income"]:void 0),!!oe[Te].selectedOption&&oe[Te].selectedOption!=null&&!U&&!!oe[Ze].selectedOption&&!!oe[rt].selectedOption))===!0){C(e,Y);return}else{const oe=Y.filter(R=>R!==P);C(e,oe);return}}return}if(_.includes(Te)===!0||_.includes(Ze)===!0){const Y=parseInt(_.split(".")[1]),P=parseInt(_.split(".")[3]),k=re.getValues(`${qt}.${Y}.lineInfo`),O=k[P];if(_.includes(Te)||_.includes(Ze)){const{transactionId:U,lineId:oe,recommendations:R}=O;if(k!=null){const ne=O[Te].selectedOption,N=O[Ze].selectedOption,J=O[rt].selectedOption,ye=O[rt].selectedOption,ke=O[rt].defaultOptions,ge=ke?.find(ce=>ce.options?.find(Pe=>Pe.value===J))?.options?.find(ce=>ce.value===J)?.label,v=ke?.find(ce=>ce.options?.find(Pe=>Pe.value===ye))?.options?.find(ce=>ce.value===ye)?.label,ie=p.entityAutoCompleteView.vendor.find(ce=>ce.qboId===J),we=p.entityAutoCompleteView.customer.find(ce=>ce.qboId===ye),Oe=R.find(ce=>ce.vendor?.qboId===J)?.vendor,Le=J||ie?.qboId||Oe?.qboId?{id:J??ie?.qboId??Oe?.qboId??"",name:ge??ie?.name??Oe?.name??"",logo:ie?.logo??Oe?.logo}:void 0,Ae=ye||we?.qboId?{id:ye??we?.qboId??"",name:v??we?.name??"",logo:we?.logo}:void 0,pe=K.find(ce=>ce.qboId===ne),Xe=Z.find(ce=>ce.classId===N),Ue=n.transactionLocalData.find(ce=>ce.transactionId===U)?.transactionReviewLocalData.lineItemById[oe].account,qe=n.transactionLocalData.find(ce=>ce.transactionId===U)?.transactionReviewLocalData.lineItemById[oe].class;m(e,U,oe,W,Le?.id,Ae?.id,_.includes(Te)&&pe!=null?{...pe,isPreFilled:!1}:Ue,_.includes(Ze)&&Xe!=null?{...Xe,isPreFilled:!1}:qe,void 0,R,A)}return}}if(_.includes(rt)){const Y=parseInt(_.split(".")[1]),P=parseInt(_.split(".")[3]),k=re.getValues(`${qt}.${Y}.lineInfo`);if(k!=null){const O=k[P],{transactionId:U,recommendations:oe}=O,R=O[rt].selectedOption,ne=O[rt].selectedOption,N=O[rt].defaultOptions,J=N?.flatMap(pe=>pe.options)?.find(pe=>pe.value===R)?.label,ye=N?.flatMap(pe=>pe.options)?.find(pe=>pe.value===ne)?.label,ke=p.entityAutoCompleteView.vendor.find(pe=>pe.qboId===R),ge=p.entityAutoCompleteView.customer.find(pe=>pe.qboId===ne),v=oe.find(pe=>pe.vendor?.qboId===R)?.vendor,ie=R!==""&&R!=null?R:J!==""&&J!=null?J:"",we=(ke?.qboId!=null&&ke.qboId!==""?ke.qboId:null)??(v?.qboId!=null&&v.qboId!==""?v.qboId:null)??(R!=null&&R!==""?R:null),Oe={id:we??J??"",name:J??ke?.name??v?.name??"",logo:ke?.logo??v?.logo},Le=ge?.qboId!=null&&ge.qboId!==""?{id:ge.qboId??ne??"",name:ye??ge.name??"",logo:ge.logo}:void 0,Ae=W.find(pe=>pe.id===U);if(Ae!=null){const pe=n.transactionLocalData.find(Pe=>Pe.transactionId===Ae.id)?.transactionReviewLocalData,Xe=pe?.lineItemById[O.lineId],Ue=Vt(Ae)===!0?pe?.selectedEntity:Xe?.selectedEntityLine,qe=Le?.id!=null&&Le.id!==""?{id:Le.id,name:Le.name,type:"customer",qboId:Le.id,zeniId:Le.id,logo:Le.logo}:Oe.id!==""&&Oe.id!=null?{id:ie,name:J??ie,type:"vendor",qboId:ie,zeniId:ie,logo:Oe.logo,isPreFilled:Ue?.id===we&&Ue?.isPreFilled}:void 0,ce={transactionId:{id:Ae.id,type:Ae.type},transaction:Ae,lineIds:Ae.type!=="journal_entry"?Ae.lines?.map(Pe=>Pe.id)??[]:[O.lineId]};qe?.type==="customer"?f(O.amount.amount,ce,!1,e,qe,Le,A):I(O.amount.amount,ce,!1,e,qe,Oe,A)}}i.onCancelAutoComplete?.();return}}};s.useEffect(()=>{const _=re.watch((D,{name:Y})=>{Y!=null&&D!=null&&yn(()=>Q(Y,D))});return()=>{_.unsubscribe()}}),s.useEffect(()=>{if(p.entityAutoCompleteView.fetchState==="Completed"){const _=n.transactionLocalData.find(D=>D.transactionId===$.transactionId);if(_){const{transactionReviewLocalData:D}=_,{selectedEntity:Y}=D,P=$?.lineItemId??D.sortedLineItems[0],k=D.lineItemById[P],O=k.selectedEntityLine;L.current?.(Io(p.entityAutoCompleteView,Y??O,k?.recommendationsWithCOT??[]))}E({transactionId:void 0,lineItemId:void 0})}},[p.entityAutoCompleteView.fetchState]);const G=(_,D)=>{i.onAutoCompleteInputChange?.(_),L.current=D},me=s.useRef(null);return t.jsx(vm,{ref:me,"data-testid":z("transaction-categorization-list-page"),children:t.jsx(Jt,{...re,children:t.jsx("form",{id:Ui(no),onSubmit:Ce,style:{height:"100%",width:"100%"},"data-testid":z(Ui(no)),children:t.jsx(sm,{selectedTab:e,sectionId:h,transactionView:n,receiptUploadEndpoint:d,authParams:c,setCurrentTransactionInAction:E,onUpdateTransactionCategorizationUIState:x,onUpdateScrollYOffSetTransactionCategorizationUIState:y,onFetchTransactionCategorizationList:w,onTransactionCategorizationRowClick:u,vendorLoadOptions:G,vendorSearchAutoCompleteData:p,vendorSearchAutoCompleteActions:i,containerRef:me,isCOTEnabled:l,cotTracking:{onCOTView:T},isUncategorizedExpenseCategoryEnabled:A})})})})},Ui=e=>`${e}_form`,qi=(e,n,d,c,h)=>({[qt]:n.map(p=>bm(p.transactionId,p.transactionReviewLocalData,d,c,h)),[Bn]:e}),bm=(e,n,d,c,h)=>{const{lineItemById:p,sortedLineItems:i,selectedEntity:l}=n,r=Object.values(p).sort((u,x)=>i.indexOf(u.lineId)-i.indexOf(x.lineId)),m=r[0]?.lineId;return{[sa]:r.map(u=>{const x=u.account?.qboId??u.account?.accountId,y=u.class?.classId,w=u.selectedEntityLine;return{id:u.id,transactionId:u.transactionId,type:u.type,amount:u.amount,lineDetailType:u.lineDetailType,platformLineDetailType:u.platformLineDetailType,lineTransactionType:u.lineTransactionType,postingType:u.postingType,postingTypeName:u.postingTypeName,customer:u.customer,vendor:u.vendor,billable:u.billable,item:u.item,isCategoryMiscategorized:u.isCategoryMiscategorized,isClassMiscategorized:u.isClassMiscategorized,lineId:u.id,[Te]:{selectedOption:x,allOptions:Ss(d,u.recommendationsWithCOT)},[Ze]:{selectedOption:y,allOptions:vs(c,u.recommendationsWithCOT)},[rt]:{selectedOption:l?.id??w?.id??l?.name??w?.name,defaultOptions:Io(h,l??w,n.lineItemById[m]?.recommendationsWithCOT??[])},[Ip]:u.lineEntity,[$p]:u.recommendationsWithCOT??[]}}),transactionId:e,[Tp]:n.vendorDetails!=null&&n.vendorDetails.id!=null?{id:n.vendorDetails.id,qboId:n.vendorDetails.qboId,name:n.vendorDetails.name}:void 0,[Lp]:n.customerDetails!=null&&n.customerDetails.id!=null?{id:n.customerDetails.id,qboId:n.customerDetails.qboId,name:n.customerDetails.name}:void 0}},vm=a.div`
1496
+ `,wm=({selectedTab:e,transactionView:n,receiptUploadEndpoint:d,authParams:c,sectionId:h,vendorSearchAutoCompleteData:p,vendorSearchAutoCompleteActions:i,isCOTEnabled:l,setCurrentFooterFormId:r,setLocalDataForCategoryAndClass:m,onTransactionCategorizationRowClick:u,onUpdateTransactionCategorizationUIState:x,onUpdateScrollYOffSetTransactionCategorizationUIState:y,onFetchTransactionCategorizationList:w,onSaveUpdateTransactionCategorization:b,onUpdateSelectedCheckboxTransactionIds:C,onFetchRecommendationsForEntityCategorization:I,onFetchRecommendationsForEntityCategorizationWithCustomer:f})=>{const[$,E]=s.useState({transactionId:void 0,lineItemId:void 0}),L=s.useRef(),B=s.useRef({}),{useDynamicConfig:S}=ps(),{configValue:j}=S(ms.enableUncategorizedExpenseCategory),A=j?.uncategorized_expense_category_enabled===!0,T=(_,D,Z,P)=>{const k={...B.current};k[D]==null&&(k[D]=[]);let O=k[D].findIndex(U=>U.lineId===_);if(O===-1){const U={lineId:_,category:{recommendationTypesViewed:[]},class:{recommendationTypesViewed:[]},vendor:{recommendationTypesViewed:[]}};k[D].push(U),O=k[D].length-1}else{const U=k[D][O];k[D][O]={...U,category:{...U.category,recommendationTypesViewed:[...U.category.recommendationTypesViewed]},class:{...U.class,recommendationTypesViewed:[...U.class.recommendationTypesViewed]},vendor:{...U.vendor,recommendationTypesViewed:[...U.vendor.recommendationTypesViewed]}}}P!=null&&P!==""&&!k[D][O][Z].recommendationTypesViewed.includes(P)&&k[D][O][Z].recommendationTypesViewed.push(P),B.current=k},{transactions:W,transactionLocalData:F,accountsHierarchyList:H,classHierarchyList:V,accountList:K,classList:G,selectedCheckBoxTransactionIds:q,uncategorizedAccounts:M}=n,re=Kt({mode:"all",reValidateMode:"onChange",defaultValues:s.useMemo(()=>qi(q,F,H,V,p.entityAutoCompleteView),[H,V,q,F,p.entityAutoCompleteView]),values:s.useMemo(()=>qi(q,F,H,V,p.entityAutoCompleteView),[H,V,q,F,p.entityAutoCompleteView]),resetOptions:{keepDefaultValues:!0,keepDirty:!1}});s.useEffect(()=>()=>{r("expenseAutomationPage")},[]),s.useEffect(()=>{q.length>0?r(no):r("expenseAutomationPage")},[q,r]);const Ce=re.handleSubmit(_=>{const D=_[Bn],Z=B.current;b(e,D,Z),D.forEach(P=>{delete B.current[P]})}),Q=async(_,D)=>{if(_!=null){if(_===Bn){const Z=re.getValues(Bn);if(Z.length<q.length){C(e,Z);return}if(Z.length===xn){C(e,Z);return}const P=Z[Z.length-1],k=D[qt].findIndex(U=>U.transactionId===P),O=re.getValues(`${qt}.${k}.lineInfo`);if(O!=null){let U=!1;if(O.every(oe=>(U=un(M,oe[Te].selectedOption,A?["income"]:void 0),!!oe[Te].selectedOption&&oe[Te].selectedOption!=null&&!U&&!!oe[Ge].selectedOption&&!!oe[rt].selectedOption))===!0){C(e,Z);return}else{const oe=Z.filter(R=>R!==P);C(e,oe);return}}return}if(_.includes(Te)===!0||_.includes(Ge)===!0){const Z=parseInt(_.split(".")[1]),P=parseInt(_.split(".")[3]),k=re.getValues(`${qt}.${Z}.lineInfo`),O=k[P];if(_.includes(Te)||_.includes(Ge)){const{transactionId:U,lineId:oe,recommendations:R}=O;if(k!=null){const ne=O[Te].selectedOption,N=O[Ge].selectedOption,J=O[rt].selectedOption,ye=O[rt].selectedOption,ke=O[rt].defaultOptions,ge=ke?.find(ce=>ce.options?.find(Pe=>Pe.value===J))?.options?.find(ce=>ce.value===J)?.label,v=ke?.find(ce=>ce.options?.find(Pe=>Pe.value===ye))?.options?.find(ce=>ce.value===ye)?.label,ie=p.entityAutoCompleteView.vendor.find(ce=>ce.qboId===J),we=p.entityAutoCompleteView.customer.find(ce=>ce.qboId===ye),Oe=R.find(ce=>ce.vendor?.qboId===J)?.vendor,Le=J||ie?.qboId||Oe?.qboId?{id:J??ie?.qboId??Oe?.qboId??"",name:ge??ie?.name??Oe?.name??"",logo:ie?.logo??Oe?.logo}:void 0,Ae=ye||we?.qboId?{id:ye??we?.qboId??"",name:v??we?.name??"",logo:we?.logo}:void 0,pe=K.find(ce=>ce.qboId===ne),Xe=G.find(ce=>ce.classId===N),Ue=n.transactionLocalData.find(ce=>ce.transactionId===U)?.transactionReviewLocalData.lineItemById[oe].account,qe=n.transactionLocalData.find(ce=>ce.transactionId===U)?.transactionReviewLocalData.lineItemById[oe].class;m(e,U,oe,W,Le?.id,Ae?.id,_.includes(Te)&&pe!=null?{...pe,isPreFilled:!1}:Ue,_.includes(Ge)&&Xe!=null?{...Xe,isPreFilled:!1}:qe,void 0,R,A)}return}}if(_.includes(rt)){const Z=parseInt(_.split(".")[1]),P=parseInt(_.split(".")[3]),k=re.getValues(`${qt}.${Z}.lineInfo`);if(k!=null){const O=k[P],{transactionId:U,recommendations:oe}=O,R=O[rt].selectedOption,ne=O[rt].selectedOption,N=O[rt].defaultOptions,J=N?.flatMap(pe=>pe.options)?.find(pe=>pe.value===R)?.label,ye=N?.flatMap(pe=>pe.options)?.find(pe=>pe.value===ne)?.label,ke=p.entityAutoCompleteView.vendor.find(pe=>pe.qboId===R),ge=p.entityAutoCompleteView.customer.find(pe=>pe.qboId===ne),v=oe.find(pe=>pe.vendor?.qboId===R)?.vendor,ie=R!==""&&R!=null?R:J!==""&&J!=null?J:"",we=(ke?.qboId!=null&&ke.qboId!==""?ke.qboId:null)??(v?.qboId!=null&&v.qboId!==""?v.qboId:null)??(R!=null&&R!==""?R:null),Oe={id:we??J??"",name:J??ke?.name??v?.name??"",logo:ke?.logo??v?.logo},Le=ge?.qboId!=null&&ge.qboId!==""?{id:ge.qboId??ne??"",name:ye??ge.name??"",logo:ge.logo}:void 0,Ae=W.find(pe=>pe.id===U);if(Ae!=null){const pe=n.transactionLocalData.find(Pe=>Pe.transactionId===Ae.id)?.transactionReviewLocalData,Xe=pe?.lineItemById[O.lineId],Ue=Vt(Ae)===!0?pe?.selectedEntity:Xe?.selectedEntityLine,qe=Le?.id!=null&&Le.id!==""?{id:Le.id,name:Le.name,type:"customer",qboId:Le.id,zeniId:Le.id,logo:Le.logo}:Oe.id!==""&&Oe.id!=null?{id:ie,name:J??ie,type:"vendor",qboId:ie,zeniId:ie,logo:Oe.logo,isPreFilled:Ue?.id===we&&Ue?.isPreFilled}:void 0,ce={transactionId:{id:Ae.id,type:Ae.type},transaction:Ae,lineIds:Ae.type!=="journal_entry"?Ae.lines?.map(Pe=>Pe.id)??[]:[O.lineId]};qe?.type==="customer"?f(O.amount.amount,ce,!1,e,qe,Le,A):I(O.amount.amount,ce,!1,e,qe,Oe,A)}}i.onCancelAutoComplete?.();return}}};s.useEffect(()=>{const _=re.watch((D,{name:Z})=>{Z!=null&&D!=null&&yn(()=>Q(Z,D))});return()=>{_.unsubscribe()}}),s.useEffect(()=>{if(p.entityAutoCompleteView.fetchState==="Completed"){const _=n.transactionLocalData.find(D=>D.transactionId===$.transactionId);if(_){const{transactionReviewLocalData:D}=_,{selectedEntity:Z}=D,P=$?.lineItemId??D.sortedLineItems[0],k=D.lineItemById[P],O=k.selectedEntityLine;L.current?.(Io(p.entityAutoCompleteView,Z??O,k?.recommendationsWithCOT??[]))}E({transactionId:void 0,lineItemId:void 0})}},[p.entityAutoCompleteView.fetchState]);const Y=(_,D)=>{i.onAutoCompleteInputChange?.(_),L.current=D},me=s.useRef(null);return t.jsx(vm,{ref:me,"data-testid":z("transaction-categorization-list-page"),children:t.jsx(Jt,{...re,children:t.jsx("form",{id:Ui(no),onSubmit:Ce,style:{height:"100%",width:"100%"},"data-testid":z(Ui(no)),children:t.jsx(sm,{selectedTab:e,sectionId:h,transactionView:n,receiptUploadEndpoint:d,authParams:c,setCurrentTransactionInAction:E,onUpdateTransactionCategorizationUIState:x,onUpdateScrollYOffSetTransactionCategorizationUIState:y,onFetchTransactionCategorizationList:w,onTransactionCategorizationRowClick:u,vendorLoadOptions:Y,vendorSearchAutoCompleteData:p,vendorSearchAutoCompleteActions:i,containerRef:me,isCOTEnabled:l,cotTracking:{onCOTView:T},isUncategorizedExpenseCategoryEnabled:A})})})})},Ui=e=>`${e}_form`,qi=(e,n,d,c,h)=>({[qt]:n.map(p=>bm(p.transactionId,p.transactionReviewLocalData,d,c,h)),[Bn]:e}),bm=(e,n,d,c,h)=>{const{lineItemById:p,sortedLineItems:i,selectedEntity:l}=n,r=Object.values(p).sort((u,x)=>i.indexOf(u.lineId)-i.indexOf(x.lineId)),m=r[0]?.lineId;return{[sa]:r.map(u=>{const x=u.account?.qboId??u.account?.accountId,y=u.class?.classId,w=u.selectedEntityLine;return{id:u.id,transactionId:u.transactionId,type:u.type,amount:u.amount,lineDetailType:u.lineDetailType,platformLineDetailType:u.platformLineDetailType,lineTransactionType:u.lineTransactionType,postingType:u.postingType,postingTypeName:u.postingTypeName,customer:u.customer,vendor:u.vendor,billable:u.billable,item:u.item,isCategoryMiscategorized:u.isCategoryMiscategorized,isClassMiscategorized:u.isClassMiscategorized,lineId:u.id,[Te]:{selectedOption:x,allOptions:Ss(d,u.recommendationsWithCOT)},[Ge]:{selectedOption:y,allOptions:vs(c,u.recommendationsWithCOT)},[rt]:{selectedOption:l?.id??w?.id??l?.name??w?.name,defaultOptions:Io(h,l??w,n.lineItemById[m]?.recommendationsWithCOT??[])},[Ip]:u.lineEntity,[$p]:u.recommendationsWithCOT??[]}}),transactionId:e,[Tp]:n.vendorDetails!=null&&n.vendorDetails.id!=null?{id:n.vendorDetails.id,qboId:n.vendorDetails.qboId,name:n.vendorDetails.name}:void 0,[Lp]:n.customerDetails!=null&&n.customerDetails.id!=null?{id:n.customerDetails.id,qboId:n.customerDetails.qboId,name:n.customerDetails.name}:void 0}},vm=a.div`
1497
1497
  display: flex;
1498
1498
  min-height: 100%;
1499
1499
  width: 100%;
@@ -1513,7 +1513,7 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
1513
1513
  display: flex;
1514
1514
  flex-direction: column;
1515
1515
  width: 100%;
1516
- `,km=e=>{const{currentFooterFormId:n,onJeAccountSettingsChange:d,onSaveJeAccountSettingsClick:c,setResetJeAccountSettingsForm:h,expenseAutomationViewSelector:p,authParams:i,receiptUploadEndpoint:l,companyId:r,vendorSearchAutoCompleteActions:m,vendorSearchAutoCompleteData:u,enableMonthEndInsightsZeniGPTFeature:x,monthEndInsightsPreviewMode:y,monthEndInsightsCustomerRequestData:w,allThreadsSectionOpen:b,loggedInUser:C,isCOTEnabled:I,setCurrentFooterFormId:f,onFetchRecommendationsForEntityCategorization:$,onFetchRecommendationsForEntityCategorizationWithCustomer:E,onTransactionCategorizationRowClick:L,onFetchMissingReceiptsList:B,onMissingReceiptsRowClick:S,onUploadReceiptAttachment:j,onUploadReceiptComplete:A,onUploadReceiptFetchStatus:T,onReconTabColumnSortConfigChanged:W,onReloadReconciliationListPage:F,onUpdateReconcileTabLocalData:H,onUpdateMissingReceiptsUIState:V,onFetchTransactionCategorizationList:K,onUpdateTransactionCategorizationUIState:Z,onUpdateScrollYOffSetTransactionCategorizationUIState:q,handleJeScheduleClick:M,ignoreRecommendedJeSchedule:re,onJESchedulesFormDataChange:Ce,onPostJESchedule:Q,setLocalDataForCategoryAndClass:G,resetTransactionCategorizationLocalData:me,updateSelectedVendorForTransaction:_,onSaveUpdateTransactionCategorization:D,onUpdateSelectedCheckboxTransactionIds:Y,improveMonthEndInsightsUsingZeniGPTClick:P,onRemoveFileAttachment:k,onUpdateFileAttachment:O,onCloseAllThreadsSection:U,onEditMonthEndInsightsClick:oe,previewMonthEndReport:R,saveMonthEndReport:ne,onOpenFileAttachmentSnackBar:N,onCloseFileAttachmentSnackBar:J,onClickCustomerRequest:ye,sendMonthEndReport:ke,markAsReview:ge,onReloadPage:v,onBackClick:ie,updateOperatingExpensesIdsForReview:we,updateSectionCollapseStatus:Oe,onFetchReimbursementView:Le,redirectToVendorDetailPage:Ae,updateSectionIdsForReview:pe,onUpdateFluxAnalysisUIState:Xe,fetchFluxViewOnScroll:Ue,onFetchFluxViewList:qe,setIsJeAccountSettingsOpened:ce,onReviewClicked:Pe,setOpenDrawerClicked:ot,onEstablishConnectionClick:lt,onFetchLinkTokenClick:kt,updateReconReviewTabLocalData:xt,onReconReviewTabColumnSortConfigChanged:It,onSaveReconciliation:$t,onSaveReconciliationReview:Be,onReconMatchedTransactionClick:le,onReconListPageScroll:ve,onAddStatementClick:Ie}=e,{currentSelectedView:ae,missingReceipts:Qe,transactionView:ct,selectedPeriod:Tt,monthEndInsights:it,selectedTransactionCategorizationTab:Zt,reconciliation:et}=p;switch(ae){case"transaction_categorization":return ct.fetchState==="Completed"&&ct.transactionLocalData.length===0?t.jsx(vt,{tab:ae,title:Ne(ae).allDoneText.title,subTitle:Ne(ae).allDoneText.subTitle}):t.jsx(wm,{setCurrentFooterFormId:f,selectedPeriod:Tt,selectedTab:Zt,sectionId:qt,transactionView:ct,receiptUploadEndpoint:l,authParams:i,onUpdateTransactionCategorizationUIState:Z,onUpdateScrollYOffSetTransactionCategorizationUIState:q,onFetchTransactionCategorizationList:K,onTransactionCategorizationRowClick:L,setLocalDataForCategoryAndClass:G,resetTransactionCategorizationLocalData:me,updateSelectedVendorForTransaction:_,onSaveUpdateTransactionCategorization:D,onUpdateSelectedCheckboxTransactionIds:Y,vendorSearchAutoCompleteActions:m,vendorSearchAutoCompleteData:u,onFetchRecommendationsForEntityCategorization:$,onFetchRecommendationsForEntityCategorizationWithCustomer:E,isCOTEnabled:I});case"je_schedules":return t.jsx(_u,{setIsJeAccountSettingsOpened:ce,expenseAutomationViewSelector:p,setResetJeAccountSettingsForm:h,currentFooterFormId:n,onJeAccountSettingsChange:d,onSaveJeAccountSettingsClick:c,setCurrentFooterFormId:f,handleJeScheduleClick:M,ignoreRecommendedJeSchedule:re,onJESchedulesFormDataChange:Ce,onPostJESchedule:Q,vendorSearchAutoCompleteActions:m,vendorSearchAutoCompleteData:u});case"missing_receipts":return Qe.fetchState==="Completed"&&Qe.transactions.length===0?t.jsx(vt,{tab:ae,title:Ne(ae).allDoneText.title,subTitle:Ne(ae).allDoneText.subTitle}):t.jsx(Ih,{onUpdateMissingReceiptsUIState:V,onFetchMissingReceiptsList:B,missingReceipts:Qe,receiptUploadEndpoint:l,authParams:i,selectedPeriod:Tt,onMissingReceiptsRowClick:S,onUploadReceiptComplete:A,onUploadReceiptFetchStatus:T,onUploadReceiptAttachment:j});case"month_end_insights":if(it!=null&&p.monthEndCloseChecksView.monthEndCloseChecks!=null){if(it.fetchState==="Not-Started"||it.fetchState==="In-Progress"||it.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||it.companyMonthEndReportTemplatesData.fetchState==="In-Progress")return t.jsx(Ca,{fetchState:"In-Progress"});{const Mt={application:"cockpit",companyId:r,entityId:r,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:it.companyName,url:window.location.href},{url:ln,...Yt}=Mt,Nn={...Yt};return t.jsx(jm,{children:t.jsx(ep,{allThreadsSectionOpen:b,customerRequestData:w,companyId:r,enableZeniGPTFeature:x,filterMetaData:Nn,selectedPeriod:p.selectedPeriod,improveUsingZeniGPTClick:P,isZeniUser:C.userEmail?.includes("zeni.ai")??!1,monthEndReportView:it,newThreadMetadata:Mt,onClickCustomerRequest:ye,onCloseAllThreadsSection:U,onCloseFileAttachmentSnackBar:J,onOpenFileAttachmentSnackBar:N,onRemoveFileAttachment:k,onUpdateFileAttachment:O,previewMode:y,previewMonthEndReport:R,saveMonthEndReport:ne,onEditClick:oe,sendMonthEndReport:ke})})}}else return null;case"flux_analysis":return p.fluxAnalysis.fetchStatus.fetchState==="Completed"&&p.fluxAnalysis.sections.generalExpense.vendors.length===0&&p.fluxAnalysis.sections.reimbursement.vendors.length===0?t.jsx(vt,{tab:ae,title:Ne(ae).allDoneText.title,subTitle:Ne(ae).allDoneText.subTitle}):t.jsx(gu,{fluxAnalysis:p.fluxAnalysis,selectedPeriod:p.selectedPeriod,markAsReview:ge,onReloadPage:v,onBackClick:ie,updateOperatingExpensesIdsForReview:we,updateSectionIdsForReview:pe,onUpdateFluxAnalysisUIState:Xe,setCurrentFooterFormId:f,fetchFluxViewOnScroll:Ue,onFetchFluxViewList:qe,updateSectionCollapseStatus:Oe,onFetchReimbursementView:Le,redirectToVendorDetailPage:Ae});case"reconciliation":return t.jsx(Qd,{onReconListPageScroll:ve,onReloadReconciliationListPage:F,currentFooterFormId:n,reconciliation:et,companyId:r,vendorSearchAutoCompleteActions:m,vendorSearchAutoCompleteData:u,onReviewClicked:Pe,setOpenDrawerClicked:ot,setCurrentFooterFormId:f,onReconTabColumnSortConfigChanged:W,onUpdateReconcileTabLocalData:H,onEstablishConnectionClick:lt,onFetchLinkTokenClick:kt,updateReconReviewTabLocalData:xt,onReconReviewTabColumnSortConfigChanged:It,onSaveReconciliation:$t,onSaveReconciliationReview:Be,onReconMatchedTransactionClick:le,onAddStatementClick:Ie});default:return t.jsx(vt,{tab:ae,title:Ne(ae).allDoneText.title,subTitle:Ne(ae).allDoneText.subTitle})}};function Im(e){const n=Se(),{currentSelectedView:d}=e.expenseAutomationViewSelector,c=e.expenseAutomationViewSelector.currentSelectedView==="transaction_categorization",h=e.expenseAutomationViewSelector.currentSelectedView!=="month_end_insights"&&e.expenseAutomationViewSelector.currentSelectedView!=="flux_analysis";return t.jsx(Sm,{windowSize:n,style:{...h===!0?{paddingLeft:Ki.subSectionContainerLeftRightPadding.value(n),paddingRight:Ki.subSectionContainerLeftRightPadding.value(n)}:{paddingLeft:g[0],paddingRight:g[0]},...c===!0||d==="reconciliation"?{paddingLeft:g[0],paddingRight:g[0]}:{}},children:t.jsx(km,{...e})})}const $m=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M22.9902 12.0403L1.12726 12.0403",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M7.68994 5.60718L1.00953 12.0402L7.68994 18.4732",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Tm=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M12 22.0619L11.4825 21.5444C9.66604 19.7284 7.20261 18.7082 4.63406 18.7084H2.17687C1.92268 18.7082 1.67898 18.607 1.49932 18.4272C1.31966 18.2474 1.21875 18.0036 1.21875 17.7494V2.89563C1.21875 2.64152 1.3197 2.39781 1.49938 2.21813C1.67906 2.03845 1.92276 1.9375 2.17687 1.9375H3.94219C5.53731 1.93666 7.10793 2.32989 8.51448 3.08223C9.92104 3.83457 11.12 4.92273 12.0047 6.25L12 22.0619Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M12 22.0619L12.5175 21.5444C14.334 19.7284 16.7974 18.7082 19.3659 18.7084H21.8231C22.0773 18.7082 22.321 18.607 22.5007 18.4272C22.6803 18.2474 22.7813 18.0036 22.7812 17.7494V2.89563C22.7812 2.64152 22.6803 2.39781 22.5006 2.21813C22.3209 2.03845 22.0772 1.9375 21.8231 1.9375H20.0625C18.4674 1.93666 16.8968 2.32989 15.4902 3.08223C14.0837 3.83457 12.8847 4.92273 12 6.25V22.0619Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M4.07031 6.47765C5.88047 6.33155 7.68276 6.84169 9.14781 7.91484",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M4.07031 10.3118C5.88051 10.1652 7.68295 10.6754 9.14781 11.7489",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M4.07031 14.1435C5.88058 13.9978 7.68285 14.5083 9.14781 15.5817",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M18.5882 8.40625H16.6392C16.3407 8.40684 16.0516 8.51125 15.8217 8.70157C15.5917 8.8919 15.4351 9.15629 15.3786 9.44943C15.3222 9.74258 15.3695 10.0462 15.5125 10.3083C15.6554 10.5704 15.885 10.7746 16.162 10.8859L18.1392 11.6762C18.4162 11.7876 18.6458 11.9918 18.7887 12.2539C18.9316 12.516 18.9789 12.8196 18.9225 13.1128C18.8661 13.4059 18.7095 13.6703 18.4795 13.8606C18.2495 14.0509 17.9605 14.1553 17.662 14.1559H15.7129",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M17.1504 8.40656V7.6875",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M17.1504 14.8753V14.1562",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Lm=a.div`
1516
+ `,km=e=>{const{currentFooterFormId:n,onJeAccountSettingsChange:d,onSaveJeAccountSettingsClick:c,setResetJeAccountSettingsForm:h,expenseAutomationViewSelector:p,authParams:i,receiptUploadEndpoint:l,companyId:r,vendorSearchAutoCompleteActions:m,vendorSearchAutoCompleteData:u,enableMonthEndInsightsZeniGPTFeature:x,monthEndInsightsPreviewMode:y,monthEndInsightsCustomerRequestData:w,allThreadsSectionOpen:b,loggedInUser:C,isCOTEnabled:I,setCurrentFooterFormId:f,onFetchRecommendationsForEntityCategorization:$,onFetchRecommendationsForEntityCategorizationWithCustomer:E,onTransactionCategorizationRowClick:L,onFetchMissingReceiptsList:B,onMissingReceiptsRowClick:S,onUploadReceiptAttachment:j,onUploadReceiptComplete:A,onUploadReceiptFetchStatus:T,onReconTabColumnSortConfigChanged:W,onReloadReconciliationListPage:F,onUpdateReconcileTabLocalData:H,onUpdateMissingReceiptsUIState:V,onFetchTransactionCategorizationList:K,onUpdateTransactionCategorizationUIState:G,onUpdateScrollYOffSetTransactionCategorizationUIState:q,handleJeScheduleClick:M,ignoreRecommendedJeSchedule:re,onJESchedulesFormDataChange:Ce,onPostJESchedule:Q,setLocalDataForCategoryAndClass:Y,resetTransactionCategorizationLocalData:me,updateSelectedVendorForTransaction:_,onSaveUpdateTransactionCategorization:D,onUpdateSelectedCheckboxTransactionIds:Z,improveMonthEndInsightsUsingZeniGPTClick:P,onRemoveFileAttachment:k,onUpdateFileAttachment:O,onCloseAllThreadsSection:U,onEditMonthEndInsightsClick:oe,previewMonthEndReport:R,saveMonthEndReport:ne,onOpenFileAttachmentSnackBar:N,onCloseFileAttachmentSnackBar:J,onClickCustomerRequest:ye,sendMonthEndReport:ke,markAsReview:ge,onReloadPage:v,onBackClick:ie,updateOperatingExpensesIdsForReview:we,updateSectionCollapseStatus:Oe,onFetchReimbursementView:Le,redirectToVendorDetailPage:Ae,updateSectionIdsForReview:pe,onUpdateFluxAnalysisUIState:Xe,fetchFluxViewOnScroll:Ue,onFetchFluxViewList:qe,setIsJeAccountSettingsOpened:ce,onReviewClicked:Pe,setOpenDrawerClicked:ot,onEstablishConnectionClick:lt,onFetchLinkTokenClick:kt,updateReconReviewTabLocalData:xt,onReconReviewTabColumnSortConfigChanged:It,onSaveReconciliation:$t,onSaveReconciliationReview:Be,onReconMatchedTransactionClick:le,onReconListPageScroll:ve,onAddStatementClick:Ie}=e,{currentSelectedView:ae,missingReceipts:Qe,transactionView:ct,selectedPeriod:Tt,monthEndInsights:it,selectedTransactionCategorizationTab:Gt,reconciliation:et}=p;switch(ae){case"transaction_categorization":return ct.fetchState==="Completed"&&ct.transactionLocalData.length===0?t.jsx(vt,{tab:ae,title:Ne(ae).allDoneText.title,subTitle:Ne(ae).allDoneText.subTitle}):t.jsx(wm,{setCurrentFooterFormId:f,selectedPeriod:Tt,selectedTab:Gt,sectionId:qt,transactionView:ct,receiptUploadEndpoint:l,authParams:i,onUpdateTransactionCategorizationUIState:G,onUpdateScrollYOffSetTransactionCategorizationUIState:q,onFetchTransactionCategorizationList:K,onTransactionCategorizationRowClick:L,setLocalDataForCategoryAndClass:Y,resetTransactionCategorizationLocalData:me,updateSelectedVendorForTransaction:_,onSaveUpdateTransactionCategorization:D,onUpdateSelectedCheckboxTransactionIds:Z,vendorSearchAutoCompleteActions:m,vendorSearchAutoCompleteData:u,onFetchRecommendationsForEntityCategorization:$,onFetchRecommendationsForEntityCategorizationWithCustomer:E,isCOTEnabled:I});case"je_schedules":return t.jsx(_u,{setIsJeAccountSettingsOpened:ce,expenseAutomationViewSelector:p,setResetJeAccountSettingsForm:h,currentFooterFormId:n,onJeAccountSettingsChange:d,onSaveJeAccountSettingsClick:c,setCurrentFooterFormId:f,handleJeScheduleClick:M,ignoreRecommendedJeSchedule:re,onJESchedulesFormDataChange:Ce,onPostJESchedule:Q,vendorSearchAutoCompleteActions:m,vendorSearchAutoCompleteData:u});case"missing_receipts":return Qe.fetchState==="Completed"&&Qe.transactions.length===0?t.jsx(vt,{tab:ae,title:Ne(ae).allDoneText.title,subTitle:Ne(ae).allDoneText.subTitle}):t.jsx(Ih,{onUpdateMissingReceiptsUIState:V,onFetchMissingReceiptsList:B,missingReceipts:Qe,receiptUploadEndpoint:l,authParams:i,selectedPeriod:Tt,onMissingReceiptsRowClick:S,onUploadReceiptComplete:A,onUploadReceiptFetchStatus:T,onUploadReceiptAttachment:j});case"month_end_insights":if(it!=null&&p.monthEndCloseChecksView.monthEndCloseChecks!=null){if(it.fetchState==="Not-Started"||it.fetchState==="In-Progress"||it.companyMonthEndReportTemplatesData.fetchState==="Not-Started"||it.companyMonthEndReportTemplatesData.fetchState==="In-Progress")return t.jsx(Ca,{fetchState:"In-Progress"});{const Mt={application:"cockpit",companyId:r,entityId:r,tab:"expense_automation",isGlobalComment:!1,entityType:"expense_automation.monthEndEmail",companyName:it.companyName,url:window.location.href},{url:ln,...Zt}=Mt,Nn={...Zt};return t.jsx(jm,{children:t.jsx(ep,{allThreadsSectionOpen:b,customerRequestData:w,companyId:r,enableZeniGPTFeature:x,filterMetaData:Nn,selectedPeriod:p.selectedPeriod,improveUsingZeniGPTClick:P,isZeniUser:C.userEmail?.includes("zeni.ai")??!1,monthEndReportView:it,newThreadMetadata:Mt,onClickCustomerRequest:ye,onCloseAllThreadsSection:U,onCloseFileAttachmentSnackBar:J,onOpenFileAttachmentSnackBar:N,onRemoveFileAttachment:k,onUpdateFileAttachment:O,previewMode:y,previewMonthEndReport:R,saveMonthEndReport:ne,onEditClick:oe,sendMonthEndReport:ke})})}}else return null;case"flux_analysis":return p.fluxAnalysis.fetchStatus.fetchState==="Completed"&&p.fluxAnalysis.sections.generalExpense.vendors.length===0&&p.fluxAnalysis.sections.reimbursement.vendors.length===0?t.jsx(vt,{tab:ae,title:Ne(ae).allDoneText.title,subTitle:Ne(ae).allDoneText.subTitle}):t.jsx(gu,{fluxAnalysis:p.fluxAnalysis,selectedPeriod:p.selectedPeriod,markAsReview:ge,onReloadPage:v,onBackClick:ie,updateOperatingExpensesIdsForReview:we,updateSectionIdsForReview:pe,onUpdateFluxAnalysisUIState:Xe,setCurrentFooterFormId:f,fetchFluxViewOnScroll:Ue,onFetchFluxViewList:qe,updateSectionCollapseStatus:Oe,onFetchReimbursementView:Le,redirectToVendorDetailPage:Ae});case"reconciliation":return t.jsx(Qd,{onReconListPageScroll:ve,onReloadReconciliationListPage:F,currentFooterFormId:n,reconciliation:et,companyId:r,vendorSearchAutoCompleteActions:m,vendorSearchAutoCompleteData:u,onReviewClicked:Pe,setOpenDrawerClicked:ot,setCurrentFooterFormId:f,onReconTabColumnSortConfigChanged:W,onUpdateReconcileTabLocalData:H,onEstablishConnectionClick:lt,onFetchLinkTokenClick:kt,updateReconReviewTabLocalData:xt,onReconReviewTabColumnSortConfigChanged:It,onSaveReconciliation:$t,onSaveReconciliationReview:Be,onReconMatchedTransactionClick:le,onAddStatementClick:Ie});default:return t.jsx(vt,{tab:ae,title:Ne(ae).allDoneText.title,subTitle:Ne(ae).allDoneText.subTitle})}};function Im(e){const n=Se(),{currentSelectedView:d}=e.expenseAutomationViewSelector,c=e.expenseAutomationViewSelector.currentSelectedView==="transaction_categorization",h=e.expenseAutomationViewSelector.currentSelectedView!=="month_end_insights"&&e.expenseAutomationViewSelector.currentSelectedView!=="flux_analysis";return t.jsx(Sm,{windowSize:n,style:{...h===!0?{paddingLeft:Ki.subSectionContainerLeftRightPadding.value(n),paddingRight:Ki.subSectionContainerLeftRightPadding.value(n)}:{paddingLeft:g[0],paddingRight:g[0]},...c===!0||d==="reconciliation"?{paddingLeft:g[0],paddingRight:g[0]}:{}},children:t.jsx(km,{...e})})}const $m=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M22.9902 12.0403L1.12726 12.0403",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M7.68994 5.60718L1.00953 12.0402L7.68994 18.4732",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Tm=e=>s.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},s.createElement("path",{d:"M12 22.0619L11.4825 21.5444C9.66604 19.7284 7.20261 18.7082 4.63406 18.7084H2.17687C1.92268 18.7082 1.67898 18.607 1.49932 18.4272C1.31966 18.2474 1.21875 18.0036 1.21875 17.7494V2.89563C1.21875 2.64152 1.3197 2.39781 1.49938 2.21813C1.67906 2.03845 1.92276 1.9375 2.17687 1.9375H3.94219C5.53731 1.93666 7.10793 2.32989 8.51448 3.08223C9.92104 3.83457 11.12 4.92273 12.0047 6.25L12 22.0619Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M12 22.0619L12.5175 21.5444C14.334 19.7284 16.7974 18.7082 19.3659 18.7084H21.8231C22.0773 18.7082 22.321 18.607 22.5007 18.4272C22.6803 18.2474 22.7813 18.0036 22.7812 17.7494V2.89563C22.7812 2.64152 22.6803 2.39781 22.5006 2.21813C22.3209 2.03845 22.0772 1.9375 21.8231 1.9375H20.0625C18.4674 1.93666 16.8968 2.32989 15.4902 3.08223C14.0837 3.83457 12.8847 4.92273 12 6.25V22.0619Z",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M4.07031 6.47765C5.88047 6.33155 7.68276 6.84169 9.14781 7.91484",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M4.07031 10.3118C5.88051 10.1652 7.68295 10.6754 9.14781 11.7489",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M4.07031 14.1435C5.88058 13.9978 7.68285 14.5083 9.14781 15.5817",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M18.5882 8.40625H16.6392C16.3407 8.40684 16.0516 8.51125 15.8217 8.70157C15.5917 8.8919 15.4351 9.15629 15.3786 9.44943C15.3222 9.74258 15.3695 10.0462 15.5125 10.3083C15.6554 10.5704 15.885 10.7746 16.162 10.8859L18.1392 11.6762C18.4162 11.7876 18.6458 11.9918 18.7887 12.2539C18.9316 12.516 18.9789 12.8196 18.9225 13.1128C18.8661 13.4059 18.7095 13.6703 18.4795 13.8606C18.2495 14.0509 17.9605 14.1553 17.662 14.1559H15.7129",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M17.1504 8.40656V7.6875",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),s.createElement("path",{d:"M17.1504 14.8753V14.1562",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"})),Lm=a.div`
1517
1517
  width: 100%;
1518
1518
  height: 100vh;
1519
1519
  display: flex;
@@ -1538,12 +1538,12 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
1538
1538
  width: ${o.sp3};
1539
1539
  cursor: pointer;
1540
1540
  color: inherit;
1541
- `,Zi=a($m)`
1541
+ `,Gi=a($m)`
1542
1542
  height: ${o.sp3};
1543
1543
  width: ${o.sp3};
1544
1544
  cursor: pointer;
1545
1545
  color: inherit;
1546
- `,{common:{footer:Re,texts:{maxLimitReached:Rm,confirmAction:Em},headers:Dm,create:Om,strings:hn,texts:rn,cancel:Bm,confirm:Fm,monthsByIndex:Mm},dateFormat:{visual:{MMMDCommaYYYYformat:Yi}},expenseAutomation:pn}=je.getLocalizedStrings(),C1=e=>{const{expenseAutomationViewSelector:n,isDisabled:d,isRealtimeInsightsFeatureEnabled:c,isUncategorizedExpenseCategoryEnabled:h,isCOTEnabled:p,onUpdateTab:i,onReconTabUpdate:l,onUpdateStep:r,onSearchTextChanged:m,onRefresh:u,onClose:x,onBack:y,resetTransactionCategorizationLocalData:w,updateOperatingExpensesIdsForReview:b,clearJeScheduleLocalData:C,onSaveReconciliation:I}=e,{currentSelectedView:f,allSteps:$,missingReceipts:E,jeSchedules:L,fluxAnalysis:B,monthEndInsights:S,transactionView:j,selectedTransactionCategorizationTab:A,reconciliation:T,selectedPeriod:W}=n,[F,H]=s.useState("expenseAutomationPage"),[V,K]=s.useState(()=>{}),[Z,q]=s.useState(!1),M=Se(),re=!!e.loggedInUser.userEmail?.includes("zeni.ai"),Ce=re?es:ts,{openThread:Q,setOpenThread:G}=s.useContext(Ce),[me,_]=s.useState(!1),[D,Y]=s.useState(!1),P=$.find(le=>le.step===f),{nextStep:k,previousStep:O}=Pm($,f),{uiState:{searchString:U,pageToken:oe},totalCountByTab:R,transactions:ne,fetchStateByTransactionTabs:N,transactionLocalData:J}=j,{selectedReconAccount:ye,reconciliationTabsState:{reconcile:{localData:{selectedTransactionIds:ke}}}}=T;let ge="Not-Started",v="complete";switch(f){case"missing_receipts":ge=E.refreshStatus.fetchState,v=E.completionStatus;break;case"je_schedules":ge=L.refreshStatus.fetchState,v=L.completionStatus;break;case"month_end_insights":S!=null&&(ge=S?.fetchState);break;case"flux_analysis":ge=B.refreshStatus.fetchState,v=B.completionStatus;break;case"transaction_categorization":ge=j.refreshStatus.fetchState,v=j.completionStatus;break;case"reconciliation":ye==null?(ge=T.refreshStatus.fetchState,v=T.completionStatus):(ge=T.selectedReconAccount?.refreshStatus.fetchState??"Not-Started",v=T.completionStatus)}const ie=()=>{V()},{saveStatus:we,selectedCheckBoxTransactionIds:Oe}=j,Le=()=>{const le=Gs(n.fluxAnalysis.sections,n.fluxAnalysis.reviewOperatingExpensesIds),ve=qn(),{month:Ie,year:ae}=W,Qe=qn().set("month",Ie-1).set("year",ae).endOf("month");switch(F){case"expenseAutomationFluxPage":return{formId:"expenseAutomationFluxPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:le===!0?Re.markAsReviewed:rn.undo,style:{justifyContent:"space-evenly"},isLoading:n.fluxAnalysis.bulkReviewStatus.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:uo(n.fluxAnalysis.reviewOperatingExpensesIds.length,Fs,M,rn.vendor,f),cancelBtn:{label:Re.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{b([])}}};case"expenseAutomationTransactionsPage":return{formId:"expenseAutomationTransactionsPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Re.save,style:{minWidth:"96px",justifyContent:"space-evenly"},isLoading:we.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:uo(Oe.length,xn,M,rn.transaction,f),cancelBtn:{label:Re.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{w(A,ne.map(ct=>ct.id),W,!1,R[A],qo(J,A),h,oe)}}};case"expenseAutomationJESchedulePage":return{formId:"expenseAutomationJESchedulePage",nextBtnLabel:Re.next,backBtnLabel:Re.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Re.next,style:{justifyContent:"space-evenly"},isDisabled:d||P?.isNextDisabled,suffixIcon:t.jsx(Ji,{}),onClick:()=>{r(k.step)}},cancelBtn:{label:Re.back,isDisabled:d||P?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(Zi,{}),onClick:()=>{r(O.step)}}};case"expenseAutomationBankReconReconcilePage":return{formId:"expenseAutomationBankReconReconcilePage",nextBtnLabel:Re.reconcile,backBtnLabel:Re.saveForLater,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Re.reconcile,onClick:()=>{I({reconcileAction:"reconcile"})},isDisabled:!(T.reconciliationTabsState.balances.variance.amount===0&&ve.isAfter(Qe)),isLoading:T.actionFetchStates.reconcileFetch.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:132}},leftSideComponent:uo(ke.length,1/0,M,rn.transaction,f),cancelBtn:{onClick:()=>{I({reconcileAction:"save_reconcile_for_later"})},reverseSpinnerColor:!1,isLoading:T.actionFetchStates.saveForLaterFetch.fetchState==="In-Progress",label:Re.saveForLater,style:{minWidth:132,justifyContent:"space-evenly"}}};case"expenseAutomationJEAccountSettingsPage":return{formId:"expenseAutomationJEAccountSettingsPage",nextBtnLabel:Re.save,backBtnLabel:Re.cancel,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Re.save,isLoading:L.accountSettingsView.saveState.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:82}},cancelBtn:{onClick:()=>ie(),label:Re.cancel,style:{minWidth:82,justifyContent:"space-evenly"}}};default:{const ct=f==="reconciliation"&&n.reconciliation.selectedTab==="review"&&n.reconciliation.selectedAccountId!=null,Tt=f==="reconciliation"&&n.reconciliation.selectedAccountId==null,it=f==="reconciliation"&&n.reconciliation.selectedTab==="reconcile"&&n.reconciliation.selectedAccountId!=null,Zt=k.step==="month_end_insights"&&(f==="flux_analysis"&&(n.fluxAnalysis.sections.generalExpense?.balancesByMonth!=null||n.fluxAnalysis.sections.reimbursement?.balancesByMonth!=null)||Tt),et=f==="transaction_categorization"&&n.selectedTransactionCategorizationTab==="review",Mt=f==="transaction_categorization"&&n.selectedTransactionCategorizationTab==="autoCategorized",ln=n.monthEndCloseChecksView.monthEndCloseChecks?.reportEmailSentDate==null&&(c||P?.isNextDisabled===!1),Yt=k.step==="month_end_insights"&&(Tt||f==="flux_analysis")?!ln:P?.isNextDisabled===!0;return{formId:"expenseAutomationPage",nextBtnLabel:Re.next,backBtnLabel:Re.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Zt===!0?_m(n.selectedPeriod.month):Re.next,style:{justifyContent:"space-evenly"},isDisabled:Yt,suffixIcon:t.jsx(Ji,{}),onClick:()=>{et?i("autoCategorized"):ct?l("reconcile"):r(k.step)}},cancelBtn:{label:Re.back,isDisabled:d||P?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(Zi,{}),onClick:()=>{Mt?i("review"):it?l("review"):ct?y():r(O.step)}}}}}},Ae=()=>{switch(F){case"expenseAutomationFluxPage":return{confirmAction:()=>{_(!1),b([]),x()}};case"expenseAutomationTransactionsPage":return{confirmAction:()=>{_(!1),w(A,ne.map(le=>le.id),W,!1,R[A],qo(J,A),h,oe),x()}};case"expenseAutomationJESchedulePage":return{confirmAction:()=>{_(!1),C(),x()}};default:return{confirmAction:()=>{_(!1)},confirmationDescription:hn.empty}}},pe=()=>{F==="expenseAutomationFluxPage"||F==="expenseAutomationJESchedulePage"||F==="expenseAutomationTransactionsPage"?_(!0):x()},{primaryBtn:Xe,cancelBtn:Ue,leftSideComponent:qe}=Le(),{confirmAction:ce}=Ae(),Pe=le=>{if(f==="transaction_categorization"&&(le==="autoCategorized"||le==="review"))return{hideCountInTab:R[le]>pn.common.numbers.maximumCount,count:R[le],isFetching:N[le].fetchState==="In-Progress"};if(f==="reconciliation"){const{reconciliation:ve}=n,{selectedAccountId:Ie}=ve;return Ie==null?{count:0,isFetching:!1}:le==="review"?{count:ve.accountReconciliationsByAccountID[Ie]?.accountReconEntity?.transactionsToReview.length,isFetching:ve.accountReconciliationsByAccountID[Ie]?.transactionFetchState.fetchState==="In-Progress"}:{count:ve.accountReconciliationsByAccountID[Ie]?.accountReconEntity?.transactionsToReconcile.length,isFetching:ve.accountReconciliationsByAccountID[Ie]?.transactionFetchState.fetchState==="In-Progress"}}},ot=f==="reconciliation"&&T.selectedAccountId!=null&&T.selectedReconAccount!=null,{month:lt,year:kt}=W,xt=qn().set("month",lt-1).set("year",kt),It=xt.startOf("month").format(Yi),$t=xt.endOf("month").format(Yi),Be=`${It} ${hn.hyphen} ${$t}`;return t.jsxs(Lm,{children:[me?t.jsx(da,{containerStyle:{width:356},titleComponent:t.jsx(qm,{children:Em}),primaryButtonText:Fm,secondaryButtonText:Bm,proceedButtonVariant:"danger",action:{onOkClick:()=>{ce()},onCancelClick:()=>_(!1)},descriptionComponent:t.jsx(Km,{children:pn.confirmationDescription})}):null,t.jsxs(Am,{children:[t.jsx(xl,{onBack:y,navBarCustomElement:f==="reconciliation"&&T.selectedAccountId!=null?t.jsx(zm,{reconciliation:T}):void 0,onReconTabUpdate:l,currentRecontab:T.selectedTab,reconcileDetailPageFetchState:T.selectedAccountId!=null?T.accountReconciliationsByAccountID[T.selectedAccountId]?.transactionFetchState.fetchState:"Not-Started",selectedReconAccountId:ot?T.selectedAccountId:void 0,currentSelectedView:f,titleStyle:{justifyContent:"center",marginLeft:o.sp0},headerData:Ne(f,R.autoCategorized,ot?T.selectedAccountId:void 0,ot?T.selectedReconAccount?.accountReconEntity?.account.accountName:void 0,ot?Be:void 0),searchText:U,currentTab:A,getTabCountAndFetchState:Pe,completionStatus:v,forceShowSubtitle:Z===!0||f==="je_schedules"&&(L.fetchState==="In-Progress"||L.accountSettingsView.fetchState==="In-Progress"),refreshStatus:ge,companyId:e.companyId,companyName:n.monthEndInsights?.companyName??hn.empty,isZeniUser:re,onAllThreadsClick:()=>{Q!=null&&G(null),Y(!0)},onUpdateTab:i,onSearchTextChanged:m,onRefresh:u,onClose:pe}),t.jsx(Im,{...e,isCOTEnabled:p,setIsJeAccountSettingsOpened:q,setResetJeAccountSettingsForm:K,allThreadsSectionOpen:D,setCurrentFooterFormId:H,currentFooterFormId:F,onCloseAllThreadsSection:()=>Y(!1)}),t.jsx(_e,{controller:f!=="month_end_insights",children:t.jsx(ns,{style:{width:"-webkit-fill-available",maxHeight:g[8]},formId:Nm(F),primaryBtn:Xe,leftSideComponent:qe,cancelBtn:Ue,separatorStyle:{marginRight:o.sp4}})})]})]})},zm=({reconciliation:e})=>{const n=St(),{clearedBalance:d,variance:c,variancePercentage:h,deposits:p,payments:i}=e.reconciliationTabsState.balances,{balance:l}=e.selectedReconAccount?.accountReconEntity??{},{selectedReconAccount:r}=e,{transactionFetchState:m}=r??{};return t.jsx(Jm,{children:t.jsxs(Zm,{children:[t.jsxs(ho,{style:{justifyContent:"flex-end",width:"50%"},children:[t.jsx(po,{children:t.jsx(Ym,{})}),t.jsx(mo,{children:m?.fetchState==="In-Progress"?t.jsxs(fo,{children:[t.jsx(nn,{height:25,width:120}),t.jsx(nn,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(xo,{children:We("0,0.00",l)}),t.jsx(go,{children:pn.accountRecon.reconciliation.headers.bankBalance})]})})]}),t.jsxs(ho,{children:[t.jsx(po,{children:t.jsx(Xm,{})}),t.jsx(mo,{children:m?.fetchState==="In-Progress"?t.jsxs(fo,{children:[t.jsx(nn,{height:25,width:120}),t.jsx(nn,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(xo,{children:We("0,0.00",d)}),t.jsxs(e1,{children:[t.jsx(go,{children:pn.accountRecon.reconciliation.headers.clearedBalance}),t.jsx(fe,{placement:"bottom",title:t.jsxs(t1,{children:[t.jsxs(Gi,{children:[t.jsxs(Xi,{children:[i.count," ",rn.payments]}),t.jsx(Qi,{children:We("0,0.[00]",i.totalAmount)})]}),t.jsxs(Gi,{children:[t.jsxs(Xi,{children:[p.count," ",rn.deposits]}),t.jsx(Qi,{children:We("0,0.[00]",p.totalAmount)})]})]}),display:"flex",children:t.jsx(Qm,{})})]})]})})]}),t.jsxs(ho,{style:{justifyContent:"flex-start",width:"50%"},children:[t.jsx(po,{children:t.jsx(Gm,{})}),t.jsx(mo,{children:m?.fetchState==="In-Progress"?t.jsxs(fo,{children:[t.jsx(nn,{height:25,width:120}),t.jsx(nn,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsxs(xo,{children:[t.jsx("span",{style:{color:c.amount===0?n.colors.brandColorJadeDark:n.colors.primary},children:We("0,0.00",c)}),h!=null&&c.amount!==0?t.jsx("span",{style:{color:n.colors.primary,marginLeft:2},children:`(${h.toFixed(2)}%)`}):null]}),t.jsx(go,{children:pn.accountRecon.reconciliation.headers.variance})]})})]})]})})},uo=(e,n,d,c,h)=>{const p=c,i=(e>1?p+"s":p)+" selected";return e>0?t.jsxs(Vm,{currentView:h,style:d==="small"?{position:"absolute",top:o.sp2,left:`-${o.sp5}`}:{},children:[t.jsx(Hm,{multiDigit:e>=5,children:e}),t.jsx(Wm,{children:i}),e===n?t.jsx(Um,{children:`(${Rm})`}):null]}):null},_m=e=>{const n=Mm[e];return`${Om}${hn.space}${n}${hn.space}${Dm.insights}`};function Pm(e,n){const d=e.findIndex(l=>l.step===n);if(d===-1)throw new Error("currentStep not found in allSteps array");const c=(d+1)%e.length,h=(d-1+e.length)%e.length,p=e[c],i=e[h];return{nextStep:p,previousStep:i}}const Nm=e=>`${e}_form`,Vm=a.div`
1546
+ `,{common:{footer:Re,texts:{maxLimitReached:Rm,confirmAction:Em},headers:Dm,create:Om,strings:hn,texts:rn,cancel:Bm,confirm:Fm,monthsByIndex:Mm},dateFormat:{visual:{MMMDCommaYYYYformat:Zi}},expenseAutomation:pn}=je.getLocalizedStrings(),C1=e=>{const{expenseAutomationViewSelector:n,isDisabled:d,isRealtimeInsightsFeatureEnabled:c,isUncategorizedExpenseCategoryEnabled:h,isCOTEnabled:p,onUpdateTab:i,onReconTabUpdate:l,onUpdateStep:r,onSearchTextChanged:m,onRefresh:u,onClose:x,onBack:y,resetTransactionCategorizationLocalData:w,updateOperatingExpensesIdsForReview:b,clearJeScheduleLocalData:C,onSaveReconciliation:I}=e,{currentSelectedView:f,allSteps:$,missingReceipts:E,jeSchedules:L,fluxAnalysis:B,monthEndInsights:S,transactionView:j,selectedTransactionCategorizationTab:A,reconciliation:T,selectedPeriod:W}=n,[F,H]=s.useState("expenseAutomationPage"),[V,K]=s.useState(()=>{}),[G,q]=s.useState(!1),M=Se(),re=!!e.loggedInUser.userEmail?.includes("zeni.ai"),Ce=re?es:ts,{openThread:Q,setOpenThread:Y}=s.useContext(Ce),[me,_]=s.useState(!1),[D,Z]=s.useState(!1),P=$.find(le=>le.step===f),{nextStep:k,previousStep:O}=Pm($,f),{uiState:{searchString:U,pageToken:oe},totalCountByTab:R,transactions:ne,fetchStateByTransactionTabs:N,transactionLocalData:J}=j,{selectedReconAccount:ye,reconciliationTabsState:{reconcile:{localData:{selectedTransactionIds:ke}}}}=T;let ge="Not-Started",v="complete";switch(f){case"missing_receipts":ge=E.refreshStatus.fetchState,v=E.completionStatus;break;case"je_schedules":ge=L.refreshStatus.fetchState,v=L.completionStatus;break;case"month_end_insights":S!=null&&(ge=S?.fetchState);break;case"flux_analysis":ge=B.refreshStatus.fetchState,v=B.completionStatus;break;case"transaction_categorization":ge=j.refreshStatus.fetchState,v=j.completionStatus;break;case"reconciliation":ye==null?(ge=T.refreshStatus.fetchState,v=T.completionStatus):(ge=T.selectedReconAccount?.refreshStatus.fetchState??"Not-Started",v=T.completionStatus)}const ie=()=>{V()},{saveStatus:we,selectedCheckBoxTransactionIds:Oe}=j,Le=()=>{const le=Ys(n.fluxAnalysis.sections,n.fluxAnalysis.reviewOperatingExpensesIds),ve=qn(),{month:Ie,year:ae}=W,Qe=qn().set("month",Ie-1).set("year",ae).endOf("month");switch(F){case"expenseAutomationFluxPage":return{formId:"expenseAutomationFluxPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:le===!0?Re.markAsReviewed:rn.undo,style:{justifyContent:"space-evenly"},isLoading:n.fluxAnalysis.bulkReviewStatus.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:uo(n.fluxAnalysis.reviewOperatingExpensesIds.length,Fs,M,rn.vendor,f),cancelBtn:{label:Re.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{b([])}}};case"expenseAutomationTransactionsPage":return{formId:"expenseAutomationTransactionsPage",isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Re.save,style:{minWidth:"96px",justifyContent:"space-evenly"},isLoading:we.fetchState==="In-Progress",isDisabled:!1},leftSideComponent:uo(Oe.length,xn,M,rn.transaction,f),cancelBtn:{label:Re.cancel,style:{width:"96px",justifyContent:"space-evenly"},onClick:()=>{w(A,ne.map(ct=>ct.id),W,!1,R[A],qo(J,A),h,oe)}}};case"expenseAutomationJESchedulePage":return{formId:"expenseAutomationJESchedulePage",nextBtnLabel:Re.next,backBtnLabel:Re.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Re.next,style:{justifyContent:"space-evenly"},isDisabled:d||P?.isNextDisabled,suffixIcon:t.jsx(Ji,{}),onClick:()=>{r(k.step)}},cancelBtn:{label:Re.back,isDisabled:d||P?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(Gi,{}),onClick:()=>{r(O.step)}}};case"expenseAutomationBankReconReconcilePage":return{formId:"expenseAutomationBankReconReconcilePage",nextBtnLabel:Re.reconcile,backBtnLabel:Re.saveForLater,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Re.reconcile,onClick:()=>{I({reconcileAction:"reconcile"})},isDisabled:!(T.reconciliationTabsState.balances.variance.amount===0&&ve.isAfter(Qe)),isLoading:T.actionFetchStates.reconcileFetch.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:132}},leftSideComponent:uo(ke.length,1/0,M,rn.transaction,f),cancelBtn:{onClick:()=>{I({reconcileAction:"save_reconcile_for_later"})},reverseSpinnerColor:!1,isLoading:T.actionFetchStates.saveForLaterFetch.fetchState==="In-Progress",label:Re.saveForLater,style:{minWidth:132,justifyContent:"space-evenly"}}};case"expenseAutomationJEAccountSettingsPage":return{formId:"expenseAutomationJEAccountSettingsPage",nextBtnLabel:Re.save,backBtnLabel:Re.cancel,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Re.save,isLoading:L.accountSettingsView.saveState.fetchState==="In-Progress",style:{justifyContent:"space-evenly",minWidth:82}},cancelBtn:{onClick:()=>ie(),label:Re.cancel,style:{minWidth:82,justifyContent:"space-evenly"}}};default:{const ct=f==="reconciliation"&&n.reconciliation.selectedTab==="review"&&n.reconciliation.selectedAccountId!=null,Tt=f==="reconciliation"&&n.reconciliation.selectedAccountId==null,it=f==="reconciliation"&&n.reconciliation.selectedTab==="reconcile"&&n.reconciliation.selectedAccountId!=null,Gt=k.step==="month_end_insights"&&(f==="flux_analysis"&&(n.fluxAnalysis.sections.generalExpense?.balancesByMonth!=null||n.fluxAnalysis.sections.reimbursement?.balancesByMonth!=null)||Tt),et=f==="transaction_categorization"&&n.selectedTransactionCategorizationTab==="review",Mt=f==="transaction_categorization"&&n.selectedTransactionCategorizationTab==="autoCategorized",ln=n.monthEndCloseChecksView.monthEndCloseChecks?.reportEmailSentDate==null&&(c||P?.isNextDisabled===!1),Zt=k.step==="month_end_insights"&&(Tt||f==="flux_analysis")?!ln:P?.isNextDisabled===!0;return{formId:"expenseAutomationPage",nextBtnLabel:Re.next,backBtnLabel:Re.back,isNextDisabled:!1,isPrevDisabled:!1,primaryBtn:{label:Gt===!0?_m(n.selectedPeriod.month):Re.next,style:{justifyContent:"space-evenly"},isDisabled:Zt,suffixIcon:t.jsx(Ji,{}),onClick:()=>{et?i("autoCategorized"):ct?l("reconcile"):r(k.step)}},cancelBtn:{label:Re.back,isDisabled:d||P?.isPrevDisabled,style:{width:"96px",justifyContent:"space-evenly"},prefixIcon:t.jsx(Gi,{}),onClick:()=>{Mt?i("review"):it?l("review"):ct?y():r(O.step)}}}}}},Ae=()=>{switch(F){case"expenseAutomationFluxPage":return{confirmAction:()=>{_(!1),b([]),x()}};case"expenseAutomationTransactionsPage":return{confirmAction:()=>{_(!1),w(A,ne.map(le=>le.id),W,!1,R[A],qo(J,A),h,oe),x()}};case"expenseAutomationJESchedulePage":return{confirmAction:()=>{_(!1),C(),x()}};default:return{confirmAction:()=>{_(!1)},confirmationDescription:hn.empty}}},pe=()=>{F==="expenseAutomationFluxPage"||F==="expenseAutomationJESchedulePage"||F==="expenseAutomationTransactionsPage"?_(!0):x()},{primaryBtn:Xe,cancelBtn:Ue,leftSideComponent:qe}=Le(),{confirmAction:ce}=Ae(),Pe=le=>{if(f==="transaction_categorization"&&(le==="autoCategorized"||le==="review"))return{hideCountInTab:R[le]>pn.common.numbers.maximumCount,count:R[le],isFetching:N[le].fetchState==="In-Progress"};if(f==="reconciliation"){const{reconciliation:ve}=n,{selectedAccountId:Ie}=ve;return Ie==null?{count:0,isFetching:!1}:le==="review"?{count:ve.accountReconciliationsByAccountID[Ie]?.accountReconEntity?.transactionsToReview.length,isFetching:ve.accountReconciliationsByAccountID[Ie]?.transactionFetchState.fetchState==="In-Progress"}:{count:ve.accountReconciliationsByAccountID[Ie]?.accountReconEntity?.transactionsToReconcile.length,isFetching:ve.accountReconciliationsByAccountID[Ie]?.transactionFetchState.fetchState==="In-Progress"}}},ot=f==="reconciliation"&&T.selectedAccountId!=null&&T.selectedReconAccount!=null,{month:lt,year:kt}=W,xt=qn().set("month",lt-1).set("year",kt),It=xt.startOf("month").format(Zi),$t=xt.endOf("month").format(Zi),Be=`${It} ${hn.hyphen} ${$t}`;return t.jsxs(Lm,{children:[me?t.jsx(da,{containerStyle:{width:356},titleComponent:t.jsx(qm,{children:Em}),primaryButtonText:Fm,secondaryButtonText:Bm,proceedButtonVariant:"danger",action:{onOkClick:()=>{ce()},onCancelClick:()=>_(!1)},descriptionComponent:t.jsx(Km,{children:pn.confirmationDescription})}):null,t.jsxs(Am,{children:[t.jsx(xl,{onBack:y,navBarCustomElement:f==="reconciliation"&&T.selectedAccountId!=null?t.jsx(zm,{reconciliation:T}):void 0,onReconTabUpdate:l,currentRecontab:T.selectedTab,reconcileDetailPageFetchState:T.selectedAccountId!=null?T.accountReconciliationsByAccountID[T.selectedAccountId]?.transactionFetchState.fetchState:"Not-Started",selectedReconAccountId:ot?T.selectedAccountId:void 0,currentSelectedView:f,titleStyle:{justifyContent:"center",marginLeft:o.sp0},headerData:Ne(f,R.autoCategorized,ot?T.selectedAccountId:void 0,ot?T.selectedReconAccount?.accountReconEntity?.account.accountName:void 0,ot?Be:void 0),searchText:U,currentTab:A,getTabCountAndFetchState:Pe,completionStatus:v,forceShowSubtitle:G===!0||f==="je_schedules"&&(L.fetchState==="In-Progress"||L.accountSettingsView.fetchState==="In-Progress"),refreshStatus:ge,companyId:e.companyId,companyName:n.monthEndInsights?.companyName??hn.empty,isZeniUser:re,onAllThreadsClick:()=>{Q!=null&&Y(null),Z(!0)},onUpdateTab:i,onSearchTextChanged:m,onRefresh:u,onClose:pe}),t.jsx(Im,{...e,isCOTEnabled:p,setIsJeAccountSettingsOpened:q,setResetJeAccountSettingsForm:K,allThreadsSectionOpen:D,setCurrentFooterFormId:H,currentFooterFormId:F,onCloseAllThreadsSection:()=>Z(!1)}),t.jsx(_e,{controller:f!=="month_end_insights",children:t.jsx(ns,{style:{width:"-webkit-fill-available",maxHeight:g[8]},formId:Nm(F),primaryBtn:Xe,leftSideComponent:qe,cancelBtn:Ue,separatorStyle:{marginRight:o.sp4}})})]})]})},zm=({reconciliation:e})=>{const n=St(),{clearedBalance:d,variance:c,variancePercentage:h,deposits:p,payments:i}=e.reconciliationTabsState.balances,{balance:l}=e.selectedReconAccount?.accountReconEntity??{},{selectedReconAccount:r}=e,{transactionFetchState:m}=r??{};return t.jsx(Jm,{children:t.jsxs(Gm,{children:[t.jsxs(ho,{style:{justifyContent:"flex-end",width:"50%"},children:[t.jsx(po,{children:t.jsx(Zm,{})}),t.jsx(mo,{children:m?.fetchState==="In-Progress"?t.jsxs(fo,{children:[t.jsx(nn,{height:25,width:120}),t.jsx(nn,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(xo,{children:We("0,0.00",l)}),t.jsx(go,{children:pn.accountRecon.reconciliation.headers.bankBalance})]})})]}),t.jsxs(ho,{children:[t.jsx(po,{children:t.jsx(Xm,{})}),t.jsx(mo,{children:m?.fetchState==="In-Progress"?t.jsxs(fo,{children:[t.jsx(nn,{height:25,width:120}),t.jsx(nn,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsx(xo,{children:We("0,0.00",d)}),t.jsxs(e1,{children:[t.jsx(go,{children:pn.accountRecon.reconciliation.headers.clearedBalance}),t.jsx(fe,{placement:"bottom",title:t.jsxs(t1,{children:[t.jsxs(Yi,{children:[t.jsxs(Xi,{children:[i.count," ",rn.payments]}),t.jsx(Qi,{children:We("0,0.[00]",i.totalAmount)})]}),t.jsxs(Yi,{children:[t.jsxs(Xi,{children:[p.count," ",rn.deposits]}),t.jsx(Qi,{children:We("0,0.[00]",p.totalAmount)})]})]}),display:"flex",children:t.jsx(Qm,{})})]})]})})]}),t.jsxs(ho,{style:{justifyContent:"flex-start",width:"50%"},children:[t.jsx(po,{children:t.jsx(Ym,{})}),t.jsx(mo,{children:m?.fetchState==="In-Progress"?t.jsxs(fo,{children:[t.jsx(nn,{height:25,width:120}),t.jsx(nn,{height:19,width:120})]}):t.jsxs(t.Fragment,{children:[t.jsxs(xo,{children:[t.jsx("span",{style:{color:c.amount===0?n.colors.brandColorJadeDark:n.colors.primary},children:We("0,0.00",c)}),h!=null&&c.amount!==0?t.jsx("span",{style:{color:n.colors.primary,marginLeft:2},children:`(${h.toFixed(2)}%)`}):null]}),t.jsx(go,{children:pn.accountRecon.reconciliation.headers.variance})]})})]})]})})},uo=(e,n,d,c,h)=>{const p=c,i=(e>1?p+"s":p)+" selected";return e>0?t.jsxs(Vm,{currentView:h,style:d==="small"?{position:"absolute",top:o.sp2,left:`-${o.sp5}`}:{},children:[t.jsx(Hm,{multiDigit:e>=5,children:e}),t.jsx(Wm,{children:i}),e===n?t.jsx(Um,{children:`(${Rm})`}):null]}):null},_m=e=>{const n=Mm[e];return`${Om}${hn.space}${n}${hn.space}${Dm.insights}`};function Pm(e,n){const d=e.findIndex(l=>l.step===n);if(d===-1)throw new Error("currentStep not found in allSteps array");const c=(d+1)%e.length,h=(d-1+e.length)%e.length,p=e[c],i=e[h];return{nextStep:p,previousStep:i}}const Nm=e=>`${e}_form`,Vm=a.div`
1547
1547
  display: flex;
1548
1548
  justify-content: flex-start;
1549
1549
  align-items: center;
@@ -1561,7 +1561,7 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
1561
1561
  `,Wm=a(Fe)`
1562
1562
  color: ${e=>e.theme.colors.primary};
1563
1563
  `,Um=a(jt)`
1564
- color: ${Ge.important};
1564
+ color: ${Ye.important};
1565
1565
  `,qm=a(ca)`
1566
1566
  margin-top: ${o.sp5};
1567
1567
  padding-left: ${o.sp8};
@@ -1577,7 +1577,7 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
1577
1577
  justify-content: center;
1578
1578
  align-items: center;
1579
1579
  padding: ${o.sp3} ${o.sp0};
1580
- `,Zm=a.div`
1580
+ `,Gm=a.div`
1581
1581
  width: 100%;
1582
1582
  display: flex;
1583
1583
  justify-content: center;
@@ -1604,11 +1604,11 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
1604
1604
  `,xo=a(is)`
1605
1605
  min-width: 180px;
1606
1606
  color: ${e=>e.theme.colors.primary};
1607
- `,Ym=a(fa)`
1607
+ `,Zm=a(fa)`
1608
1608
  color: ${e=>e.theme.colors.primary};
1609
1609
  width: ${o.sp4};
1610
1610
  height: ${o.sp4};
1611
- `,Gm=a(ya)`
1611
+ `,Ym=a(ya)`
1612
1612
  color: ${e=>e.theme.colors.primary};
1613
1613
  width: ${o.sp4};
1614
1614
  height: ${o.sp4};
@@ -1628,17 +1628,17 @@ import{o,bS as ca,Q as Se,gc as es,gd as ts,F as je,V as t,cm as da,a9 as _e,aO
1628
1628
  align-items: center;
1629
1629
  gap: ${o.sp1};
1630
1630
  `,t1=a.div`
1631
- background-color: ${Ge.overlayDark};
1631
+ background-color: ${Ye.overlayDark};
1632
1632
  padding: 2px ${o.sp2};
1633
1633
  border-radius: ${o.sp1};
1634
- `,Gi=a.div`
1634
+ `,Yi=a.div`
1635
1635
  display: flex;
1636
1636
  justify-content: space-between;
1637
1637
  gap: ${o.sp2};
1638
1638
  `,Xi=a.div`
1639
1639
  text-transform: capitalize;
1640
1640
  `,Qi=a(jt)`
1641
- color: ${Ge.primaryDark};
1641
+ color: ${Ye.primaryDark};
1642
1642
  align-self: "flex-end";
1643
1643
  `,nn=a(Bt)`
1644
1644
  border-radius: ${o.sp2};