@zeniai/web-app-ui 5.0.49-qa → 5.0.50-qa

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 (113) hide show
  1. package/dist/assets/AddressRoutes-CBj_Gv3m.js +1 -0
  2. package/dist/assets/AddressScreen-Dm_zAU3B.js +9 -0
  3. package/dist/assets/{AiCfoScreen-D0PxyTAw.js → AiCfoScreen-BNs0UP0N.js} +1 -1
  4. package/dist/assets/{BillPayApprovalRoutes-knuXJOtT.js → BillPayApprovalRoutes-CDQZgymB.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-B2cUMyrS.js → BillPayRoutes-aEbZUSY5.js} +10 -10
  6. package/dist/assets/{BusinessVerificationPageScreen-iv0LsvpT.js → BusinessVerificationPageScreen-Dd9hAK4t.js} +2 -2
  7. package/dist/assets/{ChargeCardRoutes-C9EHLqno.js → ChargeCardRoutes-BZBrBnGr.js} +1 -1
  8. package/dist/assets/{CompanyPassportScreen-BohXKD8w.js → CompanyPassportScreen-a1ULEPmW.js} +1 -1
  9. package/dist/assets/{ConnectionAuthScreen-CAfemlav.js → ConnectionAuthScreen-LaU8lCJX.js} +1 -1
  10. package/dist/assets/CustomerOnboardingAuthScreen-u8Iz1uWJ.js +1 -0
  11. package/dist/assets/{CustomerOnboardingRoutes-CiBeuzZL.js → CustomerOnboardingRoutes-DgF5mujU.js} +6 -6
  12. package/dist/assets/{DashboardRoutes-DpEKOOgI.js → DashboardRoutes-CAwVCMnK.js} +3 -3
  13. package/dist/assets/{DefaultTenantHome-crksvZew.js → DefaultTenantHome-EcLdNdMp.js} +1 -1
  14. package/dist/assets/{DomesticWireDetailScreen-Ck-VEef3.js → DomesticWireDetailScreen-CbXt-UMF.js} +1 -1
  15. package/dist/assets/{DrawerScreen-DW4fqUQY.js → DrawerScreen-dJiSavrx.js} +1 -1
  16. package/dist/assets/{EntityDetailRoutes-MKrp9qEm.js → EntityDetailRoutes-JG_Zg-qh.js} +1 -1
  17. package/dist/assets/{ExpenseAutomationRoutes-CCfRZRpP.js → ExpenseAutomationRoutes-DB_iTpuD.js} +3 -3
  18. package/dist/assets/FeaturePreviewScreen-BUg6DfZE.js +1 -0
  19. package/dist/assets/{MagicLinkRoutes-Cwp-7eJL.js → MagicLinkRoutes-B3cCCPt5.js} +21 -21
  20. package/dist/assets/MagicLinkSignInScreen-DHh5rUwJ.js +12 -0
  21. package/dist/assets/{MobileAppDrawer-CrCMrvam.js → MobileAppDrawer-P89JfdrK.js} +1 -1
  22. package/dist/assets/NotFoundScreen-6gdzDZcu.js +1 -0
  23. package/dist/assets/{NotificationRoutes-BsSd7oB1.js → NotificationRoutes-CEfMZpMZ.js} +1 -1
  24. package/dist/assets/{PandLWithForecastRoutes-kXVp7zaA.js → PandLWithForecastRoutes--epJeUUf.js} +1 -1
  25. package/dist/assets/PeopleRoutes-BSJVFO5c.js +22 -0
  26. package/dist/assets/PerformanceRoutes-D2ikDJJC.js +1 -0
  27. package/dist/assets/{Preview-DgE5RaQx.js → Preview-BXFZMrm8.js} +1 -1
  28. package/dist/assets/{QBOConnectionScreen-dFyaTh--.js → QBOConnectionScreen-B397gv2D.js} +1 -1
  29. package/dist/assets/ReferralListScreen-DrNR3f1I.js +5 -0
  30. package/dist/assets/{ReimbursementApprovalRoutes-wxMyQf-w.js → ReimbursementApprovalRoutes-CyXMpQc8.js} +1 -1
  31. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BQ59o3Dv.js → ReimbursementApprovalRuleDetailScreen-krVENHLP.js} +1 -1
  32. package/dist/assets/{ReimbursementRoutes-52pvbCgq.js → ReimbursementRoutes-Dba8o5Ra.js} +1 -1
  33. package/dist/assets/{ReportsRoutes-Bwa2BN-2.js → ReportsRoutes-BrQY0gJp.js} +1 -1
  34. package/dist/assets/{RewardsRoutes-BsFw6qcQ.js → RewardsRoutes-CD_i4zLk.js} +1 -1
  35. package/dist/assets/{ScreenRoutes-BChBi1xI.js → ScreenRoutes-D2xSO8bM.js} +2 -2
  36. package/dist/assets/{SettingsRoutes-BUkjKcJM.js → SettingsRoutes-wH7HrKOi.js} +7 -7
  37. package/dist/assets/{SetupPagesScreen-BcVPObGq.js → SetupPagesScreen-CWzA0lOv.js} +5 -5
  38. package/dist/assets/SignInScreen-CbpmSQ5x.js +1 -0
  39. package/dist/assets/SignOutScreen-BVBjWoNE.js +9 -0
  40. package/dist/assets/{TaskListScreen-ziEibE6n.js → TaskListScreen-BrGlCwf4.js} +2 -2
  41. package/dist/assets/TaskRoutes-HYx3Zlvm.js +9 -0
  42. package/dist/assets/TransactionDetailRoutes-B5qWoMld.js +1 -0
  43. package/dist/assets/{TransactionDetailScreen-DnhiztFg.js → TransactionDetailScreen-BBNrEPv_.js} +2 -2
  44. package/dist/assets/{TransactionListRoutes-DKFuTijV.js → TransactionListRoutes-BVt3FQOq.js} +1 -1
  45. package/dist/assets/{TreasuryRoutes-C6U2LpC5.js → TreasuryRoutes-C2xUV_03.js} +5 -5
  46. package/dist/assets/{VendorsRoutes-DmmYfhxj.js → VendorsRoutes-CSMhH833.js} +1 -1
  47. package/dist/assets/WiseConfirmationScreen-G-XbcpdY.js +12 -0
  48. package/dist/assets/{ZeniAccountRoutes-XC1IRSdd.js → ZeniAccountRoutes-BGuUiYlZ.js} +7 -7
  49. package/dist/assets/{ZeniAccountStatementScreen-Ctw-IM53.js → ZeniAccountStatementScreen-DEX7xq9P.js} +1 -1
  50. package/dist/assets/{accountMappingHelper-d9bI5aJe.js → accountMappingHelper-ma49b6N6.js} +1 -1
  51. package/dist/assets/{analytics-DlMpWLtY.js → analytics-BAsCbxQo.js} +1 -1
  52. package/dist/assets/{analyticsHelper-CUi1_ubR.js → analyticsHelper-JcUAlhUt.js} +1 -1
  53. package/dist/assets/{core-DK_vDmT8.js → core-DPi7UZmo.js} +1 -1
  54. package/dist/assets/{decodeURIComponentSafe-D_yxDRpD.js → decodeURIComponentSafe-DwnoI7sA.js} +1 -1
  55. package/dist/assets/{dnd-CI1Bz-yv.js → dnd-DkCZrOin.js} +1 -1
  56. package/dist/assets/{empty-Cq9cCg0f.js → empty-CEk-QfYb.js} +1 -1
  57. package/dist/assets/{empty-DSG43sav.js → empty-JyQE246H.js} +1 -1
  58. package/dist/assets/{emptyVideoElement-CnwvQS3j.js → emptyVideoElement-CQjUQtMJ.js} +1 -1
  59. package/dist/assets/{epic-Culj-FsH.js → epic-Bl5H1DAR.js} +1 -1
  60. package/dist/assets/getLocaleForTenant-C8il5l1g.js +1 -0
  61. package/dist/assets/{index-DUVkAqoc.js → index-3fVPNrth.js} +1 -1
  62. package/dist/assets/{index-l9tW4qcS.js → index-B9wmhgdZ.js} +1 -1
  63. package/dist/assets/{index-tcR_mP46.js → index-C34KYZhA.js} +2 -2
  64. package/dist/assets/{index-C_rnV1Gn.js → index-C9mREt06.js} +1 -1
  65. package/dist/assets/{index-DPdMJbdm.js → index-CNCbztkJ.js} +13520 -13510
  66. package/dist/assets/{index-BXVvK5HN.js → index-CdGGvZCU.js} +1 -1
  67. package/dist/assets/{index-CvaLt6TZ.js → index-LZj-15h5.js} +1 -1
  68. package/dist/assets/{lexical-2V5hcKhY.js → lexical-9DcOTYIb.js} +1 -1
  69. package/dist/assets/{liveblocks-CFneZw8x.js → liveblocks-JuhS_TaO.js} +1 -1
  70. package/dist/assets/{lottie-DTY7lPgA.js → lottie-D-zmNXvE.js} +1 -1
  71. package/dist/assets/{mui-Cf9-_L5d.js → mui-DBZfL4Fr.js} +1 -1
  72. package/dist/assets/{pathToGoBack-DiGM4suv.js → pathToGoBack-Dc6wAffR.js} +1 -1
  73. package/dist/assets/{pdf-DO37o4P_.js → pdf-DsjsFHTM.js} +4 -4
  74. package/dist/assets/{pdf-lib-CtLCB8Ws.js → pdf-lib-DHeJQ0Cz.js} +1 -1
  75. package/dist/assets/{plaid-COLZDQ-K.js → plaid-CswB7JT5.js} +1 -1
  76. package/dist/assets/{pusher-1IRbjHv-.js → pusher-BdAfvo17.js} +1 -1
  77. package/dist/assets/{react-DNcD4xIo.js → react-7npxkQgA.js} +1 -1
  78. package/dist/assets/{react-056z8_dj.js → react-9vP7M3v0.js} +1 -1
  79. package/dist/assets/{react-BP8YOYb-.js → react-DSAyCkMk.js} +1 -1
  80. package/dist/assets/{react-Dl0848Wb.js → react-DXGmOZBI.js} +1 -1
  81. package/dist/assets/{react-DzYgOa8M.js → react-eDmpGIwt.js} +1 -1
  82. package/dist/assets/{react-CTinTxki.js → react-gwTwyOqf.js} +1 -1
  83. package/dist/assets/{recharts-DGCFoGqb.js → recharts-X4zJZpUe.js} +1 -1
  84. package/dist/assets/{routePaths-C9gqQCUu.js → routePaths-BYaribza.js} +1 -1
  85. package/dist/assets/{sentry-Dhi05Xar.js → sentry-m9L4Ngd7.js} +1 -1
  86. package/dist/assets/{url-Cvest_if.js → url-CRe8btkh.js} +1 -1
  87. package/dist/assets/{url-A8mMNIgc.js → url-DIqL19cg.js} +1 -1
  88. package/dist/assets/useAskAiCfoHostNavButtonProps-CDKWu_Vj.js +1 -0
  89. package/dist/assets/{useDeviceId-BMcpyfup.js → useDeviceId-CU32QSiE.js} +1 -1
  90. package/dist/assets/useFetchSuggestedQuestionsWhenReady-CZait8ER.js +1 -0
  91. package/dist/assets/{useInitialThreadRequest-R2S3HO_0.js → useInitialThreadRequest-B11fM2s3.js} +1 -1
  92. package/dist/assets/{utils-DkqKuJOX.js → utils-H7imqmZY.js} +1 -1
  93. package/dist/assets/{withTransactionSidePanel-CUobUupW.js → withTransactionSidePanel-Z-rVoiAR.js} +1 -1
  94. package/dist/assets/{zeni-epic-state-BL_LeZIj.js → zeni-epic-state-DHSG_Gqo.js} +6 -6
  95. package/dist/index.html +1 -1
  96. package/package.json +4 -4
  97. package/dist/assets/AddressRoutes-DVn12XDr.js +0 -1
  98. package/dist/assets/AddressScreen-CR6VYfc-.js +0 -9
  99. package/dist/assets/CustomerOnboardingAuthScreen-C9M6ZBKD.js +0 -1
  100. package/dist/assets/FeaturePreviewScreen-CyYFlgNr.js +0 -1
  101. package/dist/assets/MagicLinkSignInScreen-BfnJfGbQ.js +0 -12
  102. package/dist/assets/NotFoundScreen-DyE8IG1F.js +0 -1
  103. package/dist/assets/PeopleRoutes-DXy4Bpl-.js +0 -22
  104. package/dist/assets/PerformanceRoutes-CvZ9ftVq.js +0 -1
  105. package/dist/assets/ReferralListScreen-DZOFg47R.js +0 -5
  106. package/dist/assets/SignInScreen-cLG6QYjE.js +0 -1
  107. package/dist/assets/SignOutScreen-BEqpDD8b.js +0 -9
  108. package/dist/assets/TaskRoutes-5ipLHZCr.js +0 -9
  109. package/dist/assets/TransactionDetailRoutes-Btw0hex1.js +0 -1
  110. package/dist/assets/WiseConfirmationScreen-CMuzvJwW.js +0 -12
  111. package/dist/assets/getLocaleForTenant-B8la2oRW.js +0 -1
  112. package/dist/assets/useAskAiCfoHostNavButtonProps-Z_9iU3fL.js +0 -1
  113. package/dist/assets/useFetchSuggestedQuestionsWhenReady-ChiWRlVf.js +0 -1
