@zeniai/web-cockpit-ui 1.14.84-dev → 1.14.85-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (221) hide show
  1. package/dist/assets/{ACHDetailsPage-BXgsd50c-BuCiUEId.js → ACHDetailsPage-Dzk7YdoJ-Cuct0t6u.js} +2 -2
  2. package/dist/assets/{AIPerformancePage-BdDTidCL-D-IQ6p36.js → AIPerformancePage-DBCH9dJi-CYibQjrX.js} +19 -19
  3. package/dist/assets/{AccountInfoPage-w0STaK9a-BfMIBiEJ.js → AccountInfoPage-Mzw-22d_-Df5O2T5Z.js} +2 -2
  4. package/dist/assets/{AccountInfoPageContent-CsuUhHXU-DgiU-I5H.js → AccountInfoPageContent-Bjp81drF-Cqcv4hk8.js} +15 -15
  5. package/dist/assets/{AccountLockedInfoModal-iYb31wv7-CEyp2zKM.js → AccountLockedInfoModal-Zg2PAu1o-svgY2-MJ.js} +1 -1
  6. package/dist/assets/{AccountReconDetailsDrawerPage-DmkLTIkW-DxChexc_.js → AccountReconDetailsDrawerPage-BTkrwp4Q-CWHV1qM1.js} +9 -9
  7. package/dist/assets/{AccountRow-BObEIy6l-CsCw-i7a.js → AccountRow-CIsbwvGp-J3oMxL3b.js} +10 -10
  8. package/dist/assets/{AccountsPromoCardStack-B8gJFsYh-DpzT8FNB.js → AccountsPromoCardStack-DrElZh-K-CUoBlW42.js} +13 -13
  9. package/dist/assets/{AddAddressForCardDrawer-vOgzMYWA-Bo72mQ01.js → AddAddressForCardDrawer-D5Kqxx0c-CDAVfdUf.js} +1 -1
  10. package/dist/assets/{AddToWalletPage-BhphXgem-DR4-yAJW.js → AddToWalletPage-B68eBsAU-Dnsjp7Oq.js} +5 -5
  11. package/dist/assets/{AgingReportsPage-DEgupWct-SJsZmYxE.js → AgingReportsPage-BlQHxYjL-Cr6yxtF3.js} +4 -4
  12. package/dist/assets/{AllUserItems-S2DAZpO6-Zcx2jN6k.js → AllUserItems-DsECKAGD-PW2UBBng.js} +4 -4
  13. package/dist/assets/{ApAgingDetailPage-CvDD8-s7-k2W-N5me.js → ApAgingDetailPage-Bg0ZrGXm-CfXEq_5-.js} +2 -2
  14. package/dist/assets/{AppBasePage-C4z5I-xG-vGdvNBYI.js → AppBasePage-tPaBc2ei-WGoBSx1D.js} +7 -7
  15. package/dist/assets/{AppDrawerContent-Dka5HlPs-BfBKKeHh.js → AppDrawerContent-Cx4zDKi_-DO8upp4U.js} +2 -2
  16. package/dist/assets/ApprovalRulesSettingsPage-BcRZvSQH-BuukHz1z.js +47 -0
  17. package/dist/assets/{ArAgingChart-CJ7XKU9h-BSixtgVA.js → ArAgingChart-RdGwOP5k-DaN2WJzI.js} +1 -1
  18. package/dist/assets/ArAgingDetailPage-Bh7NAVZf-DauNApby.js +46 -0
  19. package/dist/assets/{AttachmentView-Dg6PizI7-BzoqKbZ4.js → AttachmentView-ClnTjRCg-CXQ9ySez.js} +6 -6
  20. package/dist/assets/{BankAccountSection-Chay7X-G-vPiVizDl.js → BankAccountSection-D3sQOQ-c-t8HGw1J0.js} +4 -4
  21. package/dist/assets/{BankAccountWarningSection-CSChi1lw-BVD5BCv3.js → BankAccountWarningSection-CxLBPI_P-CQJWoDnI.js} +9 -9
  22. package/dist/assets/{BankConnectionsSettingsPage-DJV7q1Kp-DcUIdQZo.js → BankConnectionsSettingsPage-Bsix2nzV-BvUIdsy8.js} +6 -6
  23. package/dist/assets/{BillDetailPage-DM06uZnD-BOk9lw2_.js → BillDetailPage-B52FZrvM-BFE_NGrS.js} +10 -10
  24. package/dist/assets/{BillPayApprovalRuleDetailPage-MsPIxgUt-r4h6U7BK.js → BillPayApprovalRuleDetailPage-CswUbxdi-Cprf5Nyo.js} +1 -1
  25. package/dist/assets/{BillPayApprovalRulesPage-BhDdco2x-B1oZ9jjD.js → BillPayApprovalRulesPage-B-8sIYjs-D2BSNMf9.js} +1 -1
  26. package/dist/assets/{BillPayPromoPage-Dy-opG76-CZ2iWLB7.js → BillPayPromoPage-B6jW_8rf-YW9uzBg5.js} +5 -5
  27. package/dist/assets/{BillPaySetUpPage-DUvwWlaD-Bg_qNGFx.js → BillPaySetUpPage-Rqxy02BM-CEkcaNcr.js} +2 -2
  28. package/dist/assets/{BillingSettingsPage-wj_sIJgc-Dy0iglvP.js → BillingSettingsPage-CPs5zrIc-DODFNfJu.js} +4 -4
  29. package/dist/assets/{BillsBulkReviewDrawerPage-DbC84oxR-CV4aNHIq.js → BillsBulkReviewDrawerPage-DLQsxJi8-DtW4kiE9.js} +1 -1
  30. package/dist/assets/{BoxItem-CdqDzfZN-BxmSstzM.js → BoxItem-CP9cPZQd-BW2Fv6YZ.js} +1 -1
  31. package/dist/assets/{BusinessVerificationPage-BMtHNNcG-CKxF3KMp.js → BusinessVerificationPage-Cayj-kYe-DIQRuHb0.js} +1 -1
  32. package/dist/assets/{CardNumberSubText-lh7fQJis-CKFkz1Hy.js → CardNumberSubText-FdCtSIHd-Cer2LzOo.js} +1 -1
  33. package/dist/assets/{CashbackDetailPage-KRbsYA09-DzsJTodf.js → CashbackDetailPage-CZICE37r-CchxXOB0.js} +11 -11
  34. package/dist/assets/{ChargeCardDetailPage--WP6KTfb-BgNGsK6v.js → ChargeCardDetailPage-Be2X4Rx8-DkQXGv5E.js} +27 -27
  35. package/dist/assets/{ChargeCardListPage-knAPmob6-CgVyQmJQ.js → ChargeCardListPage-DzfBzM8o-BpS6GwxX.js} +13 -13
  36. package/dist/assets/{ChargeCardListTable-DsfnKX3P-D0-TBhcC.js → ChargeCardListTable-Bc-4mcCz-DGGclb69.js} +44 -44
  37. package/dist/assets/{ChargeCardPromoPage-C9610LtW-GRwSeJ82.js → ChargeCardPromoPage-D_C7hXGy-jKodLkTT.js} +7 -7
  38. package/dist/assets/{ChargeCardSetupPage-Cy4JhjJW-BnQWcnli.js → ChargeCardSetupPage-BwNi9-pq-C4dK5zJO.js} +3 -3
  39. package/dist/assets/{ChargeCardStatementsPage-C7uS1jEO-7cO1LhgS.js → ChargeCardStatementsPage-Bf04MOoK-k-sWDpeT.js} +8 -8
  40. package/dist/assets/{CheckDepositDrawerPage-TfiJwtqN-CwfCisTT.js → CheckDepositDrawerPage-B-A9fkGZ-DZFZ2JbI.js} +7 -7
  41. package/dist/assets/{CollapsableReportTable-NYu8Bq-g-CCeLwwka.js → CollapsableReportTable-DdMyzUD0-BAoVL7wM.js} +1 -1
  42. package/dist/assets/{CompanyOfficerDetailsSection-CiVliExW-DzmWuQm0.js → CompanyOfficerDetailsSection-kRtuUd2c-Cm23V4kL.js} +18 -18
  43. package/dist/assets/{CompanyPassportCard-8zvCdmxt-CxjPiS1u.js → CompanyPassportCard-KhSJJMcy-Cll554T1.js} +1 -1
  44. package/dist/assets/{CompanyPassportPage-AS4N7oT2-Bv10VeId.js → CompanyPassportPage--ckOuqML-CPrNkQDu.js} +10 -10
  45. package/dist/assets/{CompleteProfile-Dj080UdJ-B2qMa6vk.js → CompleteProfile-D8egRg8d-QRh3PECw.js} +1 -1
  46. package/dist/assets/{ConfettiBurst-DcCUSSaX-yciACYT1.js → ConfettiBurst-CvRhNEAY-OaJ4gLIH.js} +1 -1
  47. package/dist/assets/CreateOrEditVendorPage-DrZh60Xs-DORgL7Gm.js +281 -0
  48. package/dist/assets/{CreditCardPaymentDrawerPage-BKvqMwnt-BuHB8ode.js → CreditCardPaymentDrawerPage-B7ssB1GM-DOObGC22.js} +8 -8
  49. package/dist/assets/{CurrencySelectField-ksMvik33-CjY_Sqhm.js → CurrencySelectField-BXp2mtZ7-BZ1r7qNY.js} +1 -1
  50. package/dist/assets/{CustomerOnboardingActivationPage-DfT_gkE4-Dk7tFjjw.js → CustomerOnboardingActivationPage-BX7STQsk-ClpFwMrN.js} +1 -1
  51. package/dist/assets/CustomerOnboardingContainerPage-BkPTeV9_-YlZ2rpks.js +1 -0
  52. package/dist/assets/{CustomerOnboardingDetailPageSkeleton-DfOtXgss-1gud75px.js → CustomerOnboardingDetailPageSkeleton-C5tSpmSB-5KFMWV1l.js} +5 -5
  53. package/dist/assets/{CustomerOnboardingNoStepsPage-61UorFvn-DF0b8zE7.js → CustomerOnboardingNoStepsPage-CQUQlLbj-llUCphSN.js} +4 -4
  54. package/dist/assets/CustomerOnboardingPage-D0p8khnC-C1IdwvBx.js +107 -0
  55. package/dist/assets/{CustomerOnboardingProductSuitePage-CTowHB2X-DUFAd8wB.js → CustomerOnboardingProductSuitePage-BRk3TA9f-n37UhYFK.js} +1 -1
  56. package/dist/assets/{Dashboard-2RpETnqH-Dgva4ZAW.js → Dashboard-CBOma7mv-B9j8ewTM.js} +1 -1
  57. package/dist/assets/{DashboardReportPage-DRRWpGiJ-Z6RP-3ZH.js → DashboardReportPage-DRYx3AOy-D6rkizKp.js} +1 -1
  58. package/dist/assets/{DashboardSidebarBackgroundAnimation-0cCKM3E9-DV5Ukn4W.js → DashboardSidebarBackgroundAnimation-DYsp7Imm-CsY2ImuX.js} +1 -1
  59. package/dist/assets/{DepositAccTransactionItem-DjbheijR-B7o468tr.js → DepositAccTransactionItem-BQU7vZKr-BOGssvEh.js} +1 -1
  60. package/dist/assets/DepositAccTransactionListPage-DQDt_2kb-D0tTF08R.js +66 -0
  61. package/dist/assets/{DomesticWireDetailsPage-DuKrVIAL-BzRIhYO3.js → DomesticWireDetailsPage-B0KbC9m8-DSgkPJjx.js} +1 -1
  62. package/dist/assets/{DownloadOverlay-f6SOW8iK-DORigjXi.js → DownloadOverlay-D2vm9EYI-1UU-2gMF.js} +18 -18
  63. package/dist/assets/{DrawerPage-BkIQ6mLJ-DU9u6eQ0.js → DrawerPage-DHIaNEwf-DBdDE0YZ.js} +7 -7
  64. package/dist/assets/{EditPeoplePage-lZcM4Zfw-CzhpHcfF.js → EditPeoplePage-B4OaKX89-CxOdlVup.js} +2 -2
  65. package/dist/assets/{EditReimbursementDetailPage-WO3U-vVY-CTjbkhIP.js → EditReimbursementDetailPage-C_JOnUnR-BaFHONcZ.js} +1 -1
  66. package/dist/assets/{EntityDetailPage-AP27Niqu-DwUEbyHL.js → EntityDetailPage-DGq_Sr4I-DbAOqf4w.js} +2 -2
  67. package/dist/assets/{EntitySummarySection-B6khdAJg-7W3j7WRI.js → EntitySummarySection-CAKPRhm9-DT4p2FkX.js} +10 -10
  68. package/dist/assets/{ExpenseAutomationOverviewPage-CcTGou9x-D6xWlI6r.js → ExpenseAutomationOverviewPage-c4H81maP-DA77wvgo.js} +9 -9
  69. package/dist/assets/{ExpenseAutomationPage-DEleaYKs-SFko_-SO.js → ExpenseAutomationPage-DoI_XKeY-6CiggPiF.js} +160 -160
  70. package/dist/assets/{ExpressPayPage-CLYzefaM-CHfIN-TO.js → ExpressPayPage-CjhXfVeX-BOKCYwCy.js} +12 -12
  71. package/dist/assets/{FeaturePreviewPage-T78A34---Cfgg_jhN.js → FeaturePreviewPage-CwrW_5lN-DmGMYSsi.js} +1 -1
  72. package/dist/assets/{FollowStepsSection-B_mTbqHf-CcoWV2SW.js → FollowStepsSection-DwVibYwI-v9hEOCV9.js} +6 -6
  73. package/dist/assets/{GlobalReviewListPage-XfxDC9vP-Bi-7QMiL.js → GlobalReviewListPage-JUSXRKq4-DVN5r0h7.js} +45 -45
  74. package/dist/assets/{InformationCardStack-Buibt8cT-DzjFUhjp.js → InformationCardStack-CK1Ztw1n-C4th25N4.js} +1 -1
  75. package/dist/assets/{InsightsCardStack-Cj5iIm_T-CnLFxYVI.js → InsightsCardStack-BKAezFjz-Dc6HzMco.js} +2 -2
  76. package/dist/assets/{InsightsSection-DuPqQb5Z-C8m7clcN.js → InsightsSection-Bauri5yR-CKFEflqf.js} +1 -1
  77. package/dist/assets/{IntegrationsSettingsPage-VZDSLMHK--2kEd_Ab.js → IntegrationsSettingsPage-CnRe_xH3-UkqXGmer.js} +9 -9
  78. package/dist/assets/{InternationalWireSwiftDetailsPage-BUa1svL--BjPRjytS.js → InternationalWireSwiftDetailsPage-BJkaLuNw-77-AaJID.js} +10 -10
  79. package/dist/assets/{InternationalWireVerificationPage-C1qKNhqJ-D8-rYzvp.js → InternationalWireVerificationPage-pPH2bNM7-BKQZ3C2I.js} +1 -1
  80. package/dist/assets/{InviteFormPage-GPXu2hLn-Dlxczoo1.js → InviteFormPage-CsL2egNG-DnYkx7hA.js} +1 -1
  81. package/dist/assets/{InvitePageListView-FEFeEFZJ-fGYpyL6r.js → InvitePageListView-rt3KC_c5-JZPrjnvG.js} +33 -33
  82. package/dist/assets/{InvitePeoplePage-C6E594rf-DZBpEScz.js → InvitePeoplePage-Cdr0dhtJ-QaKpYzAx.js} +4 -4
  83. package/dist/assets/{InvoiceUploadSection-uvB-_dyl-BnrUYuvf.js → InvoiceUploadSection-NVvtQvoL-B8iP_R_q.js} +1 -1
  84. package/dist/assets/{IssueChargeCardPage-DSPlu840-3aXsgWJG.js → IssueChargeCardPage-D5KenKnm-I0qHogFn.js} +13 -13
  85. package/dist/assets/{LabeledAddressValue-CzDn9ZY4-bnEz1Jxt.js → LabeledAddressValue-Bwkw-Ez_-QZs1bcqC.js} +1 -1
  86. package/dist/assets/{LabeledAddressValueField-C_8kPzjy-5OUHMeqd.js → LabeledAddressValueField-BgkRIdwJ-D68tBsFt.js} +2 -2
  87. package/dist/assets/{LabeledControlledCheckBoxField-LwfkGeF--D4JaYe7v.js → LabeledControlledCheckBoxField-RzyuT5ZX-BsFbzCeg.js} +1 -1
  88. package/dist/assets/{LabeledCreatableSingleSelectField-sEf-9BOE-pPbJFdXC.js → LabeledCreatableSingleSelectField-BP_p62Nk-BGV5p2pd.js} +2 -2
  89. package/dist/assets/{LabeledDocumentField-rGzXpShn-Cfh7MC5-.js → LabeledDocumentField-DGncRe-Q-BM_MF9Yy.js} +1 -1
  90. package/dist/assets/{LabeledDropDownFormattedTextField-CIQk7Jhu-BODJHkfO.js → LabeledDropDownFormattedTextField-DWUVcIR8-DmvGwPXC.js} +7 -7
  91. package/dist/assets/{LabeledText-Dc-697nR-dyJ4TshB.js → LabeledText-BzD_-lgI-Br_7nwt2.js} +1 -1
  92. package/dist/assets/{LabeledUserSingleSelectWithSubtitlesField-B0D7IWfA-CLizobZu.js → LabeledUserSingleSelectWithSubtitlesField-D3kjxF9V-C7cFlAui.js} +10 -10
  93. package/dist/assets/{LabeledZeniRolesDropDownField-BO8f1yqV-POb2k_D_.js → LabeledZeniRolesDropDownField-BlmybTGB-C8vefnXI.js} +25 -25
  94. package/dist/assets/{LinkJETransactionPage-DDSo8zJn-CupLOAYQ.js → LinkJETransactionPage-CUnfHHeT-BQ0Gfxk0.js} +9 -9
  95. package/dist/assets/{LockCardPage-CvZcUUc8-B6VLJ-gr.js → LockCardPage-2jOFCVkW-Cd-7Cld7.js} +19 -19
  96. package/dist/assets/{LowBalancePopup-DJQCz0Ed-B8IDUNee.js → LowBalancePopup-Du0kX_mJ-B-0Hf7BW.js} +2 -2
  97. package/dist/assets/{MagicLinkACHDetailsPage-CEtaoWk8-CST49L9m.js → MagicLinkACHDetailsPage-CkbNMu7Z-B4drRgdG.js} +1 -1
  98. package/dist/assets/{MagicLinkDomesticWireDetailsPage-qdgMQR3_-DWvT9O1j.js → MagicLinkDomesticWireDetailsPage-D0XBf5_X-D4YEFAaf.js} +1 -1
  99. package/dist/assets/{MagicLinkInternationalWireDetailsPage-DNwtPZ-u-Bk0G3IwE.js → MagicLinkInternationalWireDetailsPage-Bl93T-SF-DbfMD1IO.js} +1 -1
  100. package/dist/assets/{MagicLinkSuccessPage-60TBVrSw-CKgQ4p6j.js → MagicLinkSuccessPage-C26glp7T-BbSy9weN.js} +2 -2
  101. package/dist/assets/{MagicLinkTitleSection-D2fXbnDV-CA6SEdmn.js → MagicLinkTitleSection-B4nxLzap-CM0lHGYk.js} +1 -1
  102. package/dist/assets/{MailingDetailsSection-C6cVooC3-CCSD5vtq.js → MailingDetailsSection-Cou_W8JF-D0QplON-.js} +1 -1
  103. package/dist/assets/Menu-CdF7UWPF-DT1TTbqS.js +17 -0
  104. package/dist/assets/{MyBankConnectionsSettingsPage-D2EPH9WZ-DhQP4OT2.js → MyBankConnectionsSettingsPage-BAjjxA98-P3jZBDkg.js} +5 -5
  105. package/dist/assets/{MyPendingActivationChargeCardListPage-Bidsd2bk-DJBBvD6g.js → MyPendingActivationChargeCardListPage-DsRGcA8F-BiAy3gfH.js} +1 -1
  106. package/dist/assets/{MyProfileSettingsPage-BH2ZVQTk-DMG3qFrn.js → MyProfileSettingsPage-y-iZgUqL-Cmq9Fbc9.js} +6 -6
  107. package/dist/assets/{NavBarWithPicker-Cg2TZjBi-DZVc5NBz.js → NavBarWithPicker-ph4heJns-CH6-ZGCk.js} +4 -4
  108. package/dist/assets/{NavigationArrow-CYserS2B-DdYPXfvg.js → NavigationArrow-BojAUI53-DuIW3OB3.js} +1 -1
  109. package/dist/assets/{NavigationDots-CT_oO_7z-Bt9KzB5Z.js → NavigationDots-Bf66leAL-DWvE0Tr9.js} +1 -1
  110. package/dist/assets/{NewGlobalMerchantPage-D3MQU5Sh-BUpZMSnV.js → NewGlobalMerchantPage-D43XJhIa-CGBQEE1e.js} +5 -5
  111. package/dist/assets/{NoDataChart-BItQZAQ9-a5HKjWqu.js → NoDataChart-6R5pxJVo-CWkI_hu9.js} +1 -1
  112. package/dist/assets/{NoDataTable-R8OCdB2c-cDhvp6Rg.js → NoDataTable-CNx0KCKn-Yxxqzyz6.js} +1 -1
  113. package/dist/assets/{NotFoundPage-DLHYdRdN-xXzpa00n.js → NotFoundPage-CE9BW_aV-BJq9qwHQ.js} +1 -1
  114. package/dist/assets/{NotificationSettingsPage-CIwxb6c9-FsYdgXX7.js → NotificationSettingsPage-etN6HEwO-CPu8hoID.js} +12 -12
  115. package/dist/assets/{NotificationsListConfig-DSgUS0hE-mwmsOI0p.js → NotificationsListConfig-15ae4nik-CPKCivw4.js} +1 -1
  116. package/dist/assets/{NotificationsPage-W5ZhprRe-DZn-eWsJ.js → NotificationsPage-BwbxqKxd-CJ_w7jhJ.js} +23 -23
  117. package/dist/assets/{OpExByVendorPage-DIi58wXa-nKCVWs3g.js → OpExByVendorPage-FR3oloXp-BIjz5fFP.js} +24 -24
  118. package/dist/assets/{OverlayContainerPage-BsY9_22w-CFGZ7LWs.js → OverlayContainerPage-CrZuT2Jj-BFQOGYGF.js} +1 -1
  119. package/dist/assets/{PandLWithForecastPage-BvMxFrqo-D4f9n7Zm.js → PandLWithForecastPage-Bx3ZyA3l-DeFHP0VX.js} +7 -7
  120. package/dist/assets/{PaymentAccountSetupBillingAddressSection-kUAm-v-A-BSna9XIu.js → PaymentAccountSetupBillingAddressSection-R1O20DhA-C65ZHllw.js} +6 -6
  121. package/dist/assets/{PeoplePage-CtnWc0LE-B3_lhERY.js → PeoplePage-B3HRaJWz-DZIUGp3j.js} +15 -15
  122. package/dist/assets/{ProductsCarousel-n0ZNrr7--DQIbkMZp.js → ProductsCarousel-Dn4vuZwM-XZC4Gi6v.js} +4 -4
  123. package/dist/assets/{PromoBaseCards-CeS0HoCZ-CICve0tH.js → PromoBaseCards-BKo4wO-U-UIjavA07.js} +1 -1
  124. package/dist/assets/{QBOConnectionDialog-BxSTc99Z-DVq4lO-s.js → QBOConnectionDialog-CPq0aUew-DHwaU-lE.js} +5 -5
  125. package/dist/assets/{QBOSetupSection-FrO9rgct-B0n-bnvz.js → QBOSetupSection-BjImTh7O-Cf73veGI.js} +11 -11
  126. package/dist/assets/{ReimbursementApprovalRuleDetailPage-BjtdatXs-DvpYlYpI.js → ReimbursementApprovalRuleDetailPage-DD1HwLO0-DBTNMi4-.js} +1 -1
  127. package/dist/assets/{ReimbursementApprovalRulesPage-B0_FgpJf-BSGUtiNs.js → ReimbursementApprovalRulesPage-DHQHS0eD-l5f43j6l.js} +1 -1
  128. package/dist/assets/{ReimbursementDetailPage-BWhPxHY--DgkbtFUt.js → ReimbursementDetailPage-DiMXs0_o-C-Gngkni.js} +7 -7
  129. package/dist/assets/{ReimbursementPromoPage-CFG0yxOE-CNHt16Bv.js → ReimbursementPromoPage-BinqJ3lR-Dkzvoe2N.js} +5 -5
  130. package/dist/assets/{ReimbursementSetUpPage-BmUdLEa9-uEaDyTyL.js → ReimbursementSetUpPage-BD6B-0CO-Dhg43o5f.js} +17 -17
  131. package/dist/assets/{ReimbursementsBulkReviewDrawerPage-CkJqhXEf-B4qPeVNR.js → ReimbursementsBulkReviewDrawerPage-DK-nCoay-BC-GO3CD.js} +1 -1
  132. package/dist/assets/{ReloadCard-CNKwqjPJ-C6w7GHJG.js → ReloadCard-Bt8qxAUx-C0FiLSzB.js} +1 -1
  133. package/dist/assets/{ReportTableViewSelector-B0DXgLgJ-B3X9gS-3.js → ReportTableViewSelector-Dv7BwM1q-DZ-FOl5q.js} +6 -6
  134. package/dist/assets/{ReportsPage-C5iOQU55-DamkEztw.js → ReportsPage-BOY8oCAr-BwR5MVzD.js} +5 -5
  135. package/dist/assets/{RevenueChart-C2CMFAQ--BirLMW85.js → RevenueChart-D_yexiAR-D3rVopXP.js} +16 -16
  136. package/dist/assets/{ReviewDetailsPage-5vOZ0rd7-B41AzmWH.js → ReviewDetailsPage-Czrlb8BL-DTI9py46.js} +14 -14
  137. package/dist/assets/{ReviewOverlay-BAG_6iyV-B2w-MEIV.js → ReviewOverlay-BHUy3fWf-DhycJa32.js} +10 -10
  138. package/dist/assets/{RoleWithToolTip-GUYLjJwW-DVSFtUus.js → RoleWithToolTip-BxI2nAro-CHrHR5C8.js} +4 -4
  139. package/dist/assets/{ScheduleDetailsFixedAssetsPage-sPjMfOtt-m5JvZNFh.js → ScheduleDetailsFixedAssetsPage-DsNhFGrc-C7120rgv.js} +8 -8
  140. package/dist/assets/{ScheduleDetailsPage-DI4C0o6b-B7Dooc-N.js → ScheduleDetailsPage-Dy2poGsp-B72mEOku.js} +4 -4
  141. package/dist/assets/{ScheduleSequenceTable-DhXwtG-x-C20E6-vV.js → ScheduleSequenceTable-Bv1feMZc-DEmwzIZ-.js} +47 -47
  142. package/dist/assets/{ScreenRoutes-B_yySVlk.js → ScreenRoutes-aw0OxNGj.js} +1 -1
  143. package/dist/assets/{SetUpAccountSection-DOavnCkG-CmcaONdQ.js → SetUpAccountSection-SSkLhU2W-Bdvkba2v.js} +14 -14
  144. package/dist/assets/{SignIn-DqrG5nEJ-8MVRrbiA.js → SignIn-Chuf9_2E-Dg9U6pWl.js} +10 -10
  145. package/dist/assets/{SignInScreen-CSh4OzXN.js → SignInScreen-heeiIDQc.js} +1 -1
  146. package/dist/assets/{SpendManagementListViewPage-DHY_hZQm-C3jihmoK.js → SpendManagementListViewPage-BpCZzQ7I-CeMMhyUX.js} +8 -8
  147. package/dist/assets/{SpendManagementPerTabPage-CoKTIQ2b-D2j2J6zW.js → SpendManagementPerTabPage-DbXTM50B-DF3kTGNr.js} +32 -32
  148. package/dist/assets/{SpendManagementSection-UkTY6qX0-CST6kY6m.js → SpendManagementSection-BMU1BTEo-BBFzWPwD.js} +12 -12
  149. package/dist/assets/{StatementItem-Bx6mxa3U-C42zKfqY.js → StatementItem-qLZEMVrM-C5sUBNaG.js} +5 -5
  150. package/dist/assets/{StatementsPage-ULjFE30P-BGU6QX6B.js → StatementsPage-B3qY1D4K-C1V6A2Qk.js} +1 -1
  151. package/dist/assets/{StatusSwitcher-DlBY_FC1-C1Bsm00T.js → StatusSwitcher-xQ_AW7ze-DWj9eTCE.js} +1 -1
  152. package/dist/assets/{SubTabSwitcher-DjEElTWE-5Wo1Obau.js → SubTabSwitcher-w8vLc-35-BeFKfmS8.js} +1 -1
  153. package/dist/assets/{SummaryCard-BNESDUnN-ChwTCNZM.js → SummaryCard-CTq_yqTg-Bw75z4He.js} +1 -1
  154. package/dist/assets/{TaskManagementPage-BFF3ATPV-BYvPz4hv.js → TaskManagementPage-keXFNmIv-BEMVU9l6.js} +33 -33
  155. package/dist/assets/{TimeRangeSwitcher-xILz-EO6-DqqNb5IN.js → TimeRangeSwitcher-C4Tph63B-D9xSXRlF.js} +2 -2
  156. package/dist/assets/{TimeframeSwitcher-CZhQm7rH-D5h04PEF.js → TimeframeSwitcher-LLgotbh8-X4qFRStD.js} +1 -1
  157. package/dist/assets/{TimeframeSwitcherWithToggle-CduB3ZjN-PiqhKHhY.js → TimeframeSwitcherWithToggle-Cw3a9d0I-BlbsDDpn.js} +1 -1
  158. package/dist/assets/{TopExCard-C_HWsAL1-DphCzqA5.js → TopExCard-Dj0wtF6g-CdD53hxs.js} +3 -3
  159. package/dist/assets/{TopExDetailPage-BEKo6juU-CUrrRqCk.js → TopExDetailPage-JutaMmtR-koGwO2ev.js} +5 -5
  160. package/dist/assets/{TransactionDetailPage-Bzgtmi3U-DCXvClem.js → TransactionDetailPage-BdFHqSCv-Bc3ggi0n.js} +30 -30
  161. package/dist/assets/{TransactionList-Dw78Q0Sx-BHAN7axA.js → TransactionList-C85wyFeI-C41EirGp.js} +4 -4
  162. package/dist/assets/{TransactionListBig-BofakL17-k36ZTqo_.js → TransactionListBig-DPev2-Mm-BpW_w096.js} +6 -6
  163. package/dist/assets/{TransactionListPage-tpOg0ax5-aeL9weeE.js → TransactionListPage-D127NU4T-BPyAfJzu.js} +4 -4
  164. package/dist/assets/{TransactionVendorDetailPage-BqIcXz6b-tGgvKqD0.js → TransactionVendorDetailPage-BJ1YnPif-SJ1gb7FN.js} +5 -5
  165. package/dist/assets/{TransferDrawerPage-DnnZBOyK-y1PDtTFY.js → TransferDrawerPage-DcrfmXH1-DiL_C6V9.js} +21 -21
  166. package/dist/assets/{TreasuryOverviewPage-C9ROzNHl-Cn6eazlN.js → TreasuryOverviewPage-D-Zw4Npq-K2RbtXZZ.js} +22 -22
  167. package/dist/assets/{TreasuryPromoPage--j_2YjQn-DHIwXCO0.js → TreasuryPromoPage-BhBPhhbb-DM-0mrYZ.js} +131 -131
  168. package/dist/assets/{TreasuryStatementsPage-BLrceDQm-vMicHzmk.js → TreasuryStatementsPage-Dxjg_QN7-C_fsR-Na.js} +1 -1
  169. package/dist/assets/{TreasuryTaxLetterPage-BoqkgdLm-DAQeQUTC.js → TreasuryTaxLetterPage-Dm552RDZ-BLLWDMsm.js} +7 -7
  170. package/dist/assets/{TrendChart-KnFi8NXQ-DHzaDtQY.js → TrendChart-_c8z5Kxm-DarAZz3o.js} +1 -1
  171. package/dist/assets/{TrendWithTransactions-C_T0I9xe-DqS7m8LH.js → TrendWithTransactions-B2rde1MW-D1twJg_e.js} +4 -4
  172. package/dist/assets/{UncategorizedAccountsMappingPage-DOuzy2aS-DnfCgWVE.js → UncategorizedAccountsMappingPage-77nkQFar-Bn3Ibb9A.js} +1 -1
  173. package/dist/assets/{UnitIntegrationPage-DxhlNHvt-CHN5Qw88.js → UnitIntegrationPage-3_YMV_f4-yfDaiCvi.js} +4 -4
  174. package/dist/assets/{UploadAdditionalDocumentOverlay-BAvSyhDW-D4KE1Kke.js → UploadAdditionalDocumentOverlay-D72fkcgM-BkIuCEEz.js} +1 -1
  175. package/dist/assets/{Vendor2FAPopup-BFjVFON8-Dl6jzAdP.js → Vendor2FAPopup-DLbGF5_q-DmCvA6XI.js} +1 -1
  176. package/dist/assets/{VendorACHDetailsPage-8BG5DD-0-p3vm6zDD.js → VendorACHDetailsPage-CaNQylEA-CMyzxyGW.js} +1 -1
  177. package/dist/assets/{VendorDetailPage-C16CrNJo-D86vTvj2.js → VendorDetailPage-DqdH4UMj-tM-8a-UX.js} +18 -18
  178. package/dist/assets/{VendorDomesticWireDetailsPage-DXhugXZa-DeVAnksE.js → VendorDomesticWireDetailsPage-9pyV_r_g-CREdXXXG.js} +1 -1
  179. package/dist/assets/{VendorFiling1099EditablePage-2QPpdbuN-ozpxZwEp.js → VendorFiling1099EditablePage-nb9_V73Z-CwrDCXoq.js} +32 -32
  180. package/dist/assets/{VendorFirstReviewPage-DLshEh_s-DbpLTolM.js → VendorFirstReviewPage-C2RjaA8x-C3EURG-_.js} +58 -58
  181. package/dist/assets/{VendorInternationalWireDetailsPage-_WoNgw66-DANrlPFU.js → VendorInternationalWireDetailsPage-VOAgofls-DxNfQmbI.js} +1 -1
  182. package/dist/assets/{VendorInternationalWireSwiftDetailsPage-Dyt1ZPOh-DoVwF0sT.js → VendorInternationalWireSwiftDetailsPage-CcRuLO-_-CRRJCsCk.js} +1 -1
  183. package/dist/assets/{VendorsAccountsSection-Dxq0YSgP-Bt8xoh_f.js → VendorsAccountsSection-RzVUJ8IV-CIdzas-R.js} +14 -14
  184. package/dist/assets/{VerifyDevice-DEwEqoHA-CylVN9FP.js → VerifyDevice-DUxQHfLf-DyoufOtx.js} +1 -1
  185. package/dist/assets/{VideoPlayer-_1Msrww9-DaiS1R42.js → VideoPlayer-BxuhQQfM-CSaCo4fi.js} +1 -1
  186. package/dist/assets/{VideoPopup-BzQ_Dl9b-mwrODjDA.js → VideoPopup-DdtmLcPB-9kSPQrRF.js} +1 -1
  187. package/dist/assets/{WarningsDrawerPage-CMBST3p1-ujIyTaCb.js → WarningsDrawerPage-DC5ophK0-B9MWpL_5.js} +5 -5
  188. package/dist/assets/{ZeniAccountDetailPage-DVLYYC-q-DeZb5ud9.js → ZeniAccountDetailPage-C1KKeyYC-AmZ_-UbH.js} +14 -14
  189. package/dist/assets/{ZeniAccountListViewPage-BHkoMOx5-CtDb7Bzx.js → ZeniAccountListViewPage-Bw5_2Q-c-Zl0NVbWL.js} +1 -1
  190. package/dist/assets/{ZeniAccountNavBarPieces-CCFzNOcx-CuAvs6Mv.js → ZeniAccountNavBarPieces-DlfwFtOB-BhG7WDho.js} +3 -3
  191. package/dist/assets/{ZeniAccountPromoPage-C3Rl-hWL-DwIvVxTo.js → ZeniAccountPromoPage-B8cXf7Ni-BGYao9Jv.js} +13 -13
  192. package/dist/assets/{ZeniAccountSetupPage-Bf1OOF0Q-DBu-8Ie5.js → ZeniAccountSetupPage-Cae0pB-b-Blr8FOsP.js} +3 -3
  193. package/dist/assets/{ZeniCopyright-CdqD8vO4-DYRLQn9Q.js → ZeniCopyright-gTS4uZlF-BTYFdkhV.js} +1 -1
  194. package/dist/assets/{ZeniTransferAmountSlider-BTudpQjV-CvoGRB0t.js → ZeniTransferAmountSlider-17kY7kNO-DEs9IrPm.js} +1 -1
  195. package/dist/assets/{analyticsHelper-_u1yj9ge-DxpjUhrt.js → analyticsHelper-DXVBA0aW-q_4bVB8v.js} +1 -1
  196. package/dist/assets/analyticsHelper-kRUwHHg6.js +1 -0
  197. package/dist/assets/{chartTypes-vQ8GTDEq-DTt3gea6.js → chartTypes-BXBHlosV-DY5SgOjH.js} +1 -1
  198. package/dist/assets/{commonDimensions-znFHURNY-BydE4i8M.js → commonDimensions-Bm2CSHrw-S9XM9nhL.js} +1 -1
  199. package/dist/assets/{detailCommon-DmLhlrjU-ShYTQ7m2.js → detailCommon-VW4xegQy-1DhxNuRe.js} +3 -3
  200. package/dist/assets/{downloadPdf-CCUPfpyu-Cq1M0ik1.js → downloadPdf-DUAAPKqC-BN9D0Y0M.js} +1 -1
  201. package/dist/assets/{index-XNBiWrYj.js → index-BS0RW8dr.js} +3698 -3698
  202. package/dist/assets/{mapLoadingInProgressToTreeNode-Cw74bTou-BDMlWcL7.js → mapLoadingInProgressToTreeNode-D5WZ1WGx-B7azUcXb.js} +1 -1
  203. package/dist/assets/{mapSectionWithAcOnlyToTreeNode-CWFxnMpB-BCzyYlDf.js → mapSectionWithAcOnlyToTreeNode-BxzLwMCb-DSGmyD1M.js} +1 -1
  204. package/dist/assets/{mapSpacerToTreeNode-JUrBuZAz-wZclqNi-.js → mapSpacerToTreeNode-CScyNZ9s-wlC4VP1v.js} +1 -1
  205. package/dist/assets/{mapTimeframeBalancesToTreeNode-B2iYfeF3-B53qunPl.js → mapTimeframeBalancesToTreeNode-Caj8eqsL-Kzqcpw75.js} +1 -1
  206. package/dist/assets/{mapTimeframeBalancesToTreeNode-BbQHYZk7-DpCyCcLg.js → mapTimeframeBalancesToTreeNode-CdVqeC27-Dxhi6BEZ.js} +1 -1
  207. package/dist/assets/{mapTimeframeHeaderLoadingInProgressToTreeNode-BeqGSN9x-CoS9pLIE.js → mapTimeframeHeaderLoadingInProgressToTreeNode-CUFXYz6j-YXXdz_Ql.js} +1 -1
  208. package/dist/assets/{toCOABalancesWithID-DeZfEmbT-vM-pgltN.js → toCOABalancesWithID-CqzWoD-C-D32cGljj.js} +1 -1
  209. package/dist/assets/{toChartData-KibzV7pa-DRJVLoY0.js → toChartData-X878W8tN-DZEeyq4i.js} +1 -1
  210. package/dist/assets/{uploadAttachment-U9nX0Ka9-1qW3wdO3.js → uploadAttachment-DNKgJox4-CH4FqFzC.js} +13 -13
  211. package/dist/assets/{uploadReceipts-CDPM7zcb-DEOGBGdq.js → uploadReceipts-Bkf_PaOH-DrwBt5Yx.js} +1 -1
  212. package/dist/index.html +1 -1
  213. package/package.json +3 -3
  214. package/dist/assets/ApprovalRulesSettingsPage-BOJE5Fb_-DykJvECT.js +0 -47
  215. package/dist/assets/ArAgingDetailPage-ZjaiAH-C-DY8qSTjK.js +0 -46
  216. package/dist/assets/CreateOrEditVendorPage-flCFtC2N-Dsf2hlMT.js +0 -281
  217. package/dist/assets/CustomerOnboardingContainerPage-DZ9vkiEO-ah6dg727.js +0 -1
  218. package/dist/assets/CustomerOnboardingPage-C12XXjv0-mi5gJ6u3.js +0 -107
  219. package/dist/assets/DepositAccTransactionListPage-keSFBKDU-qnysSla9.js +0 -66
  220. package/dist/assets/Menu-D_6Dje0H-Ar5SwcnV.js +0 -17
  221. package/dist/assets/analyticsHelper-D23HZgYu.js +0 -1
