@zeniai/web-app-ui 5.1.47-qa → 5.1.48-qa

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (153) hide show
  1. package/dist/assets/AddressRoutes-zp_f5BIT.js +1 -0
  2. package/dist/assets/AddressScreen-CnWN_Byu.js +9 -0
  3. package/dist/assets/AiCfoScreen-BLL_nNLI.js +22 -0
  4. package/dist/assets/BillPayApprovalRoutes-fwQ-KbdW.js +1 -0
  5. package/dist/assets/BillPayRoutes-CXPLgeMx.js +119 -0
  6. package/dist/assets/BusinessVerificationPageScreen-CQCM86dl.js +9 -0
  7. package/dist/assets/CardsAiCfoScreen-B1gDFQIg.js +14 -0
  8. package/dist/assets/ChargeCardRoutes-r0QCF0_O.js +71 -0
  9. package/dist/assets/{CompanyPassportScreen-DDjqyMwX.js → CompanyPassportScreen-C21kd0sW.js} +1 -1
  10. package/dist/assets/ConnectionAuthScreen-Dy-zRzti.js +11 -0
  11. package/dist/assets/CustomerOnboardingAuthScreen-DZRY0rMp.js +1 -0
  12. package/dist/assets/CustomerOnboardingRoutes-BYPXAjQ4.js +23 -0
  13. package/dist/assets/{DashboardRoutes-DtoX2bSV.js → DashboardRoutes-HvDL4JQ9.js} +4 -4
  14. package/dist/assets/DefaultTenantHome-BgvzypN4.js +1 -0
  15. package/dist/assets/{DomesticWireDetailScreen-lyPlKl3e.js → DomesticWireDetailScreen-B4-ngaAr.js} +3 -3
  16. package/dist/assets/DrawerScreen-CCOxeY1b.js +1 -0
  17. package/dist/assets/EntityDetailRoutes-DmdWYlHp.js +1 -0
  18. package/dist/assets/ExpenseAutomationRoutes-BCAAiII0.js +25 -0
  19. package/dist/assets/FeaturePreviewScreen-DJsA6G2u.js +1 -0
  20. package/dist/assets/HubSpotOAuthCallbackScreen-gYH68XtL.js +1 -0
  21. package/dist/assets/MagicLinkRoutes-DPMWh3Wi.js +72 -0
  22. package/dist/assets/MagicLinkSignInScreen-BHjwFaIK.js +12 -0
  23. package/dist/assets/MobileAppDrawer-Co1JEy80.js +1 -0
  24. package/dist/assets/NotFoundScreen-BzCRT55X.js +1 -0
  25. package/dist/assets/NotificationRoutes-Bg32ZXm1.js +1 -0
  26. package/dist/assets/OAuthConsentScreen-CguAVsyN.js +1 -0
  27. package/dist/assets/PandLWithForecastRoutes-D4CBd4Zm.js +1 -0
  28. package/dist/assets/PeopleRoutes-BB-x72kE.js +22 -0
  29. package/dist/assets/PerformanceRoutes-B2gf_KmS.js +1 -0
  30. package/dist/assets/{Preview-CgleC3zF.js → Preview-BohCuc6u.js} +1 -1
  31. package/dist/assets/{QBOConnectionScreen-PJhN_FwV.js → QBOConnectionScreen-BQDAvDNh.js} +1 -1
  32. package/dist/assets/ReferralListScreen-dGvD_TyP.js +5 -0
  33. package/dist/assets/ReimbursementApprovalRoutes-B_LzfI5s.js +1 -0
  34. package/dist/assets/ReimbursementApprovalRuleDetailScreen-DTKjwmY6.js +1 -0
  35. package/dist/assets/{ReimbursementRoutes-B37DKpue.js → ReimbursementRoutes-BLhdkUwt.js} +12 -12
  36. package/dist/assets/ReportsRoutes-4lWPPfqg.js +1 -0
  37. package/dist/assets/RewardsRoutes-3GOO5hHW.js +1 -0
  38. package/dist/assets/ScreenRoutes-Q9t_VXud.js +2 -0
  39. package/dist/assets/SettingsRoutes-DcAtX4HB.js +57 -0
  40. package/dist/assets/SetupPagesScreen-CYV12QsA.js +29 -0
  41. package/dist/assets/SignInScreen-CCIcAet0.js +1 -0
  42. package/dist/assets/SignOutScreen-DzR-6ySq.js +9 -0
  43. package/dist/assets/TaskListScreen-DhuFLEvi.js +9 -0
  44. package/dist/assets/TaskRoutes-BePPWsqJ.js +9 -0
  45. package/dist/assets/TransactionDetailRoutes-Cw9T-pK7.js +1 -0
  46. package/dist/assets/{TransactionDetailScreen-DTpKVJNQ.js → TransactionDetailScreen-Bpr92k5W.js} +2 -2
  47. package/dist/assets/TransactionListRoutes-C6ZbEcTu.js +1 -0
  48. package/dist/assets/TreasuryRoutes-BvamC7Re.js +37 -0
  49. package/dist/assets/{VendorsRoutes-DcKzo6Bg.js → VendorsRoutes-lu3A3G0M.js} +27 -27
  50. package/dist/assets/WiseConfirmationScreen-CX-Fzehj.js +12 -0
  51. package/dist/assets/ZeniAccountRoutes-DpUutqtc.js +73 -0
  52. package/dist/assets/ZeniAccountStatementScreen-CeBv1Cnr.js +9 -0
  53. package/dist/assets/{accountMappingHelper-B6MS-2MI.js → accountMappingHelper-DwVJRdRo.js} +1 -1
  54. package/dist/assets/{analytics-PD1ubuhk.js → analytics-BUvTITrb.js} +1 -1
  55. package/dist/assets/{analyticsHelper-DugMUcaM.js → analyticsHelper-CakEIbyY.js} +1 -1
  56. package/dist/assets/{core-CBQNMmNB.js → core-wjM80qIn.js} +2 -2
  57. package/dist/assets/{decodeURIComponentSafe-CTFTZ79i.js → decodeURIComponentSafe-4aj60Fs2.js} +1 -1
  58. package/dist/assets/dnd-BK3JI-SF.js +6 -0
  59. package/dist/assets/{empty-JWZ-J0Ml.js → empty-CUF5cU17.js} +1 -1
  60. package/dist/assets/{index-CjTANTHH.js → empty-D8a3KaBg.js} +1 -1
  61. package/dist/assets/{emptyVideoElement-B-sm92eo.js → emptyVideoElement-DDXARDvi.js} +1 -1
  62. package/dist/assets/epic-sEosDzE-.js +2 -0
  63. package/dist/assets/getLocaleForTenant-ePVFO9y0.js +1 -0
  64. package/dist/assets/{index-R6GjjTB3.css → index-BUmr5maU.css} +1 -1
  65. package/dist/assets/{index-DQvz9Cq_.js → index-BVZpKi1S.js} +2 -2
  66. package/dist/assets/{index-C6g7x9Xf.js → index-CVCyRaz2.js} +30766 -26745
  67. package/dist/assets/index-CWHzFtd9.js +1 -0
  68. package/dist/assets/{index-CFJnQx3u.js → index-D3VvkPFN.js} +1 -1
  69. package/dist/assets/{index-I7xJZYV9.js → index-D8Ajpofo.js} +1 -1
  70. package/dist/assets/{index-CWc-abgd.js → index-DApnMePi.js} +1 -1
  71. package/dist/assets/{index-Df5QM9aG.js → index-DuIPJrPJ.js} +1 -1
  72. package/dist/assets/index-DypTJFR1.js +1 -0
  73. package/dist/assets/{lexical-Pu0UU7Gm.js → lexical-DcicQSkI.js} +1 -1
  74. package/dist/assets/{liveblocks-Dn3WlYDG.js → liveblocks-GsPfxkQ7.js} +1 -1
  75. package/dist/assets/{lottie-CyQvfguW.js → lottie-C5rIATv6.js} +1 -1
  76. package/dist/assets/{mui-BaxUp1f6.js → mui-BSDa87ap.js} +1 -1
  77. package/dist/assets/{pathToGoBack-C0RVd60M.js → pathToGoBack-CAzQiLsh.js} +1 -1
  78. package/dist/assets/{pdf-BdzM5lLL.js → pdf-BLNuomMl.js} +4 -4
  79. package/dist/assets/{pdf-lib-Ho0i9gSn.js → pdf-lib-BR9HrRu8.js} +1 -1
  80. package/dist/assets/{plaid-CkikokYa.js → plaid-50YvjniW.js} +1 -1
  81. package/dist/assets/{pusher-HxHyQmjg.js → pusher-DyWQA0RT.js} +1 -1
  82. package/dist/assets/{react-gdz5Za5l.js → react-BKGEXYtN.js} +1 -1
  83. package/dist/assets/{react-CcMSfEsT.js → react-Ci53z-6c.js} +1 -1
  84. package/dist/assets/{react-D0UgoMvf.js → react-CrU6fZvx.js} +1 -1
  85. package/dist/assets/{react-hQHX2Hwu.js → react-Dj2j64JD.js} +1 -1
  86. package/dist/assets/{react-y7uOpsli.js → react-DmfWUkEA.js} +1 -1
  87. package/dist/assets/{react-C-w13vuR.js → react-uWUXgbgu.js} +1 -1
  88. package/dist/assets/{recharts-cF7j6WPE.js → recharts-D4VpFd5q.js} +3 -3
  89. package/dist/assets/{routePaths-DlNlbaAA.js → routePaths-BYsH7YxB.js} +1 -1
  90. package/dist/assets/{sentry-BBtxjqBH.js → sentry-B2TzMFx9.js} +1 -1
  91. package/dist/assets/{url-jngClEHC.js → url-CcjxrMLZ.js} +1 -1
  92. package/dist/assets/{url-Da29OSrT.js → url-D1xNpCnF.js} +1 -1
  93. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-D_Q4HzQ3.js → useAiCfoDashboardSuggestedQuestionsChips-DIXV_4D6.js} +1 -1
  94. package/dist/assets/useAskAiCfoHostNavButtonProps-DdDNWlhJ.js +1 -0
  95. package/dist/assets/useCashManagementBanner-e8VaEdGn.js +1 -0
  96. package/dist/assets/{useDeviceId-B1_7g90r.js → useDeviceId-t80vtq4B.js} +1 -1
  97. package/dist/assets/useInitialThreadRequest-CCHKjkJV.js +1 -0
  98. package/dist/assets/{utils-DGbjXCxQ.js → utils-BwzhiOdE.js} +2 -2
  99. package/dist/assets/{withTransactionSidePanel-DFqH5ga0.js → withTransactionSidePanel-CYQhrzsL.js} +4 -4
  100. package/dist/assets/zeni-epic-state-DrcliB1J.js +13 -0
  101. package/dist/index.html +1 -1
  102. package/package.json +4 -4
  103. package/dist/assets/AddressRoutes-D_PJZStE.js +0 -1
  104. package/dist/assets/AddressScreen-BNSulfP2.js +0 -9
  105. package/dist/assets/AiCfoScreen-BRmtRqLo.js +0 -22
  106. package/dist/assets/BillPayApprovalRoutes-DSwN963F.js +0 -1
  107. package/dist/assets/BillPayRoutes-BKFIhw4T.js +0 -119
  108. package/dist/assets/BusinessVerificationPageScreen-Bh75FXTZ.js +0 -9
  109. package/dist/assets/ChargeCardRoutes-DuJHL5ER.js +0 -71
  110. package/dist/assets/ConnectionAuthScreen-BbpPecK9.js +0 -11
  111. package/dist/assets/CustomerOnboardingAuthScreen-CFfHRYF8.js +0 -1
  112. package/dist/assets/CustomerOnboardingRoutes-D6zOpJxc.js +0 -23
  113. package/dist/assets/DefaultTenantHome-BZ2NPVTh.js +0 -1
  114. package/dist/assets/DrawerScreen-D_M_HR61.js +0 -1
  115. package/dist/assets/EntityDetailRoutes-CDYJ8kN1.js +0 -1
  116. package/dist/assets/ExpenseAutomationRoutes-ClyCvyOU.js +0 -25
  117. package/dist/assets/FeaturePreviewScreen-pifRlvMk.js +0 -1
  118. package/dist/assets/HubSpotOAuthCallbackScreen-Dp-z4HfA.js +0 -1
  119. package/dist/assets/MagicLinkRoutes-BcW2etLk.js +0 -72
  120. package/dist/assets/MagicLinkSignInScreen-CPn8LjKM.js +0 -12
  121. package/dist/assets/MobileAppDrawer-CMqrUzty.js +0 -1
  122. package/dist/assets/NotFoundScreen-BWmMemx_.js +0 -1
  123. package/dist/assets/NotificationRoutes-B1UVibHD.js +0 -1
  124. package/dist/assets/OAuthConsentScreen-CfqHAduS.js +0 -1
  125. package/dist/assets/PandLWithForecastRoutes-DUIhGSTU.js +0 -1
  126. package/dist/assets/PeopleRoutes-BCWUNMRP.js +0 -22
  127. package/dist/assets/PerformanceRoutes-DdabGxr6.js +0 -1
  128. package/dist/assets/ReferralListScreen-CiOu2vwF.js +0 -5
  129. package/dist/assets/ReimbursementApprovalRoutes-orETMU81.js +0 -1
  130. package/dist/assets/ReimbursementApprovalRuleDetailScreen-D19M7wpr.js +0 -1
  131. package/dist/assets/ReportsRoutes-5ZVRpu4r.js +0 -1
  132. package/dist/assets/RewardsRoutes-DU8RtihJ.js +0 -1
  133. package/dist/assets/ScreenRoutes-CkJR8wCv.js +0 -2
  134. package/dist/assets/SettingsRoutes-BG5-7X8p.js +0 -57
  135. package/dist/assets/SetupPagesScreen-DEbuiMhl.js +0 -29
  136. package/dist/assets/SignInScreen-BQVRUain.js +0 -1
  137. package/dist/assets/SignOutScreen-CmoYzsXw.js +0 -9
  138. package/dist/assets/TaskListScreen-BJsKOwed.js +0 -9
  139. package/dist/assets/TaskRoutes-D99eqt35.js +0 -9
  140. package/dist/assets/TransactionDetailRoutes-DTfcZe3C.js +0 -1
  141. package/dist/assets/TransactionListRoutes-C0KioFUU.js +0 -1
  142. package/dist/assets/TreasuryRoutes-9IHrvCFk.js +0 -37
  143. package/dist/assets/WiseConfirmationScreen-DjrOQ8Bz.js +0 -12
  144. package/dist/assets/ZeniAccountRoutes-CBfR1pgu.js +0 -57
  145. package/dist/assets/ZeniAccountStatementScreen-B8cfC_y6.js +0 -9
  146. package/dist/assets/dnd-Z3xBQUdM.js +0 -6
  147. package/dist/assets/empty-DKpVzxls.js +0 -1
  148. package/dist/assets/epic-BKJlIWaw.js +0 -2
  149. package/dist/assets/getLocaleForTenant-D7ZwJ2SM.js +0 -1
  150. package/dist/assets/index-DtpzPOK-.js +0 -1
  151. package/dist/assets/useAskAiCfoHostNavButtonProps-C_v5Otmr.js +0 -1
  152. package/dist/assets/useInitialThreadRequest-CKOaiR-a.js +0 -1
  153. package/dist/assets/zeni-epic-state-kigW-Vb1.js +0 -13
