@zeniai/web-app-ui 5.0.11-dev → 5.0.12-dev

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (115) hide show
  1. package/dist/assets/AddressRoutes-RZvAbm7b.js +1 -0
  2. package/dist/assets/AddressScreen-fg6k52x4.js +9 -0
  3. package/dist/assets/AiCfoScreen-jLlIeMQC.js +11 -0
  4. package/dist/assets/{BillPayApprovalRoutes-DfIF_lRe.js → BillPayApprovalRoutes-BuPgz0VZ.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-ABgydC8p.js → BillPayRoutes-CQiDaAlk.js} +10 -10
  6. package/dist/assets/{BusinessVerificationPageScreen-Byg1Uhrv.js → BusinessVerificationPageScreen-Z_-aQI_5.js} +1 -1
  7. package/dist/assets/{ChargeCardRoutes-DOv8Kupg.js → ChargeCardRoutes-mbNdCQ5I.js} +1 -1
  8. package/dist/assets/CompanyPassportScreen-Dof8QyCO.js +1 -0
  9. package/dist/assets/{ConnectionAuthScreen-C46eBigr.js → ConnectionAuthScreen-D3iY5CZB.js} +1 -1
  10. package/dist/assets/CustomerOnboardingAuthScreen-InYw6yWH.js +1 -0
  11. package/dist/assets/{CustomerOnboardingRoutes-HmFZMxcH.js → CustomerOnboardingRoutes-DNuKHrz2.js} +4 -4
  12. package/dist/assets/{DashboardRoutes-DCrMQvqt.js → DashboardRoutes-B8hxKVWr.js} +1 -1
  13. package/dist/assets/{DefaultTenantHome-C6axtGsS.js → DefaultTenantHome-By01i4JV.js} +1 -1
  14. package/dist/assets/{DomesticWireDetailScreen-CDLset95.js → DomesticWireDetailScreen-BknvyqFc.js} +1 -1
  15. package/dist/assets/{DrawerScreen-CjKjzVJ3.js → DrawerScreen-CPuMvDg7.js} +1 -1
  16. package/dist/assets/{EntityDetailRoutes-NLN5T6x2.js → EntityDetailRoutes-CehcYova.js} +1 -1
  17. package/dist/assets/{ExpenseAutomationRoutes-f8iGFMw1.js → ExpenseAutomationRoutes--qEGkNAZ.js} +5 -5
  18. package/dist/assets/FeaturePreviewScreen-BDotwidZ.js +1 -0
  19. package/dist/assets/MagicLinkRoutes-B7lTPJi5.js +72 -0
  20. package/dist/assets/MagicLinkSignInScreen-CIKfHfB4.js +12 -0
  21. package/dist/assets/{MobileAppDrawer-OybL2Okz.js → MobileAppDrawer-gMG7WLxC.js} +1 -1
  22. package/dist/assets/NotFoundScreen-DKiPvQrK.js +1 -0
  23. package/dist/assets/{NotificationRoutes-BpYt3phX.js → NotificationRoutes-DRSZhtx9.js} +1 -1
  24. package/dist/assets/{PandLWithForecastRoutes-CHRiJgFR.js → PandLWithForecastRoutes-CzASlWgo.js} +1 -1
  25. package/dist/assets/{PeopleRoutes-D9CVh0Ja.js → PeopleRoutes-2EjYhZMl.js} +3 -3
  26. package/dist/assets/PerformanceRoutes-hWmBUaHL.js +1 -0
  27. package/dist/assets/{Preview-CKmcpteJ.js → Preview-C3TcKeZU.js} +1 -1
  28. package/dist/assets/{QBOConnectionScreen-DZ1k9UnT.js → QBOConnectionScreen-CHf-hKza.js} +1 -1
  29. package/dist/assets/{ReferralListScreen-ChvCApY5.js → ReferralListScreen-DmQVP2Me.js} +2 -2
  30. package/dist/assets/{ReimbursementApprovalRoutes-DFueCzb6.js → ReimbursementApprovalRoutes-D_6AwVb9.js} +1 -1
  31. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CGR7iPyc.js → ReimbursementApprovalRuleDetailScreen-CMkDXxn8.js} +1 -1
  32. package/dist/assets/{ReimbursementRoutes-fdHxZhUC.js → ReimbursementRoutes-DpKjqTcA.js} +4 -4
  33. package/dist/assets/{ReportsRoutes-BfRe6iWC.js → ReportsRoutes-D7nHEFeV.js} +1 -1
  34. package/dist/assets/RewardsRoutes-BgSfJ48K.js +1 -0
  35. package/dist/assets/{ScreenRoutes-33kyTNa0.js → ScreenRoutes-CPqWF-Ww.js} +2 -2
  36. package/dist/assets/{SettingsRoutes-BubqdVb7.js → SettingsRoutes-B5wg5ovm.js} +7 -7
  37. package/dist/assets/{SetupPagesScreen-CIFtnWYk.js → SetupPagesScreen-BanbOOgQ.js} +5 -5
  38. package/dist/assets/SignInScreen-CZI8HoAd.js +1 -0
  39. package/dist/assets/SignOutScreen-CpX3JLX_.js +9 -0
  40. package/dist/assets/{TaskListScreen-BgivrIiS.js → TaskListScreen-C090Vv7j.js} +2 -2
  41. package/dist/assets/TaskRoutes-D4NPFxWo.js +9 -0
  42. package/dist/assets/TransactionDetailRoutes-DQpiFP5C.js +1 -0
  43. package/dist/assets/{TransactionDetailScreen-DxmS5vev.js → TransactionDetailScreen-B_ny21sj.js} +1 -1
  44. package/dist/assets/{TransactionListRoutes-DmcpRXDM.js → TransactionListRoutes-BeBY15XF.js} +1 -1
  45. package/dist/assets/{TreasuryRoutes-Dwg7JuRo.js → TreasuryRoutes-Cfd3gerU.js} +5 -5
  46. package/dist/assets/{VendorsRoutes-6uhzJWI3.js → VendorsRoutes-Bg_qB9es.js} +1 -1
  47. package/dist/assets/WiseConfirmationScreen-RvJMSTLm.js +12 -0
  48. package/dist/assets/{ZeniAccountRoutes-y235hpKz.js → ZeniAccountRoutes-B-_OsFeA.js} +8 -8
  49. package/dist/assets/{ZeniAccountStatementScreen-Dk4AqWUx.js → ZeniAccountStatementScreen-CVRPKBLf.js} +1 -1
  50. package/dist/assets/{accountMappingHelper-BIF_cEGy.js → accountMappingHelper-DUJwjv4V.js} +1 -1
  51. package/dist/assets/{analytics-YTm4e0V2.js → analytics-DuZD1FBf.js} +1 -1
  52. package/dist/assets/{analyticsHelper-BG68_Ecq.js → analyticsHelper-CezXrIid.js} +1 -1
  53. package/dist/assets/{core-cQ_UGuA8.js → core-CHx9v1R3.js} +1 -1
  54. package/dist/assets/{decodeURIComponentSafe-CzQtaU9d.js → decodeURIComponentSafe-IyDHJK_-.js} +1 -1
  55. package/dist/assets/{dnd-BKb14efZ.js → dnd-Ci4anwe2.js} +1 -1
  56. package/dist/assets/{empty-DNHXYLLo.js → empty-CXijM8Yn.js} +1 -1
  57. package/dist/assets/{empty-DZNLkcgK.js → empty-DC_zzPcD.js} +1 -1
  58. package/dist/assets/{emptyVideoElement-CBnuw-R_.js → emptyVideoElement-C2-_1qo0.js} +1 -1
  59. package/dist/assets/{epic-B020-YAE.js → epic-ClqXieiv.js} +1 -1
  60. package/dist/assets/getLocaleForTenant-BobWg4Hu.js +1 -0
  61. package/dist/assets/{index-Dv9AJolW.js → index-BJaFzjLY.js} +1 -1
  62. package/dist/assets/{index-jWD7VWky.js → index-BYgpnDFl.js} +1 -1
  63. package/dist/assets/{index-BU0MpF_k.js → index-DW2V2aM1.js} +1 -1
  64. package/dist/assets/{index-DAAltHsi.js → index-DXrrGmep.js} +1 -1
  65. package/dist/assets/{index-COB8HvQe.js → index-DZjotWfe.js} +2 -2
  66. package/dist/assets/{index-6MiIPIRp.js → index-DvW5_poC.js} +1 -1
  67. package/dist/assets/{index-DaFoFUBf.js → index-_YbuoSTd.js} +12394 -12319
  68. package/dist/assets/{lexical-Dhe13gAE.js → lexical-DQpmcVQ9.js} +1 -1
  69. package/dist/assets/{liveblocks-BGrTvYCQ.js → liveblocks-CQd3J_Jz.js} +1 -1
  70. package/dist/assets/{lottie-DunuFFva.js → lottie-Dnly7PBz.js} +1 -1
  71. package/dist/assets/{mui-bgnk9Y8D.js → mui-B5MJXy46.js} +1 -1
  72. package/dist/assets/{pathToGoBack-CrwnkzZo.js → pathToGoBack-eAzzRDV4.js} +1 -1
  73. package/dist/assets/{pdf-pb-ViLbf.js → pdf-DYwn2DuC.js} +4 -4
  74. package/dist/assets/{pdf-lib-CWFeXKHq.js → pdf-lib-DV6Dg2jz.js} +1 -1
  75. package/dist/assets/{plaid-D86kekqV.js → plaid-CcgrQve1.js} +1 -1
  76. package/dist/assets/{pusher-Dl_gaLc0.js → pusher-SIueaQE_.js} +1 -1
  77. package/dist/assets/{react-DjMti-au.js → react-BOC875DV.js} +1 -1
  78. package/dist/assets/{react-B-GK82Mh.js → react-B_6uxiQm.js} +1 -1
  79. package/dist/assets/{react-BSv395g0.js → react-C7IO6ybw.js} +1 -1
  80. package/dist/assets/{react-CsXicgmu.js → react-Df7SmVuu.js} +1 -1
  81. package/dist/assets/{react-BGx71-xQ.js → react-fY2vQLDW.js} +1 -1
  82. package/dist/assets/{react-amVh9j5p.js → react-vH2UXDZO.js} +1 -1
  83. package/dist/assets/{recharts-d-EnR1VF.js → recharts-nKX4-UUs.js} +1 -1
  84. package/dist/assets/{routePaths-Dbo9mbXz.js → routePaths-abbP8AF2.js} +1 -1
  85. package/dist/assets/{sentry-B-sG2CiU.js → sentry-BO53Tmje.js} +1 -1
  86. package/dist/assets/{url-DXZa-f5b.js → url-CXCHGUpp.js} +1 -1
  87. package/dist/assets/{url-BOXP7fzy.js → url-kAF8xbJK.js} +1 -1
  88. package/dist/assets/useAskAiCfoHostNavButtonProps-BndHsfWo.js +1 -0
  89. package/dist/assets/{useDeviceId-D2nSr5j2.js → useDeviceId-J1-jcXdc.js} +1 -1
  90. package/dist/assets/useFetchSuggestedQuestionsWhenReady-B8UnhkhU.js +1 -0
  91. package/dist/assets/{useInitialThreadRequest-DuxWYdX9.js → useInitialThreadRequest-DORcYYgp.js} +1 -1
  92. package/dist/assets/{utils-CU50wlH3.js → utils-DpJstXha.js} +1 -1
  93. package/dist/assets/{withTransactionSidePanel-08bnc7py.js → withTransactionSidePanel-Bvasj9MO.js} +1 -1
  94. package/dist/assets/{zeni-epic-state-BObvmHAZ.js → zeni-epic-state-T7UkKQQw.js} +3 -3
  95. package/dist/index.html +1 -1
  96. package/package.json +3 -3
  97. package/dist/assets/AddressRoutes-D4nqvs49.js +0 -1
  98. package/dist/assets/AddressScreen-BMB6Kbyt.js +0 -9
  99. package/dist/assets/AiCfoScreen-Vk7WMEZ-.js +0 -11
  100. package/dist/assets/CompanyPassportScreen-DNNUDJSS.js +0 -1
  101. package/dist/assets/CustomerOnboardingAuthScreen-EaU7h7Wf.js +0 -1
  102. package/dist/assets/FeaturePreviewScreen-DCLqtwXF.js +0 -1
  103. package/dist/assets/MagicLinkRoutes-BWOlQli3.js +0 -72
  104. package/dist/assets/MagicLinkSignInScreen-8L2FgZqU.js +0 -12
  105. package/dist/assets/NotFoundScreen-D8bJeRt0.js +0 -1
  106. package/dist/assets/PerformanceRoutes-lNCEdrfz.js +0 -1
  107. package/dist/assets/RewardsRoutes-CrU22RDz.js +0 -1
  108. package/dist/assets/SignInScreen-DunAziCS.js +0 -1
  109. package/dist/assets/SignOutScreen-DFscZ-6B.js +0 -9
  110. package/dist/assets/TaskRoutes-Zd-WILg6.js +0 -9
  111. package/dist/assets/TransactionDetailRoutes-BQ9j2vpm.js +0 -1
  112. package/dist/assets/WiseConfirmationScreen-CNbKlsBn.js +0 -12
  113. package/dist/assets/getLocaleForTenant-CX5wQdJ4.js +0 -1
  114. package/dist/assets/useAskAiCfoHostNavButtonProps-AwLPsx7n.js +0 -1
  115. package/dist/assets/useFetchSuggestedQuestionsWhenReady-wonFIDms.js +0 -1
