@zeniai/web-cockpit-ui 1.14.42-qa → 1.14.43-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 (228) hide show
  1. package/dist/assets/{ACHDetailsPage-C0Ys2JJm-DO_oU6A_.js → ACHDetailsPage-CmrHphBc-CCjHb-P6.js} +1 -1
  2. package/dist/assets/{AIPerformancePage-CsR8PRb9-CR5nd_X3.js → AIPerformancePage-DVLZQQLx-zn-23nDO.js} +1 -1
  3. package/dist/assets/{AccountInfoPage-GuppZ3vX-CeDVgzX0.js → AccountInfoPage-imteGSK1-C9QvJYjb.js} +1 -1
  4. package/dist/assets/{AccountInfoPageContent-BLKO0eIw-bPEBjQFC.js → AccountInfoPageContent-DIjQnfrv-BrFyIq6Y.js} +1 -1
  5. package/dist/assets/{AccountLockedInfoModal-DxcSHNgE-D2uL0GmW.js → AccountLockedInfoModal-LYiLlZrv-CQT40dfU.js} +1 -1
  6. package/dist/assets/{AccountReconDetailsDrawerPage-BoS3J4pw-CHY_XEBy.js → AccountReconDetailsDrawerPage-CSzw7Xdo-Bv21u4kp.js} +1 -1
  7. package/dist/assets/{AccountRow-Dj74AzIh-xP3FLMcB.js → AccountRow-DnMX1pTV-DzyPY1GP.js} +1 -1
  8. package/dist/assets/{AccountsPromoCardStack-MQ_e8aZu-B-b5q7Pi.js → AccountsPromoCardStack-BY9-YdTi-oCbxhKHP.js} +1 -1
  9. package/dist/assets/{AddAddressForCardDrawer-LpGynQhq-CazlktNs.js → AddAddressForCardDrawer-BY8rla0d-DeNAiW75.js} +1 -1
  10. package/dist/assets/{AddToWalletPage-wtm2Oua5-BVXzwSjP.js → AddToWalletPage-BND3tkMk-DnGY-X4j.js} +1 -1
  11. package/dist/assets/{AgingReportsPage-e98Qmrut-BLJFH4aK.js → AgingReportsPage-C1HG4wzc-D_51o2Vw.js} +1 -1
  12. package/dist/assets/{AllUserItems-Cyr74U6h-BEjcecnQ.js → AllUserItems-rYc34keO-Cx2yE3IC.js} +1 -1
  13. package/dist/assets/{ApAgingDetailPage-Kjz7NPLx-BSVEV7Qf.js → ApAgingDetailPage-CNG6prpn-C4L_FUMN.js} +1 -1
  14. package/dist/assets/{AppBasePage-DrR3bM5Z-DwrgkTN9.js → AppBasePage-Dk4672v_-krp90oaN.js} +1 -1
  15. package/dist/assets/{AppDrawerContent-C2GlTktJ-BervwsJr.js → AppDrawerContent-Y99P1DCR-DnO5NpXg.js} +1 -1
  16. package/dist/assets/{ApprovalRulesSettingsPage-Cy9uHg-R-sb01mezt.js → ApprovalRulesSettingsPage-CO8-E7dA-D6eiQ5KV.js} +1 -1
  17. package/dist/assets/{ArAgingChart-CtxyhI9X-B5YCVZL2.js → ArAgingChart-CsuanjH1-DSoDp9i5.js} +1 -1
  18. package/dist/assets/{ArAgingDetailPage-GX7S1gNm-I8t7YWod.js → ArAgingDetailPage-D6CHRGxo-d25mgZbl.js} +1 -1
  19. package/dist/assets/{AttachmentView-C8CksG-9-hqMTc_ZB.js → AttachmentView-B3p8mkIi-DG3k711N.js} +1 -1
  20. package/dist/assets/{BankAccountSection-8JPKANMP-C-OF_cda.js → BankAccountSection--gqsJj6B-UPd-Yh1u.js} +1 -1
  21. package/dist/assets/{BankAccountWarningSection-HW7t6lPN-BxYKpJiW.js → BankAccountWarningSection-BM-Bu8CI-BPZDfXvA.js} +1 -1
  22. package/dist/assets/{BankConnectionsSettingsPage-C_jyBPLn-Wg4RTCY7.js → BankConnectionsSettingsPage-B_RVLsvX-Chn1l7AE.js} +1 -1
  23. package/dist/assets/{BillDetailPage-BwuHMPBb-BthKHLXO.js → BillDetailPage-Bu20m9VL-BUA39mWG.js} +1 -1
  24. package/dist/assets/{BillPayApprovalRuleDetailPage-9RqkaWf2-Ce6S7eTt.js → BillPayApprovalRuleDetailPage-CR168utn-CkPCJz8P.js} +1 -1
  25. package/dist/assets/{BillPayApprovalRulesPage-CZmACduz-DMDHXhbZ.js → BillPayApprovalRulesPage-DQbLEENj-DZMa4MYn.js} +1 -1
  26. package/dist/assets/{BillPayPromoPage-C2m0GTw3-BiegkzcQ.js → BillPayPromoPage-DqUNPVeq-DgNZSmr8.js} +1 -1
  27. package/dist/assets/{BillPaySetUpPage-C71BRWUw-C_vuAOSC.js → BillPaySetUpPage-BO8V-KVh-B0fHP_CJ.js} +1 -1
  28. package/dist/assets/{BillingSettingsPage-Gc3cUKmE-ClnSz0Xy.js → BillingSettingsPage-clzpJwrI-D8bCm6Ri.js} +1 -1
  29. package/dist/assets/{BillsBulkReviewDrawerPage-CO1oJuvH-BWr9AvlU.js → BillsBulkReviewDrawerPage-CFldRiX8-CLbuQuW0.js} +1 -1
  30. package/dist/assets/{BoxItem-D09XMKDc-Bw3kfbzM.js → BoxItem-CnpQOIVn-CNkfS6h2.js} +1 -1
  31. package/dist/assets/{BusinessVerificationPage-Ef4KSPWc-FGSd4FWB.js → BusinessVerificationPage-DKmaCoDK-pfIQg2S-.js} +1 -1
  32. package/dist/assets/{CardNumberSubText-Chba_z2--CnmWtDil.js → CardNumberSubText-uaXIushe-Bx2nZV75.js} +1 -1
  33. package/dist/assets/{CashbackDetailPage-DAM-IJ8V-msI_KaQs.js → CashbackDetailPage-DrW60zjw-Dbf3vfs6.js} +1 -1
  34. package/dist/assets/{ChargeCardDetailPage-U_ZuntGp-DdRX435G.js → ChargeCardDetailPage-X1HoUp96-DOMbUjNw.js} +1 -1
  35. package/dist/assets/{ChargeCardListPage-DJ5TbLO--DC8i8t37.js → ChargeCardListPage-_0lUmAxM-B3fy-mzD.js} +1 -1
  36. package/dist/assets/{ChargeCardListTable-D7BV3Iv9-C5GhRKBn.js → ChargeCardListTable-mfIUvL0A-CPKekIhI.js} +1 -1
  37. package/dist/assets/{ChargeCardPromoPage-CMqzRnza-CJ_g_fWc.js → ChargeCardPromoPage-Bo2JJ5g4-CLbzwd3s.js} +1 -1
  38. package/dist/assets/{ChargeCardSetupPage-dOz2soLF-BNyPEoCo.js → ChargeCardSetupPage-D9IikPGO-RTClLCON.js} +1 -1
  39. package/dist/assets/{ChargeCardStatementsPage-S2JH9s6i-DZCRS7UG.js → ChargeCardStatementsPage-Ck3qug5N-Bb-MPmDp.js} +1 -1
  40. package/dist/assets/{ChargeCardUtils-Bv0OpE88-aSHBcI_8.js → ChargeCardUtils-BEBqV4Ri-D_Hnspw1.js} +1 -1
  41. package/dist/assets/{ChaseOverlay-4Rv__bdV-BGiRorBN.js → ChaseOverlay-CauClKmi-CFbGjU4W.js} +1 -1
  42. package/dist/assets/{CheckDepositDrawerPage-BKogbkJv-BgGR0y3z.js → CheckDepositDrawerPage-DmszT7bh-rDvzmJWy.js} +1 -1
  43. package/dist/assets/{CollapsableReportTable-B_qvVX0p-BzLwdCFV.js → CollapsableReportTable-CHthdzdj-ChiC9ii3.js} +1 -1
  44. package/dist/assets/{CompanyOfficerDetailsSection-aAwv9WfC-CXS756Yr.js → CompanyOfficerDetailsSection-BEb3_zYO-DcsmBnYA.js} +1 -1
  45. package/dist/assets/{CompanyPassportCard-DchSKG4l-DSlNuaik.js → CompanyPassportCard-FhjZyorS-BMpg0d2K.js} +1 -1
  46. package/dist/assets/{CompanyPassportPage-DLIJn7Fp-BtIHuALv.js → CompanyPassportPage-BlhNB8Ah-VPSKwD76.js} +1 -1
  47. package/dist/assets/{CompleteProfile-Bf5sNhdg-CmWt1hc0.js → CompleteProfile-Bk9Oyn1_-BwRdLNNT.js} +1 -1
  48. package/dist/assets/{ConfettiBurst-BPWFB4Ty-CXWnM85o.js → ConfettiBurst-DZLI1m4w-CVaN18FA.js} +1 -1
  49. package/dist/assets/{CreateOrEditVendorPage-BTWihvJ--DyiROacC.js → CreateOrEditVendorPage-C3CFRcUl-Cs6KHLA1.js} +1 -1
  50. package/dist/assets/{CreditCardPaymentDrawerPage-B5p_onzw-DA0RqcSj.js → CreditCardPaymentDrawerPage-Drl9yZi5-gMAp6Fc4.js} +1 -1
  51. package/dist/assets/{CreditCardPaymentPlgSection-CTpwe7CS-BwlpGWY3.js → CreditCardPaymentPlgSection-D-Ptzdeo-DV96PY8N.js} +1 -1
  52. package/dist/assets/{CurrencySelectField-Dn9EcyiE-BaNsJGR4.js → CurrencySelectField-CTAalWEI-CLkCFXC5.js} +1 -1
  53. package/dist/assets/{CustomerOnboardingActivationPage--C7Nj5oq-BhxcUwoR.js → CustomerOnboardingActivationPage-BkPgpEPw-HvYys8Le.js} +1 -1
  54. package/dist/assets/CustomerOnboardingContainerPage-BAZbPHa2-HrAOAIJ-.js +1 -0
  55. package/dist/assets/{CustomerOnboardingDetailPageSkeleton-BEldzNUC-DgSmlNNg.js → CustomerOnboardingDetailPageSkeleton-DzG4nVbk-Dl9zYjyQ.js} +1 -1
  56. package/dist/assets/{CustomerOnboardingNoStepsPage-BWPx0oGa-CH7bgFJQ.js → CustomerOnboardingNoStepsPage-Czttv30c-DMfPS84t.js} +1 -1
  57. package/dist/assets/{CustomerOnboardingPage-CQsXgrSi-DtqPleyX.js → CustomerOnboardingPage-CNXBzMG5-DJK4W9F2.js} +1 -1
  58. package/dist/assets/{CustomerOnboardingProductSuitePage-Ba-hBJDr-CRi7Fs7-.js → CustomerOnboardingProductSuitePage-BArjfUBb-C4vD90lw.js} +1 -1
  59. package/dist/assets/{Dashboard-D9a8ZSVk-CqZBwIFD.js → Dashboard-DyA5sBz3-BbKJ3Sxy.js} +1 -1
  60. package/dist/assets/{DashboardReportPage-DC7almyE-CxGTnBBu.js → DashboardReportPage-DvUvM8lA-BLhDX9Wv.js} +1 -1
  61. package/dist/assets/{DashboardSidebarBackgroundAnimation-BZPfkv0W-C9IxzdCW.js → DashboardSidebarBackgroundAnimation-CAa8yETt-jTqz5gzA.js} +1 -1
  62. package/dist/assets/{DepositAccTransactionItem-D6Pxnskx-CkQ-E6uU.js → DepositAccTransactionItem-VZZvr2Gl-jIVsrsNC.js} +1 -1
  63. package/dist/assets/{DepositAccTransactionListPage-RPv15wO3-C1khFOLd.js → DepositAccTransactionListPage-xt11Y65Z-D4SLXGqA.js} +1 -1
  64. package/dist/assets/{DomesticWireDetailsPage-C7SMSdym-C6AsUgPa.js → DomesticWireDetailsPage-DmE3TVQk-DloHnEEV.js} +1 -1
  65. package/dist/assets/{DownloadOverlay-DSuuIFd2-CtAaHiDX.js → DownloadOverlay-DBhAvmRv-CCJvxfZh.js} +1 -1
  66. package/dist/assets/{DrawerPage-G3indLUm-KDBiLr1g.js → DrawerPage-BSy9zQ8e-BnYB7jC2.js} +1 -1
  67. package/dist/assets/{EditPeoplePage-B3OUzvId-DupE09Ur.js → EditPeoplePage-DyaHesFS-m0sJIT4p.js} +1 -1
  68. package/dist/assets/{EditReimbursementDetailPage-BDtXtGDU-BcBuZIRV.js → EditReimbursementDetailPage-EEKR__zQ-C-PImemb.js} +1 -1
  69. package/dist/assets/{EntityDetailPage-Duk7QFjU-BxvKwYnJ.js → EntityDetailPage-BECoxBfR-C7abLrXu.js} +1 -1
  70. package/dist/assets/{EntitySummarySection-Cr7WMJ8D-DJAnI7E2.js → EntitySummarySection-wzMCZjZE-DrhMPVSS.js} +1 -1
  71. package/dist/assets/{ExpenseAutomationOverviewPage-hpARiJiY-BasbCxne.js → ExpenseAutomationOverviewPage-MlPZZ_Mz-Dd7OsYXY.js} +1 -1
  72. package/dist/assets/ExpenseAutomationPage-mdYWsafr-qx5nkQ54.js +1650 -0
  73. package/dist/assets/{ExpressPayPage-I-QL4uh--D9TF_lu8.js → ExpressPayPage-Dg03hVzu-B2avGC_K.js} +1 -1
  74. package/dist/assets/{FeaturePreviewPage-BHb59Q7j-DmfTfLoX.js → FeaturePreviewPage-BePsYONK-B2yH8Fph.js} +1 -1
  75. package/dist/assets/{FollowStepsSection-DONqc9yn-D0mWYYLp.js → FollowStepsSection-BqqrsOIP-DBSaHnE2.js} +1 -1
  76. package/dist/assets/{GlobalReviewListPage-BFAgZIJv-CjcolAPg.js → GlobalReviewListPage-BVpHhHli-BVaUXk67.js} +1 -1
  77. package/dist/assets/{HelpButton-DoSu6q8h-D2QNiRS_.js → HelpButton-DXDj1Qju-DnQQURkZ.js} +1 -1
  78. package/dist/assets/{InformationCardStack-JtvRODJe-BckRaEiX.js → InformationCardStack-CauWOEJQ-QIe84Z5T.js} +1 -1
  79. package/dist/assets/{InsightsCardStack-BEceNZZE-DZzBavNp.js → InsightsCardStack-C-52awo8-BlPifdQR.js} +1 -1
  80. package/dist/assets/{InsightsSection-KsnkYRQw-B7Aa3iSu.js → InsightsSection-Bq2ZlQ8--bZpQBOUU.js} +1 -1
  81. package/dist/assets/{IntegrationsSettingsPage-D4cEY5iJ-Xpo32vjI.js → IntegrationsSettingsPage-CQCxjOHh-NHelX_xc.js} +1 -1
  82. package/dist/assets/{InternationalWireSwiftDetailsPage-Tf_vaD2v-DshYJiDx.js → InternationalWireSwiftDetailsPage-Bi3ERJ96-CaFnSRYh.js} +1 -1
  83. package/dist/assets/{InternationalWireVerificationPage-qIIqh0iv-Bta_KUnQ.js → InternationalWireVerificationPage-DhX_OpJ6-BpviOc29.js} +1 -1
  84. package/dist/assets/{InviteFormPage-ByA4uyh2-C8GZgkKz.js → InviteFormPage-BJkMxjIE-C7G5Q0E2.js} +1 -1
  85. package/dist/assets/{InvitePageListView-0_dBCqFt-BFjmWrp0.js → InvitePageListView-0zD-YAJA-CIxbN6SJ.js} +1 -1
  86. package/dist/assets/{InvitePeoplePage-C4d-Ov5z-BxDTKzbB.js → InvitePeoplePage-CvQNFpjb-DB6AeZGB.js} +1 -1
  87. package/dist/assets/{InvoiceUploadSection-MEPQPiCt-th9B9DiY.js → InvoiceUploadSection-BrnUjxIH-DvK-NqPJ.js} +1 -1
  88. package/dist/assets/{IssueChargeCardPage-C77SyJR9-DFBBjnIj.js → IssueChargeCardPage-agEqgGPg-DtDWJTwt.js} +1 -1
  89. package/dist/assets/{LabeledAddressValue-DKKL0jnt-Df_7m6cr.js → LabeledAddressValue-DphNZz4y-BbhziMPr.js} +1 -1
  90. package/dist/assets/{LabeledAddressValueField-Ca10mEAm-BYXlyxvu.js → LabeledAddressValueField-DBlBlkO_-fjUzU_a0.js} +1 -1
  91. package/dist/assets/{LabeledControlledCheckBoxField-BYk2-ixd-BEj9gH8B.js → LabeledControlledCheckBoxField-CBRqbUDe-zjklDavb.js} +1 -1
  92. package/dist/assets/{LabeledCreatableSingleSelectField-DMhTj1GM-CwLykRyb.js → LabeledCreatableSingleSelectField-DOjtbusw-O47c6W6Y.js} +1 -1
  93. package/dist/assets/{LabeledDocumentField-DX4zVKkz-WJvH9-Ei.js → LabeledDocumentField-Bxggz66t-Cwirfoo_.js} +1 -1
  94. package/dist/assets/{LabeledDropDownFormattedTextField-BoizuD7H-v4Q8CQfZ.js → LabeledDropDownFormattedTextField-1dqcE0E4-BkupDBAp.js} +1 -1
  95. package/dist/assets/{LabeledText-4NNrEynJ-DGSkmo9K.js → LabeledText-BJFW2h6S-DNf9x09V.js} +1 -1
  96. package/dist/assets/{LabeledUserSingleSelectWithSubtitlesField-DaXDpM0N-DvOiGuc2.js → LabeledUserSingleSelectWithSubtitlesField-CLzwYw4O-BiN7ZdIi.js} +1 -1
  97. package/dist/assets/{LabeledZeniRolesDropDownField-zRamZWIQ-Dvg7Ba_y.js → LabeledZeniRolesDropDownField-DGsJbILm-D0lgOjM8.js} +1 -1
  98. package/dist/assets/{LinkJETransactionPage-FMYLsvT_-CYlVNKOt.js → LinkJETransactionPage-CvdbDO5J-BQoBCpbx.js} +4 -4
  99. package/dist/assets/{LowBalancePopup-Ig5iJGIg-KnO8OBAh.js → LowBalancePopup-BhLxnyK0-BxHV5E9i.js} +1 -1
  100. package/dist/assets/{MagicLinkACHDetailsPage-Cf-TvH4n-B0L8_YVG.js → MagicLinkACHDetailsPage-CcD-_iOV-D_4ibNuj.js} +1 -1
  101. package/dist/assets/{MagicLinkDomesticWireDetailsPage-CLJo-rez-CdiJYIeQ.js → MagicLinkDomesticWireDetailsPage-C-YfhiNr-BjXKGnQe.js} +1 -1
  102. package/dist/assets/{MagicLinkInternationalWireDetailsPage-C-cD6L4u-C0367lWO.js → MagicLinkInternationalWireDetailsPage-DXZBFcUc-DgGAF9HQ.js} +1 -1
  103. package/dist/assets/{MagicLinkSuccessPage-cJ0PjYEe-CdKZYAi2.js → MagicLinkSuccessPage-OikwemO4-C9bkoZsD.js} +1 -1
  104. package/dist/assets/{MagicLinkTitleSection-Dc8RKV1p-CofIGuzn.js → MagicLinkTitleSection-CcsVjT5g-CoREkk_L.js} +1 -1
  105. package/dist/assets/{MailingDetailsSection-BD9QWumq-BBGbTuq8.js → MailingDetailsSection-ClULuPML-Q3RQkre6.js} +1 -1
  106. package/dist/assets/{MeetingCalenderPopup-D10SioCO-1_HeRLgo.js → MeetingCalenderPopup-DJHrBVXi-BogUsqxG.js} +1 -1
  107. package/dist/assets/{Menu-DV3oFAip-lRllgVp1.js → Menu-C3EXvt9P-B2-q6Czj.js} +1 -1
  108. package/dist/assets/{MyBankConnectionsSettingsPage-jrPeCDe3-DnlrQZ-B.js → MyBankConnectionsSettingsPage-Cn-dlR5V-B_zrG4ku.js} +1 -1
  109. package/dist/assets/{MyPendingActivationChargeCardListPage-CpaPeIYq-b4lVf6j4.js → MyPendingActivationChargeCardListPage-B3xeafnf-ItSEItx9.js} +1 -1
  110. package/dist/assets/{MyProfileSettingsPage-DLj2PeG9-CmYpnx4K.js → MyProfileSettingsPage-CcyS0ijJ-CPWTUrys.js} +1 -1
  111. package/dist/assets/{NavBarWithPicker-CilKdL1D-CUI5Ot55.js → NavBarWithPicker-C3MsVwsg-CBrULXjZ.js} +1 -1
  112. package/dist/assets/{NavigationArrow-DvGjNVsn-t1BRpFFN.js → NavigationArrow-DSMn_azz-zpYBMo3g.js} +1 -1
  113. package/dist/assets/{NavigationDots-BZNvrGBo-Lo2Iyk3a.js → NavigationDots-BiiEFlFj-zDNVZc4v.js} +1 -1
  114. package/dist/assets/{NewGlobalMerchantPage-D5ESBBO5-D03F13z-.js → NewGlobalMerchantPage-DJ0zT8Xy-DWdOFNFW.js} +1 -1
  115. package/dist/assets/{NoDataChart-D9tQhnyu-CFEwB6jg.js → NoDataChart-O6Mg_gf4-DcekUaqa.js} +1 -1
  116. package/dist/assets/{NoDataTable-8FGbkVty-aqfoH-V1.js → NoDataTable-BgKg_U0s-DNuaeMW7.js} +1 -1
  117. package/dist/assets/{NotFoundPage-D8qvMFgl-BdhhCh3s.js → NotFoundPage-DA6cvlNW-DHFTqUjU.js} +1 -1
  118. package/dist/assets/{NotificationSettingsPage-BSJTBlX6-CxUhyf7Q.js → NotificationSettingsPage-BwqCG-6J-DqpXFIhc.js} +1 -1
  119. package/dist/assets/{NotificationsListConfig-EynMAcn9-BYkKFFfF.js → NotificationsListConfig-DqM-Z8oE-CuDCUFPm.js} +1 -1
  120. package/dist/assets/{NotificationsPage-d4HJEE7S-fSuBY2pQ.js → NotificationsPage-iYF222-C-C2fO1XcZ.js} +1 -1
  121. package/dist/assets/{OpExByVendorPage-CmuEz33W-9eGP2hA8.js → OpExByVendorPage-BwekpbHo-DhL9GePe.js} +1 -1
  122. package/dist/assets/{OverlayContainerPage-Bmu909Fo-Bjkff-6V.js → OverlayContainerPage-Bmu909Fo-Bsb5IMg7.js} +1 -1
  123. package/dist/assets/{PandLWithForecastPage-C7WaIZ8e-CVd9unuB.js → PandLWithForecastPage-B7IxSSMo-DudAcLk6.js} +1 -1
  124. package/dist/assets/{PaymentAccountSetupBillingAddressSection-B3m8zs_b-BX8-54k0.js → PaymentAccountSetupBillingAddressSection-CJk4EUwr-D0h0XeO4.js} +1 -1
  125. package/dist/assets/{PeoplePage-BN8tiBew-DktNBsvw.js → PeoplePage-97Qe6dqr-B3BHOXBh.js} +1 -1
  126. package/dist/assets/{PortfolioAllocationFormPage-BD1u1-Or-_9hkXIsm.js → PortfolioAllocationFormPage-Df2lZK30-CgKreoEg.js} +1 -1
  127. package/dist/assets/{PortfolioDetails-fLO6-kOh-DqBirAUP.js → PortfolioDetails-CGVqC5q--BeoFkSLS.js} +1 -1
  128. package/dist/assets/{ProductsCarousel-RHO5BWU--CKeK3hr3.js → ProductsCarousel-DqvLLayZ-DeMZpSQB.js} +1 -1
  129. package/dist/assets/{PromoBaseCards-Bm6GGzhn-NcCsm_GX.js → PromoBaseCards-Bq-mwvkh-DjLYfAja.js} +1 -1
  130. package/dist/assets/{QBOConnectionDialog-Dp_Zkpup-Bj92J1hC.js → QBOConnectionDialog-DWZd5o0q-uzGQQJYB.js} +1 -1
  131. package/dist/assets/{QBOSetupSection-C1hBKDG3-DuCsXQ2D.js → QBOSetupSection-B_V2Y6DW-SjwVzAFH.js} +1 -1
  132. package/dist/assets/{ReimbursementApprovalRuleDetailPage-DFUyL8tS-Cdi6rK0Z.js → ReimbursementApprovalRuleDetailPage-hWUoXT59-C-Kz7IOK.js} +1 -1
  133. package/dist/assets/{ReimbursementApprovalRulesPage-CGb7oMjB-Dy2cQd1k.js → ReimbursementApprovalRulesPage-C20mPnJH-UI1oZkMb.js} +1 -1
  134. package/dist/assets/{ReimbursementDetailPage-ByD43ffh-DbazdLJO.js → ReimbursementDetailPage-DAVdVUp0-C07knSwN.js} +1 -1
  135. package/dist/assets/{ReimbursementPromoPage-CPFAYaW8-BD2qUwGu.js → ReimbursementPromoPage-TKdLARUD-CCC9lI90.js} +1 -1
  136. package/dist/assets/{ReimbursementSetUpPage-B_jUtf6N-BFBLA9Wl.js → ReimbursementSetUpPage-CW10ZPs7-CoVdJvFs.js} +1 -1
  137. package/dist/assets/{ReimbursementsBulkReviewDrawerPage-DU-QA2n3-B6KRALO7.js → ReimbursementsBulkReviewDrawerPage-_rgixsBG-1ORB6LSI.js} +1 -1
  138. package/dist/assets/{ReloadCard-HsDGbgTn-CogYt9k2.js → ReloadCard-Bzt6gIzi-DStfhNjw.js} +1 -1
  139. package/dist/assets/{ReportTableViewSelector-BzFUam8T-BhaKwC2u.js → ReportTableViewSelector-CPc3yRAI-rxPTNVbQ.js} +1 -1
  140. package/dist/assets/{ReportsPage-MQSNDA98-BzJpYpJ_.js → ReportsPage-DIHjl3Xd-DvAuC-5b.js} +1 -1
  141. package/dist/assets/{RevenueChart-BzYEiXeP-CqwHafPG.js → RevenueChart-MkoD0EoE-Da8rUny4.js} +1 -1
  142. package/dist/assets/{ReviewDetailsPage-w2tTvIFQ-Cs9m1WmD.js → ReviewDetailsPage-B96vIWt9-DkFTWrbI.js} +1 -1
  143. package/dist/assets/{ReviewOverlay-DbYrvPld-DqEZFPx8.js → ReviewOverlay-CKOAcLzJ-JwWyu_Z9.js} +1 -1
  144. package/dist/assets/{RoleWithToolTip-B_Ivheco-CS2u-SUl.js → RoleWithToolTip-BiydziFE-Q-xg-fVJ.js} +1 -1
  145. package/dist/assets/{ScheduleDetailsFixedAssetsPage-CSiXckiF-1K9HNlY8.js → ScheduleDetailsFixedAssetsPage-Ce2BDLCX-BfoIrqo1.js} +1 -1
  146. package/dist/assets/{ScheduleDetailsPage-BUprw9Sk-DvPPq-1B.js → ScheduleDetailsPage-ClK-ymjD-Bt58f9EO.js} +1 -1
  147. package/dist/assets/{ScheduleSequenceTable-DnIgU9m6-DHuLrlek.js → ScheduleSequenceTable-BOFaTbv5-88y97LwV.js} +1 -1
  148. package/dist/assets/{ScreenRoutes-BUTzMwOP.js → ScreenRoutes-D1x9fjK_.js} +1 -1
  149. package/dist/assets/{SetUpAccountSection-DDxjcjeg-Nsmn_Kay.js → SetUpAccountSection-DPEjJt-s-DbxecFrv.js} +1 -1
  150. package/dist/assets/{SetUpDefaultSection-BSWh5Hvi-BOsknp6D.js → SetUpDefaultSection-Br-a1ECs-Cis1Rx0T.js} +1 -1
  151. package/dist/assets/{SignIn-CImCEnZS-C_paDK6W.js → SignIn-B7p2vrI4-B0gBOkIG.js} +1 -1
  152. package/dist/assets/{SignInScreen-C-BLiTmk.js → SignInScreen-DWtytZ4U.js} +1 -1
  153. package/dist/assets/{SpendManagementListViewPage-B61K65wh-iO25bbcu.js → SpendManagementListViewPage-Ds1WRCNc-BEPVq15t.js} +11 -11
  154. package/dist/assets/SpendManagementPerTabPage-uBi60ESx-GN_GmWoa.js +754 -0
  155. package/dist/assets/{SpendManagementSection-Ddoo9sSg-C6BGVA5R.js → SpendManagementSection-CESND8ho-CRWiaZIA.js} +1 -1
  156. package/dist/assets/{SpendMgmtSetupAccountSection-GjJmiN01-u7mV3Ko6.js → SpendMgmtSetupAccountSection-CiPoUdg_-D55PFMrP.js} +1 -1
  157. package/dist/assets/{StatementItem-D_ctLWr0-BGFGp8G0.js → StatementItem-BSfAH9fl-Bs-0cP-o.js} +1 -1
  158. package/dist/assets/{StatementsPage-D1M95WeY-CfQLlRfA.js → StatementsPage-BQ-wkg9f-CI_Wd3xM.js} +1 -1
  159. package/dist/assets/{StatusSwitcher-ZC7lyTov-CK4-copc.js → StatusSwitcher-CoX1TvcC-BX39ulZO.js} +2 -2
  160. package/dist/assets/{SubTabSwitcher-BNFnbB_T-COPPhMcX.js → SubTabSwitcher-C4Kvmep7-DBYw0ksy.js} +1 -1
  161. package/dist/assets/{SummaryCard-CSo1L2R4-C8XHG3oH.js → SummaryCard-Cdh_w38m-DLTVVQZ4.js} +1 -1
  162. package/dist/assets/{TaskManagementPage-CAcMcS83-Dzo6IaaJ.js → TaskManagementPage-CCiARHPO-CUVWW_h-.js} +1 -1
  163. package/dist/assets/{TimeRangeSwitcher-CNdJhUPl-LVlhLdwC.js → TimeRangeSwitcher-CMNnx0hW-D2iXnh9p.js} +1 -1
  164. package/dist/assets/{TimeframeSwitcher-B7t79hiQ-v3qnXON1.js → TimeframeSwitcher-BAkn3cys-Bpob1MlE.js} +1 -1
  165. package/dist/assets/{TimeframeSwitcherWithToggle-gywVFoaK-Dq8bdSg_.js → TimeframeSwitcherWithToggle-Bp8FBsnD-mJytFc_W.js} +1 -1
  166. package/dist/assets/{TopExCard-D_LHVo5q-CiYt7BMD.js → TopExCard-CH7QX8Xe-DZTLNcIB.js} +1 -1
  167. package/dist/assets/{TopExDetailPage-DuiVBT_3-DpY9bqTT.js → TopExDetailPage-CJuOpApW-CCZjCdMZ.js} +1 -1
  168. package/dist/assets/TransactionDetailPage-280hbOwA-DbVllBjK.js +912 -0
  169. package/dist/assets/{TransactionList-Xd2JupaK-Dyt3TjcD.js → TransactionList-BV18tWaE-vlDng4jw.js} +1 -1
  170. package/dist/assets/{TransactionListBig-CnJaFkxR-DoCpmZbP.js → TransactionListBig-DmVgWxvf-s2_CLDsp.js} +1 -1
  171. package/dist/assets/{TransactionListPage-DJXFQaro-D4RWLZFg.js → TransactionListPage-CE61eqZh-7Ng-Dwo6.js} +1 -1
  172. package/dist/assets/{TransactionVendorDetailPage-Yd_VuyUP-BFDTNSi7.js → TransactionVendorDetailPage-CKRUJzG5-BfxXE0nd.js} +1 -1
  173. package/dist/assets/{TransferDrawerPage-DAQ23FUW-BiZn6wvM.js → TransferDrawerPage-DdIXX8dR-QDp_h_zO.js} +1 -1
  174. package/dist/assets/{TreasuryOverviewPage-D7PkIffG-BqGHTe2l.js → TreasuryOverviewPage-D9NcFBhg-CiLY6I-B.js} +1 -1
  175. package/dist/assets/{TreasuryPromoPage-BjVUBF-M-PIDTDbdn.js → TreasuryPromoPage-BKXMayjO-DOitctTn.js} +1 -1
  176. package/dist/assets/{TreasurySetupPage-CTwhrB6V-BUWRZA3R.js → TreasurySetupPage-Bo24F7wL-DZFA_IDY.js} +1 -1
  177. package/dist/assets/{TreasuryStatementsPage-jvmgqTxl-BXKXw881.js → TreasuryStatementsPage-DUKtmwwf-CPfJrl6T.js} +1 -1
  178. package/dist/assets/{TreasuryTaxLetterPage-CtKw-_Ab-enlCPtr8.js → TreasuryTaxLetterPage-vqThZpY5-h8GfcnUs.js} +1 -1
  179. package/dist/assets/{TreasuryTransferOrReviewPage-HDfVKjSA-0NrqZs7l.js → TreasuryTransferOrReviewPage-1Kqod57a-BftVr2x0.js} +1 -1
  180. package/dist/assets/{TrendChart-BqU6zv7L-DKZM8Asl.js → TrendChart-uCE73Vf8-DAeYNFwV.js} +1 -1
  181. package/dist/assets/{TrendWithTransactions-CbzZEtLk-BWdNScRD.js → TrendWithTransactions-lNYrtUkf-Didi-rkf.js} +1 -1
  182. package/dist/assets/{UncategorizedAccountsMappingPage-BqfWXEzv-DliYz2eG.js → UncategorizedAccountsMappingPage-CbLMkBab-C6ijUMSu.js} +1 -1
  183. package/dist/assets/{UnitIntegrationPage-DOt0PQxi-CfxjJMKV.js → UnitIntegrationPage-DzfchgLS-BhcBVaTd.js} +1 -1
  184. package/dist/assets/{UploadAdditionalDocumentOverlay-DCG_biA8-BJmhb05s.js → UploadAdditionalDocumentOverlay-CJwjYpvy-BM1gvPaq.js} +1 -1
  185. package/dist/assets/{Vendor2FAPopup-AFJ4ji6z-Bm5FuZX1.js → Vendor2FAPopup-BDatjVhv-xckjR8GQ.js} +1 -1
  186. package/dist/assets/{VendorACHDetailsPage-CMZezqhj-vkz7wU-U.js → VendorACHDetailsPage-BTo9s38E-BkO_uBxu.js} +1 -1
  187. package/dist/assets/{VendorDetailPage-iMWNwLtE-C2zNvoxa.js → VendorDetailPage-DOdRZKwE-CiF7RbY2.js} +1 -1
  188. package/dist/assets/{VendorDomesticWireDetailsPage-LLQSi6rq-Cc7eNflp.js → VendorDomesticWireDetailsPage-Ch_HedkY-C-FBXIHe.js} +1 -1
  189. package/dist/assets/{VendorFiling1099EditablePage-BFWuxMl8-C75iU2LR.js → VendorFiling1099EditablePage-ChgTi2cq-bvFFEvbb.js} +1 -1
  190. package/dist/assets/{VendorFirstReviewPage-G_Cr6q5s-D3fFbYJs.js → VendorFirstReviewPage-C_HBOo29-ChTUQzmE.js} +1 -1
  191. package/dist/assets/{VendorInternationalWireDetailsPage-DReuPGpX-yLpvmkH9.js → VendorInternationalWireDetailsPage-Ct42LbtQ-XCBxG3kr.js} +1 -1
  192. package/dist/assets/{VendorInternationalWireSwiftDetailsPage-CmAzQ-7v-C0MV63fk.js → VendorInternationalWireSwiftDetailsPage-CalHOqYH-BbZmA4Jh.js} +1 -1
  193. package/dist/assets/{VendorsAccountsSection-Cjwpb7Ej-Dbu7JZ5x.js → VendorsAccountsSection-Briqd_pt-DRwMIKOs.js} +1 -1
  194. package/dist/assets/{VerifyDevice-CvJ2zJdk-Daj-imTj.js → VerifyDevice-DxP4a4YR-WzF7jf1V.js} +1 -1
  195. package/dist/assets/{VideoPlayer-9UKbocWs-D6ldVshR.js → VideoPlayer-DqRss8fV-CPfVjMmq.js} +1 -1
  196. package/dist/assets/{VideoPopup-DfQxE-EQ-C_Goo9ju.js → VideoPopup-CwEiOVHQ-BFbb_zgA.js} +1 -1
  197. package/dist/assets/{WarningsDrawerPage-2QsB6DYE-BNokYOvg.js → WarningsDrawerPage-Cdd0mag5-jaWJbGg5.js} +1 -1
  198. package/dist/assets/{ZeniAccountDetailPage-gFXGgRzS-iXevsl83.js → ZeniAccountDetailPage-5sn9Wphj-DKdbO4Vy.js} +1 -1
  199. package/dist/assets/{ZeniAccountListViewPage-Daboqhbe-H893CIj9.js → ZeniAccountListViewPage-BLCYWphf-M5fLX64J.js} +1 -1
  200. package/dist/assets/{ZeniAccountNavBarPieces-DhpbtWHu-UFQA7PsK.js → ZeniAccountNavBarPieces-Cwo5QtoT-D1SMOFic.js} +1 -1
  201. package/dist/assets/{ZeniAccountPromoPage-Df5MahOc-Duh5-gql.js → ZeniAccountPromoPage-CKQOu6Ab-CpoFwUjo.js} +1 -1
  202. package/dist/assets/{ZeniAccountSetupPage-DLlRCOCj-BdXC0xKV.js → ZeniAccountSetupPage-BW1l7qJf-Bv0SVArc.js} +1 -1
  203. package/dist/assets/{ZeniCopyright-D-Z193Re-Bvi63P7L.js → ZeniCopyright-B6fSw5kZ-CRgQ6kVa.js} +1 -1
  204. package/dist/assets/{ZeniTransferAmountSlider-D8dT_-Hq-D83Z4tyt.js → ZeniTransferAmountSlider-DgkjDK9D-CVt2TkCY.js} +1 -1
  205. package/dist/assets/{analyticsHelper-c9SRwhe3-snrr44LY.js → analyticsHelper-BIYs-BU5-BBbQGYqz.js} +1 -1
  206. package/dist/assets/{analyticsHelper-CqRk-xPI.js → analyticsHelper-DzajxkoA.js} +1 -1
  207. package/dist/assets/{chartTypes-C2jC2nzT-Dd9Dm_ev.js → chartTypes-BFc-FQm9-BY56epjm.js} +1 -1
  208. package/dist/assets/{commonDimensions-CtVQ1dPI-DOovbubg.js → commonDimensions-B_ShoU61-B2BQjped.js} +1 -1
  209. package/dist/assets/{detailCommon-BBImn49A-CpSlTw_V.js → detailCommon-CoFrLjgw-BialcQVh.js} +1 -1
  210. package/dist/assets/{downloadPdf-BvdzZp_S-nn1wV9jH.js → downloadPdf-yID9qiGz-Dx8pLF3I.js} +1 -1
  211. package/dist/assets/{index-DxZ9Uw7o.js → index-DVFYvj7P.js} +8 -8
  212. package/dist/assets/{mapLoadingInProgressToTreeNode-CKsE235C-Chr95ITX.js → mapLoadingInProgressToTreeNode-xaG_j34l-D4x68Lia.js} +1 -1
  213. package/dist/assets/{mapSectionWithAcOnlyToTreeNode-D1DheCOl-CKCzpetC.js → mapSectionWithAcOnlyToTreeNode-Cf1Q8iLQ-Ck75U1M4.js} +1 -1
  214. package/dist/assets/{mapSpacerToTreeNode-DkIeEOlL-BXF8YPij.js → mapSpacerToTreeNode-CiLMcagY-091j94NC.js} +1 -1
  215. package/dist/assets/{mapTimeframeBalancesToTreeNode-Vy-w7j2m-CAANn3O8.js → mapTimeframeBalancesToTreeNode-BpcCExFt-gIWGlkbh.js} +1 -1
  216. package/dist/assets/{mapTimeframeBalancesToTreeNode-BhmM7oKt-CuzK25Ny.js → mapTimeframeBalancesToTreeNode-VuMYRsaA-EBj_hl8w.js} +1 -1
  217. package/dist/assets/{mapTimeframeHeaderLoadingInProgressToTreeNode-CGrrLYwc-c_ZMN85O.js → mapTimeframeHeaderLoadingInProgressToTreeNode-Cfz6o8XS-DL8hiZjS.js} +1 -1
  218. package/dist/assets/{toCOABalancesWithID-BdeWiors-CAMQCzY4.js → toCOABalancesWithID-CL2W-2Ks-CpVda8Yv.js} +1 -1
  219. package/dist/assets/{toChartData-BCFss2y_-Y9xIvEBL.js → toChartData-CD4rOlNx-BE4t5CeX.js} +1 -1
  220. package/dist/assets/{treasuryColorHelper-BJcGoSGt-Ho84Gr1_.js → treasuryColorHelper-DHqBe6al-DjRQFofZ.js} +1 -1
  221. package/dist/assets/{uploadAttachment-PMsRrXUz-CsErn5g7.js → uploadAttachment-Bqf6VI3L-BUGZbe1u.js} +1 -1
  222. package/dist/assets/{uploadReceipts-dxsKhm9I-DPzJ4iG4.js → uploadReceipts-dxsKhm9I-ss2G_wQJ.js} +1 -1
  223. package/dist/index.html +1 -1
  224. package/package.json +3 -3
  225. package/dist/assets/CustomerOnboardingContainerPage-BDHp6tYk-FIpE3fG6.js +0 -1
  226. package/dist/assets/ExpenseAutomationPage-BC5qS_i3-B75wBbZR.js +0 -1650
  227. package/dist/assets/SpendManagementPerTabPage-Bxo7BTP3-CTkuSFDU.js +0 -754
  228. package/dist/assets/TransactionDetailPage-BWbWafDA-_L4jc956.js +0 -912