@@ -1,29 +0,0 @@
1
- import{j as u}from"./liveblocks-Dn3WlYDG.js";import{h as Y,g as Q,u as X,i as G,j as E,N as R,n as W,s as Qe}from"./core-CBQNMmNB.js";import{bF as Xe,cl as Ie,NR as ye,eR as V,cx as en,yu as Z,yj as nn,O1 as tn,O4 as an,qL as ee,qz as ne,kg as te,sK as z,O6 as Ae,fG as $e,fF as Ge,fE as We,O7 as sn,yD as on,Cu as ke,Cl as _e,Ci as ve,C9 as K,Co as Pe,Cr as Ee,Cx as we,tc as Te,fV as cn,cs as rn,f0 as un,e_ as dn,e$ as ln,bs as pn,O8 as mn,Bb as le,BP as yn,O9 as fn,bG as gn,DK as pe,CO as Sn,Oa as bn,Ob as hn,DO as Cn,DS as In,sD as An,Ii as kn,En as Ce,Fo as me,Oc as _n,Od as vn,Oe as Pn,Of as He,Og as En,KM as wn,Ne as Tn,KY as Dn,Oh as qe,Oi as Be,EJ as Ke,ko as On,qC as Je,sM as Un,bE as je,sY as Re,cv as Fn,Oj as Ye,fj as Bn,E5 as Vn,E9 as xn,Ok as jn,Eq as Ne,Ol as Rn,Om as Nn,On as zn,Oo as Ln,fO as Mn,zO as Zn,Op as $n,zT as Gn,zS as Wn}from"./zeni-epic-state-kigW-Vb1.js";import{k as ae,s as ie,d as de,m as De,aN as J,z as w,x as se,e as T,B as Oe,g as $,bz as Hn,at as oe,bA as x,bB as qn,bC as Kn,af as xe,bD as Jn,v as ze,au as Le,J as Yn,A as Qn,bE as Xn,bF as et,bG as nt,a7 as tt}from"./index-C6g7x9Xf.js";import{a as C}from"./sentry-BBtxjqBH.js";import{n as Ve,D as at,S as it}from"./mui-BaxUp1f6.js";import{M as fe}from"./MobileAppDrawer-CMqrUzty.js";import N from"./NotFoundScreen-BWmMemx_.js";import{a as Me}from"./analyticsHelper-DugMUcaM.js";import{d as Ze}from"./routePaths-DlNlbaAA.js";import{B as Fe}from"./BusinessVerificationPageScreen-Bh75FXTZ.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="681b5580-c60b-466f-b73a-7d8c97120cef",e._sentryDebugIdIdentifier="sentry-dbid-681b5580-c60b-466f-b73a-7d8c97120cef")}catch{}})();const st=Ve.div`
2
- display: flex;
3
- height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,ot=W(function(e,o){const{isUserBillPayAdmin:t,companyId:a}=o,c=V(e),n=tn(e),i=w.getSignedInUser(),l=c.tenantId,s={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:l??""},r=an(e,a),p=t&&r.updateStatus.fetchState!=="In-Progress"&&r.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&r.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&r.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",y=!!c.companyZeniAccountInfo?.info?.isZeniAccountEnabled;return{billPaySetupView:r,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isAccountsEnabled:y,showIntlWiseWidget:o.showIntlWiseWidget,isDisabled:p,billpayApprovalView:n,meetingUrl:"https://meetings.hubspot.com/snehals/demo-bill-pay?embed=true",analytics:T,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:s}},function(e,o){const{navigate:t,companyId:a,currentTenant:c}=o;return{onBusinessVerificationSectionClick:()=>{t("../verification"),c?.company?.companyBillPayInfo!=null&&c?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(Z(a,!1,!0))},onSetupApprovalRulesSectionClick:()=>{t("../approval-rules")},onFetchLinkTokenClick:(n,i)=>{e(Te("bill_pay_setup",n,i))},onEstablishConnectionClick:n=>{e(we(n,a,"bill_pay_setup","bill_pay"))},onUpdatePaymentAccountStatus:(n,i,l)=>{e(Ee(n,i,"bill_pay","bill_pay_setup",l))},onUpdatePaymentAccountLoginStatus:(n,i)=>{e(Pe(!1,n,"bill_pay","bill_pay_setup",i))},onEstablishConnectionSuccess:()=>{e(Z(a,!0))},onEnableBillPayClick:()=>{e(K(a,"bill_pay"))},onUpdateAccountClick:(n,i,l)=>{e(l==="paymentAccount"?_e(n,i,"bill_pay","bill_pay_setup"):ve("reimbursement_setup",n,i))},onUpdatePrimaryFundingAccount:(n,i)=>{e(ke(a,"bill_pay_setup",n,i))},onEnableBillPaySuccess:()=>{t("../",{relative:"path"})},onBackClick:()=>{c?.companyBillPayInfo?.info?.isBillPayEnabled!=null&&c.companyBillPayInfo.info.isBillPayEnabled===!1?t("../.."):t("../",{relative:"path"})},onAcceptUpdatedTOS:()=>{e(on(a))},onAcceptUpdatedTOSSuccess:()=>{e(Z(a,!0))},onGetOtp:(n,i)=>{e(We(n,"SpendManagementSetup")),i!=null&&e(sn({officerType:i,phone:n}))},onResendOtp:n=>{e(Ge(n,"SpendManagementSetup"))},onVerifyOtp:(n,i)=>{e($e(n,i,"SpendManagementSetup"))},onVerifyOtpSuccess:(n,i)=>{n!=null&&i!=null&&e(z(a,n,"bill_pay",!0,!0))},onNavigateToDashboard:()=>{t("../../dashboard")},onNavigateToSettings:()=>{t("../bills/setup")},onInternationPaymentSetUpClick:()=>{t("../international-wire")},onCompanyOfficerUpdated:(n,i)=>{e(Ae({officerType:n,fileIds:i}))},onSendForVerificationClick:n=>{e(z(a,n,"bill_pay",!0,!0,!0))},updateFilesEntity:n=>{e(te({files:n}))},onDeleteFile:n=>{e(ne(n))},onEditFileName:(n,i)=>{e(ee(n,i.split(".")[0]))},onSignUpClick:()=>{o.hasZeniAccountsAdminAccess?window.open("../checking/promo","_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}})(Hn),ct=()=>{const e=Y(),o=Q(),t=X(),{tenantEmailDomain:a}=G(),c=ae(),n=Xe(c?.loggedInUserRoleMap),i=Ie(c?.loggedInUserRoleMap),{useFeatureGate:l,useDynamicConfig:s}=ie(),{isFeatureEnabled:r}=l(de.billPaySetupShowInternationalPaymentByWise),{isFeatureEnabled:p}=l(de.isBillPayLocalCurrencyFeatureEnabled),y=De(),{configValue:I}=s(J.zeniAccountsConfig),d=ye(I),[m,S]=C.useState(!1),v=C.useRef(!1),[g,f]=C.useState(!1),P=E(F=>F.billPaySetupViewState.fetchState),A=E(F=>V(F)),_=E(F=>F.billPaySetupApproverViewState.fetchState),b=A.companyId??w.getSignedInUserTenant(a)?.companyId;if(w.getSignedInUser()==null)throw Error("Can't access bill pay setup page without signing in...");const k=!!A.companyBillPayInfo?.info?.isBillPayTOSAccepted,h=en(c?.loggedInUserRoleMap);C.useEffect(()=>{v.current||P!=="Not-Started"||b==null?v.current||P!=="Completed"||b==null||A.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||(v.current=!0,t(Z(b,!1,!0))):(v.current=!0,t(Z(b,!0)))},[P,b,t]),C.useEffect(()=>{g||_!=="Not-Started"||(f(!0),t(nn(!0)))},[g,_,t]);const D=F=>{S(F)};if(k===!1||h&&!c?.loggedInUserRoleMap?.bill_pay_admin)return u.jsx(R,{to:"../promo"});if(k===!0&&c?.loggedInUserRoleMap!=null){const F=O=>O.trackPageLoaded($.Event.billPaySetup);return u.jsxs(st,{children:[u.jsx(se,{analytics:T,onLoad:O=>F(O)}),u.jsx(fe,{isAppContentDrawerOpen:m,handleDrawerToggle:D}),u.jsx(ot,{navigate:e,location:o,companyId:b,currentTenant:A,isUserBillPayAdmin:n,showIntlWiseWidget:r,onClickMenuIcon:()=>{D(!0)},hasZeniAccountsAdminAccess:i,accountsPromoConfig:d,isLocalCurrencyEnabled:p})]})}return u.jsx(Oe,{fetchState:"In-Progress",style:{backgroundColor:y.colors.grey5}})},Nt=(e,o)=>e!=null&&function(t){return t==="debit"||t==="credit"||t==="debit_and_credit"}(e)?e:o,zt=e=>`/${e}/cards`,Lt=e=>`/${e}/cards/setup`,Mt=e=>`/${e}/cards/onboard`,Zt=(e,o,t,a,c=!1)=>{let n=`/${e}/cards/${encodeURIComponent(o)}`;return a==null||a.status.code!=="inactive"||a.cardHolderUserId!==t.userId||a.type.code!=="business_physical_credit_card"&&a.type.code!=="business_physical_debit_card"?a!=null&&a.status.code==="active"&&a.cardHolderUserId===t.userId&&a.type.code==="business_physical_credit_card"&&c===!0?n+="/addToWallet":a==null||a.type.code!=="business_physical_debit_card"&&a.type.code!=="business_virtual_debit_card"||a.status.code!=="active"||a.cardHolderUserId!==t.userId||a.isPinSet!==!1||(n+="/setPin"):n+="/activate",n},$t=(e,o)=>e.find(t=>t.id===o),Gt=(e,o,t)=>!e||!o||t.fetchState==="Completed",rt=(e,o,t,a)=>({isCreditCardOffered:e,isDebitCardOffered:o,isDebitCardEnabled:t,isCreditCardEnabled:a}),Wt=(e,o)=>e?{creditCardCashbackOffer:`${o.cashbackAnalytics.creditCardCashbackOffer}%`,debitCardCashbackOffer:`${o.cashbackAnalytics.debitCardCashbackOffer}%`,totalEarnedCashback:x(o.cashbackSummary.cashbackEarned.amount),redeemedCashback:x(o.cashbackSummary.cashbackRedeemed.amount),availableCashback:x(o.cashbackSummary.cashbackAvailable.amount),creditCardCashbackRedemptionMode:o.cashbackAnalytics.creditCardCashbackRedemptionMode,debitCardCashbackRedemptionMode:o.cashbackAnalytics.debitCardCashbackRedemptionMode}:void 0,Ht=(e,o,t,a,c)=>e&&o&&t?{creditAccountId:a.id,creditAccountLimit:x(a.limit.amount),creditAccountAvailableAmount:x(a.available.amount),creditAccountSpentAmount:x(a.balance.amount+a.hold.amount),creditAccountStatus:a.status,outstandingBalance:x(c.remainingAmountDue.amount)}:void 0,qt=(e,o,t,a,c)=>e&&o&&t?{debitAccountId:a.depositAccounts.map(n=>n.id),debitAccountName:a.depositAccounts.map(n=>n.accountName),debitAccountBalance:a.depositAccounts.map(n=>x(n.accountBalance.available.amount)),debitCardsSpend:x(c?.currentMonthSpends.amount??0),debitAccountStatus:a.depositAccounts.map(n=>n.accountStatus)}:void 0,Kt=(e,o)=>e&&o.depositAccountLimit!=null&&o.chargeCard!=null?{debitAccountId:o.depositAccountLimit.id,debitAccountName:o.depositAccountLimit?.accountName??o.connectedAccount?.accountName,debitAccountBalance:x(o.depositAccountLimit?.accountBalance.available.amount),debitCardsSpend:x(o.chargeCard.limit.amount-o.chargeCard.available.amount),debitAccountStatus:o.depositAccountLimit?.accountStatus??o.connectedAccount?.accountStatus}:void 0,Jt=80,Yt=80,Qt=e=>e.companyId??w.getSignedInUserTenant(e.tenantEmailDomain)?.companyId,ut=({isBankingOnlyTenant:e,isDebitCardFeatureEnabled:o})=>o||e,dt=({isCardsOnlyTenant:e,isChargeCardFeatureEnabled:o,isBookKeepingTenant:t,isDebitCardProductVisible:a,chargeCardsCreditAccountLimit:c})=>(e||o||t)&&(!a||c>0),Xt=({isCardsOnlyTenant:e,isChargeCardFeatureEnabled:o,isBookKeepingTenant:t})=>e||o||t,ea=({cardInfo:e,isProductVisible:o,isTOSAccepted:t,isSetupEnabled:a,isUserHasCardsAdminLevelAccess:c,isUserHasCardsAccess:n})=>!!e&&o&&(!t&&c||n&&!c&&!a),lt=W(function(e,o){const{isUserChargeCardAdmin:t,chargeCardSetUpView:a,isDebitCardOnlyEnabled:c,isCreditCardOnlyEnabled:n}=o,i=V(e),l=w.getSignedInUser(),s=i.tenantId,r={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:s??""},p=t&&a.updateStatus.fetchState!=="In-Progress"&&a.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&a.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&a.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",y=!!i.companyZeniAccountInfo?.info?.isZeniAccountEnabled;return{chargeCardSetUpView:a,connectedAccountProvider:i.company?.featuresActivationInfo.connectedAccountProvider??"",isAccountsEnabled:y,isDisabled:p,meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true",analytics:T,isDebitCardOnlyEnabled:c,isCreditCardOnlyEnabled:n,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:r}},function(e,o){const{navigate:t,companyId:a,currentTenant:c,chargeCardSetUpView:n,isDebitCardTOSAccepted:i,isChargeCardTOSAccepted:l,isChargeCardSetupEnabled:s,isDebitCardSetupEnabled:r,productInformation:p,controllerEmails:y,businessVerificationStatus:I}=o;return{onBusinessVerificationSectionClick:()=>{T.trackCardsVerifyIdentityCompanyDetailsClick(y,p,I?.code),t("../verification"),c?.company?.companyChargeCardInfo!=null&&c.company.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(le(a,!1,!0))},onFetchLinkTokenClick:(d,m)=>{e(Te("charge_card_setup",d,m))},onEstablishConnectionClick:d=>{e(we(d,a,"charge_card_setup","charge_cards"))},onUpdatePaymentAccountStatus:(d,m,S)=>{e(Ee(d,m,"charge_cards","charge_card_setup",S))},onUpdatePaymentAccountLoginStatus:(d,m)=>{e(Pe(!1,d,"charge_cards","charge_card_setup",m))},onEstablishConnectionSuccess:()=>{e(le(a,!0))},onEnableChargeCardClick:()=>{T.trackCardsEnableCardsClick(y,p,"Cards Card Setup"),l===!0&&i===!0&&s===!1&&r===!1?e(K(a,"charge_cards__debit_cards")):l===!0&&s===!1?e(K(a,"charge_cards")):i===!0&&r===!1&&e(K(a,"debit_cards"))},onUpdateChargeCardClick:(d,m,S)=>{const v=n.allBankAccounts.find(f=>f.accountId===n.primaryFundingAccount?.zeniAccountId),g=n.allBankAccounts.find(f=>f.accountId===d);T.trackCardsZeniCashAccountChangeClick(y,p,{oldZeniCashAccount:v?.accountName??"",newZeniCashAccount:g?.accountName??"",oldZeniCashAccountPosition:n.allBankAccounts.findIndex(f=>f.accountId===n.primaryFundingAccount?.zeniAccountId)+1,newZeniCashAccountPosition:n.allBankAccounts.findIndex(f=>f.accountId===d)+1,numberOfCashAccounts:n.allBankAccounts.length}),e(S==="paymentAccount"?_e(d,m,"charge_cards","charge_card_setup"):ve("charge_card_setup",d,m))},onUpdatePrimaryFundingAccount:(d,m)=>{const S=n.allFundingAccounts.find(f=>f.id===d),v=n.allFundingAccounts.findIndex(f=>f.id===n.primaryFundingAccount?.id)+1,g=n.allFundingAccounts.findIndex(f=>f.id===d)+1;T.trackCardsPaymentAccountChangeClick(y,p,{oldPaymentAccountName:n.primaryFundingAccount?.label??"",oldPaymentAccountBalance:x(n.primaryFundingAccount?.accountBalance?.available?.amount??0),newPaymentAccountName:S?.label??"",newPaymentAccountBalance:x(S?.accountBalance?.available?.amount??0),isOldPaymentAccountRecommended:n.primaryFundingAccount?.accType==="depositAccount",isNewPaymentAccountRecommended:S?.accType==="depositAccount",oldPaymentAccountPosition:v,newPaymentAccountPosition:g,numberOfPaymentAccounts:n.allFundingAccounts.length}),e(ke(a,"charge_card_setup",d,m))},onEnableChargeCardSuccess:()=>{e(fn()),t("../",{relative:"path"})},onBackClick:()=>{c?.companyChargeCardInfo?.info?.isChargeCardEnabled||c?.companyDebitCardInfo?.info?.isDebitCardEnabled?t("../",{relative:"path"}):t("../..",{relative:"path"})},onNavigateToDashboard:()=>{t("../../dashboard")},onCompanyOfficerUpdated:(d,m)=>{e(Ae({officerType:d,fileIds:m}))},onSendForVerificationClick:d=>{l===!0&&i===!0?e(z(a,d,"charge_cards__debit_cards",!0,!0,!0)):l===!0?e(z(a,d,"charge_cards",!0,!0,!0)):i===!0&&e(z(a,d,"debit_cards",!0,!0,!0))},updateFilesEntity:d=>{e(te({files:d}))},onDeleteFile:d=>{e(ne(d))},onEditFileName:(d,m)=>{e(ee(d,m.split(".")[0]))},onSignUpClick:()=>{o.hasZeniAccountsAdminAccess?window.open("../checking/promo","_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")},onUpdateAutoPayClick:d=>{e(yn(a,d))}}})(qn),pt=()=>{const e=Y(),o=Q(),t=X(),{tenantEmailDomain:a}=G(),c=ae(),n=E(L=>V(L)),{useDynamicConfig:i,useFeatureGate:l}=ie(),s=o.state?.pathnameStackToGoBack?.[0],{configValue:r}=i(J.zeniAccountsConfig),{configValue:p}=i(J.zeniCardsConfig),y=p.credit_card_auto_pay_threshold_by_company_id?.[n.companyId]??p.default_credit_card_auto_pay_threshold??80,{isFeatureEnabled:I}=l(de.isDebitCardFeatureEnabled),{isFeatureEnabled:d}=l(de.isChargeCardFeatureEnabled),{isFeatureEnabled:m}=l(de.isEarlyPayFeatureEnabled),S=E(L=>cn(L,n.companyId)),v=rn(S.controllers),g=!!n.company?.companyChargeCardInfo.isChargeCardEnabled,f=!!n.company?.companyDebitCardInfo.isDebitCardEnabled,P=un(I,n),A=ut({isDebitCardFeatureEnabled:I,isBankingOnlyTenant:P}),_=dn(n),b=ln(n),k=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,h=dt({isCardsOnlyTenant:_,isChargeCardFeatureEnabled:d,isBookKeepingTenant:b,isDebitCardProductVisible:A,chargeCardsCreditAccountLimit:k}),D=A&&h===!1,F=A===!1&&h,O=ye(r),B=pn(c?.loggedInUserRoleMap),ce=Ie(c?.loggedInUserRoleMap),[H,ge]=C.useState(!1),[q,re]=C.useState(!1),M=E(L=>L.chargeCardSetupViewState.fetchState),j=w.getSignedInUserTenant(a)?.companyId??n.companyId,U=w.getSignedInUser(),Ue=L=>{ge(L)},Se=E(L=>mn(L,j));if(U==null)throw Error("Can't access charge card setup page without signing in...");C.useEffect(()=>{q||M!=="Not-Started"||j==null?q||M!=="Completed"||j==null||n.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||t(le(j,!1,!0)):(re(!0),t(le(j,!0)))},[q,M,j,t]);const be=!!n.company?.companyChargeCardInfo.isChargeCardTOSAccepted,he=!!n.company?.companyDebitCardInfo.isDebitCardTOSAccepted,ue=rt(h,A,f,g);return be||he?be||he?u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:T,onLoad:()=>{T.trackPageLoaded($.Event.cardsSetupVisited),T.trackCardsCardSetupView(v,ue,s==null?"Cards Setup":s.includes("cards/promo")?"Promo":s.includes("cards")?"Settings":"Cards Tab")}}),u.jsx(fe,{isAppContentDrawerOpen:H,handleDrawerToggle:Ue}),u.jsx(lt,{autoPayThreshold:y,navigate:e,location:o,companyId:j,currentTenant:n,isEarlyPayEnabled:m,isChargeCardTOSAccepted:be,isDebitCardTOSAccepted:he,isUserChargeCardAdmin:B,isDebitCardOnlyEnabled:D,isCreditCardOnlyEnabled:F,chargeCardSetUpView:Se,isCreditCardProductVisible:h,isDebitCardFeatureEnabled:A,isChargeCardSetupEnabled:g,isDebitCardSetupEnabled:f,businessVerificationStatus:n.companyBillPayInfo?.info?.businessVerificationStatus,controllerEmails:v,productInformation:ue,onClickMenuIcon:()=>{Ue(!0)},hasZeniAccountsAdminAccess:ce,accountsPromoConfig:O})]}):u.jsx(Oe,{fetchState:"Not-Started"}):u.jsx(R,{to:"../promo"})},mt=Ve.div`
10
- display: flex;
11
- height: 100%;
12
- width: 100%;
13
- flex: 1 1 auto;
14
- flex-direction: column;
15
- align-items: center;
16
- background-color: ${e=>e.theme.colors.grey4};
17
- `,yt=W(function(e,o){const{isUserRemiAdmin:t,companyId:a}=o,c=V(e),n=bn(e),i=hn(e,a),l=w.getSignedInUser(),s=c.tenantId,r={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:s??""},p=t&&i.updateStatus.fetchState!=="In-Progress"&&i.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&i.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&i.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",y=!!c.companyZeniAccountInfo?.info?.isZeniAccountEnabled;return{remiSetupView:i,isDisabled:p,remiApprovalView:n,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isAccountsEnabled:y,meetingUrl:"https://meetings.hubspot.com/niharn/demo-reimbursements?embed=true",analytics:T,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:r}},function(e,o){const{navigate:t,companyId:a,currentTenant:c}=o;return{updateMileageDetails:n=>{const{mileageAmount:i,mileageUnit:l,mileageCurrencyCode:s,mileageCurrencySymbol:r,denomination:p,denominationSymbol:y,mileageAmountInDenomination:I,description:d}=n;e(In({mileageDetails:{mileageUnitAmount:{amount:i,currencyCode:s,currencySymbol:r},denomination:p,denominationSymbol:y,mileageAmountInDenomination:I,mileageCurrencyCode:s,mileageCurrencySymbol:r,mileageUnit:l,description:d}}))},onSaveMileageClick:n=>{e(Cn(a)),T.trackReimbursementMileageRateSave(n)},onBusinessVerificationSectionClick:()=>{t("../verification"),c?.company?.companyReimbursementInfo!=null&&c?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(pe(a,!1,!0))},onSetupApprovalRulesSectionClick:()=>{t("../approval-rules")},onFetchLinkTokenClick:(n,i)=>{e(Te("reimbursement_setup",n,i))},onEstablishConnectionClick:n=>{e(we(n,a,"reimbursement_setup","reimbursement"))},onUpdatePaymentAccountStatus:(n,i,l)=>{e(Ee(n,i,"reimbursement","reimbursement_setup",l))},onUpdatePaymentAccountLoginStatus:(n,i)=>{e(Pe(!1,n,"reimbursement","reimbursement_setup",i))},onEstablishConnectionSuccess:()=>{e(pe(a,!0))},onEnableRemiClick:()=>{e(K(a,"reimbursement"))},onUpdateAccountClick:(n,i,l)=>{e(l==="paymentAccount"?_e(n,i,"reimbursement","reimbursement_setup"):ve("reimbursement_setup",n,i))},onEnableRemiSuccess:()=>{t("../",{relative:"path"})},onBackClick:()=>{c?.companyReimbursementInfo?.info?.isReimbursementEnabled!=null&&c.companyReimbursementInfo.info.isReimbursementEnabled===!1?t("../.."):t("../",{relative:"path"})},onCompanyOfficerUpdated:(n,i)=>{e(Ae({officerType:n,fileIds:i}))},onSendForVerificationClick:n=>{e(z(a,n,"reimbursement",!0,!0,!0))},updateFilesEntity:n=>{e(te({files:n}))},onDeleteFile:n=>{e(ne(n))},onEditFileName:(n,i)=>{e(ee(n,i.split(".")[0]))},onUpdatePrimaryFundingAccount:(n,i)=>{e(ke(a,"reimbursement_setup",n,i))},onSignUpClick:()=>{o.hasZeniAccountsAdminAccess?window.open("../checking/promo","_blank"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}})(Kn),ft=()=>{const e=Y(),o=Q(),t=X(),{tenantEmailDomain:a}=G(),c=ae(),{useDynamicConfig:n}=ie(),i=De(),{configValue:l}=n(J.zeniAccountsConfig),s=ye(l),r=gn(c?.loggedInUserRoleMap),p=Ie(c?.loggedInUserRoleMap),[y,I]=C.useState(!1),d=C.useRef(!1),[m,S]=C.useState(!1),v=E(b=>b.remiSetupViewState.fetchState),g=E(b=>V(b)),f=E(b=>b.remiSetupApproverViewState.fetchState),P=w.getSignedInUserTenant(a)?.companyId??g.companyId,A=w.getSignedInUser(),_=b=>{I(b)};if(A==null)throw Error("Can't access reimbursement setup page without signing in...");if(C.useEffect(()=>{d.current||v!=="Not-Started"||P==null?d.current||v!=="Completed"||P==null||g.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||(d.current=!0,t(pe(P,!1,!0))):(d.current=!0,t(pe(P,!0)))},[v,P,t]),C.useEffect(()=>{m||f!=="Not-Started"||(S(!0),t(Sn(!0)))},[m,f,t]),g.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1)return u.jsx(R,{to:"../promo"});if(g.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!0){const b=k=>k.trackPageLoaded($.Event.reimbursementSetup);return u.jsxs(mt,{children:[u.jsx(se,{analytics:T,onLoad:k=>b(k)}),u.jsx(fe,{isAppContentDrawerOpen:y,handleDrawerToggle:_}),u.jsx(yt,{navigate:e,location:o,companyId:P,currentTenant:g,isUserRemiAdmin:r,onClickMenuIcon:()=>{_(!0)},hasZeniAccountsAdminAccess:p,accountsPromoConfig:s})]})}return u.jsx(Oe,{fetchState:"In-Progress",style:{backgroundColor:i.colors.grey5}})},gt=W(function(e,o){const{businessVerificationDetails:t,productType:a}=o,c=V(e),n=w.getSignedInUser(),i=c.tenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:i??""},s=wn(o.roleMap)&&t.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",r=Tn(e.companyConfigState),p=Dn(e.userRoleConfigState),y=a==="zeni_treasury"?qe(e):void 0;return{businessVerificationDetails:t,verficationDetailsFetchState:t.fetchState,isRefreshingViewInBackground:t.isRefreshingViewInBackground,allNationalityCountries:t.allNationalityCountries,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:l,isDisabled:s,allIndustries:r.companyIndustries??[],companyTitles:p.companyTitles,transferDetails:y}},function(e,o){const{companyId:t,productType:a,currentTenant:c,navigate:n,location:i}=o,{tenantEmailDomain:l}=c;return{onCompanyDetailsChanged:s=>{const{companyDescription:r,companyIndustry:p,companyIndustryType:y,companyLegalName:I,companyTaxId:d,companyWebsite:m,companyPhone:S,primaryContactEmail:v,primaryContactName:g,primaryContactUserId:f,primaryContactSyncToken:P,syncToken:A,fileIds:_,incDate:b,typeOfIncorporation:k,stateOfIncorporation:h,sourceOfFunds:D,companySubIndustry:F,countriesOfOperations:O,companySourceOfFunds:B,companySourceOfFundsDescription:ce,transactionVolume:H,transactionVolumeDescription:ge,purposeOfAccount:q,purposeOfAccountDescription:re,regulatedStatus:M,regulatedStatusDescription:j,usNexus:U,usNexusTypes:Ue}=s,Se=y?.selectedOption,be={companyId:t,companyDescription:r,companyIndustry:p.selectedOption,companyIndustryType:Se==null||Se===""?void 0:Se,companyLegalName:I,taxIdOrEIN:d,website:m!=""&&m!=null?Fn(m):void 0,phone:S,syncToken:A,fileIds:_,incDate:b!=null?je(b?.toString()):b,typeOfIncorporation:k?.selectedOption??"",stateOfIncorporation:h?.selectedOption??"",sourceOfFunds:D?.selectedOption??"",companySubIndustry:F?.selectedOption??"",countriesOfOperations:O?.selectedOptions.map(ue=>ue.length===2?ue:Le(ue))??[],companySourceOfFunds:B?.selectedOption??"",companySourceOfFundsDescription:ce,transactionVolume:H?.selectedOption??"",transactionVolumeDescription:ge,purposeOfAccount:q?.selectedOption??"",purposeOfAccountDescription:re,regulatedStatus:M??"",regulatedStatusDescription:j,usNexus:U,usNexusTypes:Ue?.selectedOptions??[]},he={userId:f,firstName:g.firstName,lastName:g.lastName,email:v,syncToken:P};e(Re({companyDetails:be,primaryContactDetails:he}))},onCompanyOfficerUpdated:s=>{const r=s.map(p=>{const{officerType:y,userId:I,name:d,email:m,nationalityCountryCode:S,ssn:v,dob:g,phone:f,syncToken:P,selectDocument:A,role:_,ownership:b,isSelectedForVerification:k,userVerificationStatus:h,treasuryUserVerificationStatus:D,fileIds:F}=p;let O;return A.selectDocumentType==="driverLicense"?O="driving_license":A.selectDocumentType==="passport"?O="passport":A.selectDocumentType==="stateId"?O="id_document":A.selectDocumentType==="ssnCard"&&(O="social_security_card"),{officerType:y,userId:I,firstName:d.firstName,lastName:d.lastName,email:m,ssn:v,nationalityCountryCode:S?.selectedOption!=null?Le(S.selectedOption):void 0,phone:f,birthday:g!=null?je(g?.toString()):g,syncToken:P,titleAtCompany:_.selectedOption,ownershipInCompany:b,documentTypeSelectedForVerification:O,isSelectedForVerification:k,userVerificationStatus:h,treasuryUserVerificationStatus:D,fileIds:F,additionalDocumentTypesRequestedForVerification:[],additionalSubmittedDocumentsForVerificationFileIds:[],areAdditionalDocumentsRequestedForVerification:!1,areAdditionalDocumentsSubmittedForVerification:!1}});e(Re({officers:r}))},onSaveDetailsClick:s=>{e(z(t,s,a))},onSendForVerificationClick:s=>{e(z(t,s,a,!0))},onAddressClick:s=>{const r=Ze(l,s),p=ze(i.state?.pathnameStackToGoBack,i.pathname),y=new URLSearchParams(i.search),I={};y.forEach((d,m)=>{I[m]=d}),n(r,{state:{pathnameStackToGoBack:p,queryParams:Object.keys(I).length>0?I:void 0}})},onRegisteredAddressClick:s=>{const r=Ze(l,s),p=ze(i.state?.pathnameStackToGoBack,i.pathname),y=new URLSearchParams(i.search),I=Object.fromEntries(y.entries());n(r,{state:{pathnameStackToGoBack:p,queryParams:Object.keys(I).length>0?I:void 0}})},onBackClick:()=>{e(Un({companyId:t})),n("../setup")},updateFilesEntity:s=>{e(te({files:s}))},onDeleteFile:s=>{e(ne(s))},onDeleteFileList:s=>{e(Je(s))},onEditFileName:(s,r)=>{e(ee(s,r.split(".")[0]))},onGetOtp:s=>{e(We(s,"SpendManagementSetup"))},onResendOtp:s=>{e(Ge(s,"SpendManagementSetup"))},onVerifyOtp:(s,r)=>{e($e(s,r,"SpendManagementSetup"))},saveNewAddressInLocalStore:(s,r)=>{e(On({addressType:s,addressToCreate:r}))},onExecuteTreasuryTransfer:()=>{e(Ke())},onOverlayClose:()=>{e(Be())}}})(Jn),St=({productType:e,isBusinessVerificationDrawerOpen:o,closeDrawerHandler:t})=>{const a=Y(),c=Q(),n=X(),[i]=Qe(),l=i.get("showStepProgress"),s=i.get("isTransferInitiated"),[r,p]=C.useState(!1),{tenantEmailDomain:y}=G(),I=ae(),{useDynamicConfig:d}=ie(),m=De(),{configValue:S}=d(J.zeniAccountsConfig),v=ye(S),g=E(h=>{switch(e){case"zeni_accounts":return h.zeniAccountSetupViewState.fetchState;case"reimbursement":return h.remiSetupViewState.fetchState;case"charge_cards":return h.chargeCardSetupViewState.fetchState;case"zeni_treasury":return h.treasurySetupViewState.fetchState;default:return h.billPaySetupViewState.fetchState}}),f=E(h=>h.companyConfigState.fetchState),P=E(h=>h.userRoleConfigState.fetchState),A=E(h=>V(h)),_=A.companyId??w.getSignedInUserTenant(y)?.companyId;if(C.useEffect(()=>{f==="Not-Started"&&n(An()),P==="Not-Started"&&n(kn(!0))},[f,P,n]),C.useEffect(()=>{if(!r&&g==="Not-Started"&&_!=null)switch(p(!0),e){case"zeni_accounts":n(me(_,!0));break;case"zeni_treasury":n(Ce(_,!0));break;case"reimbursement":n(pe(_,!0));break;case"charge_cards":n(le(_,!0));break;default:n(Z(_,!0))}},[r,g,_,n]),w.getSignedInUser()==null)throw Error("Can't access business verification without signing in...");let b;switch(e){case"zeni_accounts":b=A.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted;break;case"reimbursement":b=A.companyReimbursementInfo?.info?.isReimbursementTOSAccepted;break;case"charge_cards":b=A.companyChargeCardInfo?.info?.isChargeCardTOSAccepted===!0||A.companyDebitCardInfo?.info?.isDebitCardTOSAccepted;break;case"zeni_treasury":b=A.companyTreasuryInfo?.info?.isTreasuryTOSAccepted;break;default:b=A.companyBillPayInfo?.info?.isBillPayTOSAccepted}const k=E(h=>{let D;switch(e){case"zeni_accounts":D=En(h,_);break;case"zeni_treasury":D=He(h,_);break;case"charge_cards":D=Pn(h,_);break;case"reimbursement":D=vn(h,_);break;default:D=_n(h,_)}return D});return b===!1?null:k.fetchState==="Completed"&&b===!0&&I?.loggedInUserRoleMap!=null?u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:T,onLoad:h=>(D=>{switch(e){case"zeni_accounts":return D.trackPageLoaded($.Event.zeniAccountsBusinessVerification);case"reimbursement":case"charge_cards":return D.trackPageLoaded($.Event.reimbursementBusinessVerification);default:return D.trackPageLoaded($.Event.billPayBusinessVerification,xe(c)?"Settings":void 0)}})(h)}),u.jsx(gt,{businessVerificationDetails:k,navigate:a,location:c,companyId:_,analytics:T,currentTenant:A,productType:e,roleMap:I.loggedInUserRoleMap,isSettings:xe(c),isOverlay:!0,isStepInProgress:l!=null,isTreasuryTransferInitiated:s!=null,onClickMenuIcon:()=>{},maxInsuredAmount:v.maxInsuredAmount,isBusinessVerificationDrawerOpen:o,closeDrawerHandler:t})]}):u.jsx(Oe,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})},bt={overlayWidth:new Qn(100,100,59)},ht=W(function(e,o){const{isUserZeniAccountsAdmin:t,companyId:a,accountsPromoConfig:c}=o,n=V(e),i=w.getSignedInUser(),l=n.tenantId,s={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:l??""},r=Ye(e,a),p=He(e,a),y=t&&r.updateStatus.fetchState!=="In-Progress"&&r.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&r.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&r.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly",I=jn(e),d=I.transactions,m=qe(e),S=I.accountSummary?.totalBalance?.amount,v=d.length===0||S===0;return{treasurySetupView:r,businessVerificationDetails:p,connectedAccountProvider:n.company?.featuresActivationInfo.connectedAccountProvider??"",transactions:d,transferDetails:m,isFirstTransfer:v,isDisabled:y,meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true",analytics:T,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:s,isOnSetup:!0,maxInsuredAmount:c.maxInsuredAmount}},function(e,o){const{navigate:t,companyId:a,currentTenant:c,isAllocationDone:n,analytics:i,treasurySetupView:l}=o;return{onTransferSaveChangesToLocalStore:s=>{e(zn(s))},onBusinessVerificationSectionClick:(s,r)=>{let p="../verification";s&&(p+="?showStepProgress=true",r&&(p+="&isTransferInitiated=true")),t(p),c?.company?.companyTreasuryInfo!=null&&c?.company?.companyTreasuryInfo?.businessVerificationStatus?.code==="pending_review"&&e(Ce(a,!1,!0))},onFetchLinkTokenClick:(s,r)=>{e(Te("treasury_setup",s,r))},onEstablishConnectionClick:s=>{e(we(s,a,"treasury_setup","zeni_treasury"))},onUpdatePaymentAccountStatus:(s,r,p)=>{e(Ee(s,r,"zeni_treasury","treasury_setup",p))},onUpdatePaymentAccountLoginStatus:(s,r)=>{e(Pe(!1,s,"zeni_treasury","treasury_setup",r))},onEstablishConnectionSuccess:()=>{e(Ce(a,!0))},onEnableTreasuryClick:()=>{e(K(a,"zeni_treasury"))},onUpdateTreasuryClick:(s,r,p)=>{e(p==="paymentAccount"?_e(s,r,"zeni_treasury","treasury_setup"):ve("treasury_setup",s,r))},onUpdatePrimaryFundingAccount:(s,r)=>{e(ke(a,"treasury_setup",s,r))},onNavigateToDashboard:()=>{t(c?.company?.companyTreasuryInfo?.businessVerificationStatus?.code==="verified"?"../":"../../")},onCompanyOfficerUpdated:(s,r)=>{e(Ae({officerType:s,fileIds:r}))},onSendForVerificationClick:(s,r)=>{if(e(z(a,s,"zeni_treasury",!0,!0,!0)),!n){const p=l.fundAllocationLocalData;i.trackTreasuryPortfolioConfirm(p.riskScore,Me(p)),e(Ne(!1))}r===!0&&e(Ke())},updateFilesEntity:s=>{e(te({files:s}))},onDeleteFile:s=>{e(ne(s))},onEditFileName:(s,r)=>{e(ee(s,r.split(".")[0]))},onAdditionalVerificationFieldsChanged:s=>{const{sourceOfFunds:r}=s;e(Nn({sourceOfFunds:r?.selectedOption??""}))},onUpdateFundAllocation:s=>{i.trackTreasuryAllocationAction("update",Me(s)),e(Rn(s))},onConfirmFundAllocation:()=>{e(Ne(n))},onSignUpClick:()=>{o.isUserZeniAccountsAdmin?window.open("../checking/promo","_blank","noopener,noreferrer"):window.open("https://www.zeni.ai/product/business-checking-accounts","_blank","noopener,noreferrer")},onOverlayClose:()=>{e(Be())}}})(Xn),Ct=()=>{const e=Y(),o=Q(),t=X(),a=De(),c=Yn(),{tenantEmailDomain:n}=G(),{useDynamicConfig:i}=ie(),l=ae(),[s,r]=C.useState(!1),p=Ie(l?.loggedInUserRoleMap),{configValue:y}=i(J.zeniAccountsConfig),I=ye(y),[d,m]=C.useState(!1),[S,v]=C.useState(!1),[g,f]=C.useState(!1),[P,A]=C.useState(!1),[_,b]=C.useState(!1),k=E(U=>U.treasurySetupViewState.fetchState),h=E(U=>U.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),D=E(U=>U.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=E(U=>U.treasuryDetailState.transactionsState?.fetchState),O=E(U=>V(U)),B=w.getSignedInUserTenant(n)?.companyId??O.companyId,ce=E(U=>Ye(U,B)),H=ce.isAtomicAccountExists,ge=!!O.companyZeniAccountInfo?.info?.isZeniAccountEnabled,q=w.getSignedInUser(),re=U=>{m(U)};if(q==null)throw Error("Can't access treasury setup page without signing in...");C.useEffect(()=>{S||k!=="Not-Started"||B==null||(v(!0),t(Ce(B,!0,!1)))},[S,k,B,t]),C.useEffect(()=>{g||h!=="Not-Started"||B==null||(f(!0),t(Bn()))},[g,h,B,t]),C.useEffect(()=>{P||D!=="Not-Started"||B==null||(A(!0),t(Vn()))},[P,D,B,t]),C.useEffect(()=>{_||F!=="Not-Started"||B==null||(b(!0),t(xn(!0)))},[_,F,B,t]);const M=O.companyTreasuryInfo?.info?.businessVerificationStatus?.code,j=M==="pending_review"||M==="verified";return C.useEffect(()=>{s||k!=="Completed"||H||j||!o.pathname.includes("setup")||r(!0)},[k,H,j]),O.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1?u.jsx(R,{to:"../promo"}):u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:T,onLoad:()=>{}}),u.jsx(fe,{isAppContentDrawerOpen:d,handleDrawerToggle:re}),u.jsx(at,{onClose:()=>{t(Be()),e("../setup")},anchor:"right",open:o.pathname.includes("verification"),transitionDuration:s?0:250,PaperProps:{style:{width:bt.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:s?"transparent":a.colors.black,opacity:.75,cursor:"pointer"}}},children:u.jsx(It,{onClick:U=>U.stopPropagation(),children:u.jsx(St,{productType:"zeni_treasury",isBusinessVerificationDrawerOpen:!0,closeDrawerHandler:()=>{t(Be()),e("../setup")}})})}),u.jsx(ht,{navigate:e,location:o,companyId:B,currentTenant:O,isUserZeniAccountsAdmin:p,accountsPromoConfig:I,isAccountsEnabled:ge,isAllocationDone:H,analytics:T,treasurySetupView:ce,onClickMenuIcon:()=>{re(!0)},showTreasurySetupOverlay:s,setShowTreasurySetupOverlay:r})]})},It=Ve(it)`
18
- display: flex;
19
- min-height: 100%;
20
- flex-direction: column;
21
- `,At=W(function(e,o){const{isUserZeniAccountsAdmin:t,companyId:a}=o,c=V(e),n=w.getSignedInUser(),i=c.tenantId,l={userId:n?.userId??"",sessionId:n?.zeniSessionId??"",tenantId:i??""},s=Ln(e,a),r=t&&s.updateStatus.fetchState!=="In-Progress"&&s.plaidConnectionDetails.link_account.updateStatus.fetchState!=="In-Progress"&&s.plaidConnectionDetails.update_account.updateStatus.fetchState!=="In-Progress"&&s.accountUpdateStatus?.fetchState!=="In-Progress"?void 0:"readonly";return{zeniAccountSetUpView:s,connectedAccountProvider:c.company?.featuresActivationInfo.connectedAccountProvider??"",isDisabled:r,meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true",analytics:T,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:l}},function(e,o){const{navigate:t,companyId:a,currentTenant:c}=o;return{onBusinessVerificationSectionClick:()=>{t("../verification"),c?.company?.companyZeniAccountInfo!=null&&c?.company?.companyBillPayInfo?.businessVerificationStatus?.code==="pending_review"&&e(me(a,!1,!0))},onFetchLinkTokenClick:(n,i)=>{e(Te("account_setup",n,i))},onEstablishConnectionClick:n=>{e(we(n,a,"account_setup","zeni_accounts"))},onUpdatePaymentAccountStatus:(n,i,l)=>{e(Ee(n,i,"zeni_accounts","account_setup",l))},onUpdatePaymentAccountLoginStatus:(n,i)=>{e(Pe(!1,n,"zeni_accounts","account_setup",i))},onEstablishConnectionSuccess:()=>{e(me(a,!0))},onEnableZeniAccountClick:()=>{e(K(a,"zeni_accounts"))},onUpdateZeniAccountClick:(n,i,l)=>{e(l==="paymentAccount"?_e(n,i,"zeni_accounts","account_setup"):ve("account_setup",n,i))},onUpdatePrimaryFundingAccount:(n,i)=>{e(ke(a,"account_setup",n,i))},onEnableZeniAccountSuccess:()=>{t("../",{relative:"path"})},onBackClick:()=>{c?.companyZeniAccountInfo?.info?.isZeniAccountEnabled?t("../"):t("../../")},onNavigateToDashboard:()=>{t("../../dashboard")},onCompanyOfficerUpdated:(n,i)=>{e(Ae({officerType:n,fileIds:i}))},onSendForVerificationClick:n=>{e(z(a,n,"zeni_accounts",!0,!0,!0))},updateFilesEntity:n=>{e(te({files:n}))},onDeleteFile:n=>{e(ne(n))},onEditFileName:(n,i)=>{e(ee(n,i.split(".")[0]))}}})(et),kt=()=>{const e=Y(),o=Q(),t=X(),{tenantEmailDomain:a}=G(),{useDynamicConfig:c}=ie(),n=ae(),i=Ie(n?.loggedInUserRoleMap),{configValue:l}=c(J.zeniAccountsConfig),s=ye(l),[r,p]=C.useState(!1),[y,I]=C.useState(!1),d=E(f=>f.zeniAccountSetupViewState.fetchState),m=E(f=>V(f)),S=w.getSignedInUserTenant(a)?.companyId??m.companyId,v=w.getSignedInUser(),g=f=>{p(f)};if(v==null)throw Error("Can't access zeni bank account setup page without signing in...");if(C.useEffect(()=>{y||d!=="Not-Started"||S==null?y||d!=="Completed"||S==null||m.companyBillPayInfo?.info?.businessVerificationStatus?.code!=="pending_review"||t(me(S,!1,!0)):(I(!0),t(me(S,!0)))},[y,d,S,t]),m.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted===!1)return u.jsx(R,{to:"../promo"});{const f=P=>P.trackPageLoaded($.Event.zeniAccountsSetup);return u.jsxs(u.Fragment,{children:[u.jsx(se,{analytics:T,onLoad:P=>f(P)}),u.jsx(fe,{isAppContentDrawerOpen:r,handleDrawerToggle:g}),u.jsx(At,{navigate:e,location:o,companyId:S,currentTenant:m,isUserZeniAccountsAdmin:i,accountsPromoConfig:s,onClickMenuIcon:()=>{g(!0)}})]})}},_t=Ve.div`
22
- display: flex;
23
- height: 100vh;
24
- width: 100%;
25
- flex: 1 1 auto;
26
- flex-direction: column;
27
- align-items: center;
28
- background-color: ${e=>e.theme.colors.grey4};
29
- `,vt=W(function(e,o){const t=V(e),a=w.getSignedInUser(),c=t.tenantId,n={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:c??""};return{internationalOnboardingDetails:$n(e),isReadonly:o.isFormReadonly,filesEndPoint:`${oe.fileMicroServiceBaseUrl}`,authParams:n,analytics:T}},function(e,o){const{navigate:t}=o;return{onFormDataChange:a=>{e(Wn(a))},onSubmitClick:()=>{e(Gn(o.companyId))},onCancelClick:()=>{t("../setup")},updateFilesEntity:a=>{e(te({files:a}))},onDeleteFile:a=>{e(ne(a))},onDeleteFileList:a=>{e(Je(a))},onEditFileName:(a,c)=>{e(ee(a,c.split(".")[0]))}}})(nt),Pt=()=>{const e=Y(),o=Q(),t=X(),[a,c]=C.useState(!1),[n,i]=C.useState(!1),[l,s]=C.useState(!1),{tenantEmailDomain:r}=G(),p=ae(),{useFeatureGate:y}=ie(),{isFeatureEnabled:I}=y(de.isBillPayLocalCurrencyFeatureEnabled),d=E(k=>k.internationalWireVerificationState.verificationFormFetchState.fetchState),m=E(k=>k.billPaySetupViewState.fetchState),S=E(k=>V(k)),v=De(),g=S.companyId??w.getSignedInUserTenant(r)?.companyId,f=E(k=>Mn(k.companyState,S.companyId)),P=f?.company.companyBillPayInfo.internationalWireOnboardingStatus,A=P?.code==="onboarding_status_not_started"?void 0:"readonly";if(C.useEffect(()=>{a||d!=="Not-Started"||g==null||(c(!0),t(Zn(g)))},[a,d,g,t]),C.useEffect(()=>{n||m!=="Not-Started"||g==null||(i(!0),t(Z(g,!0)))},[m,n,g,t]),w.getSignedInUser()==null)throw Error("Can't access international verification without signing in...");const _=S.companyBillPayInfo?.info?.isBillPayTOSAccepted,b=k=>{s(k)};return _===!1?u.jsx(R,{to:"../promo"}):_===!0&&p?.loggedInUserRoleMap!=null?u.jsxs(_t,{children:[u.jsx(se,{analytics:T,onLoad:k=>(h=>h.trackPageLoaded($.Event.billPayBusinessVerification,void 0))(k)}),xe(o)?u.jsx(fe,{isAppContentDrawerOpen:l,handleDrawerToggle:b}):null,u.jsx(vt,{navigate:e,location:o,companyId:g,analytics:T,currentTenant:S,roleMap:p.loggedInUserRoleMap,isFormReadonly:A,isLocalCurrencyEnabled:I})]}):u.jsx(Oe,{fetchState:"In-Progress",style:{backgroundColor:v.colors.grey5}})},Et=W(function(){return{}},function(e,o){const{companyId:t,productType:a}=o;return{onEventReceived:c=>{switch(c){case"bill-pay-set-up-verification-update":case"bill-pay-wise-setup":switch(a){case"reimbursement":e(pe(t,!0,!0));break;case"zeni_accounts":e(me(t,!0,!0));break;case"charge_cards":e(le(t,!0,!0));break;case"zeni_treasury":e(Ce(t,!0,!0));break;default:e(Z(t,!0,!0))}}}}})(tt(e=>{const{isBillPayAdminLevelAccess:o,isUserHasOnlyBillPayAccess:t,isReimbursementAdminLevelAccess:a,isZeniAccountAdminLevelAccess:c,isTreasuryAdminLevelAccess:n,isChargeCardAdminLevelAccess:i,isUserHasOnlyCardAccess:l,productType:s,type:r}=e;switch(s){case"bill_pay":switch(r){case"verification":return o?u.jsx(Fe,{productType:s}):t?u.jsx(R,{to:"../"}):u.jsx(N,{});case"international-wire":return o?u.jsx(Pt,{}):t?u.jsx(R,{to:"../"}):u.jsx(N,{});default:return o?u.jsx(ct,{}):t?u.jsx(R,{to:"../"}):u.jsx(N,{})}case"reimbursement":return r==="verification"?a?u.jsx(Fe,{productType:s}):u.jsx(N,{}):a?u.jsx(ft,{}):u.jsx(N,{});case"zeni_accounts":return r==="verification"?c?u.jsx(Fe,{productType:"zeni_accounts"}):u.jsx(N,{}):c?u.jsx(kt,{}):u.jsx(N,{});case"zeni_treasury":return n===!0?u.jsx(Ct,{}):u.jsx(N,{});case"charge_cards":return r==="verification"?i?u.jsx(Fe,{productType:"charge_cards"}):l?u.jsx(R,{to:"../"}):u.jsx(N,{}):i?u.jsx(pt,{}):l?u.jsx(R,{to:"../"}):u.jsx(N,{})}}));function na(e){const{tenantEmailDomain:o}=G(),t=E(c=>V(c)).companyId??w.getSignedInUserTenant(o)?.companyId,a={events:t!=null?[`private-encrypted-${t}.bill-pay-set-up-verification-update`,`private-encrypted-${t}.bill-pay-wise-setup`]:[],eventCallback:(c,n,i)=>{i.onEventReceived(c)}};if(w.getSignedInUser()==null)throw Error("Can't access setup details page without signing in...");return u.jsx(Et,{...e,companyId:t,...a})}export{Jt as A,Yt as P,na as S,Ht as a,Kt as b,ut as c,dt as d,rt as e,Qt as f,Zt as g,zt as h,Wt as i,qt as j,Xt as k,Gt as l,$t as m,Lt as n,Mt as o,Nt as p,ea as s};
@@ -1 +0,0 @@
1
- import{j as u}from"./liveblocks-Dn3WlYDG.js";import{a as f,b as x,q as A}from"./sentry-BBtxjqBH.js";import{u as D,h as z,j as c,g as M,N as j,n as O}from"./core-CBQNMmNB.js";import{u as P,z as s,m as F,e as E,D as K,f as N,g as _,T as B,h as J,i as V,j as v}from"./index-C6g7x9Xf.js";import{eR as Y,JY as $,JZ as q,eY as R,fp as W,K2 as H,fN as Z,cT as G,K3 as b,K4 as Q,K5 as X,bT as y}from"./zeni-epic-state-kigW-Vb1.js";import"./mui-BaxUp1f6.js";import{u as ee}from"./useDeviceId-B1_7g90r.js";import{f as te}from"./analyticsHelper-DugMUcaM.js";import{t as ne}from"./getLocaleForTenant-D7ZwJ2SM.js";import"./recharts-cF7j6WPE.js";import"./analytics-PD1ubuhk.js";import"./plaid-CkikokYa.js";import"./dnd-Z3xBQUdM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CyQvfguW.js";import"./lexical-Pu0UU7Gm.js";import"./pdf-BdzM5lLL.js";import"./utils-DGbjXCxQ.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]="eea2192a-7cbc-4ae9-82dd-a49e15c3aad6",t._sentryDebugIdIdentifier="sentry-dbid-eea2192a-7cbc-4ae9-82dd-a49e15c3aad6")}catch{}})();const ae=O(function(t,a){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:i,magicLinkExpiredEmail:l}=a;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:i,magicLinkExpiredEmail:l}},function(t,a){const{location:d,navigate:g}=a;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,i)=>{A({message:`OAuth error from provider ${i} with error ${n}`,level:"error",tags:{authProvider:i,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,i)=>{const l=i==="google"?window.location.origin:window.location.origin+window.location.pathname;t(X({authCode:n,oauthProvider:i,appType:"web",redirectUri:y(l),sourceUri:y(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:i}=a;i!=null&&(s.saveMagicLinkEmail(n),t(Q(n,i)))},clearSignInError:()=>{t(b())}}})(V),ie=x.memo(ae);function ve({setTenantEmailDomain:t}){const a=D(),d=z(),{clearAllLoading:g}=P(),n=s.getSignedInUser();f.useLayoutEffect(()=>{g()},[g]);const i=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),S=c(e=>e.tenantState.signInState),o=c(e=>e.tenantState.loggedInUser),r=c(e=>Y(e)),I=c(e=>$(e)),m=M(),w=F().mode,T=m.state?.magicLinkExpired,U=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(()=>{S!=="In-Progress"||p!=="Completed"&&L!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(q(I.tenantsInOrder),o.zeniSessionId),R(o.userId,o.zeniSessionId,r.tenantId),a(W(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),a(H("Completed")),K.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),Z().then(()=>{const e=J();e!=null&&N(e)}),setTimeout(()=>{E.trackLogin(_.Event.loginSuccess,o.authProvider??"google",G(r.productSettings))},2e3))},[S,p,L,o,r,I,w,m.state,a]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return u.jsx(j,{to:e,state:{...m.state,origin:""}})}return u.jsxs(u.Fragment,{children:[u.jsx(ie,{magicLinkExpired:!!T,magicLinkAlreadyUsed:!!U,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:i??void 0,showEmailLogin:!0}),C===!0&&k!=null?u.jsx(B,{onClose:()=>a(b()),unlockDate:k}):null]})}export{ve as default};
@@ -1,9 +0,0 @@
1
- import{j as s}from"./liveblocks-Dn3WlYDG.js";import{a as n}from"./sentry-BBtxjqBH.js";import{u,g as m,h as g,N as p}from"./core-CBQNMmNB.js";import{z as f,B as y,t as h,e as l,g as b}from"./index-C6g7x9Xf.js";import{fS as x,fT as I,Kk as w}from"./zeni-epic-state-kigW-Vb1.js";import{n as j}from"./mui-BaxUp1f6.js";import"./recharts-cF7j6WPE.js";import"./analytics-PD1ubuhk.js";import"./plaid-CkikokYa.js";import"./dnd-Z3xBQUdM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CyQvfguW.js";import"./lexical-Pu0UU7Gm.js";import"./pdf-BdzM5lLL.js";import"./utils-DGbjXCxQ.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]="09495237-999e-4971-a511-2c548a6a2aa3",e._sentryDebugIdIdentifier="sentry-dbid-09495237-999e-4971-a511-2c548a6a2aa3")}catch{}})();function $(){const e=u(),t=m(),a=g(),i=n.useRef(!1),c=f.isSignedIn(),r=t.state?.message==="logout",o=r||c;return n.useEffect(()=>{o&&!i.current&&(i.current=!0,setTimeout(()=>{try{f.clearAll(),e(x()),e(I(!1)),w(),h.reset(),l.trackLogout(b.Event.logoutSuccess),l.resetUserIdentity()}catch(d){console.error("Error during sign out:",d)}finally{r||a("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(k,{children:s.jsx(y,{fetchState:"In-Progress"})}):s.jsx(p,{to:"../",replace:!0})}const k=j.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,9 +0,0 @@
1
- import{j as d}from"./liveblocks-Dn3WlYDG.js";import{a as D}from"./sentry-BBtxjqBH.js";import{h as U,u as z,g as K,j as b,i as _,n as V}from"./core-CBQNMmNB.js";import{z as L,s as H,d as p,Z as M,x as O,e as W,g as Z,cT as q,v as g,r as J}from"./index-C6g7x9Xf.js";import{eR as Q,Rn as F,H3 as y,Ro as x,Rj as X,Gr as E,Rp as Y,Gz as S,FV as aa,H4 as I,Rq as R,gV as ea,GW as ta,G$ as sa,GO as oa,GM as B,H0 as na,GJ as ia,Rr as la,Rs as ra,Rt as ka,Ru as ca,Rv as m,ed as ua,Rw as da,Rx as pa}from"./zeni-epic-state-kigW-Vb1.js";import{n as ma}from"./mui-BaxUp1f6.js";import{u as Ta}from"./useAskAiCfoHostNavButtonProps-C_v5Otmr.js";import{M as ga}from"./MobileAppDrawer-CMqrUzty.js";import"./recharts-cF7j6WPE.js";import"./analytics-PD1ubuhk.js";import"./plaid-CkikokYa.js";import"./dnd-Z3xBQUdM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CyQvfguW.js";import"./lexical-Pu0UU7Gm.js";import"./pdf-BdzM5lLL.js";import"./utils-DGbjXCxQ.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]="a127fec7-d351-413f-b9a0-b07f8fe32183",e._sentryDebugIdIdentifier="sentry-dbid-a127fec7-d351-413f-b9a0-b07f8fe32183")}catch{}})();const fa=ma.div`
2
- display: flex;
3
- min-height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,Ga=V(function(e,t){const o=F(e,t.isTaskTemplatesEnabled),{taskGroupId:k}=t,n=k!=null&&k!==""?{...o,taskGroupsWithTasksList:o.taskGroupsWithTasksList.map(l=>({...l,tasks:l.tasks.filter(a=>a.taskGroupIds.includes(k))})).filter(l=>l.tasks.length>0)}:o,u=X(e),i=L.isZeniUser();return{taskListView:n,tagListView:u,localData:n.localData,isTaskTemplatesEnabled:t.isTaskTemplatesEnabled,isZeniUser:i}},function(e,t){const{navigate:o,currentTenant:k,location:n,isTaskTemplatesEnabled:u}=t,{tenantEmailDomain:i}=k,{groupByKey:l}=t.uiState;return{onTaskManagementRowClick:a=>{const s=w(i,a),c=g(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:c}})},onReloadTasks:()=>{e(y(!0,u))},onTabChange:a=>{e(ca(a))},onParentTaskClick:a=>{const s=w(i,a);window.open(s,"_blank","noopener")},bulkUpdateTasks:(a,s)=>{e(B(a,null,s))},onNewTaskClick:()=>{if(t.localData.defaultTaskGroupId!=null){const a=C(i,t.localData.defaultTaskGroupId),s=g(n.state?.pathnameStackToGoBack,n.pathname);o(a,{state:{pathnameStackToGoBack:s,message:"comingFromTaskListPage"}})}},onColumnSortConfigChanged:(a,s)=>{e(R({uiState:{sortKey:a,sortOrder:s}}))},onFiltersChange:a=>{e(ka({filters:a}))},onSearchTextChanged:a=>{e(ra({searchText:a}))},onReloadCards:()=>{e(y(!0,u))},onBackClick:()=>{if(n.state?.message==="triggerBackClick"){const a=J(n.state?.pathnameStackToGoBack),s=a.poppedPathname??"../";o(s,{state:{pathnameStackToGoBack:a.newStack}})}else o("../")},updateLocalData:a=>{e(la({localData:a}))},resetLocalData:()=>{e(x({taskGroupById:t.taskGroupState.taskGroupById}))},handleCreateGroup:a=>{e(ia(t.localData.newTaskGroupName,a))},assignGroupToTasks:a=>{e(B(t.localData.selectedTaskIds,a,na(t.uiState.groupByKey,a)))},onDeleteTaskGroup:a=>{e(oa(a))},onAddNewTaskToTaskGroup:a=>{if(t.localData.defaultTaskGroupId!=null){const s=ha(l,a);e(E({taskDetailLocalData:s}));const c=C(i,t.uiState.groupByKey==="groupName"?a:t.localData.defaultTaskGroupId),f=g(n.state?.pathnameStackToGoBack,n.pathname);o(c,{state:{pathnameStackToGoBack:f,message:"comingFromTaskListPage"}})}},onDragNDrop:(a,s)=>{e(sa(t.localData.selectedTaskIds.length>0?t.localData.selectedTaskIds:[a],s))},onTaskGroupRename:(a,s)=>{e(ta(a,s))},onTimeSpentUpdate:(a,s)=>{e(I({task:a,updates:s}))},onShowToast:a=>{e(ea(a))},onGroupByFilterChange:a=>{e(R({uiState:{groupByKey:a}}))},updateTask:(a,s)=>{e(I({task:a,updates:s}))},onCreateTagClick:(a,s)=>{e(aa(a,s))},handleGroupTemplateClick:a=>{e(S(a,[]))},handleGroupTemplateTaskClick:(a,s)=>{e(S(a,[s]))},handleNewTaskInitialization:a=>{if(e(E({taskDetailLocalData:{...Y,name:a}})),t.localData.defaultTaskGroupId!=null){const s=C(i,t.localData.defaultTaskGroupId),c=g(n.state?.pathnameStackToGoBack,n.pathname);o(s,{state:{pathnameStackToGoBack:c,message:"comingFromTaskListPage"}})}},onTaskGroupNameClick:a=>{o(`/${i}/tasks/group/${a}`)},onQuickResponsesClick:()=>{o(`/${i}/tasks/quick-responses`)}}})(q);function va(){const e=U(),t=z(),o=K(),k=L.getSignedInUser(),n=b(r=>Q(r)),{taskGroupId:u}=_(),{useFeatureGate:i}=H(),{isFeatureEnabled:l}=i(p.isTaskTemplatesEnabled),{isFeatureEnabled:a}=i(p.isTaskCannedResponsesEnabled),{isFeatureEnabled:s}=i(p.isTaskCategorizationEnabled),{isFeatureEnabled:c}=i(p.isTaskBulkResolutionEnabled),{isFeatureEnabled:f}=i(p.isTaskGroupAssigneesEnabled),{isFeatureEnabled:A}=i(p.isTaskRecurringParentEnabled),[P,$]=D.useState(!1),G=b(r=>F(r,l)),h=b(r=>r.taskGroupState),T=G.fetchState,{isAiCfoAccessEnabled:j,onAskAiCfoClick:v}=Ta({mobileExploreReferrer:"Task Checklist"});if(M({isDataReady:T==="Completed"}),D.useEffect(()=>{t(y(!1,l))},[n?.tenantId,t,l]),D.useEffect(()=>{T==="Completed"&&t(x({taskGroupById:h.taskGroupById}))},[T,h.taskGroupById]),k==null)throw Error("Can't access task list page without signing in...");return d.jsxs(d.Fragment,{children:[T==="Completed"?d.jsx(O,{analytics:W,onLoad:r=>(N=>N.trackPageLoaded(Z.Event.taskListPage))(r)}):null,d.jsxs(fa,{children:[d.jsx(ga,{isAppContentDrawerOpen:P,handleDrawerToggle:r=>{$(r)}}),d.jsx(Ga,{location:o,navigate:e,currentTenant:n,taskGroupId:u,taskGroupState:h,localData:G.localData,uiState:G.uiState,isTaskTemplatesEnabled:l,taskListFetchState:T,isTaskCategorizationEnabled:s,isTaskCannedResponsesEnabled:a,isTaskBulkResolutionEnabled:c,isTaskGroupAssigneesEnabled:f,isTaskRecurringParentEnabled:A,isAiCfoAccessEnabled:j,onAskAiCfoClick:v})]})]})}const w=(e,t)=>`/${e}/tasks/${encodeURIComponent(t)}`,C=(e,t)=>`/${e}/tasks/new/${t}`,ha=(e,t)=>{if(e==="assignee"){const o=t.split(",");return{...m.taskDetailLocalData,assignee:o}}if(e==="priority"){const o=ua(t);return{...m.taskDetailLocalData,priority:o}}if(e==="status"){const o=da(t);return{...m.taskDetailLocalData,status:o}}if(e==="tag"){const o=t.split(",");return{...m.taskDetailLocalData,tagIds:o}}if(e==="dueDate"){const o=pa(t);return{...m.taskDetailLocalData,dueDate:o}}return{...m.taskDetailLocalData}};export{va as default};
@@ -1,9 +0,0 @@
1
- import{j as n}from"./liveblocks-Dn3WlYDG.js";import se from"./NotFoundScreen-BWmMemx_.js";import{a as c}from"./sentry-BBtxjqBH.js";import{h as M,u as Z,j as g,g as ne,i as oe,N as ie,n as re,o as ce,p as f}from"./core-CBQNMmNB.js";import{G6 as O,G9 as le,G3 as de,eR as H,Rj as Y,Gn as J,G0 as pe,GT as ue,GM as ke,Rk as W,Rl as N,FY as me,FV as fe,qL as ge,qz as he,kg as Se,Gh as Ie,Rm as Ge,Gy as Te,Gv as be,Gc as Ee,Gs as Ce,Gr as De}from"./zeni-epic-state-kigW-Vb1.js";import{z as C,cR as xe,H as Re,s as je,d as T,r as X,v,x as ye,e as V,g as ve,cS as we,j as q,at as Fe}from"./index-C6g7x9Xf.js";import{n as Be}from"./mui-BaxUp1f6.js";import{u as Pe}from"./useInitialThreadRequest-CKOaiR-a.js";import{M as Ue}from"./MobileAppDrawer-CMqrUzty.js";import Le from"./TaskListScreen-BJsKOwed.js";import"./recharts-cF7j6WPE.js";import"./analytics-PD1ubuhk.js";import"./plaid-CkikokYa.js";import"./dnd-Z3xBQUdM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CyQvfguW.js";import"./lexical-Pu0UU7Gm.js";import"./pdf-BdzM5lLL.js";import"./utils-DGbjXCxQ.js";import"./useAskAiCfoHostNavButtonProps-C_v5Otmr.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]="20f2bf07-c832-4c04-a06f-a15c64f2ba51",e._sentryDebugIdIdentifier="sentry-dbid-20f2bf07-c832-4c04-a06f-a15c64f2ba51")}catch{}})();function $e(){const e=M(),t=Z(),s=C.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=g(o=>o.cannedResponsesState),l=c.useCallback(()=>{t(O())},[t]),k=c.useCallback((o,h,S)=>{t(le({name:o,content:h,cannedResponseId:S}))},[t]),a=c.useCallback(o=>{t(de({cannedResponseId:o}))},[t]);if(s==null)throw Error("Can't access quick responses page without signing in...");return n.jsx(xe,{cannedResponses:u,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:l,onSave:k})}let A,_=[];const ze=re(function(e,t){const{location:s,taskGroupId:u}=t,r=W(e,t.taskId),d=H(e),l=r.taskGroupId??u,k=l!=null?N(e.taskGroupState,l):void 0,a=C.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},S=Y(e),{tenantEmailDomain:D}=d,b=r.recurringSourceTaskId,x=b!=null?`${q.appUrl}/${D}/tasks/${encodeURIComponent(b)}`:void 0;var I;return{taskDetailSelectorView:r,authParams:h,isZeniUser:C.isZeniUser(),userGroupList:((I=e.userGroupsState.userGroupByUserGroupId)!==A&&(A=I,_=Object.values(I)),_),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Fe.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${q.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:x,tagListView:S,taskGroupName:l!=null&&k!=null&&k.isDefault===!1?k.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map(p=>N(e.taskGroupState,p)).filter(p=>p!=null&&!p.isDeleted).map(p=>({id:p.id,name:p.name,isDefault:p.isDefault}))}},function(e,t){const{taskId:s,navigate:u,currentTenant:r,location:d,taskGroupId:l}=t,{tenantEmailDomain:k}=r;return{onSaveChangesToLocalStore:a=>{e(De({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ce(s,a??l))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ee(t.taskId))},onSnoozeTask:(a,o)=>{e(be(a,o))},onUnsnoozeTask:a=>{e(Te(a))},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const a=X(d.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";u(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=w(k),o=v(d.state?.pathnameStackToGoBack,d.pathname);u(a,{state:{pathnameStackToGoBack:o}})}e(Ge({taskId:s}))},onDeleteTaskClick:()=>{e(Ie(s))},updateFilesEntity:a=>{e(Se({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(ge(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(J(!1,s))},onCreateTagClick:a=>{e(fe(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(O())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(we);function y(){const e=M(),t=Z(),s=ne(),u=Re(),{taskId:r,taskGroupId:d}=oe(),l=g(i=>H(i)),k=Pe(l?.companyId),{useFeatureGate:a}=je(),{isFeatureEnabled:o}=a(T.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(T.isTaskVisibilityEnabled),{isFeatureEnabled:S}=a(T.isTaskCannedResponsesEnabled),{isFeatureEnabled:D}=a(T.isTaskRecurringParentEnabled),{isFeatureEnabled:b}=a(T.isTaskGroupAssigneesEnabled),[x,I]=c.useState(!1),[p,K]=c.useState(!1),[F,Q]=c.useState(!1),[B,ee]=c.useState(!1),[P,R]=c.useState(!1),G=c.useRef(!1),E=g(i=>i.taskListState.updateTasksFetchState.fetchState),U=g(i=>Y(i)),L=g(i=>i.taskGroupViewState.fetchState);c.useEffect(()=>{p||(K(!0),t(J(!1,r)))},[p,t]),c.useEffect(()=>{F||U.fetchState==="Completed"||(Q(!0),t(pe()))},[F,t,U.fetchState]),c.useEffect(()=>{B||L==="Completed"||(ee(!0),t(ue()))},[B,t,L]);const ae=c.useCallback(()=>{r!=null&&(G.current=!1,t(ke([r],null,{isArchived:!1})),R(!0))},[t,r]);c.useEffect(()=>{if(P)if(E!=="In-Progress"){if(G.current){if(E==="Error")return R(!1),void(G.current=!1);if(E==="Completed"){R(!1),G.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=X(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=w(i);e(m,{state:{pathnameStackToGoBack:v(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else G.current=!0},[P,E,l,s,e]);const $=g(i=>W(i,r)),j=$.fetchState,z=C.getSignedInUser();if(z==null)throw Error("Can't access task detail page without signing in...");if(j==="Error"&&$.error?.code===400){const{tenantEmailDomain:i}=l,m=w(i),te=v(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[j==="Completed"?n.jsx(ye,{analytics:V,onLoad:i=>(m=>m.trackPageLoaded(ve.Event.taskDetailPage))(i)}):null,n.jsxs(Ne,{children:[n.jsx(Ue,{isAppContentDrawerOpen:x,handleDrawerToggle:i=>{I(i)}}),n.jsx(ze,{analytics:V,currentTenant:l,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:z,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:j,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:S,isTaskRecurringParentEnabled:D,isTaskGroupAssigneesEnabled:b})]})]})}const Ne=Be.div`
2
- display: flex;
3
- min-height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,w=e=>`/${e}/tasks`;function ia(){return n.jsxs(ce,{children:[n.jsx(f,{path:"/new",element:n.jsx(y,{})}),n.jsx(f,{path:"/new/:taskGroupId",element:n.jsx(y,{})}),n.jsx(f,{path:"/group/:taskGroupId",element:n.jsx(Le,{})}),n.jsx(f,{path:"/quick-responses",element:n.jsx($e,{})}),n.jsx(f,{path:"/:taskId",element:n.jsx(y,{})}),n.jsx(f,{path:"*",element:n.jsx(se,{})})]})}export{ia as default};
@@ -1 +0,0 @@
1
- import{j as t}from"./liveblocks-Dn3WlYDG.js";import i from"./NotFoundScreen-BWmMemx_.js";import{T as r}from"./TransactionDetailScreen-DTpKVJNQ.js";import"./sentry-BBtxjqBH.js";import{o as a,p as o}from"./core-CBQNMmNB.js";import"./zeni-epic-state-kigW-Vb1.js";import"./recharts-cF7j6WPE.js";import"./index-C6g7x9Xf.js";import"./mui-BaxUp1f6.js";import"./analytics-PD1ubuhk.js";import"./plaid-CkikokYa.js";import"./dnd-Z3xBQUdM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CyQvfguW.js";import"./lexical-Pu0UU7Gm.js";import"./pdf-BdzM5lLL.js";import"./utils-DGbjXCxQ.js";import"./useAskAiCfoHostNavButtonProps-C_v5Otmr.js";import"./decodeURIComponentSafe-CTFTZ79i.js";import"./routePaths-DlNlbaAA.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="8f33aac6-3389-4f99-92e2-514bb2135525",e._sentryDebugIdIdentifier="sentry-dbid-8f33aac6-3389-4f99-92e2-514bb2135525")}catch{}})();function k(){return t.jsxs(a,{children:[t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(o,{path:"/*",element:t.jsx(r,{})})]})}export{k as default};
@@ -1 +0,0 @@
1
- import{j as s}from"./liveblocks-Dn3WlYDG.js";import{h as K,g as N,u as Q,i as W,j as S,N as G,n as X,o as Ye,p as j}from"./core-CBQNMmNB.js";import{eR as H,p_ as ee,j5 as p,Py as te,I1 as De,bq as le,Pz as be,jI as ae,LC as ne,PA as ue,PB as ve,bE as P,HZ as ye,PC as Ee,PD as me,PE as je,I0 as Ae,PF as xe,PG as pe,PH as Me,PI as ge,PJ as Le,PK as Ce,PL as fe,Je as Fe,bn as Be}from"./zeni-epic-state-kigW-Vb1.js";import{D as de,s as Z,d as _,e as w,ce,v as U,r as oe,V as ze,z as Oe}from"./index-C6g7x9Xf.js";import"./mui-BaxUp1f6.js";import{a as I}from"./sentry-BBtxjqBH.js";import{w as se}from"./withTransactionSidePanel-DFqH5ga0.js";import{p as ie,c as re}from"./routePaths-DlNlbaAA.js";import{u as we}from"./utils-DGbjXCxQ.js";import{d as b}from"./decodeURIComponentSafe-CTFTZ79i.js";import{Z as Ge}from"./ZeniAccountStatementScreen-B8cfC_y6.js";import"./recharts-cF7j6WPE.js";import"./analytics-PD1ubuhk.js";import"./plaid-CkikokYa.js";import"./dnd-Z3xBQUdM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CyQvfguW.js";import"./lexical-Pu0UU7Gm.js";import"./pdf-BdzM5lLL.js";import"./useAskAiCfoHostNavButtonProps-C_v5Otmr.js";import"./TransactionDetailScreen-DTpKVJNQ.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]="be4b9cc0-3f4a-4ff6-85f7-1b720876134a",a._sentryDebugIdIdentifier="sentry-dbid-be4b9cc0-3f4a-4ff6-85f7-1b720876134a")}catch{}})();const _e=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],q=a=>we(a),$e=X(function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,q(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=de.getLocalizedStrings(),l=q(e.selectedAccount.tranListType),u=Je(t,n,c,l,e.bookCloseDate);w.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(ue({uiState:{dateRange:u},type:q(e.selectedAccount.tranListType)})),a(De(l,p(u),!1,l==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(p(u))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=U(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ue({uiState:{scrollYOffset:t},type:q(e.selectedAccount.tranListType)}))}}})(ce),J=se(function({...a}){const e=K(),t=N(),n=Q(),c=t.pathname.split("/").find(r=>_e.includes(r)),o=c??"uncategorized-expense",{tenantEmailDomain:l}=W(),u=de.getLocalizedStrings(),{accountType:m,title:D,subTitle:y}=Re(o),A="month",h=S(r=>H(r)),f=h.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:g}=Z(),{isFeatureEnabled:k}=g(_.isProjectsTransactionsEnabled),x=S(r=>ee(r))&&k,{dataAvailable:C,initialTimeframeTick:v}=Ve(o,f,h.bookCloseDate),[F,E]=I.useState(!1),[B,z]=I.useState(void 0),T=I.useMemo(()=>{const r=p(v);return{tranListType:o,accountType:te(m),title:D,subTitle:y,timeframe:A,period:r}},[o,A,m,C]);I.useEffect(()=>{if(!F&&T!=null){E(!0),w.trackTransactionList(void 0,void 0,void 0,T.title);const r=q(T.tranListType);n(De(r,T.period,!0,r==="missingReceipts"?u.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[F,T,n]);let M=T;return T!=null&&B!=null&&(M={...T,period:B}),c==null||M==null?s.jsx(G,{to:"../"}):s.jsx($e,{firstMonthOfFY:f,tenantEmailDomain:l,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:C,navigate:e,showProjectField:x,selectedAccount:M,referrerType:o,bookCloseDate:h.bookCloseDate,onSelectedTimePeriodChange:r=>z(r),...a})}),Re=a=>{let e="",t="";const n=de.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.uncategorizedTransactionList.expense.title;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.uncategorizedTransactionList.missingReceipt.title}return{accountType:e,title:t,subTitle:""}},Ve=(a,e,t)=>{const n=le();let c=le().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:ie(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Je=(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},qe=X(function(a,e){const t=Ee(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:ne(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ie();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)}`),w.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(ye(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=U(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}})(ce),Ue=se(function({referrerType:a,...e}){const t=K(),n=N(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:u,classIdEncoded:m,timeframe:D,startDate:y,endDate:A,titleEncoded:h}=W(),f=b(l??""),g=b(u??""),k=b(m??""),x=b(h??""),C=S(d=>ve(d.transactionListState,g,f,k)),[v,F]=I.useState(!1),[E,B]=I.useState(void 0),z=S(d=>H(d)),T=z.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=Z(),{isFeatureEnabled:r}=M(_.isProjectsTransactionsEnabled),$=S(d=>ee(d))&&r;let i;const O=Ne(f,g,k,D,y,A,x);if(O){const d={startDate:P(y,"YYYY-MM-DD"),endDate:P(A,"YYYY-MM-DD")},R=He(C?.dateRange,d);i={accountId:g,accountType:te(f),classId:k,title:x,timeframe:D,period:R}}I.useEffect(()=>{v||i==null||(F(!0),w.trackTransactionList(i.accountId,void 0,a,i.title),c(ye(i.accountId,i.accountType,i.classId,i.period)))},[v,i,c]);let L=i;i!=null&&E!=null&&(L={...i,period:E});const V=[l,u,m,D,y,A,h].filter(d=>d!=null);return O&&L!=null?s.jsx(qe,{firstMonthOfFY:T,tenantEmailDomain:o,location:n,navigate:t,showProjectField:$,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>B(d),...e}):s.jsx(G,{to:Ie(V.length)})}),Ie=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ne=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&P(c,"YYYY-MM-DD").isValid()&&P(o,"YYYY-MM-DD").isValid()&&l!=null,He=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),Ze=X(function(a,e){const t=xe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Se();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)}`),w.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(Ae(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=U(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}})(ce),Ke=se(function({referrerType:a,...e}){const t=K(),n=N(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:u,projectIdEncoded:m,timeframe:D,startDate:y,endDate:A,titleEncoded:h}=W(),f=b(l??""),g=b(u??""),k=b(m??""),x=b(h??""),C=S(d=>je(d.transactionListState,g,f,k)),[v,F]=I.useState(!1),[E,B]=I.useState(void 0),z=S(d=>H(d)),T=z.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=Z(),{isFeatureEnabled:r}=M(_.isProjectsTransactionsEnabled),$=S(d=>ee(d))&&r;let i;const O=Qe(f,g,k,D,y,A,x);if(O){const d={startDate:P(y,"YYYY-MM-DD"),endDate:P(A,"YYYY-MM-DD")},R=We(C?.dateRange,d);i={accountId:g,accountType:te(f),projectId:k,title:x,timeframe:D,period:R}}I.useEffect(()=>{v||i==null||(F(!0),w.trackTransactionList(i.accountId,void 0,a,i.title),c(Ae(i.accountId,i.accountType,i.projectId,i.period)))},[v,i,c]);let L=i;i!=null&&E!=null&&(L={...i,period:E});const V=[l,u,m,D,y,A,h].filter(d=>d!=null);return O&&L!=null?s.jsx(Ze,{firstMonthOfFY:T,tenantEmailDomain:o,location:n,navigate:t,showProjectField:$,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>B(d),...e}):s.jsx(G,{to:Se(V.length)})}),Se=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Qe=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&P(c,"YYYY-MM-DD").isValid()&&P(o,"YYYY-MM-DD").isValid()&&l!=null,We=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),Xe=X(function(a,e){const t=Le(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&Ce(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??he();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)}`),w.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=U(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=at(e.tenantEmailDomain),n=U(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ce),Te=se(function({referrerType:a,...e}){const t=K(),n=N(),c=Q(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:u,timeframe:m,startDate:D,endDate:y,titleEncoded:A,excludeSubAccounts:h}=W(),f=b(l??""),g=b(u??""),k=b(A??""),x=!(h!=null&&h==="exclude_subaccounts"),C=S(Y=>Me(Y.transactionListState,g,f)),[v,F]=I.useState(!1),[E,B]=I.useState(void 0),z=S(Y=>H(Y)),T=z.company?.featuresActivationInfo.connectedAccountProvider==="unit",M=z.company?.companyInfo.firstMonthOfFY??1;let r;const $=et(f,g,m,D,y,k);if($){const Y={startDate:P(D,"YYYY-MM-DD"),endDate:P(y,"YYYY-MM-DD")},Pe=tt(C?.dateRange,Y);r={accountId:g,accountType:te(f),title:k,timeframe:m,period:Pe}}let i=r;r!=null&&E!=null&&(i={...r,period:E});const{useFeatureGate:O}=Z(),{isFeatureEnabled:L}=O(_.isTransactionCommentingEnabled),{isFeatureEnabled:V}=O(_.isProjectsTransactionsEnabled),d=S(Y=>ee(Y))&&V,{areTenantIdsInSync:R}=ze();I.useEffect(()=>{!v&&r!=null&&R&&(F(!0),w.trackTransactionList(r.accountId,void 0,a,r.title),c(ge(r.accountId,r.accountType,r.period,void 0,!1,x)))},[v,r,c,R]);const ke=[l,u,m,D,y,A].filter(Y=>Y!=null);return $&&i!=null?s.jsx(Xe,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:T,isTransactionCommentingEnabled:L,showProjectField:d,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:Y=>B(Y),...e}):s.jsx(G,{to:he(ke.length)})}),he=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},et=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&P(n,"YYYY-MM-DD").isValid()&&P(c,"YYYY-MM-DD").isValid()&&o!=null,tt=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),at=a=>`/${a}/transactions/${Fe}/statements`;function Pt(){const a=N().state?.referrer,e=Oe.getSignedInUser(),t=Be(e),{useFeatureGate:n}=Z(),{isFeatureEnabled:c}=n(_.isExpenseAutomationEnabled),o=S(m=>m.expenseAutomationViewState.selectedPeriodByTenantId)[S(m=>H(m)).tenantId],{isFeatureEnabled:l}=n(_.isExpenseAutomationEnabledV2),u=l||c&&t;return s.jsxs(Ye,{children:[s.jsx(j,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/zeni-clearing-account/statements",element:s.jsx(Ge,{})}),s.jsx(j,{path:"/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/uncategorized-income/*",element:s.jsx(J,{})}),s.jsx(j,{path:"/uncategorized-expense/*",element:u?s.jsx(G,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):s.jsx(J,{})}),s.jsx(j,{path:"/miscategorized-income/*",element:s.jsx(J,{})}),s.jsx(j,{path:"/miscategorized-expense/*",element:u?s.jsx(G,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):s.jsx(J,{})}),s.jsx(j,{path:"/missing-receipts/*",element:u?s.jsx(G,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):s.jsx(J,{})}),s.jsx(j,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Ue,{referrerType:a})}),s.jsx(j,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Ke,{referrerType:a})})]})}export{Pt as default};
@@ -1,37 +0,0 @@
1
- import{j as e}from"./liveblocks-Dn3WlYDG.js";import{h as B,g as P,u as U,i as V,j as f,N as L,n as M,o as Te,p as k}from"./core-CBQNMmNB.js";import{cm as N,eR as D,Oj as O,En as ae,fj as H,E5 as ne,Ol as we,Eq as Ie,Oh as Ce,Oi as se,OB as ke,Cx as je,tc as be,On as Ee,EJ as Ae,Ok as re,cO as Z,xs as oe,e_ as ve,f0 as De,Pv as Fe,Pw as Le,E6 as Be,Px as Pe,E7 as Ue,Eg as Oe,bt as Re,bF as Ve,cx as Me,bG as Ne,cl as _e,fi as ze,bs as Ge,J_ as $e,ck as qe}from"./zeni-epic-state-kigW-Vb1.js";import{k as _,aq as He,z as E,x as z,e as j,c7 as Ze,c8 as Je,c9 as q,J,m as Ke,V as We,Z as Qe,s as ie,d as v,A as Xe,B as Ye,ca as et,at as K,v as tt,cb as at,r as W,cc as nt,p as X,cd as st,a9 as rt}from"./index-C6g7x9Xf.js";import{D as ot,n as R,S as it}from"./mui-BaxUp1f6.js";import ct from"./NotFoundScreen-BWmMemx_.js";import{S as Y}from"./SetupPagesScreen-DEbuiMhl.js";import{a as d}from"./sentry-BBtxjqBH.js";import{u as lt}from"./useAskAiCfoHostNavButtonProps-C_v5Otmr.js";import{u as ut}from"./useInitialThreadRequest-CKOaiR-a.js";import{M as ce}from"./MobileAppDrawer-CMqrUzty.js";import{F as dt}from"./FeaturePreviewScreen-pifRlvMk.js";import{a as ee}from"./analyticsHelper-DugMUcaM.js";import"./recharts-cF7j6WPE.js";import"./analytics-PD1ubuhk.js";import"./plaid-CkikokYa.js";import"./dnd-Z3xBQUdM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CyQvfguW.js";import"./lexical-Pu0UU7Gm.js";import"./pdf-BdzM5lLL.js";import"./utils-DGbjXCxQ.js";import"./routePaths-DlNlbaAA.js";import"./BusinessVerificationPageScreen-Bh75FXTZ.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]="37d12f4f-47e9-4eb4-af1b-25a90d7e3076",t._sentryDebugIdIdentifier="sentry-dbid-37d12f4f-47e9-4eb4-af1b-25a90d7e3076")}catch{}})();const pt=M(function(t,a){const{companyId:n}=a;return{treasurySetupView:O(t,n),analytics:j}},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(Ie(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(we(r))}}})(Ze);function mt(){const t=B(),a=P(),n=U(),{tenantEmailDomain:o}=V(),p=_(),r=f(C=>C.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=He(r),s=N(p?.loggedInUserRoleMap),[l,i]=d.useState(!1),[g,I]=d.useState(!1),[u,c]=d.useState(!1),h=f(C=>D(C)),y=E.getSignedInUserTenant(o)?.companyId??h.companyId,T=E.getSignedInUser(),S=f(C=>O(C,y)),w=f(C=>C.treasurySetupViewState.fetchState),x=f(C=>C.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(C=>C.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(T==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{l||w!=="Not-Started"||y==null||(i(!0),n(ae(y,!0,!1)))},[l,w,y,n]),d.useEffect(()=>{u||F!=="Not-Started"||y==null||(c(!0),n(H()))},[u,F,y,n]),d.useEffect(()=>{g||x!=="Not-Started"||y==null||(I(!0),n(ne()))},[g,x,y,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(L,{to:"../promo"});const A=h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||w!=="Completed";return e.jsxs(e.Fragment,{children:[!A&&e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(pt,{navigate:t,location:a,companyId:y,isEditMode:!0,isLoading:A,isReadOnly:!s,treasurySetupView:S,analytics:j})]})}const ft=M(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:O(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{q(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{q(a.analytics,"confirm",r,m,"Transfer"),t(Ae())},onSaveChangesToLocalStore:s=>{t(Ee(s))},onFetchLinkTokenClick:s=>{t(be("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Je),yt=({isFirstTransfer:t})=>{const a=B(),{tenantEmailDomain:n}=V(),o=U(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[l,i]=d.useState(!1),[g,I]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),c=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),h=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),y=f(x=>D(x)),T=E.getSignedInUserTenant(n)?.companyId??y.companyId,S=f(x=>Ce(x)),w=f(x=>O(x,T));if(E.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||T==null||(s(!0),o(ae(T,!0,!1)))},[m,u,T,o]),d.useEffect(()=>{l||c!=="Not-Started"||T==null||(i(!0),o(H()))},[l,c,T,o]),d.useEffect(()=>{g||h!=="Not-Started"||T==null||(I(!0),o(ne()))},[g,h,T,o]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(ft,{analytics:j,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:y,treasurySetupView:w,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{q(j,"review",S.treasuryTransferMoneyLocalData,w.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},gt=R.div`
2
- display: flex;
3
- min-height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${t=>t.theme.colors.grey4};
9
- `,ht={overlayWidth:new Xe(100,100,48)},St=M(function(t,a){const n=re(t),{companyId:o}=a;return{treasuryDetail:n,treasurySetupView:O(t,o),downloadEndPoint:`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account/statements?query={"statement_type":"tax_statement"}`}},function(t,a){const{navigate:n,currentTenant:o,location:p,handleDrawerToggle:r,analytics:m}=a,{tenantEmailDomain:s}=o;return{onSettingsClick:()=>{m.trackAccountsListPageClicked("Settings Icon"),n("setup")},onReloadTransactions:()=>{t(oe(!0))},handleTreasuryOptionSelection:l=>{let i="page-not-found";l==="editPortfolio"?i=xt(s):l==="statements"?i=Tt(s):l==="taxLetter"?i=wt(s):l==="settings"&&(i=It(s));const g=tt(p.state?.pathnameStackToGoBack,p.pathname);n(i,{state:{pathnameStackToGoBack:g}})},onColumnSortConfigChanged:(l,i)=>{t(Fe({uiState:{sortKey:l,sortOrder:i}}))},onTransferClick:()=>{n("./transfer")},onBackClick:()=>{n("../../")},onClickMenuIcon:()=>{r(!0)},onAutoTransferClick:()=>{n("../../checking/auto-transfer")}}})(et);function $({isTransferDrawerOpen:t,isEditPortfolioDrawerOpen:a}){const n=P(),o=B(),p=U(),r=J(),m=Ke(),s=f(b=>D(b)),{tenantEmailDomain:l}=V(),i=s.companyId??E.getSignedInUserTenant(l)?.companyId,[g,I]=d.useState(!1),u=f(b=>re(b)),c=u.fetchState,h=u.accountSummary?.totalBalance?.amount,y=f(b=>b.treasurySetupViewState.treasuryFundsDetails?.fetchStatus),T=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",S=_(),w=!!s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,x=N(S?.loggedInUserRoleMap),F=Z(S?.loggedInUserRoleMap),{areTenantIdsInSync:A}=We();d.useEffect(()=>{c==="Not-Started"&&!g&&A&&(I(!0),p(oe(!0)))},[g,p,c,A]),d.useEffect(()=>{u.transactionsFetchState.fetchState==="Completed"&&u.transactions.length===0&&!n.pathname.includes("transfer")&&x&&o("./transfer")},[u.transactionsFetchState.fetchState,u.transactions.length]);const C=()=>{o("..")},[le,ue]=d.useState(!1),Q=b=>{ue(b)},{isAiCfoAccessEnabled:de,onAskAiCfoClick:pe}=lt({mobileExploreReferrer:"Treasury"});Qe({isDataReady:c==="Completed"});const{useFeatureGate:G}=ie(),{isFeatureEnabled:me}=G(v.isDebitCardFeatureEnabled),{isFeatureEnabled:fe}=G(v.isAutoTransferRuleEnabled),{isFeatureEnabled:ye}=G(v.isTreasuryCommentingEnabled),ge=ut(i,{clearParams:c==="Completed"&&y?.fetchState==="Completed"}),he=ve(s),Se=De(me,s);if(he===!0&&Se!==!0)return e.jsx(dt,{});if(T){const b=y?.fetchState!=="Completed"||u.accountSummaryFetchState.fetchState!=="Completed";return e.jsxs(e.Fragment,{children:[u.accountSummaryFetchState.fetchState==="Completed"&&y?.fetchState==="Completed"&&t===!1&&a===!1?e.jsx(z,{analytics:j,onLoad:()=>{}}):null,e.jsx(ot,{onClose:C,anchor:"right",open:a||t,transitionDuration:250,PaperProps:{style:{width:ht.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:m.colors.black,opacity:.75,cursor:"pointer"}}},children:e.jsxs(Ct,{onClick:xe=>xe.stopPropagation(),children:[t===!0?e.jsx(yt,{isFirstTransfer:u.transactions.length===0||h===0}):null,a===!0?e.jsx(mt,{}):null]})}),e.jsxs(gt,{windowSize:r,children:[e.jsx(ce,{isAppContentDrawerOpen:le,handleDrawerToggle:Q}),e.jsx(St,{treasuryDetailsView:u,isAutoTransferRuleEnabled:fe,navigate:o,currentTenant:s,location:n,companyId:i,analytics:j,isTreasuryCommentingEnabled:ye,handleDrawerToggle:Q,initialOpenThreadRequest:ge,isLoading:b,isAiCfoAccessEnabled:de,onAskAiCfoClick:pe})]})]})}return w&&x?e.jsx(L,{to:"../setup"}):s.companyTreasuryInfo?.info&&!w&&F?e.jsx(L,{to:"../promo",state:n.state}):e.jsx(Ye,{fetchState:"In-Progress",style:{backgroundColor:m.colors.grey5}})}const xt=t=>`/${t}/treasury/edit-portfolio`,Tt=t=>`/${t}/treasury/statements`,wt=t=>`/${t}/treasury/tax-letter`,It=t=>`/${t}/treasury/setup`,Ct=R(it)`
10
- display: flex;
11
- min-height: 100%;
12
- flex-direction: column;
13
- `,kt=R.div`
14
- display: flex;
15
- height: 100vh;
16
- width: 100%;
17
- flex: 1 1 auto;
18
- flex-direction: column;
19
- align-items: center;
20
- background-color: ${t=>t.theme.colors.grey4};
21
- `;function jt(){const t=B(),a=U(),n=J(),o=P(),p=`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(c=>Le(c));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),a(Be(!1)))},[r,s.fetchState,a]);const l=E.getSignedInUser(),i=f(c=>D(c)),g={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i.tenantId??""},I=i.company?.companyInfo.companyLegalName??i.companyName;if(l==null)throw Error("Can't access statements page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(kt,{windowSize:n,children:e.jsx(at,{currentTenantCompanyName:I,statementListView:s,isLoading:u,onBackClick:()=>{const c=W(o.state?.pathnameStackToGoBack),h=c.poppedPathname??"..";t(h,{state:{pathnameStackToGoBack:c.newStack}})},authParams:g,downloadEndPoint:p})})}const bt=R.div`
22
- display: flex;
23
- height: 100vh;
24
- width: 100%;
25
- flex: 1 1 auto;
26
- flex-direction: column;
27
- align-items: center;
28
- background-color: ${t=>t.theme.colors.grey4};
29
- `;function Et(){const t=B(),a=J(),n=P(),o=U(),p=`${K.bankingMicroServiceBaseUrl}/1.0/treasury-account`,[r,m]=d.useState(!1),s=f(c=>Pe(c));d.useEffect(()=>{r||s.fetchState!=="Not-Started"||(m(!0),o(Ue(!1)))},[r,s.fetchState,o]);const l=E.getSignedInUser(),i=f(c=>D(c)),g={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i.tenantId??""},I=i.company?.companyInfo.companyLegalName??i.companyName;if(l==null)throw Error("Can't access tax letter page without signing in...");const u=s.fetchState!=="Completed";return e.jsx(bt,{windowSize:a,children:e.jsx(nt,{currentTenantCompanyName:I,taxLetterListView:s,isLoading:u,onBackClick:()=>{const c=W(n.state?.pathnameStackToGoBack),h=c.poppedPathname??"..";t(h,{state:{pathnameStackToGoBack:c.newStack}})},authParams:g,downloadEndPoint:p})})}const At=M(function(t,a){const{companyId:n}=a,o=O(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(Oe(o))},onBackClick:()=>{n("../..",{relative:"path"})},onTreasurySetupSuccess:p=>{n(p?"..":"../setup",{relative:"path"})}}})(st),vt=()=>{const t=B(),a=P(),n=U(),{tenantEmailDomain:o}=V(),[p,r]=d.useState(!1),m=f(S=>D(S)),[s,l]=d.useState(!1),i=f(S=>S.treasurySetupViewState.treasuryFundsDetails?.fetchStatus);d.useEffect(()=>{s||i?.fetchState!=="Not-Started"||g==null||(l(!0),n(H()))},[i,n]);const g=E.getSignedInUserTenant(o)?.companyId??m.companyId,I=E.getSignedInUser(),u=!!m.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,c=S=>{r(S)};if(I==null)throw Error("Can't access treasury promo page without signing in...");const h=_(),y=N(h?.loggedInUserRoleMap),T=Z(h?.loggedInUserRoleMap);if(u&&y)return e.jsx(L,{to:"../../treasury/setup"});if(m.company?.companyTreasuryInfo&&(!u&&y||T)){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(X,{size:"ExtraLarge",start:!0})}):e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:S=>(w=>w.trackTreasuryPromoView("Treasury Promo Page"))(S)}),e.jsx(ce,{isAppContentDrawerOpen:p,handleDrawerToggle:c}),e.jsx(At,{analytics:j,navigate:t,companyId:g,onClickMenuIcon:()=>{c(!0)}})]})}return e.jsx(te,{children:e.jsx(X,{size:"ExtraLarge",start:!0})})},te=R.div`
30
- display: flex;
31
- width: 100%;
32
- height: 100%;
33
- flex-direction: row;
34
- justify-content: center;
35
- align-items: center;
36
- background-color: ${t=>t.theme.colors.grey5};
37
- `;function ea(){const t=P(),a=f(A=>D(A)),{useFeatureGate:n}=ie(),{isFeatureEnabled:o}=n(v.isTreasuryEnabled),p=!!a.company?.companyTreasuryInfo?.isTreasuryTOSAccepted,r=_(),m=Z(r?.loggedInUserRoleMap),s=a?.userRole!=null&&Re(a?.userRole),l=(a?.company==null||a.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!s)&&Ve(r?.loggedInUserRoleMap),i=Me(r?.loggedInUserRoleMap),g=(a?.company==null||a.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!s)&&Ne(r?.loggedInUserRoleMap),{isFeatureEnabled:I}=n(v.isDepositAccountsFeatureEnabled),u=I&&!s&&_e(r?.loggedInUserRoleMap),c=a.company!=null&&ze(a.company),h=o&&c===!0&&!s&&N(r?.loggedInUserRoleMap),{isFeatureEnabled:y}=n(v.isChargeCardFeatureEnabled),{isFeatureEnabled:T}=n(v.isDebitCardFeatureEnabled),S=rt(a,y,T)&&!s&&Ge(r?.loggedInUserRoleMap),w=$e(r?.loggedInUserRoleMap),x=qe(r?.loggedInUserRoleMap),F=a.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified";return e.jsxs(Te,{children:[x?null:e.jsx(k,{path:"setup",element:e.jsx(Y,{isBillPayAdminLevelAccess:l,isReimbursementAdminLevelAccess:g,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:h,isUserHasOnlyCardAccess:w,isUserHasOnlyBillPayAccess:i,productType:"zeni_treasury",type:"setup"})}),x?null:e.jsx(k,{path:"verification",element:e.jsx(Y,{isBillPayAdminLevelAccess:l,isUserHasOnlyBillPayAccess:i,isReimbursementAdminLevelAccess:g,isZeniAccountAdminLevelAccess:u,isChargeCardAdminLevelAccess:S,isTreasuryAdminLevelAccess:h,isUserHasOnlyCardAccess:w,productType:"zeni_treasury",type:"verification"})}),e.jsx(k,{path:"promo",element:e.jsx(vt,{})}),e.jsx(k,{path:"statements",element:e.jsx(jt,{})}),e.jsx(k,{path:"tax-letter",element:e.jsx(Et,{})}),F?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"/",element:e.jsx($,{isTransferDrawerOpen:!1,isEditPortfolioDrawerOpen:!1})}),h?e.jsxs(e.Fragment,{children:[e.jsx(k,{path:"edit-portfolio",element:e.jsx($,{isEditPortfolioDrawerOpen:!0,isTransferDrawerOpen:!1})}),e.jsx(k,{path:"transfer",element:e.jsx($,{isTransferDrawerOpen:!0,isEditPortfolioDrawerOpen:!1})})]}):null,e.jsx(k,{path:"*",element:e.jsx(ct,{})})]}):p&&h?e.jsx(k,{path:"*",element:e.jsx(L,{to:"../setup"})}):a.company?.companyZeniAccountInfo&&m?e.jsx(k,{path:"*",element:e.jsx(L,{to:"../promo",state:t.state})}):e.jsx(k,{path:"*",element:null})]})}export{ea as default};
@@ -1,12 +0,0 @@
1
- import{j as o}from"./liveblocks-Dn3WlYDG.js";import{a as f}from"./sentry-BBtxjqBH.js";import{s as u,u as h,j as y,N as I}from"./core-CBQNMmNB.js";import{Kh as b,eY as w,Ad as j}from"./zeni-epic-state-kigW-Vb1.js";import{z as l,B as x,C as S,E}from"./index-C6g7x9Xf.js";import{n as p}from"./mui-BaxUp1f6.js";import"./recharts-cF7j6WPE.js";import"./analytics-PD1ubuhk.js";import"./plaid-CkikokYa.js";import"./dnd-Z3xBQUdM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CyQvfguW.js";import"./lexical-Pu0UU7Gm.js";import"./pdf-BdzM5lLL.js";import"./utils-DGbjXCxQ.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]="bd814a5f-7dea-4a25-a1c1-f91af136f0a9",e._sentryDebugIdIdentifier="sentry-dbid-bd814a5f-7dea-4a25-a1c1-f91af136f0a9")}catch{}})();const Y=()=>{const[e]=u(),t=e.get("code")??"",i=e.get("state")??"",c=e.get("profileId")??"",[a,g]=f.useState(!1),n=h(),s=y(m=>b(m)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(i);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(()=>{a||(g(!0),n(j(t,c,i)))},[a,n]),s.fetchState==="Error"?o.jsx(D,{children:o.jsx(_,{children:s.error?.message??""})}):(s.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},D=p.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
- `,_=p(E.LargeRegular)`
10
- display: flex;
11
- color: ${S.important};
12
- `;export{Y as default};
@@ -1,57 +0,0 @@
1
- import{j as n}from"./liveblocks-Dn3WlYDG.js";import{h as ne,g as W,u as M,i as Y,j as A,n as q,N as X,o as Ve,p as k}from"./core-CBQNMmNB.js";import{eR as U,Pb as Ce,Pc as $e,cl as ee,cm as Ze,fi as Ne,xq as ke,BD as He,xk as Tn,Pd as Fn,Pe as Bn,xn as On,xu as fe,xh as Ln,xe as Rn,NY as le,Pf as Un,F3 as _n,L3 as zn,F5 as Mn,kp as Fe,Pg as Vn,qL as Ge,qz as We,kg as Ye,kj as Be,L4 as Oe,L5 as $n,Ph as Zn,ki as Nn,kF as Hn,k7 as Gn,iG as Wn,iF as Yn,Pi as qn,Pj as ye,EM as Jn,Pk as Kn,Pl as Qn,NR as Ae,Pm as Le,Pn as Xn,Fg as et,OB as nt,Cx as qe,tc as Je,Po as tt,Fd as at,Pp as Ke,cM as we,Fk as Qe,fj as ot,e_ as Xe,f0 as De,Fi as st,Cr as rt,Fa as it,Pq as en,Pr as nn,EO as tn,EY as Re,Ps as ct,Oo as lt,Fl as dt,bt as ut,bF as pt,cx as mt,bG as gt,bs as ht,J_ as ft}from"./zeni-epic-state-kigW-Vb1.js";import{k as te,s as Z,z as S,d as O,m as _,B as de,bY as yt,a2 as Ie,J as V,A as J,r as an,aq as xt,af as Ue,e as L,bZ as Ct,at as Se,b_ as kt,x as ue,b$ as At,g as be,aN as G,c0 as wt,V as Dt,Z as on,ac as It,c1 as _e,c2 as St,v as ce,c3 as bt,c4 as Pt,c5 as vt,a9 as Et,o as jt}from"./index-C6g7x9Xf.js";import{n as z,D as K,S as Q}from"./mui-BaxUp1f6.js";import ie from"./NotFoundScreen-BWmMemx_.js";import{S as ze}from"./SetupPagesScreen-DEbuiMhl.js";import{F as sn}from"./FeaturePreviewScreen-pifRlvMk.js";import{a as d}from"./sentry-BBtxjqBH.js";import{M as pe}from"./MobileAppDrawer-CMqrUzty.js";import{A as Tt,D as Ft,V as Bt}from"./DomesticWireDetailScreen-lyPlKl3e.js";import{A as Ot}from"./AddressScreen-BNSulfP2.js";import{u as rn}from"./useAskAiCfoHostNavButtonProps-C_v5Otmr.js";import{Z as Lt}from"./ZeniAccountStatementScreen-B8cfC_y6.js";import"./recharts-cF7j6WPE.js";import"./analytics-PD1ubuhk.js";import"./plaid-CkikokYa.js";import"./dnd-Z3xBQUdM.js";import"./stripe-DMRn4zHo.js";import"./lottie-CyQvfguW.js";import"./lexical-Pu0UU7Gm.js";import"./pdf-BdzM5lLL.js";import"./utils-DGbjXCxQ.js";import"./analyticsHelper-DugMUcaM.js";import"./routePaths-DlNlbaAA.js";import"./BusinessVerificationPageScreen-Bh75FXTZ.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]="068e669f-ebe9-4c5e-9e5e-f3e9b457a6f0",e._sentryDebugIdIdentifier="sentry-dbid-068e669f-ebe9-4c5e-9e5e-f3e9b457a6f0")}catch{}})();const Rt=z.div`
2
- display: flex;
3
- min-height: 100%;
4
- width: 100%;
5
- flex: 1 1 auto;
6
- flex-direction: column;
7
- align-items: center;
8
- background-color: ${e=>e.theme.colors.grey4};
9
- `,Ut=q(function(e){return{autoTransferRuleView:Ce(e),downloadAccountDetailEndPoint:`${Ie}/account_details`,transferLimit:5e5,depositAccountListView:He(e.depositAccountState,e.depositAccountListState)}},function(e,t){const{navigate:s,handleDrawerToggle:o}=t;return{onBackClick:()=>{s("..")},onClickMenuIcon:()=>{o(!0)},onFetchAutoTransferRules:a=>{e(ke(a))},onCreateRule:()=>{e(Rn())},onUpdateRule:a=>{e(fe(a))},onDeleteClick:a=>{e(Ln(a))},onPauseClick:a=>{e(fe(a,!0,!1))},onResumeClick:a=>{e(fe(a,!1,!0))},onActivityClick:(a,r)=>{e(On(a,r))},onUpdateRuleLocalData:a=>{e(Bn(a))},clearRuleLocalData:()=>{e(Fn())},onEditClick:a=>{s(`./${a}/edit`)},onEditDrawerClose:()=>{s("../../",{relative:"path"})},onReviewClick:()=>{e(Tn())}}})(yt);function Me({isEditDrawerOpen:e}){const t=ne(),s=W(),o=M(),a=te(),{ruleId:r,tenantEmailDomain:u}=Y(),{useFeatureGate:l}=Z(),[p,g]=d.useState(!1),[x,i]=d.useState(!1),c=A(y=>U(y)),m=A(y=>Ce(y)),C=m?.fetchState??"Not-Started",b=A(y=>$e(y)),h=c?.companyId??S.getSignedInUserTenant(u)?.companyId,w=ee(a?.loggedInUserRoleMap)||Ze(a?.loggedInUserRoleMap),{isFeatureEnabled:D}=l(O.isTreasuryEnabled),f=c?.company!=null&&Ne(c.company),I=D&&f,F=S.getSignedInUser(),R=c.tenantId,j={userId:F?.userId??"",sessionId:F?.zeniSessionId??"",tenantId:R??""},v=c.companyName;d.useEffect(()=>{!x&&C==="Not-Started"&&h&&(i(!0),o(ke(!0)))},[x,C,h,o]);const P=y=>{g(y)},T=_(),E=!!s.state?.scrollToAddRule;return m?.fetchState!=="Completed"?n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:T.colors.grey5}}):n.jsxs(Rt,{children:[n.jsx(pe,{isAppContentDrawerOpen:p,handleDrawerToggle:P}),n.jsx(Ut,{navigate:t,location:s,currentTenant:c,companyName:v,handleDrawerToggle:P,isEditDrawerOpen:e,editingRuleId:r,authParams:j,includeTreasuryOption:I,hasAdminLevelAccess:w,zeniAccountsConfigDetail:b,scrollToAddRule:E})]})}const _t={overlayWidth:new J(100,100,58)},zt=({vendorId:e,isDrawerOpen:t,closeDrawerHandler:s})=>{const o=M(),a=_(),r=V();if(S.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(K,{onClose:()=>{s(!0),o(le())},anchor:"right",open:t,PaperProps:{style:{width:_t.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Mt,{onClick:u=>u.stopPropagation(),children:n.jsx(Tt,{vendorIdParam:e,accountContext:"express-pay"})})})},Mt=z(Q)`
10
- display: flex;
11
- min-height: 100%;
12
- flex-direction: column;
13
- `,Vt={overlayWidth:new J(100,100,58)},$t=({isDrawerOpen:e,closeDrawerHandler:t})=>{const s=M(),o=_(),a=V();if(S.getSignedInUser()==null)throw Error("Can't access address page without signing in...");return n.jsx(K,{onClose:()=>{t(!0),s(le())},anchor:"right",open:e,PaperProps:{style:{width:Vt.overlayWidth.valuePercentage(a),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Zt,{onClick:r=>r.stopPropagation(),children:n.jsx(Ot,{accountContext:"express-pay",addressTypeParam:"vendor_address"})})})},Zt=z(Q)`
14
- display: flex;
15
- min-height: 100%;
16
- flex-direction: column;
17
- `,Nt={overlayWidth:new J(100,100,58)},Ht=({vendorId:e,isDrawerOpen:t,closeDrawerHandler:s})=>{const o=M(),a=_(),r=V();if(S.getSignedInUser()==null)throw Error("Can't access ach account page without signing in...");return n.jsx(K,{onClose:()=>{s(!0),o(le())},anchor:"right",open:t,PaperProps:{style:{width:Nt.overlayWidth.valuePercentage(r),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(Gt,{onClick:u=>u.stopPropagation(),children:n.jsx(Ft,{vendorIdParam:e,accountContext:"express-pay"})})})},Gt=z(Q)`
18
- display: flex;
19
- min-height: 100%;
20
- flex-direction: column;
21
- `,Wt=z.div`
22
- display: flex;
23
- height: 100vh;
24
- width: 100%;
25
- flex: 1 1 auto;
26
- flex-direction: column;
27
- align-items: center;
28
- background-color: ${e=>e.theme.colors.grey4};
29
- `,Yt=q(function(e,t){const s=U(e),o=S.getSignedInUser(),a=s.tenantId,r={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:a??""},u=t.expressPayDetails,l=e.entityAutoCompleteState.autoCompleteText.common,p=zn(e,"common");return{expressPayDetails:u,fileProps:{authParams:r,filesEndPoint:`${Se.fileMicroServiceBaseUrl}`},vendorSearchAutoCompleteData:{autoCompleteText:l,entityAutoCompleteView:p},analytics:t.analytics}},function(e,t){const{navigate:s}=t;return{onSaveVendor:o=>{e(Yn(o,void 0,void 0,!0))},saveVendorDetailLocalData:(o,a)=>{e(Be({vendorId:a,localData:o}))},saveExpressPayLocalData:o=>{e(Wn({localData:o}))},onVendorSelected:o=>{o!=null&&e(Gn(o,!1))},updateSelectedVendorForCreate:o=>{e(Hn(o))},initializeVendorAddress:()=>{e(Nn())},resetVendorSaveStatus:o=>{e(Zn({vendorId:o}))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,a)=>{o.trim().length>=2?e($n({searchString:o,entityType:a,searchOrigin:"common"})):o.trim().length===0&&e(Oe("common"))},onCancelAutoComplete:()=>{e(Oe("common"))}},chooseNewVendor:o=>{e(Be({localData:{vendorName:o}}))},onClickAddAccount:o=>{o.method.toLowerCase().indexOf("ach")!==-1?s("./add-ach",{relative:"path"}):o.method.toLowerCase().indexOf("wire")!==-1&&o.method.toLowerCase().indexOf("domestic")!==-1&&s("./add-wire",{relative:"path"})},updateFilesEntity:o=>{e(Ye({files:o}))},onDeleteFile:o=>{e(We(o))},onEditFileName:(o,a)=>{e(Ge(o,a.split(".")[0]))},onBackClick:o=>{o!=null&&e(Fe(o)),e(Fe()),e(Vn()),e(le()),s("../",{relative:"path"})},onSchedulePayment:()=>{e(Mn())}}})(Ct);function se({isAddACHDrawerOpen:e,isAddWireDrawerOpen:t,isAddAddressDrawerOpen:s}){const o=ne(),a=W(),r=M(),[u,l]=d.useState(!1),{tenantEmailDomain:p}=Y(),g=te(),x=A(y=>y.expressPayState.fetchState),i=A(y=>U(y)),c=A(y=>Un(y)),m=c.expressPayLocalData?.vendorId,C=i.companyId??S.getSignedInUserTenant(p)?.companyId,[b,h]=d.useState(!1),[w,D]=d.useState(!1),[f,I]=d.useState(!1),F=an(a.state?.pathnameStackToGoBack),{poppedPathname:R}=F,j=R?.split("/"),v=j?.[j.length-1];d.useEffect(()=>{e===!0?h(!0):(h(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{t===!0?D(!0):(D(!1),document.body.style.overflow="auto")},[t]),d.useEffect(()=>{s===!0?I(!0):(I(!1),document.body.style.overflow="auto")},[s]),d.useEffect(()=>{x==="Not-Started"&&r(_n(!0,!0))},[x,r]);const P=xt(c.vendorViewDetails.bankAccountCreationState?.fetchState);if(d.useEffect(()=>{P==="In-Progress"&&c.vendorViewDetails.bankAccountCreationState?.fetchState==="Completed"&&E()},[P,c.vendorViewDetails.bankAccountCreationState?.fetchState]),S.getSignedInUser()==null)throw Error("Can't access express pay page without signing in...");const T=y=>{l(y)},E=()=>{h(!1),D(!1),o("../",{relative:"path"})};return n.jsxs(Wt,{children:[Ue(a)?n.jsx(pe,{isAppContentDrawerOpen:u,handleDrawerToggle:T}):null,b===!0?n.jsx(zt,{vendorId:m,closeDrawerHandler:E,isDrawerOpen:b}):null,w===!0?n.jsx(Ht,{vendorId:m,closeDrawerHandler:E,isDrawerOpen:w}):null,f===!0?n.jsx($t,{closeDrawerHandler:E,isDrawerOpen:f}):null,n.jsx(Bt,{vendorId:m,isExpressPayPage:!0}),n.jsx(Yt,{navigate:o,location:a,companyId:C,accountId:v,analytics:L,currentTenant:i,vendorId:m,roleMap:g?.loggedInUserRoleMap,isSettings:Ue(a),expressPayDetails:c,onClickMenuIcon:()=>{T(!0)}})]})}const qt={overlayWidth:new J(100,100,58)},Jt=({authParams:e,downloadAccountDetailEndPoint:t,isAccountInfoDrawerOpen:s,zeniBankAccountDetail:o,closeDrawerHandler:a})=>{const r=_(),u=V(),l=A(i=>$e(i)),p=A(i=>U(i));if(S.getSignedInUser()==null)throw Error("Can't access Account detail page without signing in...");const g=()=>{a(!0)},x={depositAccount:o,onDismissClick:g,zeniAccountsConfigDetail:l,authParams:e,downloadAccountDetailEndPoint:t,currentTenant:p};return n.jsx(K,{anchor:"right",open:s,PaperProps:{style:{width:qt.overlayWidth.valuePercentage(u),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:r.colors.black,opacity:.75,cursor:"pointer"}}},onClose:()=>g(),children:n.jsx(Kt,{onClick:i=>i.stopPropagation(),children:n.jsx(kt,{...x})})})},Kt=z(Q)`
30
- display: flex;
31
- min-height: 100%;
32
- flex-direction: column;
33
- `,Qt={overlayWidth:new J(100,100,58)},cn=({isCheckDepositDrawerOpen:e,closeDrawerHandler:t})=>{const s=_(),o=V(),a=M(),r=A(i=>U(i)),u=S.getSignedInUser(),l=r.tenantId,p={userId:u?.userId??"",sessionId:u?.zeniSessionId??"",tenantId:l??""};if(u==null)throw Error("Can't access check deposit page without signing in...");const g=A(i=>qn(i)),x={analytics:L,checkDeposit:g,filesEndPoint:`${Se.fileMicroServiceBaseUrl}`,authParams:p,onSaveChangesToLocalStore:i=>{a(Kn(i))},updateFilesEntity:i=>{a(Ye({files:i}))},onAnotherTransferClick:()=>{a(ye())},onDeleteFile:i=>{a(We(i))},onEditFileName:(i,c)=>{a(Ge(i,c.split(".")[0]))},onCheckDpositClick:()=>{a(Jn())},onDismissClick:()=>{t(!0),a(ye())}};return n.jsxs(n.Fragment,{children:[n.jsx(ue,{analytics:L,onLoad:i=>(c=>c.trackPageLoaded(be.Event.accountsDepositCheckFormViewed))(i)}),n.jsx(K,{anchor:"right",open:e,PaperProps:{style:{width:Qt.overlayWidth.valuePercentage(o),boxShadow:"none",zIndex:8}},slotProps:{backdrop:{style:{backgroundColor:s.colors.black,opacity:.75,cursor:"pointer"}}},onClose:(i,c)=>(c==="backdropClick"||c==="escapeKeyDown")&&(t(!0),void a(ye())),children:n.jsx(Xt,{onClick:i=>i.stopPropagation(),children:n.jsx(At,{...x})})})]})},Xt=z(Q)`
34
- display: flex;
35
- min-height: 100%;
36
- flex-direction: column;
37
- `,ea={overlayWidth:new J(100,100,58)},na=q(function(e,t){const s=t.currentTenant?.companyId;return{plaidConnectionDetails:nt(e,s,"zeni_accounts","external_account").plaidConnectionDetails,depositAccountListView:He(e.depositAccountState,e.depositAccountListState)}},function(e,t){return{onReviewClick:()=>e(at()),clearReviewTransferDetail:()=>e(tt()),onFetchLinkTokenClick:s=>{e(Je("external_account",s))},onEstablishConnectionClick:s=>{e(qe(s,t.currentTenant?.companyId,"external_account",void 0,"link_external_account"))}}})(wt),ln=({isTransferDrawerOpen:e,authParams:t,downloadAccountDetailEndPoint:s,closeDrawerHandler:o,zeniAccountsConfig:a})=>{const r=A(f=>Qn(f)),u=A(f=>U(f)),l=_(),p=V(),g=M(),{accountId:x}=Y(),[i,c]=d.useState("achTransfer"),[m,C]=d.useState(!1);if(S.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const{useDynamicConfig:b}=Z(),{configValue:h}=b(G.zeniAccountsConfig),w=Ae(h),D=()=>{o(!0),g(Le())};return d.useEffect(()=>{r.reviewTransferDetail.fetchState==="Completed"&&C(!0)},[C,r.reviewTransferDetail.fetchState]),n.jsxs(n.Fragment,{children:[n.jsx(ue,{analytics:L,onLoad:f=>(I=>I.trackPageLoaded(be.Event.zeniAccountsTransferFormViewed))(f)}),n.jsx(K,{onClose:()=>{(i==="achTransfer"&&m===!1||i==="achTransfer"&&m&&r.fetchState==="Completed")&&D()},anchor:"right",open:e,PaperProps:{style:{width:ea.overlayWidth.valuePercentage(p),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:l.colors.black,opacity:.75,cursor:"pointer"}}},children:n.jsx(ta,{onClick:f=>f.stopPropagation(),children:n.jsx(na,{analytics:L,transferDetails:r,authParams:t,downloadAccountDetailEndPoint:s,onTransferClick:()=>{L.trackTransferBetweenAccountsFormClicked("Transfer",r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning?"Review Split Transfer":"Review Transfer",r.transferDetailLocalData.transferFrom?.label,r.transferDetailLocalData.transferTo?.label,r.transferDetailLocalData.amount.amount,r.reviewTransferDetail.reviewTransferMoney.isShowDailyAchLimitWarning,r.reviewTransferDetail.reviewTransferMoney.transferSchedules.length,r.transferDetailLocalData.transferFrom?.accType==="paymentAccount"&&r.transferDetailLocalData.transferTo?.accType==="depositAccount"&&a.zeniAccountsConfigDetail.depositProductConfig.depositProducts?.[0].range?.[1]!=null&&r.transferDetailLocalData.amount.amount>a.zeniAccountsConfigDetail.depositProductConfig.depositProducts[0].range[1]),g(et(x))},onDismissClick:D,onSaveChangesToLocalStore:f=>{g(Xn(f))},onAnotherTransferClick:()=>{C(!1),g(Le())},currentTenant:u,zeniAccountsConfigDetail:a,currentDrawerContent:i,setCurrentDrawerContent:c,showReviewContent:m,setShowReviewContent:C,onBackClick:()=>{},maxInsuredAmount:w.maxInsuredAmount})})})]})},ta=z(Q)`
38
- display: flex;
39
- min-height: 100%;
40
- flex-direction: column;
41
- `,aa=z.div`
42
- display: flex;
43
- min-height: 100%;
44
- width: 100%;
45
- flex: 1 1 auto;
46
- flex-direction: column;
47
- align-items: center;
48
- background-color: ${e=>e.theme.colors.grey4};
49
- `,oa=q(function(e,t){return{zeniAccountListView:Ke(e),isExpressPayEnabled:t.isExpressPayEnabled,analytics:t.analytics}},function(e,t){const{navigate:s,currentTenant:o,location:a,companyId:r,handleDrawerToggle:u,analytics:l,isBillPayEnabled:p,isDebitCardFeatureEnabled:g}=t,{tenantEmailDomain:x}=o;return{onZeniAccountClick:(i,c)=>{l.trackAccountsListPageClicked("Accounts Row Item Click",c,"active");const m=sa(x,i),C=ce(a.state?.pathnameStackToGoBack,a.pathname);s(m,{state:{pathnameStackToGoBack:C}})},onSettingsClick:()=>{l.trackAccountsListPageClicked("Settings Icon"),s("setup")},onReloadTransactions:()=>{e(Qe(!1))},handleMoveMoneyOptionSelection:(i,c)=>{let m="page-not-found";i==="sendMoney"&&(m=mn(x)),i==="payBill"?m=dn(o,p,g):i==="transfer"?(m=un(x),c!=null&&e(en(c))):i==="checkDeposit"&&(m=pn(x));const C=ce(a.state?.pathnameStackToGoBack,a.pathname);s(m,{state:{pathnameStackToGoBack:C}})},unlinkPaymentAccount:(i,c)=>{l.trackAccountsListPageClicked("Unlink Account",c),e(it(i))},onFetchLinkTokenClick:(i,c)=>{e(Je("external_account",i,c))},onUpdatePaymentAccountStatus:(i,c,m)=>{e(rt(i,c,"zeni_accounts","external_account",m))},onEstablishConnectionClick:i=>{e(qe(i,r,"external_account",void 0,"link_external_account"))},onCreateCheckingClick:i=>{e(st(i))},onClickMenuIcon:()=>{u(!0)},onTreasuryGetStartedClick:()=>{s("../../treasury/promo")},onAutoTransferClick:i=>{i?s("./auto-transfer",{state:{...a.state,scrollToAddRule:!0}}):s("./auto-transfer")}}})(St);function xe({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t}){const s=W(),o=ne(),a=M(),r=V(),{tenantEmailDomain:u}=Y(),{useDynamicConfig:l,useFeatureGate:p}=Z(),g=_(),{configValue:x}=l(G.zeniAccountsConfig),{isFeatureEnabled:i}=p(O.isTreasuryEnabled),{isFeatureEnabled:c}=p(O.isDebitCardFeatureEnabled),{isFeatureEnabled:m}=p(O.isAutoTransferRuleEnabled),{isFeatureEnabled:C}=p(O.isCheckingCommentingEnabled),b=Ae(x),h=A(B=>U(B)),w=h.companyId??S.getSignedInUserTenant(u)?.companyId,{configValue:D}=l(G.expressPayConfig),f=D.is_enable_all_tenants===!0||D.tenant_ids!=null&&D.tenant_ids.includes(h.tenantId),[I,F]=d.useState(!1),[R,j]=d.useState(!1),[v,P]=d.useState(!1),[T,E]=d.useState(!1),y=A(B=>Ke(B)),$=y.fetchState,ae=A(B=>Ce(B)),oe=ae?.fetchState??"Not-Started",me=!!h.companyZeniAccountInfo?.info?.isZeniAccountEnabled,N=te(),H=!!h.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,gn=!!h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,hn=ee(N?.loggedInUserRoleMap),fn=we(N?.loggedInUserRoleMap),yn=!!h.companyBillPayInfo?.info?.isBillPayEnabled,Pe=S.getSignedInUser(),xn={userId:Pe?.userId??"",sessionId:Pe?.zeniSessionId??"",tenantId:h.tenantId??""},Cn=`${Ie}/account_details`,{areTenantIdsInSync:ve}=Dt();d.useEffect(()=>{!I&&ve&&(F(!0),a(Qe(!1)))},[I,a,$,ve]),d.useEffect(()=>{!R&&oe==="Not-Started"&&w&&(j(!0),a(ke(!0)))},[R,oe,w,a]),d.useEffect(()=>{e!=null&&e===!0?P(!0):(P(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{E(t!=null&&t===!0)},[t]);const Ee=()=>{P(!1),o("..")},[kn,An]=d.useState(!1),je=B=>{An(B)},{isAiCfoAccessEnabled:wn,onAskAiCfoClick:Dn}=rn({mobileExploreReferrer:"Checking Accounts"});on({isDataReady:$==="Completed"});const In=h.company!=null&&Ne(h.company),ge=(i&&In)===!0&&!gn,[Sn,bn]=d.useState(!1),he=A(B=>B.treasurySetupViewState.treasuryFundsDetails),Pn=he.fundsDetails,vn=It(Pn);d.useEffect(()=>{ge!==!0||Sn||he?.fetchStatus.fetchState!=="Not-Started"||(bn(!0),a(ot()))},[he.fetchStatus,a]);const En=Xe(h),jn=De(c,h);return En===!0&&jn!==!0?n.jsx(sn,{}):me?n.jsxs(n.Fragment,{children:[y.fetchState==="Completed"&&v===!1&&T===!1?n.jsx(ue,{analytics:L,onLoad:B=>(Te=>{Te.trackAccountsListPageViewed(y.depositAccountsSelectorView.depositAccounts.length,y.externalAccountsSelectorView.paymentAccounts.length,_e(y.summary?.totalBalance.available.amount??0),_e(y.summary?.totalInterest.available.amount??0),y.zeniAccountsConfig.zeniAccountsConfigDetail.annualPercentageYield),ge&&Te.trackTreasuryPromoView("Checking Promo Banner")})(B)}):null,v===!0?n.jsx(ln,{closeDrawerHandler:Ee,isTransferDrawerOpen:v,zeniAccountsConfig:y.zeniAccountsConfig,authParams:xn,downloadAccountDetailEndPoint:Cn}):null,T===!0?n.jsx(cn,{closeDrawerHandler:Ee,isCheckDepositDrawerOpen:T}):null,n.jsxs(aa,{windowSize:r,children:[n.jsx(pe,{isAppContentDrawerOpen:kn,handleDrawerToggle:je}),n.jsx(oa,{zeniBankListView:y,navigate:o,currentTenant:h,location:s,companyId:w,analytics:L,maxInsuredAmount:b.maxInsuredAmount,isExpressPayEnabled:f,isBillPayEnabled:yn,isCheckingCommentingEnabled:C,isDebitCardFeatureEnabled:c,isAutoTransferRuleEnabled:m,handleDrawerToggle:je,showTreasuryPromo:ge,treasuryYieldPercentage:vn,treasuryInsuredAmount:5e5,isAiCfoAccessEnabled:wn,onAskAiCfoClick:Dn})]})]}):H&&hn?n.jsx(X,{to:"../setup"}):h.companyZeniAccountInfo?.info&&!H&&fn?n.jsx(X,{to:"../promo",state:s.state}):n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:g.colors.grey5}})}const dn=(e,t,s)=>{const o=De(s,e),{tenantEmailDomain:a}=e;return o===!0||t===!1?`/${a}/bills`:`/${a}/bill/new`},sa=(e,t)=>`/${e}/checking/${t}`,un=(e,t)=>t==null?`/${e}/checking/transfer`:`/${e}/checking/${t}/transfer`,pn=(e,t)=>t==null?`/${e}/checking/check-deposit`:`/${e}/checking/${t}/check-deposit`,mn=e=>`/${e}/checking/express-pay`,ra=z.div`
50
- display: flex;
51
- width: 100%;
52
- flex: 1 1 auto;
53
- flex-direction: column;
54
- align-items: center;
55
- min-height: 100vh;
56
- background-color: ${e=>e.theme.colors.grey4};
57
- `,ia=q(function(e,t){const{currentTenant:s}=t,o=nn(e,t.accountId),a=S.getSignedInUser(),r=e.tenantState.currentTenantId,u={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:r??""},l=o.accountDetail?.id??"";return{currentTenantCompanyName:s.companyName??"",authParams:u,downloadEndPoint:`${Se.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${l}`,zeniAccountDetail:o,isExpressPayEnabled:t.isExpressPayEnabled,fetchState:o.fetchState}},function(e,t){const{navigate:s,currentTenant:o,location:a,accountId:r}=t,{tenantEmailDomain:u}=o;return{handleMoveMoneyOptionSelection:(l,p)=>{let g="page-not-found";l==="sendMoney"?g=mn(u):l==="payBill"?g=dn(o,t.isBillPayEnabled,t.isDebitCardFeatureEnabled):l==="transfer"?(g=un(u,r),p!=null&&e(en(p))):l==="checkDeposit"?(g=pn(u,r),p!=null&&e(ct(p))):l==="accountStatement"&&(g=la(u,r));const x=ce(a.state?.pathnameStackToGoBack,a.pathname);s(g,{state:{pathnameStackToGoBack:x}})},onAccountDetailClick:()=>{const l=ca(u,r),p=ce(a.state?.pathnameStackToGoBack,a.pathname);s(l,{state:{pathnameStackToGoBack:p}})},onEditNameClick:l=>{e(Re(r,"editName",l))},onReloadZeniAccountDetailPage:()=>{e(tn(r,!1))},onCloseAccountClick:()=>{e(Re(r,"closeAccount",""))},onBackClick:()=>{s("../",{relative:"path"})}}})(bt);function re({isTransferDrawerOpen:e,isCheckDepositDrawerOpen:t,isAccountInfoDrawerOpen:s}){const o=W(),a=ne(),r=M(),u=V(),{tenantEmailDomain:l,accountId:p}=Y(),{useDynamicConfig:g}=Z(),{useFeatureGate:x}=Z(),{isFeatureEnabled:i}=x(O.isDebitCardFeatureEnabled),{isFeatureEnabled:c}=x(O.isCheckingCommentingEnabled),m=A(H=>U(H)),{configValue:C}=g(G.expressPayConfig),b=C.is_enable_all_tenants===!0||C.tenant_ids!=null&&C.tenant_ids.includes(m.tenantId),h=!!m.companyBillPayInfo?.info?.isBillPayEnabled,w=S.getSignedInUser(),D=m.companyId??S.getSignedInUserTenant(l)?.companyId,f={userId:w?.userId??"",sessionId:w?.zeniSessionId??"",tenantId:m.tenantId??""},I=`${Ie}/account_details`,[F,R]=d.useState(!1),[j,v]=d.useState(!1),[P,T]=d.useState(!1),[E,y]=d.useState(!1),$=A(H=>nn(H,p??"")),ae=$.fetchState,{isAiCfoAccessEnabled:oe,onAskAiCfoClick:me}=rn({mobileExploreReferrer:"Checking Account Detail"});on({isDataReady:ae==="Completed"}),d.useEffect(()=>{F||(r(tn(p??"",!1)),R(!0))},[F,r,ae]),d.useEffect(()=>{y(s!=null&&s===!0)},[s]),d.useEffect(()=>{e!=null&&e===!0?v(!0):(v(!1),document.body.style.overflow="auto")},[e]),d.useEffect(()=>{T(t!=null&&t===!0)},[t]);const N=()=>{y(!1),a("..")};return n.jsxs(n.Fragment,{children:[E===!0&&$.accountDetail!=null?n.jsx(Jt,{authParams:f,downloadAccountDetailEndPoint:I,closeDrawerHandler:N,isAccountInfoDrawerOpen:E,zeniBankAccountDetail:$.accountDetail}):null,j===!0?n.jsx(ln,{closeDrawerHandler:N,isTransferDrawerOpen:j,zeniAccountsConfig:$.zeniAccountsConfig,authParams:f,downloadAccountDetailEndPoint:I}):null,P===!0?n.jsx(cn,{closeDrawerHandler:N,isCheckDepositDrawerOpen:P}):null,n.jsx(ra,{windowSize:u,children:n.jsx(ia,{navigate:a,currentTenant:m,location:o,companyId:D,isDebitCardFeatureEnabled:i,accountId:p??"",isBillPayEnabled:h,isCheckingCommentingEnabled:c,isExpressPayEnabled:b,isAiCfoAccessEnabled:oe,onAskAiCfoClick:me})})]})}const ca=(e,t)=>`/${e}/checking/${t}/account-info`,la=(e,t)=>`/${e}/checking/${t}/statements`,da=q(function(e,t){const{companyId:s}=t;return{zeniAccountSetupView:lt(e,s),meetingUrl:"https://meetings.hubspot.com/niharn/demo-accounts?embed=true"}},function(e,t){const{navigate:s,companyId:o}=t;return{onSetupButtonClick:()=>{L.trackAccountsPromoPageClicked("Setup Accounts"),e(dt(o))},onBackClick:()=>{s("../..",{relative:"path"})},onSetupZeniAccountSuccess:()=>{s("../setup",{relative:"path"})}}})(vt),ua=()=>{const e=ne(),t=W(),{tenantEmailDomain:s}=Y(),{useDynamicConfig:o}=Z(),a=_(),[r,u]=d.useState(!1),[l,p]=d.useState(!1),g=A(f=>U(f)),{configValue:x}=o(G.zeniAccountsConfig),i=Ae(x);d.useEffect(()=>{l===!1&&t.state?.message==="activation"&&p(!0)},[t.state]);const c=S.getSignedInUserTenant(s)?.companyId??g.companyId,m=S.getSignedInUser(),C=!!g.companyZeniAccountInfo?.info?.isZeniAccountTOSAccepted,b=f=>{u(f)};if(m==null)throw Error("Can't access Zeni account promo page without signing in...");const h=te(),w=ee(h?.loggedInUserRoleMap),D=we(h?.loggedInUserRoleMap);if(C&&w)return n.jsx(X,{to:"../../checking/setup"});if(g.company?.companyZeniAccountInfo&&(!C&&w||D)){if(t.state?.message==="activation"){const f=an(t.state?.pathnameStackToGoBack);e(t.pathname,{state:{...t.state,message:void 0,pathnameStackToGoBack:f.newStack}})}return n.jsxs(n.Fragment,{children:[n.jsx(Pt,{showConfetti:l}),n.jsx(ue,{analytics:L,onLoad:f=>(I=>I.trackPageLoaded(be.Event.accountsPromoPageViewed))(f)}),n.jsx(pe,{isAppContentDrawerOpen:r,handleDrawerToggle:b}),n.jsx(da,{analytics:L,navigate:e,companyId:c,onClickMenuIcon:()=>{b(!0)},maxAnnualPercentageYield:i.maxAnnualPercentageYield,maxInsuredAmount:i.maxInsuredAmount,exampleBankBalance:3e6})]})}return n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:a.colors.grey5}})};function za(){const e=W(),t=A(E=>U(E)),s=_(),{useFeatureGate:o,useDynamicConfig:a}=Z(),r=te(),u=ee(r?.loggedInUserRoleMap),l=we(r?.loggedInUserRoleMap),p=!!t.company?.companyZeniAccountInfo.isZeniAccountEnabled,g=!!t.company?.companyZeniAccountInfo.isZeniAccountTOSAccepted,{isFeatureEnabled:x}=o(O.isChargeCardFeatureEnabled),{isFeatureEnabled:i}=o(O.isDebitCardFeatureEnabled),c=Xe(t),m=De(i,t),C=t?.userRole!=null&&ut(t?.userRole),b=(t?.company==null||t.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C)&&pt(r?.loggedInUserRoleMap),h=mt(r?.loggedInUserRoleMap),w=(t?.company==null||t.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C)&&gt(r?.loggedInUserRoleMap),{isFeatureEnabled:D}=o(O.isDepositAccountsFeatureEnabled),f=D&&!C,{configValue:I}=a(G.expressPayConfig),F=I.is_enable_all_tenants===!0||I.tenant_ids!=null&&I.tenant_ids.includes(t.tenantId),{isFeatureEnabled:R}=o(O.isAutoTransferRuleEnabled),j=Et(t,x,i)&&!C&&ht(r?.loggedInUserRoleMap),v=ft(r?.loggedInUserRoleMap),P=f&&ee(r?.loggedInUserRoleMap),T=P||Ze(r?.loggedInUserRoleMap);return n.jsxs(Ve,{children:[n.jsx(k,{path:"setup",element:n.jsx(ze,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:h,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:P,isChargeCardAdminLevelAccess:j,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"setup"})}),n.jsx(k,{path:"verification",element:n.jsx(ze,{isBillPayAdminLevelAccess:b,isUserHasOnlyBillPayAccess:h,isReimbursementAdminLevelAccess:w,isZeniAccountAdminLevelAccess:P,isChargeCardAdminLevelAccess:j,isUserHasOnlyCardAccess:v,productType:"zeni_accounts",type:"verification"})}),R?n.jsxs(n.Fragment,{children:[n.jsx(k,{path:"auto-transfer",element:n.jsx(Me,{})}),T?n.jsx(k,{path:"auto-transfer/:ruleId/edit",element:n.jsx(Me,{isEditDrawerOpen:!0})}):null]}):n.jsx(k,{path:"auto-transfer",element:n.jsx(ie,{})}),F&&u?n.jsxs(n.Fragment,{children:[n.jsx(k,{path:"express-pay",element:n.jsx(se,{})}),n.jsx(k,{path:"express-pay/add-ach",element:n.jsx(se,{isAddACHDrawerOpen:!0})}),n.jsx(k,{path:"express-pay/add-wire/add-address",element:n.jsx(se,{isAddAddressDrawerOpen:!0})}),n.jsx(k,{path:"express-pay/add-wire",element:n.jsx(se,{isAddWireDrawerOpen:!0})})]}):n.jsx(k,{path:"express-pay",element:n.jsx(ie,{})}),n.jsx(k,{path:"promo",element:n.jsx(ua,{})}),c&&!m?n.jsx(k,{path:"/*",element:n.jsx(sn,{})}):p?n.jsxs(n.Fragment,{children:[n.jsx(k,{path:"/",element:n.jsx(xe,{})}),n.jsx(k,{path:"transfer",element:n.jsx(xe,{isTransferDrawerOpen:!0})}),n.jsx(k,{path:"check-deposit",element:n.jsx(xe,{isCheckDepositDrawerOpen:!0})}),n.jsx(k,{path:":accountId/*",element:n.jsx(pa,{})}),n.jsx(k,{path:"*",element:n.jsx(ie,{})})]}):g&&u?n.jsx(k,{path:"*",element:n.jsx(X,{to:"../setup"})}):t.company?.companyZeniAccountInfo&&l?n.jsx(k,{path:"*",element:n.jsx(X,{to:"../promo",state:e.state})}):n.jsx(k,{path:"*",element:n.jsx(de,{fetchState:"In-Progress",style:{backgroundColor:s.colors.grey5,boxShadow:`0px 2px ${jt.sp1} ${s.colors.dropShadowNormal}`}})})]})}function pa(){return n.jsxs(Ve,{children:[n.jsx(k,{path:"/",element:n.jsx(re,{})}),n.jsx(k,{path:"account-info",element:n.jsx(re,{isAccountInfoDrawerOpen:!0})}),n.jsx(k,{path:"transfer",element:n.jsx(re,{isTransferDrawerOpen:!0})}),n.jsx(k,{path:"check-deposit",element:n.jsx(re,{isCheckDepositDrawerOpen:!0})}),n.jsx(k,{path:"statements",element:n.jsx(Lt,{})}),n.jsx(k,{path:"*",element:n.jsx(ie,{})})]})}export{za as default};
@@ -1,9 +0,0 @@
1
- import{j as i}from"./liveblocks-Dn3WlYDG.js";import{a as u}from"./sentry-BBtxjqBH.js";import{h as x,u as B,g as P,i as $,j as p}from"./core-CBQNMmNB.js";import{Je as s,Jd as j,Pt as v,eR as C,Pu as T}from"./zeni-epic-state-kigW-Vb1.js";import{J as z,at as g,m as D,z as E,B as L,c6 as N,r as U}from"./index-C6g7x9Xf.js";import{n as _}from"./mui-BaxUp1f6.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1f627d18-2f82-44a2-b661-b31949ce5bb7",e._sentryDebugIdIdentifier="sentry-dbid-1f627d18-2f82-44a2-b661-b31949ce5bb7")}catch{}})();const J=_.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
- `;function q(){const e=x(),n=B(),d=z(),l=P();let{accountId:a}=$(),f=`${g.bankingMicroServiceBaseUrl}/1.0/deposit-accounts/${a}`;a==null&&l.pathname.includes(`${s}/statements`)&&(a=s,f=`${g.bankingMicroServiceBaseUrl}/1.0/${s}`);const[m,b]=u.useState(!1),h=D();u.useEffect(()=>{m||(b(!0),n(j(a??"",!1)))},[m,n]);const o=p(t=>v(t,a??"")),y=()=>{const t=U(l.state?.pathnameStackToGoBack),S=t.poppedPathname??"..";e(S,{state:{pathnameStackToGoBack:t.newStack}})},r=E.getSignedInUser(),c=p(t=>C(t)),I={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:c.tenantId??""},w=T(a??"")===!0?s:o.zeniAccountDetail?.accountLast4??"",k=c.company?.companyInfo.companyLegalName??c.companyName;if(r==null)throw Error("Can't access address page without signing in...");return o.fetchState!=="Completed"?i.jsx(L,{fetchState:"In-Progress",style:{backgroundColor:h.colors.grey5}}):i.jsx(J,{windowSize:d,children:i.jsx(N,{currentTenantCompanyName:k,statementListView:o,accountLast4:w,onBackClick:y,authParams:I,downloadEndPoint:f})})}export{q as Z};