@zeniai/web-cockpit-ui 1.14.75-dev → 1.14.76-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 (217) hide show
  1. package/dist/assets/{ACHDetailsPage-CgSAnexf-B3A8op6h.js → ACHDetailsPage-Xx5xzGG6-TLkgYXDo.js} +1 -1
  2. package/dist/assets/{AIPerformancePage-C9EQ3p87-OJBktR4D.js → AIPerformancePage-CUXg59Hy-CQ1-rEhi.js} +24 -24
  3. package/dist/assets/{AccountInfoPage-C239tsDp-DRuutmdG.js → AccountInfoPage-BCsDFfVy-hrluJcll.js} +1 -1
  4. package/dist/assets/{AccountInfoPageContent-CgDFcQqY-CqasllNx.js → AccountInfoPageContent-Dc3zDc0L-zxWLzozl.js} +4 -4
  5. package/dist/assets/{AccountLockedInfoModal-CQzFFcuJ-Do66phz_.js → AccountLockedInfoModal-C9esWbYw-DmLSIkZF.js} +1 -1
  6. package/dist/assets/{AccountReconDetailsDrawerPage-xtmSIQ0k-Cx_Pu75e.js → AccountReconDetailsDrawerPage-zLLBfV9S-BNb08J_3.js} +4 -4
  7. package/dist/assets/{AccountRow-BrRxbza5-pSnSZur-.js → AccountRow-CjMOMc-1-x3Qeaa-E.js} +6 -6
  8. package/dist/assets/{AccountsPromoCardStack-CqXbhSj4-Dxz2-66c.js → AccountsPromoCardStack-DkqmFDos-CykT6dqn.js} +17 -17
  9. package/dist/assets/{AddAddressForCardDrawer-fgjjFlrb-j1U1vMZd.js → AddAddressForCardDrawer-D8Towl2b-BnpRCEKK.js} +1 -1
  10. package/dist/assets/{AddToWalletPage-DfB7hWI1-IQOFdx9h.js → AddToWalletPage-DPlpIxsE-B4bdwm1E.js} +15 -15
  11. package/dist/assets/{AgingReportsPage-DHYj512r-CC4JWVYi.js → AgingReportsPage-Bkw7sNWp-BamyEZIc.js} +5 -5
  12. package/dist/assets/{AllUserItems-DeSMFizX-DNdHjuWX.js → AllUserItems-DMlj0bT0-gvuqGIhf.js} +4 -4
  13. package/dist/assets/{ApAgingDetailPage-DU0hQxT3-DZWyZWni.js → ApAgingDetailPage-BLz4srnJ-Cc1Xbcy9.js} +2 -2
  14. package/dist/assets/{AppBasePage-BR-YhSR_-CzGzdBlR.js → AppBasePage-D-TkEHTb-DROxn97N.js} +5 -5
  15. package/dist/assets/{AppDrawerContent-B80zy-Gz-B39ZSWi1.js → AppDrawerContent-B_OcDS2l-DzddisDQ.js} +2 -2
  16. package/dist/assets/{ApprovalRulesSettingsPage-By648tCr-CQAcViTv.js → ApprovalRulesSettingsPage-CFLA9ZNm-DAP_H-up.js} +3 -3
  17. package/dist/assets/{ArAgingChart-TzANw6Zm-ud3qmxZt.js → ArAgingChart-GDCZoeS6-ejUvAmZP.js} +1 -1
  18. package/dist/assets/{ArAgingDetailPage-C2rcOePe-DceP7UdC.js → ArAgingDetailPage-BpbaAaQd-BiEAKqhS.js} +2 -2
  19. package/dist/assets/{AttachmentView-jMWZdYNa-B4G6-utv.js → AttachmentView-C5nZKhTq-vO_X412a.js} +4 -4
  20. package/dist/assets/{BankAccountSection-SGI34h8u-BmPo8uGy.js → BankAccountSection-IncAN4Fp-_HbGSxHo.js} +3 -3
  21. package/dist/assets/{BankAccountWarningSection-BYhi53r4-4douKQRZ.js → BankAccountWarningSection-B5zw3yYg-D0pN9DqK.js} +1 -1
  22. package/dist/assets/{BankConnectionsSettingsPage-ChDwYCek-CV2qmOPT.js → BankConnectionsSettingsPage-C_B2Ap4v-CWKHwroD.js} +28 -28
  23. package/dist/assets/{BillDetailPage-CDcMpkQh-WKx-zUwY.js → BillDetailPage-ZwjUMPQZ-BsZDr1gg.js} +10 -10
  24. package/dist/assets/{BillPayApprovalRuleDetailPage-CEPY5Pk4-BbBRmkGK.js → BillPayApprovalRuleDetailPage-C253InxT-RvLtQlW3.js} +1 -1
  25. package/dist/assets/{BillPayApprovalRulesPage-CL2A3R9R-lHKvJ4Ac.js → BillPayApprovalRulesPage-CA3FfPrr-qSqftFhb.js} +1 -1
  26. package/dist/assets/{BillPayPromoPage-B9Tz3jBR-C8UtwtS8.js → BillPayPromoPage-BKleb4US-pzvsBPOp.js} +4 -4
  27. package/dist/assets/{BillPaySetUpPage-Dt_bfrGH-BFJQWbSz.js → BillPaySetUpPage-DwK0lrbO-rQcYv7BW.js} +1 -1
  28. package/dist/assets/{BillingSettingsPage-DS50kMjn-x8sOi9VN.js → BillingSettingsPage-zBDcEj5D-BDTLKTvE.js} +5 -5
  29. package/dist/assets/{BillsBulkReviewDrawerPage-Btt7v1Mg-BawjVs5H.js → BillsBulkReviewDrawerPage-BjOYcTwa-Dv0CJOPA.js} +1 -1
  30. package/dist/assets/{BoxItem-BFUJgt2x-BC0-eR6w.js → BoxItem-CoguTodA-DItO3xcr.js} +1 -1
  31. package/dist/assets/{BusinessVerificationPage-CF3ZLtzs-m9ujMa8b.js → BusinessVerificationPage-DGQ9x2pf-35QVlpBA.js} +6 -6
  32. package/dist/assets/{CardNumberSubText-B1MkRWES-C67yiD_w.js → CardNumberSubText-BudPffUB-BTvRfksc.js} +1 -1
  33. package/dist/assets/{CashbackDetailPage-CPSsS7-h-D1KsDfk8.js → CashbackDetailPage-2KpaTEWi-CUzGkPf8.js} +1 -1
  34. package/dist/assets/{ChargeCardDetailPage-BDqTbXzY-BMqKHARM.js → ChargeCardDetailPage-DU-yz6wh-CBCtuxOp.js} +1 -1
  35. package/dist/assets/{ChargeCardListPage-yj0mhqgF-BwQcpXMc.js → ChargeCardListPage-C4ITCZwO-C8GmtyMf.js} +14 -14
  36. package/dist/assets/{ChargeCardListTable-DM6dYuPz-DQIQm3j5.js → ChargeCardListTable-DEqAOIyN-nTkk33YA.js} +1 -1
  37. package/dist/assets/{ChargeCardPromoPage-DSoQsDJK-k397bkJL.js → ChargeCardPromoPage-CvPAVoti-Dig5Emby.js} +1 -1
  38. package/dist/assets/{ChargeCardSetupPage-DhEITB5H-DwrNYcBw.js → ChargeCardSetupPage-CLhkL1Eh-B9fDm_Ae.js} +1 -1
  39. package/dist/assets/{ChargeCardStatementsPage-tCXt7AVZ-CGXmLyEQ.js → ChargeCardStatementsPage-6TvYstIS-DKHBxCkb.js} +5 -5
  40. package/dist/assets/{CheckDepositDrawerPage-6PfNZ8GG-CpP6SDgV.js → CheckDepositDrawerPage-D64qEFAi-DmFPX3Hy.js} +5 -5
  41. package/dist/assets/{CollapsableReportTable-DERfLf9A-B02u2C6v.js → CollapsableReportTable-o0pGO_sw-CoQujIPL.js} +48 -48
  42. package/dist/assets/{CompanyOfficerDetailsSection-CmMDQgui-DjcUawXU.js → CompanyOfficerDetailsSection-D3PSro9F-CN8Reo83.js} +12 -12
  43. package/dist/assets/{CompanyPassportCard-ki3cq_A3-BIFk_EYX.js → CompanyPassportCard-CUcLJOne-CwK5fmgg.js} +2 -2
  44. package/dist/assets/{CompanyPassportPage-C9UW7mV8-CjYiaVUt.js → CompanyPassportPage-C1v4xE8B-zCkhH9yQ.js} +10 -10
  45. package/dist/assets/{CompleteProfile-CcjiEAtN-G6pC79hX.js → CompleteProfile-DP8FFDH_-B7Va_v1e.js} +1 -1
  46. package/dist/assets/{ConfettiBurst-Dq3DwwfS-Bk63elQ-.js → ConfettiBurst-KNUWsLgM-C3W-6qSV.js} +1 -1
  47. package/dist/assets/{CreateOrEditVendorPage-CsYVqUf8-CQGCDeX8.js → CreateOrEditVendorPage-hEPeylx6-VsqoPSRS.js} +1 -1
  48. package/dist/assets/{CreditCardPaymentDrawerPage-C1QUtunc-B_csVrG-.js → CreditCardPaymentDrawerPage-DOgKpleO-DLW-KVW8.js} +8 -8
  49. package/dist/assets/{CurrencySelectField-PjVnHOPO-De5v3EBh.js → CurrencySelectField-C8L9A7zC-DLDLvWwm.js} +1 -1
  50. package/dist/assets/{CustomerOnboardingActivationPage-BEz1pkPV-m1nyzrH-.js → CustomerOnboardingActivationPage-D_AcFXeU-p0ieIiP_.js} +8 -8
  51. package/dist/assets/CustomerOnboardingContainerPage-DAxVaKqp-DMOGZ592.js +1 -0
  52. package/dist/assets/{CustomerOnboardingDetailPageSkeleton-3S6lsaCB-BUgUvYUX.js → CustomerOnboardingDetailPageSkeleton-DPSQT5UG-yxM-FX1s.js} +12 -12
  53. package/dist/assets/{CustomerOnboardingNoStepsPage-C7EvOlnr-Bb_AP_JK.js → CustomerOnboardingNoStepsPage-Bqi6QK8D-CnhmXiFi.js} +4 -4
  54. package/dist/assets/{CustomerOnboardingPage-Clo_UlCC-DsyGD0B2.js → CustomerOnboardingPage-eY5fJENY-CW0ZIKes.js} +4 -4
  55. package/dist/assets/{CustomerOnboardingProductSuitePage-BEy5gk3x-B66-9NVf.js → CustomerOnboardingProductSuitePage-BEWQQxa2-CUaimIpy.js} +4 -4
  56. package/dist/assets/{Dashboard-B1tMJ_lT-Dt3eYG-5.js → Dashboard-DyK1Y6xH-BhOeJdbK.js} +1 -1
  57. package/dist/assets/{DashboardReportPage-CoFYSDIH-DHztoZKU.js → DashboardReportPage-9mEEgfb9-8pEwgBSt.js} +11 -11
  58. package/dist/assets/{DashboardSidebarBackgroundAnimation-4ckOdfXR-Csek43Wl.js → DashboardSidebarBackgroundAnimation-BKaRUOA4-CrFQyftY.js} +1 -1
  59. package/dist/assets/{DepositAccTransactionItem-tQvZegVN-2h85R67z.js → DepositAccTransactionItem-CwSsISRg-BhipE2js.js} +1 -1
  60. package/dist/assets/{DepositAccTransactionListPage-CwXktzEW-DdOhhhJy.js → DepositAccTransactionListPage-d_A-lWfh-BHvjyvXp.js} +1 -1
  61. package/dist/assets/{DomesticWireDetailsPage-W6hOjjFW-BWSats5d.js → DomesticWireDetailsPage-C-qIXO7t-BK1ogPTU.js} +1 -1
  62. package/dist/assets/{DownloadOverlay-BSUE9cHx-CQqT-O4K.js → DownloadOverlay-_HVjRZb_-ovRMQuBS.js} +10 -10
  63. package/dist/assets/{DrawerPage-CgdtPYXN-BbWBMozy.js → DrawerPage-DgRO2OFE-DsZBSqxn.js} +3 -3
  64. package/dist/assets/EditPeoplePage-6lvgaJQi-Df2Mb0kP.js +55 -0
  65. package/dist/assets/{EditReimbursementDetailPage-Q2e7iDtu-BBcP7tRA.js → EditReimbursementDetailPage-B85brpdt-BYguIPkd.js} +19 -19
  66. package/dist/assets/{EntityDetailPage-XsEIg05w-Cod5Z1f6.js → EntityDetailPage-Ds03l_Nm-BYieYjCl.js} +3 -3
  67. package/dist/assets/{EntitySummarySection-CsXlmDFx-l9ddhbEU.js → EntitySummarySection-CbloJrPd-DGVEU9qa.js} +1 -1
  68. package/dist/assets/{ExpenseAutomationOverviewPage-CVe0vhrD-B-avItru.js → ExpenseAutomationOverviewPage-CYNO1bW--pa8gzAaD.js} +1 -1
  69. package/dist/assets/{ExpenseAutomationPage-D6r_A_CD-CiCcvo0I.js → ExpenseAutomationPage-CoYAnlKO-CIOZ9cQ5.js} +1 -1
  70. package/dist/assets/{ExpressPayPage-C6b1fiyD-DNDZJNDu.js → ExpressPayPage-VpqTGVa6-iCCnAcb9.js} +1 -1
  71. package/dist/assets/{FeaturePreviewPage-DOebdPqb-TzEy5dMk.js → FeaturePreviewPage-DzgPdfBh-BlncrRkT.js} +1 -1
  72. package/dist/assets/{FollowStepsSection-jmyNE2Fl-CvBGwqtX.js → FollowStepsSection-NM8GXTRZ--kMzASD7.js} +6 -6
  73. package/dist/assets/{GlobalReviewListPage-Cx1Km5fu-Bailuk1q.js → GlobalReviewListPage-xUe6yXIO-DDRodqQY.js} +6 -6
  74. package/dist/assets/{InformationCardStack-C5bKx9vg-k3hJn-Id.js → InformationCardStack-BYRwUh-e-Bm84GPsq.js} +2 -2
  75. package/dist/assets/{InsightsCardStack-EFoc_EWA-D2FaxDtB.js → InsightsCardStack-DfJXM3Fn-B0luA3Cz.js} +7 -7
  76. package/dist/assets/{InsightsSection-B0Rg5beY-u8CdyXOx.js → InsightsSection-4aveyVKo-DnKJf3sJ.js} +1 -1
  77. package/dist/assets/{IntegrationsSettingsPage-BQmjM8Np-1cGkOCA2.js → IntegrationsSettingsPage-BZMs-taD-ChagB0kp.js} +4 -4
  78. package/dist/assets/{InternationalWireSwiftDetailsPage-ChSGHFzT-CvsM4E7Y.js → InternationalWireSwiftDetailsPage-D3mlT5XG-CMQP_Nn8.js} +4 -4
  79. package/dist/assets/{InternationalWireVerificationPage-D41gWYDb-CEwQheQ1.js → InternationalWireVerificationPage-MUHsO8eu-CkpdoULT.js} +1 -1
  80. package/dist/assets/{InviteFormPage-CltJ2XYv-DJJh50vB.js → InviteFormPage-aZR9lFWK-BCwWSqH4.js} +1 -1
  81. package/dist/assets/{InvitePageListView-D5OdkeEV-CglVOI_I.js → InvitePageListView-CHyiR2RC-Sk8zihrC.js} +12 -12
  82. package/dist/assets/{InvitePeoplePage-CyXnulj0-B7lM98ff.js → InvitePeoplePage-BRl496Mv-FaAOJzgH.js} +1 -1
  83. package/dist/assets/{InvoiceUploadSection-B2ePrdY8-CUZ5YkU9.js → InvoiceUploadSection-BqpspjSO-DbodpMov.js} +6 -6
  84. package/dist/assets/{IssueChargeCardPage-BCfMS2Zu-DdG6-d9q.js → IssueChargeCardPage-D39Bd6J9-Bz3hak_j.js} +21 -21
  85. package/dist/assets/{LabeledAddressValue-D7udvbin-kVKW8gGz.js → LabeledAddressValue-w3powIaN-xKKxpzsE.js} +1 -1
  86. package/dist/assets/{LabeledAddressValueField-jlDhqmgU-CM1ZWEJK.js → LabeledAddressValueField-BPOKk4mI-BFmVYPcn.js} +2 -2
  87. package/dist/assets/{LabeledControlledCheckBoxField-DNmJFVpZ-DjMQjBxM.js → LabeledControlledCheckBoxField-afEn8tHL-DxqXt4PA.js} +1 -1
  88. package/dist/assets/{LabeledCreatableSingleSelectField-B6Vit6ZA-Bdnw6feS.js → LabeledCreatableSingleSelectField-DXA_bSyS-BJinmWca.js} +3 -3
  89. package/dist/assets/{LabeledDocumentField-CbTN9aAs-CEmYFygD.js → LabeledDocumentField-Z9OHDFr6-HgLdszDI.js} +1 -1
  90. package/dist/assets/{LabeledDropDownFormattedTextField-CD6Bs8EU-Bok-Bw1g.js → LabeledDropDownFormattedTextField-0Bk8vscY-CDQY3SED.js} +3 -3
  91. package/dist/assets/{LabeledText-aSB1WzCl-Cj9Ocs2U.js → LabeledText-CgI7e_L--BwhQOiOZ.js} +1 -1
  92. package/dist/assets/{LabeledUserSingleSelectWithSubtitlesField-Y99F7D2f-Dwh42b2N.js → LabeledUserSingleSelectWithSubtitlesField-B0y_IMnV-GTOhW6B-.js} +1 -1
  93. package/dist/assets/{LabeledZeniRolesDropDownField-BJePp4f_-Dc_g-F8s.js → LabeledZeniRolesDropDownField-CEwtGHuw-Bl11WCzt.js} +14 -14
  94. package/dist/assets/{LinkJETransactionPage-CNbLCYzA-Bg5upj_n.js → LinkJETransactionPage-BqF3QSeN-CXTqkit6.js} +2 -2
  95. package/dist/assets/{LockCardPage-DMB-6EyM-lbTpu5O_.js → LockCardPage-Ui2RTfpb-B7R1Xixi.js} +10 -10
  96. package/dist/assets/{LowBalancePopup-D8MLLJa7-CBiPecxo.js → LowBalancePopup-DzqqMGEK-DvUWGZSI.js} +1 -1
  97. package/dist/assets/{MagicLinkACHDetailsPage-BdS3aAWw-BrXiv9-t.js → MagicLinkACHDetailsPage-Kz-uZGml-CF0KJ9I8.js} +1 -1
  98. package/dist/assets/{MagicLinkDomesticWireDetailsPage-CG0a1drB-Dmn6AGH4.js → MagicLinkDomesticWireDetailsPage-DNR1hQud-DTuqaECC.js} +1 -1
  99. package/dist/assets/{MagicLinkInternationalWireDetailsPage-C9-ZvcKN-C21_WG8V.js → MagicLinkInternationalWireDetailsPage-B-hsxI7i-DU8bPbJw.js} +1 -1
  100. package/dist/assets/{MagicLinkSuccessPage-BBQLFLJ9-CPkaiDv7.js → MagicLinkSuccessPage-CTyWzEAl-CcSFqgbx.js} +1 -1
  101. package/dist/assets/{MagicLinkTitleSection-BVR_lDfw-BbQ3PhCM.js → MagicLinkTitleSection-egx3li4v-CK9jYn1b.js} +1 -1
  102. package/dist/assets/{MailingDetailsSection-DZi-O94--DF-Hpww_.js → MailingDetailsSection-D28xdU_N-D7dNEE4R.js} +1 -1
  103. package/dist/assets/{Menu-DGwHJlS--Djq7PCKE.js → Menu-BsPZbkcv-dMEFFJAw.js} +1 -1
  104. package/dist/assets/{MyBankConnectionsSettingsPage-BYTxFTOW-gDKKbyJg.js → MyBankConnectionsSettingsPage-B7pw1loZ-BZemPN_o.js} +1 -1
  105. package/dist/assets/{MyPendingActivationChargeCardListPage-CUvKbnux-CN2CiFSh.js → MyPendingActivationChargeCardListPage-CaDgVLY9-D9RWTHXk.js} +1 -1
  106. package/dist/assets/{MyProfileSettingsPage-BHnImAny-TmsmZErc.js → MyProfileSettingsPage-DGPjjcRE-BkjL1klq.js} +11 -11
  107. package/dist/assets/{NavBarWithPicker-Q739fT8--CrZ3WYmY.js → NavBarWithPicker-CK69EXMo-BopYsgXw.js} +3 -3
  108. package/dist/assets/{NavigationArrow-DQfX85VC-Dvm4TJ9a.js → NavigationArrow-B5JMjj8b-Yf4kFeB6.js} +1 -1
  109. package/dist/assets/{NavigationDots-CyCjbpW--DGfBQuMJ.js → NavigationDots-yYEq4mai-Bct7I6H1.js} +1 -1
  110. package/dist/assets/{NewGlobalMerchantPage-CzT7wrsy-CItQq0bZ.js → NewGlobalMerchantPage-DXdipj9r-Cg-jSrpq.js} +4 -4
  111. package/dist/assets/{NoDataChart-BnAshBnb-UHLHtstu.js → NoDataChart-CetZJAul-Dliv4FgS.js} +1 -1
  112. package/dist/assets/{NoDataTable-BhokhW6d-QEuWLEd7.js → NoDataTable-CbxTnnUj-RBS2BO0t.js} +1 -1
  113. package/dist/assets/{NotFoundPage-uFZMkf3D-DLBn6ZTy.js → NotFoundPage-JK9WWLQL-t0Ol92QM.js} +1 -1
  114. package/dist/assets/{NotificationSettingsPage-BE1_MgJM-BWk4ph6m.js → NotificationSettingsPage-BYFMb4y6-BucvDhx8.js} +7 -7
  115. package/dist/assets/{NotificationsListConfig-CUWNEUCL-XvkMOcjh.js → NotificationsListConfig-EKmLeUqF-DPKxh2va.js} +1 -1
  116. package/dist/assets/{NotificationsPage-BMZvKV7t-v_KJjY-j.js → NotificationsPage-Ca9rvFJG-3IKE1yMl.js} +23 -23
  117. package/dist/assets/{OpExByVendorPage-BuHAApyT-ZSJOclS-.js → OpExByVendorPage-S3IdisaI-C-NcDs3u.js} +20 -20
  118. package/dist/assets/{OverlayContainerPage-BKHs_4eI-Cod2hmti.js → OverlayContainerPage-BKHs_4eI-B8gf_Owe.js} +1 -1
  119. package/dist/assets/{PandLWithForecastPage-B0IiVx6D-BofpOT29.js → PandLWithForecastPage-Bf-D_XNg-CrzOb2hU.js} +7 -7
  120. package/dist/assets/{PaymentAccountSetupBillingAddressSection-BkfPpFae-CQO2zwUL.js → PaymentAccountSetupBillingAddressSection-CMVwDWuf-jHkUqKP1.js} +13 -13
  121. package/dist/assets/{PeoplePage-Cj9mjcMw-9OYaHyag.js → PeoplePage-BKkwc_YR-BoZfR8X8.js} +1 -1
  122. package/dist/assets/{ProductsCarousel-_jYEgpxl-3H43gICJ.js → ProductsCarousel-DsI5t_Kc-Cpn89x6_.js} +1 -1
  123. package/dist/assets/{PromoBaseCards-8tkwl6GI-B2drNSiA.js → PromoBaseCards-CnQcR3Wn-B3iRHG7z.js} +1 -1
  124. package/dist/assets/{QBOConnectionDialog-CJz2SlfE-Cw-cnWS5.js → QBOConnectionDialog-PCdTWQqn-D0QAr5xA.js} +2 -2
  125. package/dist/assets/{QBOSetupSection-CpfryKtp-ZjQWXWah.js → QBOSetupSection-DhsqYA8G-Dcjp9EQd.js} +1 -1
  126. package/dist/assets/{ReimbursementApprovalRuleDetailPage-B8CBB3JI-xMBay2No.js → ReimbursementApprovalRuleDetailPage-Dao_lRpW-BNs6twdR.js} +1 -1
  127. package/dist/assets/{ReimbursementApprovalRulesPage-BsLmDz25-CgEjqCg6.js → ReimbursementApprovalRulesPage-B_LTt_z4-DnK-3YAX.js} +1 -1
  128. package/dist/assets/{ReimbursementDetailPage-DiG34Vur-Dcz6odls.js → ReimbursementDetailPage-H6HNtQHN-2pM8Fun7.js} +8 -8
  129. package/dist/assets/{ReimbursementPromoPage-CNZdwAl--BsBEvPRx.js → ReimbursementPromoPage-j-UbNrbV-VHty7Yzb.js} +4 -4
  130. package/dist/assets/{ReimbursementSetUpPage-Ccc4qnNZ-CPmymOEP.js → ReimbursementSetUpPage-FagEYTJ_-BpDXEjSX.js} +7 -7
  131. package/dist/assets/{ReimbursementsBulkReviewDrawerPage-Cza64yGU-BleycvIi.js → ReimbursementsBulkReviewDrawerPage-imSK_7rH-B3IJ7p46.js} +1 -1
  132. package/dist/assets/{ReloadCard-Cnz9ywvF-BGT4MYH-.js → ReloadCard-CqdeJe0l-Bb07dYPg.js} +3 -3
  133. package/dist/assets/{ReportTableViewSelector-B70dJfTV-SlWwkWXT.js → ReportTableViewSelector-DgPlLWgl-CNrxPhYC.js} +5 -5
  134. package/dist/assets/{ReportsPage-DdvNbMAj-SF_Ndi0S.js → ReportsPage-ByfO0uyp-DE8vAkKj.js} +6 -6
  135. package/dist/assets/{RevenueChart-B0CcrRHw-DSEzCN2z.js → RevenueChart-ChbWXtmx-BA32Na2v.js} +1 -1
  136. package/dist/assets/{ReviewDetailsPage-BVebc63A-zFlaxD9H.js → ReviewDetailsPage-BsOffi8f-BLsxP3vo.js} +5 -5
  137. package/dist/assets/{ReviewOverlay-Dm9GTjwu-bBb6sGal.js → ReviewOverlay-B73a-P2j-CTP6pyS2.js} +7 -7
  138. package/dist/assets/RoleWithToolTip-Ckorto5Y-CV42dy1h.js +22 -0
  139. package/dist/assets/{ScheduleDetailsFixedAssetsPage-BWwDY16q-BLBhJP_5.js → ScheduleDetailsFixedAssetsPage-0vTqFn9N-BEm7Cgkc.js} +8 -8
  140. package/dist/assets/{ScheduleDetailsPage-CqFbh9HE-R8G_b4b1.js → ScheduleDetailsPage-Cl11M6UJ-BhHsLjma.js} +3 -3
  141. package/dist/assets/{ScheduleSequenceTable-DDYFTEg4-CG84KRpd.js → ScheduleSequenceTable-ClzxD7gh-DTqJnrdA.js} +26 -26
  142. package/dist/assets/{ScreenRoutes-BVWkKC_W.js → ScreenRoutes-D3i6oNhN.js} +1 -1
  143. package/dist/assets/{SetUpAccountSection-BuF3A3dP-Dlc3aKO9.js → SetUpAccountSection-xqqgeGLA-YX4p_D4B.js} +1 -1
  144. package/dist/assets/{SignIn-CyGyU8wg-8SnTpqj6.js → SignIn-Bh-9-pko-DyJR1DLA.js} +14 -14
  145. package/dist/assets/{SignInScreen-CEzKwqwu.js → SignInScreen-CaiIkh6O.js} +1 -1
  146. package/dist/assets/{SpendManagementListViewPage-DPUhOVZl-B5bRhpPB.js → SpendManagementListViewPage-Bn4KmChq-B4Y0L643.js} +3 -3
  147. package/dist/assets/{SpendManagementPerTabPage-CeYdMTbj-DL_aA7k6.js → SpendManagementPerTabPage-pYgoZlfR-DI3UJ4l8.js} +37 -37
  148. package/dist/assets/{SpendManagementSection--vF9XUYO-BtgzDFex.js → SpendManagementSection-4ctnlmiO-I2pWsNDv.js} +1 -1
  149. package/dist/assets/{StatementItem-CiYj7XWK-5AkRMgC4.js → StatementItem-CYkgMHQd-B65BnaGl.js} +6 -6
  150. package/dist/assets/{StatementsPage-SLgIPcxl-DedL5QW0.js → StatementsPage-BeF9vuPn-DNaEdwZ3.js} +1 -1
  151. package/dist/assets/{StatusSwitcher-CAMXea4Z-Ci68Xk-W.js → StatusSwitcher-DOwOcMYF-CSG0Jxkr.js} +1 -1
  152. package/dist/assets/{SubTabSwitcher-BFezBmcr-Bv0UYLck.js → SubTabSwitcher-BcEtc_ob-GF65Or0C.js} +1 -1
  153. package/dist/assets/{SummaryCard-Bk5Eh2IR-CvYAWxo_.js → SummaryCard-fjNCTkA5-B-M5KnHi.js} +1 -1
  154. package/dist/assets/{TaskManagementPage-ClL2snRe-BkZUI-Os.js → TaskManagementPage-BYMJMIhz-Do04zyQE.js} +15 -15
  155. package/dist/assets/{TimeRangeSwitcher-fGI52XTc-B8YAuD1t.js → TimeRangeSwitcher-B4FKox6K-C6y8kYZQ.js} +1 -1
  156. package/dist/assets/{TimeframeSwitcher-CV-bryv5-BZG0GUCh.js → TimeframeSwitcher-DVWPgeL0-8qGmZwOz.js} +1 -1
  157. package/dist/assets/{TimeframeSwitcherWithToggle-kmZOYJwI-CNr8HJvn.js → TimeframeSwitcherWithToggle-BWGJWyJr-ClUkg8re.js} +1 -1
  158. package/dist/assets/{TopExCard-DeYN3ImD-B_G3aCn4.js → TopExCard-CUrz7PjD-Co2zX82Y.js} +5 -5
  159. package/dist/assets/{TopExDetailPage-BmyFCtzb-Cf6VgVmt.js → TopExDetailPage-BMzQUB6s-BXWwFBJe.js} +3 -3
  160. package/dist/assets/{TransactionDetailPage-BFpvUUmz-C0BrkJmS.js → TransactionDetailPage-CZdeoUBY-XP0PswSG.js} +31 -31
  161. package/dist/assets/{TransactionList-JHbSuP08-BE5oUWHj.js → TransactionList-CixEJAgS-CGekhIG9.js} +8 -8
  162. package/dist/assets/{TransactionListBig-FzOmuwBP-CVEEn05Z.js → TransactionListBig-CMVJvB3o-DxRTSLNX.js} +7 -7
  163. package/dist/assets/{TransactionListPage-Kkxkkd_A-uxvvUDBa.js → TransactionListPage-CAMz9-YS-BNVZMAVt.js} +6 -6
  164. package/dist/assets/{TransactionVendorDetailPage-m1wxsTyn-CtzfWKY9.js → TransactionVendorDetailPage-CzbyeJ4F-DfY35mWk.js} +3 -3
  165. package/dist/assets/{TransferDrawerPage-obzTPCDc-DmDROdGW.js → TransferDrawerPage-aQAyy9SJ-CtSZX6V_.js} +6 -6
  166. package/dist/assets/{TreasuryOverviewPage-DW68UR3w-CXp8UZWj.js → TreasuryOverviewPage-DStdhtYj-BmaX-LUn.js} +8 -8
  167. package/dist/assets/{TreasuryPromoPage-BW76YUSB-1YJbHf0S.js → TreasuryPromoPage-ukEVtL3s-BxkytgW6.js} +7 -7
  168. package/dist/assets/{TreasuryStatementsPage-BDD4VO8n-DUjcdDs1.js → TreasuryStatementsPage-CrTNmv-B-fC2pfiKh.js} +1 -1
  169. package/dist/assets/{TreasuryTaxLetterPage-B2NDIt_Q-DCX4Q69d.js → TreasuryTaxLetterPage-BkyI9zJM-Ds84Dj6n.js} +1 -1
  170. package/dist/assets/{TrendChart-D5CYCZnh-DAyWGjcL.js → TrendChart-BV_FYo44-Dbzn5dy8.js} +1 -1
  171. package/dist/assets/{TrendWithTransactions-DoCnDpHm-CdDHaHZ9.js → TrendWithTransactions-COtEkfX9-BcCvtDz-.js} +5 -5
  172. package/dist/assets/{UncategorizedAccountsMappingPage-DX_TBAhJ-BssvOjsa.js → UncategorizedAccountsMappingPage-CDFz90Rp-CAIHAo3N.js} +1 -1
  173. package/dist/assets/{UnitIntegrationPage-DZfp553j-ByWZS3hU.js → UnitIntegrationPage-DU3fVYZs-CPctIuWc.js} +1 -1
  174. package/dist/assets/UploadAdditionalDocumentOverlay-C663UVhz-FUVjkpYI.js +38 -0
  175. package/dist/assets/{Vendor2FAPopup-BmT-gcIz-n3vjq-3y.js → Vendor2FAPopup-DTGw_BLn-CTkC0axp.js} +1 -1
  176. package/dist/assets/{VendorACHDetailsPage-CQ7Hq4OS-OICNgdvg.js → VendorACHDetailsPage-BEB-BRPf-BW1XdRCh.js} +1 -1
  177. package/dist/assets/{VendorDetailPage-Cs6xk6eD-zl-heKdM.js → VendorDetailPage-DgKqF5w_-Da2PCb7B.js} +5 -5
  178. package/dist/assets/{VendorDomesticWireDetailsPage-8mY07nVg-DHqiq7vN.js → VendorDomesticWireDetailsPage-DsT7aeCi-Cxqzwzrv.js} +1 -1
  179. package/dist/assets/{VendorFiling1099EditablePage-CAFeI80I-sDSbFxEy.js → VendorFiling1099EditablePage-DSQPqiXK-BlXqobVl.js} +14 -14
  180. package/dist/assets/{VendorFirstReviewPage-ACNdg13I-BUeCp6NI.js → VendorFirstReviewPage-CHhQfRiw-BCpTFAZN.js} +70 -70
  181. package/dist/assets/{VendorInternationalWireDetailsPage-BpkamVMK-D0VBsQab.js → VendorInternationalWireDetailsPage-BALUN3IH-B1HapV15.js} +4 -4
  182. package/dist/assets/{VendorInternationalWireSwiftDetailsPage-Gvr65ujG-DJLCreKr.js → VendorInternationalWireSwiftDetailsPage-BCJLWye_-CJZeW3NQ.js} +1 -1
  183. package/dist/assets/{VendorsAccountsSection-AmC5VwVD-DhkXxukb.js → VendorsAccountsSection-BNeOtayE-BfOhq53p.js} +1 -1
  184. package/dist/assets/{VerifyDevice-PHsuiYk_-D412mfmG.js → VerifyDevice-BdS9Wg6i-km9HNFiy.js} +2 -2
  185. package/dist/assets/{VideoPlayer-DSqyhtMK-C3AGcKQT.js → VideoPlayer--4ECwDUJ-DpdXEWOa.js} +1 -1
  186. package/dist/assets/{VideoPopup-BcGkTYtT-KpRyilVI.js → VideoPopup-D0KR8nhb-L_41dJ_u.js} +1 -1
  187. package/dist/assets/{WarningsDrawerPage-BMxsT694-CfyoaWK9.js → WarningsDrawerPage-CZi7W_N2-BvrjJAup.js} +10 -10
  188. package/dist/assets/{ZeniAccountDetailPage-CvVIdc-T-DXao_tc2.js → ZeniAccountDetailPage-DRpUQWRY-CFQQ9DDl.js} +1 -1
  189. package/dist/assets/{ZeniAccountListViewPage-D8RyYP_F-v3DmCD-q.js → ZeniAccountListViewPage-B58qILci-DPpjeTIQ.js} +1 -1
  190. package/dist/assets/{ZeniAccountNavBarPieces-DN7XGX4V-Dx8A5GLh.js → ZeniAccountNavBarPieces-BvwIaUWa-BHDVxbAK.js} +2 -2
  191. package/dist/assets/{ZeniAccountPromoPage-DtkPkWS_-DSD29DUQ.js → ZeniAccountPromoPage-BKn8HRaG-C8TqY5PJ.js} +10 -10
  192. package/dist/assets/{ZeniAccountSetupPage-NDzdHEb2-CwWBVh2N.js → ZeniAccountSetupPage-B52_WsH5-Ny13na_H.js} +2 -2
  193. package/dist/assets/{ZeniCopyright-C2Et8K0x-lDJzPJZG.js → ZeniCopyright-BBZoZbnj-BkZUi5kn.js} +1 -1
  194. package/dist/assets/{ZeniTransferAmountSlider-D7NLq8nU-CERt_WDB.js → ZeniTransferAmountSlider-DuVixxF--B3VBiout.js} +1 -1
  195. package/dist/assets/{analyticsHelper-CaFa35yP-G2_hr-0j.js → analyticsHelper-BFEbpTaS-CI1-ZwNW.js} +1 -1
  196. package/dist/assets/{analyticsHelper-DU_Un8e0.js → analyticsHelper-DEd3yAFk.js} +1 -1
  197. package/dist/assets/{chartTypes-D3stzk-w-BOvyI3x_.js → chartTypes-D3rvsvls-DmtOpgie.js} +1 -1
  198. package/dist/assets/{commonDimensions-DP_SFwFq-B4nonWMr.js → commonDimensions-DTY9_AOp-DlMPlh2t.js} +1 -1
  199. package/dist/assets/{detailCommon-Cz5amAEd-Cc-pki0l.js → detailCommon-CLP6KEix-B5bEqT96.js} +4 -4
  200. package/dist/assets/{downloadPdf-BEpDZsHw-iAkz6QUF.js → downloadPdf-DEpaGHNR-Bw53_d32.js} +1 -1
  201. package/dist/assets/{index-CUpJHznP.js → index-CN7UAWAg.js} +2530 -2515
  202. package/dist/assets/{mapLoadingInProgressToTreeNode-9Bg2UmOc-COxeXpBk.js → mapLoadingInProgressToTreeNode-B_mkEOSy-BQa7i_Nl.js} +1 -1
  203. package/dist/assets/{mapSectionWithAcOnlyToTreeNode-CrGK4Cl1-CK5Yo8-v.js → mapSectionWithAcOnlyToTreeNode-C_s2TWXG-1zhixfCC.js} +1 -1
  204. package/dist/assets/{mapSpacerToTreeNode-Dpahky1g-BWER0KF3.js → mapSpacerToTreeNode-BsPCAFm5-CkJKxUF2.js} +1 -1
  205. package/dist/assets/{mapTimeframeBalancesToTreeNode-DGNk2hE1-BtbWYKjA.js → mapTimeframeBalancesToTreeNode-6mbqZF6a-D84LKXiT.js} +1 -1
  206. package/dist/assets/{mapTimeframeBalancesToTreeNode-DD94NO-L-IqTvqjc2.js → mapTimeframeBalancesToTreeNode-DLbpODYp-DDiXCv85.js} +1 -1
  207. package/dist/assets/{mapTimeframeHeaderLoadingInProgressToTreeNode-CJYVSL83-sS_oqH0-.js → mapTimeframeHeaderLoadingInProgressToTreeNode-CKvU3bUP-kVnJxQIG.js} +1 -1
  208. package/dist/assets/{toCOABalancesWithID-iOGWxWc5-CwkpaTeT.js → toCOABalancesWithID-CHHSLp5k-D9n1b9Hs.js} +1 -1
  209. package/dist/assets/{toChartData-BEJwj1pL-BUKCXEQF.js → toChartData-CBhPep_F-DbHa5eNf.js} +1 -1
  210. package/dist/assets/{uploadAttachment-Cs4cwF3u-BqxRSnPC.js → uploadAttachment-BXzSdWYh-ChPsAoWK.js} +6 -6
  211. package/dist/assets/{uploadReceipts-Dp1dvCjf-Rghek-rE.js → uploadReceipts-Dp1dvCjf-CdBFemgP.js} +1 -1
  212. package/dist/index.html +1 -1
  213. package/package.json +4 -4
  214. package/dist/assets/CustomerOnboardingContainerPage-BoQBdIuG-Dc2nEhqg.js +0 -1
  215. package/dist/assets/EditPeoplePage-DIj7SItK-CKkznNAO.js +0 -55
  216. package/dist/assets/RoleWithToolTip-CqLSnFDx-DgQ7tDAb.js +0 -22
  217. package/dist/assets/UploadAdditionalDocumentOverlay-BqO1S9_p-C6rWAFOs.js +0 -38