@@ -1,4 +1,4 @@
1
- import{e as On,Y as Fn,u as En,fP as Ln,fQ as Wn,fR as _n,fS as Zn,bJ as Kn,a2 as Un,R as Yn,C as u,j as t,l as L,cM as it,cN as Vn,o as a,cO as Gn,cP as Xn,W as b,cQ as Hn,a0 as Ae,cR as Qn,aX as lt,aK as ot,dt as rt,bV as st,bX as dt,bY as ct,fT as qn,fU as Jn,fV as ea,fW as ta,cW as $,cX as I,cY as A,fX as k,cV as na,v as pt,f as ie,cZ as Rt,c_ as aa,c$ as ia,d0 as la,fY as oa,fZ as ra,a4 as sa,p as mt,bp as Te,f_ as da,f$ as O,q as r,h as ca,by as pa,g0 as ma,a3 as ua,g1 as ya,g2 as ut,d4 as yt,X as ha,cB as ba,bO as xa,am as ga,ao as fa,T as wa,br as zt,g3 as Ta,w as Mt,ac as va,ak as Da,aP as ja,eM as $a,y as Ia}from"./index-DxZ9Uw7o.js";import{b as p,n as i}from"./vendor-rkTZJa59.js";import{_ as Aa}from"./liveblocks-CP09Cz-7.js";import{o as ka,t as Sa}from"./LowBalancePopup-Ig5iJGIg-KnO8OBAh.js";import"./mui-C42whWwM.js";import"./analytics-CcevxdRy.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./crypto-CK3r1iTV.js";const Ca=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"})))),Pa={formTitle:new ha("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:Ba,common:{noText:C,strings:{empty:d},currency:ht,via:Ra,more:za,edit:Ma},spendManagement:{billPay:{billDetails:n,billsByTabs:ke,bulkActions:bt,vendorCreation:xt,insufficientFunds:Nt}},collaboration:{threads:{placeholder:gt,tooltip:ft,title:{comments:Na}}}}=Yn.getLocalizedStrings(),ve=Ba.visual.MMMDCommaYYYYformat,$i=({billDetails:e,currentTenant:g,showApproveRejectBtns:x,isShowDeletedBillsEnabled:Z,signedInUser:le,isAdmin:Ot,isRealTimeApprovalEnabled:Ft,isInternationalPaymentShaVsOurEnabled:Et,hasZeniAssistAccess:Lt,analytics:z,showMarkAsPaidButtonToCreator:K,showMarkAsPaidButtonToApprover:Wt,isBillPayCommentingEnabled:Se,isZeniUser:_t,showBackButton:Ce=!0,isDetectInsufficientFundsEnabled:Zt,redirectToEditableBillScreen:Kt,redirectToBillsScreen:X,discardBillDetailsFromLocalStore:Pe,deleteBill:Ut,cancelAndDeleteBill:Be,approveOrRejectBill:Re,onAddNewRule:Yt,onAttachmentClick:ze,saveBillDetails:Vt,discardOutsideZeniPaymentData:Gt,onBackClick:Me,updateEditRealTimeApproverClicked:Xt,onSaveRealTimeApprovals:Ht,onRetryPaymentClick:Qt,onRefundPaymentClick:qt})=>{const l=On(),o=Fn(),Ne=En(),[Jt,U]=p.useState(!1),[Oe,oe]=p.useState(!1),[re,se]=p.useState(!1),[Fe,de]=p.useState(!1),[en,ce]=p.useState(!1),[Ee,H]=p.useState(!1),h=e.transactionDetails?.id,tn=_t?Ln:Wn,{requestToOpenThread:pe,setRequestToOpenThread:Le,setOpenThread:Q}=p.useContext(tn),[nn,Y]=p.useState(!1),w={application:"dashboard",companyId:o.currentTenant?.companyId,tab:"bill",entityId:h,isGlobalComment:!1},{threads:V,isLoading:P}=_n(w,"both",!1),f=Se&&h!=null,We=p.useMemo(()=>h==null?[]:V.filter(c=>c.resolved===!1&&!c.id.includes(Zn)),[V,h]).length,T=`dashboard_${o.currentTenant?.companyId}`,an=p.useCallback((c,y)=>{Q(y),Y(!1)},[Q,Y]);p.useEffect(()=>{pe?.threadId!=null&&V.length>0&&!P&&(Q(pe.threadId),Le(null))},[pe,V,P,Q,Le]),Kn({componentName:"bill.details"});const[N,q]=p.useState({title:"",description:"",primaryButtonText:"",secondaryButtonText:""}),[_e,Ze]=p.useState("approved"),[ln,Ke]=p.useState(!1),[on,Ue]=p.useState(!1),[Ye,Ve]=p.useState(!1),Ge=()=>Ke(!1),rn=()=>Ke(!0),Xe=Un(e.zeniAssist?.refundStatus.fetchState),J=p.useCallback(()=>{X()},[X]);p.useEffect(()=>{(e.deleteStatus.fetchState==="Completed"||e.approvalUpdateStatus.fetchState==="Completed"||e.cancelAndDeleteStatus.fetchState==="Completed"||e.billSaveStatus==="Completed")&&(Pe(),X())},[e,X,Pe]),p.useEffect(()=>{Xe==="In-Progress"&&(e.zeniAssist?.refundStatus.fetchState==="Completed"||e.zeniAssist?.refundStatus.fetchState==="Error")&&(se(!1),J())},[Xe,e.zeniAssist?.refundStatus,J]);const v=e.transactionDetails?.billPayInfo.stage,ee=e.transactionDetails?.billPayInfo.billStatus,G=e.transactionDetails?.billPayInfo.billPaymentStatus,sn=e.transactionDetails?.billPayInfo.billPaymentRefundStatus,me=v?.code==="paid",D=me?v:ee?.code=="approved"&&G?.code?G:ee,S=Oa(D,e.transactionDetails),F=e.transactionDetails?.billPayInfo.isRefundInitiated===!0?sn:G?.code!=null&&(ee?.code=="approved"||G.code==="mark_as_paid")?G:ee,ue=e.transactionDetails?.vendor?.name,M=e.isRecurring,He=()=>{e.transactionDetails?.id!=null&&Kt(e.transactionDetails?.id??"")},dn=()=>{q({title:M?n.recurringBill.deleteRecurringTitle:n.deleteBillTitle,description:M?n.recurringBill.deleteRecurringAlertText:n.deleteAlertDescription,primaryButtonText:n.delete,secondaryButtonText:n.cancel}),U(!0)},cn=()=>{q({title:n.cancelBillTitle,description:n.cancelAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),U(!0)},pn=()=>{q({title:M?n.recurringBill.cancelAndDeleteRecurringTitle:n.cancelAndDeleteBillTitle,description:M?n.recurringBill.cancelAndDeleteRecurringAlertText:n.cancelAndDeleteAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),U(!0)},mn=()=>{z.trackRefundClick(D?.code??"",v?.code??"",F?.description??"",M?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),q({title:n.zeniAssist.refundTitle,description:n.zeniAssist.refundDescription,primaryButtonText:n.zeniAssist.proceed,secondaryButtonText:n.cancel}),se(!0)},un={onOkClick:()=>{U(!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&&(z.trackRefundConfirmClick(D?.code??"",v?.code??"",F?.description??"",M?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),qt())},onCancelClick:()=>{U(!1),se(!1)}},yn={onOkClick:c=>{ce(!1),Re({billId:e.transactionDetails?.id??"",type:"rejected",description:c})},onCancelClick:()=>{ce(!1)}},hn=()=>{const[c]=va("ZeniAssist");return c!=null?t.jsx(Da,{"data-testid":b("bill-details-zeni-assist-icon",h),onClick:()=>{de(!Fe),z.trackZeniAssistClick(D?.code??"",v?.code??"",F?.description??"",M?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"")},style:{width:`${a.sp5}`,height:`${a.sp5}`,marginBottom:`${a.sp2}`},animationData:c,loop:!0,play:!0,rendererSettings:{preserveAspectRatio:"xMidYMid slice"}}):null},te={invoiceNumber:e.transactionDetails?.documentId??"",invoiceDate:e.transactionDetails?.date,billDueDate:e.transactionDetails?.dueDate,memo:e.transactionDetails?.memo,currencyCode:e.vendorCurrency??ht.currencyCode},ye=e.transactionDetails?.lines?.map((c,y)=>{const B=c;return{lineIndex:y,lineId:B.id,account:B.account,class:B.class,amount:B.amount.amount,billable:B.billable,customer:B.customer,lineDescription:B.lineDescription,recipientAmount:B.recipientAmount?.amount}})??[],bn=e.transactionDetails?.recipientTotalAmount.amount??0,he=e.transactionDetails?.recipientTotalAmount,s={paymentType:e.paymentMethodType,paymentDate:e.transactionDetails?.billPayInfo.paymentDate,internationalTransferFeeBearerPaymentMethod:e.transactionDetails?.billPayInfo.internationalTransferFeeBearerPaymentMethod,paymentToBankAccount:e.bankAccount,paymentToPI:e.paymentInstrument},j=m.labelWidth.value(l),xn=c=>c==="billable"||c==="has_been_billed"?n.yes:n.no,gn=s.paymentToBankAccount?.bankAccountNumber?s.paymentToBankAccount?.bankAccountNumber?.slice(s.paymentToBankAccount?.bankAccountNumber?.length-4):s.paymentType?.method?.includes("international")&&s.paymentToBankAccount?.bankAccountIban?s.paymentToBankAccount?.bankAccountIban?.slice(s.paymentToBankAccount?.bankAccountIban.length-4):"",fn=s.paymentToBankAccount?.bankAccountName!=null&&s.paymentToBankAccount?.bankAccountName!=""?s.paymentToBankAccount?.bankAccountName:`${e.transactionDetails?.vendor?.name} - ${s.paymentToBankAccount?.bankName} XXXX${gn}`,wn=e.transactionDetails?.billPayInfo?.isCollectToAccountInfoFromVendorContact?t.jsxs(t.Fragment,{children:[`${n.magicLink.collectFrom} ${e.transactionDetails?.billPayInfo?.toAccountVendorEmail}`,t.jsx(pi,{windowSize:l,children:t.jsx(ci,{})})]}):void 0,Qe=e.transactionDetails?.date!=null&&e.transactionDetails.bookCloseDate!=null&&e.transactionDetails.date.isBefore(e.transactionDetails.bookCloseDate),Tn=()=>`${xt.achDetails.bankRoutingNumber} ${s?.paymentToBankAccount?.bankRoutingNumberAch}, ${s?.paymentToBankAccount?.bankName}
1
+ import{e as On,Y as Fn,u as En,fP as Ln,fQ as Wn,fR as _n,fS as Zn,bJ as Kn,a2 as Un,R as Yn,C as u,j as t,l as L,cM as it,cN as Vn,o as a,cO as Gn,cP as Xn,W as b,cQ as Hn,a0 as Ae,cR as Qn,aX as lt,aK as ot,dt as rt,bV as st,bX as dt,bY as ct,fT as qn,fU as Jn,fV as ea,fW as ta,cW as $,cX as I,cY as A,fX as k,cV as na,v as pt,f as ie,cZ as Rt,c_ as aa,c$ as ia,d0 as la,fY as oa,fZ as ra,a4 as sa,p as mt,bp as Te,f_ as da,f$ as O,q as r,h as ca,by as pa,g0 as ma,a3 as ua,g1 as ya,g2 as ut,d4 as yt,X as ha,cB as ba,bO as xa,am as ga,ao as fa,T as wa,br as zt,g3 as Ta,w as Mt,ac as va,ak as Da,aP as ja,eM as $a,y as Ia}from"./index-DVFYvj7P.js";import{b as p,n as i}from"./vendor-rkTZJa59.js";import{_ as Aa}from"./liveblocks-CP09Cz-7.js";import{o as ka,t as Sa}from"./LowBalancePopup-BhLxnyK0-BxHV5E9i.js";import"./mui-C42whWwM.js";import"./analytics-CcevxdRy.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./crypto-CK3r1iTV.js";const Ca=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"})))),Pa={formTitle:new ha("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:Ba,common:{noText:C,strings:{empty:d},currency:ht,via:Ra,more:za,edit:Ma},spendManagement:{billPay:{billDetails:n,billsByTabs:ke,bulkActions:bt,vendorCreation:xt,insufficientFunds:Nt}},collaboration:{threads:{placeholder:gt,tooltip:ft,title:{comments:Na}}}}=Yn.getLocalizedStrings(),ve=Ba.visual.MMMDCommaYYYYformat,$i=({billDetails:e,currentTenant:g,showApproveRejectBtns:x,isShowDeletedBillsEnabled:Z,signedInUser:le,isAdmin:Ot,isRealTimeApprovalEnabled:Ft,isInternationalPaymentShaVsOurEnabled:Et,hasZeniAssistAccess:Lt,analytics:z,showMarkAsPaidButtonToCreator:K,showMarkAsPaidButtonToApprover:Wt,isBillPayCommentingEnabled:Se,isZeniUser:_t,showBackButton:Ce=!0,isDetectInsufficientFundsEnabled:Zt,redirectToEditableBillScreen:Kt,redirectToBillsScreen:X,discardBillDetailsFromLocalStore:Pe,deleteBill:Ut,cancelAndDeleteBill:Be,approveOrRejectBill:Re,onAddNewRule:Yt,onAttachmentClick:ze,saveBillDetails:Vt,discardOutsideZeniPaymentData:Gt,onBackClick:Me,updateEditRealTimeApproverClicked:Xt,onSaveRealTimeApprovals:Ht,onRetryPaymentClick:Qt,onRefundPaymentClick:qt})=>{const l=On(),o=Fn(),Ne=En(),[Jt,U]=p.useState(!1),[Oe,oe]=p.useState(!1),[re,se]=p.useState(!1),[Fe,de]=p.useState(!1),[en,ce]=p.useState(!1),[Ee,H]=p.useState(!1),h=e.transactionDetails?.id,tn=_t?Ln:Wn,{requestToOpenThread:pe,setRequestToOpenThread:Le,setOpenThread:Q}=p.useContext(tn),[nn,Y]=p.useState(!1),w={application:"dashboard",companyId:o.currentTenant?.companyId,tab:"bill",entityId:h,isGlobalComment:!1},{threads:V,isLoading:P}=_n(w,"both",!1),f=Se&&h!=null,We=p.useMemo(()=>h==null?[]:V.filter(c=>c.resolved===!1&&!c.id.includes(Zn)),[V,h]).length,T=`dashboard_${o.currentTenant?.companyId}`,an=p.useCallback((c,y)=>{Q(y),Y(!1)},[Q,Y]);p.useEffect(()=>{pe?.threadId!=null&&V.length>0&&!P&&(Q(pe.threadId),Le(null))},[pe,V,P,Q,Le]),Kn({componentName:"bill.details"});const[N,q]=p.useState({title:"",description:"",primaryButtonText:"",secondaryButtonText:""}),[_e,Ze]=p.useState("approved"),[ln,Ke]=p.useState(!1),[on,Ue]=p.useState(!1),[Ye,Ve]=p.useState(!1),Ge=()=>Ke(!1),rn=()=>Ke(!0),Xe=Un(e.zeniAssist?.refundStatus.fetchState),J=p.useCallback(()=>{X()},[X]);p.useEffect(()=>{(e.deleteStatus.fetchState==="Completed"||e.approvalUpdateStatus.fetchState==="Completed"||e.cancelAndDeleteStatus.fetchState==="Completed"||e.billSaveStatus==="Completed")&&(Pe(),X())},[e,X,Pe]),p.useEffect(()=>{Xe==="In-Progress"&&(e.zeniAssist?.refundStatus.fetchState==="Completed"||e.zeniAssist?.refundStatus.fetchState==="Error")&&(se(!1),J())},[Xe,e.zeniAssist?.refundStatus,J]);const v=e.transactionDetails?.billPayInfo.stage,ee=e.transactionDetails?.billPayInfo.billStatus,G=e.transactionDetails?.billPayInfo.billPaymentStatus,sn=e.transactionDetails?.billPayInfo.billPaymentRefundStatus,me=v?.code==="paid",D=me?v:ee?.code=="approved"&&G?.code?G:ee,S=Oa(D,e.transactionDetails),F=e.transactionDetails?.billPayInfo.isRefundInitiated===!0?sn:G?.code!=null&&(ee?.code=="approved"||G.code==="mark_as_paid")?G:ee,ue=e.transactionDetails?.vendor?.name,M=e.isRecurring,He=()=>{e.transactionDetails?.id!=null&&Kt(e.transactionDetails?.id??"")},dn=()=>{q({title:M?n.recurringBill.deleteRecurringTitle:n.deleteBillTitle,description:M?n.recurringBill.deleteRecurringAlertText:n.deleteAlertDescription,primaryButtonText:n.delete,secondaryButtonText:n.cancel}),U(!0)},cn=()=>{q({title:n.cancelBillTitle,description:n.cancelAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),U(!0)},pn=()=>{q({title:M?n.recurringBill.cancelAndDeleteRecurringTitle:n.cancelAndDeleteBillTitle,description:M?n.recurringBill.cancelAndDeleteRecurringAlertText:n.cancelAndDeleteAlertDescription,primaryButtonText:n.yes,secondaryButtonText:n.no}),U(!0)},mn=()=>{z.trackRefundClick(D?.code??"",v?.code??"",F?.description??"",M?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),q({title:n.zeniAssist.refundTitle,description:n.zeniAssist.refundDescription,primaryButtonText:n.zeniAssist.proceed,secondaryButtonText:n.cancel}),se(!0)},un={onOkClick:()=>{U(!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&&(z.trackRefundConfirmClick(D?.code??"",v?.code??"",F?.description??"",M?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),qt())},onCancelClick:()=>{U(!1),se(!1)}},yn={onOkClick:c=>{ce(!1),Re({billId:e.transactionDetails?.id??"",type:"rejected",description:c})},onCancelClick:()=>{ce(!1)}},hn=()=>{const[c]=va("ZeniAssist");return c!=null?t.jsx(Da,{"data-testid":b("bill-details-zeni-assist-icon",h),onClick:()=>{de(!Fe),z.trackZeniAssistClick(D?.code??"",v?.code??"",F?.description??"",M?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"")},style:{width:`${a.sp5}`,height:`${a.sp5}`,marginBottom:`${a.sp2}`},animationData:c,loop:!0,play:!0,rendererSettings:{preserveAspectRatio:"xMidYMid slice"}}):null},te={invoiceNumber:e.transactionDetails?.documentId??"",invoiceDate:e.transactionDetails?.date,billDueDate:e.transactionDetails?.dueDate,memo:e.transactionDetails?.memo,currencyCode:e.vendorCurrency??ht.currencyCode},ye=e.transactionDetails?.lines?.map((c,y)=>{const B=c;return{lineIndex:y,lineId:B.id,account:B.account,class:B.class,amount:B.amount.amount,billable:B.billable,customer:B.customer,lineDescription:B.lineDescription,recipientAmount:B.recipientAmount?.amount}})??[],bn=e.transactionDetails?.recipientTotalAmount.amount??0,he=e.transactionDetails?.recipientTotalAmount,s={paymentType:e.paymentMethodType,paymentDate:e.transactionDetails?.billPayInfo.paymentDate,internationalTransferFeeBearerPaymentMethod:e.transactionDetails?.billPayInfo.internationalTransferFeeBearerPaymentMethod,paymentToBankAccount:e.bankAccount,paymentToPI:e.paymentInstrument},j=m.labelWidth.value(l),xn=c=>c==="billable"||c==="has_been_billed"?n.yes:n.no,gn=s.paymentToBankAccount?.bankAccountNumber?s.paymentToBankAccount?.bankAccountNumber?.slice(s.paymentToBankAccount?.bankAccountNumber?.length-4):s.paymentType?.method?.includes("international")&&s.paymentToBankAccount?.bankAccountIban?s.paymentToBankAccount?.bankAccountIban?.slice(s.paymentToBankAccount?.bankAccountIban.length-4):"",fn=s.paymentToBankAccount?.bankAccountName!=null&&s.paymentToBankAccount?.bankAccountName!=""?s.paymentToBankAccount?.bankAccountName:`${e.transactionDetails?.vendor?.name} - ${s.paymentToBankAccount?.bankName} XXXX${gn}`,wn=e.transactionDetails?.billPayInfo?.isCollectToAccountInfoFromVendorContact?t.jsxs(t.Fragment,{children:[`${n.magicLink.collectFrom} ${e.transactionDetails?.billPayInfo?.toAccountVendorEmail}`,t.jsx(pi,{windowSize:l,children:t.jsx(ci,{})})]}):void 0,Qe=e.transactionDetails?.date!=null&&e.transactionDetails.bookCloseDate!=null&&e.transactionDetails.date.isBefore(e.transactionDetails.bookCloseDate),Tn=()=>`${xt.achDetails.bankRoutingNumber} ${s?.paymentToBankAccount?.bankRoutingNumberAch}, ${s?.paymentToBankAccount?.bankName}
2
2
  ${xt.achDetails.bankAccountNumber} ${s?.paymentToBankAccount?.bankAccountNumber}`,ne=e.transactionDetails?.billPayInfo!=null?L.getActualPaymentDate(e.transactionDetails?.billPayInfo):void 0,vn=ne!=null&&e.paymentMethodType?.maxPeriod?.value!=null?L.zeniDate(L.getNextNthWorkingDay(ne?.toDate(),[0,6],e.paymentMethodType?.maxPeriod.value).toDateString()):void 0,qe=e.transactionDetails?.billPayInfo.expectedDepositDate??vn,Je=it(s?.paymentType?.method??"").replace("Same Day",""),Dn=(s?.paymentToBankAccount!=null||s?.paymentToPI)!=null?n.addedByZeni:e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact?t.jsx(Vn,{paymentTypeLabel:Je,onClick:rn,style:{marginTop:`${l==="small"?a.sp2:a.sp0}`}}):void 0,jn=()=>s?.paymentToBankAccount==null&&s?.paymentToPI==null&&s?.paymentType?.method!=null&&e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact&&e.transactionDetails?.billPayInfo.paymentDate!=null?t.jsx(Ta,{paymentType:s?.paymentType?.method,paymentDate:e.transactionDetails?.billPayInfo.paymentDate}):null,$n=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||(v?.code==="scheduled"||v?.code==="pending_approval")&&$n),xe=e.zeniAssist?.isEligibleForRetryIBT===!0||e.zeniAssist?.isEligibleForRetryOBP===!0,ge=e.zeniAssist?.isEligibleForRefund===!0,In=e?.transactionDetails?.billPayInfo.billPaymentMethodType.code==="wire"&&e?.transactionDetails?.billPayInfo.billPaymentMethodType.subCode==="international",An=Lt&&e.transactionDetails?.billPayInfo.billPaymentStatus.code!=null&&["failed","cancelled","returned"].includes(e.transactionDetails.billPayInfo.billPaymentStatus.code)&&(xe||ge)&&In===!1,fe=xe||ge,kn=e.transactionDetails?.billPayInfo.isRefundInitiated===!0&&e.transactionDetails?.billPayInfo.isRefundComplete===!1,we=D?.code,Sn=!kn&&(!Qe||D?.code==="processing"&&!M),Cn=!Qe,et=["small","medium-compact","medium-regular"].includes(l),ae=L.isBulkProcessing(e.transactionDetails?.bulkProcessingDetail?.type),E=L.isPaymentMethodOutsideZeni(e.paymentMethodType?.method),Pn=c=>{z.trackBillPayMarkAsPaidSubmit(c.paymentMode??"other",v?.code??"",D?.code??""),Vt(!0,Ye,c)},tt=()=>{Ue(!0),z.trackBillPayMarkAsPaid(v?.code??"",D?.code??"")},Bn=()=>{Ve(!0),tt()},Rn=()=>{Gt(),Ue(!1),Ye&&Ve(!1)},zn=p.useMemo(()=>({companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,entityType:"bill.details",entityId:h??d,isGlobalComment:!1,application:"dashboard",tab:"bill",url:window.location.href}),[o.currentTenant,h]),W=Zt&&e.transactionDetails?.totalAmountWithFeesInUSD!=null&&v?.code!=="paid"&&D?.code!=="failed"&&D?.code!=="processing"&&D?.code!=="cancelled"&&D?.code!=="returned"&&D?.code!=="rejected"?Gn(e.transactionDetails?.totalAmountWithFeesInUSD,e.withdrawFrom,s.paymentDate):void 0,nt=()=>{Ze("approved"),Ee===!0&&H(!1),W!=null&&z.trackLowBalanceAccountApprove(v?.code??"",e.transactionDetails?.billPayInfo.billPaymentStatus.code??"",e.isRecurring?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"",yt(o.loggedInUser),e.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account"),Re({billId:e.transactionDetails?.id??"",type:"approved"})},Mn=()=>{Ze("rejected"),W!=null&&z.trackLowBalanceAccountReject(v?.code??"",e.transactionDetails?.billPayInfo.billPaymentStatus.code??"",e.isRecurring?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??"",yt(o.loggedInUser),e.withdrawFrom?.accType==="depositAccount"?"ZA":"External Account"),ce(!0)},at=p.useRef(null);return t.jsxs(Qa,{windowSize:l,ref:at,children:[t.jsx(Xn,{anchor:"right",open:ln,onClose:Ge,transitionDuration:250,"data-testid":b("vendor-email-preview-drawer"),children:t.jsx(Hn,{companyName:Qn(g.company?.companyInfo),vendor:e.transactionDetails?.vendor?.name,paymentDate:s.paymentDate?.format(ve)??"",paymentType:Je,amount:Ae("0,0.[00]",he),isInvoiceAttached:!!e.transactionDetails?.attachments?.length,onClose:Ge})}),t.jsxs(ti,{windowSize:l,children:[t.jsx(yi,{windowSize:l,children:l==="small"?t.jsx(lt,{"data-testid":b("bill-detail-nav-bar-mobile"),title:t.jsxs(t.Fragment,{children:[ue,e.isRecurring?t.jsx(Ie,{width:a.sp4,height:a.sp4}):null]}),backgroundColor:Ne.colors.grey4,rightSideComponent:t.jsxs($t,{windowSize:l,children:[f?t.jsxs(Pt,{isDisabled:P,"data-testid":b("bill-comment-button"),onClick:P?()=>null:c=>{c.preventDefault(),c.stopPropagation(),Y(!0),z.trackCommentActivity("bill","clicked",o.currentTenant?.companyName??"",o.controllersList.controllers.map(y=>rt(y)),void 0,void 0,"page icon")},children:[t.jsx(ot,{count:P?void 0:We,isLoading:P,style:{left:"12px"}}),t.jsx(Bt,{})]}):null,t.jsx(It,{onClick:()=>J(),"data-testid":b("bill-detail-nav-bar-small-close-button"),children:t.jsx(jt,{})})]}),leftSideComponent:t.jsx(Dt,{windowSize:l,onClick:Me,"data-testid":b("bill-detail-nav-bar-small-back-button"),style:{visibility:`${Ce?"visible":"hidden"}`},children:t.jsx(vt,{})}),source:"BillDetailPage"}):t.jsx(lt,{"data-testid":b("bill-detail-nav-bar"),title:t.jsxs(t.Fragment,{children:[ue,e.isRecurring?t.jsx(Ie,{width:a.sp4,height:a.sp4}):null]}),rightSideComponent:t.jsxs($t,{windowSize:l,children:[f?t.jsxs(Pt,{isDisabled:P,"data-testid":b("bill-comment-button"),onClick:P?()=>null:c=>{c.preventDefault(),c.stopPropagation(),Y(!0),z.trackCommentActivity("bill","clicked",o.currentTenant?.companyName??"",o.controllersList.controllers.map(y=>rt(y)),void 0,void 0,"page icon")},children:[t.jsx(ot,{count:P?void 0:We,isLoading:P,style:{left:"12px"}}),t.jsx(Bt,{})]}):null,t.jsx(It,{onClick:()=>J(),"data-testid":b("bill-detail-nav-bar-close-button"),children:t.jsx(jt,{})})]}),leftSideComponent:t.jsx(Dt,{windowSize:l,onClick:Me,"data-testid":b("bill-detail-nav-bar-back-button"),style:{visibility:`${Ce?"visible":"hidden"}`},children:t.jsx(vt,{})}),enableTitleOnScroll:!0,scrollableContent:at,source:"BillDetailPage"})}),t.jsxs(ni,{windowSize:l,children:[Ee?t.jsx(ka,{withdrawFrom:e.withdrawFrom,paymentDate:e?.transactionDetails?.billPayInfo.paymentDate,onOkClick:nt,onCancelClick:()=>{H(!1),He()},onClickAway:()=>{H(!1)}}):null,on?t.jsx(Sa,{onCancel:Rn,onProceedForMarkAsPaid:Pn,saveDetailsFetchState:e.billSaveStatus,paymentData:e.outsideZeniPaymentInfo}):null,Jt||re?t.jsx(st,{titleComponent:t.jsx(ct,{children:N.title}),descriptionComponent:t.jsx(dt,{children:N.description}),primaryButtonText:N.primaryButtonText,proceedButtonVariant:re?"primary":"danger",secondaryButtonText:N.secondaryButtonText,action:un,isEditPopup:!0,isLoading:e.zeniAssist?.refundStatus.fetchState==="In-Progress",children:re?Fa(l,e):null}):null,en?t.jsx(st,{titleComponent:t.jsx(ct,{children:n.rejectBillTitlePrefix+" "+(e.transactionDetails?.vendor?.name!=null?e.transactionDetails.vendor.name:"")}),descriptionComponent:t.jsx(dt,{children:n.rejectBillDescription}),primaryButtonText:n.send,secondaryButtonText:n.cancel,action:yn,isEditPopup:!0,isNotesIncluded:!0,notesPlaceholder:n.rejectBillReasonPlaceholder}):null,l!=="small"||S?t.jsxs(ii,{windowSize:l,children:[l!=="small"?t.jsxs(li,{windowSize:l,children:[ue,e.isRecurring?t.jsx(Ie,{height:a.sp5,width:a.sp5}):null]}):null,Z&&S!=null&&S.code==="deleted"?t.jsx(At,{color:S.color,bgColor:S.bgColor,borderColor:S.borderColor,children:S.value}):S?.value===ke.tabsById.overdue?t.jsx(At,{color:S.color,bgColor:S.bgColor,borderColor:S.borderColor,children:S.value}):null]}):null,F!=null&&F.code?l==="small"?t.jsx(qn,{progressSectionObj:F,createDate:e.transactionDetails?.createTime,paymentDate:qe,scheduleDate:ne,approvedDate:e.latestApprovedDate,isFrozen:e.transactionDetails?.isDeleted}):t.jsx(Jn,{progressSectionObj:F,createDate:e.transactionDetails?.createTime,paymentDate:qe,scheduleDate:ne,approvedDate:e.latestApprovedDate,isFrozen:e.transactionDetails?.isDeleted}):null,Wa(ae,e,W),t.jsx(ea,{sectionId:ta,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(je,{children:[t.jsx($e,{children:n.whatForTitle}),t.jsxs(De,{children:[t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"invoiceNumber"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("invoiceNumber")}`},children:t.jsx(k,{label:{label:n.invoiceNumber,width:j},text:te.invoiceNumber??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"invoiceDate"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("invoiceDate")}`},children:t.jsx(k,{label:{label:n.invoiceDate,width:j},text:te.invoiceDate?.format(ve)??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"billDueDate"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("billDueDate")}`},children:t.jsx(k,{label:{label:n.billDueDate,width:j},text:te.billDueDate?.format(ve)??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"memo"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("memo")}`},children:t.jsx(k,{label:{label:n.memo,width:j},text:te.memo??C,style:{width:"auto"}})})]})]}),t.jsxs(je,{children:[t.jsx(ai,{windowSize:l,children:t.jsx($e,{children:n.lineItemsTitle})}),ye.length>0?ye.map((c,y)=>{const B=e?.transactionDetails?.lines?.find(Nn=>Nn.id===c.lineId)?.recipientAmount;return t.jsxs(qa,{children:[ye.length>1?t.jsx(Ja,{windowSize:l,children:t.jsx(ei,{windowSize:l,children:`${n.line} # ${y+1}`})}):null,t.jsxs(De,{children:[t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.recipientAmount`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("recipientAmount",y)}`},children:t.jsx(k,{label:{label:n.amount,width:j},text:B!=null?Ae("0,0[.]00",B):C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.lineDescription`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("lineDescription",y)}`},children:t.jsx(k,{label:{label:n.description,width:j},text:c.lineDescription??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.account`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("account",y)}`},children:t.jsx(k,{label:{label:n.category,width:j},text:c.account?.accountName??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.class`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("class",y)}`},children:t.jsx(k,{label:{label:n.class,width:j},text:c.class?.className??C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.billable`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("billable",y)}`},children:t.jsx(k,{label:{label:n.billable,width:j},text:c.billable!=null?xn(c.billable):C,style:{width:"auto"}})}),t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:`${y}.customer`}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("customer",y)}`},children:t.jsx(k,{label:{label:n.customer,width:j},text:c.customer?.name??C,style:{width:"auto"}})})]})]},y)}):null]}),t.jsxs(oi,{windowSize:l,children:[t.jsx(ri,{children:n.total}),t.jsx(si,{children:he!=null?t.jsx(na,{amount:he,integerStyles:pt.h6Medium.cssObject,decimalStyles:pt.standardMedium.cssObject}):C})]}),t.jsxs(je,{children:[t.jsx($e,{children:n.paymentDetailsTitle}),t.jsxs(De,{children:[E?null:t.jsxs(t.Fragment,{children:[t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"withdrawFrom"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("withdrawFrom")}`},children:t.jsx(k,{label:{label:n.withdrawFrom,width:j},text:e.withdrawFrom!=null?Rt(e.withdrawFrom,l):d,style:{width:"auto"},additionalInfoLabelStyles:{textAlign:"right",paddingRight:m.infoLabelPaddingRight.valuePx(l),marginTop:m.infoLabelMarginTop.valuePx(l),color:ie.brandColorGoldDark},additionalInfoLabel:W!=null&&v?.code==="pending_approval"?Nt.addMoney:W})}),t.jsx(R,{})]}),t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"paymentType"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("paymentType")}`},children:t.jsx(k,{additionalInfoLabel:s.paymentType?.method!=null&&s.paymentType.method.includes(L.NEW_INTERNATIONAL_METHOD_SUBTEXT)&&Et&&s.internationalTransferFeeBearerPaymentMethod!=null?t.jsx(Za,{children:aa(s.internationalTransferFeeBearerPaymentMethod)}):void 0,label:{label:n.paymentMethod,width:j},text:E&&e.outsideZeniPaymentInfo!=null?La(e.outsideZeniPaymentInfo):it(s.paymentType?.method??""),style:{width:"auto"}})}),E?null:t.jsxs(t.Fragment,{children:[t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"paymentTo"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("paymentTo")}`},children:t.jsxs(t.Fragment,{children:[t.jsx(k,{label:{label:n.paymentTo,width:j},text:s.paymentToBankAccount!=null?fn:s.paymentToPI!=null?s.paymentToPI.displayText:wn,style:{width:"auto"},showEyeIcon:s.paymentToBankAccount!=null&&!!s.paymentType?.method?.includes("ach"),showAdditionalInfoLabel:!!e.transactionDetails?.billPayInfo.isCollectToAccountInfoFromVendorContact||s.paymentType?.method?.includes("ach"),tooltipText:Tn(),additionalInfoLabel:t.jsx(_a,{children:Dn})}),jn()]})})]}),E||e.isRecurring?t.jsxs(t.Fragment,{children:[t.jsx(R,{}),t.jsx($,{isThreadAllowed:f,entityId:h,dashboardTabKey:A({type:"details",key:"recurringPaymentType"}),roomId:T,companyId:o.currentTenant?.companyId??d,companyName:o.currentTenant?.companyName??d,dashboardOptionType:"bill",filterMetaData:{...w,entityType:`bill.details.${I("recurringPaymentType")}`},children:t.jsxs(t.Fragment,{children:[t.jsx(k,{label:{label:n.paymentType,width:j},labelStyles:{marginRight:m.labelMarginRight.valuePx(l)},style:{width:"auto"},text:la(e.isRecurring,E,e.transactionDetails?.recurringBillInstance??1,e.recurringBillConfigDetail?.totalPaymentCycles??0),textStyles:{paddingLeft:m.textPadding.valuePx(l),paddingRight:m.textPadding.valuePx(l)},additionalInfoLabel:ia(l,e.isRecurring,E,e.recurringBillConfigDetail),additionalInfoLabelStyles:{paddingRight:m.paddingRight.valuePx(l),marginTop:m.additionalTextMarginTop.valuePx(l)}}),e.recurringBillInstances!=null&&e.recurringBillInstances.length>0?t.jsx(mi,{style:{paddingLeft:m.recurringSchedulePaddingLeft.valuePx(l)},children:t.jsx(oa,{onAttachmentClick:ze,currencySymbol:e.transactionDetails?.recipientTotalAmount.currencySymbol??ht.currencySymbol,recurringBillInstances:e.recurringBillInstances})}):null]})})]}):null]})]}),e.transactionDetails&&e.transactionDetails.id&&t.jsx(ra,{amount:bn,activities:e.billActivities,stage:v?.code??"draft",onAddNewRule:Yt,entity:"bill_pay",realTimeApproval:{allApprovers:e.filteredApprovers,filteredAttributes:e.filteredAttributes,isRealTimeApproverEditMode:e.realTimeApproval.isEditMode,realTimeApprovalSaveStatus:{fetchState:e.realTimeApproval.fetchState,error:e.realTimeApproval.error},approvalListFetchState:e.approverListFetchState.fetchState,allAccountingClass:e.allAccountingClasses,vendorOwnerId:e.vendorOwnerId??"",isAdmin:Ot,signedInUserId:le?.userId,showRealTimeApproval:Ft,entityApprovalId:e.billActivities[0]?.entityApprovalId??e.transactionDetails.entityApprovalId,updateEditMode:Xt,onSaveRealTimeApprovals:Ht},historicActivities:e.billHistory.activities}),t.jsx(di,{})]}),e.transactionDetails?.vendor!=null&&!me&&!e.transactionDetails.isDeleted?t.jsx(sa,{separatorStyle:{marginRight:a.sp4},showPrimaryButton:K||x,showCancel:!K&&x,cancelBtn:{label:et?n.buttons.reject:n.buttons.rejectBill,isLoading:_e==="rejected"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:Mn,style:{width:m.footerButtonWidth.value(l)},reverseSpinnerColor:!1},primaryBtn:{label:Ea(K,et),isLoading:_e==="approved"&&e.approvalUpdateStatus.fetchState==="In-Progress",onClick:K?tt:()=>{W!=null?H(!0):nt()},isDisabled:e.billSaveStatus==="In-Progress"||e.approvalUpdateStatus.fetchState==="In-Progress"||e.realTimeApproval.isEditMode===!0,style:{width:K?"auto":m.footerButtonWidth.value(l)}},rightSideComponent:t.jsx(Ka,{children:t.jsxs(Ha,{windowSize:l,children:[!ae&&Oe?t.jsx(mt,{onClickAway:()=>{oe(!1),de(!1)},children:t.jsxs(Tt,{windowSize:l,"data-testid":b("bill-actions-container"),children:[we!=="processing"?t.jsx(_,{onClick:dn,"data-testid":b("delete-bill-action-item"),children:n.buttons.deleteBill}):null,we==="processing"&&!M?t.jsx(_,{onClick:cn,"data-testid":b("cancel-bill-action-item"),children:n.buttons.cancel}):null,we==="processing"&&Cn?t.jsx(_,{onClick:pn,"data-testid":b("cancel-and-delete-bill-action-item"),children:n.buttons.cancelAndDelete}):null,x&&E&&Wt?t.jsx(_,{onClick:Bn,"data-testid":b("mark-as-paid-action-item"),children:n.paymentOutsideZeni.markAsPaid}):null]})}):null,Fe?t.jsx(mt,{onClickAway:()=>{oe(!1),de(!1)},children:t.jsxs(Tt,{windowSize:l,"data-testid":b("bill-actions-with-zeni-assist-container"),children:[xe?t.jsx(_,{onClick:()=>{z.trackRetryClick(D?.code??"",v?.code??"",F?.description??"",M?["Recurring"]:["One-Time"],e.transactionDetails?.documentId??""),Qt()},"data-testid":b("retry-bill-action-item"),children:n.buttons.retry}):null,ge?t.jsx(_,{onClick:mn,"data-testid":b("refund-bill-action-item"),children:n.buttons.refund}):null]})}):null,t.jsxs(Xa,{windowSize:l,children:[An===!0?t.jsx(Te,{enterDelay:600,style:{color:ie.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:fe?n.zeniAssist.tooltip:n.zeniAssist.connectToTeamTooltip,placement:"top",maxWidth:"267px",children:t.jsx(wt,{windowSize:l,showEditIcon:be,isIconClickable:fe,"data-testid":b("other-actions-icon-container"),children:fe?t.jsx(hn,{}):t.jsx(Ya,{})})}):null,!ae&&be===!0?t.jsx(Te,{enterDelay:600,style:{color:ie.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:Ma,placement:"top",children:t.jsx(Ga,{onClick:He,"data-testid":b("edit-bill-icon-container"),children:t.jsx(Va,{})})}):null,!ae&&Sn===!0?t.jsx(Te,{enterDelay:600,style:{color:ie.heroDark,padding:`2px ${a.sp2}`},display:"flex",title:za,placement:"top",children:t.jsx(wt,{windowSize:l,showEditIcon:be,isIconClickable:!0,"data-testid":b("more-details-icon-container"),children:t.jsx(Ua,{onClick:()=>oe(!Oe)})})}):null]})]})}),style:{minHeight:62}}):null]}),f?t.jsx(Aa,{id:T,children:t.jsx(da,{isDrawerOpen:nn,allowComposer:!0,drawerTitle:Na,threads:V,filter:w,autoExpand:!0,autoFocus:!1,isLoading:P,textOverrides:{composerPlaceholder:gt.addANewComment,replyComposerPlaceholder:gt.replyAComment,threadResolve:ft.resolveComment,threadUnResolve:ft.unResolveComment},threadMetadata:zn,onThreadClick:an,onCloseAllThreadsDrawer:()=>Y(!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]})},Oa=(e,g)=>{const x=e?.code;if(e!=null&&x!=null)return g?.isDeleted===!0?{value:ke.tabsById.deleted,color:O.deleted.color,bgColor:O.deleted.bgColor,borderColor:O.deleted.borderColor,code:"deleted"}:x==="pending_approval"&&g?.dueDate?.isBefore(L.dateNow(),"date")===!0?{value:ke.tabsById.overdue,color:O.overdue.color,bgColor:O.overdue.bgColor,borderColor:O.overdue.borderColor}:{value:e.name,color:O[x].color,bgColor:O[x].bgColor,borderColor:O[x].borderColor}},Fa=(e,g)=>{const x=g.transactionDetails?.recipientTotalAmount;return t.jsxs(ui,{windowSize:e,children:[t.jsxs(kt,{windowSize:e,children:[t.jsx(St,{children:n.zeniAssist.accountNumber}),t.jsx(Ct,{children:g.withdrawFrom!=null?Rt(g.withdrawFrom,e):d})]}),t.jsxs(kt,{windowSize:e,children:[t.jsx(St,{children:n.zeniAssist.amount}),t.jsx(Ct,{children:x!=null?Ae("0,0[.]00",x):C})]})]})},Ea=(e,g)=>e?n.paymentOutsideZeni.markAsPaid:g?n.buttons.approve:n.buttons.approveBill,La=e=>{const g=e.paymentMode,x=n.paymentOutsideZeni.offline;if(g==null||g==="other")return x;const Z=n.paymentOutsideZeni.paymentModeOptions.find(le=>le.value===g)?.label;return`${x} ${Ra} ${Z}`},Wa=(e,g,x)=>{if(e)return t.jsx(ut,{variant:"warning",style:{marginTop:a.sp5,marginBottom:a.sp3},title:bt.duplicateWarning.title,description:bt.duplicateWarning.description});if(x!=null){const Z=`${g.withdrawFrom?.label??""} ${g.withdrawFrom?.maskedAccountNumber??""}`;return t.jsx(ut,{variant:"low-balance",style:{marginTop:a.sp2,marginBottom:a.sp3},title:`${Nt.lowBalanceIn.replace("__account__",Z)}`,description:x.replace("Low balance! ","")})}else return null},_a=i.div``,Za=i.div``,Ka=i.div`
3
3
  display: flex;
4
4
  justify-content: flex-end;
@@ -1,4 +1,4 @@
1
- import{C as z,q as B,e as O,R,a as M,a2 as W,j as o,U as G,ca as X,aX as Z,F as H,a4 as J,o as c}from"./index-DxZ9Uw7o.js";import{b as D,n as h}from"./vendor-rkTZJa59.js";import{b as K,f as Q,l as L,o as j}from"./FollowStepsSection-DONqc9yn-D0mWYYLp.js";import"./mui-C42whWwM.js";import"./analytics-CcevxdRy.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-CK3r1iTV.js";const C="billPayApprovalRuleDetailPage",T="lowerBound",E="upperBound",y="steps",Y={footerPadding:new z(B[2],B[3])};function ve({localData:e,approvalUpdateActionType:t,onBackClick:l,onApprovalRuleDataUpdated:r,onResetClick:s,isLowerBoundDisabled:n=!1,isUpperBoundDisabled:b=!0,hideUpperBoundField:S=!1,onSaveRuleClick:_,onSaveRuleSuccess:A}){const I=O(),a=R.getLocalizedStrings().commonSetUp.approval,P=R.getLocalizedStrings().spendManagement.billPay.billPayApproval,x=ee(e,t==="approval_create"&&!n),v=M({mode:"all",reValidateMode:"onChange",defaultValues:x}),u=e.billPaySetupApproverViewUpdateData?.updateStatus,w=W(u?.fetchState),{upperBound:$}=x,{allApprovalRules:p,allAccountingClasses:k,billPaySetupApproverViewUpdateData:m}=e;let f=p.length>1?p.length-1:0,g=p.length>0?p[f].criteria[0].range.min.amount:0;if(m!=null&&m.type==="approval_update"&&m.data!=null){const{approvalRuleId:i}=m.data;f=p.findIndex(d=>d.approvalRuleId===i),g=f>0?p[f-1].criteria[0].range.min.amount:0}const F=v.handleSubmit(()=>{_()}),V=async(i,d)=>{r(d)};return D.useEffect(()=>{const i=v.watch((d,{name:U})=>{if(U!=null&&d!=null){const q=G(d);X(()=>V(U,q))}});return()=>{i.unsubscribe()}}),D.useEffect(()=>{w==="In-Progress"&&u?.fetchState==="Completed"&&A()},[w,u?.fetchState,A]),o.jsxs(re,{children:[o.jsx(Z,{title:t==="approval_create"?a.newApproval:a.editApproval,style:{zIndex:4},onBackClick:()=>{l()},source:"BillPayApprovalRuleDetailPage"}),o.jsx(se,{children:o.jsx(H,{...v,children:o.jsx("form",{id:N(C),onSubmit:F,children:o.jsxs(oe,{children:[o.jsx(K,{label:{label:S?P.amountPerBillGreaterLabel:P.amountPerBillLabel},firstText:{type:"number",name:T,placeholder:"$0",options:{required:!0,max:$===1/0?Number.MAX_SAFE_INTEGER-1:$-1,min:g,validate:i=>n?!0:i!=null&&i>g},isDisabled:n,additionalInfoLabel:a.firstRuleLowerBoundInfoLabel,additionalErrorLabel:a.firstRuleErrorInfoLabel},secondText:{type:"number",name:E,placeholder:"Infinity",isDisabled:b,hideField:S,additionalInfoLabel:a.upperBoundInfoLabel}}),o.jsx(ie,{}),o.jsx(Q,{sectionId:y,label:{label:a.followStepsLabel},approversPlaceholder:a.approversPlaceholder,notifiersPlaceholder:a.notifiersPlaceholder,allUserWithRoles:e.allApprovers,filteredApprovers:e.filteredApprovers.map(i=>i.user),allAttributes:e.allAttributes,filteredAttributes:e.filteredAttributes,allAccountingClasses:k,stepsInfo:x[y],userSelectPlaceholder:a.userSelectPlaceholder,approveNotifyPlaceholder:a.approveNotifyPlaceholder,productType:"zeni_bill_pay"})]})})})}),o.jsx(J,{formId:N(C),primaryBtn:{label:a.saveBtnText,isLoading:u?.fetchState==="In-Progress",isDisabled:u?.fetchState==="In-Progress",style:{width:"85px",minWidth:"auto"}},showCancel:!0,cancelBtn:{label:a.cancelBtnText,isLoading:!1,style:{width:"85px",minWidth:"auto"},onClick:s},containerStyle:{justifyContent:I==="small"?"space-between":"center"},style:{padding:Y.footerPadding.valuePx(I)},separatorStyle:{marginRight:c.sp4}})]})}const ee=(e,t)=>{const{criteria:l,steps:r}=e.billPaySetupApproverViewUpdateData?.data??{};return{[y]:le(e.allApprovers.map(s=>s.user),e.filteredApprovers.map(s=>s.user),j(e.allAttributes),j(e.filteredAttributes),r??[])??[],[T]:t?void 0:l!=null?l.range.min.amount??0:0,[E]:l!=null?l.range.max==null?1/0:l.range.max.amount:1/0}},le=(e,t,l,r,s)=>s&&s.length>0?s.map((n,b)=>({stepIndex:b,stepType:{selectedOption:n.action,allOptions:L},actors:{allUsers:t,selectedUsers:ae(e,n.actors),allNonUsers:r,selectedNonUsers:te(l,n.actors)}})):[{stepIndex:0,stepType:{selectedOption:"require_approval",allOptions:L},actors:{allUsers:t,selectedUsers:[],allNonUsers:r,selectedNonUsers:[]}}],ae=(e,t)=>e.filter(l=>l.userId!=null&&t.findIndex(r=>r.userId===l.userId)>-1),te=(e,t)=>e.filter(l=>t.findIndex(r=>r.subType===l.value)>-1),N=e=>`${e}_form`,ge=e=>`${e}`,re=h.div`
1
+ import{C as z,q as B,e as O,R,a as M,a2 as W,j as o,U as G,ca as X,aX as Z,F as H,a4 as J,o as c}from"./index-DVFYvj7P.js";import{b as D,n as h}from"./vendor-rkTZJa59.js";import{b as K,f as Q,l as L,o as j}from"./FollowStepsSection-BqqrsOIP-DBSaHnE2.js";import"./mui-C42whWwM.js";import"./analytics-CcevxdRy.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-CK3r1iTV.js";const C="billPayApprovalRuleDetailPage",T="lowerBound",E="upperBound",y="steps",Y={footerPadding:new z(B[2],B[3])};function ve({localData:e,approvalUpdateActionType:t,onBackClick:l,onApprovalRuleDataUpdated:r,onResetClick:s,isLowerBoundDisabled:n=!1,isUpperBoundDisabled:b=!0,hideUpperBoundField:S=!1,onSaveRuleClick:_,onSaveRuleSuccess:A}){const I=O(),a=R.getLocalizedStrings().commonSetUp.approval,P=R.getLocalizedStrings().spendManagement.billPay.billPayApproval,x=ee(e,t==="approval_create"&&!n),v=M({mode:"all",reValidateMode:"onChange",defaultValues:x}),u=e.billPaySetupApproverViewUpdateData?.updateStatus,w=W(u?.fetchState),{upperBound:$}=x,{allApprovalRules:p,allAccountingClasses:k,billPaySetupApproverViewUpdateData:m}=e;let f=p.length>1?p.length-1:0,g=p.length>0?p[f].criteria[0].range.min.amount:0;if(m!=null&&m.type==="approval_update"&&m.data!=null){const{approvalRuleId:i}=m.data;f=p.findIndex(d=>d.approvalRuleId===i),g=f>0?p[f-1].criteria[0].range.min.amount:0}const F=v.handleSubmit(()=>{_()}),V=async(i,d)=>{r(d)};return D.useEffect(()=>{const i=v.watch((d,{name:U})=>{if(U!=null&&d!=null){const q=G(d);X(()=>V(U,q))}});return()=>{i.unsubscribe()}}),D.useEffect(()=>{w==="In-Progress"&&u?.fetchState==="Completed"&&A()},[w,u?.fetchState,A]),o.jsxs(re,{children:[o.jsx(Z,{title:t==="approval_create"?a.newApproval:a.editApproval,style:{zIndex:4},onBackClick:()=>{l()},source:"BillPayApprovalRuleDetailPage"}),o.jsx(se,{children:o.jsx(H,{...v,children:o.jsx("form",{id:N(C),onSubmit:F,children:o.jsxs(oe,{children:[o.jsx(K,{label:{label:S?P.amountPerBillGreaterLabel:P.amountPerBillLabel},firstText:{type:"number",name:T,placeholder:"$0",options:{required:!0,max:$===1/0?Number.MAX_SAFE_INTEGER-1:$-1,min:g,validate:i=>n?!0:i!=null&&i>g},isDisabled:n,additionalInfoLabel:a.firstRuleLowerBoundInfoLabel,additionalErrorLabel:a.firstRuleErrorInfoLabel},secondText:{type:"number",name:E,placeholder:"Infinity",isDisabled:b,hideField:S,additionalInfoLabel:a.upperBoundInfoLabel}}),o.jsx(ie,{}),o.jsx(Q,{sectionId:y,label:{label:a.followStepsLabel},approversPlaceholder:a.approversPlaceholder,notifiersPlaceholder:a.notifiersPlaceholder,allUserWithRoles:e.allApprovers,filteredApprovers:e.filteredApprovers.map(i=>i.user),allAttributes:e.allAttributes,filteredAttributes:e.filteredAttributes,allAccountingClasses:k,stepsInfo:x[y],userSelectPlaceholder:a.userSelectPlaceholder,approveNotifyPlaceholder:a.approveNotifyPlaceholder,productType:"zeni_bill_pay"})]})})})}),o.jsx(J,{formId:N(C),primaryBtn:{label:a.saveBtnText,isLoading:u?.fetchState==="In-Progress",isDisabled:u?.fetchState==="In-Progress",style:{width:"85px",minWidth:"auto"}},showCancel:!0,cancelBtn:{label:a.cancelBtnText,isLoading:!1,style:{width:"85px",minWidth:"auto"},onClick:s},containerStyle:{justifyContent:I==="small"?"space-between":"center"},style:{padding:Y.footerPadding.valuePx(I)},separatorStyle:{marginRight:c.sp4}})]})}const ee=(e,t)=>{const{criteria:l,steps:r}=e.billPaySetupApproverViewUpdateData?.data??{};return{[y]:le(e.allApprovers.map(s=>s.user),e.filteredApprovers.map(s=>s.user),j(e.allAttributes),j(e.filteredAttributes),r??[])??[],[T]:t?void 0:l!=null?l.range.min.amount??0:0,[E]:l!=null?l.range.max==null?1/0:l.range.max.amount:1/0}},le=(e,t,l,r,s)=>s&&s.length>0?s.map((n,b)=>({stepIndex:b,stepType:{selectedOption:n.action,allOptions:L},actors:{allUsers:t,selectedUsers:ae(e,n.actors),allNonUsers:r,selectedNonUsers:te(l,n.actors)}})):[{stepIndex:0,stepType:{selectedOption:"require_approval",allOptions:L},actors:{allUsers:t,selectedUsers:[],allNonUsers:r,selectedNonUsers:[]}}],ae=(e,t)=>e.filter(l=>l.userId!=null&&t.findIndex(r=>r.userId===l.userId)>-1),te=(e,t)=>e.filter(l=>t.findIndex(r=>r.subType===l.value)>-1),N=e=>`${e}_form`,ge=e=>`${e}`,re=h.div`
2
2
  display: flex;
3
3
  height: 100%;
4
4
  flex-direction: column;
@@ -1,4 +1,4 @@
1
- import{e as I,R as y,j as t,aX as D,m as H,W as b,C as r,y as B,a0 as j,bV as E,bX as G,bY as U,o as i,cx as V,q as l,ao as X,X as z,an as q,f as S,cu as F,aP as Q,v as Y}from"./index-DxZ9Uw7o.js";import{n as o,b as _}from"./vendor-rkTZJa59.js";import"./mui-C42whWwM.js";import"./analytics-CcevxdRy.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-CK3r1iTV.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")},K=({showDeleteBtn:e=!1,isLastSection:f=!1,approvalRule:c,onEditRuleClick:v,onDeleteRuleClick:$})=>{const[m,x]=_.useState(!1),n=I(),{range:h}=c.criteria[0],{steps:u,approvalRuleId:w}=c,a=y.getLocalizedStrings().commonSetUp.approval,W=()=>{x(!0)},A={onOkClick:()=>{x(!1),$?.(w)},onCancelClick:()=>{x(!1)}};return t.jsxs(O,{windowSize:n,isLastSection:f,children:[t.jsxs(Z,{windowSize:n,children:[t.jsxs(se,{children:[t.jsxs(C,{windowSize:n,children:[a.from," ",j("0,0",h.min)]}),t.jsxs(J,{children:[t.jsx(P,{}),t.jsx(ee,{}),t.jsx(P,{})]}),h.max==null?t.jsx(de,{}):t.jsx(C,{windowSize:n,children:j("0,0",{...h.min,amount:h.max.amount})})]}),t.jsxs(ae,{className:"icons",children:[e&&t.jsx(ne,{onClick:W,"data-testid":b("delete-approval-rule-bill-pay",c.approvalRuleId)}),t.jsx(pe,{onClick:()=>{v(w)},"data-testid":b("edit-approval-rule-bill-pay",c.approvalRuleId)})]})]}),t.jsx(te,{windowSize:n,children:t.jsx(oe,{isSingleStep:u.length===1,windowSize:n,children:u.map((d,N)=>t.jsxs(ie,{isSingleStep:u.length===1,className:"stepperItem",windowSize:n,children:[d.action==="require_approval"?t.jsx(re,{children:a.requireText}):t.jsx(le,{children:a.notifyText}),d.nonUserActors!=null&&d.nonUserActors.filter(p=>p.subType!=null).map((p,M)=>t.jsxs(R,{children:[t.jsx(k,{children:p.subType!=null?a.nonUsers[p.subType].label:null}),d.operator!="is"?t.jsx(T,{className:"operator",children:d.operator}):null]},`${p.subType}_${M}`)),d.actors.map(p=>t.jsxs(R,{children:[t.jsxs(k,{children:[p.firstName," ",p.lastName]}),d.operator!="is"?t.jsx(T,{className:"operator",children:d.operator}):null]},p.userId))]},N))})}),m?t.jsx(E,{titleComponent:t.jsx(U,{children:a.deleteApprovalRuleTitle}),descriptionComponent:t.jsx(G,{children:a.deleteApprovalRuleDesc}),primaryButtonText:a.deleteTxt,proceedButtonVariant:"danger",secondaryButtonText:a.cancelBtnText,action:A}):null]})},O=o.div`
1
+ import{e as I,R as y,j as t,aX as D,m as H,W as b,C as r,y as B,a0 as j,bV as E,bX as G,bY as U,o as i,cx as V,q as l,ao as X,X as z,an as q,f as S,cu as F,aP as Q,v as Y}from"./index-DVFYvj7P.js";import{n as o,b as _}from"./vendor-rkTZJa59.js";import"./mui-C42whWwM.js";import"./analytics-CcevxdRy.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-CK3r1iTV.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")},K=({showDeleteBtn:e=!1,isLastSection:f=!1,approvalRule:c,onEditRuleClick:v,onDeleteRuleClick:$})=>{const[m,x]=_.useState(!1),n=I(),{range:h}=c.criteria[0],{steps:u,approvalRuleId:w}=c,a=y.getLocalizedStrings().commonSetUp.approval,W=()=>{x(!0)},A={onOkClick:()=>{x(!1),$?.(w)},onCancelClick:()=>{x(!1)}};return t.jsxs(O,{windowSize:n,isLastSection:f,children:[t.jsxs(Z,{windowSize:n,children:[t.jsxs(se,{children:[t.jsxs(C,{windowSize:n,children:[a.from," ",j("0,0",h.min)]}),t.jsxs(J,{children:[t.jsx(P,{}),t.jsx(ee,{}),t.jsx(P,{})]}),h.max==null?t.jsx(de,{}):t.jsx(C,{windowSize:n,children:j("0,0",{...h.min,amount:h.max.amount})})]}),t.jsxs(ae,{className:"icons",children:[e&&t.jsx(ne,{onClick:W,"data-testid":b("delete-approval-rule-bill-pay",c.approvalRuleId)}),t.jsx(pe,{onClick:()=>{v(w)},"data-testid":b("edit-approval-rule-bill-pay",c.approvalRuleId)})]})]}),t.jsx(te,{windowSize:n,children:t.jsx(oe,{isSingleStep:u.length===1,windowSize:n,children:u.map((d,N)=>t.jsxs(ie,{isSingleStep:u.length===1,className:"stepperItem",windowSize:n,children:[d.action==="require_approval"?t.jsx(re,{children:a.requireText}):t.jsx(le,{children:a.notifyText}),d.nonUserActors!=null&&d.nonUserActors.filter(p=>p.subType!=null).map((p,M)=>t.jsxs(R,{children:[t.jsx(k,{children:p.subType!=null?a.nonUsers[p.subType].label:null}),d.operator!="is"?t.jsx(T,{className:"operator",children:d.operator}):null]},`${p.subType}_${M}`)),d.actors.map(p=>t.jsxs(R,{children:[t.jsxs(k,{children:[p.firstName," ",p.lastName]}),d.operator!="is"?t.jsx(T,{className:"operator",children:d.operator}):null]},p.userId))]},N))})}),m?t.jsx(E,{titleComponent:t.jsx(U,{children:a.deleteApprovalRuleTitle}),descriptionComponent:t.jsx(G,{children:a.deleteApprovalRuleDesc}),primaryButtonText:a.deleteTxt,proceedButtonVariant:"danger",secondaryButtonText:a.cancelBtnText,action:A}):null]})},O=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{Y as _,e as f,a2 as ee,l as g,R as M,j as e,aX as ie,Q as C,W as B,d as x,o as l,r as le,c7 as se,u as U,a6 as L,n as oe,C as re,f as S,c9 as te,a7 as ae,ap as ne,q as de}from"./index-DxZ9Uw7o.js";import{b as u,n as s}from"./vendor-rkTZJa59.js";import{x as ce}from"./MeetingCalenderPopup-D10SioCO-1_HeRLgo.js";import{C as pe}from"./VideoPopup-DfQxE-EQ-C_Goo9ju.js";import{M as z}from"./usp-line-BBd1wKwW-u-VMxix8.js";import"./mui-C42whWwM.js";import"./analytics-CcevxdRy.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-CK3r1iTV.js";import"./VideoPlayer-9UKbocWs-D6ldVshR.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",xe={midContainerMarginBottom:new re(de[5],44)},me=s.div`
1
+ import{Y as _,e as f,a2 as ee,l as g,R as M,j as e,aX as ie,Q as C,W as B,d as x,o as l,r as le,c7 as se,u as U,a6 as L,n as oe,C as re,f as S,c9 as te,a7 as ae,ap as ne,q as de}from"./index-DVFYvj7P.js";import{b as u,n as s}from"./vendor-rkTZJa59.js";import{x as ce}from"./MeetingCalenderPopup-DJHrBVXi-BogUsqxG.js";import{C as pe}from"./VideoPopup-CwEiOVHQ-BFbb_zgA.js";import{M as z}from"./usp-line-BBd1wKwW-u-VMxix8.js";import"./mui-C42whWwM.js";import"./analytics-CcevxdRy.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-CK3r1iTV.js";import"./VideoPlayer-DqRss8fV-CPfVjMmq.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",xe={midContainerMarginBottom:new re(de[5],44)},me=s.div`
2
2
  display: flex;
3
3
  flex: 1 1 auto;
4
4
  min-height: 100%;
@@ -1,4 +1,4 @@
1
- import{u as _e,e as De,a2 as E,a as $e,ca as Re,R as Ue,l as He,a8 as X,j as t,cP as ze,W as Le,f as qe,C as u,aX as Me,m as Ne,F as Ge,dO as Je,aS as Qe,dE as Ke,bp as Xe,f1 as Ye,a4 as Ze,o as L,q as a,y as et,b6 as tt}from"./index-DxZ9Uw7o.js";import{b as m,n as g}from"./vendor-rkTZJa59.js";import{D as it}from"./HelpButton-DoSu6q8h-D2QNiRS_.js";import"./SetUpAccountSection-DDxjcjeg-Nsmn_Kay.js";import{q as H}from"./SetUpDefaultSection-BSWh5Hvi-BOsknp6D.js";import{f as nt}from"./SpendMgmtSetupAccountSection-GjJmiN01-u7mV3Ko6.js";import{g as ot}from"./UploadAdditionalDocumentOverlay-DCG_biA8-BJmhb05s.js";import"./mui-C42whWwM.js";import"./analytics-CcevxdRy.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-CK3r1iTV.js";import"./MeetingCalenderPopup-D10SioCO-1_HeRLgo.js";import"./ChaseOverlay-4Rv__bdV-BGiRorBN.js";import"./ChargeCardUtils-Bv0OpE88-aSHBcI_8.js";import"./CreditCardPaymentPlgSection-CTpwe7CS-BwlpGWY3.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)},Y="billPaySetUpPage",V="billPayAccount",Bt=({billPaySetupView:e,isDisabled:w,billpayApprovalView:W,meetingUrl:v,showIntlWiseWidget:s,connectedAccountProvider:ee,isAccountsEnabled:te,isLocalCurrencyEnabled:ie,analytics:y,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:me,onEnableBillPayClick:ge,onEnableBillPaySuccess:q,onClickMenuIcon:ye,onInternationPaymentSetUpClick:Se,onEditFileName:be,onDeleteFile:Pe,updateFilesEntity:xe,onCompanyOfficerUpdated:we,onSendForVerificationClick:ve,onSignUpClick:Ce})=>{const C=_e(),i=De(),[k,S]=m.useState(!1),M=m.useRef(null),{fetchState:p,updateStatus:b,accountUpdateStatus:ke,plaidConnectionDetails:O,allBankAccounts:Ae,companyBillPayInfo:A,isRefreshingViewInBackground:Te,selectedCompanyOfficer:c,primaryFundingAccount:r,allFundingAccounts:N}=e,h=A?.internationalWireOnboardingStatus,T=h==null||h.code==="onboarding_status_not_started",{fetchState:G,allApprovalRules:j,approvalRulesStatus:je}=W,_=O.link_account.updateStatus,D=O.update_account.updateStatus,F=E(p),J=E(b.fetchState),Q=E(_.fetchState),K=E(D.fetchState),P=$e({mode:"all",reValidateMode:"onChange",defaultValues:m.useMemo(()=>z(e),[e]),values:z(e)});m.useEffect(()=>{!k&&c?.additionalDocumentTypesRequestedForVerification.includes("social_security_card")===!0&&c.areAdditionalDocumentsRequestedForVerification&&!c.areAdditionalDocumentsSubmittedForVerification&&c.userVerificationStatus?.code==="require_info"&&S(!0),k&&F==="In-Progress"&&p==="Completed"&&S(!1)},[c,p,F]),m.useEffect(()=>{(F==="In-Progress"&&p==="Completed"||Q==="In-Progress"&&_.fetchState==="Completed"||K==="In-Progress"&&D.fetchState==="Completed")&&P.reset(z(e))},[F,p,P,e,Q,_.fetchState,K,D.fetchState]);const Fe=P.handleSubmit(x=>{y.trackEnableBillPay(),ge()}),Be=async(x,I)=>{const o=I[V];if(x.includes(V)){if(x.includes("fundingAccount")){if(o.fundingAccount.selectedOption!=null&&r?.id!=o.fundingAccount.selectedOption){const f=N.find(U=>U.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(U=>U.value===o.account.selectedOption);f!=null&&typeof f.label=="string"&&y.trackConnectBankLink(f.value,f.label,"bill_pay"),he(o.account.selectedOption,r.id,r.accType)}}};m.useEffect(()=>{const x=P.watch((I,{name:o})=>{o!=null&&I!=null&&Re(()=>Be(o,I))});return()=>{x.unsubscribe()}}),m.useEffect(()=>{J==="In-Progress"&&b.fetchState==="Completed"&&q()},[q,J,b.fetchState]);const{commonSetUp:Ie,spendManagement:Ee}=Ue.getLocalizedStrings(),{setUp:d}=Ie,{billPaySetup:l}=Ee.billPay,$=A?.isBusinessVerified===!0&&(r?.accType==="depositAccount"||He.isVerifiedPaymentAccountProviderStatusCode(r?.providerVerificationStatus?.code??"")),R=A?.isBillPayEnabled===!0,Ve=$?d.setupVerifiedSubTitle:l.setupSubTitle,We=p==="In-Progress"||p==="Not-Started"||G==="In-Progress"||G==="Not-Started",B=C.mode==="light"?new X(C.colors.brandColorJadeLight):new X(C.colors.brandColorJadeDark),Oe=()=>{!k&&c?.additionalDocumentTypesRequestedForVerification.includes("social_security_card")===!0&&c.areAdditionalDocumentsRequestedForVerification&&!c.areAdditionalDocumentsSubmittedForVerification&&c.userVerificationStatus?.code==="require_info"?S(!0):ce?.()};return t.jsxs(lt,{ref:M,children:[t.jsx(ze,{anchor:"right",PaperProps:{style:{width:n.overlayWidth.valuePercentage(i),boxShadow:"none"}},open:k,onClose:()=>S(!1),style:{backgroundColor:qe.drawerBackground},transitionDuration:250,"data-testid":Le("bill-pay-setup-drawer"),children:t.jsx(ot,{authParams:oe,filesEndPoint:ne,updateStatus:b,onEditFileName:be,onDeleteFile:Pe,updateFilesEntity:xe,companyOfficer:c,onClose:()=>S(!1),onCompanyOfficerUpdated:we,onSendForVerificationClick:ve})}),t.jsx(Me,{title:l.setupTitle,style:{zIndex:3},onBackClick:le,showMenuIcon:!R&&(i==="medium-compact"||i==="small"),onClickMenuIcon:ye,scrollableContent:M,backgroundColor:C.colors.grey4,source:"BillPaySetUpPage"}),t.jsxs(rt,{windowSize:i,children:[t.jsx(st,{windowSize:i,children:Ve}),We?t.jsx(dt,{children:t.jsx(Ne,{size:"ExtraLarge",start:!0})}):t.jsxs(at,{children:[t.jsx(Ge,{...P,children:t.jsx("form",{id:Z(Y),onSubmit:Fe,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(Je,{width:n.iconWidthHeight.valuePx(i),height:n.iconWidthHeight.valuePx(i)}),color:B},status:A?.businessVerificationStatus,isLoading:Te,isActiveWhileLoading:!0}),t.jsx(nt,{connectedAccountProvider:ee,primaryFundingAccount:r,allFundingAccounts:N,plaidConnectionDetails:O,allBankAccounts:Ae,sectionId:V,isDisabled:w,onFetchLinkTokenClick:re,onEstablishConnectionClick:de,onUpdatePaymentAccountStatus:fe,onUpdatePaymentAccountLoginStatus:me,onEstablishConnectionSuccess:ue,icon:{element:t.jsx(Qe,{width:n.iconWidthHeight.valuePx(i),height:n.iconWidthHeight.valuePx(i)}),color:B},analytics:y,productType:"bill_pay",isAccountsEnabled:te,onSignUpClick:Ce,pageName:"Bill Pay Setup",accountsPromoConfig:ae}),t.jsx(H,{title:j.length>0?d.approvalTitle:d.createApprovalTitle,subTitle:l.approvalSubTitle,header:j.length>0?d.approvalHeader:d.setupApprovalHeader,icon:{element:t.jsx(Ke,{width:n.iconWidthHeight.valuePx(i),height:n.iconWidthHeight.valuePx(i)}),color:B},style:{paddingBottom:n.lastSectionPaddingBottom.valuePx(i)},onClick:se,status:j.length>0?je:void 0})]})})}),s===!0?t.jsx(H,{title:T?l.enableInternationalWireTitle:l.internationWireTitle,subTitle:l.internationalWireSubTitle2,header:l.internationalWireHeader,icon:{element:t.jsx(Ye,{width:n.iconWidthHeight.valuePx(i),height:n.iconWidthHeight.valuePx(i)}),color:B},style:{paddingBottom:n.lastSectionPaddingBottom.valuePx(i)},isClickable:!0,onClick:()=>{T&&y.trackEnableIntlWire(ie),Se?.()},status:T?void 0:{name:h.name,code:h.code},statusInfoIcon:h?.code==="verification_pending"||h?.code==="verification_failed"?t.jsx(Xe,{title:h.code==="verification_pending"?l.tooltipTexts.pendingInternationalVerificationText:l.tooltipTexts.internationalVerificationFailed,children:t.jsx(ct,{})}):void 0,shouldHover:!0,showRightArrow:T}):null]})]}),$&&!R&&j.length>0?t.jsx(Ze,{formId:Z(Y),primaryBtn:{label:l.enableBillPay,style:{width:"auto",minWidth:i==="small"?"auto":"181px"},isLoading:b.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(it,{isFooterRendered:$&&!R,meetingUrl:v,analytics:y,productType:"bill_pay"})]})},at=g.div``,lt=g.div`
1
+ import{u as _e,e as De,a2 as E,a as $e,ca as Re,R as Ue,l as He,a8 as X,j as t,cP as ze,W as Le,f as qe,C as u,aX as Me,m as Ne,F as Ge,dO as Je,aS as Qe,dE as Ke,bp as Xe,f1 as Ye,a4 as Ze,o as L,q as a,y as et,b6 as tt}from"./index-DVFYvj7P.js";import{b as m,n as g}from"./vendor-rkTZJa59.js";import{D as it}from"./HelpButton-DXDj1Qju-DnQQURkZ.js";import"./SetUpAccountSection-DPEjJt-s-DbxecFrv.js";import{q as H}from"./SetUpDefaultSection-Br-a1ECs-Cis1Rx0T.js";import{f as nt}from"./SpendMgmtSetupAccountSection-CiPoUdg_-D55PFMrP.js";import{g as ot}from"./UploadAdditionalDocumentOverlay-CJwjYpvy-BM1gvPaq.js";import"./mui-C42whWwM.js";import"./analytics-CcevxdRy.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-CK3r1iTV.js";import"./MeetingCalenderPopup-DJHrBVXi-BogUsqxG.js";import"./ChaseOverlay-CauClKmi-CFbGjU4W.js";import"./ChargeCardUtils-BEBqV4Ri-D_Hnspw1.js";import"./CreditCardPaymentPlgSection-D-Ptzdeo-DV96PY8N.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)},Y="billPaySetUpPage",V="billPayAccount",Bt=({billPaySetupView:e,isDisabled:w,billpayApprovalView:W,meetingUrl:v,showIntlWiseWidget:s,connectedAccountProvider:ee,isAccountsEnabled:te,isLocalCurrencyEnabled:ie,analytics:y,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:me,onEnableBillPayClick:ge,onEnableBillPaySuccess:q,onClickMenuIcon:ye,onInternationPaymentSetUpClick:Se,onEditFileName:be,onDeleteFile:Pe,updateFilesEntity:xe,onCompanyOfficerUpdated:we,onSendForVerificationClick:ve,onSignUpClick:Ce})=>{const C=_e(),i=De(),[k,S]=m.useState(!1),M=m.useRef(null),{fetchState:p,updateStatus:b,accountUpdateStatus:ke,plaidConnectionDetails:O,allBankAccounts:Ae,companyBillPayInfo:A,isRefreshingViewInBackground:Te,selectedCompanyOfficer:c,primaryFundingAccount:r,allFundingAccounts:N}=e,h=A?.internationalWireOnboardingStatus,T=h==null||h.code==="onboarding_status_not_started",{fetchState:G,allApprovalRules:j,approvalRulesStatus:je}=W,_=O.link_account.updateStatus,D=O.update_account.updateStatus,F=E(p),J=E(b.fetchState),Q=E(_.fetchState),K=E(D.fetchState),P=$e({mode:"all",reValidateMode:"onChange",defaultValues:m.useMemo(()=>z(e),[e]),values:z(e)});m.useEffect(()=>{!k&&c?.additionalDocumentTypesRequestedForVerification.includes("social_security_card")===!0&&c.areAdditionalDocumentsRequestedForVerification&&!c.areAdditionalDocumentsSubmittedForVerification&&c.userVerificationStatus?.code==="require_info"&&S(!0),k&&F==="In-Progress"&&p==="Completed"&&S(!1)},[c,p,F]),m.useEffect(()=>{(F==="In-Progress"&&p==="Completed"||Q==="In-Progress"&&_.fetchState==="Completed"||K==="In-Progress"&&D.fetchState==="Completed")&&P.reset(z(e))},[F,p,P,e,Q,_.fetchState,K,D.fetchState]);const Fe=P.handleSubmit(x=>{y.trackEnableBillPay(),ge()}),Be=async(x,I)=>{const o=I[V];if(x.includes(V)){if(x.includes("fundingAccount")){if(o.fundingAccount.selectedOption!=null&&r?.id!=o.fundingAccount.selectedOption){const f=N.find(U=>U.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(U=>U.value===o.account.selectedOption);f!=null&&typeof f.label=="string"&&y.trackConnectBankLink(f.value,f.label,"bill_pay"),he(o.account.selectedOption,r.id,r.accType)}}};m.useEffect(()=>{const x=P.watch((I,{name:o})=>{o!=null&&I!=null&&Re(()=>Be(o,I))});return()=>{x.unsubscribe()}}),m.useEffect(()=>{J==="In-Progress"&&b.fetchState==="Completed"&&q()},[q,J,b.fetchState]);const{commonSetUp:Ie,spendManagement:Ee}=Ue.getLocalizedStrings(),{setUp:d}=Ie,{billPaySetup:l}=Ee.billPay,$=A?.isBusinessVerified===!0&&(r?.accType==="depositAccount"||He.isVerifiedPaymentAccountProviderStatusCode(r?.providerVerificationStatus?.code??"")),R=A?.isBillPayEnabled===!0,Ve=$?d.setupVerifiedSubTitle:l.setupSubTitle,We=p==="In-Progress"||p==="Not-Started"||G==="In-Progress"||G==="Not-Started",B=C.mode==="light"?new X(C.colors.brandColorJadeLight):new X(C.colors.brandColorJadeDark),Oe=()=>{!k&&c?.additionalDocumentTypesRequestedForVerification.includes("social_security_card")===!0&&c.areAdditionalDocumentsRequestedForVerification&&!c.areAdditionalDocumentsSubmittedForVerification&&c.userVerificationStatus?.code==="require_info"?S(!0):ce?.()};return t.jsxs(lt,{ref:M,children:[t.jsx(ze,{anchor:"right",PaperProps:{style:{width:n.overlayWidth.valuePercentage(i),boxShadow:"none"}},open:k,onClose:()=>S(!1),style:{backgroundColor:qe.drawerBackground},transitionDuration:250,"data-testid":Le("bill-pay-setup-drawer"),children:t.jsx(ot,{authParams:oe,filesEndPoint:ne,updateStatus:b,onEditFileName:be,onDeleteFile:Pe,updateFilesEntity:xe,companyOfficer:c,onClose:()=>S(!1),onCompanyOfficerUpdated:we,onSendForVerificationClick:ve})}),t.jsx(Me,{title:l.setupTitle,style:{zIndex:3},onBackClick:le,showMenuIcon:!R&&(i==="medium-compact"||i==="small"),onClickMenuIcon:ye,scrollableContent:M,backgroundColor:C.colors.grey4,source:"BillPaySetUpPage"}),t.jsxs(rt,{windowSize:i,children:[t.jsx(st,{windowSize:i,children:Ve}),We?t.jsx(dt,{children:t.jsx(Ne,{size:"ExtraLarge",start:!0})}):t.jsxs(at,{children:[t.jsx(Ge,{...P,children:t.jsx("form",{id:Z(Y),onSubmit:Fe,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(Je,{width:n.iconWidthHeight.valuePx(i),height:n.iconWidthHeight.valuePx(i)}),color:B},status:A?.businessVerificationStatus,isLoading:Te,isActiveWhileLoading:!0}),t.jsx(nt,{connectedAccountProvider:ee,primaryFundingAccount:r,allFundingAccounts:N,plaidConnectionDetails:O,allBankAccounts:Ae,sectionId:V,isDisabled:w,onFetchLinkTokenClick:re,onEstablishConnectionClick:de,onUpdatePaymentAccountStatus:fe,onUpdatePaymentAccountLoginStatus:me,onEstablishConnectionSuccess:ue,icon:{element:t.jsx(Qe,{width:n.iconWidthHeight.valuePx(i),height:n.iconWidthHeight.valuePx(i)}),color:B},analytics:y,productType:"bill_pay",isAccountsEnabled:te,onSignUpClick:Ce,pageName:"Bill Pay Setup",accountsPromoConfig:ae}),t.jsx(H,{title:j.length>0?d.approvalTitle:d.createApprovalTitle,subTitle:l.approvalSubTitle,header:j.length>0?d.approvalHeader:d.setupApprovalHeader,icon:{element:t.jsx(Ke,{width:n.iconWidthHeight.valuePx(i),height:n.iconWidthHeight.valuePx(i)}),color:B},style:{paddingBottom:n.lastSectionPaddingBottom.valuePx(i)},onClick:se,status:j.length>0?je:void 0})]})})}),s===!0?t.jsx(H,{title:T?l.enableInternationalWireTitle:l.internationWireTitle,subTitle:l.internationalWireSubTitle2,header:l.internationalWireHeader,icon:{element:t.jsx(Ye,{width:n.iconWidthHeight.valuePx(i),height:n.iconWidthHeight.valuePx(i)}),color:B},style:{paddingBottom:n.lastSectionPaddingBottom.valuePx(i)},isClickable:!0,onClick:()=>{T&&y.trackEnableIntlWire(ie),Se?.()},status:T?void 0:{name:h.name,code:h.code},statusInfoIcon:h?.code==="verification_pending"||h?.code==="verification_failed"?t.jsx(Xe,{title:h.code==="verification_pending"?l.tooltipTexts.pendingInternationalVerificationText:l.tooltipTexts.internationalVerificationFailed,children:t.jsx(ct,{})}):void 0,shouldHover:!0,showRightArrow:T}):null]})]}),$&&!R&&j.length>0?t.jsx(Ze,{formId:Z(Y),primaryBtn:{label:l.enableBillPay,style:{width:"auto",minWidth:i==="small"?"auto":"181px"},isLoading:b.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(it,{isFooterRendered:$&&!R,meetingUrl:v,analytics:y,productType:"bill_pay"})]})},at=g.div``,lt=g.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
@@ -1,4 +1,4 @@
1
- import{u as fe,e as Ce,a as xe,ca as Pe,a8 as k,R as be,j as t,C as P,aX as Ae,m as Ie,F as ve,aS as je,cb as ke,a4 as $e,o as s,h8 as Ee,cD as Be,cE as Te,q as b,y as Ve,gn as Oe,X as ze,f as De}from"./index-DxZ9Uw7o.js";import{b as H,n as r}from"./vendor-rkTZJa59.js";import{M as Le,r as F,o as Me}from"./PaymentAccountSetupBillingAddressSection-B3m8zs_b-BX8-54k0.js";import{O as Re}from"./SetUpAccountSection-DDxjcjeg-Nsmn_Kay.js";import"./mui-C42whWwM.js";import"./analytics-CcevxdRy.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-CK3r1iTV.js";import"./SetUpDefaultSection-BSWh5Hvi-BOsknp6D.js";import"./ChaseOverlay-4Rv__bdV-BGiRorBN.js";const p={titleWidth:new P(343,580,726,826),setupDetailsRowGap:new P(12,b[5],b[5]),iconWidthHeight:new P(20,b[4]),subTitlePaddingTop:new P(12,b[3])},He={title:new ze("standardSemiBold","largeSemiBold")},W="billingSetupPage",A="payAccountSectionId",n="subscriptionBillingAddressSectionId",lt=({analytics:e,billingSetupView:a,connectedAccountProvider:g,isDisabled:d,onClickMenuIcon:I,uiState:K,stripeKey:N,googleAPIKey:q,companyId:J,onUpdateAccountClick:G,onFetchLinkTokenClick:X,onUpdatePaymentAccountStatus:Q,onUpdatePaymentAccountLoginStatus:Z,onEstablishConnectionClick:Y,onEstablishConnectionSuccess:ee,handleCreateCardSetupIntent:te,handleConfirmCardSetupIntent:ne,updateCardPaymentModalState:$,handleAddCardPaymentSource:ie,resetCardPaymentViewState:oe,handleResetCardPaymentErrorStatuses:ae,onBillingAddressSave:se,onAddressEditHandler:re})=>{const C=fe(),i=Ce(),{setupView:{paymentAccount:y,plaidConnectionDetails:de,allBankAccounts:le,accountFetchStatus:E},cardPaymentView:m}=a,ce=a.subscriptionBillingAddress,B=y?.providerVerificationStatus,ue=E.fetchState==="In-Progress"||E.fetchState==="Not-Started",S=xe({mode:"onSubmit",reValidateMode:"onChange",defaultValues:_(a),values:_(a),resetOptions:{keepDirtyValues:!0}}),pe=S.handleSubmit(c=>{se(J)}),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,j=Be(f?.country);u={street:o[n].street??l.strings.empty,city:f?.locality??l.strings.empty,state:f?.administrativeAreaLevel1??l.strings.empty,country:j,countryCode:f?.countryCode??l.strings.empty,postalCode:f?.postalCode??l.strings.empty,secondaryInfo:o[n].secondaryInfo,suite:o[n].suite},v.selectedOption!==j.selectedOption&&(u={...u,country:j})}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&&G(h.account.selectedOption,y.paymentAccountId)};H.useEffect(()=>{const c=S.watch((o,{name:h})=>{h!=null&&o!=null&&Pe(()=>me(h,o))});return()=>{c.unsubscribe()}});const V=C.mode==="light"?new k(C.colors.brandColorJadeLight):new k(C.colors.brandColorJadeDark),{customerOnboardingPage:{sections:{link_payment_account:he,card_payment_method:w}},common:l,billingSetupPage:O}=be.getLocalizedStrings(),ge=O.section.subTitle,{text:ye,subText:Se}=he,z=m.cardsList.length>0,D=m?.cardsList[0]?.brand??"other",L=m?.addCardPaymentSourceStatus.fetchState,x=Le(w.header,w.titleText,w.protectedCardNo,m);let M;z&&(M={header:x.header,title:x.title,subtitle:x.subtitle,status:x.status==="valid"?{name:"Verified",code:"verified"}:{name:"Pending",code:"pending"},showAddPaymentMethodDropDown:z===!0,icon:{element:t.jsx("img",{src:F(D).iconURL,width:p.iconWidthHeight.valuePx(i),height:p.iconWidthHeight.valuePx(i),alt:F(D).name}),color:new k(V)},showCompletedIcon:!1,isError:L==="Error",isLoading:L==="In-Progress",isCompleted:!0,showRightArrow:!1});const[R,we]=H.useState(!1);return t.jsxs(We,{children:[t.jsx(Ae,{source:"BillingSettingsPage",title:O.section.title,backgroundColor:C.colors.grey4,style:{zIndex:3},showBackButton:!1,showMenuIcon:i==="medium-compact"||i==="small",onClickMenuIcon:I}),t.jsxs(Fe,{windowSize:i,children:[t.jsx(_e,{windowSize:i,children:ge}),ue?t.jsx(Ue,{children:t.jsx(Ie,{size:"ExtraLarge",start:!0})}):t.jsx(ve,{...S,children:t.jsx(Ge,{children:t.jsx("form",{id:U(W),onSubmit:pe,children:t.jsxs(Ke,{windowSize:i,children:[t.jsx(Re,{connectedAccountProvider:g,paymentAccount:y,plaidConnectionDetails:de,allBankAccounts:le,header:w.header,sectionTitle:w.header,defaultSectionTitle:ye,defaultSectionSubTitle:Se,sectionId:A,isDisabled:d,onFetchLinkTokenClick:X,onEstablishConnectionClick:Y,onUpdatePaymentAccountStatus:Q,onUpdatePaymentAccountLoginStatus:Z,onEstablishConnectionSuccess:ee,isError:B?.code==="require_info"||B?.code==="failed",icon:{element:t.jsx(je,{width:p.iconWidthHeight.valuePx(i),height:p.iconWidthHeight.valuePx(i)}),color:V},analytics:e,productType:"billing",updateCardPaymentModalState:$,cardPaymentSectionValues:M,cardPaymentView:m,resetCardPaymentViewState:oe,showZeniAccountSection:!1,referrer:"Billing",cardSetupInProgress:R}),Ne(i,l.headers.billingAddress,ce,q,d)]})})})}),ke(S.formState.dirtyFields)?t.jsx($e,{formId:U(W),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:$,handleCreateCardSetupIntent:te,handleAddCardPaymentSource:ie,cardPaymentView:m,isCardPaymentOpen:K.isCardPaymentPopupOpen,handleResetCardPaymentErrorStatuses:ae,stripeKey:N,cardSetupInProgress:R,setCardSetupInProgress:we})]})},_=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]:Ee(n,e.subscriptionBillingAddress)[n]}},Fe=r.div`
1
+ import{u as fe,e as Ce,a as xe,ca as Pe,a8 as k,R as be,j as t,C as P,aX as Ae,m as Ie,F as ve,aS as je,cb as ke,a4 as $e,o as s,h8 as Ee,cD as Be,cE as Te,q as b,y as Ve,gn as Oe,X as ze,f as De}from"./index-DVFYvj7P.js";import{b as H,n as r}from"./vendor-rkTZJa59.js";import{M as Le,r as F,o as Me}from"./PaymentAccountSetupBillingAddressSection-CJk4EUwr-D0h0XeO4.js";import{O as Re}from"./SetUpAccountSection-DPEjJt-s-DbxecFrv.js";import"./mui-C42whWwM.js";import"./analytics-CcevxdRy.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-CK3r1iTV.js";import"./SetUpDefaultSection-Br-a1ECs-Cis1Rx0T.js";import"./ChaseOverlay-CauClKmi-CFbGjU4W.js";const p={titleWidth:new P(343,580,726,826),setupDetailsRowGap:new P(12,b[5],b[5]),iconWidthHeight:new P(20,b[4]),subTitlePaddingTop:new P(12,b[3])},He={title:new ze("standardSemiBold","largeSemiBold")},W="billingSetupPage",A="payAccountSectionId",n="subscriptionBillingAddressSectionId",lt=({analytics:e,billingSetupView:a,connectedAccountProvider:g,isDisabled:d,onClickMenuIcon:I,uiState:K,stripeKey:N,googleAPIKey:q,companyId:J,onUpdateAccountClick:G,onFetchLinkTokenClick:X,onUpdatePaymentAccountStatus:Q,onUpdatePaymentAccountLoginStatus:Z,onEstablishConnectionClick:Y,onEstablishConnectionSuccess:ee,handleCreateCardSetupIntent:te,handleConfirmCardSetupIntent:ne,updateCardPaymentModalState:$,handleAddCardPaymentSource:ie,resetCardPaymentViewState:oe,handleResetCardPaymentErrorStatuses:ae,onBillingAddressSave:se,onAddressEditHandler:re})=>{const C=fe(),i=Ce(),{setupView:{paymentAccount:y,plaidConnectionDetails:de,allBankAccounts:le,accountFetchStatus:E},cardPaymentView:m}=a,ce=a.subscriptionBillingAddress,B=y?.providerVerificationStatus,ue=E.fetchState==="In-Progress"||E.fetchState==="Not-Started",S=xe({mode:"onSubmit",reValidateMode:"onChange",defaultValues:_(a),values:_(a),resetOptions:{keepDirtyValues:!0}}),pe=S.handleSubmit(c=>{se(J)}),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,j=Be(f?.country);u={street:o[n].street??l.strings.empty,city:f?.locality??l.strings.empty,state:f?.administrativeAreaLevel1??l.strings.empty,country:j,countryCode:f?.countryCode??l.strings.empty,postalCode:f?.postalCode??l.strings.empty,secondaryInfo:o[n].secondaryInfo,suite:o[n].suite},v.selectedOption!==j.selectedOption&&(u={...u,country:j})}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&&G(h.account.selectedOption,y.paymentAccountId)};H.useEffect(()=>{const c=S.watch((o,{name:h})=>{h!=null&&o!=null&&Pe(()=>me(h,o))});return()=>{c.unsubscribe()}});const V=C.mode==="light"?new k(C.colors.brandColorJadeLight):new k(C.colors.brandColorJadeDark),{customerOnboardingPage:{sections:{link_payment_account:he,card_payment_method:w}},common:l,billingSetupPage:O}=be.getLocalizedStrings(),ge=O.section.subTitle,{text:ye,subText:Se}=he,z=m.cardsList.length>0,D=m?.cardsList[0]?.brand??"other",L=m?.addCardPaymentSourceStatus.fetchState,x=Le(w.header,w.titleText,w.protectedCardNo,m);let M;z&&(M={header:x.header,title:x.title,subtitle:x.subtitle,status:x.status==="valid"?{name:"Verified",code:"verified"}:{name:"Pending",code:"pending"},showAddPaymentMethodDropDown:z===!0,icon:{element:t.jsx("img",{src:F(D).iconURL,width:p.iconWidthHeight.valuePx(i),height:p.iconWidthHeight.valuePx(i),alt:F(D).name}),color:new k(V)},showCompletedIcon:!1,isError:L==="Error",isLoading:L==="In-Progress",isCompleted:!0,showRightArrow:!1});const[R,we]=H.useState(!1);return t.jsxs(We,{children:[t.jsx(Ae,{source:"BillingSettingsPage",title:O.section.title,backgroundColor:C.colors.grey4,style:{zIndex:3},showBackButton:!1,showMenuIcon:i==="medium-compact"||i==="small",onClickMenuIcon:I}),t.jsxs(Fe,{windowSize:i,children:[t.jsx(_e,{windowSize:i,children:ge}),ue?t.jsx(Ue,{children:t.jsx(Ie,{size:"ExtraLarge",start:!0})}):t.jsx(ve,{...S,children:t.jsx(Ge,{children:t.jsx("form",{id:U(W),onSubmit:pe,children:t.jsxs(Ke,{windowSize:i,children:[t.jsx(Re,{connectedAccountProvider:g,paymentAccount:y,plaidConnectionDetails:de,allBankAccounts:le,header:w.header,sectionTitle:w.header,defaultSectionTitle:ye,defaultSectionSubTitle:Se,sectionId:A,isDisabled:d,onFetchLinkTokenClick:X,onEstablishConnectionClick:Y,onUpdatePaymentAccountStatus:Q,onUpdatePaymentAccountLoginStatus:Z,onEstablishConnectionSuccess:ee,isError:B?.code==="require_info"||B?.code==="failed",icon:{element:t.jsx(je,{width:p.iconWidthHeight.valuePx(i),height:p.iconWidthHeight.valuePx(i)}),color:V},analytics:e,productType:"billing",updateCardPaymentModalState:$,cardPaymentSectionValues:M,cardPaymentView:m,resetCardPaymentViewState:oe,showZeniAccountSection:!1,referrer:"Billing",cardSetupInProgress:R}),Ne(i,l.headers.billingAddress,ce,q,d)]})})})}),ke(S.formState.dirtyFields)?t.jsx($e,{formId:U(W),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:$,handleCreateCardSetupIntent:te,handleAddCardPaymentSource:ie,cardPaymentView:m,isCardPaymentOpen:K.isCardPaymentPopupOpen,handleResetCardPaymentErrorStatuses:ae,stripeKey:N,cardSetupInProgress:R,setCardSetupInProgress:we})]})},_=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]:Ee(n,e.subscriptionBillingAddress)[n]}},Fe=r.div`
2
2
  display: flex;
