@zeniai/web-cockpit-ui 1.14.21-qa → 1.14.22-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 (267) hide show
  1. package/dist/assets/ACHDetailsPage-Csc8UPGK-C5DTl14D.js +21 -0
  2. package/dist/assets/{AIPerformancePage-DKwSS0Zl-_uRJy90x.js → AIPerformancePage-BNK1zghX-CXpkKBhu.js} +40 -40
  3. package/dist/assets/{AccountInfoPage-CSIM7DNw-t91eZQ9I.js → AccountInfoPage-WoQj1Knu-Cxdf_g3B.js} +5 -5
  4. package/dist/assets/{AccountInfoPageContent-CwbmE2Bb-T-BFbt0o.js → AccountInfoPageContent-BsiMZrTm-DfeZwew1.js} +17 -17
  5. package/dist/assets/{AccountLockedInfoModal-SFgC439X-CMjAhOqH.js → AccountLockedInfoModal-CaIpZQOZ-DUBexURk.js} +7 -7
  6. package/dist/assets/{AccountReconDetailsDrawerPage-DhlVNNlq-D2_UrFsx.js → AccountReconDetailsDrawerPage-BQTm9Igh-bRUuCvDt.js} +12 -12
  7. package/dist/assets/{AccountRow-Bhq6cvtX-YU5AexfS.js → AccountRow-mHhwnvVT-61DHuT3I.js} +16 -16
  8. package/dist/assets/{AccountsPromoCardStack-Cx60IXNK-DbnDsykr.js → AccountsPromoCardStack-jk87J-uY-CYM3oaB-.js} +27 -27
  9. package/dist/assets/{AddAddressForCardDrawer-D1cDpMRq-W5tXjh3z.js → AddAddressForCardDrawer-BY-ABNiB-C1fgvotd.js} +2 -2
  10. package/dist/assets/{AddToWalletPage-DjD9kDfD-BVOukNrG.js → AddToWalletPage-BmaqhQ_z-fr9KNRwo.js} +29 -29
  11. package/dist/assets/{AgingReportsPage-C68tZbMZ-ltB8OanA.js → AgingReportsPage-B2tfefId-BY1ufaPI.js} +14 -14
  12. package/dist/assets/{AllUserItems-D4ZWfS3r-BIKyz3xK.js → AllUserItems-C5jB4yc_-bcEnXv8A.js} +8 -8
  13. package/dist/assets/{ApAgingDetailPage-C9xdKi6n-DQvox-Mj.js → ApAgingDetailPage-B-ZHX3JJ-Dm0NOaoH.js} +3 -3
  14. package/dist/assets/{AppBasePage-C77LebWx-DD6i2F9A.js → AppBasePage-DOXcrTCE-BU2ssx1Y.js} +11 -11
  15. package/dist/assets/{AppDrawerContent-rleLuP6d-N207k0Kf.js → AppDrawerContent-Cav4Sy09-XmmoSBRe.js} +17 -17
  16. package/dist/assets/ApprovalRulesSettingsPage-rzr9k2jA-BhZWVqKA.js +47 -0
  17. package/dist/assets/{ArAgingChart-BzPI5KpZ-Dwcwv8mU.js → ArAgingChart-B3NtEWh--G5H5BTO1.js} +10 -10
  18. package/dist/assets/{ArAgingDetailPage-QPScba6I-_mrA9Dmx.js → ArAgingDetailPage-uX2oVxj4-B2CH08AV.js} +1 -1
  19. package/dist/assets/{AttachmentView-BWRZe11t-geAB7dwF.js → AttachmentView-BQMzs_UT-DjbZBXs7.js} +8 -8
  20. package/dist/assets/{BankAccountSection-D4xFLS8Y-K9xaG_eB.js → BankAccountSection-MWGcLsKa-DYMEitGJ.js} +4 -4
  21. package/dist/assets/{BankAccountWarningSection-xch7b7oM-ChEsNIJ1.js → BankAccountWarningSection-CBlOG9xN-KyoF0Xjl.js} +6 -6
  22. package/dist/assets/{BankConnectionsSettingsPage-BAf6txkS-vMvoxtKR.js → BankConnectionsSettingsPage-PagAlxUn-CnNwI2lQ.js} +33 -33
  23. package/dist/assets/{BillDetailPage-DNjo2hSl-BIFlrRZ4.js → BillDetailPage-DU3KKWCI-Dgx7cNS3.js} +12 -12
  24. package/dist/assets/BillPayApprovalRuleDetailPage-DzfhQmLn-0k3Mkm1z.js +27 -0
  25. package/dist/assets/{BillPayApprovalRulesPage-XcSe-JLu-CEbOBf4P.js → BillPayApprovalRulesPage-B051t9Mv-Bz466D-_.js} +10 -10
  26. package/dist/assets/BillPayPromoPage-DvBp9dFZ-DT65a4C3.js +84 -0
  27. package/dist/assets/BillPaySetUpPage-D7335PCo-lcC21Rm6.js +42 -0
  28. package/dist/assets/BillingSettingsPage-PsWVXatK-Df6MXAqh.js +44 -0
  29. package/dist/assets/{BillsBulkReviewDrawerPage-C0-0H-LH-C4Ch0eQg.js → BillsBulkReviewDrawerPage-Dkq-bCpf-QfTbq_6Y.js} +1 -1
  30. package/dist/assets/{BoxItem-DfMMtLK3-DwhF3MEP.js → BoxItem-Bf9DDBGl-B4tzyane.js} +1 -1
  31. package/dist/assets/{BusinessVerificationPage-Bdf48vIt-CsMA_z06.js → BusinessVerificationPage-DZpS0b_1-DhH_xv3P.js} +14 -14
  32. package/dist/assets/{CardNumberSubText-DgQelYSF-EYjrhelR.js → CardNumberSubText-8FNDlBHV-xefYK_FQ.js} +2 -2
  33. package/dist/assets/{CashbackDetailPage-pDpjBsfK-B3tdD-nA.js → CashbackDetailPage-CUc07auE-CayGCDQt.js} +23 -23
  34. package/dist/assets/{ChargeCardDetailPage-DU9RMQc6-CYAFKGtS.js → ChargeCardDetailPage-D84v0WwQ-Drf4gFgi.js} +64 -64
  35. package/dist/assets/{ChargeCardListPage-DMYZIi2J-YzgnTjNz.js → ChargeCardListPage-BFssQAQg-Dr6YIgl1.js} +30 -30
  36. package/dist/assets/{ChargeCardListTable-BGhtEqlM-B7Fdytg0.js → ChargeCardListTable-BuI0T0Bn-DXKO7Y7U.js} +193 -193
  37. package/dist/assets/ChargeCardPromoPage-CRqyciNL-FrtjBhKN.js +222 -0
  38. package/dist/assets/ChargeCardSetupPage-BzqdaEET-j6EBeAK_.js +36 -0
  39. package/dist/assets/ChargeCardStatementsPage-BtImi0Pc-D6s-jUZ3.js +60 -0
  40. package/dist/assets/ChargeCardUtils-DQztOSYJ-DZxY6wV1.js +1 -0
  41. package/dist/assets/ChaseOverlay-BaGgoJZk-L4zZNkyz.js +170 -0
  42. package/dist/assets/CheckDepositDrawerPage-90KwCes_-BFVP9Xnd.js +206 -0
  43. package/dist/assets/{CollapsableReportTable-CuZSfiJ--BV5LvjsE.js → CollapsableReportTable-dCUjgg1X-DLs7OVqc.js} +51 -51
  44. package/dist/assets/{CompanyOfficerDetailsSection-B8_6LaaT-CKJVK2pK.js → CompanyOfficerDetailsSection-B5d06n1B-shOCzvZi.js} +19 -19
  45. package/dist/assets/{CompanyPassportCard-Dnoe52f1-BZsqn6WU.js → CompanyPassportCard-BOuhptIV-CVEQtf9Q.js} +6 -6
  46. package/dist/assets/{CompanyPassportPage-ChrMM5cG-DMFx8-D2.js → CompanyPassportPage-CPxR1IKu-B6sc0yZA.js} +12 -12
  47. package/dist/assets/CompleteProfile-BIN-sI3M-1L7bxHe9.js +52 -0
  48. package/dist/assets/{ConfettiBurst-CLXTwsEc-Baoit-xY.js → ConfettiBurst-nTrV9Xfw-D3DkhcOF.js} +1 -1
  49. package/dist/assets/{CreateOrEditVendorPage-BQT9jEKf-BQUueMhM.js → CreateOrEditVendorPage-CQH4Gfy0-DBGaDkEf.js} +10 -10
  50. package/dist/assets/{CreditCardPaymentDrawerPage-CqjXmiuE-BYGCpyAz.js → CreditCardPaymentDrawerPage-C3PvfNmm-amz8Ne7l.js} +23 -23
  51. package/dist/assets/CreditCardPaymentPlgSection-Cz-CSdKg-DO4yi827.js +78 -0
  52. package/dist/assets/CurrencySelectField-ltt1zExP-D2omcj4n.js +139 -0
  53. package/dist/assets/{CustomerOnboardingActivationPage-CwOkKzOg-B9TqM2NT.js → CustomerOnboardingActivationPage-Cst56yLP-ejyq0w3C.js} +7 -7
  54. package/dist/assets/CustomerOnboardingContainerPage-B9rA9JXM-C9nb1PSk.js +1 -0
  55. package/dist/assets/{CustomerOnboardingDetailPageSkeleton-czdG16p5-DG6Ivo4n.js → CustomerOnboardingDetailPageSkeleton-H59MLCwU-KBQed5cV.js} +11 -11
  56. package/dist/assets/CustomerOnboardingNoStepsPage-B8cf9wWc-DoeA9g-j.js +66 -0
  57. package/dist/assets/{CustomerOnboardingPage-YXekfOBo-HDPrQ7VL.js → CustomerOnboardingPage-1o2R-ghV-DIOBtRSu.js} +12 -12
  58. package/dist/assets/CustomerOnboardingProductSuitePage-Dfv86gVc-xcmudBbw.js +202 -0
  59. package/dist/assets/{Dashboard-DSgwFRPe-BqbfAhX1.js → Dashboard-CptSiho6-CYuyH4KA.js} +25 -25
  60. package/dist/assets/{DashboardReportPage-BJvP8_MA-BBXCjxlc.js → DashboardReportPage-G32NOQFe-BOVMH67u.js} +19 -19
  61. package/dist/assets/{DashboardSidebarBackgroundAnimation-BzB16gcw-DuZKIfdP.js → DashboardSidebarBackgroundAnimation-DTkdczBR-Dm25xp1J.js} +2 -2
  62. package/dist/assets/{DepositAccTransactionItem-iLxnaDON-Cu2Jt3BR.js → DepositAccTransactionItem-CQX9MBK--x7S3np6v.js} +4 -4
  63. package/dist/assets/DepositAccTransactionListPage-C6lB4Qyv-67Okcjlq.js +66 -0
  64. package/dist/assets/{DomesticWireDetailsPage-D7ID3OCC-BWg_cPdV.js → DomesticWireDetailsPage-Bgm_YYHM-C2zlQj9Q.js} +1 -1
  65. package/dist/assets/{DownloadOverlay-DK3Nswwn-CvcpFx8P.js → DownloadOverlay-DN4zwFl5-BWBizCPI.js} +27 -27
  66. package/dist/assets/{DrawerPage-qdVRf0zd-D3MHsEvl.js → DrawerPage-B-jrvyA1-D5alUPyS.js} +12 -12
  67. package/dist/assets/{EditPeoplePage-BQlHto3J-Up6qoGIH.js → EditPeoplePage-BTXEd5bm-DPBckywd.js} +9 -9
  68. package/dist/assets/{EditReimbursementDetailPage-wJUr8jPN-CucwYAji.js → EditReimbursementDetailPage-5-BeM3DC-BRw6nxEw.js} +52 -52
  69. package/dist/assets/{EntityDetailPage-BNbBdxQj-VYMr28kW.js → EntityDetailPage-CCTwe1iu-DAg47Prp.js} +1 -1
  70. package/dist/assets/{EntitySummarySection-BQXLwSRf-Dmz-K_CZ.js → EntitySummarySection-B7uoP2ou-DZ_drzmW.js} +9 -9
  71. package/dist/assets/ExpenseAutomationOverviewPage-Bz-2JPdW-DaIoHdOM.js +222 -0
  72. package/dist/assets/{ExpenseAutomationPage-Cn4VyB6M-BhL8s7ps.js → ExpenseAutomationPage-o8ox1q0R-W0eDJCTN.js} +76 -76
  73. package/dist/assets/{ExpressPayPage-DjV_dQoe-TjH6IBGq.js → ExpressPayPage-BdUERste-C5P04O3w.js} +13 -13
  74. package/dist/assets/{FeaturePreviewPage-CPu1OiVj-DYKr-SZH.js → FeaturePreviewPage-B6_exSoS-Do4_f9l1.js} +2 -2
  75. package/dist/assets/{FollowStepsSection-6KGTmbym-BPFH0rIs.js → FollowStepsSection-BoA-EzkO-CtKbn8f6.js} +25 -25
  76. package/dist/assets/{GlobalReviewListPage-BpuYWhKy-ojejaE0U.js → GlobalReviewListPage-CYjobk5Y-BRiHcGuf.js} +15 -15
  77. package/dist/assets/HelpButton-DEwtg0Ez-BLNCXJFp.js +28 -0
  78. package/dist/assets/{InformationCardStack--_YYIZmU-DyhXfEfc.js → InformationCardStack-Dvu4sQsc-BlKJwxKC.js} +5 -5
  79. package/dist/assets/{InsightsCardStack-BAqsxgx_-DdyBnb2f.js → InsightsCardStack-DffcRWuM-BTqxOdqS.js} +12 -12
  80. package/dist/assets/{InsightsSection-R-m-A1rt-DREvFYeH.js → InsightsSection-C8Oi6wcZ-D3wuyBHx.js} +4 -4
  81. package/dist/assets/{IntegrationsSettingsPage-BP0P9-PB-DgpQQrpK.js → IntegrationsSettingsPage-C0VZQfG_-ks1Gh_uy.js} +15 -15
  82. package/dist/assets/{InternationalWireSwiftDetailsPage-Bl40XkdZ-DcZdsGXF.js → InternationalWireSwiftDetailsPage-SAcvo9BB-BCh0Bmwt.js} +10 -10
  83. package/dist/assets/{InternationalWireVerificationPage-BxIz3xUq-2c84qgGL.js → InternationalWireVerificationPage-8Ff3v4gu-BQsNCeNp.js} +15 -15
  84. package/dist/assets/InviteFormPage-CRRvruND-BlSp_6On.js +312 -0
  85. package/dist/assets/{InvitePageListView-CWpmFhZH-mgWVAkee.js → InvitePageListView-DG91-L1w-HUdilJLK.js} +44 -44
  86. package/dist/assets/InvitePeoplePage-6ANmf4z2-D3l-3sjy.js +12 -0
  87. package/dist/assets/{InvoiceUploadSection-BWCF-vNf-BfXQEC3w.js → InvoiceUploadSection-C4O7GGrv-DEO_7ppT.js} +9 -9
  88. package/dist/assets/{IssueChargeCardPage-DrHldS8--A_AXmB6w.js → IssueChargeCardPage-gohjPIRu-KdDkWZ0o.js} +33 -33
  89. package/dist/assets/{LabeledAddressValue-WlsZ5Ghz-BRS36g9Q.js → LabeledAddressValue-C6EUPzNB-f8CKs718.js} +1 -1
  90. package/dist/assets/{LabeledAddressValueField-B-6CWCep-D3jCl4nb.js → LabeledAddressValueField-CC4nYBb8-CmuRvhjZ.js} +3 -3
  91. package/dist/assets/{LabeledControlledCheckBoxField-DLlz4JyR-CMz1DNyM.js → LabeledControlledCheckBoxField-TB_2rc3R-DL54XhuW.js} +1 -1
  92. package/dist/assets/{LabeledCreatableSingleSelectField-rYzQ2Ot2-CDpWJTGr.js → LabeledCreatableSingleSelectField-CdgNcgTu-CwOMlXoT.js} +2 -2
  93. package/dist/assets/{LabeledDocumentField-CD2nmWBu-Cuw8I-AI.js → LabeledDocumentField-CzTqgS97-CVWMa21M.js} +5 -5
  94. package/dist/assets/{LabeledDropDownFormattedTextField-DpVX6osq-DUYnn-i2.js → LabeledDropDownFormattedTextField-CVzL0J5a-D5_Y7iWl.js} +6 -6
  95. package/dist/assets/{LabeledText-QTidAWAx-fh93_-mv.js → LabeledText-BICN3vpf-Lk4PuYrJ.js} +2 -2
  96. package/dist/assets/{LabeledUserSingleSelectWithSubtitlesField-BlTOGYfX-BQucWzXB.js → LabeledUserSingleSelectWithSubtitlesField-VeWNep8c-tP0CG0Iv.js} +20 -20
  97. package/dist/assets/{LabeledZeniRolesDropDownField-BVYRgzSM-Cv81CAeG.js → LabeledZeniRolesDropDownField--Jr1KizL-SyZHoQyC.js} +14 -14
  98. package/dist/assets/{LinkJETransactionPage-CKTmE3J5-BL2a536w.js → LinkJETransactionPage-BNWOmBHj-C6dNtx3m.js} +13 -13
  99. package/dist/assets/{LowBalancePopup-3lHeOacz-Cg-6ggSe.js → LowBalancePopup-Dhrtsv_E-B0rnJzet.js} +6 -6
  100. package/dist/assets/{MagicLinkACHDetailsPage-CJwMNdWw-BbWz_BUe.js → MagicLinkACHDetailsPage-Brt9q6YZ-ByLyPANb.js} +1 -1
  101. package/dist/assets/{MagicLinkDomesticWireDetailsPage-7fXlIwuo-GAs9HQCc.js → MagicLinkDomesticWireDetailsPage-CkSEgmKP-DxqY0_R2.js} +1 -1
  102. package/dist/assets/{MagicLinkInternationalWireDetailsPage-D7oeyaXU-Bzhpe6Vc.js → MagicLinkInternationalWireDetailsPage-CqYC7uu7-CV88Q6h1.js} +1 -1
  103. package/dist/assets/{MagicLinkSuccessPage-D8iyZlJy-j-oCJl1z.js → MagicLinkSuccessPage-VR-HSAYZ-DUCuiXm5.js} +4 -4
  104. package/dist/assets/{MagicLinkTitleSection-DUrwrEj2-BnMJM36s.js → MagicLinkTitleSection-T6m2zH4A-C4uTRZc1.js} +3 -3
  105. package/dist/assets/MailingDetailsSection-B6ZCAac5-CjQ8hXZb.js +21 -0
  106. package/dist/assets/{MeetingCalenderPopup-SnrmOSBf-CNpJ4esn.js → MeetingCalenderPopup-CgzTeE14-BMiIqHVm.js} +1 -1
  107. package/dist/assets/{Menu-C7N3gHcb-6AxGYl0u.js → Menu-DOJJ_REW-BwD6B3Nk.js} +1 -1
  108. package/dist/assets/{MyBankConnectionsSettingsPage-B4Pjmw7q-BoyImx6j.js → MyBankConnectionsSettingsPage-C_NrRV7T-BjsWlM7P.js} +18 -18
  109. package/dist/assets/MyPendingActivationChargeCardListPage-CNHCZPs--fg7FpZSk.js +6 -0
  110. package/dist/assets/{MyProfileSettingsPage-Dv0V1Z6z-DjnAaOLQ.js → MyProfileSettingsPage-CIfFufvo-uBNLzBNw.js} +8 -8
  111. package/dist/assets/NavBarWithPicker-CvhnGryh-CauN1w5W.js +30 -0
  112. package/dist/assets/{NavigationArrow-xI3dolgO-C-GiXFn4.js → NavigationArrow-CXkUidH6-fqvGvSGZ.js} +2 -2
  113. package/dist/assets/{NavigationDots-CbSSDiyy-WCBt3UxE.js → NavigationDots-hBq7kHVj-Vj1p5Rqn.js} +1 -1
  114. package/dist/assets/{NewGlobalMerchantPage-vHNZ1z6p-BmDZAkXp.js → NewGlobalMerchantPage-DORHvz4D-CYDIdofb.js} +15 -15
  115. package/dist/assets/{NoDataChart-DHDhwnCE-CDUxuuOv.js → NoDataChart-C4KqN3ua-6H0vHNsB.js} +1 -1
  116. package/dist/assets/{NoDataTable-BnVKm6Qa-Da3lIrUA.js → NoDataTable-DaX07HI0-B6ZwwCAM.js} +1 -1
  117. package/dist/assets/{NotFoundPage-BNZEf9qH-BE8kBN6K.js → NotFoundPage-BIh20jzm-BXLRcjFX.js} +1 -1
  118. package/dist/assets/{NotificationSettingsPage-DfnpY6qJ-Q5CoK9_s.js → NotificationSettingsPage-gU3g8rJ2-Au_WueGH.js} +14 -14
  119. package/dist/assets/NotificationsListConfig-C14JCaD1-cAHM1Kht.js +1 -0
  120. package/dist/assets/{NotificationsPage-Bg1mW_-3-CzD0o_6Q.js → NotificationsPage-oy3LHVU2-C0LKRRGq.js} +52 -52
  121. package/dist/assets/{OpExByVendorPage-qNgK4tMM-CM_o2sby.js → OpExByVendorPage-D8jXzTd6-CpwZHxBM.js} +9 -9
  122. package/dist/assets/{OverlayContainerPage-ZbhbAqlg-l2yHPll9.js → OverlayContainerPage-Bmu909Fo-Drnebvl5.js} +1 -1
  123. package/dist/assets/{PandLWithForecastPage-C8qE7xCZ-UDfg9dM5.js → PandLWithForecastPage-BQW2_QDB-BVhcDW_t.js} +15 -15
  124. package/dist/assets/{PaymentAccountSetupBillingAddressSection-DA77K9eY-BBrPsmYp.js → PaymentAccountSetupBillingAddressSection-CY9QJXXs-ByBDQvaD.js} +18 -18
  125. package/dist/assets/{PeoplePage-Chec7uSH-DFRieiVv.js → PeoplePage-B7s3mjRX-BNB49xB2.js} +26 -26
  126. package/dist/assets/{PortfolioAllocationFormPage-B_lIRV75-9B1_7c3Q.js → PortfolioAllocationFormPage-eonsRKDg-CW4TIBlU.js} +5 -5
  127. package/dist/assets/PortfolioDetails-BFqRNjFs-DdtIdWXw.js +218 -0
  128. package/dist/assets/ProductsCarousel-BaTq9uMB-DT3_7m1I.js +142 -0
  129. package/dist/assets/{PromoBaseCards-D3gKG9qA-Bq2w579j.js → PromoBaseCards-Bf3Dizji-DFvWixK1.js} +4 -4
  130. package/dist/assets/{QBOConnectionDialog-C8y2XvBN-CGZvEFLA.js → QBOConnectionDialog-DhOSSZ5O-BcCZx_dG.js} +13 -13
  131. package/dist/assets/{QBOSetupSection-DDGIRv8E-DDOtydJ8.js → QBOSetupSection-BWJoUKzu-DC5g6xXu.js} +14 -14
  132. package/dist/assets/ReimbursementApprovalRuleDetailPage-CiebC6vq-B0xwHjcZ.js +26 -0
  133. package/dist/assets/{ReimbursementApprovalRulesPage-DsIFWYvA-BGZ99R95.js → ReimbursementApprovalRulesPage-gKLkrIyV-DxnMuJiA.js} +10 -10
  134. package/dist/assets/ReimbursementDetailPage-BF4vlfIm-A5yNZHmb.js +314 -0
  135. package/dist/assets/ReimbursementPromoPage-BFwztEak-CceCs1UK.js +84 -0
  136. package/dist/assets/ReimbursementSetUpPage-D1AVnqd4-CKntMkOU.js +140 -0
  137. package/dist/assets/{ReimbursementsBulkReviewDrawerPage-DblkkMcc-i1I7617W.js → ReimbursementsBulkReviewDrawerPage-BsqdpOS_-B3Pgz4a_.js} +1 -1
  138. package/dist/assets/{ReloadCard-BszztAdg-gseVFmCl.js → ReloadCard-BmYf1NZf-DhNr8urp.js} +3 -3
  139. package/dist/assets/ReportTableViewSelector-yTxheyC3-CSqeEY6U.js +150 -0
  140. package/dist/assets/{ReportsPage-BfKLEriq-CNsTnOim.js → ReportsPage-DZtCp9CP-GUEOyiOt.js} +8 -8
  141. package/dist/assets/{RevenueChart-B5dfrWKL-h1RS9vmc.js → RevenueChart-CXSh5l_p-dQ5RnZTk.js} +1 -1
  142. package/dist/assets/ReviewDetailsPage-DG7ms5Hy-bXyI7cqb.js +290 -0
  143. package/dist/assets/{ReviewOverlay-BysN2GYI-B54hA7h0.js → ReviewOverlay-B2jf6tfG-D_9vNPuM.js} +26 -26
  144. package/dist/assets/{RoleWithToolTip-BRe9iDOl-r4MeN03_.js → RoleWithToolTip-DHdLJcWR-GnlXHGj6.js} +1 -1
  145. package/dist/assets/{ScheduleDetailsFixedAssetsPage-gij2cBvS-DYNVzDVF.js → ScheduleDetailsFixedAssetsPage-CY0i2n7i-9GRv9Sh2.js} +8 -8
  146. package/dist/assets/{ScheduleDetailsPage-DVm4cyKr-BOhfGajG.js → ScheduleDetailsPage-CVh8-Sc9-BcDI1QHR.js} +3 -3
  147. package/dist/assets/{ScheduleSequenceTable-aSVVm6mG-DuDPOPR7.js → ScheduleSequenceTable-8qqeMhAk-COgow_cL.js} +19 -19
  148. package/dist/assets/{ScreenRoutes-z4Ov9eJq.js → ScreenRoutes-HggFEvBU.js} +1 -1
  149. package/dist/assets/SetUpAccountSection-CKdSkMBO-Dgf4iucH.js +378 -0
  150. package/dist/assets/SetUpDefaultSection-BM57n5BV-BGP1G39B.js +174 -0
  151. package/dist/assets/SignIn-BMjCrrGx-DVM_TdnN.js +407 -0
  152. package/dist/assets/{SignInScreen-l-67Uvxk.js → SignInScreen-BP8BTBPi.js} +1 -1
  153. package/dist/assets/{SpendManagementListViewPage-Dav0JMKy-Y-GEx6Lw.js → SpendManagementListViewPage-BphSarNr-olaU5e62.js} +13 -13
  154. package/dist/assets/{SpendManagementPerTabPage-C-Y-BFqH-BkDeeVjW.js → SpendManagementPerTabPage-DCkS4HuZ-BoJws23h.js} +43 -43
  155. package/dist/assets/{SpendManagementSection-DGz-I0bf-Bw1c1jys.js → SpendManagementSection-DKqHikhq-CsTWl7zh.js} +15 -15
  156. package/dist/assets/SpendMgmtSetupAccountSection-BF7bb5O_-DSPc6rRK.js +206 -0
  157. package/dist/assets/{StatementItem-2F2qxL7G-sSXIEL81.js → StatementItem-Ki_Mzpf9-D38JqRpj.js} +6 -6
  158. package/dist/assets/StatementsPage-B6XMWWpt-Dr9BGLnN.js +58 -0
  159. package/dist/assets/{StatusSwitcher-DBUg94S_-C2JEQhps.js → StatusSwitcher-BkAnAbyd-DQZA1a3w.js} +4 -4
  160. package/dist/assets/{SubTabSwitcher-CoK8FOIA-DDQIjZPM.js → SubTabSwitcher-Au3snima-DElPxhu-.js} +6 -6
  161. package/dist/assets/{SummaryCard-D1KRVnqp-BaQsoKv3.js → SummaryCard-B-IXQpJ7-Dg8CCNrn.js} +1 -1
  162. package/dist/assets/{TaskManagementPage-BhFEeDBu-DzfbV0Zn.js → TaskManagementPage-BPNEy-p0-BIbh7B8y.js} +42 -42
  163. package/dist/assets/{TimeRangeSwitcher-4JrIq9xZ-TFwqCfhn.js → TimeRangeSwitcher-DpDC0FGn-CoKhjSY7.js} +5 -5
  164. package/dist/assets/{TimeframeSwitcher-CjctaKq_-Dr_Vr7Rj.js → TimeframeSwitcher-D1cuigpc-D9PCDoa0.js} +1 -1
  165. package/dist/assets/{TimeframeSwitcherWithToggle-C0dRRCYf-B1COtObb.js → TimeframeSwitcherWithToggle-_2U17Wg0-Cc6NrQTz.js} +1 -1
  166. package/dist/assets/{TopExCard-CCBEun3e-BNc9p9eG.js → TopExCard-BWOozDK3-GMojpRJp.js} +7 -7
  167. package/dist/assets/{TopExDetailPage-DbwmOLnV-Dh4ElkDG.js → TopExDetailPage-DpYLakrO-vsCGpsy3.js} +21 -21
  168. package/dist/assets/{TransactionDetailPage-DsQJU2de-CxIPljIq.js → TransactionDetailPage-Bxzam_ho-gn2TcHkj.js} +32 -32
  169. package/dist/assets/{TransactionList-BIMzvzrT-_or9xEGN.js → TransactionList-CEfjoVPA-DR1uAuMl.js} +15 -15
  170. package/dist/assets/{TransactionListBig-DiFiu66r-BLXPBbpL.js → TransactionListBig-CefZbd83-D9G3vxbN.js} +24 -24
  171. package/dist/assets/TransactionListPage-CM319tsV-DkNHohDS.js +35 -0
  172. package/dist/assets/{TransactionVendorDetailPage-A2F8TF9r-DUOtbDNW.js → TransactionVendorDetailPage-Z7O-juRN-D3T9JsrE.js} +4 -4
  173. package/dist/assets/TransferDrawerPage-0vQtF6ID-fpHDlHlf.js +362 -0
  174. package/dist/assets/{TreasuryOverviewPage-Bwy2y6eI-CvBsMjHy.js → TreasuryOverviewPage-DaCuL9FX-BtE7UAml.js} +101 -101
  175. package/dist/assets/{TreasuryPromoPage-B3P0nF1z-17ooiVR4.js → TreasuryPromoPage-BQ6Cuqoa-DpBYobqK.js} +26 -26
  176. package/dist/assets/{TreasurySetupPage-BgrgBBsW-BvZOLqE5.js → TreasurySetupPage-BJRBNCvY-DTKYqc-u.js} +10 -10
  177. package/dist/assets/{TreasuryStatementsPage-DvCQhl_X-Dk5WyixX.js → TreasuryStatementsPage-z6cg-MO_-B6xE_NLh.js} +5 -5
  178. package/dist/assets/{TreasuryTaxLetterPage-iG8-cJFt-j6qmlNFn.js → TreasuryTaxLetterPage-DP-c4Sqo-DJ913yYo.js} +5 -5
  179. package/dist/assets/{TreasuryTransferOrReviewPage-BZ5sPJAg-NdyyZMx2.js → TreasuryTransferOrReviewPage-BGfIlPXx-DSEBAJOM.js} +56 -56
  180. package/dist/assets/{TrendChart-_IpSJoUH-DXWWW8tE.js → TrendChart-BAMRDfp7-BazRtItt.js} +5 -5
  181. package/dist/assets/{TrendWithTransactions-BqGV_CQg-DBpBbNzJ.js → TrendWithTransactions-CgbouMHP-BeJkYy2u.js} +8 -8
  182. package/dist/assets/{UncategorizedAccountsMappingPage-iK-1vllN-CsfRUZlv.js → UncategorizedAccountsMappingPage-DUVjNpg2--ZQ9jdii.js} +20 -20
  183. package/dist/assets/{UnitIntegrationPage-sYNoUudZ-CYUrKLfM.js → UnitIntegrationPage-DSWbn8gm-BF5pvmYs.js} +4 -4
  184. package/dist/assets/UploadAdditionalDocumentOverlay-BFn9gixM-TNCvf1wH.js +38 -0
  185. package/dist/assets/{Vendor2FAPopup--4Ufzmk0-Bhn3C6zT.js → Vendor2FAPopup-CA-cVVNX-Br4ikl9I.js} +1 -1
  186. package/dist/assets/{VendorACHDetailsPage-BD9WwdNN-B6rEBLg0.js → VendorACHDetailsPage-Hdw6gHNB-D1EJLe9f.js} +1 -1
  187. package/dist/assets/{VendorDetailPage-DwLCEthT-DOEOWBu5.js → VendorDetailPage-CceVHonS-DTF5QB-w.js} +16 -16
  188. package/dist/assets/{VendorDomesticWireDetailsPage-Y2SlFgHo-ctcFxC1W.js → VendorDomesticWireDetailsPage-ChF-hj1o-CRNdIBeH.js} +1 -1
  189. package/dist/assets/{VendorFiling1099EditablePage-nGfjBA1D-Dj4qnXHI.js → VendorFiling1099EditablePage-BnMmu8g4-D-QjmAYA.js} +13 -13
  190. package/dist/assets/{VendorFirstReviewPage-Bgf9MtEn-B5_vtXIt.js → VendorFirstReviewPage-C9LNBxKs-iubpjCjr.js} +49 -49
  191. package/dist/assets/{VendorInternationalWireDetailsPage-CMxyzCCL-DgMIpDxj.js → VendorInternationalWireDetailsPage-B8F_1TYL-CehAU7df.js} +31 -31
  192. package/dist/assets/{VendorInternationalWireSwiftDetailsPage-C6rMWgzM-C9CLMBsh.js → VendorInternationalWireSwiftDetailsPage-HuCjhvn4-DolPnQw8.js} +1 -1
  193. package/dist/assets/{VendorsAccountsSection-Ceq0cYf6-Dwaaaz-u.js → VendorsAccountsSection-Cj3NFdKN-B9ouaYU2.js} +4 -4
  194. package/dist/assets/VerifyDevice-dg83_W2W-DmiPoszu.js +96 -0
  195. package/dist/assets/VideoPopup-0LSxcyRX-CeJLs_Z5.js +31 -0
  196. package/dist/assets/{WarningsDrawerPage-DSssRFm_-Dvfai-rz.js → WarningsDrawerPage-DR9oeIuj-B1HHe12t.js} +9 -9
  197. package/dist/assets/{ZeniAccountDetailPage-C6q8N5tU-DESMj8H1.js → ZeniAccountDetailPage-DHl0vyQ0-D4m750Dj.js} +25 -25
  198. package/dist/assets/{ZeniAccountListViewPage-CqUvXrvR-Cc02Six5.js → ZeniAccountListViewPage-BC1yUQbd-DA-thvu8.js} +63 -63
  199. package/dist/assets/ZeniAccountNavBarPieces-CpKh4Vxw-CQBSadEV.js +14 -0
  200. package/dist/assets/{ZeniAccountPromoPage-B6wyK1mQ-jB9p9r4X.js → ZeniAccountPromoPage-BaRzPlIW-DDgMDs51.js} +29 -29
  201. package/dist/assets/ZeniAccountSetupPage-CveI2__B-BL7QVBOR.js +36 -0
  202. package/dist/assets/{ZeniCopyright-BqG_ynZT-B8auuDYw.js → ZeniCopyright-D6e3OekQ-3nIDquq3.js} +1 -1
  203. package/dist/assets/{ZeniTransferAmountSlider-BZb23ypm-CNSeiXW5.js → ZeniTransferAmountSlider-BqyHxYBn-DOVMp_BS.js} +7 -7
  204. package/dist/assets/{analyticsHelper-517kzICQ-B_8oYoDB.js → analyticsHelper-CYiy63P3-BIFQ1l_N.js} +1 -1
  205. package/dist/assets/{analyticsHelper-fHYf245D.js → analyticsHelper-q5gZKv1q.js} +1 -1
  206. package/dist/assets/chartTypes-sx4859ds-GbS6VOEl.js +1 -0
  207. package/dist/assets/{commonDimensions-Dw8Sh6Gv-7gi8Z3Gt.js → commonDimensions-DbTYS1hy-sQ0jQuuT.js} +1 -1
  208. package/dist/assets/{detailCommon-BA8Eb9ta-Cls_xdIj.js → detailCommon-BeqWtSZF-C3x-L6T7.js} +10 -10
  209. package/dist/assets/downloadPdf-CLTp2aZt-DDw4mfQ_.js +1 -0
  210. package/dist/assets/{index-CteHikkY.js → index-P_4M6V8j.js} +17377 -14411
  211. package/dist/assets/{mapLoadingInProgressToTreeNode-B16JI0nu-CaT-riL3.js → mapLoadingInProgressToTreeNode-Dl_IFb2l-Dr2U1vob.js} +1 -1
  212. package/dist/assets/{mapSectionWithAcOnlyToTreeNode-u05r0BKW-D93Qvfy9.js → mapSectionWithAcOnlyToTreeNode-BAhSN9Et-BvR2g837.js} +1 -1
  213. package/dist/assets/{mapSpacerToTreeNode-DHlbGqUH-CR4GfB3i.js → mapSpacerToTreeNode-3b46l63c-C8ssHh5s.js} +1 -1
  214. package/dist/assets/{mapTimeframeBalancesToTreeNode-CGkPIsh6-oG-KC4x3.js → mapTimeframeBalancesToTreeNode-3pTXOISe-CgCBO3AW.js} +1 -1
  215. package/dist/assets/{mapTimeframeBalancesToTreeNode-ymtaozr7-CN1Pxsue.js → mapTimeframeBalancesToTreeNode-DJqcH4tL-s-wMhKIa.js} +1 -1
  216. package/dist/assets/{mapTimeframeHeaderLoadingInProgressToTreeNode-C7X7F5Ac-CAukvICG.js → mapTimeframeHeaderLoadingInProgressToTreeNode-yhbtLbK2-Buokl7Z0.js} +1 -1
  217. package/dist/assets/{toCOABalancesWithID-B0nbXcq3-CrfKiUyi.js → toCOABalancesWithID-D49XFhoj-DjL9meL6.js} +1 -1
  218. package/dist/assets/{toChartData-CZR7pH0W-Dm5lu3KI.js → toChartData-C9pHl0xA-CKVc0-Yj.js} +1 -1
  219. package/dist/assets/{treasuryColorHelper-99Jkq8AE-BBbuwlCb.js → treasuryColorHelper-CkjbPhqI-PraXB90r.js} +1 -1
  220. package/dist/assets/{uploadAttachment-5GZYaQNG-2L-QfpWR.js → uploadAttachment-BniS82zn-BreMBxbN.js} +20 -20
  221. package/dist/assets/{uploadReceipts-CtQowT1I-0zTSBTg9.js → uploadReceipts-dxsKhm9I-wO4Dla2j.js} +1 -1
  222. package/dist/index.html +1 -1
  223. package/package.json +3 -3
  224. package/dist/assets/ACHDetailsPage-B2GVy8XM-BOIvjXTj.js +0 -21
  225. package/dist/assets/ApprovalRulesSettingsPage-l6wNe5y0-1aq4Vv65.js +0 -47
  226. package/dist/assets/BillPayApprovalRuleDetailPage-CyzRcfmb-uOofdgcM.js +0 -27
  227. package/dist/assets/BillPayPromoPage-XAG7hXMH-BZL4sjAP.js +0 -112
  228. package/dist/assets/BillPaySetUpPage-BBsdhwgY-C2VZLsTX.js +0 -42
  229. package/dist/assets/BillingSettingsPage-DJNjNtIF-uDhkigAj.js +0 -44
  230. package/dist/assets/ChargeCardPromoPage-B2v83Vrf-COR15-4w.js +0 -222
  231. package/dist/assets/ChargeCardSetupPage-D4DqJYC2-Bgmue_Hy.js +0 -36
  232. package/dist/assets/ChargeCardStatementsPage-N-UJC5n3-DCTtgimP.js +0 -60
  233. package/dist/assets/CheckDepositDrawerPage-BlNXO233-Biy_ee3N.js +0 -206
  234. package/dist/assets/CompleteProfile-BcB52KEM-lFVSyCYA.js +0 -52
  235. package/dist/assets/CurrencySelectField-DptlyOSs-CWinX_tp.js +0 -139
  236. package/dist/assets/CustomerOnboardingContainerPage-CicNW9-B-DWzzD7vt.js +0 -1
  237. package/dist/assets/CustomerOnboardingNoStepsPage-vfiQQOHz-CcQVn2u7.js +0 -66
  238. package/dist/assets/CustomerOnboardingProductSuitePage-CZTuBAv2-_eb-zJs0.js +0 -202
  239. package/dist/assets/DepositAccTransactionListPage-BYdaEGCV-BFNeAgzu.js +0 -66
  240. package/dist/assets/ExpenseAutomationOverviewPage-UXpoYnDh-CO2tpATT.js +0 -222
  241. package/dist/assets/HelpButton-j66YbdZ7-Drvx-5iY.js +0 -28
  242. package/dist/assets/InviteFormPage-t42rmGiL-7JW6Km7H.js +0 -312
  243. package/dist/assets/InvitePeoplePage-78Fznvo4-BvI_a8sG.js +0 -12
  244. package/dist/assets/MailingDetailsSection-CXSm1fgW-DRNX0_o-.js +0 -21
  245. package/dist/assets/MyPendingActivationChargeCardListPage-COeIF-Gj-BJUi7XQw.js +0 -6
  246. package/dist/assets/NavBarWithPicker-Dd5TPoA8-BZQxCbZw.js +0 -30
  247. package/dist/assets/NotificationsListConfig-DtICI7X6-CayIRbFW.js +0 -1
  248. package/dist/assets/PortfolioDetails-Dm2r3i6b-BwrtFocU.js +0 -218
  249. package/dist/assets/ProductsCarousel-Ba0LHKrb-BDvM1Acb.js +0 -144
  250. package/dist/assets/ReimbursementApprovalRuleDetailPage-Dc_vsL89-DXMeU38o.js +0 -26
  251. package/dist/assets/ReimbursementDetailPage-6KZSAl8R-CGQrQ4-Q.js +0 -314
  252. package/dist/assets/ReimbursementPromoPage-Bijp59bV-Bq5XzABH.js +0 -112
  253. package/dist/assets/ReimbursementSetUpPage-UW_9Cl4O-BNhdS7cU.js +0 -140
  254. package/dist/assets/ReportTableViewSelector-DOnGrFNT-B1xUQ166.js +0 -150
  255. package/dist/assets/ReviewDetailsPage-BCo54ehm-fgesmtoD.js +0 -290
  256. package/dist/assets/SetUpAccountSection-qYVA9A09-CVxmZ6g-.js +0 -378
  257. package/dist/assets/SignIn-BLt95c3U-D3UBJiEv.js +0 -408
  258. package/dist/assets/StatementsPage-D8hwgVAz-DamBoqPu.js +0 -58
  259. package/dist/assets/TransactionListPage-7JveOMDe-v7-9Lfsn.js +0 -35
  260. package/dist/assets/TransferDrawerPage-CCqQ3Daq-DRUKf3ph.js +0 -362
  261. package/dist/assets/UploadAdditionalDocumentOverlay-DMtjF2N8-D2r5JejQ.js +0 -38
  262. package/dist/assets/VerifyDevice-BTFRL9bH-t2x3vCON.js +0 -96
  263. package/dist/assets/ZeniAccountNavBarPieces-DcmtDKVQ-xec3gYAK.js +0 -14
  264. package/dist/assets/ZeniAccountSetupPage-Dl83s-y4-Dwfiz5l8.js +0 -36
  265. package/dist/assets/chartTypes-BTkUFFIf-PQ5t5G6G.js +0 -1
  266. package/dist/assets/downloadPdf-CDKlyJb--BC8IkHL1.js +0 -1
  267. package/dist/assets/play-icon-B0_JAuQa-CnChOIaR.js +0 -31