@@ -1,4 +1,4 @@
1
- import{d as ve,q as je,aa as Xe,cT as Ye,j as t,bG as Qe,F as re,o as i,L as se,cB as Ze,ad as et,c6 as tt,y as I,an as nt,am as N,b9 as it,b as Ne,B as ot,a9 as ze,d4 as at,aP as J,aU as fe,fL as Te,l as G,dc as ct,bB as De,fM as _e,fX as lt,fY as qe,fZ as st,f_ as rt,ce as Oe,u as k,fO as ge,fP as we,f$ as Pe,aN as Se,ct as xe,aM as dt,bQ as ut,e4 as He,p as ie,ai as F,g0 as pt,g1 as ht,g2 as mt,bn as ft,g3 as gt}from"./index-CUpJHznP.js";import{b as r,n}from"./vendor-Bs1fkIUX.js";import{r as Ie}from"./mui-Ty75qFQF.js";import{a as wt}from"./SetUpAccountSection-BuF3A3dP-Dlc3aKO9.js";import"./analytics-BbBRZ6cw.js";import"./routing-Dk1A2KYI.js";import"./sentry-BE5FTzpq.js";import"./redux-CEhZD0hA.js";import"./liveblocks-8ht9CoL5.js";import"./crypto-CK1x27Ua.js";const{settings:{bankConnectionHeader:de}}=re.getLocalizedStrings().common,St={value:de.productType,width:new I(100,19)},xt={value:de.primaryAccount,width:new I(100,36)},yt={value:de.linkAccount,width:new I(100,22)},vt={value:de.status,width:new I(12,12)},kt={value:de.balance,width:new I(12,13)},D=[St,xt,yt,vt,kt],{common:{settings:Ee,strings:{hyphen:ke}},commonSetUp:{setUp:Be}}=re.getLocalizedStrings(),T={containerPadding:new I(k[3],k[4]),containerRightPadding:new I(k[3],k[8]),iconContainerMaxWidthHeight:new I(k[6],k[7]),iconWidthHeight:new I(20,k[4]),iconPadding:new I(k[1],12),productTypeContainerMarginBottom:new I(k[3],k[0]),linkAccountContainerMarginTop:new I(k[3],k[0]),productTypeIconSize:new I(k[3],k[4])},bt="bankConnectionsSettingsPage",$t=({productType:e,windowSize:h})=>{switch(e){case"bill_pay":return t.jsx(Nt,{windowSize:h,children:t.jsx(ft,{})});case"reimbursement":return t.jsx(Dt,{windowSize:h,children:t.jsx(mt,{})});case"zeni_accounts":return t.jsx(qt,{windowSize:h,children:t.jsx(De,{})});case"zeni_treasury":return t.jsx(Gt,{windowSize:h,children:t.jsx(ht,{})});case"charge_cards":default:return t.jsx(Ht,{windowSize:h,children:t.jsx(pt,{})})}},Ct=({allBankAccounts:e,setupView:h,connectedAccountProvider:q,onFetchLinkTokenClick:R,onUpdatePaymentAccountStatus:_,onEstablishConnectionClick:P,onEstablishConnectionSuccess:V})=>{const C=ve(),c=je(),f=ze().analytics,{trigger:w,formState:{errors:M}}=at(),{plaidConnectionDetails:U,allFundingAccounts:a,primaryFundingAccount:o,productType:l}=h,m=U.link_account,b=U.update_account,[u,A]=r.useState(void 0),[H,v]=r.useState(!1),W=()=>{v(!0)},d=u==="update_account"?b:m,[S,L]=r.useState(d.linkToken??null),[$,z]=r.useState(!1),g=m.fetchStatus.fetchState==="In-Progress"||m.updateStatus.fetchState==="In-Progress";let p,O,s,j=!1;o!=null&&(o.accType==="depositAccount"?p={code:"verified",name:"Verified"}:(p=o.providerVerificationStatus,O=o?.institutionDetails,s=p?.code,j=o?.isLoginRequired??!1));const Y=J(m.updateStatus.fetchState),Q=J(b.updateStatus.fetchState),ee=J(b.fetchStatus.fetchState),E=C.mode==="light"?new fe(C.colors.brandColorJadeLight):new fe(C.colors.brandColorJadeDark),K=r.useCallback((x,X)=>{f.trackConnectBankSuccess(l,"Settings");const Le=X.accounts.find(Ke=>Ke.id===o?.providerAccountId)??X.accounts[0];o?.id!=null&&u==="update_account"&&Le?.verification_status!=null&&!j?_(Le?.verification_status,o.id,"update_account",y(l),l):P(x,y(l),l),A(void 0),z(!1)},[f,l,o?.id,o?.providerAccountId,u,j,_,P]),te=r.useCallback((x,X)=>{x!=null&&(f.trackConnectBankFailure(l,x.error_code+" "+x.error_message,"Settings"),x.error_code==="TOO_MANY_VERIFICATION_ATTEMPTS"&&o?.id!=null&&_("verification_failed",o.id,"update_account",y(l),l),console.log("Plaid Connection Error",x,X)),A(void 0),z(!1)},[f,l,o?.id,_]),{open:Z,ready:ue}=Te({token:S,onSuccess:K,onExit:te});r.useEffect(()=>{(Y==="In-Progress"&&m.updateStatus.fetchState==="Completed"||Q==="In-Progress"&&b.updateStatus.fetchState==="Completed")&&(G.isVerifiedPaymentAccountProviderStatusCode(s??"")||(R("link_account",y(l)),V(y(l),l)))},[m.updateStatus.fetchState,V,R,o?.providerVerificationStatus?.code,o?.id,Y,Q,b.updateStatus.fetchState,s,l]),r.useEffect(()=>{(G.isVerifiedStatusCode(s??"")||s==="verification_failed")&&!$&&u!=null&&d.linkToken===S&&d.fetchStatus.fetchState==="Completed"&&ue&&z(!0)},[ue,S,d.fetchStatus.fetchState,d.linkToken,s,u,$]);const oe=$e(bt,"primaryAccountSection"),B=ct(M,oe);r.useEffect(()=>{d.fetchStatus.fetchState==="Completed"&&d.linkToken!=null&&d.linkToken!==S&&L(d.linkToken)},[d.fetchStatus.fetchState,d.linkToken,S]),r.useEffect(()=>{$&&Z()},[$,Z]),r.useEffect(()=>{!o?.zeniAccountId&&!B&&w(oe)},[o?.id]),r.useEffect(()=>{(s==null||s==="verification_failed"||s==="verification_expired"||G.isVerifiedStatusCode(s))&&(G.zeniDate(new Date().toISOString()).isAfter(m.expiration)||m.linkToken==null)&&R("link_account",y(l))},[]);const ne=()=>{f.trackConnectBankGetBalance(l,"Settings"),A("update_account"),R("update_account",y(l),o?.id)},ae=`${o?.accountSubType?.name!=null?o?.accountSubType?.name.substring(0,1).toUpperCase().concat(o?.accountSubType?.name.substring(1)):""} ${o?.maskedAccountNumber??""}`.trim(),pe=O?.zeniInstitutionId.toLowerCase()==="chase",Ge=a.findIndex(x=>x.id===o?.id),Je={element:t.jsx(De,{width:T.iconWidthHeight.valuePx(c)}),color:E};return t.jsxs(At,{windowSize:c,children:[H===!0?Ie.createPortal(t.jsx(_e,{connectedAccountProvider:q,action:{onBackClick:()=>v(!1)}}),document.body):null,t.jsxs(jt,{windowSize:c,wrapperWidth:D[0].width,children:[t.jsx(Tt,{windowSize:c,isDarkMode:C.mode==="dark",children:t.jsx($t,{productType:l,windowSize:c})}),t.jsx(zt,{children:Ee.productNameByType[l]})]}),t.jsx(_t,{windowSize:c,wrapperWidth:D[1].width,children:t.jsxs(Bt,{windowSize:c,children:[o!=null&&c!=="small"?t.jsx(Et,{isDisabled:j,children:lt(Je,c,C.mode==="dark",o,Ge,!1)}):null,t.jsxs(Ft,{windowSize:c,className:"fundingAccount",children:[t.jsx(qe,{style:{display:c==="small"?"block":"inherit",width:"-webkit-fill-available",color:C.colors.hero},customStyleConfig:{menu:()=>({width:c==="small"?"auto":510})},controlProperty:{controlHeight:k[4],fontWeight:Oe.medium,highlightOnHover:!1,leftRightMargin:!1,fieldWidth:c==="small"?240:300},customPlaceholder:{color:C.colors.hero,weight:Oe.medium},name:$e(l,"primaryAccountSection"),placeholder:Be.selectAccountPlaceholder,capitalizeOptions:!0,appendSublabel:!1,showLogoInSingleValue:!1,isClearable:!1,maxMenuHeight:220,valueToLogo:(x,X)=>rt(a,x,X),valueToSubLabels:(x,X)=>st(a,x,X,!1),defaultValue:{selectedOption:o?.id,allOptions:a.map(x=>({label:x.label,value:x.id,isRecommended:x.accType==="depositAccount"}))},textAlignment:"left",showDownChevronIcon:!0,showTickIcon:!1,isOptionRemovable:!1,registerOptions:{required:!1},showCreateOption:!0,showEmptyState:!1,isDisabled:g?"disabled":void 0,showLoadingIcon:g,onClickCreateOption:()=>{f.trackConnectBank(l,"Settings"),A("link_account"),m.linkToken==null||G.zeniDate(new Date().toISOString()).isAfter(m.expiration)?R("link_account",y(l)):S!==m.linkToken?L(m.linkToken):$?Z():z(!0)}}),t.jsxs(Pt,{isDisabled:j,children:[ae?t.jsxs(t.Fragment,{children:[t.jsx(It,{children:ae}),c!=="small"&&(s!=="verification_failed"&&o?.providerVerificationStatus?.code==="pending_manual_verification"||j||pe)?t.jsx(Ot,{}):null]}):null,c==="small"&&p!=null?t.jsx(ge,{style:{width:"max-content",padding:i.sp0,marginLeft:i.sp2},tagTitle:p.name,textColor:we(p.code)}):null,s!=="verification_failed"&&o?.providerVerificationStatus?.code==="pending_manual_verification"||j||pe?t.jsx(Pe,{productType:l,isUpdateLinkClicked:u==="update_account",isLoginRequired:j,isPendingVerification:s!=="verification_failed"&&o?.providerVerificationStatus?.code==="pending_manual_verification",fetchAndUpdateStatues:{fetchStatus:b.fetchStatus,updateStatus:b.updateStatus,linkFetchStatus:m.fetchStatus,linkUpdateStatus:m.updateStatus,prevFetchState:ee,prevUpdateState:Q},onUpdateLinkTokenClick:ne,onChaseInfoClick:W}):null]})]}),c==="small"?t.jsxs(Vt,{children:[o?.accountBalance?.available?t.jsx(Fe,{className:"balanceLabel",children:Se("0,0[.]00",o?.accountBalance?.available)}):t.jsx(be,{children:ke}),o?.accountBalance?.lastRefreshTime?t.jsx(Re,{className:"balanceLabel",children:xe(o?.accountBalance?.lastRefreshTime)}):o?.balanceFetchStatus.fetchState==="In-Progress"?t.jsx(se,{size:"Small",start:!0}):null]}):null]})}),t.jsxs(Ut,{windowSize:c,isDisabled:j,wrapperWidth:D[2].width,onClick:x=>x.stopPropagation(),"data-testid":dt("bank-account-section",l),className:"qboLinkAcc",children:[c==="small"?t.jsx(Lt,{children:Ee.bankConnectionHeader.linkAccount}):null,t.jsx(Wt,{isDisabled:j?"disabled":void 0,name:$e(l,"bankAccountSection"),placeholder:Be.zeniCashAccountPlaceholder,defaultValue:{selectedOption:o?.zeniAccountId??"",allOptions:e.map(x=>({label:x.accountName,value:x.accountId}))},controlProperty:{highlightOnHover:!0},isOptionRemovable:!1,textAlignment:"left",registerOptions:{required:!1},style:{width:c==="small"?"calc(100% - 135px)":"100%",marginLeft:c==="small"?i.sp0:`-${i.sp3}`}})]}),c!=="small"?t.jsx(Mt,{windowSize:c,wrapperWidth:D[3].width,children:p!=null?t.jsx(ge,{style:{width:"max-content",padding:0},tagTitle:p.name,textColor:we(p.code)}):t.jsx(be,{children:ke})}):null,c!=="small"?t.jsxs(Rt,{windowSize:c,wrapperWidth:D[4].width,children:[o?.accountBalance?.available?t.jsx(Fe,{className:"balanceLabel",children:Se("0,0[.]00",o?.accountBalance?.available)}):t.jsx(be,{children:ke}),o?.accountBalance?.lastRefreshTime?t.jsx(Re,{className:"balanceLabel",children:xe(o?.accountBalance?.lastRefreshTime)}):o?.balanceFetchStatus.fetchState==="In-Progress"?t.jsx(se,{size:"Small",start:!0}):null]}):null]})},At=n.div`
1
+ import{d as ve,q as je,aa as Xe,cT as Ye,j as t,bG as Qe,F as re,o as i,k as se,cB as Ze,ad as et,c6 as tt,y as I,an as nt,am as D,b9 as it,b as De,B as ot,a9 as ze,d4 as at,aP as J,aU as fe,fL as Te,l as G,dc as ct,bB as Ne,fM as _e,fX as lt,fY as He,fZ as st,f_ as rt,ce as Oe,u as k,fO as ge,fP as we,f$ as Pe,aN as Se,ct as xe,aM as dt,bQ as ut,e4 as qe,p as ie,ai as F,g0 as pt,g1 as ht,g2 as mt,bn as ft,g3 as gt}from"./index-CN7UAWAg.js";import{b as r,n}from"./vendor-Bs1fkIUX.js";import{r as Ie}from"./mui-Ty75qFQF.js";import{a as wt}from"./SetUpAccountSection-xqqgeGLA-YX4p_D4B.js";import"./analytics-BbBRZ6cw.js";import"./routing-Dk1A2KYI.js";import"./sentry-BE5FTzpq.js";import"./redux-CEhZD0hA.js";import"./liveblocks-8ht9CoL5.js";import"./crypto-CK1x27Ua.js";const{settings:{bankConnectionHeader:de}}=re.getLocalizedStrings().common,St={value:de.productType,width:new I(100,19)},xt={value:de.primaryAccount,width:new I(100,36)},yt={value:de.linkAccount,width:new I(100,22)},vt={value:de.status,width:new I(12,12)},kt={value:de.balance,width:new I(12,13)},N=[St,xt,yt,vt,kt],{common:{settings:Be,strings:{hyphen:ke}},commonSetUp:{setUp:Ee}}=re.getLocalizedStrings(),T={containerPadding:new I(k[3],k[4]),containerRightPadding:new I(k[3],k[8]),iconContainerMaxWidthHeight:new I(k[6],k[7]),iconWidthHeight:new I(20,k[4]),iconPadding:new I(k[1],12),productTypeContainerMarginBottom:new I(k[3],k[0]),linkAccountContainerMarginTop:new I(k[3],k[0]),productTypeIconSize:new I(k[3],k[4])},bt="bankConnectionsSettingsPage",$t=({productType:e,windowSize:h})=>{switch(e){case"bill_pay":return t.jsx(Dt,{windowSize:h,children:t.jsx(ft,{})});case"reimbursement":return t.jsx(Nt,{windowSize:h,children:t.jsx(mt,{})});case"zeni_accounts":return t.jsx(Ht,{windowSize:h,children:t.jsx(Ne,{})});case"zeni_treasury":return t.jsx(Gt,{windowSize:h,children:t.jsx(ht,{})});case"charge_cards":default:return t.jsx(qt,{windowSize:h,children:t.jsx(pt,{})})}},Ct=({allBankAccounts:e,setupView:h,connectedAccountProvider:H,onFetchLinkTokenClick:R,onUpdatePaymentAccountStatus:_,onEstablishConnectionClick:P,onEstablishConnectionSuccess:V})=>{const C=ve(),c=je(),f=ze().analytics,{trigger:w,formState:{errors:M}}=at(),{plaidConnectionDetails:U,allFundingAccounts:a,primaryFundingAccount:o,productType:l}=h,m=U.link_account,b=U.update_account,[u,A]=r.useState(void 0),[q,v]=r.useState(!1),W=()=>{v(!0)},d=u==="update_account"?b:m,[S,L]=r.useState(d.linkToken??null),[$,z]=r.useState(!1),g=m.fetchStatus.fetchState==="In-Progress"||m.updateStatus.fetchState==="In-Progress";let p,O,s,j=!1;o!=null&&(o.accType==="depositAccount"?p={code:"verified",name:"Verified"}:(p=o.providerVerificationStatus,O=o?.institutionDetails,s=p?.code,j=o?.isLoginRequired??!1));const Y=J(m.updateStatus.fetchState),Q=J(b.updateStatus.fetchState),ee=J(b.fetchStatus.fetchState),B=C.mode==="light"?new fe(C.colors.brandColorJadeLight):new fe(C.colors.brandColorJadeDark),K=r.useCallback((x,X)=>{f.trackConnectBankSuccess(l,"Settings");const Le=X.accounts.find(Ke=>Ke.id===o?.providerAccountId)??X.accounts[0];o?.id!=null&&u==="update_account"&&Le?.verification_status!=null&&!j?_(Le?.verification_status,o.id,"update_account",y(l),l):P(x,y(l),l),A(void 0),z(!1)},[f,l,o?.id,o?.providerAccountId,u,j,_,P]),te=r.useCallback((x,X)=>{x!=null&&(f.trackConnectBankFailure(l,x.error_code+" "+x.error_message,"Settings"),x.error_code==="TOO_MANY_VERIFICATION_ATTEMPTS"&&o?.id!=null&&_("verification_failed",o.id,"update_account",y(l),l),console.log("Plaid Connection Error",x,X)),A(void 0),z(!1)},[f,l,o?.id,_]),{open:Z,ready:ue}=Te({token:S,onSuccess:K,onExit:te});r.useEffect(()=>{(Y==="In-Progress"&&m.updateStatus.fetchState==="Completed"||Q==="In-Progress"&&b.updateStatus.fetchState==="Completed")&&(G.isVerifiedPaymentAccountProviderStatusCode(s??"")||(R("link_account",y(l)),V(y(l),l)))},[m.updateStatus.fetchState,V,R,o?.providerVerificationStatus?.code,o?.id,Y,Q,b.updateStatus.fetchState,s,l]),r.useEffect(()=>{(G.isVerifiedStatusCode(s??"")||s==="verification_failed")&&!$&&u!=null&&d.linkToken===S&&d.fetchStatus.fetchState==="Completed"&&ue&&z(!0)},[ue,S,d.fetchStatus.fetchState,d.linkToken,s,u,$]);const oe=$e(bt,"primaryAccountSection"),E=ct(M,oe);r.useEffect(()=>{d.fetchStatus.fetchState==="Completed"&&d.linkToken!=null&&d.linkToken!==S&&L(d.linkToken)},[d.fetchStatus.fetchState,d.linkToken,S]),r.useEffect(()=>{$&&Z()},[$,Z]),r.useEffect(()=>{!o?.zeniAccountId&&!E&&w(oe)},[o?.id]),r.useEffect(()=>{(s==null||s==="verification_failed"||s==="verification_expired"||G.isVerifiedStatusCode(s))&&(G.zeniDate(new Date().toISOString()).isAfter(m.expiration)||m.linkToken==null)&&R("link_account",y(l))},[]);const ne=()=>{f.trackConnectBankGetBalance(l,"Settings"),A("update_account"),R("update_account",y(l),o?.id)},ae=`${o?.accountSubType?.name!=null?o?.accountSubType?.name.substring(0,1).toUpperCase().concat(o?.accountSubType?.name.substring(1)):""} ${o?.maskedAccountNumber??""}`.trim(),pe=O?.zeniInstitutionId.toLowerCase()==="chase",Ge=a.findIndex(x=>x.id===o?.id),Je={element:t.jsx(Ne,{width:T.iconWidthHeight.valuePx(c)}),color:B};return t.jsxs(At,{windowSize:c,children:[q===!0?Ie.createPortal(t.jsx(_e,{connectedAccountProvider:H,action:{onBackClick:()=>v(!1)}}),document.body):null,t.jsxs(jt,{windowSize:c,wrapperWidth:N[0].width,children:[t.jsx(Tt,{windowSize:c,isDarkMode:C.mode==="dark",children:t.jsx($t,{productType:l,windowSize:c})}),t.jsx(zt,{children:Be.productNameByType[l]})]}),t.jsx(_t,{windowSize:c,wrapperWidth:N[1].width,children:t.jsxs(Et,{windowSize:c,children:[o!=null&&c!=="small"?t.jsx(Bt,{isDisabled:j,children:lt(Je,c,C.mode==="dark",o,Ge,!1)}):null,t.jsxs(Ft,{windowSize:c,className:"fundingAccount",children:[t.jsx(He,{style:{display:c==="small"?"block":"inherit",width:"-webkit-fill-available",color:C.colors.hero},customStyleConfig:{menu:()=>({width:c==="small"?"auto":510})},controlProperty:{controlHeight:k[4],fontWeight:Oe.medium,highlightOnHover:!1,leftRightMargin:!1,fieldWidth:c==="small"?240:300},customPlaceholder:{color:C.colors.hero,weight:Oe.medium},name:$e(l,"primaryAccountSection"),placeholder:Ee.selectAccountPlaceholder,capitalizeOptions:!0,appendSublabel:!1,showLogoInSingleValue:!1,isClearable:!1,maxMenuHeight:220,valueToLogo:(x,X)=>rt(a,x,X),valueToSubLabels:(x,X)=>st(a,x,X,!1),defaultValue:{selectedOption:o?.id,allOptions:a.map(x=>({label:x.label,value:x.id,isRecommended:x.accType==="depositAccount"}))},textAlignment:"left",showDownChevronIcon:!0,showTickIcon:!1,isOptionRemovable:!1,registerOptions:{required:!1},showCreateOption:!0,showEmptyState:!1,isDisabled:g?"disabled":void 0,showLoadingIcon:g,onClickCreateOption:()=>{f.trackConnectBank(l,"Settings"),A("link_account"),m.linkToken==null||G.zeniDate(new Date().toISOString()).isAfter(m.expiration)?R("link_account",y(l)):S!==m.linkToken?L(m.linkToken):$?Z():z(!0)}}),t.jsxs(Pt,{isDisabled:j,children:[ae?t.jsxs(t.Fragment,{children:[t.jsx(It,{children:ae}),c!=="small"&&(s!=="verification_failed"&&o?.providerVerificationStatus?.code==="pending_manual_verification"||j||pe)?t.jsx(Ot,{}):null]}):null,c==="small"&&p!=null?t.jsx(ge,{style:{width:"max-content",padding:i.sp0,marginLeft:i.sp2},tagTitle:p.name,textColor:we(p.code)}):null,s!=="verification_failed"&&o?.providerVerificationStatus?.code==="pending_manual_verification"||j||pe?t.jsx(Pe,{productType:l,isUpdateLinkClicked:u==="update_account",isLoginRequired:j,isPendingVerification:s!=="verification_failed"&&o?.providerVerificationStatus?.code==="pending_manual_verification",fetchAndUpdateStatues:{fetchStatus:b.fetchStatus,updateStatus:b.updateStatus,linkFetchStatus:m.fetchStatus,linkUpdateStatus:m.updateStatus,prevFetchState:ee,prevUpdateState:Q},onUpdateLinkTokenClick:ne,onChaseInfoClick:W}):null]})]}),c==="small"?t.jsxs(Vt,{children:[o?.accountBalance?.available?t.jsx(Fe,{className:"balanceLabel",children:Se("0,0[.]00",o?.accountBalance?.available)}):t.jsx(be,{children:ke}),o?.accountBalance?.lastRefreshTime?t.jsx(Re,{className:"balanceLabel",children:xe(o?.accountBalance?.lastRefreshTime)}):o?.balanceFetchStatus.fetchState==="In-Progress"?t.jsx(se,{size:"Small",start:!0}):null]}):null]})}),t.jsxs(Ut,{windowSize:c,isDisabled:j,wrapperWidth:N[2].width,onClick:x=>x.stopPropagation(),"data-testid":dt("bank-account-section",l),className:"qboLinkAcc",children:[c==="small"?t.jsx(Lt,{children:Be.bankConnectionHeader.linkAccount}):null,t.jsx(Wt,{isDisabled:j?"disabled":void 0,name:$e(l,"bankAccountSection"),placeholder:Ee.zeniCashAccountPlaceholder,defaultValue:{selectedOption:o?.zeniAccountId??"",allOptions:e.map(x=>({label:x.accountName,value:x.accountId}))},controlProperty:{highlightOnHover:!0},isOptionRemovable:!1,textAlignment:"left",registerOptions:{required:!1},style:{width:c==="small"?"calc(100% - 135px)":"100%",marginLeft:c==="small"?i.sp0:`-${i.sp3}`}})]}),c!=="small"?t.jsx(Mt,{windowSize:c,wrapperWidth:N[3].width,children:p!=null?t.jsx(ge,{style:{width:"max-content",padding:0},tagTitle:p.name,textColor:we(p.code)}):t.jsx(be,{children:ke})}):null,c!=="small"?t.jsxs(Rt,{windowSize:c,wrapperWidth:N[4].width,children:[o?.accountBalance?.available?t.jsx(Fe,{className:"balanceLabel",children:Se("0,0[.]00",o?.accountBalance?.available)}):t.jsx(be,{children:ke}),o?.accountBalance?.lastRefreshTime?t.jsx(Re,{className:"balanceLabel",children:xe(o?.accountBalance?.lastRefreshTime)}):o?.balanceFetchStatus.fetchState==="In-Progress"?t.jsx(se,{size:"Small",start:!0}):null]}):null]})},At=n.div`
2
2
  display: flex;