3
3
  justify-content: space-between;
4
4
  height: 100%;
@@ -1 +1 @@
1
- import{R as V,j as b,bV as q,bX as M,bY as W,ji as X,l as Y,ab as z}from"./index-DxZ9Uw7o.js";import{b as _}from"./vendor-rkTZJa59.js";import{p as H}from"./ReviewOverlay-DbYrvPld-DqEZFPx8.js";import"./mui-C42whWwM.js";import"./analytics-CcevxdRy.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-CK3r1iTV.js";const{common:n,spendManagement:{billPay:C}}=V.getLocalizedStrings(),o=C.bulkActions;let x;const pe=({billsReviewView:t,analytics:r,onProceedForBulkActionClick:l,onCloseReviewItem:e,onCloseOverlay:p})=>{const{fetchState:m,bulkSubmissionFetchState:a,bulkOperationTypeSelected:i,currentTab:g,currentSubTab:w}=t,u=i==="review",[B,h]=_.useState(!1),[s,v]=_.useState(j(t,u)),[c,E]=_.useState(u),[P,T]=_.useState(0),[f,k]=_.useState({type:"",title:"",description:"",primaryButtonText:"",secondaryButtonText:""});_.useEffect(()=>(u&&(x=setInterval(()=>{v(d=>d.map((S,O)=>(clearInterval(x),O===P?{...S,reviewStatus:{isLoading:!1,code:"valid"}}:S))),T(d=>d+1)},1e3)),P===s.length&&c&&(E(!1),clearInterval(x)),!u&&t.fetchState==="Completed"&&v(j(t,!1)),()=>{clearInterval(x)}),[s.length,P,c,t.fetchState,u,t]);const R=s.length,y=s.filter(d=>d.reviewStatus.code!=="error").length,A=()=>{const{title:d,description:S}=Z(y);k({type:"reject",title:d,description:S,primaryButtonText:n.texts.confirm,secondaryButtonText:n.texts.close}),r.trackBillPayBulkSubmit(i,g,w),h(!0)},F={onOkClick:d=>{h(!1),r.trackBillPayBulkPopupConfirm(i,g,w,K(t)),l("reject",d)},onCancelClick:()=>{h(!1)}},{title:N,description:$}=G(m,y,R,c),I=t.fetchState==="Completed"&&y===0,U=()=>{r.trackBillPayBulkSubmit(i,g,w),l(i)},D={label:I?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:I?p: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"?p:A,style:i==="approve"?{minWidth:"92px"}:{}};return b.jsxs(b.Fragment,{children:[B?b.jsx(q,{titleComponent:b.jsx(W,{children:f.title}),descriptionComponent:b.jsx(M,{children:f.description}),primaryButtonText:f.primaryButtonText,proceedButtonVariant:"danger",secondaryButtonText:f.secondaryButtonText,action:F,isNotesIncluded:!0,isEditPopup:!0}):null,b.jsx(H,{title:N,description:{content:$,isError:t.fetchState==="Completed"&&y===0},reviewItems:s,onCloseReviewItem:e,onCloseOverlay:p,showFooter:t.fetchState==="Completed"&&!c,footerProps:{primaryButton:D,cancelButton:L,hideCancel:I}})]})},j=(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&&Y.isBillConditionallyValid(e.reviewErrors[0].reviewErrorCode),subTitle:J(e.reviewStatus==="warning",e.reviewErrors?.map(p=>p.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??""}}))},K=t=>{const r=t.billsForReview;let l=[];return r.forEach(e=>{l=X([...l,e.isRecurring?"recurring":"one-time"])}),l},Z=t=>{const{this_:r,these:l,bill:e,bills:p,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_>",p)}:{title:o.popUps.reject.title.replace("<_payment_>",o.payment),description:o.popUps.reject.description.replaceAll("<_this_>",r).replaceAll("<_payment_>",m).replaceAll("<_bill_>",e)}},G=(t,r,l,e)=>{const{has:p,have:m,bill:a,bills:i,are:g,is:w,do_:u,does:B}=n.texts,h=r>1,s=l>1;let v="",c="";return t==="Completed"&&!e?(v=o.reviewPage.billsReviewed.title.replace("<_bill_>",s?C.bulkActions.bills:o.bill).replace("<_has_>",s?m:p),r===0?c=o.reviewPage.billsReviewed.descriptionError.replace("<_bill_>",s?i:a).replace("<_do_>",s?u:B):c=`${r}/${l} ${o.reviewPage.billsReviewed.description.replace("<_bill_>",l>1?i:a).replace("<_is_>",h?g:w)}`):(v=o.reviewPage.billsReviewing.title.replace("<_bill_>",s?i:a),c=o.reviewPage.billsReviewing.description.replace("<_bill_>",s?i:a)),{title:v,description:c}},J=(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{pe as default,K as getBillsUniqueType};
1
+ import{R as V,j as b,bV as q,bX as M,bY as W,ji as X,l as Y,ab as z}from"./index-DVFYvj7P.js";import{b as _}from"./vendor-rkTZJa59.js";import{p as H}from"./ReviewOverlay-CKOAcLzJ-JwWyu_Z9.js";import"./mui-C42whWwM.js";import"./analytics-CcevxdRy.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-CK3r1iTV.js";const{common:n,spendManagement:{billPay:C}}=V.getLocalizedStrings(),o=C.bulkActions;let x;const pe=({billsReviewView:t,analytics:r,onProceedForBulkActionClick:l,onCloseReviewItem:e,onCloseOverlay:p})=>{const{fetchState:m,bulkSubmissionFetchState:a,bulkOperationTypeSelected:i,currentTab:g,currentSubTab:w}=t,u=i==="review",[B,h]=_.useState(!1),[s,v]=_.useState(j(t,u)),[c,E]=_.useState(u),[P,T]=_.useState(0),[f,k]=_.useState({type:"",title:"",description:"",primaryButtonText:"",secondaryButtonText:""});_.useEffect(()=>(u&&(x=setInterval(()=>{v(d=>d.map((S,O)=>(clearInterval(x),O===P?{...S,reviewStatus:{isLoading:!1,code:"valid"}}:S))),T(d=>d+1)},1e3)),P===s.length&&c&&(E(!1),clearInterval(x)),!u&&t.fetchState==="Completed"&&v(j(t,!1)),()=>{clearInterval(x)}),[s.length,P,c,t.fetchState,u,t]);const R=s.length,y=s.filter(d=>d.reviewStatus.code!=="error").length,A=()=>{const{title:d,description:S}=Z(y);k({type:"reject",title:d,description:S,primaryButtonText:n.texts.confirm,secondaryButtonText:n.texts.close}),r.trackBillPayBulkSubmit(i,g,w),h(!0)},F={onOkClick:d=>{h(!1),r.trackBillPayBulkPopupConfirm(i,g,w,K(t)),l("reject",d)},onCancelClick:()=>{h(!1)}},{title:N,description:$}=G(m,y,R,c),I=t.fetchState==="Completed"&&y===0,U=()=>{r.trackBillPayBulkSubmit(i,g,w),l(i)},D={label:I?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:I?p: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"?p:A,style:i==="approve"?{minWidth:"92px"}:{}};return b.jsxs(b.Fragment,{children:[B?b.jsx(q,{titleComponent:b.jsx(W,{children:f.title}),descriptionComponent:b.jsx(M,{children:f.description}),primaryButtonText:f.primaryButtonText,proceedButtonVariant:"danger",secondaryButtonText:f.secondaryButtonText,action:F,isNotesIncluded:!0,isEditPopup:!0}):null,b.jsx(H,{title:N,description:{content:$,isError:t.fetchState==="Completed"&&y===0},reviewItems:s,onCloseReviewItem:e,onCloseOverlay:p,showFooter:t.fetchState==="Completed"&&!c,footerProps:{primaryButton:D,cancelButton:L,hideCancel:I}})]})},j=(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&&Y.isBillConditionallyValid(e.reviewErrors[0].reviewErrorCode),subTitle:J(e.reviewStatus==="warning",e.reviewErrors?.map(p=>p.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??""}}))},K=t=>{const r=t.billsForReview;let l=[];return r.forEach(e=>{l=X([...l,e.isRecurring?"recurring":"one-time"])}),l},Z=t=>{const{this_:r,these:l,bill:e,bills:p,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_>",p)}:{title:o.popUps.reject.title.replace("<_payment_>",o.payment),description:o.popUps.reject.description.replaceAll("<_this_>",r).replaceAll("<_payment_>",m).replaceAll("<_bill_>",e)}},G=(t,r,l,e)=>{const{has:p,have:m,bill:a,bills:i,are:g,is:w,do_:u,does:B}=n.texts,h=r>1,s=l>1;let v="",c="";return t==="Completed"&&!e?(v=o.reviewPage.billsReviewed.title.replace("<_bill_>",s?C.bulkActions.bills:o.bill).replace("<_has_>",s?m:p),r===0?c=o.reviewPage.billsReviewed.descriptionError.replace("<_bill_>",s?i:a).replace("<_do_>",s?u:B):c=`${r}/${l} ${o.reviewPage.billsReviewed.description.replace("<_bill_>",l>1?i:a).replace("<_is_>",h?g:w)}`):(v=o.reviewPage.billsReviewing.title.replace("<_bill_>",s?i:a),c=o.reviewPage.billsReviewing.description.replace("<_bill_>",s?i:a)),{title:v,description:c}},J=(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{pe as default,K as getBillsUniqueType};
@@ -1,4 +1,4 @@
1
- import{e as h,j as s,W as b,o as r}from"./index-DxZ9Uw7o.js";import{n as p}from"./vendor-rkTZJa59.js";import{o as l}from"./commonDimensions-CtVQ1dPI-DOovbubg.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{e as h,j as s,W as b,o as r}from"./index-DVFYvj7P.js";import{n as p}from"./vendor-rkTZJa59.js";import{o as l}from"./commonDimensions-B_ShoU61-B2BQjped.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{u as et,e as tt,a2 as we,j as a,R as Te,d as M,a as at,co as it,l as L,D as st,ca as nt,ab as rt,a1 as ot,Q as lt,aX as ct,W as dt,cb as mt,bV as pt,bX as ut,bY as ft,m as yt,F as ht,a4 as gt,o,C as P,n as Ie,fJ as xt,fh as Ce,cD as St,c7 as wt,a3 as Ct,y as ke,X as bt,g as vt,q as k}from"./index-DxZ9Uw7o.js";import{b as j,n as d}from"./vendor-rkTZJa59.js";import{x as Dt,s as Tt}from"./CompanyOfficerDetailsSection-aAwv9WfC-CXS756Yr.js";import{r as It}from"./verification-CW6uEyev-BVrJsi0i.js";import"./mui-C42whWwM.js";import"./analytics-CcevxdRy.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-CK3r1iTV.js";import"./LabeledAddressValueField-Ca10mEAm-BYXlyxvu.js";import"./LabeledCreatableSingleSelectField-DMhTj1GM-CwLykRyb.js";import"./LabeledDocumentField-DX4zVKkz-WJvH9-Ei.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])},kt={stepTitle:new bt("h6Regular","h5Regular")},be="businessVerificationPage",b="companyDetails",v="companyOfficerDetails",{commonSetUp:{businessVerification:s},common:{settings:$t,currency:Nt,footer:ve,strings:{empty:Pt}}}=Te.getLocalizedStrings(),ma=({businessVerificationDetails:t,allNationalityCountries:A,verficationDetailsFetchState:F,isRefreshingViewInBackground:B,filesEndPoint:r,authParams:z,productType:y,allIndustries:_,companyTitles:E,maxInsuredAmount:u,isDisabled:$,isSettings:n=!1,isOverlay:h=!1,analytics:g,isStepInProgress:S=!1,onAddressClick:H,onRegisteredAddressClick:Ne,onBackClick:V,onGetOtp:Pe,onVerifyOtp:je,onResendOtp:Fe,onSendForVerificationClick:Ve,onEditFileName:ee,onCompanyDetailsChanged:Oe,updateFilesEntity:te,onDeleteFile:ae,onDeleteFileList:Le,onCompanyOfficerUpdated:Ae,saveNewAddressInLocalStore:ie,onSaveDetailsClick:Be,onClickMenuIcon:ze})=>{const _e=et(),m=tt(),{updateStatus:R,companyView:O,companyDetailsLocalData:l,companyOfficerLocalData:w}=t,Ee=we(R.fetchState),U=O?.company.company.featuresActivationInfo.connectedAccountProvider,Re=U==="unit"?a.jsxs(_t,{children:[s.terms.term1,a.jsx(M,{href:s.terms.consentUrl,onZeniLinkClick:()=>(g?.trackBillPayAgreement(),!0),linkText:s.terms.consent}),s.terms.term2,a.jsx(M,{href:s.terms.depositUrl,onZeniLinkClick:()=>(g?.trackBillPayAgreement(),!0),linkText:s.terms.depositTerms}),s.terms.term3,a.jsx(M,{href:s.terms.privacyPolicyUrl,onZeniLinkClick:()=>(g?.trackBillPayAgreement(),!0),linkText:s.terms.privacy}),s.terms.term4,a.jsx(M,{href:s.terms.tosUrl,onZeniLinkClick:()=>(g?.trackBillPayPrivacyPolicy(),!0),linkText:s.terms.tos}),s.terms.term5]}):s.terms.termsForStripe,[Ue,G]=j.useState(!1),[X,se]=j.useState("save"),[W,Xe]=j.useState(!1),p=at({mode:"all",reValidateMode:"onChange",defaultValues:jt(t,_,E,A)}),{isValid:Me}=p.formState,Z=O?.company.company.companyBillPayInfo,Q=O?.company.company.companyTreasuryInfo,N=y==="zeni_treasury"?Q?.companyVerificationStatus:Z?.companyVerificationStatus,D=Object.values(w).findIndex(e=>e?.isSelectedForVerification===!0),T=`Officer_${D<0?1:D+1}`,Ge=()=>{const e=w[T],i=e?.email,c=e?.birthday?.toString(),f=e?.ownershipInCompany,C=e?.firstName,I=e?.lastName,oe=e?.titleAtCompany,le=e?.documentTypeSelectedForVerification,ce=e?.phone,de=e?.addressStatus?.addressToCreate,me=de!=null?L.getFormattedAddress(de):void 0,pe=l?.companyDescription,K=l?.companyLegalName,ue=l?.companyIndustry,fe=l?.phone,ye=l?.website,he=l?.addressStatus?.addressToCreate!=null?L.getFormattedAddress(l?.addressStatus?.addressToCreate):void 0,Y=l?.primaryContactLocalData,ge=Y?.firstName,xe=Y?.lastName,Se=Y?.email;i!=null&&f!=null&&C!=null&&I!=null&&c!=null&&oe!=null&&ce!=null&&me!=null&&le!=null&&pe!=null&&K!=null&&fe!=null&&ye!=null&&ue!=null&&K!=null&&he!=null&&ge!=null&&xe!=null&&Se!=null&&g?.trackBusinessVerificationSend({email:i,birthday:c.toString(),companyOwnership:f,firstName:C,lastName:I,companyRole:oe,phone:ce,formattedAddress:me,documentTypeForVerification:le},{companyDescription:pe,legalName:K,phone:fe,website:ye.toString(),industry:ue,formattedAddress:he},{firstName:ge,lastName:xe,email:Se},y,n?"Settings":void 0)},We=()=>{const e=w[T],i=l?.primaryContactLocalData,c=e?.email??"",f=!!e?.firstName&&!!e?.lastName,C=i?.email??"",I=!!i?.firstName&&!!i?.lastName;return c&&!f?((!e?.firstName||!e?.lastName)&&p.trigger(`${v}.${D<0?0:D}.name`,{shouldFocus:!0}),!1):C&&!I?((!i?.firstName||!i?.lastName)&&p.trigger(`${b}.primaryContactName`,{shouldFocus:!0}),!1):!0},Ze=()=>{const e=w[T],i=l?.primaryContactLocalData,c=e?.email,f=i?.email;if(c){if(!f)return(i?.firstName||i?.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||q!=null&&q?.length>0)return p.trigger(`${v}.${D<0?0:D}.email`,{shouldFocus:!0}),!1;return!0},Qe=p.handleSubmit(()=>{if(X!=="verification"&&se("verification"),U==="unit"&&w[T]?.isPhoneVerified!==!0){p.setError(`${v}.${D}.phone`,{type:"custom"});return}const e=it(Object.values(w).map(c=>Object.values(c?.deleteFileStatusById??{}).filter(f=>f!=null))),i=Object.values(l?.deleteFileStatusById??{}).filter(c=>c!=null);L.reduceAllFetchState(e.concat(i)).fetchState!=="In-Progress"&&Me&&(Ge(),Ve?.(T))}),qe=async(e,i)=>{e.includes(b)?Oe?.(i[b]):e.includes(v)&&Ae?.(i[v])},Je=j.useCallback(st((e,i)=>{qe(e,i)},300),[]);j.useEffect(()=>{const e=p.watch((i,{name:c})=>{c!=null&&i!=null&&nt(()=>Je(c,i))});return()=>{e.unsubscribe()}});const ne=we(t.companyDetailsLocalData?.addressStatus);j.useEffect(()=>{t.companyDetailsLocalData?.addressStatus?.addressToCreate!=null&&t.companyDetailsLocalData?.registeredAddressStatus?.addressToCreate==null&&ne==null&&(ie?.("company_registered_address",t.companyDetailsLocalData?.addressStatus?.addressToCreate),p.setValue(`${b}.registeredAddress`,t.companyDetailsLocalData?.addressStatus?.addressToCreate))},[t.companyDetailsLocalData?.addressStatus,t.companyDetailsLocalData?.registeredAddressStatus,ne,ie,p]);const re=O?.companyOfficers.slice(0,10).sort((e,i)=>e.user.createTime?.isAfter(i.user.createTime)===!0?1:-1),q=re?.map(e=>e.user),Ke=re?.map(e=>e.role),Ye={onOkClick:()=>{G(!1),V();const e=[],i=O?.company.company.incInfo.fileIds??[];p.getValues(`${b}.fileIds`).forEach(c=>{i.includes(c)||e.push(c)}),Ke?.forEach((c,f)=>{const C=c?.fileIds??[];p.getValues(`${v}.${f}.fileIds`).forEach(I=>{C.includes(I)||e.push(I)})}),e.length!==0&&Le?.(e)},onCancelClick:()=>{G(!1)}},He=rt(ot(u),u,Nt.currencySymbol).toUpperCase(),J=N?.code==="pending_review"||N?.code==="verified";return y==="zeni_treasury"&&N?.code==="pending_review"&&Ee==="In-Progress"&&R.fetchState==="Completed"?a.jsxs(Zt,{children:[a.jsxs(Qt,{children:[a.jsx(It,{}),a.jsx(qt,{windowSize:m,children:s.submittedTitle}),a.jsx(Wt,{isReadonly:!1,children:s.submittedDescription})]}),a.jsx(lt,{label:s.submittedButton,onClick:V,variant:"primary"})]}):a.jsxs(Ft,{isSettings:n,children:[a.jsx(ct,{title:h&&S===!0?Pt:s.header,backgroundColor:_e.colors.grey5,style:{zIndex:W?1:4},onBackClick:()=>{mt(p.formState.dirtyFields)?G(!0):V()},showBackButton:!n&&!h,showMenuIcon:n?m==="medium-compact"||m==="small":!1,onClickMenuIcon:ze,rightSideComponent:h?a.jsx(Jt,{"data-testid":dt("nav-bar-close-business-verification-overlay"),onClick:()=>{V()}}):null,source:"BusinessVerificationPage"}),Ue===!0?a.jsx(pt,{titleComponent:a.jsx(ft,{children:s.discardTitle}),descriptionComponent:a.jsx(ut,{children:s.discardDescription}),primaryButtonText:s.discard,secondaryButtonText:s.cancel,action:Ye}):null,a.jsxs(Lt,{windowSize:m,children:[(!h||S===!1)&&a.jsx(Ot,{windowSize:m,children:n?$t.infoText.businessVerification:s.title}),F==="In-Progress"||F==="Not-Started"?a.jsx(At,{children:a.jsx(yt,{size:"ExtraLarge",start:!0})}):a.jsx(ht,{...p,children:a.jsxs("form",{id:De(be),onSubmit:Qe,children:[h&&S===!0&&a.jsxs(Vt,{children:[a.jsxs(Et,{windowSize:m,children:[a.jsx(Rt,{windowSize:m,children:J?s.businessVerificationDetails:s.verifyBusinessDetails}),!J&&a.jsx(Ut,{children:a.jsxs(Xt,{children:[a.jsx(Mt,{}),a.jsx(Gt,{})]})})]}),a.jsx($e,{isReadonly:J,children:s.verifyBusinessDetailsDescription})]}),a.jsxs(Bt,{children:[a.jsx(Dt,{companyOfficerData:w,allNationalityCountries:A,allOfficers:q??[],sectionId:v,isRefreshingViewInBackground:B,connectedAccountProvider:U,productType:"business_verification",updateFilesEntity:te,onEditFileName:ee,onOfficerAddressClick:H,onDeleteFile:ae,isDisabled:$,filesEndPoint:r,authParams:z,isPopupOpen:W,openPopup:Xe,onGetOtp:Pe,onVerifyOtp:je,onResendOtp:Fe,companyTitles:E,isForTreasury:y==="zeni_treasury",isOverlay:h}),a.jsx(Tt,{companyDetails:l,businessVerificationProps:{companyVerificationStatus:N,isRefreshingViewInBackground:B},productType:"business_verification",showTreasuryFields:y==="zeni_treasury",sectionId:b,isDisabled:N?.code==="pending_review"||N?.code==="verified"?"readonly":$,fileProps:{authParams:z,filesEndPoint:r,onEditFileName:ee,onDeleteFile:ae,updateFilesEntity:te},onCompanyAddressClick:H,onRegisteredAddressClick:Ne,connectedAccountProvider:U,allIndustries:_})]}),y==="zeni_accounts"?a.jsx(zt,{windowSize:m,children:s.threadText.replace("__amount__",He)}):null]})})]}),F==="Completed"&&(y==="zeni_treasury"?Q?.companyVerificationStatus?.code!=="pending_review"&&Q?.companyVerificationStatus?.code!=="verified":Z?.businessVerificationStatus?.code!=="pending_review"&&Z?.businessVerificationStatus?.code!=="verified")?a.jsx(gt,{formId:De(be),primaryBtn:{label:S?ve.submit:s.sendForVerificationButton,style:{width:"auto",minWidth:m==="small"?"auto":S?"83px":"181px"},isLoading:X==="verification"&&R.fetchState==="In-Progress",isDisabled:$!=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?ve.back:s.saveDetailsButton,style:{width:m==="small"?"auto":S?"83px":"181px"},isLoading:X==="save"&&R.fetchState==="In-Progress",onClick:()=>{if(S)V();else{const e=w[T],i=l?.primaryContactLocalData;X!=="save"&&se("save");const c=e?.email??"",f=We(),C=Ze();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?L.getFormattedAddress(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?L.getFormattedAddress(l?.addressStatus?.addressToCreate):void 0},{firstName:i?.firstName,lastName:i?.lastName,email:i?.email},y,n?"Settings":void 0),Be?.(T))}}},helperText:Re,style:{padding:`12px ${o.sp3}`,zIndex:W?0:4}}):null]})},jt=(t,A,F,B)=>{const{companyDetailsLocalData:r,companyOfficerLocalData:z,companyView:y}=t,_=Te.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:A?.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:_.companyIncInfo.allTypesOfIncorporation},sourceOfFunds:{selectedOption:r?.sourceOfFunds??"",allOptions:Object.keys(s.sourceOfFundOptions)}},[v]:Object.values(z).map((u,$)=>{const n=u,h=xt(n?.documentTypeSelectedForVerification);return{userId:n?.userId,officerType:n?.officerType??`Officer_${$+1}`,name:{firstName:n?.firstName,lastName:n?.lastName},email:n?.email,fileIds:n?.fileIds??[],dob:n?.birthday?.toDate(),nationalityCountryCode:St(n?.nationalityCountryCode,B.map(g=>g.countryCode)),ssn:n?.ssn,role:{selectedOption:n?.titleAtCompany,allOptions:F?.map(g=>g.code)},phone:n?.phone??"",ownership:n?.ownershipInCompany,officerAddress:n?.addressStatus?.addressToCreate,selectDocument:{front:Ce(!0,n?.userFiles??[],h),back:Ce(!1,n?.userFiles??[],h),selectDocumentType:h},isSelectedForVerification:!E&&$===0?!0:n?.isSelectedForVerification??!1,userVerificationStatus:n?.userVerificationStatus,treasuryUserVerificationStatus:n?.treasuryUserVerificationStatus,syncToken:n?.syncToken,isPhoneVerified:n?.isPhoneVerified,otpChallenge:n?.otpChallenge}})}},De=t=>`${t}_form`,Ft=d.div`
1
+ import{u as et,e as tt,a2 as we,j as a,R as Te,d as M,a as at,co as it,l as L,D as st,ca as nt,ab as rt,a1 as ot,Q as lt,aX as ct,W as dt,cb as mt,bV as pt,bX as ut,bY as ft,m as yt,F as ht,a4 as gt,o,C as P,n as Ie,fJ as xt,fh as Ce,cD as St,c7 as wt,a3 as Ct,y as ke,X as bt,g as vt,q as k}from"./index-DVFYvj7P.js";import{b as j,n as d}from"./vendor-rkTZJa59.js";import{x as Dt,s as Tt}from"./CompanyOfficerDetailsSection-BEb3_zYO-DcsmBnYA.js";import{r as It}from"./verification-CW6uEyev-BVrJsi0i.js";import"./mui-C42whWwM.js";import"./analytics-CcevxdRy.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-CK3r1iTV.js";import"./LabeledAddressValueField-DBlBlkO_-fjUzU_a0.js";import"./LabeledCreatableSingleSelectField-DOjtbusw-O47c6W6Y.js";import"./LabeledDocumentField-Bxggz66t-Cwirfoo_.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])},kt={stepTitle:new bt("h6Regular","h5Regular")},be="businessVerificationPage",b="companyDetails",v="companyOfficerDetails",{commonSetUp:{businessVerification:s},common:{settings:$t,currency:Nt,footer:ve,strings:{empty:Pt}}}=Te.getLocalizedStrings(),ma=({businessVerificationDetails:t,allNationalityCountries:A,verficationDetailsFetchState:F,isRefreshingViewInBackground:B,filesEndPoint:r,authParams:z,productType:y,allIndustries:_,companyTitles:E,maxInsuredAmount:u,isDisabled:$,isSettings:n=!1,isOverlay:h=!1,analytics:g,isStepInProgress:S=!1,onAddressClick:H,onRegisteredAddressClick:Ne,onBackClick:V,onGetOtp:Pe,onVerifyOtp:je,onResendOtp:Fe,onSendForVerificationClick:Ve,onEditFileName:ee,onCompanyDetailsChanged:Oe,updateFilesEntity:te,onDeleteFile:ae,onDeleteFileList:Le,onCompanyOfficerUpdated:Ae,saveNewAddressInLocalStore:ie,onSaveDetailsClick:Be,onClickMenuIcon:ze})=>{const _e=et(),m=tt(),{updateStatus:R,companyView:O,companyDetailsLocalData:l,companyOfficerLocalData:w}=t,Ee=we(R.fetchState),U=O?.company.company.featuresActivationInfo.connectedAccountProvider,Re=U==="unit"?a.jsxs(_t,{children:[s.terms.term1,a.jsx(M,{href:s.terms.consentUrl,onZeniLinkClick:()=>(g?.trackBillPayAgreement(),!0),linkText:s.terms.consent}),s.terms.term2,a.jsx(M,{href:s.terms.depositUrl,onZeniLinkClick:()=>(g?.trackBillPayAgreement(),!0),linkText:s.terms.depositTerms}),s.terms.term3,a.jsx(M,{href:s.terms.privacyPolicyUrl,onZeniLinkClick:()=>(g?.trackBillPayAgreement(),!0),linkText:s.terms.privacy}),s.terms.term4,a.jsx(M,{href:s.terms.tosUrl,onZeniLinkClick:()=>(g?.trackBillPayPrivacyPolicy(),!0),linkText:s.terms.tos}),s.terms.term5]}):s.terms.termsForStripe,[Ue,G]=j.useState(!1),[X,se]=j.useState("save"),[W,Xe]=j.useState(!1),p=at({mode:"all",reValidateMode:"onChange",defaultValues:jt(t,_,E,A)}),{isValid:Me}=p.formState,Z=O?.company.company.companyBillPayInfo,Q=O?.company.company.companyTreasuryInfo,N=y==="zeni_treasury"?Q?.companyVerificationStatus:Z?.companyVerificationStatus,D=Object.values(w).findIndex(e=>e?.isSelectedForVerification===!0),T=`Officer_${D<0?1:D+1}`,Ge=()=>{const e=w[T],i=e?.email,c=e?.birthday?.toString(),f=e?.ownershipInCompany,C=e?.firstName,I=e?.lastName,oe=e?.titleAtCompany,le=e?.documentTypeSelectedForVerification,ce=e?.phone,de=e?.addressStatus?.addressToCreate,me=de!=null?L.getFormattedAddress(de):void 0,pe=l?.companyDescription,K=l?.companyLegalName,ue=l?.companyIndustry,fe=l?.phone,ye=l?.website,he=l?.addressStatus?.addressToCreate!=null?L.getFormattedAddress(l?.addressStatus?.addressToCreate):void 0,Y=l?.primaryContactLocalData,ge=Y?.firstName,xe=Y?.lastName,Se=Y?.email;i!=null&&f!=null&&C!=null&&I!=null&&c!=null&&oe!=null&&ce!=null&&me!=null&&le!=null&&pe!=null&&K!=null&&fe!=null&&ye!=null&&ue!=null&&K!=null&&he!=null&&ge!=null&&xe!=null&&Se!=null&&g?.trackBusinessVerificationSend({email:i,birthday:c.toString(),companyOwnership:f,firstName:C,lastName:I,companyRole:oe,phone:ce,formattedAddress:me,documentTypeForVerification:le},{companyDescription:pe,legalName:K,phone:fe,website:ye.toString(),industry:ue,formattedAddress:he},{firstName:ge,lastName:xe,email:Se},y,n?"Settings":void 0)},We=()=>{const e=w[T],i=l?.primaryContactLocalData,c=e?.email??"",f=!!e?.firstName&&!!e?.lastName,C=i?.email??"",I=!!i?.firstName&&!!i?.lastName;return c&&!f?((!e?.firstName||!e?.lastName)&&p.trigger(`${v}.${D<0?0:D}.name`,{shouldFocus:!0}),!1):C&&!I?((!i?.firstName||!i?.lastName)&&p.trigger(`${b}.primaryContactName`,{shouldFocus:!0}),!1):!0},Ze=()=>{const e=w[T],i=l?.primaryContactLocalData,c=e?.email,f=i?.email;if(c){if(!f)return(i?.firstName||i?.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||q!=null&&q?.length>0)return p.trigger(`${v}.${D<0?0:D}.email`,{shouldFocus:!0}),!1;return!0},Qe=p.handleSubmit(()=>{if(X!=="verification"&&se("verification"),U==="unit"&&w[T]?.isPhoneVerified!==!0){p.setError(`${v}.${D}.phone`,{type:"custom"});return}const e=it(Object.values(w).map(c=>Object.values(c?.deleteFileStatusById??{}).filter(f=>f!=null))),i=Object.values(l?.deleteFileStatusById??{}).filter(c=>c!=null);L.reduceAllFetchState(e.concat(i)).fetchState!=="In-Progress"&&Me&&(Ge(),Ve?.(T))}),qe=async(e,i)=>{e.includes(b)?Oe?.(i[b]):e.includes(v)&&Ae?.(i[v])},Je=j.useCallback(st((e,i)=>{qe(e,i)},300),[]);j.useEffect(()=>{const e=p.watch((i,{name:c})=>{c!=null&&i!=null&&nt(()=>Je(c,i))});return()=>{e.unsubscribe()}});const ne=we(t.companyDetailsLocalData?.addressStatus);j.useEffect(()=>{t.companyDetailsLocalData?.addressStatus?.addressToCreate!=null&&t.companyDetailsLocalData?.registeredAddressStatus?.addressToCreate==null&&ne==null&&(ie?.("company_registered_address",t.companyDetailsLocalData?.addressStatus?.addressToCreate),p.setValue(`${b}.registeredAddress`,t.companyDetailsLocalData?.addressStatus?.addressToCreate))},[t.companyDetailsLocalData?.addressStatus,t.companyDetailsLocalData?.registeredAddressStatus,ne,ie,p]);const re=O?.companyOfficers.slice(0,10).sort((e,i)=>e.user.createTime?.isAfter(i.user.createTime)===!0?1:-1),q=re?.map(e=>e.user),Ke=re?.map(e=>e.role),Ye={onOkClick:()=>{G(!1),V();const e=[],i=O?.company.company.incInfo.fileIds??[];p.getValues(`${b}.fileIds`).forEach(c=>{i.includes(c)||e.push(c)}),Ke?.forEach((c,f)=>{const C=c?.fileIds??[];p.getValues(`${v}.${f}.fileIds`).forEach(I=>{C.includes(I)||e.push(I)})}),e.length!==0&&Le?.(e)},onCancelClick:()=>{G(!1)}},He=rt(ot(u),u,Nt.currencySymbol).toUpperCase(),J=N?.code==="pending_review"||N?.code==="verified";return y==="zeni_treasury"&&N?.code==="pending_review"&&Ee==="In-Progress"&&R.fetchState==="Completed"?a.jsxs(Zt,{children:[a.jsxs(Qt,{children:[a.jsx(It,{}),a.jsx(qt,{windowSize:m,children:s.submittedTitle}),a.jsx(Wt,{isReadonly:!1,children:s.submittedDescription})]}),a.jsx(lt,{label:s.submittedButton,onClick:V,variant:"primary"})]}):a.jsxs(Ft,{isSettings:n,children:[a.jsx(ct,{title:h&&S===!0?Pt:s.header,backgroundColor:_e.colors.grey5,style:{zIndex:W?1:4},onBackClick:()=>{mt(p.formState.dirtyFields)?G(!0):V()},showBackButton:!n&&!h,showMenuIcon:n?m==="medium-compact"||m==="small":!1,onClickMenuIcon:ze,rightSideComponent:h?a.jsx(Jt,{"data-testid":dt("nav-bar-close-business-verification-overlay"),onClick:()=>{V()}}):null,source:"BusinessVerificationPage"}),Ue===!0?a.jsx(pt,{titleComponent:a.jsx(ft,{children:s.discardTitle}),descriptionComponent:a.jsx(ut,{children:s.discardDescription}),primaryButtonText:s.discard,secondaryButtonText:s.cancel,action:Ye}):null,a.jsxs(Lt,{windowSize:m,children:[(!h||S===!1)&&a.jsx(Ot,{windowSize:m,children:n?$t.infoText.businessVerification:s.title}),F==="In-Progress"||F==="Not-Started"?a.jsx(At,{children:a.jsx(yt,{size:"ExtraLarge",start:!0})}):a.jsx(ht,{...p,children:a.jsxs("form",{id:De(be),onSubmit:Qe,children:[h&&S===!0&&a.jsxs(Vt,{children:[a.jsxs(Et,{windowSize:m,children:[a.jsx(Rt,{windowSize:m,children:J?s.businessVerificationDetails:s.verifyBusinessDetails}),!J&&a.jsx(Ut,{children:a.jsxs(Xt,{children:[a.jsx(Mt,{}),a.jsx(Gt,{})]})})]}),a.jsx($e,{isReadonly:J,children:s.verifyBusinessDetailsDescription})]}),a.jsxs(Bt,{children:[a.jsx(Dt,{companyOfficerData:w,allNationalityCountries:A,allOfficers:q??[],sectionId:v,isRefreshingViewInBackground:B,connectedAccountProvider:U,productType:"business_verification",updateFilesEntity:te,onEditFileName:ee,onOfficerAddressClick:H,onDeleteFile:ae,isDisabled:$,filesEndPoint:r,authParams:z,isPopupOpen:W,openPopup:Xe,onGetOtp:Pe,onVerifyOtp:je,onResendOtp:Fe,companyTitles:E,isForTreasury:y==="zeni_treasury",isOverlay:h}),a.jsx(Tt,{companyDetails:l,businessVerificationProps:{companyVerificationStatus:N,isRefreshingViewInBackground:B},productType:"business_verification",showTreasuryFields:y==="zeni_treasury",sectionId:b,isDisabled:N?.code==="pending_review"||N?.code==="verified"?"readonly":$,fileProps:{authParams:z,filesEndPoint:r,onEditFileName:ee,onDeleteFile:ae,updateFilesEntity:te},onCompanyAddressClick:H,onRegisteredAddressClick:Ne,connectedAccountProvider:U,allIndustries:_})]}),y==="zeni_accounts"?a.jsx(zt,{windowSize:m,children:s.threadText.replace("__amount__",He)}):null]})})]}),F==="Completed"&&(y==="zeni_treasury"?Q?.companyVerificationStatus?.code!=="pending_review"&&Q?.companyVerificationStatus?.code!=="verified":Z?.businessVerificationStatus?.code!=="pending_review"&&Z?.businessVerificationStatus?.code!=="verified")?a.jsx(gt,{formId:De(be),primaryBtn:{label:S?ve.submit:s.sendForVerificationButton,style:{width:"auto",minWidth:m==="small"?"auto":S?"83px":"181px"},isLoading:X==="verification"&&R.fetchState==="In-Progress",isDisabled:$!=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?ve.back:s.saveDetailsButton,style:{width:m==="small"?"auto":S?"83px":"181px"},isLoading:X==="save"&&R.fetchState==="In-Progress",onClick:()=>{if(S)V();else{const e=w[T],i=l?.primaryContactLocalData;X!=="save"&&se("save");const c=e?.email??"",f=We(),C=Ze();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?L.getFormattedAddress(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?L.getFormattedAddress(l?.addressStatus?.addressToCreate):void 0},{firstName:i?.firstName,lastName:i?.lastName,email:i?.email},y,n?"Settings":void 0),Be?.(T))}}},helperText:Re,style:{padding:`12px ${o.sp3}`,zIndex:W?0:4}}):null]})},jt=(t,A,F,B)=>{const{companyDetailsLocalData:r,companyOfficerLocalData:z,companyView:y}=t,_=Te.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:A?.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:_.companyIncInfo.allTypesOfIncorporation},sourceOfFunds:{selectedOption:r?.sourceOfFunds??"",allOptions:Object.keys(s.sourceOfFundOptions)}},[v]:Object.values(z).map((u,$)=>{const n=u,h=xt(n?.documentTypeSelectedForVerification);return{userId:n?.userId,officerType:n?.officerType??`Officer_${$+1}`,name:{firstName:n?.firstName,lastName:n?.lastName},email:n?.email,fileIds:n?.fileIds??[],dob:n?.birthday?.toDate(),nationalityCountryCode:St(n?.nationalityCountryCode,B.map(g=>g.countryCode)),ssn:n?.ssn,role:{selectedOption:n?.titleAtCompany,allOptions:F?.map(g=>g.code)},phone:n?.phone??"",ownership:n?.ownershipInCompany,officerAddress:n?.addressStatus?.addressToCreate,selectDocument:{front:Ce(!0,n?.userFiles??[],h),back:Ce(!1,n?.userFiles??[],h),selectDocumentType:h},isSelectedForVerification:!E&&$===0?!0:n?.isSelectedForVerification??!1,userVerificationStatus:n?.userVerificationStatus,treasuryUserVerificationStatus:n?.treasuryUserVerificationStatus,syncToken:n?.syncToken,isPhoneVerified:n?.isPhoneVerified,otpChallenge:n?.otpChallenge}})}},De=t=>`${t}_form`,Ft=d.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
@@ -1,4 +1,4 @@
1
- import{e as m,R as w,j as t,v as x,X as $,o as s,g as C}from"./index-DxZ9Uw7o.js";import{n as o,b as d}from"./vendor-rkTZJa59.js";const y=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}}=w.getLocalizedStrings(),f={subText:new $("extraSmallRegular","standardRegular")},R=({cardDetail:e,forDetailPage:a})=>{const h=m(),g=e.type.code.includes("credit")?r.chargeCardsPromo.credit:r.chargeCardsPromo.debit;let l=e.type.code.includes("physical")?r.cardList.physicalCard:r.cardList.virtualCard;const i=n.strings.space+r.cardDetails.expiryHideOut+n.strings.space+e.accountLast4,u=e.status.code==="request_on_hold"||!a?l:i,c=e.type.code.includes("physical");return t.jsxs(v,{windowSize:h,forDetailPage:a,className:"cardName",title:`${u}`,children:[g,t.jsx(H,{}),l,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]})},v=o(C)`
1
+ import{e as m,R as w,j as t,v as x,X as $,o as s,g as C}from"./index-DVFYvj7P.js";import{n as o,b as d}from"./vendor-rkTZJa59.js";const y=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}}=w.getLocalizedStrings(),f={subText:new $("extraSmallRegular","standardRegular")},R=({cardDetail:e,forDetailPage:a})=>{const h=m(),g=e.type.code.includes("credit")?r.chargeCardsPromo.credit:r.chargeCardsPromo.debit;let l=e.type.code.includes("physical")?r.cardList.physicalCard:r.cardList.virtualCard;const i=n.strings.space+r.cardDetails.expiryHideOut+n.strings.space+e.accountLast4,u=e.status.code==="request_on_hold"||!a?l:i,c=e.type.code.includes("physical");return t.jsxs(v,{windowSize:h,forDetailPage:a,className:"cardName",title:`${u}`,children:[g,t.jsx(H,{}),l,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]})},v=o(C)`
2
2
  ${e=>e.forDetailPage?{...x.extraSmallRegular.cssObject}:`${f.subText.style(e.windowSize)}`};
