@zeniai/web-cockpit-ui 1.13.84-qa → 1.13.85-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (249) hide show
  1. package/dist/assets/{ACHDetailsPage-Bya_wRcI-D24AQL3_.js → ACHDetailsPage-CRqyoYEz-xYrGFNnE.js} +3 -3
  2. package/dist/assets/{AIPerformancePage-Bc2kKHSK-vnI3KLwi.js → AIPerformancePage-DAkvkXSA-CGVKmjkJ.js} +24 -24
  3. package/dist/assets/AccountInfoPage-6EVpo7mW-aLkrvciq.js +18 -0
  4. package/dist/assets/{AccountInfoPageContent-BhU-TVmh-C-UpNXF8.js → AccountInfoPageContent-BWZbyIYz-Q8Byt1d2.js} +20 -20
  5. package/dist/assets/{AccountReconDetailsDrawerPage-Dp2R5isq-6LbQVUfj.js → AccountReconDetailsDrawerPage-DLd_igXD-BoD_5Mp7.js} +18 -18
  6. package/dist/assets/AccountRow-D4iz2vCr-FZzwmYfW.js +298 -0
  7. package/dist/assets/{AccountsPromoCardStack-DYUyO-ip-Afoar8fj.js → AccountsPromoCardStack-DIly1lFF-BymCGDNy.js} +22 -22
  8. package/dist/assets/{AddAddressForCardDrawer-CNSnxc8q-CfZsmSuQ.js → AddAddressForCardDrawer-C90j4Cwr-BKCwJ7c4.js} +1 -1
  9. package/dist/assets/{AddToWalletPage-Q8uWTckm-C9vK1iqP.js → AddToWalletPage-Bo2KesYz-Cz9shvNb.js} +30 -30
  10. package/dist/assets/{AgingReportsPage-B-DOb7my-WwOH5_Yn.js → AgingReportsPage-DuoKsSkU-D9JwO5kE.js} +4 -4
  11. package/dist/assets/{AllUserItems-B86Y2Fmg-DwBM7tfH.js → AllUserItems-C0U1Brjm-bMWZMmau.js} +7 -7
  12. package/dist/assets/{ApAgingDetailPage-CMYJgTzS-C2HHMQbl.js → ApAgingDetailPage-dNwAZULr-Bgfeeq5D.js} +3 -3
  13. package/dist/assets/{AppBasePage-DJO-V2ox-C-oIOb39.js → AppBasePage-CfkaWEbJ-DV03x5l2.js} +4 -4
  14. package/dist/assets/{AppDrawerContent-5_QaBLwS-picTHWhb.js → AppDrawerContent-DlHQEgOZ-CwVua6gS.js} +2 -2
  15. package/dist/assets/{ApprovalRulesSettingsPage-CPbVQ97S-C7Jihchv.js → ApprovalRulesSettingsPage-Pl7HoLmk-7CPgqfk2.js} +6 -6
  16. package/dist/assets/{ArAgingChart-l020Rk_S-DFeuvhU_.js → ArAgingChart-xI9TRvfS-B-FSsHVj.js} +5 -5
  17. package/dist/assets/{ArAgingDetailPage-BeUPeHBJ-BkRCdWjT.js → ArAgingDetailPage-BMGCnP5d-Ia6ZCwAD.js} +2 -2
  18. package/dist/assets/{AttachmentView-Afp_U4fV-8-c7IhJe.js → AttachmentView-C8AgUAnY-CXbbCi9n.js} +8 -8
  19. package/dist/assets/{BankAccountSection-CNQgxgSJ-Bj0DaA_J.js → BankAccountSection-DB4PEf_X-BThY20p4.js} +4 -4
  20. package/dist/assets/{BankAccountWarningSection-V0HHzW57-vrqdtD7y.js → BankAccountWarningSection-BNO8Gl59-Cj0YvVYP.js} +5 -5
  21. package/dist/assets/{BankConnectionsSettingsPage-Bk8K0xUn-CeZc6fuw.js → BankConnectionsSettingsPage-BOreBo5b-ClbcS0AA.js} +22 -22
  22. package/dist/assets/{BillDetailPage-D9d6X0o4-DnbAMdeA.js → BillDetailPage-Bv86SywV-OjQAhExV.js} +5 -5
  23. package/dist/assets/{BillPayApprovalRuleDetailPage-CSVTc5Mn-zEJJLZMO.js → BillPayApprovalRuleDetailPage-CDXxmD-3-CPsk0oK8.js} +2 -2
  24. package/dist/assets/{BillPayApprovalRulesPage-DIOOCVKH-ec-IeSJ_.js → BillPayApprovalRulesPage-Ci5Ok7Zj-tof82RhM.js} +3 -3
  25. package/dist/assets/{BillPayPromoPage-C44YKAlE-CZ8TnOy7.js → BillPayPromoPage-Co2j2krO-DmiPp1nW.js} +2 -2
  26. package/dist/assets/{BillPaySetUpPage-erTIfKkS-B8D6nffd.js → BillPaySetUpPage-DjpCUZaT-BN2J-t4G.js} +2 -2
  27. package/dist/assets/BillingSettingsPage-CAs7DZQz-CqK9Ho86.js +44 -0
  28. package/dist/assets/BillsBulkReviewDrawerPage-DjunAUW0-BurxqQ7q.js +1 -0
  29. package/dist/assets/{BoxItem-UFBGpfBB-Hna_3gSj.js → BoxItem-BqLhtWoJ-N1dze3h9.js} +1 -1
  30. package/dist/assets/{BusinessVerificationPage-Cl7jz1DF-P_BUnpPu.js → BusinessVerificationPage-CZGOzc9Z-fjFONiSD.js} +8 -8
  31. package/dist/assets/{CardNumberSubText-DyFZudV_-B0AxiMNx.js → CardNumberSubText-23sLjCVt-BzieyTnf.js} +1 -1
  32. package/dist/assets/{CashbackDetailPage-D0_YW2Dy-CJHMwowQ.js → CashbackDetailPage-DY0n94jz-BUYqnV34.js} +21 -21
  33. package/dist/assets/{ChargeCardDetailPage-YkvyvIEk-C3d7vBC0.js → ChargeCardDetailPage-NWTPnGtM-D2U2Irky.js} +58 -58
  34. package/dist/assets/{ChargeCardListPage-4vg8Q6bl-Btxhg5jy.js → ChargeCardListPage-D42dfnET-QGICTWTK.js} +35 -35
  35. package/dist/assets/{ChargeCardListTable-Dl-rblE6-D5iGQu5n.js → ChargeCardListTable-B7uRDVzb-T3KA1SlK.js} +25 -25
  36. package/dist/assets/ChargeCardPromoPage-CXiXee-8-DqF9CwRb.js +190 -0
  37. package/dist/assets/{ChargeCardSetupPage-BSiJnRP_-y1F_pjxz.js → ChargeCardSetupPage-Ccc8PoCm-BSIg4VNL.js} +2 -2
  38. package/dist/assets/{ChargeCardStatementsPage-NkfA1SYG-kW4Au9ab.js → ChargeCardStatementsPage-JEslDm3r-C_RfZvQ8.js} +4 -4
  39. package/dist/assets/{ChargeCardUtils-CLpd-HDH-dMJ2Q_93.js → ChargeCardUtils-B3JEziD7-CwQE9qIG.js} +1 -1
  40. package/dist/assets/{ChaseOverlay-B1cuawle-CSkF_51t.js → ChaseOverlay-KLet3F9X-BJh9nem5.js} +8 -8
  41. package/dist/assets/CheckDepositDrawerPage-JYHyo9Hw-BwsvgZ74.js +206 -0
  42. package/dist/assets/{CollapsableReportTable-iMD5xyGN-DxpM_9bu.js → CollapsableReportTable-DshWn4Fc-1Ky5jq0N.js} +29 -29
  43. package/dist/assets/{CompanyOfficerDetailsSection-BA7etm2I-DTt9FR5w.js → CompanyOfficerDetailsSection-DWqEolPc-C_ETEVFs.js} +26 -26
  44. package/dist/assets/{CompanyPassportCard-Dks4EQDN-B0Dzj-Sj.js → CompanyPassportCard-fyolEQTs-BpIPYjUj.js} +2 -2
  45. package/dist/assets/{CompanyPassportPage-Denliwgg-BRN9vOeB.js → CompanyPassportPage-CrgsRRVr-WqqSGX_w.js} +140 -140
  46. package/dist/assets/{CompleteProfile-CCLq4pNY-CtKBUzOW.js → CompleteProfile-D_zq0Bxi-Bi1YeUNU.js} +10 -10
  47. package/dist/assets/ConfettiBurst-CZuMHGP8-BTcuXQPa.js +1 -0
  48. package/dist/assets/{CreateOrEditVendorPage-BFejWQMx-C7NqnKds.js → CreateOrEditVendorPage-Ct4Kfowi-Drrod2cP.js} +15 -15
  49. package/dist/assets/{CreditCardPaymentDrawerPage-B7Sesq_n-DvfL88dh.js → CreditCardPaymentDrawerPage-Cpu-7pGN-z0mDR9Zy.js} +16 -16
  50. package/dist/assets/{CreditCardPaymentPlgSection-D5CNl0oa-DiWqHLoj.js → CreditCardPaymentPlgSection-DoMaCnIZ-BpT8OJXl.js} +10 -10
  51. package/dist/assets/{CurrencySelectField-DYvc6rwt-DrMXyXgk.js → CurrencySelectField-CCOtXLC7-DmgJhn-v.js} +5 -5
  52. package/dist/assets/{CustomerOnboardingActivationPage-oUiw--hv-uDxfiRoM.js → CustomerOnboardingActivationPage-Cgzif1ji-CPNUkRDw.js} +3 -3
  53. package/dist/assets/CustomerOnboardingContainerPage-ByWeMmBf-DwYZZ9jR.js +1 -0
  54. package/dist/assets/{CustomerOnboardingDetailPageSkeleton-BaDpU--M-Dr2X5vzk.js → CustomerOnboardingDetailPageSkeleton-BOMwRZEO-PNOXFbTm.js} +11 -11
  55. package/dist/assets/{CustomerOnboardingNoStepsPage-C_cxcuWE-BQPyN4r3.js → CustomerOnboardingNoStepsPage-DDloVGvk-EFD3k0Z1.js} +8 -8
  56. package/dist/assets/CustomerOnboardingPage-DHji4ZmF-vPwCgWM6.js +107 -0
  57. package/dist/assets/{CustomerOnboardingProductSuitePage-DEqdhh-2-DNDa-YZB.js → CustomerOnboardingProductSuitePage-BA3GAX42-usBGW0iL.js} +4 -4
  58. package/dist/assets/Dashboard-Cr5ugENA-_ss7RgaI.js +1251 -0
  59. package/dist/assets/{DashboardReportPage-Tq4KsQuw-C0NFJvrJ.js → DashboardReportPage-paPVk_v2-7626om2P.js} +67 -67
  60. package/dist/assets/{DepositAccTransactionItem-DWhVL-kH-HToIlcYx.js → DepositAccTransactionItem-BXRfgUfE-Bcw5EG9I.js} +2 -2
  61. package/dist/assets/{DepositAccTransactionListPage-BiaZBvV4-Eo8UgPbX.js → DepositAccTransactionListPage--7TRlqKj-zqnHB4vQ.js} +8 -8
  62. package/dist/assets/{DocumentSecurityBanner-eGDvEOvr-Dfhgnjgy.js → DocumentSecurityBanner-B0Qt1FLC-BKK2GBle.js} +1 -1
  63. package/dist/assets/DomesticWireDetailsPage-RoRpMC50-Dx8FlvWR.js +21 -0
  64. package/dist/assets/{DownloadOverlay-C0vGOFIR-CLlCJb4E.js → DownloadOverlay-Cl_EXjiu-_W4-6wVr.js} +20 -20
  65. package/dist/assets/{DrawerPage-keu-rP1c-BE2Fh2qJ.js → DrawerPage-wXwAaYEB-ClkK54Ag.js} +8 -8
  66. package/dist/assets/EditPeoplePage-xDL6VA_r-DBIETQHy.js +55 -0
  67. package/dist/assets/{EditReimbursementDetailPage-jqf5akyj-a9iq4xwG.js → EditReimbursementDetailPage-BUpJPJNu-BuRQj9KF.js} +74 -74
  68. package/dist/assets/{EntityDetailPage-D0mZIEcR-Rg_90ffL.js → EntityDetailPage-BNXqSwVL-BtqM-DEW.js} +2 -2
  69. package/dist/assets/{EntitySummarySection-bL2stKO1-CambP6kY.js → EntitySummarySection-MZ57i-bY-H7IGJvB2.js} +11 -11
  70. package/dist/assets/{ExpenseAutomationOverviewPage-Cm00uGHv-BucC69E3.js → ExpenseAutomationOverviewPage-Y3IHs4dG-BCr8LQIN.js} +17 -17
  71. package/dist/assets/{ExpenseAutomationPage-BA8sRxM--BvNgZY1Q.js → ExpenseAutomationPage-C0hvPLo7-CxYhLUjG.js} +84 -84
  72. package/dist/assets/{ExpressPayPage-DRNbLpuL-BTcYYJnP.js → ExpressPayPage-Bncb54-Q-m2KDux54.js} +8 -8
  73. package/dist/assets/{FeaturePreviewPage-CeeAOF5C-DHX56uCl.js → FeaturePreviewPage-BnGBEF9H-DIdV1EEF.js} +2 -2
  74. package/dist/assets/{FollowStepsSection-DuElPK3y-dhjgL0Nu.js → FollowStepsSection-laCvnETV-BKhPlVRt.js} +7 -7
  75. package/dist/assets/{GlobalReviewListPage-DfjZMTms-DrRjYv7e.js → GlobalReviewListPage-CskEuHc5-BvuvkrWm.js} +10 -10
  76. package/dist/assets/HelpButton-D5ZYyQMh-D3OqqJNA.js +28 -0
  77. package/dist/assets/{InformationCardStack-CmquAm7A-Bio4HHzL.js → InformationCardStack-BFJqdH9n-Cbvb8Zyt.js} +5 -5
  78. package/dist/assets/{InsightsCardStack-D5ahtQWr-B_JxN54j.js → InsightsCardStack-CcoMWMiA-BcmYr1H8.js} +9 -9
  79. package/dist/assets/{InsightsSection-xgqf4arB-CemPO1xM.js → InsightsSection-D9PiJagu-DOwHVFks.js} +3 -3
  80. package/dist/assets/{IntegrationsSettingsPage-Cl6dfKQL-WHKkc-0x.js → IntegrationsSettingsPage-CVmDobJ8-CKVB31Cy.js} +5 -5
  81. package/dist/assets/{InternationalWireSwiftDetailsPage-D_jWoFli-CGo3Glkw.js → InternationalWireSwiftDetailsPage-DqW88v9N-H1bFtbsa.js} +11 -11
  82. package/dist/assets/{InternationalWireVerificationPage-it1U4OPj-CAqG3vli.js → InternationalWireVerificationPage-X90z_30k-xPYg__QG.js} +17 -17
  83. package/dist/assets/{InviteFormPage-DTMy8xZk-2GrL0qjS.js → InviteFormPage-BK-PRmeH-BAomtB1K.js} +23 -23
  84. package/dist/assets/{InvitePageListView-X7W1jRxY-DLLNNo8k.js → InvitePageListView-6-iCc4BK-DiUJrTMB.js} +31 -31
  85. package/dist/assets/InvitePeoplePage-C9AwNqIx-U6OqJmP1.js +12 -0
  86. package/dist/assets/{InvoiceUploadSection-BhCDvIPX-e244hYqN.js → InvoiceUploadSection-D5aF4auL-D8CZg2Vk.js} +7 -7
  87. package/dist/assets/{IssueChargeCardPage-CqE8lMsX-CQoXeSdg.js → IssueChargeCardPage-C_xt7hKZ-CgCvIFoE.js} +22 -22
  88. package/dist/assets/{LabeledAddressValue-CCEVX0ke-Dr-Y2rNd.js → LabeledAddressValue-DpSK0MqC-D58RjKgD.js} +1 -1
  89. package/dist/assets/{LabeledAddressValueField-B9iirKZj-B-lkILdh.js → LabeledAddressValueField-_LY7c-ZC-EdJfII0E.js} +3 -3
  90. package/dist/assets/{LabeledControlledCheckBoxField-Bl3-Zao6-CHB8td0R.js → LabeledControlledCheckBoxField-FB40Z8J7-CUjOIHO8.js} +1 -1
  91. package/dist/assets/{LabeledCreatableSingleSelectField-v86g-OZd-NNxB-j11.js → LabeledCreatableSingleSelectField-paSeI8_R-COJp3Y9m.js} +7 -7
  92. package/dist/assets/LabeledDocumentField-DiMgPKtR-DDw2gK-2.js +41 -0
  93. package/dist/assets/LabeledDropDownFormattedTextField-DsjpTL6X-BQHdfd5e.js +59 -0
  94. package/dist/assets/{LabeledText-D9feJraX-o9BoQjAH.js → LabeledText-CyXj8QWV-DunmbzZf.js} +3 -3
  95. package/dist/assets/{LabeledUserSingleSelectWithSubtitlesField-BKNBvO_C-BxGzxKzb.js → LabeledUserSingleSelectWithSubtitlesField-CUT00Vix-oJIrTzfz.js} +7 -7
  96. package/dist/assets/{LabeledZeniRolesDropDownField-AwQaO42N-CKgF9hTJ.js → LabeledZeniRolesDropDownField-D0cQlbhO-Dqs02jMf.js} +26 -26
  97. package/dist/assets/{LinkJETransactionPage-D3I2NvQw-P3R8MlXe.js → LinkJETransactionPage-DaXjiQRp-CH9vE8pm.js} +8 -8
  98. package/dist/assets/{LowBalancePopup-OSUi1Alp-BiLt2AdI.js → LowBalancePopup-CdftTvLb-DzgqRFO5.js} +7 -7
  99. package/dist/assets/{MagicLinkACHDetailsPage-r3XSoJ11-Cv-fI0u0.js → MagicLinkACHDetailsPage-C25i1T4c-B_gtZsWu.js} +1 -1
  100. package/dist/assets/{MagicLinkDomesticWireDetailsPage-DPG9fUzZ-B7fiv6MZ.js → MagicLinkDomesticWireDetailsPage-B0r3WStl-CY0AGP-m.js} +1 -1
  101. package/dist/assets/{MagicLinkInternationalWireDetailsPage-CmXJXEaN-Tp9z-x5e.js → MagicLinkInternationalWireDetailsPage-C-ev-6xJ-DYlN82pS.js} +1 -1
  102. package/dist/assets/{MagicLinkSuccessPage-CwszAuW2-Bix3eRV8.js → MagicLinkSuccessPage-7JG3V4Qt-Brf6FY6k.js} +5 -5
  103. package/dist/assets/{MagicLinkTitleSection-CvrbJ-of-B5SXKUsj.js → MagicLinkTitleSection-DEe0hhml-De1g7fYA.js} +3 -3
  104. package/dist/assets/{MailingDetailsSection-BJHZIZCt-Dq0ArLOp.js → MailingDetailsSection-Qc65E0w3-C6CH0-UP.js} +1 -1
  105. package/dist/assets/{MeetingCalenderPopup-C4r3bJ84-B_7Xob1I.js → MeetingCalenderPopup-Dh8meV6d-BwK6voO1.js} +1 -1
  106. package/dist/assets/{Menu-MHZ6Ibt0-DsBN8RMC.js → Menu-DyfXBl_1-H_GViJ7L.js} +3 -3
  107. package/dist/assets/{MyBankConnectionsSettingsPage-DG1tuqAt-BHEUeVdz.js → MyBankConnectionsSettingsPage-CCFcVgyX-Cj9pmtPo.js} +13 -13
  108. package/dist/assets/{MyPendingActivationChargeCardListPage-DZyxqqyJ-BhPK50AW.js → MyPendingActivationChargeCardListPage-DS966wTB-DXMBzQKu.js} +1 -1
  109. package/dist/assets/{MyProfileSettingsPage-BnNbspx9-D_qqDWXw.js → MyProfileSettingsPage-BRRzMoQL-z-2QKlLv.js} +8 -8
  110. package/dist/assets/{NavBarWithPicker-3okDhiol-CJJ9BrpE.js → NavBarWithPicker-BvWih0k0-DqsmpQXd.js} +2 -2
  111. package/dist/assets/{NavigationArrow-iw-yd_9S-DvXlGggY.js → NavigationArrow-DYSL2aDL-BJUiAKpZ.js} +9 -6
  112. package/dist/assets/{NavigationDots-CB5JLuJi-Bme4BexN.js → NavigationDots-DyyCcIih-C83s6vN7.js} +1 -1
  113. package/dist/assets/{NewGlobalMerchantPage-CcGws2R2-Coiq6yZx.js → NewGlobalMerchantPage-DjEvzM4M-D2PAZo-X.js} +33 -33
  114. package/dist/assets/NoDataChart-DE6NV823-DlzVvXWT.js +26 -0
  115. package/dist/assets/{NoDataTable-BbDo9Kma-CGZ-ZRju.js → NoDataTable-CXNsBBVP-CNpKcnQr.js} +1 -1
  116. package/dist/assets/{NotFoundPage-gbtwlR8l-C8W_IclM.js → NotFoundPage-CuuO2Mia-DtoiuMBe.js} +1 -1
  117. package/dist/assets/{NotificationSettingsPage-slkQwvVZ-C6_X1MwL.js → NotificationSettingsPage-C7ilxUAV-DVBhuDeZ.js} +16 -16
  118. package/dist/assets/NotificationsListConfig-TBQMobJ5-Dg1BFWgp.js +1 -0
  119. package/dist/assets/{NotificationsPage-BAyRPK64-D9pYswFj.js → NotificationsPage-BjaKD99B-HczC9sOP.js} +32 -32
  120. package/dist/assets/{OpExByVendorPage-CofD6hKi-_r0JCjwW.js → OpExByVendorPage-IuDiHnIW-DSQhabH4.js} +5 -5
  121. package/dist/assets/{OverlayContainerPage-nhe7xtoR-BqnlKexX.js → OverlayContainerPage-C0rUb6-5-zCXylyg1.js} +1 -1
  122. package/dist/assets/{PandLWithForecastPage-_uOEFXiy-uRGPUMun.js → PandLWithForecastPage-DLvgYpF8-BvtUu1nj.js} +7 -7
  123. package/dist/assets/{PaymentAccountSetupBillingAddressSection-C0zGxU4f-BbIQnivK.js → PaymentAccountSetupBillingAddressSection-CZ8ZY08D-DItr6wpu.js} +8 -8
  124. package/dist/assets/{PeoplePage-8GExF-Lt-DycjJFii.js → PeoplePage-DyqY-rIV-6wYuIYCy.js} +19 -19
  125. package/dist/assets/{PortfolioAllocationFormPage-CMKEE7P7-BAgV1W9Q.js → PortfolioAllocationFormPage-DTuKtkwr-BCUD0jpE.js} +3 -3
  126. package/dist/assets/{PortfolioDetails-A3P3vG57-D-PvzBt-.js → PortfolioDetails-DJFeMG4U-jhRfPjHw.js} +11 -11
  127. package/dist/assets/{ProductsCarousel-D9H3mUJ--BVzwDfPL.js → ProductsCarousel-CS4_yc80-CJENMC5j.js} +7 -7
  128. package/dist/assets/{PromoBaseCards-CF0Bv_9G-CPu8OwaX.js → PromoBaseCards-BZ2m6LfO-DtHfjjw4.js} +25 -25
  129. package/dist/assets/{QBOConnectionDialog-D2zi5wKm-BnMrx2Jb.js → QBOConnectionDialog-2vJQuslh-gswZrMuL.js} +6 -6
  130. package/dist/assets/{QBOSetupSection-B3Dj2g2k-B6Vh45jl.js → QBOSetupSection-Yv3Xw-yn-CsTlHo9j.js} +11 -11
  131. package/dist/assets/{ReimbursementApprovalRuleDetailPage-DgpHHy3U-CVsGPnLd.js → ReimbursementApprovalRuleDetailPage-tvJ2APRB-CJktCsdd.js} +1 -1
  132. package/dist/assets/{ReimbursementApprovalRulesPage-BjFi-uJl-B-1i4jgW.js → ReimbursementApprovalRulesPage-_nXCDa2A-BNgKNHzv.js} +8 -8
  133. package/dist/assets/{ReimbursementDetailPage-BersvjG9-CWQWXTAd.js → ReimbursementDetailPage-CtEAsq7u-DRdTiZKG.js} +7 -7
  134. package/dist/assets/{ReimbursementPromoPage-K8dT-rtu-ejmkM2xl.js → ReimbursementPromoPage-BaEX5Ej4-BuvxoLSr.js} +16 -16
  135. package/dist/assets/{ReimbursementSetUpPage-CfBuIpx6-BHJ5mWF-.js → ReimbursementSetUpPage-DXOqEJL4-iJtd4hOD.js} +12 -12
  136. package/dist/assets/{ReimbursementsBulkReviewDrawerPage-yaSD_tF5-CtbYjDdi.js → ReimbursementsBulkReviewDrawerPage-HQg1y1K--CLvh9oMo.js} +1 -1
  137. package/dist/assets/{ReloadCard-Do9Znv21-BdHDUomQ.js → ReloadCard-stfG9ekP-E5rZnPxi.js} +5 -5
  138. package/dist/assets/{ReportTableViewSelector-D1UrK7VQ-B2lv_ic2.js → ReportTableViewSelector-_RTCd2td-Bc2QvO79.js} +7 -7
  139. package/dist/assets/{ReportsPage-dER5Ukfc-CkbR9-hx.js → ReportsPage-BIzz5Dt_-NFZB2f2n.js} +9 -9
  140. package/dist/assets/{RevenueChart-CCr_XauF-DE6xvLaq.js → RevenueChart-DeDVVUge-BKnJBaLk.js} +1 -1
  141. package/dist/assets/{ReviewDetailsPage-ZoXTLGfR-CMQzdLlE.js → ReviewDetailsPage-DZqPpiln-DMAHDtV0.js} +19 -19
  142. package/dist/assets/{ReviewOverlay-Bywh-8pJ-CohY-7e4.js → ReviewOverlay-DcBe94Sd-COJlSRKh.js} +14 -14
  143. package/dist/assets/{RoleWithToolTip-CX9tF-BO-CfHGhDZn.js → RoleWithToolTip-DZO2tooH-B0y78jDy.js} +6 -6
  144. package/dist/assets/{ScheduleDetailsFixedAssetsPage-BEXr2qc0-BzP6cE1T.js → ScheduleDetailsFixedAssetsPage-Cl8iBII0-5-jnemx1.js} +8 -8
  145. package/dist/assets/{ScheduleDetailsPage-CR8uJC5O-BvWjtOn1.js → ScheduleDetailsPage-D6ZxZ2uU-CKiYugJn.js} +3 -3
  146. package/dist/assets/{ScheduleSequenceTable-D7kDvImN-BYm5tvmN.js → ScheduleSequenceTable-eRImHbZn-zcCUBGZK.js} +50 -50
  147. package/dist/assets/{ScreenRoutes-wesefRwS.js → ScreenRoutes-CXwvcn5x.js} +1 -1
  148. package/dist/assets/{SetUpAccountSection-B0J0zCOF-BgXG5DS8.js → SetUpAccountSection-BBZNI1Xl-C0b9akyJ.js} +103 -103
  149. package/dist/assets/{SetUpDefaultSection-ES6v0-xw-DftidMnh.js → SetUpDefaultSection--9Qh-utY-3YrGFMUC.js} +16 -16
  150. package/dist/assets/{SignIn-yQ-8MBRA-CihMyZ7q.js → SignIn-CI0Ik2va-3pWKv9Zj.js} +19 -19
  151. package/dist/assets/{SignInScreen-DS6fEfuU.js → SignInScreen-CCdAg0VB.js} +1 -1
  152. package/dist/assets/{SpendManagementListViewPage-_rUojA3M-EqvrqWBS.js → SpendManagementListViewPage-NWkSnIdD-CxhuHjHo.js} +13 -13
  153. package/dist/assets/{SpendManagementPerTabPage-Bhes-f7M-Cb3eyaQr.js → SpendManagementPerTabPage-CdWwn_b8-liFVp2pd.js} +47 -47
  154. package/dist/assets/{SpendManagementSection-CQHWqht2-DUZQM13E.js → SpendManagementSection-DGhD95sz-DwpipRyt.js} +9 -9
  155. package/dist/assets/{SpendMgmtSetupAccountSection-BHZ9nmWy-XOLb3Fur.js → SpendMgmtSetupAccountSection-DG4ozkeT-CwbSJso6.js} +14 -14
  156. package/dist/assets/{StatementItem-CKnsnb3u-ChM8cclP.js → StatementItem-BlfBohft-EV50IPyl.js} +8 -8
  157. package/dist/assets/StatementsPage-CUpjL5u7-BCXI4rzX.js +58 -0
  158. package/dist/assets/{StatusSwitcher-xR-S3KaW-BKRdafwP.js → StatusSwitcher-C6703BAG-BvT29XW2.js} +4 -4
  159. package/dist/assets/{SubTabSwitcher-DczmDw-I-DARuAs1S.js → SubTabSwitcher-lf9S7Ubj-DJDWAJ0r.js} +1 -1
  160. package/dist/assets/{SummaryCard-YTxf_JPz-B8RE6XJZ.js → SummaryCard-yghz4PLR-Bjx-2ODn.js} +1 -1
  161. package/dist/assets/TaskManagementPage-Cf523C5f-IxjfQuXH.js +508 -0
  162. package/dist/assets/{TimeRangeSwitcher-C5yC8ifv-C8eV7Phr.js → TimeRangeSwitcher-BoPrOhKX-BejCCLXp.js} +5 -5
  163. package/dist/assets/{TimeframeSwitcher-D1xKpIjp-DZocHPU3.js → TimeframeSwitcher-DufweySH-PZfP9LZt.js} +5 -5
  164. package/dist/assets/TimeframeSwitcherWithToggle-BKwe3K9l-4nzCluDg.js +31 -0
  165. package/dist/assets/{TopExCard-CJN2nSdQ-Dyx710RI.js → TopExCard-DrOjlLiv-BAcprpz7.js} +6 -6
  166. package/dist/assets/{TopExDetailPage-ClQK2WDh-vTx0gLy7.js → TopExDetailPage-Ds4zlxKD-CEw3GubR.js} +11 -11
  167. package/dist/assets/{TransactionDetailPage-CcNUBQmc-Bqi04LL8.js → TransactionDetailPage-Csl-Qjxp-EnZp16li.js} +47 -47
  168. package/dist/assets/{TransactionList-Dtqr5BZm-2I1pMc5u.js → TransactionList-2HeLZVn9-CrbbPmBE.js} +13 -13
  169. package/dist/assets/{TransactionListBig-D5_iDOBi-CLtD8kFo.js → TransactionListBig-p6iVof9y-BIk3tMms.js} +18 -18
  170. package/dist/assets/{TransactionListPage-DUCJRiyi-Bc5rziPm.js → TransactionListPage-tnL66tOu-CH3TLKSv.js} +6 -6
  171. package/dist/assets/{TransactionVendorDetailPage-DSpchZAl-CViZ0jmN.js → TransactionVendorDetailPage-DzkUYyCr-CDrpLHNP.js} +6 -6
  172. package/dist/assets/{TransferDrawerPage-BKWQEojA-CbMkqPsC.js → TransferDrawerPage-B9MGSdS9-CzcQLCyn.js} +28 -28
  173. package/dist/assets/{TreasuryOverviewPage-D1D2WipM-Pwv9-UGk.js → TreasuryOverviewPage-BEzBuOWn-BGywb4hM.js} +31 -31
  174. package/dist/assets/{TreasuryPromoPage-BKgJHnC1-DyZjT5wh.js → TreasuryPromoPage-C8X4X7iN-D0YArboa.js} +15 -15
  175. package/dist/assets/TreasurySetupPage-Cb_GW75l-CXuYmMxJ.js +152 -0
  176. package/dist/assets/{TreasuryStatementsPage-DKHWWnrU-B3Bgyu2R.js → TreasuryStatementsPage-sOiD2QYm-_sZuOKSh.js} +7 -7
  177. package/dist/assets/{TreasuryTaxLetterPage-ieX9MUQd-FaNLEXUv.js → TreasuryTaxLetterPage-DYzqfHym-58oHHynw.js} +7 -7
  178. package/dist/assets/{TreasuryTransferOrReviewPage-DebuIwR3-DyjGtRDG.js → TreasuryTransferOrReviewPage-CesaUuNp-BPIM69Eo.js} +85 -85
  179. package/dist/assets/{TrendChart-B3VgdtYY-Dy5fluFV.js → TrendChart-kwGU0d90-GuSGL0hJ.js} +3 -3
  180. package/dist/assets/{TrendWithTransactions-BMorBxWJ-C0G8In8o.js → TrendWithTransactions-CUlTYGIm-CezwwQyi.js} +3 -3
  181. package/dist/assets/{UncategorizedAccountsMappingPage-BtmfySl9-BN2ZnER4.js → UncategorizedAccountsMappingPage-D76VPNEd-0jriRkP3.js} +15 -15
  182. package/dist/assets/{UnitIntegrationPage-ByqJQgJ1-BX7a3DQa.js → UnitIntegrationPage-BsZCe-lq-DHXBulD5.js} +4 -4
  183. package/dist/assets/{UploadAdditionalDocumentOverlay-Dwv3x7HQ-Ct27O0zE.js → UploadAdditionalDocumentOverlay-B3tUNhKj-B-Cnmuf3.js} +1 -1
  184. package/dist/assets/{Vendor2FAPopup-BVCUSOMr-BGHN4Pyc.js → Vendor2FAPopup-Bk-WKgMh-DEL2u-h6.js} +1 -1
  185. package/dist/assets/{VendorACHDetailsPage-Cyp1bTJx-DCBHt584.js → VendorACHDetailsPage-u8a3XF33-D560uVGS.js} +1 -1
  186. package/dist/assets/{VendorDetailPage-1_rVoehK-BobdIlMd.js → VendorDetailPage-B-RdB79n-DCaK7fJL.js} +15 -15
  187. package/dist/assets/{VendorDomesticWireDetailsPage-B0wv2GP--DTrjpRQD.js → VendorDomesticWireDetailsPage-Bhb1Dmge-CBaHEUU6.js} +1 -1
  188. package/dist/assets/{VendorFiling1099EditablePage-C5rHkQrV-CdnxzjBF.js → VendorFiling1099EditablePage-DHRivhBg-D2O_5fGv.js} +10 -10
  189. package/dist/assets/{VendorFirstReviewPage-CDlmZHmw-F8vzLeda.js → VendorFirstReviewPage-Cn2GBsyl-Crwyd647.js} +29 -29
  190. package/dist/assets/{VendorInternationalWireDetailsPage-Cdy000Jx-D5vc2ds4.js → VendorInternationalWireDetailsPage-Cjx1hvUL-CfeyeaMQ.js} +7 -7
  191. package/dist/assets/{VendorInternationalWireSwiftDetailsPage-DRN-5n5Y-BNzUBPow.js → VendorInternationalWireSwiftDetailsPage-BszRCCDh-BwXuAv_8.js} +1 -1
  192. package/dist/assets/{VendorsAccountsSection-Ba7QpWAm-BA29ezpA.js → VendorsAccountsSection-D6VSJUo1-D3zBJygS.js} +4 -4
  193. package/dist/assets/{WarningsDrawerPage-DCUPzxfi-Cw0kcPsl.js → WarningsDrawerPage-DReVGPEj-CByBNeKa.js} +4 -4
  194. package/dist/assets/{ZeniAccountDetailPage-DF7Tn3t3-Bb4ItLLQ.js → ZeniAccountDetailPage-CFTB_WYX-BNpX3bjE.js} +28 -28
  195. package/dist/assets/{ZeniAccountListViewPage-Cz9v3TCo-DC90elHU.js → ZeniAccountListViewPage-BmYgbIuC-CB7ObKhn.js} +18 -18
  196. package/dist/assets/ZeniAccountNavBarPieces-gzy5T7nu-3EZY4gW6.js +14 -0
  197. package/dist/assets/{ZeniAccountPromoPage-D7veJGZk-CE2g39oZ.js → ZeniAccountPromoPage-AfRVTc8V-Ck8cpTYF.js} +10 -10
  198. package/dist/assets/{ZeniAccountSetupPage-ftl559Pj-DUN6Xu8R.js → ZeniAccountSetupPage-YXJmpz_d-DVvqqczO.js} +1 -1
  199. package/dist/assets/{ZeniCopyright-BScA_p2_-3vVWZkac.js → ZeniCopyright-CqpcrgAZ-sq7_yXnA.js} +1 -1
  200. package/dist/assets/{ZeniTransferAmountSlider-Bu23FZCA-L2os7fMa.js → ZeniTransferAmountSlider-DGkzRyMW-Btixfh5b.js} +1 -1
  201. package/dist/assets/analytics-DThoELaW.js +7 -0
  202. package/dist/assets/{analyticsHelper-SSZc85h7.js → analyticsHelper-adG_BjY9.js} +1 -1
  203. package/dist/assets/{analyticsHelper-CGq-fGOi-CdOAgckK.js → analyticsHelper-sgo3pabT-K1toqw66.js} +1 -1
  204. package/dist/assets/{chartTypes-ChsIdl40-BAMg3Yoy.js → chartTypes-Dj-_K0Gi-BTPAwFj5.js} +1 -1
  205. package/dist/assets/{commonDimensions-Dk1fkj7r-DiuY44GO.js → commonDimensions-CKgBEMhT-DV1PneSk.js} +1 -1
  206. package/dist/assets/{detailCommon-BdiFpATU-C4tIDJfX.js → detailCommon-vtB2ffbe-CI1tw59v.js} +6 -6
  207. package/dist/assets/{downloadPdf-h21F3Bzk-BukvqPr-.js → downloadPdf-CiC0AXNH-BaYefCbJ.js} +1 -1
  208. package/dist/assets/{index-BU_OFOHO.js → index-nrhSmhQT.js} +3364 -3324
  209. package/dist/assets/{liveblocks-BUGn2yQ6.js → liveblocks-sSQ9JElv.js} +1 -1
  210. package/dist/assets/{mapLoadingInProgressToTreeNode-Bimz-BOL-DbOC86fY.js → mapLoadingInProgressToTreeNode-0MIZwF_y-C-JcxjaL.js} +1 -1
  211. package/dist/assets/{mapSectionWithAcOnlyToTreeNode-Dy2RH2lH--F7hkKSm.js → mapSectionWithAcOnlyToTreeNode-CWaIGa37-TStxu4Jm.js} +1 -1
  212. package/dist/assets/{mapSpacerToTreeNode-CadZGfr8-BC_KRXsY.js → mapSpacerToTreeNode-1Bdqp9WS-BwfPBFlV.js} +1 -1
  213. package/dist/assets/{mapTimeframeBalancesToTreeNode-BvXiirfs-BVF2yIEM.js → mapTimeframeBalancesToTreeNode-MPZhFWqo-BaV0QGS3.js} +1 -1
  214. package/dist/assets/mui-C5LQ0bMa.js +25 -0
  215. package/dist/assets/{play-icon-DD7TfH-R-DFC4jJ2P.js → play-icon-CF-Mkuir-DlDAGdqf.js} +1 -1
  216. package/dist/assets/{redux-DmDqXYej.js → redux-ByjIRbhZ.js} +1 -1
  217. package/dist/assets/{routing-BNz5gZgX.js → routing-Cpaypegg.js} +1 -1
  218. package/dist/assets/{toCOABalancesWithID-Dy9J_UtA-BOr91SlJ.js → toCOABalancesWithID-D1BwrImS-goHqPuef.js} +1 -1
  219. package/dist/assets/{toChartData-BdomEAJ--DsSFVPa5.js → toChartData-DVTo0PPD-CtviYuE-.js} +1 -1
  220. package/dist/assets/{treasuryColorHelper-D2LtJllD-vFc_5JFm.js → treasuryColorHelper-QzSX5YTe-9nXuNVNj.js} +1 -1
  221. package/dist/assets/{uploadAttachment-C5PL0FaC-BEd4sEZo.js → uploadAttachment-BxwOR3I5-CYLMnUD6.js} +29 -29
  222. package/dist/assets/{uploadReceipts-BH9fi3Vt-Dy17GpvZ.js → uploadReceipts-Buvz7DfG-D9z5xpPz.js} +1 -1
  223. package/dist/index.html +1 -1
  224. package/package.json +5 -5
  225. package/dist/assets/AccountInfoPage-d3ST-rTL-C3RGUA9e.js +0 -18
  226. package/dist/assets/AccountRow-t4I1y-2K-CtaiIm2n.js +0 -298
  227. package/dist/assets/BillingSettingsPage-CmvoTc8r-DeChOFZr.js +0 -44
  228. package/dist/assets/BillsBulkReviewDrawerPage-OSbHVAMk-DHypnLOn.js +0 -1
  229. package/dist/assets/ChargeCardPromoPage-BzcIsHeK-DWt1qpzp.js +0 -175
  230. package/dist/assets/CheckDepositDrawerPage-BwJ5tAF--BOjUwQ0e.js +0 -206
  231. package/dist/assets/ConfettiBurst-MKPxinI7-D5PjCF0D.js +0 -1
  232. package/dist/assets/CustomerOnboardingContainerPage-D2xC_a0G-Edo-ai-j.js +0 -1
  233. package/dist/assets/CustomerOnboardingPage-Cuf1lJmu-DJVUg9pf.js +0 -107
  234. package/dist/assets/Dashboard-DnR1KvYd-qcmjh10k.js +0 -778
  235. package/dist/assets/DomesticWireDetailsPage-Bvmpk8LN-Cb6zfshw.js +0 -21
  236. package/dist/assets/EditPeoplePage-BTnhywM--C7FSnENf.js +0 -55
  237. package/dist/assets/HelpButton-BKCFqzW3-mV3KEyfP.js +0 -28
  238. package/dist/assets/InvitePeoplePage-fzgtceuE-Ds-gEhhL.js +0 -12
  239. package/dist/assets/LabeledDocumentField-Dv4qzOY0-B2ZnIaW5.js +0 -41
  240. package/dist/assets/LabeledDropDownFormattedTextField-BFMEaVfR-Cbq5gKFg.js +0 -59
  241. package/dist/assets/NoDataChart-BsN_tNbW-DRgn1703.js +0 -26
  242. package/dist/assets/NotificationsListConfig-DtsQwW2b-D98CVoY-.js +0 -1
  243. package/dist/assets/StatementsPage-B73U7d9e-DHwgyw8_.js +0 -58
  244. package/dist/assets/TaskManagementPage-LDFC29Ik-C44JMD6X.js +0 -508
  245. package/dist/assets/TimeframeSwitcherWithToggle-BiHAqit5-BfVPVHhs.js +0 -31
  246. package/dist/assets/TreasurySetupPage-C2JtTOhh-C5WOQnSa.js +0 -152
  247. package/dist/assets/ZeniAccountNavBarPieces-BSObmR0D-Dr6kpot6.js +0 -14
  248. package/dist/assets/analytics-BSSiLa6f.js +0 -7
  249. package/dist/assets/mui-BgvZYSo0.js +0 -22