@@ -0,0 +1 @@
1
+ import{j as u}from"./liveblocks-CQd3J_Jz.js";import{a as f,b as T,q as A}from"./sentry-BO53Tmje.js";import{h as D,j as z,g as c,u as M,N as j,k as O}from"./core-CHx9v1R3.js";import{u as F,z as s,h as P,c as E,D as N,d as _,e as B,f as V,g as $,n as q,j as v}from"./index-_YbuoSTd.js";import{eM as J,Ie as Q,If as R,eN as W,fi as H,Il as G,fF as K,cR as X,Im as y,In as Y,Io as Z,bQ as b}from"./zeni-epic-state-T7UkKQQw.js";import"./mui-B5MJXy46.js";import{u as ee}from"./useDeviceId-J1-jcXdc.js";import{f as te}from"./analyticsHelper-CezXrIid.js";import{t as ne}from"./getLocaleForTenant-BobWg4Hu.js";import"./recharts-nKX4-UUs.js";import"./analytics-DuZD1FBf.js";import"./plaid-CcgrQve1.js";import"./dnd-Ci4anwe2.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dnly7PBz.js";import"./lexical-DQpmcVQ9.js";import"./pdf-DYwn2DuC.js";import"./utils-DpJstXha.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="e4dd6aca-bd0c-4b01-9734-530815a069b0",t._sentryDebugIdIdentifier="sentry-dbid-e4dd6aca-bd0c-4b01-9734-530815a069b0")}catch{}})();const ie=O(function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:l}},function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const l=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(Z({authCode:n,oauthProvider:a,appType:"web",redirectUri:b(l),sourceUri:b(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(Y(n,a)))},clearSignInError:()=>{t(y())}}})(q),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=D(),d=z(),{clearAllLoading:g}=F(),n=s.getSignedInUser();f.useLayoutEffect(()=>{g()},[g]);const a=ee(),l=c(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:h,accountLocked:C,accountUnlockTime:k}=c(e=>e.tenantState),p=c(e=>e.tenantState.fetchState),L=c(e=>e.tenantState.activeTenantFetchState.fetchState),I=c(e=>e.tenantState.signInState),o=c(e=>e.tenantState.loggedInUser),r=c(e=>J(e)),S=c(e=>Q(e)),m=M(),w=P().mode,U=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(f.useEffect(()=>{h.fetchState==="Completed"&&l!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(l))},[h.fetchState,l]),f.useEffect(()=>{t(void 0)},[]),f.useEffect(()=>{I!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(R(S.tenantsInOrder),o.zeniSessionId),W(o.userId,o.zeniSessionId,r.tenantId),i(H(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(G("Completed")),N.updateAppLocaleID(ne(r)),te(o,r,w,void 0,S.tenantsInOrder),K().then(()=>{const e=$();e!=null&&_(e)}),setTimeout(()=>{E.trackLogin(B.Event.loginSuccess,o.authProvider??"google",X(r.productSettings))},2e3))},[I,p,L,o,r,S,w,m.state,i]),I==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return u.jsx(j,{to:e,state:{...m.state,origin:""}})}return u.jsxs(u.Fragment,{children:[u.jsx(ae,{magicLinkExpired:!!U,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),C===!0&&k!=null?u.jsx(V,{onClose:()=>i(y()),unlockDate:k}):null]})}export{ve as default};
@@ -0,0 +1,9 @@
1
+ import{j as s}from"./liveblocks-CQd3J_Jz.js";import{a as n}from"./sentry-BO53Tmje.js";import{h as u,u as m,j as p,N as g}from"./core-CHx9v1R3.js";import{z as c,B as y,t as b,c as d,e as h}from"./index-_YbuoSTd.js";import{IB as I,Ij as x,IC as j}from"./zeni-epic-state-T7UkKQQw.js";import{n as w}from"./mui-B5MJXy46.js";import"./recharts-nKX4-UUs.js";import"./analytics-DuZD1FBf.js";import"./plaid-CcgrQve1.js";import"./dnd-Ci4anwe2.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dnly7PBz.js";import"./lexical-DQpmcVQ9.js";import"./pdf-DYwn2DuC.js";import"./utils-DpJstXha.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]="58e59542-9aac-45d1-8b64-34ce6479db69",e._sentryDebugIdIdentifier="sentry-dbid-58e59542-9aac-45d1-8b64-34ce6479db69")}catch{}})();function $(){const e=u(),t=m(),i=p(),a=n.useRef(!1),l=c.isSignedIn(),r=t.state?.message==="logout",o=r||l;return n.useEffect(()=>{o&&!a.current&&(a.current=!0,setTimeout(()=>{try{c.clearAll(),e(I()),e(x(!1)),j(),b.reset(),d.trackLogout(h.Event.logoutSuccess),d.resetUserIdentity()}catch(f){console.error("Error during sign out:",f)}finally{r||i("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(v,{children:s.jsx(y,{fetchState:"In-Progress"})}):s.jsx(g,{to:"../",replace:!0})}const v=w.div`
2
+ display: flex;
3
+ height: 100vh;
4
+ width: 100%;
5
+ flex: 1 1 auto;
6
+ flex-direction: column;
7
+ align-items: center;
8
+ background-color: ${e=>e.theme.colors.grey4};
9
+ `;export{$ as default};
@@ -1,4 +1,4 @@
1
- import{j as k}from"./liveblocks-BGrTvYCQ.js";import{a as m}from"./sentry-B-sG2CiU.js";import{j,h as N,u as R,g as G,l as $,k as v}from"./core-cQ_UGuA8.js";import{K,z as O,i as U,s as q,w as M,d as _,f as z,cA as V,v as f,q as W}from"./index-DaFoFUBf.js";import{eM as Q,Pl as w,Fp as y,Pm as L,Ph as H,EQ as S,Pn as J,EU as I,Et as X,Fq as b,Po as B,gy as Y,Ff as Z,Fk as aa,F7 as ta,F5 as ea,Fl as sa,F2 as oa,Pp as na,Pq as ia,Pr as la,Ps as u,eh as ra,Pt as ca,Pu as pa}from"./zeni-epic-state-BObvmHAZ.js";import{n as ka}from"./mui-bgnk9Y8D.js";import{u as ua}from"./useAskAiCfoHostNavButtonProps-AwLPsx7n.js";import{c as da}from"./useFetchSuggestedQuestionsWhenReady-wonFIDms.js";import{M as ma}from"./MobileAppDrawer-OybL2Okz.js";import"./recharts-d-EnR1VF.js";import"./analytics-YTm4e0V2.js";import"./plaid-D86kekqV.js";import"./dnd-BKb14efZ.js";import"./stripe-DMRn4zHo.js";import"./lottie-DunuFFva.js";import"./lexical-Dhe13gAE.js";import"./pdf-pb-ViLbf.js";import"./utils-CU50wlH3.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="1f07fc1d-9a72-4dbf-96c3-d712bb218c7c",t._sentryDebugIdIdentifier="sentry-dbid-1f07fc1d-9a72-4dbf-96c3-d712bb218c7c")}catch{}})();const fa=ka.div`
1
+ import{j as k}from"./liveblocks-CQd3J_Jz.js";import{a as m}from"./sentry-BO53Tmje.js";import{j,h as N,u as R,g as G,l as $,k as v}from"./core-CHx9v1R3.js";import{K,z as O,i as U,s as q,x as M,c as _,e as z,cA as V,v as f,q as W}from"./index-_YbuoSTd.js";import{eM as Q,Pl as L,Fp as y,Pm as w,Ph as H,EQ as S,Pn as J,EU as I,Et as X,Fq as b,Po as B,gy as Y,Ff as Z,Fk as aa,F7 as ta,F5 as ea,Fl as sa,F2 as oa,Pp as na,Pq as ia,Pr as la,Ps as u,eh as ra,Pt as ca,Pu as pa}from"./zeni-epic-state-T7UkKQQw.js";import{n as ka}from"./mui-B5MJXy46.js";import{u as ua}from"./useAskAiCfoHostNavButtonProps-BndHsfWo.js";import{c as da}from"./useFetchSuggestedQuestionsWhenReady-B8UnhkhU.js";import{M as ma}from"./MobileAppDrawer-gMG7WLxC.js";import"./recharts-nKX4-UUs.js";import"./analytics-DuZD1FBf.js";import"./plaid-CcgrQve1.js";import"./dnd-Ci4anwe2.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dnly7PBz.js";import"./lexical-DQpmcVQ9.js";import"./pdf-DYwn2DuC.js";import"./utils-DpJstXha.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new t.Error().stack;e&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[e]="8dcb5408-291d-490c-8b6e-20fa7db86cb8",t._sentryDebugIdIdentifier="sentry-dbid-8dcb5408-291d-490c-8b6e-20fa7db86cb8")}catch{}})();const fa=ka.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -6,4 +6,4 @@ import{j as k}from"./liveblocks-BGrTvYCQ.js";import{a as m}from"./sentry-B-sG2Ci
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${t=>t.theme.colors.grey4};
9
- `,Ta=v(function(t,e){const o=w(t,e.isTaskTemplatesEnabled),{taskGroupId:i}=e,n=i!=null&&i!==""?{...o,taskGroupsWithTasksList:o.taskGroupsWithTasksList.map(l=>({...l,tasks:l.tasks.filter(r=>r.taskGroupIds.includes(i))})).filter(l=>l.tasks.length>0)}:o;return{taskListView:n,tagListView:H(t),localData:n.localData,isTaskTemplatesEnabled:e.isTaskTemplatesEnabled}},function(t,e){const{navigate:o,currentTenant:i,location:n,isTaskTemplatesEnabled:l}=e,{tenantEmailDomain:r}=i,{groupByKey:T}=e.uiState;return{onTaskManagementRowClick:a=>{const s=ga(r,a),p=f(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:p}})},onReloadTasks:()=>{t(y(!0,l))},onNewTaskClick:()=>{if(e.localData.defaultTaskGroupId!=null){const a=C(r,e.localData.defaultTaskGroupId),s=f(n.state?.pathnameStackToGoBack,n.pathname);o(a,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(a,s)=>{t(B({uiState:{sortKey:a,sortOrder:s}}))},onFiltersChange:a=>{t(la({filters:a}))},onSearchTextChanged:a=>{t(ia({searchText:a}))},onReloadCards:()=>{t(y(!0,l))},onBackClick:()=>{if(n.state?.message==="triggerBackClick"){const a=W(n.state?.pathnameStackToGoBack),s=a.poppedPathname??"../";o(s,{state:{pathnameStackToGoBack:a.newStack}})}else o("../")},updateLocalData:a=>{t(na({localData:a}))},resetLocalData:()=>{t(L({taskGroupById:e.taskGroupState.taskGroupById}))},handleCreateGroup:a=>{t(oa(e.localData.newTaskGroupName,a))},assignGroupToTasks:a=>{t(ea(e.localData.selectedTaskIds,a,sa(e.uiState.groupByKey,a)))},onDeleteTaskGroup:a=>{t(ta(a))},onAddNewTaskToTaskGroup:a=>{if(e.localData.defaultTaskGroupId!=null){const s=ha(T,a);t(S({taskDetailLocalData:s}));const p=C(r,e.uiState.groupByKey==="groupName"?a:e.localData.defaultTaskGroupId),g=f(n.state?.pathnameStackToGoBack,n.pathname);o(p,{state:{pathnameStackToGoBack:g,message:"comingFromTaskListPage"}})}},onDragNDrop:(a,s)=>{t(aa(e.localData.selectedTaskIds.length>0?e.localData.selectedTaskIds:[a],s))},onTaskGroupRename:(a,s)=>{t(Z(a,s))},onTimeSpentUpdate:(a,s)=>{t(b({task:a,updates:s}))},onShowToast:a=>{t(Y(a))},onGroupByFilterChange:a=>{t(B({uiState:{groupByKey:a}}))},updateTask:(a,s)=>{t(b({task:a,updates:s}))},onCreateTagClick:(a,s)=>{t(X(a,s))},handleGroupTemplateClick:a=>{t(I(a,[]))},handleGroupTemplateTaskClick:(a,s)=>{t(I(a,[s]))},handleNewTaskInitialization:a=>{if(t(S({taskDetailLocalData:{...J,name:a}})),e.localData.defaultTaskGroupId!=null){const s=C(r,e.localData.defaultTaskGroupId),p=f(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:p,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:a=>{o(`/${r}/tasks/group/${a}`)}}})(V);function $a(){const{isAiCfoOpen:t,setIsAiCfoOpen:e}=K(),o=j(),i=N(),n=R(),l=O.getSignedInUser(),r=G(c=>Q(c)),{taskGroupId:T}=$(),{useFeatureGate:a}=U(),{isFeatureEnabled:s}=a(q.isTaskTemplatesEnabled),[p,g]=m.useState(!1),[E,F]=m.useState(!1),h=G(c=>w(c,s)),D=G(c=>c.taskGroupState),d=h.fetchState,{isAiCfoAccessEnabled:P,onAskAiCfoClick:A}=ua({isAiCfoOpen:t,setIsAiCfoOpen:e,mobileExploreReferrer:"Task Checklist"});if(da({isDataReady:d==="Completed"}),m.useEffect(()=>{p||(g(!0),i(y(!1,s)))},[p,i]),m.useEffect(()=>{d==="Completed"&&i(L({taskGroupById:D.taskGroupById}))},[d,D.taskGroupById]),l==null)throw Error("Can't access task list page without signing in...");return k.jsxs(k.Fragment,{children:[d==="Completed"?k.jsx(M,{analytics:_,onLoad:c=>(x=>x.trackPageLoaded(z.Event.taskListPage))(c)}):null,k.jsxs(fa,{children:[k.jsx(ma,{isAppContentDrawerOpen:E,handleDrawerToggle:c=>{F(c)}}),k.jsx(Ta,{location:n,navigate:o,currentTenant:r,taskGroupId:T,taskGroupState:D,localData:h.localData,uiState:h.uiState,isTaskTemplatesEnabled:s,taskListFetchState:d,isAiCfoAccessEnabled:P,onAskAiCfoClick:A})]})]})}const ga=(t,e)=>`/${t}/tasks/${encodeURIComponent(e)}`,C=(t,e)=>`/${t}/tasks/new/${e}`,ha=(t,e)=>{if(t==="assignee"){const o=e.split(",");return{...u.taskDetailLocalData,assignee:o}}if(t==="priority"){const o=ra(e);return{...u.taskDetailLocalData,priority:o}}if(t==="status"){const o=ca(e);return{...u.taskDetailLocalData,status:o}}if(t==="tag"){const o=e.split(",");return{...u.taskDetailLocalData,tagIds:o}}if(t==="dueDate"){const o=pa(e);return{...u.taskDetailLocalData,dueDate:o}}return{...u.taskDetailLocalData}};export{$a as default};
9
+ `,Ta=v(function(t,e){const o=L(t,e.isTaskTemplatesEnabled),{taskGroupId:i}=e,n=i!=null&&i!==""?{...o,taskGroupsWithTasksList:o.taskGroupsWithTasksList.map(l=>({...l,tasks:l.tasks.filter(r=>r.taskGroupIds.includes(i))})).filter(l=>l.tasks.length>0)}:o;return{taskListView:n,tagListView:H(t),localData:n.localData,isTaskTemplatesEnabled:e.isTaskTemplatesEnabled}},function(t,e){const{navigate:o,currentTenant:i,location:n,isTaskTemplatesEnabled:l}=e,{tenantEmailDomain:r}=i,{groupByKey:T}=e.uiState;return{onTaskManagementRowClick:a=>{const s=ga(r,a),p=f(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:p}})},onReloadTasks:()=>{t(y(!0,l))},onNewTaskClick:()=>{if(e.localData.defaultTaskGroupId!=null){const a=C(r,e.localData.defaultTaskGroupId),s=f(n.state?.pathnameStackToGoBack,n.pathname);o(a,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(a,s)=>{t(B({uiState:{sortKey:a,sortOrder:s}}))},onFiltersChange:a=>{t(la({filters:a}))},onSearchTextChanged:a=>{t(ia({searchText:a}))},onReloadCards:()=>{t(y(!0,l))},onBackClick:()=>{if(n.state?.message==="triggerBackClick"){const a=W(n.state?.pathnameStackToGoBack),s=a.poppedPathname??"../";o(s,{state:{pathnameStackToGoBack:a.newStack}})}else o("../")},updateLocalData:a=>{t(na({localData:a}))},resetLocalData:()=>{t(w({taskGroupById:e.taskGroupState.taskGroupById}))},handleCreateGroup:a=>{t(oa(e.localData.newTaskGroupName,a))},assignGroupToTasks:a=>{t(ea(e.localData.selectedTaskIds,a,sa(e.uiState.groupByKey,a)))},onDeleteTaskGroup:a=>{t(ta(a))},onAddNewTaskToTaskGroup:a=>{if(e.localData.defaultTaskGroupId!=null){const s=ha(T,a);t(S({taskDetailLocalData:s}));const p=C(r,e.uiState.groupByKey==="groupName"?a:e.localData.defaultTaskGroupId),g=f(n.state?.pathnameStackToGoBack,n.pathname);o(p,{state:{pathnameStackToGoBack:g,message:"comingFromTaskListPage"}})}},onDragNDrop:(a,s)=>{t(aa(e.localData.selectedTaskIds.length>0?e.localData.selectedTaskIds:[a],s))},onTaskGroupRename:(a,s)=>{t(Z(a,s))},onTimeSpentUpdate:(a,s)=>{t(b({task:a,updates:s}))},onShowToast:a=>{t(Y(a))},onGroupByFilterChange:a=>{t(B({uiState:{groupByKey:a}}))},updateTask:(a,s)=>{t(b({task:a,updates:s}))},onCreateTagClick:(a,s)=>{t(X(a,s))},handleGroupTemplateClick:a=>{t(I(a,[]))},handleGroupTemplateTaskClick:(a,s)=>{t(I(a,[s]))},handleNewTaskInitialization:a=>{if(t(S({taskDetailLocalData:{...J,name:a}})),e.localData.defaultTaskGroupId!=null){const s=C(r,e.localData.defaultTaskGroupId),p=f(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:p,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:a=>{o(`/${r}/tasks/group/${a}`)}}})(V);function $a(){const{isAiCfoOpen:t,setIsAiCfoOpen:e}=K(),o=j(),i=N(),n=R(),l=O.getSignedInUser(),r=G(c=>Q(c)),{taskGroupId:T}=$(),{useFeatureGate:a}=U(),{isFeatureEnabled:s}=a(q.isTaskTemplatesEnabled),[p,g]=m.useState(!1),[E,F]=m.useState(!1),h=G(c=>L(c,s)),D=G(c=>c.taskGroupState),d=h.fetchState,{isAiCfoAccessEnabled:P,onAskAiCfoClick:A}=ua({isAiCfoOpen:t,setIsAiCfoOpen:e,mobileExploreReferrer:"Task Checklist"});if(da({isDataReady:d==="Completed"}),m.useEffect(()=>{p||(g(!0),i(y(!1,s)))},[p,i]),m.useEffect(()=>{d==="Completed"&&i(w({taskGroupById:D.taskGroupById}))},[d,D.taskGroupById]),l==null)throw Error("Can't access task list page without signing in...");return k.jsxs(k.Fragment,{children:[d==="Completed"?k.jsx(M,{analytics:_,onLoad:c=>(x=>x.trackPageLoaded(z.Event.taskListPage))(c)}):null,k.jsxs(fa,{children:[k.jsx(ma,{isAppContentDrawerOpen:E,handleDrawerToggle:c=>{F(c)}}),k.jsx(Ta,{location:n,navigate:o,currentTenant:r,taskGroupId:T,taskGroupState:D,localData:h.localData,uiState:h.uiState,isTaskTemplatesEnabled:s,taskListFetchState:d,isAiCfoAccessEnabled:P,onAskAiCfoClick:A})]})]})}const ga=(t,e)=>`/${t}/tasks/${encodeURIComponent(e)}`,C=(t,e)=>`/${t}/tasks/new/${e}`,ha=(t,e)=>{if(t==="assignee"){const o=e.split(",");return{...u.taskDetailLocalData,assignee:o}}if(t==="priority"){const o=ra(e);return{...u.taskDetailLocalData,priority:o}}if(t==="status"){const o=ca(e);return{...u.taskDetailLocalData,status:o}}if(t==="tag"){const o=e.split(",");return{...u.taskDetailLocalData,tagIds:o}}if(t==="dueDate"){const o=pa(e);return{...u.taskDetailLocalData,dueDate:o}}return{...u.taskDetailLocalData}};export{$a as default};
@@ -0,0 +1,9 @@
1
+ import{j as s}from"./liveblocks-CQd3J_Jz.js";import M from"./NotFoundScreen-DKiPvQrK.js";import{a as p}from"./sentry-BO53Tmje.js";import{j as A,h as R,u as $,l as q,g as f,N as z,k as V,n as _,o as u}from"./core-CHx9v1R3.js";import{Y as O,z as E,v as w,x as Q,c as T,e as W,cz as H,j as Y,ao as Z,q as J}from"./index-_YbuoSTd.js";import{eM as C,Ph as G,EM as v,EA as K,Fc as X,Pi as P,Pj as aa,Ew as ea,Et as ta,pB as sa,pp as na,jW as oa,EG as ia,Pk as ra,ED as ca,ER as la,EQ as da}from"./zeni-epic-state-T7UkKQQw.js";import{n as pa}from"./mui-B5MJXy46.js";import{u as ma}from"./useInitialThreadRequest-DORcYYgp.js";import{M as ua}from"./MobileAppDrawer-gMG7WLxC.js";import ka from"./TaskListScreen-C090Vv7j.js";import"./recharts-nKX4-UUs.js";import"./analytics-DuZD1FBf.js";import"./plaid-CcgrQve1.js";import"./dnd-Ci4anwe2.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dnly7PBz.js";import"./lexical-DQpmcVQ9.js";import"./pdf-DYwn2DuC.js";import"./utils-DpJstXha.js";import"./useAskAiCfoHostNavButtonProps-BndHsfWo.js";import"./useFetchSuggestedQuestionsWhenReady-B8UnhkhU.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="a81b46db-cdc1-4f72-b6bc-8a6436215b30",a._sentryDebugIdIdentifier="sentry-dbid-a81b46db-cdc1-4f72-b6bc-8a6436215b30")}catch{}})();const fa=V(function(a,t){const{location:n,taskGroupId:c}=t,d=P(a,t.taskId),l=C(a),i=c!=null?aa(a.taskGroupState,c):void 0,m=E.getSignedInUser(),e=l.tenantId,r={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:e??""},k=G(a);return{taskDetailSelectorView:d,authParams:r,isNewClicked:n.state?.message==="comingFromTaskListPage",filesEndPoint:Z.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${Y.appUrl}${t.location.pathname}`,tagListView:k,taskGroupName:c!=null&&i!=null&&i.isDefault===!1?i.name:void 0}},function(a,t){const{taskId:n,navigate:c,currentTenant:d,location:l,taskGroupId:i}=t,{tenantEmailDomain:m}=d;return{onSaveChangesToLocalStore:e=>{a(da({taskDetailLocalData:e,taskId:n}))},onSaveDetailClick:()=>{a(la(n,i))},onArchiveTaskClick:()=>{t.taskId!=null&&a(ca(t.taskId))},onDismissClick:()=>{if(l.state?.message==="triggerBackClick"){const e=J(l.state?.pathnameStackToGoBack),r=e.poppedPathname??"../../dashboard";c(r,{state:{pathnameStackToGoBack:e.newStack}})}else{const e=B(m),r=w(l.state?.pathnameStackToGoBack,l.pathname);c(e,{state:{pathnameStackToGoBack:r}})}a(ra({taskId:n}))},onDeleteTaskClick:()=>{a(ia(n))},updateFilesEntity:e=>{a(oa({files:e}))},onDeleteFile:e=>{a(na(e))},onEditFileName:(e,r)=>{a(sa(e,r.split(".")[0]))},onReloadTaskDetailPage:()=>{a(v(!1,n))},onCreateTagClick:e=>{a(ta(e,n))},onDeleteTagClick:e=>{a(ea(e,n))}}})(H);function I(){const a=A(),t=R(),n=$(),c=O(),{taskId:d,taskGroupId:l}=q(),i=f(o=>C(o)),m=ma(i?.companyId),[e,r]=p.useState(!1),[k,F]=p.useState(!1),[S,L]=p.useState(!1),[x,N]=p.useState(!1),b=f(o=>G(o)),j=f(o=>o.taskGroupViewState.fetchState);p.useEffect(()=>{k||(F(!0),t(v(!1,d)))},[k,t]),p.useEffect(()=>{S||b.fetchState==="Completed"||(L(!0),t(K()))},[S,t,b.fetchState]),p.useEffect(()=>{x||j==="Completed"||(N(!0),t(X()))},[x,t,j]);const y=f(o=>P(o,d)),g=y.fetchState,D=E.getSignedInUser();if(D==null)throw Error("Can't access task detail page without signing in...");if(g==="Error"&&y.error?.code===400){const{tenantEmailDomain:o}=i,h=B(o),U=w(n.state?.pathnameStackToGoBack,n.pathname);return s.jsx(z,{to:h,state:{pathnameStackToGoBack:U}})}return s.jsxs(s.Fragment,{children:[g==="Completed"?s.jsx(Q,{analytics:T,onLoad:o=>(h=>h.trackPageLoaded(W.Event.taskDetailPage))(o)}):null,s.jsxs(ga,{children:[s.jsx(ua,{isAppContentDrawerOpen:e,handleDrawerToggle:o=>{r(o)}}),s.jsx(fa,{analytics:T,currentTenant:i,handleZeniLogoClick:()=>{c.toggle()},initialOpenThreadRequest:m,location:n,loggedInUser:D,navigate:a,taskGroupId:l,taskId:d,taskDetailFetchState:g})]})]})}const ga=pa.div`
2
+ display: flex;
3
+ min-height: 100%;
4
+ width: 100%;
5
+ flex: 1 1 auto;
6
+ flex-direction: column;
7
+ align-items: center;
8
+ background-color: ${a=>a.theme.colors.grey4};
9
+ `,B=a=>`/${a}/tasks`;function Aa(){return s.jsxs(_,{children:[s.jsx(u,{path:"/new",element:s.jsx(I,{})}),s.jsx(u,{path:"/new/:taskGroupId",element:s.jsx(I,{})}),s.jsx(u,{path:"/group/:taskGroupId",element:s.jsx(ka,{})}),s.jsx(u,{path:"/:taskId",element:s.jsx(I,{})}),s.jsx(u,{path:"*",element:s.jsx(M,{})})]})}export{Aa as default};
@@ -0,0 +1 @@
1
+ import{j as t}from"./liveblocks-CQd3J_Jz.js";import i from"./NotFoundScreen-DKiPvQrK.js";import{T as r}from"./TransactionDetailScreen-B_ny21sj.js";import"./sentry-BO53Tmje.js";import{n as d,o as e}from"./core-CHx9v1R3.js";import"./zeni-epic-state-T7UkKQQw.js";import"./recharts-nKX4-UUs.js";import"./index-_YbuoSTd.js";import"./mui-B5MJXy46.js";import"./analytics-DuZD1FBf.js";import"./plaid-CcgrQve1.js";import"./dnd-Ci4anwe2.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dnly7PBz.js";import"./lexical-DQpmcVQ9.js";import"./pdf-DYwn2DuC.js";import"./utils-DpJstXha.js";import"./useAskAiCfoHostNavButtonProps-BndHsfWo.js";import"./useFetchSuggestedQuestionsWhenReady-B8UnhkhU.js";import"./decodeURIComponentSafe-IyDHJK_-.js";import"./routePaths-abbP8AF2.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new o.Error().stack;n&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[n]="256f287b-7a3d-4d6d-890e-a8cb9db8b86d",o._sentryDebugIdIdentifier="sentry-dbid-256f287b-7a3d-4d6d-890e-a8cb9db8b86d")}catch{}})();function q(){return t.jsxs(d,{children:[t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(e,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(e,{path:"/*",element:t.jsx(r,{})})]})}export{q as default};
@@ -1,4 +1,4 @@
1
- import{j as I}from"./liveblocks-BGrTvYCQ.js";import{a as d}from"./sentry-B-sG2CiU.js";import{h as G,g as S,u as re,j as le,l as de,N as Ge,k as je}from"./core-cQ_UGuA8.js";import{bm as $e,eM as W,cM as ue,bu as me,pg as H,Jo as B,Kp as pe,Kq as Y,JO as he,jx as fe,Kr as ge,JT as Q,JU as X,km as Se,Gw as Z,Ji as _,jr as Te,jp as ye,jB as Me,Ks as Je,Kt as qe,t5 as K,jw as ve,FT as Ce,cS as We,cT as He,Ku as Ye,Jh as Qe,Kv as Xe,t9 as Ze,Kw as ea,Kx as aa,Ky as ta,Kz as na,KA as oa,jA as sa,KB as ia,KC as ca,Jj as ra,KD as la,KE as da,KF as ua,FN as ma,FB as pa,G3 as ha,jC as fa,Gx as ie,FK as ga}from"./zeni-epic-state-BObvmHAZ.js";import{z as Ee,i as ee,s as V,aI as De,h as Sa,J as Ta,aJ as ya,C as va,q as J,S as Ca,aK as Ea,v as q,K as Da,d as be,aL as ba,ao as Ia,T as M}from"./index-DaFoFUBf.js";import{n as ka,S as Aa,D as Ua}from"./mui-bgnk9Y8D.js";import{u as xa}from"./useAskAiCfoHostNavButtonProps-AwLPsx7n.js";import{c as _a}from"./useFetchSuggestedQuestionsWhenReady-wonFIDms.js";import{d as Ie}from"./decodeURIComponentSafe-CzQtaU9d.js";import{h as ke,g as Va,d as Fa,b as wa}from"./routePaths-Dbo9mbXz.js";import{t as Ba}from"./utils-CU50wlH3.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="55881877-1851-4bff-958c-6e254ceb967e",a._sentryDebugIdIdentifier="sentry-dbid-55881877-1851-4bff-958c-6e254ceb967e")}catch{}})();const ae=()=>{const a=Ee.getSignedInUser(),{useFeatureGate:e}=ee(),{isFeatureEnabled:s}=e(V.isChainOfThoughtEnabled);return d.useMemo(()=>$e(a)&&s,[a,s])};function Ae(a){if(a!=null){if("customer"in a&&a.customer!=null){const{customer:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in a&&a.vendor!=null){const{vendor:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Za(a,e){const s=G(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=S(u=>W(u)),i=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),l=o.userRole!=null&&ue(o.userRole),g=o.userRole!=null&&me(o.userRole),{isFeatureEnabled:T}=t(V.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:b}=t(V.isExpenseAutomationEnabled),{configValue:h}=n(De.enableUncategorizedExpenseCategory),f=h?.uncategorized_expense_category_enabled===!0,k=ae(),y=d.useMemo(()=>({id:a,type:H(e)}),[a,e]),m=S(u=>B(u,y)),D=S(u=>{const N=B(u,y)?.transactionDetailLocalData.vendorUpdates?.id;return N==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[N]?.saveStatus.fetchState??"Not-Started"}),p=d.useMemo(()=>m?.fetchState==="Completed"?Ae(m?.transaction):void 0,[m?.fetchState,m?.transaction]),C=S(u=>{if(p!=null)return pe(u.customerIncomeState,u.vendorExpenseState,u.trendState,p,"month")}),A=S(u=>Y(u)),F=S(u=>{if(p!=null)return he(u.trendWithTransactionsState,p,"TransactionDetail")}),j=o.company?.companyInfo.firstMonthOfFY??1,$=S(u=>fe(u.accountState,u.accountListState,"accountList")),[P,w]=d.useState(!1),[L,v]=d.useState(!1),[c,O]=d.useState(!1);d.useEffect(()=>{w(!1),v(!1),O(!1)},[a,e]);const E=d.useCallback(()=>{w(!1),v(!1)},[]),[U,x]=d.useState(!1),z=F?.selectedPeriod?.timePeriod;return d.useEffect(()=>{c||m==null||m.transaction==null||(s(ge({id:m.transaction.id,type:m.transaction.type})),O(!0)),p!=null&&(!i||l&&g===!1)&&(P?L||C==null||(v(!0),s(Z(p,"TransactionDetail",{timeframe:"month",timePeriod:z??C}))):(s(Q()),s(X()),w(!0),s(Se(p))))},[s,c,m?.fetchState,m?.transaction,p,i,l,g,P,L,C,z]),d.useEffect(()=>{A.newVendorState?.vendorDetailLocalData?.vendorName!=null?x(!0):x(!1)},[A.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{s(_("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:g,isVendorBulkUpdateOnTransactionEnabled:T,isExpenseAutomationEnabled:b,isUncategorizedExpenseCategoryEnabled:f,isChainOfThoughtEnabled:k,selectedTransaction:y,transactionDetail:m,vendorSaveStatus:D,tranEntity:p,defaultTrendTransactionTimePeriod:C,vendorViewDetails:A,uiState:F,firstMonthOfFY:j,uncategorizedAccounts:$,resetTrendIsFetchedStates:E,isCreateVendorDrawerOpen:U,setIsCreateVendorDrawerOpen:x}}const Pa={overlayWidth:new va(100,100,58)},La=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=Sa(),i=Ta(),l=G(),g=S(h=>Y(h)),T=()=>{t()},b={vendorDetailView:n??g,onSaveSuccess:()=>{l(ye()),l(Me("Not-Started")),s()},onSaveVendor:e,onCancelClick:T,saveVendorDetailLocalData:h=>{l(Te({vendorId:void 0,localData:h}))}};return I.jsx(Ua,{anchor:"right",open:a,PaperProps:{style:{width:Pa.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:T,children:I.jsx(Oa,{onClick:h=>h.stopPropagation(),children:I.jsx(ya,{...b})})})},Oa=ka(Aa)`
1
+ import{j as I}from"./liveblocks-CQd3J_Jz.js";import{a as d}from"./sentry-BO53Tmje.js";import{h as G,g as S,u as re,j as le,l as de,N as Ge,k as je}from"./core-CHx9v1R3.js";import{bm as $e,eM as W,cM as ue,bu as me,pg as H,Jo as B,Kp as pe,Kq as Y,JO as he,jx as fe,Kr as ge,JT as Q,JU as X,km as Se,Gw as Z,Ji as _,jr as Te,jp as ye,jB as Me,Ks as Je,Kt as qe,t5 as K,jw as ve,FT as Ce,cS as We,cT as He,Ku as Ye,Jh as Qe,Kv as Xe,t9 as Ze,Kw as ea,Kx as aa,Ky as ta,Kz as na,KA as oa,jA as sa,KB as ia,KC as ca,Jj as ra,KD as la,KE as da,KF as ua,FN as ma,FB as pa,G3 as ha,jC as fa,Gx as ie,FK as ga}from"./zeni-epic-state-T7UkKQQw.js";import{z as Ee,i as ee,s as V,aI as De,h as Sa,J as Ta,aJ as ya,C as va,q as J,S as Ca,aK as Ea,v as q,K as Da,c as be,aL as ba,ao as Ia,T as M}from"./index-_YbuoSTd.js";import{n as ka,S as Aa,D as Ua}from"./mui-B5MJXy46.js";import{u as xa}from"./useAskAiCfoHostNavButtonProps-BndHsfWo.js";import{c as _a}from"./useFetchSuggestedQuestionsWhenReady-B8UnhkhU.js";import{d as Ie}from"./decodeURIComponentSafe-IyDHJK_-.js";import{h as ke,g as Va,d as Fa,b as wa}from"./routePaths-abbP8AF2.js";import{t as Ba}from"./utils-DpJstXha.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="ce08912d-607b-4883-906c-c96312c2679e",a._sentryDebugIdIdentifier="sentry-dbid-ce08912d-607b-4883-906c-c96312c2679e")}catch{}})();const ae=()=>{const a=Ee.getSignedInUser(),{useFeatureGate:e}=ee(),{isFeatureEnabled:s}=e(V.isChainOfThoughtEnabled);return d.useMemo(()=>$e(a)&&s,[a,s])};function Ae(a){if(a!=null){if("customer"in a&&a.customer!=null){const{customer:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in a&&a.vendor!=null){const{vendor:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function Za(a,e){const s=G(),{useFeatureGate:t,useDynamicConfig:n}=ee(),o=S(u=>W(u)),i=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),l=o.userRole!=null&&ue(o.userRole),g=o.userRole!=null&&me(o.userRole),{isFeatureEnabled:T}=t(V.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:b}=t(V.isExpenseAutomationEnabled),{configValue:h}=n(De.enableUncategorizedExpenseCategory),f=h?.uncategorized_expense_category_enabled===!0,k=ae(),y=d.useMemo(()=>({id:a,type:H(e)}),[a,e]),m=S(u=>B(u,y)),D=S(u=>{const N=B(u,y)?.transactionDetailLocalData.vendorUpdates?.id;return N==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[N]?.saveStatus.fetchState??"Not-Started"}),p=d.useMemo(()=>m?.fetchState==="Completed"?Ae(m?.transaction):void 0,[m?.fetchState,m?.transaction]),C=S(u=>{if(p!=null)return pe(u.customerIncomeState,u.vendorExpenseState,u.trendState,p,"month")}),A=S(u=>Y(u)),F=S(u=>{if(p!=null)return he(u.trendWithTransactionsState,p,"TransactionDetail")}),j=o.company?.companyInfo.firstMonthOfFY??1,$=S(u=>fe(u.accountState,u.accountListState,"accountList")),[P,w]=d.useState(!1),[L,v]=d.useState(!1),[c,O]=d.useState(!1);d.useEffect(()=>{w(!1),v(!1),O(!1)},[a,e]);const E=d.useCallback(()=>{w(!1),v(!1)},[]),[U,x]=d.useState(!1),z=F?.selectedPeriod?.timePeriod;return d.useEffect(()=>{c||m==null||m.transaction==null||(s(ge({id:m.transaction.id,type:m.transaction.type})),O(!0)),p!=null&&(!i||l&&g===!1)&&(P?L||C==null||(v(!0),s(Z(p,"TransactionDetail",{timeframe:"month",timePeriod:z??C}))):(s(Q()),s(X()),w(!0),s(Se(p))))},[s,c,m?.fetchState,m?.transaction,p,i,l,g,P,L,C,z]),d.useEffect(()=>{A.newVendorState?.vendorDetailLocalData?.vendorName!=null?x(!0):x(!1)},[A.newVendorState?.vendorDetailLocalData?.vendorName]),d.useEffect(()=>()=>{s(_("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:g,isVendorBulkUpdateOnTransactionEnabled:T,isExpenseAutomationEnabled:b,isUncategorizedExpenseCategoryEnabled:f,isChainOfThoughtEnabled:k,selectedTransaction:y,transactionDetail:m,vendorSaveStatus:D,tranEntity:p,defaultTrendTransactionTimePeriod:C,vendorViewDetails:A,uiState:F,firstMonthOfFY:j,uncategorizedAccounts:$,resetTrendIsFetchedStates:E,isCreateVendorDrawerOpen:U,setIsCreateVendorDrawerOpen:x}}const Pa={overlayWidth:new va(100,100,58)},La=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=Sa(),i=Ta(),l=G(),g=S(h=>Y(h)),T=()=>{t()},b={vendorDetailView:n??g,onSaveSuccess:()=>{l(ye()),l(Me("Not-Started")),s()},onSaveVendor:e,onCancelClick:T,saveVendorDetailLocalData:h=>{l(Te({vendorId:void 0,localData:h}))}};return I.jsx(Ua,{anchor:"right",open:a,PaperProps:{style:{width:Pa.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:T,children:I.jsx(Oa,{onClick:h=>h.stopPropagation(),children:I.jsx(ya,{...b})})})},Oa=ka(Aa)`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  flex-direction: column;
@@ -1 +1 @@
1
- import{j as i}from"./liveblocks-BGrTvYCQ.js";import{j as q,u as w,h as U,l as Q,g as L,N as z,k as H,n as Ae,o as v}from"./core-cQ_UGuA8.js";import{eM as R,iL as T,NM as W,Gn as ue,bp as ie,NN as he,jm as Z,JQ as K,NO as se,NP as Se,bB as x,Gk as me,NQ as ke,NR as re,NS as Ie,NT as pe,NU as be,NV as ve,NW as de,HA as Ye,bm as xe}from"./zeni-epic-state-BObvmHAZ.js";import{D as X,d as B,c2 as ee,v as _,q as te,i as fe,s as J,M as Pe,z as Ee}from"./index-DaFoFUBf.js";import"./mui-bgnk9Y8D.js";import{a as A}from"./sentry-B-sG2CiU.js";import{w as ae}from"./withTransactionSidePanel-08bnc7py.js";import{p as ne,b as ce}from"./routePaths-Dbo9mbXz.js";import{u as Le}from"./utils-CU50wlH3.js";import{d as E}from"./decodeURIComponentSafe-CzQtaU9d.js";import{Z as je}from"./ZeniAccountStatementScreen-Dk4AqWUx.js";import"./recharts-d-EnR1VF.js";import"./analytics-YTm4e0V2.js";import"./plaid-D86kekqV.js";import"./dnd-BKb14efZ.js";import"./stripe-DMRn4zHo.js";import"./lottie-DunuFFva.js";import"./lexical-Dhe13gAE.js";import"./pdf-pb-ViLbf.js";import"./useAskAiCfoHostNavButtonProps-AwLPsx7n.js";import"./useFetchSuggestedQuestionsWhenReady-wonFIDms.js";import"./TransactionDetailScreen-DxmS5vev.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="b17f73dc-5f73-4155-ab65-7352a17f223f",a._sentryDebugIdIdentifier="sentry-dbid-b17f73dc-5f73-4155-ab65-7352a17f223f")}catch{}})();const G=a=>Le(a),Ce=H(function(a,e){const t=he(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,G(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:K(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:Z(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=X.getLocalizedStrings(),r=G(e.selectedAccount.tranListType),s=Be(t,n,c,r,e.bookCloseDate);B.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(se({uiState:{dateRange:s},type:G(e.selectedAccount.tranListType)})),a(ue(r,T(s),!1,r==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(T(s))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(se({uiState:{scrollYOffset:t},type:G(e.selectedAccount.tranListType)}))}}})(ee),F=ae(function({...a}){const e=q(),t=w(),n=U(),c=t.pathname.substring(t.pathname.lastIndexOf("/")+1),{tenantEmailDomain:o}=Q(),r=X.getLocalizedStrings(),{accountType:s,title:u,subTitle:h}=Me(c),D="month",g=L(p=>R(p)),Y=g.company?.companyInfo.firstMonthOfFY??1,{dataAvailable:y,initialTimeframeTick:S}=ze(c,Y,g.bookCloseDate),[k,j]=A.useState(!1),[C,P]=A.useState(void 0),m=A.useMemo(()=>{const p=T(S);return{tranListType:c,accountType:W(s),title:u,subTitle:h,timeframe:D,period:p}},[c,D,s,y]);A.useEffect(()=>{if(!k&&m!=null){j(!0),B.trackTransactionList(void 0,void 0,void 0,m.title);const p=G(m.tranListType);n(ue(p,m.period,!0,p==="missingReceipts"?r.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[k,m,n]);let I=m;return m!=null&&C!=null&&(I={...m,period:C}),I==null?i.jsx(z,{to:"../"}):i.jsx(Ce,{firstMonthOfFY:Y,tenantEmailDomain:o,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:y,navigate:e,selectedAccount:I,referrerType:c,bookCloseDate:g.bookCloseDate,onSelectedTimePeriodChange:p=>P(p),...a})}),Me=a=>{let e="",t="",n="";const c=X.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=c.uncategorizedTransactionList.income.title,n=c.uncategorizedTransactionList.income.subTitle;break;case"uncategorized-expense":e="expenses",t=c.uncategorizedTransactionList.expense.title,n=c.uncategorizedTransactionList.expense.subTitle;break;case"miscategorized-expense":e="expenses",t=c.miscategorizedTransactionList.expense.title,n=c.miscategorizedTransactionList.expense.subTitle;break;case"miscategorized-income":e="income",t=c.miscategorizedTransactionList.income.title,n=c.miscategorizedTransactionList.income.subTitle;break;case"missing-receipts":t=c.uncategorizedTransactionList.missingReceipt.title,n=c.uncategorizedTransactionList.missingReceipt.subTitle}return{accountType:e,title:t,subTitle:n}},ze=(a,e,t)=>{const n=ie();let c=ie().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:ne(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Be=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Oe=H(function(a,e){const t=ke(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:K(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:Z(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Te();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),B.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(me(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ee),Fe=ae(function({referrerType:a,...e}){const t=q(),n=w(),c=U(),{tenantEmailDomain:o,accountTypeEncoded:r,accountIdEncoded:s,classIdEncoded:u,timeframe:h,startDate:D,endDate:g,titleEncoded:Y}=Q(),y=E(r??""),S=E(s??""),k=E(u??""),j=E(Y??""),C=L(f=>Se(f.transactionListState,S,y,k)),[P,m]=A.useState(!1),[I,p]=A.useState(void 0),N=L(f=>R(f)),$=N.company?.companyInfo.firstMonthOfFY??1;let d;const l=Ge(y,S,k,h,D,g,j);if(l){const f={startDate:x(D,"YYYY-MM-DD"),endDate:x(g,"YYYY-MM-DD")},V=Ne(C?.dateRange,f);d={accountId:S,accountType:W(y),classId:k,title:j,timeframe:h,period:V}}A.useEffect(()=>{P||d==null||(m(!0),B.trackTransactionList(d.accountId,void 0,a,d.title),c(me(d.accountId,d.accountType,d.classId,d.period)))},[P,d,c]);let M=d;d!=null&&I!=null&&(M={...d,period:I});const O=[r,s,u,h,D,g,Y].filter(f=>f!=null);return l&&M!=null?i.jsx(Oe,{firstMonthOfFY:$,tenantEmailDomain:o,location:n,navigate:t,selectedAccount:M,referrerType:a,onSelectedTimePeriodChange:f=>p(f),...e}):i.jsx(z,{to:Te(O.length)})}),Te=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ge=(a,e,t,n,c,o,r)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&x(c,"YYYY-MM-DD").isValid()&&x(o,"YYYY-MM-DD").isValid()&&r!=null,Ne=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),_e=H(function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&ve(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:K(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:Z(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??De();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),B.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(pe(e.selectedAccount.accountId,e.selectedAccount.accountType,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=$e(e.tenantEmailDomain),n=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ee),le=ae(function({referrerType:a,...e}){const t=q(),n=w(),c=U(),{tenantEmailDomain:o,accountTypeEncoded:r,accountIdEncoded:s,timeframe:u,startDate:h,endDate:D,titleEncoded:g,excludeSubAccounts:Y}=Q(),y=E(r??""),S=E(s??""),k=E(g??""),j=!(Y!=null&&Y==="exclude_subaccounts"),C=L(b=>Ie(b.transactionListState,S,y)),[P,m]=A.useState(!1),[I,p]=A.useState(void 0),N=L(b=>R(b)),$=N.company?.featuresActivationInfo.connectedAccountProvider==="unit",d=N.company?.companyInfo.firstMonthOfFY??1;let l;const M=we(y,S,u,h,D,k);if(M){const b={startDate:x(h,"YYYY-MM-DD"),endDate:x(D,"YYYY-MM-DD")},ye=Re(C?.dateRange,b);l={accountId:S,accountType:W(y),title:k,timeframe:u,period:ye}}let O=l;l!=null&&I!=null&&(O={...l,period:I});const{useFeatureGate:f}=fe(),{isFeatureEnabled:V}=f(J.isTransactionCommentingEnabled),{areTenantIdsInSync:oe}=Pe();A.useEffect(()=>{!P&&l!=null&&oe&&(m(!0),B.trackTransactionList(l.accountId,void 0,a,l.title),c(pe(l.accountId,l.accountType,l.period,void 0,!1,j)))},[P,l,c,oe]);const ge=[r,s,u,h,D,g].filter(b=>b!=null);return M&&O!=null?i.jsx(_e,{firstMonthOfFY:d,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:$,isTransactionCommentingEnabled:V,selectedAccount:O,referrerType:a,onSelectedTimePeriodChange:b=>p(b),...e}):i.jsx(z,{to:De(ge.length)})}),De=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},we=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&x(n,"YYYY-MM-DD").isValid()&&x(c,"YYYY-MM-DD").isValid()&&o!=null,Re=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),$e=a=>`/${a}/transactions/${Ye}/statements`;function mt(){const a=w().state?.referrer,e=Ee.getSignedInUser(),t=xe(e),{useFeatureGate:n}=fe(),{isFeatureEnabled:c}=n(J.isExpenseAutomationEnabled),o=L(u=>u.expenseAutomationViewState.selectedPeriodByTenantId)[L(u=>R(u)).tenantId],{isFeatureEnabled:r}=n(J.isExpenseAutomationEnabledV2),s=r||c&&t;return i.jsxs(Ae,{children:[i.jsx(v,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:i.jsx(le,{referrerType:a})}),i.jsx(v,{path:"/zeni-clearing-account/statements",element:i.jsx(je,{})}),i.jsx(v,{path:"/*",element:i.jsx(le,{referrerType:a})}),i.jsx(v,{path:"/uncategorized-income/*",element:i.jsx(F,{})}),i.jsx(v,{path:"/uncategorized-expense/*",element:s?i.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(F,{})}),i.jsx(v,{path:"/miscategorized-income/*",element:i.jsx(F,{})}),i.jsx(v,{path:"/miscategorized-expense/*",element:s?i.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(F,{})}),i.jsx(v,{path:"/missing-receipts/*",element:s?i.jsx(z,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):i.jsx(F,{})}),i.jsx(v,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:i.jsx(Fe,{referrerType:a})})]})}export{mt as default};
1
+ import{j as i}from"./liveblocks-CQd3J_Jz.js";import{j as q,u as w,h as U,l as Q,g as L,N as B,k as H,n as Ae,o as v}from"./core-CHx9v1R3.js";import{eM as R,iL as T,NM as W,Gn as ue,bp as ie,NN as he,jm as Z,JQ as K,NO as se,NP as Se,bB as x,Gk as me,NQ as ke,NR as re,NS as Ie,NT as pe,NU as be,NV as ve,NW as de,HA as Ye,bm as xe}from"./zeni-epic-state-T7UkKQQw.js";import{D as X,c as C,c2 as ee,v as _,q as te,i as fe,s as J,N as Pe,z as Ee}from"./index-_YbuoSTd.js";import"./mui-B5MJXy46.js";import{a as A}from"./sentry-BO53Tmje.js";import{w as ae}from"./withTransactionSidePanel-Bvasj9MO.js";import{p as ne,b as ce}from"./routePaths-abbP8AF2.js";import{u as Le}from"./utils-DpJstXha.js";import{d as E}from"./decodeURIComponentSafe-IyDHJK_-.js";import{Z as je}from"./ZeniAccountStatementScreen-CVRPKBLf.js";import"./recharts-nKX4-UUs.js";import"./analytics-DuZD1FBf.js";import"./plaid-CcgrQve1.js";import"./dnd-Ci4anwe2.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dnly7PBz.js";import"./lexical-DQpmcVQ9.js";import"./pdf-DYwn2DuC.js";import"./useAskAiCfoHostNavButtonProps-BndHsfWo.js";import"./useFetchSuggestedQuestionsWhenReady-B8UnhkhU.js";import"./TransactionDetailScreen-B_ny21sj.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="fc4604e0-b2fa-4432-997d-9c4a9f5f06fc",a._sentryDebugIdIdentifier="sentry-dbid-fc4604e0-b2fa-4432-997d-9c4a9f5f06fc")}catch{}})();const G=a=>Le(a),Me=H(function(a,e){const t=he(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,G(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:K(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:Z(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=X.getLocalizedStrings(),r=G(e.selectedAccount.tranListType),s=Ce(t,n,c,r,e.bookCloseDate);C.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(se({uiState:{dateRange:s},type:G(e.selectedAccount.tranListType)})),a(ue(r,T(s),!1,r==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(T(s))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(se({uiState:{scrollYOffset:t},type:G(e.selectedAccount.tranListType)}))}}})(ee),F=ae(function({...a}){const e=q(),t=w(),n=U(),c=t.pathname.substring(t.pathname.lastIndexOf("/")+1),{tenantEmailDomain:o}=Q(),r=X.getLocalizedStrings(),{accountType:s,title:u,subTitle:h}=ze(c),D="month",g=L(p=>R(p)),Y=g.company?.companyInfo.firstMonthOfFY??1,{dataAvailable:y,initialTimeframeTick:S}=Be(c,Y,g.bookCloseDate),[k,j]=A.useState(!1),[M,P]=A.useState(void 0),m=A.useMemo(()=>{const p=T(S);return{tranListType:c,accountType:W(s),title:u,subTitle:h,timeframe:D,period:p}},[c,D,s,y]);A.useEffect(()=>{if(!k&&m!=null){j(!0),C.trackTransactionList(void 0,void 0,void 0,m.title);const p=G(m.tranListType);n(ue(p,m.period,!0,p==="missingReceipts"?r.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[k,m,n]);let I=m;return m!=null&&M!=null&&(I={...m,period:M}),I==null?i.jsx(B,{to:"../"}):i.jsx(Me,{firstMonthOfFY:Y,tenantEmailDomain:o,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:y,navigate:e,selectedAccount:I,referrerType:c,bookCloseDate:g.bookCloseDate,onSelectedTimePeriodChange:p=>P(p),...a})}),ze=a=>{let e="",t="",n="";const c=X.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=c.uncategorizedTransactionList.income.title,n=c.uncategorizedTransactionList.income.subTitle;break;case"uncategorized-expense":e="expenses",t=c.uncategorizedTransactionList.expense.title,n=c.uncategorizedTransactionList.expense.subTitle;break;case"miscategorized-expense":e="expenses",t=c.miscategorizedTransactionList.expense.title,n=c.miscategorizedTransactionList.expense.subTitle;break;case"miscategorized-income":e="income",t=c.miscategorizedTransactionList.income.title,n=c.miscategorizedTransactionList.income.subTitle;break;case"missing-receipts":t=c.uncategorizedTransactionList.missingReceipt.title,n=c.uncategorizedTransactionList.missingReceipt.subTitle}return{accountType:e,title:t,subTitle:n}},Be=(a,e,t)=>{const n=ie();let c=ie().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:ne(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Ce=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Oe=H(function(a,e){const t=ke(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:K(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:Z(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Te();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),C.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(me(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(re({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ee),Fe=ae(function({referrerType:a,...e}){const t=q(),n=w(),c=U(),{tenantEmailDomain:o,accountTypeEncoded:r,accountIdEncoded:s,classIdEncoded:u,timeframe:h,startDate:D,endDate:g,titleEncoded:Y}=Q(),y=E(r??""),S=E(s??""),k=E(u??""),j=E(Y??""),M=L(f=>Se(f.transactionListState,S,y,k)),[P,m]=A.useState(!1),[I,p]=A.useState(void 0),N=L(f=>R(f)),$=N.company?.companyInfo.firstMonthOfFY??1;let d;const l=Ge(y,S,k,h,D,g,j);if(l){const f={startDate:x(D,"YYYY-MM-DD"),endDate:x(g,"YYYY-MM-DD")},V=Ne(M?.dateRange,f);d={accountId:S,accountType:W(y),classId:k,title:j,timeframe:h,period:V}}A.useEffect(()=>{P||d==null||(m(!0),C.trackTransactionList(d.accountId,void 0,a,d.title),c(me(d.accountId,d.accountType,d.classId,d.period)))},[P,d,c]);let z=d;d!=null&&I!=null&&(z={...d,period:I});const O=[r,s,u,h,D,g,Y].filter(f=>f!=null);return l&&z!=null?i.jsx(Oe,{firstMonthOfFY:$,tenantEmailDomain:o,location:n,navigate:t,selectedAccount:z,referrerType:a,onSelectedTimePeriodChange:f=>p(f),...e}):i.jsx(B,{to:Te(O.length)})}),Te=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ge=(a,e,t,n,c,o,r)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&x(c,"YYYY-MM-DD").isValid()&&x(o,"YYYY-MM-DD").isValid()&&r!=null,Ne=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),_e=H(function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&ve(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:K(e.selectedAccount.period),dataAvailableForPeriod:ne(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:Z(a)}},function(a,e){return{onBackClick:()=>{const t=te(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??De();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),C.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(pe(e.selectedAccount.accountId,e.selectedAccount.accountType,T(o))),e.onSelectedTimePeriodChange(T(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=ce(t,e.tenantEmailDomain),c=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(de({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=$e(e.tenantEmailDomain),n=_(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ee),le=ae(function({referrerType:a,...e}){const t=q(),n=w(),c=U(),{tenantEmailDomain:o,accountTypeEncoded:r,accountIdEncoded:s,timeframe:u,startDate:h,endDate:D,titleEncoded:g,excludeSubAccounts:Y}=Q(),y=E(r??""),S=E(s??""),k=E(g??""),j=!(Y!=null&&Y==="exclude_subaccounts"),M=L(b=>Ie(b.transactionListState,S,y)),[P,m]=A.useState(!1),[I,p]=A.useState(void 0),N=L(b=>R(b)),$=N.company?.featuresActivationInfo.connectedAccountProvider==="unit",d=N.company?.companyInfo.firstMonthOfFY??1;let l;const z=we(y,S,u,h,D,k);if(z){const b={startDate:x(h,"YYYY-MM-DD"),endDate:x(D,"YYYY-MM-DD")},ye=Re(M?.dateRange,b);l={accountId:S,accountType:W(y),title:k,timeframe:u,period:ye}}let O=l;l!=null&&I!=null&&(O={...l,period:I});const{useFeatureGate:f}=fe(),{isFeatureEnabled:V}=f(J.isTransactionCommentingEnabled),{areTenantIdsInSync:oe}=Pe();A.useEffect(()=>{!P&&l!=null&&oe&&(m(!0),C.trackTransactionList(l.accountId,void 0,a,l.title),c(pe(l.accountId,l.accountType,l.period,void 0,!1,j)))},[P,l,c,oe]);const ge=[r,s,u,h,D,g].filter(b=>b!=null);return z&&O!=null?i.jsx(_e,{firstMonthOfFY:d,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:$,isTransactionCommentingEnabled:V,selectedAccount:O,referrerType:a,onSelectedTimePeriodChange:b=>p(b),...e}):i.jsx(B,{to:De(ge.length)})}),De=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},we=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&x(n,"YYYY-MM-DD").isValid()&&x(c,"YYYY-MM-DD").isValid()&&o!=null,Re=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?T(a):T(e),$e=a=>`/${a}/transactions/${Ye}/statements`;function mt(){const a=w().state?.referrer,e=Ee.getSignedInUser(),t=xe(e),{useFeatureGate:n}=fe(),{isFeatureEnabled:c}=n(J.isExpenseAutomationEnabled),o=L(u=>u.expenseAutomationViewState.selectedPeriodByTenantId)[L(u=>R(u)).tenantId],{isFeatureEnabled:r}=n(J.isExpenseAutomationEnabledV2),s=r||c&&t;return i.jsxs(Ae,{children:[i.jsx(v,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:i.jsx(le,{referrerType:a})}),i.jsx(v,{path:"/zeni-clearing-account/statements",element:i.jsx(je,{})}),i.jsx(v,{path:"/*",element:i.jsx(le,{referrerType:a})}),i.jsx(v,{path:"/uncategorized-income/*",element:i.jsx(F,{})}),i.jsx(v,{path:"/uncategorized-expense/*",element:s?i.jsx(B,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(F,{})}),i.jsx(v,{path:"/miscategorized-income/*",element:i.jsx(F,{})}),i.jsx(v,{path:"/miscategorized-expense/*",element:s?i.jsx(B,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):i.jsx(F,{})}),i.jsx(v,{path:"/missing-receipts/*",element:s?i.jsx(B,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):i.jsx(F,{})}),i.jsx(v,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:i.jsx(Fe,{referrerType:a})})]})}export{mt as default};
@@ -1,4 +1,4 @@
1
- import{j as e}from"./liveblocks-BGrTvYCQ.js";import{j as B,u as U,h as M,l as O,g as f,N as F,k as V,n as we,o as k}from"./core-cQ_UGuA8.js";import{ci as N,eM as D,My as P,D3 as ae,fc as H,CN as ne,MA as Ie,D6 as Te,Mw as ke,Mx as se,MO as be,Bd as je,s2 as Ae,MC as Ee,Dh as ve,Mz as re,cL as K,w8 as oe,eR as De,eT as Le,NJ as Fe,NK as Be,CO as Ue,NL as Me,CP as Pe,CY as Re,bu as Oe,bC as Ve,ct as Ne,bD as _e,cN as ze,fb as $e,br as Ge,Ig as Ze,ch as He}from"./zeni-epic-state-BObvmHAZ.js";import{S as _,al as Ke,z as A,w as z,d as b,bX as Je,bY as qe,bZ as Z,J,h as We,M as Ye,K as Qe,i as ie,s as v,C as Xe,B as et,b_ as tt,ao as q,v as at,b$ as nt,q as W,c0 as st,m as Q,c1 as rt,a4 as ot}from"./index-DaFoFUBf.js";import{D as it,n as R,S as ct}from"./mui-bgnk9Y8D.js";import lt from"./NotFoundScreen-D8bJeRt0.js";import{S as X}from"./SetupPagesScreen-CIFtnWYk.js";import{a as d}from"./sentry-B-sG2CiU.js";import{u as ut}from"./useAskAiCfoHostNavButtonProps-AwLPsx7n.js";import{c as dt}from"./useFetchSuggestedQuestionsWhenReady-wonFIDms.js";import{M as ce}from"./MobileAppDrawer-OybL2Okz.js";import{F as pt}from"./FeaturePreviewScreen-DCLqtwXF.js";import{a as ee}from"./analyticsHelper-BG68_Ecq.js";import"./recharts-d-EnR1VF.js";import"./analytics-YTm4e0V2.js";import"./plaid-D86kekqV.js";import"./dnd-BKb14efZ.js";import"./stripe-DMRn4zHo.js";import"./lottie-DunuFFva.js";import"./lexical-Dhe13gAE.js";import"./pdf-pb-ViLbf.js";import"./utils-CU50wlH3.js";import"./routePaths-Dbo9mbXz.js";import"./BusinessVerificationPageScreen-Byg1Uhrv.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]="0bf30ccd-432b-4f69-afb4-4e7b80cd0ffe",t._sentryDebugIdIdentifier="sentry-dbid-0bf30ccd-432b-4f69-afb4-4e7b80cd0ffe")}catch{}})();const mt=V(function(t,a){const{companyId:n}=a;return{treasurySetupView:P(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(Te(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(Ie(r))}}})(Je);function ft(){const t=B(),a=U(),n=M(),{tenantEmailDomain:o}=O(),p=_(),r=f(T=>T.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=Ke(r),s=N(p?.loggedInUserRoleMap),[c,i]=d.useState(!1),[y,I]=d.useState(!1),[u,l]=d.useState(!1),g=f(T=>D(T)),h=A.getSignedInUserTenant(o)?.companyId??g.companyId,x=A.getSignedInUser(),S=f(T=>P(T,h)),w=f(T=>T.treasurySetupViewState.fetchState),C=f(T=>T.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),L=f(T=>T.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(x==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{c||w!=="Not-Started"||h==null||(i(!0),n(ae(h,!0,!1)))},[c,w,h,n]),d.useEffect(()=>{u||L!=="Not-Started"||h==null||(l(!0),n(H()))},[u,L,h,n]),d.useEffect(()=>{y||C!=="Not-Started"||h==null||(I(!0),n(ne()))},[y,C,h,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(F,{to:"../promo"});const E=g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||w!=="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=V(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:be(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:P(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{Z(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{Z(a.analytics,"confirm",r,m,"Transfer"),t(ve())},onSaveChangesToLocalStore:s=>{t(Ee(s))},onFetchLinkTokenClick:s=>{t(Ae("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(qe),gt=({isFirstTransfer:t})=>{const a=B(),{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(C=>C.treasurySetupViewState.fetchState),l=f(C=>C.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),g=f(C=>C.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),h=f(C=>D(C)),x=A.getSignedInUserTenant(n)?.companyId??h.companyId,S=f(C=>ke(C)),w=f(C=>P(C,x));if(A.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||x==null||(s(!0),o(ae(x,!0,!1)))},[m,u,x,o]),d.useEffect(()=>{c||l!=="Not-Started"||x==null||(i(!0),o(H()))},[c,l,x,o]),d.useEffect(()=>{y||g!=="Not-Started"||x==null||(I(!0),o(ne()))},[y,g,x,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:w,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{Z(b,"review",S.treasuryTransferMoneyLocalData,w.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},ht=R.div`
1
+ import{j as e}from"./liveblocks-CQd3J_Jz.js";import{j as B,u as U,h as M,l as O,g as f,N as F,k as N,n as Ie,o as k}from"./core-CHx9v1R3.js";import{ci as V,eM as D,My as P,D3 as ae,fc as H,CN as ne,MA as we,D6 as Te,Mw as ke,Mx as se,MO as be,Bd as je,s2 as Ae,MC as Ee,Dh as ve,Mz as re,cL as K,w8 as oe,eR as De,eT as Le,NJ as Fe,NK as Be,CO as Ue,NL as Me,CP as Pe,CY as Re,bu as Oe,bC as Ne,ct as Ve,bD as _e,cN as ze,fb as $e,br as Ge,Ig as Ze,ch as He}from"./zeni-epic-state-T7UkKQQw.js";import{S as _,al as Ke,z as A,x as z,c as b,bX as Je,bY as qe,bZ as Z,J,h as We,N as Ye,K as Qe,i as ie,s as v,C as Xe,B as et,b_ as tt,ao as q,v as at,b$ as nt,q as W,c0 as st,k as Q,c1 as rt,a4 as ot}from"./index-_YbuoSTd.js";import{D as it,n as R,S as ct}from"./mui-B5MJXy46.js";import lt from"./NotFoundScreen-DKiPvQrK.js";import{S as X}from"./SetupPagesScreen-BanbOOgQ.js";import{a as d}from"./sentry-BO53Tmje.js";import{u as ut}from"./useAskAiCfoHostNavButtonProps-BndHsfWo.js";import{c as dt}from"./useFetchSuggestedQuestionsWhenReady-B8UnhkhU.js";import{M as ce}from"./MobileAppDrawer-gMG7WLxC.js";import{F as pt}from"./FeaturePreviewScreen-BDotwidZ.js";import{a as ee}from"./analyticsHelper-CezXrIid.js";import"./recharts-nKX4-UUs.js";import"./analytics-DuZD1FBf.js";import"./plaid-CcgrQve1.js";import"./dnd-Ci4anwe2.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dnly7PBz.js";import"./lexical-DQpmcVQ9.js";import"./pdf-DYwn2DuC.js";import"./utils-DpJstXha.js";import"./routePaths-abbP8AF2.js";import"./BusinessVerificationPageScreen-Z_-aQI_5.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]="820af529-a024-41be-8eef-e6d52fb8862d",t._sentryDebugIdIdentifier="sentry-dbid-820af529-a024-41be-8eef-e6d52fb8862d")}catch{}})();const mt=N(function(t,a){const{companyId:n}=a;return{treasurySetupView:P(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(Te(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(we(r))}}})(Je);function ft(){const t=B(),a=U(),n=M(),{tenantEmailDomain:o}=O(),p=_(),r=f(T=>T.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=Ke(r),s=V(p?.loggedInUserRoleMap),[c,i]=d.useState(!1),[y,w]=d.useState(!1),[u,l]=d.useState(!1),g=f(T=>D(T)),h=A.getSignedInUserTenant(o)?.companyId??g.companyId,C=A.getSignedInUser(),S=f(T=>P(T,h)),I=f(T=>T.treasurySetupViewState.fetchState),x=f(T=>T.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),L=f(T=>T.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(C==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{c||I!=="Not-Started"||h==null||(i(!0),n(ae(h,!0,!1)))},[c,I,h,n]),d.useEffect(()=>{u||L!=="Not-Started"||h==null||(l(!0),n(H()))},[u,L,h,n]),d.useEffect(()=>{y||x!=="Not-Started"||h==null||(w(!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(F,{to:"../promo"});const E=g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||I!=="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:P(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{Z(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{Z(a.analytics,"confirm",r,m,"Transfer"),t(ve())},onSaveChangesToLocalStore:s=>{t(Ee(s))},onFetchLinkTokenClick:s=>{t(Ae("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(qe),gt=({isFirstTransfer:t})=>{const a=B(),{tenantEmailDomain:n}=O(),o=M(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[c,i]=d.useState(!1),[y,w]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),l=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),g=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),h=f(x=>D(x)),C=A.getSignedInUserTenant(n)?.companyId??h.companyId,S=f(x=>ke(x)),I=f(x=>P(x,C));if(A.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||C==null||(s(!0),o(ae(C,!0,!1)))},[m,u,C,o]),d.useEffect(()=>{c||l!=="Not-Started"||C==null||(i(!0),o(H()))},[c,l,C,o]),d.useEffect(()=>{y||g!=="Not-Started"||C==null||(w(!0),o(ne()))},[y,g,C,o]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:b,onLoad:()=>{}}),e.jsx(yt,{analytics:b,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:h,treasurySetupView:I,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{Z(b,"review",S.treasuryTransferMoneyLocalData,I.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},ht=R.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -6,7 +6,7 @@ import{j as e}from"./liveblocks-BGrTvYCQ.js";import{j as B,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 Xe(100,100,48)},Ct=V(function(t,a){const n=re(t),{companyId:o}=a;return{treasuryDetail:n,treasurySetupView:P(t,o),downloadEndPoint:`${q.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=xt(s):c==="statements"?i=wt(s):c==="taxLetter"?i=It(s):c==="settings"&&(i=Tt(s));const y=at(p.state?.pathnameStackToGoBack,p.pathname);n(i,{state:{pathnameStackToGoBack:y}})},onColumnSortConfigChanged:(c,i)=>{t(Fe({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=B(),p=M(),r=J(),m=We(),s=f(j=>D(j)),{tenantEmailDomain:c}=O(),i=s.companyId??A.getSignedInUserTenant(c)?.companyId,[y,I]=d.useState(!1),u=f(j=>re(j)),l=u.fetchState,g=u.accountSummary?.totalBalance?.amount,h=f(j=>j.treasurySetupViewState.treasuryFundsDetails?.fetchStatus),x=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",S=_(),w=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,C=N(S?.loggedInUserRoleMap),L=K(S?.loggedInUserRoleMap),{areTenantIdsInSync:E}=Ye();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")&&C&&o("./transfer")},[u.transactionsFetchState.fetchState,u.transactions.length]);const T=()=>{o("..")},[le,ue]=d.useState(!1),Y=j=>{ue(j)},{isAiCfoOpen:de,setIsAiCfoOpen:pe}=Qe(),{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),Ce=Le(ye,s);if(Se===!0&&Ce!==!0)return e.jsx(pt,{});if(x){const j=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:T,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:xe=>xe.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:Y}),e.jsx(Ct,{treasuryDetailsView:u,isAutoTransferRuleEnabled:ge,navigate:o,currentTenant:s,location:n,companyId:i,analytics:b,isTreasuryCommentingEnabled:he,handleDrawerToggle:Y,isLoading:j,isAiCfoAccessEnabled:me,onAskAiCfoClick:fe})]})]})}return w&&C?e.jsx(F,{to:"../setup"}):s.companyTreasuryInfo?.info&&!w&&L?e.jsx(F,{to:"../promo",state:n.state}):e.jsx(et,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const xt=t=>`/${t}/treasury/edit-portfolio`,wt=t=>`/${t}/treasury/statements`,It=t=>`/${t}/treasury/tax-letter`,Tt=t=>`/${t}/treasury/setup`,kt=R(ct)`
9
+ `,St={overlayWidth:new Xe(100,100,48)},xt=N(function(t,a){const n=re(t),{companyId:o}=a;return{treasuryDetail:n,treasurySetupView:P(t,o),downloadEndPoint:`${q.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}},function(t,a){const{navigate:n,currentTenant:o,location:p,handleDrawerToggle:r,analytics:m}=a,{tenantEmailDomain:s}=o;return{onSettingsClick:()=>{m.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:c=>{let i="page-not-found";c==="editPortfolio"?i=Ct(s):c==="statements"?i=It(s):c==="taxLetter"?i=wt(s):c==="settings"&&(i=Tt(s));const y=at(p.state?.pathnameStackToGoBack,p.pathname);n(i,{state:{pathnameStackToGoBack:y}})},onColumnSortConfigChanged:(c,i)=>{t(Fe({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=B(),p=M(),r=J(),m=We(),s=f(j=>D(j)),{tenantEmailDomain:c}=O(),i=s.companyId??A.getSignedInUserTenant(c)?.companyId,[y,w]=d.useState(!1),u=f(j=>re(j)),l=u.fetchState,g=u.accountSummary?.totalBalance?.amount,h=f(j=>j.treasurySetupViewState.treasuryFundsDetails?.fetchStatus),C=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",S=_(),I=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=V(S?.loggedInUserRoleMap),L=K(S?.loggedInUserRoleMap),{areTenantIdsInSync:E}=Ye();d.useEffect(()=>{l==="Not-Started"&&!y&&E&&(w(!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 T=()=>{o("..")},[le,ue]=d.useState(!1),Y=j=>{ue(j)},{isAiCfoOpen:de,setIsAiCfoOpen:pe}=Qe(),{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=Le(ye,s);if(Se===!0&&xe!==!0)return e.jsx(pt,{});if(C){const j=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:T,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:St.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:m.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(kt,{onClick:Ce=>Ce.stopPropagation(),children:[t===!0?e.jsx(gt,{isFirstTransfer:u.transactions.length===0||g===0}):null,a===!0?e.jsx(ft,{}):null]})}),e.jsxs(ht,{windowSize:r,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:Y}),e.jsx(xt,{treasuryDetailsView:u,isAutoTransferRuleEnabled:ge,navigate:o,currentTenant:s,location:n,companyId:i,analytics:b,isTreasuryCommentingEnabled:he,handleDrawerToggle:Y,isLoading:j,isAiCfoAccessEnabled:me,onAskAiCfoClick:fe})]})]})}return I&&x?e.jsx(F,{to:"../setup"}):s.companyTreasuryInfo?.info&&!I&&L?e.jsx(F,{to:"../promo",state:n.state}):e.jsx(et,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const Ct=t=>`/${t}/treasury/edit-portfolio`,It=t=>`/${t}/treasury/statements`,wt=t=>`/${t}/treasury/tax-letter`,Tt=t=>`/${t}/treasury/setup`,kt=R(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-BGrTvYCQ.js";import{j as B,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 jt(){const t=B(),a=M(),n=J(),o=U(),p=`${q.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(l=>Be(l));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),a(Ue(!1)))},[r,s.fetchState,a]);const c=A.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=W(o.state?.pathnameStackToGoBack),g=l.poppedPathname??"..";t(g,{state:{pathnameStackToGoBack:l.newStack}})},authParams:y,downloadEndPoint:p})})}const At=R.div`
21
+ `;function jt(){const t=B(),a=M(),n=J(),o=U(),p=`${q.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(l=>Be(l));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),a(Ue(!1)))},[r,s.fetchState,a]);const c=A.getSignedInUser(),i=f(l=>D(l)),y={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:i.tenantId??""},w=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:w,statementListView:s,isLoading:u,onBackClick:()=>{const l=W(o.state?.pathnameStackToGoBack),g=l.poppedPathname??"..";t(g,{state:{pathnameStackToGoBack:l.newStack}})},authParams:y,downloadEndPoint:p})})}const At=R.div`
22
22
  display: flex;
23
23
  height: 100vh;
24
24
  width: 100%;
@@ -26,7 +26,7 @@ import{j as e}from"./liveblocks-BGrTvYCQ.js";import{j as B,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=B(),a=J(),n=U(),o=M(),p=`${q.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(Pe(!1)))},[r,s.fetchState,o]);const c=A.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(At,{windowSize:a,children:e.jsx(st,{currentTenantCompanyName:I,taxLetterListView:s,isLoading:u,onBackClick:()=>{const l=W(n.state?.pathnameStackToGoBack),g=l.poppedPathname??"..";t(g,{state:{pathnameStackToGoBack:l.newStack}})},authParams:y,downloadEndPoint:p})})}const vt=V(function(t,a){const{companyId:n}=a,o=P(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(Re(o))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:p=>{n(p?"..":"../setup",{relative:"path"})}}})(rt),Dt=()=>{const t=B(),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(H()))},[i,n]);const y=A.getSignedInUserTenant(o)?.companyId??m.companyId,I=A.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=N(g?.loggedInUserRoleMap),x=K(g?.loggedInUserRoleMap);if(u&&h)return e.jsx(F,{to:"../../treasury/setup"});if(m.company?.companyTreasuryInfo&&(!u&&h||x)){if(a.state?.message==="activation"){const S=W(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(Q,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:b,onLoad:S=>(w=>w.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(Q,{size:"ExtraLarge",start:!0})})},te=R.div`
29
+ `;function Et(){const t=B(),a=J(),n=U(),o=M(),p=`${q.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(Pe(!1)))},[r,s.fetchState,o]);const c=A.getSignedInUser(),i=f(l=>D(l)),y={userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:i.tenantId??""},w=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(At,{windowSize:a,children:e.jsx(st,{currentTenantCompanyName:w,taxLetterListView:s,isLoading:u,onBackClick:()=>{const l=W(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=P(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(Re(o))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:p=>{n(p?"..":"../setup",{relative:"path"})}}})(rt),Dt=()=>{const t=B(),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(H()))},[i,n]);const y=A.getSignedInUserTenant(o)?.companyId??m.companyId,w=A.getSignedInUser(),u=!!m.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,l=S=>{r(S)};if(w==null)throw Error("Can't access treasury promo page without signing in...");const g=_(),h=V(g?.loggedInUserRoleMap),C=K(g?.loggedInUserRoleMap);if(u&&h)return e.jsx(F,{to:"../../treasury/setup"});if(m.company?.companyTreasuryInfo&&(!u&&h||C)){if(a.state?.message==="activation"){const S=W(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(Q,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:b,onLoad:S=>(I=>I.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(Q,{size:"ExtraLarge",start:!0})})},te=R.div`
30
30
  display: flex;
31
31
  width: 100%;
32
32
  height: 100%;
@@ -34,4 +34,4 @@ import{j as e}from"./liveblocks-BGrTvYCQ.js";import{j as B,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=K(r?.loggedInUserRoleMap),s=a?.userRole!=null&&Oe(a?.userRole),c=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Ve(r?.loggedInUserRoleMap),i=Ne(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&&N(r?.loggedInUserRoleMap),{isFeatureEnabled:h}=n(v.isChargeCardFeatureEnabled),{isFeatureEnabled:x}=n(v.isDebitCardFeatureEnabled),S=ot(a,h,x)&&!s&&Ge(r?.loggedInUserRoleMap),w=Ze(r?.loggedInUserRoleMap),C=He(r?.loggedInUserRoleMap),L=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified";return e.jsxs(we,{children:[C?null:e.jsx(k,{path:"setup",element:e.jsx(X,{isBillPayAdminLevelAccess:c,isReimbursementAdminLevelAccess:y,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:g,isUserHasOnlyCardAccess:w,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),C?null:e.jsx(k,{path:"verification",element:e.jsx(X,{isBillPayAdminLevelAccess:c,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:y,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:g,isUserHasOnlyCardAccess:w,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(Dt,{})}),e.jsx(k,{path:"statements",element:e.jsx(jt,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(Et,{})}),L?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(F,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&m?e.jsx(k,{path:"*",element:e.jsx(F,{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=K(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:w}=n(v.isDepositAccountsFeatureEnabled),u=w&&!s&&ze(r?.loggedInUserRoleMap),l=a.company!=null&&$e(a.company),g=o&&l===!0&&!s&&V(r?.loggedInUserRoleMap),{isFeatureEnabled:h}=n(v.isChargeCardFeatureEnabled),{isFeatureEnabled:C}=n(v.isDebitCardFeatureEnabled),S=ot(a,h,C)&&!s&&Ge(r?.loggedInUserRoleMap),I=Ze(r?.loggedInUserRoleMap),x=He(r?.loggedInUserRoleMap),L=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified";return e.jsxs(Ie,{children:[x?null:e.jsx(k,{path:"setup",element:e.jsx(X,{isBillPayAdminLevelAccess:c,isReimbursementAdminLevelAccess:y,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:g,isUserHasOnlyCardAccess:I,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),x?null:e.jsx(k,{path:"verification",element:e.jsx(X,{isBillPayAdminLevelAccess:c,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:y,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:g,isUserHasOnlyCardAccess:I,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(Dt,{})}),e.jsx(k,{path:"statements",element:e.jsx(jt,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(Et,{})}),L?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(F,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&m?e.jsx(k,{path:"*",element:e.jsx(F,{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-BGrTvYCQ.js";import{a as g}from"./sentry-B-sG2CiU.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-cQ_UGuA8.js";import{eM as O,Je as Ie,Jf as Ue,fK as ee,co as be,cp as ke,uJ as ft,Jg as st,uN as Yt,Hr as te,jm as ae,uH as qt,uB as Ht,Jh as Ne,ut as Wt,us as Qt,um as Zt,uy as Xt,uO as ea,Ji as pe,Jj as Me,uu as ta,Jk as he,eY as gt,v1 as vt,uW as xt,Jl as Tt,nO as Ct,uR as yt,uP as Dt,Jm as Et,v8 as It,v5 as bt,uS as kt,v7 as Ge,FT as wt,Jn as aa,Jo as na,cr as sa,Jp as oa,Jq as la,Jr as me,Js as ce,Jt as we,Hs as $e,vn as ye,Hq as De,va as At,uK as Ke,Ju as ia,Ht as W,Jv as ze,uE as ca,Jw as da,Jx as ra,Jy as Ye,Jz as qe,JA as He,JB as We,vh as Ae,JC as jt,u_ as Ft,JD as ua,JE as pa,JF as ha,JG as ma,JH as Sa,JI as fa,JJ as ga,JK as va,se as xa,sf as Ta,Gx as Fe,JL as Ca,JM as ya,iL as Pe,bp as Da,JN as Ea,JO as Ia,kk as ba,kt as ka,Gw as _e,bB as ot,JP as Pt,Gc as _t,JQ as wa,JR as Aa,JS as ja,kv as Fa,JT as lt,JU as it,JV as ct,JW as dt,JX as Pa,kr as _a,JY as Va,ku as La,JZ as Oa,J_ as Vt,GT as Lt,jK as Ba,J$ as Ja,K0 as Ve,K1 as Ot,GR as Bt,xA as Ra,K2 as Ua,K3 as Na,k2 as Jt,K4 as Ma,K5 as Ga,H3 as $a,pW as Ka,K6 as Rt,K7 as rt,H0 as Le,K8 as ut,K9 as za,H5 as Ya,Ka as qa,Kb as Ha,Kc as Wa,Kd as Qa,Ke as Za,pZ as Xa,Kf as en,Hu as tn,Kg as an,GK as Oe,gt as nn,Kh as sn,Ki as on,gr as ln,Kj as cn,Kk as dn,xE as rn,Kl as un,Km as pn,Kn as hn,Ko as mn,jO as Sn,bm as fn,eT as gn,eR as vn}from"./zeni-epic-state-BObvmHAZ.js";import{z as R,al as Be,B as Ut,w as Z,d as P,T as X,ar as xn,v as N,D as Ee,G as de,as as Qe,at as Tn,au as Cn,q as Ze,av as yn,h as Dn,J as re,C as Xe,i as ne,s as z,aw as En,k as et,K as Se,ax as In,ay as Nt,M as bn,az as kn,S as wn,aA as An,ao as Mt,aB as jn,o as Q,A as Fn,F as Gt,H as Pn,aC as _n,aD as Vn,f as tt,aE as Ln,aF as On,Q as Bn,aG as Jn,aH as Rn}from"./index-DaFoFUBf.js";import{n as U,D as Un,S as $t}from"./mui-bgnk9Y8D.js";import{t as Nn,A as Mn}from"./AddressScreen-BMB6Kbyt.js";import ie from"./NotFoundScreen-D8bJeRt0.js";import{F as Gn}from"./FeaturePreviewScreen-DCLqtwXF.js";import{b as H,v as at,c as $n}from"./routePaths-Dbo9mbXz.js";import{p as Kt}from"./pathToGoBack-CrwnkzZo.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-AwLPsx7n.js";import{c as ge}from"./useFetchSuggestedQuestionsWhenReady-wonFIDms.js";import{M as ve}from"./MobileAppDrawer-OybL2Okz.js";import{D as Kn}from"./DrawerScreen-CjKjzVJ3.js";import{g as zn,m as Yn}from"./accountMappingHelper-BIF_cEGy.js";import"./recharts-d-EnR1VF.js";import"./analytics-YTm4e0V2.js";import"./plaid-D86kekqV.js";import"./dnd-BKb14efZ.js";import"./stripe-DMRn4zHo.js";import"./lottie-DunuFFva.js";import"./lexical-Dhe13gAE.js";import"./pdf-pb-ViLbf.js";import"./utils-CU50wlH3.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]="ebdba1e8-2874-4904-8fe6-a7ca0762514d",e._sentryDebugIdIdentifier="sentry-dbid-ebdba1e8-2874-4904-8fe6-a7ca0762514d")}catch{}})();const qn=Ee.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=Ie(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-CQd3J_Jz.js";import{a as g}from"./sentry-BO53Tmje.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-CHx9v1R3.js";import{eM as O,Je as Ie,Jf as Ue,fK as ee,co as be,cp as ke,uJ as ft,Jg as st,uN as Yt,Hr as te,jm as ae,uH as qt,uB as Ht,Jh as Ne,ut as Wt,us as Qt,um as Zt,uy as Xt,uO as ea,Ji as pe,Jj as Me,uu as ta,Jk as he,eY as gt,v1 as vt,uW as xt,Jl as Tt,nO as Ct,uR as yt,uP as Dt,Jm as Et,v8 as It,v5 as bt,uS as kt,v7 as Ge,FT as wt,Jn as aa,Jo as na,cr as sa,Jp as oa,Jq as la,Jr as me,Js as ce,Jt as we,Hs as $e,vn as ye,Hq as De,va as At,uK as Ke,Ju as ia,Ht as W,Jv as ze,uE as ca,Jw as da,Jx as ra,Jy as Ye,Jz as qe,JA as He,JB as We,vh as Ae,JC as jt,u_ as Ft,JD as ua,JE as pa,JF as ha,JG as ma,JH as Sa,JI as fa,JJ as ga,JK as va,se as xa,sf as Ta,Gx as Fe,JL as Ca,JM as ya,iL as Pe,bp as Da,JN as Ea,JO as Ia,kk as ba,kt as ka,Gw as _e,bB as ot,JP as Pt,Gc as _t,JQ as wa,JR as Aa,JS as ja,kv as Fa,JT as lt,JU as it,JV as ct,JW as dt,JX as Pa,kr as _a,JY as Va,ku as La,JZ as Oa,J_ as Vt,GT as Lt,jK as Ba,J$ as Ja,K0 as Ve,K1 as Ot,GR as Bt,xA as Ra,K2 as Ua,K3 as Na,k2 as Jt,K4 as Ma,K5 as Ga,H3 as $a,pW as Ka,K6 as Rt,K7 as rt,H0 as Le,K8 as ut,K9 as za,H5 as Ya,Ka as qa,Kb as Ha,Kc as Wa,Kd as Qa,Ke as Za,pZ as Xa,Kf as en,Hu as tn,Kg as an,GK as Oe,gt as nn,Kh as sn,Ki as on,gr as ln,Kj as cn,Kk as dn,xE as rn,Kl as un,Km as pn,Kn as hn,Ko as mn,jO as Sn,bm as fn,eT as gn,eR as vn}from"./zeni-epic-state-T7UkKQQw.js";import{z as R,al as Be,B as Ut,x as Z,c as P,T as X,ar as xn,v as N,D as Ee,Y as de,as as Qe,at as Tn,au as Cn,q as Ze,av as yn,h as Dn,J as re,C as Xe,i as ne,s as z,aw as En,j as et,K as Se,ax as In,ay as Nt,N as bn,az as kn,S as wn,aA as An,ao as Mt,aB as jn,o as Q,y as Fn,F as Gt,G as Pn,aC as _n,aD as Vn,e as tt,aE as Ln,aF as On,p as Bn,aG as Jn,aH as Rn}from"./index-_YbuoSTd.js";import{n as U,D as Un,S as $t}from"./mui-B5MJXy46.js";import{t as Nn,A as Mn}from"./AddressScreen-fg6k52x4.js";import ie from"./NotFoundScreen-DKiPvQrK.js";import{F as Gn}from"./FeaturePreviewScreen-BDotwidZ.js";import{b as H,v as at,c as $n}from"./routePaths-abbP8AF2.js";import{p as Kt}from"./pathToGoBack-eAzzRDV4.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-BndHsfWo.js";import{c as ge}from"./useFetchSuggestedQuestionsWhenReady-B8UnhkhU.js";import{M as ve}from"./MobileAppDrawer-gMG7WLxC.js";import{D as Kn}from"./DrawerScreen-CPuMvDg7.js";import{g as zn,m as Yn}from"./accountMappingHelper-DUJwjv4V.js";import"./recharts-nKX4-UUs.js";import"./analytics-DuZD1FBf.js";import"./plaid-CcgrQve1.js";import"./dnd-Ci4anwe2.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dnly7PBz.js";import"./lexical-DQpmcVQ9.js";import"./pdf-DYwn2DuC.js";import"./utils-DpJstXha.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]="fadc4c23-3f29-48d2-84e4-0e4c419e8dae",e._sentryDebugIdIdentifier="sentry-dbid-fadc4c23-3f29-48d2-84e4-0e4c419e8dae")}catch{}})();const qn=Ee.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=Ie(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-CQd3J_Jz.js";import{a as f}from"./sentry-BO53Tmje.js";import{q as u,h,g as y,N as I}from"./core-CHx9v1R3.js";import{IA as b,eN as w,yV as x}from"./zeni-epic-state-T7UkKQQw.js";import{z as l,B as j,F as S,G as D}from"./index-_YbuoSTd.js";import{n as g}from"./mui-B5MJXy46.js";import"./recharts-nKX4-UUs.js";import"./analytics-DuZD1FBf.js";import"./plaid-CcgrQve1.js";import"./dnd-Ci4anwe2.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dnly7PBz.js";import"./lexical-DQpmcVQ9.js";import"./pdf-DYwn2DuC.js";import"./utils-DpJstXha.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]="a7811e14-dbaa-4f91-be87-7fe9525ed585",e._sentryDebugIdIdentifier="sentry-dbid-a7811e14-dbaa-4f91-be87-7fe9525ed585")}catch{}})();const R=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",p=e.get("profileId")??"",[n,m]=f.useState(!1),a=h(),i=y(c=>b(c)),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||(m(!0),a(x(t,p,s)))},[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:i.error?.message??""})}):(i.fetchState==="Completed"&&window.close(),o.jsx(j,{fetchState:"In-Progress"}))},E=g.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
+ `,_=g(D.LargeRegular)`
10
+ display: flex;
11
+ color: ${S.important};
12
+ `;export{R as default};
@@ -1,4 +1,4 @@
1
- import{j as n}from"./liveblocks-BGrTvYCQ.js";import{j as W,u as J,h as U,l as G,g as k,k as Y,N as te,n as _e,o as x}from"./core-cQ_UGuA8.js";import{eM as M,No as Ve,Np as $e,cN as ae,ci as Ze,fb as Ge,w6 as He,Aj as We,w0 as Pn,Nq as Tn,Nr as Bn,w3 as On,wa as xe,vZ as Fn,vW as Rn,Mb as ue,Ns as Ln,DD as Un,Jh as Mn,DF as zn,k3 as Be,Nt as Nn,pB as Je,pp as Ye,jW as Ke,jZ as Oe,Ji as Fe,Jj as _n,Nu as Vn,jY as $n,kj as Zn,jN as Gn,ij as Hn,ii as Wn,Nv as Jn,Nw as we,Dk as Yn,Nx as Kn,Ny as qn,M4 as De,Nz as Re,NA as Qn,DQ as Xn,MO as et,Bd as qe,s2 as Qe,NB as nt,DN as tt,NC as Xe,cJ as Ae,DU as en,fc as at,eR as nn,eT as Ie,DS as ot,B7 as st,DK as it,ND as tn,NE as an,Dm as on,Dw as Le,NF as rt,Dq as ct,NG as lt,MD as dt,DV as ut,bu as pt,bC as mt,ct as ht,bD as gt,br as ft,Ig as yt}from"./zeni-epic-state-BObvmHAZ.js";import{S as oe,i as $,z as D,s as E,h as R,B as se,bL as Ct,T as Se,J as V,C as K,q as sn,al as xt,aa as Ue,d as F,bM as wt,ao as be,bN as kt,w as pe,bO as Dt,f as je,aI as H,bP as At,M as It,K as rn,a7 as St,bQ as Me,bR as bt,v as ne,bS as jt,bT as vt,bU as Et,bV as Pt,a4 as Tt,o as Bt}from"./index-DaFoFUBf.js";import{n as L,D as q,S as Q}from"./mui-bgnk9Y8D.js";import de from"./NotFoundScreen-D8bJeRt0.js";import{S as ze}from"./SetupPagesScreen-CIFtnWYk.js";import{F as cn}from"./FeaturePreviewScreen-DCLqtwXF.js";import{a as p}from"./sentry-B-sG2CiU.js";import{M as me}from"./MobileAppDrawer-OybL2Okz.js";import{A as Ot,D as Ft,V as Rt}from"./DomesticWireDetailScreen-CDLset95.js";import{A as Lt}from"./AddressScreen-BMB6Kbyt.js";import{u as ln}from"./useAskAiCfoHostNavButtonProps-AwLPsx7n.js";import{c as dn}from"./useFetchSuggestedQuestionsWhenReady-wonFIDms.js";import{Z as Ut}from"./ZeniAccountStatementScreen-Dk4AqWUx.js";import"./recharts-d-EnR1VF.js";import"./analytics-YTm4e0V2.js";import"./plaid-D86kekqV.js";import"./dnd-BKb14efZ.js";import"./stripe-DMRn4zHo.js";import"./lottie-DunuFFva.js";import"./lexical-Dhe13gAE.js";import"./pdf-pb-ViLbf.js";import"./utils-CU50wlH3.js";import"./analyticsHelper-BG68_Ecq.js";import"./routePaths-Dbo9mbXz.js";import"./BusinessVerificationPageScreen-Byg1Uhrv.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]="4cb82109-3da7-4b89-9af8-6292101a4ce4",e._sentryDebugIdIdentifier="sentry-dbid-4cb82109-3da7-4b89-9af8-6292101a4ce4")}catch{}})();const Mt=L.div`
1
+ import{j as n}from"./liveblocks-CQd3J_Jz.js";import{j as W,u as J,h as U,l as G,g as w,k as Y,N as te,n as _e,o as x}from"./core-CHx9v1R3.js";import{eM as M,No as Ve,Np as $e,cN as ae,ci as Ze,fb as Ge,w6 as He,Aj as We,w0 as Pn,Nq as Tn,Nr as Bn,w3 as On,wa as xe,vZ as Fn,vW as Rn,Mb as ue,Ns as Ln,DD as Un,Jh as Mn,DF as zn,k3 as Be,Nt as Nn,pB as Je,pp as Ye,jW as Ke,jZ as Oe,Ji as Fe,Jj as _n,Nu as Vn,jY as $n,kj as Zn,jN as Gn,ij as Hn,ii as Wn,Nv as Jn,Nw as ke,Dk as Yn,Nx as Kn,Ny as qn,M4 as De,Nz as Re,NA as Qn,DQ as Xn,MO as et,Bd as qe,s2 as Qe,NB as nt,DN as tt,NC as Xe,cJ as Ae,DU as en,fc as at,eR as nn,eT as Ie,DS as ot,B7 as st,DK as it,ND as tn,NE as an,Dm as on,Dw as Le,NF as rt,Dq as ct,NG as lt,MD as dt,DV as ut,bu as pt,bC as mt,ct as ft,bD as ht,br as gt,Ig as yt}from"./zeni-epic-state-T7UkKQQw.js";import{S as oe,i as $,z as D,s as E,h as R,B as se,bL as Ct,T as Se,J as V,C as K,q as sn,al as xt,aa as Ue,c as F,bM as kt,ao as be,bN as wt,x as pe,bO as Dt,e as je,aI as H,bP as At,N as It,K as rn,a7 as St,bQ as Me,bR as bt,v as ne,bS as jt,bT as vt,bU as Et,bV as Pt,a4 as Tt,o as Bt}from"./index-_YbuoSTd.js";import{n as L,D as q,S as Q}from"./mui-B5MJXy46.js";import de from"./NotFoundScreen-DKiPvQrK.js";import{S as ze}from"./SetupPagesScreen-BanbOOgQ.js";import{F as cn}from"./FeaturePreviewScreen-BDotwidZ.js";import{a as p}from"./sentry-BO53Tmje.js";import{M as me}from"./MobileAppDrawer-gMG7WLxC.js";import{A as Ot,D as Ft,V as Rt}from"./DomesticWireDetailScreen-BknvyqFc.js";import{A as Lt}from"./AddressScreen-fg6k52x4.js";import{u as ln}from"./useAskAiCfoHostNavButtonProps-BndHsfWo.js";import{c as dn}from"./useFetchSuggestedQuestionsWhenReady-B8UnhkhU.js";import{Z as Ut}from"./ZeniAccountStatementScreen-CVRPKBLf.js";import"./recharts-nKX4-UUs.js";import"./analytics-DuZD1FBf.js";import"./plaid-CcgrQve1.js";import"./dnd-Ci4anwe2.js";import"./stripe-DMRn4zHo.js";import"./lottie-Dnly7PBz.js";import"./lexical-DQpmcVQ9.js";import"./pdf-DYwn2DuC.js";import"./utils-DpJstXha.js";import"./analyticsHelper-CezXrIid.js";import"./routePaths-abbP8AF2.js";import"./BusinessVerificationPageScreen-Z_-aQI_5.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]="73607659-c5fa-4bef-a03e-bf385dd75fd1",e._sentryDebugIdIdentifier="sentry-dbid-73607659-c5fa-4bef-a03e-bf385dd75fd1")}catch{}})();const Mt=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-BGrTvYCQ.js";import{j as W,u as J,h as U,l as G,
6
6
  flex-direction: column;
7
7
  align-items: center;
8
8
  background-color: ${e=>e.theme.colors.grey4};
9
- `,zt=Y(function(e){return{autoTransferRuleView:Ve(e),downloadAccountDetailEndPoint:`${Se}/account_details`,transferLimit:5e5,depositAccountListView:We(e.depositAccountState,e.depositAccountListState)}},function(e,t){const{navigate:s,handleDrawerToggle:a}=t;return{onBackClick:()=>{s("..")},onClickMenuIcon:()=>{a(!0)},onFetchAutoTransferRules:o=>{e(He(o))},onCreateRule:()=>{e(Rn())},onUpdateRule:o=>{e(xe(o))},onDeleteClick:o=>{e(Fn(o))},onPauseClick:o=>{e(xe(o,!0,!1))},onResumeClick:o=>{e(xe(o,!1,!0))},onActivityClick:(o,i)=>{e(On(o,i))},onUpdateRuleLocalData:o=>{e(Bn(o))},clearRuleLocalData:()=>{e(Tn())},onEditClick:o=>{s(`./${o}/edit`)},onEditDrawerClose:()=>{s("../../",{relative:"path"})},onReviewClick:()=>{e(Pn())}}})(Ct);function Ne({isEditDrawerOpen:e}){const t=W(),s=J(),a=U(),o=oe(),{ruleId:i,tenantEmailDomain:l}=G(),{useFeatureGate:c}=$(),[d,m]=p.useState(!1),[C,r]=p.useState(!1),u=k(w=>M(w)),g=k(w=>Ve(w)),h=g?.fetchState??"Not-Started",S=k(w=>$e(w)),f=u?.companyId??D.getSignedInUserTenant(l)?.companyId,b=ae(o?.loggedInUserRoleMap)||Ze(o?.loggedInUserRoleMap),{isFeatureEnabled:A}=c(E.isTreasuryEnabled),y=u?.company!=null&&Ge(u.company),I=A&&y,P=D.getSignedInUser(),T=u.tenantId,B={userId:P?.userId??"",sessionId:P?.zeniSessionId??"",tenantId:T??""};p.useEffect(()=>{!C&&h==="Not-Started"&&f&&(r(!0),a(He(!0)))},[C,h,f,a]);const j=w=>{m(w)},O=R();return g?.fetchState!=="Completed"?n.jsx(se,{fetchState:"In-Progress",style:{backgroundColor:O.colors.grey5}}):n.jsxs(Mt,{children:[n.jsx(me,{isAppContentDrawerOpen:d,handleDrawerToggle:j}),n.jsx(zt,{navigate:t,location:s,currentTenant:u,handleDrawerToggle:j,isEditDrawerOpen:e,editingRuleId:i,authParams:B,includeTreasuryOption:I,hasAdminLevelAccess:b,zeniAccountsConfigDetail:S})]})}const Nt={overlayWidth:new K(100,100,58)},_t=({vendorId:e,isDrawerOpen:t,closeDrawerHandler:s})=>{const a=U(),o=R(),i=V();if(D.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(q,{onClose:()=>{s(!0),a(ue())},anchor:"right",open:t,PaperProps:{style:{width:Nt.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Vt,{onClick:l=>l.stopPropagation(),children:n.jsx(Ot,{vendorIdParam:e,accountContext:"express-pay"})})})},Vt=L(Q)`
9
+ `,zt=Y(function(e){return{autoTransferRuleView:Ve(e),downloadAccountDetailEndPoint:`${Se}/account_details`,transferLimit:5e5,depositAccountListView:We(e.depositAccountState,e.depositAccountListState)}},function(e,t){const{navigate:s,handleDrawerToggle:a}=t;return{onBackClick:()=>{s("..")},onClickMenuIcon:()=>{a(!0)},onFetchAutoTransferRules:o=>{e(He(o))},onCreateRule:()=>{e(Rn())},onUpdateRule:o=>{e(xe(o))},onDeleteClick:o=>{e(Fn(o))},onPauseClick:o=>{e(xe(o,!0,!1))},onResumeClick:o=>{e(xe(o,!1,!0))},onActivityClick:(o,i)=>{e(On(o,i))},onUpdateRuleLocalData:o=>{e(Bn(o))},clearRuleLocalData:()=>{e(Tn())},onEditClick:o=>{s(`./${o}/edit`)},onEditDrawerClose:()=>{s("../../",{relative:"path"})},onReviewClick:()=>{e(Pn())}}})(Ct);function Ne({isEditDrawerOpen:e}){const t=W(),s=J(),a=U(),o=oe(),{ruleId:i,tenantEmailDomain:l}=G(),{useFeatureGate:c}=$(),[d,m]=p.useState(!1),[C,r]=p.useState(!1),u=w(k=>M(k)),h=w(k=>Ve(k)),f=h?.fetchState??"Not-Started",S=w(k=>$e(k)),g=u?.companyId??D.getSignedInUserTenant(l)?.companyId,b=ae(o?.loggedInUserRoleMap)||Ze(o?.loggedInUserRoleMap),{isFeatureEnabled:A}=c(E.isTreasuryEnabled),y=u?.company!=null&&Ge(u.company),I=A&&y,P=D.getSignedInUser(),T=u.tenantId,B={userId:P?.userId??"",sessionId:P?.zeniSessionId??"",tenantId:T??""};p.useEffect(()=>{!C&&f==="Not-Started"&&g&&(r(!0),a(He(!0)))},[C,f,g,a]);const j=k=>{m(k)},O=R();return h?.fetchState!=="Completed"?n.jsx(se,{fetchState:"In-Progress",style:{backgroundColor:O.colors.grey5}}):n.jsxs(Mt,{children:[n.jsx(me,{isAppContentDrawerOpen:d,handleDrawerToggle:j}),n.jsx(zt,{navigate:t,location:s,currentTenant:u,handleDrawerToggle:j,isEditDrawerOpen:e,editingRuleId:i,authParams:B,includeTreasuryOption:I,hasAdminLevelAccess:b,zeniAccountsConfigDetail:S})]})}const Nt={overlayWidth:new K(100,100,58)},_t=({vendorId:e,isDrawerOpen:t,closeDrawerHandler:s})=>{const a=U(),o=R(),i=V();if(D.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(q,{onClose:()=>{s(!0),a(ue())},anchor:"right",open:t,PaperProps:{style:{width:Nt.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Vt,{onClick:l=>l.stopPropagation(),children:n.jsx(Ot,{vendorIdParam:e,accountContext:"express-pay"})})})},Vt=L(Q)`
10
10
  display: flex;
11
11
  min-height: 100%;
12
12
  flex-direction: column;
@@ -26,15 +26,15 @@ import{j as n}from"./liveblocks-BGrTvYCQ.js";import{j as W,u as J,h as U,l as G,
26
26
  flex-direction: column;
27
27
  align-items: center;
28
28
  background-color: ${e=>e.theme.colors.grey4};
29
- `,Kt=Y(function(e,t){const s=M(e),a=D.getSignedInUser(),o=s.tenantId,i={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},l=t.expressPayDetails,c=e.entityAutoCompleteState.autoCompleteText.common,d=Mn(e,"common");return{expressPayDetails:l,fileProps:{authParams:i,filesEndPoint:`${be.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:c,entityAutoCompleteView:d},analytics:t.analytics}},function(e,t){const{navigate:s}=t;return{onSaveVendor:a=>{e(Wn(a,void 0,void 0,!0))},saveVendorDetailLocalData:(a,o)=>{e(Oe({vendorId:o,localData:a}))},saveExpressPayLocalData:a=>{e(Hn({localData:a}))},onVendorSelected:a=>{a!=null&&e(Gn(a,!1))},updateSelectedVendorForCreate:a=>{e(Zn(a))},initializeVendorAddress:()=>{e($n())},resetVendorSaveStatus:a=>{e(Vn({vendorId:a}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(a,o)=>{a.trim().length>=2?e(_n({searchString:a,entityType:o,searchOrigin:"common"})):a.trim().length===0&&e(Fe("common"))},onCancelAutoComplete:()=>{e(Fe("common"))}},chooseNewVendor:a=>{e(Oe({localData:{vendorName:a}}))},onClickAddAccount:a=>{a.method.toLowerCase().indexOf("ach")!==-1?s("./add-ach",{relative:"path"}):a.method.toLowerCase().indexOf("wire")!==-1&&a.method.toLowerCase().indexOf("domestic")!==-1&&s("./add-wire",{relative:"path"})},updateFilesEntity:a=>{e(Ke({files:a}))},onDeleteFile:a=>{e(Ye(a))},onEditFileName:(a,o)=>{e(Je(a,o.split(".")[0]))},onBackClick:a=>{a!=null&&e(Be(a)),e(Be()),e(Nn()),e(ue()),s("../",{relative:"path"})},onSchedulePayment:()=>{e(zn())}}})(wt);function ce({isAddACHDrawerOpen:e,isAddWireDrawerOpen:t,isAddAddressDrawerOpen:s}){const a=W(),o=J(),i=U(),[l,c]=p.useState(!1),{tenantEmailDomain:d}=G(),m=oe(),C=R(),r=k(v=>v.expressPayState.fetchState),u=k(v=>M(v)),g=k(v=>Ln(v)),h=g.expressPayLocalData?.vendorId,S=u.companyId??D.getSignedInUserTenant(d)?.companyId,[f,b]=p.useState(!1),[A,y]=p.useState(!1),[I,P]=p.useState(!1),T=sn(o.state?.pathnameStackToGoBack),{poppedPathname:B}=T,j=B?.split("/"),O=j?.[j.length-1];p.useEffect(()=>{e===!0?b(!0):(b(!1),document.body.style.overflow="auto")},[e]),p.useEffect(()=>{t===!0?y(!0):(y(!1),document.body.style.overflow="auto")},[t]),p.useEffect(()=>{s===!0?P(!0):(P(!1),document.body.style.overflow="auto")},[s]),p.useEffect(()=>{r==="Not-Started"&&i(Un(!0,!0))},[r,i]);const w=xt(g.vendorViewDetails.bankAccountCreationState?.fetchState);if(p.useEffect(()=>{w==="In-Progress"&&g.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&N()},[w,g.vendorViewDetails.bankAccountCreationState?.fetchState]),D.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const z=v=>{c(v)},N=()=>{b(!1),y(!1),a("../",{relative:"path"})};return g.fetchState==="Completed"?n.jsxs(Yt,{children:[Ue(o)?n.jsx(me,{isAppContentDrawerOpen:l,handleDrawerToggle:z}):null,f===!0?n.jsx(_t,{vendorId:h,closeDrawerHandler:N,isDrawerOpen:f}):null,A===!0?n.jsx(Wt,{vendorId:h,closeDrawerHandler:N,isDrawerOpen:A}):null,I===!0?n.jsx(Zt,{closeDrawerHandler:N,isDrawerOpen:I}):null,n.jsx(Rt,{vendorId:h,isExpressPayPage:!0}),n.jsx(Kt,{navigate:a,location:o,companyId:S,accountId:O,analytics:F,currentTenant:u,vendorId:h,roleMap:m?.loggedInUserRoleMap,isSettings:Ue(o),expressPayDetails:g,onClickMenuIcon:()=>{z(!0)}})]}):n.jsx(se,{fetchState:"In-Progress",style:{backgroundColor:C.colors.grey5}})}const qt={overlayWidth:new K(100,100,58)},Qt=({authParams:e,downloadAccountDetailEndPoint:t,isAccountInfoDrawerOpen:s,zeniBankAccountDetail:a,closeDrawerHandler:o})=>{const i=R(),l=V(),c=k(r=>$e(r)),d=k(r=>M(r));if(D.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const m=()=>{o(!0)},C={depositAccount:a,onDismissClick:m,zeniAccountsConfigDetail:c,authParams:e,downloadAccountDetailEndPoint:t,currentTenant:d};return n.jsx(q,{anchor:"right",open:s,PaperProps:{style:{width:qt.overlayWidth.valuePercentage(l),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:i.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>m(),children:n.jsx(Xt,{onClick:r=>r.stopPropagation(),children:n.jsx(kt,{...C})})})},Xt=L(Q)`
29
+ `,Kt=Y(function(e,t){const s=M(e),a=D.getSignedInUser(),o=s.tenantId,i={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},l=t.expressPayDetails,c=e.entityAutoCompleteState.autoCompleteText.common,d=Mn(e,"common");return{expressPayDetails:l,fileProps:{authParams:i,filesEndPoint:`${be.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:c,entityAutoCompleteView:d},analytics:t.analytics}},function(e,t){const{navigate:s}=t;return{onSaveVendor:a=>{e(Wn(a,void 0,void 0,!0))},saveVendorDetailLocalData:(a,o)=>{e(Oe({vendorId:o,localData:a}))},saveExpressPayLocalData:a=>{e(Hn({localData:a}))},onVendorSelected:a=>{a!=null&&e(Gn(a,!1))},updateSelectedVendorForCreate:a=>{e(Zn(a))},initializeVendorAddress:()=>{e($n())},resetVendorSaveStatus:a=>{e(Vn({vendorId:a}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(a,o)=>{a.trim().length>=2?e(_n({searchString:a,entityType:o,searchOrigin:"common"})):a.trim().length===0&&e(Fe("common"))},onCancelAutoComplete:()=>{e(Fe("common"))}},chooseNewVendor:a=>{e(Oe({localData:{vendorName:a}}))},onClickAddAccount:a=>{a.method.toLowerCase().indexOf("ach")!==-1?s("./add-ach",{relative:"path"}):a.method.toLowerCase().indexOf("wire")!==-1&&a.method.toLowerCase().indexOf("domestic")!==-1&&s("./add-wire",{relative:"path"})},updateFilesEntity:a=>{e(Ke({files:a}))},onDeleteFile:a=>{e(Ye(a))},onEditFileName:(a,o)=>{e(Je(a,o.split(".")[0]))},onBackClick:a=>{a!=null&&e(Be(a)),e(Be()),e(Nn()),e(ue()),s("../",{relative:"path"})},onSchedulePayment:()=>{e(zn())}}})(kt);function ce({isAddACHDrawerOpen:e,isAddWireDrawerOpen:t,isAddAddressDrawerOpen:s}){const a=W(),o=J(),i=U(),[l,c]=p.useState(!1),{tenantEmailDomain:d}=G(),m=oe(),C=R(),r=w(v=>v.expressPayState.fetchState),u=w(v=>M(v)),h=w(v=>Ln(v)),f=h.expressPayLocalData?.vendorId,S=u.companyId??D.getSignedInUserTenant(d)?.companyId,[g,b]=p.useState(!1),[A,y]=p.useState(!1),[I,P]=p.useState(!1),T=sn(o.state?.pathnameStackToGoBack),{poppedPathname:B}=T,j=B?.split("/"),O=j?.[j.length-1];p.useEffect(()=>{e===!0?b(!0):(b(!1),document.body.style.overflow="auto")},[e]),p.useEffect(()=>{t===!0?y(!0):(y(!1),document.body.style.overflow="auto")},[t]),p.useEffect(()=>{s===!0?P(!0):(P(!1),document.body.style.overflow="auto")},[s]),p.useEffect(()=>{r==="Not-Started"&&i(Un(!0,!0))},[r,i]);const k=xt(h.vendorViewDetails.bankAccountCreationState?.fetchState);if(p.useEffect(()=>{k==="In-Progress"&&h.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&N()},[k,h.vendorViewDetails.bankAccountCreationState?.fetchState]),D.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const z=v=>{c(v)},N=()=>{b(!1),y(!1),a("../",{relative:"path"})};return h.fetchState==="Completed"?n.jsxs(Yt,{children:[Ue(o)?n.jsx(me,{isAppContentDrawerOpen:l,handleDrawerToggle:z}):null,g===!0?n.jsx(_t,{vendorId:f,closeDrawerHandler:N,isDrawerOpen:g}):null,A===!0?n.jsx(Wt,{vendorId:f,closeDrawerHandler:N,isDrawerOpen:A}):null,I===!0?n.jsx(Zt,{closeDrawerHandler:N,isDrawerOpen:I}):null,n.jsx(Rt,{vendorId:f,isExpressPayPage:!0}),n.jsx(Kt,{navigate:a,location:o,companyId:S,accountId:O,analytics:F,currentTenant:u,vendorId:f,roleMap:m?.loggedInUserRoleMap,isSettings:Ue(o),expressPayDetails:h,onClickMenuIcon:()=>{z(!0)}})]}):n.jsx(se,{fetchState:"In-Progress",style:{backgroundColor:C.colors.grey5}})}const qt={overlayWidth:new K(100,100,58)},Qt=({authParams:e,downloadAccountDetailEndPoint:t,isAccountInfoDrawerOpen:s,zeniBankAccountDetail:a,closeDrawerHandler:o})=>{const i=R(),l=V(),c=w(r=>$e(r)),d=w(r=>M(r));if(D.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const m=()=>{o(!0)},C={depositAccount:a,onDismissClick:m,zeniAccountsConfigDetail:c,authParams:e,downloadAccountDetailEndPoint:t,currentTenant:d};return n.jsx(q,{anchor:"right",open:s,PaperProps:{style:{width:qt.overlayWidth.valuePercentage(l),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:i.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>m(),children:n.jsx(Xt,{onClick:r=>r.stopPropagation(),children:n.jsx(wt,{...C})})})},Xt=L(Q)`
30
30
  display: flex;
31
31
  min-height: 100%;
32
32
  flex-direction: column;
33
- `,ea={overlayWidth:new K(100,100,58)},un=({isCheckDepositDrawerOpen:e,closeDrawerHandler:t})=>{const s=R(),a=V(),o=U(),i=k(r=>M(r)),l=D.getSignedInUser(),c=i.tenantId,d={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:c??""};if(l==null)throw Error("Can't access check deposit page without signing in...");const m=k(r=>Jn(r)),C={analytics:F,checkDeposit:m,filesEndPoint:`${be.fileMicroServiceBaseUrl}`,authParams:d,onSaveChangesToLocalStore:r=>{o(Kn(r))},updateFilesEntity:r=>{o(Ke({files:r}))},onAnotherTransferClick:()=>{o(we())},onDeleteFile:r=>{o(Ye(r))},onEditFileName:(r,u)=>{o(Je(r,u.split(".")[0]))},onCheckDpositClick:()=>{o(Yn())},onDismissClick:()=>{t(!0),o(we())}};return n.jsxs(n.Fragment,{children:[n.jsx(pe,{analytics:F,onLoad:r=>(u=>u.trackPageLoaded(je.Event.accountsDepositCheckFormViewed))(r)}),n.jsx(q,{anchor:"right",open:e,PaperProps:{style:{width:ea.overlayWidth.valuePercentage(a),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(r,u)=>(u==="backdropClick"||u==="escapeKeyDown")&&(t(!0),void o(we())),children:n.jsx(na,{onClick:r=>r.stopPropagation(),children:n.jsx(Dt,{...C})})})]})},na=L(Q)`
33
+ `,ea={overlayWidth:new K(100,100,58)},un=({isCheckDepositDrawerOpen:e,closeDrawerHandler:t})=>{const s=R(),a=V(),o=U(),i=w(r=>M(r)),l=D.getSignedInUser(),c=i.tenantId,d={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:c??""};if(l==null)throw Error("Can't access check deposit page without signing in...");const m=w(r=>Jn(r)),C={analytics:F,checkDeposit:m,filesEndPoint:`${be.fileMicroServiceBaseUrl}`,authParams:d,onSaveChangesToLocalStore:r=>{o(Kn(r))},updateFilesEntity:r=>{o(Ke({files:r}))},onAnotherTransferClick:()=>{o(ke())},onDeleteFile:r=>{o(Ye(r))},onEditFileName:(r,u)=>{o(Je(r,u.split(".")[0]))},onCheckDpositClick:()=>{o(Yn())},onDismissClick:()=>{t(!0),o(ke())}};return n.jsxs(n.Fragment,{children:[n.jsx(pe,{analytics:F,onLoad:r=>(u=>u.trackPageLoaded(je.Event.accountsDepositCheckFormViewed))(r)}),n.jsx(q,{anchor:"right",open:e,PaperProps:{style:{width:ea.overlayWidth.valuePercentage(a),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(r,u)=>(u==="backdropClick"||u==="escapeKeyDown")&&(t(!0),void o(ke())),children:n.jsx(na,{onClick:r=>r.stopPropagation(),children:n.jsx(Dt,{...C})})})]})},na=L(Q)`
34
34
  display: flex;
35
35
  min-height: 100%;
36
36
  flex-direction: column;
37
- `,ta={overlayWidth:new K(100,100,58)},aa=Y(function(e,t){const s=t.currentTenant?.companyId;return{plaidConnectionDetails:et(e,s,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:We(e.depositAccountState,e.depositAccountListState)}},function(e,t){return{onReviewClick:()=>e(tt()),clearReviewTransferDetail:()=>e(nt()),onFetchLinkTokenClick:s=>{e(Qe("external_account",s))},onEstablishConnectionClick:s=>{e(qe(s,t.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}})(At),pn=({isTransferDrawerOpen:e,authParams:t,downloadAccountDetailEndPoint:s,closeDrawerHandler:a,zeniAccountsConfig:o})=>{const i=k(y=>qn(y)),l=k(y=>M(y)),c=R(),d=V(),m=U(),{accountId:C}=G(),[r,u]=p.useState("achTransfer"),[g,h]=p.useState(!1);if(D.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:S}=$(),{configValue:f}=S(H.zeniAccountsConfig),b=De(f),A=()=>{a(!0),m(Re())};return p.useEffect(()=>{i.reviewTransferDetail.fetchState==="Completed"&&h(!0)},[h,i.reviewTransferDetail.fetchState]),n.jsxs(n.Fragment,{children:[n.jsx(pe,{analytics:F,onLoad:y=>(I=>I.trackPageLoaded(je.Event.zeniAccountsTransferFormViewed))(y)}),n.jsx(q,{onClose:()=>{(r==="achTransfer"&&g===!1||r==="achTransfer"&&g&&i.fetchState==="Completed")&&A()},anchor:"right",open:e,PaperProps:{style:{width:ta.overlayWidth.valuePercentage(d),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:c.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(oa,{onClick:y=>y.stopPropagation(),children:n.jsx(aa,{analytics:F,transferDetails:i,authParams:t,downloadAccountDetailEndPoint:s,onTransferClick:()=>{F.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"&&o.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&i.transferDetailLocalData.amount.amount>o.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),m(Xn(C))},onDismissClick:A,onSaveChangesToLocalStore:y=>{m(Qn(y))},onAnotherTransferClick:()=>{h(!1),m(Re())},currentTenant:l,zeniAccountsConfigDetail:o,currentDrawerContent:r,setCurrentDrawerContent:u,showReviewContent:g,setShowReviewContent:h,onBackClick:()=>{},maxInsuredAmount:b.maxInsuredAmount})})})]})},oa=L(Q)`
37
+ `,ta={overlayWidth:new K(100,100,58)},aa=Y(function(e,t){const s=t.currentTenant?.companyId;return{plaidConnectionDetails:et(e,s,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:We(e.depositAccountState,e.depositAccountListState)}},function(e,t){return{onReviewClick:()=>e(tt()),clearReviewTransferDetail:()=>e(nt()),onFetchLinkTokenClick:s=>{e(Qe("external_account",s))},onEstablishConnectionClick:s=>{e(qe(s,t.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}})(At),pn=({isTransferDrawerOpen:e,authParams:t,downloadAccountDetailEndPoint:s,closeDrawerHandler:a,zeniAccountsConfig:o})=>{const i=w(y=>qn(y)),l=w(y=>M(y)),c=R(),d=V(),m=U(),{accountId:C}=G(),[r,u]=p.useState("achTransfer"),[h,f]=p.useState(!1);if(D.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:S}=$(),{configValue:g}=S(H.zeniAccountsConfig),b=De(g),A=()=>{a(!0),m(Re())};return p.useEffect(()=>{i.reviewTransferDetail.fetchState==="Completed"&&f(!0)},[f,i.reviewTransferDetail.fetchState]),n.jsxs(n.Fragment,{children:[n.jsx(pe,{analytics:F,onLoad:y=>(I=>I.trackPageLoaded(je.Event.zeniAccountsTransferFormViewed))(y)}),n.jsx(q,{onClose:()=>{(r==="achTransfer"&&h===!1||r==="achTransfer"&&h&&i.fetchState==="Completed")&&A()},anchor:"right",open:e,PaperProps:{style:{width:ta.overlayWidth.valuePercentage(d),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:c.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(oa,{onClick:y=>y.stopPropagation(),children:n.jsx(aa,{analytics:F,transferDetails:i,authParams:t,downloadAccountDetailEndPoint:s,onTransferClick:()=>{F.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"&&o.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&i.transferDetailLocalData.amount.amount>o.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),m(Xn(C))},onDismissClick:A,onSaveChangesToLocalStore:y=>{m(Qn(y))},onAnotherTransferClick:()=>{f(!1),m(Re())},currentTenant:l,zeniAccountsConfigDetail:o,currentDrawerContent:r,setCurrentDrawerContent:u,showReviewContent:h,setShowReviewContent:f,onBackClick:()=>{},maxInsuredAmount:b.maxInsuredAmount})})})]})},oa=L(Q)`
38
38
  display: flex;
39
39
  min-height: 100%;
40
40
  flex-direction: column;
@@ -46,7 +46,7 @@ import{j as n}from"./liveblocks-BGrTvYCQ.js";import{j as W,u as J,h as U,l as G,
46
46
  flex-direction: column;
47
47
  align-items: center;
48
48
  background-color: ${e=>e.theme.colors.grey4};
49
- `,ia=Y(function(e,t){return{zeniAccountListView:Xe(e),isExpressPayEnabled:t.isExpressPayEnabled,analytics:t.analytics}},function(e,t){const{navigate:s,currentTenant:a,location:o,companyId:i,handleDrawerToggle:l,analytics:c,isBillPayEnabled:d,isDebitCardFeatureEnabled:m}=t,{tenantEmailDomain:C}=a;return{onZeniAccountClick:(r,u)=>{c.trackAccountsListPageClicked("Accounts Row Item Click",u,"active");const g=ra(C,r),h=ne(o.state?.pathnameStackToGoBack,o.pathname);s(g,{state:{pathnameStackToGoBack:h}})},onSettingsClick:()=>{c.trackAccountsListPageClicked("Settings Icon"),s("setup")},onReloadTransactions:()=>{e(en(!1))},handleMoveMoneyOptionSelection:(r,u)=>{let g="page-not-found";r==="sendMoney"&&(g=fn(C)),r==="payBill"?g=mn(a,d,m):r==="transfer"?(g=hn(C),u!=null&&e(tn(u))):r==="checkDeposit"&&(g=gn(C));const h=ne(o.state?.pathnameStackToGoBack,o.pathname);s(g,{state:{pathnameStackToGoBack:h}})},unlinkPaymentAccount:(r,u)=>{c.trackAccountsListPageClicked("Unlink Account",u),e(it(r))},onFetchLinkTokenClick:(r,u)=>{e(Qe("external_account",r,u))},onUpdatePaymentAccountStatus:(r,u,g)=>{e(st(r,u,"zeni_accounts","external_account",g))},onEstablishConnectionClick:r=>{e(qe(r,i,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:r=>{e(ot(r))},onClickMenuIcon:()=>{l(!0)},onTreasuryGetStartedClick:()=>{s("../../treasury/promo")},onAutoTransferClick:()=>{s("./auto-transfer")}}})(bt);function ke({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t}){const s=J(),a=W(),o=U(),i=V(),{tenantEmailDomain:l}=G(),{useDynamicConfig:c,useFeatureGate:d}=$(),m=R(),{configValue:C}=c(H.zeniAccountsConfig),{isFeatureEnabled:r}=d(E.isTreasuryEnabled),{isFeatureEnabled:u}=d(E.isDebitCardFeatureEnabled),{isFeatureEnabled:g}=d(E.isAutoTransferRuleEnabled),{isFeatureEnabled:h}=d(E.isCheckingCommentingEnabled),S=De(C),f=k(_=>M(_)),b=f.companyId??D.getSignedInUserTenant(l)?.companyId,{configValue:A}=c(H.expressPayConfig),y=A.is_enable_all_tenants===!0||A.tenant_ids!=null&&A.tenant_ids.includes(f.tenantId),[I,P]=p.useState(!1),[T,B]=p.useState(!1),[j,O]=p.useState(!1),w=k(_=>Xe(_)),z=w.fetchState,N=!!f.companyZeniAccountInfo?.info?.isZeniAccountEnabled,v=oe(),Z=!!f.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,ie=!!f.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,he=ae(v?.loggedInUserRoleMap),ge=Ae(v?.loggedInUserRoleMap),fe=!!f.companyBillPayInfo?.info?.isBillPayEnabled,re=D.getSignedInUser(),X={userId:re?.userId??"",sessionId:re?.zeniSessionId??"",tenantId:f.tenantId??""},ee=`${Se}/account_details`,{areTenantIdsInSync:ve}=It();p.useEffect(()=>{!I&&ve&&(P(!0),o(en(!1)))},[I,o,z,ve]),p.useEffect(()=>{e!=null&&e===!0?B(!0):(B(!1),document.body.style.overflow="auto")},[e]),p.useEffect(()=>{O(t!=null&&t===!0)},[t]);const Ee=()=>{B(!1),a("..")},[yn,Cn]=p.useState(!1),Pe=_=>{Cn(_)},{isAiCfoOpen:xn,setIsAiCfoOpen:wn}=rn(),{isAiCfoAccessEnabled:kn,onAskAiCfoClick:Dn}=ln({isAiCfoOpen:xn,setIsAiCfoOpen:wn,mobileExploreReferrer:"Checking Accounts"});dn({isDataReady:z==="Completed"});const An=f.company!=null&&Ge(f.company),ye=(r&&An)===!0&&!ie,[In,Sn]=p.useState(!1),Ce=k(_=>_.treasurySetupViewState.treasuryFundsDetails),bn=Ce.fundsDetails,jn=St(bn);p.useEffect(()=>{ye!==!0||In||Ce?.fetchStatus.fetchState!=="Not-Started"||(Sn(!0),o(at()))},[Ce.fetchStatus,o]);const vn=nn(f),En=Ie(u,f);return vn===!0&&En!==!0?n.jsx(cn,{}):N?n.jsxs(n.Fragment,{children:[w.fetchState==="Completed"&&T===!1&&j===!1?n.jsx(pe,{analytics:F,onLoad:_=>(Te=>{Te.trackAccountsListPageViewed(w.depositAccountsSelectorView.depositAccounts.length,w.externalAccountsSelectorView.paymentAccounts.length,Me(w.summary?.totalBalance.available.amount??0),Me(w.summary?.totalInterest.available.amount??0),w.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield),ye&&Te.trackTreasuryPromoView("Checking Promo Banner")})(_)}):null,T===!0?n.jsx(pn,{closeDrawerHandler:Ee,isTransferDrawerOpen:T,zeniAccountsConfig:w.zeniAccountsConfig,authParams:X,downloadAccountDetailEndPoint:ee}):null,j===!0?n.jsx(un,{closeDrawerHandler:Ee,isCheckDepositDrawerOpen:j}):null,n.jsxs(sa,{windowSize:i,children:[n.jsx(me,{isAppContentDrawerOpen:yn,handleDrawerToggle:Pe}),n.jsx(ia,{zeniBankListView:w,navigate:a,currentTenant:f,location:s,companyId:b,analytics:F,maxInsuredAmount:S.maxInsuredAmount,isExpressPayEnabled:y,isBillPayEnabled:fe,isCheckingCommentingEnabled:h,isDebitCardFeatureEnabled:u,isAutoTransferRuleEnabled:g,handleDrawerToggle:Pe,showTreasuryPromo:ye,treasuryYieldPercentage:jn,treasuryInsuredAmount:5e5,isAiCfoAccessEnabled:kn,onAskAiCfoClick:Dn})]})]}):Z&&he?n.jsx(te,{to:"../setup"}):f.companyZeniAccountInfo?.info&&!Z&&ge?n.jsx(te,{to:"../promo",state:s.state}):n.jsx(se,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const mn=(e,t,s)=>{const a=Ie(s,e),{tenantEmailDomain:o}=e;return a===!0||t===!1?`/${o}/bills`:`/${o}/bill/new`},ra=(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`,ca=L.div`
49
+ `,ia=Y(function(e,t){return{zeniAccountListView:Xe(e),isExpressPayEnabled:t.isExpressPayEnabled,analytics:t.analytics}},function(e,t){const{navigate:s,currentTenant:a,location:o,companyId:i,handleDrawerToggle:l,analytics:c,isBillPayEnabled:d,isDebitCardFeatureEnabled:m}=t,{tenantEmailDomain:C}=a;return{onZeniAccountClick:(r,u)=>{c.trackAccountsListPageClicked("Accounts Row Item Click",u,"active");const h=ra(C,r),f=ne(o.state?.pathnameStackToGoBack,o.pathname);s(h,{state:{pathnameStackToGoBack:f}})},onSettingsClick:()=>{c.trackAccountsListPageClicked("Settings Icon"),s("setup")},onReloadTransactions:()=>{e(en(!1))},handleMoveMoneyOptionSelection:(r,u)=>{let h="page-not-found";r==="sendMoney"&&(h=gn(C)),r==="payBill"?h=mn(a,d,m):r==="transfer"?(h=fn(C),u!=null&&e(tn(u))):r==="checkDeposit"&&(h=hn(C));const f=ne(o.state?.pathnameStackToGoBack,o.pathname);s(h,{state:{pathnameStackToGoBack:f}})},unlinkPaymentAccount:(r,u)=>{c.trackAccountsListPageClicked("Unlink Account",u),e(it(r))},onFetchLinkTokenClick:(r,u)=>{e(Qe("external_account",r,u))},onUpdatePaymentAccountStatus:(r,u,h)=>{e(st(r,u,"zeni_accounts","external_account",h))},onEstablishConnectionClick:r=>{e(qe(r,i,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:r=>{e(ot(r))},onClickMenuIcon:()=>{l(!0)},onTreasuryGetStartedClick:()=>{s("../../treasury/promo")},onAutoTransferClick:()=>{s("./auto-transfer")}}})(bt);function we({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t}){const s=J(),a=W(),o=U(),i=V(),{tenantEmailDomain:l}=G(),{useDynamicConfig:c,useFeatureGate:d}=$(),m=R(),{configValue:C}=c(H.zeniAccountsConfig),{isFeatureEnabled:r}=d(E.isTreasuryEnabled),{isFeatureEnabled:u}=d(E.isDebitCardFeatureEnabled),{isFeatureEnabled:h}=d(E.isAutoTransferRuleEnabled),{isFeatureEnabled:f}=d(E.isCheckingCommentingEnabled),S=De(C),g=w(_=>M(_)),b=g.companyId??D.getSignedInUserTenant(l)?.companyId,{configValue:A}=c(H.expressPayConfig),y=A.is_enable_all_tenants===!0||A.tenant_ids!=null&&A.tenant_ids.includes(g.tenantId),[I,P]=p.useState(!1),[T,B]=p.useState(!1),[j,O]=p.useState(!1),k=w(_=>Xe(_)),z=k.fetchState,N=!!g.companyZeniAccountInfo?.info?.isZeniAccountEnabled,v=oe(),Z=!!g.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,ie=!!g.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,fe=ae(v?.loggedInUserRoleMap),he=Ae(v?.loggedInUserRoleMap),ge=!!g.companyBillPayInfo?.info?.isBillPayEnabled,re=D.getSignedInUser(),X={userId:re?.userId??"",sessionId:re?.zeniSessionId??"",tenantId:g.tenantId??""},ee=`${Se}/account_details`,{areTenantIdsInSync:ve}=It();p.useEffect(()=>{!I&&ve&&(P(!0),o(en(!1)))},[I,o,z,ve]),p.useEffect(()=>{e!=null&&e===!0?B(!0):(B(!1),document.body.style.overflow="auto")},[e]),p.useEffect(()=>{O(t!=null&&t===!0)},[t]);const Ee=()=>{B(!1),a("..")},[yn,Cn]=p.useState(!1),Pe=_=>{Cn(_)},{isAiCfoOpen:xn,setIsAiCfoOpen:kn}=rn(),{isAiCfoAccessEnabled:wn,onAskAiCfoClick:Dn}=ln({isAiCfoOpen:xn,setIsAiCfoOpen:kn,mobileExploreReferrer:"Checking Accounts"});dn({isDataReady:z==="Completed"});const An=g.company!=null&&Ge(g.company),ye=(r&&An)===!0&&!ie,[In,Sn]=p.useState(!1),Ce=w(_=>_.treasurySetupViewState.treasuryFundsDetails),bn=Ce.fundsDetails,jn=St(bn);p.useEffect(()=>{ye!==!0||In||Ce?.fetchStatus.fetchState!=="Not-Started"||(Sn(!0),o(at()))},[Ce.fetchStatus,o]);const vn=nn(g),En=Ie(u,g);return vn===!0&&En!==!0?n.jsx(cn,{}):N?n.jsxs(n.Fragment,{children:[k.fetchState==="Completed"&&T===!1&&j===!1?n.jsx(pe,{analytics:F,onLoad:_=>(Te=>{Te.trackAccountsListPageViewed(k.depositAccountsSelectorView.depositAccounts.length,k.externalAccountsSelectorView.paymentAccounts.length,Me(k.summary?.totalBalance.available.amount??0),Me(k.summary?.totalInterest.available.amount??0),k.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield),ye&&Te.trackTreasuryPromoView("Checking Promo Banner")})(_)}):null,T===!0?n.jsx(pn,{closeDrawerHandler:Ee,isTransferDrawerOpen:T,zeniAccountsConfig:k.zeniAccountsConfig,authParams:X,downloadAccountDetailEndPoint:ee}):null,j===!0?n.jsx(un,{closeDrawerHandler:Ee,isCheckDepositDrawerOpen:j}):null,n.jsxs(sa,{windowSize:i,children:[n.jsx(me,{isAppContentDrawerOpen:yn,handleDrawerToggle:Pe}),n.jsx(ia,{zeniBankListView:k,navigate:a,currentTenant:g,location:s,companyId:b,analytics:F,maxInsuredAmount:S.maxInsuredAmount,isExpressPayEnabled:y,isBillPayEnabled:ge,isCheckingCommentingEnabled:f,isDebitCardFeatureEnabled:u,isAutoTransferRuleEnabled:h,handleDrawerToggle:Pe,showTreasuryPromo:ye,treasuryYieldPercentage:jn,treasuryInsuredAmount:5e5,isAiCfoAccessEnabled:wn,onAskAiCfoClick:Dn})]})]}):Z&&fe?n.jsx(te,{to:"../setup"}):g.companyZeniAccountInfo?.info&&!Z&&he?n.jsx(te,{to:"../promo",state:s.state}):n.jsx(se,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const mn=(e,t,s)=>{const a=Ie(s,e),{tenantEmailDomain:o}=e;return a===!0||t===!1?`/${o}/bills`:`/${o}/bill/new`},ra=(e,t)=>`/${e}/checking/${t}`,fn=(e,t)=>t==null?`/${e}/checking/transfer`:`/${e}/checking/${t}/transfer`,hn=(e,t)=>t==null?`/${e}/checking/check-deposit`:`/${e}/checking/${t}/check-deposit`,gn=e=>`/${e}/checking/express-pay`,ca=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-BGrTvYCQ.js";import{j as W,u as J,h as U,l as G,
54
54
  align-items: center;
55
55
  min-height: 100vh;
56
56
  background-color: ${e=>e.theme.colors.grey4};
57
- `,la=Y(function(e,t){const{currentTenant:s}=t,a=an(e,t.accountId),o=D.getSignedInUser(),i=e.tenantState.currentTenantId,l={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:i??""},c=a.accountDetail?.id??"";return{currentTenantCompanyName:s.companyName??"",authParams:l,downloadEndPoint:`${be.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${c}`,zeniAccountDetail:a,isExpressPayEnabled:t.isExpressPayEnabled,fetchState:a.fetchState}},function(e,t){const{navigate:s,currentTenant:a,location:o,accountId:i}=t,{tenantEmailDomain:l}=a;return{handleMoveMoneyOptionSelection:(c,d)=>{let m="page-not-found";c==="sendMoney"?m=fn(l):c==="payBill"?m=mn(a,t.isBillPayEnabled,t.isDebitCardFeatureEnabled):c==="transfer"?(m=hn(l,i),d!=null&&e(tn(d))):c==="checkDeposit"?(m=gn(l,i),d!=null&&e(rt(d))):c==="accountStatement"&&(m=pa(l,i));const C=ne(o.state?.pathnameStackToGoBack,o.pathname);s(m,{state:{pathnameStackToGoBack:C}})},onViewAllTransactionClick:()=>{const c=ua(l,i),d=ne(o.state?.pathnameStackToGoBack,o.pathname);s(c,{state:{pathnameStackToGoBack:d}})},onAccountDetailClick:()=>{const c=da(l,i),d=ne(o.state?.pathnameStackToGoBack,o.pathname);s(c,{state:{pathnameStackToGoBack:d}})},onEditNameClick:c=>{e(Le(i,"editName",c))},onReloadZeniAccountDetailPage:()=>{e(on(i,!1))},onCloseAccountClick:()=>{e(Le(i,"closeAccount",""))},onBackClick:()=>{s("../",{relative:"path"})},onAutoTransferClick:()=>{s("../auto-transfer")}}})(jt);function le({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t,isAccountInfoDrawerOpen:s}){const a=J(),o=W(),i=U(),l=V(),{tenantEmailDomain:c,accountId:d}=G(),{useDynamicConfig:m}=$(),{useFeatureGate:C}=$(),{isFeatureEnabled:r}=C(E.isDebitCardFeatureEnabled),{isFeatureEnabled:u}=C(E.isAutoTransferRuleEnabled),{isFeatureEnabled:g}=C(E.isCheckingCommentingEnabled),h=k(ee=>M(ee)),{configValue:S}=m(H.expressPayConfig),f=S.is_enable_all_tenants===!0||S.tenant_ids!=null&&S.tenant_ids.includes(h.tenantId),b=!!h.companyBillPayInfo?.info?.isBillPayEnabled,A=D.getSignedInUser(),y=h.companyId??D.getSignedInUserTenant(c)?.companyId,I={userId:A?.userId??"",sessionId:A?.zeniSessionId??"",tenantId:h.tenantId??""},P=`${Se}/account_details`,[T,B]=p.useState(!1),[j,O]=p.useState(!1),[w,z]=p.useState(!1),[N,v]=p.useState(!1),Z=k(ee=>an(ee,d??"")),ie=Z.fetchState,{isAiCfoOpen:he,setIsAiCfoOpen:ge}=rn(),{isAiCfoAccessEnabled:fe,onAskAiCfoClick:re}=ln({isAiCfoOpen:he,setIsAiCfoOpen:ge,mobileExploreReferrer:"Checking Account Detail"});dn({isDataReady:ie==="Completed"}),p.useEffect(()=>{T||(i(on(d??"",!1)),B(!0))},[T,i,ie]),p.useEffect(()=>{v(s!=null&&s===!0)},[s]),p.useEffect(()=>{e!=null&&e===!0?O(!0):(O(!1),document.body.style.overflow="auto")},[e]),p.useEffect(()=>{z(t!=null&&t===!0)},[t]);const X=()=>{v(!1),o("..")};return n.jsxs(n.Fragment,{children:[N===!0&&Z.accountDetail!=null?n.jsx(Qt,{authParams:I,downloadAccountDetailEndPoint:P,closeDrawerHandler:X,isAccountInfoDrawerOpen:N,zeniBankAccountDetail:Z.accountDetail}):null,j===!0?n.jsx(pn,{closeDrawerHandler:X,isTransferDrawerOpen:j,zeniAccountsConfig:Z.zeniAccountsConfig,authParams:I,downloadAccountDetailEndPoint:P}):null,w===!0?n.jsx(un,{closeDrawerHandler:X,isCheckDepositDrawerOpen:w}):null,n.jsx(ca,{windowSize:l,children:n.jsx(la,{navigate:o,currentTenant:h,location:a,companyId:y,isDebitCardFeatureEnabled:r,accountId:d??"",isBillPayEnabled:b,isCheckingCommentingEnabled:g,isExpressPayEnabled:f,isAutoTransferRuleEnabled:u,isAiCfoAccessEnabled:fe,onAskAiCfoClick:re})})]})}const da=(e,t)=>`/${e}/checking/${t}/account-info`,ua=(e,t)=>`/${e}/checking/${t}/transactions`,pa=(e,t)=>`/${e}/checking/${t}/statements`,ma=L.div`
57
+ `,la=Y(function(e,t){const{currentTenant:s}=t,a=an(e,t.accountId),o=D.getSignedInUser(),i=e.tenantState.currentTenantId,l={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:i??""},c=a.accountDetail?.id??"";return{currentTenantCompanyName:s.companyName??"",authParams:l,downloadEndPoint:`${be.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${c}`,zeniAccountDetail:a,isExpressPayEnabled:t.isExpressPayEnabled,fetchState:a.fetchState}},function(e,t){const{navigate:s,currentTenant:a,location:o,accountId:i}=t,{tenantEmailDomain:l}=a;return{handleMoveMoneyOptionSelection:(c,d)=>{let m="page-not-found";c==="sendMoney"?m=gn(l):c==="payBill"?m=mn(a,t.isBillPayEnabled,t.isDebitCardFeatureEnabled):c==="transfer"?(m=fn(l,i),d!=null&&e(tn(d))):c==="checkDeposit"?(m=hn(l,i),d!=null&&e(rt(d))):c==="accountStatement"&&(m=pa(l,i));const C=ne(o.state?.pathnameStackToGoBack,o.pathname);s(m,{state:{pathnameStackToGoBack:C}})},onViewAllTransactionClick:()=>{const c=ua(l,i),d=ne(o.state?.pathnameStackToGoBack,o.pathname);s(c,{state:{pathnameStackToGoBack:d}})},onAccountDetailClick:()=>{const c=da(l,i),d=ne(o.state?.pathnameStackToGoBack,o.pathname);s(c,{state:{pathnameStackToGoBack:d}})},onEditNameClick:c=>{e(Le(i,"editName",c))},onReloadZeniAccountDetailPage:()=>{e(on(i,!1))},onCloseAccountClick:()=>{e(Le(i,"closeAccount",""))},onBackClick:()=>{s("../",{relative:"path"})},onAutoTransferClick:()=>{s("../auto-transfer")}}})(jt);function le({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t,isAccountInfoDrawerOpen:s}){const a=J(),o=W(),i=U(),l=V(),{tenantEmailDomain:c,accountId:d}=G(),{useDynamicConfig:m}=$(),{useFeatureGate:C}=$(),{isFeatureEnabled:r}=C(E.isDebitCardFeatureEnabled),{isFeatureEnabled:u}=C(E.isAutoTransferRuleEnabled),{isFeatureEnabled:h}=C(E.isCheckingCommentingEnabled),f=w(ee=>M(ee)),{configValue:S}=m(H.expressPayConfig),g=S.is_enable_all_tenants===!0||S.tenant_ids!=null&&S.tenant_ids.includes(f.tenantId),b=!!f.companyBillPayInfo?.info?.isBillPayEnabled,A=D.getSignedInUser(),y=f.companyId??D.getSignedInUserTenant(c)?.companyId,I={userId:A?.userId??"",sessionId:A?.zeniSessionId??"",tenantId:f.tenantId??""},P=`${Se}/account_details`,[T,B]=p.useState(!1),[j,O]=p.useState(!1),[k,z]=p.useState(!1),[N,v]=p.useState(!1),Z=w(ee=>an(ee,d??"")),ie=Z.fetchState,{isAiCfoOpen:fe,setIsAiCfoOpen:he}=rn(),{isAiCfoAccessEnabled:ge,onAskAiCfoClick:re}=ln({isAiCfoOpen:fe,setIsAiCfoOpen:he,mobileExploreReferrer:"Checking Account Detail"});dn({isDataReady:ie==="Completed"}),p.useEffect(()=>{T||(i(on(d??"",!1)),B(!0))},[T,i,ie]),p.useEffect(()=>{v(s!=null&&s===!0)},[s]),p.useEffect(()=>{e!=null&&e===!0?O(!0):(O(!1),document.body.style.overflow="auto")},[e]),p.useEffect(()=>{z(t!=null&&t===!0)},[t]);const X=()=>{v(!1),o("..")};return n.jsxs(n.Fragment,{children:[N===!0&&Z.accountDetail!=null?n.jsx(Qt,{authParams:I,downloadAccountDetailEndPoint:P,closeDrawerHandler:X,isAccountInfoDrawerOpen:N,zeniBankAccountDetail:Z.accountDetail}):null,j===!0?n.jsx(pn,{closeDrawerHandler:X,isTransferDrawerOpen:j,zeniAccountsConfig:Z.zeniAccountsConfig,authParams:I,downloadAccountDetailEndPoint:P}):null,k===!0?n.jsx(un,{closeDrawerHandler:X,isCheckDepositDrawerOpen:k}):null,n.jsx(ca,{windowSize:l,children:n.jsx(la,{navigate:o,currentTenant:f,location:a,companyId:y,isDebitCardFeatureEnabled:r,accountId:d??"",isBillPayEnabled:b,isCheckingCommentingEnabled:h,isExpressPayEnabled:g,isAutoTransferRuleEnabled:u,isAiCfoAccessEnabled:ge,onAskAiCfoClick:re})})]})}const da=(e,t)=>`/${e}/checking/${t}/account-info`,ua=(e,t)=>`/${e}/checking/${t}/transactions`,pa=(e,t)=>`/${e}/checking/${t}/statements`,ma=L.div`
58
58
  display: flex;
59
59
  height: 100vh;
60
60
  width: 100%;
@@ -63,4 +63,4 @@ import{j as n}from"./liveblocks-BGrTvYCQ.js";import{j as W,u as J,h as U,l as G,
63
63
  overflow: auto;
64
64
  align-items: center;
65
65
  background-color: ${e=>e.theme.colors.grey4};
66
- `;function ha(){const e=W(),t=U(),s=V(),{accountId:a}=G(),{useFeatureGate:o}=$(),{isFeatureEnabled:i}=o(E.isCheckingCommentingEnabled),[l,c]=p.useState(!1);p.useEffect(()=>{l||(c(!0),t(ct(a??"",!1)))},[l,t]);const d=k(m=>lt(m,a??""));if(D.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return n.jsx(ma,{windowSize:s,children:n.jsx(vt,{transactionListView:d,depositAccountId:a??"",isCheckingCommentingEnabled:i,onBackClick:()=>{e("../")}})})}const ga=Y(function(e,t){const{companyId:s}=t;return{zeniAccountSetupView:dt(e,s),meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true"}},function(e,t){const{navigate:s,companyId:a}=t;return{onSetupButtonClick:()=>{F.trackAccountsPromoPageClicked("Setup Accounts"),e(ut(a))},onBackClick:()=>{s("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{s("../setup",{relative:"path"})}}})(Pt),fa=()=>{const e=W(),t=J(),{tenantEmailDomain:s}=G(),{useDynamicConfig:a}=$(),o=R(),[i,l]=p.useState(!1),[c,d]=p.useState(!1),m=k(y=>M(y)),{configValue:C}=a(H.zeniAccountsConfig),r=De(C);p.useEffect(()=>{c===!1&&t.state?.message==="activation"&&d(!0)},[t.state]);const u=D.getSignedInUserTenant(s)?.companyId??m.companyId,g=D.getSignedInUser(),h=!!m.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,S=y=>{l(y)};if(g==null)throw Error("Can't access Zeni account promo page without signing in...");const f=oe(),b=ae(f?.loggedInUserRoleMap),A=Ae(f?.loggedInUserRoleMap);if(h&&b)return n.jsx(te,{to:"../../checking/setup"});if(m.company?.companyZeniAccountInfo&&(!h&&b||A)){if(t.state?.message==="activation"){const y=sn(t.state?.pathnameStackToGoBack);e(t.pathname,{state:{...t.state,message:void 0,pathnameStackToGoBack:y.newStack}})}return n.jsxs(n.Fragment,{children:[n.jsx(Et,{showConfetti:c}),n.jsx(pe,{analytics:F,onLoad:y=>(I=>I.trackPageLoaded(je.Event.accountsPromoPageViewed))(y)}),n.jsx(me,{isAppContentDrawerOpen:i,handleDrawerToggle:S}),n.jsx(ga,{analytics:F,navigate:e,companyId:u,onClickMenuIcon:()=>{S(!0)},maxAnnualPercentageYield:r.maxAnnualPercentageYield,maxInsuredAmount:r.maxInsuredAmount,exampleBankBalance:3e6})]})}return n.jsx(se,{fetchState:"In-Progress",style:{backgroundColor:o.colors.grey5}})};function Ga(){const e=J(),t=k(z=>M(z)),s=R(),{useFeatureGate:a,useDynamicConfig:o}=$(),i=oe(),l=ae(i?.loggedInUserRoleMap),c=Ae(i?.loggedInUserRoleMap),d=!!t.company?.companyZeniAccountInfo.isZeniAccountEnabled,m=!!t.company?.companyZeniAccountInfo.isZeniAccountTOSAccepted,{isFeatureEnabled:C}=a(E.isChargeCardFeatureEnabled),{isFeatureEnabled:r}=a(E.isDebitCardFeatureEnabled),u=nn(t),g=Ie(r,t),h=t?.userRole!=null&&pt(t?.userRole),S=(t?.company==null||t.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!h)&&mt(i?.loggedInUserRoleMap),f=ht(i?.loggedInUserRoleMap),b=(t?.company==null||t.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!h)&&gt(i?.loggedInUserRoleMap),{isFeatureEnabled:A}=a(E.isDepositAccountsFeatureEnabled),y=A&&!h,{configValue:I}=o(H.expressPayConfig),P=I.is_enable_all_tenants===!0||I.tenant_ids!=null&&I.tenant_ids.includes(t.tenantId),{isFeatureEnabled:T}=a(E.isAutoTransferRuleEnabled),B=Tt(t,C,r)&&!h&&ft(i?.loggedInUserRoleMap),j=yt(i?.loggedInUserRoleMap),O=y&&ae(i?.loggedInUserRoleMap),w=O||Ze(i?.loggedInUserRoleMap);return n.jsxs(_e,{children:[n.jsx(x,{path:"setup",element:n.jsx(ze,{isBillPayAdminLevelAccess:S,isUserHasOnlyBillPayAccess:f,isReimbursementAdminLevelAccess:b,isZeniAccountAdminLevelAccess:O,isChargeCardAdminLevelAccess:B,isUserHasOnlyCardAccess:j,productType:"zeni_accounts",type:"setup"})}),n.jsx(x,{path:"verification",element:n.jsx(ze,{isBillPayAdminLevelAccess:S,isUserHasOnlyBillPayAccess:f,isReimbursementAdminLevelAccess:b,isZeniAccountAdminLevelAccess:O,isChargeCardAdminLevelAccess:B,isUserHasOnlyCardAccess:j,productType:"zeni_accounts",type:"verification"})}),T?n.jsxs(n.Fragment,{children:[n.jsx(x,{path:"auto-transfer",element:n.jsx(Ne,{})}),w?n.jsx(x,{path:"auto-transfer/:ruleId/edit",element:n.jsx(Ne,{isEditDrawerOpen:!0})}):null]}):n.jsx(x,{path:"auto-transfer",element:n.jsx(de,{})}),P&&l?n.jsxs(n.Fragment,{children:[n.jsx(x,{path:"express-pay",element:n.jsx(ce,{})}),n.jsx(x,{path:"express-pay/add-ach",element:n.jsx(ce,{isAddACHDrawerOpen:!0})}),n.jsx(x,{path:"express-pay/add-wire/add-address",element:n.jsx(ce,{isAddAddressDrawerOpen:!0})}),n.jsx(x,{path:"express-pay/add-wire",element:n.jsx(ce,{isAddWireDrawerOpen:!0})})]}):n.jsx(x,{path:"express-pay",element:n.jsx(de,{})}),n.jsx(x,{path:"promo",element:n.jsx(fa,{})}),u&&!g?n.jsx(x,{path:"/*",element:n.jsx(cn,{})}):d?n.jsxs(n.Fragment,{children:[n.jsx(x,{path:"/",element:n.jsx(ke,{})}),n.jsx(x,{path:"transfer",element:n.jsx(ke,{isTransferDrawerOpen:!0})}),n.jsx(x,{path:"check-deposit",element:n.jsx(ke,{isCheckDepositDrawerOpen:!0})}),n.jsx(x,{path:":accountId/*",element:n.jsx(ya,{})}),n.jsx(x,{path:"*",element:n.jsx(de,{})})]}):m&&l?n.jsx(x,{path:"*",element:n.jsx(te,{to:"../setup"})}):t.company?.companyZeniAccountInfo&&c?n.jsx(x,{path:"*",element:n.jsx(te,{to:"../promo",state:e.state})}):n.jsx(x,{path:"*",element:n.jsx(se,{fetchState:"In-Progress",style:{backgroundColor:s.colors.grey5,boxShadow:`0px 2px ${Bt.sp1} ${s.colors.dropShadowNormal}`}})})]})}function ya(){return n.jsxs(_e,{children:[n.jsx(x,{path:"/",element:n.jsx(le,{})}),n.jsx(x,{path:"account-info",element:n.jsx(le,{isAccountInfoDrawerOpen:!0})}),n.jsx(x,{path:"transfer",element:n.jsx(le,{isTransferDrawerOpen:!0})}),n.jsx(x,{path:"check-deposit",element:n.jsx(le,{isCheckDepositDrawerOpen:!0})}),n.jsx(x,{path:"transactions",element:n.jsx(ha,{})}),n.jsx(x,{path:"statements",element:n.jsx(Ut,{})}),n.jsx(x,{path:"*",element:n.jsx(de,{})})]})}export{Ga as default};
66
+ `;function fa(){const e=W(),t=U(),s=V(),{accountId:a}=G(),{useFeatureGate:o}=$(),{isFeatureEnabled:i}=o(E.isCheckingCommentingEnabled),[l,c]=p.useState(!1);p.useEffect(()=>{l||(c(!0),t(ct(a??"",!1)))},[l,t]);const d=w(m=>lt(m,a??""));if(D.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return n.jsx(ma,{windowSize:s,children:n.jsx(vt,{transactionListView:d,depositAccountId:a??"",isCheckingCommentingEnabled:i,onBackClick:()=>{e("../")}})})}const ha=Y(function(e,t){const{companyId:s}=t;return{zeniAccountSetupView:dt(e,s),meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true"}},function(e,t){const{navigate:s,companyId:a}=t;return{onSetupButtonClick:()=>{F.trackAccountsPromoPageClicked("Setup Accounts"),e(ut(a))},onBackClick:()=>{s("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{s("../setup",{relative:"path"})}}})(Pt),ga=()=>{const e=W(),t=J(),{tenantEmailDomain:s}=G(),{useDynamicConfig:a}=$(),o=R(),[i,l]=p.useState(!1),[c,d]=p.useState(!1),m=w(y=>M(y)),{configValue:C}=a(H.zeniAccountsConfig),r=De(C);p.useEffect(()=>{c===!1&&t.state?.message==="activation"&&d(!0)},[t.state]);const u=D.getSignedInUserTenant(s)?.companyId??m.companyId,h=D.getSignedInUser(),f=!!m.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,S=y=>{l(y)};if(h==null)throw Error("Can't access Zeni account promo page without signing in...");const g=oe(),b=ae(g?.loggedInUserRoleMap),A=Ae(g?.loggedInUserRoleMap);if(f&&b)return n.jsx(te,{to:"../../checking/setup"});if(m.company?.companyZeniAccountInfo&&(!f&&b||A)){if(t.state?.message==="activation"){const y=sn(t.state?.pathnameStackToGoBack);e(t.pathname,{state:{...t.state,message:void 0,pathnameStackToGoBack:y.newStack}})}return n.jsxs(n.Fragment,{children:[n.jsx(Et,{showConfetti:c}),n.jsx(pe,{analytics:F,onLoad:y=>(I=>I.trackPageLoaded(je.Event.accountsPromoPageViewed))(y)}),n.jsx(me,{isAppContentDrawerOpen:i,handleDrawerToggle:S}),n.jsx(ha,{analytics:F,navigate:e,companyId:u,onClickMenuIcon:()=>{S(!0)},maxAnnualPercentageYield:r.maxAnnualPercentageYield,maxInsuredAmount:r.maxInsuredAmount,exampleBankBalance:3e6})]})}return n.jsx(se,{fetchState:"In-Progress",style:{backgroundColor:o.colors.grey5}})};function Ga(){const e=J(),t=w(z=>M(z)),s=R(),{useFeatureGate:a,useDynamicConfig:o}=$(),i=oe(),l=ae(i?.loggedInUserRoleMap),c=Ae(i?.loggedInUserRoleMap),d=!!t.company?.companyZeniAccountInfo.isZeniAccountEnabled,m=!!t.company?.companyZeniAccountInfo.isZeniAccountTOSAccepted,{isFeatureEnabled:C}=a(E.isChargeCardFeatureEnabled),{isFeatureEnabled:r}=a(E.isDebitCardFeatureEnabled),u=nn(t),h=Ie(r,t),f=t?.userRole!=null&&pt(t?.userRole),S=(t?.company==null||t.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!f)&&mt(i?.loggedInUserRoleMap),g=ft(i?.loggedInUserRoleMap),b=(t?.company==null||t.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!f)&&ht(i?.loggedInUserRoleMap),{isFeatureEnabled:A}=a(E.isDepositAccountsFeatureEnabled),y=A&&!f,{configValue:I}=o(H.expressPayConfig),P=I.is_enable_all_tenants===!0||I.tenant_ids!=null&&I.tenant_ids.includes(t.tenantId),{isFeatureEnabled:T}=a(E.isAutoTransferRuleEnabled),B=Tt(t,C,r)&&!f&&gt(i?.loggedInUserRoleMap),j=yt(i?.loggedInUserRoleMap),O=y&&ae(i?.loggedInUserRoleMap),k=O||Ze(i?.loggedInUserRoleMap);return n.jsxs(_e,{children:[n.jsx(x,{path:"setup",element:n.jsx(ze,{isBillPayAdminLevelAccess:S,isUserHasOnlyBillPayAccess:g,isReimbursementAdminLevelAccess:b,isZeniAccountAdminLevelAccess:O,isChargeCardAdminLevelAccess:B,isUserHasOnlyCardAccess:j,productType:"zeni_accounts",type:"setup"})}),n.jsx(x,{path:"verification",element:n.jsx(ze,{isBillPayAdminLevelAccess:S,isUserHasOnlyBillPayAccess:g,isReimbursementAdminLevelAccess:b,isZeniAccountAdminLevelAccess:O,isChargeCardAdminLevelAccess:B,isUserHasOnlyCardAccess:j,productType:"zeni_accounts",type:"verification"})}),T?n.jsxs(n.Fragment,{children:[n.jsx(x,{path:"auto-transfer",element:n.jsx(Ne,{})}),k?n.jsx(x,{path:"auto-transfer/:ruleId/edit",element:n.jsx(Ne,{isEditDrawerOpen:!0})}):null]}):n.jsx(x,{path:"auto-transfer",element:n.jsx(de,{})}),P&&l?n.jsxs(n.Fragment,{children:[n.jsx(x,{path:"express-pay",element:n.jsx(ce,{})}),n.jsx(x,{path:"express-pay/add-ach",element:n.jsx(ce,{isAddACHDrawerOpen:!0})}),n.jsx(x,{path:"express-pay/add-wire/add-address",element:n.jsx(ce,{isAddAddressDrawerOpen:!0})}),n.jsx(x,{path:"express-pay/add-wire",element:n.jsx(ce,{isAddWireDrawerOpen:!0})})]}):n.jsx(x,{path:"express-pay",element:n.jsx(de,{})}),n.jsx(x,{path:"promo",element:n.jsx(ga,{})}),u&&!h?n.jsx(x,{path:"/*",element:n.jsx(cn,{})}):d?n.jsxs(n.Fragment,{children:[n.jsx(x,{path:"/",element:n.jsx(we,{})}),n.jsx(x,{path:"transfer",element:n.jsx(we,{isTransferDrawerOpen:!0})}),n.jsx(x,{path:"check-deposit",element:n.jsx(we,{isCheckDepositDrawerOpen:!0})}),n.jsx(x,{path:":accountId/*",element:n.jsx(ya,{})}),n.jsx(x,{path:"*",element:n.jsx(de,{})})]}):m&&l?n.jsx(x,{path:"*",element:n.jsx(te,{to:"../setup"})}):t.company?.companyZeniAccountInfo&&c?n.jsx(x,{path:"*",element:n.jsx(te,{to:"../promo",state:e.state})}):n.jsx(x,{path:"*",element:n.jsx(se,{fetchState:"In-Progress",style:{backgroundColor:s.colors.grey5,boxShadow:`0px 2px ${Bt.sp1} ${s.colors.dropShadowNormal}`}})})]})}function ya(){return n.jsxs(_e,{children:[n.jsx(x,{path:"/",element:n.jsx(le,{})}),n.jsx(x,{path:"account-info",element:n.jsx(le,{isAccountInfoDrawerOpen:!0})}),n.jsx(x,{path:"transfer",element:n.jsx(le,{isTransferDrawerOpen:!0})}),n.jsx(x,{path:"check-deposit",element:n.jsx(le,{isCheckDepositDrawerOpen:!0})}),n.jsx(x,{path:"transactions",element:n.jsx(fa,{})}),n.jsx(x,{path:"statements",element:n.jsx(Ut,{})}),n.jsx(x,{path:"*",element:n.jsx(de,{})})]})}export{Ga as default};