3
3
  color: ${e=>e.theme.colors.hero};
4
4
  max-width: 100%;
@@ -1,4 +1,4 @@
1
- import{u as k,e as f,j as t,aX as te,R as w,cV as P,v as u,aj as q,bv as ie,o as i,f as B,C as h,y as v,dg as oe,l as y,q as l,b7 as re,b8 as ae,aw as se,av as ne,ab as de,b9 as le,bb as ce,iv as he,a0 as R,bn as pe,W as z,w as $,iw as J,ix as Q,id as ge,c3 as me,c6 as xe,n as T,ie as we,ig as ue}from"./index-DxZ9Uw7o.js";import{n as o,f as O,b as V}from"./vendor-rkTZJa59.js";import{B as ye}from"./InsightsSection-KsnkYRQw-B7Aa3iSu.js";import"./mui-C42whWwM.js";import"./analytics-CcevxdRy.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-CK3r1iTV.js";import"./NavigationDots-BZNvrGBo-Lo2Iyk3a.js";const be=({x:e,y:s,width:n,height:a,payload:r})=>{const c=k();return t.jsx(he,{fill:(r?.[0].payload).showTooltip===!0?c.colors.background:"transparent",stroke:(r?.[0].payload).showTooltip===!0?c.colors.background:"transparent",x:e,y:s,width:n,height:a})},W=w.getLocalizedStrings().spendManagement.chargeCard.cashbackDetail.header,fe=w.getLocalizedStrings().dateFormat.visual.MMMMFormat,$e=({active:e,payload:s,label:n})=>e===!0&&(s?.[0].payload).showTooltip===!0?t.jsx(ve,{children:t.jsx(je,{children:t.jsxs("div",{children:[t.jsxs(E,{children:[t.jsx(Z,{children:W.month})," ",t.jsx(G,{children:y.getZeniDateFromPeriod(n).format(fe)})]}),t.jsxs(E,{children:[t.jsx(Z,{children:W.cashback}),t.jsx(G,{children:R("0,0.[00]",{amount:s?.[0].value??0,currencyCode:(s?.[0].payload).currencyCode,currencySymbol:(s?.[0].payload).currencySymbol})})]})]})})}):null,E=o.div`
1
+ import{u as k,e as f,j as t,aX as te,R as w,cV as P,v as u,aj as q,bv as ie,o as i,f as B,C as h,y as v,dg as oe,l as y,q as l,b7 as re,b8 as ae,aw as se,av as ne,ab as de,b9 as le,bb as ce,iv as he,a0 as R,bn as pe,W as z,w as $,iw as J,ix as Q,id as ge,c3 as me,c6 as xe,n as T,ie as we,ig as ue}from"./index-DVFYvj7P.js";import{n as o,f as O,b as V}from"./vendor-rkTZJa59.js";import{B as ye}from"./InsightsSection-Bq2ZlQ8--bZpQBOUU.js";import"./mui-C42whWwM.js";import"./analytics-CcevxdRy.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-CK3r1iTV.js";import"./NavigationDots-BiiEFlFj-zDNVZc4v.js";const be=({x:e,y:s,width:n,height:a,payload:r})=>{const c=k();return t.jsx(he,{fill:(r?.[0].payload).showTooltip===!0?c.colors.background:"transparent",stroke:(r?.[0].payload).showTooltip===!0?c.colors.background:"transparent",x:e,y:s,width:n,height:a})},W=w.getLocalizedStrings().spendManagement.chargeCard.cashbackDetail.header,fe=w.getLocalizedStrings().dateFormat.visual.MMMMFormat,$e=({active:e,payload:s,label:n})=>e===!0&&(s?.[0].payload).showTooltip===!0?t.jsx(ve,{children:t.jsx(je,{children:t.jsxs("div",{children:[t.jsxs(E,{children:[t.jsx(Z,{children:W.month})," ",t.jsx(G,{children:y.getZeniDateFromPeriod(n).format(fe)})]}),t.jsxs(E,{children:[t.jsx(Z,{children:W.cashback}),t.jsx(G,{children:R("0,0.[00]",{amount:s?.[0].value??0,currencyCode:(s?.[0].payload).currencyCode,currencySymbol:(s?.[0].payload).currencySymbol})})]})]})})}):null,E=o.div`
2
2
  display: flex;
