@zeniai/web-app-ui 5.1.81-next → 5.1.82-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 (129) hide show
  1. package/dist/assets/AddressRoutes-B-OHFUYz.js +1 -0
  2. package/dist/assets/AddressScreen-D9Ul8Dxb.js +9 -0
  3. package/dist/assets/{AiCfoScreen-CAf6ZEes.js → AiCfoScreen-DiLxiOHU.js} +1 -1
  4. package/dist/assets/{BillPayApprovalRoutes-OOK37dzM.js → BillPayApprovalRoutes-6gAY0XHv.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-DrJrm73Q.js → BillPayRoutes-BlVykZyv.js} +17 -17
  6. package/dist/assets/{BusinessVerificationPageScreen-B-L9gdz1.js → BusinessVerificationPageScreen-DCETvhd8.js} +2 -2
  7. package/dist/assets/{CardsAiCfoScreen-DiqdjAjj.js → CardsAiCfoScreen-CfEdJvYF.js} +3 -3
  8. package/dist/assets/{ChargeCardRoutes-BJkVxY8Z.js → ChargeCardRoutes-COmpcwk4.js} +12 -12
  9. package/dist/assets/{CompanyPassportScreen-BUOnzTWw.js → CompanyPassportScreen-CFy9NTlf.js} +1 -1
  10. package/dist/assets/ConnectionAuthScreen-DmgL09EP.js +11 -0
  11. package/dist/assets/CustomerOnboardingAuthScreen-DqBjIeRb.js +1 -0
  12. package/dist/assets/{CustomerOnboardingRoutes-BMCNuzuH.js → CustomerOnboardingRoutes-zzflyPH3.js} +3 -3
  13. package/dist/assets/{DashboardRoutes-0cSeXm67.js → DashboardRoutes-C4WsA2pG.js} +3 -3
  14. package/dist/assets/{DefaultTenantHome-CP8NoId0.js → DefaultTenantHome-BvJt_3dQ.js} +1 -1
  15. package/dist/assets/{DomesticWireDetailScreen-C6o7L4nH.js → DomesticWireDetailScreen-CSRe_o0Z.js} +4 -4
  16. package/dist/assets/{DrawerScreen-BkNTuZZn.js → DrawerScreen-BCogPEDL.js} +1 -1
  17. package/dist/assets/EntityDetailRoutes-C2X5pcIQ.js +1 -0
  18. package/dist/assets/{ExpenseAutomationRoutes-CVabqqUr.js → ExpenseAutomationRoutes-B0eoWnRV.js} +3 -3
  19. package/dist/assets/{FeaturePreviewScreen-dZphyDK8.js → FeaturePreviewScreen-BWOweMkx.js} +1 -1
  20. package/dist/assets/HubSpotOAuthCallbackScreen-Bekq0kIS.js +1 -0
  21. package/dist/assets/{MagicLinkRoutes-qhstyQJu.js → MagicLinkRoutes-CHR5JhD6.js} +2 -2
  22. package/dist/assets/MagicLinkSignInScreen-CZXZMVTB.js +12 -0
  23. package/dist/assets/MobileAppDrawer-DUQ59uIE.js +1 -0
  24. package/dist/assets/NotFoundScreen-DbINM0eT.js +1 -0
  25. package/dist/assets/{NotificationRoutes-BrjbH91S.js → NotificationRoutes-Ckjirnas.js} +1 -1
  26. package/dist/assets/OAuthConsentScreen-d5agSCvv.js +1 -0
  27. package/dist/assets/PandLWithForecastRoutes-M-GIvzI6.js +1 -0
  28. package/dist/assets/PeopleRoutes-BtGHFWVD.js +22 -0
  29. package/dist/assets/PerformanceRoutes-WEtJa7Hk.js +1 -0
  30. package/dist/assets/{Preview-Bxn_o2ub.js → Preview-D4ZYcfkK.js} +1 -1
  31. package/dist/assets/{QBOConnectionScreen-1f76Cjry.js → QBOConnectionScreen-DZ6a6Pn5.js} +1 -1
  32. package/dist/assets/ReferralListScreen-BufpufnF.js +5 -0
  33. package/dist/assets/{ReimbursementApprovalRoutes-DztBHkQc.js → ReimbursementApprovalRoutes-NPPwIK8Y.js} +1 -1
  34. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-_5mmwBdu.js → ReimbursementApprovalRuleDetailScreen-RmB2PavA.js} +1 -1
  35. package/dist/assets/ReimbursementRoutes-CvWaXZJE.js +68 -0
  36. package/dist/assets/{ReportsRoutes-Bty3VgNj.js → ReportsRoutes-BUSlFBpZ.js} +1 -1
  37. package/dist/assets/RewardsRoutes-DZpLem4H.js +1 -0
  38. package/dist/assets/ScreenRoutes-B_EWXDY7.js +2 -0
  39. package/dist/assets/SettingsRoutes-DGpH4sr4.js +57 -0
  40. package/dist/assets/{SetupPagesScreen-DEnNlIFZ.js → SetupPagesScreen-CUJ1-XM4.js} +5 -5
  41. package/dist/assets/SignInScreen-DvbeiFCj.js +1 -0
  42. package/dist/assets/SignOutScreen-C0Ut-fMD.js +9 -0
  43. package/dist/assets/{TaskListScreen-YLciClaW.js → TaskListScreen-BcoWt73W.js} +2 -2
  44. package/dist/assets/TaskRoutes-DuTw4YUa.js +9 -0
  45. package/dist/assets/{TransactionDetailRoutes-DeXE01z1.js → TransactionDetailRoutes-d47zOIxK.js} +1 -1
  46. package/dist/assets/{TransactionDetailScreen-DYaYb3Dh.js → TransactionDetailScreen-CbI5PBMk.js} +2 -2
  47. package/dist/assets/{TransactionListRoutes-DRRo4Xlk.js → TransactionListRoutes-B9szjsIc.js} +1 -1
  48. package/dist/assets/TreasuryRoutes-ChAmTXmv.js +37 -0
  49. package/dist/assets/{VendorsRoutes-CAoEQXHS.js → VendorsRoutes-Bm8I2UHR.js} +1 -1
  50. package/dist/assets/WiseConfirmationScreen--kbx96hY.js +12 -0
  51. package/dist/assets/ZeniAccountRoutes-D6g_ntbO.js +73 -0
  52. package/dist/assets/{ZeniAccountStatementScreen-wVpVNvAj.js → ZeniAccountStatementScreen-CdJ60HCv.js} +2 -2
  53. package/dist/assets/{accountMappingHelper-D5Bw0mp6.js → accountMappingHelper-CaLAZUmW.js} +1 -1
  54. package/dist/assets/{analytics-CpUJgE1w.js → analytics-DyLuuBT1.js} +1 -1
  55. package/dist/assets/{analyticsHelper-CLhyHcZM.js → analyticsHelper-D2oAlw4a.js} +1 -1
  56. package/dist/assets/{core-CDuxXgNT.js → core-BHqQV1j-.js} +1 -1
  57. package/dist/assets/{decodeURIComponentSafe-B8X6jXbR.js → decodeURIComponentSafe-B1lT7PtO.js} +1 -1
  58. package/dist/assets/{dnd-VtUMJCWH.js → dnd-PncgQ6ah.js} +1 -1
  59. package/dist/assets/{empty-Dy_Rugh4.js → empty-CFTi16nV.js} +1 -1
  60. package/dist/assets/{empty-CI6jmlvd.js → empty-DfQxxgrF.js} +1 -1
  61. package/dist/assets/{emptyVideoElement-CzSTlf8_.js → emptyVideoElement-BYWmdxPT.js} +1 -1
  62. package/dist/assets/epic-BHHt9jBJ.js +2 -0
  63. package/dist/assets/{getLocaleForTenant-xMQqjCWD.js → getLocaleForTenant-SgsbGJTJ.js} +1 -1
  64. package/dist/assets/{index-DzOogTqR.js → index-BCSsut58.js} +9952 -9952
  65. package/dist/assets/{index-D4fNRtH0.js → index-BU2Ez_ui.js} +1 -1
  66. package/dist/assets/{index-BQ1ZKP1g.js → index-BpHsaZV0.js} +1 -1
  67. package/dist/assets/{index-BSsnhNl3.js → index-Bq60ilX9.js} +1 -1
  68. package/dist/assets/{index-BqsTwZNl.js → index-CjkK4WZV.js} +1 -1
  69. package/dist/assets/{index-DUxBJrom.js → index-D180oD-b.js} +1 -1
  70. package/dist/assets/{index-D72vEAAO.js → index-DrfsE_ES.js} +2 -2
  71. package/dist/assets/{index-BUfNuy7H.js → index-T9jTnQ8m.js} +1 -1
  72. package/dist/assets/{lexical-CIqawAn4.js → lexical-Boz4mOyF.js} +1 -1
  73. package/dist/assets/{liveblocks-C5Zo4IsV.js → liveblocks-6JNkacrc.js} +1 -1
  74. package/dist/assets/{lottie-B-fnnIRm.js → lottie-C3VtgzwQ.js} +1 -1
  75. package/dist/assets/{mui-BWYOl-fu.js → mui-C5-OLXT3.js} +1 -1
  76. package/dist/assets/{pathToGoBack-YzaQ63IA.js → pathToGoBack-2M7LGiAo.js} +1 -1
  77. package/dist/assets/{pdf-WEHP-u0u.js → pdf-16GwGHdy.js} +3 -3
  78. package/dist/assets/{pdf-lib-eYFk39VK.js → pdf-lib-Ch5CfF-s.js} +1 -1
  79. package/dist/assets/{plaid-2PJJQmCk.js → plaid-BXai4jzs.js} +1 -1
  80. package/dist/assets/{pusher-DG4S91VG.js → pusher-ozRV7lbh.js} +1 -1
  81. package/dist/assets/{react-xbt6TvfU.js → react-BdQcIE7p.js} +1 -1
  82. package/dist/assets/{react-DxeNPC39.js → react-C2tOKb3X.js} +1 -1
  83. package/dist/assets/{react-L4KlSlqR.js → react-CJysfalo.js} +1 -1
  84. package/dist/assets/{react-BBaLVZIY.js → react-CZe6P2aE.js} +1 -1
  85. package/dist/assets/{react-DyOgz1S3.js → react-D1Q0rHoQ.js} +1 -1
  86. package/dist/assets/{react-BruMptWV.js → react-DwMTRWye.js} +1 -1
  87. package/dist/assets/{recharts-DOA55GXl.js → recharts-CZo2yeP8.js} +1 -1
  88. package/dist/assets/{routePaths-rmRxk_gU.js → routePaths-DkQjfNRq.js} +1 -1
  89. package/dist/assets/{sentry-pTjqe1GE.js → sentry-CHrxYia6.js} +1 -1
  90. package/dist/assets/{url-Bx8KkYZ2.js → url-C1h5iywr.js} +1 -1
  91. package/dist/assets/{url--qGqS-sp.js → url-jdVZyqWI.js} +1 -1
  92. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-Ch-s-OUg.js → useAiCfoDashboardSuggestedQuestionsChips-CDQLXIZi.js} +1 -1
  93. package/dist/assets/{useAskAiCfoHostNavButtonProps-DVKlzRut.js → useAskAiCfoHostNavButtonProps-45oJK0hu.js} +1 -1
  94. package/dist/assets/{useCashManagementBanner-BEqGoY3j.js → useCashManagementBanner-CoVbsrBM.js} +1 -1
  95. package/dist/assets/{useChargeCardPusherEvents-DikWnVw6.js → useChargeCardPusherEvents-cQlWV2uK.js} +1 -1
  96. package/dist/assets/{useDeviceId-DxgjldI-.js → useDeviceId-ayvBvlwj.js} +1 -1
  97. package/dist/assets/useEmailConnectResultRefresh-D0dx8xRq.js +1 -0
  98. package/dist/assets/{useInitialThreadRequest-C_oymrXt.js → useInitialThreadRequest-CqGMs5d-.js} +1 -1
  99. package/dist/assets/{utils-C-pFPw5l.js → utils-S8edMjGk.js} +1 -1
  100. package/dist/assets/{withTransactionSidePanel-BzAvEIvv.js → withTransactionSidePanel-DD5T3Sss.js} +2 -2
  101. package/dist/assets/{zeni-epic-state-aFTbMOAR.js → zeni-epic-state-CZM3a-K0.js} +6 -6
  102. package/dist/index.html +1 -1
  103. package/package.json +4 -4
  104. package/dist/assets/AddressRoutes-CZ001L0B.js +0 -1
  105. package/dist/assets/AddressScreen-Cy07AeqE.js +0 -9
  106. package/dist/assets/ConnectionAuthScreen-Bwq_fx00.js +0 -11
  107. package/dist/assets/CustomerOnboardingAuthScreen-CZ5xQsEB.js +0 -1
  108. package/dist/assets/EntityDetailRoutes-D9Vk0h73.js +0 -1
  109. package/dist/assets/HubSpotOAuthCallbackScreen-C2-Grd2S.js +0 -1
  110. package/dist/assets/MagicLinkSignInScreen-Dac_EZMw.js +0 -12
  111. package/dist/assets/MobileAppDrawer-BWG5ZoNF.js +0 -1
  112. package/dist/assets/NotFoundScreen-B_nzx2PP.js +0 -1
  113. package/dist/assets/OAuthConsentScreen-CvlBFjdq.js +0 -1
  114. package/dist/assets/PandLWithForecastRoutes-C_x9Tcg0.js +0 -1
  115. package/dist/assets/PeopleRoutes-DUzH3GNv.js +0 -22
  116. package/dist/assets/PerformanceRoutes-Dm8N0j9j.js +0 -1
  117. package/dist/assets/ReferralListScreen-zKATmg7m.js +0 -5
  118. package/dist/assets/ReimbursementRoutes-DiSfNuHZ.js +0 -68
  119. package/dist/assets/RewardsRoutes-BtSnOW_p.js +0 -1
  120. package/dist/assets/ScreenRoutes-Du9VLb80.js +0 -2
  121. package/dist/assets/SettingsRoutes-DYDw5CwH.js +0 -57
  122. package/dist/assets/SignInScreen-Bd-bOFs3.js +0 -1
  123. package/dist/assets/SignOutScreen-Dqwjcbl7.js +0 -9
  124. package/dist/assets/TaskRoutes-BEsI3ohS.js +0 -9
  125. package/dist/assets/TreasuryRoutes-BkY0fzik.js +0 -37
  126. package/dist/assets/WiseConfirmationScreen-b0LDNO5l.js +0 -12
  127. package/dist/assets/ZeniAccountRoutes-B68Pe7No.js +0 -73
  128. package/dist/assets/epic-DQIIhelC.js +0 -2
  129. package/dist/assets/useEmailConnectResultRefresh-BZf1BjuU.js +0 -1
