@zeniai/web-app-ui 5.0.52-qa → 5.0.53-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 (121) hide show
  1. package/dist/assets/AddressRoutes-D2DRkabM.js +1 -0
  2. package/dist/assets/{AddressScreen-DpjaT47v.js → AddressScreen-Dz7dukxj.js} +2 -2
  3. package/dist/assets/AiCfoScreen-BZewpLje.js +11 -0
  4. package/dist/assets/{BillPayApprovalRoutes-DpvNHCNS.js → BillPayApprovalRoutes-CJR4AuBS.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-CUolvRGq.js → BillPayRoutes-DnKnqkZc.js} +7 -7
  6. package/dist/assets/{BusinessVerificationPageScreen-c7Zd26Y0.js → BusinessVerificationPageScreen-CIapP8vT.js} +2 -2
  7. package/dist/assets/{ChargeCardRoutes-T3opsh1B.js → ChargeCardRoutes-C_dKBRuF.js} +1 -1
  8. package/dist/assets/CompanyPassportScreen-CO0ra3b3.js +1 -0
  9. package/dist/assets/ConnectionAuthScreen-BzFFitvW.js +11 -0
  10. package/dist/assets/CustomerOnboardingAuthScreen-D-b9p5yP.js +1 -0
  11. package/dist/assets/{CustomerOnboardingRoutes-DtJCNcMt.js → CustomerOnboardingRoutes-DAfAcoCp.js} +4 -4
  12. package/dist/assets/{DashboardRoutes-Bb14i9II.js → DashboardRoutes-D-Yad_Gu.js} +3 -3
  13. package/dist/assets/{DefaultTenantHome-DXd0GlTx.js → DefaultTenantHome-CoIL9zlW.js} +1 -1
  14. package/dist/assets/DomesticWireDetailScreen-DmlqBc99.js +18 -0
  15. package/dist/assets/DrawerScreen-Ojlk_glq.js +1 -0
  16. package/dist/assets/EntityDetailRoutes-BUJ_kkZN.js +1 -0
  17. package/dist/assets/{ExpenseAutomationRoutes-w9kjDdWW.js → ExpenseAutomationRoutes-BeIoMNyV.js} +3 -3
  18. package/dist/assets/FeaturePreviewScreen-XMp6Ks_m.js +1 -0
  19. package/dist/assets/MagicLinkRoutes-Qs5jpSqt.js +72 -0
  20. package/dist/assets/MagicLinkSignInScreen-C7anMkyc.js +12 -0
  21. package/dist/assets/{MobileAppDrawer-D48Qay93.js → MobileAppDrawer--t6IvFv1.js} +1 -1
  22. package/dist/assets/NotFoundScreen-DwnzoLJU.js +1 -0
  23. package/dist/assets/{NotificationRoutes-Db0W2rzM.js → NotificationRoutes-sTDUm3UC.js} +1 -1
  24. package/dist/assets/PandLWithForecastRoutes-C7spTjMj.js +1 -0
  25. package/dist/assets/PeopleRoutes-tT0eCYuT.js +22 -0
  26. package/dist/assets/PerformanceRoutes-CK0d_z0a.js +1 -0
  27. package/dist/assets/{Preview-D2DtwG9I.js → Preview-6f9LxPkS.js} +1 -1
  28. package/dist/assets/{QBOConnectionScreen-DI24gxHX.js → QBOConnectionScreen-DUGBXHYt.js} +1 -1
  29. package/dist/assets/{ReferralListScreen-CJyMoGM1.js → ReferralListScreen-Cf0Eqtgm.js} +2 -2
  30. package/dist/assets/{ReimbursementApprovalRoutes-COI3wfjZ.js → ReimbursementApprovalRoutes-VgH79DJX.js} +1 -1
  31. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CY6LNZMI.js → ReimbursementApprovalRuleDetailScreen-COa1H9AX.js} +1 -1
  32. package/dist/assets/{ReimbursementRoutes-CaQEgwZB.js → ReimbursementRoutes-B1ZkkbHf.js} +6 -6
  33. package/dist/assets/{ReportsRoutes-BQV6HJYp.js → ReportsRoutes-DE0ZO7KW.js} +1 -1
  34. package/dist/assets/RewardsRoutes--KPLXTbA.js +1 -0
  35. package/dist/assets/ScreenRoutes-DjE90VcS.js +2 -0
  36. package/dist/assets/{SettingsRoutes-Bzk2XcMK.js → SettingsRoutes-BxKE1ve9.js} +7 -7
  37. package/dist/assets/{SetupPagesScreen-CnLVJHlF.js → SetupPagesScreen-CQlX6aNj.js} +5 -5
  38. package/dist/assets/SignInScreen-CjjSOtbr.js +1 -0
  39. package/dist/assets/SignOutScreen-Cff_01TR.js +9 -0
  40. package/dist/assets/{TaskListScreen-CPqwqhjs.js → TaskListScreen-Bgae74H_.js} +2 -2
  41. package/dist/assets/TaskRoutes-BFnfWd1X.js +9 -0
  42. package/dist/assets/TransactionDetailRoutes-BqiPhNjn.js +1 -0
  43. package/dist/assets/{TransactionDetailScreen-C02nO0Qx.js → TransactionDetailScreen-PaWtkTEH.js} +2 -2
  44. package/dist/assets/{TransactionListRoutes-C2KQuYfz.js → TransactionListRoutes-DHWR3aVx.js} +1 -1
  45. package/dist/assets/{TreasuryRoutes-gyRJRZDq.js → TreasuryRoutes-NSgI8Cqk.js} +5 -5
  46. package/dist/assets/{VendorsRoutes-BK-Ms40H.js → VendorsRoutes-pV_XlyDs.js} +1 -1
  47. package/dist/assets/WiseConfirmationScreen-ryAAdtIC.js +12 -0
  48. package/dist/assets/{ZeniAccountRoutes-Cxr6mtIm.js → ZeniAccountRoutes-CKJA4fI8.js} +10 -10
  49. package/dist/assets/{ZeniAccountStatementScreen-CY9YrNrA.js → ZeniAccountStatementScreen-BoeVpxsO.js} +2 -2
  50. package/dist/assets/{accountMappingHelper-D_41oG8v.js → accountMappingHelper-Blov7ltS.js} +1 -1
  51. package/dist/assets/{analytics-C79_HEwl.js → analytics-DMOhZ7ep.js} +1 -1
  52. package/dist/assets/{analyticsHelper-Dymvi35P.js → analyticsHelper-CcQrbJpT.js} +1 -1
  53. package/dist/assets/{core-CrPNHB9B.js → core-BpuExePz.js} +1 -1
  54. package/dist/assets/{decodeURIComponentSafe-11qS0X6C.js → decodeURIComponentSafe-BRoMr-Xr.js} +1 -1
  55. package/dist/assets/{dnd-CLr74Vpt.js → dnd-Ool1WkEK.js} +1 -1
  56. package/dist/assets/{empty-DNdmj9sv.js → empty-BBb-0fG-.js} +1 -1
  57. package/dist/assets/{empty-y5sf0ZoZ.js → empty-BUF0u-3V.js} +1 -1
  58. package/dist/assets/{emptyVideoElement-yo7GuDe8.js → emptyVideoElement-Uzds3hpE.js} +1 -1
  59. package/dist/assets/epic-CrZKkaDL.js +2 -0
  60. package/dist/assets/{getLocaleForTenant-53aSLMUF.js → getLocaleForTenant-CjnKm7X5.js} +1 -1
  61. package/dist/assets/{index-Drgtq5AO.js → index-64WyzcEc.js} +1 -1
  62. package/dist/assets/{index-3BUif0gd.js → index-6Rjzb8Pu.js} +1 -1
  63. package/dist/assets/{index-DafG4LQs.js → index-B2-OsYcb.js} +1 -1
  64. package/dist/assets/{index-DYHWjGU1.js → index-CPMhopDR.js} +2 -2
  65. package/dist/assets/{index-DTRbqJUs.js → index-CiibyDuy.js} +1 -1
  66. package/dist/assets/{index-K5qP6KBj.js → index-Cx6RZ5wc.js} +1 -1
  67. package/dist/assets/{index-D_5B74W3.js → index-DidLjpq0.js} +13814 -13807
  68. package/dist/assets/{lexical-Crf3nQAP.js → lexical-9B5gs5tG.js} +1 -1
  69. package/dist/assets/{liveblocks-Du-k54fV.js → liveblocks-3WpI1obg.js} +1 -1
  70. package/dist/assets/{lottie-DJl7yCqX.js → lottie-DFxKNIfK.js} +1 -1
  71. package/dist/assets/{mui-TIL16lH9.js → mui-Bpme9BmU.js} +1 -1
  72. package/dist/assets/{pathToGoBack-BnDDiX1S.js → pathToGoBack-JibONr5D.js} +1 -1
  73. package/dist/assets/{pdf-Blj2HSTu.js → pdf-CAA7iyNe.js} +4 -4
  74. package/dist/assets/{pdf-lib-Bg__bzHg.js → pdf-lib-CRl3mCcE.js} +1 -1
  75. package/dist/assets/{plaid-BajtMZoU.js → plaid-CTMaHWW7.js} +1 -1
  76. package/dist/assets/{pusher-Taq1TgUo.js → pusher-By_9ihm6.js} +1 -1
  77. package/dist/assets/{react-DnpzRhE_.js → react-B9l5xNkw.js} +1 -1
  78. package/dist/assets/{react-BBHxdfbR.js → react-C9RjToco.js} +1 -1
  79. package/dist/assets/{react-SoZj4ZnJ.js → react-CHKpQfw4.js} +1 -1
  80. package/dist/assets/{react-Bfyfk0h2.js → react-CyvOMBtf.js} +1 -1
  81. package/dist/assets/{react-NdPijvu_.js → react-DMWTUnLu.js} +1 -1
  82. package/dist/assets/{react-BoDJert1.js → react-Df7GsDYV.js} +1 -1
  83. package/dist/assets/{recharts-D-QaKK3D.js → recharts-D5_tB-NC.js} +1 -1
  84. package/dist/assets/{routePaths--l9WHzLE.js → routePaths-D7d1SJs7.js} +1 -1
  85. package/dist/assets/{sentry-D89gdSuk.js → sentry-z6zkwC0R.js} +1 -1
  86. package/dist/assets/{url-C0ML6sBp.js → url-C-EF6k4f.js} +1 -1
  87. package/dist/assets/{url-CO-Hj1H-.js → url-CVCmlGqq.js} +1 -1
  88. package/dist/assets/useAskAiCfoHostNavButtonProps-D5Yjge45.js +1 -0
  89. package/dist/assets/{useDeviceId-DiT0d8va.js → useDeviceId-C8t7Lzes.js} +1 -1
  90. package/dist/assets/useFetchSuggestedQuestionsWhenReady-Bjj9kjVA.js +1 -0
  91. package/dist/assets/{useInitialThreadRequest-YNSIQhjC.js → useInitialThreadRequest-C2mjRKeW.js} +1 -1
  92. package/dist/assets/{utils-CbgvUvVM.js → utils-Cb7KsPLv.js} +1 -1
  93. package/dist/assets/{withTransactionSidePanel-CejEEZIf.js → withTransactionSidePanel-C5hIBso3.js} +2 -2
  94. package/dist/assets/{zeni-epic-state-BfQ0VqqL.js → zeni-epic-state-RQBIdQMH.js} +6 -6
  95. package/dist/index.html +1 -1
  96. package/package.json +1 -1
  97. package/dist/assets/AddressRoutes-ztK9HgPY.js +0 -1
  98. package/dist/assets/AiCfoScreen-CdCoW0C-.js +0 -11
  99. package/dist/assets/CompanyPassportScreen-CZu0FnLy.js +0 -1
  100. package/dist/assets/ConnectionAuthScreen-COWR2RkF.js +0 -11
  101. package/dist/assets/CustomerOnboardingAuthScreen-gY-NbLVv.js +0 -1
  102. package/dist/assets/DomesticWireDetailScreen-D09Tlna2.js +0 -18
  103. package/dist/assets/DrawerScreen-x9gpWPcg.js +0 -1
  104. package/dist/assets/EntityDetailRoutes-BHU1aL_9.js +0 -1
  105. package/dist/assets/FeaturePreviewScreen-DnxvreKO.js +0 -1
  106. package/dist/assets/MagicLinkRoutes-Bd-kOXIm.js +0 -72
  107. package/dist/assets/MagicLinkSignInScreen-BIw9g-QS.js +0 -12
  108. package/dist/assets/NotFoundScreen-BfxTO_Ym.js +0 -1
  109. package/dist/assets/PandLWithForecastRoutes-BGQYMSU9.js +0 -1
  110. package/dist/assets/PeopleRoutes-RZxWZwJ9.js +0 -22
  111. package/dist/assets/PerformanceRoutes-BvsRQUy5.js +0 -1
  112. package/dist/assets/RewardsRoutes--Tfqx-gB.js +0 -1
  113. package/dist/assets/ScreenRoutes-zdSjcYR9.js +0 -2
  114. package/dist/assets/SignInScreen-BgxcqZqg.js +0 -1
  115. package/dist/assets/SignOutScreen-CqeahZfP.js +0 -9
  116. package/dist/assets/TaskRoutes-5ECalEZl.js +0 -9
  117. package/dist/assets/TransactionDetailRoutes-BNVIkVuQ.js +0 -1
  118. package/dist/assets/WiseConfirmationScreen-wtb5r0vd.js +0 -12
  119. package/dist/assets/epic-B-kprsvS.js +0 -2
  120. package/dist/assets/useAskAiCfoHostNavButtonProps-BQG6o7HM.js +0 -1
  121. package/dist/assets/useFetchSuggestedQuestionsWhenReady-Bawd7MuO.js +0 -1