3
3
  gap: ${i.sp1};
4
4
  `,ve=o.div`
@@ -1,4 +1,4 @@
1
- import{u as Be,e as fe,Y as nt,b as st,fj as Ka,l as Ne,h2 as Gr,a8 as He,R as pe,fk as Xa,j as t,gs as qr,aX as Kr,q as c,fs as Ja,a0 as ye,W as Z,o as a,bp as Pt,f as p,ih as Qa,v as _,bV as Xr,ii as Jr,cP as Qr,gi as ei,a as ti,gl as ai,cv as ri,C as D,p as ii,F as oi,fK as ni,Q as Ct,a$ as si,bg as er,a6 as Mt,ij as di,ik as tr,b6 as ar,ap as Ot,eW as ci,a7 as rr,af as li,il as hi,im as pi,am as Vt,w as ge,eA as ui,ic as mi,az as dt,fl as ir,m as ot,aj as gi,dl as Ci,b_ as fi,bX as wi,cC as xi,g$ as yi,y as be,br as or,io as bi,fm as je,dt as ft,d4 as Si,X as ha,g as nr,ao as $i,ip as vi,eU as ki,c3 as sr,iq as Li,A as ut,bv as pa,aT as ji,dd as Di,eF as Ii,n as et,fg as Ai,r as Ti,T as Ri,a3 as Fi,b1 as Ei,ir as xt,d1 as zi,bn as Pi,is as dr,it as cr,g4 as lr,iu as wt,hE as hr,id as Mi,c6 as Oi,eg as pr,ie as Vi,ig as Hi,dO as Ni,cx as Bi,em as Wi,bM as Ui,bN as _i}from"./index-DxZ9Uw7o.js";import{b as o,n as r,j as ue,f as Zi,k as ur}from"./vendor-rkTZJa59.js";import{k as Yi}from"./NavigationDots-BZNvrGBo-Lo2Iyk3a.js";import{L as Gi,H as Je,U as ua,M as mr,F as gr,_ as Cr}from"./ChargeCardUtils-Bv0OpE88-aSHBcI_8.js";import{A as qi,i as Ki,a as Xi,l as Ji,r as Qi,t as eo,n as to}from"./add-to-wallet-DgdBD8_G-y8nGTHEa.js";import{f as ao}from"./CardNumberSubText-Chba_z2--CnmWtDil.js";import{r as fr}from"./mui-C42whWwM.js";import{l as wr}from"./uploadReceipts-dxsKhm9I-DPzJ4iG4.js";import"./analytics-CcevxdRy.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-CK3r1iTV.js";const xr=pe.getLocalizedStrings().spendManagement.chargeCard,ro=({controllerEmails:e,classListFetchState:i,isChargeCardFeatureEnabled:d,isDebitCardFeatureEnabled:h,isDebitCardSetupEnabled:m,isChargeCardSetupEnabled:u,chargeCardDetailView:s,productInformation:x,creditAccountInformation:l,debitAccountInformation:f,creditAccount:w,creditAccountRepayment:n,cardIssuedByRoles:C,cardIssuedByDepartmentName:b,cardHolderRoles:j,cardHolderDepartmentName:S,appleWalletLink:$,googleWalletLink:y,style:g,showDrawerAnimation:A,setWalletType:k,setIsAddToWalletDrawerOpen:O,isDebitCard:R})=>{const z=st().analytics,{isIPadScreen:G}=hi(),{isAndroidScreen:X}=pi(),B=nt(),T=Ne.hasChargeCardAdminLevelAccess(B.loggedInUserRoleMap);return t.jsx(io,{style:g,children:G===!0?t.jsx(zt,{onClick:()=>{Je({chargeCardDetailView:s,classListFetchState:i,analytics:z,isDebitCard:R,isChargeCardAdmin:T,cardIssuedByRoles:C,cardIssuedByDepartmentName:b,cardHolderRoles:j,cardHolderDepartmentName:S,controllerEmails:e,pageName:"Card Detail",addToWalletType:"Add to Apple Wallet",productInformation:x,creditAccountInformation:l,debitAccountInformation:f,isChargeCardFeatureEnabled:d,creditAccount:w,creditAccountRepayment:n}),window.open($,"_blank")}}):X===!0?t.jsx(Et,{onClick:()=>{Je({chargeCardDetailView:s,classListFetchState:i,analytics:z,isDebitCard:R,isChargeCardAdmin:T,cardIssuedByRoles:C,cardIssuedByDepartmentName:b,cardHolderRoles:j,cardHolderDepartmentName:S,controllerEmails:e,pageName:"Card Detail",addToWalletType:"Add to Google Wallet",productInformation:x,creditAccountInformation:l,debitAccountInformation:f,isChargeCardFeatureEnabled:d,creditAccount:w,creditAccountRepayment:n}),window.open(y,"_blank")}}):t.jsxs(t.Fragment,{children:[t.jsx(zt,{onClick:()=>{k("apple"),A.current="slide-in-right-to-left-add-to-wallet",Je({chargeCardDetailView:s,classListFetchState:i,analytics:z,isDebitCard:R,isChargeCardAdmin:T,cardIssuedByRoles:C,cardIssuedByDepartmentName:b,cardHolderRoles:j,cardHolderDepartmentName:S,controllerEmails:e,pageName:"Card Detail",addToWalletType:"Add to Apple Wallet",isChargeCardFeatureEnabled:d,productInformation:x,creditAccountInformation:l,debitAccountInformation:f,creditAccount:w,creditAccountRepayment:n}),O(!0)}}),t.jsx(Et,{onClick:()=>{k("google"),A.current="slide-in-right-to-left-add-to-wallet",Je({chargeCardDetailView:s,classListFetchState:i,analytics:z,isDebitCard:R,isChargeCardAdmin:T,cardIssuedByRoles:C,cardIssuedByDepartmentName:b,cardHolderRoles:j,cardHolderDepartmentName:S,controllerEmails:e,pageName:"Card Detail",addToWalletType:"Add to Google Wallet",isChargeCardFeatureEnabled:d,productInformation:x,creditAccountInformation:l,debitAccountInformation:f,creditAccount:w,creditAccountRepayment:n}),O(!0)}})]})})},Et=({onClick:e})=>{const i=Be();return t.jsx(Ct,{prefixIcon:t.jsx(oo,{}),label:xr.cardDetails.addToGoogleWallet,buttonColors:{borderColor:{default:i.colors.grey1,hover:i.colors.primary,disabled:i.colors.primary},backgroundColor:{default:i.colors.grey5,hover:i.colors.grey5,disabled:i.colors.grey5},textColor:{default:i.colors.primary,hover:i.colors.primary,disabled:i.colors.grey5}},textStyle:{color:i.colors.primary},style:{width:"239px",justifyContent:"center"},onClick:e,"data-testid":Z("add-to-google-wallet-button")})},zt=({onClick:e})=>{const i=Be();return t.jsx(Ct,{prefixIcon:t.jsx(no,{}),label:xr.cardDetails.addToAppleWallet,buttonColors:{borderColor:{default:i.colors.grey1,hover:i.colors.primary,disabled:i.colors.primary},backgroundColor:{default:i.colors.grey5,hover:i.colors.grey5,disabled:i.colors.grey5},textColor:{default:i.colors.primary,hover:i.colors.primary,disabled:i.colors.grey5}},textStyle:{color:i.colors.primary},style:{width:"239px",justifyContent:"center"},onClick:e,"data-testid":Z("add-to-apple-wallet-button")})},io=r.div`
1
+ import{u as Be,e as fe,Y as nt,b as st,fj as Ka,l as Ne,h2 as Gr,a8 as He,R as pe,fk as Xa,j as t,gs as qr,aX as Kr,q as c,fs as Ja,a0 as ye,W as Z,o as a,bp as Pt,f as p,ih as Qa,v as _,bV as Xr,ii as Jr,cP as Qr,gi as ei,a as ti,gl as ai,cv as ri,C as D,p as ii,F as oi,fK as ni,Q as Ct,a$ as si,bg as er,a6 as Mt,ij as di,ik as tr,b6 as ar,ap as Ot,eW as ci,a7 as rr,af as li,il as hi,im as pi,am as Vt,w as ge,eA as ui,ic as mi,az as dt,fl as ir,m as ot,aj as gi,dl as Ci,b_ as fi,bX as wi,cC as xi,g$ as yi,y as be,br as or,io as bi,fm as je,dt as ft,d4 as Si,X as ha,g as nr,ao as $i,ip as vi,eU as ki,c3 as sr,iq as Li,A as ut,bv as pa,aT as ji,dd as Di,eF as Ii,n as et,fg as Ai,r as Ti,T as Ri,a3 as Fi,b1 as Ei,ir as xt,d1 as zi,bn as Pi,is as dr,it as cr,g4 as lr,iu as wt,hE as hr,id as Mi,c6 as Oi,eg as pr,ie as Vi,ig as Hi,dO as Ni,cx as Bi,em as Wi,bM as Ui,bN as _i}from"./index-DVFYvj7P.js";import{b as o,n as r,j as ue,f as Zi,k as ur}from"./vendor-rkTZJa59.js";import{k as Yi}from"./NavigationDots-BiiEFlFj-zDNVZc4v.js";import{L as Gi,H as Je,U as ua,M as mr,F as gr,_ as Cr}from"./ChargeCardUtils-BEBqV4Ri-D_Hnspw1.js";import{A as qi,i as Ki,a as Xi,l as Ji,r as Qi,t as eo,n as to}from"./add-to-wallet-DgdBD8_G-y8nGTHEa.js";import{f as ao}from"./CardNumberSubText-uaXIushe-Bx2nZV75.js";import{r as fr}from"./mui-C42whWwM.js";import{l as wr}from"./uploadReceipts-dxsKhm9I-ss2G_wQJ.js";import"./analytics-CcevxdRy.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-CK3r1iTV.js";const xr=pe.getLocalizedStrings().spendManagement.chargeCard,ro=({controllerEmails:e,classListFetchState:i,isChargeCardFeatureEnabled:d,isDebitCardFeatureEnabled:h,isDebitCardSetupEnabled:m,isChargeCardSetupEnabled:u,chargeCardDetailView:s,productInformation:x,creditAccountInformation:l,debitAccountInformation:f,creditAccount:w,creditAccountRepayment:n,cardIssuedByRoles:C,cardIssuedByDepartmentName:b,cardHolderRoles:j,cardHolderDepartmentName:S,appleWalletLink:$,googleWalletLink:y,style:g,showDrawerAnimation:A,setWalletType:k,setIsAddToWalletDrawerOpen:O,isDebitCard:R})=>{const z=st().analytics,{isIPadScreen:G}=hi(),{isAndroidScreen:X}=pi(),B=nt(),T=Ne.hasChargeCardAdminLevelAccess(B.loggedInUserRoleMap);return t.jsx(io,{style:g,children:G===!0?t.jsx(zt,{onClick:()=>{Je({chargeCardDetailView:s,classListFetchState:i,analytics:z,isDebitCard:R,isChargeCardAdmin:T,cardIssuedByRoles:C,cardIssuedByDepartmentName:b,cardHolderRoles:j,cardHolderDepartmentName:S,controllerEmails:e,pageName:"Card Detail",addToWalletType:"Add to Apple Wallet",productInformation:x,creditAccountInformation:l,debitAccountInformation:f,isChargeCardFeatureEnabled:d,creditAccount:w,creditAccountRepayment:n}),window.open($,"_blank")}}):X===!0?t.jsx(Et,{onClick:()=>{Je({chargeCardDetailView:s,classListFetchState:i,analytics:z,isDebitCard:R,isChargeCardAdmin:T,cardIssuedByRoles:C,cardIssuedByDepartmentName:b,cardHolderRoles:j,cardHolderDepartmentName:S,controllerEmails:e,pageName:"Card Detail",addToWalletType:"Add to Google Wallet",productInformation:x,creditAccountInformation:l,debitAccountInformation:f,isChargeCardFeatureEnabled:d,creditAccount:w,creditAccountRepayment:n}),window.open(y,"_blank")}}):t.jsxs(t.Fragment,{children:[t.jsx(zt,{onClick:()=>{k("apple"),A.current="slide-in-right-to-left-add-to-wallet",Je({chargeCardDetailView:s,classListFetchState:i,analytics:z,isDebitCard:R,isChargeCardAdmin:T,cardIssuedByRoles:C,cardIssuedByDepartmentName:b,cardHolderRoles:j,cardHolderDepartmentName:S,controllerEmails:e,pageName:"Card Detail",addToWalletType:"Add to Apple Wallet",isChargeCardFeatureEnabled:d,productInformation:x,creditAccountInformation:l,debitAccountInformation:f,creditAccount:w,creditAccountRepayment:n}),O(!0)}}),t.jsx(Et,{onClick:()=>{k("google"),A.current="slide-in-right-to-left-add-to-wallet",Je({chargeCardDetailView:s,classListFetchState:i,analytics:z,isDebitCard:R,isChargeCardAdmin:T,cardIssuedByRoles:C,cardIssuedByDepartmentName:b,cardHolderRoles:j,cardHolderDepartmentName:S,controllerEmails:e,pageName:"Card Detail",addToWalletType:"Add to Google Wallet",isChargeCardFeatureEnabled:d,productInformation:x,creditAccountInformation:l,debitAccountInformation:f,creditAccount:w,creditAccountRepayment:n}),O(!0)}})]})})},Et=({onClick:e})=>{const i=Be();return t.jsx(Ct,{prefixIcon:t.jsx(oo,{}),label:xr.cardDetails.addToGoogleWallet,buttonColors:{borderColor:{default:i.colors.grey1,hover:i.colors.primary,disabled:i.colors.primary},backgroundColor:{default:i.colors.grey5,hover:i.colors.grey5,disabled:i.colors.grey5},textColor:{default:i.colors.primary,hover:i.colors.primary,disabled:i.colors.grey5}},textStyle:{color:i.colors.primary},style:{width:"239px",justifyContent:"center"},onClick:e,"data-testid":Z("add-to-google-wallet-button")})},zt=({onClick:e})=>{const i=Be();return t.jsx(Ct,{prefixIcon:t.jsx(no,{}),label:xr.cardDetails.addToAppleWallet,buttonColors:{borderColor:{default:i.colors.grey1,hover:i.colors.primary,disabled:i.colors.primary},backgroundColor:{default:i.colors.grey5,hover:i.colors.grey5,disabled:i.colors.grey5},textColor:{default:i.colors.primary,hover:i.colors.primary,disabled:i.colors.grey5}},textStyle:{color:i.colors.primary},style:{width:"239px",justifyContent:"center"},onClick:e,"data-testid":Z("add-to-apple-wallet-button")})},io=r.div`
2
2
  margin-top: ${a.sp4};