@@ -1,57 +0,0 @@
1
- import{j as o}from"./liveblocks-C5Zo4IsV.js";import{a as d}from"./sentry-pTjqe1GE.js";import{h as z,g as Q,u as O,j as b,s as ce,n as $,i as G,o as W,p as k}from"./core-CDuxXgNT.js";import{bn as Pe,eX as D,gq as De,n0 as le,Og as Me,hG as he,O7 as Ue,qS as Te,ky as fe,mY as _e,hI as Fe,O9 as Oe,O8 as Re,Qy as Be,zj as Ve,EM as ze,Q7 as Le,Qg as Ne,c6 as ne,cL as Qe,cM as $e,M7 as Ge,Qz as He,M8 as Ze,xL as Ke,QA as qe,Hb as Ye,Es as Je,Ej as be,Eg as Xe,xP as Se,Em as ye,Ep as Ce,Ev as te,uc as ae,xO as We,ka as Y,kd as Ie,QB as en,le as nn,y2 as tn,M$ as an,N0 as on,k8 as sn,QC as cn,kb as ln,rk as rn,MW as dn,MX as un,ro as pn,hr as gn,Mg as X,hj as re,hg as mn,ho as hn,Mh as fn,x$ as bn,QD as Sn,QE as yn,EJ as Cn,fC as Ee,fE as xe,QF as In,ge as En,Mq as xn,x_ as de,gj as ue,gi as An,xZ as vn,gh as kn,gg as wn,QG as jn,fH as Ae,QH as Pn,QI as Dn,y5 as Mn,xY as pe,QJ as Un,fY as Tn,xV as _n,bZ as Fn,c5 as On,c4 as Rn,b_ as Bn,c2 as Vn,c1 as zn,c0 as Ln,c3 as Nn,b$ as Qn}from"./zeni-epic-state-aFTbMOAR.js";import{Q as J,e as F,z as P,af as ve,bS as $n,f as H,h as Gn,bD as Hn,I as Z,y as oe,bT as Zn,i as ke,bU as Kn,aq as qn,n as we,bV as Yn,bW as Jn,bX as Xn,Y as Wn,bY as et,v as nt,bZ as tt}from"./index-DzOogTqR.js";import{n as B}from"./mui-BWYOl-fu.js";import{M as R}from"./MobileAppDrawer-BWG5ZoNF.js";import{a as K,g as q,m as at}from"./accountMappingHelper-D5Bw0mp6.js";import{t as ot,A as st}from"./AddressScreen-Cy07AeqE.js";import N from"./NotFoundScreen-B_nzx2PP.js";import{g as it}from"./analyticsHelper-CLhyHcZM.js";import{B as ct}from"./BusinessVerificationPageScreen-B-L9gdz1.js";import{C as lt}from"./CompanyPassportScreen-BUOnzTWw.js";import{u as rt,a as dt}from"./useEmailConnectResultRefresh-BZf1BjuU.js";import{q as ge}from"./QBOConnectionScreen-1f76Cjry.js";import{B as ut}from"./BillPayApprovalRoutes-OOK37dzM.js";import{R as pt}from"./ReimbursementApprovalRoutes-DztBHkQc.js";import"./recharts-DOA55GXl.js";import"./analytics-CpUJgE1w.js";import"./plaid-2PJJQmCk.js";import"./dnd-VtUMJCWH.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-fnnIRm.js";import"./lexical-CIqawAn4.js";import"./pdf-WEHP-u0u.js";import"./utils-C-pFPw5l.js";import"./routePaths-rmRxk_gU.js";import"./empty-Dy_Rugh4.js";import"./pdf-lib-eYFk39VK.js";import"./index-D4fNRtH0.js";import"./url--qGqS-sp.js";import"./index-BUfNuy7H.js";import"./decodeURIComponentSafe-B8X6jXbR.js";import"./ReimbursementApprovalRuleDetailScreen-_5mmwBdu.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="91e20577-a9bf-4b57-bdba-c109e17acf77",e._sentryDebugIdIdentifier="sentry-dbid-91e20577-a9bf-4b57-bdba-c109e17acf77")}catch{}})();const gt=B.div`
2
- display: flex;
3
- height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,mt=$(function(e,t){return{accountMappingView:t.accountMappingView,isFiling1099FeatureEnabled:t.isFiling1099FeatureEnabled,isAccruedExpensesFeatureEnabled:t.isAccruedExpensesFeatureEnabled,isAccountingClassesEnabled:fe(e),isAccountingClassesUpdateInProgress:e.companyViewState.passportView?.accountingClassesUpdateStatus?.fetchState==="In-Progress",isAccountingProjectsEnabled:Te(e),meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",isCapitalizationFeatureEnabled:t.isCapitalizationFeatureEnabled,capitalizableAccounts:t.capitalizableAccounts,accountNamesById:t.accountNamesById,capitalizableAccountOverrides:t.capitalizableAccountOverrides,isCapitalizationThresholdSaving:t.isCapitalizationThresholdSaving,onSaveCapitalizationAccountThreshold:t.onSaveCapitalizationAccountThreshold}},function(e,t){const{navigate:s,location:l,isFiling1099FeatureEnabled:i}=t;return{onAccountMappingChange:n=>{const{uncategorizedAccountSection:a,billsAccountSection:c,reimbursementsAccountSection:u,vendorsAccountSection:p,filing1099Section:m}=n,{incomeAccount:y,expenseAccount:g}=a,{billPayAccount:r}=c,{reimbursementsAccount:f}=u,{prepaidExpensesAccount:E,fixedAssetsAccount:w,accruedExpensesAccount:v}=p,{bankAccount:h,expenseCategory1099:I}=m,x=K(t.accountMappingView.incomeAccountList,y.selectedOption),T=K(t.accountMappingView.expenseAccountList,g.selectedOption),M=K(t.accountMappingView.billPayAccountList,r.selectedOption),L=K(t.accountMappingView.reimbursementsAccountList,f.selectedOption),V=q(t.accountMappingView.prepaidExpensesAccountList,E.selectedOptions),S=q(t.accountMappingView.fixedAssetsAccountList,w.selectedOptions),U=q(t.accountMappingView.accruedExpensesAccountList,v.selectedOptions),C=q(t.accountMappingView.bankAccounts1099FilingAccountList,h.selectedOptions),A=at(t.accountMappingView.expenseAccounts1099FilingAccountList,I),_={selectedIncomeAccountId:x?.accountId,selectedExpenseAccountId:T?.accountId,selectedBillPayAccountId:M?.accountId,selectedReimbursementsAccountId:L?.accountId,selectedPrepaidExpensesAccountIds:V.map(j=>j.accountId),selectedFixedAssetsAccountIds:S.map(j=>j.accountId),selectedAccruedExpensesAccountIds:U.map(j=>j.accountId),selectedBankAccounts1099FilingAccountIds:C.map(j=>j.accountId),selectedExpenseAccounts1099FilingAccountIds:A};e(Re({data:_}))},onBackClick:()=>{ve(l)===!1?(s("../../dashboard"),e(Oe())):e(he())},onSaveClick:()=>{e(Fe()),i&&H.track(Gn.Event.vendor1099AccountingSettingsSave)},onAccountingClassesToggle:n=>{e(_e(t.currentTenant.companyId,n))}}})($n),ht=()=>{const e=z(),t=Q(),s=O(),{useFeatureGate:l,useDynamicConfig:i}=J(),{isFeatureEnabled:n}=l(F.isFiling1099FeatureEnabled),{isFeatureEnabled:a}=l(F.isScheduledJEAccruedExpensesFeatureEnabled),{configValue:c,isDynamicConfigLoading:u}=i("transaction_categorization_config"),p=!u&&c?.capitalization_enabled===!0,m=P.getSignedInUser(),y=Pe(m),g=b(C=>D(C)),{capitalizableAccounts:r,capitalizableAccountOverrides:f,isCapitalizationThresholdSaving:E,currencySymbol:w}=b(C=>{const A=C.tenantState.currentTenantId,_=A!=null?C.tenantState.tenantsById[A]:void 0,j=De(C.companyState,g.companyId);return{capitalizableAccounts:_?.capitalizableAccounts??null,capitalizableAccountOverrides:_?.capitalizableAccountOverrides??null,isCapitalizationThresholdSaving:C.companyViewState.passportView?.capitalizationThresholdUpdateStatus?.fetchState==="In-Progress",currencySymbol:j?.company.companyLocaleInfo?.currencySymbol??"$"}},ce),v=d.useCallback((C,A)=>{s(le(g.companyId,C,A))},[s,g.companyId]),h=d.useCallback(C=>{const A={...f??{}},_=Object.entries(C);for(const[se,ie]of _)ie===null?delete A[se]:A[se]=ie;const[j,je]=_[0]??[];j!=null&&s(le(g.companyId,j,je,void 0,Object.keys(A).length>0?A:null))},[s,g.companyId,f]),I=b(C=>Me(C.accountState),ce),x=d.useMemo(()=>{const C={};for(const A of I)A.accountId!=null&&A.accountName!=null&&(C[A.accountId]=A.accountName);return C},[I]),[T,M]=d.useState(!1),[L,V]=d.useState(!1);d.useEffect(()=>{T===!1&&(s(he()),M(!0))},[T]);const S=b(C=>Ue(C)),U=C=>{V(C)};return o.jsxs(gt,{children:[o.jsx(R,{isAppContentDrawerOpen:L,handleDrawerToggle:U}),o.jsx(mt,{currentTenant:g,navigate:e,accountMappingView:S,isFiling1099FeatureEnabled:n&&y,isAccruedExpensesFeatureEnabled:a,isCapitalizationFeatureEnabled:p,capitalizableAccounts:r,accountNamesById:x,capitalizableAccountOverrides:f,currencySymbol:w,isCapitalizationThresholdSaving:E,onSaveCapitalizationAccountThreshold:v,onSaveCapitalizationAccountThresholds:h,location:t,isSettings:ve(t),onClickMenuIcon:()=>U(!0)})]})},ft=B.div`
10
- display: flex;
11
- height: 100%;
12
- width: 100%;
13
- flex: 1 1 auto;
14
- flex-direction: column;
15
- align-items: center;
16
- background-color: ${e=>e.theme.colors.grey4};
17
- `,bt=$(function(e,t){const s=D(e),l=Le(e),i=Ne(e),n=t.roleMap.bill_pay_admin;return{isDisabled:(ne(s?.userRole??[])||n)&&"readonly",billpayApprovalView:l,remiApproverView:i,analytics:H}},function(e,t){const{navigate:s,currentTenant:l}=t;return{onSetupApprovalRulesBillPaySectionClick:()=>{s("bills/approval-rules")},onSetupApprovalRulesRemiSectionClick:()=>{s("reimbursements/approval-rules")},onBackClick:()=>{l?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&l.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")}}})(Zn),St=()=>{const e=z(),t=Q(),s=O(),{tenantEmailDomain:l}=G(),[i,n]=d.useState(!1),[a,c]=d.useState(!1),[u,p]=d.useState(!1),m=b(I=>D(I)),y=b(I=>I.billPaySetupApproverViewState.fetchState),g=b(I=>I.remiSetupApproverViewState.fetchState),r=b(I=>Be(I)),{isApprovalRulesV3Enabled:f,isLoading:E}=Hn(m?.tenantId),w=m.companyId??P.getSignedInUserTenant(l)?.companyId;if(P.getSignedInUser()==null)throw Error("Can't access Approval Rules settings page without signing in...");const v=Z();d.useEffect(()=>{u||y!=="Not-Started"||E||(p(!0),s(Ve(!0,!0,f)))},[u,y,E,f,s]),d.useEffect(()=>{a||g!=="Not-Started"||E||(c(!0),s(ze(!0,!1,!1,f)))},[a,g,E,f,s]);const h=I=>{n(I)};return v?.loggedInUserRoleMap!=null?o.jsxs(ft,{children:[o.jsx(R,{isAppContentDrawerOpen:i,handleDrawerToggle:h}),o.jsx(bt,{navigate:e,location:t,companyId:w,currentTenant:m,roleMap:v.loggedInUserRoleMap,onClickMenuIcon:()=>{h(!0)}})]}):o.jsx(oe,{fetchState:r.fetchState})},yt=B.div`
18
- display: flex;
19
- height: 100%;
20
- width: 100%;
21
- flex: 1 1 auto;
22
- flex-direction: column;
23
- align-items: center;
24
- background-color: ${e=>e.theme.colors.grey4};
25
- `,Ct=$(function(e,t){const{companyId:s,isZeniAccountEnabled:l,isChargeCardEnabled:i,isBillPayEnabled:n,isRemiEnabled:a,isTreasuryEnabled:c}=t,u=D(e);return{bankSetupView:qe(e,s,n,a,l,i,c),connectedAccountProvider:u.company?.featuresActivationInfo.connectedAccountProvider??"",analytics:H}},function(e,t){const{navigate:s,currentTenant:l,companyId:i}=t;return{onFetchLinkTokenClick:(n,a,c)=>{e(ae(a,n,c))},onEstablishConnectionClick:(n,a,c)=>{e(te(n,i,a,c))},onUpdatePaymentAccountStatus:(n,a,c,u,p)=>{e(Ce(n,a,p,u,c))},onUpdatePaymentAccountLoginStatus:(n,a,c,u)=>{e(ye(!1,n,u,c,a))},onEstablishConnectionSuccess:(n,a)=>{e(Se(a,n))},onUpdateAccountClick:(n,a,c,u,p)=>{e(p==="paymentAccount"?be(n,a,c,u):Xe(u,n,a))},onUpdatePrimaryFundingAccount:(n,a,c)=>{e(Je(i,a,n,c))},onRemoveConnection:n=>{e(Ye(n))},onBackClick:()=>{l?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&l.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")}}})(Kn),It=()=>{const e=z(),t=Q(),s=O(),{tenantEmailDomain:l}=G(),i=Z(),{useFeatureGate:n}=J(),{isFeatureEnabled:a}=n(F.isChargeCardFeatureEnabled),{isFeatureEnabled:c}=n(F.isDebitCardFeatureEnabled),[u,p]=d.useState(!1),[m,y]=d.useState(!1),g=b(M=>D(M)),r=b(M=>M.settingsViewState.bankConnection.fetchState),f=Qe(g,i?.loggedInUserRoleMap),E=$e(g,i?.loggedInUserRoleMap),w=Ge(g,i?.loggedInUserRoleMap),v=He(g,i?.loggedInUserRoleMap),h=ke(g,a,c),I=Ze(g,i?.loggedInUserRoleMap)&&h,x=g.companyId??P.getSignedInUserTenant(l)?.companyId;if(P.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");d.useEffect(()=>{m||r==="Completed"||(y(!0),s(Ke(!1)))},[m,s,r]);const T=M=>{p(M)};return f||w||E||I?o.jsxs(yt,{children:[o.jsx(R,{isAppContentDrawerOpen:u,handleDrawerToggle:T}),o.jsx(Ct,{navigate:e,location:t,companyId:x,currentTenant:g,roleMap:i.loggedInUserRoleMap,isBillPayEnabled:f,isRemiEnabled:E,isZeniAccountEnabled:w,isChargeCardEnabled:I,isTreasuryEnabled:v,onClickMenuIcon:()=>{T(!0)}})]}):o.jsx(N,{})},Et=B.div`
26
- display: flex;
27
- height: 100%;
28
- width: 100%;
29
- flex: 1 1 auto;
30
- flex-direction: column;
31
- align-items: center;
32
- background-color: ${e=>e.theme.colors.grey4};
33
- `,xt=$(function(e,t){const{companyId:s}=t,l=D(e),i=t.roleMap.bill_pay_admin,n=en(e,s),{uiState:a}=n,c=(ne(l?.userRole??[])||i)&&n.setupView.accountFetchStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&n.setupView.accountUpdateStatus.fetchState!=="In-Progress"?void 0:"readonly";return{billingSetupView:n,uiState:a,stripeKey:we.stripeKey,isCardPaymentPopupOpen:!1,connectedAccountProvider:l.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:c,analytics:H}},function(e,t){const{navigate:s,currentTenant:l,companyId:i}=t;return{onFetchLinkTokenClick:(n,a)=>{e(ae("billing_setup",n,a))},onEstablishConnectionClick:n=>{e(te(n,i,"billing_setup","billing"))},onEstablishConnectionSuccess:()=>{e(Se("billing","billing_setup"))},onUpdatePaymentAccountStatus:(n,a,c)=>{e(Ce(n,a,"billing","billing_setup",c))},onUpdatePaymentAccountLoginStatus:(n,a)=>{e(ye(!1,n,"billing","billing_setup",a))},onUpdateAccountClick:(n,a)=>{e(be(n,a,"billing","billing_setup"))},onBackClick:()=>{l?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&l.companyBillPayInfo.info.isBillPayEnabled===!1?s("../.."):s("../")},onNavigateToDashboard:()=>{s("../dashboard")},handleCreateCardSetupIntent:n=>{e(Ie(n))},handleConfirmCardSetupIntent:n=>{e(ln(n))},updateCardPaymentModalState:n=>{e(cn({isCardPaymentPopupOpen:n}))},handleAddCardPaymentSource:(n,a,c)=>{e(sn(n,a,c))},handleFetchPaymentSources:()=>{e(Y())},resetCardPaymentViewState:()=>{e(on())},handleResetCardPaymentErrorStatuses:()=>{e(an())},onBillingAddressSave:n=>{e(tn(n))},onAddressEditHandler:n=>{if(n!=null){const a=ot(n);e(nn({addressType:"subscription_billing_address",addressToCreate:a}))}}}})(Yn),At=()=>{const e=z(),t=Q(),s=O(),{tenantEmailDomain:l}=G(),[i,n]=d.useState(!1),[a,c]=d.useState(!1),[u,p]=d.useState(!1),m=b(h=>D(h)),y=b(h=>h.cardPaymentViewState),g=b(h=>h.plaidAccountViewState.billing_setup.accountDetails.fetchStatus.fetchState),r=qn(y.addCardPaymentSourceStatus.fetchState),f=y.addCardPaymentSourceStatus.fetchState,E=m.companyId??P.getSignedInUserTenant(l)?.companyId;if(P.getSignedInUser()==null)throw Error("Can't access bank connections page without signing in...");const w=Z();d.useEffect(()=>{E!=null&&s(We(E,!1))},[E,s]),d.useEffect(()=>{a||(c(!0),s(Y()))},[a,s]),d.useEffect(()=>{u||(Ie(["card"]),p(!0))},[u]),d.useEffect(()=>{r==="In-Progress"&&f==="Completed"&&s(Y())},[r,f]);const v=h=>{n(h)};return w?.loggedInUserRoleMap!=null?o.jsxs(Et,{children:[o.jsx(R,{isAppContentDrawerOpen:i,handleDrawerToggle:v}),o.jsx(xt,{navigate:e,location:t,companyId:E,currentTenant:m,roleMap:w.loggedInUserRoleMap,onClickMenuIcon:()=>{v(!0)},googleAPIKey:we.googleMapsAPIKey})]}):o.jsx(oe,{fetchState:g})},ee="external_integrations",vt=$(function(e){const t=un(e,ee);return{meetingUrl:"https://meetings.hubspot.com/niharn/zeni-onboarding-overview?embed=true",notifyMeRegisteredSlugs:new Set(t.map(s=>s.additionalInfo).filter(s=>s!=null))}},function(e,t){const{navigate:s,integrationsView:l,signedInUserEmail:i,tenantEmailDomain:n,tenantId:a}=t;return{onBackClick:()=>{s("../")},onNavigateToDashboard:()=>{s("../dashboard")},onReconnectQBO:()=>{ge.init("/connection/auth",n),ge.handleClick()},onRefreshClick:()=>{l.integrations.refreshQBO.fetchState!=="In-Progress"&&e(bn())},onSaveChargeBeeCredentials:(c,u)=>{const p=l.externalConnections?.revenue?.find(m=>m.connectionName==="chargebee")?.connectionId;p!=null&&e(hn(a,p,X("revenue"),fn("chargebee"),{api_key:c,site:u}))},onConnectHubSpot:(c,u)=>{const p=l.externalConnections?.revenue?.find(m=>m.connectionName==="hubspot")?.connectionId;if(p!=null){const m=`${window.location.origin}/oauth/hubspot/callback`;sessionStorage.setItem("hubspot_oauth_pending",JSON.stringify({client_id:c,client_secret:u,connection_id:p,redirect_uri:m,tenant_id:a}));const y="oauth crm.objects.deals.read crm.objects.owners.read";window.location.href=`https://app.hubspot.com/oauth/authorize?client_id=${encodeURIComponent(c)}&scope=${encodeURIComponent(y)}&redirect_uri=${encodeURIComponent(m)}`}},onDisconnect:(c,u)=>{e(mn(a,c,X(u)))},onConnectGmail:()=>{e(re(a,"gmail",window.location.href))},onConnectOutlook:()=>{e(re(a,"outlook",window.location.href))},onSaveConnectorCredentials:c=>{e(gn(a,X("payments"),c))},onNotifyMe:c=>{H.trackIntegrationsNotifyMeClicked("Settings",c),e(pn(ee,c,i))}}})(Jn),kt=()=>{const e=z(),t=O(),{tenantEmailDomain:s}=G();rt();const[l,i]=d.useState(!1),n=b(h=>h.tenantState.fetchState),a=b(h=>D(h)),c=a.companyId??P.getSignedInUserTenant(s)?.companyId,u=P.getSignedInUser(),p=Z(),m=ne(a.userRole??[]);if(u==null)throw Error("Can't access Integrations page without signing in...");d.useEffect(()=>{t(rn(ee))},[t]);const[y,g]=d.useState(!1);d.useEffect(()=>{y||(g(!0),t(Y()))},[y,t]);const r=h=>{i(h)},f=b(h=>dn(h,c)),E=b(h=>h.plaidAccountViewState.external_account.plaidConnectionDetails),{plaidAccounts:w,onAddPlaidAccount:v}=dt({companyId:c??a.companyId});return p?.loggedInUserRoleMap!=null?o.jsxs(wt,{children:[o.jsx(R,{isAppContentDrawerOpen:l,handleDrawerToggle:r}),o.jsx(vt,{navigate:e,onClickMenuIcon:()=>{r(!0)},isAdmin:m,integrationsView:f,signedInUserEmail:u.userEmail??"",tenantEmailDomain:a.tenantEmailDomain??s??"",tenantId:a.tenantId,saveChargeBeeState:f.externalConnections?.saveAPIKeyConnectionState??"Not-Started",saveChargeBeeError:f.externalConnections?.saveAPIKeyConnectionError?.message,saveHubSpotState:f.externalConnections?.saveOAuthConnectionState??"Not-Started",saveHubSpotError:f.externalConnections?.saveOAuthConnectionError?.message,saveConnectorCredentialsStateBySlug:f.externalConnections?.saveConnectorCredentialsStateBySlug??{},saveConnectorCredentialsErrorBySlug:Object.fromEntries(Object.entries(f.externalConnections?.saveConnectorCredentialsErrorBySlug??{}).map(([h,I])=>[h,I?.message])),deleteConnectionState:f.externalConnections?.deleteConnectionState??"Not-Started",deleteConnectionError:f.externalConnections?.deleteConnectionError?.message,isLoading:n==="In-Progress",plaidAccounts:w,onAddPlaidAccount:v,plaidConnectionDetails:E})]}):o.jsx(oe,{fetchState:n})},wt=B.div`
34
- display: flex;
35
- height: 100%;
36
- width: 100%;
37
- flex: 1 1 auto;
38
- flex-direction: column;
39
- align-items: center;
40
- background-color: ${e=>e.theme.colors.grey4};
41
- `,jt=B.div`
42
- display: flex;
43
- height: 100%;
44
- width: 100%;
45
- flex: 1 1 auto;
46
- flex-direction: column;
47
- align-items: center;
48
- background-color: ${e=>e.theme.colors.grey4};
49
- `,Pt=()=>{const e=O(),{tenantEmailDomain:t}=G(),[s,l]=d.useState(!1),i=b(r=>D(r)).companyId??P.getSignedInUserTenant(t)?.companyId,n=P.getSignedInUser();if(n==null)throw Error("Can't access my bank connections page without signing in...");const a=b(r=>Sn(r,n.userId)),c=b(r=>yn(r,i,"bill_pay","user_reimbursement_account")),{plaidConnectionDetails:u}=c,p=r=>{l(r)},m=d.useCallback(r=>{e(ae("user_reimbursement_account",r))},[]),y=d.useCallback(r=>{e(te(r,i,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},[]);d.useEffect(()=>{a.fetchState!=="Completed"&&a.fetchState!=="In-Progress"&&e(Cn(n.userId))},[n.userId,a.fetchState]);const g=a.fetchState==="Not-Started"||a.fetchState==="In-Progress";return o.jsxs(jt,{children:[o.jsx(R,{isAppContentDrawerOpen:s,handleDrawerToggle:p}),o.jsx(Xn,{plaidConnectionDetails:u,isLoading:g,myBankConnectionsView:a,onFetchLinkTokenClick:m,onEstablishConnectionClick:y,onClickMenuIcon:()=>{p(!0)}})]})},Dt=B.div`
50
- display: flex;
51
- height: 100%;
52
- width: 100%;
53
- flex: 1 1 auto;
54
- flex-direction: column;
55
- align-items: center;
56
- background-color: ${e=>e.theme.colors.grey4};
57
- `,me=({appContent:e})=>{const t=O(),s=z(),l=Q(),[i,n]=d.useState(!1),a=b(S=>D(S)),{tenantEmailDomain:c}=a,u=a.companyId??P.getSignedInUserTenant(c)?.companyId;if(P.getSignedInUser()==null)throw Error("Can't access My Profile page without signing in...");const{useFeatureGate:p}=J(),{isFeatureEnabled:m}=p(F.isDepositAccountsFeatureEnabled),{isFeatureEnabled:y}=p(F.isChargeCardFeatureEnabled),{isFeatureEnabled:g}=p(F.isDebitCardFeatureEnabled),{isFeatureEnabled:r}=p(F.isTreasuryEnabled),f=b(S=>fe(S)),E=Ee(a),w=xe(g,a),v=!w&&f,h=ke(a,y,g),{areTenantIdsInSync:I}=Wn();d.useEffect(()=>{I&&t(In(u,v))},[u,t,v,I]);const x=b(S=>En(S,v)),T=x.fetchState==="Not-Started"||x.fetchState==="In-Progress"||u==null,M=xn(a),L=!!a.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,V=S=>{n(S)};return o.jsxs(Dt,{children:[o.jsx(R,{isAppContentDrawerOpen:i,handleDrawerToggle:V}),e!=null?o.jsx(o.Fragment,{children:e}):o.jsx(et,{myProfileView:x,isAccountingClassesEnabled:f,isReimbursementDisabled:L===!1,isZeniAccountsDisabled:m===!1,isChargeCardDisabled:h===!1,isTreasuryDisabled:r===!1,isLiteRoleDisabled:M===!1,onClickMenuIcon:()=>{V(!0)},isLoading:T,isBankingOnlyTenant:w,isCardsOnlyTenant:E,onAddressClick:S=>{const U=function(A,_){let j=`/${A}/settings/my_profile`;return j=j.concat(`/new/${_}`),j}(c,S),C=nt(l.state?.pathnameStackToGoBack,l.pathname);s(U,{state:{pathnameStackToGoBack:C}})},onGetOtp:S=>{const U={...x.myProfileLocalData,phone:S};t(de({localData:U})),t(wn(S,"MyProfile"))},onResendOtp:S=>{t(kn(S,"MyProfile"))},onCancelClick:()=>{t(vn())},onSaveClick:()=>{t(ue("MyProfile",x.myProfileLocalData.phone,x.myProfileLocalData.otpChallenge,x.myProfileLocalData.dateOfBirth,x.addressData?.addressToCreate))},onVerifyOtp:(S,U)=>{t(An(S,U,"MyProfile"))},onVerifyOtpSuccess:S=>{S!=null&&P.saveZeniOtpToken(S),t(ue("MyProfile",x.myProfileLocalData.phone,x.myProfileLocalData.otpChallenge,x.myProfileLocalData.dateOfBirth,x.addressData?.addressToCreate))},updateMyProfileLocalData:S=>{t(de({localData:S}))}})]})};function Mt(){const e=O(),t=b(r=>D(r)).companyId,s=b(r=>jn(r)),l=b(r=>Ae(r)),i=P.getSignedInUser(),[n,a]=d.useState(!1),c=d.useCallback(r=>{a(r)},[]),u=d.useCallback(r=>{e(Pn(r))},[]),p=d.useCallback(()=>{i?.userEmail!=null&&e(Dn({loggedInUserEmail:i.userEmail}))},[i?.userEmail]),m=d.useCallback(()=>{e(Mn())},[]);if(i==null)throw Error("Can't access Notification Settings page without signing in...");const y=d.useCallback(()=>{const r=l.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(pe(r,t))},[t,l.notificationSettings.monthEndInsightsNotificationSettings.enabled]),g=d.useCallback(()=>{e(Un())},[]);return d.useEffect(()=>{if(l.fetchState==="Completed"&&s.fetchState!=="In-Progress"&&s.fetchState!=="Completed"){const r=l.notificationSettings.monthEndInsightsNotificationSettings.enabled!=null;e(pe(r,t))}},[s.fetchState,t,l.notificationSettings.monthEndInsightsNotificationSettings.enabled,l.fetchState]),o.jsxs(o.Fragment,{children:[o.jsx(R,{isAppContentDrawerOpen:n,handleDrawerToggle:c}),o.jsx(tt,{notificationSettingsView:s,onFormDataChange:u,onCancel:p,onSave:m,onClickMenuIcon:()=>{c(!0)},signedInUser:i,onRefresh:y,resetUpdateStatus:g})]})}function ga(e){const[t,s]=d.useState(!1),l=b(r=>Ae(r)),i=b(r=>D(r)),n=Z(),a=P.getSignedInUser(),c=O(),{useFeatureGate:u}=J(),{isFeatureEnabled:p}=u(F.isDebitCardFeatureEnabled),m=a?.userEmail==null||l.fetchState!=="Completed"||Tn(l.notificationSettings,a.userEmail,p,i);d.useEffect(()=>{l.fetchState!=="In-Progress"&&l.fetchState!=="Completed"&&t===!1&&(s(!0),c(_n()))},[l.fetchState,t]);const y=xe(p,i),g=Ee(i);return l.fetchState!=="In-Progress"&&l.fetchState!=="Not-Started"||m!==!0?Fn(i)?o.jsxs(W,{children:[On(n?.loggedInUserRole??[],p,i,n?.loggedInUserRoleMap)&&o.jsx(k,{path:"accounting/*",element:o.jsx(ht,{})}),Rn(n?.loggedInUserRole??[],p,i,n?.loggedInUserRoleMap)&&o.jsx(k,{path:"approval_rules/*",element:o.jsx(Ut,{hasAdminLevelAccess:e.hasAdminLevelAccess})}),Bn(i,n?.loggedInUserRoleMap)&&o.jsx(k,{path:"my_bank_connections",element:o.jsx(Pt,{})}),Vn(i,n?.loggedInUserRoleMap)&&o.jsx(k,{path:"bank_connections",element:o.jsx(It,{})}),zn(i,n?.loggedInUserRoleMap)&&o.jsx(k,{path:"business_verification",element:o.jsx(ct,{productType:y?"zeni_accounts":g?"charge_cards":it(i,n?.loggedInUserRoleMap)})}),Ln(n?.loggedInUserRole??[],i,n?.loggedInUserRoleMap)&&o.jsx(k,{path:"company_details",element:o.jsx(lt,{})}),Nn(n?.loggedInUserRole??[],i)&&o.jsx(k,{path:"billing",element:o.jsx(At,{})}),Qn(n?.loggedInUserRole??[],p,i)&&o.jsx(k,{path:"integrations",element:o.jsx(kt,{})}),o.jsx(k,{path:"my_profile/new/:addressType",element:o.jsx(me,{appContent:o.jsx(st,{isSubPage:!1})})}),o.jsx(k,{path:"my_profile",element:o.jsx(me,{})}),m&&o.jsx(k,{path:"notifications",element:o.jsx(Mt,{})}),o.jsx(k,{path:"*",element:o.jsx(N,{})})]}):o.jsx(W,{children:o.jsx(k,{path:"*",element:o.jsx(N,{})})}):null}function Ut(e){return o.jsxs(W,{children:[o.jsx(k,{path:"/",element:o.jsx(St,{})}),o.jsx(k,{path:"bills/approval-rules/*",element:o.jsx(ut,{})}),o.jsx(k,{path:"reimbursements/approval-rules/*",element:e.hasAdminLevelAccess?o.jsx(pt,{}):o.jsx(N,{})}),o.jsx(k,{path:"*",element:o.jsx(N,{})})]})}export{ga as default};
@@ -1 +0,0 @@
1
- import{j as f}from"./liveblocks-C5Zo4IsV.js";import{a as u,b as M,q as T}from"./sentry-pTjqe1GE.js";import{u as A,h as z,j as l,g as D,N as j,n as O}from"./core-CDuxXgNT.js";import{u as P,z as s,m as F,f as E,a as B,g as _,h as N,j as V,k as W,G as X,n as v}from"./index-DzOogTqR.js";import{eX as Y,LW as $,LX as q,fA as G,g1 as J,M0 as H,gp as K,cY as Q,M1 as b,M2 as R,M3 as Z,bY as y}from"./zeni-epic-state-aFTbMOAR.js";import"./mui-BWYOl-fu.js";import{u as ee}from"./useDeviceId-DxgjldI-.js";import{f as te}from"./analyticsHelper-CLhyHcZM.js";import{t as ne}from"./getLocaleForTenant-xMQqjCWD.js";import"./recharts-DOA55GXl.js";import"./analytics-CpUJgE1w.js";import"./plaid-2PJJQmCk.js";import"./dnd-VtUMJCWH.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-fnnIRm.js";import"./lexical-CIqawAn4.js";import"./pdf-WEHP-u0u.js";import"./utils-C-pFPw5l.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="6aa4f04a-9ef1-4e86-978a-1b2f79c6406a",t._sentryDebugIdIdentifier="sentry-dbid-6aa4f04a-9ef1-4e86-978a-1b2f79c6406a")}catch{}})();const ae=O(function(t,a){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:i,magicLinkExpiredEmail:c}=a;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:i,magicLinkExpiredEmail:c}},function(t,a){const{location:d,navigate:g}=a;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,i)=>{T({message:`OAuth error from provider ${i} with error ${n}`,level:"error",tags:{authProvider:i,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,i)=>{const c=i==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:i,appType:"web",redirectUri:y(c),sourceUri:y(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:i}=a;i!=null&&(s.saveMagicLinkEmail(n),t(R(n,i)))},clearSignInError:()=>{t(b())}}})(X),ie=M.memo(ae);function ve({setTenantEmailDomain:t}){const a=A(),d=z(),{clearAllLoading:g}=P(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const i=ee(),c=l(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:h,accountLocked:C,accountUnlockTime:k}=l(e=>e.tenantState),p=l(e=>e.tenantState.fetchState),L=l(e=>e.tenantState.activeTenantFetchState.fetchState),S=l(e=>e.tenantState.signInState),o=l(e=>e.tenantState.loggedInUser),r=l(e=>Y(e)),I=l(e=>$(e)),m=D(),w=F().mode,U=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{h.fetchState==="Completed"&&c!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))},[h.fetchState,c]),u.useEffect(()=>{t(void 0)},[]),u.useEffect(()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(q(I.tenantsInOrder),o.zeniSessionId),G(o.userId,o.zeniSessionId,r.tenantId),a(J(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),a(H("Completed")),B.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),K().then(()=>{const e=W();e!=null&&_(e)}),setTimeout(()=>{E.trackLogin(N.Event.loginSuccess,o.authProvider??"google",Q(r.productSettings))},2e3))},[S,p,L,o,r,I,w,m.state,a]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(j,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ie,{magicLinkExpired:!!U,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:i??void 0,showEmailLogin:!0}),C===!0&&k!=null?f.jsx(V,{onClose:()=>a(b()),unlockDate:k}):null]})}export{ve as default};
@@ -1,9 +0,0 @@
1
- import{j as i}from"./liveblocks-C5Zo4IsV.js";import{a as s}from"./sentry-pTjqe1GE.js";import{u as d,g as u,N as c}from"./core-CDuxXgNT.js";import{z as n,f as a,h as m,y as p}from"./index-DzOogTqR.js";import{gu as g,Mi as y}from"./zeni-epic-state-aFTbMOAR.js";import{n as b}from"./mui-BWYOl-fu.js";import"./recharts-DOA55GXl.js";import"./analytics-CpUJgE1w.js";import"./plaid-2PJJQmCk.js";import"./dnd-VtUMJCWH.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-fnnIRm.js";import"./lexical-CIqawAn4.js";import"./pdf-WEHP-u0u.js";import"./utils-C-pFPw5l.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="238de91e-9066-486b-90e7-13b539a97fe7",e._sentryDebugIdIdentifier="sentry-dbid-238de91e-9066-486b-90e7-13b539a97fe7")}catch{}})();function N(){const e=d(),t=u(),r=s.useRef(!1),f=n.isSignedIn(),o=t.state?.message==="logout"||f;return s.useEffect(()=>{if(o&&!r.current){r.current=!0;try{e(g()),y(),a.trackLogout(m.Event.logoutSuccess),a.resetUserIdentity(),n.clearAll()}catch(l){console.error("Error during sign out:",l)}finally{window.location.replace("/signin/auth")}}},[o,e]),o?i.jsx(h,{children:i.jsx(p,{fetchState:"In-Progress"})}):i.jsx(c,{to:"../",replace:!0})}const h=b.div`
2
- display: flex;
3
- height: 100vh;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `;export{N as default};
@@ -1,9 +0,0 @@
1
- import{j as n}from"./liveblocks-C5Zo4IsV.js";import se from"./NotFoundScreen-B_nzx2PP.js";import{a as l}from"./sentry-pTjqe1GE.js";import{h as M,u as O,j as f,g as ne,i as oe,N as ie,n as re,o as le,p as g}from"./core-CDuxXgNT.js";import{I6 as Z,I9 as ce,I3 as de,eX as H,TG as J,In as Q,I0 as pe,IT as ue,IM as ke,TH as K,TI as V,HY as me,HV as ge,rD as fe,rr as he,l6 as Ie,Ih as Se,TJ as Te,Iy as be,Iv as Ee,Ic as Ge,Is as Ce,Ir as De}from"./zeni-epic-state-aFTbMOAR.js";import{z as C,d8 as xe,A as ye,Q as je,e as b,s as W,v as w,J as ve,f as z,h as we,d9 as Re,n as A,at as Fe}from"./index-DzOogTqR.js";import{n as Be}from"./mui-BWYOl-fu.js";import{u as Pe}from"./useInitialThreadRequest-C_oymrXt.js";import{M as Ue}from"./MobileAppDrawer-BWG5ZoNF.js";import Le from"./TaskListScreen-YLciClaW.js";import"./recharts-DOA55GXl.js";import"./analytics-CpUJgE1w.js";import"./plaid-2PJJQmCk.js";import"./dnd-VtUMJCWH.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-fnnIRm.js";import"./lexical-CIqawAn4.js";import"./pdf-WEHP-u0u.js";import"./utils-C-pFPw5l.js";import"./useAskAiCfoHostNavButtonProps-DVKlzRut.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="995b98a7-a614-4634-891a-387a0d26b138",e._sentryDebugIdIdentifier="sentry-dbid-995b98a7-a614-4634-891a-387a0d26b138")}catch{}})();function $e(){const e=M(),t=O(),s=C.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=f(o=>o.cannedResponsesState),c=l.useCallback(()=>{t(Z())},[t]),k=l.useCallback((o,h,I)=>{t(ce({name:o,content:h,cannedResponseId:I}))},[t]),a=l.useCallback(o=>{t(de({cannedResponseId:o}))},[t]);if(s==null)throw Error("Can't access quick responses page without signing in...");return n.jsx(xe,{cannedResponses:u,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:c,onSave:k})}let _,q=[];const Ne=re(function(e,t){const{location:s,taskGroupId:u}=t,r=K(e,t.taskId),d=H(e),c=r.taskGroupId??u,k=c!=null?V(e.taskGroupState,c):void 0,a=C.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},I=J(e),{tenantEmailDomain:D}=d,E=r.recurringSourceTaskId,x=E!=null?`${A.appUrl}/${D}/tasks/${encodeURIComponent(E)}`:void 0;var S;return{taskDetailSelectorView:r,authParams:h,isZeniUser:C.isZeniUser(),userGroupList:((S=e.userGroupsState.userGroupByUserGroupId)!==_&&(_=S,q=Object.values(S)),q),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Fe.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${A.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:x,tagListView:I,taskGroupName:c!=null&&k!=null&&k.isDefault===!1?k.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map(p=>V(e.taskGroupState,p)).filter(p=>p!=null&&!p.isDeleted).map(p=>({id:p.id,name:p.name,isDefault:p.isDefault}))}},function(e,t){const{taskId:s,navigate:u,currentTenant:r,location:d,taskGroupId:c}=t,{tenantEmailDomain:k}=r;return{onSaveChangesToLocalStore:a=>{e(De({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ce(s,a??c))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ge(t.taskId))},onSnoozeTask:(a,o)=>{e(Ee(a,o))},onUnsnoozeTask:a=>{e(be(a))},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const a=W(d.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";u(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=R(k),o=w(d.state?.pathnameStackToGoBack,d.pathname);u(a,{state:{pathnameStackToGoBack:o}})}e(Te({taskId:s}))},onDeleteTaskClick:()=>{e(Se(s))},updateFilesEntity:a=>{e(Ie({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(fe(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(Q(!1,s))},onCreateTagClick:a=>{e(ge(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(Z())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(Re);function v(){const e=M(),t=O(),s=ne(),u=ye(),{taskId:r,taskGroupId:d}=oe(),c=f(i=>H(i)),k=Pe(c?.companyId),{useFeatureGate:a}=je(),{isFeatureEnabled:o}=a(b.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(b.isTaskVisibilityEnabled),{isFeatureEnabled:I}=a(b.isTaskCannedResponsesEnabled),{isFeatureEnabled:D}=a(b.isTaskRecurringParentEnabled),{isFeatureEnabled:E}=a(b.isTaskGroupAssigneesEnabled),[x,S]=l.useState(!1),[p,X]=l.useState(!1),[F,Y]=l.useState(!1),[B,ee]=l.useState(!1),[P,y]=l.useState(!1),T=l.useRef(!1),G=f(i=>i.taskListState.updateTasksFetchState.fetchState),U=f(i=>J(i)),L=f(i=>i.taskGroupViewState.fetchState);l.useEffect(()=>{p||(X(!0),t(Q(!1,r)))},[p,t]),l.useEffect(()=>{F||U.fetchState==="Completed"||(Y(!0),t(pe()))},[F,t,U.fetchState]),l.useEffect(()=>{B||L==="Completed"||(ee(!0),t(ue()))},[B,t,L]);const ae=l.useCallback(()=>{r!=null&&(T.current=!1,t(ke([r],null,{isArchived:!1})),y(!0))},[t,r]);l.useEffect(()=>{if(P)if(G!=="In-Progress"){if(T.current){if(G==="Error")return y(!1),void(T.current=!1);if(G==="Completed"){y(!1),T.current=!1;const{tenantEmailDomain:i}=c;if(s.state?.message==="triggerBackClick"){const m=W(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=R(i);e(m,{state:{pathnameStackToGoBack:w(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else T.current=!0},[P,G,c,s,e]);const $=f(i=>K(i,r)),j=$.fetchState,N=C.getSignedInUser();if(N==null)throw Error("Can't access task detail page without signing in...");if(j==="Error"&&$.error?.code===400){const{tenantEmailDomain:i}=c,m=R(i),te=w(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[j==="Completed"?n.jsx(ve,{analytics:z,onLoad:i=>(m=>m.trackPageLoaded(we.Event.taskDetailPage))(i)}):null,n.jsxs(Ve,{children:[n.jsx(Ue,{isAppContentDrawerOpen:x,handleDrawerToggle:i=>{S(i)}}),n.jsx(Ne,{analytics:z,currentTenant:c,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:N,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:j,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:I,isTaskRecurringParentEnabled:D,isTaskGroupAssigneesEnabled:E})]})]})}const Ve=Be.div`
2
- display: flex;
3
- min-height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,R=e=>`/${e}/tasks`;function ia(){return n.jsxs(le,{children:[n.jsx(g,{path:"/new",element:n.jsx(v,{})}),n.jsx(g,{path:"/new/:taskGroupId",element:n.jsx(v,{})}),n.jsx(g,{path:"/group/:taskGroupId",element:n.jsx(Le,{})}),n.jsx(g,{path:"/quick-responses",element:n.jsx($e,{})}),n.jsx(g,{path:"/:taskId",element:n.jsx(v,{})}),n.jsx(g,{path:"*",element:n.jsx(se,{})})]})}export{ia as default};
@@ -1,37 +0,0 @@
1
- import{j as e}from"./liveblocks-C5Zo4IsV.js";import{h as U,g as B,u as P,i as O,j as y,N as L,n as N,o as we,p as k}from"./core-CDuxXgNT.js";import{cp as G,eX as D,Qp as R,Go as ae,fX as q,G6 as ne,Qr as Ie,Gr as ke,Qn as be,Qo as se,QE as je,Ev as Ee,uc as Ae,Qt as ve,GK as De,Qq as re,cT as Z,ys as oe,fC as Fe,fE as Le,RD as Ue,RE as Be,G7 as Pe,RF as Re,G8 as Me,Gh as Ve,bs as Oe,bJ as Ne,cA as Ge,bK as _e,co as $e,fW as ze,bt as Qe,LY as qe,cn as Ze}from"./zeni-epic-state-aFTbMOAR.js";import{I as _,aq as He,z as E,J as $,f as b,ci as Ke,cj as Je,ck as Q,Z as H,m as We,Y as Xe,$ as Ye,Q as ie,e as A,D as et,y as tt,cl as at,at as K,v as nt,cm as st,s as J,cn as rt,F as X,co as ot,i as it}from"./index-DzOogTqR.js";import{D as ct,n as M,S as lt}from"./mui-BWYOl-fu.js";import ut from"./NotFoundScreen-B_nzx2PP.js";import{S as Y}from"./SetupPagesScreen-DEnNlIFZ.js";import{a as p}from"./sentry-pTjqe1GE.js";import{u as dt}from"./useAskAiCfoHostNavButtonProps-DVKlzRut.js";import{u as pt}from"./useInitialThreadRequest-C_oymrXt.js";import{u as mt}from"./useCashManagementBanner-BEqGoY3j.js";import{M as ce}from"./MobileAppDrawer-BWG5ZoNF.js";import{F as ft}from"./FeaturePreviewScreen-dZphyDK8.js";import{a as ee}from"./analyticsHelper-CLhyHcZM.js";import"./recharts-DOA55GXl.js";import"./analytics-CpUJgE1w.js";import"./plaid-2PJJQmCk.js";import"./dnd-VtUMJCWH.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-fnnIRm.js";import"./lexical-CIqawAn4.js";import"./pdf-WEHP-u0u.js";import"./utils-C-pFPw5l.js";import"./routePaths-rmRxk_gU.js";import"./BusinessVerificationPageScreen-B-L9gdz1.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="ec6644a1-2266-42bd-83c7-b4780d13d710",t._sentryDebugIdIdentifier="sentry-dbid-ec6644a1-2266-42bd-83c7-b4780d13d710")}catch{}})();const yt=N(function(t,a){const{companyId:n}=a;return{treasurySetupView:R(t,n),analytics:b}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:m}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const s=m.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(s.riskScore,ee(s)),t(ke(!0))},onUpdateFundAllocation:s=>{o.trackTreasuryAllocationAction("update",ee(s)),t(Ie(s))}}})(Ke);function gt(){const t=U(),a=B(),n=P(),{tenantEmailDomain:o}=O(),m=_(),s=y(I=>I.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),f=He(s),r=G(m?.loggedInUserRoleMap),[l,i]=p.useState(!1),[u,T]=p.useState(!1),[d,c]=p.useState(!1),h=y(I=>D(I)),g=E.getSignedInUserTenant(o)?.companyId??h.companyId,C=E.getSignedInUser(),S=y(I=>R(I,g)),w=y(I=>I.treasurySetupViewState.fetchState),x=y(I=>I.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=y(I=>I.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(C==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(p.useEffect(()=>{l||w!=="Not-Started"||g==null||(i(!0),n(ae(g,!0,!1)))},[l,w,g,n]),p.useEffect(()=>{d||F!=="Not-Started"||g==null||(c(!0),n(q()))},[d,F,g,n]),p.useEffect(()=>{u||x!=="Not-Started"||g==null||(T(!0),n(ne()))},[u,x,g,n]),p.useEffect(()=>{f==="In-Progress"&&s==="Completed"&&t("../")},[f,s,t]),h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(L,{to:"../promo"});const v=h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||w!=="Completed";return e.jsxs(e.Fragment,{children:[!v&&e.jsx($,{analytics:b,onLoad:()=>{}}),e.jsx(yt,{navigate:t,location:a,companyId:g,isEditMode:!0,isLoading:v,isReadOnly:!r,treasurySetupView:S,analytics:b})]})}const ht=N(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:je(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:R(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:m}=a,s=o.treasuryTransferMoneyLocalData,f=m.fundAllocationLocalData;return{onCancelClick:()=>{Q(a.analytics,"cancel",s,f,"Transfer"),t(se()),n("../")},onTransferClick:()=>{Q(a.analytics,"confirm",s,f,"Transfer"),t(De())},onSaveChangesToLocalStore:r=>{t(ve(r))},onFetchLinkTokenClick:r=>{t(Ae("treasury_setup",r))},onEstablishConnectionClick:r=>{t(Ee(r,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Je),St=({isFirstTransfer:t})=>{const a=U(),{tenantEmailDomain:n}=O(),o=P(),[m,s]=p.useState(!1),[f,r]=p.useState(!1),[l,i]=p.useState(!1),[u,T]=p.useState(!1),d=y(x=>x.treasurySetupViewState.fetchState),c=y(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),h=y(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),g=y(x=>D(x)),C=E.getSignedInUserTenant(n)?.companyId??g.companyId,S=y(x=>be(x)),w=y(x=>R(x,C));if(E.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return p.useEffect(()=>{f||d!=="Not-Started"||C==null||(r(!0),o(ae(C,!0,!1)))},[f,d,C,o]),p.useEffect(()=>{l||c!=="Not-Started"||C==null||(i(!0),o(q()))},[l,c,C,o]),p.useEffect(()=>{u||h!=="Not-Started"||C==null||(T(!0),o(ne()))},[u,h,C,o]),e.jsxs(e.Fragment,{children:[e.jsx($,{analytics:b,onLoad:()=>{}}),e.jsx(ht,{analytics:b,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{s(!1),o(se())},currentTenant:g,treasurySetupView:w,showReviewContent:m,maxInsuredAmount:5e5,onReviewClick:()=>{Q(b,"review",S.treasuryTransferMoneyLocalData,w.fundAllocationLocalData,"Transfer"),s(!0)},isFirstTransfer:t,setShowReviewContent:s,onBackClick:()=>{}})]})},xt=M.div`
2
- display: flex;
3
- min-height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${t=>t.theme.colors.grey4};
9
- `,Ct={overlayWidth:new et(100,100,48)},Tt=N(function(t,a){const n=re(t),{companyId:o}=a;return{treasuryDetail:n,treasurySetupView:R(t,o),downloadEndPoint:`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}},function(t,a){const{navigate:n,currentTenant:o,location:m,handleDrawerToggle:s,analytics:f,isCashManagementFeatureEnabled:r}=a,{tenantEmailDomain:l}=o;return{onSettingsClick:()=>{f.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:i=>{let u="page-not-found";i==="editPortfolio"?u=wt(l):i==="statements"?u=It(l):i==="taxLetter"?u=kt(l):i==="settings"&&(u=bt(l));const T=nt(m.state?.pathnameStackToGoBack,m.pathname);n(u,{state:{pathnameStackToGoBack:T}})},onColumnSortConfigChanged:(i,u)=>{t(Ue({uiState:{sortKey:i,sortOrder:u}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{s(!0)},onAutoTransferClick:()=>{n(r?"../../checking/cash_management/auto-transfer":"../../checking/auto-transfer")},onCashManagementClick:()=>{n(`/${l}/checking/cash_management`)}}})(at);function z({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=B(),o=U(),m=P(),s=H(),f=We(),r=y(j=>D(j)),{tenantEmailDomain:l}=O(),i=r.companyId??E.getSignedInUserTenant(l)?.companyId,[u,T]=p.useState(!1),d=y(j=>re(j)),c=d.fetchState,h=d.accountSummary?.totalBalance?.amount,g=y(j=>j.treasurySetupViewState.treasuryFundsDetails?.fetchStatus),C=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",S=_(),w=!!r.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=G(S?.loggedInUserRoleMap),F=Z(S?.loggedInUserRoleMap),{areTenantIdsInSync:v}=Xe();p.useEffect(()=>{c==="Not-Started"&&!u&&v&&(T(!0),m(oe(!0)))},[u,m,c,v]),p.useEffect(()=>{d.transactionsFetchState.fetchState==="Completed"&&d.transactions.length===0&&!n.pathname.includes("transfer")&&x&&o("./transfer")},[d.transactionsFetchState.fetchState,d.transactions.length]);const I=()=>{o("..")},[le,ue]=p.useState(!1),W=j=>{ue(j)},{isAiCfoAccessEnabled:de,onAskAiCfoClick:pe}=dt({mobileExploreReferrer:"Treasury"});Ye({isDataReady:c==="Completed"});const me=mt(),{useFeatureGate:V}=ie(),{isFeatureEnabled:fe}=V(A.isDebitCardFeatureEnabled),{isFeatureEnabled:ye}=V(A.isAutoTransferRuleEnabled),{isFeatureEnabled:ge}=V(A.isTreasuryCommentingEnabled),{isFeatureEnabled:he}=V(A.isCashManagementFeatureEnabled),Se=pt(i,{clearParams:c==="Completed"&&g?.fetchState==="Completed"}),xe=Fe(r),Ce=Le(fe,r);if(xe===!0&&Ce!==!0)return e.jsx(ft,{});if(C){const j=g?.fetchState!=="Completed"||d.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[d.accountSummaryFetchState.fetchState==="Completed"&&g?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx($,{analytics:b,onLoad:()=>{}}):null,e.jsx(ct,{onClose:I,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:Ct.overlayWidth.valuePercentage(s),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:f.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(jt,{onClick:Te=>Te.stopPropagation(),children:[t===!0?e.jsx(St,{isFirstTransfer:d.transactions.length===0||h===0}):null,a===!0?e.jsx(gt,{}):null]})}),e.jsxs(xt,{windowSize:s,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:W}),e.jsx(Tt,{treasuryDetailsView:d,isAutoTransferRuleEnabled:ye,navigate:o,currentTenant:r,location:n,companyId:i,analytics:b,cashManagementBannerProps:me,isCashManagementFeatureEnabled:he,isTreasuryCommentingEnabled:ge,handleDrawerToggle:W,initialOpenThreadRequest:Se,isLoading:j,isAiCfoAccessEnabled:de,onAskAiCfoClick:pe})]})]})}return w&&x?e.jsx(L,{to:"../setup"}):r.companyTreasuryInfo?.info&&!w&&F?e.jsx(L,{to:"../promo",state:n.state}):e.jsx(tt,{fetchState:"In-Progress",style:{backgroundColor:f.colors.grey5}})}const wt=t=>`/${t}/treasury/edit-portfolio`,It=t=>`/${t}/treasury/statements`,kt=t=>`/${t}/treasury/tax-letter`,bt=t=>`/${t}/treasury/setup`,jt=M(lt)`
10
- display: flex;
11
- min-height: 100%;
12
- flex-direction: column;
13
- `,Et=M.div`
14
- display: flex;
15
- height: 100vh;
16
- width: 100%;
17
- flex: 1 1 auto;
18
- flex-direction: column;
19
- align-items: center;
20
- background-color: ${t=>t.theme.colors.grey4};
21
- `;function At(){const t=U(),a=P(),n=H(),o=B(),m=`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[s,f]=p.useState(!1),r=y(c=>Be(c));p.useEffect(()=>{s||r.fetchState!=="Not-Started"||(f(!0),a(Pe(!1)))},[s,r.fetchState,a]);const l=E.getSignedInUser(),i=y(c=>D(c)),u={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i.tenantId??""},T=i.company?.companyInfo.companyLegalName??i.companyName;if(l==null)throw Error("Can't access statements page without signing in...");const d=r.fetchState!=="Completed";return e.jsx(Et,{windowSize:n,children:e.jsx(st,{currentTenantCompanyName:T,statementListView:r,isLoading:d,onBackClick:()=>{const c=J(o.state?.pathnameStackToGoBack),h=c.poppedPathname??"..";t(h,{state:{pathnameStackToGoBack:c.newStack}})},authParams:u,downloadEndPoint:m})})}const vt=M.div`
22
- display: flex;
23
- height: 100vh;
24
- width: 100%;
25
- flex: 1 1 auto;
26
- flex-direction: column;
27
- align-items: center;
28
- background-color: ${t=>t.theme.colors.grey4};
29
- `;function Dt(){const t=U(),a=H(),n=B(),o=P(),m=`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[s,f]=p.useState(!1),r=y(c=>Re(c));p.useEffect(()=>{s||r.fetchState!=="Not-Started"||(f(!0),o(Me(!1)))},[s,r.fetchState,o]);const l=E.getSignedInUser(),i=y(c=>D(c)),u={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i.tenantId??""},T=i.company?.companyInfo.companyLegalName??i.companyName;if(l==null)throw Error("Can't access tax letter page without signing in...");const d=r.fetchState!=="Completed";return e.jsx(vt,{windowSize:a,children:e.jsx(rt,{currentTenantCompanyName:T,taxLetterListView:r,isLoading:d,onBackClick:()=>{const c=J(n.state?.pathnameStackToGoBack),h=c.poppedPathname??"..";t(h,{state:{pathnameStackToGoBack:c.newStack}})},authParams:u,downloadEndPoint:m})})}const Ft=N(function(t,a){const{companyId:n}=a,o=R(t,n);return{treasurySetupView:o,isSetupComplete:o.companyTreasuryInfo?.businessVerificationStatus?.code==="verified",videoUrl:"https://www.youtube.com/watch?v=sqvJWKCMZgk",meetingUrl:"https://meetings.hubspot.com/yoshi-araki/treasury-product-schedule-demo-link?embed=true"}},function(t,a){const{navigate:n,companyId:o}=a;return{onSetupButtonClick:()=>{t(Ve(o))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:m=>{n(m?"..":"../setup",{relative:"path"})}}})(ot),Lt=()=>{const t=U(),a=B(),n=P(),{tenantEmailDomain:o}=O(),[m,s]=p.useState(!1),f=y(S=>D(S)),[r,l]=p.useState(!1),i=y(S=>S.treasurySetupViewState.treasuryFundsDetails?.fetchStatus);p.useEffect(()=>{r||i?.fetchState!=="Not-Started"||u==null||(l(!0),n(q()))},[i,n]);const u=E.getSignedInUserTenant(o)?.companyId??f.companyId,T=E.getSignedInUser(),d=!!f.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,c=S=>{s(S)};if(T==null)throw Error("Can't access treasury promo page without signing in...");const h=_(),g=G(h?.loggedInUserRoleMap),C=Z(h?.loggedInUserRoleMap);if(d&&g)return e.jsx(L,{to:"../../treasury/setup"});if(f.company?.companyTreasuryInfo&&(!d&&g||C)){if(a.state?.message==="activation"){const S=J(a.state?.pathnameStackToGoBack);t(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:S.newStack}})}return i?.fetchState!=="Completed"?e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx($,{analytics:b,onLoad:S=>(w=>w.trackTreasuryPromoView("Treasury Promo Page"))(S)}),e.jsx(ce,{isAppContentDrawerOpen:m,handleDrawerToggle:c}),e.jsx(Ft,{analytics:b,navigate:t,companyId:u,onClickMenuIcon:()=>{c(!0)}})]})}return e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})})},te=M.div`
30
- display: flex;
31
- width: 100%;
32
- height: 100%;
33
- flex-direction: row;
34
- justify-content: center;
35
- align-items: center;
36
- background-color: ${t=>t.theme.colors.grey5};
37
- `;function sa(){const t=B(),a=y(v=>D(v)),{useFeatureGate:n}=ie(),{isFeatureEnabled:o}=n(A.isTreasuryEnabled),m=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,s=_(),f=Z(s?.loggedInUserRoleMap),r=a?.userRole!=null&&Oe(a?.userRole),l=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!r)&&Ne(s?.loggedInUserRoleMap),i=Ge(s?.loggedInUserRoleMap),u=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!r)&&_e(s?.loggedInUserRoleMap),{isFeatureEnabled:T}=n(A.isDepositAccountsFeatureEnabled),d=T&&!r&&$e(s?.loggedInUserRoleMap),c=a.company!=null&&ze(a.company),h=o&&c===!0&&!r&&G(s?.loggedInUserRoleMap),{isFeatureEnabled:g}=n(A.isChargeCardFeatureEnabled),{isFeatureEnabled:C}=n(A.isDebitCardFeatureEnabled),S=it(a,g,C)&&!r&&Qe(s?.loggedInUserRoleMap),w=qe(s?.loggedInUserRoleMap),x=Ze(s?.loggedInUserRoleMap),F=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified";return e.jsxs(we,{children:[x?null:e.jsx(k,{path:"setup",element:e.jsx(Y,{isBillPayAdminLevelAccess:l,isReimbursementAdminLevelAccess:u,isZeniAccountAdminLevelAccess:d,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:h,isUserHasOnlyCardAccess:w,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),x?null:e.jsx(k,{path:"verification",element:e.jsx(Y,{isBillPayAdminLevelAccess:l,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:u,isZeniAccountAdminLevelAccess:d,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:h,isUserHasOnlyCardAccess:w,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(Lt,{})}),e.jsx(k,{path:"statements",element:e.jsx(At,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(Dt,{})}),F?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx(z,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),h?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx(z,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx(z,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(ut,{})})]}):m&&h?e.jsx(k,{path:"*",element:e.jsx(L,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&f?e.jsx(k,{path:"*",element:e.jsx(L,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{sa as default};
@@ -1,12 +0,0 @@
1
- import{j as o}from"./liveblocks-C5Zo4IsV.js";import{a as f}from"./sentry-pTjqe1GE.js";import{t as u,u as h,j as y,N as I}from"./core-CDuxXgNT.js";import{Mf as b,fA as w,Bi as j}from"./zeni-epic-state-aFTbMOAR.js";import{z as l,y as x,H as S,K as D}from"./index-DzOogTqR.js";import{n as c}from"./mui-BWYOl-fu.js";import"./recharts-DOA55GXl.js";import"./analytics-CpUJgE1w.js";import"./plaid-2PJJQmCk.js";import"./dnd-VtUMJCWH.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-fnnIRm.js";import"./lexical-CIqawAn4.js";import"./pdf-WEHP-u0u.js";import"./utils-C-pFPw5l.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new e.Error().stack;t&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[t]="56e39bf4-7d7f-4860-8df4-f59cc76d2d17",e._sentryDebugIdIdentifier="sentry-dbid-56e39bf4-7d7f-4860-8df4-f59cc76d2d17")}catch{}})();const R=()=>{const[e]=u(),t=e.get("code")??"",i=e.get("state")??"",p=e.get("profileId")??"",[n,g]=f.useState(!1),d=h(),s=y(m=>b(m)),r=l.getSignedInUser(),a=l.getSignedInUserTenantWithId(i);if(r==null||a==null)return o.jsx(I,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,a?.tenantId),f.useEffect(()=>{n||(g(!0),d(j(t,p,i)))},[n,d]),s.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:s.error?.message??""})}):(s.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=c.div`
2
- display: flex;
3
- width: 100%;
4
- height: 100vh;
5
- flex-direction: row;
6
- justify-content: center;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey5};
9
- `,_=c(D.LargeRegular)`
10
- display: flex;
11
- color: ${S.important};
12
- `;export{R as default};
@@ -1,73 +0,0 @@
1
- import{j as e}from"./liveblocks-C5Zo4IsV.js";import{u as _,h as G,i as W,j as D,N as Q,n as q,g as J,o as Ve,p as f}from"./core-CDuxXgNT.js";import{Re as He,Rf as Un,Bn as Mn,Rg as zn,Rh as $n,bH as Vn,Ri as Ne,Dq as Ze,Rj as Ge,eX as M,yq as We,fW as we,co as se,cp as qe,yk as Hn,Rk as Nn,Rl as Zn,yn as Gn,yu as ye,yh as Wn,ye as qn,Rm as Ye,Bt as Yn,Q2 as ue,Rn as Qn,H4 as Xn,N8 as Jn,H6 as Kn,lf as Be,Ro as ea,rD as Qe,rr as Xe,l6 as Je,l9 as Fe,N9 as Oe,Na as na,Rp as aa,l8 as ta,lv as sa,kZ as oa,jw as ra,jv as ia,Rq as ca,Rr as xe,GN as la,Rs as da,Rt as ua,PX as Ae,Ru as Le,Rv as pa,Hh as ma,QE as fa,Ev as Ke,uc as en,Rw as ha,He as ga,Rx as nn,cQ as De,Bu as an,fX as ya,fC as tn,fE as ke,Hj as xa,Ep as Ca,Hb as wa,Ry as sn,Rz as on,GP as rn,GZ as _e,RA as Aa,Qu as Da,Hl as ka,bs as Sa,bJ as Ia,cA as ba,bK as ja,bt as va,LY as Ea}from"./zeni-epic-state-aFTbMOAR.js";import{Z as z,c5 as Pa,I as oe,Q as Z,e as P,z as I,a3 as Se,c6 as Ta,m as $,y as pe,c7 as Ra,D as K,s as cn,aq as Ba,af as Ue,f as L,c8 as Fa,at as Ie,c9 as Oa,J as me,ca as La,h as be,aR as X,cb as _a,Y as Ua,$ as ln,ac as Ma,cc as Me,cd as za,v as de,ce as $a,cf as Va,cg as Ha,i as Na,o as Za}from"./index-DzOogTqR.js";import{n as B,D as ee,S as ne}from"./mui-BWYOl-fu.js";import{a as p}from"./sentry-pTjqe1GE.js";import{u as dn}from"./useCashManagementBanner-BEqGoY3j.js";import N from"./NotFoundScreen-B_nzx2PP.js";import{S as ze}from"./SetupPagesScreen-DEnNlIFZ.js";import{F as un}from"./FeaturePreviewScreen-dZphyDK8.js";import{M as fe}from"./MobileAppDrawer-BWG5ZoNF.js";import{A as Ga,D as Wa,V as qa}from"./DomesticWireDetailScreen-C6o7L4nH.js";import{A as Ya}from"./AddressScreen-Cy07AeqE.js";import{u as pn}from"./useAskAiCfoHostNavButtonProps-DVKlzRut.js";import{Z as Qa}from"./ZeniAccountStatementScreen-wVpVNvAj.js";import"./recharts-DOA55GXl.js";import"./analytics-CpUJgE1w.js";import"./plaid-2PJJQmCk.js";import"./dnd-VtUMJCWH.js";import"./stripe-DMRn4zHo.js";import"./lottie-B-fnnIRm.js";import"./lexical-CIqawAn4.js";import"./pdf-WEHP-u0u.js";import"./utils-C-pFPw5l.js";import"./analyticsHelper-CLhyHcZM.js";import"./routePaths-rmRxk_gU.js";import"./BusinessVerificationPageScreen-B-L9gdz1.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="c71a7561-a647-4484-9db5-7f8e0e10b408",n._sentryDebugIdIdentifier="sentry-dbid-c71a7561-a647-4484-9db5-7f8e0e10b408")}catch{}})();const Xa=B.div`
2
- display: flex;
3
- min-height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${n=>n.theme.colors.grey4};
9
- `,Ja=q(function(n){const a=He(n);return{sweepAmount:a.sweepAmount,primaryAccount:a.primaryFundingAccount,treasurySummary:a.treasurySummary,initialRisk:a.formData.risk,initialFrequency:a.formData.frequency,initialMemo:a.formData.memo,isSaving:a.saveStatus.fetchState==="In-Progress"}},function(n,a){const{navigate:o}=a,t=s=>({amount:Vn[s],currencyCode:"USD",currencySymbol:"$"});return{onExit:()=>o(-1),onRiskChange:s=>{n($n({bufferAmount:t(s)}))},onSaveDraft:({risk:s,frequency:r,memo:c})=>{n(zn({bufferAmount:t(s),frequency:r,memo:c}))},onConfirm:()=>{n(Mn())}}})(Pa);function Ka(){const n=_(),a=G(),o=z(),{tenantEmailDomain:t}=W(),s=D(c=>He(c)),r=s.saveStatus.fetchState;return p.useEffect(()=>{r==="Completed"&&(n(Un()),a(`/${t}/checking/cash_management`))},[n,a,r,t]),s.primaryFundingAccount==null?e.jsx(Q,{to:`/${t}/checking/cash_management`,replace:!0}):e.jsx(Xa,{windowSize:o,children:e.jsx(Ja,{navigate:a})})}function mn({isEditDrawerOpen:n=!1}={}){const a=_(),o=G(),t=J(),{ruleId:s,tenantEmailDomain:r}=W(),c=oe(),{useFeatureGate:d}=Z(),u=D(x=>Ne(x)),h=D(x=>Ze(x.depositAccountState,x.depositAccountListState)),w=D(x=>Ge(x)),i=D(x=>M(x)),{isFeatureEnabled:l}=d(P.isTreasuryEnabled),m=u?.fetchState??"Not-Started",y=i?.companyId??(r==null?void 0:I.getSignedInUserTenant(r)?.companyId);p.useEffect(()=>{m==="Not-Started"&&y!=null&&a(We(!0))},[a,m,y]);const A=u?.fetchState!=="Completed";if(A)return{autoTransferRulePageProps:void 0,isLoading:A};const b=i?.company!=null&&we(i.company),C=!!(l&&b),k=se(c?.loggedInUserRoleMap)||qe(c?.loggedInUserRoleMap),g=I.getSignedInUser(),j={userId:g?.userId??"",sessionId:g?.zeniSessionId??"",tenantId:i?.tenantId??""},T=!!t.state?.scrollToAddRule;return{isLoading:A,autoTransferRulePageProps:{autoTransferRuleView:u,companyName:i?.companyName??"",hasAdminLevelAccess:k,includeTreasuryOption:C,transferLimit:5e5,authParams:j,currentTenant:i,depositAccountListView:h,downloadAccountDetailEndPoint:`${Se}/account_details`,editingRuleId:s,isEditDrawerOpen:n,scrollToAddRule:T,zeniAccountsConfigDetail:w,onBackClick:()=>o(".."),onCreateRule:()=>{a(qn())},onUpdateRule:x=>{a(ye(x))},onDeleteClick:x=>{a(Wn(x))},onPauseClick:x=>{a(ye(x,!0,!1))},onResumeClick:x=>{a(ye(x,!1,!0))},onActivityClick:(x,R)=>{a(Gn(x,R))},onUpdateRuleLocalData:x=>{a(Zn(x))},clearRuleLocalData:()=>{a(Nn())},onEditClick:x=>{o(`./${x}/edit`)},onEditDrawerClose:()=>{o("../../",{relative:"path"})},onReviewClick:()=>{a(Hn())}}}}const et=B.div`
10
- display: flex;
11
- min-height: 100%;
12
- width: 100%;
13
- flex: 1 1 auto;
14
- flex-direction: column;
15
- align-items: center;
16
- background-color: ${n=>n.theme.colors.grey4};
17
- `,nt=q(function(n){const a=Ye(n);return{bufferAmount:{amount:1e4,currencyCode:"USD",currencySymbol:"$"},cashBalance:a.cashBalance,cashFlowTotal:a.cashflow,inflows:a.totalInFlow,isOutflowsLoading:a.banner.fetchState!=="Completed",outflowItems:a.outflowEvents,outflows:a.totalOutFlow,projectionData:a.projectionData,totalCash:a.totalCash,treasuryBalance:a.treasuryBalance}},function(n,a){const{navigate:o}=a;return{onBackClick:()=>{o(-1)}}})(Ta);function ie({isAutoTransferRulesTabActive:n=!1,isEditDrawerOpen:a=!1}){const o=_(),t=G(),s=z(),r=D(w=>Ye(w)).banner.fetchState;p.useEffect(()=>{r==="Not-Started"&&o(Yn(!1))},[o,r]);const{autoTransferRulePageProps:c,isLoading:d}=mn({isEditDrawerOpen:a}),u=dn(),h=n?"autoTransferRules":"overview";return e.jsx(et,{windowSize:s,children:e.jsx(nt,{initialTab:h,autoTransferRulePageProps:c,cashManagementBannerProps:u,isAutoTransferRulesLoading:d,navigate:t})})}const at=B.div`
18
- display: flex;
19
- min-height: 100%;
20
- width: 100%;
21
- flex: 1 1 auto;
22
- flex-direction: column;
23
- align-items: center;
24
- background-color: ${n=>n.theme.colors.grey4};
25
- `;function $e({isEditDrawerOpen:n}){const a=$(),[o,t]=p.useState(!1),{autoTransferRulePageProps:s,isLoading:r}=mn({isEditDrawerOpen:n});return r||s==null?e.jsx(pe,{fetchState:"In-Progress",style:{backgroundColor:a.colors.grey5}}):e.jsxs(at,{children:[e.jsx(fe,{isAppContentDrawerOpen:o,handleDrawerToggle:c=>{t(c)}}),e.jsx(Ra,{...s})]})}const tt={overlayWidth:new K(100,100,58)},st=({vendorId:n,isDrawerOpen:a,closeDrawerHandler:o})=>{const t=_(),s=$(),r=z();if(I.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return e.jsx(ee,{onClose:()=>{o(!0),t(ue())},anchor:"right",open:a,PaperProps:{style:{width:tt.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(ot,{onClick:c=>c.stopPropagation(),children:e.jsx(Ga,{vendorIdParam:n,accountContext:"express-pay"})})})},ot=B(ne)`
26
- display: flex;
27
- min-height: 100%;
28
- flex-direction: column;
29
- `,rt={overlayWidth:new K(100,100,58)},it=({isDrawerOpen:n,closeDrawerHandler:a})=>{const o=_(),t=$(),s=z();if(I.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return e.jsx(ee,{onClose:()=>{a(!0),o(ue())},anchor:"right",open:n,PaperProps:{style:{width:rt.overlayWidth.valuePercentage(s),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:t.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(ct,{onClick:r=>r.stopPropagation(),children:e.jsx(Ya,{accountContext:"express-pay",addressTypeParam:"vendor_address"})})})},ct=B(ne)`
30
- display: flex;
31
- min-height: 100%;
32
- flex-direction: column;
33
- `,lt={overlayWidth:new K(100,100,58)},dt=({vendorId:n,isDrawerOpen:a,closeDrawerHandler:o})=>{const t=_(),s=$(),r=z();if(I.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return e.jsx(ee,{onClose:()=>{o(!0),t(ue())},anchor:"right",open:a,PaperProps:{style:{width:lt.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(ut,{onClick:c=>c.stopPropagation(),children:e.jsx(Wa,{vendorIdParam:n,accountContext:"express-pay"})})})},ut=B(ne)`
34
- display: flex;
35
- min-height: 100%;
36
- flex-direction: column;
37
- `,pt=B.div`
38
- display: flex;
39
- height: 100vh;
40
- width: 100%;
41
- flex: 1 1 auto;
42
- flex-direction: column;
43
- align-items: center;
44
- background-color: ${n=>n.theme.colors.grey4};
45
- `,mt=q(function(n,a){const o=M(n),t=I.getSignedInUser(),s=o.tenantId,r={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:s??""},c=a.expressPayDetails,d=n.entityAutoCompleteState.autoCompleteText.common,u=Jn(n,"common");return{expressPayDetails:c,fileProps:{authParams:r,filesEndPoint:`${Ie.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:d,entityAutoCompleteView:u},analytics:a.analytics}},function(n,a){const{navigate:o}=a;return{onSaveVendor:t=>{n(ia(t,void 0,void 0,!0))},saveVendorDetailLocalData:(t,s)=>{n(Fe({vendorId:s,localData:t}))},saveExpressPayLocalData:t=>{n(ra({localData:t}))},onVendorSelected:t=>{t!=null&&n(oa(t,!1))},updateSelectedVendorForCreate:t=>{n(sa(t))},initializeVendorAddress:()=>{n(ta())},resetVendorSaveStatus:t=>{n(aa({vendorId:t}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(t,s)=>{t.trim().length>=2?n(na({searchString:t,entityType:s,searchOrigin:"common"})):t.trim().length===0&&n(Oe("common"))},onCancelAutoComplete:()=>{n(Oe("common"))}},chooseNewVendor:t=>{n(Fe({localData:{vendorName:t}}))},onClickAddAccount:t=>{t.method.toLowerCase().indexOf("ach")!==-1?o("./add-ach",{relative:"path"}):t.method.toLowerCase().indexOf("wire")!==-1&&t.method.toLowerCase().indexOf("domestic")!==-1&&o("./add-wire",{relative:"path"})},updateFilesEntity:t=>{n(Je({files:t}))},onDeleteFile:t=>{n(Xe(t))},onEditFileName:(t,s)=>{n(Qe(t,s.split(".")[0]))},onBackClick:t=>{t!=null&&n(Be(t)),n(Be()),n(ea()),n(ue()),o("../",{relative:"path"})},onSchedulePayment:()=>{n(Kn())}}})(Fa);function ce({isAddACHDrawerOpen:n,isAddWireDrawerOpen:a,isAddAddressDrawerOpen:o}){const t=G(),s=J(),r=_(),[c,d]=p.useState(!1),{tenantEmailDomain:u}=W(),h=oe(),w=D(v=>v.expressPayState.fetchState),i=D(v=>M(v)),l=D(v=>Qn(v)),m=l.expressPayLocalData?.vendorId,y=i.companyId??I.getSignedInUserTenant(u)?.companyId,[A,b]=p.useState(!1),[C,k]=p.useState(!1),[g,j]=p.useState(!1),T=cn(s.state?.pathnameStackToGoBack),{poppedPathname:x}=T,R=x?.split("/"),V=R?.[R.length-1];p.useEffect(()=>{n===!0?b(!0):(b(!1),document.body.style.overflow="auto")},[n]),p.useEffect(()=>{a===!0?k(!0):(k(!1),document.body.style.overflow="auto")},[a]),p.useEffect(()=>{o===!0?j(!0):(j(!1),document.body.style.overflow="auto")},[o]),p.useEffect(()=>{w==="Not-Started"&&r(Xn(!0,!0))},[w,r]);const F=Ba(l.vendorViewDetails.bankAccountCreationState?.fetchState);if(p.useEffect(()=>{F==="In-Progress"&&l.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&E()},[F,l.vendorViewDetails.bankAccountCreationState?.fetchState]),I.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const U=v=>{d(v)},E=()=>{b(!1),k(!1),t("../",{relative:"path"})};return e.jsxs(pt,{children:[Ue(s)?e.jsx(fe,{isAppContentDrawerOpen:c,handleDrawerToggle:U}):null,A===!0?e.jsx(st,{vendorId:m,closeDrawerHandler:E,isDrawerOpen:A}):null,C===!0?e.jsx(dt,{vendorId:m,closeDrawerHandler:E,isDrawerOpen:C}):null,g===!0?e.jsx(it,{closeDrawerHandler:E,isDrawerOpen:g}):null,e.jsx(qa,{vendorId:m,isExpressPayPage:!0}),e.jsx(mt,{navigate:t,location:s,companyId:y,accountId:V,analytics:L,currentTenant:i,vendorId:m,roleMap:h?.loggedInUserRoleMap,isSettings:Ue(s),expressPayDetails:l,onClickMenuIcon:()=>{U(!0)}})]})}const ft={overlayWidth:new K(100,100,58)},ht=({authParams:n,downloadAccountDetailEndPoint:a,isAccountInfoDrawerOpen:o,zeniBankAccountDetail:t,closeDrawerHandler:s})=>{const r=$(),c=z(),d=D(i=>Ge(i)),u=D(i=>M(i));if(I.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const h=()=>{s(!0)},w={depositAccount:t,onDismissClick:h,zeniAccountsConfigDetail:d,authParams:n,downloadAccountDetailEndPoint:a,currentTenant:u};return e.jsx(ee,{anchor:"right",open:o,PaperProps:{style:{width:ft.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>h(),children:e.jsx(gt,{onClick:i=>i.stopPropagation(),children:e.jsx(Oa,{...w})})})},gt=B(ne)`
46
- display: flex;
47
- min-height: 100%;
48
- flex-direction: column;
49
- `,yt={overlayWidth:new K(100,100,58)},fn=({isCheckDepositDrawerOpen:n,closeDrawerHandler:a})=>{const o=$(),t=z(),s=_(),r=D(i=>M(i)),c=I.getSignedInUser(),d=r.tenantId,u={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:d??""};if(c==null)throw Error("Can't access check deposit page without signing in...");const h=D(i=>ca(i)),w={analytics:L,checkDeposit:h,filesEndPoint:`${Ie.fileMicroServiceBaseUrl}`,authParams:u,onSaveChangesToLocalStore:i=>{s(da(i))},updateFilesEntity:i=>{s(Je({files:i}))},onAnotherTransferClick:()=>{s(xe())},onDeleteFile:i=>{s(Xe(i))},onEditFileName:(i,l)=>{s(Qe(i,l.split(".")[0]))},onCheckDpositClick:()=>{s(la())},onDismissClick:()=>{a(!0),s(xe())}};return e.jsxs(e.Fragment,{children:[e.jsx(me,{analytics:L,onLoad:i=>(l=>l.trackPageLoaded(be.Event.accountsDepositCheckFormViewed))(i)}),e.jsx(ee,{anchor:"right",open:n,PaperProps:{style:{width:yt.overlayWidth.valuePercentage(t),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(i,l)=>(l==="backdropClick"||l==="escapeKeyDown")&&(a(!0),void s(xe())),children:e.jsx(xt,{onClick:i=>i.stopPropagation(),children:e.jsx(La,{...w})})})]})},xt=B(ne)`
50
- display: flex;
51
- min-height: 100%;
52
- flex-direction: column;
53
- `,Ct={overlayWidth:new K(100,100,58)},wt=q(function(n,a){const o=a.currentTenant?.companyId;return{plaidConnectionDetails:fa(n,o,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:Ze(n.depositAccountState,n.depositAccountListState)}},function(n,a){return{onReviewClick:()=>n(ga()),clearReviewTransferDetail:()=>n(ha()),onFetchLinkTokenClick:o=>{n(en("external_account",o))},onEstablishConnectionClick:o=>{n(Ke(o,a.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}})(_a),hn=({isTransferDrawerOpen:n,authParams:a,downloadAccountDetailEndPoint:o,closeDrawerHandler:t,zeniAccountsConfig:s})=>{const r=D(g=>ua(g)),c=D(g=>M(g)),d=$(),u=z(),h=_(),{accountId:w}=W(),[i,l]=p.useState("achTransfer"),[m,y]=p.useState(!1);if(I.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:A}=Z(),{configValue:b}=A(X.zeniAccountsConfig),C=Ae(b),k=()=>{t(!0),h(Le())};return p.useEffect(()=>{r.reviewTransferDetail.fetchState==="Completed"&&y(!0)},[y,r.reviewTransferDetail.fetchState]),e.jsxs(e.Fragment,{children:[e.jsx(me,{analytics:L,onLoad:g=>(j=>j.trackPageLoaded(be.Event.zeniAccountsTransferFormViewed))(g)}),e.jsx(ee,{onClose:()=>{(i==="achTransfer"&&m===!1||i==="achTransfer"&&m&&r.fetchState==="Completed")&&k()},anchor:"right",open:n,PaperProps:{style:{width:Ct.overlayWidth.valuePercentage(u),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsx(At,{onClick:g=>g.stopPropagation(),children:e.jsx(wt,{analytics:L,transferDetails:r,authParams:a,downloadAccountDetailEndPoint:o,onTransferClick:()=>{L.trackTransferBetweenAccountsFormClicked("Transfer",r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning?"Review Split Transfer":"Review Transfer",r.transferDetailLocalData.transferFrom?.label,r.transferDetailLocalData.transferTo?.label,r.transferDetailLocalData.amount.amount,r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning,r.reviewTransferDetail.reviewTransferMoney.transferSchedules.length,r.transferDetailLocalData.transferFrom?.accType==="paymentAccount"&&r.transferDetailLocalData.transferTo?.accType==="depositAccount"&&s.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&r.transferDetailLocalData.amount.amount>s.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),h(ma(w))},onDismissClick:k,onSaveChangesToLocalStore:g=>{h(pa(g))},onAnotherTransferClick:()=>{y(!1),h(Le())},currentTenant:c,zeniAccountsConfigDetail:s,currentDrawerContent:i,setCurrentDrawerContent:l,showReviewContent:m,setShowReviewContent:y,onBackClick:()=>{},maxInsuredAmount:C.maxInsuredAmount})})})]})},At=B(ne)`
54
- display: flex;
55
- min-height: 100%;
56
- flex-direction: column;
57
- `,Dt=B.div`
58
- display: flex;
59
- min-height: 100%;
60
- width: 100%;
61
- flex: 1 1 auto;
62
- flex-direction: column;
63
- align-items: center;
64
- background-color: ${n=>n.theme.colors.grey4};
65
- `,kt=q(function(n,a){return{zeniAccountListView:nn(n),isExpressPayEnabled:a.isExpressPayEnabled,analytics:a.analytics}},function(n,a){const{navigate:o,currentTenant:t,location:s,companyId:r,handleDrawerToggle:c,analytics:d,isBillPayEnabled:u,isCashManagementFeatureEnabled:h,isDebitCardFeatureEnabled:w}=a,{tenantEmailDomain:i}=t;return{onZeniAccountClick:(l,m)=>{d.trackAccountsListPageClicked("Accounts Row Item Click",m,"active");const y=St(i,l),A=de(s.state?.pathnameStackToGoBack,s.pathname);o(y,{state:{pathnameStackToGoBack:A}})},onSettingsClick:()=>{d.trackAccountsListPageClicked("Settings Icon"),o("setup")},onReloadTransactions:()=>{n(an(!1))},handleMoveMoneyOptionSelection:(l,m)=>{let y="page-not-found";l==="sendMoney"&&(y=Cn(i)),l==="payBill"?y=gn(t,u,w):l==="transfer"?(y=yn(i),m!=null&&n(sn(m))):l==="checkDeposit"&&(y=xn(i));const A=de(s.state?.pathnameStackToGoBack,s.pathname);o(y,{state:{pathnameStackToGoBack:A}})},unlinkPaymentAccount:(l,m)=>{d.trackAccountsListPageClicked("Unlink Account",m),n(wa(l))},onFetchLinkTokenClick:(l,m)=>{n(en("external_account",l,m))},onUpdatePaymentAccountStatus:(l,m,y)=>{n(Ca(l,m,"zeni_accounts","external_account",y))},onEstablishConnectionClick:l=>{n(Ke(l,r,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:l=>{n(xa(l))},onClickMenuIcon:()=>{c(!0)},onTreasuryGetStartedClick:()=>{o("../../treasury/promo")},onAutoTransferClick:l=>{const m=h?"./cash_management/auto-transfer":"./auto-transfer";l?o(m,{state:{...s.state,scrollToAddRule:!0}}):o(m)},onCashManagementClick:()=>{o(It(i))}}})(za);function Ce({isTransferDrawerOpen:n,isCheckDepositDrawerOpen:a}){const o=J(),t=G(),s=_(),r=z(),{tenantEmailDomain:c}=W(),{useDynamicConfig:d,useFeatureGate:u}=Z(),h=$(),{configValue:w}=d(X.zeniAccountsConfig),{isFeatureEnabled:i}=u(P.isTreasuryEnabled),{isFeatureEnabled:l}=u(P.isDebitCardFeatureEnabled),{isFeatureEnabled:m}=u(P.isAutoTransferRuleEnabled),{isFeatureEnabled:y}=u(P.isCheckingCommentingEnabled),{isFeatureEnabled:A}=u(P.isCashManagementFeatureEnabled),b=Ae(w),C=D(O=>M(O)),k=C.companyId??I.getSignedInUserTenant(c)?.companyId,{configValue:g}=d(X.expressPayConfig),j=g.is_enable_all_tenants===!0||g.tenant_ids!=null&&g.tenant_ids.includes(C.tenantId),[T,x]=p.useState(!1),[R,V]=p.useState(!1),[F,U]=p.useState(!1),[E,v]=p.useState(!1),S=D(O=>nn(O)),H=S.fetchState,ae=D(O=>Ne(O)),re=ae?.fetchState??"Not-Started",te=!!C.companyZeniAccountInfo?.info?.isZeniAccountEnabled,Y=oe(),je=!!C.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,wn=!!C.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,An=se(Y?.loggedInUserRoleMap),Dn=De(Y?.loggedInUserRoleMap),kn=!!C.companyBillPayInfo?.info?.isBillPayEnabled,ve=I.getSignedInUser(),Sn={userId:ve?.userId??"",sessionId:ve?.zeniSessionId??"",tenantId:C.tenantId??""},In=`${Se}/account_details`,{areTenantIdsInSync:Ee}=Ua();p.useEffect(()=>{!T&&Ee&&(x(!0),s(an(!1)))},[T,s,H,Ee]),p.useEffect(()=>{!R&&re==="Not-Started"&&k&&(V(!0),s(We(!0)))},[R,re,k,s]),p.useEffect(()=>{n!=null&&n===!0?U(!0):(U(!1),document.body.style.overflow="auto")},[n]),p.useEffect(()=>{v(a!=null&&a===!0)},[a]);const Pe=()=>{U(!1),t("..")},[bn,jn]=p.useState(!1),Te=O=>{jn(O)},{isAiCfoAccessEnabled:vn,onAskAiCfoClick:En}=pn({mobileExploreReferrer:"Checking Accounts"});ln({isDataReady:H==="Completed"});const Pn=dn(),Tn=C.company!=null&&we(C.company),he=(i&&Tn)===!0&&!wn,[Rn,Bn]=p.useState(!1),ge=D(O=>O.treasurySetupViewState.treasuryFundsDetails),Fn=ge.fundsDetails,On=Ma(Fn);p.useEffect(()=>{he!==!0||Rn||ge?.fetchStatus.fetchState!=="Not-Started"||(Bn(!0),s(ya()))},[ge.fetchStatus,s]);const Ln=tn(C),_n=ke(l,C);return Ln===!0&&_n!==!0?e.jsx(un,{}):te?e.jsxs(e.Fragment,{children:[S.fetchState==="Completed"&&F===!1&&E===!1?e.jsx(me,{analytics:L,onLoad:O=>(Re=>{Re.trackAccountsListPageViewed(S.depositAccountsSelectorView.depositAccounts.length,S.externalAccountsSelectorView.paymentAccounts.length,Me(S.summary?.totalBalance.available.amount??0),Me(S.summary?.totalInterest.available.amount??0),S.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield),he&&Re.trackTreasuryPromoView("Checking Promo Banner")})(O)}):null,F===!0?e.jsx(hn,{closeDrawerHandler:Pe,isTransferDrawerOpen:F,zeniAccountsConfig:S.zeniAccountsConfig,authParams:Sn,downloadAccountDetailEndPoint:In}):null,E===!0?e.jsx(fn,{closeDrawerHandler:Pe,isCheckDepositDrawerOpen:E}):null,e.jsxs(Dt,{windowSize:r,children:[e.jsx(fe,{isAppContentDrawerOpen:bn,handleDrawerToggle:Te}),e.jsx(kt,{zeniBankListView:S,navigate:t,currentTenant:C,location:o,companyId:k,analytics:L,cashManagementBannerProps:Pn,maxInsuredAmount:b.maxInsuredAmount,isExpressPayEnabled:j,isBillPayEnabled:kn,isCashManagementFeatureEnabled:A,isCheckingCommentingEnabled:y,isDebitCardFeatureEnabled:l,isAutoTransferRuleEnabled:m,handleDrawerToggle:Te,showTreasuryPromo:he,treasuryYieldPercentage:On,treasuryInsuredAmount:5e5,isAiCfoAccessEnabled:vn,onAskAiCfoClick:En})]})]}):je&&An?e.jsx(Q,{to:"../setup"}):C.companyZeniAccountInfo?.info&&!je&&Dn?e.jsx(Q,{to:"../promo",state:o.state}):e.jsx(pe,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}})}const gn=(n,a,o)=>{const t=ke(o,n),{tenantEmailDomain:s}=n;return t===!0||a===!1?`/${s}/bills`:`/${s}/bill/new`},St=(n,a)=>`/${n}/checking/${a}`,yn=(n,a)=>a==null?`/${n}/checking/transfer`:`/${n}/checking/${a}/transfer`,xn=(n,a)=>a==null?`/${n}/checking/check-deposit`:`/${n}/checking/${a}/check-deposit`,Cn=n=>`/${n}/checking/express-pay`,It=n=>`/${n}/checking/cash_management`,bt=B.div`
66
- display: flex;
67
- width: 100%;
68
- flex: 1 1 auto;
69
- flex-direction: column;
70
- align-items: center;
71
- min-height: 100vh;
72
- background-color: ${n=>n.theme.colors.grey4};
73
- `,jt=q(function(n,a){const{currentTenant:o}=a,t=on(n,a.accountId),s=I.getSignedInUser(),r=n.tenantState.currentTenantId,c={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:r??""},d=t.accountDetail?.id??"";return{currentTenantCompanyName:o.companyName??"",authParams:c,downloadEndPoint:`${Ie.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${d}`,zeniAccountDetail:t,isExpressPayEnabled:a.isExpressPayEnabled,fetchState:t.fetchState}},function(n,a){const{navigate:o,currentTenant:t,location:s,accountId:r}=a,{tenantEmailDomain:c}=t;return{handleMoveMoneyOptionSelection:(d,u)=>{let h="page-not-found";d==="sendMoney"?h=Cn(c):d==="payBill"?h=gn(t,a.isBillPayEnabled,a.isDebitCardFeatureEnabled):d==="transfer"?(h=yn(c,r),u!=null&&n(sn(u))):d==="checkDeposit"?(h=xn(c,r),u!=null&&n(Aa(u))):d==="accountStatement"&&(h=Et(c,r));const w=de(s.state?.pathnameStackToGoBack,s.pathname);o(h,{state:{pathnameStackToGoBack:w}})},onAccountDetailClick:()=>{const d=vt(c,r),u=de(s.state?.pathnameStackToGoBack,s.pathname);o(d,{state:{pathnameStackToGoBack:u}})},onEditNameClick:d=>{n(_e(r,"editName",d))},onReloadZeniAccountDetailPage:()=>{n(rn(r,!1))},onCloseAccountClick:()=>{n(_e(r,"closeAccount",""))},onBackClick:()=>{o("../",{relative:"path"})}}})($a);function le({isTransferDrawerOpen:n,isCheckDepositDrawerOpen:a,isAccountInfoDrawerOpen:o}){const t=J(),s=G(),r=_(),c=z(),{tenantEmailDomain:d,accountId:u}=W(),{useDynamicConfig:h}=Z(),{useFeatureGate:w}=Z(),{isFeatureEnabled:i}=w(P.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=w(P.isCheckingCommentingEnabled),m=D(Y=>M(Y)),{configValue:y}=h(X.expressPayConfig),A=y.is_enable_all_tenants===!0||y.tenant_ids!=null&&y.tenant_ids.includes(m.tenantId),b=!!m.companyBillPayInfo?.info?.isBillPayEnabled,C=I.getSignedInUser(),k=m.companyId??I.getSignedInUserTenant(d)?.companyId,g={userId:C?.userId??"",sessionId:C?.zeniSessionId??"",tenantId:m.tenantId??""},j=`${Se}/account_details`,[T,x]=p.useState(!1),[R,V]=p.useState(!1),[F,U]=p.useState(!1),[E,v]=p.useState(!1),S=D(Y=>on(Y,u??"")),H=S.fetchState,{isAiCfoAccessEnabled:ae,onAskAiCfoClick:re}=pn({mobileExploreReferrer:"Checking Account Detail"});ln({isDataReady:H==="Completed"}),p.useEffect(()=>{T||(r(rn(u??"",!1)),x(!0))},[T,r,H]),p.useEffect(()=>{v(o!=null&&o===!0)},[o]),p.useEffect(()=>{n!=null&&n===!0?V(!0):(V(!1),document.body.style.overflow="auto")},[n]),p.useEffect(()=>{U(a!=null&&a===!0)},[a]);const te=()=>{v(!1),s("..")};return e.jsxs(e.Fragment,{children:[E===!0&&S.accountDetail!=null?e.jsx(ht,{authParams:g,downloadAccountDetailEndPoint:j,closeDrawerHandler:te,isAccountInfoDrawerOpen:E,zeniBankAccountDetail:S.accountDetail}):null,R===!0?e.jsx(hn,{closeDrawerHandler:te,isTransferDrawerOpen:R,zeniAccountsConfig:S.zeniAccountsConfig,authParams:g,downloadAccountDetailEndPoint:j}):null,F===!0?e.jsx(fn,{closeDrawerHandler:te,isCheckDepositDrawerOpen:F}):null,e.jsx(bt,{windowSize:c,children:e.jsx(jt,{navigate:s,currentTenant:m,location:t,companyId:k,isDebitCardFeatureEnabled:i,accountId:u??"",isBillPayEnabled:b,isCheckingCommentingEnabled:l,isExpressPayEnabled:A,isAiCfoAccessEnabled:ae,onAskAiCfoClick:re})})]})}const vt=(n,a)=>`/${n}/checking/${a}/account-info`,Et=(n,a)=>`/${n}/checking/${a}/statements`,Pt=q(function(n,a){const{companyId:o}=a;return{zeniAccountSetupView:Da(n,o),meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true"}},function(n,a){const{navigate:o,companyId:t}=a;return{onSetupButtonClick:()=>{L.trackAccountsPromoPageClicked("Setup Accounts"),n(ka(t))},onBackClick:()=>{o("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{o("../setup",{relative:"path"})}}})(Ha),Tt=()=>{const n=G(),a=J(),{tenantEmailDomain:o}=W(),{useDynamicConfig:t}=Z(),s=$(),[r,c]=p.useState(!1),[d,u]=p.useState(!1),h=D(g=>M(g)),{configValue:w}=t(X.zeniAccountsConfig),i=Ae(w);p.useEffect(()=>{d===!1&&a.state?.message==="activation"&&u(!0)},[a.state]);const l=I.getSignedInUserTenant(o)?.companyId??h.companyId,m=I.getSignedInUser(),y=!!h.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,A=g=>{c(g)};if(m==null)throw Error("Can't access Zeni account promo page without signing in...");const b=oe(),C=se(b?.loggedInUserRoleMap),k=De(b?.loggedInUserRoleMap);if(y&&C)return e.jsx(Q,{to:"../../checking/setup"});if(h.company?.companyZeniAccountInfo&&(!y&&C||k)){if(a.state?.message==="activation"){const g=cn(a.state?.pathnameStackToGoBack);n(a.pathname,{state:{...a.state,message:void 0,pathnameStackToGoBack:g.newStack}})}return e.jsxs(e.Fragment,{children:[e.jsx(Va,{showConfetti:d}),e.jsx(me,{analytics:L,onLoad:g=>(j=>j.trackPageLoaded(be.Event.accountsPromoPageViewed))(g)}),e.jsx(fe,{isAppContentDrawerOpen:r,handleDrawerToggle:A}),e.jsx(Pt,{analytics:L,navigate:n,companyId:l,onClickMenuIcon:()=>{A(!0)},maxAnnualPercentageYield:i.maxAnnualPercentageYield,maxInsuredAmount:i.maxInsuredAmount,exampleBankBalance:3e6})]})}return e.jsx(pe,{fetchState:"In-Progress",style:{backgroundColor:s.colors.grey5}})};function rs(){const n=J(),a=D(ae=>M(ae)),o=$(),{useFeatureGate:t,useDynamicConfig:s}=Z(),r=oe(),c=se(r?.loggedInUserRoleMap),d=De(r?.loggedInUserRoleMap),u=!!a.company?.companyZeniAccountInfo.isZeniAccountEnabled,h=!!a.company?.companyZeniAccountInfo.isZeniAccountTOSAccepted,{isFeatureEnabled:w}=t(P.isChargeCardFeatureEnabled),{isFeatureEnabled:i}=t(P.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=t(P.isTreasuryEnabled),m=tn(a),y=ke(i,a),A=a?.userRole!=null&&Sa(a?.userRole),b=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!A)&&Ia(r?.loggedInUserRoleMap),C=ba(r?.loggedInUserRoleMap),k=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!A)&&ja(r?.loggedInUserRoleMap),{isFeatureEnabled:g}=t(P.isDepositAccountsFeatureEnabled),j=g&&!A,{configValue:T}=s(X.expressPayConfig),x=T.is_enable_all_tenants===!0||T.tenant_ids!=null&&T.tenant_ids.includes(a.tenantId),{isFeatureEnabled:R}=t(P.isAutoTransferRuleEnabled),V=a.company!=null&&we(a.company),F=l&&V===!0&&!A,{isFeatureEnabled:U}=t(P.isCashManagementFeatureEnabled),E=Na(a,w,i)&&!A&&va(r?.loggedInUserRoleMap),v=Ea(r?.loggedInUserRoleMap),S=j&&se(r?.loggedInUserRoleMap),H=S||qe(r?.loggedInUserRoleMap);return e.jsxs(Ve,{children:[e.jsx(f,{path:"setup",element:e.jsx(ze,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:C,isReimbursementAdminLevelAccess:k,isZeniAccountAdminLevelAccess:S,isChargeCardAdminLevelAccess:E,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"setup"})}),e.jsx(f,{path:"verification",element:e.jsx(ze,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:C,isReimbursementAdminLevelAccess:k,isZeniAccountAdminLevelAccess:S,isChargeCardAdminLevelAccess:E,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"verification"})}),R?e.jsxs(e.Fragment,{children:[e.jsx(f,{path:"auto-transfer",element:e.jsx($e,{})}),H?e.jsx(f,{path:"auto-transfer/:ruleId/edit",element:e.jsx($e,{isEditDrawerOpen:!0})}):null]}):e.jsx(f,{path:"auto-transfer",element:e.jsx(N,{})}),U&&u&&F?e.jsxs(e.Fragment,{children:[e.jsx(f,{path:"cash_management",element:e.jsx(ie,{})}),R?e.jsxs(e.Fragment,{children:[e.jsx(f,{path:"cash_management/auto-transfer",element:e.jsx(ie,{isAutoTransferRulesTabActive:!0})}),H?e.jsxs(e.Fragment,{children:[e.jsx(f,{path:"cash_management/auto-transfer/:ruleId/edit",element:e.jsx(ie,{isAutoTransferRulesTabActive:!0,isEditDrawerOpen:!0})}),e.jsx(f,{path:"cash_management/:ruleId/edit",element:e.jsx(ie,{isAutoTransferRulesTabActive:!0,isEditDrawerOpen:!0})})]}):null]}):e.jsx(f,{path:"cash_management/auto-transfer",element:e.jsx(N,{})}),e.jsx(f,{path:"cash_management/auto_sweep",element:e.jsx(Ka,{})})]}):e.jsxs(e.Fragment,{children:[e.jsx(f,{path:"cash_management",element:e.jsx(N,{})}),e.jsx(f,{path:"cash_management/auto-transfer",element:e.jsx(N,{})}),e.jsx(f,{path:"cash_management/auto_sweep",element:e.jsx(N,{})})]}),x&&c?e.jsxs(e.Fragment,{children:[e.jsx(f,{path:"express-pay",element:e.jsx(ce,{})}),e.jsx(f,{path:"express-pay/add-ach",element:e.jsx(ce,{isAddACHDrawerOpen:!0})}),e.jsx(f,{path:"express-pay/add-wire/add-address",element:e.jsx(ce,{isAddAddressDrawerOpen:!0})}),e.jsx(f,{path:"express-pay/add-wire",element:e.jsx(ce,{isAddWireDrawerOpen:!0})})]}):e.jsx(f,{path:"express-pay",element:e.jsx(N,{})}),e.jsx(f,{path:"promo",element:e.jsx(Tt,{})}),m&&!y?e.jsx(f,{path:"/*",element:e.jsx(un,{})}):u?e.jsxs(e.Fragment,{children:[e.jsx(f,{path:"/",element:e.jsx(Ce,{})}),e.jsx(f,{path:"transfer",element:e.jsx(Ce,{isTransferDrawerOpen:!0})}),e.jsx(f,{path:"check-deposit",element:e.jsx(Ce,{isCheckDepositDrawerOpen:!0})}),e.jsx(f,{path:":accountId/*",element:e.jsx(Rt,{})}),e.jsx(f,{path:"*",element:e.jsx(N,{})})]}):h&&c?e.jsx(f,{path:"*",element:e.jsx(Q,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&d?e.jsx(f,{path:"*",element:e.jsx(Q,{to:"../promo",state:n.state})}):e.jsx(f,{path:"*",element:e.jsx(pe,{fetchState:"In-Progress",style:{backgroundColor:o.colors.grey5,boxShadow:`0px 2px ${Za.sp1} ${o.colors.dropShadowNormal}`}})})]})}function Rt(){return e.jsxs(Ve,{children:[e.jsx(f,{path:"/",element:e.jsx(le,{})}),e.jsx(f,{path:"account-info",element:e.jsx(le,{isAccountInfoDrawerOpen:!0})}),e.jsx(f,{path:"transfer",element:e.jsx(le,{isTransferDrawerOpen:!0})}),e.jsx(f,{path:"check-deposit",element:e.jsx(le,{isCheckDepositDrawerOpen:!0})}),e.jsx(f,{path:"statements",element:e.jsx(Qa,{})}),e.jsx(f,{path:"*",element:e.jsx(N,{})})]})}export{rs as default};