@@ -1,4 +1,4 @@
1
- import{X as T,cg as B,a5 as A,co as S,M as I,C as n,j as a,Y as z,c6 as x,c8 as w,cm as M,am as L,o as g,eS as R,eU as V,p as t,d as C,s as q}from"./index-BU_OFOHO.js";import{b as H,n as b}from"./vendor-CnQcJ2Lu.js";const E=b.div`
1
+ import{X as T,cf as B,a1 as A,cn as S,M as I,C as n,j as a,Y as z,c5 as x,c7 as w,cl as M,ag as L,o as g,eP as R,eR as V,p as t,d as C,q}from"./index-nrhSmhQT.js";import{b as H,n as b}from"./vendor-CnQcJ2Lu.js";const E=b.div`
2
2
  color: ${e=>e.theme.colors.primary};
3
3
  align-items: center;
4
4
  justify-content: flex-end;
@@ -37,7 +37,7 @@ import{X as T,cg as B,a5 as A,co as S,M as I,C as n,j as a,Y as z,c6 as x,c8 as
37
37
  border-bottom-left-radius: inherit;
38
38
  border-bottom-right-radius: inherit;
39
39
  }
40
- `,u={largeLabelWidth:new n(120,140,220),paddingTopBottom:new n(t[2],t[2]),labelHeight:new n(t[6],t[6]),labelMarginLeft:new n(t[3],t[4]),labelMarginRight:new n(t[3],t[4]),labelMarginTop:new n(t[2],t[2]),controlHeight:new n(t[6],t[6])},_=({sectionId:e,bankAccountToCreate:i,isDisabled:o,fetchBankNameByRoutingStatus:s,style:h})=>{const m=T(),{getValues:D,setValue:N,formState:{errors:P}}=B(),v=A(s.fetchState),k=A(i?.bankRoutingNumber),$=S(P,r(e,"bankName"));H.useEffect(()=>{(v==="In-Progress"||k!=null&&k!==i?.bankRoutingNumber)&&s.fetchState==="Completed"&&i?.bankName!=null&&N(r(e,"bankName"),i?.bankName,{shouldValidate:$})},[v,k,$,s.fetchState,e,i?.bankName,i?.bankRoutingNumber,N]);const j=s.fetchState==="Completed"||s.fetchState==="Error"?o:"disabled",y=I.getLocalizedStrings().spendManagement.billPay.vendorCreation,{achDetails:l}=y,c=u.largeLabelWidth.value(m);return a.jsx(K,{style:h,"data-testid":z("bank-account-section",e),children:a.jsxs(J,{children:[a.jsx(x,{label:{label:l.bankRoutingNumber,width:c},text:{type:"text",name:r(e,"bankRoutingNumber"),placeholder:w(l.bankRoutingNumber),defaultValue:i?.bankRoutingNumber,options:{required:!0,pattern:/^\d{9}$/}},isDisabled:o,style:{width:"auto"},showAdditionalInfoLabel:!1,additionalInfoLabel:l.invalidRoutingNumber}),a.jsx(f,{}),s.fetchState==="In-Progress"?a.jsx(O,{label:{label:l.bankName,width:c},loader:{placeholder:l.fetchingBankName},style:{width:"auto"}}):a.jsx(x,{label:{label:l.bankName,width:c},text:{type:"text",name:r(e,"bankName"),placeholder:w(l.bankName),defaultValue:i?.bankName,options:{required:!0}},isDisabled:j,style:{width:"auto",opacity:j==="disabled"?.32:1},showAdditionalInfoLabel:!1,additionalInfoLabel:l.invalidBankName}),a.jsx(f,{}),a.jsxs(Q,{size:m,children:[a.jsx(M,{label:y.achDetails.accountTypeLabel,htmlFor:r(e,"bankAccountType"),style:{marginLeft:u.labelMarginLeft.value(m),marginRight:u.labelMarginRight.value(m),width:c}}),a.jsxs(U,{labelWidth:c,size:m,children:[a.jsx(L,{label:{label:y.achDetails.checkingAccountTypeLabel},style:{paddingRight:`${g.sp4}`,width:"auto"},radioField:{name:r(e,"bankAccountType"),id:"checking",value:"checking",registerOptions:{required:!0}}}),a.jsx(L,{label:{label:y.achDetails.savingsAccountTypeLabel},style:{width:"auto"},radioField:{name:r(e,"bankAccountType"),id:"savings",value:"savings",registerOptions:{required:!0}}})]})]}),a.jsx(f,{}),a.jsx(x,{label:{label:l.bankAccountNumber,width:c},text:{type:"text",name:r(e,"bankAccountNumber"),placeholder:w(l.bankAccountNumber),defaultValue:i?.bankAccountNumber,options:{required:!0,validate:p=>p!=null?V.accountNumber(p).isValid:!0,pattern:R}},isDisabled:o,style:{width:"auto"},showAdditionalInfoLabel:!1,additionalInfoLabel:l.invalidAccountNumber}),a.jsx(f,{}),a.jsx(x,{label:{label:l.confirmedBankAccountNumber,width:c},text:{type:"text",name:r(e,"confirmedBankAccountNumber"),placeholder:l.confirmedBankAccountNumberPlaceholder,defaultValue:i?.confirmedBankAccountNumber,options:{required:!0,pattern:R,validate:p=>p!=null?D(`${e}.bankAccountNumber`)===p:!1}},disableCopyPaste:!0,isDisabled:o,style:{width:"auto"},showAdditionalInfoLabel:!1,additionalInfoLabel:l.accountNumberDontMatch}),a.jsx(f,{}),a.jsx(x,{label:{label:l.accountNickName,width:c},text:{type:"text",name:r(e,"bankAccountName"),placeholder:w(l.accountNickName),defaultValue:i?.bankAccountName,options:{required:!1}},isDisabled:o,style:{width:"auto"}})]})})},r=(e,i)=>`${e}.${i}`,K=b.div`
40
+ `,u={largeLabelWidth:new n(120,140,220),paddingTopBottom:new n(t[2],t[2]),labelHeight:new n(t[6],t[6]),labelMarginLeft:new n(t[3],t[4]),labelMarginRight:new n(t[3],t[4]),labelMarginTop:new n(t[2],t[2]),controlHeight:new n(t[6],t[6])},U=({sectionId:e,bankAccountToCreate:i,isDisabled:o,fetchBankNameByRoutingStatus:s,style:h})=>{const m=T(),{getValues:P,setValue:N,formState:{errors:D}}=B(),v=A(s.fetchState),k=A(i?.bankRoutingNumber),$=S(D,r(e,"bankName"));H.useEffect(()=>{(v==="In-Progress"||k!=null&&k!==i?.bankRoutingNumber)&&s.fetchState==="Completed"&&i?.bankName!=null&&N(r(e,"bankName"),i?.bankName,{shouldValidate:$})},[v,k,$,s.fetchState,e,i?.bankName,i?.bankRoutingNumber,N]);const j=s.fetchState==="Completed"||s.fetchState==="Error"?o:"disabled",y=I.getLocalizedStrings().spendManagement.billPay.vendorCreation,{achDetails:l}=y,c=u.largeLabelWidth.value(m);return a.jsx(K,{style:h,"data-testid":z("bank-account-section",e),children:a.jsxs(J,{children:[a.jsx(x,{label:{label:l.bankRoutingNumber,width:c},text:{type:"text",name:r(e,"bankRoutingNumber"),placeholder:w(l.bankRoutingNumber),defaultValue:i?.bankRoutingNumber,options:{required:!0,pattern:/^\d{9}$/}},isDisabled:o,style:{width:"auto"},showAdditionalInfoLabel:!1,additionalInfoLabel:l.invalidRoutingNumber}),a.jsx(f,{}),s.fetchState==="In-Progress"?a.jsx(O,{label:{label:l.bankName,width:c},loader:{placeholder:l.fetchingBankName},style:{width:"auto"}}):a.jsx(x,{label:{label:l.bankName,width:c},text:{type:"text",name:r(e,"bankName"),placeholder:w(l.bankName),defaultValue:i?.bankName,options:{required:!0}},isDisabled:j,style:{width:"auto",opacity:j==="disabled"?.32:1},showAdditionalInfoLabel:!1,additionalInfoLabel:l.invalidBankName}),a.jsx(f,{}),a.jsxs(Q,{size:m,children:[a.jsx(M,{label:y.achDetails.accountTypeLabel,htmlFor:r(e,"bankAccountType"),style:{marginLeft:u.labelMarginLeft.value(m),marginRight:u.labelMarginRight.value(m),width:c}}),a.jsxs(X,{labelWidth:c,size:m,children:[a.jsx(L,{label:{label:y.achDetails.checkingAccountTypeLabel},style:{paddingRight:`${g.sp4}`,width:"auto"},radioField:{name:r(e,"bankAccountType"),id:"checking",value:"checking",registerOptions:{required:!0}}}),a.jsx(L,{label:{label:y.achDetails.savingsAccountTypeLabel},style:{width:"auto"},radioField:{name:r(e,"bankAccountType"),id:"savings",value:"savings",registerOptions:{required:!0}}})]})]}),a.jsx(f,{}),a.jsx(x,{label:{label:l.bankAccountNumber,width:c},text:{type:"text",name:r(e,"bankAccountNumber"),placeholder:w(l.bankAccountNumber),defaultValue:i?.bankAccountNumber,options:{required:!0,validate:p=>p!=null?V.accountNumber(p).isValid:!0,pattern:R}},isDisabled:o,style:{width:"auto"},showAdditionalInfoLabel:!1,additionalInfoLabel:l.invalidAccountNumber}),a.jsx(f,{}),a.jsx(x,{label:{label:l.confirmedBankAccountNumber,width:c},text:{type:"text",name:r(e,"confirmedBankAccountNumber"),placeholder:l.confirmedBankAccountNumberPlaceholder,defaultValue:i?.confirmedBankAccountNumber,options:{required:!0,pattern:R,validate:p=>p!=null?P(`${e}.bankAccountNumber`)===p:!1}},disableCopyPaste:!0,isDisabled:o,style:{width:"auto"},showAdditionalInfoLabel:!1,additionalInfoLabel:l.accountNumberDontMatch}),a.jsx(f,{}),a.jsx(x,{label:{label:l.accountNickName,width:c},text:{type:"text",name:r(e,"bankAccountName"),placeholder:w(l.accountNickName),defaultValue:i?.bankAccountName,options:{required:!1}},isDisabled:o,style:{width:"auto"}})]})})},r=(e,i)=>`${e}.${i}`,K=b.div`
41
41
  display: flex;