3
3
  display: flex;
4
4
  justify-content: center;
@@ -1,4 +1,4 @@
1
- import{b as St,Y as jt,fr as vt,l as M,fm as v,e as pe,R as Be,o as a,u as _e,j as t,aX as kt,fF as Pt,cV as A,v as C,bp as de,f as n,a0 as Tt,ab as ce,W as me,C as B,w as R,X as It,g as Mt,cs as At,aD as Fe,b6 as Rt,af as ue,a6 as Et,n as ge,q as T,d6 as Lt,r as Dt,y as zt,c7 as Nt,cr as Ot,aR as Bt}from"./index-DxZ9Uw7o.js";import{b as O,n as i,j as xe,k as _t}from"./vendor-rkTZJa59.js";import{Y as Ft}from"./SpendManagementSection-Ddoo9sSg-C6BGVA5R.js";import{ChargeCardPromoUserContent as Wt}from"./ChargeCardPromoPage-CMqzRnza-CJ_g_fWc.js";import{N as Ut,J as Yt}from"./PromoBaseCards-Bm6GGzhn-NcCsm_GX.js";import{O as Gt}from"./ChargeCardListTable-D7BV3Iv9-C5GhRKBn.js";import{r as Ht,i as Jt}from"./graphic-no-data-net-burn-l-CzmycA0m-DANomItj.js";import{t as Vt,o as qt}from"./arrow-south-east-round-PEovUgvH-D6oVD1ix.js";import"./mui-C42whWwM.js";import"./analytics-CcevxdRy.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-CK3r1iTV.js";import"./MeetingCalenderPopup-D10SioCO-1_HeRLgo.js";import"./NavigationDots-BZNvrGBo-Lo2Iyk3a.js";import"./usp-line-BBd1wKwW-u-VMxix8.js";import"./Menu-DV3oFAip-lRllgVp1.js";import"./RoleWithToolTip-B_Ivheco-CS2u-SUl.js";import"./CardNumberSubText-Chba_z2--CnmWtDil.js";import"./ChargeCardUtils-Bv0OpE88-aSHBcI_8.js";const be={infoSubheadingTextMarginTop:new B(T[0],T[0]),cardsMinWidth:new B(343,353)},ve=Be.getLocalizedStrings().spendManagement.chargeCard.chargeCardsPromo.listPage,ke=({cardPromoType:e,cardText:s,header:d,title:h,subTitle:r,slidingTextList:u,onClick:l})=>{const p=pe();return t.jsxs(Xt,{windowSize:p,cardPromoType:e,"data-testid":me("list-page-promo-card",e),onClick:()=>l(e),children:[t.jsxs(We,{children:[t.jsxs(Ye,{children:[t.jsx(Ue,{children:d}),t.jsx(ea,{children:h}),t.jsx(ia,{children:r})]}),t.jsxs(ra,{children:[t.jsx(na,{}),u.length>0&&t.jsx(he,{slideUpCount:u.length,children:u.map((g,x)=>t.jsx(Ge,{children:g},`card-promo-${x.toString()}`))}),t.jsx(oa,{})]})]}),t.jsx(sa,{children:t.jsx(Ut,{cardPromoType:e,cardText:s,shouldAnimate:!1,forDashboard:!1,showChip:!1,forListPage:!0})}),t.jsx(la,{children:t.jsx(Yt,{cardPromoType:e,cardText:s,shouldAnimate:!1,forDashboard:!1,showChip:!1,forListPage:!0})})]})},Pe=({cardType:e,header:s,title:d,creditLimit:h,onCreateNowClick:r})=>{const u=pe();return t.jsx(Kt,{windowSize:u,cardType:e,children:t.jsxs(Qt,{children:[t.jsxs(Ye,{children:[t.jsx(Ue,{children:s}),t.jsx(aa,{children:t.jsx(ta,{children:d})}),t.jsx(da,{windowSize:u,children:t.jsxs(ca,{windowSize:u,onClick:()=>r(e),"data-testid":me("total-cashback-info"),children:[t.jsx(Ge,{children:ve.createNow}),t.jsx(ha,{})]})})]}),e==="creditCard"?t.jsxs(pa,{children:[t.jsx(ma,{children:ve.creditLimit}),t.jsx(ua,{children:h})]}):null]})})},Zt=e=>{const s=e-1;let d=`
1
+ import{b as St,Y as jt,fr as vt,l as M,fm as v,e as pe,R as Be,o as a,u as _e,j as t,aX as kt,fF as Pt,cV as A,v as C,bp as de,f as n,a0 as Tt,ab as ce,W as me,C as B,w as R,X as It,g as Mt,cs as At,aD as Fe,b6 as Rt,af as ue,a6 as Et,n as ge,q as T,d6 as Lt,r as Dt,y as zt,c7 as Nt,cr as Ot,aR as Bt}from"./index-DVFYvj7P.js";import{b as O,n as i,j as xe,k as _t}from"./vendor-rkTZJa59.js";import{Y as Ft}from"./SpendManagementSection-CESND8ho-CRWiaZIA.js";import{ChargeCardPromoUserContent as Wt}from"./ChargeCardPromoPage-Bo2JJ5g4-CLbzwd3s.js";import{N as Ut,J as Yt}from"./PromoBaseCards-Bq-mwvkh-DjLYfAja.js";import{O as Gt}from"./ChargeCardListTable-mfIUvL0A-CPKekIhI.js";import{r as Ht,i as Jt}from"./graphic-no-data-net-burn-l-CzmycA0m-DANomItj.js";import{t as Vt,o as qt}from"./arrow-south-east-round-PEovUgvH-D6oVD1ix.js";import"./mui-C42whWwM.js";import"./analytics-CcevxdRy.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-CK3r1iTV.js";import"./MeetingCalenderPopup-DJHrBVXi-BogUsqxG.js";import"./NavigationDots-BiiEFlFj-zDNVZc4v.js";import"./usp-line-BBd1wKwW-u-VMxix8.js";import"./Menu-C3EXvt9P-B2-q6Czj.js";import"./RoleWithToolTip-BiydziFE-Q-xg-fVJ.js";import"./CardNumberSubText-uaXIushe-Bx2nZV75.js";import"./ChargeCardUtils-BEBqV4Ri-D_Hnspw1.js";const be={infoSubheadingTextMarginTop:new B(T[0],T[0]),cardsMinWidth:new B(343,353)},ve=Be.getLocalizedStrings().spendManagement.chargeCard.chargeCardsPromo.listPage,ke=({cardPromoType:e,cardText:s,header:d,title:h,subTitle:r,slidingTextList:u,onClick:l})=>{const p=pe();return t.jsxs(Xt,{windowSize:p,cardPromoType:e,"data-testid":me("list-page-promo-card",e),onClick:()=>l(e),children:[t.jsxs(We,{children:[t.jsxs(Ye,{children:[t.jsx(Ue,{children:d}),t.jsx(ea,{children:h}),t.jsx(ia,{children:r})]}),t.jsxs(ra,{children:[t.jsx(na,{}),u.length>0&&t.jsx(he,{slideUpCount:u.length,children:u.map((g,x)=>t.jsx(Ge,{children:g},`card-promo-${x.toString()}`))}),t.jsx(oa,{})]})]}),t.jsx(sa,{children:t.jsx(Ut,{cardPromoType:e,cardText:s,shouldAnimate:!1,forDashboard:!1,showChip:!1,forListPage:!0})}),t.jsx(la,{children:t.jsx(Yt,{cardPromoType:e,cardText:s,shouldAnimate:!1,forDashboard:!1,showChip:!1,forListPage:!0})})]})},Pe=({cardType:e,header:s,title:d,creditLimit:h,onCreateNowClick:r})=>{const u=pe();return t.jsx(Kt,{windowSize:u,cardType:e,children:t.jsxs(Qt,{children:[t.jsxs(Ye,{children:[t.jsx(Ue,{children:s}),t.jsx(aa,{children:t.jsx(ta,{children:d})}),t.jsx(da,{windowSize:u,children:t.jsxs(ca,{windowSize:u,onClick:()=>r(e),"data-testid":me("total-cashback-info"),children:[t.jsx(Ge,{children:ve.createNow}),t.jsx(ha,{})]})})]}),e==="creditCard"?t.jsxs(pa,{children:[t.jsx(ma,{children:ve.creditLimit}),t.jsx(ua,{children:h})]}):null]})})},Zt=e=>{const s=e-1;let d=`
2
2
  0% {
3
3
  transform: translateY(0);
4
4
  }
@@ -1,4 +1,4 @@
1
- import{j as i,bJ as $i,e as _,Y as ee,b as fi,u as de,fj as vi,i7 as Ci,i8 as yi,i9 as ji,W as b,R as V,bS as bi,v as re,f as y,aj as ki,b_ as Si,ia as Ii,ib as zi,o as t,bg as Li,a6 as Ri,C as p,eA as Pi,ap as Di,ic as Ui,a7 as Ni,az as Ti,w as F,fl as _i,q as a,dt as Vi,a0 as T,c0 as De,m as Ue,bp as le,bn as Oi,n as k,c3 as we,y as U,i1 as ue,b6 as Ne,be as Te,id as Ei,c6 as Wi,a8 as G,ie as Fi,ig as Mi}from"./index-DxZ9Uw7o.js";import{b as C,n as r,f as Ai,j as $e}from"./vendor-rkTZJa59.js";import{R as _e}from"./Menu-DV3oFAip-lRllgVp1.js";import{T as Ve}from"./RoleWithToolTip-B_Ivheco-CS2u-SUl.js";import{f as ce}from"./CardNumberSubText-Chba_z2--CnmWtDil.js";import{_ as Oe}from"./ChargeCardUtils-Bv0OpE88-aSHBcI_8.js";const M=V.getLocalizedStrings().spendManagement.chargeCard.cardList.header,Hi=V.getLocalizedStrings().common.strings.empty,fe={key:"owner",value:M.owner,sortOrder:"ascending",width:new p(120,120,160,200,200)},ve={key:"cardName",value:M.cardName,sortOrder:"ascending",width:new p(120,120,160,171,171)},Ce={key:"cardType",value:M.cardType,sortOrder:"ascending",width:new p(120,120,130,170,170)},ye={key:"status",value:M.status,sortOrder:"ascending",width:new p(115,115,125,132,132)},je={key:"utilisation",value:M.utilisation,sortOrder:"ascending",width:new p(a[11],a[11],a[11],a[12],120)},be={key:"limit",value:M.limit,sortOrder:"ascending",width:new p(68,68,68,a[11],100)},Ee=e=>e===!0?[{...fe,width:new p(0,0),value:Hi},ve,Ce,ye,je,be]:[fe,ve,Ce,ye,je,be],z={containerPaddingLeft:t.sp2,containerPaddingRight:t.sp3,containerPaddingTop:t.sp3,containerPaddingBottom:t.sp3,headerLastColumnTopPadding:new p(a[0],a[4]),headerLastColumnRightPadding:new p(a[3],a[11]),headerLastColumnBottomPadding:new p(a[0],a[4]),headerLastColumnLeftPadding:new p(a[3],a[11]),headerHeight:new p(Fi,Mi)};function Ki({companyNameSticky:e,sortConfig:o,showViewForCardUser:n,onColumnSortConfigChanged:h}){const d=de(),l=_(),m=!!ee().loggedInUserRole.includes("charge_card_user")||n,[c,w]=C.useState(Ee(m));C.useEffect(()=>{const s=[...c];for(const g of s)g.key===o.sortKey?g.sortOrder=o.sortOrder:g.sortOrder="ascending";w(s)},[o.sortKey,o.sortOrder]);const u=(s,g)=>{let f=g;o.sortKey===s&&(f=g==="ascending"?"descending":"ascending"),h(s,f)},$=c.find(s=>s.key===o.sortKey)??(m?c[1]:c[0]),S=s=>c.find(g=>g.key===s)?.value??"",x=(m?c.filter(s=>s.key!=="owner"):c).map(s=>s.key),j=V.getLocalizedStrings().spendManagement.chargeCard.cardList;return l==="small"?i.jsxs(Yi,{windowSize:l,children:[i.jsxs(Xi,{children:[i.jsx(et,{children:i.jsx(Zi,{})}),i.jsx(Oi,{title:j.sortBy,placeholder:j.sortBy,pickerValues:x,valueToLabel:S,selectedValue:o.sortKey,onPickerSelectionChanged:s=>{u(s,"ascending")},optionTextStyle:re.extraSmallRegular,titleTextStyle:re.extraSmallRegular,titleColor:d.colors.primary,selectedOptionColor:d.colors.hero,optionBackgroundColor:d.colors.grey5,downChevronVisible:!1,backgroundColor:d.colors.grey4})]}),i.jsxs(rt,{onClick:()=>u($.key,$.sortOrder),"data-testid":b("mobile-cards-list-sort-clicked",o.sortKey),children:[i.jsx(k,{children:$.value}),i.jsx(ke,{windowSize:l,sortDataValue:o.sortKey,headerdata:$,children:i.jsx(Se,{windowSize:l,children:i.jsx(we,{})})})]})]}):i.jsx(qi,{windowSize:l,children:i.jsx(Qi,{children:c.map(s=>s.width.value(l)!==0&&i.jsxs(Ji,{companyNameSticky:e,sortDataValue:o.sortKey,actualDataValue:s.key,wrapperWidth:s.width,windowSize:l,children:[i.jsxs(tt,{onClick:()=>u(s.key,s.sortOrder),"data-testid":b("cards-list-sort-clicked",o.sortKey),children:[i.jsx(k,{children:s.value}),i.jsx(ke,{windowSize:l,sortDataValue:o.sortKey,headerdata:s,children:i.jsx(Se,{windowSize:l,children:i.jsx(we,{})})})]}),i.jsx(it,{sortDataValue:o.sortKey,windowSize:l,isVisible:o.sortKey===s.key&&(m?s.key!=="cardName":s.key!=="owner"),children:i.jsx(Gi,{onClick:()=>u(m?"cardName":"owner","ascending"),"data-testid":b("cards-list-sort-cancel",o.sortKey)})})]},s.key))})})}const Bi=Ai.memo(Ki),qi=r.div`
1
+ import{j as i,bJ as $i,e as _,Y as ee,b as fi,u as de,fj as vi,i7 as Ci,i8 as yi,i9 as ji,W as b,R as V,bS as bi,v as re,f as y,aj as ki,b_ as Si,ia as Ii,ib as zi,o as t,bg as Li,a6 as Ri,C as p,eA as Pi,ap as Di,ic as Ui,a7 as Ni,az as Ti,w as F,fl as _i,q as a,dt as Vi,a0 as T,c0 as De,m as Ue,bp as le,bn as Oi,n as k,c3 as we,y as U,i1 as ue,b6 as Ne,be as Te,id as Ei,c6 as Wi,a8 as G,ie as Fi,ig as Mi}from"./index-DVFYvj7P.js";import{b as C,n as r,f as Ai,j as $e}from"./vendor-rkTZJa59.js";import{R as _e}from"./Menu-C3EXvt9P-B2-q6Czj.js";import{T as Ve}from"./RoleWithToolTip-BiydziFE-Q-xg-fVJ.js";import{f as ce}from"./CardNumberSubText-uaXIushe-Bx2nZV75.js";import{_ as Oe}from"./ChargeCardUtils-BEBqV4Ri-D_Hnspw1.js";const M=V.getLocalizedStrings().spendManagement.chargeCard.cardList.header,Hi=V.getLocalizedStrings().common.strings.empty,fe={key:"owner",value:M.owner,sortOrder:"ascending",width:new p(120,120,160,200,200)},ve={key:"cardName",value:M.cardName,sortOrder:"ascending",width:new p(120,120,160,171,171)},Ce={key:"cardType",value:M.cardType,sortOrder:"ascending",width:new p(120,120,130,170,170)},ye={key:"status",value:M.status,sortOrder:"ascending",width:new p(115,115,125,132,132)},je={key:"utilisation",value:M.utilisation,sortOrder:"ascending",width:new p(a[11],a[11],a[11],a[12],120)},be={key:"limit",value:M.limit,sortOrder:"ascending",width:new p(68,68,68,a[11],100)},Ee=e=>e===!0?[{...fe,width:new p(0,0),value:Hi},ve,Ce,ye,je,be]:[fe,ve,Ce,ye,je,be],z={containerPaddingLeft:t.sp2,containerPaddingRight:t.sp3,containerPaddingTop:t.sp3,containerPaddingBottom:t.sp3,headerLastColumnTopPadding:new p(a[0],a[4]),headerLastColumnRightPadding:new p(a[3],a[11]),headerLastColumnBottomPadding:new p(a[0],a[4]),headerLastColumnLeftPadding:new p(a[3],a[11]),headerHeight:new p(Fi,Mi)};function Ki({companyNameSticky:e,sortConfig:o,showViewForCardUser:n,onColumnSortConfigChanged:h}){const d=de(),l=_(),m=!!ee().loggedInUserRole.includes("charge_card_user")||n,[c,w]=C.useState(Ee(m));C.useEffect(()=>{const s=[...c];for(const g of s)g.key===o.sortKey?g.sortOrder=o.sortOrder:g.sortOrder="ascending";w(s)},[o.sortKey,o.sortOrder]);const u=(s,g)=>{let f=g;o.sortKey===s&&(f=g==="ascending"?"descending":"ascending"),h(s,f)},$=c.find(s=>s.key===o.sortKey)??(m?c[1]:c[0]),S=s=>c.find(g=>g.key===s)?.value??"",x=(m?c.filter(s=>s.key!=="owner"):c).map(s=>s.key),j=V.getLocalizedStrings().spendManagement.chargeCard.cardList;return l==="small"?i.jsxs(Yi,{windowSize:l,children:[i.jsxs(Xi,{children:[i.jsx(et,{children:i.jsx(Zi,{})}),i.jsx(Oi,{title:j.sortBy,placeholder:j.sortBy,pickerValues:x,valueToLabel:S,selectedValue:o.sortKey,onPickerSelectionChanged:s=>{u(s,"ascending")},optionTextStyle:re.extraSmallRegular,titleTextStyle:re.extraSmallRegular,titleColor:d.colors.primary,selectedOptionColor:d.colors.hero,optionBackgroundColor:d.colors.grey5,downChevronVisible:!1,backgroundColor:d.colors.grey4})]}),i.jsxs(rt,{onClick:()=>u($.key,$.sortOrder),"data-testid":b("mobile-cards-list-sort-clicked",o.sortKey),children:[i.jsx(k,{children:$.value}),i.jsx(ke,{windowSize:l,sortDataValue:o.sortKey,headerdata:$,children:i.jsx(Se,{windowSize:l,children:i.jsx(we,{})})})]})]}):i.jsx(qi,{windowSize:l,children:i.jsx(Qi,{children:c.map(s=>s.width.value(l)!==0&&i.jsxs(Ji,{companyNameSticky:e,sortDataValue:o.sortKey,actualDataValue:s.key,wrapperWidth:s.width,windowSize:l,children:[i.jsxs(tt,{onClick:()=>u(s.key,s.sortOrder),"data-testid":b("cards-list-sort-clicked",o.sortKey),children:[i.jsx(k,{children:s.value}),i.jsx(ke,{windowSize:l,sortDataValue:o.sortKey,headerdata:s,children:i.jsx(Se,{windowSize:l,children:i.jsx(we,{})})})]}),i.jsx(it,{sortDataValue:o.sortKey,windowSize:l,isVisible:o.sortKey===s.key&&(m?s.key!=="cardName":s.key!=="owner"),children:i.jsx(Gi,{onClick:()=>u(m?"cardName":"owner","ascending"),"data-testid":b("cards-list-sort-cancel",o.sortKey)})})]},s.key))})})}const Bi=Ai.memo(Ki),qi=r.div`
2
2
  top: ${t.sp0};
3
3
  left: ${t.sp0};
4
4
  z-index: 2;
@@ -1,4 +1,4 @@
1
- import{e as b,R as oe,j as r,u as X,Y as $e,b as ye,a2 as be,a0 as je,l as Se,fr as Te,aX as ze,Q as K,W as ee,o as t,c7 as ve,T as O,c8 as Pe,r as ke,C as x,bW as Be,bp as Ae,i5 as Ie,w as Re,q as g,X as j,f as $,ap as Le,a7 as Me,i6 as _e}from"./index-DxZ9Uw7o.js";import{b as S,n as a,j as Ee,k as De}from"./vendor-rkTZJa59.js";import{x as Fe}from"./MeetingCalenderPopup-D10SioCO-1_HeRLgo.js";import{k as Ue}from"./NavigationDots-BZNvrGBo-Lo2Iyk3a.js";import{J as H,N as G}from"./PromoBaseCards-Bm6GGzhn-NcCsm_GX.js";import{M as L}from"./usp-line-BBd1wKwW-u-VMxix8.js";import"./mui-C42whWwM.js";import"./analytics-CcevxdRy.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-CK3r1iTV.js";const h={containerPaddingTopBottom:new x(g[0],g[0]),uspContainerMarginX:new x(g[6],g[0]),midContainerGap:new x(g[4],84),iconContainerMinHeight:new x(236,396),emptySectionHeight:new x(g[6],43),navigationBottom:new x(g[4],94),navigationLeft:new x(192,244),carouselHeight:new x(268,396),carouselMarginTop:new x(54,g[4]),carouselMarginLeft:new x(120,g[12]),buttonTrayGap:new x(g[3],g[5]),termsOfAgreementMarginTop:new x(g[5],g[10]),contactAdminContainerMarginTop:new x(g[0],g[10]),contactAdminContainerMarginBottom:new x(g[4],g[0]),contactAdminContainerMarginLeftRight:new x(g[3],g[0])},T={promoBadgeText:new j("standardRegular","largeRegular"),promoBadgeTextBold:new j("standardBold","largeBold"),cardsContent:new j("extraSmallRegular","smallRegular"),contactAdmin:new j("extraSmallRegular","largeRegular"),uspText:new j("smallRegular","standardRegular"),uspBoldText:new j("smallMedium","standardMedium")},{common:U,spendManagement:{chargeCard:{chargeCardsPromo:o}}}=oe.getLocalizedStrings(),Rr=({meetingUrl:e,companyLegalName:s,chargeCardSetupView:i,showEnableCardButton:n,controllerEmails:p,isCreditCardProductVisible:m,isDebitCardFeatureEnabled:c,isDebitCardSetupEnabled:w,isChargeCardSetupEnabled:f,admins:v,cashbackRate:P,cardPromoType:u="credit",onSetupButtonClick:l,onBackClick:d,onClickMenuIcon:pe,onSetupChargeCardSuccess:W,onExpressInterestClick:me})=>{const ge=X(),Q=$e(),z=b(),q=ye().analytics,{chargeCardTermsDetails:M,companyChargeCardInfo:C,companyLocaleInfo:_}=i,J=be(M?.fetchStatus.fetchState),[he,V]=S.useState(!1),xe=()=>{q.trackCardsPromoPageClicked("schedule demo"),q.trackCardsScheduleDemoClick(p,{isCreditCardOffered:m,isDebitCardOffered:c,isDebitCardEnabled:w,isCreditCardEnabled:f},"Cards Promo"),V(!0)},ue=C!=null&&_!=null?je("0,0",{amount:C.chargeCardsCreditAccountLimit,currencyCode:_.currencyCode,currencySymbol:_.currencySymbol}):void 0;S.useEffect(()=>{J==="In-Progress"&&M?.fetchStatus.fetchState==="Completed"&&W()},[J,W,M?.fetchStatus]);const Y=Se.hasChargeCardAdminLevelAccess(Q.loggedInUserRoleMap),we=Te(Q),E=u==="credit"&&C?.isCompanyInterestedInChargeCard===!1&&C.chargeCardsCreditAccountLimit===0,D=u==="credit"&&C?.isCompanyInterestedInChargeCard===!0&&C.chargeCardsCreditAccountLimit===-1,F=u==="credit"&&C?.isCompanyInterestedInChargeCard===!0&&C.chargeCardsCreditAccountLimit===0,fe=u==="credit"&&C?.isCompanyInterestedInChargeCard===!0&&C.chargeCardsCreditAccountLimit>0,{expressInterestInChargeCardFetchState:Ce}=i,Z=E?o.getPreApprovedNow:n?o.enableCardsButton:o.setupCardsButton;return r.jsxs(We,{children:[r.jsx(ze,{title:o.title[u],backgroundColor:ge.colors.grey4,onBackClick:d,showBackButton:!0,showMenuIcon:z==="medium-compact"||z==="small",onClickMenuIcon:pe,style:{zIndex:9},source:"ChargeCardPromoPage"}),he===!0?r.jsx(Fe,{onCancelClick:()=>{V(!1)},meetingUrl:e}):null,r.jsx(Ve,{windowSize:z,children:Y===!0?r.jsxs(Je,{children:[r.jsxs(qe,{children:[r.jsx(He,{isApproved:fe,creditAmount:ue,cardPromoType:u,isUnderReview:F,isRejected:D,showExpressInterest:E}),r.jsx(ne,{cardPromoType:u,cashbackRate:P})]}),r.jsx(ae,{showEnableCardButton:n,cardPromoType:u,isUnderReview:F,isRejected:D,showExpressInterest:E})]}):r.jsx(Ge,{companyLegalName:s,cards:[],admins:v,cashbackRate:P,hasZeniFinopsRoles:we,cardPromoType:u})}),Y&&!(F||D)?r.jsxs(ir,{windowSize:z,children:[r.jsx(K,{variant:"secondary",label:o.scheduleDemoButton,style:{width:166},onClick:xe,"data-testid":ee("schedule-demo-button")}),r.jsx(Qe,{windowSize:z,children:o.orText}),r.jsx(K,{variant:"primary",label:Z,style:{minWidth:166},loading:i.chargeCardTermsDetails?.fetchStatus.fetchState==="In-Progress"||Ce==="In-Progress",onClick:Z===o.getPreApprovedNow?me:()=>l(u),"data-testid":ee("enable-card-button")})]}):null]})},Ne=({admins:e})=>{const s=e.flatMap(n=>n.user?.firstName+" "+n.user?.lastName).join(", "),i=b();return r.jsxs(pr,{windowSize:i,children:[r.jsx(N,{underline:!1,windowSize:i,children:o.noCardAssigned.pre}),r.jsx(Ae,{title:s,placement:"top-start",style:{padding:`2px ${t.sp2}`},children:r.jsx(N,{underline:!0,windowSize:i,children:o.noCardAssigned.tooltip})}),r.jsx(N,{underline:!1,windowSize:i,children:o.noCardAssigned.post})]})},ae=({cardPromoType:e,showEnableCardButton:s,isUnderReview:i,isRejected:n,showExpressInterest:p,isCardUser:m=!1})=>{const c=b();return r.jsx(tr,{windowSize:c,children:r.jsx(Ie,{topTermLabel:e==="credit"||e==="debit_and_credit"?o.terms.checkingAccountTerm:void 0,buttonTermLabel:i===!0||n===!0||m===!0?void 0:p===!0?o.terms.approvalTerm:s?o.terms.alternateTerm1:o.terms.terms1,showEndIcon:!1,showTerms:n===!1||m===!1,style:{marginTop:h.termsOfAgreementMarginTop.valuePx(c)}})})},He=({isApproved:e,cardPromoType:s,creditAmount:i,isUnderReview:n,isRejected:p,showExpressInterest:m})=>{const c=b(),w=s==="debit_and_credit"?o.promoTextDebitCreditCard:s==="debit"?o.promoTextDebitCard:o.promoTextCreditCard,f=e?r.jsxs(r.Fragment,{children:[o.promoBadgeText.approved,r.jsx(te,{children:i}),o.creditLimit,U.strings.space]}):m?r.jsxs(r.Fragment,{children:[o.promoBadgeText.nonPreApproved.get,r.jsx(er,{children:o.promoBadgeText.nonPreApproved.scale}),o.promoBadgeText.nonPreApproved.doubleStarred,U.strings.space,o.promoBadgeText.nonPreApproved.higherLimits]}):n?o.promoBadgeText.underReview:p?o.promoBadgeText.rejected:r.jsxs(r.Fragment,{children:[o.promoBadgeText.preApproved,r.jsx(te,{children:i}),o.creditLimit,U.strings.space]});return r.jsxs(r.Fragment,{children:[r.jsx(r.Fragment,{children:c==="small"?r.jsxs(r.Fragment,{children:[r.jsx(le,{children:w}),r.jsx(ce,{children:o.promoSubText})]}):r.jsxs(r.Fragment,{children:[r.jsx(se,{children:w}),r.jsx(de,{children:o.promoSubText})]})}),r.jsxs(Ze,{cardPromoType:s,hideBadge:i==null||s==="debit",windowSize:c,children:[n||p||m?null:r.jsx(Cr,{}),r.jsx(Ke,{windowSize:c,children:f})]})]})},Ge=({companyLegalName:e,cards:s,admins:i,cashbackRate:n,hasZeniFinopsRoles:p,cardPromoType:m="credit"})=>{const c=b(),w=m==="debit_and_credit"?o.promoTextDebitCreditCard:m==="debit"?o.promoTextDebitCard:o.promoTextCreditCard;return r.jsxs(r.Fragment,{children:[c==="small"?r.jsxs(r.Fragment,{children:[r.jsx(le,{children:w}),r.jsx(ce,{children:o.promoSubText})]}):r.jsxs(r.Fragment,{children:[r.jsx(se,{children:w}),r.jsx(de,{children:o.promoSubText})]}),s.length===0?r.jsx(cr,{windowSize:c}):r.jsx(Xe,{cards:s,companyLegalName:e}),r.jsx(ne,{cardPromoType:m,cashbackRate:n}),p?null:r.jsx(Ne,{admins:i}),r.jsx(ae,{isCardUser:!0,showEnableCardButton:!1,cardPromoType:m})]})},Xe=({cards:e,companyLegalName:s})=>{const i=X(),n=b();let p="",m;if(e.length===1){m=e[0].cardCreatedByUser.photo;const c=e[0].cardCreatedByUser.firstName+" "+e[0].cardCreatedByUser.lastName;p=o.cardAssigned.singleCreditCard.replace("__issuing-user__",c).replace("__company-name__",s)}else p=o.cardAssigned.multipleCreditCards.replace("__company-name__",s);return r.jsxs(gr,{children:[m!=null?r.jsx(Ye,{width:t.sp5,height:t.sp5,style:{paddingTop:n==="small"?t.sp1:t.sp0},src:m.href,alt:oe.getLocalizedStrings().cockpit.userProfileAltText,onError:({currentTarget:c})=>{c.onerror=null,c.src=Be},loading:"lazy"}):null,r.jsx(mr,{windowSize:n,mode:i.mode,children:r.jsx(hr,{windowSize:n,children:p})})]})},re=({windowSize:e,cardPromoType:s})=>{let i=o.businessText;return s==="debit"&&(i=`${i} ${o.debit}`),r.jsx(r.Fragment,{children:s==="debit_and_credit"?r.jsx(Oe,{}):r.jsxs(ar,{windowSize:e,children:[r.jsx(H,{cardPromoType:s,cardText:i,shouldAnimate:!0,showChip:!0,forDashboard:!1,forListPage:!1}),r.jsx(G,{cardPromoType:s,cardText:i,showChip:!0,forDashboard:!1,shouldAnimate:!0,forListPage:!1})]})})},ne=({cardPromoType:e,cashbackRate:s})=>{const i=b(),n=o.benefits;return r.jsxs(rr,{windowSize:i,children:[i==="small"?r.jsx(re,{windowSize:i,cardPromoType:e}):null,r.jsxs(or,{windowSize:i,children:[r.jsxs(B,{windowSize:i,children:[r.jsx(I,{children:r.jsx(dr,{})}),r.jsxs(R,{children:[r.jsx(y,{windowSize:i,children:n.item1.pre}),r.jsx(A,{windowSize:i,children:n.item1.bold.replace("__cashback__",(s*100).toFixed(2))}),r.jsx(y,{windowSize:i,children:`${e==="credit"||e==="debit_and_credit"?n.singleStarred:""}${n.item1.post}`})]})]}),r.jsxs(B,{windowSize:i,children:[r.jsx(I,{children:r.jsx(nr,{})}),r.jsxs(R,{children:[r.jsx(y,{windowSize:i,children:n.item2.pre}),r.jsx(A,{windowSize:i,children:n.item2.bold}),r.jsx(y,{windowSize:i,children:n.item2.post})]})]}),r.jsxs(B,{windowSize:i,children:[r.jsx(I,{children:r.jsx(lr,{})}),r.jsxs(R,{children:[r.jsx(y,{windowSize:i,children:n.item3.pre}),r.jsx(A,{windowSize:i,children:n.item3.bold}),r.jsx(y,{windowSize:i,children:n.item3.post})]})]}),r.jsxs(B,{windowSize:i,children:[r.jsx(I,{children:r.jsx(sr,{})}),r.jsxs(R,{children:[r.jsx(y,{windowSize:i,children:n.item4.pre}),r.jsx(A,{windowSize:i,children:n.item4.bold}),r.jsx(y,{windowSize:i,children:n.item4.post})]})]})]}),i==="small"?null:r.jsx(re,{windowSize:i,cardPromoType:e})]})};let k;const Oe=()=>{const e=b(),s=X(),[i,n]=S.useState(0),[p,m]=S.useState(!1),c=o.businessText,w=`${c} ${o.debit}`,f=[{id:1,cardType:"debit",cardText:w},{id:2,cardType:"debit",cardText:w},{id:3,cardType:"credit",cardText:c},{id:4,cardType:"credit",cardText:c}];S.useEffect(()=>(p||(k=setInterval(()=>{n(l=>{const d=l+1;return d===f.length?(m(!0),0):d})},2e3)),()=>clearInterval(k)),[p,f.length]),S.useEffect(()=>{p&&k!=null&&clearInterval(k)},[p]);const v=(l,d)=>{switch((l-i+f.length)%f.length){case 0:return{transform:`translate(0,${d?"100%":0}) scale(1)`,zIndex:d?5:6,opacity:1,transition:"transform 0.4s"};case 1:return{transform:`translate(35%, ${d?"80%":"5%"}) scale(0.75)`,zIndex:d?4:5,opacity:1,transition:"all 0.4s"};case 2:return{transform:`translate(35%,${d?"80%":"5%"}) scale(0.75)`,zIndex:d?3:4,opacity:0,transition:"transform 0.4s 0.2s, opacity 0.4s 0.0s"};case 3:return{transform:`translate(-35%, ${d?"80%":"5%"}) scale(0.75)`,zIndex:d?4:5,opacity:1,transition:"all 0.4s"};default:return}},P=l=>{const d=v(l,!0);return{...d,transform:`${d?.transform} scaleY(-1)`,opacity:1,transition:"transform 0s 0s, z-index 0s 0s"}},u=l=>{p||m(!0),n(l)};return r.jsxs(xr,{windowSize:e,children:[r.jsx(ur,{windowSize:e,children:f.map((l,d)=>r.jsxs(wr,{children:[r.jsx(ie,{isReflection:!1,style:{...v(d,!1)},onClick:()=>u(d),children:d===0||d===2?r.jsx(H,{cardPromoType:l.cardType,cardText:l.cardText,shouldAnimate:!1,showChip:!0,forDashboard:!1,forListPage:!1,style:{borderColor:s.colors.grey2,...s.mode==="light"&&{borderBottom:"none"}}}):r.jsx(G,{cardPromoType:l.cardType,cardText:l.cardText,shouldAnimate:!1,showChip:!0,forDashboard:!1,forListPage:!1,style:{borderColor:s.colors.grey2,...s.mode==="light"&&{borderBottom:"none"}}})},l.id),r.jsx(ie,{isReflection:!0,style:{...P(d)},children:d===0||d===2?r.jsx(H,{cardPromoType:l.cardType,cardText:l.cardText,shouldAnimate:!1,forDashboard:!1,showChip:!0,forListPage:!1,style:{border:"none",opacity:.1,maskImage:"linear-gradient(to top, black, transparent 90%)",WebkitMaskImage:"linear-gradient(to top, black, transparent 90%)"}}):r.jsx(G,{cardPromoType:l.cardType,cardText:l.cardText,showChip:!0,shouldAnimate:!1,forDashboard:!1,forListPage:!1,style:{border:"none",opacity:.1,maskImage:"linear-gradient(to top, black, transparent)",WebkitMaskImage:"linear-gradient(to top, black, transparent)"}})},`reflection-${l.id}`)]},l.id))}),p&&r.jsx(Ue,{numberOfDots:f.length,activeIndex:i,handleClick:n,promoColor:s.colors.primary,promoColorHover:s.colors.grey5,spendManagementPromoCardActive:!0,dotStyle:{width:t.sp2,height:t.sp2},style:{cursor:"default",position:"absolute",bottom:h.navigationBottom.valuePx(e),left:h.navigationLeft.valuePx(e),zIndex:7}})]})},We=a.div`
1
+ import{e as b,R as oe,j as r,u as X,Y as $e,b as ye,a2 as be,a0 as je,l as Se,fr as Te,aX as ze,Q as K,W as ee,o as t,c7 as ve,T as O,c8 as Pe,r as ke,C as x,bW as Be,bp as Ae,i5 as Ie,w as Re,q as g,X as j,f as $,ap as Le,a7 as Me,i6 as _e}from"./index-DVFYvj7P.js";import{b as S,n as a,j as Ee,k as De}from"./vendor-rkTZJa59.js";import{x as Fe}from"./MeetingCalenderPopup-DJHrBVXi-BogUsqxG.js";import{k as Ue}from"./NavigationDots-BiiEFlFj-zDNVZc4v.js";import{J as H,N as G}from"./PromoBaseCards-Bq-mwvkh-DjLYfAja.js";import{M as L}from"./usp-line-BBd1wKwW-u-VMxix8.js";import"./mui-C42whWwM.js";import"./analytics-CcevxdRy.js";import"./routing-VwiwPky5.js";import"./sentry-osuhWjvS.js";import"./redux-2gfZRks6.js";import"./liveblocks-CP09Cz-7.js";import"./crypto-CK3r1iTV.js";const h={containerPaddingTopBottom:new x(g[0],g[0]),uspContainerMarginX:new x(g[6],g[0]),midContainerGap:new x(g[4],84),iconContainerMinHeight:new x(236,396),emptySectionHeight:new x(g[6],43),navigationBottom:new x(g[4],94),navigationLeft:new x(192,244),carouselHeight:new x(268,396),carouselMarginTop:new x(54,g[4]),carouselMarginLeft:new x(120,g[12]),buttonTrayGap:new x(g[3],g[5]),termsOfAgreementMarginTop:new x(g[5],g[10]),contactAdminContainerMarginTop:new x(g[0],g[10]),contactAdminContainerMarginBottom:new x(g[4],g[0]),contactAdminContainerMarginLeftRight:new x(g[3],g[0])},T={promoBadgeText:new j("standardRegular","largeRegular"),promoBadgeTextBold:new j("standardBold","largeBold"),cardsContent:new j("extraSmallRegular","smallRegular"),contactAdmin:new j("extraSmallRegular","largeRegular"),uspText:new j("smallRegular","standardRegular"),uspBoldText:new j("smallMedium","standardMedium")},{common:U,spendManagement:{chargeCard:{chargeCardsPromo:o}}}=oe.getLocalizedStrings(),Rr=({meetingUrl:e,companyLegalName:s,chargeCardSetupView:i,showEnableCardButton:n,controllerEmails:p,isCreditCardProductVisible:m,isDebitCardFeatureEnabled:c,isDebitCardSetupEnabled:w,isChargeCardSetupEnabled:f,admins:v,cashbackRate:P,cardPromoType:u="credit",onSetupButtonClick:l,onBackClick:d,onClickMenuIcon:pe,onSetupChargeCardSuccess:W,onExpressInterestClick:me})=>{const ge=X(),Q=$e(),z=b(),q=ye().analytics,{chargeCardTermsDetails:M,companyChargeCardInfo:C,companyLocaleInfo:_}=i,J=be(M?.fetchStatus.fetchState),[he,V]=S.useState(!1),xe=()=>{q.trackCardsPromoPageClicked("schedule demo"),q.trackCardsScheduleDemoClick(p,{isCreditCardOffered:m,isDebitCardOffered:c,isDebitCardEnabled:w,isCreditCardEnabled:f},"Cards Promo"),V(!0)},ue=C!=null&&_!=null?je("0,0",{amount:C.chargeCardsCreditAccountLimit,currencyCode:_.currencyCode,currencySymbol:_.currencySymbol}):void 0;S.useEffect(()=>{J==="In-Progress"&&M?.fetchStatus.fetchState==="Completed"&&W()},[J,W,M?.fetchStatus]);const Y=Se.hasChargeCardAdminLevelAccess(Q.loggedInUserRoleMap),we=Te(Q),E=u==="credit"&&C?.isCompanyInterestedInChargeCard===!1&&C.chargeCardsCreditAccountLimit===0,D=u==="credit"&&C?.isCompanyInterestedInChargeCard===!0&&C.chargeCardsCreditAccountLimit===-1,F=u==="credit"&&C?.isCompanyInterestedInChargeCard===!0&&C.chargeCardsCreditAccountLimit===0,fe=u==="credit"&&C?.isCompanyInterestedInChargeCard===!0&&C.chargeCardsCreditAccountLimit>0,{expressInterestInChargeCardFetchState:Ce}=i,Z=E?o.getPreApprovedNow:n?o.enableCardsButton:o.setupCardsButton;return r.jsxs(We,{children:[r.jsx(ze,{title:o.title[u],backgroundColor:ge.colors.grey4,onBackClick:d,showBackButton:!0,showMenuIcon:z==="medium-compact"||z==="small",onClickMenuIcon:pe,style:{zIndex:9},source:"ChargeCardPromoPage"}),he===!0?r.jsx(Fe,{onCancelClick:()=>{V(!1)},meetingUrl:e}):null,r.jsx(Ve,{windowSize:z,children:Y===!0?r.jsxs(Je,{children:[r.jsxs(qe,{children:[r.jsx(He,{isApproved:fe,creditAmount:ue,cardPromoType:u,isUnderReview:F,isRejected:D,showExpressInterest:E}),r.jsx(ne,{cardPromoType:u,cashbackRate:P})]}),r.jsx(ae,{showEnableCardButton:n,cardPromoType:u,isUnderReview:F,isRejected:D,showExpressInterest:E})]}):r.jsx(Ge,{companyLegalName:s,cards:[],admins:v,cashbackRate:P,hasZeniFinopsRoles:we,cardPromoType:u})}),Y&&!(F||D)?r.jsxs(ir,{windowSize:z,children:[r.jsx(K,{variant:"secondary",label:o.scheduleDemoButton,style:{width:166},onClick:xe,"data-testid":ee("schedule-demo-button")}),r.jsx(Qe,{windowSize:z,children:o.orText}),r.jsx(K,{variant:"primary",label:Z,style:{minWidth:166},loading:i.chargeCardTermsDetails?.fetchStatus.fetchState==="In-Progress"||Ce==="In-Progress",onClick:Z===o.getPreApprovedNow?me:()=>l(u),"data-testid":ee("enable-card-button")})]}):null]})},Ne=({admins:e})=>{const s=e.flatMap(n=>n.user?.firstName+" "+n.user?.lastName).join(", "),i=b();return r.jsxs(pr,{windowSize:i,children:[r.jsx(N,{underline:!1,windowSize:i,children:o.noCardAssigned.pre}),r.jsx(Ae,{title:s,placement:"top-start",style:{padding:`2px ${t.sp2}`},children:r.jsx(N,{underline:!0,windowSize:i,children:o.noCardAssigned.tooltip})}),r.jsx(N,{underline:!1,windowSize:i,children:o.noCardAssigned.post})]})},ae=({cardPromoType:e,showEnableCardButton:s,isUnderReview:i,isRejected:n,showExpressInterest:p,isCardUser:m=!1})=>{const c=b();return r.jsx(tr,{windowSize:c,children:r.jsx(Ie,{topTermLabel:e==="credit"||e==="debit_and_credit"?o.terms.checkingAccountTerm:void 0,buttonTermLabel:i===!0||n===!0||m===!0?void 0:p===!0?o.terms.approvalTerm:s?o.terms.alternateTerm1:o.terms.terms1,showEndIcon:!1,showTerms:n===!1||m===!1,style:{marginTop:h.termsOfAgreementMarginTop.valuePx(c)}})})},He=({isApproved:e,cardPromoType:s,creditAmount:i,isUnderReview:n,isRejected:p,showExpressInterest:m})=>{const c=b(),w=s==="debit_and_credit"?o.promoTextDebitCreditCard:s==="debit"?o.promoTextDebitCard:o.promoTextCreditCard,f=e?r.jsxs(r.Fragment,{children:[o.promoBadgeText.approved,r.jsx(te,{children:i}),o.creditLimit,U.strings.space]}):m?r.jsxs(r.Fragment,{children:[o.promoBadgeText.nonPreApproved.get,r.jsx(er,{children:o.promoBadgeText.nonPreApproved.scale}),o.promoBadgeText.nonPreApproved.doubleStarred,U.strings.space,o.promoBadgeText.nonPreApproved.higherLimits]}):n?o.promoBadgeText.underReview:p?o.promoBadgeText.rejected:r.jsxs(r.Fragment,{children:[o.promoBadgeText.preApproved,r.jsx(te,{children:i}),o.creditLimit,U.strings.space]});return r.jsxs(r.Fragment,{children:[r.jsx(r.Fragment,{children:c==="small"?r.jsxs(r.Fragment,{children:[r.jsx(le,{children:w}),r.jsx(ce,{children:o.promoSubText})]}):r.jsxs(r.Fragment,{children:[r.jsx(se,{children:w}),r.jsx(de,{children:o.promoSubText})]})}),r.jsxs(Ze,{cardPromoType:s,hideBadge:i==null||s==="debit",windowSize:c,children:[n||p||m?null:r.jsx(Cr,{}),r.jsx(Ke,{windowSize:c,children:f})]})]})},Ge=({companyLegalName:e,cards:s,admins:i,cashbackRate:n,hasZeniFinopsRoles:p,cardPromoType:m="credit"})=>{const c=b(),w=m==="debit_and_credit"?o.promoTextDebitCreditCard:m==="debit"?o.promoTextDebitCard:o.promoTextCreditCard;return r.jsxs(r.Fragment,{children:[c==="small"?r.jsxs(r.Fragment,{children:[r.jsx(le,{children:w}),r.jsx(ce,{children:o.promoSubText})]}):r.jsxs(r.Fragment,{children:[r.jsx(se,{children:w}),r.jsx(de,{children:o.promoSubText})]}),s.length===0?r.jsx(cr,{windowSize:c}):r.jsx(Xe,{cards:s,companyLegalName:e}),r.jsx(ne,{cardPromoType:m,cashbackRate:n}),p?null:r.jsx(Ne,{admins:i}),r.jsx(ae,{isCardUser:!0,showEnableCardButton:!1,cardPromoType:m})]})},Xe=({cards:e,companyLegalName:s})=>{const i=X(),n=b();let p="",m;if(e.length===1){m=e[0].cardCreatedByUser.photo;const c=e[0].cardCreatedByUser.firstName+" "+e[0].cardCreatedByUser.lastName;p=o.cardAssigned.singleCreditCard.replace("__issuing-user__",c).replace("__company-name__",s)}else p=o.cardAssigned.multipleCreditCards.replace("__company-name__",s);return r.jsxs(gr,{children:[m!=null?r.jsx(Ye,{width:t.sp5,height:t.sp5,style:{paddingTop:n==="small"?t.sp1:t.sp0},src:m.href,alt:oe.getLocalizedStrings().cockpit.userProfileAltText,onError:({currentTarget:c})=>{c.onerror=null,c.src=Be},loading:"lazy"}):null,r.jsx(mr,{windowSize:n,mode:i.mode,children:r.jsx(hr,{windowSize:n,children:p})})]})},re=({windowSize:e,cardPromoType:s})=>{let i=o.businessText;return s==="debit"&&(i=`${i} ${o.debit}`),r.jsx(r.Fragment,{children:s==="debit_and_credit"?r.jsx(Oe,{}):r.jsxs(ar,{windowSize:e,children:[r.jsx(H,{cardPromoType:s,cardText:i,shouldAnimate:!0,showChip:!0,forDashboard:!1,forListPage:!1}),r.jsx(G,{cardPromoType:s,cardText:i,showChip:!0,forDashboard:!1,shouldAnimate:!0,forListPage:!1})]})})},ne=({cardPromoType:e,cashbackRate:s})=>{const i=b(),n=o.benefits;return r.jsxs(rr,{windowSize:i,children:[i==="small"?r.jsx(re,{windowSize:i,cardPromoType:e}):null,r.jsxs(or,{windowSize:i,children:[r.jsxs(B,{windowSize:i,children:[r.jsx(I,{children:r.jsx(dr,{})}),r.jsxs(R,{children:[r.jsx(y,{windowSize:i,children:n.item1.pre}),r.jsx(A,{windowSize:i,children:n.item1.bold.replace("__cashback__",(s*100).toFixed(2))}),r.jsx(y,{windowSize:i,children:`${e==="credit"||e==="debit_and_credit"?n.singleStarred:""}${n.item1.post}`})]})]}),r.jsxs(B,{windowSize:i,children:[r.jsx(I,{children:r.jsx(nr,{})}),r.jsxs(R,{children:[r.jsx(y,{windowSize:i,children:n.item2.pre}),r.jsx(A,{windowSize:i,children:n.item2.bold}),r.jsx(y,{windowSize:i,children:n.item2.post})]})]}),r.jsxs(B,{windowSize:i,children:[r.jsx(I,{children:r.jsx(lr,{})}),r.jsxs(R,{children:[r.jsx(y,{windowSize:i,children:n.item3.pre}),r.jsx(A,{windowSize:i,children:n.item3.bold}),r.jsx(y,{windowSize:i,children:n.item3.post})]})]}),r.jsxs(B,{windowSize:i,children:[r.jsx(I,{children:r.jsx(sr,{})}),r.jsxs(R,{children:[r.jsx(y,{windowSize:i,children:n.item4.pre}),r.jsx(A,{windowSize:i,children:n.item4.bold}),r.jsx(y,{windowSize:i,children:n.item4.post})]})]})]}),i==="small"?null:r.jsx(re,{windowSize:i,cardPromoType:e})]})};let k;const Oe=()=>{const e=b(),s=X(),[i,n]=S.useState(0),[p,m]=S.useState(!1),c=o.businessText,w=`${c} ${o.debit}`,f=[{id:1,cardType:"debit",cardText:w},{id:2,cardType:"debit",cardText:w},{id:3,cardType:"credit",cardText:c},{id:4,cardType:"credit",cardText:c}];S.useEffect(()=>(p||(k=setInterval(()=>{n(l=>{const d=l+1;return d===f.length?(m(!0),0):d})},2e3)),()=>clearInterval(k)),[p,f.length]),S.useEffect(()=>{p&&k!=null&&clearInterval(k)},[p]);const v=(l,d)=>{switch((l-i+f.length)%f.length){case 0:return{transform:`translate(0,${d?"100%":0}) scale(1)`,zIndex:d?5:6,opacity:1,transition:"transform 0.4s"};case 1:return{transform:`translate(35%, ${d?"80%":"5%"}) scale(0.75)`,zIndex:d?4:5,opacity:1,transition:"all 0.4s"};case 2:return{transform:`translate(35%,${d?"80%":"5%"}) scale(0.75)`,zIndex:d?3:4,opacity:0,transition:"transform 0.4s 0.2s, opacity 0.4s 0.0s"};case 3:return{transform:`translate(-35%, ${d?"80%":"5%"}) scale(0.75)`,zIndex:d?4:5,opacity:1,transition:"all 0.4s"};default:return}},P=l=>{const d=v(l,!0);return{...d,transform:`${d?.transform} scaleY(-1)`,opacity:1,transition:"transform 0s 0s, z-index 0s 0s"}},u=l=>{p||m(!0),n(l)};return r.jsxs(xr,{windowSize:e,children:[r.jsx(ur,{windowSize:e,children:f.map((l,d)=>r.jsxs(wr,{children:[r.jsx(ie,{isReflection:!1,style:{...v(d,!1)},onClick:()=>u(d),children:d===0||d===2?r.jsx(H,{cardPromoType:l.cardType,cardText:l.cardText,shouldAnimate:!1,showChip:!0,forDashboard:!1,forListPage:!1,style:{borderColor:s.colors.grey2,...s.mode==="light"&&{borderBottom:"none"}}}):r.jsx(G,{cardPromoType:l.cardType,cardText:l.cardText,shouldAnimate:!1,showChip:!0,forDashboard:!1,forListPage:!1,style:{borderColor:s.colors.grey2,...s.mode==="light"&&{borderBottom:"none"}}})},l.id),r.jsx(ie,{isReflection:!0,style:{...P(d)},children:d===0||d===2?r.jsx(H,{cardPromoType:l.cardType,cardText:l.cardText,shouldAnimate:!1,forDashboard:!1,showChip:!0,forListPage:!1,style:{border:"none",opacity:.1,maskImage:"linear-gradient(to top, black, transparent 90%)",WebkitMaskImage:"linear-gradient(to top, black, transparent 90%)"}}):r.jsx(G,{cardPromoType:l.cardType,cardText:l.cardText,showChip:!0,shouldAnimate:!1,forDashboard:!1,forListPage:!1,style:{border:"none",opacity:.1,maskImage:"linear-gradient(to top, black, transparent)",WebkitMaskImage:"linear-gradient(to top, black, transparent)"}})},`reflection-${l.id}`)]},l.id))}),p&&r.jsx(Ue,{numberOfDots:f.length,activeIndex:i,handleClick:n,promoColor:s.colors.primary,promoColorHover:s.colors.grey5,spendManagementPromoCardActive:!0,dotStyle:{width:t.sp2,height:t.sp2},style:{cursor:"default",position:"absolute",bottom:h.navigationBottom.valuePx(e),left:h.navigationLeft.valuePx(e),zIndex:7}})]})},We=a.div`
2
2
  display: flex;
3
3
  flex: 1 1 auto;
4
4
  min-height: 100%;