@@ -1,8 +1,8 @@
1
- import{Q as On,av as Fn,e as En,gb as _n,gc as Zn,gd as Wn,ge as Kn,ca as Vn,aN as Gn,F as Un,y as u,V as t,f2 as rt,f3 as Xn,o as a,f4 as Hn,f5 as Qn,aK as b,f6 as qn,aL as $e,f7 as Jn,bz as st,bm as dt,dv as ct,cm as pt,cn as mt,co as ut,gf as Yn,gg as ea,gh as ta,gi as na,fc as I,fd as $,fe as A,gj as k,fb as aa,b as yt,p as ie,ff as Nt,fg as ia,fh as la,fi as oa,gk as ra,gl as sa,aO as da,an as ht,bQ as we,gm as ca,gn as L,u as r,ah as pa,b$ as ma,go as ua,_ as ya,gp as ha,gq as bt,fm as gt,B as ba,d0 as ga,cf as xa,b5 as fa,b7 as wa,d as Ta,bS as Lt,gr as va,ag as Ot,aW as Da,b3 as ja,br as Ia,eM as $a,ak as Aa}from"./index-XNBiWrYj.js";import{a as p}from"./core-3dlyNYRL.js";import{n as i}from"./mui-bYXq4XMS.js";import{a as ka}from"./liveblocks-DIep7fJd.js";import{bR as Sa,bO as Ca,bS as Pa,fI as Ba,bQ as Ra,bK as za,bj as Ma}from"./zeni-epic-state-LPACxnXP.js";import{o as Na,t as La}from"./LowBalancePopup-DJQCz0Ed-B8IDUNee.js";import"./sentry-o6h_D-9x.js";import"./lottie-DEE24l2z.js";import"./analytics-zoE7Zcxt.js";import"./recharts-BHhx6CLo.js";import"./utils-uDUqNRFY.js";import"./lexical-DPEnH3HH.js";const Oa=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"})))),Fa={formTitle:new ba("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:Ea,common:{noText:C,strings:{empty:d},currency:xt,via:_a,more:Za,edit:Wa},spendManagement:{billPay:{billDetails:n,billsByTabs:Ae,bulkActions:ft,vendorCreation:wt,insufficientFunds:Ft}},collaboration:{threads:{placeholder:Tt,tooltip:vt,title:{comments:Ka}}}}=Un.getLocalizedStrings(),Te=Ea.visual.MMMDCommaYYYYformat,Mi=({billDetails:e,currentTenant:x,showApproveRejectBtns:g,isShowDeletedBillsEnabled:W,signedInUser:le,isAdmin:Et,isRealTimeApprovalEnabled:_t,isInternationalPaymentShaVsOurEnabled:Zt,hasZeniAssistAccess:Wt,analytics:M,showMarkAsPaidButtonToCreator:K,showMarkAsPaidButtonToApprover:ke,isBillPayCommentingEnabled:Se,isZeniUser:Kt,showBackButton:Ce=!0,isDetectInsufficientFundsEnabled:Vt,redirectToEditableBillScreen:Gt,redirectToBillsScreen:Q,discardBillDetailsFromLocalStore:Pe,deleteBill:Ut,cancelAndDeleteBill:Be,approveOrRejectBill:Re,onAddNewRule:Xt,onAttachmentClick:ze,saveBillDetails:Ht,discardOutsideZeniPaymentData:Qt,onBackClick:Me,updateEditRealTimeApproverClicked:qt,onSaveRealTimeApprovals:Jt,onRetryPaymentClick:Yt,onRefundPaymentClick:en})=>{const l=On(),o=Fn(),Ne=En(),[tn,V]=p.useState(!1),[Le,oe]=p.useState(!1),[re,se]=p.useState(!1),[Oe,de]=p.useState(!1),[nn,ce]=p.useState(!1),[Fe,q]=p.useState(!1),h=e.transactionDetails?.id,an=Kt?_n:Zn,{requestToOpenThread:pe,setRequestToOpenThread:Ee,setOpenThread:J}=p.useContext(an),[ln,G]=p.useState(!1),T={application:"dashboard",companyId:o.currentTenant?.companyId,tab:"bill",entityId:h,isGlobalComment:!1},{threads:U,isLoading:P}=Wn(T,"both",!1),f=Se&&h!=null,_e=p.useMemo(()=>h==null?[]:U.filter(c=>c.resolved===!1&&!c.id.includes(Kn)),[U,h]).length,v=`dashboard_${o.currentTenant?.companyId}`,on=p.useCallback((c,y)=>{J(y),G(!1)},[J,G]);p.useEffect(()=>{pe?.threadId!=null&&U.length>0&&!P&&(J(pe.threadId),Ee(null))},[pe,U,P,J,Ee]),Vn({componentName:"bill.details"});const[N,Y]=p.useState({title:"",description:"",primaryButtonText:"",secondaryButtonText:""}),[Ze,We]=p.useState("approved"),[rn,Ke]=p.useState(!1),[sn,Ve]=p.useState(!1),[Ge,Ue]=p.useState(!1),Xe=()=>Ke(!1),dn=()=>Ke(!0),He=Gn(e.zeniAssist?.refundStatus.fetchState),ee=p.useCallback(()=>{Q()},[Q]);p.useEffect(()=>{(e.deleteStatus.fetchState==="Completed"||e.approvalUpdateStatus.fetchState==="Completed"||e.cancelAndDeleteStatus.fetchState==="Completed"||e.billSaveStatus==="Completed")&&(Pe(),Q())},[e,Q,Pe]),p.useEffect(()=>{He==="In-Progress"&&(e.zeniAssist?.refundStatus.fetchState==="Completed"||e.zeniAssist?.refundStatus.fetchState==="Error")&&(se(!1),ee())},[He,e.zeniAssist?.refundStatus,ee]);const w=e.transactionDetails?.billPayInfo.stage,te=e.transactionDetails?.billPayInfo.billStatus,X=e.transactionDetails?.billPayInfo.billPaymentStatus,cn=e.transactionDetails?.billPayInfo.billPaymentRefundStatus,me=w?.code==="paid",D=me?w:te?.code=="approved"&&X?.code?X:te,S=Va(D,e.transactionDetails),O=e.transactionDetails?.billPayInfo.isRefundInitiated===!0?cn:X?.code!=null&&(te?.code=="approved"||X.code==="mark_as_paid")?X:te,ue=e.transactionDetails?.vendor?.name,B=e.isRecurring,Qe=()=>{e.transactionDetails?.id!=null&&Gt(e.transactionDetails?.id??"")},pn=()=>{Y({title:B?n.recurringBill.deleteRecurringTitle:n.deleteBillTitle,description:B?n.recurringBill.deleteRecurringAlertText:n.deleteAlertDescription,primaryButtonText:n.delete,secondaryButtonText:n.cancel}),V(!0)},mn=()=>{Y({title:n.cancelBillTitle,description:n.cancelAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),V(!0)},un=()=>{Y({title:B?n.recurringBill.cancelAndDeleteRecurringTitle:n.cancelAndDeleteBillTitle,description:B?n.recurringBill.cancelAndDeleteRecurringAlertText:n.cancelAndDeleteAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),V(!0)},yn=()=>{M.trackRefundClick(D?.code??"",w?.code??"",O?.description??"",B?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),Y({title:n.zeniAssist.refundTitle,description:n.zeniAssist.refundDescription,primaryButtonText:n.zeniAssist.proceed,secondaryButtonText:n.cancel}),se(!0)},hn={onOkClick:()=>{V(!1),N.primaryButtonText===n.delete?Ut?.(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&&(M.trackRefundConfirmClick(D?.code??"",w?.code??"",O?.description??"",B?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),en())},onCancelClick:()=>{V(!1),se(!1)}},bn={onOkClick:c=>{ce(!1),Re({billId:e.transactionDetails?.id??"",type:"rejected",description:c})},onCancelClick:()=>{ce(!1)}},gn=()=>{const[c]=Da("ZeniAssist");return c!=null?t.jsx(ja,{"data-testid":b("bill-details-zeni-assist-icon",h),onClick:()=>{de(!Oe),M.trackZeniAssistClick(D?.code??"",w?.code??"",O?.description??"",B?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"")},style:{width:`${a.sp5}`,height:`${a.sp5}`,marginBottom:`${a.sp2}`},animationData:c,loop:!0,play:!0,rendererSettings:{preserveAspectRatio:"xMidYMid slice"}}):null},ne={invoiceNumber:e.transactionDetails?.documentId??"",invoiceDate:e.transactionDetails?.date,billDueDate:e.transactionDetails?.dueDate,memo:e.transactionDetails?.memo,currencyCode:e.vendorCurrency??xt.currencyCode},ye=e.transactionDetails?.lines?.map((c,y)=>{const R=c;return{lineIndex:y,lineId:R.id,account:R.account,class:R.class,amount:R.amount.amount,billable:R.billable,customer:R.customer,lineDescription:R.lineDescription,recipientAmount:R.recipientAmount?.amount}})??[],xn=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},j=m.labelWidth.value(l),fn=c=>c==="billable"||c==="has_been_billed"?n.yes:n.no,wn=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):"",Tn=s.paymentToBankAccount?.bankAccountName!=null&&s.paymentToBankAccount?.bankAccountName!=""?s.paymentToBankAccount?.bankAccountName:`${e.transactionDetails?.vendor?.name} - ${s.paymentToBankAccount?.bankName} XXXX${wn}`,vn=e.transactionDetails?.billPayInfo?.isCollectToAccountInfoFromVendorContact?t.jsxs(t.Fragment,{children:[`${n.magicLink.collectFrom} ${e.transactionDetails?.billPayInfo?.toAccountVendorEmail}`,t.jsx(fi,{windowSize:l,children:t.jsx(xi,{})})]}):void 0,qe=e.transactionDetails?.date!=null&&e.transactionDetails.bookCloseDate!=null&&e.transactionDetails.date.isBefore(e.transactionDetails.bookCloseDate),Dn=()=>`${wt.achDetails.bankRoutingNumber} ${s?.paymentToBankAccount?.bankRoutingNumberAch}, ${s?.paymentToBankAccount?.bankName}
2
- ${wt.achDetails.bankAccountNumber} ${s?.paymentToBankAccount?.bankAccountNumber}`,ae=e.transactionDetails?.billPayInfo!=null?Sa(e.transactionDetails?.billPayInfo):void 0,jn=ae!=null&&e.paymentMethodType?.maxPeriod?.value!=null?Ca(Pa(ae?.toDate(),[0,6],e.paymentMethodType?.maxPeriod.value).toDateString()):void 0,Je=e.transactionDetails?.billPayInfo.expectedDepositDate??jn,Ye=rt(s?.paymentType?.method??"").replace("Same Day",""),In=(s?.paymentToBankAccount!=null||s?.paymentToPI)!=null?n.addedByZeni:e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact?t.jsx(Xn,{paymentTypeLabel:Ye,onClick:dn,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(va,{paymentType:s?.paymentType?.method,paymentDate:e.transactionDetails?.billPayInfo.paymentDate}):null,et=e.transactionDetails?.lines?.some(c=>{const y=c.account;return y?.isDeleted===!0&&y?.isBillEditableCoaAccountType===!1})??!1,be=!(D?.code==="processing"||e.transactionDetails?.billPayInfo.isRefundInitiated===!0||e.transactionDetails?.billPayInfo.isRefundComplete===!0||(w?.code==="scheduled"||w?.code==="pending_approval")&&et),tt=!((w?.code==="scheduled"||w?.code==="pending_approval")&&et),ge=e.zeniAssist?.isEligibleForRetryIBT===!0||e.zeniAssist?.isEligibleForRetryOBP===!0,xe=e.zeniAssist?.isEligibleForRefund===!0,An=e?.transactionDetails?.billPayInfo.billPaymentMethodType.code==="wire"&&e?.transactionDetails?.billPayInfo.billPaymentMethodType.subCode==="international",kn=Wt&&e.transactionDetails?.billPayInfo.billPaymentStatus.code!=null&&["failed","cancelled","returned"].includes(e.transactionDetails.billPayInfo.billPaymentStatus.code)&&(ge||xe)&&An===!1,fe=ge||xe,Sn=e.transactionDetails?.billPayInfo.isRefundInitiated===!0&&e.transactionDetails?.billPayInfo.isRefundComplete===!1,E=D?.code,Cn=!Sn&&(!qe||D?.code==="processing"&&!B),nt=!qe,at=["small","medium-compact","medium-regular"].includes(l),H=Ba(e.transactionDetails?.bulkProcessingDetail?.type),F=Ra(e.paymentMethodType?.method),Pn=!H&&(E!=="processing"&&tt||E==="processing"&&!B||E==="processing"&&nt||g&&F&&ke),Bn=c=>{M.trackBillPayMarkAsPaidSubmit(c.paymentMode??"other",w?.code??"",D?.code??""),Ht(!0,Ge,c)},it=()=>{Ve(!0),M.trackBillPayMarkAsPaid(w?.code??"",D?.code??"")},Rn=()=>{Ue(!0),it()},zn=()=>{Qt(),Ve(!1),Ge&&Ue(!1)},Mn=p.useMemo(()=>({companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,entityType:"bill.details",entityId:h??d,isGlobalComment:!1,application:"dashboard",tab:"bill",url:window.location.href}),[o.currentTenant,h]),_=Vt&&e.transactionDetails?.totalAmountWithFeesInUSD!=null&&w?.code!=="paid"&&D?.code!=="failed"&&D?.code!=="processing"&&D?.code!=="cancelled"&&D?.code!=="returned"&&D?.code!=="rejected"?Hn(e.transactionDetails?.totalAmountWithFeesInUSD,e.withdrawFrom,s.paymentDate):void 0,lt=()=>{We("approved"),Fe===!0&&q(!1),_!=null&&M.trackLowBalanceAccountApprove(w?.code??"",e.transactionDetails?.billPayInfo.billPaymentStatus.code??"",e.isRecurring?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"",gt(o.loggedInUser),e.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account"),Re({billId:e.transactionDetails?.id??"",type:"approved"})},Nn=()=>{We("rejected"),_!=null&&M.trackLowBalanceAccountReject(w?.code??"",e.transactionDetails?.billPayInfo.billPaymentStatus.code??"",e.isRecurring?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"",gt(o.loggedInUser),e.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account"),ce(!0)},ot=p.useRef(null);return t.jsxs(li,{windowSize:l,ref:ot,children:[t.jsx(Qn,{anchor:"right",open:rn,onClose:Xe,transitionDuration:250,"data-testid":b("vendor-email-preview-drawer"),children:t.jsx(qn,{companyName:Jn(x.company?.companyInfo),vendor:e.transactionDetails?.vendor?.name,paymentDate:s.paymentDate?.format(Te)??"",paymentType:Ye,amount:$e("0,0.[00]",he),isInvoiceAttached:!!e.transactionDetails?.attachments?.length,onClose:Xe})}),t.jsxs(di,{windowSize:l,children:[t.jsx(vi,{windowSize:l,children:l==="small"?t.jsx(st,{"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(kt,{windowSize:l,children:[f?t.jsxs(zt,{isDisabled:P,"data-testid":b("bill-comment-button"),onClick:P?()=>null:c=>{c.preventDefault(),c.stopPropagation(),G(!0),M.trackCommentActivity("bill","clicked",o.currentTenant?.companyName??"",o.controllersList.controllers.map(y=>ct(y)),void 0,void 0,"page icon")},children:[t.jsx(dt,{count:P?void 0:_e,isLoading:P,style:{left:"12px"}}),t.jsx(Mt,{})]}):null,t.jsx(St,{onClick:()=>ee(),"data-testid":b("bill-detail-nav-bar-small-close-button"),children:t.jsx(At,{})})]}),leftSideComponent:t.jsx($t,{windowSize:l,onClick:Me,"data-testid":b("bill-detail-nav-bar-small-back-button"),style:{visibility:`${Ce?"visible":"hidden"}`},children:t.jsx(It,{})}),source:"BillDetailPage"}):t.jsx(st,{"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(kt,{windowSize:l,children:[f?t.jsxs(zt,{isDisabled:P,"data-testid":b("bill-comment-button"),onClick:P?()=>null:c=>{c.preventDefault(),c.stopPropagation(),G(!0),M.trackCommentActivity("bill","clicked",o.currentTenant?.companyName??"",o.controllersList.controllers.map(y=>ct(y)),void 0,void 0,"page icon")},children:[t.jsx(dt,{count:P?void 0:_e,isLoading:P,style:{left:"12px"}}),t.jsx(Mt,{})]}):null,t.jsx(St,{onClick:()=>ee(),"data-testid":b("bill-detail-nav-bar-close-button"),children:t.jsx(At,{})})]}),leftSideComponent:t.jsx($t,{windowSize:l,onClick:Me,"data-testid":b("bill-detail-nav-bar-back-button"),style:{visibility:`${Ce?"visible":"hidden"}`},children:t.jsx(It,{})}),enableTitleOnScroll:!0,scrollableContent:ot,source:"BillDetailPage"})}),t.jsxs(ci,{windowSize:l,children:[Fe?t.jsx(Na,{withdrawFrom:e.withdrawFrom,paymentDate:e?.transactionDetails?.billPayInfo.paymentDate,onOkClick:lt,onCancelClick:()=>{q(!1),Qe()},onClickAway:()=>{q(!1)}}):null,sn?t.jsx(La,{onCancel:zn,onProceedForMarkAsPaid:Bn,saveDetailsFetchState:e.billSaveStatus,paymentData:e.outsideZeniPaymentInfo}):null,tn||re?t.jsx(pt,{titleComponent:t.jsx(ut,{children:N.title}),descriptionComponent:t.jsx(mt,{children:N.description}),primaryButtonText:N.primaryButtonText,proceedButtonVariant:re?"primary":"danger",secondaryButtonText:N.secondaryButtonText,action:hn,isEditPopup:!0,isLoading:e.zeniAssist?.refundStatus.fetchState==="In-Progress",children:re?Ga(l,e):null}):null,nn?t.jsx(pt,{titleComponent:t.jsx(ut,{children:n.rejectBillTitlePrefix+" "+(e.transactionDetails?.vendor?.name!=null?e.transactionDetails.vendor.name:"")}),descriptionComponent:t.jsx(mt,{children:n.rejectBillDescription}),primaryButtonText:n.send,secondaryButtonText:n.cancel,action:bn,isEditPopup:!0,isNotesIncluded:!0,notesPlaceholder:n.rejectBillReasonPlaceholder}):null,l!=="small"||S?t.jsxs(mi,{windowSize:l,children:[l!=="small"?t.jsxs(ui,{windowSize:l,children:[ue,e.isRecurring?t.jsx(Ie,{height:a.sp5,width:a.sp5}):null]}):null,W&&S!=null&&S.code==="deleted"?t.jsx(Ct,{color:S.color,bgColor:S.bgColor,borderColor:S.borderColor,children:S.value}):S?.value===Ae.tabsById.overdue?t.jsx(Ct,{color:S.color,bgColor:S.bgColor,borderColor:S.borderColor,children:S.value}):null]}):null,O!=null&&O.code?l==="small"?t.jsx(Yn,{progressSectionObj:O,createDate:e.transactionDetails?.createTime,paymentDate:Je,scheduleDate:ae,approvedDate:e.latestApprovedDate,isFrozen:e.transactionDetails?.isDeleted}):t.jsx(ea,{progressSectionObj:O,createDate:e.transactionDetails?.createTime,paymentDate:Je,scheduleDate:ae,approvedDate:e.latestApprovedDate,isFrozen:e.transactionDetails?.isDeleted}):null,Ha(H,e,_),t.jsx(ta,{sectionId:na,currentVendorOption:{defaultOptions:[]},billId:h,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(De,{children:[t.jsx(je,{children:n.whatForTitle}),t.jsxs(ve,{children:[t.jsx(I,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"invoiceNumber"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${$("invoiceNumber")}`},children:t.jsx(k,{label:{label:n.invoiceNumber,width:j},text:ne.invoiceNumber??C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(I,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"invoiceDate"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${$("invoiceDate")}`},children:t.jsx(k,{label:{label:n.invoiceDate,width:j},text:ne.invoiceDate?.format(Te)??C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(I,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"billDueDate"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${$("billDueDate")}`},children:t.jsx(k,{label:{label:n.billDueDate,width:j},text:ne.billDueDate?.format(Te)??C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(I,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"memo"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${$("memo")}`},children:t.jsx(k,{label:{label:n.memo,width:j},text:ne.memo??C,style:{width:"auto"}})})]})]}),t.jsxs(De,{children:[t.jsx(pi,{windowSize:l,children:t.jsx(je,{children:n.lineItemsTitle})}),ye.length>0?ye.map((c,y)=>{const R=e?.transactionDetails?.lines?.find(Ln=>Ln.id===c.lineId)?.recipientAmount;return t.jsxs(oi,{children:[ye.length>1?t.jsx(ri,{windowSize:l,children:t.jsx(si,{windowSize:l,children:`${n.line} # ${y+1}`})}):null,t.jsxs(ve,{children:[t.jsx(I,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.recipientAmount`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${$("recipientAmount",y)}`},children:t.jsx(k,{label:{label:n.amount,width:j},text:R!=null?$e("0,0[.]00",R):C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(I,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.lineDescription`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${$("lineDescription",y)}`},children:t.jsx(k,{label:{label:n.description,width:j},text:c.lineDescription??C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(I,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.account`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${$("account",y)}`},children:t.jsx(k,{label:{label:n.category,width:j},text:c.account?.accountName??C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(I,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.class`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${$("class",y)}`},children:t.jsx(k,{label:{label:n.class,width:j},text:c.class?.className??C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(I,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.billable`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${$("billable",y)}`},children:t.jsx(k,{label:{label:n.billable,width:j},text:c.billable!=null?fn(c.billable):C,style:{width:"auto"}})}),t.jsx(z,{}),t.jsx(I,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.customer`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${$("customer",y)}`},children:t.jsx(k,{label:{label:n.customer,width:j},text:c.customer?.name??C,style:{width:"auto"}})})]})]},y)}):null]}),t.jsxs(yi,{windowSize:l,children:[t.jsx(hi,{children:n.total}),t.jsx(bi,{children:he!=null?t.jsx(aa,{amount:he,integerStyles:yt.h6Medium.cssObject,decimalStyles:yt.standardMedium.cssObject}):C})]}),t.jsxs(De,{children:[t.jsx(je,{children:n.paymentDetailsTitle}),t.jsxs(ve,{children:[F?null:t.jsxs(t.Fragment,{children:[t.jsx(I,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"withdrawFrom"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${$("withdrawFrom")}`},children:t.jsx(k,{label:{label:n.withdrawFrom,width:j},text:e.withdrawFrom!=null?Nt(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&&w?.code==="pending_approval"?Ft.addMoney:_})}),t.jsx(z,{})]}),t.jsx(I,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"paymentType"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${$("paymentType")}`},children:t.jsx(k,{additionalInfoLabel:s.paymentType?.method!=null&&s.paymentType.method.includes(za)&&Zt&&s.internationalTransferFeeBearerPaymentMethod!=null?t.jsx(qa,{children:ia(s.internationalTransferFeeBearerPaymentMethod)}):void 0,label:{label:n.paymentMethod,width:j},text:F&&e.outsideZeniPaymentInfo!=null?Xa(e.outsideZeniPaymentInfo):rt(s.paymentType?.method??""),style:{width:"auto"}})}),F?null:t.jsxs(t.Fragment,{children:[t.jsx(z,{}),t.jsx(I,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"paymentTo"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${$("paymentTo")}`},children:t.jsxs(t.Fragment,{children:[t.jsx(k,{label:{label:n.paymentTo,width:j},text:s.paymentToBankAccount!=null?Tn:s.paymentToPI!=null?s.paymentToPI.displayText:vn,style:{width:"auto"},showEyeIcon:s.paymentToBankAccount!=null&&!!s.paymentType?.method?.includes("ach"),showAdditionalInfoLabel:!!e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact||s.paymentType?.method?.includes("ach"),tooltipText:Dn(),additionalInfoLabel:t.jsx(Qa,{children:In})}),$n()]})})]}),F||e.isRecurring?t.jsxs(t.Fragment,{children:[t.jsx(z,{}),t.jsx(I,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"recurringPaymentType"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${$("recurringPaymentType")}`},children:t.jsxs(t.Fragment,{children:[t.jsx(k,{label:{label:n.paymentType,width:j},labelStyles:{marginRight:m.labelMarginRight.valuePx(l)},style:{width:"auto"},text:oa(e.isRecurring,F,e.transactionDetails?.recurringBillInstance??1,e.recurringBillConfigDetail?.totalPaymentCycles??0),textStyles:{paddingLeft:m.textPadding.valuePx(l),paddingRight:m.textPadding.valuePx(l)},additionalInfoLabel:la(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(wi,{style:{paddingLeft:m.recurringSchedulePaddingLeft.valuePx(l)},children:t.jsx(ra,{onAttachmentClick:ze,currencySymbol:e.transactionDetails?.recipientTotalAmount.currencySymbol??xt.currencySymbol,recurringBillInstances:e.recurringBillInstances})}):null]})})]}):null]})]}),e.transactionDetails&&e.transactionDetails.id&&t.jsx(sa,{amount:xn,activities:e.billActivities,stage:w?.code??"draft",onAddNewRule:Xt,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:Et,signedInUserId:le?.userId,showRealTimeApproval:_t,entityApprovalId:e.billActivities[0]?.entityApprovalId??e.transactionDetails.entityApprovalId,updateEditMode:qt,onSaveRealTimeApprovals:Jt},historicActivities:e.billHistory.activities}),t.jsx(gi,{})]}),e.transactionDetails?.vendor!=null&&!me&&!e.transactionDetails.isDeleted?t.jsx(da,{separatorStyle:{marginRight:a.sp4},showPrimaryButton:K||g,showCancel:!K&&g,cancelBtn:{label:at?n.buttons.reject:n.buttons.rejectBill,isLoading:Ze==="rejected"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:Nn,style:{width:m.footerButtonWidth.value(l)},reverseSpinnerColor:!1},primaryBtn:{label:Ua(K,at),isLoading:Ze==="approved"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:K?it:()=>{_!=null?q(!0):lt()},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(Ja,{children:t.jsxs(ii,{windowSize:l,children:[!H&&Le?t.jsx(ht,{onClickAway:()=>{oe(!1),de(!1)},children:t.jsxs(jt,{windowSize:l,"data-testid":b("bill-actions-container"),children:[E!=="processing"&&tt?t.jsx(Z,{onClick:pn,"data-testid":b("delete-bill-action-item"),children:n.buttons.deleteBill}):null,E==="processing"&&!B?t.jsx(Z,{onClick:mn,"data-testid":b("cancel-bill-action-item"),children:n.buttons.cancel}):null,E==="processing"&&nt?t.jsx(Z,{onClick:un,"data-testid":b("cancel-and-delete-bill-action-item"),children:n.buttons.cancelAndDelete}):null,g&&F&&ke?t.jsx(Z,{onClick:Rn,"data-testid":b("mark-as-paid-action-item"),children:n.paymentOutsideZeni.markAsPaid}):null]})}):null,Oe?t.jsx(ht,{onClickAway:()=>{oe(!1),de(!1)},children:t.jsxs(jt,{windowSize:l,"data-testid":b("bill-actions-with-zeni-assist-container"),children:[ge?t.jsx(Z,{onClick:()=>{M.trackRetryClick(D?.code??"",w?.code??"",O?.description??"",B?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),Yt()},"data-testid":b("retry-bill-action-item"),children:n.buttons.retry}):null,xe?t.jsx(Z,{onClick:yn,"data-testid":b("refund-bill-action-item"),children:n.buttons.refund}):null]})}):null,t.jsxs(ai,{windowSize:l,children:[kn===!0?t.jsx(we,{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(Dt,{windowSize:l,showEditIcon:be,isIconClickable:fe,"data-testid":b("other-actions-icon-container"),children:fe?t.jsx(gn,{}):t.jsx(ei,{})})}):null,!H&&be===!0?t.jsx(we,{enterDelay:600,style:{color:ie.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:Wa,placement:"top",children:t.jsx(ni,{onClick:Qe,"data-testid":b("edit-bill-icon-container"),children:t.jsx(ti,{})})}):null,!H&&Cn===!0&&Pn?t.jsx(we,{enterDelay:600,style:{color:ie.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:Za,placement:"top",children:t.jsx(Dt,{windowSize:l,showEditIcon:be,isIconClickable:!0,"data-testid":b("more-details-icon-container"),children:t.jsx(Ya,{onClick:()=>oe(!Le)})})}):null]})]})}),style:{minHeight:62}}):null]}),f?t.jsx(ka,{id:v,children:t.jsx(ca,{isDrawerOpen:ln,allowComposer:!0,drawerTitle:Ka,threads:U,filter:T,autoExpand:!0,autoFocus:!1,isLoading:P,textOverrides:{composerPlaceholder:Tt.addANewComment,replyComposerPlaceholder:Tt.replyAComment,threadResolve:vt.resolveComment,threadUnResolve:vt.unResolveComment},threadMetadata:Mn,onThreadClick:on,onCloseAllThreadsDrawer:()=>G(!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]})},Va=(e,x)=>{const g=e?.code;if(e!=null&&g!=null)return x?.isDeleted===!0?{value:Ae.tabsById.deleted,color:L.deleted.color,bgColor:L.deleted.bgColor,borderColor:L.deleted.borderColor,code:"deleted"}:g==="pending_approval"&&x?.dueDate?.isBefore(Ma(),"date")===!0?{value:Ae.tabsById.overdue,color:L.overdue.color,bgColor:L.overdue.bgColor,borderColor:L.overdue.borderColor}:{value:e.name,color:L[g].color,bgColor:L[g].bgColor,borderColor:L[g].borderColor}},Ga=(e,x)=>{const g=x.transactionDetails?.recipientTotalAmount;return t.jsxs(Ti,{windowSize:e,children:[t.jsxs(Pt,{windowSize:e,children:[t.jsx(Bt,{children:n.zeniAssist.accountNumber}),t.jsx(Rt,{children:x.withdrawFrom!=null?Nt(x.withdrawFrom,e):d})]}),t.jsxs(Pt,{windowSize:e,children:[t.jsx(Bt,{children:n.zeniAssist.amount}),t.jsx(Rt,{children:g!=null?$e("0,0[.]00",g):C})]})]})},Ua=(e,x)=>e?n.paymentOutsideZeni.markAsPaid:x?n.buttons.approve:n.buttons.approveBill,Xa=e=>{const x=e.paymentMode,g=n.paymentOutsideZeni.offline;if(x==null||x==="other")return g;const W=n.paymentOutsideZeni.paymentModeOptions.find(le=>le.value===x)?.label;return`${g} ${_a} ${W}`},Ha=(e,x,g)=>{if(e)return t.jsx(bt,{variant:"warning",style:{marginTop:a.sp5,marginBottom:a.sp3},title:ft.duplicateWarning.title,description:ft.duplicateWarning.description});if(g!=null){const W=`${x.withdrawFrom?.label??""} ${x.withdrawFrom?.maskedAccountNumber??""}`;return t.jsx(bt,{variant:"low-balance",style:{marginTop:a.sp2,marginBottom:a.sp3},title:`${Ft.lowBalanceIn.replace("__account__",W)}`,description:g.replace("Low balance! ","")})}else return null},Qa=i.div``,qa=i.div``,Ja=i.div`
1
+ import{Q as On,av as Fn,d as En,gc as _n,gd as Zn,ge as Wn,gf as Kn,ca as Vn,aN as Xn,F as Gn,y as u,V as t,f3 as rt,f4 as Un,o as a,f5 as qn,f6 as Hn,aK as b,f7 as Qn,aL as $e,f8 as Yn,bz as st,bm as dt,dw as ct,cm as pt,cn as mt,co as ut,gg as Jn,gh as ea,gi as ta,gj as na,fd as I,fe as $,ff as A,gk as k,fc as aa,b as yt,p as ie,fg as Nt,fh as ia,fi as la,fj as oa,gl as ra,gm as sa,aO as da,an as ht,bQ as we,gn as ca,go as L,u as r,ah as pa,b$ as ma,gp as ua,_ as ya,gq as ha,gr as bt,fn as gt,B as ba,d0 as ga,cf as xa,b5 as fa,b7 as wa,c as Ta,bS as Lt,gs as va,ag as Ot,aW as ja,b3 as Da,br as Ia,eN as $a,ak as Aa}from"./index-BS0RW8dr.js";import{a as p}from"./core-3dlyNYRL.js";import{n as i}from"./mui-bYXq4XMS.js";import{a as ka}from"./liveblocks-DIep7fJd.js";import{bR as Sa,bO as Ca,bS as Pa,fI as Ba,bQ as za,bK as Ra,bj as Ma}from"./zeni-epic-state-LPACxnXP.js";import{o as Na,t as La}from"./LowBalancePopup-Du0kX_mJ-B-0Hf7BW.js";import"./sentry-o6h_D-9x.js";import"./lottie-DEE24l2z.js";import"./analytics-zoE7Zcxt.js";import"./recharts-BHhx6CLo.js";import"./utils-uDUqNRFY.js";import"./lexical-DPEnH3HH.js";const Oa=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"})))),Fa={formTitle:new ba("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:Ea,common:{noText:C,strings:{empty:d},currency:xt,via:_a,more:Za,edit:Wa},spendManagement:{billPay:{billDetails:n,billsByTabs:Ae,bulkActions:ft,vendorCreation:wt,insufficientFunds:Ft}},collaboration:{threads:{placeholder:Tt,tooltip:vt,title:{comments:Ka}}}}=Gn.getLocalizedStrings(),Te=Ea.visual.MMMDCommaYYYYformat,Mi=({billDetails:e,currentTenant:x,showApproveRejectBtns:g,isShowDeletedBillsEnabled:W,signedInUser:le,isAdmin:Et,isRealTimeApprovalEnabled:_t,isInternationalPaymentShaVsOurEnabled:Zt,hasZeniAssistAccess:Wt,analytics:M,showMarkAsPaidButtonToCreator:K,showMarkAsPaidButtonToApprover:ke,isBillPayCommentingEnabled:Se,isZeniUser:Kt,showBackButton:Ce=!0,isDetectInsufficientFundsEnabled:Vt,redirectToEditableBillScreen:Xt,redirectToBillsScreen:H,discardBillDetailsFromLocalStore:Pe,deleteBill:Gt,cancelAndDeleteBill:Be,approveOrRejectBill:ze,onAddNewRule:Ut,onAttachmentClick:Re,saveBillDetails:qt,discardOutsideZeniPaymentData:Ht,onBackClick:Me,updateEditRealTimeApproverClicked:Qt,onSaveRealTimeApprovals:Yt,onRetryPaymentClick:Jt,onRefundPaymentClick:en})=>{const l=On(),o=Fn(),Ne=En(),[tn,V]=p.useState(!1),[Le,oe]=p.useState(!1),[re,se]=p.useState(!1),[Oe,de]=p.useState(!1),[nn,ce]=p.useState(!1),[Fe,Q]=p.useState(!1),h=e.transactionDetails?.id,an=Kt?_n:Zn,{requestToOpenThread:pe,setRequestToOpenThread:Ee,setOpenThread:Y}=p.useContext(an),[ln,X]=p.useState(!1),T={application:"dashboard",companyId:o.currentTenant?.companyId,tab:"bill",entityId:h,isGlobalComment:!1},{threads:G,isLoading:P}=Wn(T,"both",!1),f=Se&&h!=null,_e=p.useMemo(()=>h==null?[]:G.filter(c=>c.resolved===!1&&!c.id.includes(Kn)),[G,h]).length,v=`dashboard_${o.currentTenant?.companyId}`,on=p.useCallback((c,y)=>{Y(y),X(!1)},[Y,X]);p.useEffect(()=>{pe?.threadId!=null&&G.length>0&&!P&&(Y(pe.threadId),Ee(null))},[pe,G,P,Y,Ee]),Vn({componentName:"bill.details"});const[N,J]=p.useState({title:"",description:"",primaryButtonText:"",secondaryButtonText:""}),[Ze,We]=p.useState("approved"),[rn,Ke]=p.useState(!1),[sn,Ve]=p.useState(!1),[Xe,Ge]=p.useState(!1),Ue=()=>Ke(!1),dn=()=>Ke(!0),qe=Xn(e.zeniAssist?.refundStatus.fetchState),ee=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(()=>{qe==="In-Progress"&&(e.zeniAssist?.refundStatus.fetchState==="Completed"||e.zeniAssist?.refundStatus.fetchState==="Error")&&(se(!1),ee())},[qe,e.zeniAssist?.refundStatus,ee]);const w=e.transactionDetails?.billPayInfo.stage,te=e.transactionDetails?.billPayInfo.billStatus,U=e.transactionDetails?.billPayInfo.billPaymentStatus,cn=e.transactionDetails?.billPayInfo.billPaymentRefundStatus,me=w?.code==="paid",j=me?w:te?.code=="approved"&&U?.code?U:te,S=Va(j,e.transactionDetails),O=e.transactionDetails?.billPayInfo.isRefundInitiated===!0?cn:U?.code!=null&&(te?.code=="approved"||U.code==="mark_as_paid")?U:te,ue=e.transactionDetails?.vendor?.name,B=e.isRecurring,He=()=>{e.transactionDetails?.id!=null&&Xt(e.transactionDetails?.id??"")},pn=()=>{J({title:B?n.recurringBill.deleteRecurringTitle:n.deleteBillTitle,description:B?n.recurringBill.deleteRecurringAlertText:n.deleteAlertDescription,primaryButtonText:n.delete,secondaryButtonText:n.cancel}),V(!0)},mn=()=>{J({title:n.cancelBillTitle,description:n.cancelAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),V(!0)},un=()=>{J({title:B?n.recurringBill.cancelAndDeleteRecurringTitle:n.cancelAndDeleteBillTitle,description:B?n.recurringBill.cancelAndDeleteRecurringAlertText:n.cancelAndDeleteAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),V(!0)},yn=()=>{M.trackRefundClick(j?.code??"",w?.code??"",O?.description??"",B?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),J({title:n.zeniAssist.refundTitle,description:n.zeniAssist.refundDescription,primaryButtonText:n.zeniAssist.proceed,secondaryButtonText:n.cancel}),se(!0)},hn={onOkClick:()=>{V(!1),N.primaryButtonText===n.delete?Gt?.(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&&(M.trackRefundConfirmClick(j?.code??"",w?.code??"",O?.description??"",B?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),en())},onCancelClick:()=>{V(!1),se(!1)}},bn={onOkClick:c=>{ce(!1),ze({billId:e.transactionDetails?.id??"",type:"rejected",description:c})},onCancelClick:()=>{ce(!1)}},gn=()=>{const[c]=ja("ZeniAssist");return c!=null?t.jsx(Da,{"data-testid":b("bill-details-zeni-assist-icon",h),onClick:()=>{de(!Oe),M.trackZeniAssistClick(j?.code??"",w?.code??"",O?.description??"",B?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"")},style:{width:`${a.sp5}`,height:`${a.sp5}`,marginBottom:`${a.sp2}`},animationData:c,loop:!0,play:!0,rendererSettings:{preserveAspectRatio:"xMidYMid slice"}}):null},ne={invoiceNumber:e.transactionDetails?.documentId??"",invoiceDate:e.transactionDetails?.date,billDueDate:e.transactionDetails?.dueDate,memo:e.transactionDetails?.memo,currencyCode:e.vendorCurrency??xt.currencyCode},ye=e.transactionDetails?.lines?.map((c,y)=>{const z=c;return{lineIndex:y,lineId:z.id,account:z.account,class:z.class,amount:z.amount.amount,billable:z.billable,customer:z.customer,lineDescription:z.lineDescription,recipientAmount:z.recipientAmount?.amount}})??[],xn=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),fn=c=>c==="billable"||c==="has_been_billed"?n.yes:n.no,wn=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):"",Tn=s.paymentToBankAccount?.bankAccountName!=null&&s.paymentToBankAccount?.bankAccountName!=""?s.paymentToBankAccount?.bankAccountName:`${e.transactionDetails?.vendor?.name} - ${s.paymentToBankAccount?.bankName} XXXX${wn}`,vn=e.transactionDetails?.billPayInfo?.isCollectToAccountInfoFromVendorContact?t.jsxs(t.Fragment,{children:[`${n.magicLink.collectFrom} ${e.transactionDetails?.billPayInfo?.toAccountVendorEmail}`,t.jsx(fi,{windowSize:l,children:t.jsx(xi,{})})]}):void 0,Qe=e.transactionDetails?.date!=null&&e.transactionDetails.bookCloseDate!=null&&e.transactionDetails.date.isBefore(e.transactionDetails.bookCloseDate),jn=()=>`${wt.achDetails.bankRoutingNumber} ${s?.paymentToBankAccount?.bankRoutingNumberAch}, ${s?.paymentToBankAccount?.bankName}
2
+ ${wt.achDetails.bankAccountNumber} ${s?.paymentToBankAccount?.bankAccountNumber}`,ae=e.transactionDetails?.billPayInfo!=null?Sa(e.transactionDetails?.billPayInfo):void 0,Dn=ae!=null&&e.paymentMethodType?.maxPeriod?.value!=null?Ca(Pa(ae?.toDate(),[0,6],e.paymentMethodType?.maxPeriod.value).toDateString()):void 0,Ye=e.transactionDetails?.billPayInfo.expectedDepositDate??Dn,Je=rt(s?.paymentType?.method??"").replace("Same Day",""),In=(s?.paymentToBankAccount!=null||s?.paymentToPI)!=null?n.addedByZeni:e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact?t.jsx(Un,{paymentTypeLabel:Je,onClick:dn,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(va,{paymentType:s?.paymentType?.method,paymentDate:e.transactionDetails?.billPayInfo.paymentDate}):null,et=e.transactionDetails?.lines?.some(c=>{const y=c.account;return y?.isDeleted===!0&&y?.isBillEditableCoaAccountType===!1})??!1,be=!(j?.code==="processing"||e.transactionDetails?.billPayInfo.isRefundInitiated===!0||e.transactionDetails?.billPayInfo.isRefundComplete===!0||(w?.code==="scheduled"||w?.code==="pending_approval")&&et),tt=!((w?.code==="scheduled"||w?.code==="pending_approval")&&et),ge=e.zeniAssist?.isEligibleForRetryIBT===!0||e.zeniAssist?.isEligibleForRetryOBP===!0,xe=e.zeniAssist?.isEligibleForRefund===!0,An=e?.transactionDetails?.billPayInfo.billPaymentMethodType.code==="wire"&&e?.transactionDetails?.billPayInfo.billPaymentMethodType.subCode==="international",kn=Wt&&e.transactionDetails?.billPayInfo.billPaymentStatus.code!=null&&["failed","cancelled","returned"].includes(e.transactionDetails.billPayInfo.billPaymentStatus.code)&&(ge||xe)&&An===!1,fe=ge||xe,Sn=e.transactionDetails?.billPayInfo.isRefundInitiated===!0&&e.transactionDetails?.billPayInfo.isRefundComplete===!1,E=j?.code,Cn=!Sn&&(!Qe||j?.code==="processing"&&!B),nt=!Qe,at=["small","medium-compact","medium-regular"].includes(l),q=Ba(e.transactionDetails?.bulkProcessingDetail?.type),F=za(e.paymentMethodType?.method),Pn=!q&&(E!=="processing"&&tt||E==="processing"&&!B||E==="processing"&&nt||g&&F&&ke),Bn=c=>{M.trackBillPayMarkAsPaidSubmit(c.paymentMode??"other",w?.code??"",j?.code??""),qt(!0,Xe,c)},it=()=>{Ve(!0),M.trackBillPayMarkAsPaid(w?.code??"",j?.code??"")},zn=()=>{Ge(!0),it()},Rn=()=>{Ht(),Ve(!1),Xe&&Ge(!1)},Mn=p.useMemo(()=>({companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,entityType:"bill.details",entityId:h??d,isGlobalComment:!1,application:"dashboard",tab:"bill",url:window.location.href}),[o.currentTenant,h]),_=Vt&&e.transactionDetails?.totalAmountWithFeesInUSD!=null&&w?.code!=="paid"&&j?.code!=="failed"&&j?.code!=="processing"&&j?.code!=="cancelled"&&j?.code!=="returned"&&j?.code!=="rejected"?qn(e.transactionDetails?.totalAmountWithFeesInUSD,e.withdrawFrom,s.paymentDate):void 0,lt=()=>{We("approved"),Fe===!0&&Q(!1),_!=null&&M.trackLowBalanceAccountApprove(w?.code??"",e.transactionDetails?.billPayInfo.billPaymentStatus.code??"",e.isRecurring?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"",gt(o.loggedInUser),e.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account"),ze({billId:e.transactionDetails?.id??"",type:"approved"})},Nn=()=>{We("rejected"),_!=null&&M.trackLowBalanceAccountReject(w?.code??"",e.transactionDetails?.billPayInfo.billPaymentStatus.code??"",e.isRecurring?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"",gt(o.loggedInUser),e.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account"),ce(!0)},ot=p.useRef(null);return t.jsxs(li,{windowSize:l,ref:ot,children:[t.jsx(Hn,{anchor:"right",open:rn,onClose:Ue,transitionDuration:250,"data-testid":b("vendor-email-preview-drawer"),children:t.jsx(Qn,{companyName:Yn(x.company?.companyInfo),vendor:e.transactionDetails?.vendor?.name,paymentDate:s.paymentDate?.format(Te)??"",paymentType:Je,amount:$e("0,0.[00]",he),isInvoiceAttached:!!e.transactionDetails?.attachments?.length,onClose:Ue})}),t.jsxs(di,{windowSize:l,children:[t.jsx(vi,{windowSize:l,children:l==="small"?t.jsx(st,{"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(kt,{windowSize:l,children:[f?t.jsxs(Rt,{isDisabled:P,"data-testid":b("bill-comment-button"),onClick:P?()=>null:c=>{c.preventDefault(),c.stopPropagation(),X(!0),M.trackCommentActivity("bill","clicked",o.currentTenant?.companyName??"",o.controllersList.controllers.map(y=>ct(y)),void 0,void 0,"page icon")},children:[t.jsx(dt,{count:P?void 0:_e,isLoading:P,style:{left:"12px"}}),t.jsx(Mt,{})]}):null,t.jsx(St,{onClick:()=>ee(),"data-testid":b("bill-detail-nav-bar-small-close-button"),children:t.jsx(At,{})})]}),leftSideComponent:t.jsx($t,{windowSize:l,onClick:Me,"data-testid":b("bill-detail-nav-bar-small-back-button"),style:{visibility:`${Ce?"visible":"hidden"}`},children:t.jsx(It,{})}),source:"BillDetailPage"}):t.jsx(st,{"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(kt,{windowSize:l,children:[f?t.jsxs(Rt,{isDisabled:P,"data-testid":b("bill-comment-button"),onClick:P?()=>null:c=>{c.preventDefault(),c.stopPropagation(),X(!0),M.trackCommentActivity("bill","clicked",o.currentTenant?.companyName??"",o.controllersList.controllers.map(y=>ct(y)),void 0,void 0,"page icon")},children:[t.jsx(dt,{count:P?void 0:_e,isLoading:P,style:{left:"12px"}}),t.jsx(Mt,{})]}):null,t.jsx(St,{onClick:()=>ee(),"data-testid":b("bill-detail-nav-bar-close-button"),children:t.jsx(At,{})})]}),leftSideComponent:t.jsx($t,{windowSize:l,onClick:Me,"data-testid":b("bill-detail-nav-bar-back-button"),style:{visibility:`${Ce?"visible":"hidden"}`},children:t.jsx(It,{})}),enableTitleOnScroll:!0,scrollableContent:ot,source:"BillDetailPage"})}),t.jsxs(ci,{windowSize:l,children:[Fe?t.jsx(Na,{withdrawFrom:e.withdrawFrom,paymentDate:e?.transactionDetails?.billPayInfo.paymentDate,onOkClick:lt,onCancelClick:()=>{Q(!1),He()},onClickAway:()=>{Q(!1)}}):null,sn?t.jsx(La,{onCancel:Rn,onProceedForMarkAsPaid:Bn,saveDetailsFetchState:e.billSaveStatus,paymentData:e.outsideZeniPaymentInfo}):null,tn||re?t.jsx(pt,{titleComponent:t.jsx(ut,{children:N.title}),descriptionComponent:t.jsx(mt,{children:N.description}),primaryButtonText:N.primaryButtonText,proceedButtonVariant:re?"primary":"danger",secondaryButtonText:N.secondaryButtonText,action:hn,isEditPopup:!0,isLoading:e.zeniAssist?.refundStatus.fetchState==="In-Progress",children:re?Xa(l,e):null}):null,nn?t.jsx(pt,{titleComponent:t.jsx(ut,{children:n.rejectBillTitlePrefix+" "+(e.transactionDetails?.vendor?.name!=null?e.transactionDetails.vendor.name:"")}),descriptionComponent:t.jsx(mt,{children:n.rejectBillDescription}),primaryButtonText:n.send,secondaryButtonText:n.cancel,action:bn,isEditPopup:!0,isNotesIncluded:!0,notesPlaceholder:n.rejectBillReasonPlaceholder}):null,l!=="small"||S?t.jsxs(mi,{windowSize:l,children:[l!=="small"?t.jsxs(ui,{windowSize:l,children:[ue,e.isRecurring?t.jsx(Ie,{height:a.sp5,width:a.sp5}):null]}):null,W&&S!=null&&S.code==="deleted"?t.jsx(Ct,{color:S.color,bgColor:S.bgColor,borderColor:S.borderColor,children:S.value}):S?.value===Ae.tabsById.overdue?t.jsx(Ct,{color:S.color,bgColor:S.bgColor,borderColor:S.borderColor,children:S.value}):null]}):null,O!=null&&O.code?l==="small"?t.jsx(Jn,{progressSectionObj:O,createDate:e.transactionDetails?.createTime,paymentDate:Ye,scheduleDate:ae,approvedDate:e.latestApprovedDate,isFrozen:e.transactionDetails?.isDeleted}):t.jsx(ea,{progressSectionObj:O,createDate:e.transactionDetails?.createTime,paymentDate:Ye,scheduleDate:ae,approvedDate:e.latestApprovedDate,isFrozen:e.transactionDetails?.isDeleted}):null,qa(q,e,_),t.jsx(ta,{sectionId:na,currentVendorOption:{defaultOptions:[]},billId:h,isBillPayCommentingEnabled:Se,isBillPaid:me,disableVendorActions:!0,vendor:e.transactionDetails?.vendor,prevBills:e.previousBills,onAttachmentClick:Re,isVendorRecommendationEnabled:!1,showVendorGptRecommendationText:!1}),s.paymentType?.method?.includes("ach"),t.jsxs(je,{children:[t.jsx(De,{children:n.whatForTitle}),t.jsxs(ve,{children:[t.jsx(I,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"invoiceNumber"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${$("invoiceNumber")}`},children:t.jsx(k,{label:{label:n.invoiceNumber,width:D},text:ne.invoiceNumber??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(I,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"invoiceDate"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${$("invoiceDate")}`},children:t.jsx(k,{label:{label:n.invoiceDate,width:D},text:ne.invoiceDate?.format(Te)??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(I,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"billDueDate"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${$("billDueDate")}`},children:t.jsx(k,{label:{label:n.billDueDate,width:D},text:ne.billDueDate?.format(Te)??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(I,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"memo"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${$("memo")}`},children:t.jsx(k,{label:{label:n.memo,width:D},text:ne.memo??C,style:{width:"auto"}})})]})]}),t.jsxs(je,{children:[t.jsx(pi,{windowSize:l,children:t.jsx(De,{children:n.lineItemsTitle})}),ye.length>0?ye.map((c,y)=>{const z=e?.transactionDetails?.lines?.find(Ln=>Ln.id===c.lineId)?.recipientAmount;return t.jsxs(oi,{children:[ye.length>1?t.jsx(ri,{windowSize:l,children:t.jsx(si,{windowSize:l,children:`${n.line} # ${y+1}`})}):null,t.jsxs(ve,{children:[t.jsx(I,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.recipientAmount`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${$("recipientAmount",y)}`},children:t.jsx(k,{label:{label:n.amount,width:D},text:z!=null?$e("0,0[.]00",z):C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(I,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.lineDescription`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${$("lineDescription",y)}`},children:t.jsx(k,{label:{label:n.description,width:D},text:c.lineDescription??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(I,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.account`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${$("account",y)}`},children:t.jsx(k,{label:{label:n.category,width:D},text:c.account?.accountName??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(I,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.class`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${$("class",y)}`},children:t.jsx(k,{label:{label:n.class,width:D},text:c.class?.className??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(I,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.billable`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${$("billable",y)}`},children:t.jsx(k,{label:{label:n.billable,width:D},text:c.billable!=null?fn(c.billable):C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx(I,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.customer`}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${$("customer",y)}`},children:t.jsx(k,{label:{label:n.customer,width:D},text:c.customer?.name??C,style:{width:"auto"}})})]})]},y)}):null]}),t.jsxs(yi,{windowSize:l,children:[t.jsx(hi,{children:n.total}),t.jsx(bi,{children:he!=null?t.jsx(aa,{amount:he,integerStyles:yt.h6Medium.cssObject,decimalStyles:yt.standardMedium.cssObject}):C})]}),t.jsxs(je,{children:[t.jsx(De,{children:n.paymentDetailsTitle}),t.jsxs(ve,{children:[F?null:t.jsxs(t.Fragment,{children:[t.jsx(I,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"withdrawFrom"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${$("withdrawFrom")}`},children:t.jsx(k,{label:{label:n.withdrawFrom,width:D},text:e.withdrawFrom!=null?Nt(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&&w?.code==="pending_approval"?Ft.addMoney:_})}),t.jsx(R,{})]}),t.jsx(I,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"paymentType"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${$("paymentType")}`},children:t.jsx(k,{additionalInfoLabel:s.paymentType?.method!=null&&s.paymentType.method.includes(Ra)&&Zt&&s.internationalTransferFeeBearerPaymentMethod!=null?t.jsx(Qa,{children:ia(s.internationalTransferFeeBearerPaymentMethod)}):void 0,label:{label:n.paymentMethod,width:D},text:F&&e.outsideZeniPaymentInfo!=null?Ua(e.outsideZeniPaymentInfo):rt(s.paymentType?.method??""),style:{width:"auto"}})}),F?null:t.jsxs(t.Fragment,{children:[t.jsx(R,{}),t.jsx(I,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"paymentTo"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${$("paymentTo")}`},children:t.jsxs(t.Fragment,{children:[t.jsx(k,{label:{label:n.paymentTo,width:D},text:s.paymentToBankAccount!=null?Tn:s.paymentToPI!=null?s.paymentToPI.displayText:vn,style:{width:"auto"},showEyeIcon:s.paymentToBankAccount!=null&&!!s.paymentType?.method?.includes("ach"),showAdditionalInfoLabel:!!e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact||s.paymentType?.method?.includes("ach"),tooltipText:jn(),additionalInfoLabel:t.jsx(Ha,{children:In})}),$n()]})})]}),F||e.isRecurring?t.jsxs(t.Fragment,{children:[t.jsx(R,{}),t.jsx(I,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"recurringPaymentType"}),roomId:v,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...T,entityType:`bill.details.${$("recurringPaymentType")}`},children:t.jsxs(t.Fragment,{children:[t.jsx(k,{label:{label:n.paymentType,width:D},labelStyles:{marginRight:m.labelMarginRight.valuePx(l)},style:{width:"auto"},text:oa(e.isRecurring,F,e.transactionDetails?.recurringBillInstance??1,e.recurringBillConfigDetail?.totalPaymentCycles??0),textStyles:{paddingLeft:m.textPadding.valuePx(l),paddingRight:m.textPadding.valuePx(l)},additionalInfoLabel:la(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(wi,{style:{paddingLeft:m.recurringSchedulePaddingLeft.valuePx(l)},children:t.jsx(ra,{onAttachmentClick:Re,currencySymbol:e.transactionDetails?.recipientTotalAmount.currencySymbol??xt.currencySymbol,recurringBillInstances:e.recurringBillInstances})}):null]})})]}):null]})]}),e.transactionDetails&&e.transactionDetails.id&&t.jsx(sa,{amount:xn,activities:e.billActivities,stage:w?.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:Et,signedInUserId:le?.userId,showRealTimeApproval:_t,entityApprovalId:e.billActivities[0]?.entityApprovalId??e.transactionDetails.entityApprovalId,updateEditMode:Qt,onSaveRealTimeApprovals:Yt},historicActivities:e.billHistory.activities}),t.jsx(gi,{})]}),e.transactionDetails?.vendor!=null&&!me&&!e.transactionDetails.isDeleted?t.jsx(da,{separatorStyle:{marginRight:a.sp4},showPrimaryButton:K||g,showCancel:!K&&g,cancelBtn:{label:at?n.buttons.reject:n.buttons.rejectBill,isLoading:Ze==="rejected"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:Nn,style:{width:m.footerButtonWidth.value(l)},reverseSpinnerColor:!1},primaryBtn:{label:Ga(K,at),isLoading:Ze==="approved"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:K?it:()=>{_!=null?Q(!0):lt()},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(Ya,{children:t.jsxs(ii,{windowSize:l,children:[!q&&Le?t.jsx(ht,{onClickAway:()=>{oe(!1),de(!1)},children:t.jsxs(Dt,{windowSize:l,"data-testid":b("bill-actions-container"),children:[E!=="processing"&&tt?t.jsx(Z,{onClick:pn,"data-testid":b("delete-bill-action-item"),children:n.buttons.deleteBill}):null,E==="processing"&&!B?t.jsx(Z,{onClick:mn,"data-testid":b("cancel-bill-action-item"),children:n.buttons.cancel}):null,E==="processing"&&nt?t.jsx(Z,{onClick:un,"data-testid":b("cancel-and-delete-bill-action-item"),children:n.buttons.cancelAndDelete}):null,g&&F&&ke?t.jsx(Z,{onClick:zn,"data-testid":b("mark-as-paid-action-item"),children:n.paymentOutsideZeni.markAsPaid}):null]})}):null,Oe?t.jsx(ht,{onClickAway:()=>{oe(!1),de(!1)},children:t.jsxs(Dt,{windowSize:l,"data-testid":b("bill-actions-with-zeni-assist-container"),children:[ge?t.jsx(Z,{onClick:()=>{M.trackRetryClick(j?.code??"",w?.code??"",O?.description??"",B?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),Jt()},"data-testid":b("retry-bill-action-item"),children:n.buttons.retry}):null,xe?t.jsx(Z,{onClick:yn,"data-testid":b("refund-bill-action-item"),children:n.buttons.refund}):null]})}):null,t.jsxs(ai,{windowSize:l,children:[kn===!0?t.jsx(we,{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(jt,{windowSize:l,showEditIcon:be,isIconClickable:fe,"data-testid":b("other-actions-icon-container"),children:fe?t.jsx(gn,{}):t.jsx(ei,{})})}):null,!q&&be===!0?t.jsx(we,{enterDelay:600,style:{color:ie.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:Wa,placement:"top",children:t.jsx(ni,{onClick:He,"data-testid":b("edit-bill-icon-container"),children:t.jsx(ti,{})})}):null,!q&&Cn===!0&&Pn?t.jsx(we,{enterDelay:600,style:{color:ie.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:Za,placement:"top",children:t.jsx(jt,{windowSize:l,showEditIcon:be,isIconClickable:!0,"data-testid":b("more-details-icon-container"),children:t.jsx(Ja,{onClick:()=>oe(!Le)})})}):null]})]})}),style:{minHeight:62}}):null]}),f?t.jsx(ka,{id:v,children:t.jsx(ca,{isDrawerOpen:ln,allowComposer:!0,drawerTitle:Ka,threads:G,filter:T,autoExpand:!0,autoFocus:!1,isLoading:P,textOverrides:{composerPlaceholder:Tt.addANewComment,replyComposerPlaceholder:Tt.replyAComment,threadResolve:vt.resolveComment,threadUnResolve:vt.unResolveComment},threadMetadata:Mn,onThreadClick:on,onCloseAllThreadsDrawer:()=>X(!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]})},Va=(e,x)=>{const g=e?.code;if(e!=null&&g!=null)return x?.isDeleted===!0?{value:Ae.tabsById.deleted,color:L.deleted.color,bgColor:L.deleted.bgColor,borderColor:L.deleted.borderColor,code:"deleted"}:g==="pending_approval"&&x?.dueDate?.isBefore(Ma(),"date")===!0?{value:Ae.tabsById.overdue,color:L.overdue.color,bgColor:L.overdue.bgColor,borderColor:L.overdue.borderColor}:{value:e.name,color:L[g].color,bgColor:L[g].bgColor,borderColor:L[g].borderColor}},Xa=(e,x)=>{const g=x.transactionDetails?.recipientTotalAmount;return t.jsxs(Ti,{windowSize:e,children:[t.jsxs(Pt,{windowSize:e,children:[t.jsx(Bt,{children:n.zeniAssist.accountNumber}),t.jsx(zt,{children:x.withdrawFrom!=null?Nt(x.withdrawFrom,e):d})]}),t.jsxs(Pt,{windowSize:e,children:[t.jsx(Bt,{children:n.zeniAssist.amount}),t.jsx(zt,{children:g!=null?$e("0,0[.]00",g):C})]})]})},Ga=(e,x)=>e?n.paymentOutsideZeni.markAsPaid:x?n.buttons.approve:n.buttons.approveBill,Ua=e=>{const x=e.paymentMode,g=n.paymentOutsideZeni.offline;if(x==null||x==="other")return g;const W=n.paymentOutsideZeni.paymentModeOptions.find(le=>le.value===x)?.label;return`${g} ${_a} ${W}`},qa=(e,x,g)=>{if(e)return t.jsx(bt,{variant:"warning",style:{marginTop:a.sp5,marginBottom:a.sp3},title:ft.duplicateWarning.title,description:ft.duplicateWarning.description});if(g!=null){const W=`${x.withdrawFrom?.label??""} ${x.withdrawFrom?.maskedAccountNumber??""}`;return t.jsx(bt,{variant:"low-balance",style:{marginTop:a.sp2,marginBottom:a.sp3},title:`${Ft.lowBalanceIn.replace("__account__",W)}`,description:g.replace("Low balance! ","")})}else return null},Ha=i.div``,Qa=i.div``,Ya=i.div`
3
3
  display: flex;
4
4
  justify-content: flex-end;
5
- `,Ya=i($a)`
5
+ `,Ja=i($a)`
6
6
  cursor: pointer;
7
7
  color: ${e=>e.theme.colors.hero};
8
8
  width: ${a.sp4};
@@ -10,7 +10,7 @@ import{Q as On,av as Fn,e as En,gb as _n,gc as Zn,gd as Wn,ge as Kn,ca as Vn,aN
10
10
  &:hover {
11
11
  color: ${e=>e.theme.colors.primary};
12
12
  }
13
- `,Dt=i.div`
13
+ `,jt=i.div`
14
14
  display: flex;
15
15
  margin-left: ${e=>e.windowSize==="small"?e.showEditIcon===!0?a.sp3:a.sp4:m.otherActionsIconContainerMarginLeft.valuePx(e.windowSize)};
16
16
  cursor: ${e=>e.isIconClickable===!0?"pointer":"default"};
@@ -46,7 +46,7 @@ import{Q as On,av as Fn,e as En,gb as _n,gc as Zn,gd as Wn,ge as Kn,ca as Vn,aN
46
46
  display: flex;
47
47
  justify-content: center;
48
48
  align-items: center;
49
- `,jt=i.div`
49
+ `,Dt=i.div`
50
50
  display: flex;
51
51
  width: max-content;
52
52
  align-items: center;
@@ -124,13 +124,13 @@ import{Q as On,av as Fn,e as En,gb as _n,gc as Zn,gd as Wn,ge as Kn,ca as Vn,aN
124
124
  box-shadow: ${e=>`${a.sp0} 2px ${a.sp1} ${e.theme.colors.dropShadowNormal}`};
125
125
  border-radius: ${a.sp2};
126
126
  margin: ${a.sp3} 0;
127
- `,De=i.div`
127
+ `,je=i.div`
128
128
  display: flex;
129
129
  flex-direction: column;
130
130
  padding-top: ${a.sp3};
131
- `,oi=i.div``,je=i(fa)`
131
+ `,oi=i.div``,De=i(fa)`
132
132
  color: ${e=>e.theme.colors.primary};
133
- `,z=i.div`
133
+ `,R=i.div`
134
134
  display: flex;
135
135
  flex: 1;
136
136
  background-color: ${e=>e.theme.colors.grey3};
@@ -234,11 +234,11 @@ import{Q as On,av as Fn,e as En,gb as _n,gc as Zn,gd as Wn,ge as Kn,ca as Vn,aN
234
234
  `,Bt=i(Ot)`
235
235
  text-align: left;
236
236
  color: ${e=>e.theme.colors.grey1};
237
- `,Rt=i(Aa)`
237
+ `,zt=i(Aa)`
238
238
  justify-content: end;
239
239
  display: flex;
240
240
  flex: 1;
241
- `,zt=i.div`
241
+ `,Rt=i.div`
242
242
  display: flex;
243
243
  align-items: center;
244
244
  justify-content: center;
@@ -1,4 +1,4 @@
1
- import{y as q,u as U,Q as O,F as L,a8 as M,aN as W,V as o,aH as G,cB as H,bz as Q,ab as X,aO as Z,o as c}from"./index-XNBiWrYj.js";import{a as R}from"./core-3dlyNYRL.js";import{n as b}from"./mui-bYXq4XMS.js";import{b as J,f as K,l as D,o as j}from"./FollowStepsSection-B_mTbqHf-CcoWV2SW.js";import"./sentry-o6h_D-9x.js";import"./zeni-epic-state-LPACxnXP.js";import"./lottie-DEE24l2z.js";import"./liveblocks-DIep7fJd.js";import"./utils-uDUqNRFY.js";import"./analytics-zoE7Zcxt.js";import"./recharts-BHhx6CLo.js";import"./lexical-DPEnH3HH.js";const C="billPayApprovalRuleDetailPage",T="lowerBound",k="upperBound",y="steps",Y={footerPadding:new q(U[2],U[3])};function ye({localData:e,approvalUpdateActionType:t,onBackClick:a,onApprovalRuleDataUpdated:r,onResetClick:s,isLowerBoundDisabled:n=!1,isUpperBoundDisabled:h=!0,hideUpperBoundField:A=!1,onSaveRuleClick:_,onSaveRuleSuccess:S}){const I=O(),l=L.getLocalizedStrings().commonSetUp.approval,P=L.getLocalizedStrings().spendManagement.billPay.billPayApproval,x=ee(e,t==="approval_create"&&!n),g=M({mode:"all",reValidateMode:"onChange",defaultValues:x}),u=e.billPaySetupApproverViewUpdateData?.updateStatus,w=W(u?.fetchState),{upperBound:B}=x,{allApprovalRules:p,allAccountingClasses:E,billPaySetupApproverViewUpdateData:m}=e;let f=p.length>1?p.length-1:0,v=p.length>0?p[f].criteria[0].range.min.amount:0;if(m!=null&&m.type==="approval_update"&&m.data!=null){const{approvalRuleId:i}=m.data;f=p.findIndex(d=>d.approvalRuleId===i),v=f>0?p[f-1].criteria[0].range.min.amount:0}const F=g.handleSubmit(()=>{_()}),V=async(i,d)=>{r(d)};return R.useEffect(()=>{const i=g.watch((d,{name:$})=>{if($!=null&&d!=null){const z=G(d);H(()=>V($,z))}});return()=>{i.unsubscribe()}}),R.useEffect(()=>{w==="In-Progress"&&u?.fetchState==="Completed"&&S()},[w,u?.fetchState,S]),o.jsxs(re,{children:[o.jsx(Q,{title:t==="approval_create"?l.newApproval:l.editApproval,style:{zIndex:4},onBackClick:()=>{a()},source:"BillPayApprovalRuleDetailPage"}),o.jsx(se,{children:o.jsx(X,{...g,children:o.jsx("form",{id:N(C),onSubmit:F,children:o.jsxs(oe,{children:[o.jsx(J,{label:{label:A?P.amountPerBillGreaterLabel:P.amountPerBillLabel},firstText:{type:"number",name:T,placeholder:"$0",options:{required:!0,max:B===1/0?Number.MAX_SAFE_INTEGER-1:B-1,min:v,validate:i=>n?!0:i!=null&&i>v},isDisabled:n,additionalInfoLabel:l.firstRuleLowerBoundInfoLabel,additionalErrorLabel:l.firstRuleErrorInfoLabel},secondText:{type:"number",name:k,placeholder:"Infinity",isDisabled:h,hideField:A,additionalInfoLabel:l.upperBoundInfoLabel}}),o.jsx(ie,{}),o.jsx(K,{sectionId:y,label:{label:l.followStepsLabel},approversPlaceholder:l.approversPlaceholder,notifiersPlaceholder:l.notifiersPlaceholder,allUserWithRoles:e.allApprovers,filteredApprovers:e.filteredApprovers.map(i=>i.user),allAttributes:e.allAttributes,filteredAttributes:e.filteredAttributes,allAccountingClasses:E,stepsInfo:x[y],userSelectPlaceholder:l.userSelectPlaceholder,approveNotifyPlaceholder:l.approveNotifyPlaceholder,productType:"zeni_bill_pay"})]})})})}),o.jsx(Z,{formId:N(C),primaryBtn:{label:l.saveBtnText,isLoading:u?.fetchState==="In-Progress",isDisabled:u?.fetchState==="In-Progress",style:{width:"85px",minWidth:"auto"}},showCancel:!0,cancelBtn:{label:l.cancelBtnText,isLoading:!1,style:{width:"85px",minWidth:"auto"},onClick:s},containerStyle:{justifyContent:I==="small"?"space-between":"center"},style:{padding:Y.footerPadding.valuePx(I)},separatorStyle:{marginRight:c.sp4}})]})}const ee=(e,t)=>{const{criteria:a,steps:r}=e.billPaySetupApproverViewUpdateData?.data??{};return{[y]:ae(e.allApprovers.map(s=>s.user),e.filteredApprovers.map(s=>s.user),j(e.allAttributes),j(e.filteredAttributes),r??[])??[],[T]:t?void 0:a!=null?a.range.min.amount??0:0,[k]:a!=null?a.range.max==null?1/0:a.range.max.amount:1/0}},ae=(e,t,a,r,s)=>s&&s.length>0?s.map((n,h)=>({stepIndex:h,stepType:{selectedOption:n.action,allOptions:D},actors:{allUsers:t,selectedUsers:le(e,n.actors),allNonUsers:r,selectedNonUsers:te(a,n.actors)}})):[{stepIndex:0,stepType:{selectedOption:"require_approval",allOptions:D},actors:{allUsers:t,selectedUsers:[],allNonUsers:r,selectedNonUsers:[]}}],le=(e,t)=>e.filter(a=>a.userId!=null&&t.findIndex(r=>r.userId===a.userId)>-1),te=(e,t)=>e.filter(a=>t.findIndex(r=>r.subType===a.value)>-1),N=e=>`${e}_form`,Ae=e=>`${e}`,re=b.div`
1
+ import{y as q,u as U,Q as O,F as L,a8 as M,aN as W,V as o,aH as G,cB as H,bz as Q,ab as X,aO as Z,o as c}from"./index-BS0RW8dr.js";import{a as R}from"./core-3dlyNYRL.js";import{n as b}from"./mui-bYXq4XMS.js";import{b as J,f as K,l as D,o as j}from"./FollowStepsSection-DwVibYwI-v9hEOCV9.js";import"./sentry-o6h_D-9x.js";import"./zeni-epic-state-LPACxnXP.js";import"./lottie-DEE24l2z.js";import"./liveblocks-DIep7fJd.js";import"./utils-uDUqNRFY.js";import"./analytics-zoE7Zcxt.js";import"./recharts-BHhx6CLo.js";import"./lexical-DPEnH3HH.js";const C="billPayApprovalRuleDetailPage",T="lowerBound",k="upperBound",y="steps",Y={footerPadding:new q(U[2],U[3])};function ye({localData:e,approvalUpdateActionType:t,onBackClick:a,onApprovalRuleDataUpdated:r,onResetClick:s,isLowerBoundDisabled:n=!1,isUpperBoundDisabled:h=!0,hideUpperBoundField:A=!1,onSaveRuleClick:_,onSaveRuleSuccess:S}){const I=O(),l=L.getLocalizedStrings().commonSetUp.approval,P=L.getLocalizedStrings().spendManagement.billPay.billPayApproval,x=ee(e,t==="approval_create"&&!n),g=M({mode:"all",reValidateMode:"onChange",defaultValues:x}),u=e.billPaySetupApproverViewUpdateData?.updateStatus,w=W(u?.fetchState),{upperBound:B}=x,{allApprovalRules:p,allAccountingClasses:E,billPaySetupApproverViewUpdateData:m}=e;let f=p.length>1?p.length-1:0,v=p.length>0?p[f].criteria[0].range.min.amount:0;if(m!=null&&m.type==="approval_update"&&m.data!=null){const{approvalRuleId:i}=m.data;f=p.findIndex(d=>d.approvalRuleId===i),v=f>0?p[f-1].criteria[0].range.min.amount:0}const F=g.handleSubmit(()=>{_()}),V=async(i,d)=>{r(d)};return R.useEffect(()=>{const i=g.watch((d,{name:$})=>{if($!=null&&d!=null){const z=G(d);H(()=>V($,z))}});return()=>{i.unsubscribe()}}),R.useEffect(()=>{w==="In-Progress"&&u?.fetchState==="Completed"&&S()},[w,u?.fetchState,S]),o.jsxs(re,{children:[o.jsx(Q,{title:t==="approval_create"?l.newApproval:l.editApproval,style:{zIndex:4},onBackClick:()=>{a()},source:"BillPayApprovalRuleDetailPage"}),o.jsx(se,{children:o.jsx(X,{...g,children:o.jsx("form",{id:N(C),onSubmit:F,children:o.jsxs(oe,{children:[o.jsx(J,{label:{label:A?P.amountPerBillGreaterLabel:P.amountPerBillLabel},firstText:{type:"number",name:T,placeholder:"$0",options:{required:!0,max:B===1/0?Number.MAX_SAFE_INTEGER-1:B-1,min:v,validate:i=>n?!0:i!=null&&i>v},isDisabled:n,additionalInfoLabel:l.firstRuleLowerBoundInfoLabel,additionalErrorLabel:l.firstRuleErrorInfoLabel},secondText:{type:"number",name:k,placeholder:"Infinity",isDisabled:h,hideField:A,additionalInfoLabel:l.upperBoundInfoLabel}}),o.jsx(ie,{}),o.jsx(K,{sectionId:y,label:{label:l.followStepsLabel},approversPlaceholder:l.approversPlaceholder,notifiersPlaceholder:l.notifiersPlaceholder,allUserWithRoles:e.allApprovers,filteredApprovers:e.filteredApprovers.map(i=>i.user),allAttributes:e.allAttributes,filteredAttributes:e.filteredAttributes,allAccountingClasses:E,stepsInfo:x[y],userSelectPlaceholder:l.userSelectPlaceholder,approveNotifyPlaceholder:l.approveNotifyPlaceholder,productType:"zeni_bill_pay"})]})})})}),o.jsx(Z,{formId:N(C),primaryBtn:{label:l.saveBtnText,isLoading:u?.fetchState==="In-Progress",isDisabled:u?.fetchState==="In-Progress",style:{width:"85px",minWidth:"auto"}},showCancel:!0,cancelBtn:{label:l.cancelBtnText,isLoading:!1,style:{width:"85px",minWidth:"auto"},onClick:s},containerStyle:{justifyContent:I==="small"?"space-between":"center"},style:{padding:Y.footerPadding.valuePx(I)},separatorStyle:{marginRight:c.sp4}})]})}const ee=(e,t)=>{const{criteria:a,steps:r}=e.billPaySetupApproverViewUpdateData?.data??{};return{[y]:ae(e.allApprovers.map(s=>s.user),e.filteredApprovers.map(s=>s.user),j(e.allAttributes),j(e.filteredAttributes),r??[])??[],[T]:t?void 0:a!=null?a.range.min.amount??0:0,[k]:a!=null?a.range.max==null?1/0:a.range.max.amount:1/0}},ae=(e,t,a,r,s)=>s&&s.length>0?s.map((n,h)=>({stepIndex:h,stepType:{selectedOption:n.action,allOptions:D},actors:{allUsers:t,selectedUsers:le(e,n.actors),allNonUsers:r,selectedNonUsers:te(a,n.actors)}})):[{stepIndex:0,stepType:{selectedOption:"require_approval",allOptions:D},actors:{allUsers:t,selectedUsers:[],allNonUsers:r,selectedNonUsers:[]}}],le=(e,t)=>e.filter(a=>a.userId!=null&&t.findIndex(r=>r.userId===a.userId)>-1),te=(e,t)=>e.filter(a=>t.findIndex(r=>r.subType===a.value)>-1),N=e=>`${e}_form`,Ae=e=>`${e}`,re=b.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  flex-direction: column;
@@ -1,4 +1,4 @@
1
- import{Q as I,F as v,V as t,bz as N,A as H,aK as b,y as r,ak as B,aL as j,cm as V,cn as E,co as U,o as i,cY as G,u as l,b7 as Y,B as z,b6 as q,p as S,cV as F,br as J,b as _}from"./index-XNBiWrYj.js";import{n as o}from"./mui-bYXq4XMS.js";import{a as K}from"./core-3dlyNYRL.js";import"./sentry-o6h_D-9x.js";import"./zeni-epic-state-LPACxnXP.js";import"./lottie-DEE24l2z.js";import"./liveblocks-DIep7fJd.js";import"./utils-uDUqNRFY.js";import"./analytics-zoE7Zcxt.js";import"./recharts-BHhx6CLo.js";import"./lexical-DPEnH3HH.js";const s={sectionWidth:new r(343,580,726),ruleWrapperPadding:new r(l[3],l[4]),wrapperGap:new r(l[4],l[3]),wrapperMarginBottom:new r(l[6],l[8]),lastWrapperMarginBottom:new r(l[5],l[9]),stepperWidthHeight:new r(20,l[5]),stepperItemLeft:new r(-29,-23),stepperItemTop:new r(2,l[0]),stepperItemPaddingLeft:new r(l[0],10),stepperItemMinHeight:new r(22,28),stepperLeft:new r(11,17),stepperTop:new r(2,l[0]),stepperContentTop:new r(-1,-4)},L={stepper:new z("smallRegular","standardRegular"),amount:new z("standardRegular","largeMedium")},O=({showDeleteBtn:e=!1,isLastSection:f=!1,approvalRule:c,onEditRuleClick:y,onDeleteRuleClick:$})=>{const[m,x]=K.useState(!1),n=I(),{range:h}=c.criteria[0],{steps:u,approvalRuleId:w}=c,a=v.getLocalizedStrings().commonSetUp.approval,A=()=>{x(!0)},W={onOkClick:()=>{x(!1),$?.(w)},onCancelClick:()=>{x(!1)}};return t.jsxs(Q,{windowSize:n,isLastSection:f,children:[t.jsxs(X,{windowSize:n,children:[t.jsxs(se,{children:[t.jsxs(R,{windowSize:n,children:[a.from," ",j("0,0",h.min)]}),t.jsxs(Z,{children:[t.jsx(P,{}),t.jsx(ee,{}),t.jsx(P,{})]}),h.max==null?t.jsx(de,{}):t.jsx(R,{windowSize:n,children:j("0,0",{...h.min,amount:h.max.amount})})]}),t.jsxs(ae,{className:"icons",children:[e&&t.jsx(ne,{onClick:A,"data-testid":b("delete-approval-rule-bill-pay",c.approvalRuleId)}),t.jsx(pe,{onClick:()=>{y(w)},"data-testid":b("edit-approval-rule-bill-pay",c.approvalRuleId)})]})]}),t.jsx(te,{windowSize:n,children:t.jsx(oe,{isSingleStep:u.length===1,windowSize:n,children:u.map((d,D)=>t.jsxs(ie,{isSingleStep:u.length===1,className:"stepperItem",windowSize:n,children:[d.action==="require_approval"?t.jsx(re,{children:a.requireText}):t.jsx(le,{children:a.notifyText}),d.nonUserActors!=null&&d.nonUserActors.filter(p=>p.subType!=null).map((p,M)=>t.jsxs(C,{children:[t.jsx(k,{children:p.subType!=null?a.nonUsers[p.subType].label:null}),d.operator!="is"?t.jsx(T,{className:"operator",children:d.operator}):null]},`${p.subType}_${M}`)),d.actors.map(p=>t.jsxs(C,{children:[t.jsxs(k,{children:[p.firstName," ",p.lastName]}),d.operator!="is"?t.jsx(T,{className:"operator",children:d.operator}):null]},p.userId))]},D))})}),m?t.jsx(V,{titleComponent:t.jsx(U,{children:a.deleteApprovalRuleTitle}),descriptionComponent:t.jsx(E,{children:a.deleteApprovalRuleDesc}),primaryButtonText:a.deleteTxt,proceedButtonVariant:"danger",secondaryButtonText:a.cancelBtnText,action:W}):null]})},Q=o.div`
1
+ import{Q as I,F as v,V as t,bz as N,A as H,aK as b,y as r,ak as B,aL as j,cm as V,cn as E,co as U,o as i,cY as G,u as l,b7 as Y,B as z,b6 as q,p as S,cV as F,br as J,b as _}from"./index-BS0RW8dr.js";import{n as o}from"./mui-bYXq4XMS.js";import{a as K}from"./core-3dlyNYRL.js";import"./sentry-o6h_D-9x.js";import"./zeni-epic-state-LPACxnXP.js";import"./lottie-DEE24l2z.js";import"./liveblocks-DIep7fJd.js";import"./utils-uDUqNRFY.js";import"./analytics-zoE7Zcxt.js";import"./recharts-BHhx6CLo.js";import"./lexical-DPEnH3HH.js";const s={sectionWidth:new r(343,580,726),ruleWrapperPadding:new r(l[3],l[4]),wrapperGap:new r(l[4],l[3]),wrapperMarginBottom:new r(l[6],l[8]),lastWrapperMarginBottom:new r(l[5],l[9]),stepperWidthHeight:new r(20,l[5]),stepperItemLeft:new r(-29,-23),stepperItemTop:new r(2,l[0]),stepperItemPaddingLeft:new r(l[0],10),stepperItemMinHeight:new r(22,28),stepperLeft:new r(11,17),stepperTop:new r(2,l[0]),stepperContentTop:new r(-1,-4)},L={stepper:new z("smallRegular","standardRegular"),amount:new z("standardRegular","largeMedium")},O=({showDeleteBtn:e=!1,isLastSection:f=!1,approvalRule:c,onEditRuleClick:y,onDeleteRuleClick:$})=>{const[m,x]=K.useState(!1),n=I(),{range:h}=c.criteria[0],{steps:u,approvalRuleId:w}=c,a=v.getLocalizedStrings().commonSetUp.approval,A=()=>{x(!0)},W={onOkClick:()=>{x(!1),$?.(w)},onCancelClick:()=>{x(!1)}};return t.jsxs(Q,{windowSize:n,isLastSection:f,children:[t.jsxs(X,{windowSize:n,children:[t.jsxs(se,{children:[t.jsxs(R,{windowSize:n,children:[a.from," ",j("0,0",h.min)]}),t.jsxs(Z,{children:[t.jsx(P,{}),t.jsx(ee,{}),t.jsx(P,{})]}),h.max==null?t.jsx(de,{}):t.jsx(R,{windowSize:n,children:j("0,0",{...h.min,amount:h.max.amount})})]}),t.jsxs(ae,{className:"icons",children:[e&&t.jsx(ne,{onClick:A,"data-testid":b("delete-approval-rule-bill-pay",c.approvalRuleId)}),t.jsx(pe,{onClick:()=>{y(w)},"data-testid":b("edit-approval-rule-bill-pay",c.approvalRuleId)})]})]}),t.jsx(te,{windowSize:n,children:t.jsx(oe,{isSingleStep:u.length===1,windowSize:n,children:u.map((d,D)=>t.jsxs(ie,{isSingleStep:u.length===1,className:"stepperItem",windowSize:n,children:[d.action==="require_approval"?t.jsx(re,{children:a.requireText}):t.jsx(le,{children:a.notifyText}),d.nonUserActors!=null&&d.nonUserActors.filter(p=>p.subType!=null).map((p,M)=>t.jsxs(C,{children:[t.jsx(k,{children:p.subType!=null?a.nonUsers[p.subType].label:null}),d.operator!="is"?t.jsx(T,{className:"operator",children:d.operator}):null]},`${p.subType}_${M}`)),d.actors.map(p=>t.jsxs(C,{children:[t.jsxs(k,{children:[p.firstName," ",p.lastName]}),d.operator!="is"?t.jsx(T,{className:"operator",children:d.operator}):null]},p.userId))]},D))})}),m?t.jsx(V,{titleComponent:t.jsx(U,{children:a.deleteApprovalRuleTitle}),descriptionComponent:t.jsx(E,{children:a.deleteApprovalRuleDesc}),primaryButtonText:a.deleteTxt,proceedButtonVariant:"danger",secondaryButtonText:a.cancelBtnText,action:W}):null]})},Q=o.div`
2
2
  display: flex;
3
3
  flex-direction: column;
4
4
  gap: ${e=>s.wrapperGap.valuePx(e.windowSize)};
@@ -1,4 +1,4 @@
1
- import{av as Y,Q as f,aN as _,F as C,V as e,fn as ee,bz as ie,n as T,aK as B,ad as x,o as l,ap as le,E as se,e as M,aQ as U,al as oe,y as re,p as $,cA as te,aR as ae,b8 as ne,u as de}from"./index-XNBiWrYj.js";import{a as g}from"./core-3dlyNYRL.js";import{n as s}from"./mui-bYXq4XMS.js";import{fx as ce,bV as pe,fy as xe}from"./zeni-epic-state-LPACxnXP.js";import{f as me}from"./VideoPopup-BzQ_Dl9b-mwrODjDA.js";import{M as S}from"./usp-line-BBd1wKwW-ClwDS-nj.js";import"./sentry-o6h_D-9x.js";import"./lottie-DEE24l2z.js";import"./liveblocks-DIep7fJd.js";import"./utils-uDUqNRFY.js";import"./analytics-zoE7Zcxt.js";import"./recharts-BHhx6CLo.js";import"./lexical-DPEnH3HH.js";import"./VideoPlayer-_1Msrww9-DaiS1R42.js";const A="https://storage.googleapis.com/zeni-apis.appspot.com/images/Billpay-Light.png",D="https://storage.googleapis.com/zeni-apis.appspot.com/images/Billpay-Dark.png",he={midContainerMarginBottom:new re(de[5],44)},ge=s.div`
1
+ import{av as Y,Q as f,aN as _,F as C,V as e,fo as ee,bz as ie,n as T,aK as B,ad as x,o as l,ap as le,E as se,d as M,aQ as U,al as oe,y as re,p as $,cA as te,aR as ae,b8 as ne,u as de}from"./index-BS0RW8dr.js";import{a as g}from"./core-3dlyNYRL.js";import{n as s}from"./mui-bYXq4XMS.js";import{fx as ce,bV as pe,fy as xe}from"./zeni-epic-state-LPACxnXP.js";import{f as me}from"./VideoPopup-DdtmLcPB-9kSPQrRF.js";import{M as S}from"./usp-line-BBd1wKwW-ClwDS-nj.js";import"./sentry-o6h_D-9x.js";import"./lottie-DEE24l2z.js";import"./liveblocks-DIep7fJd.js";import"./utils-uDUqNRFY.js";import"./analytics-zoE7Zcxt.js";import"./recharts-BHhx6CLo.js";import"./lexical-DPEnH3HH.js";import"./VideoPlayer-BxuhQQfM-CSaCo4fi.js";const A="https://storage.googleapis.com/zeni-apis.appspot.com/images/Billpay-Light.png",L="https://storage.googleapis.com/zeni-apis.appspot.com/images/Billpay-Dark.png",he={midContainerMarginBottom:new re(de[5],44)},ge=s.div`
2
2
  display: flex;
3
3
  flex: 1 1 auto;
4
4
  min-height: 100%;
@@ -17,7 +17,7 @@ import{av as Y,Q as f,aN as _,F as C,V as e,fn as ee,bz as ie,n as T,aK as B,ad
17
17
  margin: auto;
18
18
  padding: ${l.sp5} ${l.sp0};
19
19
  color: ${i=>i.theme.colors.primary};
20
- `,L=s.div`
20
+ `,D=s.div`
21
21
  display: flex;
22
22
  flex-direction: ${i=>i.windowSize==="small"?"column":"row"};
23
23
  align-items: center;
@@ -35,7 +35,7 @@ import{av as Y,Q as f,aN as _,F as C,V as e,fn as ee,bz as ie,n as T,aK as B,ad
35
35
  align-content: center;
36
36
  justify-content: center;
37
37
  align-items: center;
38
- `,E=s.div`
38
+ `,R=s.div`
39
39
  margin-left: ${i=>i.windowSize==="small"?l.sp0:l.sp6};
40
40
  margin-bottom: ${i=>i.windowSize==="small"?l.sp4:l.sp0};
41
41
  background: ${i=>i.theme.colors.grey3};
@@ -63,7 +63,7 @@ import{av as Y,Q as f,aN as _,F as C,V as e,fn as ee,bz as ie,n as T,aK as B,ad
63
63
  color: ${i=>i.theme.colors.champion};
64
64
  `,d=s.div``,c=s.div`
65
65
  padding-left: ${l.sp3};
66
- `,R=s(S)`
66
+ `,E=s(S)`
67
67
  color: ${$.graphColor16Dark};
68
68
  `,Q=s(S)`
69
69
  color: ${$.graphColor09Dark};
@@ -81,4 +81,4 @@ import{av as Y,Q as f,aN as _,F as C,V as e,fn as ee,bz as ie,n as T,aK as B,ad
81
81
  `,Se=s(U)`
82
82
  margin: ${i=>i.windowSize==="small"?l.sp1:`auto ${l.sp5}`};
83
83
  color: ${i=>i.theme.colors.grey1};
84
- `,o=C.getLocalizedStrings().spendManagement.billPay.billPayPromo,t=C.getLocalizedStrings().commonSetUp.businessVerification.terms,Re=({billPaySetupView:i,analytics:r,meetingUrl:N,videoUrl:O,onButtonClick:W,onBackClick:Z,onSetupBillPaySuccess:z,onClickMenuIcon:q})=>{const h=Y(),a=f(),{billPayTermsDetails:p}=i,[F,H]=g.useState(!1),[J,b]=g.useState(!1),k=_(p?.fetchStatus.fetchState);g.useEffect(()=>{k==="In-Progress"&&p?.fetchStatus.fetchState==="Completed"&&z?.()},[k,z,p?.fetchStatus]);const X=()=>{r?.trackBillPayPromoScheduleDemo(),b(!0)},G=ce(h.loggedInUserRoleMap),v=pe(h.loggedInUserRoleMap)&&!G,P=v?o.setupNonAccessableUsersPromoText:o.promoText;return e.jsxs(ge,{children:[F===!0?e.jsx(me,{onCancelClick:()=>{H(!1)},videoUrl:O}):null,J===!0?e.jsx(ee,{onCancelClick:()=>{b(!1)},meetingUrl:N}):null,e.jsx(ie,{title:o.title,onBackClick:Z,showBackButton:!xe(h.loggedInUserRoleMap),showMenuIcon:a==="small"||a==="medium-compact",onClickMenuIcon:q,source:"BillPayPromoPage"}),e.jsxs(we,{windowSize:a,children:[a==="small"?e.jsx(je,{children:P}):e.jsx(ue,{children:P}),a==="small"?e.jsx(ze,{}):e.jsx(be,{}),v===!1?e.jsxs(ye,{children:[e.jsxs($e,{windowSize:a,children:[e.jsx(T,{variant:"secondary",label:o.scheduleDemoButton,onClick:X,"data-testid":B("billpay-schedule-demo-button")}),e.jsx(Se,{windowSize:a,children:o.orText}),e.jsx(T,{variant:"primary",label:o.setupBillPayButton,loading:p?.fetchStatus.fetchState==="In-Progress",onClick:W,"data-testid":B("billpay-setup-button")})]}),e.jsxs(fe,{children:[o.terms.terms1,e.jsx(x,{href:t.consentUrl,linkText:t.consent}),t.term2,e.jsx(x,{href:t.depositUrl,linkText:t.depositTerms}),t.term3,e.jsx(x,{href:t.privacyPolicyUrl,onZeniLinkClick:()=>(r?.trackBillPayPrivacyPolicy(),!0),linkText:t.privacy}),t.term4,e.jsx(x,{href:t.tosUrl,onZeniLinkClick:()=>(r?.trackBillPayAgreement(),!0),linkText:t.tos}),t.term5,o.terms.terms3]})]}):null]})]})},ze=()=>{const i=M(),r=f();return e.jsxs(L,{windowSize:r,children:[e.jsx(V,{windowSize:r,children:e.jsx(E,{windowSize:r,children:i.mode==="dark"?e.jsx(m,{src:D,alt:"forecast-promo",style:{width:"100%",height:"auto"},loading:"lazy"}):e.jsx(m,{src:A,alt:"forecast-promo",style:{width:"100%",height:"auto"},loading:"lazy"})})}),e.jsxs(I,{windowSize:r,children:[e.jsxs(n,{windowSize:r,children:[e.jsx(d,{children:e.jsx(K,{})}),e.jsxs(c,{children:[e.jsx(y,{children:o.fullyManagedText.bold}),e.jsx(j,{children:o.fullyManagedText.regular})]})]}),e.jsxs(n,{windowSize:r,children:[e.jsx(d,{children:e.jsx(Q,{})}),e.jsxs(c,{children:[e.jsx(y,{children:o.multiLevelApprovalText.bold}),e.jsx(j,{children:o.multiLevelApprovalText.regular})]})]}),e.jsxs(n,{windowSize:r,children:[e.jsx(d,{children:e.jsx(R,{})}),e.jsxs(c,{children:[e.jsx(y,{children:o.aiPoweredText.bold}),e.jsx(j,{children:o.aiPoweredText.regular})]})]})]})]})},be=()=>{const i=M(),r=f();return e.jsxs(L,{windowSize:r,children:[e.jsxs(I,{windowSize:r,children:[e.jsxs(n,{windowSize:r,style:{width:"376px"},children:[e.jsx(d,{children:e.jsx(K,{})}),e.jsxs(c,{children:[e.jsx(u,{children:o.fullyManagedText.bold}),e.jsx(w,{children:o.fullyManagedText.regular})]})]}),e.jsxs(n,{windowSize:r,style:{width:"376px"},children:[e.jsx(d,{children:e.jsx(Q,{})}),e.jsxs(c,{children:[e.jsx(u,{children:o.multiLevelApprovalText.bold}),e.jsx(w,{children:o.multiLevelApprovalText.regular})]})]}),e.jsxs(n,{windowSize:r,style:{width:"376px"},children:[e.jsx(d,{children:e.jsx(R,{})}),e.jsxs(c,{children:[e.jsx(u,{children:o.aiPoweredText.bold}),e.jsx(w,{children:o.aiPoweredText.regular})]})]})]}),e.jsx(V,{windowSize:r,children:e.jsx(E,{windowSize:r,children:i.mode==="dark"?e.jsx(m,{src:D,alt:"forecast-promo",style:{width:"615px",height:"402px"},loading:"lazy"}):e.jsx(m,{src:A,alt:"forecast-promo",style:{width:"615px",height:"402px"},loading:"lazy"})})})]})};export{Re as default};
84
+ `,o=C.getLocalizedStrings().spendManagement.billPay.billPayPromo,t=C.getLocalizedStrings().commonSetUp.businessVerification.terms,Ee=({billPaySetupView:i,analytics:r,meetingUrl:N,videoUrl:O,onButtonClick:Z,onBackClick:q,onSetupBillPaySuccess:z,onClickMenuIcon:F})=>{const h=Y(),a=f(),{billPayTermsDetails:p}=i,[H,J]=g.useState(!1),[W,b]=g.useState(!1),k=_(p?.fetchStatus.fetchState);g.useEffect(()=>{k==="In-Progress"&&p?.fetchStatus.fetchState==="Completed"&&z?.()},[k,z,p?.fetchStatus]);const X=()=>{r?.trackBillPayPromoScheduleDemo(),b(!0)},G=ce(h.loggedInUserRoleMap),v=pe(h.loggedInUserRoleMap)&&!G,P=v?o.setupNonAccessableUsersPromoText:o.promoText;return e.jsxs(ge,{children:[H===!0?e.jsx(me,{onCancelClick:()=>{J(!1)},videoUrl:O}):null,W===!0?e.jsx(ee,{onCancelClick:()=>{b(!1)},meetingUrl:N}):null,e.jsx(ie,{title:o.title,onBackClick:q,showBackButton:!xe(h.loggedInUserRoleMap),showMenuIcon:a==="small"||a==="medium-compact",onClickMenuIcon:F,source:"BillPayPromoPage"}),e.jsxs(we,{windowSize:a,children:[a==="small"?e.jsx(je,{children:P}):e.jsx(ue,{children:P}),a==="small"?e.jsx(ze,{}):e.jsx(be,{}),v===!1?e.jsxs(ye,{children:[e.jsxs($e,{windowSize:a,children:[e.jsx(T,{variant:"secondary",label:o.scheduleDemoButton,onClick:X,"data-testid":B("billpay-schedule-demo-button")}),e.jsx(Se,{windowSize:a,children:o.orText}),e.jsx(T,{variant:"primary",label:o.setupBillPayButton,loading:p?.fetchStatus.fetchState==="In-Progress",onClick:Z,"data-testid":B("billpay-setup-button")})]}),e.jsxs(fe,{children:[o.terms.terms1,e.jsx(x,{href:t.consentUrl,linkText:t.consent}),t.term2,e.jsx(x,{href:t.depositUrl,linkText:t.depositTerms}),t.term3,e.jsx(x,{href:t.privacyPolicyUrl,onZeniLinkClick:()=>(r?.trackBillPayPrivacyPolicy(),!0),linkText:t.privacy}),t.term4,e.jsx(x,{href:t.tosUrl,onZeniLinkClick:()=>(r?.trackBillPayAgreement(),!0),linkText:t.tos}),t.term5,o.terms.terms3]})]}):null]})]})},ze=()=>{const i=M(),r=f();return e.jsxs(D,{windowSize:r,children:[e.jsx(V,{windowSize:r,children:e.jsx(R,{windowSize:r,children:i.mode==="dark"?e.jsx(m,{src:L,alt:"forecast-promo",style:{width:"100%",height:"auto"},loading:"lazy"}):e.jsx(m,{src:A,alt:"forecast-promo",style:{width:"100%",height:"auto"},loading:"lazy"})})}),e.jsxs(I,{windowSize:r,children:[e.jsxs(n,{windowSize:r,children:[e.jsx(d,{children:e.jsx(K,{})}),e.jsxs(c,{children:[e.jsx(y,{children:o.fullyManagedText.bold}),e.jsx(j,{children:o.fullyManagedText.regular})]})]}),e.jsxs(n,{windowSize:r,children:[e.jsx(d,{children:e.jsx(Q,{})}),e.jsxs(c,{children:[e.jsx(y,{children:o.multiLevelApprovalText.bold}),e.jsx(j,{children:o.multiLevelApprovalText.regular})]})]}),e.jsxs(n,{windowSize:r,children:[e.jsx(d,{children:e.jsx(E,{})}),e.jsxs(c,{children:[e.jsx(y,{children:o.aiPoweredText.bold}),e.jsx(j,{children:o.aiPoweredText.regular})]})]})]})]})},be=()=>{const i=M(),r=f();return e.jsxs(D,{windowSize:r,children:[e.jsxs(I,{windowSize:r,children:[e.jsxs(n,{windowSize:r,style:{width:"376px"},children:[e.jsx(d,{children:e.jsx(K,{})}),e.jsxs(c,{children:[e.jsx(u,{children:o.fullyManagedText.bold}),e.jsx(w,{children:o.fullyManagedText.regular})]})]}),e.jsxs(n,{windowSize:r,style:{width:"376px"},children:[e.jsx(d,{children:e.jsx(Q,{})}),e.jsxs(c,{children:[e.jsx(u,{children:o.multiLevelApprovalText.bold}),e.jsx(w,{children:o.multiLevelApprovalText.regular})]})]}),e.jsxs(n,{windowSize:r,style:{width:"376px"},children:[e.jsx(d,{children:e.jsx(E,{})}),e.jsxs(c,{children:[e.jsx(u,{children:o.aiPoweredText.bold}),e.jsx(w,{children:o.aiPoweredText.regular})]})]})]}),e.jsx(V,{windowSize:r,children:e.jsx(R,{windowSize:r,children:i.mode==="dark"?e.jsx(m,{src:L,alt:"forecast-promo",style:{width:"615px",height:"402px"},loading:"lazy"}):e.jsx(m,{src:A,alt:"forecast-promo",style:{width:"615px",height:"402px"},loading:"lazy"})})})]})};export{Ee as default};
@@ -1,4 +1,4 @@
1
- import{e as Oe,Q as Ue,aN as j,a8 as _e,cB as De,F as Re,aS as Z,V as t,f5 as ze,aK as He,p as Le,y as u,bz as Me,A as Ne,ab as qe,fo as z,dQ as Ge,fp as Je,bu as Ke,dG as Qe,bQ as Ze,fq as Xe,aO as Ye,o as L,fr as et,u as a,ak as tt,bI as it}from"./index-XNBiWrYj.js";import{a as g}from"./core-3dlyNYRL.js";import{n as m}from"./mui-bYXq4XMS.js";import{bM as nt}from"./zeni-epic-state-LPACxnXP.js";import{g as ot}from"./UploadAdditionalDocumentOverlay-BAvSyhDW-D4KE1Kke.js";import"./sentry-o6h_D-9x.js";import"./lottie-DEE24l2z.js";import"./liveblocks-DIep7fJd.js";import"./utils-uDUqNRFY.js";import"./analytics-zoE7Zcxt.js";import"./recharts-BHhx6CLo.js";import"./lexical-DPEnH3HH.js";const n={titleWidth:new u(343,580,726,826),setupDetailsRowGap:new u(12,a[5],a[5]),sectionRowGap:new u(a[5],a[9],a[9]),lastSectionPaddingBottom:new u(a[7],a[10],a[10]),iconWidthHeight:new u(20,a[4]),subTitlePaddingTop:new u(12,a[3]),subTitlePaddingBottom:new u(a[3],a[3]),overlayWidth:new u(100,100,59)},X="billPaySetUpPage",W="billPayAccount",Ct=({billPaySetupView:e,isDisabled:w,billpayApprovalView:E,meetingUrl:v,showIntlWiseWidget:s,connectedAccountProvider:ee,isAccountsEnabled:te,isLocalCurrencyEnabled:ie,analytics:b,filesEndPoint:ne,authParams:oe,accountsPromoConfig:ae,onBackClick:le,onBusinessVerificationSectionClick:ce,onSetupApprovalRulesSectionClick:se,onFetchLinkTokenClick:re,onEstablishConnectionClick:de,onEstablishConnectionSuccess:ue,onUpdatePrimaryFundingAccount:pe,onUpdateAccountClick:he,onUpdatePaymentAccountStatus:fe,onUpdatePaymentAccountLoginStatus:ge,onEnableBillPayClick:me,onEnableBillPaySuccess:M,onClickMenuIcon:be,onInternationPaymentSetUpClick:ye,onEditFileName:Se,onDeleteFile:Pe,updateFilesEntity:xe,onCompanyOfficerUpdated:we,onSendForVerificationClick:ve,onSignUpClick:Ce})=>{const C=Oe(),i=Ue(),[k,y]=g.useState(!1),N=g.useRef(null),{fetchState:p,updateStatus:S,accountUpdateStatus:ke,plaidConnectionDetails:$,allBankAccounts:Ae,companyBillPayInfo:A,isRefreshingViewInBackground:Te,selectedCompanyOfficer:c,primaryFundingAccount:r,allFundingAccounts:q}=e,h=A?.internationalWireOnboardingStatus,T=h==null||h.code==="onboarding_status_not_started",{fetchState:G,allApprovalRules:I,approvalRulesStatus:Ie}=E,O=$.link_account.updateStatus,U=$.update_account.updateStatus,B=j(p),J=j(S.fetchState),K=j(O.fetchState),Q=j(U.fetchState),P=_e({mode:"all",reValidateMode:"onChange",defaultValues:g.useMemo(()=>H(e),[e]),values:H(e)});g.useEffect(()=>{!k&&c?.additionalDocumentTypesRequestedForVerification.includes("social_security_card")===!0&&c.areAdditionalDocumentsRequestedForVerification&&!c.areAdditionalDocumentsSubmittedForVerification&&c.userVerificationStatus?.code==="require_info"&&y(!0),k&&B==="In-Progress"&&p==="Completed"&&y(!1)},[c,p,B]),g.useEffect(()=>{(B==="In-Progress"&&p==="Completed"||K==="In-Progress"&&O.fetchState==="Completed"||Q==="In-Progress"&&U.fetchState==="Completed")&&P.reset(H(e))},[B,p,P,e,K,O.fetchState,Q,U.fetchState]);const Be=P.handleSubmit(x=>{b.trackEnableBillPay(),me()}),Fe=async(x,V)=>{const o=V[W];if(x.includes(W)){if(x.includes("fundingAccount")){if(o.fundingAccount.selectedOption!=null&&r?.id!=o.fundingAccount.selectedOption){const f=q.find(R=>R.id===o.fundingAccount.selectedOption);f!=null&&pe(o.fundingAccount.selectedOption,f.accType)}}else if(o.account.selectedOption!=null&&r?.id!=null&&r?.zeniAccountId!=o.account.selectedOption){const f=o.account.allOptions.find(R=>R.value===o.account.selectedOption);f!=null&&typeof f.label=="string"&&b.trackConnectBankLink(f.value,f.label,"bill_pay"),he(o.account.selectedOption,r.id,r.accType)}}};g.useEffect(()=>{const x=P.watch((V,{name:o})=>{o!=null&&V!=null&&De(()=>Fe(o,V))});return()=>{x.unsubscribe()}}),g.useEffect(()=>{J==="In-Progress"&&S.fetchState==="Completed"&&M()},[M,J,S.fetchState]);const{commonSetUp:Ve,spendManagement:je}=Re.getLocalizedStrings(),{setUp:d}=Ve,{billPaySetup:l}=je.billPay,_=A?.isBusinessVerified===!0&&(r?.accType==="depositAccount"||nt(r?.providerVerificationStatus?.code??"")),D=A?.isBillPayEnabled===!0,We=_?d.setupVerifiedSubTitle:l.setupSubTitle,Ee=p==="In-Progress"||p==="Not-Started"||G==="In-Progress"||G==="Not-Started",F=C.mode==="light"?new Z(C.colors.brandColorJadeLight):new Z(C.colors.brandColorJadeDark),$e=()=>{!k&&c?.additionalDocumentTypesRequestedForVerification.includes("social_security_card")===!0&&c.areAdditionalDocumentsRequestedForVerification&&!c.areAdditionalDocumentsSubmittedForVerification&&c.userVerificationStatus?.code==="require_info"?y(!0):ce?.()};return t.jsxs(lt,{ref:N,children:[t.jsx(ze,{anchor:"right",PaperProps:{style:{width:n.overlayWidth.valuePercentage(i),boxShadow:"none"}},open:k,onClose:()=>y(!1),style:{backgroundColor:Le.drawerBackground},transitionDuration:250,"data-testid":He("bill-pay-setup-drawer"),children:t.jsx(ot,{authParams:oe,filesEndPoint:ne,updateStatus:S,onEditFileName:Se,onDeleteFile:Pe,updateFilesEntity:xe,companyOfficer:c,onClose:()=>y(!1),onCompanyOfficerUpdated:we,onSendForVerificationClick:ve})}),t.jsx(Me,{title:l.setupTitle,style:{zIndex:3},onBackClick:le,showMenuIcon:!D&&(i==="medium-compact"||i==="small"),onClickMenuIcon:be,scrollableContent:N,backgroundColor:C.colors.grey4,source:"BillPaySetUpPage"}),t.jsxs(rt,{windowSize:i,children:[t.jsx(st,{windowSize:i,children:We}),Ee?t.jsx(dt,{children:t.jsx(Ne,{size:"ExtraLarge",start:!0})}):t.jsxs(at,{children:[t.jsx(qe,{...P,children:t.jsx("form",{id:Y(X),onSubmit:Be,children:t.jsxs(ut,{windowSize:i,children:[t.jsx(z,{onClick:$e,title:d.businessVerificationTitle,subTitle:d.businessVerificationSubTitle,header:d.businessVerificationHeader,icon:{element:t.jsx(Ge,{width:n.iconWidthHeight.valuePx(i),height:n.iconWidthHeight.valuePx(i)}),color:F},status:A?.businessVerificationStatus,isLoading:Te,isActiveWhileLoading:!0}),t.jsx(Je,{connectedAccountProvider:ee,primaryFundingAccount:r,allFundingAccounts:q,plaidConnectionDetails:$,allBankAccounts:Ae,sectionId:W,isDisabled:w,onFetchLinkTokenClick:re,onEstablishConnectionClick:de,onUpdatePaymentAccountStatus:fe,onUpdatePaymentAccountLoginStatus:ge,onEstablishConnectionSuccess:ue,icon:{element:t.jsx(Ke,{width:n.iconWidthHeight.valuePx(i),height:n.iconWidthHeight.valuePx(i)}),color:F},analytics:b,productType:"bill_pay",isAccountsEnabled:te,onSignUpClick:Ce,pageName:"Bill Pay Setup",accountsPromoConfig:ae}),t.jsx(z,{title:I.length>0?d.approvalTitle:d.createApprovalTitle,subTitle:l.approvalSubTitle,header:I.length>0?d.approvalHeader:d.setupApprovalHeader,icon:{element:t.jsx(Qe,{width:n.iconWidthHeight.valuePx(i),height:n.iconWidthHeight.valuePx(i)}),color:F},style:{paddingBottom:n.lastSectionPaddingBottom.valuePx(i)},onClick:se,status:I.length>0?Ie:void 0})]})})}),s===!0?t.jsx(z,{title:T?l.enableInternationalWireTitle:l.internationWireTitle,subTitle:l.internationalWireSubTitle2,header:l.internationalWireHeader,icon:{element:t.jsx(Xe,{width:n.iconWidthHeight.valuePx(i),height:n.iconWidthHeight.valuePx(i)}),color:F},style:{paddingBottom:n.lastSectionPaddingBottom.valuePx(i)},isClickable:!0,onClick:()=>{T&&b.trackEnableIntlWire(ie),ye?.()},status:T?void 0:{name:h.name,code:h.code},statusInfoIcon:h?.code==="verification_pending"||h?.code==="verification_failed"?t.jsx(Ze,{title:h.code==="verification_pending"?l.tooltipTexts.pendingInternationalVerificationText:l.tooltipTexts.internationalVerificationFailed,children:t.jsx(ct,{})}):void 0,shouldHover:!0,showRightArrow:T}):null]})]}),_&&!D&&I.length>0?t.jsx(Ye,{formId:Y(X),primaryBtn:{label:l.enableBillPay,style:{width:"auto",minWidth:i==="small"?"auto":"181px"},isLoading:S.fetchState==="In-Progress"||ke.fetchState==="In-Progress",isDisabled:w!=null},showCancel:!1,helperText:l.terms,cancelBtn:{label:""},style:{padding:`12px ${L.sp3}`}}):null,t.jsx(et,{isFooterRendered:_&&!D,meetingUrl:v,analytics:b,productType:"bill_pay"})]})},at=m.div``,lt=m.div`
1
+ import{d as $e,Q as Re,aN as F,a8 as De,cB as Ue,F as _e,aS as Z,V as t,f6 as He,aK as ze,p as Le,y as u,bz as Ne,A as qe,ab as Me,fp as H,dR as Ge,fq as Je,bu as Ke,dH as Qe,bQ as Ze,fr as Xe,aO as Ye,o as L,fs as et,u as a,ak as tt,bI as it}from"./index-BS0RW8dr.js";import{a as g}from"./core-3dlyNYRL.js";import{n as m}from"./mui-bYXq4XMS.js";import{bM as nt}from"./zeni-epic-state-LPACxnXP.js";import{g as ot}from"./UploadAdditionalDocumentOverlay-D72fkcgM-BkIuCEEz.js";import"./sentry-o6h_D-9x.js";import"./lottie-DEE24l2z.js";import"./liveblocks-DIep7fJd.js";import"./utils-uDUqNRFY.js";import"./analytics-zoE7Zcxt.js";import"./recharts-BHhx6CLo.js";import"./lexical-DPEnH3HH.js";const n={titleWidth:new u(343,580,726,826),setupDetailsRowGap:new u(12,a[5],a[5]),sectionRowGap:new u(a[5],a[9],a[9]),lastSectionPaddingBottom:new u(a[7],a[10],a[10]),iconWidthHeight:new u(20,a[4]),subTitlePaddingTop:new u(12,a[3]),subTitlePaddingBottom:new u(a[3],a[3]),overlayWidth:new u(100,100,59)},X="billPaySetUpPage",W="billPayAccount",Ct=({billPaySetupView:e,isDisabled:w,billpayApprovalView:E,meetingUrl:v,showIntlWiseWidget:s,connectedAccountProvider:ee,isAccountsEnabled:te,isLocalCurrencyEnabled:ie,analytics:b,filesEndPoint:ne,authParams:oe,accountsPromoConfig:ae,onBackClick:le,onBusinessVerificationSectionClick:ce,onSetupApprovalRulesSectionClick:se,onFetchLinkTokenClick:re,onEstablishConnectionClick:de,onEstablishConnectionSuccess:ue,onUpdatePrimaryFundingAccount:pe,onUpdateAccountClick:he,onUpdatePaymentAccountStatus:fe,onUpdatePaymentAccountLoginStatus:ge,onEnableBillPayClick:me,onEnableBillPaySuccess:N,onClickMenuIcon:be,onInternationPaymentSetUpClick:ye,onEditFileName:Se,onDeleteFile:Pe,updateFilesEntity:xe,onCompanyOfficerUpdated:we,onSendForVerificationClick:ve,onSignUpClick:Ce})=>{const C=$e(),i=Re(),[k,y]=g.useState(!1),q=g.useRef(null),{fetchState:p,updateStatus:S,accountUpdateStatus:ke,plaidConnectionDetails:O,allBankAccounts:Ae,companyBillPayInfo:A,isRefreshingViewInBackground:Te,selectedCompanyOfficer:c,primaryFundingAccount:r,allFundingAccounts:M}=e,h=A?.internationalWireOnboardingStatus,T=h==null||h.code==="onboarding_status_not_started",{fetchState:G,allApprovalRules:B,approvalRulesStatus:Be}=E,$=O.link_account.updateStatus,R=O.update_account.updateStatus,I=F(p),J=F(S.fetchState),K=F($.fetchState),Q=F(R.fetchState),P=De({mode:"all",reValidateMode:"onChange",defaultValues:g.useMemo(()=>z(e),[e]),values:z(e)});g.useEffect(()=>{!k&&c?.additionalDocumentTypesRequestedForVerification.includes("social_security_card")===!0&&c.areAdditionalDocumentsRequestedForVerification&&!c.areAdditionalDocumentsSubmittedForVerification&&c.userVerificationStatus?.code==="require_info"&&y(!0),k&&I==="In-Progress"&&p==="Completed"&&y(!1)},[c,p,I]),g.useEffect(()=>{(I==="In-Progress"&&p==="Completed"||K==="In-Progress"&&$.fetchState==="Completed"||Q==="In-Progress"&&R.fetchState==="Completed")&&P.reset(z(e))},[I,p,P,e,K,$.fetchState,Q,R.fetchState]);const Ie=P.handleSubmit(x=>{b.trackEnableBillPay(),me()}),Ve=async(x,j)=>{const o=j[W];if(x.includes(W)){if(x.includes("fundingAccount")){if(o.fundingAccount.selectedOption!=null&&r?.id!=o.fundingAccount.selectedOption){const f=M.find(_=>_.id===o.fundingAccount.selectedOption);f!=null&&pe(o.fundingAccount.selectedOption,f.accType)}}else if(o.account.selectedOption!=null&&r?.id!=null&&r?.zeniAccountId!=o.account.selectedOption){const f=o.account.allOptions.find(_=>_.value===o.account.selectedOption);f!=null&&typeof f.label=="string"&&b.trackConnectBankLink(f.value,f.label,"bill_pay"),he(o.account.selectedOption,r.id,r.accType)}}};g.useEffect(()=>{const x=P.watch((j,{name:o})=>{o!=null&&j!=null&&Ue(()=>Ve(o,j))});return()=>{x.unsubscribe()}}),g.useEffect(()=>{J==="In-Progress"&&S.fetchState==="Completed"&&N()},[N,J,S.fetchState]);const{commonSetUp:je,spendManagement:Fe}=_e.getLocalizedStrings(),{setUp:d}=je,{billPaySetup:l}=Fe.billPay,D=A?.isBusinessVerified===!0&&(r?.accType==="depositAccount"||nt(r?.providerVerificationStatus?.code??"")),U=A?.isBillPayEnabled===!0,We=D?d.setupVerifiedSubTitle:l.setupSubTitle,Ee=p==="In-Progress"||p==="Not-Started"||G==="In-Progress"||G==="Not-Started",V=C.mode==="light"?new Z(C.colors.brandColorJadeLight):new Z(C.colors.brandColorJadeDark),Oe=()=>{!k&&c?.additionalDocumentTypesRequestedForVerification.includes("social_security_card")===!0&&c.areAdditionalDocumentsRequestedForVerification&&!c.areAdditionalDocumentsSubmittedForVerification&&c.userVerificationStatus?.code==="require_info"?y(!0):ce?.()};return t.jsxs(lt,{ref:q,children:[t.jsx(He,{anchor:"right",PaperProps:{style:{width:n.overlayWidth.valuePercentage(i),boxShadow:"none"}},open:k,onClose:()=>y(!1),style:{backgroundColor:Le.drawerBackground},transitionDuration:250,"data-testid":ze("bill-pay-setup-drawer"),children:t.jsx(ot,{authParams:oe,filesEndPoint:ne,updateStatus:S,onEditFileName:Se,onDeleteFile:Pe,updateFilesEntity:xe,companyOfficer:c,onClose:()=>y(!1),onCompanyOfficerUpdated:we,onSendForVerificationClick:ve})}),t.jsx(Ne,{title:l.setupTitle,style:{zIndex:3},onBackClick:le,showMenuIcon:!U&&(i==="medium-compact"||i==="small"),onClickMenuIcon:be,scrollableContent:q,backgroundColor:C.colors.grey4,source:"BillPaySetUpPage"}),t.jsxs(rt,{windowSize:i,children:[t.jsx(st,{windowSize:i,children:We}),Ee?t.jsx(dt,{children:t.jsx(qe,{size:"ExtraLarge",start:!0})}):t.jsxs(at,{children:[t.jsx(Me,{...P,children:t.jsx("form",{id:Y(X),onSubmit:Ie,children:t.jsxs(ut,{windowSize:i,children:[t.jsx(H,{onClick:Oe,title:d.businessVerificationTitle,subTitle:d.businessVerificationSubTitle,header:d.businessVerificationHeader,icon:{element:t.jsx(Ge,{width:n.iconWidthHeight.valuePx(i),height:n.iconWidthHeight.valuePx(i)}),color:V},status:A?.businessVerificationStatus,isLoading:Te,isActiveWhileLoading:!0}),t.jsx(Je,{connectedAccountProvider:ee,primaryFundingAccount:r,allFundingAccounts:M,plaidConnectionDetails:O,allBankAccounts:Ae,sectionId:W,isDisabled:w,onFetchLinkTokenClick:re,onEstablishConnectionClick:de,onUpdatePaymentAccountStatus:fe,onUpdatePaymentAccountLoginStatus:ge,onEstablishConnectionSuccess:ue,icon:{element:t.jsx(Ke,{width:n.iconWidthHeight.valuePx(i),height:n.iconWidthHeight.valuePx(i)}),color:V},analytics:b,productType:"bill_pay",isAccountsEnabled:te,onSignUpClick:Ce,pageName:"Bill Pay Setup",accountsPromoConfig:ae}),t.jsx(H,{title:B.length>0?d.approvalTitle:d.createApprovalTitle,subTitle:l.approvalSubTitle,header:B.length>0?d.approvalHeader:d.setupApprovalHeader,icon:{element:t.jsx(Qe,{width:n.iconWidthHeight.valuePx(i),height:n.iconWidthHeight.valuePx(i)}),color:V},style:{paddingBottom:n.lastSectionPaddingBottom.valuePx(i)},onClick:se,status:B.length>0?Be:void 0})]})})}),s===!0?t.jsx(H,{title:T?l.enableInternationalWireTitle:l.internationWireTitle,subTitle:l.internationalWireSubTitle2,header:l.internationalWireHeader,icon:{element:t.jsx(Xe,{width:n.iconWidthHeight.valuePx(i),height:n.iconWidthHeight.valuePx(i)}),color:V},style:{paddingBottom:n.lastSectionPaddingBottom.valuePx(i)},isClickable:!0,onClick:()=>{T&&b.trackEnableIntlWire(ie),ye?.()},status:T?void 0:{name:h.name,code:h.code},statusInfoIcon:h?.code==="verification_pending"||h?.code==="verification_failed"?t.jsx(Ze,{title:h.code==="verification_pending"?l.tooltipTexts.pendingInternationalVerificationText:l.tooltipTexts.internationalVerificationFailed,children:t.jsx(ct,{})}):void 0,shouldHover:!0,showRightArrow:T}):null]})]}),D&&!U&&B.length>0?t.jsx(Ye,{formId:Y(X),primaryBtn:{label:l.enableBillPay,style:{width:"auto",minWidth:i==="small"?"auto":"181px"},isLoading:S.fetchState==="In-Progress"||ke.fetchState==="In-Progress",isDisabled:w!=null},showCancel:!1,helperText:l.terms,cancelBtn:{label:""},style:{padding:`12px ${L.sp3}`}}):null,t.jsx(et,{isFooterRendered:D&&!U,meetingUrl:v,analytics:b,productType:"bill_pay"})]})},at=m.div``,lt=m.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
@@ -39,4 +39,4 @@ import{e as Oe,Q as Ue,aN as j,a8 as _e,cB as De,F as Re,aS as Z,V as t,f5 as ze
39
39
  display: flex;
40
40
  flex-direction: column;
41
41
  row-gap: ${e=>n.sectionRowGap.valuePx(e.windowSize)};
42
- `,H=e=>{const{allBankAccounts:w,allFundingAccounts:E,primaryFundingAccount:v}=e;return{[W]:{fundingAccount:{selectedOption:v?.id,allOptions:E.map(s=>({label:s.label,value:s.id,isRecommended:s.accType==="depositAccount"}))},account:{selectedOption:v?.zeniAccountId,allOptions:w.map(s=>({label:s.accountName,value:s.accountId}))}}}},Y=e=>`${e}_form`;export{Ct as default,Y as uniqueName};
42
+ `,z=e=>{const{allBankAccounts:w,allFundingAccounts:E,primaryFundingAccount:v}=e;return{[W]:{fundingAccount:{selectedOption:v?.id,allOptions:E.map(s=>({label:s.label,value:s.id,isRecommended:s.accType==="depositAccount"}))},account:{selectedOption:v?.zeniAccountId,allOptions:w.map(s=>({label:s.accountName,value:s.accountId}))}}}},Y=e=>`${e}_form`;export{Ct as default,Y as uniqueName};
@@ -1,4 +1,4 @@
1
- import{e as fe,Q as be,a8 as Ce,cB as Pe,aS as j,F as xe,V as t,y as P,bz as Ae,A as Ie,ab as ve,bu as ke,cC as je,aO as Be,o as s,hD as $e,d2 as Ve,d3 as Te,u as x,ak as ze,gM as De,B as Ee,p as Le}from"./index-XNBiWrYj.js";import{a as F}from"./core-3dlyNYRL.js";import{n as r}from"./mui-bYXq4XMS.js";import{M as Oe,r as H,o as Me}from"./PaymentAccountSetupBillingAddressSection-kUAm-v-A-BSna9XIu.js";import{F as _e}from"./SetUpAccountSection-DOavnCkG-CmcaONdQ.js";import"./sentry-o6h_D-9x.js";import"./zeni-epic-state-LPACxnXP.js";import"./lottie-DEE24l2z.js";import"./liveblocks-DIep7fJd.js";import"./utils-uDUqNRFY.js";import"./analytics-zoE7Zcxt.js";import"./recharts-BHhx6CLo.js";import"./lexical-DPEnH3HH.js";const p={titleWidth:new P(343,580,726,826),setupDetailsRowGap:new P(12,x[5],x[5]),iconWidthHeight:new P(20,x[4]),subTitlePaddingTop:new P(12,x[3])},Fe={title:new Ee("standardSemiBold","largeSemiBold")},R="billingSetupPage",A="payAccountSectionId",n="subscriptionBillingAddressSectionId",lt=({analytics:e,billingSetupView:a,connectedAccountProvider:g,isDisabled:d,onClickMenuIcon:I,uiState:K,stripeKey:N,googleAPIKey:G,companyId:q,onUpdateAccountClick:J,onFetchLinkTokenClick:Z,onUpdatePaymentAccountStatus:Q,onUpdatePaymentAccountLoginStatus:X,onEstablishConnectionClick:Y,onEstablishConnectionSuccess:ee,handleCreateCardSetupIntent:te,handleConfirmCardSetupIntent:ne,updateCardPaymentModalState:B,handleAddCardPaymentSource:ie,resetCardPaymentViewState:oe,handleResetCardPaymentErrorStatuses:ae,onBillingAddressSave:se,onAddressEditHandler:re})=>{const b=fe(),i=be(),{setupView:{paymentAccount:y,plaidConnectionDetails:de,allBankAccounts:le,accountFetchStatus:$},cardPaymentView:m}=a,ce=a.subscriptionBillingAddress,V=y?.providerVerificationStatus,ue=$.fetchState==="In-Progress"||$.fetchState==="Not-Started",S=Ce({mode:"onSubmit",reValidateMode:"onChange",defaultValues:U(a),values:U(a),resetOptions:{keepDirtyValues:!0}}),pe=S.handleSubmit(c=>{se(q)}),T=a.subscriptionBillingAddressSaveStatus,me=async(c,o)=>{const h=o[A];if(c.includes(n)&&o[n]!=null){const v=S.getValues(`${n}`).country;let u=o[n];if(c.includes(`${n}.street`)&&o[n].street!=null){const{addressValue:f}=o[n].street,k=Ve(f?.country);u={street:o[n].street??l.strings.empty,city:f?.locality??l.strings.empty,state:f?.administrativeAreaLevel1??l.strings.empty,country:k,countryCode:f?.countryCode??l.strings.empty,postalCode:f?.postalCode??l.strings.empty,secondaryInfo:o[n].secondaryInfo,suite:o[n].suite},v.selectedOption!==k.selectedOption&&(u={...u,country:k})}else c===`${n}.country`&&v.selectedOption!=null&&(u={...u,countryCode:Te(v.selectedOption)});u!=null&&re(u)}else c.includes(A)&&h.account.selectedOption!=null&&y?.paymentAccountId!=null&&y.zeniAccountId!==h.account.selectedOption&&J(h.account.selectedOption,y.paymentAccountId)};F.useEffect(()=>{const c=S.watch((o,{name:h})=>{h!=null&&o!=null&&Pe(()=>me(h,o))});return()=>{c.unsubscribe()}});const z=b.mode==="light"?new j(b.colors.brandColorJadeLight):new j(b.colors.brandColorJadeDark),{customerOnboardingPage:{sections:{link_payment_account:he,card_payment_method:w}},common:l,billingSetupPage:D}=xe.getLocalizedStrings(),ge=D.section.subTitle,{text:ye,subText:Se}=he,E=m.cardsList.length>0,L=m?.cardsList[0]?.brand??"other",O=m?.addCardPaymentSourceStatus.fetchState,C=Oe(w.header,w.titleText,w.protectedCardNo,m);let M;E&&(M={header:C.header,title:C.title,subtitle:C.subtitle,status:C.status==="valid"?{name:"Verified",code:"verified"}:{name:"Pending",code:"pending"},showAddPaymentMethodDropDown:E===!0,icon:{element:t.jsx("img",{src:H(L).iconURL,width:p.iconWidthHeight.valuePx(i),height:p.iconWidthHeight.valuePx(i),alt:H(L).name}),color:new j(z)},showCompletedIcon:!1,isError:O==="Error",isLoading:O==="In-Progress",isCompleted:!0,showRightArrow:!1});const[_,we]=F.useState(!1);return t.jsxs(Re,{children:[t.jsx(Ae,{source:"BillingSettingsPage",title:D.section.title,backgroundColor:b.colors.grey4,style:{zIndex:3},showBackButton:!1,showMenuIcon:i==="medium-compact"||i==="small",onClickMenuIcon:I}),t.jsxs(He,{windowSize:i,children:[t.jsx(Ue,{windowSize:i,children:ge}),ue?t.jsx(We,{children:t.jsx(Ie,{size:"ExtraLarge",start:!0})}):t.jsx(ve,{...S,children:t.jsx(Je,{children:t.jsx("form",{id:W(R),onSubmit:pe,children:t.jsxs(Ke,{windowSize:i,children:[t.jsx(_e,{connectedAccountProvider:g,paymentAccount:y,plaidConnectionDetails:de,allBankAccounts:le,header:w.header,sectionTitle:w.header,defaultSectionTitle:ye,defaultSectionSubTitle:Se,sectionId:A,isDisabled:d,onFetchLinkTokenClick:Z,onEstablishConnectionClick:Y,onUpdatePaymentAccountStatus:Q,onUpdatePaymentAccountLoginStatus:X,onEstablishConnectionSuccess:ee,isError:V?.code==="require_info"||V?.code==="failed",icon:{element:t.jsx(ke,{width:p.iconWidthHeight.valuePx(i),height:p.iconWidthHeight.valuePx(i)}),color:z},analytics:e,productType:"billing",updateCardPaymentModalState:B,cardPaymentSectionValues:M,cardPaymentView:m,resetCardPaymentViewState:oe,showZeniAccountSection:!1,referrer:"Billing",cardSetupInProgress:_}),Ne(i,l.headers.billingAddress,ce,G,d)]})})})}),je(S.formState.dirtyFields)?t.jsx(Be,{formId:W(R),style:{width:i==="small"?"auto":"100%",paddingTop:s.sp2,paddingBottom:s.sp2,height:s.sp8},primaryBtn:{label:l.footer.save,isLoading:T?.fetchState==="In-Progress",isDisabled:T?.fetchState==="In-Progress",style:{height:s.sp6}},showCancel:!1,containerStyle:{width:"auto",justifyContent:"center"}}):null]}),t.jsx(Me,{handleConfirmCardSetupIntent:ne,updateCardPaymentModalState:B,handleCreateCardSetupIntent:te,handleAddCardPaymentSource:ie,cardPaymentView:m,isCardPaymentOpen:K.isCardPaymentPopupOpen,handleResetCardPaymentErrorStatuses:ae,stripeKey:N,cardSetupInProgress:_,setCardSetupInProgress:we})]})},U=e=>{const{paymentAccount:a,allBankAccounts:g}=e.setupView;return{[A]:{account:{selectedOption:a?.zeniAccountId,allOptions:g.map(d=>({label:d.accountName,value:d.accountId}))}},[n]:$e(n,e.subscriptionBillingAddress)[n]}},He=r.div`
1
+ import{d as fe,Q as be,a8 as Ce,cB as Pe,aS as j,F as xe,V as t,y as P,bz as Ae,A as Ie,ab as ve,bu as ke,cC as je,aO as Be,o as s,hE as $e,d3 as Ve,d4 as Ee,u as x,ak as Te,gN as ze,B as De,p as Le}from"./index-BS0RW8dr.js";import{a as F}from"./core-3dlyNYRL.js";import{n as r}from"./mui-bYXq4XMS.js";import{M as Oe,r as H,o as Me}from"./PaymentAccountSetupBillingAddressSection-R1O20DhA-C65ZHllw.js";import{F as _e}from"./SetUpAccountSection-SSkLhU2W-Bdvkba2v.js";import"./sentry-o6h_D-9x.js";import"./zeni-epic-state-LPACxnXP.js";import"./lottie-DEE24l2z.js";import"./liveblocks-DIep7fJd.js";import"./utils-uDUqNRFY.js";import"./analytics-zoE7Zcxt.js";import"./recharts-BHhx6CLo.js";import"./lexical-DPEnH3HH.js";const p={titleWidth:new P(343,580,726,826),setupDetailsRowGap:new P(12,x[5],x[5]),iconWidthHeight:new P(20,x[4]),subTitlePaddingTop:new P(12,x[3])},Fe={title:new De("standardSemiBold","largeSemiBold")},R="billingSetupPage",A="payAccountSectionId",n="subscriptionBillingAddressSectionId",lt=({analytics:e,billingSetupView:a,connectedAccountProvider:g,isDisabled:d,onClickMenuIcon:I,uiState:N,stripeKey:K,googleAPIKey:G,companyId:q,onUpdateAccountClick:J,onFetchLinkTokenClick:Z,onUpdatePaymentAccountStatus:Q,onUpdatePaymentAccountLoginStatus:X,onEstablishConnectionClick:Y,onEstablishConnectionSuccess:ee,handleCreateCardSetupIntent:te,handleConfirmCardSetupIntent:ne,updateCardPaymentModalState:B,handleAddCardPaymentSource:ie,resetCardPaymentViewState:oe,handleResetCardPaymentErrorStatuses:ae,onBillingAddressSave:se,onAddressEditHandler:re})=>{const b=fe(),i=be(),{setupView:{paymentAccount:y,plaidConnectionDetails:de,allBankAccounts:le,accountFetchStatus:$},cardPaymentView:m}=a,ce=a.subscriptionBillingAddress,V=y?.providerVerificationStatus,ue=$.fetchState==="In-Progress"||$.fetchState==="Not-Started",S=Ce({mode:"onSubmit",reValidateMode:"onChange",defaultValues:U(a),values:U(a),resetOptions:{keepDirtyValues:!0}}),pe=S.handleSubmit(c=>{se(q)}),E=a.subscriptionBillingAddressSaveStatus,me=async(c,o)=>{const h=o[A];if(c.includes(n)&&o[n]!=null){const v=S.getValues(`${n}`).country;let u=o[n];if(c.includes(`${n}.street`)&&o[n].street!=null){const{addressValue:f}=o[n].street,k=Ve(f?.country);u={street:o[n].street??l.strings.empty,city:f?.locality??l.strings.empty,state:f?.administrativeAreaLevel1??l.strings.empty,country:k,countryCode:f?.countryCode??l.strings.empty,postalCode:f?.postalCode??l.strings.empty,secondaryInfo:o[n].secondaryInfo,suite:o[n].suite},v.selectedOption!==k.selectedOption&&(u={...u,country:k})}else c===`${n}.country`&&v.selectedOption!=null&&(u={...u,countryCode:Ee(v.selectedOption)});u!=null&&re(u)}else c.includes(A)&&h.account.selectedOption!=null&&y?.paymentAccountId!=null&&y.zeniAccountId!==h.account.selectedOption&&J(h.account.selectedOption,y.paymentAccountId)};F.useEffect(()=>{const c=S.watch((o,{name:h})=>{h!=null&&o!=null&&Pe(()=>me(h,o))});return()=>{c.unsubscribe()}});const T=b.mode==="light"?new j(b.colors.brandColorJadeLight):new j(b.colors.brandColorJadeDark),{customerOnboardingPage:{sections:{link_payment_account:he,card_payment_method:w}},common:l,billingSetupPage:z}=xe.getLocalizedStrings(),ge=z.section.subTitle,{text:ye,subText:Se}=he,D=m.cardsList.length>0,L=m?.cardsList[0]?.brand??"other",O=m?.addCardPaymentSourceStatus.fetchState,C=Oe(w.header,w.titleText,w.protectedCardNo,m);let M;D&&(M={header:C.header,title:C.title,subtitle:C.subtitle,status:C.status==="valid"?{name:"Verified",code:"verified"}:{name:"Pending",code:"pending"},showAddPaymentMethodDropDown:D===!0,icon:{element:t.jsx("img",{src:H(L).iconURL,width:p.iconWidthHeight.valuePx(i),height:p.iconWidthHeight.valuePx(i),alt:H(L).name}),color:new j(T)},showCompletedIcon:!1,isError:O==="Error",isLoading:O==="In-Progress",isCompleted:!0,showRightArrow:!1});const[_,we]=F.useState(!1);return t.jsxs(Re,{children:[t.jsx(Ae,{source:"BillingSettingsPage",title:z.section.title,backgroundColor:b.colors.grey4,style:{zIndex:3},showBackButton:!1,showMenuIcon:i==="medium-compact"||i==="small",onClickMenuIcon:I}),t.jsxs(He,{windowSize:i,children:[t.jsx(Ue,{windowSize:i,children:ge}),ue?t.jsx(We,{children:t.jsx(Ie,{size:"ExtraLarge",start:!0})}):t.jsx(ve,{...S,children:t.jsx(Je,{children:t.jsx("form",{id:W(R),onSubmit:pe,children:t.jsxs(Ne,{windowSize:i,children:[t.jsx(_e,{connectedAccountProvider:g,paymentAccount:y,plaidConnectionDetails:de,allBankAccounts:le,header:w.header,sectionTitle:w.header,defaultSectionTitle:ye,defaultSectionSubTitle:Se,sectionId:A,isDisabled:d,onFetchLinkTokenClick:Z,onEstablishConnectionClick:Y,onUpdatePaymentAccountStatus:Q,onUpdatePaymentAccountLoginStatus:X,onEstablishConnectionSuccess:ee,isError:V?.code==="require_info"||V?.code==="failed",icon:{element:t.jsx(ke,{width:p.iconWidthHeight.valuePx(i),height:p.iconWidthHeight.valuePx(i)}),color:T},analytics:e,productType:"billing",updateCardPaymentModalState:B,cardPaymentSectionValues:M,cardPaymentView:m,resetCardPaymentViewState:oe,showZeniAccountSection:!1,referrer:"Billing",cardSetupInProgress:_}),Ke(i,l.headers.billingAddress,ce,G,d)]})})})}),je(S.formState.dirtyFields)?t.jsx(Be,{formId:W(R),style:{width:i==="small"?"auto":"100%",paddingTop:s.sp2,paddingBottom:s.sp2,height:s.sp8},primaryBtn:{label:l.footer.save,isLoading:E?.fetchState==="In-Progress",isDisabled:E?.fetchState==="In-Progress",style:{height:s.sp6}},showCancel:!1,containerStyle:{width:"auto",justifyContent:"center"}}):null]}),t.jsx(Me,{handleConfirmCardSetupIntent:ne,updateCardPaymentModalState:B,handleCreateCardSetupIntent:te,handleAddCardPaymentSource:ie,cardPaymentView:m,isCardPaymentOpen:N.isCardPaymentPopupOpen,handleResetCardPaymentErrorStatuses:ae,stripeKey:K,cardSetupInProgress:_,setCardSetupInProgress:we})]})},U=e=>{const{paymentAccount:a,allBankAccounts:g}=e.setupView;return{[A]:{account:{selectedOption:a?.zeniAccountId,allOptions:g.map(d=>({label:d.accountName,value:d.accountId}))}},[n]:$e(n,e.subscriptionBillingAddress)[n]}},He=r.div`
2
2
  display: flex;
3
3
  justify-content: space-between;
4
4
  height: 100%;
@@ -12,7 +12,7 @@ import{e as fe,Q as be,a8 as Ce,cB as Pe,aS as j,F as xe,V as t,y as P,bz as Ae,
12
12
  flex-direction: column;
13
13
  width: 100%;
14
14
  background-color: ${e=>e.theme.colors.grey4};
15
- `,Ue=r(ze)`
15
+ `,Ue=r(Te)`
16
16
  color: ${e=>e.theme.colors.hero};
17
17
  display: flex;
18
18
  justify-content: center;
@@ -28,10 +28,10 @@ import{e as fe,Q as be,a8 as Ce,cB as Pe,aS as j,F as xe,V as t,y as P,bz as Ae,
28
28
  justify-content: center;
29
29
  align-items: center;
30
30
  background-color: ${e=>e.theme.colors.grey4};
31
- `,Ke=r.div`
31
+ `,Ne=r.div`
32
32
  display: flex;
33
33
  flex-direction: column;
34
- `,Ne=(e,a,g,d,I)=>t.jsxs(Ge,{children:[t.jsx(qe,{windowSize:e,isDisabled:I==="disabled",children:a}),t.jsx(De,{googleAPIKey:d??"",addressToEdit:g,sectionId:`${n}`,style:{marginLeft:"0px"},elementsStyle:{paddingRight:"0px"}})]}),Ge=r.div`
34
+ `,Ke=(e,a,g,d,I)=>t.jsxs(Ge,{children:[t.jsx(qe,{windowSize:e,isDisabled:I==="disabled",children:a}),t.jsx(ze,{googleAPIKey:d??"",addressToEdit:g,sectionId:`${n}`,style:{marginLeft:"0px"},elementsStyle:{paddingRight:"0px"}})]}),Ge=r.div`
35
35
  margin-top: ${s.sp3};
36
36
  margin-bottom: ${s.sp4};
37
37
  `,qe=r.div`
@@ -1 +1 @@
1
- import{F as O,V as _,cm as M,cn as W,co as Y,jZ as Z,aV as q}from"./index-XNBiWrYj.js";import{a as b}from"./core-3dlyNYRL.js";import{gb as z}from"./zeni-epic-state-LPACxnXP.js";import{u as X}from"./ReviewOverlay-BAG_6iyV-B2w-MEIV.js";import"./mui-bYXq4XMS.js";import"./sentry-o6h_D-9x.js";import"./lottie-DEE24l2z.js";import"./liveblocks-DIep7fJd.js";import"./utils-uDUqNRFY.js";import"./analytics-zoE7Zcxt.js";import"./recharts-BHhx6CLo.js";import"./lexical-DPEnH3HH.js";const{common:n,spendManagement:{billPay:C}}=O.getLocalizedStrings(),o=C.bulkActions;let x;const de=({billsReviewView:t,analytics:r,onProceedForBulkActionClick:l,onCloseReviewItem:e,onCloseOverlay:c})=>{const{fetchState:m,bulkSubmissionFetchState:a,bulkOperationTypeSelected:i,currentTab:g,currentSubTab:f}=t,u=i==="review",[B,h]=b.useState(!1),[s,v]=b.useState(T(t,u)),[p,k]=b.useState(u),[I,E]=b.useState(0),[w,j]=b.useState({type:"",title:"",description:"",primaryButtonText:"",secondaryButtonText:""});b.useEffect(()=>(u&&(x=setInterval(()=>{v(d=>d.map((S,L)=>(clearInterval(x),L===I?{...S,reviewStatus:{isLoading:!1,code:"valid"}}:S))),E(d=>d+1)},1e3)),I===s.length&&p&&(k(!1),clearInterval(x)),!u&&t.fetchState==="Completed"&&v(T(t,!1)),()=>{clearInterval(x)}),[s.length,I,p,t.fetchState,u,t]);const R=s.length,y=s.filter(d=>d.reviewStatus.code!=="error").length,F=()=>{const{title:d,description:S}=H(y);j({type:"reject",title:d,description:S,primaryButtonText:n.texts.confirm,secondaryButtonText:n.texts.close}),r.trackBillPayBulkSubmit(i,g,f),h(!0)},N={onOkClick:d=>{h(!1),r.trackBillPayBulkPopupConfirm(i,g,f,G(t)),l("reject",d)},onCancelClick:()=>{h(!1)}},{title:A,description:$}=J(m,y,R,p),P=t.fetchState==="Completed"&&y===0,U=()=>{r.trackBillPayBulkSubmit(i,g,f),l(i)},D={label:P?n.texts.close:i==="send_for_approval"?n.footer.submit:n.footer.approve,isDisabled:m!=="Completed"||i==="reject"&&a==="In-Progress",isLoading:a==="In-Progress"&&(i==="send_for_approval"||i==="approve"),onClick:P?c:U,style:i==="send_for_approval"?{minWidth:"92px"}:{}},V={label:i==="send_for_approval"?n.texts.goBack:n.footer.reject,isDisabled:i!=="reject"&&a==="In-Progress",isLoading:i==="reject"&&a==="In-Progress",reverseSpinnerColor:!1,onClick:i==="send_for_approval"?c:F,style:i==="approve"?{minWidth:"92px"}:{}};return _.jsxs(_.Fragment,{children:[B?_.jsx(M,{titleComponent:_.jsx(Y,{children:w.title}),descriptionComponent:_.jsx(W,{children:w.description}),primaryButtonText:w.primaryButtonText,proceedButtonVariant:"danger",secondaryButtonText:w.secondaryButtonText,action:N,isNotesIncluded:!0,isEditPopup:!0}):null,_.jsx(X,{title:A,description:{content:$,isError:t.fetchState==="Completed"&&y===0},reviewItems:s,onCloseReviewItem:e,onCloseOverlay:c,showFooter:t.fetchState==="Completed"&&!p,footerProps:{primaryButton:D,cancelButton:V,hideCancel:P}})]})},T=(t,r)=>{const l=t.fetchState==="In-Progress";return t.billsForReview.map(e=>({id:e.transactionId,leftSideText:{title:e.vendorName?e.vendorName:C.billDetails.newBillTitle,subTitle:`${C.billDetails.invoiceNo} ${e.invoiceNumber?e.invoiceNumber:n.strings.hyphen}`},rightSideText:{title:q("0,0.[00]",e.amount?.amount,e.amount?.currencySymbol),showThunderIcon:e.reviewErrors?.length===1&&z(e.reviewErrors[0].reviewErrorCode),subTitle:K(e.reviewStatus==="warning",e.reviewErrors?.map(c=>c.reviewInfoMessage)),additonalInfo:e.reviewErrors!=null&&e.reviewErrors.length>1?o.reviewPage.removeOrProceed:void 0},reviewStatus:{isLoading:r?!0:l,code:e.reviewErrors?.length===1&&e.reviewErrors[0].reviewErrorCode==="ERR_INSUFFICIENT_FUNDS"?"low-balance":e.reviewStatus??""}}))},G=t=>{const r=t.billsForReview;let l=[];return r.forEach(e=>{l=Z([...l,e.isRecurring?"recurring":"one-time"])}),l},H=t=>{const{this_:r,these:l,bill:e,bills:c,payment:m,payments:a}=n.texts;return t>1?{title:o.popUps.reject.title.replace("<_payment_>",o.payments),description:o.popUps.reject.description.replaceAll("<_this_>",l).replaceAll("<_payment_>",a).replaceAll("<_bill_>",c)}:{title:o.popUps.reject.title.replace("<_payment_>",o.payment),description:o.popUps.reject.description.replaceAll("<_this_>",r).replaceAll("<_payment_>",m).replaceAll("<_bill_>",e)}},J=(t,r,l,e)=>{const{has:c,have:m,bill:a,bills:i,are:g,is:f,do_:u,does:B}=n.texts,h=r>1,s=l>1;let v="",p="";return t==="Completed"&&!e?(v=o.reviewPage.billsReviewed.title.replace("<_bill_>",s?C.bulkActions.bills:o.bill).replace("<_has_>",s?m:c),r===0?p=o.reviewPage.billsReviewed.descriptionError.replace("<_bill_>",s?i:a).replace("<_do_>",s?u:B):p=`${r}/${l} ${o.reviewPage.billsReviewed.description.replace("<_bill_>",l>1?i:a).replace("<_is_>",h?g:f)}`):(v=o.reviewPage.billsReviewing.title.replace("<_bill_>",s?i:a),p=o.reviewPage.billsReviewing.description.replace("<_bill_>",s?i:a)),{title:v,description:p}},K=(t,r)=>{if(r?.length!=null){if(r.length>1)return r.join(` ${n.strings.dividerDot} `);if(r.length===1)return t?r[0]+`${n.strings.colon} ${o.reviewPage.removeOrProceed}`:r[0]}return""};export{de as default,G as getBillsUniqueType};
1
+ import{F as O,V as _,cm as M,cn as W,co as Y,j_ as q,aV as z}from"./index-BS0RW8dr.js";import{a as b}from"./core-3dlyNYRL.js";import{gb as X}from"./zeni-epic-state-LPACxnXP.js";import{u as Z}from"./ReviewOverlay-BHUy3fWf-DhycJa32.js";import"./mui-bYXq4XMS.js";import"./sentry-o6h_D-9x.js";import"./lottie-DEE24l2z.js";import"./liveblocks-DIep7fJd.js";import"./utils-uDUqNRFY.js";import"./analytics-zoE7Zcxt.js";import"./recharts-BHhx6CLo.js";import"./lexical-DPEnH3HH.js";const{common:n,spendManagement:{billPay:C}}=O.getLocalizedStrings(),o=C.bulkActions;let x;const de=({billsReviewView:t,analytics:r,onProceedForBulkActionClick:l,onCloseReviewItem:e,onCloseOverlay:c})=>{const{fetchState:m,bulkSubmissionFetchState:a,bulkOperationTypeSelected:i,currentTab:g,currentSubTab:f}=t,u=i==="review",[B,h]=b.useState(!1),[s,v]=b.useState(T(t,u)),[p,k]=b.useState(u),[I,E]=b.useState(0),[w,j]=b.useState({type:"",title:"",description:"",primaryButtonText:"",secondaryButtonText:""});b.useEffect(()=>(u&&(x=setInterval(()=>{v(d=>d.map((S,V)=>(clearInterval(x),V===I?{...S,reviewStatus:{isLoading:!1,code:"valid"}}:S))),E(d=>d+1)},1e3)),I===s.length&&p&&(k(!1),clearInterval(x)),!u&&t.fetchState==="Completed"&&v(T(t,!1)),()=>{clearInterval(x)}),[s.length,I,p,t.fetchState,u,t]);const R=s.length,y=s.filter(d=>d.reviewStatus.code!=="error").length,F=()=>{const{title:d,description:S}=H(y);j({type:"reject",title:d,description:S,primaryButtonText:n.texts.confirm,secondaryButtonText:n.texts.close}),r.trackBillPayBulkSubmit(i,g,f),h(!0)},N={onOkClick:d=>{h(!1),r.trackBillPayBulkPopupConfirm(i,g,f,G(t)),l("reject",d)},onCancelClick:()=>{h(!1)}},{title:A,description:$}=J(m,y,R,p),P=t.fetchState==="Completed"&&y===0,U=()=>{r.trackBillPayBulkSubmit(i,g,f),l(i)},D={label:P?n.texts.close:i==="send_for_approval"?n.footer.submit:n.footer.approve,isDisabled:m!=="Completed"||i==="reject"&&a==="In-Progress",isLoading:a==="In-Progress"&&(i==="send_for_approval"||i==="approve"),onClick:P?c:U,style:i==="send_for_approval"?{minWidth:"92px"}:{}},L={label:i==="send_for_approval"?n.texts.goBack:n.footer.reject,isDisabled:i!=="reject"&&a==="In-Progress",isLoading:i==="reject"&&a==="In-Progress",reverseSpinnerColor:!1,onClick:i==="send_for_approval"?c:F,style:i==="approve"?{minWidth:"92px"}:{}};return _.jsxs(_.Fragment,{children:[B?_.jsx(M,{titleComponent:_.jsx(Y,{children:w.title}),descriptionComponent:_.jsx(W,{children:w.description}),primaryButtonText:w.primaryButtonText,proceedButtonVariant:"danger",secondaryButtonText:w.secondaryButtonText,action:N,isNotesIncluded:!0,isEditPopup:!0}):null,_.jsx(Z,{title:A,description:{content:$,isError:t.fetchState==="Completed"&&y===0},reviewItems:s,onCloseReviewItem:e,onCloseOverlay:c,showFooter:t.fetchState==="Completed"&&!p,footerProps:{primaryButton:D,cancelButton:L,hideCancel:P}})]})},T=(t,r)=>{const l=t.fetchState==="In-Progress";return t.billsForReview.map(e=>({id:e.transactionId,leftSideText:{title:e.vendorName?e.vendorName:C.billDetails.newBillTitle,subTitle:`${C.billDetails.invoiceNo} ${e.invoiceNumber?e.invoiceNumber:n.strings.hyphen}`},rightSideText:{title:z("0,0.[00]",e.amount?.amount,e.amount?.currencySymbol),showThunderIcon:e.reviewErrors?.length===1&&X(e.reviewErrors[0].reviewErrorCode),subTitle:K(e.reviewStatus==="warning",e.reviewErrors?.map(c=>c.reviewInfoMessage)),additonalInfo:e.reviewErrors!=null&&e.reviewErrors.length>1?o.reviewPage.removeOrProceed:void 0},reviewStatus:{isLoading:r?!0:l,code:e.reviewErrors?.length===1&&e.reviewErrors[0].reviewErrorCode==="ERR_INSUFFICIENT_FUNDS"?"low-balance":e.reviewStatus??""}}))},G=t=>{const r=t.billsForReview;let l=[];return r.forEach(e=>{l=q([...l,e.isRecurring?"recurring":"one-time"])}),l},H=t=>{const{this_:r,these:l,bill:e,bills:c,payment:m,payments:a}=n.texts;return t>1?{title:o.popUps.reject.title.replace("<_payment_>",o.payments),description:o.popUps.reject.description.replaceAll("<_this_>",l).replaceAll("<_payment_>",a).replaceAll("<_bill_>",c)}:{title:o.popUps.reject.title.replace("<_payment_>",o.payment),description:o.popUps.reject.description.replaceAll("<_this_>",r).replaceAll("<_payment_>",m).replaceAll("<_bill_>",e)}},J=(t,r,l,e)=>{const{has:c,have:m,bill:a,bills:i,are:g,is:f,do_:u,does:B}=n.texts,h=r>1,s=l>1;let v="",p="";return t==="Completed"&&!e?(v=o.reviewPage.billsReviewed.title.replace("<_bill_>",s?C.bulkActions.bills:o.bill).replace("<_has_>",s?m:c),r===0?p=o.reviewPage.billsReviewed.descriptionError.replace("<_bill_>",s?i:a).replace("<_do_>",s?u:B):p=`${r}/${l} ${o.reviewPage.billsReviewed.description.replace("<_bill_>",l>1?i:a).replace("<_is_>",h?g:f)}`):(v=o.reviewPage.billsReviewing.title.replace("<_bill_>",s?i:a),p=o.reviewPage.billsReviewing.description.replace("<_bill_>",s?i:a)),{title:v,description:p}},K=(t,r)=>{if(r?.length!=null){if(r.length>1)return r.join(` ${n.strings.dividerDot} `);if(r.length===1)return t?r[0]+`${n.strings.colon} ${o.reviewPage.removeOrProceed}`:r[0]}return""};export{de as default,G as getBillsUniqueType};
@@ -1,4 +1,4 @@
1
- import{Q as h,V as s,aK as b,o as r}from"./index-XNBiWrYj.js";import{n as p}from"./mui-bYXq4XMS.js";import{o as l}from"./commonDimensions-znFHURNY-BydE4i8M.js";const $=(o,e)=>e===1?"roundedBox":o===0?"topRoundedBox":o===e-1?"bottomRoundedBox":"box";function f({content:o,boxType:e,isDisabled:d=!1,isNotClickable:t=!1}){const i=h();switch(e??"roundedBox"){case"topRoundedBox":return s.jsx(x,{isDisabled:d,windowSize:i,hideCursor:t,"data-testid":b("top-rounded-box",e),children:o});case"bottomRoundedBox":return s.jsx(n,{isDisabled:d,windowSize:i,hideCursor:t,"data-testid":b("bottom-rounded-box",e),children:o});case"box":return s.jsx(u,{isDisabled:d,windowSize:i,hideCursor:t,"data-testid":b("box",e),children:o});case"roundedBox":return s.jsx(a,{isDisabled:d,windowSize:i,hideCursor:t,"data-testid":b("rounded-box",e),children:o})}}const a=p.div`
1
+ import{Q as h,V as s,aK as b,o as r}from"./index-BS0RW8dr.js";import{n as p}from"./mui-bYXq4XMS.js";import{o as l}from"./commonDimensions-Bm2CSHrw-S9XM9nhL.js";const $=(o,e)=>e===1?"roundedBox":o===0?"topRoundedBox":o===e-1?"bottomRoundedBox":"box";function f({content:o,boxType:e,isDisabled:d=!1,isNotClickable:t=!1}){const i=h();switch(e??"roundedBox"){case"topRoundedBox":return s.jsx(x,{isDisabled:d,windowSize:i,hideCursor:t,"data-testid":b("top-rounded-box",e),children:o});case"bottomRoundedBox":return s.jsx(n,{isDisabled:d,windowSize:i,hideCursor:t,"data-testid":b("bottom-rounded-box",e),children:o});case"box":return s.jsx(u,{isDisabled:d,windowSize:i,hideCursor:t,"data-testid":b("box",e),children:o});case"roundedBox":return s.jsx(a,{isDisabled:d,windowSize:i,hideCursor:t,"data-testid":b("rounded-box",e),children:o})}}const a=p.div`
2
2
  box-sizing: border-box;
3
3
  cursor: ${o=>o.isDisabled||o.hideCursor===!0?"default":"pointer"};
4
4
  min-height: ${o=>l.transactionItemHeightResponsive.valuePx(o.windowSize)};
@@ -1,4 +1,4 @@
1
- import{e as ct,Q as dt,aN as De,V as a,F as Ve,ad as W,a8 as mt,cP as pt,ax as ut,cB as ft,aV as ve,aM as $e,g4 as yt,n as ht,bz as gt,aK as xt,cC as St,cm as wt,cn as Ct,co as bt,A as Tt,ab as Dt,aO as vt,o,y as P,al as Le,g5 as $t,fs as ke,d2 as kt,E as It,_ as jt,ak as Fe,B as Pt,M as Nt,u as k}from"./index-XNBiWrYj.js";import{a as N}from"./core-3dlyNYRL.js";import{n as d}from"./mui-bYXq4XMS.js";import{eK as Ot,bi as G}from"./zeni-epic-state-LPACxnXP.js";import{S as Vt,s as Lt}from"./CompanyOfficerDetailsSection-CiVliExW-DzmWuQm0.js";import"./sentry-o6h_D-9x.js";import"./lottie-DEE24l2z.js";import"./liveblocks-DIep7fJd.js";import"./utils-uDUqNRFY.js";import"./analytics-zoE7Zcxt.js";import"./recharts-BHhx6CLo.js";import"./lexical-DPEnH3HH.js";import"./LabeledAddressValueField-C_8kPzjy-5OUHMeqd.js";import"./LabeledCreatableSingleSelectField-sEf-9BOE-pPbJFdXC.js";import"./LabeledDocumentField-rGzXpShn-Cfh7MC5-.js";const x={width:new P(343,580,726),titleWidth:new P(343,580,726,826),subTitlePaddingTop:new P(12,k[3]),subTitlePaddingBottom:new P(k[3],k[3]),verificationDetailsRowGap:new P(12,k[5],k[5]),termsPaddingLeftRight:new P(k[0],k[3])},Ft={stepTitle:new Pt("h6Regular","h5Regular")},Ie="businessVerificationPage",b="companyDetails",T="companyOfficerDetails",{commonSetUp:{businessVerification:i},common:{settings:_t,currency:je,footer:Pe,strings:{empty:At}}}=Ve.getLocalizedStrings(),xa=({businessVerificationDetails:t,allNationalityCountries:F,verficationDetailsFetchState:O,isRefreshingViewInBackground:_,filesEndPoint:r,authParams:A,productType:y,allIndustries:B,companyTitles:E,maxInsuredAmount:u,isDisabled:I,isSettings:n=!1,isOverlay:h=!1,analytics:g,isStepInProgress:S=!1,isTreasuryTransferInitiated:K=!1,transferDetails:z,onOverlayClose:te,onAddressClick:ae,onRegisteredAddressClick:Ae,onBackClick:V,onGetOtp:Be,onVerifyOtp:Ee,onResendOtp:ze,onSendForVerificationClick:Re,onEditFileName:ie,onCompanyDetailsChanged:Me,updateFilesEntity:se,onDeleteFile:ne,onDeleteFileList:Ue,onCompanyOfficerUpdated:We,saveNewAddressInLocalStore:re,onSaveDetailsClick:Ge,onClickMenuIcon:Ke,onExecuteTreasuryTransfer:qe})=>{const Qe=ct(),m=dt(),{updateStatus:R,companyView:L,companyDetailsLocalData:l,companyOfficerLocalData:w}=t,Xe=De(R.fetchState),M=L?.company.company.featuresActivationInfo.connectedAccountProvider,Ye=M==="unit"?a.jsxs(Kt,{children:[i.terms.term1,a.jsx(W,{href:i.terms.consentUrl,onZeniLinkClick:()=>(g?.trackBillPayAgreement(),!0),linkText:i.terms.consent}),i.terms.term2,a.jsx(W,{href:i.terms.depositUrl,onZeniLinkClick:()=>(g?.trackBillPayAgreement(),!0),linkText:i.terms.depositTerms}),i.terms.term3,a.jsx(W,{href:i.terms.privacyPolicyUrl,onZeniLinkClick:()=>(g?.trackBillPayAgreement(),!0),linkText:i.terms.privacy}),i.terms.term4,a.jsx(W,{href:i.terms.tosUrl,onZeniLinkClick:()=>(g?.trackBillPayPrivacyPolicy(),!0),linkText:i.terms.tos}),i.terms.term5]}):i.terms.termsForStripe,[Je,q]=N.useState(!1),[U,oe]=N.useState("save"),[Q,Ze]=N.useState(!1),p=mt({mode:"all",reValidateMode:"onChange",defaultValues:Bt(t,B,E,F)}),{isValid:He}=p.formState,X=L?.company.company.companyBillPayInfo,Y=L?.company.company.companyTreasuryInfo,j=y==="zeni_treasury"?Y?.companyVerificationStatus:X?.companyVerificationStatus,D=Object.values(w).findIndex(e=>e?.isSelectedForVerification===!0),v=`Officer_${D<0?1:D+1}`,et=()=>{const e=w[v],s=e?.email,c=e?.birthday?.toString(),f=e?.ownershipInCompany,C=e?.firstName,$=e?.lastName,me=e?.titleAtCompany,pe=e?.documentTypeSelectedForVerification,ue=e?.phone,fe=e?.addressStatus?.addressToCreate,ye=fe!=null?G(fe):void 0,he=l?.companyDescription,H=l?.companyLegalName,ge=l?.companyIndustry,xe=l?.phone,Se=l?.website,we=l?.addressStatus?.addressToCreate!=null?G(l?.addressStatus?.addressToCreate):void 0,ee=l?.primaryContactLocalData,Ce=ee?.firstName,be=ee?.lastName,Te=ee?.email;s!=null&&f!=null&&C!=null&&$!=null&&c!=null&&me!=null&&ue!=null&&ye!=null&&pe!=null&&he!=null&&H!=null&&xe!=null&&Se!=null&&ge!=null&&H!=null&&we!=null&&Ce!=null&&be!=null&&Te!=null&&g?.trackBusinessVerificationSend({email:s,birthday:c.toString(),companyOwnership:f,firstName:C,lastName:$,companyRole:me,phone:ue,formattedAddress:ye,documentTypeForVerification:pe},{companyDescription:he,legalName:H,phone:xe,website:Se.toString(),industry:ge,formattedAddress:we},{firstName:Ce,lastName:be,email:Te},y,n?"Settings":void 0)},tt=()=>{const e=w[v],s=l?.primaryContactLocalData,c=e?.email??"",f=!!e?.firstName&&!!e?.lastName,C=s?.email??"",$=!!s?.firstName&&!!s?.lastName;return c&&!f?((!e?.firstName||!e?.lastName)&&p.trigger(`${T}.${D<0?0:D}.name`,{shouldFocus:!0}),!1):C&&!$?((!s?.firstName||!s?.lastName)&&p.trigger(`${b}.primaryContactName`,{shouldFocus:!0}),!1):!0},at=()=>{const e=w[v],s=l?.primaryContactLocalData,c=e?.email,f=s?.email;if(c){if(!f)return(s?.firstName||s?.lastName)&&p.trigger(`${b}.primaryContactEmail`,{shouldFocus:!0}),!1}else if(e?.firstName||e?.lastName||e?.birthday||e?.nationalityCountryCode||e?.ownershipInCompany||e?.phone||e?.ssn||e?.titleAtCompany||e?.addressStatus?.addressToCreate||e?.fileIds!=null&&e?.fileIds.length>0||J!=null&&J?.length>0)return p.trigger(`${T}.${D<0?0:D}.email`,{shouldFocus:!0}),!1;return!0},it=p.handleSubmit(()=>{if(U!=="verification"&&oe("verification"),M==="unit"&&w[v]?.isPhoneVerified!==!0){p.setError(`${T}.${D}.phone`,{type:"custom"});return}const e=pt(Object.values(w).map(c=>Object.values(c?.deleteFileStatusById??{}).filter(f=>f!=null))),s=Object.values(l?.deleteFileStatusById??{}).filter(c=>c!=null);Ot(e.concat(s)).fetchState!=="In-Progress"&&He&&(et(),Re?.(v),K===!0&&qe?.())}),st=async(e,s)=>{e.includes(b)?Me?.(s[b]):e.includes(T)&&We?.(s[T])},nt=N.useCallback(ut((e,s)=>{st(e,s)},300),[]);N.useEffect(()=>{const e=p.watch((s,{name:c})=>{c!=null&&s!=null&&ft(()=>nt(c,s))});return()=>{e.unsubscribe()}});const le=De(t.companyDetailsLocalData?.addressStatus);N.useEffect(()=>{t.companyDetailsLocalData?.addressStatus?.addressToCreate!=null&&t.companyDetailsLocalData?.registeredAddressStatus?.addressToCreate==null&&le==null&&(re?.("company_registered_address",t.companyDetailsLocalData?.addressStatus?.addressToCreate),p.setValue(`${b}.registeredAddress`,t.companyDetailsLocalData?.addressStatus?.addressToCreate))},[t.companyDetailsLocalData?.addressStatus,t.companyDetailsLocalData?.registeredAddressStatus,le,re,p]);const ce=L?.companyOfficers.slice(0,10).sort((e,s)=>e.user.createTime?.isAfter(s.user.createTime)===!0?1:-1),J=ce?.map(e=>e.user),rt=ce?.map(e=>e.role),ot={onOkClick:()=>{q(!1),V();const e=[],s=L?.company.company.incInfo.fileIds??[];p.getValues(`${b}.fileIds`).forEach(c=>{s.includes(c)||e.push(c)}),rt?.forEach((c,f)=>{const C=c?.fileIds??[];p.getValues(`${T}.${f}.fileIds`).forEach($=>{C.includes($)||e.push($)})}),e.length!==0&&Ue?.(e)},onCancelClick:()=>{q(!1)}},lt=ve($e(u),u,je.currencySymbol).toUpperCase(),Z=j?.code==="pending_review"||j?.code==="verified",de=(z?.treasuryTransferMoneyLocalData?.amount?.amount??0)>0;return y==="zeni_treasury"&&j?.code==="pending_review"&&Xe==="In-Progress"&&R.fetchState==="Completed"?a.jsxs(Ht,{children:[a.jsxs(ea,{children:[a.jsx(yt,{}),a.jsx(ta,{windowSize:m,children:K===!0?i.submittedTitleWithTransfer:i.submittedTitle}),a.jsx(Zt,{isReadonly:!1,children:K===!0?i.submittedDescriptionWithTransfer.replace("__amount__",ve($e(z?.treasuryTransferMoneyLocalData?.amount?.amount??0),z?.treasuryTransferMoneyLocalData?.amount?.amount??0,je.currencySymbol)).replace("__account__",z?.treasuryTransferMoneyLocalData?.fromAccount?.label??""):i.submittedDescription})]}),a.jsx(ht,{label:i.submittedButton,onClick:()=>{V(),te?.()},variant:"primary"})]}):a.jsxs(Et,{isSettings:n,children:[a.jsx(gt,{title:h&&S===!0?At:i.header,backgroundColor:Qe.colors.grey5,style:{zIndex:Q?1:4},onBackClick:()=>{St(p.formState.dirtyFields)?q(!0):V()},showBackButton:!n&&!h,showMenuIcon:n?m==="medium-compact"||m==="small":!1,onClickMenuIcon:Ke,rightSideComponent:h?a.jsx(aa,{"data-testid":xt("nav-bar-close-business-verification-overlay"),onClick:()=>{V(),te?.()}}):null,source:"BusinessVerificationPage"}),Je===!0?a.jsx(wt,{titleComponent:a.jsx(bt,{children:i.discardTitle}),descriptionComponent:a.jsx(Ct,{children:i.discardDescription}),primaryButtonText:i.discard,secondaryButtonText:i.cancel,action:ot}):null,a.jsxs(Mt,{windowSize:m,children:[(!h||S===!1)&&a.jsx(Rt,{windowSize:m,children:n?_t.infoText.businessVerification:i.title}),O==="In-Progress"||O==="Not-Started"?a.jsx(Ut,{children:a.jsx(Tt,{size:"ExtraLarge",start:!0})}):a.jsx(Dt,{...p,children:a.jsxs("form",{id:Ne(Ie),onSubmit:it,children:[h&&S===!0&&a.jsxs(zt,{children:[a.jsxs(qt,{windowSize:m,children:[a.jsx(Qt,{windowSize:m,children:Z?i.businessVerificationDetails:de?i.verifyBusinessDetails:i.verifyBusinessDetailsWithoutTransfer}),!Z&&a.jsx(Xt,{children:a.jsxs(Yt,{children:[a.jsx(Oe,{}),de&&a.jsx(Oe,{}),a.jsx(Jt,{})]})})]}),a.jsx(_e,{isReadonly:Z,children:i.verifyBusinessDetailsDescription})]}),a.jsxs(Wt,{children:[a.jsx(Vt,{companyOfficerData:w,allNationalityCountries:F,allOfficers:J??[],sectionId:T,isRefreshingViewInBackground:_,connectedAccountProvider:M,productType:"business_verification",updateFilesEntity:se,onEditFileName:ie,onOfficerAddressClick:ae,onDeleteFile:ne,isDisabled:I,filesEndPoint:r,authParams:A,isPopupOpen:Q,openPopup:Ze,onGetOtp:Be,onVerifyOtp:Ee,onResendOtp:ze,companyTitles:E,isForTreasury:y==="zeni_treasury",isOverlay:h}),a.jsx(Lt,{companyDetails:l,businessVerificationProps:{companyVerificationStatus:j,isRefreshingViewInBackground:_},productType:"business_verification",showTreasuryFields:y==="zeni_treasury",sectionId:b,isDisabled:j?.code==="pending_review"||j?.code==="verified"?"readonly":I,fileProps:{authParams:A,filesEndPoint:r,onEditFileName:ie,onDeleteFile:ne,updateFilesEntity:se},onCompanyAddressClick:ae,onRegisteredAddressClick:Ae,connectedAccountProvider:M,allIndustries:B})]}),y==="zeni_accounts"?a.jsx(Gt,{windowSize:m,children:i.threadText.replace("__amount__",lt)}):null]})})]}),O==="Completed"&&(y==="zeni_treasury"?Y?.companyVerificationStatus?.code!=="pending_review"&&Y?.companyVerificationStatus?.code!=="verified":X?.businessVerificationStatus?.code!=="pending_review"&&X?.businessVerificationStatus?.code!=="verified")?a.jsx(vt,{formId:Ne(Ie),primaryBtn:{label:S?Pe.submit:i.sendForVerificationButton,style:{width:"auto",minWidth:m==="small"?"auto":S?"83px":"181px"},isLoading:U==="verification"&&R.fetchState==="In-Progress",isDisabled:I!=null},containerStyle:{width:m==="small"?x.width.valuePx(m):"auto",justifyContent:m==="small"?"space-between":"center"},helperStyle:{width:m==="small"?x.width.valuePx(m):"auto",paddingLeft:x.termsPaddingLeftRight.valuePx(m),paddingRight:x.termsPaddingLeftRight.valuePx(m),textAlign:m==="small"?"center":"initial"},showCancel:!0,cancelBtn:{reverseSpinnerColor:!1,label:S?Pe.back:i.saveDetailsButton,style:{width:m==="small"?"auto":S?"83px":"181px"},isLoading:U==="save"&&R.fetchState==="In-Progress",onClick:()=>{if(S)V();else{const e=w[v],s=l?.primaryContactLocalData;U!=="save"&&oe("save");const c=e?.email??"",f=tt(),C=at();f&&C&&(g?.trackBusinessVerificationSave({email:c,birthday:e?.birthday?.toString(),companyOwnership:e?.ownershipInCompany,firstName:e?.firstName,lastName:e?.lastName,companyRole:e?.titleAtCompany,phone:e?.phone,formattedAddress:e?.addressStatus?.addressToCreate!=null?G(e?.addressStatus?.addressToCreate):void 0,documentTypeForVerification:e?.documentTypeSelectedForVerification},{companyDescription:l?.companyDescription,legalName:l?.companyLegalName,phone:l?.phone,website:l?.website?.toString(),industry:l?.companyIndustry??"",formattedAddress:l?.addressStatus?.addressToCreate!=null?G(l?.addressStatus?.addressToCreate):void 0},{firstName:s?.firstName,lastName:s?.lastName,email:s?.email},y,n?"Settings":void 0),Ge?.(v))}}},helperText:Ye,style:{padding:`12px ${o.sp3}`,zIndex:Q?0:4}}):null]})},Bt=(t,F,O,_)=>{const{companyDetailsLocalData:r,companyOfficerLocalData:A,companyView:y}=t,B=Ve.getLocalizedStrings().companyPassport,E=y?.companyOfficers!=null&&y?.companyOfficers.length>0;return{[b]:{companyDescription:r?.companyDescription??"",ein:r?.companyFiles.find(u=>u.documentType==="tax_ein"),companyId:r?.companyId??"",syncToken:r?.syncToken,companyLegalName:r?.companyLegalName??"",companyWebsite:r?.website?.toString()??"",companyAddress:r?.addressStatus?.addressToCreate,registeredAddress:r?.registeredAddressStatus?.addressToCreate,companyIndustry:{selectedOption:r?.companyIndustry,allOptions:F?.map(u=>u.code)},companyPhone:r?.phone??"",companyTaxId:r?.taxIdOrEIN??"",primaryContactName:{firstName:r?.primaryContactLocalData?.firstName??"",lastName:r?.primaryContactLocalData?.lastName??""},primaryContactEmail:r?.primaryContactLocalData?.email??"",primaryContactUserId:r?.primaryContactLocalData?.userId,primaryContactSyncToken:r?.primaryContactLocalData?.syncToken,fileIds:r?.companyFiles.map(u=>u.fileId)??[],certificateOfIncorporation:r?.companyFiles.find(u=>u.documentType==="certificate_of_incorporation"),incDate:r?.incDate?.toDate(),typeOfIncorporation:{selectedOption:r?.typeOfIncorporation,allOptions:B.companyIncInfo.allTypesOfIncorporation},sourceOfFunds:{selectedOption:r?.sourceOfFunds??"",allOptions:Object.keys(i.sourceOfFundOptions)}},[T]:Object.values(A).map((u,I)=>{const n=u,h=$t(n?.documentTypeSelectedForVerification);return{userId:n?.userId,officerType:n?.officerType??`Officer_${I+1}`,name:{firstName:n?.firstName,lastName:n?.lastName},email:n?.email,fileIds:n?.fileIds??[],dob:n?.birthday?.toDate(),nationalityCountryCode:kt(n?.nationalityCountryCode,_.map(g=>g.countryCode)),ssn:n?.ssn,role:{selectedOption:n?.titleAtCompany,allOptions:O?.map(g=>g.code)},phone:n?.phone??"",ownership:n?.ownershipInCompany,officerAddress:n?.addressStatus?.addressToCreate,selectDocument:{front:ke(!0,n?.userFiles??[],h),back:ke(!1,n?.userFiles??[],h),selectDocumentType:h},isSelectedForVerification:!E&&I===0?!0:n?.isSelectedForVerification??!1,userVerificationStatus:n?.userVerificationStatus,treasuryUserVerificationStatus:n?.treasuryUserVerificationStatus,syncToken:n?.syncToken,isPhoneVerified:n?.isPhoneVerified,otpChallenge:n?.otpChallenge}})}},Ne=t=>`${t}_form`,Et=d.div`
1
+ import{d as ct,Q as dt,aN as De,V as a,F as Ve,ad as W,a8 as mt,cP as pt,ax as ut,cB as ft,aV as ve,aM as $e,g5 as yt,n as ht,bz as gt,aK as xt,cC as St,cm as wt,cn as Ct,co as bt,A as Tt,ab as Dt,aO as vt,o,y as P,al as Le,g6 as $t,ft as ke,d3 as kt,E as It,_ as jt,ak as Fe,B as Pt,M as Nt,u as k}from"./index-BS0RW8dr.js";import{a as N}from"./core-3dlyNYRL.js";import{n as d}from"./mui-bYXq4XMS.js";import{eK as Ot,bi as G}from"./zeni-epic-state-LPACxnXP.js";import{S as Vt,s as Lt}from"./CompanyOfficerDetailsSection-kRtuUd2c-Cm23V4kL.js";import"./sentry-o6h_D-9x.js";import"./lottie-DEE24l2z.js";import"./liveblocks-DIep7fJd.js";import"./utils-uDUqNRFY.js";import"./analytics-zoE7Zcxt.js";import"./recharts-BHhx6CLo.js";import"./lexical-DPEnH3HH.js";import"./LabeledAddressValueField-BgkRIdwJ-D68tBsFt.js";import"./LabeledCreatableSingleSelectField-BP_p62Nk-BGV5p2pd.js";import"./LabeledDocumentField-DGncRe-Q-BM_MF9Yy.js";const x={width:new P(343,580,726),titleWidth:new P(343,580,726,826),subTitlePaddingTop:new P(12,k[3]),subTitlePaddingBottom:new P(k[3],k[3]),verificationDetailsRowGap:new P(12,k[5],k[5]),termsPaddingLeftRight:new P(k[0],k[3])},Ft={stepTitle:new Pt("h6Regular","h5Regular")},Ie="businessVerificationPage",b="companyDetails",T="companyOfficerDetails",{commonSetUp:{businessVerification:i},common:{settings:_t,currency:je,footer:Pe,strings:{empty:At}}}=Ve.getLocalizedStrings(),xa=({businessVerificationDetails:t,allNationalityCountries:F,verficationDetailsFetchState:O,isRefreshingViewInBackground:_,filesEndPoint:r,authParams:A,productType:y,allIndustries:B,companyTitles:E,maxInsuredAmount:u,isDisabled:I,isSettings:n=!1,isOverlay:h=!1,analytics:g,isStepInProgress:S=!1,isTreasuryTransferInitiated:K=!1,transferDetails:z,onOverlayClose:te,onAddressClick:ae,onRegisteredAddressClick:Ae,onBackClick:V,onGetOtp:Be,onVerifyOtp:Ee,onResendOtp:ze,onSendForVerificationClick:Re,onEditFileName:ie,onCompanyDetailsChanged:Me,updateFilesEntity:se,onDeleteFile:ne,onDeleteFileList:Ue,onCompanyOfficerUpdated:We,saveNewAddressInLocalStore:re,onSaveDetailsClick:Ge,onClickMenuIcon:Ke,onExecuteTreasuryTransfer:qe})=>{const Qe=ct(),m=dt(),{updateStatus:R,companyView:L,companyDetailsLocalData:l,companyOfficerLocalData:w}=t,Xe=De(R.fetchState),M=L?.company.company.featuresActivationInfo.connectedAccountProvider,Ye=M==="unit"?a.jsxs(Kt,{children:[i.terms.term1,a.jsx(W,{href:i.terms.consentUrl,onZeniLinkClick:()=>(g?.trackBillPayAgreement(),!0),linkText:i.terms.consent}),i.terms.term2,a.jsx(W,{href:i.terms.depositUrl,onZeniLinkClick:()=>(g?.trackBillPayAgreement(),!0),linkText:i.terms.depositTerms}),i.terms.term3,a.jsx(W,{href:i.terms.privacyPolicyUrl,onZeniLinkClick:()=>(g?.trackBillPayAgreement(),!0),linkText:i.terms.privacy}),i.terms.term4,a.jsx(W,{href:i.terms.tosUrl,onZeniLinkClick:()=>(g?.trackBillPayPrivacyPolicy(),!0),linkText:i.terms.tos}),i.terms.term5]}):i.terms.termsForStripe,[Je,q]=N.useState(!1),[U,oe]=N.useState("save"),[Q,Ze]=N.useState(!1),p=mt({mode:"all",reValidateMode:"onChange",defaultValues:Bt(t,B,E,F)}),{isValid:He}=p.formState,X=L?.company.company.companyBillPayInfo,Y=L?.company.company.companyTreasuryInfo,j=y==="zeni_treasury"?Y?.companyVerificationStatus:X?.companyVerificationStatus,D=Object.values(w).findIndex(e=>e?.isSelectedForVerification===!0),v=`Officer_${D<0?1:D+1}`,et=()=>{const e=w[v],s=e?.email,c=e?.birthday?.toString(),f=e?.ownershipInCompany,C=e?.firstName,$=e?.lastName,me=e?.titleAtCompany,pe=e?.documentTypeSelectedForVerification,ue=e?.phone,fe=e?.addressStatus?.addressToCreate,ye=fe!=null?G(fe):void 0,he=l?.companyDescription,H=l?.companyLegalName,ge=l?.companyIndustry,xe=l?.phone,Se=l?.website,we=l?.addressStatus?.addressToCreate!=null?G(l?.addressStatus?.addressToCreate):void 0,ee=l?.primaryContactLocalData,Ce=ee?.firstName,be=ee?.lastName,Te=ee?.email;s!=null&&f!=null&&C!=null&&$!=null&&c!=null&&me!=null&&ue!=null&&ye!=null&&pe!=null&&he!=null&&H!=null&&xe!=null&&Se!=null&&ge!=null&&H!=null&&we!=null&&Ce!=null&&be!=null&&Te!=null&&g?.trackBusinessVerificationSend({email:s,birthday:c.toString(),companyOwnership:f,firstName:C,lastName:$,companyRole:me,phone:ue,formattedAddress:ye,documentTypeForVerification:pe},{companyDescription:he,legalName:H,phone:xe,website:Se.toString(),industry:ge,formattedAddress:we},{firstName:Ce,lastName:be,email:Te},y,n?"Settings":void 0)},tt=()=>{const e=w[v],s=l?.primaryContactLocalData,c=e?.email??"",f=!!e?.firstName&&!!e?.lastName,C=s?.email??"",$=!!s?.firstName&&!!s?.lastName;return c&&!f?((!e?.firstName||!e?.lastName)&&p.trigger(`${T}.${D<0?0:D}.name`,{shouldFocus:!0}),!1):C&&!$?((!s?.firstName||!s?.lastName)&&p.trigger(`${b}.primaryContactName`,{shouldFocus:!0}),!1):!0},at=()=>{const e=w[v],s=l?.primaryContactLocalData,c=e?.email,f=s?.email;if(c){if(!f)return(s?.firstName||s?.lastName)&&p.trigger(`${b}.primaryContactEmail`,{shouldFocus:!0}),!1}else if(e?.firstName||e?.lastName||e?.birthday||e?.nationalityCountryCode||e?.ownershipInCompany||e?.phone||e?.ssn||e?.titleAtCompany||e?.addressStatus?.addressToCreate||e?.fileIds!=null&&e?.fileIds.length>0||J!=null&&J?.length>0)return p.trigger(`${T}.${D<0?0:D}.email`,{shouldFocus:!0}),!1;return!0},it=p.handleSubmit(()=>{if(U!=="verification"&&oe("verification"),M==="unit"&&w[v]?.isPhoneVerified!==!0){p.setError(`${T}.${D}.phone`,{type:"custom"});return}const e=pt(Object.values(w).map(c=>Object.values(c?.deleteFileStatusById??{}).filter(f=>f!=null))),s=Object.values(l?.deleteFileStatusById??{}).filter(c=>c!=null);Ot(e.concat(s)).fetchState!=="In-Progress"&&He&&(et(),Re?.(v),K===!0&&qe?.())}),st=async(e,s)=>{e.includes(b)?Me?.(s[b]):e.includes(T)&&We?.(s[T])},nt=N.useCallback(ut((e,s)=>{st(e,s)},300),[]);N.useEffect(()=>{const e=p.watch((s,{name:c})=>{c!=null&&s!=null&&ft(()=>nt(c,s))});return()=>{e.unsubscribe()}});const le=De(t.companyDetailsLocalData?.addressStatus);N.useEffect(()=>{t.companyDetailsLocalData?.addressStatus?.addressToCreate!=null&&t.companyDetailsLocalData?.registeredAddressStatus?.addressToCreate==null&&le==null&&(re?.("company_registered_address",t.companyDetailsLocalData?.addressStatus?.addressToCreate),p.setValue(`${b}.registeredAddress`,t.companyDetailsLocalData?.addressStatus?.addressToCreate))},[t.companyDetailsLocalData?.addressStatus,t.companyDetailsLocalData?.registeredAddressStatus,le,re,p]);const ce=L?.companyOfficers.slice(0,10).sort((e,s)=>e.user.createTime?.isAfter(s.user.createTime)===!0?1:-1),J=ce?.map(e=>e.user),rt=ce?.map(e=>e.role),ot={onOkClick:()=>{q(!1),V();const e=[],s=L?.company.company.incInfo.fileIds??[];p.getValues(`${b}.fileIds`).forEach(c=>{s.includes(c)||e.push(c)}),rt?.forEach((c,f)=>{const C=c?.fileIds??[];p.getValues(`${T}.${f}.fileIds`).forEach($=>{C.includes($)||e.push($)})}),e.length!==0&&Ue?.(e)},onCancelClick:()=>{q(!1)}},lt=ve($e(u),u,je.currencySymbol).toUpperCase(),Z=j?.code==="pending_review"||j?.code==="verified",de=(z?.treasuryTransferMoneyLocalData?.amount?.amount??0)>0;return y==="zeni_treasury"&&j?.code==="pending_review"&&Xe==="In-Progress"&&R.fetchState==="Completed"?a.jsxs(Ht,{children:[a.jsxs(ea,{children:[a.jsx(yt,{}),a.jsx(ta,{windowSize:m,children:K===!0?i.submittedTitleWithTransfer:i.submittedTitle}),a.jsx(Zt,{isReadonly:!1,children:K===!0?i.submittedDescriptionWithTransfer.replace("__amount__",ve($e(z?.treasuryTransferMoneyLocalData?.amount?.amount??0),z?.treasuryTransferMoneyLocalData?.amount?.amount??0,je.currencySymbol)).replace("__account__",z?.treasuryTransferMoneyLocalData?.fromAccount?.label??""):i.submittedDescription})]}),a.jsx(ht,{label:i.submittedButton,onClick:()=>{V(),te?.()},variant:"primary"})]}):a.jsxs(Et,{isSettings:n,children:[a.jsx(gt,{title:h&&S===!0?At:i.header,backgroundColor:Qe.colors.grey5,style:{zIndex:Q?1:4},onBackClick:()=>{St(p.formState.dirtyFields)?q(!0):V()},showBackButton:!n&&!h,showMenuIcon:n?m==="medium-compact"||m==="small":!1,onClickMenuIcon:Ke,rightSideComponent:h?a.jsx(aa,{"data-testid":xt("nav-bar-close-business-verification-overlay"),onClick:()=>{V(),te?.()}}):null,source:"BusinessVerificationPage"}),Je===!0?a.jsx(wt,{titleComponent:a.jsx(bt,{children:i.discardTitle}),descriptionComponent:a.jsx(Ct,{children:i.discardDescription}),primaryButtonText:i.discard,secondaryButtonText:i.cancel,action:ot}):null,a.jsxs(Mt,{windowSize:m,children:[(!h||S===!1)&&a.jsx(Rt,{windowSize:m,children:n?_t.infoText.businessVerification:i.title}),O==="In-Progress"||O==="Not-Started"?a.jsx(Ut,{children:a.jsx(Tt,{size:"ExtraLarge",start:!0})}):a.jsx(Dt,{...p,children:a.jsxs("form",{id:Ne(Ie),onSubmit:it,children:[h&&S===!0&&a.jsxs(zt,{children:[a.jsxs(qt,{windowSize:m,children:[a.jsx(Qt,{windowSize:m,children:Z?i.businessVerificationDetails:de?i.verifyBusinessDetails:i.verifyBusinessDetailsWithoutTransfer}),!Z&&a.jsx(Xt,{children:a.jsxs(Yt,{children:[a.jsx(Oe,{}),de&&a.jsx(Oe,{}),a.jsx(Jt,{})]})})]}),a.jsx(_e,{isReadonly:Z,children:i.verifyBusinessDetailsDescription})]}),a.jsxs(Wt,{children:[a.jsx(Vt,{companyOfficerData:w,allNationalityCountries:F,allOfficers:J??[],sectionId:T,isRefreshingViewInBackground:_,connectedAccountProvider:M,productType:"business_verification",updateFilesEntity:se,onEditFileName:ie,onOfficerAddressClick:ae,onDeleteFile:ne,isDisabled:I,filesEndPoint:r,authParams:A,isPopupOpen:Q,openPopup:Ze,onGetOtp:Be,onVerifyOtp:Ee,onResendOtp:ze,companyTitles:E,isForTreasury:y==="zeni_treasury",isOverlay:h}),a.jsx(Lt,{companyDetails:l,businessVerificationProps:{companyVerificationStatus:j,isRefreshingViewInBackground:_},productType:"business_verification",showTreasuryFields:y==="zeni_treasury",sectionId:b,isDisabled:j?.code==="pending_review"||j?.code==="verified"?"readonly":I,fileProps:{authParams:A,filesEndPoint:r,onEditFileName:ie,onDeleteFile:ne,updateFilesEntity:se},onCompanyAddressClick:ae,onRegisteredAddressClick:Ae,connectedAccountProvider:M,allIndustries:B})]}),y==="zeni_accounts"?a.jsx(Gt,{windowSize:m,children:i.threadText.replace("__amount__",lt)}):null]})})]}),O==="Completed"&&(y==="zeni_treasury"?Y?.companyVerificationStatus?.code!=="pending_review"&&Y?.companyVerificationStatus?.code!=="verified":X?.businessVerificationStatus?.code!=="pending_review"&&X?.businessVerificationStatus?.code!=="verified")?a.jsx(vt,{formId:Ne(Ie),primaryBtn:{label:S?Pe.submit:i.sendForVerificationButton,style:{width:"auto",minWidth:m==="small"?"auto":S?"83px":"181px"},isLoading:U==="verification"&&R.fetchState==="In-Progress",isDisabled:I!=null},containerStyle:{width:m==="small"?x.width.valuePx(m):"auto",justifyContent:m==="small"?"space-between":"center"},helperStyle:{width:m==="small"?x.width.valuePx(m):"auto",paddingLeft:x.termsPaddingLeftRight.valuePx(m),paddingRight:x.termsPaddingLeftRight.valuePx(m),textAlign:m==="small"?"center":"initial"},showCancel:!0,cancelBtn:{reverseSpinnerColor:!1,label:S?Pe.back:i.saveDetailsButton,style:{width:m==="small"?"auto":S?"83px":"181px"},isLoading:U==="save"&&R.fetchState==="In-Progress",onClick:()=>{if(S)V();else{const e=w[v],s=l?.primaryContactLocalData;U!=="save"&&oe("save");const c=e?.email??"",f=tt(),C=at();f&&C&&(g?.trackBusinessVerificationSave({email:c,birthday:e?.birthday?.toString(),companyOwnership:e?.ownershipInCompany,firstName:e?.firstName,lastName:e?.lastName,companyRole:e?.titleAtCompany,phone:e?.phone,formattedAddress:e?.addressStatus?.addressToCreate!=null?G(e?.addressStatus?.addressToCreate):void 0,documentTypeForVerification:e?.documentTypeSelectedForVerification},{companyDescription:l?.companyDescription,legalName:l?.companyLegalName,phone:l?.phone,website:l?.website?.toString(),industry:l?.companyIndustry??"",formattedAddress:l?.addressStatus?.addressToCreate!=null?G(l?.addressStatus?.addressToCreate):void 0},{firstName:s?.firstName,lastName:s?.lastName,email:s?.email},y,n?"Settings":void 0),Ge?.(v))}}},helperText:Ye,style:{padding:`12px ${o.sp3}`,zIndex:Q?0:4}}):null]})},Bt=(t,F,O,_)=>{const{companyDetailsLocalData:r,companyOfficerLocalData:A,companyView:y}=t,B=Ve.getLocalizedStrings().companyPassport,E=y?.companyOfficers!=null&&y?.companyOfficers.length>0;return{[b]:{companyDescription:r?.companyDescription??"",ein:r?.companyFiles.find(u=>u.documentType==="tax_ein"),companyId:r?.companyId??"",syncToken:r?.syncToken,companyLegalName:r?.companyLegalName??"",companyWebsite:r?.website?.toString()??"",companyAddress:r?.addressStatus?.addressToCreate,registeredAddress:r?.registeredAddressStatus?.addressToCreate,companyIndustry:{selectedOption:r?.companyIndustry,allOptions:F?.map(u=>u.code)},companyPhone:r?.phone??"",companyTaxId:r?.taxIdOrEIN??"",primaryContactName:{firstName:r?.primaryContactLocalData?.firstName??"",lastName:r?.primaryContactLocalData?.lastName??""},primaryContactEmail:r?.primaryContactLocalData?.email??"",primaryContactUserId:r?.primaryContactLocalData?.userId,primaryContactSyncToken:r?.primaryContactLocalData?.syncToken,fileIds:r?.companyFiles.map(u=>u.fileId)??[],certificateOfIncorporation:r?.companyFiles.find(u=>u.documentType==="certificate_of_incorporation"),incDate:r?.incDate?.toDate(),typeOfIncorporation:{selectedOption:r?.typeOfIncorporation,allOptions:B.companyIncInfo.allTypesOfIncorporation},sourceOfFunds:{selectedOption:r?.sourceOfFunds??"",allOptions:Object.keys(i.sourceOfFundOptions)}},[T]:Object.values(A).map((u,I)=>{const n=u,h=$t(n?.documentTypeSelectedForVerification);return{userId:n?.userId,officerType:n?.officerType??`Officer_${I+1}`,name:{firstName:n?.firstName,lastName:n?.lastName},email:n?.email,fileIds:n?.fileIds??[],dob:n?.birthday?.toDate(),nationalityCountryCode:kt(n?.nationalityCountryCode,_.map(g=>g.countryCode)),ssn:n?.ssn,role:{selectedOption:n?.titleAtCompany,allOptions:O?.map(g=>g.code)},phone:n?.phone??"",ownership:n?.ownershipInCompany,officerAddress:n?.addressStatus?.addressToCreate,selectDocument:{front:ke(!0,n?.userFiles??[],h),back:ke(!1,n?.userFiles??[],h),selectDocumentType:h},isSelectedForVerification:!E&&I===0?!0:n?.isSelectedForVerification??!1,userVerificationStatus:n?.userVerificationStatus,treasuryUserVerificationStatus:n?.treasuryUserVerificationStatus,syncToken:n?.syncToken,isPhoneVerified:n?.isPhoneVerified,otpChallenge:n?.otpChallenge}})}},Ne=t=>`${t}_form`,Et=d.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
@@ -1,4 +1,4 @@
1
- import{Q as w,F as x,V as t,b as $,B as y,o as s,M as C}from"./index-XNBiWrYj.js";import{n as l}from"./mui-bYXq4XMS.js";import{a as d}from"./core-3dlyNYRL.js";const f=e=>d.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},d.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.802551 6.92395C0.802551 5.2671 2.1457 3.92395 3.80255 3.92395H20.2009C21.8578 3.92395 23.2009 5.2671 23.2009 6.92395V17.076C23.2009 18.7329 21.8578 20.076 20.2009 20.076H3.80255C2.1457 20.076 0.802551 18.7329 0.802551 17.076V10.8805H23.1896V9.01135H0.802551V6.92395ZM0.802551 9.01135H0.799072V10.8805H0.802551V9.01135ZM14.5443 15.6222C14.5443 15.0935 14.9728 14.6649 15.5015 14.6649H18.1386C18.6673 14.6649 19.0959 15.0935 19.0959 15.6222C19.0959 16.1509 18.6673 16.5795 18.1386 16.5795H15.5015C14.9728 16.5795 14.5443 16.1509 14.5443 15.6222Z",fill:"currentColor"})),{common:n,spendManagement:{chargeCard:r}}=x.getLocalizedStrings(),H={subText:new y("extraSmallRegular","standardRegular")},S=({cardDetail:e,forDetailPage:a,styles:h})=>{const m=w(),u=e.type.code.includes("credit")?r.chargeCardsPromo.credit:r.chargeCardsPromo.debit;let o=e.type.code.includes("physical")?r.cardList.physicalCard:r.cardList.virtualCard;const i=n.strings.space+r.cardDetails.expiryHideOut+n.strings.space+e.accountLast4,g=e.status.code==="request_on_hold"||!a?o:i,c=e.type.code.includes("physical");return t.jsxs(b,{style:h,windowSize:m,forDetailPage:a,className:"cardName",title:`${g}`,children:[u,t.jsx(v,{}),o,c&&!a?t.jsx(p,{className:"physical-card-icon"}):null,e.status.code==="request_on_hold"||!a?null:i,c&&a?t.jsx(p,{}):null]})},b=l(C)`
1
+ import{Q as w,F as x,V as t,b as $,B as y,o as s,M as C}from"./index-BS0RW8dr.js";import{n as l}from"./mui-bYXq4XMS.js";import{a as d}from"./core-3dlyNYRL.js";const f=e=>d.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},d.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.802551 6.92395C0.802551 5.2671 2.1457 3.92395 3.80255 3.92395H20.2009C21.8578 3.92395 23.2009 5.2671 23.2009 6.92395V17.076C23.2009 18.7329 21.8578 20.076 20.2009 20.076H3.80255C2.1457 20.076 0.802551 18.7329 0.802551 17.076V10.8805H23.1896V9.01135H0.802551V6.92395ZM0.802551 9.01135H0.799072V10.8805H0.802551V9.01135ZM14.5443 15.6222C14.5443 15.0935 14.9728 14.6649 15.5015 14.6649H18.1386C18.6673 14.6649 19.0959 15.0935 19.0959 15.6222C19.0959 16.1509 18.6673 16.5795 18.1386 16.5795H15.5015C14.9728 16.5795 14.5443 16.1509 14.5443 15.6222Z",fill:"currentColor"})),{common:n,spendManagement:{chargeCard:r}}=x.getLocalizedStrings(),H={subText:new y("extraSmallRegular","standardRegular")},S=({cardDetail:e,forDetailPage:a,styles:h})=>{const m=w(),u=e.type.code.includes("credit")?r.chargeCardsPromo.credit:r.chargeCardsPromo.debit;let o=e.type.code.includes("physical")?r.cardList.physicalCard:r.cardList.virtualCard;const i=n.strings.space+r.cardDetails.expiryHideOut+n.strings.space+e.accountLast4,g=e.status.code==="request_on_hold"||!a?o:i,c=e.type.code.includes("physical");return t.jsxs(b,{style:h,windowSize:m,forDetailPage:a,className:"cardName",title:`${g}`,children:[u,t.jsx(v,{}),o,c&&!a?t.jsx(p,{className:"physical-card-icon"}):null,e.status.code==="request_on_hold"||!a?null:i,c&&a?t.jsx(p,{}):null]})},b=l(C)`
2
2
  ${e=>e.forDetailPage?{...$.extraSmallRegular.cssObject}:`${H.subText.style(e.windowSize)}`};
3
3
  color: ${e=>e.theme.colors.hero};
4
4
  max-width: 100%;