42
42
  flex-direction: column;
43
43
  `,J=b.div`
@@ -67,7 +67,7 @@ import{X as T,cg as B,a5 as A,co as S,M as I,C as n,j as a,Y as z,c6 as x,c8 as
67
67
  z-index: 1;
68
68
  outline: 1px solid ${e=>e.theme.colors.primary};
69
69
  }
70
- `,U=b.div`
70
+ `,X=b.div`
71
71
  display: flex;
72
72
  flex-direction: row;
73
73
  width: ${e=>`calc(100% - ${e.labelWidth}px)`};
@@ -76,4 +76,4 @@ import{X as T,cg as B,a5 as A,co as S,M as I,C as n,j as a,Y as z,c6 as x,c8 as
76
76
  flex-grow: 1;
77
77
  height: ${e=>u.controlHeight.valuePx(e.size)};
78
78
  align-items: center;
79
- `;export{_ as e};
79
+ `;export{U as e};
@@ -1,4 +1,4 @@
1
- import{X as u,j as o,Y as $,bu as w,M as b,o as e,C as a,bq as k,Q as f,h as v,g as l,eT as j,s as z,p as r}from"./index-BU_OFOHO.js";import{n}from"./vendor-CnQcJ2Lu.js";const{common:{navBar:{back:C}}}=b.getLocalizedStrings(),s={navBarContainerPadding:new a(10,r[3]),customTitleMarginBottom:new a(r[0],r[3]),customTitleMarginLeft:new a(r[3],r[6]),customTitleMarginRight:new a(r[5],r[8])},P={formTitle:new f("h6Medium","h5Medium")},G=({header:i,isDirty:d,isMagicLink:g,onBackClick:m,setShowConfirmationPopup:p})=>{const t=u();return o.jsxs(o.Fragment,{children:[t==="small"?o.jsxs(M,{windowSize:t,children:[g?null:o.jsx(x,{onClick:()=>d?p?.(!0):m?.(),"data-testid":$("bank-account-page-back-click-mobile")}),o.jsx(h,{windowSize:t,children:i})]}):o.jsx(y,{children:g?null:o.jsx(w,{title:C,enterDelay:600,placement:"bottom",children:o.jsx(x,{onClick:()=>d?p?.(!0):m?.(),"data-testid":$("bank-account-page-back-click")})})}),t!=="small"?o.jsx(h,{windowSize:t,children:i}):null]})},h=n(v)`
1
+ import{X as u,j as o,Y as $,bs as w,M as b,o as e,C as a,bo as k,Q as f,h as v,g as l,eQ as j,q as z,p as r}from"./index-nrhSmhQT.js";import{n}from"./vendor-CnQcJ2Lu.js";const{common:{navBar:{back:C}}}=b.getLocalizedStrings(),s={navBarContainerPadding:new a(10,r[3]),customTitleMarginBottom:new a(r[0],r[3]),customTitleMarginLeft:new a(r[3],r[6]),customTitleMarginRight:new a(r[5],r[8])},P={formTitle:new f("h6Medium","h5Medium")},G=({header:i,isDirty:d,isMagicLink:g,onBackClick:m,setShowConfirmationPopup:p})=>{const t=u();return o.jsxs(o.Fragment,{children:[t==="small"?o.jsxs(M,{windowSize:t,children:[g?null:o.jsx(x,{onClick:()=>d?p?.(!0):m?.(),"data-testid":$("bank-account-page-back-click-mobile")}),o.jsx(h,{windowSize:t,children:i})]}):o.jsx(y,{children:g?null:o.jsx(w,{title:C,enterDelay:600,placement:"bottom",children:o.jsx(x,{onClick:()=>d?p?.(!0):m?.(),"data-testid":$("bank-account-page-back-click")})})}),t!=="small"?o.jsx(h,{windowSize:t,children:i}):null]})},h=n(v)`
2
2
  ${i=>`${P.formTitle.style(i.windowSize)}`};
3
3
  color: ${i=>i.theme.colors.primary};
4
4
  margin-bottom: ${i=>s.customTitleMarginBottom.valuePx(i.windowSize)};
@@ -26,7 +26,7 @@ import{X as u,j as o,Y as $,bu as w,M as b,o as e,C as a,bq as k,Q as f,h as v,g
26
26
  padding-left: ${e.sp0};
27
27
  z-index: 2;
28
28
  background-color: ${i=>i.theme.colors.grey4};
29
- `,c={marginBottom:new a(r[5],r[3]),marginRight:new a(r[3],r[8]),marginLeft:new a(r[3],r[6])},Q=({warningText:i})=>{const d=u();return o.jsxs(S,{size:d,children:[o.jsx(B,{children:o.jsx(L,{})}),o.jsx(T,{children:i})]})},S=n.div`
29
+ `,c={marginBottom:new a(r[5],r[3]),marginRight:new a(r[3],r[8]),marginLeft:new a(r[3],r[6])},Q=({warningText:i})=>{const d=u();return o.jsxs(S,{size:d,children:[o.jsx(T,{children:o.jsx(D,{})}),o.jsx(B,{children:i})]})},S=n.div`
30
30
  display: flex;
31
31
  background-color: ${l.alertLight};
32
32
  border: 1px solid ${l.brandColorGoldDark};
@@ -36,15 +36,15 @@ import{X as u,j as o,Y as $,bu as w,M as b,o as e,C as a,bq as k,Q as f,h as v,g
36
36
  padding: ${e.sp3} ${e.sp4} ${e.sp3} ${e.sp4};
37
37
  margin-right: ${i=>c.marginRight.valuePx(i.size)};
38
38
  margin-left: ${i=>c.marginLeft.valuePx(i.size)};
39
- `,T=n(z)`
39
+ `,B=n(z)`
40
40
  display: flex;
41
41
  flex-grow: 1;
42
42
  color: ${l.brandColorGoldDark};
43
- `,B=n.div`
43
+ `,T=n.div`
44
44
  display: flex;
45
45
  align-items: center;
46
46
  margin-right: ${e.sp2};
47
- `,L=n(j)`
47
+ `,D=n(j)`
48
48
  width: ${e.sp4};
49
49
  height: ${e.sp4};
50
50
  color: ${l.brandColorGoldDark};
@@ -1,4 +1,4 @@
1
- import{u as ae,X as we,a as He,c3 as qe,j as t,aW as Je,M as J,o as i,d as q,bK as Ge,F as Ye,bu as Ze,C as f,f as Qe,s as A,as as Ke,q as Ie,Q as Xe,cg as et,a5 as de,ab as X,e_ as tt,l as Z,co as nt,aQ as Le,f6 as Oe,f7 as it,f8 as ot,bD as $e,p as h,e$ as ee,f0 as te,_ as ne,bV as ie,Y as at,b6 as lt,dI as Fe,g as V,v,f5 as ct,fj as st,fk as rt,cZ as dt,fl as ut}from"./index-BU_OFOHO.js";import{b,n}from"./vendor-CnQcJ2Lu.js";import{n as pt}from"./SetUpAccountSection-B0J0zCOF-BgXG5DS8.js";import{r as ht}from"./mui-BgvZYSo0.js";import{M as mt}from"./ChaseOverlay-B1cuawle-CSkF_51t.js";import{R as gt,z as wt}from"./SpendMgmtSetupAccountSection-BHZ9nmWy-XOLb3Fur.js";import"./analytics-BSSiLa6f.js";import"./routing-BNz5gZgX.js";import"./sentry-HDxG13yk.js";import"./redux-DmDqXYej.js";import"./liveblocks-BUGn2yQ6.js";import"./crypto-BURQLTgV.js";import"./SetUpDefaultSection-ES6v0-xw-DftidMnh.js";import"./ChargeCardUtils-CLpd-HDH-dMJ2Q_93.js";import"./CreditCardPaymentPlgSection-D5CNl0oa-DiWqHLoj.js";const{settings:{bankConnectionHeader:G}}=J.getLocalizedStrings().common,ft={value:G.productType,width:new f(100,19)},xt={value:G.primaryAccount,width:new f(100,36)},yt={value:G.linkAccount,width:new f(100,22)},St={value:G.status,width:new f(12,12)},bt={value:G.balance,width:new f(12,13)},P=[ft,xt,yt,St,bt],{common:{settings:ue,strings:{empty:vt,hyphen:$t}}}=J.getLocalizedStrings(),Q={paymentAccountIconSize:new f(h[6],h[7])},zt=()=>null,kt=({paymentAccount:e,bankAccountList:a,balanceFetchStatus:L,onRemoveConnection:O})=>{const s=ae(),d=we(),[$,z]=b.useState(!1),w=e?.providerVerificationStatus,c=s.mode==="light"?new X(s.colors.brandColorJadeLight):new X(s.colors.brandColorJadeDark),F={element:t.jsx(Wt,{windowSize:d}),color:c},M=a.find(l=>l.accountId===e.zeniAccountId),R=()=>{z(l=>!l)};return t.jsxs(jt,{onMouseEnter:R,onMouseLeave:R,children:[t.jsxs(At,{windowSize:d,wrapperWidth:P[0].width,children:[t.jsx(Ct,{children:ue.otherAccount.title}),t.jsx(Tt,{children:ue.otherAccount.subTitle})]}),t.jsxs(Pt,{windowSize:d,wrapperWidth:P[1].width,children:[pt(F,d,s.mode==="dark",e,!0),t.jsxs(Dt,{children:[t.jsx(Bt,{children:t.jsx(Vt,{windowSize:d,children:e.institutionDetails.institutionName})}),t.jsx(Mt,{windowSize:d,children:t.jsxs(Ut,{children:[t.jsx(Et,{children:e.accountSubType?.name}),t.jsx(Nt,{children:e.maskedAccountNumber})]})})]})]}),t.jsx(_t,{windowSize:d,wrapperWidth:P[2].width,children:M?.accountName??vt}),t.jsx(It,{windowSize:d,wrapperWidth:P[3].width,children:w!=null?t.jsx(ee,{style:{width:"max-content",padding:0,marginTop:i.sp2},tagTitle:w.name,textColor:te(w.code)}):$t}),t.jsxs(Lt,{windowSize:d,wrapperWidth:P[4].width,children:[t.jsx(Ot,{className:"balanceLabel",isRemoveHovered:$,children:ne("0,0.[00]",e.balances?.available)}),e.balances?.lastRefreshTime?t.jsx(Ft,{className:"balanceLabel",isRemoveHovered:$,children:ie(e.balances?.lastRefreshTime)}):L?.fetchState==="In-Progress"?t.jsx(q,{size:"Small",start:!0}):null,$&&t.jsx(Rt,{children:t.jsx(Fe,{moreIconType:"plain",options:[{label:ue.otherAccount.remove,value:"remove"}],customStyleConfig:{valueContainer:()=>({height:i.sp3,".more-icon":{width:i.sp3,height:i.sp3,color:s.colors.primary}}),container:()=>({marginLeft:i.sp0,position:"relative"}),control:()=>({background:"transparent"}),menu:()=>({position:"absolute",right:0,borderRadius:i.sp1,marginTop:i.sp2,background:s.colors.grey5,width:"162px",border:`1px solid ${s.colors.grey3}`,boxShadow:`${i.sp0} 1px 2px ${i.sp0} ${V.boxShadowElevation}`}),option:()=>({height:i.sp6,paddingLeft:i.sp3,paddingRight:i.sp3,display:"flex",alignItems:"center",color:V.important,":hover":{color:V.important,backgroundColor:s.colors.background}})},menuPlacement:"bottom",onOptionSelection:l=>{l==="remove"&&O(e.paymentAccountId)},valueToIcon:zt})})]})]})},jt=n.div`
1
+ import{u as ae,X as we,a as He,c2 as qe,j as t,aW as Je,M as J,o as i,d as q,bJ as Ge,F as Ye,bs as Qe,C as f,f as Ze,q as A,an as Xe,v as Ie,Q as Ke,cf as et,a1 as de,a7 as K,eX as tt,l as Q,cn as nt,aQ as Le,f3 as Oe,f4 as it,f5 as ot,bB as $e,p as h,eY as ee,eZ as te,_ as ne,bU as ie,Y as at,b4 as lt,dG as Fe,g as V,w as v,f2 as ct,fg as st,fh as rt,aA as dt,fi as ut}from"./index-nrhSmhQT.js";import{b,n}from"./vendor-CnQcJ2Lu.js";import{a as pt}from"./SetUpAccountSection-BBZNI1Xl-C0b9akyJ.js";import{r as ht}from"./mui-C5LQ0bMa.js";import{M as mt}from"./ChaseOverlay-KLet3F9X-BJh9nem5.js";import{R as gt,z as wt}from"./SpendMgmtSetupAccountSection-DG4ozkeT-CwbSJso6.js";import"./analytics-DThoELaW.js";import"./routing-Cpaypegg.js";import"./sentry-HDxG13yk.js";import"./redux-ByjIRbhZ.js";import"./liveblocks-sSQ9JElv.js";import"./crypto-BURQLTgV.js";import"./SetUpDefaultSection--9Qh-utY-3YrGFMUC.js";import"./ChargeCardUtils-B3JEziD7-CwQE9qIG.js";import"./CreditCardPaymentPlgSection-DoMaCnIZ-BpT8OJXl.js";const{settings:{bankConnectionHeader:G}}=J.getLocalizedStrings().common,ft={value:G.productType,width:new f(100,19)},xt={value:G.primaryAccount,width:new f(100,36)},yt={value:G.linkAccount,width:new f(100,22)},St={value:G.status,width:new f(12,12)},bt={value:G.balance,width:new f(12,13)},P=[ft,xt,yt,St,bt],{common:{settings:ue,strings:{empty:vt,hyphen:$t}}}=J.getLocalizedStrings(),Z={paymentAccountIconSize:new f(h[6],h[7])},zt=()=>null,kt=({paymentAccount:e,bankAccountList:a,balanceFetchStatus:L,onRemoveConnection:O})=>{const s=ae(),d=we(),[$,z]=b.useState(!1),w=e?.providerVerificationStatus,c=s.mode==="light"?new K(s.colors.brandColorJadeLight):new K(s.colors.brandColorJadeDark),F={element:t.jsx(Bt,{windowSize:d}),color:c},M=a.find(l=>l.accountId===e.zeniAccountId),R=()=>{z(l=>!l)};return t.jsxs(jt,{onMouseEnter:R,onMouseLeave:R,children:[t.jsxs(At,{windowSize:d,wrapperWidth:P[0].width,children:[t.jsx(Ct,{children:ue.otherAccount.title}),t.jsx(Tt,{children:ue.otherAccount.subTitle})]}),t.jsxs(Pt,{windowSize:d,wrapperWidth:P[1].width,children:[pt(F,d,s.mode==="dark",e,!0),t.jsxs(Wt,{children:[t.jsx(Dt,{children:t.jsx(Vt,{windowSize:d,children:e.institutionDetails.institutionName})}),t.jsx(Mt,{windowSize:d,children:t.jsxs(Ut,{children:[t.jsx(Et,{children:e.accountSubType?.name}),t.jsx(Nt,{children:e.maskedAccountNumber})]})})]})]}),t.jsx(_t,{windowSize:d,wrapperWidth:P[2].width,children:M?.accountName??vt}),t.jsx(It,{windowSize:d,wrapperWidth:P[3].width,children:w!=null?t.jsx(ee,{style:{width:"max-content",padding:0,marginTop:i.sp2},tagTitle:w.name,textColor:te(w.code)}):$t}),t.jsxs(Lt,{windowSize:d,wrapperWidth:P[4].width,children:[t.jsx(Ot,{className:"balanceLabel",isRemoveHovered:$,children:ne("0,0.[00]",e.balances?.available)}),e.balances?.lastRefreshTime?t.jsx(Ft,{className:"balanceLabel",isRemoveHovered:$,children:ie(e.balances?.lastRefreshTime)}):L?.fetchState==="In-Progress"?t.jsx(q,{size:"Small",start:!0}):null,$&&t.jsx(Rt,{children:t.jsx(Fe,{moreIconType:"plain",options:[{label:ue.otherAccount.remove,value:"remove"}],customStyleConfig:{valueContainer:()=>({height:i.sp3,".more-icon":{width:i.sp3,height:i.sp3,color:s.colors.primary}}),container:()=>({marginLeft:i.sp0,position:"relative"}),control:()=>({background:"transparent"}),menu:()=>({position:"absolute",right:0,borderRadius:i.sp1,marginTop:i.sp2,background:s.colors.grey5,width:"162px",border:`1px solid ${s.colors.grey3}`,boxShadow:`${i.sp0} 1px 2px ${i.sp0} ${V.boxShadowElevation}`}),option:()=>({height:i.sp6,paddingLeft:i.sp3,paddingRight:i.sp3,display:"flex",alignItems:"center",color:V.important,":hover":{color:V.important,backgroundColor:s.colors.background}})},menuPlacement:"bottom",onOptionSelection:l=>{l==="remove"&&O(e.paymentAccountId)},valueToIcon:zt})})]})]})},jt=n.div`
2
2
  display: flex;
3
3
  padding: ${i.sp4};
4
4
  padding-right: ${i.sp8};
@@ -42,17 +42,17 @@ import{u as ae,X as we,a as He,c3 as qe,j as t,aW as Je,M as J,o as i,d as q,bK
42
42
  `,Rt=n.div`
43
43
  position: absolute;
44
44
  right: ${i.sp4};
45
- `,Wt=n(ut)`
45
+ `,Bt=n(ut)`
46
46
  margin-right: ${i.sp3};
47
- width: ${e=>Q.paymentAccountIconSize.valuePx(e.windowSize)};
48
- height: ${e=>Q.paymentAccountIconSize.valuePx(e.windowSize)};
49
- min-width: ${e=>Q.paymentAccountIconSize.valuePx(e.windowSize)};
50
- min-height: ${e=>Q.paymentAccountIconSize.valuePx(e.windowSize)};
51
- `,Dt=n.div`
47
+ width: ${e=>Z.paymentAccountIconSize.valuePx(e.windowSize)};
48
+ height: ${e=>Z.paymentAccountIconSize.valuePx(e.windowSize)};
49
+ min-width: ${e=>Z.paymentAccountIconSize.valuePx(e.windowSize)};
50
+ min-height: ${e=>Z.paymentAccountIconSize.valuePx(e.windowSize)};
51
+ `,Wt=n.div`
52
52
  white-space: nowrap;
53
53
  overflow: hidden;
54
54
  width: 100%;
55
- `,Bt=n.div`
55
+ `,Dt=n.div`
56
56
  display: flex;
57
57
  gap: ${i.sp2};
58
58
  align-items: center;
@@ -73,7 +73,7 @@ import{u as ae,X as we,a as He,c3 as qe,j as t,aW as Je,M as J,o as i,d as q,bK
73
73
  overflow: hidden;
74
74
  `,Ut=n.div`
75
75
  display: flex;
76
- `,{common:{settings:K,strings:{empty:Ht}}}=J.getLocalizedStrings(),qt=()=>null,Jt=({paymentAccount:e,bankAccountList:a,balanceFetchStatus:L,onRemoveConnection:O})=>{const s=ae(),d=e?.providerVerificationStatus,$=a.find(z=>z.accountId===e.zeniAccountId);return t.jsxs(Gt,{children:[t.jsxs(Yt,{children:[t.jsx(Zt,{children:`${K.otherAccount.title} ${K.otherAccount.subTitleSmall}`}),t.jsx(Fe,{moreIconType:"plain",options:[{label:K.otherAccount.remove,value:"remove"}],customStyleConfig:{valueContainer:()=>({height:i.sp3,".more-icon":{width:i.sp3,height:i.sp3,color:s.colors.primary}}),container:()=>({marginLeft:i.sp0,position:"relative"}),control:()=>({background:"transparent"}),menu:()=>({position:"absolute",right:0,width:"158px",border:`1px solid ${s.colors.grey3}`,boxShadow:`${i.sp0} 1px 2px ${i.sp0} ${V.boxShadowElevation}`}),option:()=>({color:s.colors.important,":hover":{color:s.colors.important,backgroundColor:s.colors.background}})},menuPlacement:"bottom",onOptionSelection:z=>{z==="remove"&&O(e.paymentAccountId)},valueToIcon:qt})]}),t.jsxs(Qt,{children:[t.jsxs(ln,{children:[t.jsx(cn,{children:t.jsx(dn,{children:e.institutionDetails.institutionName})}),t.jsxs(un,{children:[t.jsx(sn,{children:e.accountSubType?.name}),t.jsx(rn,{children:e.maskedAccountNumber}),t.jsx(tn,{children:d!=null?t.jsx(ee,{style:{width:"max-content",padding:0},tagTitle:d.name,textColor:te(d.code)}):null})]})]}),t.jsxs(nn,{children:[t.jsx(on,{className:"balanceLabel",children:ne("0,0.[00]",e.balances?.available)}),e.balances?.lastRefreshTime?t.jsx(an,{className:"balanceLabel",children:ie(e.balances?.lastRefreshTime)}):L?.fetchState==="In-Progress"?t.jsx(q,{size:"ExtraSmall",start:!0}):null]})]}),t.jsxs(Kt,{children:[t.jsx(Xt,{children:K.bankConnectionHeader.linkAccount}),t.jsx(en,{children:$?.accountName??Ht})]})]})},Gt=n.div`
76
+ `,{common:{settings:X,strings:{empty:Ht}}}=J.getLocalizedStrings(),qt=()=>null,Jt=({paymentAccount:e,bankAccountList:a,balanceFetchStatus:L,onRemoveConnection:O})=>{const s=ae(),d=e?.providerVerificationStatus,$=a.find(z=>z.accountId===e.zeniAccountId);return t.jsxs(Gt,{children:[t.jsxs(Yt,{children:[t.jsx(Qt,{children:`${X.otherAccount.title} ${X.otherAccount.subTitleSmall}`}),t.jsx(Fe,{moreIconType:"plain",options:[{label:X.otherAccount.remove,value:"remove"}],customStyleConfig:{valueContainer:()=>({height:i.sp3,".more-icon":{width:i.sp3,height:i.sp3,color:s.colors.primary}}),container:()=>({marginLeft:i.sp0,position:"relative"}),control:()=>({background:"transparent"}),menu:()=>({position:"absolute",right:0,width:"158px",border:`1px solid ${s.colors.grey3}`,boxShadow:`${i.sp0} 1px 2px ${i.sp0} ${V.boxShadowElevation}`}),option:()=>({color:s.colors.important,":hover":{color:s.colors.important,backgroundColor:s.colors.background}})},menuPlacement:"bottom",onOptionSelection:z=>{z==="remove"&&O(e.paymentAccountId)},valueToIcon:qt})]}),t.jsxs(Zt,{children:[t.jsxs(ln,{children:[t.jsx(cn,{children:t.jsx(dn,{children:e.institutionDetails.institutionName})}),t.jsxs(un,{children:[t.jsx(sn,{children:e.accountSubType?.name}),t.jsx(rn,{children:e.maskedAccountNumber}),t.jsx(tn,{children:d!=null?t.jsx(ee,{style:{width:"max-content",padding:0},tagTitle:d.name,textColor:te(d.code)}):null})]})]}),t.jsxs(nn,{children:[t.jsx(on,{className:"balanceLabel",children:ne("0,0.[00]",e.balances?.available)}),e.balances?.lastRefreshTime?t.jsx(an,{className:"balanceLabel",children:ie(e.balances?.lastRefreshTime)}):L?.fetchState==="In-Progress"?t.jsx(q,{size:"ExtraSmall",start:!0}):null]})]}),t.jsxs(Xt,{children:[t.jsx(Kt,{children:X.bankConnectionHeader.linkAccount}),t.jsx(en,{children:$?.accountName??Ht})]})]})},Gt=n.div`
77
77
  display: flex;
78
78
  flex-direction: column;
79
79
  padding: ${i.sp3};
@@ -85,19 +85,19 @@ import{u as ae,X as we,a as He,c3 as qe,j as t,aW as Je,M as J,o as i,d as q,bK
85
85
  width: 100%;
86
86
  margin-bottom: ${i.sp3};
87
87
  justify-content: space-between;
88
- `,Zt=n(A)`
88
+ `,Qt=n(A)`
89
89
  color: ${e=>e.theme.colors.grey1};
90
90
  display: flex;
91
91
  align-items: center;
92
- `,Qt=n.div`
92
+ `,Zt=n.div`
93
93
  display: flex;
94
94
  align-items: center;
95
95
  justify-content: space-between;
96
96
  margin-bottom: ${i.sp3};
97
- `,Kt=n.div`
97
+ `,Xt=n.div`
98
98
  display: flex;
99
99
  align-items: center;
100
- `,Xt=n(v)`
100
+ `,Kt=n(v)`
101
101
  color: ${e=>e.theme.colors.grey1};
102
102
  margin-right: ${i.sp2};
103
103
  `,en=n(v)`
@@ -132,7 +132,7 @@ import{u as ae,X as we,a as He,c3 as qe,j as t,aW as Je,M as J,o as i,d as q,bK
132
132
  color: ${e=>e.theme.colors.hero};
133
133
  display: flex;
134
134
  align-items: center;
135
- `,{common:{settings:ze,strings:{hyphen:pe}},commonSetUp:{setUp:ke}}=J.getLocalizedStrings(),g={containerPadding:new f(h[3],h[4]),containerRightPadding:new f(h[3],h[8]),iconContainerMaxWidthHeight:new f(h[6],h[7]),iconWidthHeight:new f(20,h[4]),iconPadding:new f(h[1],12),productTypeContainerMarginBottom:new f(h[3],h[0]),linkAccountContainerMarginTop:new f(h[3],h[0]),productTypeIconSize:new f(h[3],h[4])},pn="bankConnectionsSettingsPage",hn=({productType:e,windowSize:a})=>{switch(e){case"bill_pay":return t.jsx(In,{windowSize:a});case"reimbursement":return t.jsx(Ln,{windowSize:a});case"zeni_accounts":return t.jsx(On,{windowSize:a});case"zeni_treasury":return t.jsx(Rn,{windowSize:a});case"charge_cards":default:return t.jsx(Fn,{windowSize:a})}},mn=({analytics:e,allBankAccounts:a,setupView:L,connectedAccountProvider:O,onFetchLinkTokenClick:s,onUpdatePaymentAccountStatus:d,onEstablishConnectionClick:$,onEstablishConnectionSuccess:z})=>{const w=ae(),c=we(),{trigger:F,formState:{errors:M}}=et(),{plaidConnectionDetails:R,allFundingAccounts:l,primaryFundingAccount:o,productType:r}=L,x=R.link_account,C=R.update_account,[D,N]=b.useState(void 0),[le,Y]=b.useState(!1),ce=()=>{Y(!0)},k=D==="update_account"?C:x,[m,W]=b.useState(k.linkToken??null),[j,T]=b.useState(!1),E=x.fetchStatus.fetchState==="In-Progress"||x.updateStatus.fetchState==="In-Progress";let S,_,u,y=!1;o!=null&&(o.accType==="depositAccount"?S={code:"verified",name:"Verified"}:(S=o.providerVerificationStatus,_=o?.institutionDetails,u=S?.code,y=o?.isLoginRequired??!1));const fe=de(x.updateStatus.fetchState),se=de(C.updateStatus.fetchState),Re=de(C.fetchStatus.fetchState),We=w.mode==="light"?new X(w.colors.brandColorJadeLight):new X(w.colors.brandColorJadeDark),De=b.useCallback((p,B)=>{e.trackConnectBankSuccess(r,"Settings");const ve=B.accounts.find(Ue=>Ue.id===o?.providerAccountId)??B.accounts[0];o?.id!=null&&D==="update_account"&&ve?.verification_status!=null&&!y?d(ve?.verification_status,o.id,"update_account",I(r),r):$(p,I(r),r),N(void 0),T(!1)},[e,r,o?.id,o?.providerAccountId,D,y,d,$]),Be=b.useCallback((p,B)=>{p!=null&&(e.trackConnectBankFailure(r,p.error_code+" "+p.error_message,"Settings"),p.error_code==="TOO_MANY_VERIFICATION_ATTEMPTS"&&o?.id!=null&&d("verification_failed",o.id,"update_account",I(r),r),console.log("Plaid Connection Error",p,B)),N(void 0),T(!1)},[e,r,o?.id,d]),{open:re,ready:xe}=tt({token:m,onSuccess:De,onExit:Be});b.useEffect(()=>{(fe==="In-Progress"&&x.updateStatus.fetchState==="Completed"||se==="In-Progress"&&C.updateStatus.fetchState==="Completed")&&u!=="verified"&&u!=="manually_verified"&&u!=="automatically_verified"&&u!=="database_matched"&&(s("link_account",I(r)),z(I(r),r))},[x.updateStatus.fetchState,z,s,o?.providerVerificationStatus?.code,o?.id,fe,se,C.updateStatus.fetchState,u,r]),b.useEffect(()=>{(Z.isVerifiedStatusCode(u??"")||u==="verification_failed")&&!j&&D!=null&&k.linkToken===m&&k.fetchStatus.fetchState==="Completed"&&xe&&T(!0)},[xe,m,k.fetchStatus.fetchState,k.linkToken,u,D,j]);const ye=me(pn,"primaryAccountSection"),Me=nt(M,ye);b.useEffect(()=>{k.fetchStatus.fetchState==="Completed"&&k.linkToken!=null&&k.linkToken!==m&&W(k.linkToken)},[k.fetchStatus.fetchState,k.linkToken,m]),b.useEffect(()=>{j&&re()},[j,re]),b.useEffect(()=>{!o?.zeniAccountId&&!Me&&F(ye)},[o?.id]),b.useEffect(()=>{(u==null||u==="verification_failed"||u==="verification_expired"||Z.isVerifiedStatusCode(u))&&(Z.zeniDate(new Date().toISOString()).isAfter(x.expiration)||x.linkToken==null)&&s("link_account",I(r))},[]);const Ee=()=>{e.trackConnectBankGetBalance(r,"Settings"),N("update_account"),s("update_account",I(r),o?.id)},Se=`${o?.accountSubType?.name!=null?o?.accountSubType?.name.substring(0,1).toUpperCase().concat(o?.accountSubType?.name.substring(1)):""} ${o?.maskedAccountNumber??""}`.trim(),be=_?.zeniInstitutionId.toLowerCase()==="chase",Ne=l.findIndex(p=>p.id===o?.id),Ve={element:t.jsx(Le,{width:g.iconWidthHeight.valuePx(c)}),color:We};return t.jsxs(gn,{windowSize:c,children:[le===!0?ht.createPortal(t.jsx(mt,{connectedAccountProvider:O,action:{onBackClick:()=>Y(!1)}}),document.body):null,t.jsxs(wn,{windowSize:c,wrapperWidth:P[0].width,children:[t.jsx(xn,{windowSize:c,isDarkMode:w.mode==="dark",children:t.jsx(hn,{productType:r,windowSize:c})}),t.jsx(fn,{children:ze.productNameByType[r]})]}),t.jsx(yn,{windowSize:c,wrapperWidth:P[1].width,children:t.jsxs(kn,{windowSize:c,children:[o!=null&&c!=="small"?t.jsx(zn,{isDisabled:y,children:gt(Ve,c,w.mode==="dark",o,Ne,!1)}):null,t.jsxs(jn,{windowSize:c,className:"fundingAccount",children:[t.jsx(Oe,{style:{display:c==="small"?"block":"inherit",width:"-webkit-fill-available",color:w.colors.hero},customStyleConfig:{menu:()=>({width:c==="small"?"auto":510})},controlProperty:{controlHeight:h[4],fontWeight:$e.medium,highlightOnHover:!1,leftRightMargin:!1,fieldWidth:c==="small"?240:300},customPlaceholder:{color:w.colors.hero,weight:$e.medium},name:me(r,"primaryAccountSection"),placeholder:ke.selectAccountPlaceholder,capitalizeOptions:!0,appendSublabel:!1,showLogoInSingleValue:!1,isClearable:!1,maxMenuHeight:220,valueToLogo:(p,B)=>ot(l,p,B),valueToSubLabels:(p,B)=>it(l,p,B,!1),defaultValue:{selectedOption:o?.id,allOptions:l.map(p=>({label:p.label,value:p.id,isRecommended:p.accType==="depositAccount"}))},textAlignment:"left",showDownChevronIcon:!0,showTickIcon:!1,isOptionRemovable:!1,registerOptions:{required:!1},showCreateOption:!0,showEmptyState:!1,isDisabled:E?"disabled":void 0,showLoadingIcon:E,onClickCreateOption:()=>{e.trackConnectBank(r,"Settings"),N("link_account"),x.linkToken==null||Z.zeniDate(new Date().toISOString()).isAfter(x.expiration)?s("link_account",I(r)):m!==x.linkToken?W(x.linkToken):j?re():T(!0)}}),t.jsxs(Sn,{isDisabled:y,children:[Se?t.jsxs(t.Fragment,{children:[t.jsx(bn,{children:Se}),c!=="small"&&(u!=="verification_failed"&&o?.providerVerificationStatus?.code==="pending_manual_verification"||y||be)?t.jsx($n,{}):null]}):null,c==="small"&&S!=null?t.jsx(ee,{style:{width:"max-content",padding:i.sp0,marginLeft:i.sp2},tagTitle:S.name,textColor:te(S.code)}):null,u!=="verification_failed"&&o?.providerVerificationStatus?.code==="pending_manual_verification"||y||be?t.jsx(wt,{productType:r,isUpdateLinkClicked:D==="update_account",isLoginRequired:y,isPendingVerification:u!=="verification_failed"&&o?.providerVerificationStatus?.code==="pending_manual_verification",fetchAndUpdateStatues:{fetchStatus:C.fetchStatus,updateStatus:C.updateStatus,linkFetchStatus:x.fetchStatus,linkUpdateStatus:x.updateStatus,prevFetchState:Re,prevUpdateState:se},onUpdateLinkTokenClick:Ee,onChaseInfoClick:ce}):null]})]}),c==="small"?t.jsxs(Cn,{children:[o?.accountBalance?.available?t.jsx(je,{className:"balanceLabel",children:ne("0,0[.]00",o?.accountBalance?.available)}):t.jsx(he,{children:pe}),o?.accountBalance?.lastRefreshTime?t.jsx(Ae,{className:"balanceLabel",children:ie(o?.accountBalance?.lastRefreshTime)}):o?.balanceFetchStatus.fetchState==="In-Progress"?t.jsx(q,{size:"Small",start:!0}):null]}):null]})}),t.jsxs(Pn,{windowSize:c,isDisabled:y,wrapperWidth:P[2].width,onClick:p=>p.stopPropagation(),"data-testid":at("bank-account-section",r),className:"qboLinkAcc",children:[c==="small"?t.jsx(vn,{children:ze.bankConnectionHeader.linkAccount}):null,t.jsx(_n,{isDisabled:y?"disabled":void 0,name:me(r,"bankAccountSection"),placeholder:ke.zeniCashAccountPlaceholder,defaultValue:{selectedOption:o?.zeniAccountId??"",allOptions:a.map(p=>({label:p.accountName,value:p.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(Tn,{windowSize:c,wrapperWidth:P[3].width,children:S!=null?t.jsx(ee,{style:{width:"max-content",padding:0},tagTitle:S.name,textColor:te(S.code)}):t.jsx(he,{children:pe})}):null,c!=="small"?t.jsxs(An,{windowSize:c,wrapperWidth:P[4].width,children:[o?.accountBalance?.available?t.jsx(je,{className:"balanceLabel",children:ne("0,0[.]00",o?.accountBalance?.available)}):t.jsx(he,{children:pe}),o?.accountBalance?.lastRefreshTime?t.jsx(Ae,{className:"balanceLabel",children:ie(o?.accountBalance?.lastRefreshTime)}):o?.balanceFetchStatus.fetchState==="In-Progress"?t.jsx(q,{size:"Small",start:!0}):null]}):null]})},gn=n.div`
135
+ `,{common:{settings:ze,strings:{hyphen:pe}},commonSetUp:{setUp:ke}}=J.getLocalizedStrings(),g={containerPadding:new f(h[3],h[4]),containerRightPadding:new f(h[3],h[8]),iconContainerMaxWidthHeight:new f(h[6],h[7]),iconWidthHeight:new f(20,h[4]),iconPadding:new f(h[1],12),productTypeContainerMarginBottom:new f(h[3],h[0]),linkAccountContainerMarginTop:new f(h[3],h[0]),productTypeIconSize:new f(h[3],h[4])},pn="bankConnectionsSettingsPage",hn=({productType:e,windowSize:a})=>{switch(e){case"bill_pay":return t.jsx(In,{windowSize:a});case"reimbursement":return t.jsx(Ln,{windowSize:a});case"zeni_accounts":return t.jsx(On,{windowSize:a});case"zeni_treasury":return t.jsx(Rn,{windowSize:a});case"charge_cards":default:return t.jsx(Fn,{windowSize:a})}},mn=({analytics:e,allBankAccounts:a,setupView:L,connectedAccountProvider:O,onFetchLinkTokenClick:s,onUpdatePaymentAccountStatus:d,onEstablishConnectionClick:$,onEstablishConnectionSuccess:z})=>{const w=ae(),c=we(),{trigger:F,formState:{errors:M}}=et(),{plaidConnectionDetails:R,allFundingAccounts:l,primaryFundingAccount:o,productType:r}=L,x=R.link_account,C=R.update_account,[W,N]=b.useState(void 0),[le,Y]=b.useState(!1),ce=()=>{Y(!0)},k=W==="update_account"?C:x,[m,B]=b.useState(k.linkToken??null),[j,T]=b.useState(!1),E=x.fetchStatus.fetchState==="In-Progress"||x.updateStatus.fetchState==="In-Progress";let S,_,u,y=!1;o!=null&&(o.accType==="depositAccount"?S={code:"verified",name:"Verified"}:(S=o.providerVerificationStatus,_=o?.institutionDetails,u=S?.code,y=o?.isLoginRequired??!1));const fe=de(x.updateStatus.fetchState),se=de(C.updateStatus.fetchState),Re=de(C.fetchStatus.fetchState),Be=w.mode==="light"?new K(w.colors.brandColorJadeLight):new K(w.colors.brandColorJadeDark),We=b.useCallback((p,D)=>{e.trackConnectBankSuccess(r,"Settings");const ve=D.accounts.find(Ue=>Ue.id===o?.providerAccountId)??D.accounts[0];o?.id!=null&&W==="update_account"&&ve?.verification_status!=null&&!y?d(ve?.verification_status,o.id,"update_account",I(r),r):$(p,I(r),r),N(void 0),T(!1)},[e,r,o?.id,o?.providerAccountId,W,y,d,$]),De=b.useCallback((p,D)=>{p!=null&&(e.trackConnectBankFailure(r,p.error_code+" "+p.error_message,"Settings"),p.error_code==="TOO_MANY_VERIFICATION_ATTEMPTS"&&o?.id!=null&&d("verification_failed",o.id,"update_account",I(r),r),console.log("Plaid Connection Error",p,D)),N(void 0),T(!1)},[e,r,o?.id,d]),{open:re,ready:xe}=tt({token:m,onSuccess:We,onExit:De});b.useEffect(()=>{(fe==="In-Progress"&&x.updateStatus.fetchState==="Completed"||se==="In-Progress"&&C.updateStatus.fetchState==="Completed")&&u!=="verified"&&u!=="manually_verified"&&u!=="automatically_verified"&&u!=="database_matched"&&(s("link_account",I(r)),z(I(r),r))},[x.updateStatus.fetchState,z,s,o?.providerVerificationStatus?.code,o?.id,fe,se,C.updateStatus.fetchState,u,r]),b.useEffect(()=>{(Q.isVerifiedStatusCode(u??"")||u==="verification_failed")&&!j&&W!=null&&k.linkToken===m&&k.fetchStatus.fetchState==="Completed"&&xe&&T(!0)},[xe,m,k.fetchStatus.fetchState,k.linkToken,u,W,j]);const ye=me(pn,"primaryAccountSection"),Me=nt(M,ye);b.useEffect(()=>{k.fetchStatus.fetchState==="Completed"&&k.linkToken!=null&&k.linkToken!==m&&B(k.linkToken)},[k.fetchStatus.fetchState,k.linkToken,m]),b.useEffect(()=>{j&&re()},[j,re]),b.useEffect(()=>{!o?.zeniAccountId&&!Me&&F(ye)},[o?.id]),b.useEffect(()=>{(u==null||u==="verification_failed"||u==="verification_expired"||Q.isVerifiedStatusCode(u))&&(Q.zeniDate(new Date().toISOString()).isAfter(x.expiration)||x.linkToken==null)&&s("link_account",I(r))},[]);const Ee=()=>{e.trackConnectBankGetBalance(r,"Settings"),N("update_account"),s("update_account",I(r),o?.id)},Se=`${o?.accountSubType?.name!=null?o?.accountSubType?.name.substring(0,1).toUpperCase().concat(o?.accountSubType?.name.substring(1)):""} ${o?.maskedAccountNumber??""}`.trim(),be=_?.zeniInstitutionId.toLowerCase()==="chase",Ne=l.findIndex(p=>p.id===o?.id),Ve={element:t.jsx(Le,{width:g.iconWidthHeight.valuePx(c)}),color:Be};return t.jsxs(gn,{windowSize:c,children:[le===!0?ht.createPortal(t.jsx(mt,{connectedAccountProvider:O,action:{onBackClick:()=>Y(!1)}}),document.body):null,t.jsxs(wn,{windowSize:c,wrapperWidth:P[0].width,children:[t.jsx(xn,{windowSize:c,isDarkMode:w.mode==="dark",children:t.jsx(hn,{productType:r,windowSize:c})}),t.jsx(fn,{children:ze.productNameByType[r]})]}),t.jsx(yn,{windowSize:c,wrapperWidth:P[1].width,children:t.jsxs(kn,{windowSize:c,children:[o!=null&&c!=="small"?t.jsx(zn,{isDisabled:y,children:gt(Ve,c,w.mode==="dark",o,Ne,!1)}):null,t.jsxs(jn,{windowSize:c,className:"fundingAccount",children:[t.jsx(Oe,{style:{display:c==="small"?"block":"inherit",width:"-webkit-fill-available",color:w.colors.hero},customStyleConfig:{menu:()=>({width:c==="small"?"auto":510})},controlProperty:{controlHeight:h[4],fontWeight:$e.medium,highlightOnHover:!1,leftRightMargin:!1,fieldWidth:c==="small"?240:300},customPlaceholder:{color:w.colors.hero,weight:$e.medium},name:me(r,"primaryAccountSection"),placeholder:ke.selectAccountPlaceholder,capitalizeOptions:!0,appendSublabel:!1,showLogoInSingleValue:!1,isClearable:!1,maxMenuHeight:220,valueToLogo:(p,D)=>ot(l,p,D),valueToSubLabels:(p,D)=>it(l,p,D,!1),defaultValue:{selectedOption:o?.id,allOptions:l.map(p=>({label:p.label,value:p.id,isRecommended:p.accType==="depositAccount"}))},textAlignment:"left",showDownChevronIcon:!0,showTickIcon:!1,isOptionRemovable:!1,registerOptions:{required:!1},showCreateOption:!0,showEmptyState:!1,isDisabled:E?"disabled":void 0,showLoadingIcon:E,onClickCreateOption:()=>{e.trackConnectBank(r,"Settings"),N("link_account"),x.linkToken==null||Q.zeniDate(new Date().toISOString()).isAfter(x.expiration)?s("link_account",I(r)):m!==x.linkToken?B(x.linkToken):j?re():T(!0)}}),t.jsxs(Sn,{isDisabled:y,children:[Se?t.jsxs(t.Fragment,{children:[t.jsx(bn,{children:Se}),c!=="small"&&(u!=="verification_failed"&&o?.providerVerificationStatus?.code==="pending_manual_verification"||y||be)?t.jsx($n,{}):null]}):null,c==="small"&&S!=null?t.jsx(ee,{style:{width:"max-content",padding:i.sp0,marginLeft:i.sp2},tagTitle:S.name,textColor:te(S.code)}):null,u!=="verification_failed"&&o?.providerVerificationStatus?.code==="pending_manual_verification"||y||be?t.jsx(wt,{productType:r,isUpdateLinkClicked:W==="update_account",isLoginRequired:y,isPendingVerification:u!=="verification_failed"&&o?.providerVerificationStatus?.code==="pending_manual_verification",fetchAndUpdateStatues:{fetchStatus:C.fetchStatus,updateStatus:C.updateStatus,linkFetchStatus:x.fetchStatus,linkUpdateStatus:x.updateStatus,prevFetchState:Re,prevUpdateState:se},onUpdateLinkTokenClick:Ee,onChaseInfoClick:ce}):null]})]}),c==="small"?t.jsxs(Cn,{children:[o?.accountBalance?.available?t.jsx(je,{className:"balanceLabel",children:ne("0,0[.]00",o?.accountBalance?.available)}):t.jsx(he,{children:pe}),o?.accountBalance?.lastRefreshTime?t.jsx(Ae,{className:"balanceLabel",children:ie(o?.accountBalance?.lastRefreshTime)}):o?.balanceFetchStatus.fetchState==="In-Progress"?t.jsx(q,{size:"Small",start:!0}):null]}):null]})}),t.jsxs(Pn,{windowSize:c,isDisabled:y,wrapperWidth:P[2].width,onClick:p=>p.stopPropagation(),"data-testid":at("bank-account-section",r),className:"qboLinkAcc",children:[c==="small"?t.jsx(vn,{children:ze.bankConnectionHeader.linkAccount}):null,t.jsx(_n,{isDisabled:y?"disabled":void 0,name:me(r,"bankAccountSection"),placeholder:ke.zeniCashAccountPlaceholder,defaultValue:{selectedOption:o?.zeniAccountId??"",allOptions:a.map(p=>({label:p.accountName,value:p.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(Tn,{windowSize:c,wrapperWidth:P[3].width,children:S!=null?t.jsx(ee,{style:{width:"max-content",padding:0},tagTitle:S.name,textColor:te(S.code)}):t.jsx(he,{children:pe})}):null,c!=="small"?t.jsxs(An,{windowSize:c,wrapperWidth:P[4].width,children:[o?.accountBalance?.available?t.jsx(je,{className:"balanceLabel",children:ne("0,0[.]00",o?.accountBalance?.available)}):t.jsx(he,{children:pe}),o?.accountBalance?.lastRefreshTime?t.jsx(Ae,{className:"balanceLabel",children:ie(o?.accountBalance?.lastRefreshTime)}):o?.balanceFetchStatus.fetchState==="In-Progress"?t.jsx(q,{size:"Small",start:!0}):null]}):null]})},gn=n.div`
136
136
  display: flex;
137
137
  flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
138
138
  align-items: ${e=>e.windowSize==="small"?"flex-start":"center"};
@@ -245,7 +245,7 @@ import{u as ae,X as we,a as He,c3 as qe,j as t,aW as Je,M as J,o as i,d as q,bK
245
245
  `,Rn=n(st)`
246
246
  width: ${e=>g.productTypeIconSize.valuePx(e.windowSize)};
247
247
  height: ${e=>g.productTypeIconSize.valuePx(e.windowSize)};
248
- `,me=(e,a)=>`${e}.${a}`,I=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"}},{settings:{bankConnectionListHeader:ge,title:Wn,infoText:Dn}}=J.getLocalizedStrings().common,oe={pageContentPadding:new f(h[4],h[8]),subtitleSectionWidth:new f(343,580,1200),subTitleBottomMargin:new f(h[0],h[5])},Bn={qboLinkAcc:new Xe("smallRegular","standardRegular")},Mn="bankConnectionsSettingsPage",U="bankAccountSection",H="primaryAccountSection",En="bill_pay",Nn="reimbursement",Vn="zeni_accounts",Un="charge_cards",Hn="zeni_treasury",Ce=e=>t.jsx(Gn,{children:P.map(a=>t.jsx(Yn,{actualDataValue:a.value,wrapperWidth:a.width,windowSize:e,children:t.jsx(Zn,{children:a.value})},a.value))}),bi=({analytics:e,bankSetupView:a,connectedAccountProvider:L,onBackClick:O,onUpdateAccountClick:s,onFetchLinkTokenClick:d,onUpdatePaymentAccountStatus:$,onUpdatePaymentAccountLoginStatus:z,onEstablishConnectionClick:w,onEstablishConnectionSuccess:c,onClickMenuIcon:F,onUpdatePrimaryFundingAccount:M,onRemoveConnection:R})=>{const l=ae(),o=we(),{allFundingAccounts:r,primaryConnection:x}=a,C=He({mode:"all",reValidateMode:"onChange",defaultValues:_e(a),values:_e(a)}),D=C.handleSubmit(m=>{}),N=async(m,W)=>{const j=m.split("."),T=j[0],E=j[1],S=x.find(_=>_.productType===T);if(T!=null&&E!=null){const _=W[T][E];if(E==="primaryAccountSection"){const u=r.find(y=>y.id===_.selectedOption)?.accType;_.selectedOption!=null&&u!=null&&M(_.selectedOption,I(T),u)}else if(E==="bankAccountSection"&&S!=null&&S.primaryFundingAccount!=null&&_.selectedOption!=null){const u=S.primaryFundingAccount?.id,y=S.primaryFundingAccount?.accType;u!=null&&y!=null&&s(_.selectedOption,u,T,I(T),y)}}};b.useEffect(()=>{const m=C.watch((W,{name:j})=>{j!=null&&W!=null&&qe(()=>N(j,W))});return()=>{m.unsubscribe()}});const le=a.fetchState==="In-Progress"||a.fetchState==="Not-Started",Y=a.fetchState==="Completed"&&a.allFundingAccounts.length===0,ce=o==="small"?Jt:kt,k=()=>le?t.jsx(Xn,{children:t.jsx(q,{size:"ExtraLarge",start:!0})}):Y?t.jsx(Ge,{message:"No bank connections added."}):t.jsxs(qn,{windowSize:o,children:[t.jsx(Pe,{children:ge.primary}),o!=="small"?Ce(o):null,t.jsx(Ye,{...C,children:t.jsx("form",{id:ai(Mn),onSubmit:D,children:t.jsx(ei,{windowSize:o,children:a.primaryConnection.map(m=>m!=null?t.jsx(Te,{windowSize:o,children:t.jsx(mn,{analytics:e,allBankAccounts:a.allBankAccounts,setupView:m,connectedAccountProvider:L,onFetchLinkTokenClick:d,onUpdatePaymentAccountStatus:$,onUpdatePaymentAccountLoginStatus:z,onEstablishConnectionClick:w,onEstablishConnectionSuccess:c})},m.productType):null)})})}),a.otherPaymentAccounts.length>0?t.jsxs(Qn,{children:[t.jsx(Pe,{children:ge.other}),t.jsx(ii,{children:t.jsx(Ze,{display:"flex",placement:"right",maxWidth:"340px",title:ge.otherToolTip,style:{padding:`12px ${i.sp3}`},children:t.jsx(oi,{})})})]}):null,o!=="small"&&a.otherPaymentAccounts.length>0?Ce(o):null,a.otherPaymentAccounts.map(m=>{const W=r.find(j=>j.id===m.paymentAccountId)?.balanceFetchStatus;return t.jsx(Te,{windowSize:o,children:t.jsx(ce,{paymentAccount:m,bankAccountList:a.allBankAccounts,balanceFetchStatus:W,onRemoveConnection:R})},m.paymentAccountId)})]});return t.jsxs(Jn,{children:[t.jsx(Je,{source:"BankConnectionsSettingsPage",title:Wn.bankConnections,backgroundColor:l.colors.grey4,style:{zIndex:3},onBackClick:O,showBackButton:!1,showMenuIcon:o==="medium-compact"||o==="small",onClickMenuIcon:F}),t.jsxs(Kn,{windowSize:o,children:[t.jsx(ti,{windowSize:o,children:t.jsx(ni,{windowSize:o,children:Dn.bankConnections})}),k()]})]})},qn=n.div`
248
+ `,me=(e,a)=>`${e}.${a}`,I=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"}},{settings:{bankConnectionListHeader:ge,title:Bn,infoText:Wn}}=J.getLocalizedStrings().common,oe={pageContentPadding:new f(h[4],h[8]),subtitleSectionWidth:new f(343,580,1200),subTitleBottomMargin:new f(h[0],h[5])},Dn={qboLinkAcc:new Ke("smallRegular","standardRegular")},Mn="bankConnectionsSettingsPage",U="bankAccountSection",H="primaryAccountSection",En="bill_pay",Nn="reimbursement",Vn="zeni_accounts",Un="charge_cards",Hn="zeni_treasury",Ce=e=>t.jsx(Gn,{children:P.map(a=>t.jsx(Yn,{actualDataValue:a.value,wrapperWidth:a.width,windowSize:e,children:t.jsx(Qn,{children:a.value})},a.value))}),bi=({analytics:e,bankSetupView:a,connectedAccountProvider:L,onBackClick:O,onUpdateAccountClick:s,onFetchLinkTokenClick:d,onUpdatePaymentAccountStatus:$,onUpdatePaymentAccountLoginStatus:z,onEstablishConnectionClick:w,onEstablishConnectionSuccess:c,onClickMenuIcon:F,onUpdatePrimaryFundingAccount:M,onRemoveConnection:R})=>{const l=ae(),o=we(),{allFundingAccounts:r,primaryConnection:x}=a,C=He({mode:"all",reValidateMode:"onChange",defaultValues:_e(a),values:_e(a)}),W=C.handleSubmit(m=>{}),N=async(m,B)=>{const j=m.split("."),T=j[0],E=j[1],S=x.find(_=>_.productType===T);if(T!=null&&E!=null){const _=B[T][E];if(E==="primaryAccountSection"){const u=r.find(y=>y.id===_.selectedOption)?.accType;_.selectedOption!=null&&u!=null&&M(_.selectedOption,I(T),u)}else if(E==="bankAccountSection"&&S!=null&&S.primaryFundingAccount!=null&&_.selectedOption!=null){const u=S.primaryFundingAccount?.id,y=S.primaryFundingAccount?.accType;u!=null&&y!=null&&s(_.selectedOption,u,T,I(T),y)}}};b.useEffect(()=>{const m=C.watch((B,{name:j})=>{j!=null&&B!=null&&qe(()=>N(j,B))});return()=>{m.unsubscribe()}});const le=a.fetchState==="In-Progress"||a.fetchState==="Not-Started",Y=a.fetchState==="Completed"&&a.allFundingAccounts.length===0,ce=o==="small"?Jt:kt,k=()=>le?t.jsx(Kn,{children:t.jsx(q,{size:"ExtraLarge",start:!0})}):Y?t.jsx(Ge,{message:"No bank connections added."}):t.jsxs(qn,{windowSize:o,children:[t.jsx(Pe,{children:ge.primary}),o!=="small"?Ce(o):null,t.jsx(Ye,{...C,children:t.jsx("form",{id:ai(Mn),onSubmit:W,children:t.jsx(ei,{windowSize:o,children:a.primaryConnection.map(m=>m!=null?t.jsx(Te,{windowSize:o,children:t.jsx(mn,{analytics:e,allBankAccounts:a.allBankAccounts,setupView:m,connectedAccountProvider:L,onFetchLinkTokenClick:d,onUpdatePaymentAccountStatus:$,onUpdatePaymentAccountLoginStatus:z,onEstablishConnectionClick:w,onEstablishConnectionSuccess:c})},m.productType):null)})})}),a.otherPaymentAccounts.length>0?t.jsxs(Zn,{children:[t.jsx(Pe,{children:ge.other}),t.jsx(ii,{children:t.jsx(Qe,{display:"flex",placement:"right",maxWidth:"340px",title:ge.otherToolTip,style:{padding:`12px ${i.sp3}`},children:t.jsx(oi,{})})})]}):null,o!=="small"&&a.otherPaymentAccounts.length>0?Ce(o):null,a.otherPaymentAccounts.map(m=>{const B=r.find(j=>j.id===m.paymentAccountId)?.balanceFetchStatus;return t.jsx(Te,{windowSize:o,children:t.jsx(ce,{paymentAccount:m,bankAccountList:a.allBankAccounts,balanceFetchStatus:B,onRemoveConnection:R})},m.paymentAccountId)})]});return t.jsxs(Jn,{children:[t.jsx(Je,{source:"BankConnectionsSettingsPage",title:Bn.bankConnections,backgroundColor:l.colors.grey4,style:{zIndex:3},onBackClick:O,showBackButton:!1,showMenuIcon:o==="medium-compact"||o==="small",onClickMenuIcon:F}),t.jsxs(Xn,{windowSize:o,children:[t.jsx(ti,{windowSize:o,children:t.jsx(ni,{windowSize:o,children:Wn.bankConnections})}),k()]})]})},qn=n.div`
249
249
  display: flex;
250
250
  flex-direction: column;
251
251
  width: 100%;
@@ -285,10 +285,10 @@ import{u as ae,X as we,a as He,c3 as qe,j as t,aW as Je,M as J,o as i,d as q,bK
285
285
  padding-left: ${i.sp0};
286
286
  box-sizing: border-box;
287
287
  overflow: hidden;
288
- `,Zn=n(v)`
288
+ `,Qn=n(v)`
289
289
  display: flex;
290
290
  gap: 5px;
291
- `,Qn=n.div`
291
+ `,Zn=n.div`
292
292
  display: flex;
293
293
  align-items: center;
294
294
  `,Te=n.div`
@@ -317,7 +317,7 @@ import{u as ae,X as we,a as He,c3 as qe,j as t,aW as Je,M as J,o as i,d as q,bK
317
317
  .select-value-container
318
318
  .single-select-field__single-value {
319
319
  color: ${e=>e.theme.colors.hero};
320
- ${e=>`${Bn.qboLinkAcc.style(e.windowSize)}`};
320
+ ${e=>`${Dn.qboLinkAcc.style(e.windowSize)}`};
321
321
  }
322
322
  &:hover {
323
323
  border: ${e=>`1px solid ${e.theme.colors.primary}`};
@@ -331,14 +331,14 @@ import{u as ae,X as we,a as He,c3 as qe,j as t,aW as Je,M as J,o as i,d as q,bK
331
331
  color: ${e=>e.theme.colors.primary};
332
332
  }
333
333
  }
334
- `,Kn=n.div`
334
+ `,Xn=n.div`
335
335
  display: flex;
336
336
  justify-content: flex-start;
337
337
  height: 100%;
338
338
  overflow-y: auto;
339
339
  flex-direction: column;
340
340
  align-items: center;
341
- `,Xn=n.div`
341
+ `,Kn=n.div`
342
342
  display: flex;
343
343
  width: 100%;
344
344
  height: calc(100vh - 110px);
@@ -349,11 +349,11 @@ import{u as ae,X as we,a as He,c3 as qe,j as t,aW as Je,M as J,o as i,d as q,bK
349
349
  `,ei=n.div`
350
350
  display: flex;
351
351
  flex-direction: column;
352
- `,Pe=n(Ke)`
352
+ `,Pe=n(Xe)`
353
353
  color: ${e=>e.theme.colors.primary};
354
354
  margin-right: ${i.sp1};
355
355
  padding: ${i.sp3} ${i.sp0} ${i.sp3} ${i.sp2};
356
- `,ti=n(Qe)`
356
+ `,ti=n(Ze)`
357
357
  display: flex;
358
358
  justify-content: center;
359
359
  align-items: center;
@@ -1,5 +1,5 @@
1
- import{X as Nn,w as On,u as Fn,fL as En,fM as Ln,fN as _n,fO as Wn,aV as Zn,a5 as Kn,M as Vn,C as u,j as t,l as L,cF as it,cG as Un,o as a,cH as qn,cI as Gn,Y as b,cJ as Hn,_ as Ae,cK as Yn,aW as lt,aH as ot,dr as rt,bN as st,bP as dt,bQ as ct,fP as Jn,fQ as Qn,fR as Xn,fS as ea,cP as j,cQ as I,cR as $,fT as A,cO as ta,q as pt,g as ie,cS as Rt,cT as na,cU as aa,cV as ia,fU as la,fV as oa,a7 as ra,m as mt,bu as Te,fW as sa,fX as O,p as r,b as da,bq as ca,fY as pa,a6 as ma,fZ as ua,f_ as ut,c_ as yt,Q as ya,cu as ha,ah as ba,aq as xa,as as ga,k as fa,eZ as zt,f$ as wa,v as Mt,at as Ta,au as va,aN as Da,eJ as ja,s as Ia}from"./index-BU_OFOHO.js";import{b as p,n as i}from"./vendor-CnQcJ2Lu.js";import{_ as $a}from"./liveblocks-BUGn2yQ6.js";import{o as Aa,t as ka}from"./LowBalancePopup-OSUi1Alp-BiLt2AdI.js";import"./mui-BgvZYSo0.js";import"./analytics-BSSiLa6f.js";import"./routing-BNz5gZgX.js";import"./sentry-HDxG13yk.js";import"./redux-DmDqXYej.js";import"./crypto-BURQLTgV.js";const Sa=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"})))),Ca={formTitle:new ya("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:Pa,common:{noText:C,strings:{empty:d},currency:ht,via:Ba,more:Ra,edit:za},spendManagement:{billPay:{billDetails:n,billsByTabs:ke,bulkActions:bt,vendorCreation:xt,insufficientFunds:Nt}},collaboration:{threads:{placeholder:gt,tooltip:ft,title:{comments:Ma}}}}=Vn.getLocalizedStrings(),ve=Pa.visual.MMMDCommaYYYYformat,ji=({billDetails:e,currentTenant:g,showApproveRejectBtns:x,isShowDeletedBillsEnabled:Z,signedInUser:le,isAdmin:Ot,isRealTimeApprovalEnabled:Ft,isInternationalPaymentShaVsOurEnabled:Et,hasZeniAssistAccess:Lt,analytics:z,showMarkAsPaidButtonToCreator:K,showMarkAsPaidButtonToApprover:_t,isBillPayCommentingEnabled:Se,isZeniUser:Wt,showBackButton:Ce=!0,isDetectInsufficientFundsEnabled:Zt,redirectToEditableBillScreen:Kt,redirectToBillsScreen:H,discardBillDetailsFromLocalStore:Pe,deleteBill:Vt,cancelAndDeleteBill:Be,approveOrRejectBill:Re,onAddNewRule:Ut,onAttachmentClick:ze,saveBillDetails:qt,discardOutsideZeniPaymentData:Gt,onBackClick:Me,updateEditRealTimeApproverClicked:Ht,onSaveRealTimeApprovals:Yt,onRetryPaymentClick:Jt,onRefundPaymentClick:Qt})=>{const l=Nn(),o=On(),Ne=Fn(),[Xt,V]=p.useState(!1),[Oe,oe]=p.useState(!1),[re,se]=p.useState(!1),[Fe,de]=p.useState(!1),[en,ce]=p.useState(!1),[Ee,Y]=p.useState(!1),y=e.transactionDetails?.id,tn=Wt?En:Ln,{requestToOpenThread:pe,setRequestToOpenThread:Le,setOpenThread:J}=p.useContext(tn),[nn,U]=p.useState(!1),w={application:"dashboard",companyId:o.currentTenant?.companyId,tab:"bill",entityId:y,isGlobalComment:!1},{threads:q,isLoading:P}=_n(w,"both",!1),f=Se&&y!=null,_e=p.useMemo(()=>y==null?[]:q.filter(c=>c.resolved===!1&&!c.id.includes(Wn)),[q,y]).length,T=`dashboard_${o.currentTenant?.companyId}`,an=p.useCallback((c,h)=>{J(h),U(!1)},[J,U]);p.useEffect(()=>{pe?.threadId!=null&&q.length>0&&!P&&(J(pe.threadId),Le(null))},[pe,q,P,J,Le]),Zn({componentName:"bills.details"});const[N,Q]=p.useState({title:"",description:"",primaryButtonText:"",secondaryButtonText:""}),[We,Ze]=p.useState("approved"),[ln,Ke]=p.useState(!1),[on,Ve]=p.useState(!1),[Ue,qe]=p.useState(!1),Ge=()=>Ke(!1),rn=()=>Ke(!0),He=Kn(e.zeniAssist?.refundStatus.fetchState),X=p.useCallback(()=>{H()},[H]);p.useEffect(()=>{(e.deleteStatus.fetchState==="Completed"||e.approvalUpdateStatus.fetchState==="Completed"||e.cancelAndDeleteStatus.fetchState==="Completed"||e.billSaveStatus==="Completed")&&(Pe(),H())},[e,H,Pe]),p.useEffect(()=>{He==="In-Progress"&&(e.zeniAssist?.refundStatus.fetchState==="Completed"||e.zeniAssist?.refundStatus.fetchState==="Error")&&(se(!1),X())},[He,e.zeniAssist?.refundStatus,X]);const k=e.transactionDetails?.billPayInfo.stage,ee=e.transactionDetails?.billPayInfo.billStatus,G=e.transactionDetails?.billPayInfo.billPaymentStatus,sn=e.transactionDetails?.billPayInfo.billPaymentRefundStatus,me=k?.code==="paid",v=me?k:ee?.code=="approved"&&G?.code?G:ee,S=Na(v,e.transactionDetails),F=e.transactionDetails?.billPayInfo.isRefundInitiated===!0?sn:G?.code!=null&&(ee?.code=="approved"||G.code==="mark_as_paid")?G:ee,ue=e.transactionDetails?.vendor?.name,M=e.isRecurring,Ye=()=>{e.transactionDetails?.id!=null&&Kt(e.transactionDetails?.id??"")},dn=()=>{Q({title:M?n.recurringBill.deleteRecurringTitle:n.deleteBillTitle,description:M?n.recurringBill.deleteRecurringAlertText:n.deleteAlertDescription,primaryButtonText:n.delete,secondaryButtonText:n.cancel}),V(!0)},cn=()=>{Q({title:n.cancelBillTitle,description:n.cancelAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),V(!0)},pn=()=>{Q({title:M?n.recurringBill.cancelAndDeleteRecurringTitle:n.cancelAndDeleteBillTitle,description:M?n.recurringBill.cancelAndDeleteRecurringAlertText:n.cancelAndDeleteAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),V(!0)},mn=()=>{z.trackRefundClick(v?.code??"",k?.code??"",F?.description??"",M?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),Q({title:n.zeniAssist.refundTitle,description:n.zeniAssist.refundDescription,primaryButtonText:n.zeniAssist.proceed,secondaryButtonText:n.cancel}),se(!0)},un={onOkClick:()=>{V(!1),N.primaryButtonText===n.delete?Vt?.(e.isRecurring):N.title===n.cancelBillTitle?Be?.(e.isRecurring):N.title===n.cancelAndDeleteBillTitle||N.title===n.recurringBill.cancelAndDeleteRecurringTitle?Be?.(e.isRecurring,!0):N.primaryButtonText===n.zeniAssist.proceed&&(z.trackRefundConfirmClick(v?.code??"",k?.code??"",F?.description??"",M?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),Qt())},onCancelClick:()=>{V(!1),se(!1)}},yn={onOkClick:c=>{ce(!1),Re({billId:e.transactionDetails?.id??"",type:"rejected",description:c})},onCancelClick:()=>{ce(!1)}},hn=()=>{const[c]=Ta("ZeniAssist");return c!=null?t.jsx(va,{"data-testid":b("bill-details-zeni-assist-icon",y),onClick:()=>{de(!Fe),z.trackZeniAssistClick(v?.code??"",k?.code??"",F?.description??"",M?["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},te={invoiceNumber:e.transactionDetails?.documentId??"",invoiceDate:e.transactionDetails?.date,billDueDate:e.transactionDetails?.dueDate,memo:e.transactionDetails?.memo,currencyCode:e.vendorCurrency??ht.currencyCode},ye=e.transactionDetails?.lines?.map((c,h)=>{const B=c;return{lineIndex:h,lineId:B.id,account:B.account,class:B.class,amount:B.amount.amount,billable:B.billable,customer:B.customer,lineDescription:B.lineDescription,recipientAmount:B.recipientAmount?.amount}})??[],bn=e.transactionDetails?.recipientTotalAmount.amount??0,he=e.transactionDetails?.recipientTotalAmount,s={paymentType:e.paymentMethodType,paymentDate:e.transactionDetails?.billPayInfo.paymentDate,internationalTransferFeeBearerPaymentMethod:e.transactionDetails?.billPayInfo.internationalTransferFeeBearerPaymentMethod,paymentToBankAccount:e.bankAccount,paymentToPI:e.paymentInstrument},D=m.labelWidth.value(l),xn=c=>c==="billable"||c==="has_been_billed"?n.yes:n.no,gn=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):"",fn=s.paymentToBankAccount?.bankAccountName!=null&&s.paymentToBankAccount?.bankAccountName!=""?s.paymentToBankAccount?.bankAccountName:`${e.transactionDetails?.vendor?.name} - ${s.paymentToBankAccount?.bankName} XXXX${gn}`,wn=e.transactionDetails?.billPayInfo?.isCollectToAccountInfoFromVendorContact?t.jsxs(t.Fragment,{children:[`${n.magicLink.collectFrom} ${e.transactionDetails?.billPayInfo?.toAccountVendorEmail}`,t.jsx(ci,{windowSize:l,children:t.jsx(di,{})})]}):void 0,Je=e.transactionDetails?.date!=null&&e.transactionDetails.bookCloseDate!=null&&e.transactionDetails.date.isBefore(e.transactionDetails.bookCloseDate),Tn=()=>`${xt.achDetails.bankRoutingNumber} ${s?.paymentToBankAccount?.bankRoutingNumberAch}, ${s?.paymentToBankAccount?.bankName}
2
- ${xt.achDetails.bankAccountNumber} ${s?.paymentToBankAccount?.bankAccountNumber}`,ne=e.transactionDetails?.billPayInfo!=null?L.getActualPaymentDate(e.transactionDetails?.billPayInfo):void 0,vn=ne!=null&&e.paymentMethodType?.maxPeriod?.value!=null?L.zeniDate(L.getNextNthWorkingDay(ne?.toDate(),[0,6],e.paymentMethodType?.maxPeriod.value).toDateString()):void 0,Qe=e.transactionDetails?.billPayInfo.expectedDepositDate??vn,Xe=it(s?.paymentType?.method??"").replace("Same Day",""),Dn=(s?.paymentToBankAccount!=null||s?.paymentToPI)!=null?n.addedByZeni:e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact?t.jsx(Un,{paymentTypeLabel:Xe,onClick:rn,style:{marginTop:`${l==="small"?a.sp2:a.sp0}`}}):void 0,jn=()=>s?.paymentToBankAccount==null&&s?.paymentToPI==null&&s?.paymentType?.method!=null&&e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact&&e.transactionDetails?.billPayInfo.paymentDate!=null?t.jsx(wa,{paymentType:s?.paymentType?.method,paymentDate:e.transactionDetails?.billPayInfo.paymentDate}):null,be=!(v?.code==="processing"||e.transactionDetails?.billPayInfo.isRefundInitiated===!0||e.transactionDetails?.billPayInfo.isRefundComplete===!0),xe=e.zeniAssist?.isEligibleForRetryIBT===!0||e.zeniAssist?.isEligibleForRetryOBP===!0,ge=e.zeniAssist?.isEligibleForRefund===!0,In=e?.transactionDetails?.billPayInfo.billPaymentMethodType.code==="wire"&&e?.transactionDetails?.billPayInfo.billPaymentMethodType.subCode==="international",$n=Lt&&e.transactionDetails?.billPayInfo.billPaymentStatus.code!=null&&["failed","cancelled","returned"].includes(e.transactionDetails.billPayInfo.billPaymentStatus.code)&&(xe||ge)&&In===!1,fe=xe||ge,An=e.transactionDetails?.billPayInfo.isRefundInitiated===!0&&e.transactionDetails?.billPayInfo.isRefundComplete===!1,we=v?.code,kn=!An&&(!Je||v?.code==="processing"&&!M),Sn=!Je,et=["small","medium-compact","medium-regular"].includes(l),ae=L.isBulkProcessing(e.transactionDetails?.bulkProcessingDetail?.type),E=L.isPaymentMethodOutsideZeni(e.paymentMethodType?.method),Cn=c=>{z.trackBillPayMarkAsPaidSubmit(c.paymentMode??"other",k?.code??"",v?.code??""),qt(!0,Ue,c)},tt=()=>{Ve(!0),z.trackBillPayMarkAsPaid(k?.code??"",v?.code??"")},Pn=()=>{qe(!0),tt()},Bn=()=>{Gt(),Ve(!1),Ue&&qe(!1)},Rn=p.useMemo(()=>({companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,entityType:"bill.details",entityId:y??d,isGlobalComment:!1,application:"dashboard",tab:"bill",url:window.location.href}),[o.currentTenant,y]),_=Zt&&e.transactionDetails?.totalAmountWithFeesInUSD!=null&&k?.code!=="paid"&&v?.code!=="failed"&&v?.code!=="processing"&&v?.code!=="cancelled"&&v?.code!=="returned"&&v?.code!=="rejected"?qn(e.transactionDetails?.totalAmountWithFeesInUSD,e.withdrawFrom,s.paymentDate):void 0,nt=()=>{Ze("approved"),Ee===!0&&Y(!1),_!=null&&z.trackLowBalanceAccountApprove(k?.code??"",e.transactionDetails?.billPayInfo.billPaymentStatus.code??"",e.isRecurring?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"",yt(o.loggedInUser),e.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account"),Re({billId:e.transactionDetails?.id??"",type:"approved"})},zn=()=>{Ze("rejected"),_!=null&&z.trackLowBalanceAccountReject(k?.code??"",e.transactionDetails?.billPayInfo.billPaymentStatus.code??"",e.isRecurring?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"",yt(o.loggedInUser),e.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account"),ce(!0)},at=p.useRef(null);return t.jsxs(Ya,{windowSize:l,ref:at,children:[t.jsx(Gn,{anchor:"right",open:ln,onClose:Ge,transitionDuration:250,"data-testid":b("vendor-email-preview-drawer"),children:t.jsx(Hn,{companyName:Yn(g.company?.companyInfo),vendor:e.transactionDetails?.vendor?.name,paymentDate:s.paymentDate?.format(ve)??"",paymentType:Xe,amount:Ae("0,0.[00]",he),isInvoiceAttached:!!e.transactionDetails?.attachments?.length,onClose:Ge})}),t.jsxs(ei,{windowSize:l,children:[t.jsx(ui,{windowSize:l,children:l==="small"?t.jsx(lt,{"data-testid":b("bill-detail-nav-bar-mobile"),title:t.jsxs(t.Fragment,{children:[ue,e.isRecurring?t.jsx($e,{width:a.sp4,height:a.sp4}):null]}),backgroundColor:Ne.colors.grey4,rightSideComponent:t.jsxs(It,{windowSize:l,children:[f?t.jsxs(Pt,{isDisabled:P,"data-testid":b("bill-comment-button"),onClick:P?()=>null:c=>{c.preventDefault(),c.stopPropagation(),U(!0),z.trackCommentActivity("bill","clicked",o.currentTenant?.companyName??"",o.controllersList.controllers.map(h=>rt(h)),void 0,void 0,"page icon")},children:[t.jsx(ot,{count:P?void 0:_e,isLoading:P,style:{left:"12px"}}),t.jsx(Bt,{})]}):null,t.jsx($t,{onClick:()=>X(),"data-testid":b("bill-detail-nav-bar-small-close-button"),children:t.jsx(jt,{})})]}),leftSideComponent:t.jsx(Dt,{windowSize:l,onClick:Me,"data-testid":b("bill-detail-nav-bar-small-back-button"),style:{visibility:`${Ce?"visible":"hidden"}`},children:t.jsx(vt,{})}),source:"BillDetailPage"}):t.jsx(lt,{"data-testid":b("bill-detail-nav-bar"),title:t.jsxs(t.Fragment,{children:[ue,e.isRecurring?t.jsx($e,{width:a.sp4,height:a.sp4}):null]}),rightSideComponent:t.jsxs(It,{windowSize:l,children:[f?t.jsxs(Pt,{isDisabled:P,"data-testid":b("bill-comment-button"),onClick:P?()=>null:c=>{c.preventDefault(),c.stopPropagation(),U(!0),z.trackCommentActivity("bill","clicked",o.currentTenant?.companyName??"",o.controllersList.controllers.map(h=>rt(h)),void 0,void 0,"page icon")},children:[t.jsx(ot,{count:P?void 0:_e,isLoading:P,style:{left:"12px"}}),t.jsx(Bt,{})]}):null,t.jsx($t,{onClick:()=>X(),"data-testid":b("bill-detail-nav-bar-close-button"),children:t.jsx(jt,{})})]}),leftSideComponent:t.jsx(Dt,{windowSize:l,onClick:Me,"data-testid":b("bill-detail-nav-bar-back-button"),style:{visibility:`${Ce?"visible":"hidden"}`},children:t.jsx(vt,{})}),enableTitleOnScroll:!0,scrollableContent:at,source:"BillDetailPage"})}),t.jsxs(ti,{windowSize:l,children:[Ee?t.jsx(Aa,{withdrawFrom:e.withdrawFrom,paymentDate:e?.transactionDetails?.billPayInfo.paymentDate,onOkClick:nt,onCancelClick:()=>{Y(!1),Ye()},onClickAway:()=>{Y(!1)}}):null,on?t.jsx(ka,{onCancel:Bn,onProceedForMarkAsPaid:Cn,saveDetailsFetchState:e.billSaveStatus,paymentData:e.outsideZeniPaymentInfo}):null,Xt||re?t.jsx(st,{titleComponent:t.jsx(ct,{children:N.title}),descriptionComponent:t.jsx(dt,{children:N.description}),primaryButtonText:N.primaryButtonText,proceedButtonVariant:re?"primary":"danger",secondaryButtonText:N.secondaryButtonText,action:un,isEditPopup:!0,isLoading:e.zeniAssist?.refundStatus.fetchState==="In-Progress",children:re?Oa(l,e):null}):null,en?t.jsx(st,{titleComponent:t.jsx(ct,{children:n.rejectBillTitlePrefix+" "+(e.transactionDetails?.vendor?.name!=null?e.transactionDetails.vendor.name:"")}),descriptionComponent:t.jsx(dt,{children:n.rejectBillDescription}),primaryButtonText:n.send,secondaryButtonText:n.cancel,action:yn,isEditPopup:!0,isNotesIncluded:!0,notesPlaceholder:n.rejectBillReasonPlaceholder}):null,l!=="small"||S?t.jsxs(ai,{windowSize:l,children:[l!=="small"?t.jsxs(ii,{windowSize:l,children:[ue,e.isRecurring?t.jsx($e,{height:a.sp5,width:a.sp5}):null]}):null,Z&&S!=null&&S.code==="deleted"?t.jsx(At,{color:S.color,bgColor:S.bgColor,borderColor:S.borderColor,children:S.value}):S?.value===ke.tabsById.overdue?t.jsx(At,{color:S.color,bgColor:S.bgColor,borderColor:S.borderColor,children:S.value}):null]}):null,F!=null&&F.code?l==="small"?t.jsx(Jn,{progressSectionObj:F,createDate:e.transactionDetails?.createTime,paymentDate:Qe,scheduleDate:ne,approvedDate:e.latestApprovedDate,isFrozen:e.transactionDetails?.isDeleted}):t.jsx(Qn,{progressSectionObj:F,createDate:e.transactionDetails?.createTime,paymentDate:Qe,scheduleDate:ne,approvedDate:e.latestApprovedDate,isFrozen:e.transactionDetails?.isDeleted}):null,La(ae,e,_),t.jsx(Xn,{sectionId:ea,currentVendorOption:{defaultOptions:[]},billId:y,isBillPayCommentingEnabled:Se,isBillPaid:me,disableVendorActions:!0,vendor:e.transactionDetails?.vendor,prevBills:e.previousBills,onAttachmentClick:ze,isVendorRecommendationEnabled:!1,showVendorGptRecommendationText:!1}),s.paymentType?.method?.includes("ach"),t.jsxs(je,{children:[t.jsx(Ie,{children:n.whatForTitle}),t.jsxs(De,{children:[t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:"invoiceNumber"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("invoiceNumber")}`},children:t.jsx(A,{label:{label:n.invoiceNumber,width:D},text:te.invoiceNumber??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:"invoiceDate"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("invoiceDate")}`},children:t.jsx(A,{label:{label:n.invoiceDate,width:D},text:te.invoiceDate?.format(ve)??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:"billDueDate"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("billDueDate")}`},children:t.jsx(A,{label:{label:n.billDueDate,width:D},text:te.billDueDate?.format(ve)??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:"memo"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("memo")}`},children:t.jsx(A,{label:{label:n.memo,width:D},text:te.memo??C,style:{width:"auto"}})})]})]}),t.jsxs(je,{children:[t.jsx(ni,{windowSize:l,children:t.jsx(Ie,{children:n.lineItemsTitle})}),ye.length>0?ye.map((c,h)=>{const B=e?.transactionDetails?.lines?.find(Mn=>Mn.id===c.lineId)?.recipientAmount;return t.jsxs(Ja,{children:[ye.length>1?t.jsx(Qa,{windowSize:l,children:t.jsx(Xa,{windowSize:l,children:`${n.line} # ${h+1}`})}):null,t.jsxs(De,{children:[t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:`${h}.recipientAmount`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("recipientAmount",h)}`},children:t.jsx(A,{label:{label:n.amount,width:D},text:B!=null?Ae("0,0[.]00",B):C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:`${h}.lineDescription`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("lineDescription",h)}`},children:t.jsx(A,{label:{label:n.description,width:D},text:c.lineDescription??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:`${h}.account`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("account",h)}`},children:t.jsx(A,{label:{label:n.category,width:D},text:c.account?.accountName??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:`${h}.class`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("class",h)}`},children:t.jsx(A,{label:{label:n.class,width:D},text:c.class?.className??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:`${h}.billable`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("billable",h)}`},children:t.jsx(A,{label:{label:n.billable,width:D},text:c.billable!=null?xn(c.billable):C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:`${h}.customer`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("customer",h)}`},children:t.jsx(A,{label:{label:n.customer,width:D},text:c.customer?.name??C,style:{width:"auto"}})})]})]},h)}):null]}),t.jsxs(li,{windowSize:l,children:[t.jsx(oi,{children:n.total}),t.jsx(ri,{children:he!=null?t.jsx(ta,{amount:he,integerStyles:pt.h6Medium.cssObject,decimalStyles:pt.standardMedium.cssObject}):C})]}),t.jsxs(je,{children:[t.jsx(Ie,{children:n.paymentDetailsTitle}),t.jsxs(De,{children:[E?null:t.jsxs(t.Fragment,{children:[t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:"withdrawFrom"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("withdrawFrom")}`},children:t.jsx(A,{label:{label:n.withdrawFrom,width:D},text:e.withdrawFrom!=null?Rt(e.withdrawFrom,l):d,style:{width:"auto"},additionalInfoLabelStyles:{textAlign:"right",paddingRight:m.infoLabelPaddingRight.valuePx(l),marginTop:m.infoLabelMarginTop.valuePx(l),color:ie.brandColorGoldDark},additionalInfoLabel:_!=null&&k?.code==="pending_approval"?Nt.addMoney:_})}),t.jsx(R,{})]}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:"paymentType"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("paymentType")}`},children:t.jsx(A,{additionalInfoLabel:s.paymentType?.method!=null&&s.paymentType.method.includes(L.NEW_INTERNATIONAL_METHOD_SUBTEXT)&&Et&&s.internationalTransferFeeBearerPaymentMethod!=null?t.jsx(Wa,{children:na(s.internationalTransferFeeBearerPaymentMethod)}):void 0,label:{label:n.paymentMethod,width:D},text:E&&e.outsideZeniPaymentInfo!=null?Ea(e.outsideZeniPaymentInfo):it(s.paymentType?.method??""),style:{width:"auto"}})}),E?null:t.jsxs(t.Fragment,{children:[t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:"paymentTo"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("paymentTo")}`},children:t.jsxs(t.Fragment,{children:[t.jsx(A,{label:{label:n.paymentTo,width:D},text:s.paymentToBankAccount!=null?fn:s.paymentToPI!=null?s.paymentToPI.displayText:wn,style:{width:"auto"},showEyeIcon:s.paymentToBankAccount!=null&&!!s.paymentType?.method?.includes("ach"),showAdditionalInfoLabel:!!e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact||s.paymentType?.method?.includes("ach"),tooltipText:Tn(),additionalInfoLabel:t.jsx(_a,{children:Dn})}),jn()]})})]}),E||e.isRecurring?t.jsxs(t.Fragment,{children:[t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:"recurringPaymentType"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("recurringPaymentType")}`},children:t.jsxs(t.Fragment,{children:[t.jsx(A,{label:{label:n.paymentType,width:D},labelStyles:{marginRight:m.labelMarginRight.valuePx(l)},style:{width:"auto"},text:ia(e.isRecurring,E,e.transactionDetails?.recurringBillInstance??1,e.recurringBillConfigDetail?.totalPaymentCycles??0),textStyles:{paddingLeft:m.textPadding.valuePx(l),paddingRight:m.textPadding.valuePx(l)},additionalInfoLabel:aa(l,e.isRecurring,E,e.recurringBillConfigDetail),additionalInfoLabelStyles:{paddingRight:m.paddingRight.valuePx(l),marginTop:m.additionalTextMarginTop.valuePx(l)}}),e.recurringBillInstances!=null&&e.recurringBillInstances.length>0?t.jsx(pi,{style:{paddingLeft:m.recurringSchedulePaddingLeft.valuePx(l)},children:t.jsx(la,{onAttachmentClick:ze,currencySymbol:e.transactionDetails?.recipientTotalAmount.currencySymbol??ht.currencySymbol,recurringBillInstances:e.recurringBillInstances})}):null]})})]}):null]})]}),e.transactionDetails&&e.transactionDetails.id&&t.jsx(oa,{amount:bn,activities:e.billActivities,stage:k?.code??"draft",onAddNewRule:Ut,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:Ot,signedInUserId:le?.userId,showRealTimeApproval:Ft,entityApprovalId:e.billActivities[0]?.entityApprovalId??e.transactionDetails.entityApprovalId,updateEditMode:Ht,onSaveRealTimeApprovals:Yt},historicActivities:e.billHistory.activities}),t.jsx(si,{})]}),e.transactionDetails?.vendor!=null&&!me&&!e.transactionDetails.isDeleted?t.jsx(ra,{separatorStyle:{marginRight:a.sp4},showPrimaryButton:K||x,showCancel:!K&&x,cancelBtn:{label:et?n.buttons.reject:n.buttons.rejectBill,isLoading:We==="rejected"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:zn,style:{width:m.footerButtonWidth.value(l)},reverseSpinnerColor:!1},primaryBtn:{label:Fa(K,et),isLoading:We==="approved"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:K?tt:()=>{_!=null?Y(!0):nt()},isDisabled:e.billSaveStatus==="In-Progress"||e.approvalUpdateStatus.fetchState==="In-Progress"||e.realTimeApproval.isEditMode===!0,style:{width:K?"auto":m.footerButtonWidth.value(l)}},rightSideComponent:t.jsx(Za,{children:t.jsxs(Ha,{windowSize:l,children:[!ae&&Oe?t.jsx(mt,{onClickAway:()=>{oe(!1),de(!1)},children:t.jsxs(Tt,{windowSize:l,"data-testid":b("bill-actions-container"),children:[we!=="processing"?t.jsx(W,{onClick:dn,"data-testid":b("delete-bill-action-item"),children:n.buttons.deleteBill}):null,we==="processing"&&!M?t.jsx(W,{onClick:cn,"data-testid":b("cancel-bill-action-item"),children:n.buttons.cancel}):null,we==="processing"&&Sn?t.jsx(W,{onClick:pn,"data-testid":b("cancel-and-delete-bill-action-item"),children:n.buttons.cancelAndDelete}):null,x&&E&&_t?t.jsx(W,{onClick:Pn,"data-testid":b("mark-as-paid-action-item"),children:n.paymentOutsideZeni.markAsPaid}):null]})}):null,Fe?t.jsx(mt,{onClickAway:()=>{oe(!1),de(!1)},children:t.jsxs(Tt,{windowSize:l,"data-testid":b("bill-actions-with-zeni-assist-container"),children:[xe?t.jsx(W,{onClick:()=>{z.trackRetryClick(v?.code??"",k?.code??"",F?.description??"",M?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),Jt()},"data-testid":b("retry-bill-action-item"),children:n.buttons.retry}):null,ge?t.jsx(W,{onClick:mn,"data-testid":b("refund-bill-action-item"),children:n.buttons.refund}):null]})}):null,t.jsxs(Ga,{windowSize:l,children:[$n===!0?t.jsx(Te,{enterDelay:600,style:{color:ie.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:fe?n.zeniAssist.tooltip:n.zeniAssist.connectToTeamTooltip,placement:"top",maxWidth:"267px",children:t.jsx(wt,{windowSize:l,showEditIcon:be,isIconClickable:fe,"data-testid":b("other-actions-icon-container"),children:fe?t.jsx(hn,{}):t.jsx(Va,{})})}):null,!ae&&be===!0?t.jsx(Te,{enterDelay:600,style:{color:ie.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:za,placement:"top",children:t.jsx(qa,{onClick:Ye,"data-testid":b("edit-bill-icon-container"),children:t.jsx(Ua,{})})}):null,!ae&&kn===!0?t.jsx(Te,{enterDelay:600,style:{color:ie.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:Ra,placement:"top",children:t.jsx(wt,{windowSize:l,showEditIcon:be,isIconClickable:!0,"data-testid":b("more-details-icon-container"),children:t.jsx(Ka,{onClick:()=>oe(!Oe)})})}):null]})]})}),style:{minHeight:62}}):null]}),f?t.jsx($a,{id:T,children:t.jsx(sa,{isDrawerOpen:nn,allowComposer:!0,drawerTitle:Ma,threads:q,filter:w,autoExpand:!0,autoFocus:!1,isLoading:P,textOverrides:{composerPlaceholder:gt.addANewComment,replyComposerPlaceholder:gt.replyAComment,threadResolve:ft.resolveComment,threadUnResolve:ft.unResolveComment},threadMetadata:Rn,onThreadClick:an,onCloseAllThreadsDrawer:()=>U(!1),drawerSectionStyle:{width:l==="small"?"100%":"400px",boxSizing:l==="small"?"border-box":"content-box",padding:`${a.sp0} ${m.drawerSectionPaddingLeftRight.valuePx(l)}`,backgroundColor:Ne.colors.background},collapsibleThreadStyle:{width:l==="small"?"100%":"360px"}})}):null]})},Na=(e,g)=>{const x=e?.code;if(e!=null&&x!=null)return g?.isDeleted===!0?{value:ke.tabsById.deleted,color:O.deleted.color,bgColor:O.deleted.bgColor,borderColor:O.deleted.borderColor,code:"deleted"}:x==="pending_approval"&&g?.dueDate?.isBefore(L.dateNow(),"date")===!0?{value:ke.tabsById.overdue,color:O.overdue.color,bgColor:O.overdue.bgColor,borderColor:O.overdue.borderColor}:{value:e.name,color:O[x].color,bgColor:O[x].bgColor,borderColor:O[x].borderColor}},Oa=(e,g)=>{const x=g.transactionDetails?.recipientTotalAmount;return t.jsxs(mi,{windowSize:e,children:[t.jsxs(kt,{windowSize:e,children:[t.jsx(St,{children:n.zeniAssist.accountNumber}),t.jsx(Ct,{children:g.withdrawFrom!=null?Rt(g.withdrawFrom,e):d})]}),t.jsxs(kt,{windowSize:e,children:[t.jsx(St,{children:n.zeniAssist.amount}),t.jsx(Ct,{children:x!=null?Ae("0,0[.]00",x):C})]})]})},Fa=(e,g)=>e?n.paymentOutsideZeni.markAsPaid:g?n.buttons.approve:n.buttons.approveBill,Ea=e=>{const g=e.paymentMode,x=n.paymentOutsideZeni.offline;if(g==null||g==="other")return x;const Z=n.paymentOutsideZeni.paymentModeOptions.find(le=>le.value===g)?.label;return`${x} ${Ba} ${Z}`},La=(e,g,x)=>{if(e)return t.jsx(ut,{variant:"warning",style:{marginTop:a.sp5,marginBottom:a.sp3},title:bt.duplicateWarning.title,description:bt.duplicateWarning.description});if(x!=null){const Z=`${g.withdrawFrom?.label??""} ${g.withdrawFrom?.maskedAccountNumber??""}`;return t.jsx(ut,{variant:"low-balance",style:{marginTop:a.sp2,marginBottom:a.sp3},title:`${Nt.lowBalanceIn.replace("__account__",Z)}`,description:x.replace("Low balance! ","")})}else return null},_a=i.div``,Wa=i.div``,Za=i.div`
1
+ import{X as Nn,t as On,u as Fn,fI as En,fJ as Ln,fK as Wn,fL as _n,aV as Zn,a1 as Kn,M as Vn,C as u,j as t,l as L,cE as it,cF as Un,o as a,cG as Yn,cH as Gn,Y as b,cI as Hn,_ as Ae,cJ as qn,aW as lt,aI as ot,dp as rt,bM as st,bO as dt,bP as ct,fM as Jn,fN as Qn,fO as Xn,fP as ea,cO as j,cP as I,cQ as $,fQ as A,cN as ta,v as pt,g as ie,cR as Rt,cS as na,cT as aa,cU as ia,fR as la,fS as oa,a3 as ra,m as mt,bs as Te,fT as sa,fU as O,p as r,b as da,bo as ca,fV as pa,a2 as ma,fW as ua,fX as ut,cY as yt,Q as ya,ct as ha,bF as ba,al as xa,an as ga,k as fa,eW as zt,fY as wa,w as Mt,ab as Ta,aj as va,aN as Da,eG as ja,q as Ia}from"./index-nrhSmhQT.js";import{b as p,n as i}from"./vendor-CnQcJ2Lu.js";import{_ as $a}from"./liveblocks-sSQ9JElv.js";import{o as Aa,t as ka}from"./LowBalancePopup-CdftTvLb-DzgqRFO5.js";import"./mui-C5LQ0bMa.js";import"./analytics-DThoELaW.js";import"./routing-Cpaypegg.js";import"./sentry-HDxG13yk.js";import"./redux-ByjIRbhZ.js";import"./crypto-BURQLTgV.js";const Sa=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"})))),Ca={formTitle:new ya("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:Pa,common:{noText:C,strings:{empty:d},currency:ht,via:Ba,more:Ra,edit:za},spendManagement:{billPay:{billDetails:n,billsByTabs:ke,bulkActions:bt,vendorCreation:xt,insufficientFunds:Nt}},collaboration:{threads:{placeholder:gt,tooltip:ft,title:{comments:Ma}}}}=Vn.getLocalizedStrings(),ve=Pa.visual.MMMDCommaYYYYformat,ji=({billDetails:e,currentTenant:g,showApproveRejectBtns:x,isShowDeletedBillsEnabled:Z,signedInUser:le,isAdmin:Ot,isRealTimeApprovalEnabled:Ft,isInternationalPaymentShaVsOurEnabled:Et,hasZeniAssistAccess:Lt,analytics:z,showMarkAsPaidButtonToCreator:K,showMarkAsPaidButtonToApprover:Wt,isBillPayCommentingEnabled:Se,isZeniUser:_t,showBackButton:Ce=!0,isDetectInsufficientFundsEnabled:Zt,redirectToEditableBillScreen:Kt,redirectToBillsScreen:H,discardBillDetailsFromLocalStore:Pe,deleteBill:Vt,cancelAndDeleteBill:Be,approveOrRejectBill:Re,onAddNewRule:Ut,onAttachmentClick:ze,saveBillDetails:Yt,discardOutsideZeniPaymentData:Gt,onBackClick:Me,updateEditRealTimeApproverClicked:Ht,onSaveRealTimeApprovals:qt,onRetryPaymentClick:Jt,onRefundPaymentClick:Qt})=>{const l=Nn(),o=On(),Ne=Fn(),[Xt,V]=p.useState(!1),[Oe,oe]=p.useState(!1),[re,se]=p.useState(!1),[Fe,de]=p.useState(!1),[en,ce]=p.useState(!1),[Ee,q]=p.useState(!1),y=e.transactionDetails?.id,tn=_t?En:Ln,{requestToOpenThread:pe,setRequestToOpenThread:Le,setOpenThread:J}=p.useContext(tn),[nn,U]=p.useState(!1),w={application:"dashboard",companyId:o.currentTenant?.companyId,tab:"bill",entityId:y,isGlobalComment:!1},{threads:Y,isLoading:P}=Wn(w,"both",!1),f=Se&&y!=null,We=p.useMemo(()=>y==null?[]:Y.filter(c=>c.resolved===!1&&!c.id.includes(_n)),[Y,y]).length,T=`dashboard_${o.currentTenant?.companyId}`,an=p.useCallback((c,h)=>{J(h),U(!1)},[J,U]);p.useEffect(()=>{pe?.threadId!=null&&Y.length>0&&!P&&(J(pe.threadId),Le(null))},[pe,Y,P,J,Le]),Zn({componentName:"bills.details"});const[N,Q]=p.useState({title:"",description:"",primaryButtonText:"",secondaryButtonText:""}),[_e,Ze]=p.useState("approved"),[ln,Ke]=p.useState(!1),[on,Ve]=p.useState(!1),[Ue,Ye]=p.useState(!1),Ge=()=>Ke(!1),rn=()=>Ke(!0),He=Kn(e.zeniAssist?.refundStatus.fetchState),X=p.useCallback(()=>{H()},[H]);p.useEffect(()=>{(e.deleteStatus.fetchState==="Completed"||e.approvalUpdateStatus.fetchState==="Completed"||e.cancelAndDeleteStatus.fetchState==="Completed"||e.billSaveStatus==="Completed")&&(Pe(),H())},[e,H,Pe]),p.useEffect(()=>{He==="In-Progress"&&(e.zeniAssist?.refundStatus.fetchState==="Completed"||e.zeniAssist?.refundStatus.fetchState==="Error")&&(se(!1),X())},[He,e.zeniAssist?.refundStatus,X]);const k=e.transactionDetails?.billPayInfo.stage,ee=e.transactionDetails?.billPayInfo.billStatus,G=e.transactionDetails?.billPayInfo.billPaymentStatus,sn=e.transactionDetails?.billPayInfo.billPaymentRefundStatus,me=k?.code==="paid",v=me?k:ee?.code=="approved"&&G?.code?G:ee,S=Na(v,e.transactionDetails),F=e.transactionDetails?.billPayInfo.isRefundInitiated===!0?sn:G?.code!=null&&(ee?.code=="approved"||G.code==="mark_as_paid")?G:ee,ue=e.transactionDetails?.vendor?.name,M=e.isRecurring,qe=()=>{e.transactionDetails?.id!=null&&Kt(e.transactionDetails?.id??"")},dn=()=>{Q({title:M?n.recurringBill.deleteRecurringTitle:n.deleteBillTitle,description:M?n.recurringBill.deleteRecurringAlertText:n.deleteAlertDescription,primaryButtonText:n.delete,secondaryButtonText:n.cancel}),V(!0)},cn=()=>{Q({title:n.cancelBillTitle,description:n.cancelAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),V(!0)},pn=()=>{Q({title:M?n.recurringBill.cancelAndDeleteRecurringTitle:n.cancelAndDeleteBillTitle,description:M?n.recurringBill.cancelAndDeleteRecurringAlertText:n.cancelAndDeleteAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),V(!0)},mn=()=>{z.trackRefundClick(v?.code??"",k?.code??"",F?.description??"",M?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),Q({title:n.zeniAssist.refundTitle,description:n.zeniAssist.refundDescription,primaryButtonText:n.zeniAssist.proceed,secondaryButtonText:n.cancel}),se(!0)},un={onOkClick:()=>{V(!1),N.primaryButtonText===n.delete?Vt?.(e.isRecurring):N.title===n.cancelBillTitle?Be?.(e.isRecurring):N.title===n.cancelAndDeleteBillTitle||N.title===n.recurringBill.cancelAndDeleteRecurringTitle?Be?.(e.isRecurring,!0):N.primaryButtonText===n.zeniAssist.proceed&&(z.trackRefundConfirmClick(v?.code??"",k?.code??"",F?.description??"",M?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),Qt())},onCancelClick:()=>{V(!1),se(!1)}},yn={onOkClick:c=>{ce(!1),Re({billId:e.transactionDetails?.id??"",type:"rejected",description:c})},onCancelClick:()=>{ce(!1)}},hn=()=>{const[c]=Ta("ZeniAssist");return c!=null?t.jsx(va,{"data-testid":b("bill-details-zeni-assist-icon",y),onClick:()=>{de(!Fe),z.trackZeniAssistClick(v?.code??"",k?.code??"",F?.description??"",M?["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},te={invoiceNumber:e.transactionDetails?.documentId??"",invoiceDate:e.transactionDetails?.date,billDueDate:e.transactionDetails?.dueDate,memo:e.transactionDetails?.memo,currencyCode:e.vendorCurrency??ht.currencyCode},ye=e.transactionDetails?.lines?.map((c,h)=>{const B=c;return{lineIndex:h,lineId:B.id,account:B.account,class:B.class,amount:B.amount.amount,billable:B.billable,customer:B.customer,lineDescription:B.lineDescription,recipientAmount:B.recipientAmount?.amount}})??[],bn=e.transactionDetails?.recipientTotalAmount.amount??0,he=e.transactionDetails?.recipientTotalAmount,s={paymentType:e.paymentMethodType,paymentDate:e.transactionDetails?.billPayInfo.paymentDate,internationalTransferFeeBearerPaymentMethod:e.transactionDetails?.billPayInfo.internationalTransferFeeBearerPaymentMethod,paymentToBankAccount:e.bankAccount,paymentToPI:e.paymentInstrument},D=m.labelWidth.value(l),xn=c=>c==="billable"||c==="has_been_billed"?n.yes:n.no,gn=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):"",fn=s.paymentToBankAccount?.bankAccountName!=null&&s.paymentToBankAccount?.bankAccountName!=""?s.paymentToBankAccount?.bankAccountName:`${e.transactionDetails?.vendor?.name} - ${s.paymentToBankAccount?.bankName} XXXX${gn}`,wn=e.transactionDetails?.billPayInfo?.isCollectToAccountInfoFromVendorContact?t.jsxs(t.Fragment,{children:[`${n.magicLink.collectFrom} ${e.transactionDetails?.billPayInfo?.toAccountVendorEmail}`,t.jsx(ci,{windowSize:l,children:t.jsx(di,{})})]}):void 0,Je=e.transactionDetails?.date!=null&&e.transactionDetails.bookCloseDate!=null&&e.transactionDetails.date.isBefore(e.transactionDetails.bookCloseDate),Tn=()=>`${xt.achDetails.bankRoutingNumber} ${s?.paymentToBankAccount?.bankRoutingNumberAch}, ${s?.paymentToBankAccount?.bankName}
2
+ ${xt.achDetails.bankAccountNumber} ${s?.paymentToBankAccount?.bankAccountNumber}`,ne=e.transactionDetails?.billPayInfo!=null?L.getActualPaymentDate(e.transactionDetails?.billPayInfo):void 0,vn=ne!=null&&e.paymentMethodType?.maxPeriod?.value!=null?L.zeniDate(L.getNextNthWorkingDay(ne?.toDate(),[0,6],e.paymentMethodType?.maxPeriod.value).toDateString()):void 0,Qe=e.transactionDetails?.billPayInfo.expectedDepositDate??vn,Xe=it(s?.paymentType?.method??"").replace("Same Day",""),Dn=(s?.paymentToBankAccount!=null||s?.paymentToPI)!=null?n.addedByZeni:e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact?t.jsx(Un,{paymentTypeLabel:Xe,onClick:rn,style:{marginTop:`${l==="small"?a.sp2:a.sp0}`}}):void 0,jn=()=>s?.paymentToBankAccount==null&&s?.paymentToPI==null&&s?.paymentType?.method!=null&&e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact&&e.transactionDetails?.billPayInfo.paymentDate!=null?t.jsx(wa,{paymentType:s?.paymentType?.method,paymentDate:e.transactionDetails?.billPayInfo.paymentDate}):null,be=!(v?.code==="processing"||e.transactionDetails?.billPayInfo.isRefundInitiated===!0||e.transactionDetails?.billPayInfo.isRefundComplete===!0),xe=e.zeniAssist?.isEligibleForRetryIBT===!0||e.zeniAssist?.isEligibleForRetryOBP===!0,ge=e.zeniAssist?.isEligibleForRefund===!0,In=e?.transactionDetails?.billPayInfo.billPaymentMethodType.code==="wire"&&e?.transactionDetails?.billPayInfo.billPaymentMethodType.subCode==="international",$n=Lt&&e.transactionDetails?.billPayInfo.billPaymentStatus.code!=null&&["failed","cancelled","returned"].includes(e.transactionDetails.billPayInfo.billPaymentStatus.code)&&(xe||ge)&&In===!1,fe=xe||ge,An=e.transactionDetails?.billPayInfo.isRefundInitiated===!0&&e.transactionDetails?.billPayInfo.isRefundComplete===!1,we=v?.code,kn=!An&&(!Je||v?.code==="processing"&&!M),Sn=!Je,et=["small","medium-compact","medium-regular"].includes(l),ae=L.isBulkProcessing(e.transactionDetails?.bulkProcessingDetail?.type),E=L.isPaymentMethodOutsideZeni(e.paymentMethodType?.method),Cn=c=>{z.trackBillPayMarkAsPaidSubmit(c.paymentMode??"other",k?.code??"",v?.code??""),Yt(!0,Ue,c)},tt=()=>{Ve(!0),z.trackBillPayMarkAsPaid(k?.code??"",v?.code??"")},Pn=()=>{Ye(!0),tt()},Bn=()=>{Gt(),Ve(!1),Ue&&Ye(!1)},Rn=p.useMemo(()=>({companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,entityType:"bill.details",entityId:y??d,isGlobalComment:!1,application:"dashboard",tab:"bill",url:window.location.href}),[o.currentTenant,y]),W=Zt&&e.transactionDetails?.totalAmountWithFeesInUSD!=null&&k?.code!=="paid"&&v?.code!=="failed"&&v?.code!=="processing"&&v?.code!=="cancelled"&&v?.code!=="returned"&&v?.code!=="rejected"?Yn(e.transactionDetails?.totalAmountWithFeesInUSD,e.withdrawFrom,s.paymentDate):void 0,nt=()=>{Ze("approved"),Ee===!0&&q(!1),W!=null&&z.trackLowBalanceAccountApprove(k?.code??"",e.transactionDetails?.billPayInfo.billPaymentStatus.code??"",e.isRecurring?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"",yt(o.loggedInUser),e.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account"),Re({billId:e.transactionDetails?.id??"",type:"approved"})},zn=()=>{Ze("rejected"),W!=null&&z.trackLowBalanceAccountReject(k?.code??"",e.transactionDetails?.billPayInfo.billPaymentStatus.code??"",e.isRecurring?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"",yt(o.loggedInUser),e.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account"),ce(!0)},at=p.useRef(null);return t.jsxs(qa,{windowSize:l,ref:at,children:[t.jsx(Gn,{anchor:"right",open:ln,onClose:Ge,transitionDuration:250,"data-testid":b("vendor-email-preview-drawer"),children:t.jsx(Hn,{companyName:qn(g.company?.companyInfo),vendor:e.transactionDetails?.vendor?.name,paymentDate:s.paymentDate?.format(ve)??"",paymentType:Xe,amount:Ae("0,0.[00]",he),isInvoiceAttached:!!e.transactionDetails?.attachments?.length,onClose:Ge})}),t.jsxs(ei,{windowSize:l,children:[t.jsx(ui,{windowSize:l,children:l==="small"?t.jsx(lt,{"data-testid":b("bill-detail-nav-bar-mobile"),title:t.jsxs(t.Fragment,{children:[ue,e.isRecurring?t.jsx($e,{width:a.sp4,height:a.sp4}):null]}),backgroundColor:Ne.colors.grey4,rightSideComponent:t.jsxs(It,{windowSize:l,children:[f?t.jsxs(Pt,{isDisabled:P,"data-testid":b("bill-comment-button"),onClick:P?()=>null:c=>{c.preventDefault(),c.stopPropagation(),U(!0),z.trackCommentActivity("bill","clicked",o.currentTenant?.companyName??"",o.controllersList.controllers.map(h=>rt(h)),void 0,void 0,"page icon")},children:[t.jsx(ot,{count:P?void 0:We,isLoading:P,style:{left:"12px"}}),t.jsx(Bt,{})]}):null,t.jsx($t,{onClick:()=>X(),"data-testid":b("bill-detail-nav-bar-small-close-button"),children:t.jsx(jt,{})})]}),leftSideComponent:t.jsx(Dt,{windowSize:l,onClick:Me,"data-testid":b("bill-detail-nav-bar-small-back-button"),style:{visibility:`${Ce?"visible":"hidden"}`},children:t.jsx(vt,{})}),source:"BillDetailPage"}):t.jsx(lt,{"data-testid":b("bill-detail-nav-bar"),title:t.jsxs(t.Fragment,{children:[ue,e.isRecurring?t.jsx($e,{width:a.sp4,height:a.sp4}):null]}),rightSideComponent:t.jsxs(It,{windowSize:l,children:[f?t.jsxs(Pt,{isDisabled:P,"data-testid":b("bill-comment-button"),onClick:P?()=>null:c=>{c.preventDefault(),c.stopPropagation(),U(!0),z.trackCommentActivity("bill","clicked",o.currentTenant?.companyName??"",o.controllersList.controllers.map(h=>rt(h)),void 0,void 0,"page icon")},children:[t.jsx(ot,{count:P?void 0:We,isLoading:P,style:{left:"12px"}}),t.jsx(Bt,{})]}):null,t.jsx($t,{onClick:()=>X(),"data-testid":b("bill-detail-nav-bar-close-button"),children:t.jsx(jt,{})})]}),leftSideComponent:t.jsx(Dt,{windowSize:l,onClick:Me,"data-testid":b("bill-detail-nav-bar-back-button"),style:{visibility:`${Ce?"visible":"hidden"}`},children:t.jsx(vt,{})}),enableTitleOnScroll:!0,scrollableContent:at,source:"BillDetailPage"})}),t.jsxs(ti,{windowSize:l,children:[Ee?t.jsx(Aa,{withdrawFrom:e.withdrawFrom,paymentDate:e?.transactionDetails?.billPayInfo.paymentDate,onOkClick:nt,onCancelClick:()=>{q(!1),qe()},onClickAway:()=>{q(!1)}}):null,on?t.jsx(ka,{onCancel:Bn,onProceedForMarkAsPaid:Cn,saveDetailsFetchState:e.billSaveStatus,paymentData:e.outsideZeniPaymentInfo}):null,Xt||re?t.jsx(st,{titleComponent:t.jsx(ct,{children:N.title}),descriptionComponent:t.jsx(dt,{children:N.description}),primaryButtonText:N.primaryButtonText,proceedButtonVariant:re?"primary":"danger",secondaryButtonText:N.secondaryButtonText,action:un,isEditPopup:!0,isLoading:e.zeniAssist?.refundStatus.fetchState==="In-Progress",children:re?Oa(l,e):null}):null,en?t.jsx(st,{titleComponent:t.jsx(ct,{children:n.rejectBillTitlePrefix+" "+(e.transactionDetails?.vendor?.name!=null?e.transactionDetails.vendor.name:"")}),descriptionComponent:t.jsx(dt,{children:n.rejectBillDescription}),primaryButtonText:n.send,secondaryButtonText:n.cancel,action:yn,isEditPopup:!0,isNotesIncluded:!0,notesPlaceholder:n.rejectBillReasonPlaceholder}):null,l!=="small"||S?t.jsxs(ai,{windowSize:l,children:[l!=="small"?t.jsxs(ii,{windowSize:l,children:[ue,e.isRecurring?t.jsx($e,{height:a.sp5,width:a.sp5}):null]}):null,Z&&S!=null&&S.code==="deleted"?t.jsx(At,{color:S.color,bgColor:S.bgColor,borderColor:S.borderColor,children:S.value}):S?.value===ke.tabsById.overdue?t.jsx(At,{color:S.color,bgColor:S.bgColor,borderColor:S.borderColor,children:S.value}):null]}):null,F!=null&&F.code?l==="small"?t.jsx(Jn,{progressSectionObj:F,createDate:e.transactionDetails?.createTime,paymentDate:Qe,scheduleDate:ne,approvedDate:e.latestApprovedDate,isFrozen:e.transactionDetails?.isDeleted}):t.jsx(Qn,{progressSectionObj:F,createDate:e.transactionDetails?.createTime,paymentDate:Qe,scheduleDate:ne,approvedDate:e.latestApprovedDate,isFrozen:e.transactionDetails?.isDeleted}):null,La(ae,e,W),t.jsx(Xn,{sectionId:ea,currentVendorOption:{defaultOptions:[]},billId:y,isBillPayCommentingEnabled:Se,isBillPaid:me,disableVendorActions:!0,vendor:e.transactionDetails?.vendor,prevBills:e.previousBills,onAttachmentClick:ze,isVendorRecommendationEnabled:!1,showVendorGptRecommendationText:!1}),s.paymentType?.method?.includes("ach"),t.jsxs(je,{children:[t.jsx(Ie,{children:n.whatForTitle}),t.jsxs(De,{children:[t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:"invoiceNumber"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("invoiceNumber")}`},children:t.jsx(A,{label:{label:n.invoiceNumber,width:D},text:te.invoiceNumber??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:"invoiceDate"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("invoiceDate")}`},children:t.jsx(A,{label:{label:n.invoiceDate,width:D},text:te.invoiceDate?.format(ve)??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:"billDueDate"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("billDueDate")}`},children:t.jsx(A,{label:{label:n.billDueDate,width:D},text:te.billDueDate?.format(ve)??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:"memo"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("memo")}`},children:t.jsx(A,{label:{label:n.memo,width:D},text:te.memo??C,style:{width:"auto"}})})]})]}),t.jsxs(je,{children:[t.jsx(ni,{windowSize:l,children:t.jsx(Ie,{children:n.lineItemsTitle})}),ye.length>0?ye.map((c,h)=>{const B=e?.transactionDetails?.lines?.find(Mn=>Mn.id===c.lineId)?.recipientAmount;return t.jsxs(Ja,{children:[ye.length>1?t.jsx(Qa,{windowSize:l,children:t.jsx(Xa,{windowSize:l,children:`${n.line} # ${h+1}`})}):null,t.jsxs(De,{children:[t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:`${h}.recipientAmount`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("recipientAmount",h)}`},children:t.jsx(A,{label:{label:n.amount,width:D},text:B!=null?Ae("0,0[.]00",B):C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:`${h}.lineDescription`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("lineDescription",h)}`},children:t.jsx(A,{label:{label:n.description,width:D},text:c.lineDescription??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:`${h}.account`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("account",h)}`},children:t.jsx(A,{label:{label:n.category,width:D},text:c.account?.accountName??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:`${h}.class`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("class",h)}`},children:t.jsx(A,{label:{label:n.class,width:D},text:c.class?.className??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:`${h}.billable`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("billable",h)}`},children:t.jsx(A,{label:{label:n.billable,width:D},text:c.billable!=null?xn(c.billable):C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:`${h}.customer`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("customer",h)}`},children:t.jsx(A,{label:{label:n.customer,width:D},text:c.customer?.name??C,style:{width:"auto"}})})]})]},h)}):null]}),t.jsxs(li,{windowSize:l,children:[t.jsx(oi,{children:n.total}),t.jsx(ri,{children:he!=null?t.jsx(ta,{amount:he,integerStyles:pt.h6Medium.cssObject,decimalStyles:pt.standardMedium.cssObject}):C})]}),t.jsxs(je,{children:[t.jsx(Ie,{children:n.paymentDetailsTitle}),t.jsxs(De,{children:[E?null:t.jsxs(t.Fragment,{children:[t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:"withdrawFrom"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("withdrawFrom")}`},children:t.jsx(A,{label:{label:n.withdrawFrom,width:D},text:e.withdrawFrom!=null?Rt(e.withdrawFrom,l):d,style:{width:"auto"},additionalInfoLabelStyles:{textAlign:"right",paddingRight:m.infoLabelPaddingRight.valuePx(l),marginTop:m.infoLabelMarginTop.valuePx(l),color:ie.brandColorGoldDark},additionalInfoLabel:W!=null&&k?.code==="pending_approval"?Nt.addMoney:W})}),t.jsx(R,{})]}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:"paymentType"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("paymentType")}`},children:t.jsx(A,{additionalInfoLabel:s.paymentType?.method!=null&&s.paymentType.method.includes(L.NEW_INTERNATIONAL_METHOD_SUBTEXT)&&Et&&s.internationalTransferFeeBearerPaymentMethod!=null?t.jsx(_a,{children:na(s.internationalTransferFeeBearerPaymentMethod)}):void 0,label:{label:n.paymentMethod,width:D},text:E&&e.outsideZeniPaymentInfo!=null?Ea(e.outsideZeniPaymentInfo):it(s.paymentType?.method??""),style:{width:"auto"}})}),E?null:t.jsxs(t.Fragment,{children:[t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:"paymentTo"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("paymentTo")}`},children:t.jsxs(t.Fragment,{children:[t.jsx(A,{label:{label:n.paymentTo,width:D},text:s.paymentToBankAccount!=null?fn:s.paymentToPI!=null?s.paymentToPI.displayText:wn,style:{width:"auto"},showEyeIcon:s.paymentToBankAccount!=null&&!!s.paymentType?.method?.includes("ach"),showAdditionalInfoLabel:!!e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact||s.paymentType?.method?.includes("ach"),tooltipText:Tn(),additionalInfoLabel:t.jsx(Wa,{children:Dn})}),jn()]})})]}),E||e.isRecurring?t.jsxs(t.Fragment,{children:[t.jsx(R,{}),t.jsx(j,{isThreadAllowed:f,entityId:y,dashboardTabKey:$({type:"details",key:"recurringPaymentType"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("recurringPaymentType")}`},children:t.jsxs(t.Fragment,{children:[t.jsx(A,{label:{label:n.paymentType,width:D},labelStyles:{marginRight:m.labelMarginRight.valuePx(l)},style:{width:"auto"},text:ia(e.isRecurring,E,e.transactionDetails?.recurringBillInstance??1,e.recurringBillConfigDetail?.totalPaymentCycles??0),textStyles:{paddingLeft:m.textPadding.valuePx(l),paddingRight:m.textPadding.valuePx(l)},additionalInfoLabel:aa(l,e.isRecurring,E,e.recurringBillConfigDetail),additionalInfoLabelStyles:{paddingRight:m.paddingRight.valuePx(l),marginTop:m.additionalTextMarginTop.valuePx(l)}}),e.recurringBillInstances!=null&&e.recurringBillInstances.length>0?t.jsx(pi,{style:{paddingLeft:m.recurringSchedulePaddingLeft.valuePx(l)},children:t.jsx(la,{onAttachmentClick:ze,currencySymbol:e.transactionDetails?.recipientTotalAmount.currencySymbol??ht.currencySymbol,recurringBillInstances:e.recurringBillInstances})}):null]})})]}):null]})]}),e.transactionDetails&&e.transactionDetails.id&&t.jsx(oa,{amount:bn,activities:e.billActivities,stage:k?.code??"draft",onAddNewRule:Ut,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:Ot,signedInUserId:le?.userId,showRealTimeApproval:Ft,entityApprovalId:e.billActivities[0]?.entityApprovalId??e.transactionDetails.entityApprovalId,updateEditMode:Ht,onSaveRealTimeApprovals:qt},historicActivities:e.billHistory.activities}),t.jsx(si,{})]}),e.transactionDetails?.vendor!=null&&!me&&!e.transactionDetails.isDeleted?t.jsx(ra,{separatorStyle:{marginRight:a.sp4},showPrimaryButton:K||x,showCancel:!K&&x,cancelBtn:{label:et?n.buttons.reject:n.buttons.rejectBill,isLoading:_e==="rejected"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:zn,style:{width:m.footerButtonWidth.value(l)},reverseSpinnerColor:!1},primaryBtn:{label:Fa(K,et),isLoading:_e==="approved"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:K?tt:()=>{W!=null?q(!0):nt()},isDisabled:e.billSaveStatus==="In-Progress"||e.approvalUpdateStatus.fetchState==="In-Progress"||e.realTimeApproval.isEditMode===!0,style:{width:K?"auto":m.footerButtonWidth.value(l)}},rightSideComponent:t.jsx(Za,{children:t.jsxs(Ha,{windowSize:l,children:[!ae&&Oe?t.jsx(mt,{onClickAway:()=>{oe(!1),de(!1)},children:t.jsxs(Tt,{windowSize:l,"data-testid":b("bill-actions-container"),children:[we!=="processing"?t.jsx(_,{onClick:dn,"data-testid":b("delete-bill-action-item"),children:n.buttons.deleteBill}):null,we==="processing"&&!M?t.jsx(_,{onClick:cn,"data-testid":b("cancel-bill-action-item"),children:n.buttons.cancel}):null,we==="processing"&&Sn?t.jsx(_,{onClick:pn,"data-testid":b("cancel-and-delete-bill-action-item"),children:n.buttons.cancelAndDelete}):null,x&&E&&Wt?t.jsx(_,{onClick:Pn,"data-testid":b("mark-as-paid-action-item"),children:n.paymentOutsideZeni.markAsPaid}):null]})}):null,Fe?t.jsx(mt,{onClickAway:()=>{oe(!1),de(!1)},children:t.jsxs(Tt,{windowSize:l,"data-testid":b("bill-actions-with-zeni-assist-container"),children:[xe?t.jsx(_,{onClick:()=>{z.trackRetryClick(v?.code??"",k?.code??"",F?.description??"",M?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),Jt()},"data-testid":b("retry-bill-action-item"),children:n.buttons.retry}):null,ge?t.jsx(_,{onClick:mn,"data-testid":b("refund-bill-action-item"),children:n.buttons.refund}):null]})}):null,t.jsxs(Ga,{windowSize:l,children:[$n===!0?t.jsx(Te,{enterDelay:600,style:{color:ie.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:fe?n.zeniAssist.tooltip:n.zeniAssist.connectToTeamTooltip,placement:"top",maxWidth:"267px",children:t.jsx(wt,{windowSize:l,showEditIcon:be,isIconClickable:fe,"data-testid":b("other-actions-icon-container"),children:fe?t.jsx(hn,{}):t.jsx(Va,{})})}):null,!ae&&be===!0?t.jsx(Te,{enterDelay:600,style:{color:ie.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:za,placement:"top",children:t.jsx(Ya,{onClick:qe,"data-testid":b("edit-bill-icon-container"),children:t.jsx(Ua,{})})}):null,!ae&&kn===!0?t.jsx(Te,{enterDelay:600,style:{color:ie.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:Ra,placement:"top",children:t.jsx(wt,{windowSize:l,showEditIcon:be,isIconClickable:!0,"data-testid":b("more-details-icon-container"),children:t.jsx(Ka,{onClick:()=>oe(!Oe)})})}):null]})]})}),style:{minHeight:62}}):null]}),f?t.jsx($a,{id:T,children:t.jsx(sa,{isDrawerOpen:nn,allowComposer:!0,drawerTitle:Ma,threads:Y,filter:w,autoExpand:!0,autoFocus:!1,isLoading:P,textOverrides:{composerPlaceholder:gt.addANewComment,replyComposerPlaceholder:gt.replyAComment,threadResolve:ft.resolveComment,threadUnResolve:ft.unResolveComment},threadMetadata:Rn,onThreadClick:an,onCloseAllThreadsDrawer:()=>U(!1),drawerSectionStyle:{width:l==="small"?"100%":"400px",boxSizing:l==="small"?"border-box":"content-box",padding:`${a.sp0} ${m.drawerSectionPaddingLeftRight.valuePx(l)}`,backgroundColor:Ne.colors.background},collapsibleThreadStyle:{width:l==="small"?"100%":"360px"}})}):null]})},Na=(e,g)=>{const x=e?.code;if(e!=null&&x!=null)return g?.isDeleted===!0?{value:ke.tabsById.deleted,color:O.deleted.color,bgColor:O.deleted.bgColor,borderColor:O.deleted.borderColor,code:"deleted"}:x==="pending_approval"&&g?.dueDate?.isBefore(L.dateNow(),"date")===!0?{value:ke.tabsById.overdue,color:O.overdue.color,bgColor:O.overdue.bgColor,borderColor:O.overdue.borderColor}:{value:e.name,color:O[x].color,bgColor:O[x].bgColor,borderColor:O[x].borderColor}},Oa=(e,g)=>{const x=g.transactionDetails?.recipientTotalAmount;return t.jsxs(mi,{windowSize:e,children:[t.jsxs(kt,{windowSize:e,children:[t.jsx(St,{children:n.zeniAssist.accountNumber}),t.jsx(Ct,{children:g.withdrawFrom!=null?Rt(g.withdrawFrom,e):d})]}),t.jsxs(kt,{windowSize:e,children:[t.jsx(St,{children:n.zeniAssist.amount}),t.jsx(Ct,{children:x!=null?Ae("0,0[.]00",x):C})]})]})},Fa=(e,g)=>e?n.paymentOutsideZeni.markAsPaid:g?n.buttons.approve:n.buttons.approveBill,Ea=e=>{const g=e.paymentMode,x=n.paymentOutsideZeni.offline;if(g==null||g==="other")return x;const Z=n.paymentOutsideZeni.paymentModeOptions.find(le=>le.value===g)?.label;return`${x} ${Ba} ${Z}`},La=(e,g,x)=>{if(e)return t.jsx(ut,{variant:"warning",style:{marginTop:a.sp5,marginBottom:a.sp3},title:bt.duplicateWarning.title,description:bt.duplicateWarning.description});if(x!=null){const Z=`${g.withdrawFrom?.label??""} ${g.withdrawFrom?.maskedAccountNumber??""}`;return t.jsx(ut,{variant:"low-balance",style:{marginTop:a.sp2,marginBottom:a.sp3},title:`${Nt.lowBalanceIn.replace("__account__",Z)}`,description:x.replace("Low balance! ","")})}else return null},Wa=i.div``,_a=i.div``,Za=i.div`
3
3
  display: flex;
4
4
  justify-content: flex-end;
5
5
  `,Ka=i(ja)`
@@ -34,7 +34,7 @@ import{X as Nn,w as On,u as Fn,fL as En,fM as Ln,fN as _n,fO as Wn,aV as Zn,a5 a
34
34
  &:hover {
35
35
  color: ${e=>e.theme.colors.primary};
36
36
  }
37
- `,qa=i.div`
37
+ `,Ya=i.div`
38
38
  display: flex;
39
39
  cursor: pointer;
40
40
  color: ${e=>e.theme.colors.grey1};
@@ -71,7 +71,7 @@ import{X as Nn,w as On,u as Fn,fL as En,fM as Ln,fN as _n,fO as Wn,aV as Zn,a5 a
71
71
  right: ${e=>m.actionsContainerRight.valuePx(e.windowSize)};
72
72
  height: 100%;
73
73
  display: flex;
74
- `,W=i(Mt)`
74
+ `,_=i(Mt)`
75
75
  display: flex;
76
76
  align-items: center;
77
77
  width: 100%;
@@ -113,7 +113,7 @@ import{X as Nn,w as On,u as Fn,fL as En,fM as Ln,fN as _n,fO as Wn,aV as Zn,a5 a
113
113
  width: ${a.sp4};
114
114
  height: ${a.sp4};
115
115
  display: flex;
116
- `,Ya=i.div`
116
+ `,qa=i.div`
117
117
  height: 100%;
118
118
  overflow: scroll;
119
119
  `,De=i.div`
@@ -1,4 +1,4 @@
1
- import{C as z,p as $,X as q,M as D,a as M,a5 as W,j as o,U as G,c3 as X,aW as Z,F as H,a7 as J,o as c}from"./index-BU_OFOHO.js";import{b as L,n as h}from"./vendor-CnQcJ2Lu.js";import{b as K,f as Q,l as R,o as j}from"./FollowStepsSection-DuElPK3y-dhjgL0Nu.js";import"./mui-BgvZYSo0.js";import"./analytics-BSSiLa6f.js";import"./routing-BNz5gZgX.js";import"./sentry-HDxG13yk.js";import"./redux-DmDqXYej.js";import"./liveblocks-BUGn2yQ6.js";import"./crypto-BURQLTgV.js";const C="billPayApprovalRuleDetailPage",T="lowerBound",E="upperBound",y="steps",Y={footerPadding:new z($[2],$[3])};function ve({localData:e,approvalUpdateActionType:t,onBackClick:l,onApprovalRuleDataUpdated:r,onResetClick:s,isLowerBoundDisabled:n=!1,isUpperBoundDisabled:b=!0,hideUpperBoundField:A=!1,onSaveRuleClick:_,onSaveRuleSuccess:S}){const I=q(),a=D.getLocalizedStrings().commonSetUp.approval,P=D.getLocalizedStrings().spendManagement.billPay.billPayApproval,x=ee(e,t==="approval_create"&&!n),v=M({mode:"all",reValidateMode:"onChange",defaultValues:x}),u=e.billPaySetupApproverViewUpdateData?.updateStatus,w=W(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(()=>{_()}),O=async(i,d)=>{r(d)};return L.useEffect(()=>{const i=v.watch((d,{name:U})=>{if(U!=null&&d!=null){const V=G(d);X(()=>O(U,V))}});return()=>{i.unsubscribe()}}),L.useEffect(()=>{w==="In-Progress"&&u?.fetchState==="Completed"&&S()},[w,u?.fetchState,S]),o.jsxs(re,{children:[o.jsx(Z,{title:t==="approval_create"?a.newApproval:a.editApproval,style:{zIndex:4},onBackClick:()=>{l()},source:"BillPayApprovalRuleDetailPage"}),o.jsx(se,{children:o.jsx(H,{...v,children:o.jsx("form",{id:N(C),onSubmit:F,children:o.jsxs(oe,{children:[o.jsx(K,{label:{label:A?P.amountPerBillGreaterLabel:P.amountPerBillLabel},firstText:{type:"number",name:T,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:a.firstRuleLowerBoundInfoLabel,additionalErrorLabel:a.firstRuleErrorInfoLabel},secondText:{type:"number",name:E,placeholder:"Infinity",isDisabled:b,hideField:A,additionalInfoLabel:a.upperBoundInfoLabel}}),o.jsx(ie,{}),o.jsx(Q,{sectionId:y,label:{label:a.followStepsLabel},approversPlaceholder:a.approversPlaceholder,notifiersPlaceholder:a.notifiersPlaceholder,allUserWithRoles:e.allApprovers,filteredApprovers:e.filteredApprovers.map(i=>i.user),allAttributes:e.allAttributes,filteredAttributes:e.filteredAttributes,allAccountingClasses:k,stepsInfo:x[y],userSelectPlaceholder:a.userSelectPlaceholder,approveNotifyPlaceholder:a.approveNotifyPlaceholder,productType:"zeni_bill_pay"})]})})})}),o.jsx(J,{formId:N(C),primaryBtn:{label:a.saveBtnText,isLoading:u?.fetchState==="In-Progress",isDisabled:u?.fetchState==="In-Progress",style:{width:"85px",minWidth:"auto"}},showCancel:!0,cancelBtn:{label:a.cancelBtnText,isLoading:!1,style:{width:"85px",minWidth:"auto"},onClick:s},containerStyle:{justifyContent:I==="small"?"space-between":"center"},style:{padding:Y.footerPadding.valuePx(I)},separatorStyle:{marginRight:c.sp4}})]})}const ee=(e,t)=>{const{criteria:l,steps:r}=e.billPaySetupApproverViewUpdateData?.data??{};return{[y]:le(e.allApprovers.map(s=>s.user),e.filteredApprovers.map(s=>s.user),j(e.allAttributes),j(e.filteredAttributes),r??[])??[],[T]:t?void 0:l!=null?l.range.min.amount??0:0,[E]:l!=null?l.range.max==null?1/0:l.range.max.amount:1/0}},le=(e,t,l,r,s)=>s&&s.length>0?s.map((n,b)=>({stepIndex:b,stepType:{selectedOption:n.action,allOptions:R},actors:{allUsers:t,selectedUsers:ae(e,n.actors),allNonUsers:r,selectedNonUsers:te(l,n.actors)}})):[{stepIndex:0,stepType:{selectedOption:"require_approval",allOptions:R},actors:{allUsers:t,selectedUsers:[],allNonUsers:r,selectedNonUsers:[]}}],ae=(e,t)=>e.filter(l=>l.userId!=null&&t.findIndex(r=>r.userId===l.userId)>-1),te=(e,t)=>e.filter(l=>t.findIndex(r=>r.subType===l.value)>-1),N=e=>`${e}_form`,ge=e=>`${e}`,re=h.div`
1
+ import{C as z,p as B,X as q,M as R,a as M,a1 as W,j as o,R as G,c2 as X,aW as Y,F as H,a3 as J,o as c}from"./index-nrhSmhQT.js";import{b as D,n as h}from"./vendor-CnQcJ2Lu.js";import{b as K,f as Q,l as L,o as j}from"./FollowStepsSection-laCvnETV-BKhPlVRt.js";import"./mui-C5LQ0bMa.js";import"./analytics-DThoELaW.js";import"./routing-Cpaypegg.js";import"./sentry-HDxG13yk.js";import"./redux-ByjIRbhZ.js";import"./liveblocks-sSQ9JElv.js";import"./crypto-BURQLTgV.js";const C="billPayApprovalRuleDetailPage",E="lowerBound",T="upperBound",y="steps",Z={footerPadding:new z(B[2],B[3])};function ve({localData:e,approvalUpdateActionType:t,onBackClick:l,onApprovalRuleDataUpdated:r,onResetClick:s,isLowerBoundDisabled:n=!1,isUpperBoundDisabled:b=!0,hideUpperBoundField:A=!1,onSaveRuleClick:_,onSaveRuleSuccess:S}){const I=q(),a=R.getLocalizedStrings().commonSetUp.approval,P=R.getLocalizedStrings().spendManagement.billPay.billPayApproval,x=ee(e,t==="approval_create"&&!n),v=M({mode:"all",reValidateMode:"onChange",defaultValues:x}),u=e.billPaySetupApproverViewUpdateData?.updateStatus,w=W(u?.fetchState),{upperBound:$}=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(()=>{_()}),O=async(i,d)=>{r(d)};return D.useEffect(()=>{const i=v.watch((d,{name:U})=>{if(U!=null&&d!=null){const V=G(d);X(()=>O(U,V))}});return()=>{i.unsubscribe()}}),D.useEffect(()=>{w==="In-Progress"&&u?.fetchState==="Completed"&&S()},[w,u?.fetchState,S]),o.jsxs(re,{children:[o.jsx(Y,{title:t==="approval_create"?a.newApproval:a.editApproval,style:{zIndex:4},onBackClick:()=>{l()},source:"BillPayApprovalRuleDetailPage"}),o.jsx(se,{children:o.jsx(H,{...v,children:o.jsx("form",{id:N(C),onSubmit:F,children:o.jsxs(oe,{children:[o.jsx(K,{label:{label:A?P.amountPerBillGreaterLabel:P.amountPerBillLabel},firstText:{type:"number",name:E,placeholder:"$0",options:{required:!0,max:$===1/0?Number.MAX_SAFE_INTEGER-1:$-1,min:g,validate:i=>n?!0:i!=null&&i>g},isDisabled:n,additionalInfoLabel:a.firstRuleLowerBoundInfoLabel,additionalErrorLabel:a.firstRuleErrorInfoLabel},secondText:{type:"number",name:T,placeholder:"Infinity",isDisabled:b,hideField:A,additionalInfoLabel:a.upperBoundInfoLabel}}),o.jsx(ie,{}),o.jsx(Q,{sectionId:y,label:{label:a.followStepsLabel},approversPlaceholder:a.approversPlaceholder,notifiersPlaceholder:a.notifiersPlaceholder,allUserWithRoles:e.allApprovers,filteredApprovers:e.filteredApprovers.map(i=>i.user),allAttributes:e.allAttributes,filteredAttributes:e.filteredAttributes,allAccountingClasses:k,stepsInfo:x[y],userSelectPlaceholder:a.userSelectPlaceholder,approveNotifyPlaceholder:a.approveNotifyPlaceholder,productType:"zeni_bill_pay"})]})})})}),o.jsx(J,{formId:N(C),primaryBtn:{label:a.saveBtnText,isLoading:u?.fetchState==="In-Progress",isDisabled:u?.fetchState==="In-Progress",style:{width:"85px",minWidth:"auto"}},showCancel:!0,cancelBtn:{label:a.cancelBtnText,isLoading:!1,style:{width:"85px",minWidth:"auto"},onClick:s},containerStyle:{justifyContent:I==="small"?"space-between":"center"},style:{padding:Z.footerPadding.valuePx(I)},separatorStyle:{marginRight:c.sp4}})]})}const ee=(e,t)=>{const{criteria:l,steps:r}=e.billPaySetupApproverViewUpdateData?.data??{};return{[y]:le(e.allApprovers.map(s=>s.user),e.filteredApprovers.map(s=>s.user),j(e.allAttributes),j(e.filteredAttributes),r??[])??[],[E]:t?void 0:l!=null?l.range.min.amount??0:0,[T]:l!=null?l.range.max==null?1/0:l.range.max.amount:1/0}},le=(e,t,l,r,s)=>s&&s.length>0?s.map((n,b)=>({stepIndex:b,stepType:{selectedOption:n.action,allOptions:L},actors:{allUsers:t,selectedUsers:ae(e,n.actors),allNonUsers:r,selectedNonUsers:te(l,n.actors)}})):[{stepIndex:0,stepType:{selectedOption:"require_approval",allOptions:L},actors:{allUsers:t,selectedUsers:[],allNonUsers:r,selectedNonUsers:[]}}],ae=(e,t)=>e.filter(l=>l.userId!=null&&t.findIndex(r=>r.userId===l.userId)>-1),te=(e,t)=>e.filter(l=>t.findIndex(r=>r.subType===l.value)>-1),N=e=>`${e}_form`,ge=e=>`${e}`,re=h.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  flex-direction: column;
@@ -24,4 +24,4 @@ import{C as z,p as $,X as q,M as D,a as M,a5 as W,j as o,U as G,c3 as X,aW as Z,
24
24
  background-color: ${e=>e.theme.colors.grey3};
25
25
  min-height: 1px;
26
26
  max-height: 1px;
27
- `;export{Y as D,ve as default,N as uniqueFormName,ge as uniqueName};
27
+ `;export{Z as D,ve as default,N as uniqueFormName,ge as uniqueName};
@@ -1,4 +1,4 @@
1
- import{X as I,M as y,j as t,aW as D,d as H,Y as b,C as r,s as B,_ as j,bN as E,bP as q,bQ as U,o as i,cq as G,p as l,as as Q,Q as z,ar as V,g as S,cn as X,aN as Y,q as _}from"./index-BU_OFOHO.js";import{n as o,b as F}from"./vendor-CnQcJ2Lu.js";import"./mui-BgvZYSo0.js";import"./analytics-BSSiLa6f.js";import"./routing-BNz5gZgX.js";import"./sentry-HDxG13yk.js";import"./redux-DmDqXYej.js";import"./liveblocks-BUGn2yQ6.js";import"./crypto-BURQLTgV.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")},O=({showDeleteBtn:e=!1,isLastSection:f=!1,approvalRule:c,onEditRuleClick:v,onDeleteRuleClick:$})=>{const[m,x]=F.useState(!1),n=I(),{range:h}=c.criteria[0],{steps:u,approvalRuleId:w}=c,a=y.getLocalizedStrings().commonSetUp.approval,W=()=>{x(!0)},A={onOkClick:()=>{x(!1),$?.(w)},onCancelClick:()=>{x(!1)}};return t.jsxs(J,{windowSize:n,isLastSection:f,children:[t.jsxs(K,{windowSize:n,children:[t.jsxs(se,{children:[t.jsxs(R,{windowSize:n,children:[a.from," ",j("0,0",h.min)]}),t.jsxs(Z,{children:[t.jsx(P,{}),t.jsx(ee,{}),t.jsx(P,{})]}),h.max==null?t.jsx(de,{}):t.jsx(R,{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:()=>{v(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,N)=>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,M)=>t.jsxs(C,{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}_${M}`)),d.actors.map(p=>t.jsxs(C,{children:[t.jsxs(k,{children:[p.firstName," ",p.lastName]}),d.operator!="is"?t.jsx(T,{className:"operator",children:d.operator}):null]},p.userId))]},N))})}),m?t.jsx(E,{titleComponent:t.jsx(U,{children:a.deleteApprovalRuleTitle}),descriptionComponent:t.jsx(q,{children:a.deleteApprovalRuleDesc}),primaryButtonText:a.deleteTxt,proceedButtonVariant:"danger",secondaryButtonText:a.cancelBtnText,action:A}):null]})},J=o.div`
1
+ import{X as I,M as y,j as t,aW as D,d as H,Y as b,C as r,q as B,_ as j,bM as E,bO as U,bP as q,o as i,cp as G,p as l,an as O,Q as z,am as V,g as S,cm as X,aN as Y,v as _}from"./index-nrhSmhQT.js";import{n as o,b as F}from"./vendor-CnQcJ2Lu.js";import"./mui-C5LQ0bMa.js";import"./analytics-DThoELaW.js";import"./routing-Cpaypegg.js";import"./sentry-HDxG13yk.js";import"./redux-ByjIRbhZ.js";import"./liveblocks-sSQ9JElv.js";import"./crypto-BURQLTgV.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")},Q=({showDeleteBtn:e=!1,isLastSection:f=!1,approvalRule:c,onEditRuleClick:v,onDeleteRuleClick:$})=>{const[m,x]=F.useState(!1),n=I(),{range:h}=c.criteria[0],{steps:u,approvalRuleId:w}=c,a=y.getLocalizedStrings().commonSetUp.approval,W=()=>{x(!0)},A={onOkClick:()=>{x(!1),$?.(w)},onCancelClick:()=>{x(!1)}};return t.jsxs(J,{windowSize:n,isLastSection:f,children:[t.jsxs(K,{windowSize:n,children:[t.jsxs(se,{children:[t.jsxs(R,{windowSize:n,children:[a.from," ",j("0,0",h.min)]}),t.jsxs(Z,{children:[t.jsx(P,{}),t.jsx(ee,{}),t.jsx(P,{})]}),h.max==null?t.jsx(de,{}):t.jsx(R,{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:()=>{v(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(C,{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(C,{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(E,{titleComponent:t.jsx(q,{children:a.deleteApprovalRuleTitle}),descriptionComponent:t.jsx(U,{children:a.deleteApprovalRuleDesc}),primaryButtonText:a.deleteTxt,proceedButtonVariant:"danger",secondaryButtonText:a.cancelBtnText,action:A}):null]})},J=o.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: ${e=>s.wrapperGap.valuePx(e.windowSize)};
@@ -14,7 +14,7 @@ import{X as I,M as y,j as t,aW as D,d as H,Y as b,C as r,s as B,_ as j,bN as E,b
14
14
  border-color: ${e=>e.theme.colors.primary};
15
15
  }
16
16
  }
17
- `,K=o(Q)`
17
+ `,K=o(O)`
18
18
  display: flex;
19
19
  position: relative;
20
20
  align-items: center;
@@ -170,7 +170,7 @@ import{X as I,M as y,j as t,aW as D,d as H,Y as b,C as r,s as B,_ as j,bN as E,b
170
170
  ${e=>`${L.amount.style(e.windowSize)}`};
171
171
  color: ${e=>e.theme.colors.primary};
172
172
  word-break: break-word;
173
- `,g={width:new r(343,580,726),titleWidth:new r(343,580,780),addApprovalGap:new r(6,l[2]),subTitlePaddingTop:new r(12,l[3]),subTitlePaddingBottom:new r(28,l[7])},ke=({approvalView:e,onBackClick:f,onEditRuleClick:c,onDeleteRuleClick:v})=>{const $=I(),{fetchState:m,deleteStatus:x}=e,n=y.getLocalizedStrings().commonSetUp.approval,h=y.getLocalizedStrings().spendManagement.billPay.billPayApproval,u=x.fetchState;return t.jsxs(ce,{children:[t.jsx(D,{title:n.approvalPageHeader,style:{zIndex:4},onBackClick:()=>{f()},source:"BillPayApprovalRulesPage"}),t.jsxs(he,{children:[t.jsx(xe,{windowSize:$,children:h.approvalPageSubTitle}),m==="In-Progress"||m==="Not-Started"||u==="In-Progress"?t.jsx(me,{children:t.jsx(H,{size:"ExtraLarge",start:!0})}):m==="Completed"?t.jsxs(t.Fragment,{children:[e.allApprovalRules.map((w,a)=>t.jsx(O,{showDeleteBtn:a!==0,approvalRule:w,isLastSection:a===e.allApprovalRules.length-1,onEditRuleClick:c,onDeleteRuleClick:v},w.approvalRuleId)),t.jsxs(ue,{windowSize:$,onClick:()=>{c()},"data-testid":b("add-approval-rule-bill-pay"),children:[t.jsx(we,{}),t.jsx(ge,{children:n.addApprovalText})]})]}):null]})]})},ce=o.div`
173
+ `,g={width:new r(343,580,726),titleWidth:new r(343,580,780),addApprovalGap:new r(6,l[2]),subTitlePaddingTop:new r(12,l[3]),subTitlePaddingBottom:new r(28,l[7])},ke=({approvalView:e,onBackClick:f,onEditRuleClick:c,onDeleteRuleClick:v})=>{const $=I(),{fetchState:m,deleteStatus:x}=e,n=y.getLocalizedStrings().commonSetUp.approval,h=y.getLocalizedStrings().spendManagement.billPay.billPayApproval,u=x.fetchState;return t.jsxs(ce,{children:[t.jsx(D,{title:n.approvalPageHeader,style:{zIndex:4},onBackClick:()=>{f()},source:"BillPayApprovalRulesPage"}),t.jsxs(he,{children:[t.jsx(xe,{windowSize:$,children:h.approvalPageSubTitle}),m==="In-Progress"||m==="Not-Started"||u==="In-Progress"?t.jsx(me,{children:t.jsx(H,{size:"ExtraLarge",start:!0})}):m==="Completed"?t.jsxs(t.Fragment,{children:[e.allApprovalRules.map((w,a)=>t.jsx(Q,{showDeleteBtn:a!==0,approvalRule:w,isLastSection:a===e.allApprovalRules.length-1,onEditRuleClick:c,onDeleteRuleClick:v},w.approvalRuleId)),t.jsxs(ue,{windowSize:$,onClick:()=>{c()},"data-testid":b("add-approval-rule-bill-pay"),children:[t.jsx(we,{}),t.jsx(ge,{children:n.addApprovalText})]})]}):null]})]})},ce=o.div`
174
174
  display: flex;
175
175
  min-height: 100%;
176
176
  flex-direction: column;