@@ -1,4 +1,4 @@
1
- import{u as ve,e as je,a as Xe,c9 as Ye,j as t,aW as Qe,B as re,o as i,p as se,bR as Ze,F as et,bA as tt,C as I,n as nt,k as D,ao as it,$ as De,b as ot,d5 as ze,cm as at,a2 as G,a8 as fe,f2 as Te,l as J,cu as ct,aS as Ne,f3 as _e,fe as lt,ff as qe,fg as st,fh as rt,bt as Ee,s as k,f5 as ge,f6 as we,fi as Pe,a0 as Se,bJ as xe,Z as dt,b5 as ut,dL as He,g as ie,c as B,fj as pt,fk as ht,fl as mt,aC as ft,fm as gt}from"./index-CteHikkY.js";import{b as r,n}from"./vendor-rkTZJa59.js";import{r as Ie}from"./mui-C42whWwM.js";import{a as wt}from"./SetUpAccountSection-qYVA9A09-CVxmZ6g-.js";import"./analytics-CBL_L82S.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-BDNqpTKX.js";const{settings:{bankConnectionHeader:de}}=re.getLocalizedStrings().common,St={value:de.productType,width:new I(100,19)},xt={value:de.primaryAccount,width:new I(100,36)},yt={value:de.linkAccount,width:new I(100,22)},vt={value:de.status,width:new I(12,12)},kt={value:de.balance,width:new I(12,13)},N=[St,xt,yt,vt,kt],{common:{settings:Oe,strings:{hyphen:ke}},commonSetUp:{setUp:Fe}}=re.getLocalizedStrings(),T={containerPadding:new I(k[3],k[4]),containerRightPadding:new I(k[3],k[8]),iconContainerMaxWidthHeight:new I(k[6],k[7]),iconWidthHeight:new I(20,k[4]),iconPadding:new I(k[1],12),productTypeContainerMarginBottom:new I(k[3],k[0]),linkAccountContainerMarginTop:new I(k[3],k[0]),productTypeIconSize:new I(k[3],k[4])},bt="bankConnectionsSettingsPage",$t=({productType:e,windowSize:h})=>{switch(e){case"bill_pay":return t.jsx(Dt,{windowSize:h,children:t.jsx(ft,{})});case"reimbursement":return t.jsx(Nt,{windowSize:h,children:t.jsx(mt,{})});case"zeni_accounts":return t.jsx(qt,{windowSize:h,children:t.jsx(Ne,{})});case"zeni_treasury":return t.jsx(Jt,{windowSize:h,children:t.jsx(ht,{})});case"charge_cards":default:return t.jsx(Ht,{windowSize:h,children:t.jsx(pt,{})})}},Ct=({allBankAccounts:e,setupView:h,connectedAccountProvider:q,onFetchLinkTokenClick:R,onUpdatePaymentAccountStatus:_,onEstablishConnectionClick:P,onEstablishConnectionSuccess:M})=>{const C=ve(),c=je(),f=ze().analytics,{trigger:w,formState:{errors:U}}=at(),{plaidConnectionDetails:V,allFundingAccounts:a,primaryFundingAccount:o,productType:l}=h,m=V.link_account,b=V.update_account,[u,A]=r.useState(void 0),[H,v]=r.useState(!1),W=()=>{v(!0)},d=u==="update_account"?b:m,[S,L]=r.useState(d.linkToken??null),[$,z]=r.useState(!1),g=m.fetchStatus.fetchState==="In-Progress"||m.updateStatus.fetchState==="In-Progress";let p,E,s,j=!1;o!=null&&(o.accType==="depositAccount"?p={code:"verified",name:"Verified"}:(p=o.providerVerificationStatus,E=o?.institutionDetails,s=p?.code,j=o?.isLoginRequired??!1));const Y=G(m.updateStatus.fetchState),Q=G(b.updateStatus.fetchState),ee=G(b.fetchStatus.fetchState),O=C.mode==="light"?new fe(C.colors.brandColorJadeLight):new fe(C.colors.brandColorJadeDark),K=r.useCallback((x,X)=>{f.trackConnectBankSuccess(l,"Settings");const Le=X.accounts.find(Ke=>Ke.id===o?.providerAccountId)??X.accounts[0];o?.id!=null&&u==="update_account"&&Le?.verification_status!=null&&!j?_(Le?.verification_status,o.id,"update_account",y(l),l):P(x,y(l),l),A(void 0),z(!1)},[f,l,o?.id,o?.providerAccountId,u,j,_,P]),te=r.useCallback((x,X)=>{x!=null&&(f.trackConnectBankFailure(l,x.error_code+" "+x.error_message,"Settings"),x.error_code==="TOO_MANY_VERIFICATION_ATTEMPTS"&&o?.id!=null&&_("verification_failed",o.id,"update_account",y(l),l),console.log("Plaid Connection Error",x,X)),A(void 0),z(!1)},[f,l,o?.id,_]),{open:Z,ready:ue}=Te({token:S,onSuccess:K,onExit:te});r.useEffect(()=>{(Y==="In-Progress"&&m.updateStatus.fetchState==="Completed"||Q==="In-Progress"&&b.updateStatus.fetchState==="Completed")&&(J.isVerifiedPaymentAccountProviderStatusCode(s??"")||(R("link_account",y(l)),M(y(l),l)))},[m.updateStatus.fetchState,M,R,o?.providerVerificationStatus?.code,o?.id,Y,Q,b.updateStatus.fetchState,s,l]),r.useEffect(()=>{(J.isVerifiedStatusCode(s??"")||s==="verification_failed")&&!$&&u!=null&&d.linkToken===S&&d.fetchStatus.fetchState==="Completed"&&ue&&z(!0)},[ue,S,d.fetchStatus.fetchState,d.linkToken,s,u,$]);const oe=$e(bt,"primaryAccountSection"),F=ct(U,oe);r.useEffect(()=>{d.fetchStatus.fetchState==="Completed"&&d.linkToken!=null&&d.linkToken!==S&&L(d.linkToken)},[d.fetchStatus.fetchState,d.linkToken,S]),r.useEffect(()=>{$&&Z()},[$,Z]),r.useEffect(()=>{!o?.zeniAccountId&&!F&&w(oe)},[o?.id]),r.useEffect(()=>{(s==null||s==="verification_failed"||s==="verification_expired"||J.isVerifiedStatusCode(s))&&(J.zeniDate(new Date().toISOString()).isAfter(m.expiration)||m.linkToken==null)&&R("link_account",y(l))},[]);const ne=()=>{f.trackConnectBankGetBalance(l,"Settings"),A("update_account"),R("update_account",y(l),o?.id)},ae=`${o?.accountSubType?.name!=null?o?.accountSubType?.name.substring(0,1).toUpperCase().concat(o?.accountSubType?.name.substring(1)):""} ${o?.maskedAccountNumber??""}`.trim(),pe=E?.zeniInstitutionId.toLowerCase()==="chase",Je=a.findIndex(x=>x.id===o?.id),Ge={element:t.jsx(Ne,{width:T.iconWidthHeight.valuePx(c)}),color:O};return t.jsxs(At,{windowSize:c,children:[H===!0?Ie.createPortal(t.jsx(_e,{connectedAccountProvider:q,action:{onBackClick:()=>v(!1)}}),document.body):null,t.jsxs(jt,{windowSize:c,wrapperWidth:N[0].width,children:[t.jsx(Tt,{windowSize:c,isDarkMode:C.mode==="dark",children:t.jsx($t,{productType:l,windowSize:c})}),t.jsx(zt,{children:Oe.productNameByType[l]})]}),t.jsx(_t,{windowSize:c,wrapperWidth:N[1].width,children:t.jsxs(Ft,{windowSize:c,children:[o!=null&&c!=="small"?t.jsx(Ot,{isDisabled:j,children:lt(Ge,c,C.mode==="dark",o,Je,!1)}):null,t.jsxs(Bt,{windowSize:c,className:"fundingAccount",children:[t.jsx(qe,{style:{display:c==="small"?"block":"inherit",width:"-webkit-fill-available",color:C.colors.hero},customStyleConfig:{menu:()=>({width:c==="small"?"auto":510})},controlProperty:{controlHeight:k[4],fontWeight:Ee.medium,highlightOnHover:!1,leftRightMargin:!1,fieldWidth:c==="small"?240:300},customPlaceholder:{color:C.colors.hero,weight:Ee.medium},name:$e(l,"primaryAccountSection"),placeholder:Fe.selectAccountPlaceholder,capitalizeOptions:!0,appendSublabel:!1,showLogoInSingleValue:!1,isClearable:!1,maxMenuHeight:220,valueToLogo:(x,X)=>rt(a,x,X),valueToSubLabels:(x,X)=>st(a,x,X,!1),defaultValue:{selectedOption:o?.id,allOptions:a.map(x=>({label:x.label,value:x.id,isRecommended:x.accType==="depositAccount"}))},textAlignment:"left",showDownChevronIcon:!0,showTickIcon:!1,isOptionRemovable:!1,registerOptions:{required:!1},showCreateOption:!0,showEmptyState:!1,isDisabled:g?"disabled":void 0,showLoadingIcon:g,onClickCreateOption:()=>{f.trackConnectBank(l,"Settings"),A("link_account"),m.linkToken==null||J.zeniDate(new Date().toISOString()).isAfter(m.expiration)?R("link_account",y(l)):S!==m.linkToken?L(m.linkToken):$?Z():z(!0)}}),t.jsxs(Pt,{isDisabled:j,children:[ae?t.jsxs(t.Fragment,{children:[t.jsx(It,{children:ae}),c!=="small"&&(s!=="verification_failed"&&o?.providerVerificationStatus?.code==="pending_manual_verification"||j||pe)?t.jsx(Et,{}):null]}):null,c==="small"&&p!=null?t.jsx(ge,{style:{width:"max-content",padding:i.sp0,marginLeft:i.sp2},tagTitle:p.name,textColor:we(p.code)}):null,s!=="verification_failed"&&o?.providerVerificationStatus?.code==="pending_manual_verification"||j||pe?t.jsx(Pe,{productType:l,isUpdateLinkClicked:u==="update_account",isLoginRequired:j,isPendingVerification:s!=="verification_failed"&&o?.providerVerificationStatus?.code==="pending_manual_verification",fetchAndUpdateStatues:{fetchStatus:b.fetchStatus,updateStatus:b.updateStatus,linkFetchStatus:m.fetchStatus,linkUpdateStatus:m.updateStatus,prevFetchState:ee,prevUpdateState:Q},onUpdateLinkTokenClick:ne,onChaseInfoClick:W}):null]})]}),c==="small"?t.jsxs(Mt,{children:[o?.accountBalance?.available?t.jsx(Be,{className:"balanceLabel",children:Se("0,0[.]00",o?.accountBalance?.available)}):t.jsx(be,{children:ke}),o?.accountBalance?.lastRefreshTime?t.jsx(Re,{className:"balanceLabel",children:xe(o?.accountBalance?.lastRefreshTime)}):o?.balanceFetchStatus.fetchState==="In-Progress"?t.jsx(se,{size:"Small",start:!0}):null]}):null]})}),t.jsxs(Vt,{windowSize:c,isDisabled:j,wrapperWidth:N[2].width,onClick:x=>x.stopPropagation(),"data-testid":dt("bank-account-section",l),className:"qboLinkAcc",children:[c==="small"?t.jsx(Lt,{children:Oe.bankConnectionHeader.linkAccount}):null,t.jsx(Wt,{isDisabled:j?"disabled":void 0,name:$e(l,"bankAccountSection"),placeholder:Fe.zeniCashAccountPlaceholder,defaultValue:{selectedOption:o?.zeniAccountId??"",allOptions:e.map(x=>({label:x.accountName,value:x.accountId}))},controlProperty:{highlightOnHover:!0},isOptionRemovable:!1,textAlignment:"left",registerOptions:{required:!1},style:{width:c==="small"?"calc(100% - 135px)":"100%",marginLeft:c==="small"?i.sp0:`-${i.sp3}`}})]}),c!=="small"?t.jsx(Ut,{windowSize:c,wrapperWidth:N[3].width,children:p!=null?t.jsx(ge,{style:{width:"max-content",padding:0},tagTitle:p.name,textColor:we(p.code)}):t.jsx(be,{children:ke})}):null,c!=="small"?t.jsxs(Rt,{windowSize:c,wrapperWidth:N[4].width,children:[o?.accountBalance?.available?t.jsx(Be,{className:"balanceLabel",children:Se("0,0[.]00",o?.accountBalance?.available)}):t.jsx(be,{children:ke}),o?.accountBalance?.lastRefreshTime?t.jsx(Re,{className:"balanceLabel",children:xe(o?.accountBalance?.lastRefreshTime)}):o?.balanceFetchStatus.fetchState==="In-Progress"?t.jsx(se,{size:"Small",start:!0}):null]}):null]})},At=n.div`
1
+ import{u as ve,e as je,a as Ke,c9 as Ye,j as t,aW as Qe,M as re,o as i,m as se,bR as Ze,F as et,bA as tt,C as I,B as nt,n as D,an as it,v as De,X as ot,d5 as ze,cm as at,a1 as G,a7 as fe,f1 as Te,l as J,cu as ct,aR as Ne,f9 as He,fa as lt,fb as st,bt as Ee,q as k,f2 as ge,f3 as we,$ as Se,bJ as xe,_ as rt,b5 as dt,dL as qe,g as ie,i as F,f8 as ut,fm as pt,fn as ht,aB as mt,fo as ft}from"./index-P_4M6V8j.js";import{b as r,n}from"./vendor-rkTZJa59.js";import{r as _e}from"./mui-C42whWwM.js";import{M as Pe}from"./ChaseOverlay-BaGgoJZk-L4zZNkyz.js";import{a as gt}from"./SetUpAccountSection-CKdSkMBO-Dgf4iucH.js";import{z as wt,B as Ie}from"./SpendMgmtSetupAccountSection-BF7bb5O_-DSPc6rRK.js";import"./analytics-CBL_L82S.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-BDNqpTKX.js";import"./SetUpDefaultSection-BM57n5BV-BGP1G39B.js";import"./ChargeCardUtils-DQztOSYJ-DZxY6wV1.js";import"./CreditCardPaymentPlgSection-Cz-CSdKg-DO4yi827.js";const{settings:{bankConnectionHeader:de}}=re.getLocalizedStrings().common,St={value:de.productType,width:new I(100,19)},xt={value:de.primaryAccount,width:new I(100,36)},yt={value:de.linkAccount,width:new I(100,22)},vt={value:de.status,width:new I(12,12)},kt={value:de.balance,width:new I(12,13)},N=[St,xt,yt,vt,kt],{common:{settings:Oe,strings:{hyphen:ke}},commonSetUp:{setUp:Be}}=re.getLocalizedStrings(),T={containerPadding:new I(k[3],k[4]),containerRightPadding:new I(k[3],k[8]),iconContainerMaxWidthHeight:new I(k[6],k[7]),iconWidthHeight:new I(20,k[4]),iconPadding:new I(k[1],12),productTypeContainerMarginBottom:new I(k[3],k[0]),linkAccountContainerMarginTop:new I(k[3],k[0]),productTypeIconSize:new I(k[3],k[4])},bt="bankConnectionsSettingsPage",$t=({productType:e,windowSize:h})=>{switch(e){case"bill_pay":return t.jsx(Dt,{windowSize:h,children:t.jsx(mt,{})});case"reimbursement":return t.jsx(Nt,{windowSize:h,children:t.jsx(ht,{})});case"zeni_accounts":return t.jsx(Ht,{windowSize:h,children:t.jsx(Ne,{})});case"zeni_treasury":return t.jsx(Jt,{windowSize:h,children:t.jsx(pt,{})});case"charge_cards":default:return t.jsx(qt,{windowSize:h,children:t.jsx(ut,{})})}},Ct=({allBankAccounts:e,setupView:h,connectedAccountProvider:H,onFetchLinkTokenClick:R,onUpdatePaymentAccountStatus:_,onEstablishConnectionClick:P,onEstablishConnectionSuccess:M})=>{const C=ve(),c=je(),f=ze().analytics,{trigger:w,formState:{errors:V}}=at(),{plaidConnectionDetails:U,allFundingAccounts:a,primaryFundingAccount:o,productType:l}=h,m=U.link_account,b=U.update_account,[u,A]=r.useState(void 0),[q,v]=r.useState(!1),W=()=>{v(!0)},d=u==="update_account"?b:m,[S,L]=r.useState(d.linkToken??null),[$,z]=r.useState(!1),g=m.fetchStatus.fetchState==="In-Progress"||m.updateStatus.fetchState==="In-Progress";let p,E,s,j=!1;o!=null&&(o.accType==="depositAccount"?p={code:"verified",name:"Verified"}:(p=o.providerVerificationStatus,E=o?.institutionDetails,s=p?.code,j=o?.isLoginRequired??!1));const Y=G(m.updateStatus.fetchState),Q=G(b.updateStatus.fetchState),ee=G(b.fetchStatus.fetchState),O=C.mode==="light"?new fe(C.colors.brandColorJadeLight):new fe(C.colors.brandColorJadeDark),X=r.useCallback((x,K)=>{f.trackConnectBankSuccess(l,"Settings");const Le=K.accounts.find(Xe=>Xe.id===o?.providerAccountId)??K.accounts[0];o?.id!=null&&u==="update_account"&&Le?.verification_status!=null&&!j?_(Le?.verification_status,o.id,"update_account",y(l),l):P(x,y(l),l),A(void 0),z(!1)},[f,l,o?.id,o?.providerAccountId,u,j,_,P]),te=r.useCallback((x,K)=>{x!=null&&(f.trackConnectBankFailure(l,x.error_code+" "+x.error_message,"Settings"),x.error_code==="TOO_MANY_VERIFICATION_ATTEMPTS"&&o?.id!=null&&_("verification_failed",o.id,"update_account",y(l),l),console.log("Plaid Connection Error",x,K)),A(void 0),z(!1)},[f,l,o?.id,_]),{open:Z,ready:ue}=Te({token:S,onSuccess:X,onExit:te});r.useEffect(()=>{(Y==="In-Progress"&&m.updateStatus.fetchState==="Completed"||Q==="In-Progress"&&b.updateStatus.fetchState==="Completed")&&(J.isVerifiedPaymentAccountProviderStatusCode(s??"")||(R("link_account",y(l)),M(y(l),l)))},[m.updateStatus.fetchState,M,R,o?.providerVerificationStatus?.code,o?.id,Y,Q,b.updateStatus.fetchState,s,l]),r.useEffect(()=>{(J.isVerifiedStatusCode(s??"")||s==="verification_failed")&&!$&&u!=null&&d.linkToken===S&&d.fetchStatus.fetchState==="Completed"&&ue&&z(!0)},[ue,S,d.fetchStatus.fetchState,d.linkToken,s,u,$]);const oe=$e(bt,"primaryAccountSection"),B=ct(V,oe);r.useEffect(()=>{d.fetchStatus.fetchState==="Completed"&&d.linkToken!=null&&d.linkToken!==S&&L(d.linkToken)},[d.fetchStatus.fetchState,d.linkToken,S]),r.useEffect(()=>{$&&Z()},[$,Z]),r.useEffect(()=>{!o?.zeniAccountId&&!B&&w(oe)},[o?.id]),r.useEffect(()=>{(s==null||s==="verification_failed"||s==="verification_expired"||J.isVerifiedStatusCode(s))&&(J.zeniDate(new Date().toISOString()).isAfter(m.expiration)||m.linkToken==null)&&R("link_account",y(l))},[]);const ne=()=>{f.trackConnectBankGetBalance(l,"Settings"),A("update_account"),R("update_account",y(l),o?.id)},ae=`${o?.accountSubType?.name!=null?o?.accountSubType?.name.substring(0,1).toUpperCase().concat(o?.accountSubType?.name.substring(1)):""} ${o?.maskedAccountNumber??""}`.trim(),pe=E?.zeniInstitutionId.toLowerCase()==="chase",Je=a.findIndex(x=>x.id===o?.id),Ge={element:t.jsx(Ne,{width:T.iconWidthHeight.valuePx(c)}),color:O};return t.jsxs(At,{windowSize:c,children:[q===!0?_e.createPortal(t.jsx(Pe,{connectedAccountProvider:H,action:{onBackClick:()=>v(!1)}}),document.body):null,t.jsxs(jt,{windowSize:c,wrapperWidth:N[0].width,children:[t.jsx(Tt,{windowSize:c,isDarkMode:C.mode==="dark",children:t.jsx($t,{productType:l,windowSize:c})}),t.jsx(zt,{children:Oe.productNameByType[l]})]}),t.jsx(_t,{windowSize:c,wrapperWidth:N[1].width,children:t.jsxs(Bt,{windowSize:c,children:[o!=null&&c!=="small"?t.jsx(Ot,{isDisabled:j,children:wt(Ge,c,C.mode==="dark",o,Je,!1)}):null,t.jsxs(Ft,{windowSize:c,className:"fundingAccount",children:[t.jsx(He,{style:{display:c==="small"?"block":"inherit",width:"-webkit-fill-available",color:C.colors.hero},customStyleConfig:{menu:()=>({width:c==="small"?"auto":510})},controlProperty:{controlHeight:k[4],fontWeight:Ee.medium,highlightOnHover:!1,leftRightMargin:!1,fieldWidth:c==="small"?240:300},customPlaceholder:{color:C.colors.hero,weight:Ee.medium},name:$e(l,"primaryAccountSection"),placeholder:Be.selectAccountPlaceholder,capitalizeOptions:!0,appendSublabel:!1,showLogoInSingleValue:!1,isClearable:!1,maxMenuHeight:220,valueToLogo:(x,K)=>st(a,x,K),valueToSubLabels:(x,K)=>lt(a,x,K,!1),defaultValue:{selectedOption:o?.id,allOptions:a.map(x=>({label:x.label,value:x.id,isRecommended:x.accType==="depositAccount"}))},textAlignment:"left",showDownChevronIcon:!0,showTickIcon:!1,isOptionRemovable:!1,registerOptions:{required:!1},showCreateOption:!0,showEmptyState:!1,isDisabled:g?"disabled":void 0,showLoadingIcon:g,onClickCreateOption:()=>{f.trackConnectBank(l,"Settings"),A("link_account"),m.linkToken==null||J.zeniDate(new Date().toISOString()).isAfter(m.expiration)?R("link_account",y(l)):S!==m.linkToken?L(m.linkToken):$?Z():z(!0)}}),t.jsxs(Pt,{isDisabled:j,children:[ae?t.jsxs(t.Fragment,{children:[t.jsx(It,{children:ae}),c!=="small"&&(s!=="verification_failed"&&o?.providerVerificationStatus?.code==="pending_manual_verification"||j||pe)?t.jsx(Et,{}):null]}):null,c==="small"&&p!=null?t.jsx(ge,{style:{width:"max-content",padding:i.sp0,marginLeft:i.sp2},tagTitle:p.name,textColor:we(p.code)}):null,s!=="verification_failed"&&o?.providerVerificationStatus?.code==="pending_manual_verification"||j||pe?t.jsx(Ie,{productType:l,isUpdateLinkClicked:u==="update_account",isLoginRequired:j,isPendingVerification:s!=="verification_failed"&&o?.providerVerificationStatus?.code==="pending_manual_verification",fetchAndUpdateStatues:{fetchStatus:b.fetchStatus,updateStatus:b.updateStatus,linkFetchStatus:m.fetchStatus,linkUpdateStatus:m.updateStatus,prevFetchState:ee,prevUpdateState:Q},onUpdateLinkTokenClick:ne,onChaseInfoClick:W}):null]})]}),c==="small"?t.jsxs(Mt,{children:[o?.accountBalance?.available?t.jsx(Fe,{className:"balanceLabel",children:Se("0,0[.]00",o?.accountBalance?.available)}):t.jsx(be,{children:ke}),o?.accountBalance?.lastRefreshTime?t.jsx(Re,{className:"balanceLabel",children:xe(o?.accountBalance?.lastRefreshTime)}):o?.balanceFetchStatus.fetchState==="In-Progress"?t.jsx(se,{size:"Small",start:!0}):null]}):null]})}),t.jsxs(Ut,{windowSize:c,isDisabled:j,wrapperWidth:N[2].width,onClick:x=>x.stopPropagation(),"data-testid":rt("bank-account-section",l),className:"qboLinkAcc",children:[c==="small"?t.jsx(Lt,{children:Oe.bankConnectionHeader.linkAccount}):null,t.jsx(Wt,{isDisabled:j?"disabled":void 0,name:$e(l,"bankAccountSection"),placeholder:Be.zeniCashAccountPlaceholder,defaultValue:{selectedOption:o?.zeniAccountId??"",allOptions:e.map(x=>({label:x.accountName,value:x.accountId}))},controlProperty:{highlightOnHover:!0},isOptionRemovable:!1,textAlignment:"left",registerOptions:{required:!1},style:{width:c==="small"?"calc(100% - 135px)":"100%",marginLeft:c==="small"?i.sp0:`-${i.sp3}`}})]}),c!=="small"?t.jsx(Vt,{windowSize:c,wrapperWidth:N[3].width,children:p!=null?t.jsx(ge,{style:{width:"max-content",padding:0},tagTitle:p.name,textColor:we(p.code)}):t.jsx(be,{children:ke})}):null,c!=="small"?t.jsxs(Rt,{windowSize:c,wrapperWidth:N[4].width,children:[o?.accountBalance?.available?t.jsx(Fe,{className:"balanceLabel",children:Se("0,0[.]00",o?.accountBalance?.available)}):t.jsx(be,{children:ke}),o?.accountBalance?.lastRefreshTime?t.jsx(Re,{className:"balanceLabel",children:xe(o?.accountBalance?.lastRefreshTime)}):o?.balanceFetchStatus.fetchState==="In-Progress"?t.jsx(se,{size:"Small",start:!0}):null]}):null]})},At=n.div`
2
2
  display: flex;