@@ -1,4 +1,4 @@
1
- import{j as e}from"./liveblocks-CFneZw8x.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-DK_vDmT8.js";import{ck as V,eN as D,MB as R,D7 as ae,fc 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,fb as $e,bs as Ge,Il as He,ci as We}from"./zeni-epic-state-BL_LeZIj.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-DPdMJbdm.js";import{D as it,n as P,S as ct}from"./mui-Cf9-_L5d.js";import lt from"./NotFoundScreen-DyE8IG1F.js";import{S as Y}from"./SetupPagesScreen-BcVPObGq.js";import{a as d}from"./sentry-Dhi05Xar.js";import{u as ut}from"./useAskAiCfoHostNavButtonProps-Z_9iU3fL.js";import{c as dt}from"./useFetchSuggestedQuestionsWhenReady-ChiWRlVf.js";import{M as ce}from"./MobileAppDrawer-CrCMrvam.js";import{F as pt}from"./FeaturePreviewScreen-CyYFlgNr.js";import{a as ee}from"./analyticsHelper-CUi1_ubR.js";import"./recharts-DGCFoGqb.js";import"./analytics-DlMpWLtY.js";import"./plaid-COLZDQ-K.js";import"./dnd-CI1Bz-yv.js";import"./stripe-DMRn4zHo.js";import"./lottie-DTY7lPgA.js";import"./lexical-2V5hcKhY.js";import"./pdf-DO37o4P_.js";import"./utils-DkqKuJOX.js";import"./routePaths-C9gqQCUu.js";import"./BusinessVerificationPageScreen-iv0LsvpT.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]="b9598fb7-fef6-418e-9f82-23c40453ba24",t._sentryDebugIdIdentifier="sentry-dbid-b9598fb7-fef6-418e-9f82-23c40453ba24")}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`
1
+ import{j as e}from"./liveblocks-JuhS_TaO.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 Ce,o as k}from"./core-DPi7UZmo.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 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,fb as $e,bs as Ge,Il as He,ci as We}from"./zeni-epic-state-DHSG_Gqo.js";import{A as _,al as Ze,z as j,w as z,f as b,b_ as qe,b$ as Je,c0 as H,q,h as Ke,H 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-CNCbztkJ.js";import{D as it,n as P,S as ct}from"./mui-DBZfL4Fr.js";import lt from"./NotFoundScreen-6gdzDZcu.js";import{S as Y}from"./SetupPagesScreen-CWzA0lOv.js";import{a as d}from"./sentry-m9L4Ngd7.js";import{u as ut}from"./useAskAiCfoHostNavButtonProps-CDKWu_Vj.js";import{c as dt}from"./useFetchSuggestedQuestionsWhenReady-CZait8ER.js";import{M as ce}from"./MobileAppDrawer-P89JfdrK.js";import{F as pt}from"./FeaturePreviewScreen-BUg6DfZE.js";import{a as ee}from"./analyticsHelper-JcUAlhUt.js";import"./recharts-X4zJZpUe.js";import"./analytics-BAsCbxQo.js";import"./plaid-CswB7JT5.js";import"./dnd-DkCZrOin.js";import"./stripe-DMRn4zHo.js";import"./lottie-D-zmNXvE.js";import"./lexical-9DcOTYIb.js";import"./pdf-DsjsFHTM.js";import"./utils-H7imqmZY.js";import"./routePaths-BYaribza.js";import"./BusinessVerificationPageScreen-Dd9hAK4t.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]="08f5adfb-a194-4460-bb11-7efed836a2e6",t._sentryDebugIdIdentifier="sentry-dbid-08f5adfb-a194-4460-bb11-7efed836a2e6")}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=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,I]=d.useState(!1),[u,l]=d.useState(!1),g=f(w=>D(w)),h=j.getSignedInUserTenant(o)?.companyId??g.companyId,T=j.getSignedInUser(),S=f(w=>R(w,h)),C=f(w=>w.treasurySetupViewState.fetchState),x=f(w=>w.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(w=>w.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(T==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{c||C!=="Not-Started"||h==null||(i(!0),n(ae(h,!0,!1)))},[c,C,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||C!=="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,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)),T=j.getSignedInUserTenant(n)?.companyId??h.companyId,S=f(x=>ke(x)),C=f(x=>R(x,T));if(j.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||T==null||(s(!0),o(ae(T,!0,!1)))},[m,u,T,o]),d.useEffect(()=>{c||l!=="Not-Started"||T==null||(i(!0),o(W()))},[c,l,T,o]),d.useEffect(()=>{y||g!=="Not-Started"||T==null||(I(!0),o(ne()))},[y,g,T,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:C,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{H(b,"review",S.treasuryTransferMoneyLocalData,C.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-CFneZw8x.js";import{j as L,u as U,h as M,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:`${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)`
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=Tt(s):c==="statements"?i=Ct(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=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,I]=d.useState(!1),u=f(A=>re(A)),l=u.fetchState,g=u.accountSummary?.totalBalance?.amount,h=f(A=>A.treasurySetupViewState.treasuryFundsDetails?.fetchStatus),T=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",S=_(),C=!!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(T){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:Te=>Te.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 C&&x?e.jsx(B,{to:"../setup"}):s.companyTreasuryInfo?.info&&!C&&F?e.jsx(B,{to:"../promo",state:n.state}):e.jsx(et,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const Tt=t=>`/${t}/treasury/edit-portfolio`,Ct=t=>`/${t}/treasury/statements`,It=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-CFneZw8x.js";import{j as L,u as U,h as M,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=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`
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??""},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=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-CFneZw8x.js";import{j as L,u as U,h as M,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=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`
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??""},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=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,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),T=Z(g?.loggedInUserRoleMap);if(u&&h)return e.jsx(B,{to:"../../treasury/setup"});if(m.company?.companyTreasuryInfo&&(!u&&h||T)){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=>(C=>C.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-CFneZw8x.js";import{j as L,u as U,h as M,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=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};
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: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:T}=n(v.isDebitCardFeatureEnabled),S=ot(a,h,T)&&!s&&Ge(r?.loggedInUserRoleMap),C=He(r?.loggedInUserRoleMap),x=We(r?.loggedInUserRoleMap),F=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified";return e.jsxs(Ce,{children:[x?null:e.jsx(k,{path:"setup",element:e.jsx(Y,{isBillPayAdminLevelAccess:c,isReimbursementAdminLevelAccess:y,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:g,isUserHasOnlyCardAccess:C,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:C,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-CFneZw8x.js";import{a as g}from"./sentry-Dhi05Xar.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-DK_vDmT8.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-BL_LeZIj.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-DPdMJbdm.js";import{n as U,D as Un,S as $t}from"./mui-Cf9-_L5d.js";import{t as Nn,A as Mn}from"./AddressScreen-CR6VYfc-.js";import ie from"./NotFoundScreen-DyE8IG1F.js";import{F as Gn}from"./FeaturePreviewScreen-CyYFlgNr.js";import{b as H,v as at,c as $n}from"./routePaths-C9gqQCUu.js";import{p as Kt}from"./pathToGoBack-DiGM4suv.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-Z_9iU3fL.js";import{c as ge}from"./useFetchSuggestedQuestionsWhenReady-ChiWRlVf.js";import{M as ve}from"./MobileAppDrawer-CrCMrvam.js";import{D as Kn}from"./DrawerScreen-DW4fqUQY.js";import{g as zn,m as Yn}from"./accountMappingHelper-d9bI5aJe.js";import"./recharts-DGCFoGqb.js";import"./analytics-DlMpWLtY.js";import"./plaid-COLZDQ-K.js";import"./dnd-CI1Bz-yv.js";import"./stripe-DMRn4zHo.js";import"./lottie-DTY7lPgA.js";import"./lexical-2V5hcKhY.js";import"./pdf-DO37o4P_.js";import"./utils-DkqKuJOX.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]="e4b6c99f-0a6d-4ea6-a59b-177414ef505c",e._sentryDebugIdIdentifier="sentry-dbid-e4b6c99f-0a6d-4ea6-a59b-177414ef505c")}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-JuhS_TaO.js";import{a as g}from"./sentry-m9L4Ngd7.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-DPi7UZmo.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-DHSG_Gqo.js";import{z as R,al as Be,B as Ut,w as Z,f as P,N as X,ar as xn,s as N,D as Ie,$ 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,k as et,G as Se,ax as En,ay as Nt,H 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,Y as Pn,aC as _n,aD as Vn,i as tt,aE as Ln,aF as On,n as Bn,aG as Jn,aH as Rn}from"./index-CNCbztkJ.js";import{n as U,D as Un,S as $t}from"./mui-DBZfL4Fr.js";import{t as Nn,A as Mn}from"./AddressScreen-Dm_zAU3B.js";import ie from"./NotFoundScreen-6gdzDZcu.js";import{F as Gn}from"./FeaturePreviewScreen-BUg6DfZE.js";import{b as H,v as at,c as $n}from"./routePaths-BYaribza.js";import{p as Kt}from"./pathToGoBack-Dc6wAffR.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-CDKWu_Vj.js";import{c as ge}from"./useFetchSuggestedQuestionsWhenReady-CZait8ER.js";import{M as ve}from"./MobileAppDrawer-P89JfdrK.js";import{D as Kn}from"./DrawerScreen-dJiSavrx.js";import{g as zn,m as Yn}from"./accountMappingHelper-ma49b6N6.js";import"./recharts-X4zJZpUe.js";import"./analytics-BAsCbxQo.js";import"./plaid-CswB7JT5.js";import"./dnd-DkCZrOin.js";import"./stripe-DMRn4zHo.js";import"./lottie-D-zmNXvE.js";import"./lexical-9DcOTYIb.js";import"./pdf-DsjsFHTM.js";import"./utils-H7imqmZY.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]="1bae15b3-6e9e-4103-a3be-d96acfcebe92",e._sentryDebugIdIdentifier="sentry-dbid-1bae15b3-6e9e-4103-a3be-d96acfcebe92")}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-JuhS_TaO.js";import{a as f}from"./sentry-m9L4Ngd7.js";import{q as u,h,g as y,N as I}from"./core-DPi7UZmo.js";import{IE as b,eO as w,yZ as x}from"./zeni-epic-state-DHSG_Gqo.js";import{z as l,B as j,E as S,Y as E}from"./index-CNCbztkJ.js";import{n as c}from"./mui-DBZfL4Fr.js";import"./recharts-X4zJZpUe.js";import"./analytics-BAsCbxQo.js";import"./plaid-CswB7JT5.js";import"./dnd-DkCZrOin.js";import"./stripe-DMRn4zHo.js";import"./lottie-D-zmNXvE.js";import"./lexical-9DcOTYIb.js";import"./pdf-DsjsFHTM.js";import"./utils-H7imqmZY.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]="d6eaaf34-29ce-4bd3-a392-0533ca6050e9",e._sentryDebugIdIdentifier="sentry-dbid-d6eaaf34-29ce-4bd3-a392-0533ca6050e9")}catch{}})();const Y=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",g=e.get("profileId")??"",[n,p]=f.useState(!1),a=h(),i=y(m=>b(m)),r=l.getSignedInUser(),d=l.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),f.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{Y as default};
@@ -1,4 +1,4 @@
1
- import{j as n}from"./liveblocks-CFneZw8x.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-DK_vDmT8.js";import{eN as N,Nr as we,Ns as Ge,cj as te,ck as He,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 Nn,Me as ue,Nv as Mn,DH as _n,Jk as Vn,DJ as $n,k8 as Fe,Nw as Gn,pF as Ye,pt as Je,j$ as qe,k2 as Re,Jl as Le,Jm as Hn,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 gt,bv as ft,bD as yt,cv as Ct,bE as xt,bs as kt,Il as wt}from"./zeni-epic-state-BL_LeZIj.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-DPdMJbdm.js";import{n as L,D as q,S as K}from"./mui-Cf9-_L5d.js";import de from"./NotFoundScreen-DyE8IG1F.js";import{S as _e}from"./SetupPagesScreen-BcVPObGq.js";import{F as cn}from"./FeaturePreviewScreen-CyYFlgNr.js";import{a as u}from"./sentry-Dhi05Xar.js";import{M as he}from"./MobileAppDrawer-CrCMrvam.js";import{A as Ut,D as zt,V as Nt}from"./DomesticWireDetailScreen-Ck-VEef3.js";import{A as Mt}from"./AddressScreen-CR6VYfc-.js";import{u as ln}from"./useAskAiCfoHostNavButtonProps-Z_9iU3fL.js";import{c as dn}from"./useFetchSuggestedQuestionsWhenReady-ChiWRlVf.js";import{Z as _t}from"./ZeniAccountStatementScreen-Ctw-IM53.js";import"./recharts-DGCFoGqb.js";import"./analytics-DlMpWLtY.js";import"./plaid-COLZDQ-K.js";import"./dnd-CI1Bz-yv.js";import"./stripe-DMRn4zHo.js";import"./lottie-DTY7lPgA.js";import"./lexical-2V5hcKhY.js";import"./pdf-DO37o4P_.js";import"./utils-DkqKuJOX.js";import"./analyticsHelper-CUi1_ubR.js";import"./routePaths-C9gqQCUu.js";import"./BusinessVerificationPageScreen-iv0LsvpT.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]="16911563-b3ce-41ea-90e5-357c326d64ee",e._sentryDebugIdIdentifier="sentry-dbid-16911563-b3ce-41ea-90e5-357c326d64ee")}catch{}})();const Vt=L.div`
1
+ import{j as n}from"./liveblocks-JuhS_TaO.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-DPi7UZmo.js";import{eN as N,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 Nn,Me as ue,Nv as Mn,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-DHSG_Gqo.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,f as R,bP as It,ao as ve,bQ as St,w as me,bR as bt,i as Ee,aI as G,bS as vt,H 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-CNCbztkJ.js";import{n as L,D as q,S as K}from"./mui-DBZfL4Fr.js";import de from"./NotFoundScreen-6gdzDZcu.js";import{S as _e}from"./SetupPagesScreen-CWzA0lOv.js";import{F as cn}from"./FeaturePreviewScreen-BUg6DfZE.js";import{a as u}from"./sentry-m9L4Ngd7.js";import{M as he}from"./MobileAppDrawer-P89JfdrK.js";import{A as Ut,D as zt,V as Nt}from"./DomesticWireDetailScreen-CbXt-UMF.js";import{A as Mt}from"./AddressScreen-Dm_zAU3B.js";import{u as ln}from"./useAskAiCfoHostNavButtonProps-CDKWu_Vj.js";import{c as dn}from"./useFetchSuggestedQuestionsWhenReady-CZait8ER.js";import{Z as _t}from"./ZeniAccountStatementScreen-DEX7xq9P.js";import"./recharts-X4zJZpUe.js";import"./analytics-BAsCbxQo.js";import"./plaid-CswB7JT5.js";import"./dnd-DkCZrOin.js";import"./stripe-DMRn4zHo.js";import"./lottie-D-zmNXvE.js";import"./lexical-9DcOTYIb.js";import"./pdf-DsjsFHTM.js";import"./utils-H7imqmZY.js";import"./analyticsHelper-JcUAlhUt.js";import"./routePaths-BYaribza.js";import"./BusinessVerificationPageScreen-Dd9hAK4t.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]="01b8195c-e555-4f51-bad3-ca0b9db44fd2",e._sentryDebugIdIdentifier="sentry-dbid-01b8195c-e555-4f51-bad3-ca0b9db44fd2")}catch{}})();const Vt=L.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -6,7 +6,7 @@ import{j as n}from"./liveblocks-CFneZw8x.js";import{j as Z,u as W,h as z,l as G,
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(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)),g=l?.companyId??D.getSignedInUserTenant(d)?.companyId,A=te(a?.loggedInUserRoleMap)||He(a?.loggedInUserRoleMap),{isFeatureEnabled:I}=c(B.isTreasuryEnabled),f=l?.company!=null&&Ze(l.company),S=I&&f,O=D.getSignedInUser(),U=l.tenantId,P={userId:O?.userId??"",sessionId:O?.zeniSessionId??"",tenantId:U??""},E=l.companyName;u.useEffect(()=>{!C&&x==="Not-Started"&&g&&(r(!0),o(Ae(!0)))},[C,x,g,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)`
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}=H(),{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=>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=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 Ht={overlayWidth:new J(100,100,58)},Gt=({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: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)`
10
10
  display: flex;
11
11
  min-height: 100%;
12
12
  flex-direction: column;
@@ -26,7 +26,7 @@ import{j as n}from"./liveblocks-CFneZw8x.js";import{j as Z,u as W,h as z,l as G,
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=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,g]=u.useState(!1),[A,I]=u.useState(!1),[f,S]=u.useState(!1),O=sn(a.state?.pathnameStackToGoBack),{poppedPathname:U}=O,P=U?.split("/"),E=P?.[P.length-1];u.useEffect(()=>{e===!0?g(!0):(g(!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=()=>{g(!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,f===!0?n.jsx(Yt,{closeDrawerHandler:j,isDrawerOpen:f}):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)`
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(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=>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(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(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=>He(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;
@@ -34,7 +34,7 @@ import{j as n}from"./liveblocks-CFneZw8x.js";import{j as Z,u as W,h as z,l as G,
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(f=>nt(f)),d=w(f=>N(f)),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:g}=b(H.zeniAccountsConfig),A=De(g),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:f=>(S=>S.trackPageLoaded(Ee.Event.zeniAccountsTransferFormViewed))(f)}),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:f=>f.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:f=>{m(tt(f))},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}=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)`
38
38
  display: flex;
39
39
  min-height: 100%;
40
40
  flex-direction: column;
@@ -46,7 +46,7 @@ import{j as n}from"./liveblocks-CFneZw8x.js";import{j as Z,u as W,h as z,l as G,
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=fn(C)),r==="payBill"?h=mn(o,p,m):r==="transfer"?(h=hn(C),l!=null&&e(tn(l))):r==="checkDeposit"&&(h=gn(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),g=w(F=>N(F)),A=g.companyId??D.getSignedInUserTenant(d)?.companyId,{configValue:I}=c(H.expressPayConfig),f=I.is_enable_all_tenants===!0||I.tenant_ids!=null&&I.tenant_ids.includes(g.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",ge=!!g.companyZeniAccountInfo?.info?.isZeniAccountEnabled,ie=ae(),re=!!g.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,Q=!!g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,X=te(ie?.loggedInUserRoleMap),yn=Ie(ie?.loggedInUserRoleMap),Cn=!!g.companyBillPayInfo?.info?.isBillPayEnabled,je=D.getSignedInUser(),xn={userId:je?.userId??"",sessionId:je?.zeniSessionId??"",tenantId:g.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=g.company!=null&&Ze(g.company),fe=(r&&vn)===!0&&!Q,[En,jn]=u.useState(!1),ye=w(F=>F.treasurySetupViewState.treasuryFundsDetails),Pn=ye.fundsDetails,Tn=jt(Pn);u.useEffect(()=>{fe!==!0||En||ye?.fetchStatus.fetchState!=="Not-Started"||(jn(!0),a(rt()))},[ye.fetchStatus,a]);const Bn=nn(g),On=Se(l,g);return Bn===!0&&On!==!0?n.jsx(cn,{}):ge?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),fe&&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:g,location:s,companyId:A,analytics:R,maxInsuredAmount:b.maxInsuredAmount,isExpressPayEnabled:f,isBillPayEnabled:Cn,isCheckingCommentingEnabled:x,isDebitCardFeatureEnabled:l,isAutoTransferRuleEnabled:h,handleDrawerToggle:Be,showTreasuryPromo:fe,treasuryYieldPercentage:Tn,treasuryInsuredAmount:5e5,isAiCfoAccessEnabled:Sn,onAskAiCfoClick:bn})]})]}):re&&X?n.jsx(ne,{to:"../setup"}):g.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`,gn=(e,t)=>t==null?`/${e}/checking/check-deposit`:`/${e}/checking/${t}/check-deposit`,fn=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}=H(),{useDynamicConfig:c,useFeatureGate:p}=V(),m=M(),{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=>N(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,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-CFneZw8x.js";import{j as Z,u as W,h as z,l as G,
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=fn(d):c==="payBill"?m=mn(o,t.isBillPayEnabled,t.isDebitCardFeatureEnabled):c==="transfer"?(m=hn(d,i),p!=null&&e(tn(p))):c==="checkDeposit"?(m=gn(d,i),p!=null&&e(ut(p))):c==="accountStatement"&&(m=fa(d,i));const C=ee(a.state?.pathnameStackToGoBack,a.pathname);s(m,{state:{pathnameStackToGoBack:C}})},onViewAllTransactionClick:()=>{const c=ga(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),g=!!h.companyBillPayInfo?.info?.isBillPayEnabled,A=D.getSignedInUser(),I=h.companyId??D.getSignedInUserTenant(c)?.companyId,f={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:ge}=rn(),{isAiCfoAccessEnabled:ie,onAskAiCfoClick:re}=ln({isAiCfoOpen:se,setIsAiCfoOpen:ge,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:f,downloadAccountDetailEndPoint:S,closeDrawerHandler:Q,isAccountInfoDrawerOpen:j,zeniBankAccountDetail:$.accountDetail}):null,P===!0?n.jsx(pn,{closeDrawerHandler:Q,isTransferDrawerOpen:P,zeniAccountsConfig:$.zeniAccountsConfig,authParams:f,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:g,isCheckingCommentingEnabled:l,isExpressPayEnabled:b,isAiCfoAccessEnabled:ie,onAskAiCfoClick:re})})]})}const ha=(e,t)=>`/${e}/checking/${t}/account-info`,ga=(e,t)=>`/${e}/checking/${t}/transactions`,fa=(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}=H(),{useDynamicConfig:m}=V(),{useFeatureGate:C}=V(),{isFeatureEnabled:r}=C(B.isDebitCardFeatureEnabled),{isFeatureEnabled:l}=C(B.isCheckingCommentingEnabled),h=w(X=>N(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`
58
58
  display: flex;
59
59
  height: 100vh;
60
60
  width: 100%;
@@ -63,4 +63,4 @@ import{j as n}from"./liveblocks-CFneZw8x.js";import{j as Z,u as W,h as z,l as G,
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}=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(gt(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(f=>N(f)),{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=f=>{d(f)};if(h==null)throw Error("Can't access Zeni account promo page without signing in...");const g=ae(),A=te(g?.loggedInUserRoleMap),I=Ie(g?.loggedInUserRoleMap);if(x&&A)return n.jsx(ne,{to:"../../checking/setup"});if(m.company?.companyZeniAccountInfo&&(!x&&A||I)){if(t.state?.message==="activation"){const f=sn(t.state?.pathnameStackToGoBack);e(t.pathname,{state:{...t.state,message:void 0,pathnameStackToGoBack:f.newStack}})}return n.jsxs(n.Fragment,{children:[n.jsx(Ot,{showConfetti:c}),n.jsx(me,{analytics:R,onLoad:f=>(S=>S.trackPageLoaded(Ee.Event.accountsPromoPageViewed))(f)}),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&&ft(t?.userRole),b=(t?.company==null||t.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!x)&&yt(i?.loggedInUserRoleMap),g=Ct(i?.loggedInUserRoleMap),A=(t?.company==null||t.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!x)&&xt(i?.loggedInUserRoleMap),{isFeatureEnabled:I}=o(B.isDepositAccountsFeatureEnabled),f=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=f&&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:g,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:g,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}=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=M(),[i,d]=u.useState(!1),[c,p]=u.useState(!1),m=w(g=>N(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=>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(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};
@@ -1,4 +1,4 @@
1
- import{j as i}from"./liveblocks-CFneZw8x.js";import{a as f}from"./sentry-Dhi05Xar.js";import{j as x,h as B,u as N,l as $,g as p}from"./core-DK_vDmT8.js";import{HE as s,HD as j,NK as v,eN as C,NL as D}from"./zeni-epic-state-BL_LeZIj.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-DPdMJbdm.js";import{n as _}from"./mui-Cf9-_L5d.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`
1
+ import{j as i}from"./liveblocks-JuhS_TaO.js";import{a as f}from"./sentry-m9L4Ngd7.js";import{j as x,h as B,u as N,l as $,g as p}from"./core-DPi7UZmo.js";import{HE as s,HD as j,NK as v,eN as C,NL as D}from"./zeni-epic-state-DHSG_Gqo.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-CNCbztkJ.js";import{n as _}from"./mui-DBZfL4Fr.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%;
@@ -1 +1 @@
1
- import"./sentry-Dhi05Xar.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-m9L4Ngd7.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};