3
3
  flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
4
4
  align-items: ${e=>e.windowSize==="small"?"flex-start":"center"};
@@ -15,7 +15,7 @@ import{d as ve,q as je,aa as Xe,cT as Ye,j as t,bG as Qe,F as re,o as i,L as se,
15
15
  width: ${e=>e.wrapperWidth.valuePercentage(e.windowSize)};
16
16
  margin-bottom: ${e=>T.productTypeContainerMarginBottom.valuePx(e.windowSize)};
17
17
  padding-right: ${i.sp3};
18
- `,zt=n(N)`
18
+ `,zt=n(D)`
19
19
  white-space: nowrap;
20
20
  overflow: hidden;
21
21
  text-overflow: ellipsis;
@@ -45,7 +45,7 @@ import{d as ve,q as je,aa as Xe,cT as Ye,j as t,bG as Qe,F as re,o as i,L as se,
45
45
  flex-wrap: wrap;
46
46
  `,It=n.div`
47
47
  display: flex;
48
- `,Fe=n(N)`
48
+ `,Fe=n(D)`
49
49
  display: flex;
50
50
  justify-content: flex-end;
51
51
  `,Re=n(F)`
@@ -61,10 +61,10 @@ import{d as ve,q as je,aa as Xe,cT as Ye,j as t,bG as Qe,F as re,o as i,L as se,
61
61
  height: ${i.sp1};
62
62
  cursor: inherit;
63
63
  background-color: ${e=>e.theme.colors.grey1};
64
- `,Et=n.div`
64
+ `,Bt=n.div`
65
65
  display: flex;
66
66
  opacity: ${e=>e.isDisabled?.8:1};
67
- `,Bt=n.div`
67
+ `,Et=n.div`
68
68
  display: flex;
69
69
  justify-content: flex-start;
70
70
  `,Ft=n.div`
@@ -91,12 +91,12 @@ import{d as ve,q as je,aa as Xe,cT as Ye,j as t,bG as Qe,F as re,o as i,L as se,
91
91
  opacity: ${e=>e.isDisabled?.4:1};
92
92
  width: ${e=>e.wrapperWidth.valuePercentage(e.windowSize)};
93
93
  margin-top: ${e=>T.linkAccountContainerMarginTop.valuePx(e.windowSize)};
94
- `,Wt=n(qe)`
94
+ `,Wt=n(He)`
95
95
  border-radius: ${i.sp2};
96
96
  border: 1px solid ${e=>e.theme.colors.grey3};
97
97
  color: ${e=>e.theme.colors.hero};
98
- ${Ne.smallRegular.css};
99
- `,Nt=n.div`
98
+ ${De.smallRegular.css};
99
+ `,Dt=n.div`
100
100
  width: ${e=>T.productTypeIconSize.valuePx(e.windowSize)};
101
101
  height: ${e=>T.productTypeIconSize.valuePx(e.windowSize)};
102
102
  display: flex;
@@ -106,7 +106,7 @@ import{d as ve,q as je,aa as Xe,cT as Ye,j as t,bG as Qe,F as re,o as i,L as se,
106
106
  width: 100%;
107
107
  height: 100%;
108
108
  }
109
- `,Dt=n.div`
109
+ `,Nt=n.div`
110
110
  width: ${e=>T.productTypeIconSize.valuePx(e.windowSize)};
111
111
  height: ${e=>T.productTypeIconSize.valuePx(e.windowSize)};
112
112
  display: flex;
@@ -116,7 +116,7 @@ import{d as ve,q as je,aa as Xe,cT as Ye,j as t,bG as Qe,F as re,o as i,L as se,
116
116
  width: 100%;
117
117
  height: 100%;
118
118
  }
119
- `,qt=n.div`
119
+ `,Ht=n.div`
120
120
  width: ${e=>T.productTypeIconSize.valuePx(e.windowSize)};
121
121
  height: ${e=>T.productTypeIconSize.valuePx(e.windowSize)};
122
122
  display: flex;
@@ -126,7 +126,7 @@ import{d as ve,q as je,aa as Xe,cT as Ye,j as t,bG as Qe,F as re,o as i,L as se,
126
126
  width: 100%;
127
127
  height: 100%;
128
128
  }
129
- `,Ht=n.div`
129
+ `,qt=n.div`
130
130
  width: ${e=>T.productTypeIconSize.valuePx(e.windowSize)};
131
131
  height: ${e=>T.productTypeIconSize.valuePx(e.windowSize)};
132
132
  display: flex;
@@ -146,7 +146,7 @@ import{d as ve,q as je,aa as Xe,cT as Ye,j as t,bG as Qe,F as re,o as i,L as se,
146
146
  width: 100%;
147
147
  height: 100%;
148
148
  }
149
- `,$e=(e,h)=>`${e}.${h}`,y=e=>{switch(e){case"zeni_accounts":return"account_setup";case"bill_pay":return"bill_pay_setup";case"charge_cards":return"charge_card_setup";case"reimbursement":return"reimbursement_setup";case"zeni_treasury":return"treasury_setup";case"other_connection":return"other_connection_setup"}},{common:{settings:Ce,strings:{empty:Jt,hyphen:Kt}}}=re.getLocalizedStrings(),he={paymentAccountIconSize:new I(k[6],k[7])},Xt=()=>null,Yt=({paymentAccount:e,bankAccountList:h,balanceFetchStatus:q,connectedAccountProvider:R,onRemoveConnection:_,onFetchLinkTokenClick:P,onEstablishConnectionClick:V,onEstablishConnectionSuccess:C,onUpdatePaymentAccountStatus:c})=>{const f=ve(),w=je(),M=ze().analytics,[U,a]=r.useState(!1),[o,l]=r.useState(!1),m=()=>{l(!0)},b=e.plaidConnectionDetails.link_account,u=e.plaidConnectionDetails.update_account,[A,H]=r.useState(void 0),v=A==="update_account"?u:b,[W,d]=r.useState(v.linkToken??null),[S,L]=r.useState(!1),$=J(b.updateStatus.fetchState),z=J(u.updateStatus.fetchState),g=J(u.fetchStatus.fetchState),p=e?.providerVerificationStatus,O=e?.isLoginRequired??!1,s="other_connection",j=p?.code,Y=r.useCallback((B,ne)=>{M.trackConnectBankSuccess(s,"Settings");const ae=ne.accounts.find(pe=>pe.id===e.providerAccountId)??ne.accounts[0];e.paymentAccountId!=null&&A==="update_account"&&ae?.verification_status!=null&&!O?c(ae?.verification_status,e.paymentAccountId,"update_account",y(s),s):V(B,y(s),s),H(void 0),L(!1)},[M,s,e.paymentAccountId,e.providerAccountId,A,O,c,V]),Q=r.useCallback((B,ne)=>{B!=null&&(M.trackConnectBankFailure(s,B.error_code+" "+B.error_message,"Settings"),B.error_code==="TOO_MANY_VERIFICATION_ATTEMPTS"&&e.paymentAccountId!=null&&c("verification_failed",e.paymentAccountId,"update_account",y(s),s),console.log("Plaid Connection Error",B,ne)),H(void 0),L(!1)},[M,s,e.paymentAccountId,c]),{open:ee,ready:E}=Te({token:W,onSuccess:Y,onExit:Q});r.useEffect(()=>{v.fetchStatus.fetchState==="Completed"&&v.linkToken!=null&&v.linkToken!==W&&d(v.linkToken)},[v.fetchStatus.fetchState,v.linkToken,W]),r.useEffect(()=>{S&&ee()},[S,ee]),r.useEffect(()=>{($==="In-Progress"&&b.updateStatus.fetchState==="Completed"||z==="In-Progress"&&u.updateStatus.fetchState==="Completed")&&(G.isVerifiedStatusCode(j??"")||(P("link_account",y(s)),C(y(s),s)))},[b.updateStatus.fetchState,C,P,e?.providerVerificationStatus?.code,e?.paymentAccountId,$,z,u.updateStatus.fetchState,j,s]),r.useEffect(()=>{(G.isVerifiedStatusCode(j??"")||j==="verification_failed")&&!S&&A!=null&&v.linkToken===W&&v.fetchStatus.fetchState==="Completed"&&E&&L(!0)},[E,W,v.fetchStatus.fetchState,v.linkToken,j,A,S]);const K=()=>{M.trackConnectBankGetBalance(s,"Settings"),H("update_account"),P("update_account",y(s),e.paymentAccountId)},te=f.mode==="light"?new fe(f.colors.brandColorJadeLight):new fe(f.colors.brandColorJadeDark),Z={element:t.jsx(dn,{windowSize:w,children:t.jsx(gt,{})}),color:te},ue=h.find(B=>B.accountId===e.zeniAccountId),oe=()=>{a(B=>!B)};return t.jsxs(Qt,{onMouseEnter:oe,onMouseLeave:oe,children:[o===!0?Ie.createPortal(t.jsx(_e,{connectedAccountProvider:R,action:{onBackClick:()=>l(!1)}}),document.body):null,t.jsxs(Zt,{windowSize:w,wrapperWidth:D[0].width,children:[t.jsx(en,{children:Ce.otherAccount.title}),t.jsx(tn,{children:Ce.otherAccount.subTitle})]}),t.jsxs(nn,{windowSize:w,wrapperWidth:D[1].width,children:[wt(Z,w,f.mode==="dark",e,!0),t.jsxs(un,{children:[t.jsx(pn,{children:t.jsx(gn,{windowSize:w,children:e.institutionDetails.institutionName})}),t.jsxs(hn,{windowSize:w,children:[t.jsxs(wn,{children:[t.jsx(mn,{children:e.accountSubType?.name}),t.jsx(fn,{children:e.maskedAccountNumber}),O&&t.jsx(Sn,{})]}),O&&t.jsx(Pe,{productType:"other_connection",isUpdateLinkClicked:A==="update_account",isLoginRequired:O,isPendingVerification:!1,fetchAndUpdateStatues:{fetchStatus:u.fetchStatus,updateStatus:u.updateStatus,linkFetchStatus:b.fetchStatus,linkUpdateStatus:b.updateStatus,prevFetchState:g,prevUpdateState:z},onUpdateLinkTokenClick:K,onChaseInfoClick:m})]})]})]}),t.jsx(on,{windowSize:w,wrapperWidth:D[2].width,children:ue?.accountName??Jt}),t.jsx(an,{windowSize:w,wrapperWidth:D[3].width,children:p!=null?t.jsx(ge,{style:{width:"max-content",padding:0,marginTop:i.sp2},tagTitle:p.name,textColor:we(p.code)}):Kt}),t.jsxs(cn,{windowSize:w,wrapperWidth:D[4].width,children:[t.jsx(ln,{className:"balanceLabel",isRemoveHovered:U,children:Se("0,0.[00]",e.balances?.available)}),e.balances?.lastRefreshTime?t.jsx(sn,{className:"balanceLabel",isRemoveHovered:U,children:xe(e.balances?.lastRefreshTime)}):q?.fetchState==="In-Progress"?t.jsx(se,{size:"Small",start:!0}):null,U&&t.jsx(rn,{children:t.jsx(He,{moreIconType:"plain",options:[{label:Ce.otherAccount.remove,value:"remove"}],customStyleConfig:{valueContainer:()=>({height:i.sp3,".more-icon":{width:i.sp3,height:i.sp3,color:f.colors.primary}}),container:()=>({marginLeft:i.sp0,position:"relative"}),control:()=>({background:"transparent"}),menu:()=>({position:"absolute",right:0,borderRadius:i.sp1,marginTop:i.sp2,background:f.colors.grey5,width:"162px",border:`1px solid ${f.colors.grey3}`,boxShadow:`${i.sp0} 1px 2px ${i.sp0} ${ie.boxShadowElevation}`}),option:()=>({height:i.sp6,paddingLeft:i.sp3,paddingRight:i.sp3,display:"flex",alignItems:"center",color:ie.important,":hover":{color:ie.important,backgroundColor:f.colors.background}})},menuPlacement:"bottom",onOptionSelection:B=>{B==="remove"&&_(e.paymentAccountId)},valueToIcon:Xt})})]})]})},Qt=n.div`
149
+ `,$e=(e,h)=>`${e}.${h}`,y=e=>{switch(e){case"zeni_accounts":return"account_setup";case"bill_pay":return"bill_pay_setup";case"charge_cards":return"charge_card_setup";case"reimbursement":return"reimbursement_setup";case"zeni_treasury":return"treasury_setup";case"other_connection":return"other_connection_setup"}},{common:{settings:Ce,strings:{empty:Jt,hyphen:Kt}}}=re.getLocalizedStrings(),he={paymentAccountIconSize:new I(k[6],k[7])},Xt=()=>null,Yt=({paymentAccount:e,bankAccountList:h,balanceFetchStatus:H,connectedAccountProvider:R,onRemoveConnection:_,onFetchLinkTokenClick:P,onEstablishConnectionClick:V,onEstablishConnectionSuccess:C,onUpdatePaymentAccountStatus:c})=>{const f=ve(),w=je(),M=ze().analytics,[U,a]=r.useState(!1),[o,l]=r.useState(!1),m=()=>{l(!0)},b=e.plaidConnectionDetails.link_account,u=e.plaidConnectionDetails.update_account,[A,q]=r.useState(void 0),v=A==="update_account"?u:b,[W,d]=r.useState(v.linkToken??null),[S,L]=r.useState(!1),$=J(b.updateStatus.fetchState),z=J(u.updateStatus.fetchState),g=J(u.fetchStatus.fetchState),p=e?.providerVerificationStatus,O=e?.isLoginRequired??!1,s="other_connection",j=p?.code,Y=r.useCallback((E,ne)=>{M.trackConnectBankSuccess(s,"Settings");const ae=ne.accounts.find(pe=>pe.id===e.providerAccountId)??ne.accounts[0];e.paymentAccountId!=null&&A==="update_account"&&ae?.verification_status!=null&&!O?c(ae?.verification_status,e.paymentAccountId,"update_account",y(s),s):V(E,y(s),s),q(void 0),L(!1)},[M,s,e.paymentAccountId,e.providerAccountId,A,O,c,V]),Q=r.useCallback((E,ne)=>{E!=null&&(M.trackConnectBankFailure(s,E.error_code+" "+E.error_message,"Settings"),E.error_code==="TOO_MANY_VERIFICATION_ATTEMPTS"&&e.paymentAccountId!=null&&c("verification_failed",e.paymentAccountId,"update_account",y(s),s),console.log("Plaid Connection Error",E,ne)),q(void 0),L(!1)},[M,s,e.paymentAccountId,c]),{open:ee,ready:B}=Te({token:W,onSuccess:Y,onExit:Q});r.useEffect(()=>{v.fetchStatus.fetchState==="Completed"&&v.linkToken!=null&&v.linkToken!==W&&d(v.linkToken)},[v.fetchStatus.fetchState,v.linkToken,W]),r.useEffect(()=>{S&&ee()},[S,ee]),r.useEffect(()=>{($==="In-Progress"&&b.updateStatus.fetchState==="Completed"||z==="In-Progress"&&u.updateStatus.fetchState==="Completed")&&(G.isVerifiedStatusCode(j??"")||(P("link_account",y(s)),C(y(s),s)))},[b.updateStatus.fetchState,C,P,e?.providerVerificationStatus?.code,e?.paymentAccountId,$,z,u.updateStatus.fetchState,j,s]),r.useEffect(()=>{(G.isVerifiedStatusCode(j??"")||j==="verification_failed")&&!S&&A!=null&&v.linkToken===W&&v.fetchStatus.fetchState==="Completed"&&B&&L(!0)},[B,W,v.fetchStatus.fetchState,v.linkToken,j,A,S]);const K=()=>{M.trackConnectBankGetBalance(s,"Settings"),q("update_account"),P("update_account",y(s),e.paymentAccountId)},te=f.mode==="light"?new fe(f.colors.brandColorJadeLight):new fe(f.colors.brandColorJadeDark),Z={element:t.jsx(dn,{windowSize:w,children:t.jsx(gt,{})}),color:te},ue=h.find(E=>E.accountId===e.zeniAccountId),oe=()=>{a(E=>!E)};return t.jsxs(Qt,{onMouseEnter:oe,onMouseLeave:oe,children:[o===!0?Ie.createPortal(t.jsx(_e,{connectedAccountProvider:R,action:{onBackClick:()=>l(!1)}}),document.body):null,t.jsxs(Zt,{windowSize:w,wrapperWidth:N[0].width,children:[t.jsx(en,{children:Ce.otherAccount.title}),t.jsx(tn,{children:Ce.otherAccount.subTitle})]}),t.jsxs(nn,{windowSize:w,wrapperWidth:N[1].width,children:[wt(Z,w,f.mode==="dark",e,!0),t.jsxs(un,{children:[t.jsx(pn,{children:t.jsx(gn,{windowSize:w,children:e.institutionDetails.institutionName})}),t.jsxs(hn,{windowSize:w,children:[t.jsxs(wn,{children:[t.jsx(mn,{children:e.accountSubType?.name}),t.jsx(fn,{children:e.maskedAccountNumber}),O&&t.jsx(Sn,{})]}),O&&t.jsx(Pe,{productType:"other_connection",isUpdateLinkClicked:A==="update_account",isLoginRequired:O,isPendingVerification:!1,fetchAndUpdateStatues:{fetchStatus:u.fetchStatus,updateStatus:u.updateStatus,linkFetchStatus:b.fetchStatus,linkUpdateStatus:b.updateStatus,prevFetchState:g,prevUpdateState:z},onUpdateLinkTokenClick:K,onChaseInfoClick:m})]})]})]}),t.jsx(on,{windowSize:w,wrapperWidth:N[2].width,children:ue?.accountName??Jt}),t.jsx(an,{windowSize:w,wrapperWidth:N[3].width,children:p!=null?t.jsx(ge,{style:{width:"max-content",padding:0,marginTop:i.sp2},tagTitle:p.name,textColor:we(p.code)}):Kt}),t.jsxs(cn,{windowSize:w,wrapperWidth:N[4].width,children:[t.jsx(ln,{className:"balanceLabel",isRemoveHovered:U,children:Se("0,0.[00]",e.balances?.available)}),e.balances?.lastRefreshTime?t.jsx(sn,{className:"balanceLabel",isRemoveHovered:U,children:xe(e.balances?.lastRefreshTime)}):H?.fetchState==="In-Progress"?t.jsx(se,{size:"Small",start:!0}):null,U&&t.jsx(rn,{children:t.jsx(qe,{moreIconType:"plain",options:[{label:Ce.otherAccount.remove,value:"remove"}],customStyleConfig:{valueContainer:()=>({height:i.sp3,".more-icon":{width:i.sp3,height:i.sp3,color:f.colors.primary}}),container:()=>({marginLeft:i.sp0,position:"relative"}),control:()=>({background:"transparent"}),menu:()=>({position:"absolute",right:0,borderRadius:i.sp1,marginTop:i.sp2,background:f.colors.grey5,width:"162px",border:`1px solid ${f.colors.grey3}`,boxShadow:`${i.sp0} 1px 2px ${i.sp0} ${ie.boxShadowElevation}`}),option:()=>({height:i.sp6,paddingLeft:i.sp3,paddingRight:i.sp3,display:"flex",alignItems:"center",color:ie.important,":hover":{color:ie.important,backgroundColor:f.colors.background}})},menuPlacement:"bottom",onOptionSelection:E=>{E==="remove"&&_(e.paymentAccountId)},valueToIcon:Xt})})]})]})},Qt=n.div`
150
150
  display: flex;
151
151
  padding: ${i.sp4};
152
152
  padding-right: ${i.sp8};
@@ -157,7 +157,7 @@ import{d as ve,q as je,aa as Xe,cT as Ye,j as t,bG as Qe,F as re,o as i,L as se,
157
157
  flex-direction: column;
158
158
  align-items: flex-start;
159
159
  width: ${e=>e.wrapperWidth.valuePercentage(e.windowSize)};
160
- `,en=n(N)`
160
+ `,en=n(D)`
161
161
  color: ${e=>e.theme.colors.grey1};
162
162
  display: flex;
163
163
  align-items: center;
@@ -169,11 +169,11 @@ import{d as ve,q as je,aa as Xe,cT as Ye,j as t,bG as Qe,F as re,o as i,L as se,
169
169
  display: flex;
170
170
  align-items: center;
171
171
  width: ${e=>e.wrapperWidth.valuePercentage(e.windowSize)};
172
- `,on=n(N)`
172
+ `,on=n(D)`
173
173
  display: flex;
174
174
  align-items: center;
175
175
  width: ${e=>e.wrapperWidth.valuePercentage(e.windowSize)};
176
- `,an=n(N)`
176
+ `,an=n(D)`
177
177
  display: flex;
178
178
  align-items: center;
179
179
  width: ${e=>e.wrapperWidth.valuePercentage(e.windowSize)};
@@ -183,7 +183,7 @@ import{d as ve,q as je,aa as Xe,cT as Ye,j as t,bG as Qe,F as re,o as i,L as se,
183
183
  width: ${e=>e.wrapperWidth.valuePercentage(e.windowSize)};
184
184
  justify-content: flex-end;
185
185
  align-items: flex-end;
186
- `,ln=n(N)`
186
+ `,ln=n(D)`
187
187
  color: ${e=>e.theme.colors.hero};
188
188
  `,sn=n(F)`
189
189
  color: ${e=>e.theme.colors.hero};
@@ -215,7 +215,7 @@ import{d as ve,q as je,aa as Xe,cT as Ye,j as t,bG as Qe,F as re,o as i,L as se,
215
215
  color: inherit;
216
216
  `,fn=n(F)`
217
217
  margin-left: ${i.sp1};
218
- `,gn=n(N)`
218
+ `,gn=n(D)`
219
219
  max-width: ${`calc(100% - ${i.sp3})`};
220
220
  text-transform: capitalize;
221
221
  overflow: hidden;
@@ -230,7 +230,7 @@ import{d as ve,q as je,aa as Xe,cT as Ye,j as t,bG as Qe,F as re,o as i,L as se,
230
230
  height: ${i.sp1};
231
231
  cursor: inherit;
232
232
  background-color: ${e=>e.theme.colors.grey1};
233
- `,{common:{settings:me,strings:{empty:xn}}}=re.getLocalizedStrings(),yn=()=>null,vn=({paymentAccount:e,bankAccountList:h,balanceFetchStatus:q,connectedAccountProvider:R,onRemoveConnection:_,onFetchLinkTokenClick:P,onEstablishConnectionClick:V,onEstablishConnectionSuccess:C,onUpdatePaymentAccountStatus:c})=>{const f=ve(),w=ze().analytics,[M,U]=r.useState(!1),a=()=>{U(!0)},o=e.plaidConnectionDetails.link_account,l=e.plaidConnectionDetails.update_account,[m,b]=r.useState(void 0),u=m==="update_account"?l:o,[A,H]=r.useState(u.linkToken??null),[v,W]=r.useState(!1),d=J(o.updateStatus.fetchState),S=J(l.updateStatus.fetchState),L=J(l.fetchStatus.fetchState),$=e?.providerVerificationStatus,z=e?.isLoginRequired??!1,g="other_connection",p=$?.code,O=r.useCallback((E,K)=>{w.trackConnectBankSuccess(g,"Settings");const te=K.accounts.find(Z=>Z.id===e.providerAccountId)??K.accounts[0];e.paymentAccountId!=null&&m==="update_account"&&te?.verification_status!=null&&!z?c(te?.verification_status,e.paymentAccountId,"update_account",y(g),g):V(E,y(g),g),b(void 0),W(!1)},[w,g,e.paymentAccountId,e.providerAccountId,m,z,c,V]),s=r.useCallback((E,K)=>{E!=null&&(w.trackConnectBankFailure(g,E.error_code+" "+E.error_message,"Settings"),E.error_code==="TOO_MANY_VERIFICATION_ATTEMPTS"&&e.paymentAccountId!=null&&c("verification_failed",e.paymentAccountId,"update_account",y(g),g),console.log("Plaid Connection Error",E,K)),b(void 0),W(!1)},[w,g,e.paymentAccountId,c]),{open:j,ready:Y}=Te({token:A,onSuccess:O,onExit:s});r.useEffect(()=>{u.fetchStatus.fetchState==="Completed"&&u.linkToken!=null&&u.linkToken!==A&&H(u.linkToken)},[u.fetchStatus.fetchState,u.linkToken,A]),r.useEffect(()=>{v&&j()},[v,j]),r.useEffect(()=>{(d==="In-Progress"&&o.updateStatus.fetchState==="Completed"||S==="In-Progress"&&l.updateStatus.fetchState==="Completed")&&(G.isVerifiedStatusCode(p??"")||(P("link_account",y(g)),C(y(g),g)))},[o.updateStatus.fetchState,C,P,e?.providerVerificationStatus?.code,e?.paymentAccountId,d,S,l.updateStatus.fetchState,p,g]),r.useEffect(()=>{(G.isVerifiedStatusCode(p??"")||p==="verification_failed")&&!v&&m!=null&&u.linkToken===A&&u.fetchStatus.fetchState==="Completed"&&Y&&W(!0)},[Y,A,u.fetchStatus.fetchState,u.linkToken,p,m,v]);const Q=()=>{w.trackConnectBankGetBalance(g,"Settings"),b("update_account"),P("update_account",y(g),e.paymentAccountId)},ee=h.find(E=>E.accountId===e.zeniAccountId);return t.jsxs(kn,{children:[M===!0?Ie.createPortal(t.jsx(_e,{connectedAccountProvider:R,action:{onBackClick:()=>U(!1)}}),document.body):null,t.jsxs(bn,{children:[t.jsx($n,{children:`${me.otherAccount.title} ${me.otherAccount.subTitleSmall}`}),t.jsx(He,{moreIconType:"plain",options:[{label:me.otherAccount.remove,value:"remove"}],customStyleConfig:{valueContainer:()=>({height:i.sp3,".more-icon":{width:i.sp3,height:i.sp3,color:f.colors.primary}}),container:()=>({marginLeft:i.sp0,position:"relative"}),control:()=>({background:"transparent"}),menu:()=>({position:"absolute",right:0,width:"158px",border:`1px solid ${f.colors.grey3}`,boxShadow:`${i.sp0} 1px 2px ${i.sp0} ${ie.boxShadowElevation}`}),option:()=>({color:f.colors.important,":hover":{color:f.colors.important,backgroundColor:f.colors.background}})},menuPlacement:"bottom",onOptionSelection:E=>{E==="remove"&&_(e.paymentAccountId)},valueToIcon:yn})]}),t.jsxs(Cn,{children:[t.jsxs(Ln,{children:[t.jsx(On,{children:t.jsx(Fn,{children:e.institutionDetails.institutionName})}),t.jsxs(Rn,{children:[t.jsx(En,{children:e.accountSubType?.name}),t.jsx(Bn,{children:e.maskedAccountNumber}),t.jsx(Tn,{children:$!=null?t.jsx(ge,{style:{width:"max-content",padding:0},tagTitle:$.name,textColor:we($.code)}):null}),z&&t.jsx(Pe,{productType:"other_connection",isUpdateLinkClicked:m==="update_account",isLoginRequired:z,isPendingVerification:!1,fetchAndUpdateStatues:{fetchStatus:l.fetchStatus,updateStatus:l.updateStatus,linkFetchStatus:o.fetchStatus,linkUpdateStatus:o.updateStatus,prevFetchState:L,prevUpdateState:S},onUpdateLinkTokenClick:Q,onChaseInfoClick:a})]})]}),t.jsxs(_n,{children:[t.jsx(Pn,{className:"balanceLabel",children:Se("0,0.[00]",e.balances?.available)}),e.balances?.lastRefreshTime?t.jsx(In,{className:"balanceLabel",children:xe(e.balances?.lastRefreshTime)}):q?.fetchState==="In-Progress"?t.jsx(se,{size:"ExtraSmall",start:!0}):null]})]}),t.jsxs(An,{children:[t.jsx(jn,{children:me.bankConnectionHeader.linkAccount}),t.jsx(zn,{children:ee?.accountName??xn})]})]})},kn=n.div`
233
+ `,{common:{settings:me,strings:{empty:xn}}}=re.getLocalizedStrings(),yn=()=>null,vn=({paymentAccount:e,bankAccountList:h,balanceFetchStatus:H,connectedAccountProvider:R,onRemoveConnection:_,onFetchLinkTokenClick:P,onEstablishConnectionClick:V,onEstablishConnectionSuccess:C,onUpdatePaymentAccountStatus:c})=>{const f=ve(),w=ze().analytics,[M,U]=r.useState(!1),a=()=>{U(!0)},o=e.plaidConnectionDetails.link_account,l=e.plaidConnectionDetails.update_account,[m,b]=r.useState(void 0),u=m==="update_account"?l:o,[A,q]=r.useState(u.linkToken??null),[v,W]=r.useState(!1),d=J(o.updateStatus.fetchState),S=J(l.updateStatus.fetchState),L=J(l.fetchStatus.fetchState),$=e?.providerVerificationStatus,z=e?.isLoginRequired??!1,g="other_connection",p=$?.code,O=r.useCallback((B,K)=>{w.trackConnectBankSuccess(g,"Settings");const te=K.accounts.find(Z=>Z.id===e.providerAccountId)??K.accounts[0];e.paymentAccountId!=null&&m==="update_account"&&te?.verification_status!=null&&!z?c(te?.verification_status,e.paymentAccountId,"update_account",y(g),g):V(B,y(g),g),b(void 0),W(!1)},[w,g,e.paymentAccountId,e.providerAccountId,m,z,c,V]),s=r.useCallback((B,K)=>{B!=null&&(w.trackConnectBankFailure(g,B.error_code+" "+B.error_message,"Settings"),B.error_code==="TOO_MANY_VERIFICATION_ATTEMPTS"&&e.paymentAccountId!=null&&c("verification_failed",e.paymentAccountId,"update_account",y(g),g),console.log("Plaid Connection Error",B,K)),b(void 0),W(!1)},[w,g,e.paymentAccountId,c]),{open:j,ready:Y}=Te({token:A,onSuccess:O,onExit:s});r.useEffect(()=>{u.fetchStatus.fetchState==="Completed"&&u.linkToken!=null&&u.linkToken!==A&&q(u.linkToken)},[u.fetchStatus.fetchState,u.linkToken,A]),r.useEffect(()=>{v&&j()},[v,j]),r.useEffect(()=>{(d==="In-Progress"&&o.updateStatus.fetchState==="Completed"||S==="In-Progress"&&l.updateStatus.fetchState==="Completed")&&(G.isVerifiedStatusCode(p??"")||(P("link_account",y(g)),C(y(g),g)))},[o.updateStatus.fetchState,C,P,e?.providerVerificationStatus?.code,e?.paymentAccountId,d,S,l.updateStatus.fetchState,p,g]),r.useEffect(()=>{(G.isVerifiedStatusCode(p??"")||p==="verification_failed")&&!v&&m!=null&&u.linkToken===A&&u.fetchStatus.fetchState==="Completed"&&Y&&W(!0)},[Y,A,u.fetchStatus.fetchState,u.linkToken,p,m,v]);const Q=()=>{w.trackConnectBankGetBalance(g,"Settings"),b("update_account"),P("update_account",y(g),e.paymentAccountId)},ee=h.find(B=>B.accountId===e.zeniAccountId);return t.jsxs(kn,{children:[M===!0?Ie.createPortal(t.jsx(_e,{connectedAccountProvider:R,action:{onBackClick:()=>U(!1)}}),document.body):null,t.jsxs(bn,{children:[t.jsx($n,{children:`${me.otherAccount.title} ${me.otherAccount.subTitleSmall}`}),t.jsx(qe,{moreIconType:"plain",options:[{label:me.otherAccount.remove,value:"remove"}],customStyleConfig:{valueContainer:()=>({height:i.sp3,".more-icon":{width:i.sp3,height:i.sp3,color:f.colors.primary}}),container:()=>({marginLeft:i.sp0,position:"relative"}),control:()=>({background:"transparent"}),menu:()=>({position:"absolute",right:0,width:"158px",border:`1px solid ${f.colors.grey3}`,boxShadow:`${i.sp0} 1px 2px ${i.sp0} ${ie.boxShadowElevation}`}),option:()=>({color:f.colors.important,":hover":{color:f.colors.important,backgroundColor:f.colors.background}})},menuPlacement:"bottom",onOptionSelection:B=>{B==="remove"&&_(e.paymentAccountId)},valueToIcon:yn})]}),t.jsxs(Cn,{children:[t.jsxs(Ln,{children:[t.jsx(On,{children:t.jsx(Fn,{children:e.institutionDetails.institutionName})}),t.jsxs(Rn,{children:[t.jsx(Bn,{children:e.accountSubType?.name}),t.jsx(En,{children:e.maskedAccountNumber}),t.jsx(Tn,{children:$!=null?t.jsx(ge,{style:{width:"max-content",padding:0},tagTitle:$.name,textColor:we($.code)}):null}),z&&t.jsx(Pe,{productType:"other_connection",isUpdateLinkClicked:m==="update_account",isLoginRequired:z,isPendingVerification:!1,fetchAndUpdateStatues:{fetchStatus:l.fetchStatus,updateStatus:l.updateStatus,linkFetchStatus:o.fetchStatus,linkUpdateStatus:o.updateStatus,prevFetchState:L,prevUpdateState:S},onUpdateLinkTokenClick:Q,onChaseInfoClick:a})]})]}),t.jsxs(_n,{children:[t.jsx(Pn,{className:"balanceLabel",children:Se("0,0.[00]",e.balances?.available)}),e.balances?.lastRefreshTime?t.jsx(In,{className:"balanceLabel",children:xe(e.balances?.lastRefreshTime)}):H?.fetchState==="In-Progress"?t.jsx(se,{size:"ExtraSmall",start:!0}):null]})]}),t.jsxs(An,{children:[t.jsx(jn,{children:me.bankConnectionHeader.linkAccount}),t.jsx(zn,{children:ee?.accountName??xn})]})]})},kn=n.div`
234
234
  display: flex;
235
235
  flex-direction: column;
236
236
  padding: ${i.sp3};
@@ -242,7 +242,7 @@ import{d as ve,q as je,aa as Xe,cT as Ye,j as t,bG as Qe,F as re,o as i,L as se,
242
242
  width: 100%;
243
243
  margin-bottom: ${i.sp3};
244
244
  justify-content: space-between;
245
- `,$n=n(N)`
245
+ `,$n=n(D)`
246
246
  color: ${e=>e.theme.colors.grey1};
247
247
  display: flex;
248
248
  align-items: center;
@@ -259,7 +259,7 @@ import{d as ve,q as je,aa as Xe,cT as Ye,j as t,bG as Qe,F as re,o as i,L as se,
259
259
  margin-right: ${i.sp2};
260
260
  `,zn=n(F)`
261
261
  color: ${e=>e.theme.colors.hero};
262
- `,Tn=n(N)`
262
+ `,Tn=n(D)`
263
263
  display: flex;
264
264
  align-items: center;
265
265
  margin-left: ${i.sp2};
@@ -267,7 +267,7 @@ import{d as ve,q as je,aa as Xe,cT as Ye,j as t,bG as Qe,F as re,o as i,L as se,
267
267
  display: flex;
268
268
  align-items: flex-end;
269
269
  flex-direction: column;
270
- `,Pn=n(N)`
270
+ `,Pn=n(D)`
271
271
  color: ${e=>e.theme.colors.hero};
272
272
  `,In=n(F)`
273
273
  color: ${e=>e.theme.colors.hero};
@@ -277,11 +277,11 @@ import{d as ve,q as je,aa as Xe,cT as Ye,j as t,bG as Qe,F as re,o as i,L as se,
277
277
  align-items: center;
278
278
  white-space: nowrap;
279
279
  overflow: hidden;
280
- `,En=n(F)`
281
- text-transform: capitalize;
282
280
  `,Bn=n(F)`
281
+ text-transform: capitalize;
282
+ `,En=n(F)`
283
283
  margin-left: ${i.sp1};
284
- `,Fn=n(N)`
284
+ `,Fn=n(D)`
285
285
  max-width: ${`calc(100% - ${i.sp3})`};
286
286
  text-transform: capitalize;
287
287
  overflow: hidden;
@@ -291,7 +291,7 @@ import{d as ve,q as je,aa as Xe,cT as Ye,j as t,bG as Qe,F as re,o as i,L as se,
291
291
  align-items: center;
292
292
  flex-wrap: wrap;
293
293
  gap: ${i.sp2};
294
- `,{settings:{bankConnectionListHeader:Ae,title:Vn,infoText:Mn}}=re.getLocalizedStrings().common,ye={pageContentPadding:new I(k[4],k[8]),subtitleSectionWidth:new I(343,580,1200),subTitleBottomMargin:new I(k[0],k[5])},Un={qboLinkAcc:new ot("smallRegular","standardRegular")},Wn="bankConnectionsSettingsPage",ce="bankAccountSection",le="primaryAccountSection",Nn="bill_pay",Dn="reimbursement",qn="zeni_accounts",Hn="charge_cards",Gn="zeni_treasury",Ve=e=>t.jsx(Xn,{children:D.map(h=>t.jsx(Yn,{actualDataValue:h.value,wrapperWidth:h.width,windowSize:e,children:t.jsx(Qn,{children:h.value})},h.value))}),Si=({bankSetupView:e,connectedAccountProvider:h,onBackClick:q,onUpdateAccountClick:R,onFetchLinkTokenClick:_,onUpdatePaymentAccountStatus:P,onUpdatePaymentAccountLoginStatus:V,onEstablishConnectionClick:C,onEstablishConnectionSuccess:c,onClickMenuIcon:f,onUpdatePrimaryFundingAccount:w,onRemoveConnection:M})=>{const U=ve(),a=je(),{allFundingAccounts:o,primaryConnection:l}=e,m=Xe({mode:"all",reValidateMode:"onChange",defaultValues:We(e),values:We(e)}),b=m.handleSubmit(d=>{}),u=async(d,S)=>{const L=d.split("."),$=L[0],z=L[1],g=l.find(p=>p.productType===$);if($!=null&&z!=null){const p=S[$][z];if(z==="primaryAccountSection"){const O=o.find(s=>s.id===p.selectedOption)?.accType;p.selectedOption!=null&&O!=null&&w(p.selectedOption,y($),O)}else if(z==="bankAccountSection"&&g!=null&&g.primaryFundingAccount!=null&&p.selectedOption!=null){const O=g.primaryFundingAccount?.id,s=g.primaryFundingAccount?.accType;O!=null&&s!=null&&R(p.selectedOption,O,$,y($),s)}}};r.useEffect(()=>{const d=m.watch((S,{name:L})=>{L!=null&&S!=null&&Ye(()=>u(L,S))});return()=>{d.unsubscribe()}});const A=e.fetchState==="In-Progress"||e.fetchState==="Not-Started",H=e.fetchState==="Completed"&&e.allFundingAccounts.length===0,v=a==="small"?vn:Yt,W=()=>A?t.jsx(ti,{children:t.jsx(se,{size:"ExtraLarge",start:!0})}):H?t.jsx(Ze,{message:"No bank connections added."}):t.jsxs(Jn,{windowSize:a,children:[t.jsx(Ue,{children:Ae.primary}),a!=="small"?Ve(a):null,t.jsx(et,{...m,children:t.jsx("form",{id:li(Wn),onSubmit:b,children:t.jsx(ni,{windowSize:a,children:e.primaryConnection.map(d=>d!=null?t.jsx(Me,{windowSize:a,children:t.jsx(Ct,{allBankAccounts:e.allBankAccounts,setupView:d,connectedAccountProvider:h,onFetchLinkTokenClick:_,onUpdatePaymentAccountStatus:P,onUpdatePaymentAccountLoginStatus:V,onEstablishConnectionClick:C,onEstablishConnectionSuccess:c})},d.productType):null)})})}),e.otherPaymentAccounts.length>0?t.jsxs(Zn,{children:[t.jsx(Ue,{children:Ae.other}),t.jsx(ai,{children:t.jsx(tt,{display:"flex",placement:"right",maxWidth:"340px",title:Ae.otherToolTip,style:{padding:`12px ${i.sp3}`},children:t.jsx(ci,{})})})]}):null,a!=="small"&&e.otherPaymentAccounts.length>0?Ve(a):null,e.otherPaymentAccounts.map(d=>{const S=o.find(L=>L.id===d.paymentAccountId)?.balanceFetchStatus;return t.jsx(Me,{windowSize:a,children:t.jsx(v,{paymentAccount:d,bankAccountList:e.allBankAccounts,balanceFetchStatus:S,connectedAccountProvider:h,onRemoveConnection:M,onFetchLinkTokenClick:_,onEstablishConnectionClick:C,onUpdatePaymentAccountStatus:P,onEstablishConnectionSuccess:c})},d.paymentAccountId)})]});return t.jsxs(Kn,{children:[t.jsx(Qe,{source:"BankConnectionsSettingsPage",title:Vn.bankConnections,backgroundColor:U.colors.grey4,style:{zIndex:3},onBackClick:q,showBackButton:!1,showMenuIcon:a==="medium-compact"||a==="small",onClickMenuIcon:f}),t.jsxs(ei,{windowSize:a,children:[t.jsx(ii,{windowSize:a,children:t.jsx(oi,{windowSize:a,children:Mn.bankConnections})}),W()]})]})},Jn=n.div`
294
+ `,{settings:{bankConnectionListHeader:Ae,title:Vn,infoText:Mn}}=re.getLocalizedStrings().common,ye={pageContentPadding:new I(k[4],k[8]),subtitleSectionWidth:new I(343,580,1200),subTitleBottomMargin:new I(k[0],k[5])},Un={qboLinkAcc:new ot("smallRegular","standardRegular")},Wn="bankConnectionsSettingsPage",ce="bankAccountSection",le="primaryAccountSection",Dn="bill_pay",Nn="reimbursement",Hn="zeni_accounts",qn="charge_cards",Gn="zeni_treasury",Ve=e=>t.jsx(Xn,{children:N.map(h=>t.jsx(Yn,{actualDataValue:h.value,wrapperWidth:h.width,windowSize:e,children:t.jsx(Qn,{children:h.value})},h.value))}),Si=({bankSetupView:e,connectedAccountProvider:h,onBackClick:H,onUpdateAccountClick:R,onFetchLinkTokenClick:_,onUpdatePaymentAccountStatus:P,onUpdatePaymentAccountLoginStatus:V,onEstablishConnectionClick:C,onEstablishConnectionSuccess:c,onClickMenuIcon:f,onUpdatePrimaryFundingAccount:w,onRemoveConnection:M})=>{const U=ve(),a=je(),{allFundingAccounts:o,primaryConnection:l}=e,m=Xe({mode:"all",reValidateMode:"onChange",defaultValues:We(e),values:We(e)}),b=m.handleSubmit(d=>{}),u=async(d,S)=>{const L=d.split("."),$=L[0],z=L[1],g=l.find(p=>p.productType===$);if($!=null&&z!=null){const p=S[$][z];if(z==="primaryAccountSection"){const O=o.find(s=>s.id===p.selectedOption)?.accType;p.selectedOption!=null&&O!=null&&w(p.selectedOption,y($),O)}else if(z==="bankAccountSection"&&g!=null&&g.primaryFundingAccount!=null&&p.selectedOption!=null){const O=g.primaryFundingAccount?.id,s=g.primaryFundingAccount?.accType;O!=null&&s!=null&&R(p.selectedOption,O,$,y($),s)}}};r.useEffect(()=>{const d=m.watch((S,{name:L})=>{L!=null&&S!=null&&Ye(()=>u(L,S))});return()=>{d.unsubscribe()}});const A=e.fetchState==="In-Progress"||e.fetchState==="Not-Started",q=e.fetchState==="Completed"&&e.allFundingAccounts.length===0,v=a==="small"?vn:Yt,W=()=>A?t.jsx(ti,{children:t.jsx(se,{size:"ExtraLarge",start:!0})}):q?t.jsx(Ze,{message:"No bank connections added."}):t.jsxs(Jn,{windowSize:a,children:[t.jsx(Ue,{children:Ae.primary}),a!=="small"?Ve(a):null,t.jsx(et,{...m,children:t.jsx("form",{id:li(Wn),onSubmit:b,children:t.jsx(ni,{windowSize:a,children:e.primaryConnection.map(d=>d!=null?t.jsx(Me,{windowSize:a,children:t.jsx(Ct,{allBankAccounts:e.allBankAccounts,setupView:d,connectedAccountProvider:h,onFetchLinkTokenClick:_,onUpdatePaymentAccountStatus:P,onUpdatePaymentAccountLoginStatus:V,onEstablishConnectionClick:C,onEstablishConnectionSuccess:c})},d.productType):null)})})}),e.otherPaymentAccounts.length>0?t.jsxs(Zn,{children:[t.jsx(Ue,{children:Ae.other}),t.jsx(ai,{children:t.jsx(tt,{display:"flex",placement:"right",maxWidth:"340px",title:Ae.otherToolTip,style:{padding:`12px ${i.sp3}`},children:t.jsx(ci,{})})})]}):null,a!=="small"&&e.otherPaymentAccounts.length>0?Ve(a):null,e.otherPaymentAccounts.map(d=>{const S=o.find(L=>L.id===d.paymentAccountId)?.balanceFetchStatus;return t.jsx(Me,{windowSize:a,children:t.jsx(v,{paymentAccount:d,bankAccountList:e.allBankAccounts,balanceFetchStatus:S,connectedAccountProvider:h,onRemoveConnection:M,onFetchLinkTokenClick:_,onEstablishConnectionClick:C,onUpdatePaymentAccountStatus:P,onEstablishConnectionSuccess:c})},d.paymentAccountId)})]});return t.jsxs(Kn,{children:[t.jsx(Qe,{source:"BankConnectionsSettingsPage",title:Vn.bankConnections,backgroundColor:U.colors.grey4,style:{zIndex:3},onBackClick:H,showBackButton:!1,showMenuIcon:a==="medium-compact"||a==="small",onClickMenuIcon:f}),t.jsxs(ei,{windowSize:a,children:[t.jsx(ii,{windowSize:a,children:t.jsx(oi,{windowSize:a,children:Mn.bankConnections})}),W()]})]})},Jn=n.div`
295
295
  display: flex;
296
296
  flex-direction: column;
297
297
  width: 100%;
@@ -356,7 +356,7 @@ import{d as ve,q as je,aa as Xe,cT as Ye,j as t,bG as Qe,F as re,o as i,L as se,
356
356
  .select-value-container
357
357
  .single-select-field__single-value {
358
358
  color: ${e=>e.theme.colors.hero};
359
- ${Ne.standardRegular.css};
359
+ ${De.standardRegular.css};
360
360
  }
361
361
  .qboLinkAcc
362
362
  .single-select-field__control
@@ -405,7 +405,7 @@ import{d as ve,q as je,aa as Xe,cT as Ye,j as t,bG as Qe,F as re,o as i,L as se,
405
405
  align-items: center;
406
406
  width: ${e=>ye.subtitleSectionWidth.valuePx(e.windowSize)};
407
407
  margin-bottom: ${e=>ye.subTitleBottomMargin.valuePx(e.windowSize)};
408
- `,oi=n(N)`
408
+ `,oi=n(D)`
409
409
  display: flex;
410
410
  align-items: center;
411
411
  color: ${e=>e.theme.colors.hero};
@@ -422,4 +422,4 @@ import{d as ve,q as je,aa as Xe,cT as Ye,j as t,bG as Qe,F as re,o as i,L as se,
422
422
  width: ${i.sp3};
423
423
  height: ${i.sp3};
424
424
  color: ${e=>e.theme.colors.hero};
425
- `,We=e=>{const{primaryConnection:h,allBankAccounts:q,allFundingAccounts:R}=e,_=q.map(a=>({label:a.accountName,value:a.accountId})),P=R.map(a=>({label:a.label,value:a.id,isRecommended:a.accType==="depositAccount"})),V=h.find(a=>a.productType==="bill_pay"),C=h.find(a=>a.productType==="reimbursement"),c=h.find(a=>a.productType==="zeni_accounts"),f=h.find(a=>a.productType==="charge_cards"),w=h.find(a=>a.productType==="zeni_treasury"),M=c?.allFundingAccounts.map(a=>({label:a.label,value:a.id,isRecommended:a.accType==="depositAccount"}))??[],U=w?.allFundingAccounts.map(a=>({label:a.label,value:a.id,isRecommended:a.accType==="paymentAccount"}))??[];return{[Nn]:{[ce]:{selectedOption:V?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:V?.primaryFundingAccount?.id,allOptions:P}},[Dn]:{[ce]:{selectedOption:C?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:C?.primaryFundingAccount?.id,allOptions:P}},[qn]:{[ce]:{selectedOption:c?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:c?.primaryFundingAccount?.id,allOptions:M}},[Gn]:{[ce]:{selectedOption:w?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:w?.primaryFundingAccount?.id,allOptions:U}},[Hn]:{[ce]:{selectedOption:f?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:f?.primaryFundingAccount?.id,allOptions:P}}}},li=e=>`${e}_form`;export{Si as default,li as formUniqueName};
425
+ `,We=e=>{const{primaryConnection:h,allBankAccounts:H,allFundingAccounts:R}=e,_=H.map(a=>({label:a.accountName,value:a.accountId})),P=R.map(a=>({label:a.label,value:a.id,isRecommended:a.accType==="depositAccount"})),V=h.find(a=>a.productType==="bill_pay"),C=h.find(a=>a.productType==="reimbursement"),c=h.find(a=>a.productType==="zeni_accounts"),f=h.find(a=>a.productType==="charge_cards"),w=h.find(a=>a.productType==="zeni_treasury"),M=c?.allFundingAccounts.map(a=>({label:a.label,value:a.id,isRecommended:a.accType==="depositAccount"}))??[],U=w?.allFundingAccounts.map(a=>({label:a.label,value:a.id,isRecommended:a.accType==="paymentAccount"}))??[];return{[Dn]:{[ce]:{selectedOption:V?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:V?.primaryFundingAccount?.id,allOptions:P}},[Nn]:{[ce]:{selectedOption:C?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:C?.primaryFundingAccount?.id,allOptions:P}},[Hn]:{[ce]:{selectedOption:c?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:c?.primaryFundingAccount?.id,allOptions:M}},[Gn]:{[ce]:{selectedOption:w?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:w?.primaryFundingAccount?.id,allOptions:U}},[qn]:{[ce]:{selectedOption:f?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:f?.primaryFundingAccount?.id,allOptions:P}}}},li=e=>`${e}_form`;export{Si as default,li as formUniqueName};
@@ -1,5 +1,5 @@
1
- import{q as On,ax as En,d as _n,gu as Wn,gv as Zn,gw as Kn,gx as Gn,cs as Vn,aP as Un,F as Hn,y as u,j as t,l as E,fl as st,fm as Jn,o as a,fn as Xn,fo as qn,aM as b,fp as Yn,aN as Ae,fq as Qn,bG as dt,bt as ct,dO as pt,cE as mt,cF as ut,cG as yt,gy as ea,gz as ta,gA as na,gB as aa,fv as $,fw as I,fx as A,gC as k,fu as ia,b as ht,p as le,fy as Lt,fz as la,fA as oa,fB as ra,gD as sa,gE as da,aQ as ca,ap as bt,c6 as Te,gF as pa,gG as L,u as r,aj as ma,ch as ua,gH as ya,_ as ha,gI as ba,gJ as gt,fF as xt,B as ga,di as xa,cx as fa,b7 as wa,b9 as Ta,c as va,c8 as Ft,gK as Da,ai as Ot,aY as ja,b5 as $a,by as Ia,f3 as Aa,am as ka}from"./index-CUpJHznP.js";import{b as p,n as i}from"./vendor-Bs1fkIUX.js";import{_ as Sa}from"./liveblocks-8ht9CoL5.js";import{o as Ca,t as Pa}from"./LowBalancePopup-D8MLLJa7-CBiPecxo.js";import"./mui-Ty75qFQF.js";import"./analytics-BbBRZ6cw.js";import"./routing-Dk1A2KYI.js";import"./sentry-BE5FTzpq.js";import"./redux-CEhZD0hA.js";import"./crypto-CK1x27Ua.js";const Ba=e=>p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",...e},p.createElement("g",{id:"Layer_1"},p.createElement("path",{fill:"none",stroke:"#757d7e",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",d:"M4.4,30.6l6-5.9c1,.6,2.1.9,3.3,1,1.1.1,2.3,0,3.4-.4,1.1-.4,2.1-.9,2.9-1.7.9-.8,1.5-1.7,2-2.7,0-.1,0-.2,0-.4,0-.1,0-.2-.1-.3,0-.1-.2-.2-.3-.2-.1,0-.2,0-.4,0h-4.6c-.8,0-1.6-.3-2.1-.9-.6-.6-.9-1.3-.9-2.1s.3-1.5.9-2.1c.6-.6,1.3-.9,2.1-.9h3.8c.1,0,.3,0,.4-.1s.2-.2.3-.3c0-.1,0-.3,0-.4,0-.1,0-.3-.1-.4-1.3-1.6-3.1-2.7-5.2-3.1-2.1-.4-4.2,0-5.9,1.2-1.8,1.1-3,2.8-3.5,4.8s-.2,4.1.8,5.9l-6.1,5.7,3.3,3.3Z"})),p.createElement("g",{id:"Layer_2"},p.createElement("g",null,p.createElement("path",{fill:"#c27419",stroke:"#f3f7f7",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",d:"M31,8c0,1.9-.7,3.8-2.1,5.1-1.3,1.4-3.2,2.2-5.1,2.2-.9,0-1.9-.2-2.7-.5-.9-.3-1.7-.9-2.3-1.5-.7-.7-1.2-1.4-1.6-2.3-.4-.9-.6-1.8-.6-2.7,0-1.9.7-3.8,2.1-5.1,1.3-1.4,3.2-2.2,5.1-2.2.9,0,1.9.2,2.7.5.9.3,1.7.9,2.3,1.5.7.7,1.2,1.4,1.6,2.3.4.9.6,1.8.6,2.7Z"}),p.createElement("path",{fill:"none",stroke:"#f3f7f7",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",d:"M23.8,9.4v-4.6"}),p.createElement("path",{fill:"none",stroke:"#f3f7f7",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",d:"M23.8,11.4s0,0,0,0c0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.1,0,0,0,0,.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0-.1,0,0,0,0-.1,0h0"})))),za={formTitle:new ga("h6Medium","h5Medium")},m={containerPaddingLeft:new u(r[3],r[6],r[6]),containerPaddingRight:new u(r[3],r[6],r[8]),marginBottom:new u(r[3],r[3]),labelWidth:new u(120,160,160),formTitlePaddingLeftRight:new u(30,0),marginTop:new u(r[1],0),rightIconsGap:new u(r[4],r[5]),closeContainerMarginTop:new u(r[1],0),formTitleMarginTopBottom:new u(0,0),footerButtonWidth:new u(120,120,120,165,165),right:new u(r[3],r[0]),actionsContainerRight:new u(r[0],r[3],r[3],r[6],r[6]),otherActionsIconContainerMarginLeft:new u(r[5],r[4],r[4],r[5]),otherActionsContainerBottom:new u(58,44),iconContainerMarginTop:new u(2,r[1]),recurringSchedulePaddingLeft:new u(r[2],0),paddingRight:new u(r[2],r[3]),labelMarginRight:new u(r[0],r[3]),textPadding:new u(r[0],r[3]),additionalTextMarginTop:new u(-4,0),refundPopupWidth:new u(300,420,420),drawerSectionPaddingLeftRight:new u(r[4],r[5]),infoLabelPaddingRight:new u(r[3],r[3]),infoLabelMarginTop:new u(r[1],r[0]),navBarHeight:new u(0,0,r[8]),navBarContainerWidth:new u(100,58)},{dateFormat:Ra,common:{noText:C,strings:{empty:d},currency:ft,via:Ma,more:Na,edit:La},spendManagement:{billPay:{billDetails:n,billsByTabs:ke,bulkActions:wt,vendorCreation:Tt,insufficientFunds:Et}},collaboration:{threads:{placeholder:vt,tooltip:Dt,title:{comments:Fa}}}}=Hn.getLocalizedStrings(),ve=Ra.visual.MMMDCommaYYYYformat,Ai=({billDetails:e,currentTenant:x,showApproveRejectBtns:g,isShowDeletedBillsEnabled:K,signedInUser:oe,isAdmin:_t,isRealTimeApprovalEnabled:Wt,isInternationalPaymentShaVsOurEnabled:Zt,hasZeniAssistAccess:Kt,analytics:M,showMarkAsPaidButtonToCreator:G,showMarkAsPaidButtonToApprover:Se,isBillPayCommentingEnabled:Ce,isZeniUser:Gt,showBackButton:Pe=!0,isDetectInsufficientFundsEnabled:Vt,redirectToEditableBillScreen:Ut,redirectToBillsScreen:q,discardBillDetailsFromLocalStore:Be,deleteBill:Ht,cancelAndDeleteBill:ze,approveOrRejectBill:Re,onAddNewRule:Jt,onAttachmentClick:Me,saveBillDetails:Xt,discardOutsideZeniPaymentData:qt,onBackClick:Ne,updateEditRealTimeApproverClicked:Yt,onSaveRealTimeApprovals:Qt,onRetryPaymentClick:en,onRefundPaymentClick:tn})=>{const l=On(),o=En(),Le=_n(),[nn,V]=p.useState(!1),[Fe,re]=p.useState(!1),[se,de]=p.useState(!1),[Oe,ce]=p.useState(!1),[an,pe]=p.useState(!1),[Ee,Y]=p.useState(!1),h=e.transactionDetails?.id,ln=Gt?Wn:Zn,{requestToOpenThread:me,setRequestToOpenThread:_e,setOpenThread:Q}=p.useContext(ln),[on,U]=p.useState(!1),T={application:"dashboard",companyId:o.currentTenant?.companyId,tab:"bill",entityId:h,isGlobalComment:!1},{threads:H,isLoading:P}=Kn(T,"both",!1),f=Ce&&h!=null,We=p.useMemo(()=>h==null?[]:H.filter(c=>c.resolved===!1&&!c.id.includes(Gn)),[H,h]).length,v=`dashboard_${o.currentTenant?.companyId}`,rn=p.useCallback((c,y)=>{Q(y),U(!1)},[Q,U]);p.useEffect(()=>{me?.threadId!=null&&H.length>0&&!P&&(Q(me.threadId),_e(null))},[me,H,P,Q,_e]),Vn({componentName:"bill.details"});const[N,ee]=p.useState({title:"",description:"",primaryButtonText:"",secondaryButtonText:""}),[Ze,Ke]=p.useState("approved"),[sn,Ge]=p.useState(!1),[dn,Ve]=p.useState(!1),[Ue,He]=p.useState(!1),Je=()=>Ge(!1),cn=()=>Ge(!0),Xe=Un(e.zeniAssist?.refundStatus.fetchState),te=p.useCallback(()=>{q()},[q]);p.useEffect(()=>{(e.deleteStatus.fetchState==="Completed"||e.approvalUpdateStatus.fetchState==="Completed"||e.cancelAndDeleteStatus.fetchState==="Completed"||e.billSaveStatus==="Completed")&&(Be(),q())},[e,q,Be]),p.useEffect(()=>{Xe==="In-Progress"&&(e.zeniAssist?.refundStatus.fetchState==="Completed"||e.zeniAssist?.refundStatus.fetchState==="Error")&&(de(!1),te())},[Xe,e.zeniAssist?.refundStatus,te]);const w=e.transactionDetails?.billPayInfo.stage,ne=e.transactionDetails?.billPayInfo.billStatus,J=e.transactionDetails?.billPayInfo.billPaymentStatus,pn=e.transactionDetails?.billPayInfo.billPaymentRefundStatus,ue=w?.code==="paid",D=ue?w:ne?.code=="approved"&&J?.code?J:ne,S=Oa(D,e.transactionDetails),F=e.transactionDetails?.billPayInfo.isRefundInitiated===!0?pn:J?.code!=null&&(ne?.code=="approved"||J.code==="mark_as_paid")?J:ne,ye=e.transactionDetails?.vendor?.name,B=e.isRecurring,qe=()=>{e.transactionDetails?.id!=null&&Ut(e.transactionDetails?.id??"")},mn=()=>{ee({title:B?n.recurringBill.deleteRecurringTitle:n.deleteBillTitle,description:B?n.recurringBill.deleteRecurringAlertText:n.deleteAlertDescription,primaryButtonText:n.delete,secondaryButtonText:n.cancel}),V(!0)},un=()=>{ee({title:n.cancelBillTitle,description:n.cancelAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),V(!0)},yn=()=>{ee({title:B?n.recurringBill.cancelAndDeleteRecurringTitle:n.cancelAndDeleteBillTitle,description:B?n.recurringBill.cancelAndDeleteRecurringAlertText:n.cancelAndDeleteAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),V(!0)},hn=()=>{M.trackRefundClick(D?.code??"",w?.code??"",F?.description??"",B?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),ee({title:n.zeniAssist.refundTitle,description:n.zeniAssist.refundDescription,primaryButtonText:n.zeniAssist.proceed,secondaryButtonText:n.cancel}),de(!0)},bn={onOkClick:()=>{V(!1),N.primaryButtonText===n.delete?Ht?.(e.isRecurring):N.title===n.cancelBillTitle?ze?.(e.isRecurring):N.title===n.cancelAndDeleteBillTitle||N.title===n.recurringBill.cancelAndDeleteRecurringTitle?ze?.(e.isRecurring,!0):N.primaryButtonText===n.zeniAssist.proceed&&(M.trackRefundConfirmClick(D?.code??"",w?.code??"",F?.description??"",B?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),tn())},onCancelClick:()=>{V(!1),de(!1)}},gn={onOkClick:c=>{pe(!1),Re({billId:e.transactionDetails?.id??"",type:"rejected",description:c})},onCancelClick:()=>{pe(!1)}},xn=()=>{const[c]=ja("ZeniAssist");return c!=null?t.jsx($a,{"data-testid":b("bill-details-zeni-assist-icon",h),onClick:()=>{ce(!Oe),M.trackZeniAssistClick(D?.code??"",w?.code??"",F?.description??"",B?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"")},style:{width:`${a.sp5}`,height:`${a.sp5}`,marginBottom:`${a.sp2}`},animationData:c,loop:!0,play:!0,rendererSettings:{preserveAspectRatio:"xMidYMid slice"}}):null},ae={invoiceNumber:e.transactionDetails?.documentId??"",invoiceDate:e.transactionDetails?.date,billDueDate:e.transactionDetails?.dueDate,memo:e.transactionDetails?.memo,currencyCode:e.vendorCurrency??ft.currencyCode},he=e.transactionDetails?.lines?.map((c,y)=>{const z=c;return{lineIndex:y,lineId:z.id,account:z.account,class:z.class,amount:z.amount.amount,billable:z.billable,customer:z.customer,lineDescription:z.lineDescription,recipientAmount:z.recipientAmount?.amount}})??[],fn=e.transactionDetails?.recipientTotalAmount.amount??0,be=e.transactionDetails?.recipientTotalAmount,s={paymentType:e.paymentMethodType,paymentDate:e.transactionDetails?.billPayInfo.paymentDate,internationalTransferFeeBearerPaymentMethod:e.transactionDetails?.billPayInfo.internationalTransferFeeBearerPaymentMethod,paymentToBankAccount:e.bankAccount,paymentToPI:e.paymentInstrument},j=m.labelWidth.value(l),wn=c=>c==="billable"||c==="has_been_billed"?n.yes:n.no,Tn=s.paymentToBankAccount?.bankAccountNumber?s.paymentToBankAccount?.bankAccountNumber?.slice(s.paymentToBankAccount?.bankAccountNumber?.length-4):s.paymentType?.method?.includes("international")&&s.paymentToBankAccount?.bankAccountIban?s.paymentToBankAccount?.bankAccountIban?.slice(s.paymentToBankAccount?.bankAccountIban.length-4):"",vn=s.paymentToBankAccount?.bankAccountName!=null&&s.paymentToBankAccount?.bankAccountName!=""?s.paymentToBankAccount?.bankAccountName:`${e.transactionDetails?.vendor?.name} - ${s.paymentToBankAccount?.bankName} XXXX${Tn}`,Dn=e.transactionDetails?.billPayInfo?.isCollectToAccountInfoFromVendorContact?t.jsxs(t.Fragment,{children:[`${n.magicLink.collectFrom} ${e.transactionDetails?.billPayInfo?.toAccountVendorEmail}`,t.jsx(ui,{windowSize:l,children:t.jsx(mi,{})})]}):void 0,Ye=e.transactionDetails?.date!=null&&e.transactionDetails.bookCloseDate!=null&&e.transactionDetails.date.isBefore(e.transactionDetails.bookCloseDate),jn=()=>`${Tt.achDetails.bankRoutingNumber} ${s?.paymentToBankAccount?.bankRoutingNumberAch}, ${s?.paymentToBankAccount?.bankName}
2
- ${Tt.achDetails.bankAccountNumber} ${s?.paymentToBankAccount?.bankAccountNumber}`,ie=e.transactionDetails?.billPayInfo!=null?E.getActualPaymentDate(e.transactionDetails?.billPayInfo):void 0,$n=ie!=null&&e.paymentMethodType?.maxPeriod?.value!=null?E.zeniDate(E.getNextNthWorkingDay(ie?.toDate(),[0,6],e.paymentMethodType?.maxPeriod.value).toDateString()):void 0,Qe=e.transactionDetails?.billPayInfo.expectedDepositDate??$n,et=st(s?.paymentType?.method??"").replace("Same Day",""),In=(s?.paymentToBankAccount!=null||s?.paymentToPI)!=null?n.addedByZeni:e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact?t.jsx(Jn,{paymentTypeLabel:et,onClick:cn,style:{marginTop:`${l==="small"?a.sp2:a.sp0}`}}):void 0,An=()=>s?.paymentToBankAccount==null&&s?.paymentToPI==null&&s?.paymentType?.method!=null&&e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact&&e.transactionDetails?.billPayInfo.paymentDate!=null?t.jsx(Da,{paymentType:s?.paymentType?.method,paymentDate:e.transactionDetails?.billPayInfo.paymentDate}):null,tt=e.transactionDetails?.lines?.some(c=>{const y=c.account;return y?.isDeleted===!0&&y?.isBillEditableCoaAccountType===!1})??!1,ge=!(D?.code==="processing"||e.transactionDetails?.billPayInfo.isRefundInitiated===!0||e.transactionDetails?.billPayInfo.isRefundComplete===!0||(w?.code==="scheduled"||w?.code==="pending_approval")&&tt),nt=!((w?.code==="scheduled"||w?.code==="pending_approval")&&tt),xe=e.zeniAssist?.isEligibleForRetryIBT===!0||e.zeniAssist?.isEligibleForRetryOBP===!0,fe=e.zeniAssist?.isEligibleForRefund===!0,kn=e?.transactionDetails?.billPayInfo.billPaymentMethodType.code==="wire"&&e?.transactionDetails?.billPayInfo.billPaymentMethodType.subCode==="international",Sn=Kt&&e.transactionDetails?.billPayInfo.billPaymentStatus.code!=null&&["failed","cancelled","returned"].includes(e.transactionDetails.billPayInfo.billPaymentStatus.code)&&(xe||fe)&&kn===!1,we=xe||fe,Cn=e.transactionDetails?.billPayInfo.isRefundInitiated===!0&&e.transactionDetails?.billPayInfo.isRefundComplete===!1,_=D?.code,Pn=!Cn&&(!Ye||D?.code==="processing"&&!B),at=!Ye,it=["small","medium-compact","medium-regular"].includes(l),X=E.isBulkProcessing(e.transactionDetails?.bulkProcessingDetail?.type),O=E.isPaymentMethodOutsideZeni(e.paymentMethodType?.method),Bn=!X&&(_!=="processing"&&nt||_==="processing"&&!B||_==="processing"&&at||g&&O&&Se),zn=c=>{M.trackBillPayMarkAsPaidSubmit(c.paymentMode??"other",w?.code??"",D?.code??""),Xt(!0,Ue,c)},lt=()=>{Ve(!0),M.trackBillPayMarkAsPaid(w?.code??"",D?.code??"")},Rn=()=>{He(!0),lt()},Mn=()=>{qt(),Ve(!1),Ue&&He(!1)},Nn=p.useMemo(()=>({companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,entityType:"bill.details",entityId:h??d,isGlobalComment:!1,application:"dashboard",tab:"bill",url:window.location.href}),[o.currentTenant,h]),W=Vt&&e.transactionDetails?.totalAmountWithFeesInUSD!=null&&w?.code!=="paid"&&D?.code!=="failed"&&D?.code!=="processing"&&D?.code!=="cancelled"&&D?.code!=="returned"&&D?.code!=="rejected"?Xn(e.transactionDetails?.totalAmountWithFeesInUSD,e.withdrawFrom,s.paymentDate):void 0,ot=()=>{Ke("approved"),Ee===!0&&Y(!1),W!=null&&M.trackLowBalanceAccountApprove(w?.code??"",e.transactionDetails?.billPayInfo.billPaymentStatus.code??"",e.isRecurring?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"",xt(o.loggedInUser),e.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account"),Re({billId:e.transactionDetails?.id??"",type:"approved"})},Ln=()=>{Ke("rejected"),W!=null&&M.trackLowBalanceAccountReject(w?.code??"",e.transactionDetails?.billPayInfo.billPaymentStatus.code??"",e.isRecurring?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"",xt(o.loggedInUser),e.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account"),pe(!0)},rt=p.useRef(null);return t.jsxs(Qa,{windowSize:l,ref:rt,children:[t.jsx(qn,{anchor:"right",open:sn,onClose:Je,transitionDuration:250,"data-testid":b("vendor-email-preview-drawer"),children:t.jsx(Yn,{companyName:Qn(x.company?.companyInfo),vendor:e.transactionDetails?.vendor?.name,paymentDate:s.paymentDate?.format(ve)??"",paymentType:et,amount:Ae("0,0.[00]",be),isInvoiceAttached:!!e.transactionDetails?.attachments?.length,onClose:Je})}),t.jsxs(ai,{windowSize:l,children:[t.jsx(bi,{windowSize:l,children:l==="small"?t.jsx(dt,{"data-testid":b("bill-detail-nav-bar-mobile"),title:t.jsxs(t.Fragment,{children:[ye,e.isRecurring?t.jsx(Ie,{width:a.sp4,height:a.sp4}):null]}),backgroundColor:Le.colors.grey4,rightSideComponent:t.jsxs(St,{windowSize:l,children:[f?t.jsxs(Mt,{isDisabled:P,"data-testid":b("bill-comment-button"),onClick:P?()=>null:c=>{c.preventDefault(),c.stopPropagation(),U(!0),M.trackCommentActivity("bill","clicked",o.currentTenant?.companyName??"",o.controllersList.controllers.map(y=>pt(y)),void 0,void 0,"page icon")},children:[t.jsx(ct,{count:P?void 0:We,isLoading:P,style:{left:"12px"}}),t.jsx(Nt,{})]}):null,t.jsx(Ct,{onClick:()=>te(),"data-testid":b("bill-detail-nav-bar-small-close-button"),children:t.jsx(kt,{})})]}),leftSideComponent:t.jsx(At,{windowSize:l,onClick:Ne,"data-testid":b("bill-detail-nav-bar-small-back-button"),style:{visibility:`${Pe?"visible":"hidden"}`},children:t.jsx(It,{})}),source:"BillDetailPage"}):t.jsx(dt,{"data-testid":b("bill-detail-nav-bar"),title:t.jsxs(t.Fragment,{children:[ye,e.isRecurring?t.jsx(Ie,{width:a.sp4,height:a.sp4}):null]}),rightSideComponent:t.jsxs(St,{windowSize:l,children:[f?t.jsxs(Mt,{isDisabled:P,"data-testid":b("bill-comment-button"),onClick:P?()=>null:c=>{c.preventDefault(),c.stopPropagation(),U(!0),M.trackCommentActivity("bill","clicked",o.currentTenant?.companyName??"",o.controllersList.controllers.map(y=>pt(y)),void 0,void 0,"page icon")},children:[t.jsx(ct,{count:P?void 0:We,isLoading:P,style:{left:"12px"}}),t.jsx(Nt,{})]}):null,t.jsx(Ct,{onClick:()=>te(),"data-testid":b("bill-detail-nav-bar-close-button"),children:t.jsx(kt,{})})]}),leftSideComponent:t.jsx(At,{windowSize:l,onClick:Ne,"data-testid":b("bill-detail-nav-bar-back-button"),style:{visibility:`${Pe?"visible":"hidden"}`},children:t.jsx(It,{})}),enableTitleOnScroll:!0,scrollableContent:rt,source:"BillDetailPage"})}),t.jsxs(ii,{windowSize:l,children:[Ee?t.jsx(Ca,{withdrawFrom:e.withdrawFrom,paymentDate:e?.transactionDetails?.billPayInfo.paymentDate,onOkClick:ot,onCancelClick:()=>{Y(!1),qe()},onClickAway:()=>{Y(!1)}}):null,dn?t.jsx(Pa,{onCancel:Mn,onProceedForMarkAsPaid:zn,saveDetailsFetchState:e.billSaveStatus,paymentData:e.outsideZeniPaymentInfo}):null,nn||se?t.jsx(mt,{titleComponent:t.jsx(yt,{children:N.title}),descriptionComponent:t.jsx(ut,{children:N.description}),primaryButtonText:N.primaryButtonText,proceedButtonVariant:se?"primary":"danger",secondaryButtonText:N.secondaryButtonText,action:bn,isEditPopup:!0,isLoading:e.zeniAssist?.refundStatus.fetchState==="In-Progress",children:se?Ea(l,e):null}):null,an?t.jsx(mt,{titleComponent:t.jsx(yt,{children:n.rejectBillTitlePrefix+" "+(e.transactionDetails?.vendor?.name!=null?e.transactionDetails.vendor.name:"")}),descriptionComponent:t.jsx(ut,{children:n.rejectBillDescription}),primaryButtonText:n.send,secondaryButtonText:n.cancel,action:gn,isEditPopup:!0,isNotesIncluded:!0,notesPlaceholder:n.rejectBillReasonPlaceholder}):null,l!=="small"||S?t.jsxs(oi,{windowSize:l,children:[l!=="small"?t.jsxs(ri,{windowSize:l,children:[ye,e.isRecurring?t.jsx(Ie,{height:a.sp5,width:a.sp5}):null]}):null,K&&S!=null&&S.code==="deleted"?t.jsx(Pt,{color:S.color,bgColor:S.bgColor,borderColor:S.borderColor,children:S.value}):S?.value===ke.tabsById.overdue?t.jsx(Pt,{color:S.color,bgColor:S.bgColor,borderColor:S.borderColor,children:S.value}):null]}):null,F!=null&&F.code?l==="small"?t.jsx(ea,{progressSectionObj:F,createDate:e.transactionDetails?.createTime,paymentDate:Qe,scheduleDate:ie,approvedDate:e.latestApprovedDate,isFrozen:e.transactionDetails?.isDeleted}):t.jsx(ta,{progressSectionObj:F,createDate:e.transactionDetails?.createTime,paymentDate:Qe,scheduleDate:ie,approvedDate:e.latestApprovedDate,isFrozen:e.transactionDetails?.isDeleted}):null,Za(X,e,W),t.jsx(na,{sectionId:aa,currentVendorOption:{defaultOptions:[]},billId:h,isBillPayCommentingEnabled:Ce,isBillPaid:ue,disableVendorActions:!0,vendor:e.transactionDetails?.vendor,prevBills:e.previousBills,onAttachmentClick:Me,isVendorRecommendationEnabled:!1,showVendorGptRecommendationText:!1}),s.paymentType?.method?.includes("ach"),t.jsxs(je,{children:[t.jsx($e,{children:n.whatForTitle}),t.jsxs(De,{children:[t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"invoiceNumber"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("invoiceNumber")}`},children:t.jsx(k,{label:{label:n.invoiceNumber,width:j},text:ae.invoiceNumber??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"invoiceDate"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("invoiceDate")}`},children:t.jsx(k,{label:{label:n.invoiceDate,width:j},text:ae.invoiceDate?.format(ve)??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"billDueDate"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("billDueDate")}`},children:t.jsx(k,{label:{label:n.billDueDate,width:j},text:ae.billDueDate?.format(ve)??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"memo"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("memo")}`},children:t.jsx(k,{label:{label:n.memo,width:j},text:ae.memo??C,style:{width:"auto"}})})]})]}),t.jsxs(je,{children:[t.jsx(li,{windowSize:l,children:t.jsx($e,{children:n.lineItemsTitle})}),he.length>0?he.map((c,y)=>{const z=e?.transactionDetails?.lines?.find(Fn=>Fn.id===c.lineId)?.recipientAmount;return t.jsxs(ei,{children:[he.length>1?t.jsx(ti,{windowSize:l,children:t.jsx(ni,{windowSize:l,children:`${n.line} # ${y+1}`})}):null,t.jsxs(De,{children:[t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.recipientAmount`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("recipientAmount",y)}`},children:t.jsx(k,{label:{label:n.amount,width:j},text:z!=null?Ae("0,0[.]00",z):C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.lineDescription`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("lineDescription",y)}`},children:t.jsx(k,{label:{label:n.description,width:j},text:c.lineDescription??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.account`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("account",y)}`},children:t.jsx(k,{label:{label:n.category,width:j},text:c.account?.accountName??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.class`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("class",y)}`},children:t.jsx(k,{label:{label:n.class,width:j},text:c.class?.className??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.billable`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("billable",y)}`},children:t.jsx(k,{label:{label:n.billable,width:j},text:c.billable!=null?wn(c.billable):C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.customer`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("customer",y)}`},children:t.jsx(k,{label:{label:n.customer,width:j},text:c.customer?.name??C,style:{width:"auto"}})})]})]},y)}):null]}),t.jsxs(si,{windowSize:l,children:[t.jsx(di,{children:n.total}),t.jsx(ci,{children:be!=null?t.jsx(ia,{amount:be,integerStyles:ht.h6Medium.cssObject,decimalStyles:ht.standardMedium.cssObject}):C})]}),t.jsxs(je,{children:[t.jsx($e,{children:n.paymentDetailsTitle}),t.jsxs(De,{children:[O?null:t.jsxs(t.Fragment,{children:[t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"withdrawFrom"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("withdrawFrom")}`},children:t.jsx(k,{label:{label:n.withdrawFrom,width:j},text:e.withdrawFrom!=null?Lt(e.withdrawFrom,l):d,style:{width:"auto"},additionalInfoLabelStyles:{textAlign:"right",paddingRight:m.infoLabelPaddingRight.valuePx(l),marginTop:m.infoLabelMarginTop.valuePx(l),color:le.brandColorGoldDark},additionalInfoLabel:W!=null&&w?.code==="pending_approval"?Et.addMoney:W})}),t.jsx(R,{})]}),t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"paymentType"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("paymentType")}`},children:t.jsx(k,{additionalInfoLabel:s.paymentType?.method!=null&&s.paymentType.method.includes(E.NEW_INTERNATIONAL_METHOD_SUBTEXT)&&Zt&&s.internationalTransferFeeBearerPaymentMethod!=null?t.jsx(Ga,{children:la(s.internationalTransferFeeBearerPaymentMethod)}):void 0,label:{label:n.paymentMethod,width:j},text:O&&e.outsideZeniPaymentInfo!=null?Wa(e.outsideZeniPaymentInfo):st(s.paymentType?.method??""),style:{width:"auto"}})}),O?null:t.jsxs(t.Fragment,{children:[t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"paymentTo"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("paymentTo")}`},children:t.jsxs(t.Fragment,{children:[t.jsx(k,{label:{label:n.paymentTo,width:j},text:s.paymentToBankAccount!=null?vn:s.paymentToPI!=null?s.paymentToPI.displayText:Dn,style:{width:"auto"},showEyeIcon:s.paymentToBankAccount!=null&&!!s.paymentType?.method?.includes("ach"),showAdditionalInfoLabel:!!e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact||s.paymentType?.method?.includes("ach"),tooltipText:jn(),additionalInfoLabel:t.jsx(Ka,{children:In})}),An()]})})]}),O||e.isRecurring?t.jsxs(t.Fragment,{children:[t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"recurringPaymentType"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("recurringPaymentType")}`},children:t.jsxs(t.Fragment,{children:[t.jsx(k,{label:{label:n.paymentType,width:j},labelStyles:{marginRight:m.labelMarginRight.valuePx(l)},style:{width:"auto"},text:ra(e.isRecurring,O,e.transactionDetails?.recurringBillInstance??1,e.recurringBillConfigDetail?.totalPaymentCycles??0),textStyles:{paddingLeft:m.textPadding.valuePx(l),paddingRight:m.textPadding.valuePx(l)},additionalInfoLabel:oa(l,e.isRecurring,O,e.recurringBillConfigDetail),additionalInfoLabelStyles:{paddingRight:m.paddingRight.valuePx(l),marginTop:m.additionalTextMarginTop.valuePx(l)}}),e.recurringBillInstances!=null&&e.recurringBillInstances.length>0?t.jsx(yi,{style:{paddingLeft:m.recurringSchedulePaddingLeft.valuePx(l)},children:t.jsx(sa,{onAttachmentClick:Me,currencySymbol:e.transactionDetails?.recipientTotalAmount.currencySymbol??ft.currencySymbol,recurringBillInstances:e.recurringBillInstances})}):null]})})]}):null]})]}),e.transactionDetails&&e.transactionDetails.id&&t.jsx(da,{amount:fn,activities:e.billActivities,stage:w?.code??"draft",onAddNewRule:Jt,entity:"bill_pay",realTimeApproval:{allApprovers:e.filteredApprovers,filteredAttributes:e.filteredAttributes,isRealTimeApproverEditMode:e.realTimeApproval.isEditMode,realTimeApprovalSaveStatus:{fetchState:e.realTimeApproval.fetchState,error:e.realTimeApproval.error},approvalListFetchState:e.approverListFetchState.fetchState,allAccountingClass:e.allAccountingClasses,vendorOwnerId:e.vendorOwnerId??"",isAdmin:_t,signedInUserId:oe?.userId,showRealTimeApproval:Wt,entityApprovalId:e.billActivities[0]?.entityApprovalId??e.transactionDetails.entityApprovalId,updateEditMode:Yt,onSaveRealTimeApprovals:Qt},historicActivities:e.billHistory.activities}),t.jsx(pi,{})]}),e.transactionDetails?.vendor!=null&&!ue&&!e.transactionDetails.isDeleted?t.jsx(ca,{separatorStyle:{marginRight:a.sp4},showPrimaryButton:G||g,showCancel:!G&&g,cancelBtn:{label:it?n.buttons.reject:n.buttons.rejectBill,isLoading:Ze==="rejected"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:Ln,style:{width:m.footerButtonWidth.value(l)},reverseSpinnerColor:!1},primaryBtn:{label:_a(G,it),isLoading:Ze==="approved"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:G?lt:()=>{W!=null?Y(!0):ot()},isDisabled:e.billSaveStatus==="In-Progress"||e.approvalUpdateStatus.fetchState==="In-Progress"||e.realTimeApproval.isEditMode===!0,style:{width:G?"auto":m.footerButtonWidth.value(l)}},rightSideComponent:t.jsx(Va,{children:t.jsxs(Ya,{windowSize:l,children:[!X&&Fe?t.jsx(bt,{onClickAway:()=>{re(!1),ce(!1)},children:t.jsxs($t,{windowSize:l,"data-testid":b("bill-actions-container"),children:[_!=="processing"&&nt?t.jsx(Z,{onClick:mn,"data-testid":b("delete-bill-action-item"),children:n.buttons.deleteBill}):null,_==="processing"&&!B?t.jsx(Z,{onClick:un,"data-testid":b("cancel-bill-action-item"),children:n.buttons.cancel}):null,_==="processing"&&at?t.jsx(Z,{onClick:yn,"data-testid":b("cancel-and-delete-bill-action-item"),children:n.buttons.cancelAndDelete}):null,g&&O&&Se?t.jsx(Z,{onClick:Rn,"data-testid":b("mark-as-paid-action-item"),children:n.paymentOutsideZeni.markAsPaid}):null]})}):null,Oe?t.jsx(bt,{onClickAway:()=>{re(!1),ce(!1)},children:t.jsxs($t,{windowSize:l,"data-testid":b("bill-actions-with-zeni-assist-container"),children:[xe?t.jsx(Z,{onClick:()=>{M.trackRetryClick(D?.code??"",w?.code??"",F?.description??"",B?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),en()},"data-testid":b("retry-bill-action-item"),children:n.buttons.retry}):null,fe?t.jsx(Z,{onClick:hn,"data-testid":b("refund-bill-action-item"),children:n.buttons.refund}):null]})}):null,t.jsxs(qa,{windowSize:l,children:[Sn===!0?t.jsx(Te,{enterDelay:600,style:{color:le.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:we?n.zeniAssist.tooltip:n.zeniAssist.connectToTeamTooltip,placement:"top",maxWidth:"267px",children:t.jsx(jt,{windowSize:l,showEditIcon:ge,isIconClickable:we,"data-testid":b("other-actions-icon-container"),children:we?t.jsx(xn,{}):t.jsx(Ha,{})})}):null,!X&&ge===!0?t.jsx(Te,{enterDelay:600,style:{color:le.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:La,placement:"top",children:t.jsx(Xa,{onClick:qe,"data-testid":b("edit-bill-icon-container"),children:t.jsx(Ja,{})})}):null,!X&&Pn===!0&&Bn?t.jsx(Te,{enterDelay:600,style:{color:le.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:Na,placement:"top",children:t.jsx(jt,{windowSize:l,showEditIcon:ge,isIconClickable:!0,"data-testid":b("more-details-icon-container"),children:t.jsx(Ua,{onClick:()=>re(!Fe)})})}):null]})]})}),style:{minHeight:62}}):null]}),f?t.jsx(Sa,{id:v,children:t.jsx(pa,{isDrawerOpen:on,allowComposer:!0,drawerTitle:Fa,threads:H,filter:T,autoExpand:!0,autoFocus:!1,isLoading:P,textOverrides:{composerPlaceholder:vt.addANewComment,replyComposerPlaceholder:vt.replyAComment,threadResolve:Dt.resolveComment,threadUnResolve:Dt.unResolveComment},threadMetadata:Nn,onThreadClick:rn,onCloseAllThreadsDrawer:()=>U(!1),drawerSectionStyle:{width:l==="small"?"100%":"400px",boxSizing:l==="small"?"border-box":"content-box",padding:`${a.sp0} ${m.drawerSectionPaddingLeftRight.valuePx(l)}`,backgroundColor:Le.colors.background},collapsibleThreadStyle:{width:l==="small"?"100%":"360px"}})}):null]})},Oa=(e,x)=>{const g=e?.code;if(e!=null&&g!=null)return x?.isDeleted===!0?{value:ke.tabsById.deleted,color:L.deleted.color,bgColor:L.deleted.bgColor,borderColor:L.deleted.borderColor,code:"deleted"}:g==="pending_approval"&&x?.dueDate?.isBefore(E.dateNow(),"date")===!0?{value:ke.tabsById.overdue,color:L.overdue.color,bgColor:L.overdue.bgColor,borderColor:L.overdue.borderColor}:{value:e.name,color:L[g].color,bgColor:L[g].bgColor,borderColor:L[g].borderColor}},Ea=(e,x)=>{const g=x.transactionDetails?.recipientTotalAmount;return t.jsxs(hi,{windowSize:e,children:[t.jsxs(Bt,{windowSize:e,children:[t.jsx(zt,{children:n.zeniAssist.accountNumber}),t.jsx(Rt,{children:x.withdrawFrom!=null?Lt(x.withdrawFrom,e):d})]}),t.jsxs(Bt,{windowSize:e,children:[t.jsx(zt,{children:n.zeniAssist.amount}),t.jsx(Rt,{children:g!=null?Ae("0,0[.]00",g):C})]})]})},_a=(e,x)=>e?n.paymentOutsideZeni.markAsPaid:x?n.buttons.approve:n.buttons.approveBill,Wa=e=>{const x=e.paymentMode,g=n.paymentOutsideZeni.offline;if(x==null||x==="other")return g;const K=n.paymentOutsideZeni.paymentModeOptions.find(oe=>oe.value===x)?.label;return`${g} ${Ma} ${K}`},Za=(e,x,g)=>{if(e)return t.jsx(gt,{variant:"warning",style:{marginTop:a.sp5,marginBottom:a.sp3},title:wt.duplicateWarning.title,description:wt.duplicateWarning.description});if(g!=null){const K=`${x.withdrawFrom?.label??""} ${x.withdrawFrom?.maskedAccountNumber??""}`;return t.jsx(gt,{variant:"low-balance",style:{marginTop:a.sp2,marginBottom:a.sp3},title:`${Et.lowBalanceIn.replace("__account__",K)}`,description:g.replace("Low balance! ","")})}else return null},Ka=i.div``,Ga=i.div``,Va=i.div`
1
+ import{q as Fn,ax as En,d as _n,gu as Wn,gv as Zn,gw as Kn,gx as Vn,cs as Gn,aP as Un,F as Xn,y as u,j as t,l as E,fl as st,fm as Hn,o as a,fn as qn,fo as Jn,aM as b,fp as Yn,aN as Ae,fq as Qn,bG as dt,bt as ct,dO as pt,cE as mt,cF as ut,cG as yt,gy as ea,gz as ta,gA as na,gB as aa,fv as $,fw as I,fx as A,gC as k,fu as ia,b as ht,p as le,fy as Lt,fz as la,fA as oa,fB as ra,gD as sa,gE as da,aQ as ca,ap as bt,c6 as Te,gF as pa,gG as L,u as r,aj as ma,ch as ua,gH as ya,L as ha,gI as ba,gJ as gt,fF as xt,B as ga,di as xa,cx as fa,b7 as wa,b9 as Ta,c as va,c8 as Ot,gK as Da,ai as Ft,aY as ja,b5 as $a,by as Ia,f3 as Aa,am as ka}from"./index-CN7UAWAg.js";import{b as p,n as i}from"./vendor-Bs1fkIUX.js";import{_ as Sa}from"./liveblocks-8ht9CoL5.js";import{o as Ca,t as Pa}from"./LowBalancePopup-DzqqMGEK-DvUWGZSI.js";import"./mui-Ty75qFQF.js";import"./analytics-BbBRZ6cw.js";import"./routing-Dk1A2KYI.js";import"./sentry-BE5FTzpq.js";import"./redux-CEhZD0hA.js";import"./crypto-CK1x27Ua.js";const Ba=e=>p.createElement("svg",{xmlns:"http://www.w3.org/2000/svg",viewBox:"0 0 32 32",...e},p.createElement("g",{id:"Layer_1"},p.createElement("path",{fill:"none",stroke:"#757d7e",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round",d:"M4.4,30.6l6-5.9c1,.6,2.1.9,3.3,1,1.1.1,2.3,0,3.4-.4,1.1-.4,2.1-.9,2.9-1.7.9-.8,1.5-1.7,2-2.7,0-.1,0-.2,0-.4,0-.1,0-.2-.1-.3,0-.1-.2-.2-.3-.2-.1,0-.2,0-.4,0h-4.6c-.8,0-1.6-.3-2.1-.9-.6-.6-.9-1.3-.9-2.1s.3-1.5.9-2.1c.6-.6,1.3-.9,2.1-.9h3.8c.1,0,.3,0,.4-.1s.2-.2.3-.3c0-.1,0-.3,0-.4,0-.1,0-.3-.1-.4-1.3-1.6-3.1-2.7-5.2-3.1-2.1-.4-4.2,0-5.9,1.2-1.8,1.1-3,2.8-3.5,4.8s-.2,4.1.8,5.9l-6.1,5.7,3.3,3.3Z"})),p.createElement("g",{id:"Layer_2"},p.createElement("g",null,p.createElement("path",{fill:"#c27419",stroke:"#f3f7f7",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",d:"M31,8c0,1.9-.7,3.8-2.1,5.1-1.3,1.4-3.2,2.2-5.1,2.2-.9,0-1.9-.2-2.7-.5-.9-.3-1.7-.9-2.3-1.5-.7-.7-1.2-1.4-1.6-2.3-.4-.9-.6-1.8-.6-2.7,0-1.9.7-3.8,2.1-5.1,1.3-1.4,3.2-2.2,5.1-2.2.9,0,1.9.2,2.7.5.9.3,1.7.9,2.3,1.5.7.7,1.2,1.4,1.6,2.3.4.9.6,1.8.6,2.7Z"}),p.createElement("path",{fill:"none",stroke:"#f3f7f7",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",d:"M23.8,9.4v-4.6"}),p.createElement("path",{fill:"none",stroke:"#f3f7f7",strokeWidth:1.2,strokeLinecap:"round",strokeLinejoin:"round",d:"M23.8,11.4s0,0,0,0c0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,.1,0,0,0,0,.1,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0-.1,0,0,0,0-.1,0h0"})))),za={formTitle:new ga("h6Medium","h5Medium")},m={containerPaddingLeft:new u(r[3],r[6],r[6]),containerPaddingRight:new u(r[3],r[6],r[8]),marginBottom:new u(r[3],r[3]),labelWidth:new u(120,160,160),formTitlePaddingLeftRight:new u(30,0),marginTop:new u(r[1],0),rightIconsGap:new u(r[4],r[5]),closeContainerMarginTop:new u(r[1],0),formTitleMarginTopBottom:new u(0,0),footerButtonWidth:new u(120,120,120,165,165),right:new u(r[3],r[0]),actionsContainerRight:new u(r[0],r[3],r[3],r[6],r[6]),otherActionsIconContainerMarginLeft:new u(r[5],r[4],r[4],r[5]),otherActionsContainerBottom:new u(58,44),iconContainerMarginTop:new u(2,r[1]),recurringSchedulePaddingLeft:new u(r[2],0),paddingRight:new u(r[2],r[3]),labelMarginRight:new u(r[0],r[3]),textPadding:new u(r[0],r[3]),additionalTextMarginTop:new u(-4,0),refundPopupWidth:new u(300,420,420),drawerSectionPaddingLeftRight:new u(r[4],r[5]),infoLabelPaddingRight:new u(r[3],r[3]),infoLabelMarginTop:new u(r[1],r[0]),navBarHeight:new u(0,0,r[8]),navBarContainerWidth:new u(100,58)},{dateFormat:Ra,common:{noText:C,strings:{empty:d},currency:ft,via:Ma,more:Na,edit:La},spendManagement:{billPay:{billDetails:n,billsByTabs:ke,bulkActions:wt,vendorCreation:Tt,insufficientFunds:Et}},collaboration:{threads:{placeholder:vt,tooltip:Dt,title:{comments:Oa}}}}=Xn.getLocalizedStrings(),ve=Ra.visual.MMMDCommaYYYYformat,Ai=({billDetails:e,currentTenant:x,showApproveRejectBtns:g,isShowDeletedBillsEnabled:K,signedInUser:oe,isAdmin:_t,isRealTimeApprovalEnabled:Wt,isInternationalPaymentShaVsOurEnabled:Zt,hasZeniAssistAccess:Kt,analytics:M,showMarkAsPaidButtonToCreator:V,showMarkAsPaidButtonToApprover:Se,isBillPayCommentingEnabled:Ce,isZeniUser:Vt,showBackButton:Pe=!0,isDetectInsufficientFundsEnabled:Gt,redirectToEditableBillScreen:Ut,redirectToBillsScreen:J,discardBillDetailsFromLocalStore:Be,deleteBill:Xt,cancelAndDeleteBill:ze,approveOrRejectBill:Re,onAddNewRule:Ht,onAttachmentClick:Me,saveBillDetails:qt,discardOutsideZeniPaymentData:Jt,onBackClick:Ne,updateEditRealTimeApproverClicked:Yt,onSaveRealTimeApprovals:Qt,onRetryPaymentClick:en,onRefundPaymentClick:tn})=>{const l=Fn(),o=En(),Le=_n(),[nn,G]=p.useState(!1),[Oe,re]=p.useState(!1),[se,de]=p.useState(!1),[Fe,ce]=p.useState(!1),[an,pe]=p.useState(!1),[Ee,Y]=p.useState(!1),h=e.transactionDetails?.id,ln=Vt?Wn:Zn,{requestToOpenThread:me,setRequestToOpenThread:_e,setOpenThread:Q}=p.useContext(ln),[on,U]=p.useState(!1),T={application:"dashboard",companyId:o.currentTenant?.companyId,tab:"bill",entityId:h,isGlobalComment:!1},{threads:X,isLoading:P}=Kn(T,"both",!1),f=Ce&&h!=null,We=p.useMemo(()=>h==null?[]:X.filter(c=>c.resolved===!1&&!c.id.includes(Vn)),[X,h]).length,v=`dashboard_${o.currentTenant?.companyId}`,rn=p.useCallback((c,y)=>{Q(y),U(!1)},[Q,U]);p.useEffect(()=>{me?.threadId!=null&&X.length>0&&!P&&(Q(me.threadId),_e(null))},[me,X,P,Q,_e]),Gn({componentName:"bill.details"});const[N,ee]=p.useState({title:"",description:"",primaryButtonText:"",secondaryButtonText:""}),[Ze,Ke]=p.useState("approved"),[sn,Ve]=p.useState(!1),[dn,Ge]=p.useState(!1),[Ue,Xe]=p.useState(!1),He=()=>Ve(!1),cn=()=>Ve(!0),qe=Un(e.zeniAssist?.refundStatus.fetchState),te=p.useCallback(()=>{J()},[J]);p.useEffect(()=>{(e.deleteStatus.fetchState==="Completed"||e.approvalUpdateStatus.fetchState==="Completed"||e.cancelAndDeleteStatus.fetchState==="Completed"||e.billSaveStatus==="Completed")&&(Be(),J())},[e,J,Be]),p.useEffect(()=>{qe==="In-Progress"&&(e.zeniAssist?.refundStatus.fetchState==="Completed"||e.zeniAssist?.refundStatus.fetchState==="Error")&&(de(!1),te())},[qe,e.zeniAssist?.refundStatus,te]);const w=e.transactionDetails?.billPayInfo.stage,ne=e.transactionDetails?.billPayInfo.billStatus,H=e.transactionDetails?.billPayInfo.billPaymentStatus,pn=e.transactionDetails?.billPayInfo.billPaymentRefundStatus,ue=w?.code==="paid",D=ue?w:ne?.code=="approved"&&H?.code?H:ne,S=Fa(D,e.transactionDetails),O=e.transactionDetails?.billPayInfo.isRefundInitiated===!0?pn:H?.code!=null&&(ne?.code=="approved"||H.code==="mark_as_paid")?H:ne,ye=e.transactionDetails?.vendor?.name,B=e.isRecurring,Je=()=>{e.transactionDetails?.id!=null&&Ut(e.transactionDetails?.id??"")},mn=()=>{ee({title:B?n.recurringBill.deleteRecurringTitle:n.deleteBillTitle,description:B?n.recurringBill.deleteRecurringAlertText:n.deleteAlertDescription,primaryButtonText:n.delete,secondaryButtonText:n.cancel}),G(!0)},un=()=>{ee({title:n.cancelBillTitle,description:n.cancelAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),G(!0)},yn=()=>{ee({title:B?n.recurringBill.cancelAndDeleteRecurringTitle:n.cancelAndDeleteBillTitle,description:B?n.recurringBill.cancelAndDeleteRecurringAlertText:n.cancelAndDeleteAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),G(!0)},hn=()=>{M.trackRefundClick(D?.code??"",w?.code??"",O?.description??"",B?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),ee({title:n.zeniAssist.refundTitle,description:n.zeniAssist.refundDescription,primaryButtonText:n.zeniAssist.proceed,secondaryButtonText:n.cancel}),de(!0)},bn={onOkClick:()=>{G(!1),N.primaryButtonText===n.delete?Xt?.(e.isRecurring):N.title===n.cancelBillTitle?ze?.(e.isRecurring):N.title===n.cancelAndDeleteBillTitle||N.title===n.recurringBill.cancelAndDeleteRecurringTitle?ze?.(e.isRecurring,!0):N.primaryButtonText===n.zeniAssist.proceed&&(M.trackRefundConfirmClick(D?.code??"",w?.code??"",O?.description??"",B?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),tn())},onCancelClick:()=>{G(!1),de(!1)}},gn={onOkClick:c=>{pe(!1),Re({billId:e.transactionDetails?.id??"",type:"rejected",description:c})},onCancelClick:()=>{pe(!1)}},xn=()=>{const[c]=ja("ZeniAssist");return c!=null?t.jsx($a,{"data-testid":b("bill-details-zeni-assist-icon",h),onClick:()=>{ce(!Fe),M.trackZeniAssistClick(D?.code??"",w?.code??"",O?.description??"",B?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"")},style:{width:`${a.sp5}`,height:`${a.sp5}`,marginBottom:`${a.sp2}`},animationData:c,loop:!0,play:!0,rendererSettings:{preserveAspectRatio:"xMidYMid slice"}}):null},ae={invoiceNumber:e.transactionDetails?.documentId??"",invoiceDate:e.transactionDetails?.date,billDueDate:e.transactionDetails?.dueDate,memo:e.transactionDetails?.memo,currencyCode:e.vendorCurrency??ft.currencyCode},he=e.transactionDetails?.lines?.map((c,y)=>{const z=c;return{lineIndex:y,lineId:z.id,account:z.account,class:z.class,amount:z.amount.amount,billable:z.billable,customer:z.customer,lineDescription:z.lineDescription,recipientAmount:z.recipientAmount?.amount}})??[],fn=e.transactionDetails?.recipientTotalAmount.amount??0,be=e.transactionDetails?.recipientTotalAmount,s={paymentType:e.paymentMethodType,paymentDate:e.transactionDetails?.billPayInfo.paymentDate,internationalTransferFeeBearerPaymentMethod:e.transactionDetails?.billPayInfo.internationalTransferFeeBearerPaymentMethod,paymentToBankAccount:e.bankAccount,paymentToPI:e.paymentInstrument},j=m.labelWidth.value(l),wn=c=>c==="billable"||c==="has_been_billed"?n.yes:n.no,Tn=s.paymentToBankAccount?.bankAccountNumber?s.paymentToBankAccount?.bankAccountNumber?.slice(s.paymentToBankAccount?.bankAccountNumber?.length-4):s.paymentType?.method?.includes("international")&&s.paymentToBankAccount?.bankAccountIban?s.paymentToBankAccount?.bankAccountIban?.slice(s.paymentToBankAccount?.bankAccountIban.length-4):"",vn=s.paymentToBankAccount?.bankAccountName!=null&&s.paymentToBankAccount?.bankAccountName!=""?s.paymentToBankAccount?.bankAccountName:`${e.transactionDetails?.vendor?.name} - ${s.paymentToBankAccount?.bankName} XXXX${Tn}`,Dn=e.transactionDetails?.billPayInfo?.isCollectToAccountInfoFromVendorContact?t.jsxs(t.Fragment,{children:[`${n.magicLink.collectFrom} ${e.transactionDetails?.billPayInfo?.toAccountVendorEmail}`,t.jsx(ui,{windowSize:l,children:t.jsx(mi,{})})]}):void 0,Ye=e.transactionDetails?.date!=null&&e.transactionDetails.bookCloseDate!=null&&e.transactionDetails.date.isBefore(e.transactionDetails.bookCloseDate),jn=()=>`${Tt.achDetails.bankRoutingNumber} ${s?.paymentToBankAccount?.bankRoutingNumberAch}, ${s?.paymentToBankAccount?.bankName}
2
+ ${Tt.achDetails.bankAccountNumber} ${s?.paymentToBankAccount?.bankAccountNumber}`,ie=e.transactionDetails?.billPayInfo!=null?E.getActualPaymentDate(e.transactionDetails?.billPayInfo):void 0,$n=ie!=null&&e.paymentMethodType?.maxPeriod?.value!=null?E.zeniDate(E.getNextNthWorkingDay(ie?.toDate(),[0,6],e.paymentMethodType?.maxPeriod.value).toDateString()):void 0,Qe=e.transactionDetails?.billPayInfo.expectedDepositDate??$n,et=st(s?.paymentType?.method??"").replace("Same Day",""),In=(s?.paymentToBankAccount!=null||s?.paymentToPI)!=null?n.addedByZeni:e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact?t.jsx(Hn,{paymentTypeLabel:et,onClick:cn,style:{marginTop:`${l==="small"?a.sp2:a.sp0}`}}):void 0,An=()=>s?.paymentToBankAccount==null&&s?.paymentToPI==null&&s?.paymentType?.method!=null&&e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact&&e.transactionDetails?.billPayInfo.paymentDate!=null?t.jsx(Da,{paymentType:s?.paymentType?.method,paymentDate:e.transactionDetails?.billPayInfo.paymentDate}):null,tt=e.transactionDetails?.lines?.some(c=>{const y=c.account;return y?.isDeleted===!0&&y?.isBillEditableCoaAccountType===!1})??!1,ge=!(D?.code==="processing"||e.transactionDetails?.billPayInfo.isRefundInitiated===!0||e.transactionDetails?.billPayInfo.isRefundComplete===!0||(w?.code==="scheduled"||w?.code==="pending_approval")&&tt),nt=!((w?.code==="scheduled"||w?.code==="pending_approval")&&tt),xe=e.zeniAssist?.isEligibleForRetryIBT===!0||e.zeniAssist?.isEligibleForRetryOBP===!0,fe=e.zeniAssist?.isEligibleForRefund===!0,kn=e?.transactionDetails?.billPayInfo.billPaymentMethodType.code==="wire"&&e?.transactionDetails?.billPayInfo.billPaymentMethodType.subCode==="international",Sn=Kt&&e.transactionDetails?.billPayInfo.billPaymentStatus.code!=null&&["failed","cancelled","returned"].includes(e.transactionDetails.billPayInfo.billPaymentStatus.code)&&(xe||fe)&&kn===!1,we=xe||fe,Cn=e.transactionDetails?.billPayInfo.isRefundInitiated===!0&&e.transactionDetails?.billPayInfo.isRefundComplete===!1,_=D?.code,Pn=!Cn&&(!Ye||D?.code==="processing"&&!B),at=!Ye,it=["small","medium-compact","medium-regular"].includes(l),q=E.isBulkProcessing(e.transactionDetails?.bulkProcessingDetail?.type),F=E.isPaymentMethodOutsideZeni(e.paymentMethodType?.method),Bn=!q&&(_!=="processing"&&nt||_==="processing"&&!B||_==="processing"&&at||g&&F&&Se),zn=c=>{M.trackBillPayMarkAsPaidSubmit(c.paymentMode??"other",w?.code??"",D?.code??""),qt(!0,Ue,c)},lt=()=>{Ge(!0),M.trackBillPayMarkAsPaid(w?.code??"",D?.code??"")},Rn=()=>{Xe(!0),lt()},Mn=()=>{Jt(),Ge(!1),Ue&&Xe(!1)},Nn=p.useMemo(()=>({companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,entityType:"bill.details",entityId:h??d,isGlobalComment:!1,application:"dashboard",tab:"bill",url:window.location.href}),[o.currentTenant,h]),W=Gt&&e.transactionDetails?.totalAmountWithFeesInUSD!=null&&w?.code!=="paid"&&D?.code!=="failed"&&D?.code!=="processing"&&D?.code!=="cancelled"&&D?.code!=="returned"&&D?.code!=="rejected"?qn(e.transactionDetails?.totalAmountWithFeesInUSD,e.withdrawFrom,s.paymentDate):void 0,ot=()=>{Ke("approved"),Ee===!0&&Y(!1),W!=null&&M.trackLowBalanceAccountApprove(w?.code??"",e.transactionDetails?.billPayInfo.billPaymentStatus.code??"",e.isRecurring?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"",xt(o.loggedInUser),e.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account"),Re({billId:e.transactionDetails?.id??"",type:"approved"})},Ln=()=>{Ke("rejected"),W!=null&&M.trackLowBalanceAccountReject(w?.code??"",e.transactionDetails?.billPayInfo.billPaymentStatus.code??"",e.isRecurring?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"",xt(o.loggedInUser),e.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account"),pe(!0)},rt=p.useRef(null);return t.jsxs(Qa,{windowSize:l,ref:rt,children:[t.jsx(Jn,{anchor:"right",open:sn,onClose:He,transitionDuration:250,"data-testid":b("vendor-email-preview-drawer"),children:t.jsx(Yn,{companyName:Qn(x.company?.companyInfo),vendor:e.transactionDetails?.vendor?.name,paymentDate:s.paymentDate?.format(ve)??"",paymentType:et,amount:Ae("0,0.[00]",be),isInvoiceAttached:!!e.transactionDetails?.attachments?.length,onClose:He})}),t.jsxs(ai,{windowSize:l,children:[t.jsx(bi,{windowSize:l,children:l==="small"?t.jsx(dt,{"data-testid":b("bill-detail-nav-bar-mobile"),title:t.jsxs(t.Fragment,{children:[ye,e.isRecurring?t.jsx(Ie,{width:a.sp4,height:a.sp4}):null]}),backgroundColor:Le.colors.grey4,rightSideComponent:t.jsxs(St,{windowSize:l,children:[f?t.jsxs(Mt,{isDisabled:P,"data-testid":b("bill-comment-button"),onClick:P?()=>null:c=>{c.preventDefault(),c.stopPropagation(),U(!0),M.trackCommentActivity("bill","clicked",o.currentTenant?.companyName??"",o.controllersList.controllers.map(y=>pt(y)),void 0,void 0,"page icon")},children:[t.jsx(ct,{count:P?void 0:We,isLoading:P,style:{left:"12px"}}),t.jsx(Nt,{})]}):null,t.jsx(Ct,{onClick:()=>te(),"data-testid":b("bill-detail-nav-bar-small-close-button"),children:t.jsx(kt,{})})]}),leftSideComponent:t.jsx(At,{windowSize:l,onClick:Ne,"data-testid":b("bill-detail-nav-bar-small-back-button"),style:{visibility:`${Pe?"visible":"hidden"}`},children:t.jsx(It,{})}),source:"BillDetailPage"}):t.jsx(dt,{"data-testid":b("bill-detail-nav-bar"),title:t.jsxs(t.Fragment,{children:[ye,e.isRecurring?t.jsx(Ie,{width:a.sp4,height:a.sp4}):null]}),rightSideComponent:t.jsxs(St,{windowSize:l,children:[f?t.jsxs(Mt,{isDisabled:P,"data-testid":b("bill-comment-button"),onClick:P?()=>null:c=>{c.preventDefault(),c.stopPropagation(),U(!0),M.trackCommentActivity("bill","clicked",o.currentTenant?.companyName??"",o.controllersList.controllers.map(y=>pt(y)),void 0,void 0,"page icon")},children:[t.jsx(ct,{count:P?void 0:We,isLoading:P,style:{left:"12px"}}),t.jsx(Nt,{})]}):null,t.jsx(Ct,{onClick:()=>te(),"data-testid":b("bill-detail-nav-bar-close-button"),children:t.jsx(kt,{})})]}),leftSideComponent:t.jsx(At,{windowSize:l,onClick:Ne,"data-testid":b("bill-detail-nav-bar-back-button"),style:{visibility:`${Pe?"visible":"hidden"}`},children:t.jsx(It,{})}),enableTitleOnScroll:!0,scrollableContent:rt,source:"BillDetailPage"})}),t.jsxs(ii,{windowSize:l,children:[Ee?t.jsx(Ca,{withdrawFrom:e.withdrawFrom,paymentDate:e?.transactionDetails?.billPayInfo.paymentDate,onOkClick:ot,onCancelClick:()=>{Y(!1),Je()},onClickAway:()=>{Y(!1)}}):null,dn?t.jsx(Pa,{onCancel:Mn,onProceedForMarkAsPaid:zn,saveDetailsFetchState:e.billSaveStatus,paymentData:e.outsideZeniPaymentInfo}):null,nn||se?t.jsx(mt,{titleComponent:t.jsx(yt,{children:N.title}),descriptionComponent:t.jsx(ut,{children:N.description}),primaryButtonText:N.primaryButtonText,proceedButtonVariant:se?"primary":"danger",secondaryButtonText:N.secondaryButtonText,action:bn,isEditPopup:!0,isLoading:e.zeniAssist?.refundStatus.fetchState==="In-Progress",children:se?Ea(l,e):null}):null,an?t.jsx(mt,{titleComponent:t.jsx(yt,{children:n.rejectBillTitlePrefix+" "+(e.transactionDetails?.vendor?.name!=null?e.transactionDetails.vendor.name:"")}),descriptionComponent:t.jsx(ut,{children:n.rejectBillDescription}),primaryButtonText:n.send,secondaryButtonText:n.cancel,action:gn,isEditPopup:!0,isNotesIncluded:!0,notesPlaceholder:n.rejectBillReasonPlaceholder}):null,l!=="small"||S?t.jsxs(oi,{windowSize:l,children:[l!=="small"?t.jsxs(ri,{windowSize:l,children:[ye,e.isRecurring?t.jsx(Ie,{height:a.sp5,width:a.sp5}):null]}):null,K&&S!=null&&S.code==="deleted"?t.jsx(Pt,{color:S.color,bgColor:S.bgColor,borderColor:S.borderColor,children:S.value}):S?.value===ke.tabsById.overdue?t.jsx(Pt,{color:S.color,bgColor:S.bgColor,borderColor:S.borderColor,children:S.value}):null]}):null,O!=null&&O.code?l==="small"?t.jsx(ea,{progressSectionObj:O,createDate:e.transactionDetails?.createTime,paymentDate:Qe,scheduleDate:ie,approvedDate:e.latestApprovedDate,isFrozen:e.transactionDetails?.isDeleted}):t.jsx(ta,{progressSectionObj:O,createDate:e.transactionDetails?.createTime,paymentDate:Qe,scheduleDate:ie,approvedDate:e.latestApprovedDate,isFrozen:e.transactionDetails?.isDeleted}):null,Za(q,e,W),t.jsx(na,{sectionId:aa,currentVendorOption:{defaultOptions:[]},billId:h,isBillPayCommentingEnabled:Ce,isBillPaid:ue,disableVendorActions:!0,vendor:e.transactionDetails?.vendor,prevBills:e.previousBills,onAttachmentClick:Me,isVendorRecommendationEnabled:!1,showVendorGptRecommendationText:!1}),s.paymentType?.method?.includes("ach"),t.jsxs(je,{children:[t.jsx($e,{children:n.whatForTitle}),t.jsxs(De,{children:[t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"invoiceNumber"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("invoiceNumber")}`},children:t.jsx(k,{label:{label:n.invoiceNumber,width:j},text:ae.invoiceNumber??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"invoiceDate"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("invoiceDate")}`},children:t.jsx(k,{label:{label:n.invoiceDate,width:j},text:ae.invoiceDate?.format(ve)??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"billDueDate"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("billDueDate")}`},children:t.jsx(k,{label:{label:n.billDueDate,width:j},text:ae.billDueDate?.format(ve)??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"memo"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("memo")}`},children:t.jsx(k,{label:{label:n.memo,width:j},text:ae.memo??C,style:{width:"auto"}})})]})]}),t.jsxs(je,{children:[t.jsx(li,{windowSize:l,children:t.jsx($e,{children:n.lineItemsTitle})}),he.length>0?he.map((c,y)=>{const z=e?.transactionDetails?.lines?.find(On=>On.id===c.lineId)?.recipientAmount;return t.jsxs(ei,{children:[he.length>1?t.jsx(ti,{windowSize:l,children:t.jsx(ni,{windowSize:l,children:`${n.line} # ${y+1}`})}):null,t.jsxs(De,{children:[t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.recipientAmount`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("recipientAmount",y)}`},children:t.jsx(k,{label:{label:n.amount,width:j},text:z!=null?Ae("0,0[.]00",z):C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.lineDescription`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("lineDescription",y)}`},children:t.jsx(k,{label:{label:n.description,width:j},text:c.lineDescription??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.account`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("account",y)}`},children:t.jsx(k,{label:{label:n.category,width:j},text:c.account?.accountName??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.class`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("class",y)}`},children:t.jsx(k,{label:{label:n.class,width:j},text:c.class?.className??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.billable`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("billable",y)}`},children:t.jsx(k,{label:{label:n.billable,width:j},text:c.billable!=null?wn(c.billable):C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.customer`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("customer",y)}`},children:t.jsx(k,{label:{label:n.customer,width:j},text:c.customer?.name??C,style:{width:"auto"}})})]})]},y)}):null]}),t.jsxs(si,{windowSize:l,children:[t.jsx(di,{children:n.total}),t.jsx(ci,{children:be!=null?t.jsx(ia,{amount:be,integerStyles:ht.h6Medium.cssObject,decimalStyles:ht.standardMedium.cssObject}):C})]}),t.jsxs(je,{children:[t.jsx($e,{children:n.paymentDetailsTitle}),t.jsxs(De,{children:[F?null:t.jsxs(t.Fragment,{children:[t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"withdrawFrom"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("withdrawFrom")}`},children:t.jsx(k,{label:{label:n.withdrawFrom,width:j},text:e.withdrawFrom!=null?Lt(e.withdrawFrom,l):d,style:{width:"auto"},additionalInfoLabelStyles:{textAlign:"right",paddingRight:m.infoLabelPaddingRight.valuePx(l),marginTop:m.infoLabelMarginTop.valuePx(l),color:le.brandColorGoldDark},additionalInfoLabel:W!=null&&w?.code==="pending_approval"?Et.addMoney:W})}),t.jsx(R,{})]}),t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"paymentType"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("paymentType")}`},children:t.jsx(k,{additionalInfoLabel:s.paymentType?.method!=null&&s.paymentType.method.includes(E.NEW_INTERNATIONAL_METHOD_SUBTEXT)&&Zt&&s.internationalTransferFeeBearerPaymentMethod!=null?t.jsx(Va,{children:la(s.internationalTransferFeeBearerPaymentMethod)}):void 0,label:{label:n.paymentMethod,width:j},text:F&&e.outsideZeniPaymentInfo!=null?Wa(e.outsideZeniPaymentInfo):st(s.paymentType?.method??""),style:{width:"auto"}})}),F?null:t.jsxs(t.Fragment,{children:[t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"paymentTo"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("paymentTo")}`},children:t.jsxs(t.Fragment,{children:[t.jsx(k,{label:{label:n.paymentTo,width:j},text:s.paymentToBankAccount!=null?vn:s.paymentToPI!=null?s.paymentToPI.displayText:Dn,style:{width:"auto"},showEyeIcon:s.paymentToBankAccount!=null&&!!s.paymentType?.method?.includes("ach"),showAdditionalInfoLabel:!!e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact||s.paymentType?.method?.includes("ach"),tooltipText:jn(),additionalInfoLabel:t.jsx(Ka,{children:In})}),An()]})})]}),F||e.isRecurring?t.jsxs(t.Fragment,{children:[t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"recurringPaymentType"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${I("recurringPaymentType")}`},children:t.jsxs(t.Fragment,{children:[t.jsx(k,{label:{label:n.paymentType,width:j},labelStyles:{marginRight:m.labelMarginRight.valuePx(l)},style:{width:"auto"},text:ra(e.isRecurring,F,e.transactionDetails?.recurringBillInstance??1,e.recurringBillConfigDetail?.totalPaymentCycles??0),textStyles:{paddingLeft:m.textPadding.valuePx(l),paddingRight:m.textPadding.valuePx(l)},additionalInfoLabel:oa(l,e.isRecurring,F,e.recurringBillConfigDetail),additionalInfoLabelStyles:{paddingRight:m.paddingRight.valuePx(l),marginTop:m.additionalTextMarginTop.valuePx(l)}}),e.recurringBillInstances!=null&&e.recurringBillInstances.length>0?t.jsx(yi,{style:{paddingLeft:m.recurringSchedulePaddingLeft.valuePx(l)},children:t.jsx(sa,{onAttachmentClick:Me,currencySymbol:e.transactionDetails?.recipientTotalAmount.currencySymbol??ft.currencySymbol,recurringBillInstances:e.recurringBillInstances})}):null]})})]}):null]})]}),e.transactionDetails&&e.transactionDetails.id&&t.jsx(da,{amount:fn,activities:e.billActivities,stage:w?.code??"draft",onAddNewRule:Ht,entity:"bill_pay",realTimeApproval:{allApprovers:e.filteredApprovers,filteredAttributes:e.filteredAttributes,isRealTimeApproverEditMode:e.realTimeApproval.isEditMode,realTimeApprovalSaveStatus:{fetchState:e.realTimeApproval.fetchState,error:e.realTimeApproval.error},approvalListFetchState:e.approverListFetchState.fetchState,allAccountingClass:e.allAccountingClasses,vendorOwnerId:e.vendorOwnerId??"",isAdmin:_t,signedInUserId:oe?.userId,showRealTimeApproval:Wt,entityApprovalId:e.billActivities[0]?.entityApprovalId??e.transactionDetails.entityApprovalId,updateEditMode:Yt,onSaveRealTimeApprovals:Qt},historicActivities:e.billHistory.activities}),t.jsx(pi,{})]}),e.transactionDetails?.vendor!=null&&!ue&&!e.transactionDetails.isDeleted?t.jsx(ca,{separatorStyle:{marginRight:a.sp4},showPrimaryButton:V||g,showCancel:!V&&g,cancelBtn:{label:it?n.buttons.reject:n.buttons.rejectBill,isLoading:Ze==="rejected"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:Ln,style:{width:m.footerButtonWidth.value(l)},reverseSpinnerColor:!1},primaryBtn:{label:_a(V,it),isLoading:Ze==="approved"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:V?lt:()=>{W!=null?Y(!0):ot()},isDisabled:e.billSaveStatus==="In-Progress"||e.approvalUpdateStatus.fetchState==="In-Progress"||e.realTimeApproval.isEditMode===!0,style:{width:V?"auto":m.footerButtonWidth.value(l)}},rightSideComponent:t.jsx(Ga,{children:t.jsxs(Ya,{windowSize:l,children:[!q&&Oe?t.jsx(bt,{onClickAway:()=>{re(!1),ce(!1)},children:t.jsxs($t,{windowSize:l,"data-testid":b("bill-actions-container"),children:[_!=="processing"&&nt?t.jsx(Z,{onClick:mn,"data-testid":b("delete-bill-action-item"),children:n.buttons.deleteBill}):null,_==="processing"&&!B?t.jsx(Z,{onClick:un,"data-testid":b("cancel-bill-action-item"),children:n.buttons.cancel}):null,_==="processing"&&at?t.jsx(Z,{onClick:yn,"data-testid":b("cancel-and-delete-bill-action-item"),children:n.buttons.cancelAndDelete}):null,g&&F&&Se?t.jsx(Z,{onClick:Rn,"data-testid":b("mark-as-paid-action-item"),children:n.paymentOutsideZeni.markAsPaid}):null]})}):null,Fe?t.jsx(bt,{onClickAway:()=>{re(!1),ce(!1)},children:t.jsxs($t,{windowSize:l,"data-testid":b("bill-actions-with-zeni-assist-container"),children:[xe?t.jsx(Z,{onClick:()=>{M.trackRetryClick(D?.code??"",w?.code??"",O?.description??"",B?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),en()},"data-testid":b("retry-bill-action-item"),children:n.buttons.retry}):null,fe?t.jsx(Z,{onClick:hn,"data-testid":b("refund-bill-action-item"),children:n.buttons.refund}):null]})}):null,t.jsxs(Ja,{windowSize:l,children:[Sn===!0?t.jsx(Te,{enterDelay:600,style:{color:le.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:we?n.zeniAssist.tooltip:n.zeniAssist.connectToTeamTooltip,placement:"top",maxWidth:"267px",children:t.jsx(jt,{windowSize:l,showEditIcon:ge,isIconClickable:we,"data-testid":b("other-actions-icon-container"),children:we?t.jsx(xn,{}):t.jsx(Xa,{})})}):null,!q&&ge===!0?t.jsx(Te,{enterDelay:600,style:{color:le.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:La,placement:"top",children:t.jsx(qa,{onClick:Je,"data-testid":b("edit-bill-icon-container"),children:t.jsx(Ha,{})})}):null,!q&&Pn===!0&&Bn?t.jsx(Te,{enterDelay:600,style:{color:le.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:Na,placement:"top",children:t.jsx(jt,{windowSize:l,showEditIcon:ge,isIconClickable:!0,"data-testid":b("more-details-icon-container"),children:t.jsx(Ua,{onClick:()=>re(!Oe)})})}):null]})]})}),style:{minHeight:62}}):null]}),f?t.jsx(Sa,{id:v,children:t.jsx(pa,{isDrawerOpen:on,allowComposer:!0,drawerTitle:Oa,threads:X,filter:T,autoExpand:!0,autoFocus:!1,isLoading:P,textOverrides:{composerPlaceholder:vt.addANewComment,replyComposerPlaceholder:vt.replyAComment,threadResolve:Dt.resolveComment,threadUnResolve:Dt.unResolveComment},threadMetadata:Nn,onThreadClick:rn,onCloseAllThreadsDrawer:()=>U(!1),drawerSectionStyle:{width:l==="small"?"100%":"400px",boxSizing:l==="small"?"border-box":"content-box",padding:`${a.sp0} ${m.drawerSectionPaddingLeftRight.valuePx(l)}`,backgroundColor:Le.colors.background},collapsibleThreadStyle:{width:l==="small"?"100%":"360px"}})}):null]})},Fa=(e,x)=>{const g=e?.code;if(e!=null&&g!=null)return x?.isDeleted===!0?{value:ke.tabsById.deleted,color:L.deleted.color,bgColor:L.deleted.bgColor,borderColor:L.deleted.borderColor,code:"deleted"}:g==="pending_approval"&&x?.dueDate?.isBefore(E.dateNow(),"date")===!0?{value:ke.tabsById.overdue,color:L.overdue.color,bgColor:L.overdue.bgColor,borderColor:L.overdue.borderColor}:{value:e.name,color:L[g].color,bgColor:L[g].bgColor,borderColor:L[g].borderColor}},Ea=(e,x)=>{const g=x.transactionDetails?.recipientTotalAmount;return t.jsxs(hi,{windowSize:e,children:[t.jsxs(Bt,{windowSize:e,children:[t.jsx(zt,{children:n.zeniAssist.accountNumber}),t.jsx(Rt,{children:x.withdrawFrom!=null?Lt(x.withdrawFrom,e):d})]}),t.jsxs(Bt,{windowSize:e,children:[t.jsx(zt,{children:n.zeniAssist.amount}),t.jsx(Rt,{children:g!=null?Ae("0,0[.]00",g):C})]})]})},_a=(e,x)=>e?n.paymentOutsideZeni.markAsPaid:x?n.buttons.approve:n.buttons.approveBill,Wa=e=>{const x=e.paymentMode,g=n.paymentOutsideZeni.offline;if(x==null||x==="other")return g;const K=n.paymentOutsideZeni.paymentModeOptions.find(oe=>oe.value===x)?.label;return`${g} ${Ma} ${K}`},Za=(e,x,g)=>{if(e)return t.jsx(gt,{variant:"warning",style:{marginTop:a.sp5,marginBottom:a.sp3},title:wt.duplicateWarning.title,description:wt.duplicateWarning.description});if(g!=null){const K=`${x.withdrawFrom?.label??""} ${x.withdrawFrom?.maskedAccountNumber??""}`;return t.jsx(gt,{variant:"low-balance",style:{marginTop:a.sp2,marginBottom:a.sp3},title:`${Et.lowBalanceIn.replace("__account__",K)}`,description:g.replace("Low balance! ","")})}else return null},Ka=i.div``,Va=i.div``,Ga=i.div`
3
3
  display: flex;
4
4
  justify-content: flex-end;
5
5
  `,Ua=i(Aa)`
@@ -18,7 +18,7 @@ import{q as On,ax as En,d as _n,gu as Wn,gv as Zn,gw as Kn,gx as Gn,cs as Vn,aP
18
18
  &:hover {
19
19
  color: ${e=>e.theme.colors.primary};
20
20
  }
21
- `,Ha=i(Ba)`
21
+ `,Xa=i(Ba)`
22
22
  color: ${e=>e.theme.colors.hero};
23
23
  width: ${a.sp5};
24
24
  height: ${a.sp5};
@@ -26,7 +26,7 @@ import{q as On,ax as En,d as _n,gu as Wn,gv as Zn,gw as Kn,gx as Gn,cs as Vn,aP
26
26
  &:hover {
27
27
  color: ${e=>e.theme.colors.primary};
28
28
  }
29
- `,Ja=i(Ia)`
29
+ `,Ha=i(Ia)`
30
30
  cursor: pointer;
31
31
  color: ${e=>e.theme.colors.hero};
32
32
  width: ${a.sp4};
@@ -34,7 +34,7 @@ import{q as On,ax as En,d as _n,gu as Wn,gv as Zn,gw as Kn,gx as Gn,cs as Vn,aP
34
34
  &:hover {
35
35
  color: ${e=>e.theme.colors.primary};
36
36
  }
37
- `,Xa=i.div`
37
+ `,qa=i.div`
38
38
  display: flex;
39
39
  cursor: pointer;
40
40
  color: ${e=>e.theme.colors.grey1};
@@ -42,7 +42,7 @@ import{q as On,ax as En,d as _n,gu as Wn,gv as Zn,gw as Kn,gx as Gn,cs as Vn,aP
42
42
  &:hover {
43
43
  color: ${e=>e.theme.colors.primary};
44
44
  }
45
- `,qa=i.div`
45
+ `,Ja=i.div`
46
46
  display: flex;
47
47
  justify-content: center;
48
48
  align-items: center;
@@ -71,7 +71,7 @@ import{q as On,ax as En,d as _n,gu as Wn,gv as Zn,gw as Kn,gx as Gn,cs as Vn,aP
71
71
  right: ${e=>m.actionsContainerRight.valuePx(e.windowSize)};
72
72
  height: 100%;
73
73
  display: flex;
74
- `,Z=i(Ot)`
74
+ `,Z=i(Ft)`
75
75
  display: flex;
76
76
  align-items: center;
77
77
  width: 100%;
@@ -187,11 +187,11 @@ import{q as On,ax as En,d as _n,gu as Wn,gv as Zn,gw as Kn,gx as Gn,cs as Vn,aP
187
187
  border-radius: ${a.sp2};
188
188
  color: ${e=>e.theme.colors.hero};
189
189
  margin-bottom: ${e=>m.marginBottom.valuePx(e.windowSize)};
190
- `,di=i(Ft)`
190
+ `,di=i(Ot)`
191
191
  display: flex;
192
192
  width: 176px;
193
193
  color: ${e=>e.theme.colors.primary};
194
- `,ci=i(Ft)`
194
+ `,ci=i(Ot)`
195
195
  display: flex;
196
196
  width: calc(100% - 176px);
197
197
  justify-content: flex-end;
@@ -231,7 +231,7 @@ import{q as On,ax as En,d as _n,gu as Wn,gv as Zn,gw as Kn,gx as Gn,cs as Vn,aP
231
231
  display: flex;
232
232
  justify-content: space-between;
233
233
  width: ${e=>m.refundPopupWidth.valuePx(e.windowSize)};
234
- `,zt=i(Ot)`
234
+ `,zt=i(Ft)`
235
235
  text-align: left;
236
236
  color: ${e=>e.theme.colors.grey1};
237
237
  `,Rt=i(ka)`
@@ -1,4 +1,4 @@
1
- import{y as z,u as U,q as O,F as L,aa as G,aP as M,j as o,aJ as W,cT as J,bG as Q,ad as X,aQ as Z,o as c}from"./index-CUpJHznP.js";import{b as R,n as h}from"./vendor-Bs1fkIUX.js";import{b as H,f as K,l as j,o as D}from"./FollowStepsSection-jmyNE2Fl-CvBGwqtX.js";import"./mui-Ty75qFQF.js";import"./analytics-BbBRZ6cw.js";import"./routing-Dk1A2KYI.js";import"./sentry-BE5FTzpq.js";import"./redux-CEhZD0hA.js";import"./liveblocks-8ht9CoL5.js";import"./crypto-CK1x27Ua.js";const C="billPayApprovalRuleDetailPage",N="lowerBound",_="upperBound",y="steps",Y={footerPadding:new z(U[2],U[3])};function ve({localData:e,approvalUpdateActionType:t,onBackClick:a,onApprovalRuleDataUpdated:r,onResetClick:s,isLowerBoundDisabled:n=!1,isUpperBoundDisabled:b=!0,hideUpperBoundField:A=!1,onSaveRuleClick:E,onSaveRuleSuccess:S}){const P=O(),l=L.getLocalizedStrings().commonSetUp.approval,I=L.getLocalizedStrings().spendManagement.billPay.billPayApproval,x=ee(e,t==="approval_create"&&!n),v=G({mode:"all",reValidateMode:"onChange",defaultValues:x}),u=e.billPaySetupApproverViewUpdateData?.updateStatus,w=M(u?.fetchState),{upperBound:B}=x,{allApprovalRules:p,allAccountingClasses:k,billPaySetupApproverViewUpdateData:m}=e;let f=p.length>1?p.length-1:0,g=p.length>0?p[f].criteria[0].range.min.amount:0;if(m!=null&&m.type==="approval_update"&&m.data!=null){const{approvalRuleId:i}=m.data;f=p.findIndex(d=>d.approvalRuleId===i),g=f>0?p[f-1].criteria[0].range.min.amount:0}const F=v.handleSubmit(()=>{E()}),q=async(i,d)=>{r(d)};return R.useEffect(()=>{const i=v.watch((d,{name:$})=>{if($!=null&&d!=null){const V=W(d);J(()=>q($,V))}});return()=>{i.unsubscribe()}}),R.useEffect(()=>{w==="In-Progress"&&u?.fetchState==="Completed"&&S()},[w,u?.fetchState,S]),o.jsxs(re,{children:[o.jsx(Q,{title:t==="approval_create"?l.newApproval:l.editApproval,style:{zIndex:4},onBackClick:()=>{a()},source:"BillPayApprovalRuleDetailPage"}),o.jsx(se,{children:o.jsx(X,{...v,children:o.jsx("form",{id:T(C),onSubmit:F,children:o.jsxs(oe,{children:[o.jsx(H,{label:{label:A?I.amountPerBillGreaterLabel:I.amountPerBillLabel},firstText:{type:"number",name:N,placeholder:"$0",options:{required:!0,max:B===1/0?Number.MAX_SAFE_INTEGER-1:B-1,min:g,validate:i=>n?!0:i!=null&&i>g},isDisabled:n,additionalInfoLabel:l.firstRuleLowerBoundInfoLabel,additionalErrorLabel:l.firstRuleErrorInfoLabel},secondText:{type:"number",name:_,placeholder:"Infinity",isDisabled:b,hideField:A,additionalInfoLabel:l.upperBoundInfoLabel}}),o.jsx(ie,{}),o.jsx(K,{sectionId:y,label:{label:l.followStepsLabel},approversPlaceholder:l.approversPlaceholder,notifiersPlaceholder:l.notifiersPlaceholder,allUserWithRoles:e.allApprovers,filteredApprovers:e.filteredApprovers.map(i=>i.user),allAttributes:e.allAttributes,filteredAttributes:e.filteredAttributes,allAccountingClasses:k,stepsInfo:x[y],userSelectPlaceholder:l.userSelectPlaceholder,approveNotifyPlaceholder:l.approveNotifyPlaceholder,productType:"zeni_bill_pay"})]})})})}),o.jsx(Z,{formId:T(C),primaryBtn:{label:l.saveBtnText,isLoading:u?.fetchState==="In-Progress",isDisabled:u?.fetchState==="In-Progress",style:{width:"85px",minWidth:"auto"}},showCancel:!0,cancelBtn:{label:l.cancelBtnText,isLoading:!1,style:{width:"85px",minWidth:"auto"},onClick:s},containerStyle:{justifyContent:P==="small"?"space-between":"center"},style:{padding:Y.footerPadding.valuePx(P)},separatorStyle:{marginRight:c.sp4}})]})}const ee=(e,t)=>{const{criteria:a,steps:r}=e.billPaySetupApproverViewUpdateData?.data??{};return{[y]:ae(e.allApprovers.map(s=>s.user),e.filteredApprovers.map(s=>s.user),D(e.allAttributes),D(e.filteredAttributes),r??[])??[],[N]:t?void 0:a!=null?a.range.min.amount??0:0,[_]:a!=null?a.range.max==null?1/0:a.range.max.amount:1/0}},ae=(e,t,a,r,s)=>s&&s.length>0?s.map((n,b)=>({stepIndex:b,stepType:{selectedOption:n.action,allOptions:j},actors:{allUsers:t,selectedUsers:le(e,n.actors),allNonUsers:r,selectedNonUsers:te(a,n.actors)}})):[{stepIndex:0,stepType:{selectedOption:"require_approval",allOptions:j},actors:{allUsers:t,selectedUsers:[],allNonUsers:r,selectedNonUsers:[]}}],le=(e,t)=>e.filter(a=>a.userId!=null&&t.findIndex(r=>r.userId===a.userId)>-1),te=(e,t)=>e.filter(a=>t.findIndex(r=>r.subType===a.value)>-1),T=e=>`${e}_form`,ge=e=>`${e}`,re=h.div`
1
+ import{y as z,u as U,q as O,F as L,aa as G,aP as M,j as o,aJ as W,cT as J,bG as Q,ad as X,aQ as Z,o as c}from"./index-CN7UAWAg.js";import{b as R,n as h}from"./vendor-Bs1fkIUX.js";import{b as H,f as K,l as j,o as D}from"./FollowStepsSection-NM8GXTRZ--kMzASD7.js";import"./mui-Ty75qFQF.js";import"./analytics-BbBRZ6cw.js";import"./routing-Dk1A2KYI.js";import"./sentry-BE5FTzpq.js";import"./redux-CEhZD0hA.js";import"./liveblocks-8ht9CoL5.js";import"./crypto-CK1x27Ua.js";const C="billPayApprovalRuleDetailPage",N="lowerBound",_="upperBound",y="steps",Y={footerPadding:new z(U[2],U[3])};function ve({localData:e,approvalUpdateActionType:t,onBackClick:a,onApprovalRuleDataUpdated:r,onResetClick:s,isLowerBoundDisabled:n=!1,isUpperBoundDisabled:b=!0,hideUpperBoundField:A=!1,onSaveRuleClick:E,onSaveRuleSuccess:S}){const P=O(),l=L.getLocalizedStrings().commonSetUp.approval,I=L.getLocalizedStrings().spendManagement.billPay.billPayApproval,x=ee(e,t==="approval_create"&&!n),v=G({mode:"all",reValidateMode:"onChange",defaultValues:x}),u=e.billPaySetupApproverViewUpdateData?.updateStatus,w=M(u?.fetchState),{upperBound:B}=x,{allApprovalRules:p,allAccountingClasses:k,billPaySetupApproverViewUpdateData:m}=e;let f=p.length>1?p.length-1:0,g=p.length>0?p[f].criteria[0].range.min.amount:0;if(m!=null&&m.type==="approval_update"&&m.data!=null){const{approvalRuleId:i}=m.data;f=p.findIndex(d=>d.approvalRuleId===i),g=f>0?p[f-1].criteria[0].range.min.amount:0}const F=v.handleSubmit(()=>{E()}),q=async(i,d)=>{r(d)};return R.useEffect(()=>{const i=v.watch((d,{name:$})=>{if($!=null&&d!=null){const V=W(d);J(()=>q($,V))}});return()=>{i.unsubscribe()}}),R.useEffect(()=>{w==="In-Progress"&&u?.fetchState==="Completed"&&S()},[w,u?.fetchState,S]),o.jsxs(re,{children:[o.jsx(Q,{title:t==="approval_create"?l.newApproval:l.editApproval,style:{zIndex:4},onBackClick:()=>{a()},source:"BillPayApprovalRuleDetailPage"}),o.jsx(se,{children:o.jsx(X,{...v,children:o.jsx("form",{id:T(C),onSubmit:F,children:o.jsxs(oe,{children:[o.jsx(H,{label:{label:A?I.amountPerBillGreaterLabel:I.amountPerBillLabel},firstText:{type:"number",name:N,placeholder:"$0",options:{required:!0,max:B===1/0?Number.MAX_SAFE_INTEGER-1:B-1,min:g,validate:i=>n?!0:i!=null&&i>g},isDisabled:n,additionalInfoLabel:l.firstRuleLowerBoundInfoLabel,additionalErrorLabel:l.firstRuleErrorInfoLabel},secondText:{type:"number",name:_,placeholder:"Infinity",isDisabled:b,hideField:A,additionalInfoLabel:l.upperBoundInfoLabel}}),o.jsx(ie,{}),o.jsx(K,{sectionId:y,label:{label:l.followStepsLabel},approversPlaceholder:l.approversPlaceholder,notifiersPlaceholder:l.notifiersPlaceholder,allUserWithRoles:e.allApprovers,filteredApprovers:e.filteredApprovers.map(i=>i.user),allAttributes:e.allAttributes,filteredAttributes:e.filteredAttributes,allAccountingClasses:k,stepsInfo:x[y],userSelectPlaceholder:l.userSelectPlaceholder,approveNotifyPlaceholder:l.approveNotifyPlaceholder,productType:"zeni_bill_pay"})]})})})}),o.jsx(Z,{formId:T(C),primaryBtn:{label:l.saveBtnText,isLoading:u?.fetchState==="In-Progress",isDisabled:u?.fetchState==="In-Progress",style:{width:"85px",minWidth:"auto"}},showCancel:!0,cancelBtn:{label:l.cancelBtnText,isLoading:!1,style:{width:"85px",minWidth:"auto"},onClick:s},containerStyle:{justifyContent:P==="small"?"space-between":"center"},style:{padding:Y.footerPadding.valuePx(P)},separatorStyle:{marginRight:c.sp4}})]})}const ee=(e,t)=>{const{criteria:a,steps:r}=e.billPaySetupApproverViewUpdateData?.data??{};return{[y]:ae(e.allApprovers.map(s=>s.user),e.filteredApprovers.map(s=>s.user),D(e.allAttributes),D(e.filteredAttributes),r??[])??[],[N]:t?void 0:a!=null?a.range.min.amount??0:0,[_]:a!=null?a.range.max==null?1/0:a.range.max.amount:1/0}},ae=(e,t,a,r,s)=>s&&s.length>0?s.map((n,b)=>({stepIndex:b,stepType:{selectedOption:n.action,allOptions:j},actors:{allUsers:t,selectedUsers:le(e,n.actors),allNonUsers:r,selectedNonUsers:te(a,n.actors)}})):[{stepIndex:0,stepType:{selectedOption:"require_approval",allOptions:j},actors:{allUsers:t,selectedUsers:[],allNonUsers:r,selectedNonUsers:[]}}],le=(e,t)=>e.filter(a=>a.userId!=null&&t.findIndex(r=>r.userId===a.userId)>-1),te=(e,t)=>e.filter(a=>t.findIndex(r=>r.subType===a.value)>-1),T=e=>`${e}_form`,ge=e=>`${e}`,re=h.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  flex-direction: column;
@@ -1,4 +1,4 @@
1
- import{q as B,F as v,j as t,bG as D,L as E,aM as b,y as r,am as I,aN as j,cE as G,cF as H,cG as U,o as i,de as q,u as l,b9 as F,B as z,b8 as V,p as S,db as _,by as J,b as Y}from"./index-CUpJHznP.js";import{n as o,b as O}from"./vendor-Bs1fkIUX.js";import"./mui-Ty75qFQF.js";import"./analytics-BbBRZ6cw.js";import"./routing-Dk1A2KYI.js";import"./sentry-BE5FTzpq.js";import"./redux-CEhZD0hA.js";import"./liveblocks-8ht9CoL5.js";import"./crypto-CK1x27Ua.js";const s={sectionWidth:new r(343,580,726),ruleWrapperPadding:new r(l[3],l[4]),wrapperGap:new r(l[4],l[3]),wrapperMarginBottom:new r(l[6],l[8]),lastWrapperMarginBottom:new r(l[5],l[9]),stepperWidthHeight:new r(20,l[5]),stepperItemLeft:new r(-29,-23),stepperItemTop:new r(2,l[0]),stepperItemPaddingLeft:new r(l[0],10),stepperItemMinHeight:new r(22,28),stepperLeft:new r(11,17),stepperTop:new r(2,l[0]),stepperContentTop:new r(-1,-4)},L={stepper:new z("smallRegular","standardRegular"),amount:new z("standardRegular","largeMedium")},X=({showDeleteBtn:e=!1,isLastSection:y=!1,approvalRule:c,onEditRuleClick:f,onDeleteRuleClick:$})=>{const[m,x]=O.useState(!1),n=B(),{range:h}=c.criteria[0],{steps:u,approvalRuleId:w}=c,a=v.getLocalizedStrings().commonSetUp.approval,W=()=>{x(!0)},A={onOkClick:()=>{x(!1),$?.(w)},onCancelClick:()=>{x(!1)}};return t.jsxs(Z,{windowSize:n,isLastSection:y,children:[t.jsxs(K,{windowSize:n,children:[t.jsxs(se,{children:[t.jsxs(C,{windowSize:n,children:[a.from," ",j("0,0",h.min)]}),t.jsxs(Q,{children:[t.jsx(P,{}),t.jsx(ee,{}),t.jsx(P,{})]}),h.max==null?t.jsx(de,{}):t.jsx(C,{windowSize:n,children:j("0,0",{...h.min,amount:h.max.amount})})]}),t.jsxs(ae,{className:"icons",children:[e&&t.jsx(ne,{onClick:W,"data-testid":b("delete-approval-rule-bill-pay",c.approvalRuleId)}),t.jsx(pe,{onClick:()=>{f(w)},"data-testid":b("edit-approval-rule-bill-pay",c.approvalRuleId)})]})]}),t.jsx(te,{windowSize:n,children:t.jsx(oe,{isSingleStep:u.length===1,windowSize:n,children:u.map((d,M)=>t.jsxs(ie,{isSingleStep:u.length===1,className:"stepperItem",windowSize:n,children:[d.action==="require_approval"?t.jsx(re,{children:a.requireText}):t.jsx(le,{children:a.notifyText}),d.nonUserActors!=null&&d.nonUserActors.filter(p=>p.subType!=null).map((p,N)=>t.jsxs(R,{children:[t.jsx(k,{children:p.subType!=null?a.nonUsers[p.subType].label:null}),d.operator!="is"?t.jsx(T,{className:"operator",children:d.operator}):null]},`${p.subType}_${N}`)),d.actors.map(p=>t.jsxs(R,{children:[t.jsxs(k,{children:[p.firstName," ",p.lastName]}),d.operator!="is"?t.jsx(T,{className:"operator",children:d.operator}):null]},p.userId))]},M))})}),m?t.jsx(G,{titleComponent:t.jsx(U,{children:a.deleteApprovalRuleTitle}),descriptionComponent:t.jsx(H,{children:a.deleteApprovalRuleDesc}),primaryButtonText:a.deleteTxt,proceedButtonVariant:"danger",secondaryButtonText:a.cancelBtnText,action:A}):null]})},Z=o.div`
1
+ import{q as B,F as v,j as t,bG as D,k as E,aM as b,y as r,am as I,aN as j,cE as G,cF as H,cG as U,o as i,de as q,u as l,b9 as F,B as z,b8 as V,p as S,db as _,by as J,b as Y}from"./index-CN7UAWAg.js";import{n as o,b as O}from"./vendor-Bs1fkIUX.js";import"./mui-Ty75qFQF.js";import"./analytics-BbBRZ6cw.js";import"./routing-Dk1A2KYI.js";import"./sentry-BE5FTzpq.js";import"./redux-CEhZD0hA.js";import"./liveblocks-8ht9CoL5.js";import"./crypto-CK1x27Ua.js";const s={sectionWidth:new r(343,580,726),ruleWrapperPadding:new r(l[3],l[4]),wrapperGap:new r(l[4],l[3]),wrapperMarginBottom:new r(l[6],l[8]),lastWrapperMarginBottom:new r(l[5],l[9]),stepperWidthHeight:new r(20,l[5]),stepperItemLeft:new r(-29,-23),stepperItemTop:new r(2,l[0]),stepperItemPaddingLeft:new r(l[0],10),stepperItemMinHeight:new r(22,28),stepperLeft:new r(11,17),stepperTop:new r(2,l[0]),stepperContentTop:new r(-1,-4)},L={stepper:new z("smallRegular","standardRegular"),amount:new z("standardRegular","largeMedium")},X=({showDeleteBtn:e=!1,isLastSection:y=!1,approvalRule:c,onEditRuleClick:f,onDeleteRuleClick:$})=>{const[m,x]=O.useState(!1),n=B(),{range:h}=c.criteria[0],{steps:u,approvalRuleId:w}=c,a=v.getLocalizedStrings().commonSetUp.approval,W=()=>{x(!0)},A={onOkClick:()=>{x(!1),$?.(w)},onCancelClick:()=>{x(!1)}};return t.jsxs(Z,{windowSize:n,isLastSection:y,children:[t.jsxs(K,{windowSize:n,children:[t.jsxs(se,{children:[t.jsxs(C,{windowSize:n,children:[a.from," ",j("0,0",h.min)]}),t.jsxs(Q,{children:[t.jsx(P,{}),t.jsx(ee,{}),t.jsx(P,{})]}),h.max==null?t.jsx(de,{}):t.jsx(C,{windowSize:n,children:j("0,0",{...h.min,amount:h.max.amount})})]}),t.jsxs(ae,{className:"icons",children:[e&&t.jsx(ne,{onClick:W,"data-testid":b("delete-approval-rule-bill-pay",c.approvalRuleId)}),t.jsx(pe,{onClick:()=>{f(w)},"data-testid":b("edit-approval-rule-bill-pay",c.approvalRuleId)})]})]}),t.jsx(te,{windowSize:n,children:t.jsx(oe,{isSingleStep:u.length===1,windowSize:n,children:u.map((d,M)=>t.jsxs(ie,{isSingleStep:u.length===1,className:"stepperItem",windowSize:n,children:[d.action==="require_approval"?t.jsx(re,{children:a.requireText}):t.jsx(le,{children:a.notifyText}),d.nonUserActors!=null&&d.nonUserActors.filter(p=>p.subType!=null).map((p,N)=>t.jsxs(R,{children:[t.jsx(k,{children:p.subType!=null?a.nonUsers[p.subType].label:null}),d.operator!="is"?t.jsx(T,{className:"operator",children:d.operator}):null]},`${p.subType}_${N}`)),d.actors.map(p=>t.jsxs(R,{children:[t.jsxs(k,{children:[p.firstName," ",p.lastName]}),d.operator!="is"?t.jsx(T,{className:"operator",children:d.operator}):null]},p.userId))]},M))})}),m?t.jsx(G,{titleComponent:t.jsx(U,{children:a.deleteApprovalRuleTitle}),descriptionComponent:t.jsx(H,{children:a.deleteApprovalRuleDesc}),primaryButtonText:a.deleteTxt,proceedButtonVariant:"danger",secondaryButtonText:a.cancelBtnText,action:A}):null]})},Z=o.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: ${e=>s.wrapperGap.valuePx(e.windowSize)};