3
3
  flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
4
4
  align-items: ${e=>e.windowSize==="small"?"flex-start":"center"};
@@ -38,19 +38,19 @@ import{u as ve,e as je,a as Xe,c9 as Ye,j as t,aW as Qe,B as re,o as i,p as se,b
38
38
  display: flex;
39
39
  flex-direction: column;
40
40
  width: ${e=>e.wrapperWidth.valuePercentage(e.windowSize)};
41
- `,Pt=n(B)`
41
+ `,Pt=n(F)`
42
42
  display: flex;
43
43
  align-items: center;
44
44
  color: ${e=>e.isDisabled?e.theme.colors.grey1:"inherit"};
45
45
  flex-wrap: wrap;
46
46
  `,It=n.div`
47
47
  display: flex;
48
- `,Be=n(D)`
48
+ `,Fe=n(D)`
49
49
  display: flex;
50
50
  justify-content: flex-end;
51
- `,Re=n(B)`
51
+ `,Re=n(F)`
52
52
  color: ${e=>e.theme.colors.hero};
53
- `,Lt=n(B)`
53
+ `,Lt=n(F)`
54
54
  color: ${e=>e.theme.colors.grey1};
55
55
  width: 135px;
56
56
  `,Et=n.div`
@@ -64,10 +64,10 @@ import{u as ve,e as je,a as Xe,c9 as Ye,j as t,aW as Qe,B as re,o as i,p as se,b
64
64
  `,Ot=n.div`
65
65
  display: flex;
66
66
  opacity: ${e=>e.isDisabled?.8:1};
67
- `,Ft=n.div`
67
+ `,Bt=n.div`
68
68
  display: flex;
69
69
  justify-content: flex-start;
70
- `,Bt=n.div`
70
+ `,Ft=n.div`
71
71
  display: flex;
72
72
  flex-direction: column;
73
73
  width: ${e=>e.windowSize==="small"?"64%":"100%"};
@@ -83,15 +83,15 @@ import{u as ve,e as je,a as Xe,c9 as Ye,j as t,aW as Qe,B as re,o as i,p as se,b
83
83
  align-items: flex-end;
84
84
  justify-content: center;
85
85
  width: 36%;
86
- `,Ut=n.div`
87
- width: ${e=>e.wrapperWidth.valuePercentage(e.windowSize)};
88
86
  `,Vt=n.div`
87
+ width: ${e=>e.wrapperWidth.valuePercentage(e.windowSize)};
88
+ `,Ut=n.div`
89
89
  display: flex;
90
90
  align-items: center;
91
91
  opacity: ${e=>e.isDisabled?.4:1};
92
92
  width: ${e=>e.wrapperWidth.valuePercentage(e.windowSize)};
93
93
  margin-top: ${e=>T.linkAccountContainerMarginTop.valuePx(e.windowSize)};
94
- `,Wt=n(qe)`
94
+ `,Wt=n(He)`
95
95
  border-radius: ${i.sp2};
96
96
  border: 1px solid ${e=>e.theme.colors.grey3};
97
97
  color: ${e=>e.theme.colors.hero};
@@ -116,7 +116,7 @@ import{u as ve,e as je,a as Xe,c9 as Ye,j as t,aW as Qe,B as re,o as i,p as se,b
116
116
  width: 100%;
117
117
  height: 100%;
118
118
  }
119
- `,qt=n.div`
119
+ `,Ht=n.div`
120
120
  width: ${e=>T.productTypeIconSize.valuePx(e.windowSize)};
121
121
  height: ${e=>T.productTypeIconSize.valuePx(e.windowSize)};
122
122
  display: flex;
@@ -126,7 +126,7 @@ import{u as ve,e as je,a as Xe,c9 as Ye,j as t,aW as Qe,B as re,o as i,p as se,b
126
126
  width: 100%;
127
127
  height: 100%;
128
128
  }
129
- `,Ht=n.div`
129
+ `,qt=n.div`
130
130
  width: ${e=>T.productTypeIconSize.valuePx(e.windowSize)};
131
131
  height: ${e=>T.productTypeIconSize.valuePx(e.windowSize)};
132
132
  display: flex;
@@ -146,7 +146,7 @@ import{u as ve,e as je,a as Xe,c9 as Ye,j as t,aW as Qe,B as re,o as i,p as se,b
146
146
  width: 100%;
147
147
  height: 100%;
148
148
  }
149
- `,$e=(e,h)=>`${e}.${h}`,y=e=>{switch(e){case"zeni_accounts":return"account_setup";case"bill_pay":return"bill_pay_setup";case"charge_cards":return"charge_card_setup";case"reimbursement":return"reimbursement_setup";case"zeni_treasury":return"treasury_setup";case"other_connection":return"other_connection_setup"}},{common:{settings:Ce,strings:{empty:Gt,hyphen:Kt}}}=re.getLocalizedStrings(),he={paymentAccountIconSize:new I(k[6],k[7])},Xt=()=>null,Yt=({paymentAccount:e,bankAccountList:h,balanceFetchStatus:q,connectedAccountProvider:R,onRemoveConnection:_,onFetchLinkTokenClick:P,onEstablishConnectionClick:M,onEstablishConnectionSuccess:C,onUpdatePaymentAccountStatus:c})=>{const f=ve(),w=je(),U=ze().analytics,[V,a]=r.useState(!1),[o,l]=r.useState(!1),m=()=>{l(!0)},b=e.plaidConnectionDetails.link_account,u=e.plaidConnectionDetails.update_account,[A,H]=r.useState(void 0),v=A==="update_account"?u:b,[W,d]=r.useState(v.linkToken??null),[S,L]=r.useState(!1),$=G(b.updateStatus.fetchState),z=G(u.updateStatus.fetchState),g=G(u.fetchStatus.fetchState),p=e?.providerVerificationStatus,E=e?.isLoginRequired??!1,s="other_connection",j=p?.code,Y=r.useCallback((F,ne)=>{U.trackConnectBankSuccess(s,"Settings");const ae=ne.accounts.find(pe=>pe.id===e.providerAccountId)??ne.accounts[0];e.paymentAccountId!=null&&A==="update_account"&&ae?.verification_status!=null&&!E?c(ae?.verification_status,e.paymentAccountId,"update_account",y(s),s):M(F,y(s),s),H(void 0),L(!1)},[U,s,e.paymentAccountId,e.providerAccountId,A,E,c,M]),Q=r.useCallback((F,ne)=>{F!=null&&(U.trackConnectBankFailure(s,F.error_code+" "+F.error_message,"Settings"),F.error_code==="TOO_MANY_VERIFICATION_ATTEMPTS"&&e.paymentAccountId!=null&&c("verification_failed",e.paymentAccountId,"update_account",y(s),s),console.log("Plaid Connection Error",F,ne)),H(void 0),L(!1)},[U,s,e.paymentAccountId,c]),{open:ee,ready:O}=Te({token:W,onSuccess:Y,onExit:Q});r.useEffect(()=>{v.fetchStatus.fetchState==="Completed"&&v.linkToken!=null&&v.linkToken!==W&&d(v.linkToken)},[v.fetchStatus.fetchState,v.linkToken,W]),r.useEffect(()=>{S&&ee()},[S,ee]),r.useEffect(()=>{($==="In-Progress"&&b.updateStatus.fetchState==="Completed"||z==="In-Progress"&&u.updateStatus.fetchState==="Completed")&&(J.isVerifiedStatusCode(j??"")||(P("link_account",y(s)),C(y(s),s)))},[b.updateStatus.fetchState,C,P,e?.providerVerificationStatus?.code,e?.paymentAccountId,$,z,u.updateStatus.fetchState,j,s]),r.useEffect(()=>{(J.isVerifiedStatusCode(j??"")||j==="verification_failed")&&!S&&A!=null&&v.linkToken===W&&v.fetchStatus.fetchState==="Completed"&&O&&L(!0)},[O,W,v.fetchStatus.fetchState,v.linkToken,j,A,S]);const K=()=>{U.trackConnectBankGetBalance(s,"Settings"),H("update_account"),P("update_account",y(s),e.paymentAccountId)},te=f.mode==="light"?new fe(f.colors.brandColorJadeLight):new fe(f.colors.brandColorJadeDark),Z={element:t.jsx(dn,{windowSize:w,children:t.jsx(gt,{})}),color:te},ue=h.find(F=>F.accountId===e.zeniAccountId),oe=()=>{a(F=>!F)};return t.jsxs(Qt,{onMouseEnter:oe,onMouseLeave:oe,children:[o===!0?Ie.createPortal(t.jsx(_e,{connectedAccountProvider:R,action:{onBackClick:()=>l(!1)}}),document.body):null,t.jsxs(Zt,{windowSize:w,wrapperWidth:N[0].width,children:[t.jsx(en,{children:Ce.otherAccount.title}),t.jsx(tn,{children:Ce.otherAccount.subTitle})]}),t.jsxs(nn,{windowSize:w,wrapperWidth:N[1].width,children:[wt(Z,w,f.mode==="dark",e,!0),t.jsxs(un,{children:[t.jsx(pn,{children:t.jsx(gn,{windowSize:w,children:e.institutionDetails.institutionName})}),t.jsxs(hn,{windowSize:w,children:[t.jsxs(wn,{children:[t.jsx(mn,{children:e.accountSubType?.name}),t.jsx(fn,{children:e.maskedAccountNumber}),E&&t.jsx(Sn,{})]}),E&&t.jsx(Pe,{productType:"other_connection",isUpdateLinkClicked:A==="update_account",isLoginRequired:E,isPendingVerification:!1,fetchAndUpdateStatues:{fetchStatus:u.fetchStatus,updateStatus:u.updateStatus,linkFetchStatus:b.fetchStatus,linkUpdateStatus:b.updateStatus,prevFetchState:g,prevUpdateState:z},onUpdateLinkTokenClick:K,onChaseInfoClick:m})]})]})]}),t.jsx(on,{windowSize:w,wrapperWidth:N[2].width,children:ue?.accountName??Gt}),t.jsx(an,{windowSize:w,wrapperWidth:N[3].width,children:p!=null?t.jsx(ge,{style:{width:"max-content",padding:0,marginTop:i.sp2},tagTitle:p.name,textColor:we(p.code)}):Kt}),t.jsxs(cn,{windowSize:w,wrapperWidth:N[4].width,children:[t.jsx(ln,{className:"balanceLabel",isRemoveHovered:V,children:Se("0,0.[00]",e.balances?.available)}),e.balances?.lastRefreshTime?t.jsx(sn,{className:"balanceLabel",isRemoveHovered:V,children:xe(e.balances?.lastRefreshTime)}):q?.fetchState==="In-Progress"?t.jsx(se,{size:"Small",start:!0}):null,V&&t.jsx(rn,{children:t.jsx(He,{moreIconType:"plain",options:[{label:Ce.otherAccount.remove,value:"remove"}],customStyleConfig:{valueContainer:()=>({height:i.sp3,".more-icon":{width:i.sp3,height:i.sp3,color:f.colors.primary}}),container:()=>({marginLeft:i.sp0,position:"relative"}),control:()=>({background:"transparent"}),menu:()=>({position:"absolute",right:0,borderRadius:i.sp1,marginTop:i.sp2,background:f.colors.grey5,width:"162px",border:`1px solid ${f.colors.grey3}`,boxShadow:`${i.sp0} 1px 2px ${i.sp0} ${ie.boxShadowElevation}`}),option:()=>({height:i.sp6,paddingLeft:i.sp3,paddingRight:i.sp3,display:"flex",alignItems:"center",color:ie.important,":hover":{color:ie.important,backgroundColor:f.colors.background}})},menuPlacement:"bottom",onOptionSelection:F=>{F==="remove"&&_(e.paymentAccountId)},valueToIcon:Xt})})]})]})},Qt=n.div`
149
+ `,$e=(e,h)=>`${e}.${h}`,y=e=>{switch(e){case"zeni_accounts":return"account_setup";case"bill_pay":return"bill_pay_setup";case"charge_cards":return"charge_card_setup";case"reimbursement":return"reimbursement_setup";case"zeni_treasury":return"treasury_setup";case"other_connection":return"other_connection_setup"}},{common:{settings:Ce,strings:{empty:Gt,hyphen:Xt}}}=re.getLocalizedStrings(),he={paymentAccountIconSize:new I(k[6],k[7])},Kt=()=>null,Yt=({paymentAccount:e,bankAccountList:h,balanceFetchStatus:H,connectedAccountProvider:R,onRemoveConnection:_,onFetchLinkTokenClick:P,onEstablishConnectionClick:M,onEstablishConnectionSuccess:C,onUpdatePaymentAccountStatus:c})=>{const f=ve(),w=je(),V=ze().analytics,[U,a]=r.useState(!1),[o,l]=r.useState(!1),m=()=>{l(!0)},b=e.plaidConnectionDetails.link_account,u=e.plaidConnectionDetails.update_account,[A,q]=r.useState(void 0),v=A==="update_account"?u:b,[W,d]=r.useState(v.linkToken??null),[S,L]=r.useState(!1),$=G(b.updateStatus.fetchState),z=G(u.updateStatus.fetchState),g=G(u.fetchStatus.fetchState),p=e?.providerVerificationStatus,E=e?.isLoginRequired??!1,s="other_connection",j=p?.code,Y=r.useCallback((B,ne)=>{V.trackConnectBankSuccess(s,"Settings");const ae=ne.accounts.find(pe=>pe.id===e.providerAccountId)??ne.accounts[0];e.paymentAccountId!=null&&A==="update_account"&&ae?.verification_status!=null&&!E?c(ae?.verification_status,e.paymentAccountId,"update_account",y(s),s):M(B,y(s),s),q(void 0),L(!1)},[V,s,e.paymentAccountId,e.providerAccountId,A,E,c,M]),Q=r.useCallback((B,ne)=>{B!=null&&(V.trackConnectBankFailure(s,B.error_code+" "+B.error_message,"Settings"),B.error_code==="TOO_MANY_VERIFICATION_ATTEMPTS"&&e.paymentAccountId!=null&&c("verification_failed",e.paymentAccountId,"update_account",y(s),s),console.log("Plaid Connection Error",B,ne)),q(void 0),L(!1)},[V,s,e.paymentAccountId,c]),{open:ee,ready:O}=Te({token:W,onSuccess:Y,onExit:Q});r.useEffect(()=>{v.fetchStatus.fetchState==="Completed"&&v.linkToken!=null&&v.linkToken!==W&&d(v.linkToken)},[v.fetchStatus.fetchState,v.linkToken,W]),r.useEffect(()=>{S&&ee()},[S,ee]),r.useEffect(()=>{($==="In-Progress"&&b.updateStatus.fetchState==="Completed"||z==="In-Progress"&&u.updateStatus.fetchState==="Completed")&&(J.isVerifiedStatusCode(j??"")||(P("link_account",y(s)),C(y(s),s)))},[b.updateStatus.fetchState,C,P,e?.providerVerificationStatus?.code,e?.paymentAccountId,$,z,u.updateStatus.fetchState,j,s]),r.useEffect(()=>{(J.isVerifiedStatusCode(j??"")||j==="verification_failed")&&!S&&A!=null&&v.linkToken===W&&v.fetchStatus.fetchState==="Completed"&&O&&L(!0)},[O,W,v.fetchStatus.fetchState,v.linkToken,j,A,S]);const X=()=>{V.trackConnectBankGetBalance(s,"Settings"),q("update_account"),P("update_account",y(s),e.paymentAccountId)},te=f.mode==="light"?new fe(f.colors.brandColorJadeLight):new fe(f.colors.brandColorJadeDark),Z={element:t.jsx(dn,{windowSize:w,children:t.jsx(ft,{})}),color:te},ue=h.find(B=>B.accountId===e.zeniAccountId),oe=()=>{a(B=>!B)};return t.jsxs(Qt,{onMouseEnter:oe,onMouseLeave:oe,children:[o===!0?_e.createPortal(t.jsx(Pe,{connectedAccountProvider:R,action:{onBackClick:()=>l(!1)}}),document.body):null,t.jsxs(Zt,{windowSize:w,wrapperWidth:N[0].width,children:[t.jsx(en,{children:Ce.otherAccount.title}),t.jsx(tn,{children:Ce.otherAccount.subTitle})]}),t.jsxs(nn,{windowSize:w,wrapperWidth:N[1].width,children:[gt(Z,w,f.mode==="dark",e,!0),t.jsxs(un,{children:[t.jsx(pn,{children:t.jsx(gn,{windowSize:w,children:e.institutionDetails.institutionName})}),t.jsxs(hn,{windowSize:w,children:[t.jsxs(wn,{children:[t.jsx(mn,{children:e.accountSubType?.name}),t.jsx(fn,{children:e.maskedAccountNumber}),E&&t.jsx(Sn,{})]}),E&&t.jsx(Ie,{productType:"other_connection",isUpdateLinkClicked:A==="update_account",isLoginRequired:E,isPendingVerification:!1,fetchAndUpdateStatues:{fetchStatus:u.fetchStatus,updateStatus:u.updateStatus,linkFetchStatus:b.fetchStatus,linkUpdateStatus:b.updateStatus,prevFetchState:g,prevUpdateState:z},onUpdateLinkTokenClick:X,onChaseInfoClick:m})]})]})]}),t.jsx(on,{windowSize:w,wrapperWidth:N[2].width,children:ue?.accountName??Gt}),t.jsx(an,{windowSize:w,wrapperWidth:N[3].width,children:p!=null?t.jsx(ge,{style:{width:"max-content",padding:0,marginTop:i.sp2},tagTitle:p.name,textColor:we(p.code)}):Xt}),t.jsxs(cn,{windowSize:w,wrapperWidth:N[4].width,children:[t.jsx(ln,{className:"balanceLabel",isRemoveHovered:U,children:Se("0,0.[00]",e.balances?.available)}),e.balances?.lastRefreshTime?t.jsx(sn,{className:"balanceLabel",isRemoveHovered:U,children:xe(e.balances?.lastRefreshTime)}):H?.fetchState==="In-Progress"?t.jsx(se,{size:"Small",start:!0}):null,U&&t.jsx(rn,{children:t.jsx(qe,{moreIconType:"plain",options:[{label:Ce.otherAccount.remove,value:"remove"}],customStyleConfig:{valueContainer:()=>({height:i.sp3,".more-icon":{width:i.sp3,height:i.sp3,color:f.colors.primary}}),container:()=>({marginLeft:i.sp0,position:"relative"}),control:()=>({background:"transparent"}),menu:()=>({position:"absolute",right:0,borderRadius:i.sp1,marginTop:i.sp2,background:f.colors.grey5,width:"162px",border:`1px solid ${f.colors.grey3}`,boxShadow:`${i.sp0} 1px 2px ${i.sp0} ${ie.boxShadowElevation}`}),option:()=>({height:i.sp6,paddingLeft:i.sp3,paddingRight:i.sp3,display:"flex",alignItems:"center",color:ie.important,":hover":{color:ie.important,backgroundColor:f.colors.background}})},menuPlacement:"bottom",onOptionSelection:B=>{B==="remove"&&_(e.paymentAccountId)},valueToIcon:Kt})})]})]})},Qt=n.div`
150
150
  display: flex;
151
151
  padding: ${i.sp4};
152
152
  padding-right: ${i.sp8};
@@ -161,7 +161,7 @@ import{u as ve,e as je,a as Xe,c9 as Ye,j as t,aW as Qe,B as re,o as i,p as se,b
161
161
  color: ${e=>e.theme.colors.grey1};
162
162
  display: flex;
163
163
  align-items: center;
164
- `,tn=n(B)`
164
+ `,tn=n(F)`
165
165
  color: ${e=>e.theme.colors.grey1};
166
166
  display: flex;
167
167
  align-items: center;
@@ -185,7 +185,7 @@ import{u as ve,e as je,a as Xe,c9 as Ye,j as t,aW as Qe,B as re,o as i,p as se,b
185
185
  align-items: flex-end;
186
186
  `,ln=n(D)`
187
187
  color: ${e=>e.theme.colors.hero};
188
- `,sn=n(B)`
188
+ `,sn=n(F)`
189
189
  color: ${e=>e.theme.colors.hero};
190
190
  `,rn=n.div`
191
191
  position: absolute;
@@ -210,10 +210,10 @@ import{u as ve,e as je,a as Xe,c9 as Ye,j as t,aW as Qe,B as re,o as i,p as se,b
210
210
  display: flex;
211
211
  flex-direction: ${e=>e.windowSize==="large"||e.windowSize==="extra-large"?"row":"column"};
212
212
  align-items: ${e=>e.windowSize==="large"||e.windowSize==="extra-large"?"center":"start"};
213
- `,mn=n(B)`
213
+ `,mn=n(F)`
214
214
  text-transform: capitalize;
215
215
  color: inherit;
216
- `,fn=n(B)`
216
+ `,fn=n(F)`
217
217
  margin-left: ${i.sp1};
218
218
  `,gn=n(D)`
219
219
  max-width: ${`calc(100% - ${i.sp3})`};
@@ -230,7 +230,7 @@ import{u as ve,e as je,a as Xe,c9 as Ye,j as t,aW as Qe,B as re,o as i,p as se,b
230
230
  height: ${i.sp1};
231
231
  cursor: inherit;
232
232
  background-color: ${e=>e.theme.colors.grey1};
233
- `,{common:{settings:me,strings:{empty:xn}}}=re.getLocalizedStrings(),yn=()=>null,vn=({paymentAccount:e,bankAccountList:h,balanceFetchStatus:q,connectedAccountProvider:R,onRemoveConnection:_,onFetchLinkTokenClick:P,onEstablishConnectionClick:M,onEstablishConnectionSuccess:C,onUpdatePaymentAccountStatus:c})=>{const f=ve(),w=ze().analytics,[U,V]=r.useState(!1),a=()=>{V(!0)},o=e.plaidConnectionDetails.link_account,l=e.plaidConnectionDetails.update_account,[m,b]=r.useState(void 0),u=m==="update_account"?l:o,[A,H]=r.useState(u.linkToken??null),[v,W]=r.useState(!1),d=G(o.updateStatus.fetchState),S=G(l.updateStatus.fetchState),L=G(l.fetchStatus.fetchState),$=e?.providerVerificationStatus,z=e?.isLoginRequired??!1,g="other_connection",p=$?.code,E=r.useCallback((O,K)=>{w.trackConnectBankSuccess(g,"Settings");const te=K.accounts.find(Z=>Z.id===e.providerAccountId)??K.accounts[0];e.paymentAccountId!=null&&m==="update_account"&&te?.verification_status!=null&&!z?c(te?.verification_status,e.paymentAccountId,"update_account",y(g),g):M(O,y(g),g),b(void 0),W(!1)},[w,g,e.paymentAccountId,e.providerAccountId,m,z,c,M]),s=r.useCallback((O,K)=>{O!=null&&(w.trackConnectBankFailure(g,O.error_code+" "+O.error_message,"Settings"),O.error_code==="TOO_MANY_VERIFICATION_ATTEMPTS"&&e.paymentAccountId!=null&&c("verification_failed",e.paymentAccountId,"update_account",y(g),g),console.log("Plaid Connection Error",O,K)),b(void 0),W(!1)},[w,g,e.paymentAccountId,c]),{open:j,ready:Y}=Te({token:A,onSuccess:E,onExit:s});r.useEffect(()=>{u.fetchStatus.fetchState==="Completed"&&u.linkToken!=null&&u.linkToken!==A&&H(u.linkToken)},[u.fetchStatus.fetchState,u.linkToken,A]),r.useEffect(()=>{v&&j()},[v,j]),r.useEffect(()=>{(d==="In-Progress"&&o.updateStatus.fetchState==="Completed"||S==="In-Progress"&&l.updateStatus.fetchState==="Completed")&&(J.isVerifiedStatusCode(p??"")||(P("link_account",y(g)),C(y(g),g)))},[o.updateStatus.fetchState,C,P,e?.providerVerificationStatus?.code,e?.paymentAccountId,d,S,l.updateStatus.fetchState,p,g]),r.useEffect(()=>{(J.isVerifiedStatusCode(p??"")||p==="verification_failed")&&!v&&m!=null&&u.linkToken===A&&u.fetchStatus.fetchState==="Completed"&&Y&&W(!0)},[Y,A,u.fetchStatus.fetchState,u.linkToken,p,m,v]);const Q=()=>{w.trackConnectBankGetBalance(g,"Settings"),b("update_account"),P("update_account",y(g),e.paymentAccountId)},ee=h.find(O=>O.accountId===e.zeniAccountId);return t.jsxs(kn,{children:[U===!0?Ie.createPortal(t.jsx(_e,{connectedAccountProvider:R,action:{onBackClick:()=>V(!1)}}),document.body):null,t.jsxs(bn,{children:[t.jsx($n,{children:`${me.otherAccount.title} ${me.otherAccount.subTitleSmall}`}),t.jsx(He,{moreIconType:"plain",options:[{label:me.otherAccount.remove,value:"remove"}],customStyleConfig:{valueContainer:()=>({height:i.sp3,".more-icon":{width:i.sp3,height:i.sp3,color:f.colors.primary}}),container:()=>({marginLeft:i.sp0,position:"relative"}),control:()=>({background:"transparent"}),menu:()=>({position:"absolute",right:0,width:"158px",border:`1px solid ${f.colors.grey3}`,boxShadow:`${i.sp0} 1px 2px ${i.sp0} ${ie.boxShadowElevation}`}),option:()=>({color:f.colors.important,":hover":{color:f.colors.important,backgroundColor:f.colors.background}})},menuPlacement:"bottom",onOptionSelection:O=>{O==="remove"&&_(e.paymentAccountId)},valueToIcon:yn})]}),t.jsxs(Cn,{children:[t.jsxs(Ln,{children:[t.jsx(En,{children:t.jsx(Bn,{children:e.institutionDetails.institutionName})}),t.jsxs(Rn,{children:[t.jsx(On,{children:e.accountSubType?.name}),t.jsx(Fn,{children:e.maskedAccountNumber}),t.jsx(Tn,{children:$!=null?t.jsx(ge,{style:{width:"max-content",padding:0},tagTitle:$.name,textColor:we($.code)}):null}),z&&t.jsx(Pe,{productType:"other_connection",isUpdateLinkClicked:m==="update_account",isLoginRequired:z,isPendingVerification:!1,fetchAndUpdateStatues:{fetchStatus:l.fetchStatus,updateStatus:l.updateStatus,linkFetchStatus:o.fetchStatus,linkUpdateStatus:o.updateStatus,prevFetchState:L,prevUpdateState:S},onUpdateLinkTokenClick:Q,onChaseInfoClick:a})]})]}),t.jsxs(_n,{children:[t.jsx(Pn,{className:"balanceLabel",children:Se("0,0.[00]",e.balances?.available)}),e.balances?.lastRefreshTime?t.jsx(In,{className:"balanceLabel",children:xe(e.balances?.lastRefreshTime)}):q?.fetchState==="In-Progress"?t.jsx(se,{size:"ExtraSmall",start:!0}):null]})]}),t.jsxs(An,{children:[t.jsx(jn,{children:me.bankConnectionHeader.linkAccount}),t.jsx(zn,{children:ee?.accountName??xn})]})]})},kn=n.div`
233
+ `,{common:{settings:me,strings:{empty:xn}}}=re.getLocalizedStrings(),yn=()=>null,vn=({paymentAccount:e,bankAccountList:h,balanceFetchStatus:H,connectedAccountProvider:R,onRemoveConnection:_,onFetchLinkTokenClick:P,onEstablishConnectionClick:M,onEstablishConnectionSuccess:C,onUpdatePaymentAccountStatus:c})=>{const f=ve(),w=ze().analytics,[V,U]=r.useState(!1),a=()=>{U(!0)},o=e.plaidConnectionDetails.link_account,l=e.plaidConnectionDetails.update_account,[m,b]=r.useState(void 0),u=m==="update_account"?l:o,[A,q]=r.useState(u.linkToken??null),[v,W]=r.useState(!1),d=G(o.updateStatus.fetchState),S=G(l.updateStatus.fetchState),L=G(l.fetchStatus.fetchState),$=e?.providerVerificationStatus,z=e?.isLoginRequired??!1,g="other_connection",p=$?.code,E=r.useCallback((O,X)=>{w.trackConnectBankSuccess(g,"Settings");const te=X.accounts.find(Z=>Z.id===e.providerAccountId)??X.accounts[0];e.paymentAccountId!=null&&m==="update_account"&&te?.verification_status!=null&&!z?c(te?.verification_status,e.paymentAccountId,"update_account",y(g),g):M(O,y(g),g),b(void 0),W(!1)},[w,g,e.paymentAccountId,e.providerAccountId,m,z,c,M]),s=r.useCallback((O,X)=>{O!=null&&(w.trackConnectBankFailure(g,O.error_code+" "+O.error_message,"Settings"),O.error_code==="TOO_MANY_VERIFICATION_ATTEMPTS"&&e.paymentAccountId!=null&&c("verification_failed",e.paymentAccountId,"update_account",y(g),g),console.log("Plaid Connection Error",O,X)),b(void 0),W(!1)},[w,g,e.paymentAccountId,c]),{open:j,ready:Y}=Te({token:A,onSuccess:E,onExit:s});r.useEffect(()=>{u.fetchStatus.fetchState==="Completed"&&u.linkToken!=null&&u.linkToken!==A&&q(u.linkToken)},[u.fetchStatus.fetchState,u.linkToken,A]),r.useEffect(()=>{v&&j()},[v,j]),r.useEffect(()=>{(d==="In-Progress"&&o.updateStatus.fetchState==="Completed"||S==="In-Progress"&&l.updateStatus.fetchState==="Completed")&&(J.isVerifiedStatusCode(p??"")||(P("link_account",y(g)),C(y(g),g)))},[o.updateStatus.fetchState,C,P,e?.providerVerificationStatus?.code,e?.paymentAccountId,d,S,l.updateStatus.fetchState,p,g]),r.useEffect(()=>{(J.isVerifiedStatusCode(p??"")||p==="verification_failed")&&!v&&m!=null&&u.linkToken===A&&u.fetchStatus.fetchState==="Completed"&&Y&&W(!0)},[Y,A,u.fetchStatus.fetchState,u.linkToken,p,m,v]);const Q=()=>{w.trackConnectBankGetBalance(g,"Settings"),b("update_account"),P("update_account",y(g),e.paymentAccountId)},ee=h.find(O=>O.accountId===e.zeniAccountId);return t.jsxs(kn,{children:[V===!0?_e.createPortal(t.jsx(Pe,{connectedAccountProvider:R,action:{onBackClick:()=>U(!1)}}),document.body):null,t.jsxs(bn,{children:[t.jsx($n,{children:`${me.otherAccount.title} ${me.otherAccount.subTitleSmall}`}),t.jsx(qe,{moreIconType:"plain",options:[{label:me.otherAccount.remove,value:"remove"}],customStyleConfig:{valueContainer:()=>({height:i.sp3,".more-icon":{width:i.sp3,height:i.sp3,color:f.colors.primary}}),container:()=>({marginLeft:i.sp0,position:"relative"}),control:()=>({background:"transparent"}),menu:()=>({position:"absolute",right:0,width:"158px",border:`1px solid ${f.colors.grey3}`,boxShadow:`${i.sp0} 1px 2px ${i.sp0} ${ie.boxShadowElevation}`}),option:()=>({color:f.colors.important,":hover":{color:f.colors.important,backgroundColor:f.colors.background}})},menuPlacement:"bottom",onOptionSelection:O=>{O==="remove"&&_(e.paymentAccountId)},valueToIcon:yn})]}),t.jsxs(Cn,{children:[t.jsxs(Ln,{children:[t.jsx(En,{children:t.jsx(Fn,{children:e.institutionDetails.institutionName})}),t.jsxs(Rn,{children:[t.jsx(On,{children:e.accountSubType?.name}),t.jsx(Bn,{children:e.maskedAccountNumber}),t.jsx(Tn,{children:$!=null?t.jsx(ge,{style:{width:"max-content",padding:0},tagTitle:$.name,textColor:we($.code)}):null}),z&&t.jsx(Ie,{productType:"other_connection",isUpdateLinkClicked:m==="update_account",isLoginRequired:z,isPendingVerification:!1,fetchAndUpdateStatues:{fetchStatus:l.fetchStatus,updateStatus:l.updateStatus,linkFetchStatus:o.fetchStatus,linkUpdateStatus:o.updateStatus,prevFetchState:L,prevUpdateState:S},onUpdateLinkTokenClick:Q,onChaseInfoClick:a})]})]}),t.jsxs(_n,{children:[t.jsx(Pn,{className:"balanceLabel",children:Se("0,0.[00]",e.balances?.available)}),e.balances?.lastRefreshTime?t.jsx(In,{className:"balanceLabel",children:xe(e.balances?.lastRefreshTime)}):H?.fetchState==="In-Progress"?t.jsx(se,{size:"ExtraSmall",start:!0}):null]})]}),t.jsxs(An,{children:[t.jsx(jn,{children:me.bankConnectionHeader.linkAccount}),t.jsx(zn,{children:ee?.accountName??xn})]})]})},kn=n.div`
234
234
  display: flex;
235
235
  flex-direction: column;
236
236
  padding: ${i.sp3};
@@ -254,10 +254,10 @@ import{u as ve,e as je,a as Xe,c9 as Ye,j as t,aW as Qe,B as re,o as i,p as se,b
254
254
  `,An=n.div`
255
255
  display: flex;
256
256
  align-items: center;
257
- `,jn=n(B)`
257
+ `,jn=n(F)`
258
258
  color: ${e=>e.theme.colors.grey1};
259
259
  margin-right: ${i.sp2};
260
- `,zn=n(B)`
260
+ `,zn=n(F)`
261
261
  color: ${e=>e.theme.colors.hero};
262
262
  `,Tn=n(D)`
263
263
  display: flex;
@@ -269,7 +269,7 @@ import{u as ve,e as je,a as Xe,c9 as Ye,j as t,aW as Qe,B as re,o as i,p as se,b
269
269
  flex-direction: column;
270
270
  `,Pn=n(D)`
271
271
  color: ${e=>e.theme.colors.hero};
272
- `,In=n(B)`
272
+ `,In=n(F)`
273
273
  color: ${e=>e.theme.colors.hero};
274
274
  `,Ln=n.div``,En=n.div`
275
275
  display: flex;
@@ -277,11 +277,11 @@ import{u as ve,e as je,a as Xe,c9 as Ye,j as t,aW as Qe,B as re,o as i,p as se,b
277
277
  align-items: center;
278
278
  white-space: nowrap;
279
279
  overflow: hidden;
280
- `,On=n(B)`
280
+ `,On=n(F)`
281
281
  text-transform: capitalize;
282
- `,Fn=n(B)`
282
+ `,Bn=n(F)`
283
283
  margin-left: ${i.sp1};
284
- `,Bn=n(D)`
284
+ `,Fn=n(D)`
285
285
  max-width: ${`calc(100% - ${i.sp3})`};
286
286
  text-transform: capitalize;
287
287
  overflow: hidden;
@@ -291,20 +291,20 @@ import{u as ve,e as je,a as Xe,c9 as Ye,j as t,aW as Qe,B as re,o as i,p as se,b
291
291
  align-items: center;
292
292
  flex-wrap: wrap;
293
293
  gap: ${i.sp2};
294
- `,{settings:{bankConnectionListHeader:Ae,title:Mn,infoText:Un}}=re.getLocalizedStrings().common,ye={pageContentPadding:new I(k[4],k[8]),subtitleSectionWidth:new I(343,580,1200),subTitleBottomMargin:new I(k[0],k[5])},Vn={qboLinkAcc:new ot("smallRegular","standardRegular")},Wn="bankConnectionsSettingsPage",ce="bankAccountSection",le="primaryAccountSection",Dn="bill_pay",Nn="reimbursement",qn="zeni_accounts",Hn="charge_cards",Jn="zeni_treasury",Me=e=>t.jsx(Xn,{children:N.map(h=>t.jsx(Yn,{actualDataValue:h.value,wrapperWidth:h.width,windowSize:e,children:t.jsx(Qn,{children:h.value})},h.value))}),Si=({bankSetupView:e,connectedAccountProvider:h,onBackClick:q,onUpdateAccountClick:R,onFetchLinkTokenClick:_,onUpdatePaymentAccountStatus:P,onUpdatePaymentAccountLoginStatus:M,onEstablishConnectionClick:C,onEstablishConnectionSuccess:c,onClickMenuIcon:f,onUpdatePrimaryFundingAccount:w,onRemoveConnection:U})=>{const V=ve(),a=je(),{allFundingAccounts:o,primaryConnection:l}=e,m=Xe({mode:"all",reValidateMode:"onChange",defaultValues:We(e),values:We(e)}),b=m.handleSubmit(d=>{}),u=async(d,S)=>{const L=d.split("."),$=L[0],z=L[1],g=l.find(p=>p.productType===$);if($!=null&&z!=null){const p=S[$][z];if(z==="primaryAccountSection"){const E=o.find(s=>s.id===p.selectedOption)?.accType;p.selectedOption!=null&&E!=null&&w(p.selectedOption,y($),E)}else if(z==="bankAccountSection"&&g!=null&&g.primaryFundingAccount!=null&&p.selectedOption!=null){const E=g.primaryFundingAccount?.id,s=g.primaryFundingAccount?.accType;E!=null&&s!=null&&R(p.selectedOption,E,$,y($),s)}}};r.useEffect(()=>{const d=m.watch((S,{name:L})=>{L!=null&&S!=null&&Ye(()=>u(L,S))});return()=>{d.unsubscribe()}});const A=e.fetchState==="In-Progress"||e.fetchState==="Not-Started",H=e.fetchState==="Completed"&&e.allFundingAccounts.length===0,v=a==="small"?vn:Yt,W=()=>A?t.jsx(ti,{children:t.jsx(se,{size:"ExtraLarge",start:!0})}):H?t.jsx(Ze,{message:"No bank connections added."}):t.jsxs(Gn,{windowSize:a,children:[t.jsx(Ve,{children:Ae.primary}),a!=="small"?Me(a):null,t.jsx(et,{...m,children:t.jsx("form",{id:li(Wn),onSubmit:b,children:t.jsx(ni,{windowSize:a,children:e.primaryConnection.map(d=>d!=null?t.jsx(Ue,{windowSize:a,children:t.jsx(Ct,{allBankAccounts:e.allBankAccounts,setupView:d,connectedAccountProvider:h,onFetchLinkTokenClick:_,onUpdatePaymentAccountStatus:P,onUpdatePaymentAccountLoginStatus:M,onEstablishConnectionClick:C,onEstablishConnectionSuccess:c})},d.productType):null)})})}),e.otherPaymentAccounts.length>0?t.jsxs(Zn,{children:[t.jsx(Ve,{children:Ae.other}),t.jsx(ai,{children:t.jsx(tt,{display:"flex",placement:"right",maxWidth:"340px",title:Ae.otherToolTip,style:{padding:`12px ${i.sp3}`},children:t.jsx(ci,{})})})]}):null,a!=="small"&&e.otherPaymentAccounts.length>0?Me(a):null,e.otherPaymentAccounts.map(d=>{const S=o.find(L=>L.id===d.paymentAccountId)?.balanceFetchStatus;return t.jsx(Ue,{windowSize:a,children:t.jsx(v,{paymentAccount:d,bankAccountList:e.allBankAccounts,balanceFetchStatus:S,connectedAccountProvider:h,onRemoveConnection:U,onFetchLinkTokenClick:_,onEstablishConnectionClick:C,onUpdatePaymentAccountStatus:P,onEstablishConnectionSuccess:c})},d.paymentAccountId)})]});return t.jsxs(Kn,{children:[t.jsx(Qe,{source:"BankConnectionsSettingsPage",title:Mn.bankConnections,backgroundColor:V.colors.grey4,style:{zIndex:3},onBackClick:q,showBackButton:!1,showMenuIcon:a==="medium-compact"||a==="small",onClickMenuIcon:f}),t.jsxs(ei,{windowSize:a,children:[t.jsx(ii,{windowSize:a,children:t.jsx(oi,{windowSize:a,children:Un.bankConnections})}),W()]})]})},Gn=n.div`
294
+ `,{settings:{bankConnectionListHeader:Ae,title:Mn,infoText:Vn}}=re.getLocalizedStrings().common,ye={pageContentPadding:new I(k[4],k[8]),subtitleSectionWidth:new I(343,580,1200),subTitleBottomMargin:new I(k[0],k[5])},Un={qboLinkAcc:new ot("smallRegular","standardRegular")},Wn="bankConnectionsSettingsPage",ce="bankAccountSection",le="primaryAccountSection",Dn="bill_pay",Nn="reimbursement",Hn="zeni_accounts",qn="charge_cards",Jn="zeni_treasury",Me=e=>t.jsx(Kn,{children:N.map(h=>t.jsx(Yn,{actualDataValue:h.value,wrapperWidth:h.width,windowSize:e,children:t.jsx(Qn,{children:h.value})},h.value))}),bi=({bankSetupView:e,connectedAccountProvider:h,onBackClick:H,onUpdateAccountClick:R,onFetchLinkTokenClick:_,onUpdatePaymentAccountStatus:P,onUpdatePaymentAccountLoginStatus:M,onEstablishConnectionClick:C,onEstablishConnectionSuccess:c,onClickMenuIcon:f,onUpdatePrimaryFundingAccount:w,onRemoveConnection:V})=>{const U=ve(),a=je(),{allFundingAccounts:o,primaryConnection:l}=e,m=Ke({mode:"all",reValidateMode:"onChange",defaultValues:We(e),values:We(e)}),b=m.handleSubmit(d=>{}),u=async(d,S)=>{const L=d.split("."),$=L[0],z=L[1],g=l.find(p=>p.productType===$);if($!=null&&z!=null){const p=S[$][z];if(z==="primaryAccountSection"){const E=o.find(s=>s.id===p.selectedOption)?.accType;p.selectedOption!=null&&E!=null&&w(p.selectedOption,y($),E)}else if(z==="bankAccountSection"&&g!=null&&g.primaryFundingAccount!=null&&p.selectedOption!=null){const E=g.primaryFundingAccount?.id,s=g.primaryFundingAccount?.accType;E!=null&&s!=null&&R(p.selectedOption,E,$,y($),s)}}};r.useEffect(()=>{const d=m.watch((S,{name:L})=>{L!=null&&S!=null&&Ye(()=>u(L,S))});return()=>{d.unsubscribe()}});const A=e.fetchState==="In-Progress"||e.fetchState==="Not-Started",q=e.fetchState==="Completed"&&e.allFundingAccounts.length===0,v=a==="small"?vn:Yt,W=()=>A?t.jsx(ti,{children:t.jsx(se,{size:"ExtraLarge",start:!0})}):q?t.jsx(Ze,{message:"No bank connections added."}):t.jsxs(Gn,{windowSize:a,children:[t.jsx(Ue,{children:Ae.primary}),a!=="small"?Me(a):null,t.jsx(et,{...m,children:t.jsx("form",{id:li(Wn),onSubmit:b,children:t.jsx(ni,{windowSize:a,children:e.primaryConnection.map(d=>d!=null?t.jsx(Ve,{windowSize:a,children:t.jsx(Ct,{allBankAccounts:e.allBankAccounts,setupView:d,connectedAccountProvider:h,onFetchLinkTokenClick:_,onUpdatePaymentAccountStatus:P,onUpdatePaymentAccountLoginStatus:M,onEstablishConnectionClick:C,onEstablishConnectionSuccess:c})},d.productType):null)})})}),e.otherPaymentAccounts.length>0?t.jsxs(Zn,{children:[t.jsx(Ue,{children:Ae.other}),t.jsx(ai,{children:t.jsx(tt,{display:"flex",placement:"right",maxWidth:"340px",title:Ae.otherToolTip,style:{padding:`12px ${i.sp3}`},children:t.jsx(ci,{})})})]}):null,a!=="small"&&e.otherPaymentAccounts.length>0?Me(a):null,e.otherPaymentAccounts.map(d=>{const S=o.find(L=>L.id===d.paymentAccountId)?.balanceFetchStatus;return t.jsx(Ve,{windowSize:a,children:t.jsx(v,{paymentAccount:d,bankAccountList:e.allBankAccounts,balanceFetchStatus:S,connectedAccountProvider:h,onRemoveConnection:V,onFetchLinkTokenClick:_,onEstablishConnectionClick:C,onUpdatePaymentAccountStatus:P,onEstablishConnectionSuccess:c})},d.paymentAccountId)})]});return t.jsxs(Xn,{children:[t.jsx(Qe,{source:"BankConnectionsSettingsPage",title:Mn.bankConnections,backgroundColor:U.colors.grey4,style:{zIndex:3},onBackClick:H,showBackButton:!1,showMenuIcon:a==="medium-compact"||a==="small",onClickMenuIcon:f}),t.jsxs(ei,{windowSize:a,children:[t.jsx(ii,{windowSize:a,children:t.jsx(oi,{windowSize:a,children:Vn.bankConnections})}),W()]})]})},Gn=n.div`
295
295
  display: flex;
296
296
  flex-direction: column;
297
297
  width: 100%;
298
298
  padding-left: ${e=>ye.pageContentPadding.valuePx(e.windowSize)};
299
299
  padding-right: ${e=>ye.pageContentPadding.valuePx(e.windowSize)};
300
- `,Kn=n.div`
300
+ `,Xn=n.div`
301
301
  display: flex;
302
302
  min-height: 100%;
303
303
  flex-direction: column;
304
304
  row-gap: ${i.sp3};
305
305
  width: 100%;
306
306
  background-color: ${e=>e.theme.colors.grey4};
307
- `,Xn=n(B)`
307
+ `,Kn=n(F)`
308
308
  top: ${i.sp0};
309
309
  left: ${i.sp0};
310
310
  min-height: ${i.sp8};
@@ -331,13 +331,13 @@ import{u as ve,e as je,a as Xe,c9 as Ye,j as t,aW as Qe,B as re,o as i,p as se,b
331
331
  padding-left: ${i.sp0};
332
332
  box-sizing: border-box;
333
333
  overflow: hidden;
334
- `,Qn=n(B)`
334
+ `,Qn=n(F)`
335
335
  display: flex;
336
336
  gap: 5px;
337
337
  `,Zn=n.div`
338
338
  display: flex;
339
339
  align-items: center;
340
- `,Ue=n.div`
340
+ `,Ve=n.div`
341
341
  display: flex;
342
342
  min-height: 96px;
343
343
  justify-content: center;
@@ -363,7 +363,7 @@ import{u as ve,e as je,a as Xe,c9 as Ye,j as t,aW as Qe,B as re,o as i,p as se,b
363
363
  .select-value-container
364
364
  .single-select-field__single-value {
365
365
  color: ${e=>e.theme.colors.hero};
366
- ${e=>`${Vn.qboLinkAcc.style(e.windowSize)}`};
366
+ ${e=>`${Un.qboLinkAcc.style(e.windowSize)}`};
367
367
  }
368
368
  &:hover {
369
369
  border: ${e=>`1px solid ${e.theme.colors.primary}`};
@@ -395,7 +395,7 @@ import{u as ve,e as je,a as Xe,c9 as Ye,j as t,aW as Qe,B as re,o as i,p as se,b
395
395
  `,ni=n.div`
396
396
  display: flex;
397
397
  flex-direction: column;
398
- `,Ve=n(it)`
398
+ `,Ue=n(it)`
399
399
  color: ${e=>e.theme.colors.primary};
400
400
  margin-right: ${i.sp1};
401
401
  padding: ${i.sp3} ${i.sp0} ${i.sp3} ${i.sp2};
@@ -418,8 +418,8 @@ import{u as ve,e as je,a as Xe,c9 as Ye,j as t,aW as Qe,B as re,o as i,p as se,b
418
418
  color: ${e=>e.theme.colors.primary};
419
419
  }
420
420
  }
421
- `,ci=n(ut)`
421
+ `,ci=n(dt)`
422
422
  width: ${i.sp3};
423
423
  height: ${i.sp3};
424
424
  color: ${e=>e.theme.colors.hero};
425
- `,We=e=>{const{primaryConnection:h,allBankAccounts:q,allFundingAccounts:R}=e,_=q.map(a=>({label:a.accountName,value:a.accountId})),P=R.map(a=>({label:a.label,value:a.id,isRecommended:a.accType==="depositAccount"})),M=h.find(a=>a.productType==="bill_pay"),C=h.find(a=>a.productType==="reimbursement"),c=h.find(a=>a.productType==="zeni_accounts"),f=h.find(a=>a.productType==="charge_cards"),w=h.find(a=>a.productType==="zeni_treasury"),U=c?.allFundingAccounts.map(a=>({label:a.label,value:a.id,isRecommended:a.accType==="depositAccount"}))??[],V=w?.allFundingAccounts.map(a=>({label:a.label,value:a.id,isRecommended:a.accType==="paymentAccount"}))??[];return{[Dn]:{[ce]:{selectedOption:M?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:M?.primaryFundingAccount?.id,allOptions:P}},[Nn]:{[ce]:{selectedOption:C?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:C?.primaryFundingAccount?.id,allOptions:P}},[qn]:{[ce]:{selectedOption:c?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:c?.primaryFundingAccount?.id,allOptions:U}},[Jn]:{[ce]:{selectedOption:w?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:w?.primaryFundingAccount?.id,allOptions:V}},[Hn]:{[ce]:{selectedOption:f?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:f?.primaryFundingAccount?.id,allOptions:P}}}},li=e=>`${e}_form`;export{Si as default,li as formUniqueName};
425
+ `,We=e=>{const{primaryConnection:h,allBankAccounts:H,allFundingAccounts:R}=e,_=H.map(a=>({label:a.accountName,value:a.accountId})),P=R.map(a=>({label:a.label,value:a.id,isRecommended:a.accType==="depositAccount"})),M=h.find(a=>a.productType==="bill_pay"),C=h.find(a=>a.productType==="reimbursement"),c=h.find(a=>a.productType==="zeni_accounts"),f=h.find(a=>a.productType==="charge_cards"),w=h.find(a=>a.productType==="zeni_treasury"),V=c?.allFundingAccounts.map(a=>({label:a.label,value:a.id,isRecommended:a.accType==="depositAccount"}))??[],U=w?.allFundingAccounts.map(a=>({label:a.label,value:a.id,isRecommended:a.accType==="paymentAccount"}))??[];return{[Dn]:{[ce]:{selectedOption:M?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:M?.primaryFundingAccount?.id,allOptions:P}},[Nn]:{[ce]:{selectedOption:C?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:C?.primaryFundingAccount?.id,allOptions:P}},[Hn]:{[ce]:{selectedOption:c?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:c?.primaryFundingAccount?.id,allOptions:V}},[Jn]:{[ce]:{selectedOption:w?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:w?.primaryFundingAccount?.id,allOptions:U}},[qn]:{[ce]:{selectedOption:f?.primaryFundingAccount?.zeniAccountId,allOptions:_},[le]:{selectedOption:f?.primaryFundingAccount?.id,allOptions:P}}}},li=e=>`${e}_form`;export{bi as default,li as formUniqueName};
@@ -1,8 +1,8 @@
1
- import{e as Nn,w as On,u as Fn,fM as Ln,fN as En,fO as Wn,fP as Zn,bI as Un,a2 as _n,B as Kn,C as u,j as t,l as E,cL as it,cM as Vn,o as a,cN as Yn,cO as Gn,Z as b,cP as Hn,a0 as Ae,cQ as Xn,aW as lt,aK as ot,dt as rt,bU as st,bW as dt,bX as ct,fQ as Qn,fR as qn,fS as Jn,fT as ea,cV as $,cW as j,cX as I,fU as A,cU as ta,$ as pt,g as ie,cY as Rt,cZ as na,c_ as aa,c$ as ia,fV as la,fW as oa,a4 as ra,r as mt,bA as Te,fX as sa,fY as O,s as r,d as da,bw as ca,fZ as pa,a3 as ma,f_ as ua,f$ as ut,d3 as yt,b as ya,cA as ha,bN as ba,am as xa,ao as ga,T as fa,bp as zt,g0 as wa,c as Mt,ac as Ta,ak as va,aP as Da,eL as $a,k as ja}from"./index-CteHikkY.js";import{b as p,n as i}from"./vendor-rkTZJa59.js";import{_ as Ia}from"./liveblocks-CP09Cz-7.js";import{o as Aa,t as ka}from"./LowBalancePopup-3lHeOacz-Cg-6ggSe.js";import"./mui-C42whWwM.js";import"./analytics-CBL_L82S.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./crypto-BDNqpTKX.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}}}}=Kn.getLocalizedStrings(),ve=Pa.visual.MMMDCommaYYYYformat,$i=({billDetails:e,currentTenant:g,showApproveRejectBtns:x,isShowDeletedBillsEnabled:U,signedInUser:le,isAdmin:Ot,isRealTimeApprovalEnabled:Ft,isInternationalPaymentShaVsOurEnabled:Lt,hasZeniAssistAccess:Et,analytics:z,showMarkAsPaidButtonToCreator:_,showMarkAsPaidButtonToApprover:Wt,isBillPayCommentingEnabled:Se,isZeniUser:Zt,showBackButton:Ce=!0,isDetectInsufficientFundsEnabled:Ut,redirectToEditableBillScreen:_t,redirectToBillsScreen:H,discardBillDetailsFromLocalStore:Pe,deleteBill:Kt,cancelAndDeleteBill:Be,approveOrRejectBill:Re,onAddNewRule:Vt,onAttachmentClick:ze,saveBillDetails:Yt,discardOutsideZeniPaymentData:Gt,onBackClick:Me,updateEditRealTimeApproverClicked:Ht,onSaveRealTimeApprovals:Xt,onRetryPaymentClick:Qt,onRefundPaymentClick:qt})=>{const l=Nn(),o=On(),Ne=Fn(),[Jt,K]=p.useState(!1),[Oe,oe]=p.useState(!1),[re,se]=p.useState(!1),[Fe,de]=p.useState(!1),[en,ce]=p.useState(!1),[Le,X]=p.useState(!1),y=e.transactionDetails?.id,tn=Zt?Ln:En,{requestToOpenThread:pe,setRequestToOpenThread:Ee,setOpenThread:Q}=p.useContext(tn),[nn,V]=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(Zn)),[Y,y]).length,T=`dashboard_${o.currentTenant?.companyId}`,an=p.useCallback((c,h)=>{Q(h),V(!1)},[Q,V]);p.useEffect(()=>{pe?.threadId!=null&&Y.length>0&&!P&&(Q(pe.threadId),Ee(null))},[pe,Y,P,Q,Ee]),Un({componentName:"bill.details"});const[N,q]=p.useState({title:"",description:"",primaryButtonText:"",secondaryButtonText:""}),[Ze,Ue]=p.useState("approved"),[ln,_e]=p.useState(!1),[on,Ke]=p.useState(!1),[Ve,Ye]=p.useState(!1),Ge=()=>_e(!1),rn=()=>_e(!0),He=_n(e.zeniAssist?.refundStatus.fetchState),J=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),J())},[He,e.zeniAssist?.refundStatus,J]);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,Xe=()=>{e.transactionDetails?.id!=null&&_t(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}),K(!0)},cn=()=>{q({title:n.cancelBillTitle,description:n.cancelAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),K(!0)},pn=()=>{q({title:M?n.recurringBill.cancelAndDeleteRecurringTitle:n.cancelAndDeleteBillTitle,description:M?n.recurringBill.cancelAndDeleteRecurringAlertText:n.cancelAndDeleteAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),K(!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:()=>{K(!1),N.primaryButtonText===n.delete?Kt?.(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:()=>{K(!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,Qe=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?E.getActualPaymentDate(e.transactionDetails?.billPayInfo):void 0,vn=ne!=null&&e.paymentMethodType?.maxPeriod?.value!=null?E.zeniDate(E.getNextNthWorkingDay(ne?.toDate(),[0,6],e.paymentMethodType?.maxPeriod.value).toDateString()):void 0,qe=e.transactionDetails?.billPayInfo.expectedDepositDate??vn,Je=it(s?.paymentType?.method??"").replace("Same Day",""),Dn=(s?.paymentToBankAccount!=null||s?.paymentToPI)!=null?n.addedByZeni:e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact?t.jsx(Vn,{paymentTypeLabel:Je,onClick:rn,style:{marginTop:`${l==="small"?a.sp2:a.sp0}`}}):void 0,$n=()=>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,jn=e?.transactionDetails?.billPayInfo.billPaymentMethodType.code==="wire"&&e?.transactionDetails?.billPayInfo.billPaymentMethodType.subCode==="international",In=Et&&e.transactionDetails?.billPayInfo.billPaymentStatus.code!=null&&["failed","cancelled","returned"].includes(e.transactionDetails.billPayInfo.billPaymentStatus.code)&&(xe||ge)&&jn===!1,fe=xe||ge,An=e.transactionDetails?.billPayInfo.isRefundInitiated===!0&&e.transactionDetails?.billPayInfo.isRefundComplete===!1,we=v?.code,kn=!An&&(!Qe||v?.code==="processing"&&!M),Sn=!Qe,et=["small","medium-compact","medium-regular"].includes(l),ae=E.isBulkProcessing(e.transactionDetails?.bulkProcessingDetail?.type),L=E.isPaymentMethodOutsideZeni(e.paymentMethodType?.method),Cn=c=>{z.trackBillPayMarkAsPaidSubmit(c.paymentMode??"other",k?.code??"",v?.code??""),Yt(!0,Ve,c)},tt=()=>{Ke(!0),z.trackBillPayMarkAsPaid(k?.code??"",v?.code??"")},Pn=()=>{Ye(!0),tt()},Bn=()=>{Gt(),Ke(!1),Ve&&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=Ut&&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=()=>{Ue("approved"),Le===!0&&X(!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=()=>{Ue("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(Xa,{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:Xn(g.company?.companyInfo),vendor:e.transactionDetails?.vendor?.name,paymentDate:s.paymentDate?.format(ve)??"",paymentType:Je,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(Ie,{width:a.sp4,height:a.sp4}):null]}),backgroundColor:Ne.colors.grey4,rightSideComponent:t.jsxs(jt,{windowSize:l,children:[f?t.jsxs(Pt,{isDisabled:P,"data-testid":b("bill-comment-button"),onClick:P?()=>null:c=>{c.preventDefault(),c.stopPropagation(),V(!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(It,{onClick:()=>J(),"data-testid":b("bill-detail-nav-bar-small-close-button"),children:t.jsx($t,{})})]}),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(Ie,{width:a.sp4,height:a.sp4}):null]}),rightSideComponent:t.jsxs(jt,{windowSize:l,children:[f?t.jsxs(Pt,{isDisabled:P,"data-testid":b("bill-comment-button"),onClick:P?()=>null:c=>{c.preventDefault(),c.stopPropagation(),V(!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(It,{onClick:()=>J(),"data-testid":b("bill-detail-nav-bar-close-button"),children:t.jsx($t,{})})]}),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:[Le?t.jsx(Aa,{withdrawFrom:e.withdrawFrom,paymentDate:e?.transactionDetails?.billPayInfo.paymentDate,onOkClick:nt,onCancelClick:()=>{X(!1),Xe()},onClickAway:()=>{X(!1)}}):null,on?t.jsx(ka,{onCancel:Bn,onProceedForMarkAsPaid:Cn,saveDetailsFetchState:e.billSaveStatus,paymentData:e.outsideZeniPaymentInfo}):null,Jt||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(Ie,{height:a.sp5,width:a.sp5}):null]}):null,U&&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(Qn,{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,Ea(ae,e,W),t.jsx(Jn,{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($e,{children:[t.jsx(je,{children:n.whatForTitle}),t.jsxs(De,{children:[t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:"invoiceNumber"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("invoiceNumber")}`},children:t.jsx(A,{label:{label:n.invoiceNumber,width:D},text:te.invoiceNumber??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:"invoiceDate"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("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($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:"billDueDate"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("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($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:"memo"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("memo")}`},children:t.jsx(A,{label:{label:n.memo,width:D},text:te.memo??C,style:{width:"auto"}})})]})]}),t.jsxs($e,{children:[t.jsx(ni,{windowSize:l,children:t.jsx(je,{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(Qa,{children:[ye.length>1?t.jsx(qa,{windowSize:l,children:t.jsx(Ja,{windowSize:l,children:`${n.line} # ${h+1}`})}):null,t.jsxs(De,{children:[t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:`${h}.recipientAmount`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("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($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:`${h}.lineDescription`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("lineDescription",h)}`},children:t.jsx(A,{label:{label:n.description,width:D},text:c.lineDescription??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:`${h}.account`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("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($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:`${h}.class`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("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($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:`${h}.billable`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("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($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:`${h}.customer`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("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($e,{children:[t.jsx(je,{children:n.paymentDetailsTitle}),t.jsxs(De,{children:[L?null:t.jsxs(t.Fragment,{children:[t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:"withdrawFrom"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("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($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:"paymentType"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("paymentType")}`},children:t.jsx(A,{additionalInfoLabel:s.paymentType?.method!=null&&s.paymentType.method.includes(E.NEW_INTERNATIONAL_METHOD_SUBTEXT)&&Lt&&s.internationalTransferFeeBearerPaymentMethod!=null?t.jsx(Za,{children:na(s.internationalTransferFeeBearerPaymentMethod)}):void 0,label:{label:n.paymentMethod,width:D},text:L&&e.outsideZeniPaymentInfo!=null?La(e.outsideZeniPaymentInfo):it(s.paymentType?.method??""),style:{width:"auto"}})}),L?null:t.jsxs(t.Fragment,{children:[t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:"paymentTo"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("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})}),$n()]})})]}),L||e.isRecurring?t.jsxs(t.Fragment,{children:[t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:"recurringPaymentType"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("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,L,e.transactionDetails?.recurringBillInstance??1,e.recurringBillConfigDetail?.totalPaymentCycles??0),textStyles:{paddingLeft:m.textPadding.valuePx(l),paddingRight:m.textPadding.valuePx(l)},additionalInfoLabel:aa(l,e.isRecurring,L,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:Vt,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:Xt},historicActivities:e.billHistory.activities}),t.jsx(si,{})]}),e.transactionDetails?.vendor!=null&&!me&&!e.transactionDetails.isDeleted?t.jsx(ra,{separatorStyle:{marginRight:a.sp4},showPrimaryButton:_||x,showCancel:!_&&x,cancelBtn:{label:et?n.buttons.reject:n.buttons.rejectBill,isLoading:Ze==="rejected"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:zn,style:{width:m.footerButtonWidth.value(l)},reverseSpinnerColor:!1},primaryBtn:{label:Fa(_,et),isLoading:Ze==="approved"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:_?tt:()=>{W!=null?X(!0):nt()},isDisabled:e.billSaveStatus==="In-Progress"||e.approvalUpdateStatus.fetchState==="In-Progress"||e.realTimeApproval.isEditMode===!0,style:{width:_?"auto":m.footerButtonWidth.value(l)}},rightSideComponent:t.jsx(Ua,{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(Z,{onClick:dn,"data-testid":b("delete-bill-action-item"),children:n.buttons.deleteBill}):null,we==="processing"&&!M?t.jsx(Z,{onClick:cn,"data-testid":b("cancel-bill-action-item"),children:n.buttons.cancel}):null,we==="processing"&&Sn?t.jsx(Z,{onClick:pn,"data-testid":b("cancel-and-delete-bill-action-item"),children:n.buttons.cancelAndDelete}):null,x&&L&&Wt?t.jsx(Z,{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(Z,{onClick:()=>{z.trackRetryClick(v?.code??"",k?.code??"",F?.description??"",M?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),Qt()},"data-testid":b("retry-bill-action-item"),children:n.buttons.retry}):null,ge?t.jsx(Z,{onClick:mn,"data-testid":b("refund-bill-action-item"),children:n.buttons.refund}):null]})}):null,t.jsxs(Ga,{windowSize:l,children:[In===!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(Ka,{})})}):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:Xe,"data-testid":b("edit-bill-icon-container"),children:t.jsx(Va,{})})}):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(_a,{onClick:()=>oe(!Oe)})})}):null]})]})}),style:{minHeight:62}}):null]}),f?t.jsx(Ia,{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:()=>V(!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(E.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,La=e=>{const g=e.paymentMode,x=n.paymentOutsideZeni.offline;if(g==null||g==="other")return x;const U=n.paymentOutsideZeni.paymentModeOptions.find(le=>le.value===g)?.label;return`${x} ${Ba} ${U}`},Ea=(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 U=`${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__",U)}`,description:x.replace("Low balance! ","")})}else return null},Wa=i.div``,Za=i.div``,Ua=i.div`
1
+ import{e as Nn,Y as On,u as Ln,fO as Fn,fP as En,fQ as _n,fR as Wn,bI as Zn,a1 as Kn,M as Vn,C as u,j as t,l as E,cL as it,cM as Un,o as a,cN as Yn,cO as Xn,_ as b,cP as Gn,$ as Ae,cQ as Hn,aW as lt,aJ as ot,dt as rt,bU as st,bW as dt,bX as ct,fS as qn,fT as Jn,fU as Qn,fV as ea,cV as $,cW as j,cX as I,fW as A,cU as ta,v as pt,g as ie,cY as Rt,cZ as na,c_ as aa,c$ as ia,fX as la,fY as oa,a3 as ra,p as mt,bA as Te,fZ as sa,f_ as O,q as r,x as da,bw as ca,f$ as pa,a2 as ma,g0 as ua,g1 as ut,d3 as yt,X as ya,cA as ha,bN as ba,al as xa,an as ga,L as fa,bp as zt,g2 as wa,i as Mt,ab as Ta,aj as va,aO as Da,eL as $a,n as ja}from"./index-P_4M6V8j.js";import{b as p,n as i}from"./vendor-rkTZJa59.js";import{_ as Ia}from"./liveblocks-CP09Cz-7.js";import{o as Aa,t as ka}from"./LowBalancePopup-Dhrtsv_E-B0rnJzet.js";import"./mui-C42whWwM.js";import"./analytics-CBL_L82S.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./crypto-BDNqpTKX.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,$i=({billDetails:e,currentTenant:g,showApproveRejectBtns:x,isShowDeletedBillsEnabled:Z,signedInUser:le,isAdmin:Ot,isRealTimeApprovalEnabled:Lt,isInternationalPaymentShaVsOurEnabled:Ft,hasZeniAssistAccess:Et,analytics:z,showMarkAsPaidButtonToCreator:K,showMarkAsPaidButtonToApprover:_t,isBillPayCommentingEnabled:Se,isZeniUser:Wt,showBackButton:Ce=!0,isDetectInsufficientFundsEnabled:Zt,redirectToEditableBillScreen:Kt,redirectToBillsScreen:G,discardBillDetailsFromLocalStore:Pe,deleteBill:Vt,cancelAndDeleteBill:Be,approveOrRejectBill:Re,onAddNewRule:Ut,onAttachmentClick:ze,saveBillDetails:Yt,discardOutsideZeniPaymentData:Xt,onBackClick:Me,updateEditRealTimeApproverClicked:Gt,onSaveRealTimeApprovals:Ht,onRetryPaymentClick:qt,onRefundPaymentClick:Jt})=>{const l=Nn(),o=On(),Ne=Ln(),[Qt,V]=p.useState(!1),[Oe,oe]=p.useState(!1),[re,se]=p.useState(!1),[Le,de]=p.useState(!1),[en,ce]=p.useState(!1),[Fe,H]=p.useState(!1),y=e.transactionDetails?.id,tn=Wt?Fn:En,{requestToOpenThread:pe,setRequestToOpenThread:Ee,setOpenThread:q}=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}=_n(w,"both",!1),f=Se&&y!=null,_e=p.useMemo(()=>y==null?[]:Y.filter(c=>c.resolved===!1&&!c.id.includes(Wn)),[Y,y]).length,T=`dashboard_${o.currentTenant?.companyId}`,an=p.useCallback((c,h)=>{q(h),U(!1)},[q,U]);p.useEffect(()=>{pe?.threadId!=null&&Y.length>0&&!P&&(q(pe.threadId),Ee(null))},[pe,Y,P,q,Ee]),Zn({componentName:"bill.details"});const[N,J]=p.useState({title:"",description:"",primaryButtonText:"",secondaryButtonText:""}),[We,Ze]=p.useState("approved"),[ln,Ke]=p.useState(!1),[on,Ve]=p.useState(!1),[Ue,Ye]=p.useState(!1),Xe=()=>Ke(!1),rn=()=>Ke(!0),Ge=Kn(e.zeniAssist?.refundStatus.fetchState),Q=p.useCallback(()=>{G()},[G]);p.useEffect(()=>{(e.deleteStatus.fetchState==="Completed"||e.approvalUpdateStatus.fetchState==="Completed"||e.cancelAndDeleteStatus.fetchState==="Completed"||e.billSaveStatus==="Completed")&&(Pe(),G())},[e,G,Pe]),p.useEffect(()=>{Ge==="In-Progress"&&(e.zeniAssist?.refundStatus.fetchState==="Completed"||e.zeniAssist?.refundStatus.fetchState==="Error")&&(se(!1),Q())},[Ge,e.zeniAssist?.refundStatus,Q]);const k=e.transactionDetails?.billPayInfo.stage,ee=e.transactionDetails?.billPayInfo.billStatus,X=e.transactionDetails?.billPayInfo.billPaymentStatus,sn=e.transactionDetails?.billPayInfo.billPaymentRefundStatus,me=k?.code==="paid",v=me?k:ee?.code=="approved"&&X?.code?X:ee,S=Na(v,e.transactionDetails),L=e.transactionDetails?.billPayInfo.isRefundInitiated===!0?sn:X?.code!=null&&(ee?.code=="approved"||X.code==="mark_as_paid")?X:ee,ue=e.transactionDetails?.vendor?.name,M=e.isRecurring,He=()=>{e.transactionDetails?.id!=null&&Kt(e.transactionDetails?.id??"")},dn=()=>{J({title:M?n.recurringBill.deleteRecurringTitle:n.deleteBillTitle,description:M?n.recurringBill.deleteRecurringAlertText:n.deleteAlertDescription,primaryButtonText:n.delete,secondaryButtonText:n.cancel}),V(!0)},cn=()=>{J({title:n.cancelBillTitle,description:n.cancelAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),V(!0)},pn=()=>{J({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??"",L?.description??"",M?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),J({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??"",L?.description??"",M?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),Jt())},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(!Le),z.trackZeniAssistClick(v?.code??"",k?.code??"",L?.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,qe=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?E.getActualPaymentDate(e.transactionDetails?.billPayInfo):void 0,vn=ne!=null&&e.paymentMethodType?.maxPeriod?.value!=null?E.zeniDate(E.getNextNthWorkingDay(ne?.toDate(),[0,6],e.paymentMethodType?.maxPeriod.value).toDateString()):void 0,Je=e.transactionDetails?.billPayInfo.expectedDepositDate??vn,Qe=it(s?.paymentType?.method??"").replace("Same Day",""),Dn=(s?.paymentToBankAccount!=null||s?.paymentToPI)!=null?n.addedByZeni:e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact?t.jsx(Un,{paymentTypeLabel:Qe,onClick:rn,style:{marginTop:`${l==="small"?a.sp2:a.sp0}`}}):void 0,$n=()=>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,jn=e?.transactionDetails?.billPayInfo.billPaymentMethodType.code==="wire"&&e?.transactionDetails?.billPayInfo.billPaymentMethodType.subCode==="international",In=Et&&e.transactionDetails?.billPayInfo.billPaymentStatus.code!=null&&["failed","cancelled","returned"].includes(e.transactionDetails.billPayInfo.billPaymentStatus.code)&&(xe||ge)&&jn===!1,fe=xe||ge,An=e.transactionDetails?.billPayInfo.isRefundInitiated===!0&&e.transactionDetails?.billPayInfo.isRefundComplete===!1,we=v?.code,kn=!An&&(!qe||v?.code==="processing"&&!M),Sn=!qe,et=["small","medium-compact","medium-regular"].includes(l),ae=E.isBulkProcessing(e.transactionDetails?.bulkProcessingDetail?.type),F=E.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=()=>{Xt(),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]),_=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"),Fe===!0&&H(!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(Ha,{windowSize:l,ref:at,children:[t.jsx(Xn,{anchor:"right",open:ln,onClose:Xe,transitionDuration:250,"data-testid":b("vendor-email-preview-drawer"),children:t.jsx(Gn,{companyName:Hn(g.company?.companyInfo),vendor:e.transactionDetails?.vendor?.name,paymentDate:s.paymentDate?.format(ve)??"",paymentType:Qe,amount:Ae("0,0.[00]",he),isInvoiceAttached:!!e.transactionDetails?.attachments?.length,onClose:Xe})}),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(Ie,{width:a.sp4,height:a.sp4}):null]}),backgroundColor:Ne.colors.grey4,rightSideComponent:t.jsxs(jt,{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(It,{onClick:()=>Q(),"data-testid":b("bill-detail-nav-bar-small-close-button"),children:t.jsx($t,{})})]}),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(Ie,{width:a.sp4,height:a.sp4}):null]}),rightSideComponent:t.jsxs(jt,{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(It,{onClick:()=>Q(),"data-testid":b("bill-detail-nav-bar-close-button"),children:t.jsx($t,{})})]}),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:[Fe?t.jsx(Aa,{withdrawFrom:e.withdrawFrom,paymentDate:e?.transactionDetails?.billPayInfo.paymentDate,onOkClick:nt,onCancelClick:()=>{H(!1),He()},onClickAway:()=>{H(!1)}}):null,on?t.jsx(ka,{onCancel:Bn,onProceedForMarkAsPaid:Cn,saveDetailsFetchState:e.billSaveStatus,paymentData:e.outsideZeniPaymentInfo}):null,Qt||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(Ie,{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,L!=null&&L.code?l==="small"?t.jsx(qn,{progressSectionObj:L,createDate:e.transactionDetails?.createTime,paymentDate:Je,scheduleDate:ne,approvedDate:e.latestApprovedDate,isFrozen:e.transactionDetails?.isDeleted}):t.jsx(Jn,{progressSectionObj:L,createDate:e.transactionDetails?.createTime,paymentDate:Je,scheduleDate:ne,approvedDate:e.latestApprovedDate,isFrozen:e.transactionDetails?.isDeleted}):null,Ea(ae,e,_),t.jsx(Qn,{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($e,{children:[t.jsx(je,{children:n.whatForTitle}),t.jsxs(De,{children:[t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:"invoiceNumber"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("invoiceNumber")}`},children:t.jsx(A,{label:{label:n.invoiceNumber,width:D},text:te.invoiceNumber??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:"invoiceDate"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("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($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:"billDueDate"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("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($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:"memo"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("memo")}`},children:t.jsx(A,{label:{label:n.memo,width:D},text:te.memo??C,style:{width:"auto"}})})]})]}),t.jsxs($e,{children:[t.jsx(ni,{windowSize:l,children:t.jsx(je,{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(qa,{children:[ye.length>1?t.jsx(Ja,{windowSize:l,children:t.jsx(Qa,{windowSize:l,children:`${n.line} # ${h+1}`})}):null,t.jsxs(De,{children:[t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:`${h}.recipientAmount`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("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($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:`${h}.lineDescription`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("lineDescription",h)}`},children:t.jsx(A,{label:{label:n.description,width:D},text:c.lineDescription??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:`${h}.account`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("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($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:`${h}.class`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("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($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:`${h}.billable`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("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($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:`${h}.customer`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("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($e,{children:[t.jsx(je,{children:n.paymentDetailsTitle}),t.jsxs(De,{children:[F?null:t.jsxs(t.Fragment,{children:[t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:"withdrawFrom"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("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($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:"paymentType"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("paymentType")}`},children:t.jsx(A,{additionalInfoLabel:s.paymentType?.method!=null&&s.paymentType.method.includes(E.NEW_INTERNATIONAL_METHOD_SUBTEXT)&&Ft&&s.internationalTransferFeeBearerPaymentMethod!=null?t.jsx(Wa,{children:na(s.internationalTransferFeeBearerPaymentMethod)}):void 0,label:{label:n.paymentMethod,width:D},text:F&&e.outsideZeniPaymentInfo!=null?Fa(e.outsideZeniPaymentInfo):it(s.paymentType?.method??""),style:{width:"auto"}})}),F?null:t.jsxs(t.Fragment,{children:[t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:"paymentTo"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("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})}),$n()]})})]}),F||e.isRecurring?t.jsxs(t.Fragment,{children:[t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:y,dashboardTabKey:I({type:"details",key:"recurringPaymentType"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${j("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,F,e.transactionDetails?.recurringBillInstance??1,e.recurringBillConfigDetail?.totalPaymentCycles??0),textStyles:{paddingLeft:m.textPadding.valuePx(l),paddingRight:m.textPadding.valuePx(l)},additionalInfoLabel:aa(l,e.isRecurring,F,e.recurringBillConfigDetail),additionalInfoLabelStyles:{paddingRight:m.paddingRight.valuePx(l),marginTop:m.additionalTextMarginTop.valuePx(l)}}),e.recurringBillInstances!=null&&e.recurringBillInstances.length>0?t.jsx(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:Lt,entityApprovalId:e.billActivities[0]?.entityApprovalId??e.transactionDetails.entityApprovalId,updateEditMode:Gt,onSaveRealTimeApprovals:Ht},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:La(K,et),isLoading:We==="approved"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:K?tt:()=>{_!=null?H(!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(Ga,{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&&F&&_t?t.jsx(W,{onClick:Pn,"data-testid":b("mark-as-paid-action-item"),children:n.paymentOutsideZeni.markAsPaid}):null]})}):null,Le?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??"",L?.description??"",M?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),qt()},"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(Xa,{windowSize:l,children:[In===!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:He,"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(Ia,{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(E.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})]})]})},La=(e,g)=>e?n.paymentOutsideZeni.markAsPaid:g?n.buttons.approve:n.buttons.approveBill,Fa=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}`},Ea=(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`
3
3
  display: flex;
4
4
  justify-content: flex-end;
5
- `,_a=i($a)`
5
+ `,Ka=i($a)`
6
6
  cursor: pointer;
7
7
  color: ${e=>e.theme.colors.hero};
8
8
  width: ${a.sp4};
@@ -18,7 +18,7 @@ import{e as Nn,w as On,u as Fn,fM as Ln,fN as En,fO as Wn,fP as Zn,bI as Un,a2 a
18
18
  &:hover {
19
19
  color: ${e=>e.theme.colors.primary};
20
20
  }
21
- `,Ka=i(Sa)`
21
+ `,Va=i(Sa)`
22
22
  color: ${e=>e.theme.colors.hero};
23
23
  width: ${a.sp5};
24
24
  height: ${a.sp5};
@@ -26,7 +26,7 @@ import{e as Nn,w as On,u as Fn,fM as Ln,fN as En,fO as Wn,fP as Zn,bI as Un,a2 a
26
26
  &:hover {
27
27
  color: ${e=>e.theme.colors.primary};
28
28
  }
29
- `,Va=i(Da)`
29
+ `,Ua=i(Da)`
30
30
  cursor: pointer;
31
31
  color: ${e=>e.theme.colors.hero};
32
32
  width: ${a.sp4};
@@ -42,7 +42,7 @@ import{e as Nn,w as On,u as Fn,fM as Ln,fN as En,fO as Wn,fP as Zn,bI as Un,a2 a
42
42
  &:hover {
43
43
  color: ${e=>e.theme.colors.primary};
44
44
  }
45
- `,Ga=i.div`
45
+ `,Xa=i.div`
46
46
  display: flex;
47
47
  justify-content: center;
48
48
  align-items: center;
@@ -64,14 +64,14 @@ import{e as Nn,w as On,u as Fn,fM as Ln,fN as En,fO as Wn,fP as Zn,bI as Un,a2 a
64
64
  border-radius: ${a.sp1};
65
65
  right: ${e=>m.right.valuePx(e.windowSize)};
66
66
  box-shadow: ${e=>`${a.sp0} 2px ${a.sp1} ${e.theme.colors.grey1}3D`};
67
- `,Ha=i.div`
67
+ `,Ga=i.div`
68
68
  width: auto;
69
69
  justify-content: flex-end;
70
70
  position: ${e=>e.windowSize==="small"?"static":"relative"};
71
71
  right: ${e=>m.actionsContainerRight.valuePx(e.windowSize)};
72
72
  height: 100%;
73
73
  display: flex;
74
- `,Z=i(Mt)`
74
+ `,W=i(Mt)`
75
75
  display: flex;
76
76
  align-items: center;
77
77
  width: 100%;
@@ -113,7 +113,7 @@ import{e as Nn,w as On,u as Fn,fM as Ln,fN as En,fO as Wn,fP as Zn,bI as Un,a2 a
113
113
  width: ${a.sp4};
114
114
  height: ${a.sp4};
115
115
  display: flex;
116
- `,Xa=i.div`
116
+ `,Ha=i.div`
117
117
  height: 100%;
118
118
  overflow: scroll;
119
119
  `,De=i.div`
@@ -128,7 +128,7 @@ import{e as Nn,w as On,u as Fn,fM as Ln,fN as En,fO as Wn,fP as Zn,bI as Un,a2 a
128
128
  display: flex;
129
129
  flex-direction: column;
130
130
  padding-top: ${a.sp3};
131
- `,Qa=i.div``,je=i(xa)`
131
+ `,qa=i.div``,je=i(xa)`
132
132
  color: ${e=>e.theme.colors.primary};
133
133
  `,R=i.div`
134
134
  display: flex;
@@ -136,14 +136,14 @@ import{e as Nn,w as On,u as Fn,fM as Ln,fN as En,fO as Wn,fP as Zn,bI as Un,a2 a
136
136
  background-color: ${e=>e.theme.colors.grey3};
137
137
  min-height: 1px;
138
138
  max-height: 1px;
139
- `,qa=i(ga)`
139
+ `,Ja=i(ga)`
140
140
  display: flex;
141
141
  align-items: center;
142
142
  justify-content: space-between;
143
143
  color: ${e=>e.theme.colors.champion};
144
144
  margin-top: ${a.sp2};
145
145
  height: 31px;
146
- `,Ja=i(fa)`
146
+ `,Qa=i(fa)`
147
147
  color: ${e=>e.theme.colors.champion};
148
148
  `,ei=i.div`
149
149
  display: flex;