@@ -1,4 +1,4 @@
1
- import{j as e}from"./liveblocks-Du-k54fV.js";import{j as L,u as M,h as U,l as O,g as f,N as B,k as N,n as Te,o as k}from"./core-CrPNHB9B.js";import{ck as V,eN as D,MB as R,D7 as ae,fc as W,CR as ne,MD as Ie,Da as we,Mz as ke,MA as se,MR as be,Bh as Ae,s6 as je,MF as Ee,Dl as ve,MC as re,cN as Z,wc as oe,eR as De,eT as Fe,NM as Be,NN as Le,CS as Me,NO as Ue,CT as Re,D0 as Pe,bv as Oe,bD as Ne,cv as Ve,bE as _e,cj as ze,fb as $e,bs as Ge,Il as He,ci as We}from"./zeni-epic-state-BfQ0VqqL.js";import{A as _,al as Ze,z as j,C as z,e as b,b_ as qe,b$ as Ke,c0 as H,q,h as Je,M as Qe,K as Xe,a as ie,p as v,E as Ye,B as et,c1 as tt,ao as K,v as at,c2 as nt,n as J,c3 as st,T as X,c4 as rt,a4 as ot}from"./index-D_5B74W3.js";import{D as it,n as P,S as ct}from"./mui-TIL16lH9.js";import lt from"./NotFoundScreen-BfxTO_Ym.js";import{S as Y}from"./SetupPagesScreen-CnLVJHlF.js";import{a as d}from"./sentry-D89gdSuk.js";import{u as ut}from"./useAskAiCfoHostNavButtonProps-BQG6o7HM.js";import{c as dt}from"./useFetchSuggestedQuestionsWhenReady-Bawd7MuO.js";import{M as ce}from"./MobileAppDrawer-D48Qay93.js";import{F as pt}from"./FeaturePreviewScreen-DnxvreKO.js";import{a as ee}from"./analyticsHelper-Dymvi35P.js";import"./recharts-D-QaKK3D.js";import"./analytics-C79_HEwl.js";import"./plaid-BajtMZoU.js";import"./dnd-CLr74Vpt.js";import"./stripe-DMRn4zHo.js";import"./lottie-DJl7yCqX.js";import"./lexical-Crf3nQAP.js";import"./pdf-Blj2HSTu.js";import"./utils-CbgvUvVM.js";import"./routePaths--l9WHzLE.js";import"./BusinessVerificationPageScreen-c7Zd26Y0.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]="e8eb3146-e9db-4046-8979-8c07d751f432",t._sentryDebugIdIdentifier="sentry-dbid-e8eb3146-e9db-4046-8979-8c07d751f432")}catch{}})();const mt=N(function(t,a){const{companyId:n}=a;return{treasurySetupView:R(t,n),analytics:b}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:p}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=p.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(we(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(Ie(r))}}})(qe);function ft(){const t=L(),a=M(),n=U(),{tenantEmailDomain:o}=O(),p=_(),r=f(w=>w.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=Ze(r),s=V(p?.loggedInUserRoleMap),[c,i]=d.useState(!1),[y,I]=d.useState(!1),[u,l]=d.useState(!1),g=f(w=>D(w)),h=j.getSignedInUserTenant(o)?.companyId??g.companyId,C=j.getSignedInUser(),S=f(w=>R(w,h)),T=f(w=>w.treasurySetupViewState.fetchState),x=f(w=>w.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(w=>w.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(C==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{c||T!=="Not-Started"||h==null||(i(!0),n(ae(h,!0,!1)))},[c,T,h,n]),d.useEffect(()=>{u||F!=="Not-Started"||h==null||(l(!0),n(W()))},[u,F,h,n]),d.useEffect(()=>{y||x!=="Not-Started"||h==null||(I(!0),n(ne()))},[y,x,h,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(B,{to:"../promo"});const E=g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||T!=="Completed";return e.jsxs(e.Fragment,{children:[!E&&e.jsx(z,{analytics:b,onLoad:()=>{}}),e.jsx(mt,{navigate:t,location:a,companyId:h,isEditMode:!0,isLoading:E,isReadOnly:!s,treasurySetupView:S,analytics:b})]})}const yt=N(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:be(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:R(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{H(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{H(a.analytics,"confirm",r,m,"Transfer"),t(ve())},onSaveChangesToLocalStore:s=>{t(Ee(s))},onFetchLinkTokenClick:s=>{t(je("treasury_setup",s))},onEstablishConnectionClick:s=>{t(Ae(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Ke),gt=({isFirstTransfer:t})=>{const a=L(),{tenantEmailDomain:n}=O(),o=U(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[c,i]=d.useState(!1),[y,I]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),l=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),g=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),h=f(x=>D(x)),C=j.getSignedInUserTenant(n)?.companyId??h.companyId,S=f(x=>ke(x)),T=f(x=>R(x,C));if(j.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||C==null||(s(!0),o(ae(C,!0,!1)))},[m,u,C,o]),d.useEffect(()=>{c||l!=="Not-Started"||C==null||(i(!0),o(W()))},[c,l,C,o]),d.useEffect(()=>{y||g!=="Not-Started"||C==null||(I(!0),o(ne()))},[y,g,C,o]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:b,onLoad:()=>{}}),e.jsx(yt,{analytics:b,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:h,treasurySetupView:T,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{H(b,"review",S.treasuryTransferMoneyLocalData,T.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},ht=P.div`
1
+ import{j as e}from"./liveblocks-3WpI1obg.js";import{j as L,u as U,h as M,l as O,g as f,N as B,k as N,n as Te,o as k}from"./core-BpuExePz.js";import{ck as V,eN as D,MB as R,D7 as ae,fb as W,CR as ne,MD as Ce,Da as we,Mz as ke,MA as se,MR as be,Bh as Ae,s6 as je,MF as Ee,Dl as ve,MC as re,cN as Z,wc as oe,eR as De,eT as Fe,NM as Be,NN as Le,CS as Ue,NO as Me,CT as Re,D0 as Pe,bv as Oe,bD as Ne,cv as Ve,bE as _e,cj as ze,fa as $e,bs as Ge,Il as He,ci as We}from"./zeni-epic-state-RQBIdQMH.js";import{A as _,al as Ze,z as j,x as z,e as b,b_ as qe,b$ as Je,c0 as H,q,h as Ke,I as Qe,G as Xe,a as ie,d as v,y as Ye,B as et,c1 as tt,ao as J,s as at,c2 as nt,p as K,c3 as st,T as X,c4 as rt,a4 as ot}from"./index-DidLjpq0.js";import{D as it,n as P,S as ct}from"./mui-Bpme9BmU.js";import lt from"./NotFoundScreen-DwnzoLJU.js";import{S as Y}from"./SetupPagesScreen-CQlX6aNj.js";import{a as d}from"./sentry-z6zkwC0R.js";import{u as ut}from"./useAskAiCfoHostNavButtonProps-D5Yjge45.js";import{c as dt}from"./useFetchSuggestedQuestionsWhenReady-Bjj9kjVA.js";import{M as ce}from"./MobileAppDrawer--t6IvFv1.js";import{F as pt}from"./FeaturePreviewScreen-XMp6Ks_m.js";import{a as ee}from"./analyticsHelper-CcQrbJpT.js";import"./recharts-D5_tB-NC.js";import"./analytics-DMOhZ7ep.js";import"./plaid-CTMaHWW7.js";import"./dnd-Ool1WkEK.js";import"./stripe-DMRn4zHo.js";import"./lottie-DFxKNIfK.js";import"./lexical-9B5gs5tG.js";import"./pdf-CAA7iyNe.js";import"./utils-Cb7KsPLv.js";import"./routePaths-D7d1SJs7.js";import"./BusinessVerificationPageScreen-CIapP8vT.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]="2f9b8988-f746-46c9-8afb-97d45089e79d",t._sentryDebugIdIdentifier="sentry-dbid-2f9b8988-f746-46c9-8afb-97d45089e79d")}catch{}})();const mt=N(function(t,a){const{companyId:n}=a;return{treasurySetupView:R(t,n),analytics:b}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:p}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=p.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(we(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(Ce(r))}}})(qe);function ft(){const t=L(),a=U(),n=M(),{tenantEmailDomain:o}=O(),p=_(),r=f(w=>w.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=Ze(r),s=V(p?.loggedInUserRoleMap),[c,i]=d.useState(!1),[y,C]=d.useState(!1),[u,l]=d.useState(!1),g=f(w=>D(w)),h=j.getSignedInUserTenant(o)?.companyId??g.companyId,I=j.getSignedInUser(),S=f(w=>R(w,h)),T=f(w=>w.treasurySetupViewState.fetchState),x=f(w=>w.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(w=>w.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(I==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{c||T!=="Not-Started"||h==null||(i(!0),n(ae(h,!0,!1)))},[c,T,h,n]),d.useEffect(()=>{u||F!=="Not-Started"||h==null||(l(!0),n(W()))},[u,F,h,n]),d.useEffect(()=>{y||x!=="Not-Started"||h==null||(C(!0),n(ne()))},[y,x,h,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(B,{to:"../promo"});const E=g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||T!=="Completed";return e.jsxs(e.Fragment,{children:[!E&&e.jsx(z,{analytics:b,onLoad:()=>{}}),e.jsx(mt,{navigate:t,location:a,companyId:h,isEditMode:!0,isLoading:E,isReadOnly:!s,treasurySetupView:S,analytics:b})]})}const yt=N(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:be(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:R(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{H(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{H(a.analytics,"confirm",r,m,"Transfer"),t(ve())},onSaveChangesToLocalStore:s=>{t(Ee(s))},onFetchLinkTokenClick:s=>{t(je("treasury_setup",s))},onEstablishConnectionClick:s=>{t(Ae(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Je),gt=({isFirstTransfer:t})=>{const a=L(),{tenantEmailDomain:n}=O(),o=M(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[c,i]=d.useState(!1),[y,C]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),l=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),g=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),h=f(x=>D(x)),I=j.getSignedInUserTenant(n)?.companyId??h.companyId,S=f(x=>ke(x)),T=f(x=>R(x,I));if(j.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||I==null||(s(!0),o(ae(I,!0,!1)))},[m,u,I,o]),d.useEffect(()=>{c||l!=="Not-Started"||I==null||(i(!0),o(W()))},[c,l,I,o]),d.useEffect(()=>{y||g!=="Not-Started"||I==null||(C(!0),o(ne()))},[y,g,I,o]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:b,onLoad:()=>{}}),e.jsx(yt,{analytics:b,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:h,treasurySetupView:T,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{H(b,"review",S.treasuryTransferMoneyLocalData,T.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},ht=P.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -6,7 +6,7 @@ import{j as e}from"./liveblocks-Du-k54fV.js";import{j as L,u as M,h as U,l as O,
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${t=>t.theme.colors.grey4};
9
- `,St={overlayWidth:new Ye(100,100,48)},xt=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:p,handleDrawerToggle:r,analytics:m}=a,{tenantEmailDomain:s}=o;return{onSettingsClick:()=>{m.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:c=>{let i="page-not-found";c==="editPortfolio"?i=Ct(s):c==="statements"?i=Tt(s):c==="taxLetter"?i=It(s):c==="settings"&&(i=wt(s));const y=at(p.state?.pathnameStackToGoBack,p.pathname);n(i,{state:{pathnameStackToGoBack:y}})},onColumnSortConfigChanged:(c,i)=>{t(Be({uiState:{sortKey:c,sortOrder:i}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{r(!0)},onAutoTransferClick:()=>{n("../../checking/auto-transfer")}}})(tt);function G({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=M(),o=L(),p=U(),r=q(),m=Je(),s=f(A=>D(A)),{tenantEmailDomain:c}=O(),i=s.companyId??j.getSignedInUserTenant(c)?.companyId,[y,I]=d.useState(!1),u=f(A=>re(A)),l=u.fetchState,g=u.accountSummary?.totalBalance?.amount,h=f(A=>A.treasurySetupViewState.treasuryFundsDetails?.fetchStatus),C=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",S=_(),T=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=V(S?.loggedInUserRoleMap),F=Z(S?.loggedInUserRoleMap),{areTenantIdsInSync:E}=Qe();d.useEffect(()=>{l==="Not-Started"&&!y&&E&&(I(!0),p(oe(!0)))},[y,p,l,E]),d.useEffect(()=>{u.transactionsFetchState.fetchState==="Completed"&&u.transactions.length===0&&!n.pathname.includes("transfer")&&x&&o("./transfer")},[u.transactionsFetchState.fetchState,u.transactions.length]);const w=()=>{o("..")},[le,ue]=d.useState(!1),Q=A=>{ue(A)},{isAiCfoOpen:de,setIsAiCfoOpen:pe}=Xe(),{isAiCfoAccessEnabled:me,onAskAiCfoClick:fe}=ut({isAiCfoOpen:de,setIsAiCfoOpen:pe,mobileExploreReferrer:"Treasury"});dt({isDataReady:l==="Completed"});const{useFeatureGate:$}=ie(),{isFeatureEnabled:ye}=$(v.isDebitCardFeatureEnabled),{isFeatureEnabled:ge}=$(v.isAutoTransferRuleEnabled),{isFeatureEnabled:he}=$(v.isTreasuryCommentingEnabled),Se=De(s),xe=Fe(ye,s);if(Se===!0&&xe!==!0)return e.jsx(pt,{});if(C){const A=h?.fetchState!=="Completed"||u.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[u.accountSummaryFetchState.fetchState==="Completed"&&h?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(z,{analytics:b,onLoad:()=>{}}):null,e.jsx(it,{onClose:w,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:St.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:m.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(kt,{onClick:Ce=>Ce.stopPropagation(),children:[t===!0?e.jsx(gt,{isFirstTransfer:u.transactions.length===0||g===0}):null,a===!0?e.jsx(ft,{}):null]})}),e.jsxs(ht,{windowSize:r,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:Q}),e.jsx(xt,{treasuryDetailsView:u,isAutoTransferRuleEnabled:ge,navigate:o,currentTenant:s,location:n,companyId:i,analytics:b,isTreasuryCommentingEnabled:he,handleDrawerToggle:Q,isLoading:A,isAiCfoAccessEnabled:me,onAskAiCfoClick:fe})]})]})}return T&&x?e.jsx(B,{to:"../setup"}):s.companyTreasuryInfo?.info&&!T&&F?e.jsx(B,{to:"../promo",state:n.state}):e.jsx(et,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const Ct=t=>`/${t}/treasury/edit-portfolio`,Tt=t=>`/${t}/treasury/statements`,It=t=>`/${t}/treasury/tax-letter`,wt=t=>`/${t}/treasury/setup`,kt=P(ct)`
9
+ `,St={overlayWidth:new Ye(100,100,48)},xt=N(function(t,a){const n=re(t),{companyId:o}=a;return{treasuryDetail:n,treasurySetupView:R(t,o),downloadEndPoint:`${J.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}},function(t,a){const{navigate:n,currentTenant:o,location:p,handleDrawerToggle:r,analytics:m}=a,{tenantEmailDomain:s}=o;return{onSettingsClick:()=>{m.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:c=>{let i="page-not-found";c==="editPortfolio"?i=It(s):c==="statements"?i=Tt(s):c==="taxLetter"?i=Ct(s):c==="settings"&&(i=wt(s));const y=at(p.state?.pathnameStackToGoBack,p.pathname);n(i,{state:{pathnameStackToGoBack:y}})},onColumnSortConfigChanged:(c,i)=>{t(Be({uiState:{sortKey:c,sortOrder:i}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{r(!0)},onAutoTransferClick:()=>{n("../../checking/auto-transfer")}}})(tt);function G({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=U(),o=L(),p=M(),r=q(),m=Ke(),s=f(A=>D(A)),{tenantEmailDomain:c}=O(),i=s.companyId??j.getSignedInUserTenant(c)?.companyId,[y,C]=d.useState(!1),u=f(A=>re(A)),l=u.fetchState,g=u.accountSummary?.totalBalance?.amount,h=f(A=>A.treasurySetupViewState.treasuryFundsDetails?.fetchStatus),I=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",S=_(),T=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=V(S?.loggedInUserRoleMap),F=Z(S?.loggedInUserRoleMap),{areTenantIdsInSync:E}=Qe();d.useEffect(()=>{l==="Not-Started"&&!y&&E&&(C(!0),p(oe(!0)))},[y,p,l,E]),d.useEffect(()=>{u.transactionsFetchState.fetchState==="Completed"&&u.transactions.length===0&&!n.pathname.includes("transfer")&&x&&o("./transfer")},[u.transactionsFetchState.fetchState,u.transactions.length]);const w=()=>{o("..")},[le,ue]=d.useState(!1),Q=A=>{ue(A)},{isAiCfoOpen:de,setIsAiCfoOpen:pe}=Xe(),{isAiCfoAccessEnabled:me,onAskAiCfoClick:fe}=ut({isAiCfoOpen:de,setIsAiCfoOpen:pe,mobileExploreReferrer:"Treasury"});dt({isDataReady:l==="Completed"});const{useFeatureGate:$}=ie(),{isFeatureEnabled:ye}=$(v.isDebitCardFeatureEnabled),{isFeatureEnabled:ge}=$(v.isAutoTransferRuleEnabled),{isFeatureEnabled:he}=$(v.isTreasuryCommentingEnabled),Se=De(s),xe=Fe(ye,s);if(Se===!0&&xe!==!0)return e.jsx(pt,{});if(I){const A=h?.fetchState!=="Completed"||u.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[u.accountSummaryFetchState.fetchState==="Completed"&&h?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(z,{analytics:b,onLoad:()=>{}}):null,e.jsx(it,{onClose:w,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:St.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:m.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(kt,{onClick:Ie=>Ie.stopPropagation(),children:[t===!0?e.jsx(gt,{isFirstTransfer:u.transactions.length===0||g===0}):null,a===!0?e.jsx(ft,{}):null]})}),e.jsxs(ht,{windowSize:r,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:Q}),e.jsx(xt,{treasuryDetailsView:u,isAutoTransferRuleEnabled:ge,navigate:o,currentTenant:s,location:n,companyId:i,analytics:b,isTreasuryCommentingEnabled:he,handleDrawerToggle:Q,isLoading:A,isAiCfoAccessEnabled:me,onAskAiCfoClick:fe})]})]})}return T&&x?e.jsx(B,{to:"../setup"}):s.companyTreasuryInfo?.info&&!T&&F?e.jsx(B,{to:"../promo",state:n.state}):e.jsx(et,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const It=t=>`/${t}/treasury/edit-portfolio`,Tt=t=>`/${t}/treasury/statements`,Ct=t=>`/${t}/treasury/tax-letter`,wt=t=>`/${t}/treasury/setup`,kt=P(ct)`
10
10
  display: flex;
11
11
  min-height: 100%;
12
12
  flex-direction: column;
@@ -18,7 +18,7 @@ import{j as e}from"./liveblocks-Du-k54fV.js";import{j as L,u as M,h as U,l as O,
18
18
  flex-direction: column;
19
19
  align-items: center;
20
20
  background-color: ${t=>t.theme.colors.grey4};
21
- `;function At(){const t=L(),a=U(),n=q(),o=M(),p=`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(l=>Le(l));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),a(Me(!1)))},[r,s.fetchState,a]);const c=j.getSignedInUser(),i=f(l=>D(l)),y={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:i.tenantId??""},I=i.company?.companyInfo.companyLegalName??i.companyName;if(c==null)throw Error("Can't access statements page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(bt,{windowSize:n,children:e.jsx(nt,{currentTenantCompanyName:I,statementListView:s,isLoading:u,onBackClick:()=>{const l=J(o.state?.pathnameStackToGoBack),g=l.poppedPathname??"..";t(g,{state:{pathnameStackToGoBack:l.newStack}})},authParams:y,downloadEndPoint:p})})}const jt=P.div`
21
+ `;function At(){const t=L(),a=M(),n=q(),o=U(),p=`${J.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(l=>Le(l));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),a(Ue(!1)))},[r,s.fetchState,a]);const c=j.getSignedInUser(),i=f(l=>D(l)),y={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:i.tenantId??""},C=i.company?.companyInfo.companyLegalName??i.companyName;if(c==null)throw Error("Can't access statements page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(bt,{windowSize:n,children:e.jsx(nt,{currentTenantCompanyName:C,statementListView:s,isLoading:u,onBackClick:()=>{const l=K(o.state?.pathnameStackToGoBack),g=l.poppedPathname??"..";t(g,{state:{pathnameStackToGoBack:l.newStack}})},authParams:y,downloadEndPoint:p})})}const jt=P.div`
22
22
  display: flex;
23
23
  height: 100vh;
24
24
  width: 100%;
@@ -26,7 +26,7 @@ import{j as e}from"./liveblocks-Du-k54fV.js";import{j as L,u as M,h as U,l as O,
26
26
  flex-direction: column;
27
27
  align-items: center;
28
28
  background-color: ${t=>t.theme.colors.grey4};
29
- `;function Et(){const t=L(),a=q(),n=M(),o=U(),p=`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(l=>Ue(l));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),o(Re(!1)))},[r,s.fetchState,o]);const c=j.getSignedInUser(),i=f(l=>D(l)),y={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:i.tenantId??""},I=i.company?.companyInfo.companyLegalName??i.companyName;if(c==null)throw Error("Can't access tax letter page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(jt,{windowSize:a,children:e.jsx(st,{currentTenantCompanyName:I,taxLetterListView:s,isLoading:u,onBackClick:()=>{const l=J(n.state?.pathnameStackToGoBack),g=l.poppedPathname??"..";t(g,{state:{pathnameStackToGoBack:l.newStack}})},authParams:y,downloadEndPoint:p})})}const vt=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(Pe(o))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:p=>{n(p?"..":"../setup",{relative:"path"})}}})(rt),Dt=()=>{const t=L(),a=M(),n=U(),{tenantEmailDomain:o}=O(),[p,r]=d.useState(!1),m=f(S=>D(S)),[s,c]=d.useState(!1),i=f(S=>S.treasurySetupViewState.treasuryFundsDetails?.fetchStatus);d.useEffect(()=>{s||i?.fetchState!=="Not-Started"||y==null||(c(!0),n(W()))},[i,n]);const y=j.getSignedInUserTenant(o)?.companyId??m.companyId,I=j.getSignedInUser(),u=!!m.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,l=S=>{r(S)};if(I==null)throw Error("Can't access treasury promo page without signing in...");const g=_(),h=V(g?.loggedInUserRoleMap),C=Z(g?.loggedInUserRoleMap);if(u&&h)return e.jsx(B,{to:"../../treasury/setup"});if(m.company?.companyTreasuryInfo&&(!u&&h||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(z,{analytics:b,onLoad:S=>(T=>T.trackTreasuryPromoView("Treasury Promo Page"))(S)}),e.jsx(ce,{isAppContentDrawerOpen:p,handleDrawerToggle:l}),e.jsx(vt,{analytics:b,navigate:t,companyId:y,onClickMenuIcon:()=>{l(!0)}})]})}return e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})})},te=P.div`
29
+ `;function Et(){const t=L(),a=q(),n=U(),o=M(),p=`${J.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(l=>Me(l));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),o(Re(!1)))},[r,s.fetchState,o]);const c=j.getSignedInUser(),i=f(l=>D(l)),y={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:i.tenantId??""},C=i.company?.companyInfo.companyLegalName??i.companyName;if(c==null)throw Error("Can't access tax letter page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(jt,{windowSize:a,children:e.jsx(st,{currentTenantCompanyName:C,taxLetterListView:s,isLoading:u,onBackClick:()=>{const l=K(n.state?.pathnameStackToGoBack),g=l.poppedPathname??"..";t(g,{state:{pathnameStackToGoBack:l.newStack}})},authParams:y,downloadEndPoint:p})})}const vt=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(Pe(o))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:p=>{n(p?"..":"../setup",{relative:"path"})}}})(rt),Dt=()=>{const t=L(),a=U(),n=M(),{tenantEmailDomain:o}=O(),[p,r]=d.useState(!1),m=f(S=>D(S)),[s,c]=d.useState(!1),i=f(S=>S.treasurySetupViewState.treasuryFundsDetails?.fetchStatus);d.useEffect(()=>{s||i?.fetchState!=="Not-Started"||y==null||(c(!0),n(W()))},[i,n]);const y=j.getSignedInUserTenant(o)?.companyId??m.companyId,C=j.getSignedInUser(),u=!!m.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,l=S=>{r(S)};if(C==null)throw Error("Can't access treasury promo page without signing in...");const g=_(),h=V(g?.loggedInUserRoleMap),I=Z(g?.loggedInUserRoleMap);if(u&&h)return e.jsx(B,{to:"../../treasury/setup"});if(m.company?.companyTreasuryInfo&&(!u&&h||I)){if(a.state?.message==="activation"){const S=K(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(z,{analytics:b,onLoad:S=>(T=>T.trackTreasuryPromoView("Treasury Promo Page"))(S)}),e.jsx(ce,{isAppContentDrawerOpen:p,handleDrawerToggle:l}),e.jsx(vt,{analytics:b,navigate:t,companyId:y,onClickMenuIcon:()=>{l(!0)}})]})}return e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})})},te=P.div`
30
30
  display: flex;
31
31
  width: 100%;
32
32
  height: 100%;
@@ -34,4 +34,4 @@ import{j as e}from"./liveblocks-Du-k54fV.js";import{j as L,u as M,h as U,l as O,
34
34
  justify-content: center;
35
35
  align-items: center;
36
36
  background-color: ${t=>t.theme.colors.grey5};
37
- `;function ta(){const t=M(),a=f(E=>D(E)),{useFeatureGate:n}=ie(),{isFeatureEnabled:o}=n(v.isTreasuryEnabled),p=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,r=_(),m=Z(r?.loggedInUserRoleMap),s=a?.userRole!=null&&Oe(a?.userRole),c=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Ne(r?.loggedInUserRoleMap),i=Ve(r?.loggedInUserRoleMap),y=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!s)&&_e(r?.loggedInUserRoleMap),{isFeatureEnabled:I}=n(v.isDepositAccountsFeatureEnabled),u=I&&!s&&ze(r?.loggedInUserRoleMap),l=a.company!=null&&$e(a.company),g=o&&l===!0&&!s&&V(r?.loggedInUserRoleMap),{isFeatureEnabled:h}=n(v.isChargeCardFeatureEnabled),{isFeatureEnabled:C}=n(v.isDebitCardFeatureEnabled),S=ot(a,h,C)&&!s&&Ge(r?.loggedInUserRoleMap),T=He(r?.loggedInUserRoleMap),x=We(r?.loggedInUserRoleMap),F=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified";return e.jsxs(Te,{children:[x?null:e.jsx(k,{path:"setup",element:e.jsx(Y,{isBillPayAdminLevelAccess:c,isReimbursementAdminLevelAccess:y,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:g,isUserHasOnlyCardAccess:T,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),x?null:e.jsx(k,{path:"verification",element:e.jsx(Y,{isBillPayAdminLevelAccess:c,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:y,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:g,isUserHasOnlyCardAccess:T,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(Dt,{})}),e.jsx(k,{path:"statements",element:e.jsx(At,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(Et,{})}),F?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx(G,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),g?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx(G,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx(G,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(lt,{})})]}):p&&g?e.jsx(k,{path:"*",element:e.jsx(B,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&m?e.jsx(k,{path:"*",element:e.jsx(B,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{ta as default};
37
+ `;function ta(){const t=U(),a=f(E=>D(E)),{useFeatureGate:n}=ie(),{isFeatureEnabled:o}=n(v.isTreasuryEnabled),p=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,r=_(),m=Z(r?.loggedInUserRoleMap),s=a?.userRole!=null&&Oe(a?.userRole),c=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Ne(r?.loggedInUserRoleMap),i=Ve(r?.loggedInUserRoleMap),y=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!s)&&_e(r?.loggedInUserRoleMap),{isFeatureEnabled:C}=n(v.isDepositAccountsFeatureEnabled),u=C&&!s&&ze(r?.loggedInUserRoleMap),l=a.company!=null&&$e(a.company),g=o&&l===!0&&!s&&V(r?.loggedInUserRoleMap),{isFeatureEnabled:h}=n(v.isChargeCardFeatureEnabled),{isFeatureEnabled:I}=n(v.isDebitCardFeatureEnabled),S=ot(a,h,I)&&!s&&Ge(r?.loggedInUserRoleMap),T=He(r?.loggedInUserRoleMap),x=We(r?.loggedInUserRoleMap),F=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified";return e.jsxs(Te,{children:[x?null:e.jsx(k,{path:"setup",element:e.jsx(Y,{isBillPayAdminLevelAccess:c,isReimbursementAdminLevelAccess:y,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:g,isUserHasOnlyCardAccess:T,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),x?null:e.jsx(k,{path:"verification",element:e.jsx(Y,{isBillPayAdminLevelAccess:c,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:y,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:g,isUserHasOnlyCardAccess:T,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(Dt,{})}),e.jsx(k,{path:"statements",element:e.jsx(At,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(Et,{})}),F?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx(G,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),g?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx(G,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx(G,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(lt,{})})]}):p&&g?e.jsx(k,{path:"*",element:e.jsx(B,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&m?e.jsx(k,{path:"*",element:e.jsx(B,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{ta as default};
@@ -1,4 +1,4 @@
1
- import{j as l}from"./liveblocks-Du-k54fV.js";import{a as g}from"./sentry-D89gdSuk.js";import{j as M,u as q,l as J,g as S,k as G,h as Y,n as nt,o as B,N as K}from"./core-CrPNHB9B.js";import{eN as O,Jh as Ee,Ji as Ue,fP as ee,cq as be,cr as ke,uN as ft,Jj as st,uR as Yt,Hv as te,jr as ae,uL as qt,uF as Ht,Jk as Ne,ux as Wt,uw as Qt,uq as Zt,uC as Xt,uS as ea,Jl as pe,Jm as Me,uy as ta,Jn as he,eY as gt,v5 as vt,u_ as xt,Jo as Tt,nT as Ct,uV as yt,uT as Dt,Jp as It,vc as Et,v9 as bt,uW as kt,vb as Ge,FX as wt,Jq as aa,Jr as na,ct as sa,Js as oa,Jt as la,Ju as me,Jv as ce,Jw as we,Hw as $e,vr as ye,Hu as De,ve as At,uO as Ke,Jx as ia,Hx as W,Jy as ze,uI as ca,Jz as da,JA as ra,JB as Ye,JC as qe,JD as He,JE as We,vl as Ae,JF as jt,v2 as Ft,JG as ua,JH as pa,JI as ha,JJ as ma,JK as Sa,JL as fa,JM as ga,JN as va,si as xa,sj as Ta,GB as Fe,JO as Ca,JP as ya,iQ as Pe,bq as Da,JQ as Ia,JR as Ea,kp as ba,ky as ka,GA as _e,bC as ot,JS as Pt,Gg as _t,JT as wa,JU as Aa,JV as ja,kA as Fa,JW as lt,JX as it,JY as ct,JZ as dt,J_ as Pa,kw as _a,J$ as Va,kz as La,K0 as Oa,K1 as Vt,GX as Lt,jP as Ba,K2 as Ja,K3 as Ve,K4 as Ot,GV as Bt,xE as Ra,K5 as Ua,K6 as Na,k7 as Jt,K7 as Ma,K8 as Ga,H7 as $a,p_ as Ka,K9 as Rt,Ka as rt,H4 as Le,Kb as ut,Kc as za,H9 as Ya,Kd as qa,Ke as Ha,Kf as Wa,Kg as Qa,Kh as Za,q1 as Xa,Ki as en,Hy as tn,Kj as an,GO as Oe,gy as nn,Kk as sn,Kl as on,gw as ln,Km as cn,Kn as dn,xI as rn,Ko as un,Kp as pn,Kq as hn,Kr as mn,jT as Sn,bn as fn,eT as gn,eR as vn}from"./zeni-epic-state-BfQ0VqqL.js";import{z as R,al as Be,B as Ut,C as Z,e as P,R as X,ar as xn,v as N,D as Ie,y as de,as as Qe,at as Tn,au as Cn,n as Ze,av as yn,h as Dn,q as re,E as Xe,a as ne,p as z,aw as In,j as et,K as Se,ax as En,ay as Nt,M as bn,az as kn,A as wn,aA as An,ao as Mt,aB as jn,o as Q,S as Fn,G as Gt,I as Pn,aC as _n,aD as Vn,g as tt,aE as Ln,aF as On,x as Bn,aG as Jn,aH as Rn}from"./index-D_5B74W3.js";import{n as U,D as Un,S as $t}from"./mui-TIL16lH9.js";import{t as Nn,A as Mn}from"./AddressScreen-DpjaT47v.js";import ie from"./NotFoundScreen-BfxTO_Ym.js";import{F as Gn}from"./FeaturePreviewScreen-DnxvreKO.js";import{b as H,v as at,c as $n}from"./routePaths--l9WHzLE.js";import{p as Kt}from"./pathToGoBack-BnDDiX1S.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-BQG6o7HM.js";import{c as ge}from"./useFetchSuggestedQuestionsWhenReady-Bawd7MuO.js";import{M as ve}from"./MobileAppDrawer-D48Qay93.js";import{D as Kn}from"./DrawerScreen-x9gpWPcg.js";import{g as zn,m as Yn}from"./accountMappingHelper-D_41oG8v.js";import"./recharts-D-QaKK3D.js";import"./analytics-C79_HEwl.js";import"./plaid-BajtMZoU.js";import"./dnd-CLr74Vpt.js";import"./stripe-DMRn4zHo.js";import"./lottie-DJl7yCqX.js";import"./lexical-Crf3nQAP.js";import"./pdf-Blj2HSTu.js";import"./utils-CbgvUvVM.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="055197a0-8c54-425f-a68b-9584aee30387",e._sentryDebugIdIdentifier="sentry-dbid-055197a0-8c54-425f-a68b-9584aee30387")}catch{}})();const qn=Ie.getLocalizedStrings(),Hn=G(function(e,a){const s=Ue(e,a.scheduleTab),t=e.tenantState.currentTenantId;return{authParams:{userId:a.signedInUser.userId??"",sessionId:a.signedInUser.zeniSessionId??"",tenantId:t??""},linkBillExpenseView:s.linkBillExpenseView,transactions:s.linkBillExpenseView.transactions}},function(e,a){const{navigate:s,location:t}=a;return{onTransactionSelect(n){e(st({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(st({selectedTransaction:void 0})),e(Yt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${H(n,a.tenantEmailDomain)}`,c=N(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(ft(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}})(xn),Wn=({setShouldNavigateBack:e})=>{const a=M(),s=q(),{scheduleDetailId:t,tenantEmailDomain:n}=J(),{scheduleType:o}=J();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S(f=>O(f)),d=Ee(o)??"accrued_expenses",u=R.getSignedInUser();if(u==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const i=S(f=>Ue(f,d)),m=i.selectedJELinkRowIndex,r=S(f=>ee(f,c.companyId)),p=Be(i.updateStatus.fetchState);g.useEffect(()=>{p==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})},[p,i.updateStatus.fetchState]),g.useEffect(()=>{i.fetchState==="Not-Started"&&a("..",{relative:"path"})},[]),g.useEffect(()=>{i.selectedJEAccruedSchedule!=null&&i.selectedJELinkRowIndex!=null||a("..",{relative:"path"})},[i.selectedJEAccruedSchedule,i.selectedJELinkRowIndex]);const h=i.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:i.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Ut,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&m!=null?l.jsxs(l.Fragment,{children:[h===!0?l.jsx(Z,{analytics:P,onLoad:()=>{Qn(i,d,r)}}):null,l.jsx(Hn,{signedInUser:u,attachmentEndPoint:`${X}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:d,navigate:a,analytics:P,controllerUserDetails:r,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},zt=e=>{const a=qn.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(a)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(a)??null,endMonth:e.endDate?.format(a)??null}},Qn=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:c}=e.linkBillExpenseView,d=c.some(m=>m.isRecommendedTransaction===!0),u=be(s.controllers),i=ke(s.controllerUserIds);t!=null&&P.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...zt(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:d,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:u,controllerUserIds:i})},Zn=U.div`
1
+ import{j as l}from"./liveblocks-3WpI1obg.js";import{a as g}from"./sentry-z6zkwC0R.js";import{j as M,u as q,l as J,g as S,k as G,h as Y,n as nt,o as B,N as K}from"./core-BpuExePz.js";import{eN as O,Jh as Ee,Ji as Ue,fO as ee,cq as be,cr as ke,uN as ft,Jj as st,uR as Yt,Hv as te,jq as ae,uL as qt,uF as Ht,Jk as Ne,ux as Wt,uw as Qt,uq as Zt,uC as Xt,uS as ea,Jl as pe,Jm as Me,uy as ta,Jn as he,eY as gt,v5 as vt,u_ as xt,Jo as Tt,nT as Ct,uV as yt,uT as Dt,Jp as It,vc as Et,v9 as bt,uW as kt,vb as Ge,FX as wt,Jq as aa,Jr as na,ct as sa,Js as oa,Jt as la,Ju as me,Jv as ce,Jw as we,Hw as $e,vr as ye,Hu as De,ve as At,uO as Ke,Jx as ia,Hx as W,Jy as ze,uI as ca,Jz as da,JA as ra,JB as Ye,JC as qe,JD as He,JE as We,vl as Ae,JF as jt,v2 as Ft,JG as ua,JH as pa,JI as ha,JJ as ma,JK as Sa,JL as fa,JM as ga,JN as va,si as xa,sj as Ta,GB as Fe,JO as Ca,JP as ya,iP as Pe,bq as Da,JQ as Ia,JR as Ea,ko as ba,kx as ka,GA as _e,bC as ot,JS as Pt,Gg as _t,JT as wa,JU as Aa,JV as ja,kz as Fa,JW as lt,JX as it,JY as ct,JZ as dt,J_ as Pa,kv as _a,J$ as Va,ky as La,K0 as Oa,K1 as Vt,GX as Lt,jO as Ba,K2 as Ja,K3 as Ve,K4 as Ot,GV as Bt,xE as Ra,K5 as Ua,K6 as Na,k6 as Jt,K7 as Ma,K8 as Ga,H7 as $a,p_ as Ka,K9 as Rt,Ka as rt,H4 as Le,Kb as ut,Kc as za,H9 as Ya,Kd as qa,Ke as Ha,Kf as Wa,Kg as Qa,Kh as Za,q1 as Xa,Ki as en,Hy as tn,Kj as an,GO as Oe,gx as nn,Kk as sn,Kl as on,gv as ln,Km as cn,Kn as dn,xI as rn,Ko as un,Kp as pn,Kq as hn,Kr as mn,jS as Sn,bn as fn,eT as gn,eR as vn}from"./zeni-epic-state-RQBIdQMH.js";import{z as R,al as Be,B as Ut,x as Z,e as P,N as X,ar as xn,s as N,D as Ie,w as de,as as Qe,at as Tn,au as Cn,p as Ze,av as yn,h as Dn,q as re,y as Xe,a as ne,d as z,aw as In,j as et,G as Se,ax as En,ay as Nt,I as bn,az as kn,A as wn,aA as An,ao as Mt,aB as jn,o as Q,S as Fn,E as Gt,Z as Pn,aC as _n,aD as Vn,g as tt,aE as Ln,aF as On,n as Bn,aG as Jn,aH as Rn}from"./index-DidLjpq0.js";import{n as U,D as Un,S as $t}from"./mui-Bpme9BmU.js";import{t as Nn,A as Mn}from"./AddressScreen-Dz7dukxj.js";import ie from"./NotFoundScreen-DwnzoLJU.js";import{F as Gn}from"./FeaturePreviewScreen-XMp6Ks_m.js";import{b as H,v as at,c as $n}from"./routePaths-D7d1SJs7.js";import{p as Kt}from"./pathToGoBack-JibONr5D.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-D5Yjge45.js";import{c as ge}from"./useFetchSuggestedQuestionsWhenReady-Bjj9kjVA.js";import{M as ve}from"./MobileAppDrawer--t6IvFv1.js";import{D as Kn}from"./DrawerScreen-Ojlk_glq.js";import{g as zn,m as Yn}from"./accountMappingHelper-Blov7ltS.js";import"./recharts-D5_tB-NC.js";import"./analytics-DMOhZ7ep.js";import"./plaid-CTMaHWW7.js";import"./dnd-Ool1WkEK.js";import"./stripe-DMRn4zHo.js";import"./lottie-DFxKNIfK.js";import"./lexical-9B5gs5tG.js";import"./pdf-CAA7iyNe.js";import"./utils-Cb7KsPLv.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="8e5403a3-9e09-472e-9495-f67d11215c4f",e._sentryDebugIdIdentifier="sentry-dbid-8e5403a3-9e09-472e-9495-f67d11215c4f")}catch{}})();const qn=Ie.getLocalizedStrings(),Hn=G(function(e,a){const s=Ue(e,a.scheduleTab),t=e.tenantState.currentTenantId;return{authParams:{userId:a.signedInUser.userId??"",sessionId:a.signedInUser.zeniSessionId??"",tenantId:t??""},linkBillExpenseView:s.linkBillExpenseView,transactions:s.linkBillExpenseView.transactions}},function(e,a){const{navigate:s,location:t}=a;return{onTransactionSelect(n){e(st({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(st({selectedTransaction:void 0})),e(Yt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${H(n,a.tenantEmailDomain)}`,c=N(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(ft(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}})(xn),Wn=({setShouldNavigateBack:e})=>{const a=M(),s=q(),{scheduleDetailId:t,tenantEmailDomain:n}=J(),{scheduleType:o}=J();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S(f=>O(f)),d=Ee(o)??"accrued_expenses",u=R.getSignedInUser();if(u==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const i=S(f=>Ue(f,d)),m=i.selectedJELinkRowIndex,r=S(f=>ee(f,c.companyId)),p=Be(i.updateStatus.fetchState);g.useEffect(()=>{p==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})},[p,i.updateStatus.fetchState]),g.useEffect(()=>{i.fetchState==="Not-Started"&&a("..",{relative:"path"})},[]),g.useEffect(()=>{i.selectedJEAccruedSchedule!=null&&i.selectedJELinkRowIndex!=null||a("..",{relative:"path"})},[i.selectedJEAccruedSchedule,i.selectedJELinkRowIndex]);const h=i.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:i.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Ut,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&m!=null?l.jsxs(l.Fragment,{children:[h===!0?l.jsx(Z,{analytics:P,onLoad:()=>{Qn(i,d,r)}}):null,l.jsx(Hn,{signedInUser:u,attachmentEndPoint:`${X}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:d,navigate:a,analytics:P,controllerUserDetails:r,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[m]})]}):null})},zt=e=>{const a=qn.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(a)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(a)??null,endMonth:e.endDate?.format(a)??null}},Qn=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:c}=e.linkBillExpenseView,d=c.some(m=>m.isRecommendedTransaction===!0),u=be(s.controllers),i=ke(s.controllerUserIds);t!=null&&P.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...zt(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:d,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:u,controllerUserIds:i})},Zn=U.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -0,0 +1,12 @@
1
+ import{j as o}from"./liveblocks-3WpI1obg.js";import{a as l}from"./sentry-z6zkwC0R.js";import{q as u,h,g as y,N as I}from"./core-BpuExePz.js";import{IE as b,eO as w,yZ as x}from"./zeni-epic-state-RQBIdQMH.js";import{z as f,B as j,E as S,Z as E}from"./index-DidLjpq0.js";import{n as c}from"./mui-Bpme9BmU.js";import"./recharts-D5_tB-NC.js";import"./analytics-DMOhZ7ep.js";import"./plaid-CTMaHWW7.js";import"./dnd-Ool1WkEK.js";import"./stripe-DMRn4zHo.js";import"./lottie-DFxKNIfK.js";import"./lexical-9B5gs5tG.js";import"./pdf-CAA7iyNe.js";import"./utils-Cb7KsPLv.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]="1d2988dd-8303-4e79-ab08-01c8a9d3c4ac",e._sentryDebugIdIdentifier="sentry-dbid-1d2988dd-8303-4e79-ab08-01c8a9d3c4ac")}catch{}})();const W=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",g=e.get("profileId")??"",[n,p]=l.useState(!1),a=h(),i=y(m=>b(m)),r=f.getSignedInUser(),d=f.getSignedInUserTenantWithId(s);if(r==null||d==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,d?.tenantId),l.useEffect(()=>{n||(p(!0),a(x(t,g,s)))},[n,a]),i.fetchState==="Error"?o.jsx(D,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(j,{fetchState:"In-Progress"}))},D=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(E.LargeRegular)`
10
+ display: flex;
11
+ color: ${S.important};
12
+ `;export{W as default};
@@ -1,4 +1,4 @@
1
- import{j as n}from"./liveblocks-Du-k54fV.js";import{j as Z,u as W,h as z,l as H,g as w,k as Y,N as ne,n as $e,o as k}from"./core-CrPNHB9B.js";import{eN as M,Nr as we,Ns as He,cj as te,ck as Ge,fb as Ze,wa as Ae,An as We,w4 as Fn,Nt as Rn,Nu as Ln,w7 as Un,we as Ce,w1 as zn,v_ as Mn,Me as ue,Nv as Nn,DH as _n,Jk as Vn,DJ as $n,k8 as Fe,Nw as Hn,pF as Ye,pt as Je,j$ as qe,k2 as Re,Jl as Le,Jm as Gn,Nx as Zn,k1 as Wn,ko as Yn,jS as Jn,ip as qn,io as Kn,Ny as Qn,Nz as xe,Do as Xn,NA as et,NB as nt,M7 as De,NC as Ue,ND as tt,DU as at,MR as ot,Bh as Ke,s6 as Qe,NE as st,DR as it,NF as Xe,cL as Ie,DY as en,fc as rt,eR as nn,eT as Se,DW as ct,Bb as lt,DO as dt,NG as tn,NH as an,Dq as on,DA as ze,NI as ut,Du as pt,NJ as mt,MG as ht,DZ as ft,bv as gt,bD as yt,cv as Ct,bE as xt,bs as kt,Il as wt}from"./zeni-epic-state-BfQ0VqqL.js";import{A as ae,a as V,z as D,p as B,h as N,B as pe,bO as At,R as be,q as _,E as J,n as sn,al as Dt,aa as Me,e as R,bP as It,ao as ve,bQ as St,C as me,bR as bt,g as Ee,aI as G,bS as vt,M as Et,K as rn,a7 as jt,bT as Ne,bU as Pt,v as ee,bV as Tt,bW as Bt,bX as Ot,bY as Ft,a4 as Rt,o as Lt}from"./index-D_5B74W3.js";import{n as L,D as q,S as K}from"./mui-TIL16lH9.js";import de from"./NotFoundScreen-BfxTO_Ym.js";import{S as _e}from"./SetupPagesScreen-CnLVJHlF.js";import{F as cn}from"./FeaturePreviewScreen-DnxvreKO.js";import{a as u}from"./sentry-D89gdSuk.js";import{M as he}from"./MobileAppDrawer-D48Qay93.js";import{A as Ut,D as zt,V as Mt}from"./DomesticWireDetailScreen-D09Tlna2.js";import{A as Nt}from"./AddressScreen-DpjaT47v.js";import{u as ln}from"./useAskAiCfoHostNavButtonProps-BQG6o7HM.js";import{c as dn}from"./useFetchSuggestedQuestionsWhenReady-Bawd7MuO.js";import{Z as _t}from"./ZeniAccountStatementScreen-CY9YrNrA.js";import"./recharts-D-QaKK3D.js";import"./analytics-C79_HEwl.js";import"./plaid-BajtMZoU.js";import"./dnd-CLr74Vpt.js";import"./stripe-DMRn4zHo.js";import"./lottie-DJl7yCqX.js";import"./lexical-Crf3nQAP.js";import"./pdf-Blj2HSTu.js";import"./utils-CbgvUvVM.js";import"./analyticsHelper-Dymvi35P.js";import"./routePaths--l9WHzLE.js";import"./BusinessVerificationPageScreen-c7Zd26Y0.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]="71c4c0fe-c9ad-4e44-9e1e-138b6d385f68",e._sentryDebugIdIdentifier="sentry-dbid-71c4c0fe-c9ad-4e44-9e1e-138b6d385f68")}catch{}})();const Vt=L.div`
1
+ import{j as n}from"./liveblocks-3WpI1obg.js";import{j as Z,u as W,h as z,l as G,g as w,k as Y,N as ne,n as $e,o as k}from"./core-BpuExePz.js";import{eN as N,Nr as we,Ns as Ge,cj as te,ck as He,fa as Ze,wa as Ae,An as We,w4 as Fn,Nt as Rn,Nu as Ln,w7 as Un,we as Ce,w1 as zn,v_ as Nn,Me as ue,Nv as Mn,DH as _n,Jk as Vn,DJ as $n,k7 as Fe,Nw as Gn,pF as Ye,pt as Je,j_ as qe,k1 as Re,Jl as Le,Jm as Hn,Nx as Zn,k0 as Wn,kn as Yn,jR as Jn,io as qn,im as Kn,Ny as Qn,Nz as xe,Do as Xn,NA as et,NB as nt,M7 as De,NC as Ue,ND as tt,DU as at,MR as ot,Bh as Ke,s6 as Qe,NE as st,DR as it,NF as Xe,cL as Ie,DY as en,fb as rt,eR as nn,eT as Se,DW as ct,Bb as lt,DO as dt,NG as tn,NH as an,Dq as on,DA as ze,NI as ut,Du as pt,NJ as mt,MG as ht,DZ as ft,bv as gt,bD as yt,cv as Ct,bE as xt,bs as kt,Il as wt}from"./zeni-epic-state-RQBIdQMH.js";import{A as ae,a as V,z as D,d as B,h as M,B as pe,bO as At,N as be,q as _,y as J,p as sn,al as Dt,aa as Ne,e as R,bP as It,ao as ve,bQ as St,x as me,bR as bt,g as Ee,aI as H,bS as vt,I as Et,G as rn,a7 as jt,bT as Me,bU as Pt,s as ee,bV as Tt,bW as Bt,bX as Ot,bY as Ft,a4 as Rt,o as Lt}from"./index-DidLjpq0.js";import{n as L,D as q,S as K}from"./mui-Bpme9BmU.js";import de from"./NotFoundScreen-DwnzoLJU.js";import{S as _e}from"./SetupPagesScreen-CQlX6aNj.js";import{F as cn}from"./FeaturePreviewScreen-XMp6Ks_m.js";import{a as u}from"./sentry-z6zkwC0R.js";import{M as he}from"./MobileAppDrawer--t6IvFv1.js";import{A as Ut,D as zt,V as Nt}from"./DomesticWireDetailScreen-DmlqBc99.js";import{A as Mt}from"./AddressScreen-Dz7dukxj.js";import{u as ln}from"./useAskAiCfoHostNavButtonProps-D5Yjge45.js";import{c as dn}from"./useFetchSuggestedQuestionsWhenReady-Bjj9kjVA.js";import{Z as _t}from"./ZeniAccountStatementScreen-BoeVpxsO.js";import"./recharts-D5_tB-NC.js";import"./analytics-DMOhZ7ep.js";import"./plaid-CTMaHWW7.js";import"./dnd-Ool1WkEK.js";import"./stripe-DMRn4zHo.js";import"./lottie-DFxKNIfK.js";import"./lexical-9B5gs5tG.js";import"./pdf-CAA7iyNe.js";import"./utils-Cb7KsPLv.js";import"./analyticsHelper-CcQrbJpT.js";import"./routePaths-D7d1SJs7.js";import"./BusinessVerificationPageScreen-CIapP8vT.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]="f6ceed82-bace-47f8-a858-69ead3dfb02b",e._sentryDebugIdIdentifier="sentry-dbid-f6ceed82-bace-47f8-a858-69ead3dfb02b")}catch{}})();const Vt=L.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -6,15 +6,15 @@ import{j as n}from"./liveblocks-Du-k54fV.js";import{j as Z,u as W,h as z,l as H,
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${e=>e.theme.colors.grey4};
9
- `,$t=Y(function(e){return{autoTransferRuleView:we(e),downloadAccountDetailEndPoint:`${be}/account_details`,transferLimit:5e5,depositAccountListView:We(e.depositAccountState,e.depositAccountListState)}},function(e,t){const{navigate:s,handleDrawerToggle:o}=t;return{onBackClick:()=>{s("..")},onClickMenuIcon:()=>{o(!0)},onFetchAutoTransferRules:a=>{e(Ae(a))},onCreateRule:()=>{e(Mn())},onUpdateRule:a=>{e(Ce(a))},onDeleteClick:a=>{e(zn(a))},onPauseClick:a=>{e(Ce(a,!0,!1))},onResumeClick:a=>{e(Ce(a,!1,!0))},onActivityClick:(a,i)=>{e(Un(a,i))},onUpdateRuleLocalData:a=>{e(Ln(a))},clearRuleLocalData:()=>{e(Rn())},onEditClick:a=>{s(`./${a}/edit`)},onEditDrawerClose:()=>{s("../../",{relative:"path"})},onReviewClick:()=>{e(Fn())}}})(At);function Ve({isEditDrawerOpen:e}){const t=Z(),s=W(),o=z(),a=ae(),{ruleId:i,tenantEmailDomain:d}=H(),{useFeatureGate:c}=V(),[p,m]=u.useState(!1),[C,r]=u.useState(!1),l=w(y=>M(y)),h=w(y=>we(y)),x=h?.fetchState??"Not-Started",b=w(y=>He(y)),f=l?.companyId??D.getSignedInUserTenant(d)?.companyId,A=te(a?.loggedInUserRoleMap)||Ge(a?.loggedInUserRoleMap),{isFeatureEnabled:I}=c(B.isTreasuryEnabled),g=l?.company!=null&&Ze(l.company),S=I&&g,O=D.getSignedInUser(),U=l.tenantId,P={userId:O?.userId??"",sessionId:O?.zeniSessionId??"",tenantId:U??""},E=l.companyName;u.useEffect(()=>{!C&&x==="Not-Started"&&f&&(r(!0),o(Ae(!0)))},[C,x,f,o]);const v=y=>{m(y)},T=N(),j=!!s.state?.scrollToAddRule;return h?.fetchState!=="Completed"?n.jsx(pe,{fetchState:"In-Progress",style:{backgroundColor:T.colors.grey5}}):n.jsxs(Vt,{children:[n.jsx(he,{isAppContentDrawerOpen:p,handleDrawerToggle:v}),n.jsx($t,{navigate:t,location:s,currentTenant:l,companyName:E,handleDrawerToggle:v,isEditDrawerOpen:e,editingRuleId:i,authParams:P,includeTreasuryOption:S,hasAdminLevelAccess:A,zeniAccountsConfigDetail:b,scrollToAddRule:j})]})}const Ht={overlayWidth:new J(100,100,58)},Gt=({vendorId:e,isDrawerOpen:t,closeDrawerHandler:s})=>{const o=z(),a=N(),i=_();if(D.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(q,{onClose:()=>{s(!0),o(ue())},anchor:"right",open:t,PaperProps:{style:{width:Ht.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Zt,{onClick:d=>d.stopPropagation(),children:n.jsx(Ut,{vendorIdParam:e,accountContext:"express-pay"})})})},Zt=L(K)`
9
+ `,$t=Y(function(e){return{autoTransferRuleView:we(e),downloadAccountDetailEndPoint:`${be}/account_details`,transferLimit:5e5,depositAccountListView:We(e.depositAccountState,e.depositAccountListState)}},function(e,t){const{navigate:s,handleDrawerToggle:o}=t;return{onBackClick:()=>{s("..")},onClickMenuIcon:()=>{o(!0)},onFetchAutoTransferRules:a=>{e(Ae(a))},onCreateRule:()=>{e(Nn())},onUpdateRule:a=>{e(Ce(a))},onDeleteClick:a=>{e(zn(a))},onPauseClick:a=>{e(Ce(a,!0,!1))},onResumeClick:a=>{e(Ce(a,!1,!0))},onActivityClick:(a,i)=>{e(Un(a,i))},onUpdateRuleLocalData:a=>{e(Ln(a))},clearRuleLocalData:()=>{e(Rn())},onEditClick:a=>{s(`./${a}/edit`)},onEditDrawerClose:()=>{s("../../",{relative:"path"})},onReviewClick:()=>{e(Fn())}}})(At);function Ve({isEditDrawerOpen:e}){const t=Z(),s=W(),o=z(),a=ae(),{ruleId:i,tenantEmailDomain:d}=G(),{useFeatureGate:c}=V(),[p,m]=u.useState(!1),[C,r]=u.useState(!1),l=w(y=>N(y)),h=w(y=>we(y)),x=h?.fetchState??"Not-Started",b=w(y=>Ge(y)),f=l?.companyId??D.getSignedInUserTenant(d)?.companyId,A=te(a?.loggedInUserRoleMap)||He(a?.loggedInUserRoleMap),{isFeatureEnabled:I}=c(B.isTreasuryEnabled),g=l?.company!=null&&Ze(l.company),S=I&&g,O=D.getSignedInUser(),U=l.tenantId,P={userId:O?.userId??"",sessionId:O?.zeniSessionId??"",tenantId:U??""},E=l.companyName;u.useEffect(()=>{!C&&x==="Not-Started"&&f&&(r(!0),o(Ae(!0)))},[C,x,f,o]);const v=y=>{m(y)},T=M(),j=!!s.state?.scrollToAddRule;return h?.fetchState!=="Completed"?n.jsx(pe,{fetchState:"In-Progress",style:{backgroundColor:T.colors.grey5}}):n.jsxs(Vt,{children:[n.jsx(he,{isAppContentDrawerOpen:p,handleDrawerToggle:v}),n.jsx($t,{navigate:t,location:s,currentTenant:l,companyName:E,handleDrawerToggle:v,isEditDrawerOpen:e,editingRuleId:i,authParams:P,includeTreasuryOption:S,hasAdminLevelAccess:A,zeniAccountsConfigDetail:b,scrollToAddRule:j})]})}const Gt={overlayWidth:new J(100,100,58)},Ht=({vendorId:e,isDrawerOpen:t,closeDrawerHandler:s})=>{const o=z(),a=M(),i=_();if(D.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(q,{onClose:()=>{s(!0),o(ue())},anchor:"right",open:t,PaperProps:{style:{width:Gt.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Zt,{onClick:d=>d.stopPropagation(),children:n.jsx(Ut,{vendorIdParam:e,accountContext:"express-pay"})})})},Zt=L(K)`
10
10
  display: flex;
11
11
  min-height: 100%;
12
12
  flex-direction: column;
13
- `,Wt={overlayWidth:new J(100,100,58)},Yt=({isDrawerOpen:e,closeDrawerHandler:t})=>{const s=z(),o=N(),a=_();if(D.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return n.jsx(q,{onClose:()=>{t(!0),s(ue())},anchor:"right",open:e,PaperProps:{style:{width:Wt.overlayWidth.valuePercentage(a),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Jt,{onClick:i=>i.stopPropagation(),children:n.jsx(Nt,{accountContext:"express-pay",addressTypeParam:"vendor_address"})})})},Jt=L(K)`
13
+ `,Wt={overlayWidth:new J(100,100,58)},Yt=({isDrawerOpen:e,closeDrawerHandler:t})=>{const s=z(),o=M(),a=_();if(D.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return n.jsx(q,{onClose:()=>{t(!0),s(ue())},anchor:"right",open:e,PaperProps:{style:{width:Wt.overlayWidth.valuePercentage(a),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Jt,{onClick:i=>i.stopPropagation(),children:n.jsx(Mt,{accountContext:"express-pay",addressTypeParam:"vendor_address"})})})},Jt=L(K)`
14
14
  display: flex;
15
15
  min-height: 100%;
16
16
  flex-direction: column;
17
- `,qt={overlayWidth:new J(100,100,58)},Kt=({vendorId:e,isDrawerOpen:t,closeDrawerHandler:s})=>{const o=z(),a=N(),i=_();if(D.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(q,{onClose:()=>{s(!0),o(ue())},anchor:"right",open:t,PaperProps:{style:{width:qt.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Qt,{onClick:d=>d.stopPropagation(),children:n.jsx(zt,{vendorIdParam:e,accountContext:"express-pay"})})})},Qt=L(K)`
17
+ `,qt={overlayWidth:new J(100,100,58)},Kt=({vendorId:e,isDrawerOpen:t,closeDrawerHandler:s})=>{const o=z(),a=M(),i=_();if(D.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(q,{onClose:()=>{s(!0),o(ue())},anchor:"right",open:t,PaperProps:{style:{width:qt.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Qt,{onClick:d=>d.stopPropagation(),children:n.jsx(zt,{vendorIdParam:e,accountContext:"express-pay"})})})},Qt=L(K)`
18
18
  display: flex;
19
19
  min-height: 100%;
20
20
  flex-direction: column;
@@ -26,15 +26,15 @@ import{j as n}from"./liveblocks-Du-k54fV.js";import{j as Z,u as W,h as z,l as H,
26
26
  flex-direction: column;
27
27
  align-items: center;
28
28
  background-color: ${e=>e.theme.colors.grey4};
29
- `,ea=Y(function(e,t){const s=M(e),o=D.getSignedInUser(),a=s.tenantId,i={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:a??""},d=t.expressPayDetails,c=e.entityAutoCompleteState.autoCompleteText.common,p=Vn(e,"common");return{expressPayDetails:d,fileProps:{authParams:i,filesEndPoint:`${ve.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:c,entityAutoCompleteView:p},analytics:t.analytics}},function(e,t){const{navigate:s}=t;return{onSaveVendor:o=>{e(Kn(o,void 0,void 0,!0))},saveVendorDetailLocalData:(o,a)=>{e(Re({vendorId:a,localData:o}))},saveExpressPayLocalData:o=>{e(qn({localData:o}))},onVendorSelected:o=>{o!=null&&e(Jn(o,!1))},updateSelectedVendorForCreate:o=>{e(Yn(o))},initializeVendorAddress:()=>{e(Wn())},resetVendorSaveStatus:o=>{e(Zn({vendorId:o}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,a)=>{o.trim().length>=2?e(Gn({searchString:o,entityType:a,searchOrigin:"common"})):o.trim().length===0&&e(Le("common"))},onCancelAutoComplete:()=>{e(Le("common"))}},chooseNewVendor:o=>{e(Re({localData:{vendorName:o}}))},onClickAddAccount:o=>{o.method.toLowerCase().indexOf("ach")!==-1?s("./add-ach",{relative:"path"}):o.method.toLowerCase().indexOf("wire")!==-1&&o.method.toLowerCase().indexOf("domestic")!==-1&&s("./add-wire",{relative:"path"})},updateFilesEntity:o=>{e(qe({files:o}))},onDeleteFile:o=>{e(Je(o))},onEditFileName:(o,a)=>{e(Ye(o,a.split(".")[0]))},onBackClick:o=>{o!=null&&e(Fe(o)),e(Fe()),e(Hn()),e(ue()),s("../",{relative:"path"})},onSchedulePayment:()=>{e($n())}}})(It);function ce({isAddACHDrawerOpen:e,isAddWireDrawerOpen:t,isAddAddressDrawerOpen:s}){const o=Z(),a=W(),i=z(),[d,c]=u.useState(!1),{tenantEmailDomain:p}=H(),m=ae(),C=w(y=>y.expressPayState.fetchState),r=w(y=>M(y)),l=w(y=>Nn(y)),h=l.expressPayLocalData?.vendorId,x=r.companyId??D.getSignedInUserTenant(p)?.companyId,[b,f]=u.useState(!1),[A,I]=u.useState(!1),[g,S]=u.useState(!1),O=sn(a.state?.pathnameStackToGoBack),{poppedPathname:U}=O,P=U?.split("/"),E=P?.[P.length-1];u.useEffect(()=>{e===!0?f(!0):(f(!1),document.body.style.overflow="auto")},[e]),u.useEffect(()=>{t===!0?I(!0):(I(!1),document.body.style.overflow="auto")},[t]),u.useEffect(()=>{s===!0?S(!0):(S(!1),document.body.style.overflow="auto")},[s]),u.useEffect(()=>{C==="Not-Started"&&i(_n(!0,!0))},[C,i]);const v=Dt(l.vendorViewDetails.bankAccountCreationState?.fetchState);if(u.useEffect(()=>{v==="In-Progress"&&l.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&j()},[v,l.vendorViewDetails.bankAccountCreationState?.fetchState]),D.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const T=y=>{c(y)},j=()=>{f(!1),I(!1),o("../",{relative:"path"})};return n.jsxs(Xt,{children:[Me(a)?n.jsx(he,{isAppContentDrawerOpen:d,handleDrawerToggle:T}):null,b===!0?n.jsx(Gt,{vendorId:h,closeDrawerHandler:j,isDrawerOpen:b}):null,A===!0?n.jsx(Kt,{vendorId:h,closeDrawerHandler:j,isDrawerOpen:A}):null,g===!0?n.jsx(Yt,{closeDrawerHandler:j,isDrawerOpen:g}):null,n.jsx(Mt,{vendorId:h,isExpressPayPage:!0}),n.jsx(ea,{navigate:o,location:a,companyId:x,accountId:E,analytics:R,currentTenant:r,vendorId:h,roleMap:m?.loggedInUserRoleMap,isSettings:Me(a),expressPayDetails:l,onClickMenuIcon:()=>{T(!0)}})]})}const na={overlayWidth:new J(100,100,58)},ta=({authParams:e,downloadAccountDetailEndPoint:t,isAccountInfoDrawerOpen:s,zeniBankAccountDetail:o,closeDrawerHandler:a})=>{const i=N(),d=_(),c=w(r=>He(r)),p=w(r=>M(r));if(D.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const m=()=>{a(!0)},C={depositAccount:o,onDismissClick:m,zeniAccountsConfigDetail:c,authParams:e,downloadAccountDetailEndPoint:t,currentTenant:p};return n.jsx(q,{anchor:"right",open:s,PaperProps:{style:{width:na.overlayWidth.valuePercentage(d),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:i.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>m(),children:n.jsx(aa,{onClick:r=>r.stopPropagation(),children:n.jsx(St,{...C})})})},aa=L(K)`
29
+ `,ea=Y(function(e,t){const s=N(e),o=D.getSignedInUser(),a=s.tenantId,i={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:a??""},d=t.expressPayDetails,c=e.entityAutoCompleteState.autoCompleteText.common,p=Vn(e,"common");return{expressPayDetails:d,fileProps:{authParams:i,filesEndPoint:`${ve.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:c,entityAutoCompleteView:p},analytics:t.analytics}},function(e,t){const{navigate:s}=t;return{onSaveVendor:o=>{e(Kn(o,void 0,void 0,!0))},saveVendorDetailLocalData:(o,a)=>{e(Re({vendorId:a,localData:o}))},saveExpressPayLocalData:o=>{e(qn({localData:o}))},onVendorSelected:o=>{o!=null&&e(Jn(o,!1))},updateSelectedVendorForCreate:o=>{e(Yn(o))},initializeVendorAddress:()=>{e(Wn())},resetVendorSaveStatus:o=>{e(Zn({vendorId:o}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,a)=>{o.trim().length>=2?e(Hn({searchString:o,entityType:a,searchOrigin:"common"})):o.trim().length===0&&e(Le("common"))},onCancelAutoComplete:()=>{e(Le("common"))}},chooseNewVendor:o=>{e(Re({localData:{vendorName:o}}))},onClickAddAccount:o=>{o.method.toLowerCase().indexOf("ach")!==-1?s("./add-ach",{relative:"path"}):o.method.toLowerCase().indexOf("wire")!==-1&&o.method.toLowerCase().indexOf("domestic")!==-1&&s("./add-wire",{relative:"path"})},updateFilesEntity:o=>{e(qe({files:o}))},onDeleteFile:o=>{e(Je(o))},onEditFileName:(o,a)=>{e(Ye(o,a.split(".")[0]))},onBackClick:o=>{o!=null&&e(Fe(o)),e(Fe()),e(Gn()),e(ue()),s("../",{relative:"path"})},onSchedulePayment:()=>{e($n())}}})(It);function ce({isAddACHDrawerOpen:e,isAddWireDrawerOpen:t,isAddAddressDrawerOpen:s}){const o=Z(),a=W(),i=z(),[d,c]=u.useState(!1),{tenantEmailDomain:p}=G(),m=ae(),C=w(y=>y.expressPayState.fetchState),r=w(y=>N(y)),l=w(y=>Mn(y)),h=l.expressPayLocalData?.vendorId,x=r.companyId??D.getSignedInUserTenant(p)?.companyId,[b,f]=u.useState(!1),[A,I]=u.useState(!1),[g,S]=u.useState(!1),O=sn(a.state?.pathnameStackToGoBack),{poppedPathname:U}=O,P=U?.split("/"),E=P?.[P.length-1];u.useEffect(()=>{e===!0?f(!0):(f(!1),document.body.style.overflow="auto")},[e]),u.useEffect(()=>{t===!0?I(!0):(I(!1),document.body.style.overflow="auto")},[t]),u.useEffect(()=>{s===!0?S(!0):(S(!1),document.body.style.overflow="auto")},[s]),u.useEffect(()=>{C==="Not-Started"&&i(_n(!0,!0))},[C,i]);const v=Dt(l.vendorViewDetails.bankAccountCreationState?.fetchState);if(u.useEffect(()=>{v==="In-Progress"&&l.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&j()},[v,l.vendorViewDetails.bankAccountCreationState?.fetchState]),D.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const T=y=>{c(y)},j=()=>{f(!1),I(!1),o("../",{relative:"path"})};return n.jsxs(Xt,{children:[Ne(a)?n.jsx(he,{isAppContentDrawerOpen:d,handleDrawerToggle:T}):null,b===!0?n.jsx(Ht,{vendorId:h,closeDrawerHandler:j,isDrawerOpen:b}):null,A===!0?n.jsx(Kt,{vendorId:h,closeDrawerHandler:j,isDrawerOpen:A}):null,g===!0?n.jsx(Yt,{closeDrawerHandler:j,isDrawerOpen:g}):null,n.jsx(Nt,{vendorId:h,isExpressPayPage:!0}),n.jsx(ea,{navigate:o,location:a,companyId:x,accountId:E,analytics:R,currentTenant:r,vendorId:h,roleMap:m?.loggedInUserRoleMap,isSettings:Ne(a),expressPayDetails:l,onClickMenuIcon:()=>{T(!0)}})]})}const na={overlayWidth:new J(100,100,58)},ta=({authParams:e,downloadAccountDetailEndPoint:t,isAccountInfoDrawerOpen:s,zeniBankAccountDetail:o,closeDrawerHandler:a})=>{const i=M(),d=_(),c=w(r=>Ge(r)),p=w(r=>N(r));if(D.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const m=()=>{a(!0)},C={depositAccount:o,onDismissClick:m,zeniAccountsConfigDetail:c,authParams:e,downloadAccountDetailEndPoint:t,currentTenant:p};return n.jsx(q,{anchor:"right",open:s,PaperProps:{style:{width:na.overlayWidth.valuePercentage(d),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:i.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>m(),children:n.jsx(aa,{onClick:r=>r.stopPropagation(),children:n.jsx(St,{...C})})})},aa=L(K)`
30
30
  display: flex;
31
31
  min-height: 100%;
32
32
  flex-direction: column;
33
- `,oa={overlayWidth:new J(100,100,58)},un=({isCheckDepositDrawerOpen:e,closeDrawerHandler:t})=>{const s=N(),o=_(),a=z(),i=w(r=>M(r)),d=D.getSignedInUser(),c=i.tenantId,p={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:c??""};if(d==null)throw Error("Can't access check deposit page without signing in...");const m=w(r=>Qn(r)),C={analytics:R,checkDeposit:m,filesEndPoint:`${ve.fileMicroServiceBaseUrl}`,authParams:p,onSaveChangesToLocalStore:r=>{a(et(r))},updateFilesEntity:r=>{a(qe({files:r}))},onAnotherTransferClick:()=>{a(xe())},onDeleteFile:r=>{a(Je(r))},onEditFileName:(r,l)=>{a(Ye(r,l.split(".")[0]))},onCheckDpositClick:()=>{a(Xn())},onDismissClick:()=>{t(!0),a(xe())}};return n.jsxs(n.Fragment,{children:[n.jsx(me,{analytics:R,onLoad:r=>(l=>l.trackPageLoaded(Ee.Event.accountsDepositCheckFormViewed))(r)}),n.jsx(q,{anchor:"right",open:e,PaperProps:{style:{width:oa.overlayWidth.valuePercentage(o),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(r,l)=>(l==="backdropClick"||l==="escapeKeyDown")&&(t(!0),void a(xe())),children:n.jsx(sa,{onClick:r=>r.stopPropagation(),children:n.jsx(bt,{...C})})})]})},sa=L(K)`
33
+ `,oa={overlayWidth:new J(100,100,58)},un=({isCheckDepositDrawerOpen:e,closeDrawerHandler:t})=>{const s=M(),o=_(),a=z(),i=w(r=>N(r)),d=D.getSignedInUser(),c=i.tenantId,p={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:c??""};if(d==null)throw Error("Can't access check deposit page without signing in...");const m=w(r=>Qn(r)),C={analytics:R,checkDeposit:m,filesEndPoint:`${ve.fileMicroServiceBaseUrl}`,authParams:p,onSaveChangesToLocalStore:r=>{a(et(r))},updateFilesEntity:r=>{a(qe({files:r}))},onAnotherTransferClick:()=>{a(xe())},onDeleteFile:r=>{a(Je(r))},onEditFileName:(r,l)=>{a(Ye(r,l.split(".")[0]))},onCheckDpositClick:()=>{a(Xn())},onDismissClick:()=>{t(!0),a(xe())}};return n.jsxs(n.Fragment,{children:[n.jsx(me,{analytics:R,onLoad:r=>(l=>l.trackPageLoaded(Ee.Event.accountsDepositCheckFormViewed))(r)}),n.jsx(q,{anchor:"right",open:e,PaperProps:{style:{width:oa.overlayWidth.valuePercentage(o),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(r,l)=>(l==="backdropClick"||l==="escapeKeyDown")&&(t(!0),void a(xe())),children:n.jsx(sa,{onClick:r=>r.stopPropagation(),children:n.jsx(bt,{...C})})})]})},sa=L(K)`
34
34
  display: flex;
35
35
  min-height: 100%;
36
36
  flex-direction: column;
37
- `,ia={overlayWidth:new J(100,100,58)},ra=Y(function(e,t){const s=t.currentTenant?.companyId;return{plaidConnectionDetails:ot(e,s,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:We(e.depositAccountState,e.depositAccountListState)}},function(e,t){return{onReviewClick:()=>e(it()),clearReviewTransferDetail:()=>e(st()),onFetchLinkTokenClick:s=>{e(Qe("external_account",s))},onEstablishConnectionClick:s=>{e(Ke(s,t.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}})(vt),pn=({isTransferDrawerOpen:e,authParams:t,downloadAccountDetailEndPoint:s,closeDrawerHandler:o,zeniAccountsConfig:a})=>{const i=w(g=>nt(g)),d=w(g=>M(g)),c=N(),p=_(),m=z(),{accountId:C}=H(),[r,l]=u.useState("achTransfer"),[h,x]=u.useState(!1);if(D.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:b}=V(),{configValue:f}=b(G.zeniAccountsConfig),A=De(f),I=()=>{o(!0),m(Ue())};return u.useEffect(()=>{i.reviewTransferDetail.fetchState==="Completed"&&x(!0)},[x,i.reviewTransferDetail.fetchState]),n.jsxs(n.Fragment,{children:[n.jsx(me,{analytics:R,onLoad:g=>(S=>S.trackPageLoaded(Ee.Event.zeniAccountsTransferFormViewed))(g)}),n.jsx(q,{onClose:()=>{(r==="achTransfer"&&h===!1||r==="achTransfer"&&h&&i.fetchState==="Completed")&&I()},anchor:"right",open:e,PaperProps:{style:{width:ia.overlayWidth.valuePercentage(p),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:c.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(ca,{onClick:g=>g.stopPropagation(),children:n.jsx(ra,{analytics:R,transferDetails:i,authParams:t,downloadAccountDetailEndPoint:s,onTransferClick:()=>{R.trackTransferBetweenAccountsFormClicked("Transfer",i.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning?"Review Split Transfer":"Review Transfer",i.transferDetailLocalData.transferFrom?.label,i.transferDetailLocalData.transferTo?.label,i.transferDetailLocalData.amount.amount,i.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning,i.reviewTransferDetail.reviewTransferMoney.transferSchedules.length,i.transferDetailLocalData.transferFrom?.accType==="paymentAccount"&&i.transferDetailLocalData.transferTo?.accType==="depositAccount"&&a.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&i.transferDetailLocalData.amount.amount>a.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),m(at(C))},onDismissClick:I,onSaveChangesToLocalStore:g=>{m(tt(g))},onAnotherTransferClick:()=>{x(!1),m(Ue())},currentTenant:d,zeniAccountsConfigDetail:a,currentDrawerContent:r,setCurrentDrawerContent:l,showReviewContent:h,setShowReviewContent:x,onBackClick:()=>{},maxInsuredAmount:A.maxInsuredAmount})})})]})},ca=L(K)`
37
+ `,ia={overlayWidth:new J(100,100,58)},ra=Y(function(e,t){const s=t.currentTenant?.companyId;return{plaidConnectionDetails:ot(e,s,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:We(e.depositAccountState,e.depositAccountListState)}},function(e,t){return{onReviewClick:()=>e(it()),clearReviewTransferDetail:()=>e(st()),onFetchLinkTokenClick:s=>{e(Qe("external_account",s))},onEstablishConnectionClick:s=>{e(Ke(s,t.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}})(vt),pn=({isTransferDrawerOpen:e,authParams:t,downloadAccountDetailEndPoint:s,closeDrawerHandler:o,zeniAccountsConfig:a})=>{const i=w(g=>nt(g)),d=w(g=>N(g)),c=M(),p=_(),m=z(),{accountId:C}=G(),[r,l]=u.useState("achTransfer"),[h,x]=u.useState(!1);if(D.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:b}=V(),{configValue:f}=b(H.zeniAccountsConfig),A=De(f),I=()=>{o(!0),m(Ue())};return u.useEffect(()=>{i.reviewTransferDetail.fetchState==="Completed"&&x(!0)},[x,i.reviewTransferDetail.fetchState]),n.jsxs(n.Fragment,{children:[n.jsx(me,{analytics:R,onLoad:g=>(S=>S.trackPageLoaded(Ee.Event.zeniAccountsTransferFormViewed))(g)}),n.jsx(q,{onClose:()=>{(r==="achTransfer"&&h===!1||r==="achTransfer"&&h&&i.fetchState==="Completed")&&I()},anchor:"right",open:e,PaperProps:{style:{width:ia.overlayWidth.valuePercentage(p),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:c.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(ca,{onClick:g=>g.stopPropagation(),children:n.jsx(ra,{analytics:R,transferDetails:i,authParams:t,downloadAccountDetailEndPoint:s,onTransferClick:()=>{R.trackTransferBetweenAccountsFormClicked("Transfer",i.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning?"Review Split Transfer":"Review Transfer",i.transferDetailLocalData.transferFrom?.label,i.transferDetailLocalData.transferTo?.label,i.transferDetailLocalData.amount.amount,i.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning,i.reviewTransferDetail.reviewTransferMoney.transferSchedules.length,i.transferDetailLocalData.transferFrom?.accType==="paymentAccount"&&i.transferDetailLocalData.transferTo?.accType==="depositAccount"&&a.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&i.transferDetailLocalData.amount.amount>a.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),m(at(C))},onDismissClick:I,onSaveChangesToLocalStore:g=>{m(tt(g))},onAnotherTransferClick:()=>{x(!1),m(Ue())},currentTenant:d,zeniAccountsConfigDetail:a,currentDrawerContent:r,setCurrentDrawerContent:l,showReviewContent:h,setShowReviewContent:x,onBackClick:()=>{},maxInsuredAmount:A.maxInsuredAmount})})})]})},ca=L(K)`
38
38
  display: flex;
39
39
  min-height: 100%;
40
40
  flex-direction: column;
@@ -46,7 +46,7 @@ import{j as n}from"./liveblocks-Du-k54fV.js";import{j as Z,u as W,h as z,l as H,
46
46
  flex-direction: column;
47
47
  align-items: center;
48
48
  background-color: ${e=>e.theme.colors.grey4};
49
- `,da=Y(function(e,t){return{zeniAccountListView:Xe(e),isExpressPayEnabled:t.isExpressPayEnabled,analytics:t.analytics}},function(e,t){const{navigate:s,currentTenant:o,location:a,companyId:i,handleDrawerToggle:d,analytics:c,isBillPayEnabled:p,isDebitCardFeatureEnabled:m}=t,{tenantEmailDomain:C}=o;return{onZeniAccountClick:(r,l)=>{c.trackAccountsListPageClicked("Accounts Row Item Click",l,"active");const h=ua(C,r),x=ee(a.state?.pathnameStackToGoBack,a.pathname);s(h,{state:{pathnameStackToGoBack:x}})},onSettingsClick:()=>{c.trackAccountsListPageClicked("Settings Icon"),s("setup")},onReloadTransactions:()=>{e(en(!1))},handleMoveMoneyOptionSelection:(r,l)=>{let h="page-not-found";r==="sendMoney"&&(h=gn(C)),r==="payBill"?h=mn(o,p,m):r==="transfer"?(h=hn(C),l!=null&&e(tn(l))):r==="checkDeposit"&&(h=fn(C));const x=ee(a.state?.pathnameStackToGoBack,a.pathname);s(h,{state:{pathnameStackToGoBack:x}})},unlinkPaymentAccount:(r,l)=>{c.trackAccountsListPageClicked("Unlink Account",l),e(dt(r))},onFetchLinkTokenClick:(r,l)=>{e(Qe("external_account",r,l))},onUpdatePaymentAccountStatus:(r,l,h)=>{e(lt(r,l,"zeni_accounts","external_account",h))},onEstablishConnectionClick:r=>{e(Ke(r,i,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:r=>{e(ct(r))},onClickMenuIcon:()=>{d(!0)},onTreasuryGetStartedClick:()=>{s("../../treasury/promo")},onAutoTransferClick:r=>{r?s("./auto-transfer",{state:{...a.state,scrollToAddRule:!0}}):s("./auto-transfer")}}})(Pt);function ke({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t}){const s=W(),o=Z(),a=z(),i=_(),{tenantEmailDomain:d}=H(),{useDynamicConfig:c,useFeatureGate:p}=V(),m=N(),{configValue:C}=c(G.zeniAccountsConfig),{isFeatureEnabled:r}=p(B.isTreasuryEnabled),{isFeatureEnabled:l}=p(B.isDebitCardFeatureEnabled),{isFeatureEnabled:h}=p(B.isAutoTransferRuleEnabled),{isFeatureEnabled:x}=p(B.isCheckingCommentingEnabled),b=De(C),f=w(F=>M(F)),A=f.companyId??D.getSignedInUserTenant(d)?.companyId,{configValue:I}=c(G.expressPayConfig),g=I.is_enable_all_tenants===!0||I.tenant_ids!=null&&I.tenant_ids.includes(f.tenantId),[S,O]=u.useState(!1),[U,P]=u.useState(!1),[E,v]=u.useState(!1),[T,j]=u.useState(!1),y=w(F=>Xe(F)),$=y.fetchState,oe=w(F=>we(F)),se=oe?.fetchState??"Not-Started",fe=!!f.companyZeniAccountInfo?.info?.isZeniAccountEnabled,ie=ae(),re=!!f.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,Q=!!f.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,X=te(ie?.loggedInUserRoleMap),yn=Ie(ie?.loggedInUserRoleMap),Cn=!!f.companyBillPayInfo?.info?.isBillPayEnabled,je=D.getSignedInUser(),xn={userId:je?.userId??"",sessionId:je?.zeniSessionId??"",tenantId:f.tenantId??""},kn=`${be}/account_details`,{areTenantIdsInSync:Pe}=Et();u.useEffect(()=>{!S&&Pe&&(O(!0),a(en(!1)))},[S,a,$,Pe]),u.useEffect(()=>{!U&&se==="Not-Started"&&A&&(P(!0),a(Ae(!0)))},[U,se,A,a]),u.useEffect(()=>{e!=null&&e===!0?v(!0):(v(!1),document.body.style.overflow="auto")},[e]),u.useEffect(()=>{j(t!=null&&t===!0)},[t]);const Te=()=>{v(!1),o("..")},[wn,An]=u.useState(!1),Be=F=>{An(F)},{isAiCfoOpen:Dn,setIsAiCfoOpen:In}=rn(),{isAiCfoAccessEnabled:Sn,onAskAiCfoClick:bn}=ln({isAiCfoOpen:Dn,setIsAiCfoOpen:In,mobileExploreReferrer:"Checking Accounts"});dn({isDataReady:$==="Completed"});const vn=f.company!=null&&Ze(f.company),ge=(r&&vn)===!0&&!Q,[En,jn]=u.useState(!1),ye=w(F=>F.treasurySetupViewState.treasuryFundsDetails),Pn=ye.fundsDetails,Tn=jt(Pn);u.useEffect(()=>{ge!==!0||En||ye?.fetchStatus.fetchState!=="Not-Started"||(jn(!0),a(rt()))},[ye.fetchStatus,a]);const Bn=nn(f),On=Se(l,f);return Bn===!0&&On!==!0?n.jsx(cn,{}):fe?n.jsxs(n.Fragment,{children:[y.fetchState==="Completed"&&E===!1&&T===!1?n.jsx(me,{analytics:R,onLoad:F=>(Oe=>{Oe.trackAccountsListPageViewed(y.depositAccountsSelectorView.depositAccounts.length,y.externalAccountsSelectorView.paymentAccounts.length,Ne(y.summary?.totalBalance.available.amount??0),Ne(y.summary?.totalInterest.available.amount??0),y.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield),ge&&Oe.trackTreasuryPromoView("Checking Promo Banner")})(F)}):null,E===!0?n.jsx(pn,{closeDrawerHandler:Te,isTransferDrawerOpen:E,zeniAccountsConfig:y.zeniAccountsConfig,authParams:xn,downloadAccountDetailEndPoint:kn}):null,T===!0?n.jsx(un,{closeDrawerHandler:Te,isCheckDepositDrawerOpen:T}):null,n.jsxs(la,{windowSize:i,children:[n.jsx(he,{isAppContentDrawerOpen:wn,handleDrawerToggle:Be}),n.jsx(da,{zeniBankListView:y,navigate:o,currentTenant:f,location:s,companyId:A,analytics:R,maxInsuredAmount:b.maxInsuredAmount,isExpressPayEnabled:g,isBillPayEnabled:Cn,isCheckingCommentingEnabled:x,isDebitCardFeatureEnabled:l,isAutoTransferRuleEnabled:h,handleDrawerToggle:Be,showTreasuryPromo:ge,treasuryYieldPercentage:Tn,treasuryInsuredAmount:5e5,isAiCfoAccessEnabled:Sn,onAskAiCfoClick:bn})]})]}):re&&X?n.jsx(ne,{to:"../setup"}):f.companyZeniAccountInfo?.info&&!re&&yn?n.jsx(ne,{to:"../promo",state:s.state}):n.jsx(pe,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const mn=(e,t,s)=>{const o=Se(s,e),{tenantEmailDomain:a}=e;return o===!0||t===!1?`/${a}/bills`:`/${a}/bill/new`},ua=(e,t)=>`/${e}/checking/${t}`,hn=(e,t)=>t==null?`/${e}/checking/transfer`:`/${e}/checking/${t}/transfer`,fn=(e,t)=>t==null?`/${e}/checking/check-deposit`:`/${e}/checking/${t}/check-deposit`,gn=e=>`/${e}/checking/express-pay`,pa=L.div`
49
+ `,da=Y(function(e,t){return{zeniAccountListView:Xe(e),isExpressPayEnabled:t.isExpressPayEnabled,analytics:t.analytics}},function(e,t){const{navigate:s,currentTenant:o,location:a,companyId:i,handleDrawerToggle:d,analytics:c,isBillPayEnabled:p,isDebitCardFeatureEnabled:m}=t,{tenantEmailDomain:C}=o;return{onZeniAccountClick:(r,l)=>{c.trackAccountsListPageClicked("Accounts Row Item Click",l,"active");const h=ua(C,r),x=ee(a.state?.pathnameStackToGoBack,a.pathname);s(h,{state:{pathnameStackToGoBack:x}})},onSettingsClick:()=>{c.trackAccountsListPageClicked("Settings Icon"),s("setup")},onReloadTransactions:()=>{e(en(!1))},handleMoveMoneyOptionSelection:(r,l)=>{let h="page-not-found";r==="sendMoney"&&(h=gn(C)),r==="payBill"?h=mn(o,p,m):r==="transfer"?(h=hn(C),l!=null&&e(tn(l))):r==="checkDeposit"&&(h=fn(C));const x=ee(a.state?.pathnameStackToGoBack,a.pathname);s(h,{state:{pathnameStackToGoBack:x}})},unlinkPaymentAccount:(r,l)=>{c.trackAccountsListPageClicked("Unlink Account",l),e(dt(r))},onFetchLinkTokenClick:(r,l)=>{e(Qe("external_account",r,l))},onUpdatePaymentAccountStatus:(r,l,h)=>{e(lt(r,l,"zeni_accounts","external_account",h))},onEstablishConnectionClick:r=>{e(Ke(r,i,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:r=>{e(ct(r))},onClickMenuIcon:()=>{d(!0)},onTreasuryGetStartedClick:()=>{s("../../treasury/promo")},onAutoTransferClick:r=>{r?s("./auto-transfer",{state:{...a.state,scrollToAddRule:!0}}):s("./auto-transfer")}}})(Pt);function ke({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t}){const s=W(),o=Z(),a=z(),i=_(),{tenantEmailDomain:d}=G(),{useDynamicConfig:c,useFeatureGate:p}=V(),m=M(),{configValue:C}=c(H.zeniAccountsConfig),{isFeatureEnabled:r}=p(B.isTreasuryEnabled),{isFeatureEnabled:l}=p(B.isDebitCardFeatureEnabled),{isFeatureEnabled:h}=p(B.isAutoTransferRuleEnabled),{isFeatureEnabled:x}=p(B.isCheckingCommentingEnabled),b=De(C),f=w(F=>N(F)),A=f.companyId??D.getSignedInUserTenant(d)?.companyId,{configValue:I}=c(H.expressPayConfig),g=I.is_enable_all_tenants===!0||I.tenant_ids!=null&&I.tenant_ids.includes(f.tenantId),[S,O]=u.useState(!1),[U,P]=u.useState(!1),[E,v]=u.useState(!1),[T,j]=u.useState(!1),y=w(F=>Xe(F)),$=y.fetchState,oe=w(F=>we(F)),se=oe?.fetchState??"Not-Started",fe=!!f.companyZeniAccountInfo?.info?.isZeniAccountEnabled,ie=ae(),re=!!f.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,Q=!!f.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,X=te(ie?.loggedInUserRoleMap),yn=Ie(ie?.loggedInUserRoleMap),Cn=!!f.companyBillPayInfo?.info?.isBillPayEnabled,je=D.getSignedInUser(),xn={userId:je?.userId??"",sessionId:je?.zeniSessionId??"",tenantId:f.tenantId??""},kn=`${be}/account_details`,{areTenantIdsInSync:Pe}=Et();u.useEffect(()=>{!S&&Pe&&(O(!0),a(en(!1)))},[S,a,$,Pe]),u.useEffect(()=>{!U&&se==="Not-Started"&&A&&(P(!0),a(Ae(!0)))},[U,se,A,a]),u.useEffect(()=>{e!=null&&e===!0?v(!0):(v(!1),document.body.style.overflow="auto")},[e]),u.useEffect(()=>{j(t!=null&&t===!0)},[t]);const Te=()=>{v(!1),o("..")},[wn,An]=u.useState(!1),Be=F=>{An(F)},{isAiCfoOpen:Dn,setIsAiCfoOpen:In}=rn(),{isAiCfoAccessEnabled:Sn,onAskAiCfoClick:bn}=ln({isAiCfoOpen:Dn,setIsAiCfoOpen:In,mobileExploreReferrer:"Checking Accounts"});dn({isDataReady:$==="Completed"});const vn=f.company!=null&&Ze(f.company),ge=(r&&vn)===!0&&!Q,[En,jn]=u.useState(!1),ye=w(F=>F.treasurySetupViewState.treasuryFundsDetails),Pn=ye.fundsDetails,Tn=jt(Pn);u.useEffect(()=>{ge!==!0||En||ye?.fetchStatus.fetchState!=="Not-Started"||(jn(!0),a(rt()))},[ye.fetchStatus,a]);const Bn=nn(f),On=Se(l,f);return Bn===!0&&On!==!0?n.jsx(cn,{}):fe?n.jsxs(n.Fragment,{children:[y.fetchState==="Completed"&&E===!1&&T===!1?n.jsx(me,{analytics:R,onLoad:F=>(Oe=>{Oe.trackAccountsListPageViewed(y.depositAccountsSelectorView.depositAccounts.length,y.externalAccountsSelectorView.paymentAccounts.length,Me(y.summary?.totalBalance.available.amount??0),Me(y.summary?.totalInterest.available.amount??0),y.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield),ge&&Oe.trackTreasuryPromoView("Checking Promo Banner")})(F)}):null,E===!0?n.jsx(pn,{closeDrawerHandler:Te,isTransferDrawerOpen:E,zeniAccountsConfig:y.zeniAccountsConfig,authParams:xn,downloadAccountDetailEndPoint:kn}):null,T===!0?n.jsx(un,{closeDrawerHandler:Te,isCheckDepositDrawerOpen:T}):null,n.jsxs(la,{windowSize:i,children:[n.jsx(he,{isAppContentDrawerOpen:wn,handleDrawerToggle:Be}),n.jsx(da,{zeniBankListView:y,navigate:o,currentTenant:f,location:s,companyId:A,analytics:R,maxInsuredAmount:b.maxInsuredAmount,isExpressPayEnabled:g,isBillPayEnabled:Cn,isCheckingCommentingEnabled:x,isDebitCardFeatureEnabled:l,isAutoTransferRuleEnabled:h,handleDrawerToggle:Be,showTreasuryPromo:ge,treasuryYieldPercentage:Tn,treasuryInsuredAmount:5e5,isAiCfoAccessEnabled:Sn,onAskAiCfoClick:bn})]})]}):re&&X?n.jsx(ne,{to:"../setup"}):f.companyZeniAccountInfo?.info&&!re&&yn?n.jsx(ne,{to:"../promo",state:s.state}):n.jsx(pe,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const mn=(e,t,s)=>{const o=Se(s,e),{tenantEmailDomain:a}=e;return o===!0||t===!1?`/${a}/bills`:`/${a}/bill/new`},ua=(e,t)=>`/${e}/checking/${t}`,hn=(e,t)=>t==null?`/${e}/checking/transfer`:`/${e}/checking/${t}/transfer`,fn=(e,t)=>t==null?`/${e}/checking/check-deposit`:`/${e}/checking/${t}/check-deposit`,gn=e=>`/${e}/checking/express-pay`,pa=L.div`
50
50
  display: flex;
51
51
  width: 100%;
52
52
  flex: 1 1 auto;
@@ -54,7 +54,7 @@ import{j as n}from"./liveblocks-Du-k54fV.js";import{j as Z,u as W,h as z,l as H,
54
54
  align-items: center;
55
55
  min-height: 100vh;
56
56
  background-color: ${e=>e.theme.colors.grey4};
57
- `,ma=Y(function(e,t){const{currentTenant:s}=t,o=an(e,t.accountId),a=D.getSignedInUser(),i=e.tenantState.currentTenantId,d={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:i??""},c=o.accountDetail?.id??"";return{currentTenantCompanyName:s.companyName??"",authParams:d,downloadEndPoint:`${ve.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${c}`,zeniAccountDetail:o,isExpressPayEnabled:t.isExpressPayEnabled,fetchState:o.fetchState}},function(e,t){const{navigate:s,currentTenant:o,location:a,accountId:i}=t,{tenantEmailDomain:d}=o;return{handleMoveMoneyOptionSelection:(c,p)=>{let m="page-not-found";c==="sendMoney"?m=gn(d):c==="payBill"?m=mn(o,t.isBillPayEnabled,t.isDebitCardFeatureEnabled):c==="transfer"?(m=hn(d,i),p!=null&&e(tn(p))):c==="checkDeposit"?(m=fn(d,i),p!=null&&e(ut(p))):c==="accountStatement"&&(m=ga(d,i));const C=ee(a.state?.pathnameStackToGoBack,a.pathname);s(m,{state:{pathnameStackToGoBack:C}})},onViewAllTransactionClick:()=>{const c=fa(d,i),p=ee(a.state?.pathnameStackToGoBack,a.pathname);s(c,{state:{pathnameStackToGoBack:p}})},onAccountDetailClick:()=>{const c=ha(d,i),p=ee(a.state?.pathnameStackToGoBack,a.pathname);s(c,{state:{pathnameStackToGoBack:p}})},onEditNameClick:c=>{e(ze(i,"editName",c))},onReloadZeniAccountDetailPage:()=>{e(on(i,!1))},onCloseAccountClick:()=>{e(ze(i,"closeAccount",""))},onBackClick:()=>{s("../",{relative:"path"})}}})(Tt);function le({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t,isAccountInfoDrawerOpen:s}){const o=W(),a=Z(),i=z(),d=_(),{tenantEmailDomain:c,accountId:p}=H(),{useDynamicConfig:m}=V(),{useFeatureGate:C}=V(),{isFeatureEnabled:r}=C(B.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=C(B.isCheckingCommentingEnabled),h=w(X=>M(X)),{configValue:x}=m(G.expressPayConfig),b=x.is_enable_all_tenants===!0||x.tenant_ids!=null&&x.tenant_ids.includes(h.tenantId),f=!!h.companyBillPayInfo?.info?.isBillPayEnabled,A=D.getSignedInUser(),I=h.companyId??D.getSignedInUserTenant(c)?.companyId,g={userId:A?.userId??"",sessionId:A?.zeniSessionId??"",tenantId:h.tenantId??""},S=`${be}/account_details`,[O,U]=u.useState(!1),[P,E]=u.useState(!1),[v,T]=u.useState(!1),[j,y]=u.useState(!1),$=w(X=>an(X,p??"")),oe=$.fetchState,{isAiCfoOpen:se,setIsAiCfoOpen:fe}=rn(),{isAiCfoAccessEnabled:ie,onAskAiCfoClick:re}=ln({isAiCfoOpen:se,setIsAiCfoOpen:fe,mobileExploreReferrer:"Checking Account Detail"});dn({isDataReady:oe==="Completed"}),u.useEffect(()=>{O||(i(on(p??"",!1)),U(!0))},[O,i,oe]),u.useEffect(()=>{y(s!=null&&s===!0)},[s]),u.useEffect(()=>{e!=null&&e===!0?E(!0):(E(!1),document.body.style.overflow="auto")},[e]),u.useEffect(()=>{T(t!=null&&t===!0)},[t]);const Q=()=>{y(!1),a("..")};return n.jsxs(n.Fragment,{children:[j===!0&&$.accountDetail!=null?n.jsx(ta,{authParams:g,downloadAccountDetailEndPoint:S,closeDrawerHandler:Q,isAccountInfoDrawerOpen:j,zeniBankAccountDetail:$.accountDetail}):null,P===!0?n.jsx(pn,{closeDrawerHandler:Q,isTransferDrawerOpen:P,zeniAccountsConfig:$.zeniAccountsConfig,authParams:g,downloadAccountDetailEndPoint:S}):null,v===!0?n.jsx(un,{closeDrawerHandler:Q,isCheckDepositDrawerOpen:v}):null,n.jsx(pa,{windowSize:d,children:n.jsx(ma,{navigate:a,currentTenant:h,location:o,companyId:I,isDebitCardFeatureEnabled:r,accountId:p??"",isBillPayEnabled:f,isCheckingCommentingEnabled:l,isExpressPayEnabled:b,isAiCfoAccessEnabled:ie,onAskAiCfoClick:re})})]})}const ha=(e,t)=>`/${e}/checking/${t}/account-info`,fa=(e,t)=>`/${e}/checking/${t}/transactions`,ga=(e,t)=>`/${e}/checking/${t}/statements`,ya=L.div`
57
+ `,ma=Y(function(e,t){const{currentTenant:s}=t,o=an(e,t.accountId),a=D.getSignedInUser(),i=e.tenantState.currentTenantId,d={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:i??""},c=o.accountDetail?.id??"";return{currentTenantCompanyName:s.companyName??"",authParams:d,downloadEndPoint:`${ve.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${c}`,zeniAccountDetail:o,isExpressPayEnabled:t.isExpressPayEnabled,fetchState:o.fetchState}},function(e,t){const{navigate:s,currentTenant:o,location:a,accountId:i}=t,{tenantEmailDomain:d}=o;return{handleMoveMoneyOptionSelection:(c,p)=>{let m="page-not-found";c==="sendMoney"?m=gn(d):c==="payBill"?m=mn(o,t.isBillPayEnabled,t.isDebitCardFeatureEnabled):c==="transfer"?(m=hn(d,i),p!=null&&e(tn(p))):c==="checkDeposit"?(m=fn(d,i),p!=null&&e(ut(p))):c==="accountStatement"&&(m=ga(d,i));const C=ee(a.state?.pathnameStackToGoBack,a.pathname);s(m,{state:{pathnameStackToGoBack:C}})},onViewAllTransactionClick:()=>{const c=fa(d,i),p=ee(a.state?.pathnameStackToGoBack,a.pathname);s(c,{state:{pathnameStackToGoBack:p}})},onAccountDetailClick:()=>{const c=ha(d,i),p=ee(a.state?.pathnameStackToGoBack,a.pathname);s(c,{state:{pathnameStackToGoBack:p}})},onEditNameClick:c=>{e(ze(i,"editName",c))},onReloadZeniAccountDetailPage:()=>{e(on(i,!1))},onCloseAccountClick:()=>{e(ze(i,"closeAccount",""))},onBackClick:()=>{s("../",{relative:"path"})}}})(Tt);function le({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t,isAccountInfoDrawerOpen:s}){const o=W(),a=Z(),i=z(),d=_(),{tenantEmailDomain:c,accountId:p}=G(),{useDynamicConfig:m}=V(),{useFeatureGate:C}=V(),{isFeatureEnabled:r}=C(B.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=C(B.isCheckingCommentingEnabled),h=w(X=>N(X)),{configValue:x}=m(H.expressPayConfig),b=x.is_enable_all_tenants===!0||x.tenant_ids!=null&&x.tenant_ids.includes(h.tenantId),f=!!h.companyBillPayInfo?.info?.isBillPayEnabled,A=D.getSignedInUser(),I=h.companyId??D.getSignedInUserTenant(c)?.companyId,g={userId:A?.userId??"",sessionId:A?.zeniSessionId??"",tenantId:h.tenantId??""},S=`${be}/account_details`,[O,U]=u.useState(!1),[P,E]=u.useState(!1),[v,T]=u.useState(!1),[j,y]=u.useState(!1),$=w(X=>an(X,p??"")),oe=$.fetchState,{isAiCfoOpen:se,setIsAiCfoOpen:fe}=rn(),{isAiCfoAccessEnabled:ie,onAskAiCfoClick:re}=ln({isAiCfoOpen:se,setIsAiCfoOpen:fe,mobileExploreReferrer:"Checking Account Detail"});dn({isDataReady:oe==="Completed"}),u.useEffect(()=>{O||(i(on(p??"",!1)),U(!0))},[O,i,oe]),u.useEffect(()=>{y(s!=null&&s===!0)},[s]),u.useEffect(()=>{e!=null&&e===!0?E(!0):(E(!1),document.body.style.overflow="auto")},[e]),u.useEffect(()=>{T(t!=null&&t===!0)},[t]);const Q=()=>{y(!1),a("..")};return n.jsxs(n.Fragment,{children:[j===!0&&$.accountDetail!=null?n.jsx(ta,{authParams:g,downloadAccountDetailEndPoint:S,closeDrawerHandler:Q,isAccountInfoDrawerOpen:j,zeniBankAccountDetail:$.accountDetail}):null,P===!0?n.jsx(pn,{closeDrawerHandler:Q,isTransferDrawerOpen:P,zeniAccountsConfig:$.zeniAccountsConfig,authParams:g,downloadAccountDetailEndPoint:S}):null,v===!0?n.jsx(un,{closeDrawerHandler:Q,isCheckDepositDrawerOpen:v}):null,n.jsx(pa,{windowSize:d,children:n.jsx(ma,{navigate:a,currentTenant:h,location:o,companyId:I,isDebitCardFeatureEnabled:r,accountId:p??"",isBillPayEnabled:f,isCheckingCommentingEnabled:l,isExpressPayEnabled:b,isAiCfoAccessEnabled:ie,onAskAiCfoClick:re})})]})}const ha=(e,t)=>`/${e}/checking/${t}/account-info`,fa=(e,t)=>`/${e}/checking/${t}/transactions`,ga=(e,t)=>`/${e}/checking/${t}/statements`,ya=L.div`
58
58
  display: flex;
59
59
  height: 100vh;
60
60
  width: 100%;
@@ -63,4 +63,4 @@ import{j as n}from"./liveblocks-Du-k54fV.js";import{j as Z,u as W,h as z,l as H,
63
63
  overflow: auto;
64
64
  align-items: center;
65
65
  background-color: ${e=>e.theme.colors.grey4};
66
- `;function Ca(){const e=Z(),t=z(),s=_(),{accountId:o}=H(),{useFeatureGate:a}=V(),{isFeatureEnabled:i}=a(B.isCheckingCommentingEnabled),[d,c]=u.useState(!1);u.useEffect(()=>{d||(c(!0),t(pt(o??"",!1)))},[d,t]);const p=w(m=>mt(m,o??""));if(D.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return n.jsx(ya,{windowSize:s,children:n.jsx(Bt,{transactionListView:p,depositAccountId:o??"",isCheckingCommentingEnabled:i,onBackClick:()=>{e("../")}})})}const xa=Y(function(e,t){const{companyId:s}=t;return{zeniAccountSetupView:ht(e,s),meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true"}},function(e,t){const{navigate:s,companyId:o}=t;return{onSetupButtonClick:()=>{R.trackAccountsPromoPageClicked("Setup Accounts"),e(ft(o))},onBackClick:()=>{s("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{s("../setup",{relative:"path"})}}})(Ft),ka=()=>{const e=Z(),t=W(),{tenantEmailDomain:s}=H(),{useDynamicConfig:o}=V(),a=N(),[i,d]=u.useState(!1),[c,p]=u.useState(!1),m=w(g=>M(g)),{configValue:C}=o(G.zeniAccountsConfig),r=De(C);u.useEffect(()=>{c===!1&&t.state?.message==="activation"&&p(!0)},[t.state]);const l=D.getSignedInUserTenant(s)?.companyId??m.companyId,h=D.getSignedInUser(),x=!!m.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,b=g=>{d(g)};if(h==null)throw Error("Can't access Zeni account promo page without signing in...");const f=ae(),A=te(f?.loggedInUserRoleMap),I=Ie(f?.loggedInUserRoleMap);if(x&&A)return n.jsx(ne,{to:"../../checking/setup"});if(m.company?.companyZeniAccountInfo&&(!x&&A||I)){if(t.state?.message==="activation"){const g=sn(t.state?.pathnameStackToGoBack);e(t.pathname,{state:{...t.state,message:void 0,pathnameStackToGoBack:g.newStack}})}return n.jsxs(n.Fragment,{children:[n.jsx(Ot,{showConfetti:c}),n.jsx(me,{analytics:R,onLoad:g=>(S=>S.trackPageLoaded(Ee.Event.accountsPromoPageViewed))(g)}),n.jsx(he,{isAppContentDrawerOpen:i,handleDrawerToggle:b}),n.jsx(xa,{analytics:R,navigate:e,companyId:l,onClickMenuIcon:()=>{b(!0)},maxAnnualPercentageYield:r.maxAnnualPercentageYield,maxInsuredAmount:r.maxInsuredAmount,exampleBankBalance:3e6})]})}return n.jsx(pe,{fetchState:"In-Progress",style:{backgroundColor:a.colors.grey5}})};function Ja(){const e=W(),t=w(j=>M(j)),s=N(),{useFeatureGate:o,useDynamicConfig:a}=V(),i=ae(),d=te(i?.loggedInUserRoleMap),c=Ie(i?.loggedInUserRoleMap),p=!!t.company?.companyZeniAccountInfo.isZeniAccountEnabled,m=!!t.company?.companyZeniAccountInfo.isZeniAccountTOSAccepted,{isFeatureEnabled:C}=o(B.isChargeCardFeatureEnabled),{isFeatureEnabled:r}=o(B.isDebitCardFeatureEnabled),l=nn(t),h=Se(r,t),x=t?.userRole!=null&&gt(t?.userRole),b=(t?.company==null||t.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!x)&&yt(i?.loggedInUserRoleMap),f=Ct(i?.loggedInUserRoleMap),A=(t?.company==null||t.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!x)&&xt(i?.loggedInUserRoleMap),{isFeatureEnabled:I}=o(B.isDepositAccountsFeatureEnabled),g=I&&!x,{configValue:S}=a(G.expressPayConfig),O=S.is_enable_all_tenants===!0||S.tenant_ids!=null&&S.tenant_ids.includes(t.tenantId),{isFeatureEnabled:U}=o(B.isAutoTransferRuleEnabled),P=Rt(t,C,r)&&!x&&kt(i?.loggedInUserRoleMap),E=wt(i?.loggedInUserRoleMap),v=g&&te(i?.loggedInUserRoleMap),T=v||Ge(i?.loggedInUserRoleMap);return n.jsxs($e,{children:[n.jsx(k,{path:"setup",element:n.jsx(_e,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:f,isReimbursementAdminLevelAccess:A,isZeniAccountAdminLevelAccess:v,isChargeCardAdminLevelAccess:P,isUserHasOnlyCardAccess:E,productType:"zeni_accounts",type:"setup"})}),n.jsx(k,{path:"verification",element:n.jsx(_e,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:f,isReimbursementAdminLevelAccess:A,isZeniAccountAdminLevelAccess:v,isChargeCardAdminLevelAccess:P,isUserHasOnlyCardAccess:E,productType:"zeni_accounts",type:"verification"})}),U?n.jsxs(n.Fragment,{children:[n.jsx(k,{path:"auto-transfer",element:n.jsx(Ve,{})}),T?n.jsx(k,{path:"auto-transfer/:ruleId/edit",element:n.jsx(Ve,{isEditDrawerOpen:!0})}):null]}):n.jsx(k,{path:"auto-transfer",element:n.jsx(de,{})}),O&&d?n.jsxs(n.Fragment,{children:[n.jsx(k,{path:"express-pay",element:n.jsx(ce,{})}),n.jsx(k,{path:"express-pay/add-ach",element:n.jsx(ce,{isAddACHDrawerOpen:!0})}),n.jsx(k,{path:"express-pay/add-wire/add-address",element:n.jsx(ce,{isAddAddressDrawerOpen:!0})}),n.jsx(k,{path:"express-pay/add-wire",element:n.jsx(ce,{isAddWireDrawerOpen:!0})})]}):n.jsx(k,{path:"express-pay",element:n.jsx(de,{})}),n.jsx(k,{path:"promo",element:n.jsx(ka,{})}),l&&!h?n.jsx(k,{path:"/*",element:n.jsx(cn,{})}):p?n.jsxs(n.Fragment,{children:[n.jsx(k,{path:"/",element:n.jsx(ke,{})}),n.jsx(k,{path:"transfer",element:n.jsx(ke,{isTransferDrawerOpen:!0})}),n.jsx(k,{path:"check-deposit",element:n.jsx(ke,{isCheckDepositDrawerOpen:!0})}),n.jsx(k,{path:":accountId/*",element:n.jsx(wa,{})}),n.jsx(k,{path:"*",element:n.jsx(de,{})})]}):m&&d?n.jsx(k,{path:"*",element:n.jsx(ne,{to:"../setup"})}):t.company?.companyZeniAccountInfo&&c?n.jsx(k,{path:"*",element:n.jsx(ne,{to:"../promo",state:e.state})}):n.jsx(k,{path:"*",element:n.jsx(pe,{fetchState:"In-Progress",style:{backgroundColor:s.colors.grey5,boxShadow:`0px 2px ${Lt.sp1} ${s.colors.dropShadowNormal}`}})})]})}function wa(){return n.jsxs($e,{children:[n.jsx(k,{path:"/",element:n.jsx(le,{})}),n.jsx(k,{path:"account-info",element:n.jsx(le,{isAccountInfoDrawerOpen:!0})}),n.jsx(k,{path:"transfer",element:n.jsx(le,{isTransferDrawerOpen:!0})}),n.jsx(k,{path:"check-deposit",element:n.jsx(le,{isCheckDepositDrawerOpen:!0})}),n.jsx(k,{path:"transactions",element:n.jsx(Ca,{})}),n.jsx(k,{path:"statements",element:n.jsx(_t,{})}),n.jsx(k,{path:"*",element:n.jsx(de,{})})]})}export{Ja as default};
66
+ `;function Ca(){const e=Z(),t=z(),s=_(),{accountId:o}=G(),{useFeatureGate:a}=V(),{isFeatureEnabled:i}=a(B.isCheckingCommentingEnabled),[d,c]=u.useState(!1);u.useEffect(()=>{d||(c(!0),t(pt(o??"",!1)))},[d,t]);const p=w(m=>mt(m,o??""));if(D.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return n.jsx(ya,{windowSize:s,children:n.jsx(Bt,{transactionListView:p,depositAccountId:o??"",isCheckingCommentingEnabled:i,onBackClick:()=>{e("../")}})})}const xa=Y(function(e,t){const{companyId:s}=t;return{zeniAccountSetupView:ht(e,s),meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true"}},function(e,t){const{navigate:s,companyId:o}=t;return{onSetupButtonClick:()=>{R.trackAccountsPromoPageClicked("Setup Accounts"),e(ft(o))},onBackClick:()=>{s("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{s("../setup",{relative:"path"})}}})(Ft),ka=()=>{const e=Z(),t=W(),{tenantEmailDomain:s}=G(),{useDynamicConfig:o}=V(),a=M(),[i,d]=u.useState(!1),[c,p]=u.useState(!1),m=w(g=>N(g)),{configValue:C}=o(H.zeniAccountsConfig),r=De(C);u.useEffect(()=>{c===!1&&t.state?.message==="activation"&&p(!0)},[t.state]);const l=D.getSignedInUserTenant(s)?.companyId??m.companyId,h=D.getSignedInUser(),x=!!m.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,b=g=>{d(g)};if(h==null)throw Error("Can't access Zeni account promo page without signing in...");const f=ae(),A=te(f?.loggedInUserRoleMap),I=Ie(f?.loggedInUserRoleMap);if(x&&A)return n.jsx(ne,{to:"../../checking/setup"});if(m.company?.companyZeniAccountInfo&&(!x&&A||I)){if(t.state?.message==="activation"){const g=sn(t.state?.pathnameStackToGoBack);e(t.pathname,{state:{...t.state,message:void 0,pathnameStackToGoBack:g.newStack}})}return n.jsxs(n.Fragment,{children:[n.jsx(Ot,{showConfetti:c}),n.jsx(me,{analytics:R,onLoad:g=>(S=>S.trackPageLoaded(Ee.Event.accountsPromoPageViewed))(g)}),n.jsx(he,{isAppContentDrawerOpen:i,handleDrawerToggle:b}),n.jsx(xa,{analytics:R,navigate:e,companyId:l,onClickMenuIcon:()=>{b(!0)},maxAnnualPercentageYield:r.maxAnnualPercentageYield,maxInsuredAmount:r.maxInsuredAmount,exampleBankBalance:3e6})]})}return n.jsx(pe,{fetchState:"In-Progress",style:{backgroundColor:a.colors.grey5}})};function Ja(){const e=W(),t=w(j=>N(j)),s=M(),{useFeatureGate:o,useDynamicConfig:a}=V(),i=ae(),d=te(i?.loggedInUserRoleMap),c=Ie(i?.loggedInUserRoleMap),p=!!t.company?.companyZeniAccountInfo.isZeniAccountEnabled,m=!!t.company?.companyZeniAccountInfo.isZeniAccountTOSAccepted,{isFeatureEnabled:C}=o(B.isChargeCardFeatureEnabled),{isFeatureEnabled:r}=o(B.isDebitCardFeatureEnabled),l=nn(t),h=Se(r,t),x=t?.userRole!=null&&gt(t?.userRole),b=(t?.company==null||t.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!x)&&yt(i?.loggedInUserRoleMap),f=Ct(i?.loggedInUserRoleMap),A=(t?.company==null||t.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!x)&&xt(i?.loggedInUserRoleMap),{isFeatureEnabled:I}=o(B.isDepositAccountsFeatureEnabled),g=I&&!x,{configValue:S}=a(H.expressPayConfig),O=S.is_enable_all_tenants===!0||S.tenant_ids!=null&&S.tenant_ids.includes(t.tenantId),{isFeatureEnabled:U}=o(B.isAutoTransferRuleEnabled),P=Rt(t,C,r)&&!x&&kt(i?.loggedInUserRoleMap),E=wt(i?.loggedInUserRoleMap),v=g&&te(i?.loggedInUserRoleMap),T=v||He(i?.loggedInUserRoleMap);return n.jsxs($e,{children:[n.jsx(k,{path:"setup",element:n.jsx(_e,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:f,isReimbursementAdminLevelAccess:A,isZeniAccountAdminLevelAccess:v,isChargeCardAdminLevelAccess:P,isUserHasOnlyCardAccess:E,productType:"zeni_accounts",type:"setup"})}),n.jsx(k,{path:"verification",element:n.jsx(_e,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:f,isReimbursementAdminLevelAccess:A,isZeniAccountAdminLevelAccess:v,isChargeCardAdminLevelAccess:P,isUserHasOnlyCardAccess:E,productType:"zeni_accounts",type:"verification"})}),U?n.jsxs(n.Fragment,{children:[n.jsx(k,{path:"auto-transfer",element:n.jsx(Ve,{})}),T?n.jsx(k,{path:"auto-transfer/:ruleId/edit",element:n.jsx(Ve,{isEditDrawerOpen:!0})}):null]}):n.jsx(k,{path:"auto-transfer",element:n.jsx(de,{})}),O&&d?n.jsxs(n.Fragment,{children:[n.jsx(k,{path:"express-pay",element:n.jsx(ce,{})}),n.jsx(k,{path:"express-pay/add-ach",element:n.jsx(ce,{isAddACHDrawerOpen:!0})}),n.jsx(k,{path:"express-pay/add-wire/add-address",element:n.jsx(ce,{isAddAddressDrawerOpen:!0})}),n.jsx(k,{path:"express-pay/add-wire",element:n.jsx(ce,{isAddWireDrawerOpen:!0})})]}):n.jsx(k,{path:"express-pay",element:n.jsx(de,{})}),n.jsx(k,{path:"promo",element:n.jsx(ka,{})}),l&&!h?n.jsx(k,{path:"/*",element:n.jsx(cn,{})}):p?n.jsxs(n.Fragment,{children:[n.jsx(k,{path:"/",element:n.jsx(ke,{})}),n.jsx(k,{path:"transfer",element:n.jsx(ke,{isTransferDrawerOpen:!0})}),n.jsx(k,{path:"check-deposit",element:n.jsx(ke,{isCheckDepositDrawerOpen:!0})}),n.jsx(k,{path:":accountId/*",element:n.jsx(wa,{})}),n.jsx(k,{path:"*",element:n.jsx(de,{})})]}):m&&d?n.jsx(k,{path:"*",element:n.jsx(ne,{to:"../setup"})}):t.company?.companyZeniAccountInfo&&c?n.jsx(k,{path:"*",element:n.jsx(ne,{to:"../promo",state:e.state})}):n.jsx(k,{path:"*",element:n.jsx(pe,{fetchState:"In-Progress",style:{backgroundColor:s.colors.grey5,boxShadow:`0px 2px ${Lt.sp1} ${s.colors.dropShadowNormal}`}})})]})}function wa(){return n.jsxs($e,{children:[n.jsx(k,{path:"/",element:n.jsx(le,{})}),n.jsx(k,{path:"account-info",element:n.jsx(le,{isAccountInfoDrawerOpen:!0})}),n.jsx(k,{path:"transfer",element:n.jsx(le,{isTransferDrawerOpen:!0})}),n.jsx(k,{path:"check-deposit",element:n.jsx(le,{isCheckDepositDrawerOpen:!0})}),n.jsx(k,{path:"transactions",element:n.jsx(Ca,{})}),n.jsx(k,{path:"statements",element:n.jsx(_t,{})}),n.jsx(k,{path:"*",element:n.jsx(de,{})})]})}export{Ja as default};
@@ -1,4 +1,4 @@
1
- import{j as i}from"./liveblocks-Du-k54fV.js";import{a as f}from"./sentry-D89gdSuk.js";import{j as x,h as B,u as N,l as $,g as p}from"./core-CrPNHB9B.js";import{HE as s,HD as j,NK as v,eN as C,NL as D}from"./zeni-epic-state-BfQ0VqqL.js";import{q as E,ao as g,h as L,z as T,B as z,bZ as P,n as U}from"./index-D_5B74W3.js";import{n as _}from"./mui-TIL16lH9.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="8069bc7d-5b73-4c09-97f4-5b518912b1c5",e._sentryDebugIdIdentifier="sentry-dbid-8069bc7d-5b73-4c09-97f4-5b518912b1c5")}catch{}})();const G=_.div`
1
+ import{j as i}from"./liveblocks-3WpI1obg.js";import{a as f}from"./sentry-z6zkwC0R.js";import{j as x,h as B,u as N,l as $,g as p}from"./core-BpuExePz.js";import{HE as s,HD as j,NK as v,eN as C,NL as D}from"./zeni-epic-state-RQBIdQMH.js";import{q as E,ao as g,h as L,z as T,B as z,bZ as P,p as U}from"./index-DidLjpq0.js";import{n as _}from"./mui-Bpme9BmU.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="635e868a-7703-4b28-8403-3469c0db08be",e._sentryDebugIdIdentifier="sentry-dbid-635e868a-7703-4b28-8403-3469c0db08be")}catch{}})();const G=_.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -6,4 +6,4 @@ import{j as i}from"./liveblocks-Du-k54fV.js";import{a as f}from"./sentry-D89gdSu
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${e=>e.theme.colors.grey4};
9
- `;function V(){const e=x(),n=B(),d=E(),l=N();let{accountId:a}=$(),m=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&l.pathname.includes(`${s}/statements`)&&(a=s,m=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[u,b]=f.useState(!1),h=L();f.useEffect(()=>{u||(b(!0),n(j(a??"",!1)))},[u,n]);const o=p(t=>v(t,a??"")),y=()=>{const t=U(l.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},c=T.getSignedInUser(),r=p(t=>C(t)),I={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:r.tenantId??""},w=D(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=r.company?.companyInfo.companyLegalName??r.companyName;if(c==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?i.jsx(z,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}}):i.jsx(G,{windowSize:d,children:i.jsx(P,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:y,authParams:I,downloadEndPoint:m})})}export{V as Z};
9
+ `;function V(){const e=x(),n=B(),d=E(),l=N();let{accountId:a}=$(),m=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&l.pathname.includes(`${s}/statements`)&&(a=s,m=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[u,b]=f.useState(!1),h=L();f.useEffect(()=>{u||(b(!0),n(j(a??"",!1)))},[u,n]);const o=p(t=>v(t,a??"")),y=()=>{const t=U(l.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},r=T.getSignedInUser(),c=p(t=>C(t)),I={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c.tenantId??""},w=D(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=c.company?.companyInfo.companyLegalName??c.companyName;if(r==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?i.jsx(z,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}}):i.jsx(G,{windowSize:d,children:i.jsx(P,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:y,authParams:I,downloadEndPoint:m})})}export{V as Z};
@@ -1 +1 @@
1
- import"./sentry-D89gdSuk.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]="aeade864-8999-4b65-a5fe-284d93c9cae4",e._sentryDebugIdIdentifier="sentry-dbid-aeade864-8999-4b65-a5fe-284d93c9cae4")}catch{}})();function d(e,t){if(t!=null)return e.find(n=>n.qboId===t)}function i(e,t){return e.filter(n=>n.qboId!=null&&t.includes(n.qboId))}function a(e,t){return t.map(n=>({accountId:d(e,n.accountId.selectedOption)?.accountId??"",expenseType:n.expenseType.selectedOption??"",type1099:n.type1099.selectedOption??"",boxType:n.boxType.selectedOption??""}))}export{d as a,i as g,a as m};
1
+ import"./sentry-z6zkwC0R.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]="aeade864-8999-4b65-a5fe-284d93c9cae4",e._sentryDebugIdIdentifier="sentry-dbid-aeade864-8999-4b65-a5fe-284d93c9cae4")}catch{}})();function d(e,t){if(t!=null)return e.find(n=>n.qboId===t)}function i(e,t){return e.filter(n=>n.qboId!=null&&t.includes(n.qboId))}function a(e,t){return t.map(n=>({accountId:d(e,n.accountId.selectedOption)?.accountId??"",expenseType:n.expenseType.selectedOption??"",type1099:n.type1099.selectedOption??"",boxType:n.boxType.selectedOption??""}))}export{d as a,i as g,a as m};