@zeniai/web-app-ui 5.0.70-next → 5.0.70-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.
- package/dist/assets/AddressRoutes-BTfuI9Bw.js +1 -0
- package/dist/assets/{AddressScreen-CqN2m8jr.js → AddressScreen-jTT04DFx.js} +1 -1
- package/dist/assets/{AiCfoScreen-CAYEJ5O5.js → AiCfoScreen-BIhlfQQ_.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-4zgtGZR2.js → BillPayApprovalRoutes-C44-nGT6.js} +1 -1
- package/dist/assets/{BillPayRoutes-jThpswSi.js → BillPayRoutes-CZhvS7X4.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-CDrDTvtJ.js → BusinessVerificationPageScreen-DS8yDRTx.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-cvyBbKCd.js → ChargeCardRoutes-C7ZPgkk_.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-DBj4wqbX.js → CompanyPassportScreen-Dh1MJ-Ph.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-B9LY9Ett.js → ConnectionAuthScreen-B4w8rGYZ.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-BVLhDDfh.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-BIHdUdzB.js → CustomerOnboardingRoutes-BeOGrGwK.js} +1 -1
- package/dist/assets/{DashboardRoutes-CvW0eCrD.js → DashboardRoutes-BSQu3xMl.js} +1 -1
- package/dist/assets/{DefaultTenantHome-CG7ZnfV5.js → DefaultTenantHome-f0BMdnqq.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-DZ1aEjMk.js → DomesticWireDetailScreen-Dcgzj1nk.js} +1 -1
- package/dist/assets/{DrawerScreen-CR4GTmpO.js → DrawerScreen-BIAu5bA1.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-HWftLZJg.js → EntityDetailRoutes-BMnEqgs2.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-DaQKUIoC.js → ExpenseAutomationRoutes-G2jBVNVU.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-C-DrdhwC.js → FeaturePreviewScreen-D6Uxvt0_.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-CJ7qsGNd.js → MagicLinkRoutes-BJg4uTJC.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-BYXwKVNf.js → MagicLinkSignInScreen-CkYMgnfC.js} +1 -1
- package/dist/assets/{MobileAppDrawer-CanZHImd.js → MobileAppDrawer-CQwwOR5p.js} +1 -1
- package/dist/assets/NotFoundScreen-C_3ycSKf.js +1 -0
- package/dist/assets/{NotificationRoutes-DaH9wBSH.js → NotificationRoutes-17FmFpDt.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-oaiw53DB.js → PandLWithForecastRoutes-DEaEOUDv.js} +1 -1
- package/dist/assets/{PeopleRoutes-Bp6G-oiV.js → PeopleRoutes-DCpSQt8d.js} +1 -1
- package/dist/assets/{PerformanceRoutes-BVKrav5z.js → PerformanceRoutes-Clc6K-Sz.js} +1 -1
- package/dist/assets/{Preview-D2McFqjx.js → Preview-CJ0Bmv63.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-r4C0IwOV.js → QBOConnectionScreen-DiY0aEcB.js} +1 -1
- package/dist/assets/{ReferralListScreen-B--T5kCL.js → ReferralListScreen-Dq2B0WMt.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-DcmO3rtg.js → ReimbursementApprovalRoutes-hJy0lLcU.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DHB0Y6Ez.js → ReimbursementApprovalRuleDetailScreen-DdLOedPE.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-dJTZ5Llk.js → ReimbursementRoutes-CvnLlTDQ.js} +1 -1
- package/dist/assets/{ReportsRoutes-WKOAJGf5.js → ReportsRoutes-CWkv155p.js} +1 -1
- package/dist/assets/{RewardsRoutes-BmS21jMf.js → RewardsRoutes-Bl8kgQI_.js} +1 -1
- package/dist/assets/{ScreenRoutes-D7TgV1r1.js → ScreenRoutes-Bpg_5BOg.js} +2 -2
- package/dist/assets/{SettingsRoutes-DckMCFWG.js → SettingsRoutes-BzxQN_Az.js} +1 -1
- package/dist/assets/{SetupPagesScreen-D3DtxfXm.js → SetupPagesScreen-tsJgjmfM.js} +1 -1
- package/dist/assets/{SignInScreen-qBhC3YaP.js → SignInScreen-Dd8ZY6ef.js} +1 -1
- package/dist/assets/{SignOutScreen-W9tMxqrB.js → SignOutScreen-B069qVqp.js} +1 -1
- package/dist/assets/{TaskListScreen-B22aeT45.js → TaskListScreen-FDYDQZ8O.js} +1 -1
- package/dist/assets/{TaskRoutes-DN9mbXAb.js → TaskRoutes-DOluYvA-.js} +1 -1
- package/dist/assets/TransactionDetailRoutes-CKqmkQac.js +1 -0
- package/dist/assets/{TransactionDetailScreen-BhZmCHGq.js → TransactionDetailScreen-CuOcn9Eq.js} +1 -1
- package/dist/assets/{TransactionListRoutes-MecJicQI.js → TransactionListRoutes-C7qZdmUZ.js} +1 -1
- package/dist/assets/{TreasuryRoutes-BUB7tWC4.js → TreasuryRoutes-c0G3A1dL.js} +1 -1
- package/dist/assets/{VendorsRoutes-C2i_Q0tE.js → VendorsRoutes-B3BHswUk.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-CS6XnsvF.js → WiseConfirmationScreen-BtsNW7qm.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-DN-sTVza.js → ZeniAccountRoutes-DOB227kl.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-C3GA_297.js → ZeniAccountStatementScreen-CCaF_hvY.js} +1 -1
- package/dist/assets/{accountMappingHelper-DFjUKa9J.js → accountMappingHelper-dHb9X7tX.js} +1 -1
- package/dist/assets/{analytics-D8oYfpTm.js → analytics-COzTMS9t.js} +1 -1
- package/dist/assets/{analyticsHelper-DBHckA8w.js → analyticsHelper-CQQBcwi_.js} +1 -1
- package/dist/assets/{core-nI7qhWxF.js → core-DMKpdX6V.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-BO4lHXB6.js → decodeURIComponentSafe-kaKdrE3i.js} +1 -1
- package/dist/assets/{dnd-C_C-95qu.js → dnd-B4MKAlTf.js} +1 -1
- package/dist/assets/{empty-CFdjgM_6.js → empty-CuM4id4M.js} +1 -1
- package/dist/assets/{empty-Cw25tTjp.js → empty-_gHzexXT.js} +1 -1
- package/dist/assets/{emptyVideoElement-8mGBsq8M.js → emptyVideoElement-Ba3zd13y.js} +1 -1
- package/dist/assets/{epic-CsmRNRNv.js → epic-B57XJqsg.js} +1 -1
- package/dist/assets/{getLocaleForTenant-BT8jU8Uf.js → getLocaleForTenant-DIj12PGu.js} +1 -1
- package/dist/assets/{index-Ds3fQe8k.js → index-1s98NswJ.js} +1 -1
- package/dist/assets/{index-DOZAHQPK.js → index-B-S1sw2q.js} +7 -7
- package/dist/assets/{index-LWlg87mc.js → index-CapqGJKF.js} +1 -1
- package/dist/assets/{index-i1zScItT.js → index-CciFFvoQ.js} +1 -1
- package/dist/assets/{index-QA5EYQmg.js → index-DgRsL-zD.js} +2 -2
- package/dist/assets/{index-Bi6n-I0p.js → index-Ips891mX.js} +1 -1
- package/dist/assets/{index-BTUmM8Z2.js → index-P5Uv4EpL.js} +1 -1
- package/dist/assets/{lexical-Dn1INXtc.js → lexical-ChtLw4s9.js} +1 -1
- package/dist/assets/{liveblocks-9BgV5FgM.js → liveblocks-CqGMBzbB.js} +1 -1
- package/dist/assets/{lottie-XIGGYNiw.js → lottie-BflCEFtX.js} +1 -1
- package/dist/assets/{mui-fAmxa5Xh.js → mui-C4peJOR0.js} +1 -1
- package/dist/assets/{pathToGoBack-DYMk9yrd.js → pathToGoBack-CHCqWOFU.js} +1 -1
- package/dist/assets/{pdf-DKSy7px9.js → pdf-C6aRryDe.js} +3 -3
- package/dist/assets/{pdf-lib-QGtQfDJE.js → pdf-lib-BMPC_qNx.js} +1 -1
- package/dist/assets/{plaid-DVpb3qqP.js → plaid-DWM21M_R.js} +1 -1
- package/dist/assets/{pusher-XpoFJ9aT.js → pusher-DqpEa1pu.js} +1 -1
- package/dist/assets/{react-M8FR3LMy.js → react-5UT9NFJ3.js} +1 -1
- package/dist/assets/{react-BapJ6S9j.js → react-6AGaHHFp.js} +1 -1
- package/dist/assets/{react-BsGlkpw5.js → react-B4FfdgNG.js} +1 -1
- package/dist/assets/{react-DmZJuUHn.js → react-Brr3hJcV.js} +1 -1
- package/dist/assets/{react-lgFVK-Yq.js → react-CmDKO3IZ.js} +1 -1
- package/dist/assets/{react-DhbVKugu.js → react-YdR2ykUN.js} +1 -1
- package/dist/assets/{recharts-BW5HAPx6.js → recharts-DEvckcqQ.js} +1 -1
- package/dist/assets/{routePaths-CrSok7sW.js → routePaths-DwcIzItv.js} +1 -1
- package/dist/assets/{sentry-p6MzREFX.js → sentry-By_w3AbQ.js} +1 -1
- package/dist/assets/{url-VIlXu71o.js → url-B4q4O9pf.js} +1 -1
- package/dist/assets/{url-BNGZMs7z.js → url-XDFiNkBY.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-Cw-C7Jga.js → useAskAiCfoHostNavButtonProps-CjhdCks2.js} +1 -1
- package/dist/assets/{useDeviceId-BMD5TpXb.js → useDeviceId-DH6-WcAx.js} +1 -1
- package/dist/assets/{useFetchSuggestedQuestionsWhenReady-B-aMJgNE.js → useFetchSuggestedQuestionsWhenReady-CU6v8eqg.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-BV5Gn6Hv.js → useInitialThreadRequest-BqzvhNbA.js} +1 -1
- package/dist/assets/{utils-D1SR7NNe.js → utils-CSUcsfYh.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-CaYRSAqs.js → withTransactionSidePanel-yqBBfrLp.js} +1 -1
- package/dist/assets/{zeni-epic-state-Crbh9Aj_.js → zeni-epic-state-dcVRrD1h.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/AddressRoutes-DeiyTicu.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-qAuUHkDS.js +0 -1
- package/dist/assets/NotFoundScreen-qOlBSqQS.js +0 -1
- package/dist/assets/TransactionDetailRoutes-Bh5HP7Aa.js +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as U}from"./liveblocks-
|
|
1
|
+
import{j as U}from"./liveblocks-CqGMBzbB.js";import{a as c}from"./sentry-By_w3AbQ.js";import{h as pe,g as s,l as Je,u as Ke,j as Qe,i as R}from"./core-DMKpdX6V.js";import{eN as he,eU as ea,eV as Se,eP as aa,bn as ta,f2 as na,eW as sa,eX as oa,eZ as ia,f0 as ra,fa as da,f1 as g,f4 as la,f5 as ue,f8 as ca,f6 as ua,f7 as fa,f9 as ma,cH as ba,fc as pa,cN as ha,bv as Sa,eM as ga,fh as Ea,fi as ka,fg as Ca}from"./zeni-epic-state-dcVRrD1h.js";import{a1 as ya,a2 as Ia,A as Ta,p as wa,z as k,a3 as _a,M as Aa,a4 as Fa,u as Da,m as r,a5 as va,a6 as $a,j as Ba,a as Ma,a7 as Pa,Y as Ra,a8 as xa,a9 as Na,aa as fe,ab as me,L as Ua,ac as Va,ad as be,c as x,y as _,ae as N,af as Ga}from"./index-B-S1sw2q.js";import{D as Oa}from"./mui-C4peJOR0.js";(function(){try{var f=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new f.Error().stack;d&&(f._sentryDebugIds=f._sentryDebugIds||{},f._sentryDebugIds[d]="f8e318d7-9d1c-421b-aa77-1334701ab894",f._sentryDebugIdIdentifier="sentry-dbid-f8e318d7-9d1c-421b-aa77-1334701ab894")}catch{}})();const ja=ya(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:a}=Je(),t=Ke(),C=Ta(),o=Qe(),V=aa(),m=pe(),{useFeatureGate:i}=wa(),G=k.getSignedInUser(),A=ta(G),n=s(e=>he(e)),ge=_a(),Ee=n.masterTOSInfo?.isMasterTOSAccepted??!1,{setIsAiCfoOpen:ke}=Aa(),O=s(e=>na(e)),j=O.uiState.currentChatSessionId,y=Fa(),{setLoading:Ce}=Da(),[F,L]=c.useState(void 0),D=R("/:tenantEmailDomain/dashboard")!==null,z=R("/:tenantEmailDomain/reports")!==null,I=R("/:tenantEmailDomain/onboarding/*")!==null,{isFeatureEnabled:Y}=i(r.isDepositAccountsFeatureEnabled),{isFeatureEnabled:ye}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:H}=i(r.isDebitCardFeatureEnabled),Ie=va(n,ye,H),{isFeatureEnabled:Te}=i(r.isSettingsFeatureEnabled),Z=s(e=>sa(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),v=s(e=>oa(e));c.useEffect(()=>{y&&T&&!I&&v.fetchState==="Not-Started"&&m(ia(!0))},[y,T,v.fetchState,I]);const h=k.getSignedInUser(),$=s(e=>e.tenantState),we=s(e=>$.fetchState==="Completed"?ra(e):[]),E=s(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:_e}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Ae}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:W}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:X}=i(r.isExpenseAutomationEnabledV2),q=X||W&&A,{isFeatureEnabled:Fe}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:ve}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:$e}=i(r.isDashboardSidebarNewYearAnimationEnabled),{isFeatureEnabled:Be}=i(r.isTreasuryEnabled),{isFeatureEnabled:Me}=i(r.isTaskManagerCustomerUserAccessEnabled),Pe=A||!A&&Me,Re=n.company!=null&&da(n.company),w=Be&&Re,xe=s(e=>g(e).totalUnreadCount),Ne=s(e=>g(e).reducedFetchCountState),J=s(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),K=s(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Ue=s(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),B=s(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:Q,isLoading:ee,isFetchingMore:ae,hasFetchedAll:te,fetchMore:Ve}=$a();c.useEffect(()=>{const e=setTimeout(()=>Ve?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(ee===!1&&ae===!1&&te===!0)if(n?.companyId!=null&&Q!=null){const e=`dashboard_${n.companyId}`;L(Q.filter(u=>u.roomId===e&&u.readAt==null).length)}else L(0)},[ee,ae,te]),c.useEffect(()=>{y&&!I&&Ue.fetchState==="Not-Started"&&V.tenantId!=null&&m(la("task_manager","dashboard"))},[y,V.tenantId]),c.useEffect(()=>{I||B.fetchState!=="Not-Started"||m(ue({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{F!=null&&B.fetchState==="In-Progress"&&(m(ue({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(Se({unreadCount:F},"comments")))},[F,B.fetchState]);const Ge={fetchStatus:Ne,count:xe},ne=a!=null?k.getSignedInUserTenant(a):null,se=s(e=>ne?.tenantId!=null?ca(e,ne.tenantId):void 0),S=[];_e===!1&&S.push("accounts_payable_aging"),Ae===!1&&S.push("accounts_receivable_aging"),Y===!1&&S.push("zeni_accounts_promo_card"),T===!1&&S.push("rewards_card"),q===!1&&S.push("expense_automation_card");const Oe=Ba(),oe=s(e=>ua(e,S,h,X,W,w).fetchState),ie=s(e=>fa(e).fetchState),je=D&&(oe==="Completed"||oe==="Error")||z&&(ie==="Completed"||ie==="Error")||!D&&!z?void 0:"disabled",Le=c.useMemo(()=>ma(n.userRole),[n.userRole]),ze=ba(Le),Ye=n?.rewardsLastViewedTime==null,He=h?.userEmail!=null&&Z.fetchState==="Completed"&&pa(Z.notificationSettings,h.userEmail,H,n),re=Ma(),Ze=re&&Pa(t),de=ha(Oe?.loggedInUserRoleMap),le=n.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,M=c.useCallback(()=>w&&de&&!k.getTreasuryPopupSeen(a??"")&&le===!1&&Ra(t.pathname)!=="treasury",[w,de,le,t.pathname,a]),[We,ce]=c.useState(M);c.useEffect(()=>{ce(M())},[M]);const Xe=s(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,qe=xa(Xe);return U.jsx(Oa,{container:window.document.body,variant:"temporary",open:f,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:U.jsx(Na,{signedInUser:G,currentTenantId:$.currentTenantId??"",tenants:$.fetchState==="Completed"?we:se!=null?[se]:[],currentTenant:n,isTenantDropdownDisabled:je,isSettings:me(t),isSettingsFeatureEnabled:Te,isVendorsTabVisible:ze,isZeniAccountEnabled:Y,isChargeCardEnabled:Ie,isTreasuryEnabled:w,treasuryYieldPercentage:qe,isTreasuryPopupVisible:We,isNotificationsTabVisible:He,notificationCountDetails:Ge,isExpenseAutomationEnabledForUser:q&&Sa(n.userRole)===!1,selectedMenu:fe(t),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Ye,rewardsPlan:v.rewardsPlan},isAiCfoAccessEnabled:re,onNotificationIconClick:()=>{d(!1);let e=J===0&&K>0?"notifications/comments":"notifications/tasks";me(t)&&(e=J===0&&K>0?"../../notifications/comments":"../../notifications/tasks");const u=_(t.state?.pathnameStackToGoBack,t.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=_(t.state?.pathnameStackToGoBack,t.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),a==null)return;if(e.type==="ai_cfo"){const b=_(t.state?.pathnameStackToGoBack,t.pathname);return x.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),Ee?void o(`/${a}/ai-cfo/explore`,{state:{pathnameStackToGoBack:b,referrer:"Sidebar"}}):void(ge?ke(!0):o(`/${a}/dashboard`,{state:{pathnameStackToGoBack:b,referrer:"Sidebar",message:"open_ai_cfo_drawer"}}))}const u=_(t.state?.pathnameStackToGoBack,t.pathname),l=e.type,p=N(l)&&l!=="command_center";if(N(e.type)&&E[n.tenantId]!=null&&x.trackMonthEndCloseClicked(E[n.tenantId].month,E[n.tenantId].year,"Sidebar"),p&&E[n.tenantId]!=null){const b=E[n.tenantId];return void o(`/${a}/month_end_close_checks/review/${e.type}/${b.month}-${b.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const P=Ga(e.type);be(e.type)?(j!=null&&m(Ca()),o(`/${a}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${a}/${P}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${a}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${a}/rewards`)},handleBackClick:()=>{o(`/${a}/dashboard`)},handleTenantSelect:e=>{Ce(Ua.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=fe(t);let p=`/${encodeURIComponent(u)}/`;const P=N(l);l==="home"?p+="dashboard":l==="users_and_roles"?p+="people":Va(l)?p+="settings/my_profile":be(l)?p+=`ai-cfo/${l}`:p+=l==="task_checklist"?"tasks":P?"month_end_close_checks/review":encodeURIComponent(l),o(p,{replace:!0}),h!=null&&(m(Ea(e.tenantId)),m(ka(h.userId,e.tenantId,h.zeniSessionId)));const b=e;x.trackCompanySwitch(b.companyId,b.companyName,b.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(a??"",!0),ce(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Ze,aiCfoView:O,isOnDashboard:D,updateCurrentChatSessionId:e=>{m(ga({sessionId:e,agentId:"controller"})),o(`/${a}/ai-cfo/${e}`,{state:{...t.state}})},halloweenAnimationEnabled:Fe,isTaskManagerAccessEnabled:Pe,thanksGivingAnimationEnabled:De,christmasAnimationEnabled:ve,newYearAnimationEnabled:$e})})}),Xa=f=>{const d=pe(),a=s(C=>he(C)),t={events:a.userRoleId!=null?[`private-${a.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Ia(o)&&ea(o.mode)==="dashboard"&&d(Se({unreadCount:o.data.unread},"tasks"))}};return U.jsx(ja,{...f,...t})};export{Xa as M};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./liveblocks-CqGMBzbB.js";import{j as r,k as i}from"./core-DMKpdX6V.js";import{X as n}from"./index-B-S1sw2q.js";import"./mui-C4peJOR0.js";import"./sentry-By_w3AbQ.js";import"./zeni-epic-state-dcVRrD1h.js";import"./recharts-DEvckcqQ.js";import"./analytics-COzTMS9t.js";import"./plaid-DWM21M_R.js";import"./dnd-B4MKAlTf.js";import"./stripe-DMRn4zHo.js";import"./lottie-BflCEFtX.js";import"./lexical-ChtLw4s9.js";import"./pdf-C6aRryDe.js";import"./utils-CSUcsfYh.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="08a1fb90-c2ee-45d3-8148-a56dffb2c13c",o._sentryDebugIdIdentifier="sentry-dbid-08a1fb90-c2ee-45d3-8148-a56dffb2c13c")}catch{}})();const a=i(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(n);function h(){const o=r();return e.jsx(a,{navigate:o})}export{h as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{l as ct,a as mt,m as dt,j as _}from"./liveblocks-
|
|
1
|
+
import{l as ct,a as mt,m as dt,j as _}from"./liveblocks-CqGMBzbB.js";import lt from"./NotFoundScreen-C_3ycSKf.js";import{a as k}from"./sentry-By_w3AbQ.js";import{j as ft,u as ut,l as ht,h as pt,g as S,k as kt,n as gt,o as H}from"./core-DMKpdX6V.js";import{cp as St,eW as K,eN as Q,f9 as bt,f1 as b,OF as X,f5 as d,eV as y,qq as M,vE as It,OG as Ct,eU as Tt,fc as yt,qv as At,OH as F,bq as $,gC as x,qz as J,OI as Et,cA as _t,cu as Nt}from"./zeni-epic-state-dcVRrD1h.js";import{N as Bt,z as wt,p as xt,m as vt,cr as Rt,y as N,a1 as Ut,cs as Dt,a2 as Gt,w as Pt}from"./index-B-S1sw2q.js";import"./mui-C4peJOR0.js";import{u as Ft}from"./useAskAiCfoHostNavButtonProps-CjhdCks2.js";import{c as $t}from"./useFetchSuggestedQuestionsWhenReady-CU6v8eqg.js";import"./recharts-DEvckcqQ.js";import"./analytics-COzTMS9t.js";import"./plaid-DWM21M_R.js";import"./dnd-B4MKAlTf.js";import"./stripe-DMRn4zHo.js";import"./lottie-BflCEFtX.js";import"./lexical-ChtLw4s9.js";import"./pdf-C6aRryDe.js";import"./utils-CSUcsfYh.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="0538f2ee-8846-4df8-910a-1fb43e7a6a25",t._sentryDebugIdIdentifier="sentry-dbid-0538f2ee-8846-4df8-910a-1fb43e7a6a25")}catch{}})();const Mt=(t,l)=>new Promise((n,u)=>{const g=t.map(i=>new Promise(s=>{l(i),s()}));Promise.all(g).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),jt=kt(function(t,l){const n=K(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=Q(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:B,fetchMoreCommentsNotifications:v}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(J("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(B(a),t(F([a],$())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!_t(g)&&(r="not-found"),c[1].startsWith("bill")&&!Nt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(X(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(Et(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(M("task_manager","dashboard",m))}else v?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(J("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(B(r),t(F([r],$())))})).then(()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(At("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,B).then(()=>{t(F(s,$())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=Pt(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(Ut(Dt)),qt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=Bt(),i=St(u??""),s=pt(),h=wt.getSignedInUser(),[B,v]=k.useState(!1),a=S(e=>K(e)),o=S(e=>Q(e)),{useFeatureGate:m}=xt(),{isFeatureEnabled:c}=m(vt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=Ft({mobileExploreReferrer:"Notifications"});$t({isDataReady:!0});const Y=bt(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),q=S(e=>b(e).currentTab),R=S(e=>b(e).currentSubTab),Z=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),U=S(e=>b(e).notificationDetailsByTab.comments.fetchState),tt=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),et=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),at=Rt().allUsers,{inboxNotifications:w,isLoading:A,hasFetchedAll:C,isFetchingMore:D,fetchMore:ot}=ct(),{threads:V,isLoading:O,fetchMore:W,isFetchingMore:L,hasFetchedAll:z}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(q!==i&&i!=null&&s(X(i)),i==null){const e=`../${q}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{Z.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(A===!1&&C===!0&&o?.companyId!=null&&w!=null){const e=`dashboard_${o.companyId}`,p=w.filter(T=>T.roomId===e&&T.readAt==null).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}},[A,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>ot?.(),0);return()=>clearTimeout(e)});const G=A||D===!0||C!==!0||A||D===!0||C!==!0;k.useEffect(()=>{G&&U!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):G||U!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[G,U]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&B===!1&&(v(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(A===!1&&O===!1&&w!=null&&V!=null){const e=`dashboard_${o.companyId}`,p=w.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),E=p.map(f=>f.id),it=p.map(f=>{const P=V.find(rt=>rt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(L||z===!0||W==null||W(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:E},"comments")),s(y({totalCount:E.length,unreadCount:T.length},"comments")),s(Ct(it))}},[A,D,L,C,z,O,w?.length]);const st={events:o.userRoleId!=null?[`private-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Gt(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const E=[];R==="all"?E.push("read","unread"):R!=="mentions"&&E.push(R),s(M("task_manager",T,E,!0))}}}},nt=dt();return _.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:Y,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ie(){return _.jsxs(gt,{children:[_.jsx(H,{path:"/:selectedTab",element:_.jsx(qt,{})}),_.jsx(H,{path:"*",element:_.jsx(lt,{})})]})}export{ie as default};
|
package/dist/assets/{PandLWithForecastRoutes-oaiw53DB.js → PandLWithForecastRoutes-DEaEOUDv.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-
|
|
1
|
+
import{j as n}from"./liveblocks-CqGMBzbB.js";import{j as W,h as z,u as K,l as Z,g as d,k as H,n as Q,o as I}from"./core-DMKpdX6V.js";import{eN as U,qe as O,pO as X,J7 as v,pJ as T,bv as ee,bn as ae,bR as te,pK as se,J8 as oe,IU as C,dB as re,tB as ne,J9 as ie,tY as ce,eT as le,eR as de}from"./zeni-epic-state-dcVRrD1h.js";import{z as me,N as fe,j as pe,p as M,m as w,C as ue,c as $,ak as he,y as ge}from"./index-B-S1sw2q.js";import"./mui-C4peJOR0.js";import Fe from"./NotFoundScreen-C_3ycSKf.js";import{F as be}from"./FeaturePreviewScreen-D6Uxvt0_.js";import{a as g}from"./sentry-By_w3AbQ.js";import{u as Ie}from"./useAskAiCfoHostNavButtonProps-CjhdCks2.js";import{c as Ce}from"./useFetchSuggestedQuestionsWhenReady-CU6v8eqg.js";import{u as Te}from"./useInitialThreadRequest-BqzvhNbA.js";import{t as ye}from"./routePaths-DwcIzItv.js";import{M as Se}from"./MobileAppDrawer-CQwwOR5p.js";import"./recharts-DEvckcqQ.js";import"./analytics-COzTMS9t.js";import"./plaid-DWM21M_R.js";import"./dnd-B4MKAlTf.js";import"./stripe-DMRn4zHo.js";import"./lottie-BflCEFtX.js";import"./lexical-ChtLw4s9.js";import"./pdf-C6aRryDe.js";import"./utils-CSUcsfYh.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="8ed25f6c-32d1-4150-9815-f2399bfd671b",s._sentryDebugIdIdentifier="sentry-dbid-8ed25f6c-32d1-4150-9815-f2399bfd671b")}catch{}})();const y=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},ke=H(function(s){const e=oe(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{a[r]=o[r]===!1}),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:$}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(v(a,o)),e.isPandLReportFetched(a)||s(T(a)),y(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ce(a))},onForecastVsActualsCompareToggle:a=>{s(ie(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ne(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,i;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=re(o)):o.balanceTimeFrame==="year"?(r="quarter",i={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),i!=null&&r!=null){const m=ye(e.tenantEmailDomain,a.accountId,a.accountType,p,r,i),u=ge(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(m,{state:{pathnameStackToGoBack:u,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}})(he);function P(){const s=W(),e=z(),a=K(),{forecastId:o,tenantEmailDomain:r}=Z(),[i,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),S=d(t=>U(t)),B=S.company?.companyInfo.firstMonthOfFY??1,c=d(t=>O(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),k=d(t=>t.profitAndLossState),A=d(t=>t.reportUIOptionsState.selectedForecast),x=t=>k.pandLByForecastID[t]!=null&&se(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();Ce({isDataReady:l});const{isAiCfoAccessEnabled:N,onAskAiCfoClick:q}=Ie({mobileExploreReferrer:"Forecast"});g.useEffect(()=>{if(!i&&F)p(!0),l||e(X());else if(l&&!m){u(!0);const t=((f,L,R)=>L!=null?f.forecasts.findIndex(b=>b.id===L):R!=null?f.forecasts.findIndex(b=>b.id===R):f.forecasts.length>0?0:-1)(c,o,A?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=A?.index?(e(v(c.forecasts[t].id,t)),y(o,c.forecasts[t].id,s,a.search)):o==null&&t!==-1&&y(void 0,c.forecasts[t].id,s,a.search),t!==-1&&!x(c.forecasts[t].id)&&F&&e(T(c.forecasts[t].id))}},[i,p,e,l,c,m,u,O,T,F]);const D=pe(),Y=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:_}=M(),{isFeatureEnabled:j}=_(w.isReportsCommentingEnabled),G=Te(j?S?.companyId:void 0,{clearParams:l&&m}),[J,V]=g.useState(!1),E=t=>{V(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(ue,{analytics:$,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(Se,{isAppContentDrawerOpen:J,handleDrawerToggle:E}),n.jsx(ke,{firstMonthOfFY:B,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:x,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:Y,isAiCfoAccessEnabled:N,onAskAiCfoClick:q,isReportsCommentingEnabled:j,isZeniUser:ae(h),initialOpenThreadRequest:G,onClickMenuIcon:()=>{E(!0)}})]})}function We(){const s=d(i=>U(i)),{useFeatureGate:e}=M(),{isFeatureEnabled:a}=e(w.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(be,{}):n.jsxs(Q,{children:[n.jsx(I,{path:"/",element:n.jsx(P,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(P,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(Fe,{})})]})}export{We as PandLWithForecastRoutes,We as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-CqGMBzbB.js";import{J2 as te,eN as q,jq as z,eT as Y,eR as ne,GD as Q,IH as oe,sJ as Ee,J3 as M,sx as ke,sS as Ie,sM as ie,sB as re,sQ as Pe,sN as je,J4 as le,un as Te,J5 as Le,fw as ve,J6 as G,sG as de,sE as ce,sV as Fe,c0 as Re}from"./zeni-epic-state-dcVRrD1h.js";import{r as pe,p as X,m as E,z as K,a5 as ue,H as me,ag as ge,ah as Ae,F as he,o as A,J as fe,D as Ce,ai as Oe,N as Ve,C as Ue,c as be,e as Be,y as Ze,aj as $e,j as Ge}from"./index-B-S1sw2q.js";import{D as ye,n as W,S as we}from"./mui-C4peJOR0.js";import se from"./NotFoundScreen-C_3ycSKf.js";import{a as r}from"./sentry-By_w3AbQ.js";import{h as ee,l as Je,g as m,j as He,u as ze,k as Ke,n as ae,o as $}from"./core-DMKpdX6V.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-CjhdCks2.js";import{c as Ne}from"./useFetchSuggestedQuestionsWhenReady-CU6v8eqg.js";import{M as _e}from"./MobileAppDrawer-CQwwOR5p.js";import"./recharts-DEvckcqQ.js";import"./analytics-COzTMS9t.js";import"./plaid-DWM21M_R.js";import"./dnd-B4MKAlTf.js";import"./stripe-DMRn4zHo.js";import"./lottie-BflCEFtX.js";import"./lexical-ChtLw4s9.js";import"./pdf-C6aRryDe.js";import"./utils-CSUcsfYh.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new s.Error().stack;t&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[t]="db480121-dd2d-42d7-8413-a22f5660e17a",s._sentryDebugIdIdentifier="sentry-dbid-db480121-dd2d-42d7-8413-a22f5660e17a")}catch{}})();const Me={overlayWidth:new he(100,100,48)},J=Ce.getLocalizedStrings().peoplePage.invitePage,qe=({companyId:s,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const h=pe(),p=ee(),[O,V]=r.useState(!1),[I,w]=r.useState(!1),{userId:D}=Je(),d=m(e=>te(e)),u=m(e=>q(e)),S=m(e=>z(e)),{useFeatureGate:f}=X(),{isFeatureEnabled:k}=f(E.isDebitCardFeatureEnabled),P=Y(k,u),L=ne(u),v=Q(u),U=oe(u),B=!!u.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&S&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||s==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{p(M()),y()},F=()=>{O===!0?w(!0):C()},Z=l.companyView?.controllers?.map(e=>e.user),{isFeatureEnabled:c}=f(E.isDepositAccountsFeatureEnabled),{isFeatureEnabled:j}=f(E.isChargeCardFeatureEnabled),T=ue(u,j,k),{isFeatureEnabled:R}=f(E.isTreasuryEnabled),b={peopleDetails:d,classList:n.classes,managersList:t.users,controllersList:Z,mode:g,isZeniTenant:v,isAccountingClassesEnabled:S,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:c===!1,isChargeCardDisabled:T===!1,isTreasuryDisabled:R===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:L,onResetClick:C,onDeleteUser:e=>{p(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{p(ie({peopleLocalData:e})),V(!0)},onSaveClick:()=>{p(g==="zeni_only"?ke(s):Ie(v))},onCloseClick:F,isLoading:x||d.person==null},i={onOkClick:()=>{w(!1),C()},onCancelClick:()=>{w(!1)}};return r.useEffect(()=>{x===!1&&D!=null&&p(Ee(D))},[x,D]),r.useEffect(()=>{d.updatePersonState.fetchState==="Completed"&&C()},[d.updatePersonState.fetchState]),a.jsx(ye,{anchor:"right",open:o,PaperProps:{style:{width:Me.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:F,children:a.jsxs(Ye,{onClick:e=>e.stopPropagation(),children:[I===!0?a.jsx(ge,{titleComponent:a.jsx(De,{children:J.discardTitle}),descriptionComponent:a.jsx(Se,{children:J.discardDescription}),primaryButtonText:J.discard,secondaryButtonText:J.no,action:i,isEditPopup:!0}):null,a.jsx(Ae,{...b})]})})},Ye=W(we)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-CqGMBzbB.js";import E from"./NotFoundScreen-C_3ycSKf.js";import{a as r}from"./sentry-By_w3AbQ.js";import{j as _,u as v,g as p,l as M,h as U,N as O,k as P,n as z,o as h}from"./core-DMKpdX6V.js";import{eN as N,OJ as b,bo as B,bn as F,h6 as V,gC as J}from"./zeni-epic-state-dcVRrD1h.js";import{A as $,z as I,ct as q}from"./index-B-S1sw2q.js";import"./mui-C4peJOR0.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-CjhdCks2.js";import{c as H}from"./useFetchSuggestedQuestionsWhenReady-CU6v8eqg.js";import{M as K}from"./MobileAppDrawer-CQwwOR5p.js";import"./recharts-DEvckcqQ.js";import"./analytics-COzTMS9t.js";import"./plaid-DWM21M_R.js";import"./dnd-B4MKAlTf.js";import"./stripe-DMRn4zHo.js";import"./lottie-BflCEFtX.js";import"./lexical-ChtLw4s9.js";import"./pdf-C6aRryDe.js";import"./utils-CSUcsfYh.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]="4803c174-80c6-4711-b8d0-f0950ab9ccd6",e._sentryDebugIdIdentifier="sentry-dbid-4803c174-80c6-4711-b8d0-f0950ab9ccd6")}catch{}})();const L=P(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(q),Q=()=>{const e=_(),t=v(),c=$(),o=p(a=>N(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:f}=M(),u=U(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[w,C]=r.useState(!1),S=B(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=F(l),y=S||k||x,d=r.useCallback((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&m.current&&(u(J({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)},[n?.fetchState]);const D=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),m.current=!0},[n?.fetchState,d]),j=r.useCallback((a,i)=>{d(a,i,!1)},[d]),g=a=>{C(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=G({mobileExploreReferrer:"Performance"});return H({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(K,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(L,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:f,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(O,{to:`/${f}/dashboard`,replace:!0})};function pe(){return s.jsxs(z,{children:[s.jsx(h,{path:"*",element:s.jsx(Q,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{pe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,b as t}from"./sentry-
|
|
1
|
+
import{a as h,b as t}from"./sentry-By_w3AbQ.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new r.Error().stack;a&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[a]="a301a95b-8420-43bd-aa56-5738077199ba",r._sentryDebugIdIdentifier="sentry-dbid-a301a95b-8420-43bd-aa56-5738077199ba")}catch{}})();const c="64px",b={};var k=({src:r,light:a,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:u})=>{const[p,i]=h.useState(null);h.useEffect(()=>{r&&a&&n&&v({src:r,light:a,oEmbedUrl:n})},[r,a,n]);const v=async({src:e,light:d,oEmbedUrl:I})=>{if(t.isValidElement(d))return;if(typeof d=="string")return void i(d);if(b[e])return void i(b[e]);i(null);const E=await fetch(I.replace("{url}",e)),g=await E.json();if(g.thumbnail_url){const f=g.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(f),b[e]=f}},o=t.isValidElement(a),y={display:"flex",alignItems:"center",justifyContent:"center"},s={preview:{width:"100%",height:"100%",backgroundImage:p&&!o?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:o?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=t.createElement("div",{style:s.shadow,className:"react-player__shadow"},t.createElement("div",{style:s.playIcon,className:"react-player__play-icon"}));return t.createElement("div",{style:s.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...u?{"aria-label":u}:{}},o?a:null,w||_)};export{k as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as Ol}from"./liveblocks-
|
|
1
|
+
import{j as Ol}from"./liveblocks-CqGMBzbB.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-By_w3AbQ.js";import{L as dt,bR as Tc,eN as Ac,Ii as Rc,I_ as kl,c0 as Tl,fh as Al,fi as Rl}from"./zeni-epic-state-dcVRrD1h.js";import{a as lt,b as Il,c as Pl,d as Nl,e as an,f as Ll,g as $l,h as Ml,i as Vt,j as Ic,k as oe,l as je,m as Cl,n as Yt,o as ue,p as Dl}from"./utils-CSUcsfYh.js";import{r as un}from"./empty-_gHzexXT.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-BMPC_qNx.js";import{r as Gl}from"./index-CapqGJKF.js";import{r as zl}from"./index-CciFFvoQ.js";import{j as Zl,u as Hl,h as Vl,g as En,k as Yl}from"./core-DMKpdX6V.js";import{u as Kl,z as Pc,L as Wl,V as Jl,W as Xl,i as Ql,c as tf}from"./index-B-S1sw2q.js";import"./mui-C4peJOR0.js";import{d as Pe}from"./decodeURIComponentSafe-kaKdrE3i.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new t.Error().stack;f&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[f]="b76d1050-3c93-4f98-8da8-ab087f0f4e70",t._sentryDebugIdIdentifier="sentry-dbid-b76d1050-3c93-4f98-8da8-ab087f0f4e70")}catch{}})();var _n,Sn={exports:{}},On,jn,xn,kn,Tn,An,Rn,In,Pn,Ne,Nn,Ln,$n,Mn,Cn,Dn,Fn,Bn,Un,qn,Gn,Le,zn,Zn,Hn,Vn,Yn,Kn,Wn,$e,Jn,Xn,Qn,to,eo,ro,no,Me={exports:{}},Ce={exports:{}},De={};function Nc(){if(On)return De;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function f(r,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},f(r,e)}function m(r){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var a,p=s(r);if(e){var h=s(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return function(d,b){if(b&&(t(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}(d)}(this,a)}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(r)}On=1;var l,o,n={};function i(r,e,a){a||(a=Error);var p=function(h){(function(c,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(y&&y.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),y&&f(c,y)})(g,h);var d,b=m(g);function g(c,y,v){var S;return function(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")}(this,g),S=b.call(this,function(w,_,M){return typeof e=="string"?e:e(w,_,M)}(c,y,v)),S.code=r,S}return d=g,Object.defineProperty(d,"prototype",{writable:!1}),d}(a);n[r]=p}function u(r,e){if(Array.isArray(r)){var a=r.length;return r=r.map(function(p){return String(p)}),a>2?"one of ".concat(e," ").concat(r.slice(0,a-1).join(", "),", or ")+r[a-1]:a===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}return i("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),i("ERR_INVALID_ARG_TYPE",function(r,e,a){var p,h,d;if(l===void 0&&(l=ie()),l(typeof r=="string","'name' must be a string"),typeof e=="string"&&(h="not ",e.substr(0,h.length)===h)?(p="must not be",e=e.replace(/^not /,"")):p="must be",function(g,c,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-c.length,y)===c}(r," argument"))d="The ".concat(r," ").concat(p," ").concat(u(e,"type"));else{var b=function(g,c,y){return typeof y!="number"&&(y=0),!(y+c.length>g.length)&&g.indexOf(c,y)!==-1}(r,".")?"property":"argument";d='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(u(e,"type"))}return d+=". Received type ".concat(t(a))},TypeError),i("ERR_INVALID_ARG_VALUE",function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";o===void 0&&(o=lt());var p=o.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)},TypeError),i("ERR_INVALID_RETURN_VALUE",function(r,e,a){var p;return p=a&&a.constructor&&a.constructor.name?"instance of ".concat(a.constructor.name):"type ".concat(t(a)),"Expected ".concat(r,' to be returned from the "').concat(e,'"')+" function but got ".concat(p,".")},TypeError),i("ERR_MISSING_ARGS",function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];l===void 0&&(l=ie()),l(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map(function(d){return'"'.concat(d,'"')}),h){case 1:p+="".concat(e[0]," argument");break;case 2:p+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:p+=e.slice(0,h-1).join(", "),p+=", and ".concat(e[h-1]," arguments")}return"".concat(p," must be specified")},TypeError),De.codes=n,De}function ef(){if(xn)return jn;function t(k,E){var j=Object.keys(k);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(k);E&&(x=x.filter(function(O){return Object.getOwnPropertyDescriptor(k,O).enumerable})),j.push.apply(j,x)}return j}function f(k){for(var E=1;E<arguments.length;E++){var j=arguments[E]!=null?arguments[E]:{};E%2?t(Object(j),!0).forEach(function(x){m(k,x,j[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(j)):t(Object(j)).forEach(function(x){Object.defineProperty(k,x,Object.getOwnPropertyDescriptor(j,x))})}return k}function m(k,E,j){return(E=l(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function s(k,E,j){return E&&function(x,O){for(var $=0;$<O.length;$++){var N=O[$];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,l(N.key),N)}}(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function l(k){var E=function(j,x){if(p(j)!=="object"||j===null)return j;var O=j[Symbol.toPrimitive];if(O!==void 0){var $=O.call(j,x);if(p($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(j)}(k,"string");return p(E)==="symbol"?E:String(E)}function o(k,E){if(E&&(p(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(k)}function n(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function i(k){var E=typeof Map=="function"?new Map:void 0;return i=function(j){if(j===null||(x=j,Function.toString.call(x).indexOf("[native code]")===-1))return j;var x;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(j))return E.get(j);E.set(j,O)}function O(){return u(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},i(k)}function u(k,E,j){return u=r()?Reflect.construct.bind():function(x,O,$){var N=[null];N.push.apply(N,O);var P=new(Function.bind.apply(x,N));return $&&e(P,$.prototype),P},u.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function e(k,E){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,x){return j.__proto__=x,j},e(k,E)}function a(k){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},a(k)}function p(k){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},p(k)}xn=1;var h=lt().inspect,d=Nc().codes.ERR_INVALID_ARG_TYPE;function b(k,E,j){return(j===void 0||j>k.length)&&(j=k.length),k.substring(j-E.length,j)===E}var g="",c="",y="",v="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(k){var E=Object.keys(k),j=Object.create(Object.getPrototypeOf(k));return E.forEach(function(x){j[x]=k[x]}),Object.defineProperty(j,"message",{value:k.message}),j}function _(k){return h(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(k,E,j){var x="",O="",$=0,N="",P=!1,G=_(k),A=G.split(`
|
|
2
2
|
`),I=_(E).split(`
|
|
3
3
|
`),R=0,B="";if(j==="strictEqual"&&p(k)==="object"&&p(E)==="object"&&k!==null&&E!==null&&(j="strictEqualObject"),A.length===1&&I.length===1&&A[0]!==I[0]){var V=A[0].length+I[0].length;if(V<=10){if(!(p(k)==="object"&&k!==null||p(E)==="object"&&E!==null||k===0&&E===0))return"".concat(S[j],`
|
|
4
4
|
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-CqGMBzbB.js";import{a as o}from"./sentry-By_w3AbQ.js";import{g as f,j as H,h as V,u as F,k as N}from"./core-DMKpdX6V.js";import{h as M,r as W,z as R,b3 as _,F as z,N as U,C as $,c as l,e as X,a1 as Z,b4 as Q}from"./index-B-S1sw2q.js";import{eX as q,eN as G,Lx as P,Ly as J,tr as K,th as g,eZ as Y,bM as ee,tm as ae,Lz as re}from"./zeni-epic-state-dcVRrD1h.js";import{D as ne,e as te,n as se,S as oe}from"./mui-C4peJOR0.js";import{u as ie}from"./useAskAiCfoHostNavButtonProps-CjhdCks2.js";import{c as le}from"./useFetchSuggestedQuestionsWhenReady-CU6v8eqg.js";import{M as de}from"./MobileAppDrawer-CQwwOR5p.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="25ad5403-b525-42a8-bec6-3a401b18bb98",e._sentryDebugIdIdentifier="sentry-dbid-25ad5403-b525-42a8-bec6-3a401b18bb98")}catch{}})();const ce={overlayWidth:new z(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=M(),n=W();if(R.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(d=>q(d));return s.jsx(ne,{anchor:"right",open:e,PaperProps:{style:{width:ce.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(te,{in:e,direction:"left",children:s.jsx(ue,{onClick:d=>d.stopPropagation(),children:s.jsx(_,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=se(oe)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-
|
|
1
|
+
import{j as t}from"./liveblocks-CqGMBzbB.js";import R from"./NotFoundScreen-C_3ycSKf.js";import{a as p}from"./sentry-By_w3AbQ.js";import{j as C,u as I,h as A,g as u,N as E,k,n as D,o as m}from"./core-DMKpdX6V.js";import{eN as T,Mr as g,MH as S,Co as V,Bx as U,Cn as c,Ce as _,MW as B}from"./zeni-epic-state-dcVRrD1h.js";import{h as M,z as N,B as W,a1 as $,bJ as O,ab as z}from"./index-B-S1sw2q.js";import"./mui-C4peJOR0.js";import{R as v}from"./ReimbursementApprovalRuleDetailScreen-DdLOedPE.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="1f9eb911-6547-46a8-a97e-ee26388f2160",e._sentryDebugIdIdentifier="sentry-dbid-1f9eb911-6547-46a8-a97e-ee26388f2160")}catch{}})();const f="reimbursement-approval-rule-update",H=k(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,r){const{navigate:a,location:l}=r;return{onApprovalRulesEventReceived:s=>{s.endsWith(f)&&e(B(!1))},onBackClick:()=>{z(l)?a("../../"):a("../../../reimbursements/setup")},onDeleteRuleClick:s=>{e(_(s))},onEditRuleClick:s=>{s!=null?(e(c(s)),a(`./${s}/edit`)):(e(c()),a("./new"))}}})($(O)),J=()=>{const e=C(),r=I(),a=A(),[l,s]=p.useState(!1),[d,y]=p.useState(!1),b=u(n=>n.remiSetupApproverViewState.fetchState),o=u(n=>T(n)),w=M(),i=u(n=>g(n)),h=u(n=>S(n).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{h?.updateStatus.fetchState==="Completed"&&a(V())},[h]),p.useEffect(()=>{l||b!=="Not-Started"||(s(!0),a(U(!0)))},[l,b,a]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{i.allApprovalRules.length===0&&i.fetchState==="Completed"&&(d||(y(!0),a(c())),e("./new"))},[d,i,a]);const j={events:o.companyId!=null?[`private-${o.companyId}.${f}`]:[],eventCallback:(n,P,x)=>{n.endsWith(f)&&x.onApprovalRulesEventReceived(n)}};return o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?t.jsx(E,{to:"../../promo"}):o.companyReimbursementInfo?.info?.isReimbursementTOSAccepted!==!0||i.fetchState!=="Completed"&&i.fetchState!=="Error"?t.jsx(W,{fetchState:"In-Progress",style:{backgroundColor:w.colors.grey5}}):t.jsx(H,{currentTenant:o,location:r,navigate:e,...j})};function Z(){return t.jsxs(D,{children:[t.jsx(m,{path:"/",element:t.jsx(J,{})}),t.jsx(m,{path:"/new",element:t.jsx(v,{})}),t.jsx(m,{path:"/:approvalRuleId/edit",element:t.jsx(v,{})}),t.jsx(m,{path:"*",element:t.jsx(R,{})})]})}export{Z as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as g}from"./liveblocks-
|
|
1
|
+
import{j as g}from"./liveblocks-CqGMBzbB.js";import{a as y}from"./sentry-By_w3AbQ.js";import{j as A,h as w,u as C,l as T,g as b,k as U}from"./core-DMKpdX6V.js";import{MH as R,Mr as E,Ch as x,Cq as _,Co as h,Cp as S,MI as B}from"./zeni-epic-state-dcVRrD1h.js";import{z as k,h as V,B as j,bA as F,ab as O}from"./index-B-S1sw2q.js";import"./mui-C4peJOR0.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="45689b19-8831-4b3e-a594-55a3d94fe9fb",e._sentryDebugIdIdentifier="sentry-dbid-45689b19-8831-4b3e-a594-55a3d94fe9fb")}catch{}})();function $(e){return B(e)==null}const M=U(function(e,a){const t=R(e),s=t.remiSetupApproverViewUpdateData?.type??"approval_create",n=s==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return a.approvalRuleId&&(l=t.allApprovalRules.findIndex(r=>r.approvalRuleId===a.approvalRuleId)===0),{localData:t,hideUpperBoundField:n,isLowerBoundDisabled:l,approvalUpdateActionType:s}},function(e,a){const{navigate:t,approvalUpdateDataView:s,approverViewData:n,approvalRuleId:l}=a,r=s.remiSetupApproverViewUpdateData?.type,i=O(a.location);return{onApprovalRuleDataUpdated:o=>{const u=p=>{const v=[];return p.forEach(c=>{const D=c.actors.selectedUsers.map(d=>({type:"user",subType:void 0,userId:d.userId,idType:"user",isImplicitActor:!1})),I=c.actors.selectedNonUsers.map(d=>{const m=!!$(d.value);return{type:m?"attribute":"role",subType:d.value,userId:void 0,idType:void 0,isImplicitActor:!m}}),f=D.concat(I);v.push({action:c.stepType.selectedOption,actors:f,operator:f.length>1?c.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),v};if(r==="approval_create"){const p={criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:u(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(S(p))}else{const p={approvalRuleId:l,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:o.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:o.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:u(o.steps),isApplicableOnPendingApprovalEntity:o.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(S(p))}},onResetClick:()=>{e(h()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(h()),r==="approval_update"||i?t("../"):n.allApprovalRules.length===0&&n.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(_())},onSaveRuleSuccess:()=>{t("../")}}})(F);function G(){const e=A(),a=w(),t=C(),{approvalRuleId:s}=T(),n=k.getSignedInUser(),l=V(),r=b(p=>R(p)),i=b(p=>E(p)),[o,u]=y.useState(!1);if(y.useEffect(()=>{o||(u(!0),a(x(!0)))}),y.useEffect(()=>{i.fetchState==="Not-Started"&&e(s!=null?"../../":"../")},[i,s]),n==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(j,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):g.jsx(M,{navigate:e,approvalUpdateDataView:r,approvalRuleId:s,approverViewData:i,location:t})}export{G as R,$ as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-9BgV5FgM.js";import{j as q,h as re,u as Z,l as Q,g as E,N as $,k as J,i as mt,n as ct,o as C}from"./core-nI7qhWxF.js";import{eN as V,MX as le,c0 as me,Bs as xe,jB as dt,BF as ne,BE as ae,MY as ut,bn as ce,fH as Te,MZ as pt,Jj as bt,jq as je,Jk as Se,Jl as gt,ik as ht,Md as ft,iA as St,Bg as It,s5 as yt,is as Rt,C0 as De,M_ as Fe,M$ as At,N0 as kt,N1 as vt,N2 as Ct,N3 as Et,BM as Ie,iG as Bt,Mm as wt,BG as xt,Bq as Tt,N4 as jt,Bp as Dt,N5 as Ft,By as ye,BQ as Ut,BP as Lt,BL as Nt,N6 as Ue,GD as Mt,bo as Pt,BB as $t,Ci as _t,N7 as Ot,N8 as Gt,BY as zt,BV as Re,LI as Ht,Bn as Zt,N9 as Le,CH as Ae,CP as Vt,Na as Wt,Nb as z,Nc as qt,Nd as Ne,Ne as Jt,Nf as Me,Ng as Pe,C8 as se,bt as Kt,bE as de,cA as ue,eT as $e,eR as _e,Nh as Yt,gC as Qt,LV as Xt,Ni as en,Nj as Oe,LZ as tn,MH as nn,Nk as an,MW as sn,CM as ke,CL as on,Nl as rn,Nm as ln,Nn as mn,No as cn,Np as dn,Ms as un,CC as pn,CG as bn,bv as gn,bD as hn,cv as fn,cj as Sn,bs as In,Ik as yn,cL as Rn,cN as An,cM as kn,cu as vn}from"./zeni-epic-state-Crbh9Aj_.js";import{A as Ge,r as ze,p as X,m as k,z as M,bK as He,C as ee,c as v,aD as ve,o as D,ap as Y,H as Cn,D as Ze,bL as En,y as H,bM as Bn,j as te,bN as wn,N as xn,F as Tn,B as pe,e as Ve,a1 as jn,bb as Dn,U as Fn,h as We,bO as Un,a5 as Ln}from"./index-DOZAHQPK.js";import{n as _,S as Nn}from"./mui-fAmxa5Xh.js";import ie from"./NotFoundScreen-qOlBSqQS.js";import{S as Ce}from"./SetupPagesScreen-D3DtxfXm.js";import{F as qe}from"./FeaturePreviewScreen-C-DrdhwC.js";import{a as f}from"./sentry-p6MzREFX.js";import{u as be}from"./useAskAiCfoHostNavButtonProps-Cw-C7Jga.js";import{u as Je}from"./useInitialThreadRequest-BV5Gn6Hv.js";import{c as Ke}from"./useFetchSuggestedQuestionsWhenReady-B-aMJgNE.js";import{D as Mn}from"./DrawerScreen-CR4GTmpO.js";import{M as Ye}from"./MobileAppDrawer-CanZHImd.js";import{R as Pn}from"./ReimbursementApprovalRoutes-DcmO3rtg.js";import{FallBackRoute as $n}from"./ScreenRoutes-D7TgV1r1.js";import"./recharts-BW5HAPx6.js";import"./analytics-D8oYfpTm.js";import"./plaid-DVpb3qqP.js";import"./dnd-C_C-95qu.js";import"./stripe-DMRn4zHo.js";import"./lottie-XIGGYNiw.js";import"./lexical-Dn1INXtc.js";import"./pdf-DKSy7px9.js";import"./utils-D1SR7NNe.js";import"./analyticsHelper-DBHckA8w.js";import"./routePaths-CrSok7sW.js";import"./BusinessVerificationPageScreen-CDrDTvtJ.js";import"./ReimbursementApprovalRuleDetailScreen-DHB0Y6Ez.js";import"./getLocaleForTenant-BT8jU8Uf.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]="6c413e75-dd0b-4bb7-b11d-96d8e96d8d27",e._sentryDebugIdIdentifier="sentry-dbid-6c413e75-dd0b-4bb7-b11d-96d8e96d8d27")}catch{}})();const Qe=e=>`/${e}/reimbursements`,_n=e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:L}}}=Ze.getLocalizedStrings(),On=J(function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),d=M.getSignedInUser(),c=ce(d),m=r.plaidConnectionDetails,o=Te(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=le(e,t.reimbursementId),b=pt(e,d?.userId??"");let R=`${d?.firstName} ${d?.lastName}`,h=!0;t.reimbursementId!=null&&(R=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,h=d?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,u=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${Y.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:R,isUserAdmin:me(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:v,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:je(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=M.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(ae(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ye(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Nt(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},clearRemiSaveStatus:()=>{e(Ut("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(ye(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ft({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Dt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(jt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(xt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ie(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(wt({data:l}))},onFetchBankName:i=>{e(Bt(i))},submitRemiDetails:()=>{e(Ie("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Et({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ne({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Ct({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(vt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(kt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Fe()),e(At());const i=Qe(o),l=H(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(v.trackReimbursementDeleteReimbursement(n),e(De(n)))},onSaveBankAccount:()=>{a?.userId&&e(Rt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(yt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(St(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(gt({searchString:i,entityType:l,searchOrigin:"common"})):e(Se("common"))},onCancelAutoComplete:()=>{e(Se("common"))}}}})(En);function Ee(){const e=q(),t=re(),n=Z(),{reimbursementId:r}=Q(),d=Ge(),c=ze(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=X(),{isFeatureEnabled:b}=l(k.isLimitedCategoryForReimbursement),{isFeatureEnabled:R}=l(k.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(k.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:u}=be({mobileExploreReferrer:"Reimbursement Details"}),B=Z().pathname,j=B.includes("edit"),A=B.includes("reimbursement/new"),[F,w]=f.useState(!1),x=M.getSignedInUser(),I=E(p=>V(p)),g=E(p=>le(p,r)),N=Je(I?.companyId,{clearParams:g.fetchState==="Completed"}),U=me(I?.userRole??[]);f.useEffect(()=>{(A&&!F||j&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(w(!0),t(xe(!1,b,R,r)))});const P=E(p=>dt(p.accountState,p.accountListState,"reimbursementAccountList"));if(x==null)throw Error("Can't access address page without signing in...");const y={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||U&&g.billStatus==="rejected"||U===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx($,{to:y}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(He,{isNewReimbursement:r==null}):s.jsxs(Gn,{windowSize:c,children:[s.jsx(ee,{analytics:v,onLoad:p=>(W=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&W.trackReimbursementEditReimbursement(r)})(p)}),m&&c!=="small"?s.jsx(zn,{}):null,m&&c!=="small"?s.jsx(Hn,{children:s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${Y.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:x?.userId??"",sessionId:x?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,x?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:D.sp3,paddingBottom:"15px",paddingLeft:D.sp5},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Zn,{children:[s.jsx(Vn,{onClick:()=>o(!1),children:s.jsx(_n,{})}),s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${Y.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:x?.userId??"",sessionId:x?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,x?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:D.sp5,paddingRight:D.sp3,paddingBottom:D.sp5,paddingLeft:D.sp3},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})]}):null,s.jsx(Wn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:N??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:d,uncategorizedAccounts:P,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:u})})]})}const Gn=_.div`
|
|
1
|
+
import{j as s}from"./liveblocks-CqGMBzbB.js";import{j as q,h as re,u as Z,l as Q,g as E,N as $,k as J,i as mt,n as ct,o as C}from"./core-DMKpdX6V.js";import{eN as V,MX as le,c0 as me,Bs as xe,jB as dt,BF as ne,BE as ae,MY as ut,bn as ce,fH as Te,MZ as pt,Jj as bt,jq as je,Jk as Se,Jl as gt,ik as ht,Md as ft,iA as St,Bg as It,s5 as yt,is as Rt,C0 as De,M_ as Fe,M$ as At,N0 as kt,N1 as vt,N2 as Ct,N3 as Et,BM as Ie,iG as Bt,Mm as wt,BG as xt,Bq as Tt,N4 as jt,Bp as Dt,N5 as Ft,By as ye,BQ as Ut,BP as Lt,BL as Nt,N6 as Ue,GD as Mt,bo as Pt,BB as $t,Ci as _t,N7 as Ot,N8 as Gt,BY as zt,BV as Re,LI as Ht,Bn as Zt,N9 as Le,CH as Ae,CP as Vt,Na as Wt,Nb as z,Nc as qt,Nd as Ne,Ne as Jt,Nf as Me,Ng as Pe,C8 as se,bt as Kt,bE as de,cA as ue,eT as $e,eR as _e,Nh as Yt,gC as Qt,LV as Xt,Ni as en,Nj as Oe,LZ as tn,MH as nn,Nk as an,MW as sn,CM as ke,CL as on,Nl as rn,Nm as ln,Nn as mn,No as cn,Np as dn,Ms as un,CC as pn,CG as bn,bv as gn,bD as hn,cv as fn,cj as Sn,bs as In,Ik as yn,cL as Rn,cN as An,cM as kn,cu as vn}from"./zeni-epic-state-dcVRrD1h.js";import{A as Ge,r as ze,p as X,m as k,z as M,bK as He,C as ee,c as v,aD as ve,o as D,ap as Y,H as Cn,D as Ze,bL as En,y as H,bM as Bn,j as te,bN as wn,N as xn,F as Tn,B as pe,e as Ve,a1 as jn,bb as Dn,U as Fn,h as We,bO as Un,a5 as Ln}from"./index-B-S1sw2q.js";import{n as _,S as Nn}from"./mui-C4peJOR0.js";import ie from"./NotFoundScreen-C_3ycSKf.js";import{S as Ce}from"./SetupPagesScreen-tsJgjmfM.js";import{F as qe}from"./FeaturePreviewScreen-D6Uxvt0_.js";import{a as f}from"./sentry-By_w3AbQ.js";import{u as be}from"./useAskAiCfoHostNavButtonProps-CjhdCks2.js";import{u as Je}from"./useInitialThreadRequest-BqzvhNbA.js";import{c as Ke}from"./useFetchSuggestedQuestionsWhenReady-CU6v8eqg.js";import{D as Mn}from"./DrawerScreen-BIAu5bA1.js";import{M as Ye}from"./MobileAppDrawer-CQwwOR5p.js";import{R as Pn}from"./ReimbursementApprovalRoutes-hJy0lLcU.js";import{FallBackRoute as $n}from"./ScreenRoutes-Bpg_5BOg.js";import"./recharts-DEvckcqQ.js";import"./analytics-COzTMS9t.js";import"./plaid-DWM21M_R.js";import"./dnd-B4MKAlTf.js";import"./stripe-DMRn4zHo.js";import"./lottie-BflCEFtX.js";import"./lexical-ChtLw4s9.js";import"./pdf-C6aRryDe.js";import"./utils-CSUcsfYh.js";import"./analyticsHelper-CQQBcwi_.js";import"./routePaths-DwcIzItv.js";import"./BusinessVerificationPageScreen-DS8yDRTx.js";import"./ReimbursementApprovalRuleDetailScreen-DdLOedPE.js";import"./getLocaleForTenant-DIj12PGu.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]="6c413e75-dd0b-4bb7-b11d-96d8e96d8d27",e._sentryDebugIdIdentifier="sentry-dbid-6c413e75-dd0b-4bb7-b11d-96d8e96d8d27")}catch{}})();const Qe=e=>`/${e}/reimbursements`,_n=e=>f.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},f.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),f.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{spendManagement:{reimbursement:{reimbursementDetail:L}}}=Ze.getLocalizedStrings(),On=J(function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),d=M.getSignedInUser(),c=ce(d),m=r.plaidConnectionDetails,o=Te(e.companyState,n),a=e.tenantState.currentTenantId,i={userId:d?.userId??"",sessionId:d?.zeniSessionId??"",tenantId:a??""},l=le(e,t.reimbursementId),b=pt(e,d?.userId??"");let R=`${d?.firstName} ${d?.lastName}`,h=!0;t.reimbursementId!=null&&(R=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,h=d?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,u=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${Y.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:u},authParams:i,defaultCurrency:{currencySymbol:o?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:o?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:o?.company.configInfo.mileageRateConfig,createdBy:R,isUserAdmin:me(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:m,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:b.bankAccountCreationState,bankAccounts:b.bankAccounts,analytics:v,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:h,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:je(e)}},function(e,t){const{reimbursementId:n,currentTenant:r,location:d,navigate:c,themeState:m}=t,{tenantEmailDomain:o}=r,a=M.getSignedInUser();return{onReceiptsUpload:(i,l,b)=>{i!=null&&e(ae(i,l,b,n,a?.userId))},onExistingMerchantChange:(i,l)=>{e(ye(!1,l,n,i,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Nt(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Lt())},clearRemiSaveStatus:()=>{e(Ut("Not-Started",n))},onDuplicateLineClick:(i,l)=>window.open(`/${o}/reimbursement/${i}#L${l}`),onNewMerchantChange:(i,l)=>{e(ye(!1,l,n,void 0,i))},removeFileFromLine:i=>{e(Ft({lineId:i,reimbursementId:n}))},onAmountChanged:(i,l)=>{e(Dt(l,i,n))},updateReimbursementType:(i,l,b)=>{e(jt({reimbursementId:b,lineId:l,reimbursementType:i}))},onHomeCurrencyConversionUpdate:(i,l,b)=>{e(Tt({reimbursementId:b,lineId:l,amountPayload:{amount:i.amount,currency_code:i.currencyCode,currency_symbol:i.currencySymbol}}))},onReimbursementDetailsChanged:i=>{e(xt({remiDetailLocalData:i,reimbursementId:n}))},saveRemiDetails:i=>{e(Ie(i,!1,n))},onUserBankDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(wt({data:l}))},onFetchBankName:i=>{e(Bt(i))},submitRemiDetails:()=>{e(Ie("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:i=>{e(Et({reimbursementId:i}))},updateInvoiceUploadFetchState:i=>{e(ne({reimbursementId:n,fetchState:i}))},clearTentativeNameForLine:i=>{e(Ct({reimbursementId:n,lineId:i}))},removeDuplicateReimbursementForLine:i=>{e(vt({lineId:i}))},onZeniLogoClick:()=>{m.toggle()},clearAddRemiAutoFields:i=>{e(kt({reimbursementId:n,lineId:i}))},redirectToReimbursementListScreen:()=>{e(Fe()),e(At());const i=Qe(o),l=H(d.state?.pathnameStackToGoBack,d.pathname);c(i,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(v.trackReimbursementDeleteReimbursement(n),e(De(n)))},onSaveBankAccount:()=>{a?.userId&&e(Rt(a?.userId,n))},onFetchLinkTokenClick:i=>{e(yt("user_reimbursement_account",i))},onEstablishConnectionClick:i=>{e(It(i,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:i=>{e(St(i,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(i,l)=>{i.trim().length>=2?e(gt({searchString:i,entityType:l,searchOrigin:"common"})):e(Se("common"))},onCancelAutoComplete:()=>{e(Se("common"))}}}})(En);function Ee(){const e=q(),t=re(),n=Z(),{reimbursementId:r}=Q(),d=Ge(),c=ze(),[m,o]=f.useState(r==null),[a,i]=f.useState(1),{useFeatureGate:l}=X(),{isFeatureEnabled:b}=l(k.isLimitedCategoryForReimbursement),{isFeatureEnabled:R}=l(k.isShowDeletedReimbursementsFeatureEnabled),{isFeatureEnabled:h}=l(k.isReimbursementCommentingEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:u}=be({mobileExploreReferrer:"Reimbursement Details"}),B=Z().pathname,j=B.includes("edit"),A=B.includes("reimbursement/new"),[F,w]=f.useState(!1),x=M.getSignedInUser(),I=E(p=>V(p)),g=E(p=>le(p,r)),N=Je(I?.companyId,{clearParams:g.fetchState==="Completed"}),U=me(I?.userRole??[]);f.useEffect(()=>{(A&&!F||j&&g.fetchState!="Completed"&&g.fetchState!="In-Progress")&&(w(!0),t(xe(!1,b,R,r)))});const P=E(p=>dt(p.accountState,p.accountListState,"reimbursementAccountList"));if(x==null)throw Error("Can't access address page without signing in...");const y={pathname:`../${r}`,search:n.search};return g.isDeleted===!0||g.billStage=="paid"||g.billStage=="scheduled"||g.fetchState=="Not-Started"||U&&g.billStatus==="rejected"||U===!1&&g.billStage==="pending_approval"&&g.billStatus!=="rejected"?s.jsx($,{to:y}):g.deleteStatus.fetchState==="In-Progress"||g.fetchState!=="Completed"?s.jsx(He,{isNewReimbursement:r==null}):s.jsxs(Gn,{windowSize:c,children:[s.jsx(ee,{analytics:v,onLoad:p=>(W=>{r!=null&&g.deleteStatus.fetchState!=="Completed"&&W.trackReimbursementEditReimbursement(r)})(p)}),m&&c!=="small"?s.jsx(zn,{}):null,m&&c!=="small"?s.jsx(Hn,{children:s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${Y.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:x?.userId??"",sessionId:x?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,x?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:D.sp3,paddingBottom:"15px",paddingLeft:D.sp5},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})}):null,m&&c==="small"?s.jsxs(Zn,{children:[s.jsx(Vn,{onClick:()=>o(!1),children:s.jsx(_n,{})}),s.jsx(ve,{showAutofill:m,uploadInvoiceEndPoint:`${Y.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:x?.userId??"",sessionId:x?.zeniSessionId??"",tenantId:I?.tenantId??""},onSkipAutofill:()=>o(!1),onInvoiceUpload:p=>{p!=null&&t(ae(p,a,!0,r,x?.userId))},updateInvoiceUploadFetchState:p=>{t(ne({reimbursementId:r,fetchState:p}))},allowMultiFiles:m,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:D.sp5,paddingRight:D.sp3,paddingBottom:D.sp5,paddingLeft:D.sp3},dropFilePlaceholder:{upload:L.dropReceipt.upload,single:L.dropReceipt.single,or:L.dropReceipt.or,multiple:L.dropReceipt.multiple,receipts:L.dropReceipt.receipts}})]}):null,s.jsx(Wn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:N??void 0,isReimbursementCommentingEnabled:h,location:n,navigate:e,currentTenant:I,reimbursementId:r,themeState:d,uncategorizedAccounts:P,disableInternalOverlay:!0,showSkipAutoFill:m,setShowSkipAutoFill:o,onCurrentLineIdForUploadChange:i,isAiCfoAccessEnabled:T,onAskAiCfoClick:u})})]})}const Gn=_.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
height: 100vh;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-9BgV5FgM.js";import{u as G,j as Ie,h as ye,l as Ce,g as d,k as ge,n as Se,o as N}from"./core-nI7qhWxF.js";import{eN as M,f7 as g,IF as we,jq as J,IG as W,pI as O,je as Re,ih as Te,t5 as X,pN as Fe,bv as Oe,IH as Ae,bn as ke,u4 as De,II as je,IJ as Ee,sZ as Pe,IK as Y,IL as Me,IM as Le,IN as Be,IO as ve,IP as S,IQ as A,IR as k,IS as H,IT as D,IU as j,dB as Ue,tM as Ve,tA as q,tB as $,tS as xe,tF as Z,tY as ze,IV as Ge,IW as Ne,IX as Ye,IY as He,IZ as qe,eT as $e,eR as Ze}from"./zeni-epic-state-Crbh9Aj_.js";import{K as Qe,M as Ke,r as Je,p as ee,m as E,z as ae,N as We,j as Xe,a as ea,C as aa,c as P,e as sa,y as se,Q as ta,R as oa,U as na}from"./index-DOZAHQPK.js";import"./mui-fAmxa5Xh.js";import ra from"./NotFoundScreen-qOlBSqQS.js";import{F as ia}from"./FeaturePreviewScreen-C-DrdhwC.js";import{a as _}from"./sentry-p6MzREFX.js";import{u as la,a as ca,b as da,c as pa}from"./useFetchSuggestedQuestionsWhenReady-B-aMJgNE.js";import{u as fa}from"./useInitialThreadRequest-BV5Gn6Hv.js";import{t as Q,a as K}from"./routePaths-CrSok7sW.js";import{M as ma}from"./MobileAppDrawer-CanZHImd.js";import"./recharts-BW5HAPx6.js";import"./analytics-D8oYfpTm.js";import"./plaid-DVpb3qqP.js";import"./dnd-C_C-95qu.js";import"./stripe-DMRn4zHo.js";import"./lottie-XIGGYNiw.js";import"./lexical-Dn1INXtc.js";import"./pdf-DKSy7px9.js";import"./utils-D1SR7NNe.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]="9963dcf0-9354-47a7-850f-b28ee727fcea",e._sentryDebugIdIdentifier="sentry-dbid-9963dcf0-9354-47a7-850f-b28ee727fcea")}catch{}})();const ua=["profit_loss","balance_sheet","cash_flow"],I=e=>{e(j({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(A({resetLeftScroll:!0}))},_a=e=>{e(Ne()),e(Ye()),e(He()),e(qe())},ha=ge(function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=M(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=g(e),r=Ae(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:P,isZeniUser:ke(o),showAccountGroups:r===!0,isAccountingClassesEnabled:J(e),isAccountingProjectsEnabled:W(e),currentTenantCompanyName:a,statementEndPoint:`${na}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(O(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(Ge(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(ze(a)),s){const{isCompareModeOn:r,filter:c}=o,{additionalBalances:m,balancesRange:l}=c;let i=[...m];a==="year"&&(i=i.filter(y=>y!=="this_period_vs_same_period_last_year"&&y!=="this_period_vs_same_period_last_year_percent"&&y!=="same_period_last_year")),e(q(o.firstMonthOfFY,r,l.numberOfPeriods<1?1:l.numberOfPeriods,i)),m.length>0&&e($(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",l.numberOfPeriods<1?1:l.numberOfPeriods,i))}t!==!0&&setTimeout(()=>I(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(S(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Z({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Y({classViewLayout:"vertical"})),I(e)},onCOABalancesRangeChanged:(a,s)=>{e(Z(a,s)),I(e)},onThisPeriodChanged:(a,s,t)=>{e(xe(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&I(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(q(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e($(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>I(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(Ve({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,c;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,c=Ue(s)):s.balanceTimeFrame==="year"?(r="quarter",c={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),c!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,l=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return Q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return K(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,c)}return a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?K(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,c):a.accountType!=null?Q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c):void 0})();if(l!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(l,{state:{pathnameStackToGoBack:i,referrer:w(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(j({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(H({scrollPosition:s}));break;case"balance_sheet":e(k({scrollPosition:s}));break;case"cash_flow":e(A({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(j({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(A({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(Be({viewMode:a})),e(ve({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",w(o.selectedReportID)),e(S("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",w(o.selectedReportID)),e(S("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",w(o.selectedReportID)),e(S("profit_and_loss"))),I(e)},onUpdateClassesToFilterOut:a=>{e(Le({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Me({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(Y({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(X())},onUpdateDisplayOrder:a=>{e(Ee(a))},onUpdateReportFormat:a=>{_a(e),e(je(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}})(ta);function ba(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Ke(),f=Je(),u=oa(f),a=Ie(),s=ye(),t=G(),{tenantEmailDomain:r}=Ce(),{useFeatureGate:c}=ee(),{isFeatureEnabled:m}=c(E.isReportsHorizontalClassLayoutSwitchEnabled),l=ae.getSignedInUser(),[i,y]=_.useState(!1),[L,te]=_.useState(!1),{isFeatureEnabled:B}=c(E.isReportsCommentingEnabled);if(l==null)throw Error("Can't access reports page without signing in...");const v=d(n=>M(n)),oe=v.company?.companyInfo.firstMonthOfFY??1,ne=fa(B?v?.companyId:void 0),C=d(n=>g(n).fetchState),re=d(n=>we(n)),{areTenantIdsInSync:h}=We(),R=d(n=>n.financeStatementState.selectedReportId),U=d(n=>J(n)),T=d(n=>W(n)),ie=d(n=>g(n).isCompareModeOn),b=d(n=>g(n).filter),F=d(n=>g(n).selectedReportAndTimeframeFetchState),le=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(y(!0),s(O(l.userId,!0,!0,!1)))},[i,l,s,h]),_.useEffect(()=>{i&&!L&&C==="Completed"&&h&&(s(O(l.userId,!1,!0,!1)),te(!0))},[i,L,C,h]),_.useEffect(()=>{if(i&&F.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Fe(b.timeframe));break;case"profit_and_loss_by_projects":T&&s(X());break;case"balance_sheet":s(Te(b.timeframe));break;case"cash_flow":s(Re(b.timeframe))}},[i,R,F,h,U,T]);const V=Xe(),ce=V?.loggedInUserRole!=null&&Oe(V?.loggedInUserRole)!==!0,[de,pe]=_.useState(!1),x=n=>{pe(n)},fe=ea(),me=da();return function(n){const{isDataReady:ue}=n,{pathname:_e}=G(),z=Qe(_e??"")==="reports",he=la(ue),be=_.useMemo(()=>z?ua:void 0,[z]);ca({canFetchSuggestedQuestions:he,pageContexts:be})}({isDataReady:C==="Completed"}),pa({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(aa,{analytics:P,onLoad:n=>n.trackPageLoaded(sa.Event.reports)}):null,p.jsx(ma,{isAppContentDrawerOpen:de,handleDrawerToggle:x}),p.jsx(ha,{firstMonthOfFY:oe,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:le,selectedReportID:R,analytics:P,filter:b,isAccountingClassesEnabled:U,isAccountingProjectsEnabled:T,isCompareModeOn:ie,hasTransactionAccess:ce,signedInUser:l,selectedReportAndTimeframeFetchState:F,handleDrawerToggle:x,reportsResyncFetchState:re.reportsResyncFetchState,isAiCfoAccessEnabled:me&&fe&&!e,onAskAiCfoClick:()=>{if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0)},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:ne})]})}const w=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function Va(){const e=d(s=>M(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(E.isDebitCardFeatureEnabled),u=$e(f,e),a=Ze(e);return u===!0||a===!0?p.jsx(ia,{}):p.jsxs(Se,{children:[p.jsx(N,{path:"/",element:p.jsx(ba,{})}),p.jsx(N,{path:"*",element:p.jsx(ra,{})})]})}export{Va as default};
|
|
1
|
+
import{j as p}from"./liveblocks-CqGMBzbB.js";import{u as G,j as Ie,h as ye,l as Ce,g as d,k as ge,n as Se,o as N}from"./core-DMKpdX6V.js";import{eN as M,f7 as g,IF as we,jq as J,IG as W,pI as O,je as Re,ih as Te,t5 as X,pN as Fe,bv as Oe,IH as Ae,bn as ke,u4 as De,II as je,IJ as Ee,sZ as Pe,IK as Y,IL as Me,IM as Le,IN as Be,IO as ve,IP as S,IQ as A,IR as k,IS as H,IT as D,IU as j,dB as Ue,tM as Ve,tA as q,tB as $,tS as xe,tF as Z,tY as ze,IV as Ge,IW as Ne,IX as Ye,IY as He,IZ as qe,eT as $e,eR as Ze}from"./zeni-epic-state-dcVRrD1h.js";import{K as Qe,M as Ke,r as Je,p as ee,m as E,z as ae,N as We,j as Xe,a as ea,C as aa,c as P,e as sa,y as se,Q as ta,R as oa,U as na}from"./index-B-S1sw2q.js";import"./mui-C4peJOR0.js";import ra from"./NotFoundScreen-C_3ycSKf.js";import{F as ia}from"./FeaturePreviewScreen-D6Uxvt0_.js";import{a as _}from"./sentry-By_w3AbQ.js";import{u as la,a as ca,b as da,c as pa}from"./useFetchSuggestedQuestionsWhenReady-CU6v8eqg.js";import{u as fa}from"./useInitialThreadRequest-BqzvhNbA.js";import{t as Q,a as K}from"./routePaths-DwcIzItv.js";import{M as ma}from"./MobileAppDrawer-CQwwOR5p.js";import"./recharts-DEvckcqQ.js";import"./analytics-COzTMS9t.js";import"./plaid-DWM21M_R.js";import"./dnd-B4MKAlTf.js";import"./stripe-DMRn4zHo.js";import"./lottie-BflCEFtX.js";import"./lexical-ChtLw4s9.js";import"./pdf-C6aRryDe.js";import"./utils-CSUcsfYh.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]="9963dcf0-9354-47a7-850f-b28ee727fcea",e._sentryDebugIdIdentifier="sentry-dbid-9963dcf0-9354-47a7-850f-b28ee727fcea")}catch{}})();const ua=["profit_loss","balance_sheet","cash_flow"],I=e=>{e(j({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(A({resetLeftScroll:!0}))},_a=e=>{e(Ne()),e(Ye()),e(He()),e(qe())},ha=ge(function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=M(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=g(e),r=Ae(u);return{fetchState:t.fetchState,selectedTimeframe:t.filter.timeframe,selectedReport:t.selectedReportId,displayOrder:t.displayOrder,reportFormat:t.reportFormat,dataAvailable:t.dataAvailable,balancesInTimeframe:t.balancesInTimeframe,allTimeframeTicks:t.allTimeframeTicks,selectedCOABalancesRange:t.filter.balancesRange,isCompareMode:t.isCompareModeOn,profitAndLossReport:t.profitAndLossReport,profitAndLossClassesViewReport:t.profitAndLossByClassReport,profitAndLossProjectViewReport:t.profitAndLossByProjectReport,profitAndLossByClassHorizontalReport:t.profitAndLossByClassHorizontalReport,balanceSheetReport:t.balanceSheetReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:P,isZeniUser:ke(o),showAccountGroups:r===!0,isAccountingClassesEnabled:J(e),isAccountingProjectsEnabled:W(e),currentTenantCompanyName:a,statementEndPoint:`${na}/statement`,authParams:s,isZeniCOAUsed:r}},function(e,o){const{navigate:f,handleDrawerToggle:u}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(O(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(Ge(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(ze(a)),s){const{isCompareModeOn:r,filter:c}=o,{additionalBalances:m,balancesRange:l}=c;let i=[...m];a==="year"&&(i=i.filter(y=>y!=="this_period_vs_same_period_last_year"&&y!=="this_period_vs_same_period_last_year_percent"&&y!=="same_period_last_year")),e(q(o.firstMonthOfFY,r,l.numberOfPeriods<1?1:l.numberOfPeriods,i)),m.length>0&&e($(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",l.numberOfPeriods<1?1:l.numberOfPeriods,i))}t!==!0&&setTimeout(()=>I(e),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(S(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Z({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(Y({classViewLayout:"vertical"})),I(e)},onCOABalancesRangeChanged:(a,s)=>{e(Z(a,s)),I(e)},onThisPeriodChanged:(a,s,t)=>{e(xe(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&I(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e(q(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e($(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>I(e),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(Ve({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:r}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let r,c;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,c=Ue(s)):s.balanceTimeFrame==="year"?(r="quarter",c={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),c!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,l=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return Q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return K(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,c)}return a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?K(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,c):a.accountType!=null?Q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,c):void 0})();if(l!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(l,{state:{pathnameStackToGoBack:i,referrer:w(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(j({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(D({scrollPosition:s}));break;case"profit_and_loss_by_projects":e(H({scrollPosition:s}));break;case"balance_sheet":e(k({scrollPosition:s}));break;case"cash_flow":e(A({scrollPosition:s}));break;default:console.log(`Table Scroll state for ${a} is not handled`)}},onElementCollapseStateChanged:(a,s,t)=>{switch(a){case"profit_and_loss":e(j({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(D({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(A({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{f("../../")},onUpdateAccountViewMode:a=>{e(Be({viewMode:a})),e(ve({viewMode:a})),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",w(o.selectedReportID)),e(S("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",w(o.selectedReportID)),e(S("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",w(o.selectedReportID)),e(S("profit_and_loss"))),I(e)},onUpdateClassesToFilterOut:a=>{e(Le({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Me({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(Y({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(X())},onUpdateDisplayOrder:a=>{e(Ee(a))},onUpdateReportFormat:a=>{_a(e),e(je(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}})(ta);function ba(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Ke(),f=Je(),u=oa(f),a=Ie(),s=ye(),t=G(),{tenantEmailDomain:r}=Ce(),{useFeatureGate:c}=ee(),{isFeatureEnabled:m}=c(E.isReportsHorizontalClassLayoutSwitchEnabled),l=ae.getSignedInUser(),[i,y]=_.useState(!1),[L,te]=_.useState(!1),{isFeatureEnabled:B}=c(E.isReportsCommentingEnabled);if(l==null)throw Error("Can't access reports page without signing in...");const v=d(n=>M(n)),oe=v.company?.companyInfo.firstMonthOfFY??1,ne=fa(B?v?.companyId:void 0),C=d(n=>g(n).fetchState),re=d(n=>we(n)),{areTenantIdsInSync:h}=We(),R=d(n=>n.financeStatementState.selectedReportId),U=d(n=>J(n)),T=d(n=>W(n)),ie=d(n=>g(n).isCompareModeOn),b=d(n=>g(n).filter),F=d(n=>g(n).selectedReportAndTimeframeFetchState),le=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(y(!0),s(O(l.userId,!0,!0,!1)))},[i,l,s,h]),_.useEffect(()=>{i&&!L&&C==="Completed"&&h&&(s(O(l.userId,!1,!0,!1)),te(!0))},[i,L,C,h]),_.useEffect(()=>{if(i&&F.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Fe(b.timeframe));break;case"profit_and_loss_by_projects":T&&s(X());break;case"balance_sheet":s(Te(b.timeframe));break;case"cash_flow":s(Re(b.timeframe))}},[i,R,F,h,U,T]);const V=Xe(),ce=V?.loggedInUserRole!=null&&Oe(V?.loggedInUserRole)!==!0,[de,pe]=_.useState(!1),x=n=>{pe(n)},fe=ea(),me=da();return function(n){const{isDataReady:ue}=n,{pathname:_e}=G(),z=Qe(_e??"")==="reports",he=la(ue),be=_.useMemo(()=>z?ua:void 0,[z]);ca({canFetchSuggestedQuestions:he,pageContexts:be})}({isDataReady:C==="Completed"}),pa({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(aa,{analytics:P,onLoad:n=>n.trackPageLoaded(sa.Event.reports)}):null,p.jsx(ma,{isAppContentDrawerOpen:de,handleDrawerToggle:x}),p.jsx(ha,{firstMonthOfFY:oe,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:le,selectedReportID:R,analytics:P,filter:b,isAccountingClassesEnabled:U,isAccountingProjectsEnabled:T,isCompareModeOn:ie,hasTransactionAccess:ce,signedInUser:l,selectedReportAndTimeframeFetchState:F,handleDrawerToggle:x,reportsResyncFetchState:re.reportsResyncFetchState,isAiCfoAccessEnabled:me&&fe&&!e,onAskAiCfoClick:()=>{if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0)},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:ne})]})}const w=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function Va(){const e=d(s=>M(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(E.isDebitCardFeatureEnabled),u=$e(f,e),a=Ze(e);return u===!0||a===!0?p.jsx(ia,{}):p.jsxs(Se,{children:[p.jsx(N,{path:"/",element:p.jsx(ba,{})}),p.jsx(N,{path:"*",element:p.jsx(ra,{})})]})}export{Va as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-CqGMBzbB.js";import{p as j,z as w,aJ as b,C as I,c as p,e as F,cD as P,m as L}from"./index-B-S1sw2q.js";import"./mui-C4peJOR0.js";import l from"./NotFoundScreen-C_3ycSKf.js";import{a as f}from"./sentry-By_w3AbQ.js";import{h as T,g as y,j as V,u as A,k as R,n as U,o as u}from"./core-DMKpdX6V.js";import{eN as z,Pg as C,M6 as Y,Ph as D,tr as G,eZ as J,Pi as M,tp as O}from"./zeni-epic-state-dcVRrD1h.js";import{R as x}from"./ReferralListScreen-Dq2B0WMt.js";import"./recharts-DEvckcqQ.js";import"./analytics-COzTMS9t.js";import"./plaid-DWM21M_R.js";import"./dnd-B4MKAlTf.js";import"./stripe-DMRn4zHo.js";import"./lottie-BflCEFtX.js";import"./lexical-ChtLw4s9.js";import"./pdf-C6aRryDe.js";import"./utils-CSUcsfYh.js";import"./useAskAiCfoHostNavButtonProps-CjhdCks2.js";import"./useFetchSuggestedQuestionsWhenReady-CU6v8eqg.js";import"./MobileAppDrawer-CQwwOR5p.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]="b36aef46-8b00-4295-a87d-6efb47f0dbaf",e._sentryDebugIdIdentifier="sentry-dbid-b36aef46-8b00-4295-a87d-6efb47f0dbaf")}catch{}})();const Z=R(function(e,t){const n=C(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}},function(e,t){const{navigate:n}=t,o=w.getSignedInUser();return{onDismissClick:()=>{e(D()),n("..")},onSendClick:()=>{if(o!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}e(O())},onUpdateInviteFormLocalData:s=>{e(M({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{o!=null&&p.trackInviteEmailClicked("cancel")}}})(P),q=()=>{const e=T(),[t,n]=f.useState(!1),[o,s]=f.useState(!1),r=y(i=>z(i)),c=V(),k=A(),{useDynamicConfig:g}=j(),d=w.getSignedInUser();if(d==null)throw Error("Can't access invite referral screen without signing in...");const m=y(i=>C(i)),v=d?.firstName!=null?d.firstName:"User",{configValue:h}=g(b.zeniCardsConfig),{configValue:_}=g(b.zeniAccountsConfig),N=Y(_);f.useEffect(()=>{e(D()),r?.rewardsLastViewedTime==null&&o===!1&&(e(G()),s(!0))},[]),f.useEffect(()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(J(!0)))},[m.fetchState,e]);const S=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(I,{analytics:p,onLoad:i=>(E=>E.trackPageLoaded(F.Event.inviteEmailViewed))(i)}):null,a.jsx(Z,{navigate:c,location:k,currentTenant:r,companyName:S,userName:v,inviteFormCompayData:m.localData,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:N.maxAnnualPercentageYield})]})};function de(){const{useFeatureGate:e}=j(),{isFeatureEnabled:t}=e(L.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(u,{path:"/",element:t?a.jsx(x,{}):a.jsx(l,{})}),a.jsx(u,{path:"how-it-works",element:t?a.jsx(x,{isReferralDrawerOpen:!0}):a.jsx(l,{})}),a.jsx(u,{path:"refer/*",element:t?a.jsx(q,{}):a.jsx(l,{})}),a.jsx(u,{path:"*",element:a.jsx(l,{})})]})}export{de as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-
|
|
2
|
-
import{_ as n,bn as os,eN as ls,eT as cs,eR as ds,eS as ms,fC as us,eP as _s,cO as Ae,cv as As,f8 as Es,cn as ps,bC as Is,bq as gs,fd as xs,v as Ts,Ij as hs,bv as js,Ik as Us,bE as Hs,fa as Rs,bD as Ds,bs,cj as fs,Il as ys,Im as Cs,cL as vs,cN as Os,cM as Ps,cu as Fs,cA as Ls,ml as Ee,eO as pe,fM as Bs,fh as Ie,fJ as ge,fK as xe,fi as ks}from"./zeni-epic-state-Crbh9Aj_.js";import{j as e}from"./liveblocks-9BgV5FgM.js";import{a as v}from"./sentry-p6MzREFX.js";import{h as Vs,j as Ss,l as Ns,u as Ms,g as z,i as Te,N as c,n as Zs,o as t}from"./core-nI7qhWxF.js";import{h as ws,u as zs,z as R,p as Gs,a as $s,O as Ys,m as L,j as qs,L as B,D as he,t as _,P as Ws,c as X,l}from"./index-DOZAHQPK.js";import"./mui-fAmxa5Xh.js";import{f as je}from"./analyticsHelper-DBHckA8w.js";import{t as Js}from"./getLocaleForTenant-BT8jU8Uf.js";import"./recharts-BW5HAPx6.js";import"./analytics-D8oYfpTm.js";import"./plaid-DVpb3qqP.js";import"./dnd-C_C-95qu.js";import"./stripe-DMRn4zHo.js";import"./lottie-XIGGYNiw.js";import"./lexical-Dn1INXtc.js";import"./pdf-DKSy7px9.js";import"./utils-D1SR7NNe.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new i.Error().stack;U&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[U]="c04f543e-1f90-4d94-95bf-ad1642f68357",i._sentryDebugIdIdentifier="sentry-dbid-c04f543e-1f90-4d94-95bf-ad1642f68357")}catch{}})();const Ks={dashboard:()=>n(()=>import("./DashboardRoutes-CvW0eCrD.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),bills:()=>n(()=>import("./BillPayRoutes-jThpswSi.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20])),reimbursement:()=>n(()=>import("./ReimbursementRoutes-dJTZ5Llk.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20])),transactions:()=>n(()=>import("./TransactionListRoutes-MecJicQI.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20])),settings:()=>n(()=>import("./SettingsRoutes-DckMCFWG.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20])),reports:()=>n(()=>import("./ReportsRoutes-WKOAJGf5.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-cvyBbKCd.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20])),people:()=>n(()=>import("./PeopleRoutes-Bp6G-oiV.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-DaQKUIoC.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20])),treasury:()=>n(()=>import("./TreasuryRoutes-BUB7tWC4.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20])),vendors:()=>n(()=>import("./VendorsRoutes-C2i_Q0tE.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-DN-sTVza.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))},Qs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Xs=l(()=>n(()=>import("./ReportsRoutes-WKOAJGf5.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20]))),en=l(()=>n(()=>import("./AddressRoutes-DeiyTicu.js"),__vite__mapDeps([50,1,2,3,22,4,5,6,7,14,20]))),sn=l(()=>n(()=>import("./PeopleRoutes-Bp6G-oiV.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20]))),nn=l(()=>n(()=>import("./PandLWithForecastRoutes-oaiw53DB.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,14,18,9,10,24,13,17,20]))),an=l(()=>n(()=>import("./CustomerOnboardingRoutes-BIHdUdzB.js"),__vite__mapDeps([52,1,2,3,22,4,5,6,7,14,37,38,39,40,41,12,20]))),tn=l(()=>n(()=>import("./VendorsRoutes-C2i_Q0tE.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20]))),rn=l(()=>n(()=>import("./TransactionDetailRoutes-Bh5HP7Aa.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,20]))),Ue=l(()=>n(()=>import("./EntityDetailRoutes-HWftLZJg.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,20]))),on=l(()=>n(()=>import("./DashboardRoutes-CvW0eCrD.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))),He=l(()=>n(()=>import("./BillPayRoutes-jThpswSi.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20]))),ln=l(()=>n(()=>import("./SettingsRoutes-DckMCFWG.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20]))),Re=l(()=>n(()=>import("./ReimbursementRoutes-dJTZ5Llk.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20]))),cn=l(()=>n(()=>import("./ZeniAccountRoutes-DN-sTVza.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))),dn=l(()=>n(()=>import("./TreasuryRoutes-BUB7tWC4.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20]))),mn=l(()=>n(()=>import("./TransactionListRoutes-MecJicQI.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20]))),un=l(()=>n(()=>import("./ChargeCardRoutes-cvyBbKCd.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20]))),_n=l(()=>n(()=>import("./NotificationRoutes-DaH9wBSH.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,20]))),An=l(()=>n(()=>import("./PerformanceRoutes-BVKrav5z.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,17,20]))),En=l(()=>n(()=>import("./ExpenseAutomationRoutes-DaQKUIoC.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20]))),pn=l(()=>n(()=>import("./RewardsRoutes-BmS21jMf.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,19,9,10,17,20]))),In=l(()=>n(()=>import("./TaskRoutes-DN9mbXAb.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,24,17,59,9,10,20]))),gn=l(()=>n(()=>import("./AiCfoScreen-CAYEJ5O5.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,48,20]))),f=l(()=>n(()=>import("./NotFoundScreen-qOlBSqQS.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,20]))),xn=l(()=>n(()=>import("./TaskListScreen-B22aeT45.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,10,17,20])));function wn({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:y,clearAllLoading:O,clearLoading:Z}=zs(),b=R.getSignedInUserTenant(o)?.tenantId,h=R.getSignedInUser(),J=os(h),G=Ms(),[N,be]=v.useState(!1),r=z(a=>ls(a)),{useFeatureGate:P}=Gs(),K=$s(),fe=Ys(),{isFeatureEnabled:ye}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||ye&&J,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=z(a=>a.tenantState.fetchState),E=z(a=>a.tenantState.activeTenantFetchState.fetchState),u=E==="Completed"||j==="Completed"?cs(se,r):void 0,$=E==="Completed"||j==="Completed"?ds(r):void 0,Le=E==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!$||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Ve}=P(L.isAiCfoFileUploadEnabled),Y=z(a=>us(a));if(o!=null){const a=R.getSignedInUserTenant(o);h!=null&&a!=null&&je(h,r,S)}const w={tenantId:b,userId:h?.userId,sessionId:h?.zeniSessionId},ne=_s(),A=qs(),Se=r.company==null||A?.loggedInUserRoleMap!=null&&Ae(A.loggedInUserRole),Ne=As(A?.loggedInUserRoleMap),ae=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,Q=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=z(a=>w.tenantId!=null?Es(a,w.tenantId):void 0);v.useEffect(()=>{y(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(Q!=null&&b!=null){const a=Q.params.selectedPeriod;if(a!=null){const H=a.split("-");if(H.length===2){const d=ps(Number(H[0])),s=Number(H[1]),m=Is(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=gs();m.isAfter(M,"month")===!1?U(xs(b,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[Q,b]),v.useEffect(()=>{N||(be(!0),y(B.TENANT_FETCHING)),ae.current?ae.current=!1:!Ts(ne,w)&&R.isSignedIn()&&(y(B.TENANT_FETCHING),function(a,H,d,s){if(pe(H?.userId,H?.zeniSessionId,a.tenantId),d(Bs(!0)),d(Ie(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const m=R.getSignedInUserTenantWithId(a.tenantId);s&&he.updateAppLocaleID(Js(s)),m?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}a.userId!=null?X.identify(a.userId,{tenant_id:a.tenantId}):X.resetUserIdentity()}(w,h,U,Me))},[w,ne,h,U,R]),v.useEffect(()=>{R.isSignedIn()&&(y(B.TENANT_FETCHING),function(a,H,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const q=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(q&&ts){k(Ie(s));const W=R.getSignedInUserTenantWithId(s);W?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(W?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)))}else q&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),q&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)));if(q){X.identify(m.userId,{tenant_id:s});const W=s==null||s!=null&&(H==="Completed"||H==="Error");a==="Completed"||H!=="Not-Started"&&H!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),W&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ee(m.userId,m.zeniSessionId)))}}(j,E,r,b,h,y,U))},[b,E]),v.useEffect(()=>{R.isSignedIn()&&j==="Completed"&&Y.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),R.saveSignedInUserTenants(hs(Y.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,Y.tenantsBaseInOrder))},[Y,j,r,h]),v.useEffect(()=>{E==="In-Progress"&&y(B.TENANT_FETCHING),E!=="Completed"&&E!=="Error"||(E==="Completed"&&b!=null?(O(),_.markActiveTenantFetchCompleted(b)):E==="Error"&&b!=null&&(_.markActiveTenantFetchFailed(b),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[E,j,b,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&E==="Completed"&&N&&(ie.current=!0,function(a=Qs,H=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const m=a[s],M=Ks[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},H)}())},[E,N]);const C=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ze}=P(L.isReferralFeatureEnabled),we=r?.userRole!=null&&r.userRole.includes("charge_card_user"),ze=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ae(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,oe=Be&&!C,Ge=Us(A?.loggedInUserRoleMap),$e=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,de=ce&&Hs(A?.loggedInUserRoleMap),me=Oe&&!C,Ye=r.company!=null&&Rs(r.company),qe=Pe&&Ye===!0&&!C,We=re&&Ds(A?.loggedInUserRoleMap),Je=oe&&bs(A?.loggedInUserRoleMap),Ke=me&&fs(A?.loggedInUserRoleMap),Qe=ys(A?.loggedInUserRoleMap),Xe=Cs(A?.loggedInUserRoleMap),p=vs(A?.loggedInUserRoleMap),I=Os(A?.loggedInUserRoleMap),g=Ps(A?.loggedInUserRoleMap),x=Fs(A?.loggedInUserRoleMap),T=Ls(A?.loggedInUserRoleMap),ue=re&&x,_e=ce&&T,es=me&&p,ss=qe&&I,ns=oe&&g,as=r.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||Ne===!0||Ge===!0||Qe===!0||Xe===!0;return R.isSignedIn()?b==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ee(h.userId,h.zeniSessionId)),null):E!=="In-Progress"&&E!=="Not-Started"||j==="Completed"?(le===!0||J&&!te)&&$e===!1&&u===!1&&$===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||J?N&&r?.userRole&&u!=null&&$!=null&&o!=null&&Object.keys(A.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(Ws,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Tn,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(on,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Xs,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:as||F?e.jsx(sn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(nn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(an,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||ze?e.jsx(rn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(mn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:I,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(xn,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(In,{})}),e.jsx(t,{path:"address/*",element:We||de||Ke||Je?e.jsx(en,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:es?e.jsx(cn,{}):e.jsx(f,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(dn,{}):e.jsx(f,{})}),e.jsx(t,{path:"performance",element:fe?e.jsx(An,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(En,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(_n,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(tn,{}):e.jsx(f,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(He,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(He,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(Re,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(Re,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:ke?e.jsx(ln,{hasAdminLevelAccess:de}):e.jsx(f,{})}),e.jsx(t,{path:"cards/*",element:ns?e.jsx(un,{}):e.jsx(f,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(pn,{}):e.jsx(f,{})}),e.jsx(t,{path:"/ai-cfo",element:K?e.jsx(c,{to:"explore"}):e.jsx(f,{})}),e.jsx(t,{path:"/ai-cfo/",element:K?e.jsx(c,{to:"explore"}):e.jsx(f,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:K?e.jsx(gn,{isFileUploadEnabled:Ve}):e.jsx(f,{})}),e.jsx(t,{path:"*",element:e.jsx(f,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}))}const Tn=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:y,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):y?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),D=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:y,tenantEmailDomain:O})=>y===!0||i?e.jsx(Hn,{tenantEmailDomain:O}):S?e.jsx(Un,{tenantEmailDomain:O}):U?e.jsx(Rn,{tenantEmailDomain:O}):V?e.jsx(jn,{tenantEmailDomain:O}):o?e.jsx(hn,{tenantEmailDomain:O}):e.jsx(f,{}),hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),jn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Un=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),Hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Rn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),De=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{D as FallBackRoute,wn as default};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-BSQu3xMl.js","assets/sentry-By_w3AbQ.js","assets/core-DMKpdX6V.js","assets/zeni-epic-state-dcVRrD1h.js","assets/index-B-S1sw2q.js","assets/mui-C4peJOR0.js","assets/analytics-COzTMS9t.js","assets/utils-CSUcsfYh.js","assets/withTransactionSidePanel-yqBBfrLp.js","assets/useAskAiCfoHostNavButtonProps-CjhdCks2.js","assets/useFetchSuggestedQuestionsWhenReady-CU6v8eqg.js","assets/TransactionDetailScreen-CuOcn9Eq.js","assets/decodeURIComponentSafe-kaKdrE3i.js","assets/routePaths-DwcIzItv.js","assets/NotFoundScreen-C_3ycSKf.js","assets/analyticsHelper-CQQBcwi_.js","assets/CompanyPassportScreen-Dh1MJ-Ph.js","assets/MobileAppDrawer-CQwwOR5p.js","assets/FeaturePreviewScreen-D6Uxvt0_.js","assets/ReferralListScreen-Dq2B0WMt.js","assets/index-Bc34frN_.css","assets/BillPayRoutes-CZhvS7X4.js","assets/AddressScreen-jTT04DFx.js","assets/DomesticWireDetailScreen-Dcgzj1nk.js","assets/useInitialThreadRequest-BqzvhNbA.js","assets/DrawerScreen-BIAu5bA1.js","assets/SetupPagesScreen-tsJgjmfM.js","assets/BusinessVerificationPageScreen-DS8yDRTx.js","assets/BillPayApprovalRoutes-C44-nGT6.js","assets/ReimbursementApprovalRuleDetailScreen-DdLOedPE.js","assets/getLocaleForTenant-DIj12PGu.js","assets/ReimbursementRoutes-CvnLlTDQ.js","assets/ReimbursementApprovalRoutes-hJy0lLcU.js","assets/TransactionListRoutes-C7qZdmUZ.js","assets/ZeniAccountStatementScreen-CCaF_hvY.js","assets/SettingsRoutes-BzxQN_Az.js","assets/accountMappingHelper-dHb9X7tX.js","assets/QBOConnectionScreen-DiY0aEcB.js","assets/empty-_gHzexXT.js","assets/index-CapqGJKF.js","assets/url-XDFiNkBY.js","assets/index-CciFFvoQ.js","assets/ReportsRoutes-CWkv155p.js","assets/ChargeCardRoutes-C7ZPgkk_.js","assets/PeopleRoutes-DCpSQt8d.js","assets/ExpenseAutomationRoutes-G2jBVNVU.js","assets/TreasuryRoutes-c0G3A1dL.js","assets/VendorsRoutes-B3BHswUk.js","assets/pathToGoBack-CHCqWOFU.js","assets/ZeniAccountRoutes-DOB227kl.js","assets/AddressRoutes-BTfuI9Bw.js","assets/PandLWithForecastRoutes-DEaEOUDv.js","assets/CustomerOnboardingRoutes-BeOGrGwK.js","assets/TransactionDetailRoutes-CKqmkQac.js","assets/EntityDetailRoutes-BMnEqgs2.js","assets/NotificationRoutes-17FmFpDt.js","assets/PerformanceRoutes-Clc6K-Sz.js","assets/RewardsRoutes-Bl8kgQI_.js","assets/TaskRoutes-DOluYvA-.js","assets/TaskListScreen-FDYDQZ8O.js","assets/AiCfoScreen-BIhlfQQ_.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as n,bn as os,eN as ls,eT as cs,eR as ds,eS as ms,fC as us,eP as _s,cO as Ae,cv as As,f8 as Es,cn as ps,bC as Is,bq as gs,fd as xs,v as Ts,Ij as hs,bv as js,Ik as Us,bE as Hs,fa as Rs,bD as Ds,bs,cj as fs,Il as ys,Im as Cs,cL as vs,cN as Os,cM as Ps,cu as Fs,cA as Ls,ml as Ee,eO as pe,fM as Bs,fh as Ie,fJ as ge,fK as xe,fi as ks}from"./zeni-epic-state-dcVRrD1h.js";import{j as e}from"./liveblocks-CqGMBzbB.js";import{a as v}from"./sentry-By_w3AbQ.js";import{h as Vs,j as Ss,l as Ns,u as Ms,g as z,i as Te,N as c,n as Zs,o as t}from"./core-DMKpdX6V.js";import{h as ws,u as zs,z as R,p as Gs,a as $s,O as Ys,m as L,j as qs,L as B,D as he,t as _,P as Ws,c as X,l}from"./index-B-S1sw2q.js";import"./mui-C4peJOR0.js";import{f as je}from"./analyticsHelper-CQQBcwi_.js";import{t as Js}from"./getLocaleForTenant-DIj12PGu.js";import"./recharts-DEvckcqQ.js";import"./analytics-COzTMS9t.js";import"./plaid-DWM21M_R.js";import"./dnd-B4MKAlTf.js";import"./stripe-DMRn4zHo.js";import"./lottie-BflCEFtX.js";import"./lexical-ChtLw4s9.js";import"./pdf-C6aRryDe.js";import"./utils-CSUcsfYh.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new i.Error().stack;U&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[U]="c04f543e-1f90-4d94-95bf-ad1642f68357",i._sentryDebugIdIdentifier="sentry-dbid-c04f543e-1f90-4d94-95bf-ad1642f68357")}catch{}})();const Ks={dashboard:()=>n(()=>import("./DashboardRoutes-BSQu3xMl.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])),bills:()=>n(()=>import("./BillPayRoutes-CZhvS7X4.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20])),reimbursement:()=>n(()=>import("./ReimbursementRoutes-CvnLlTDQ.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20])),transactions:()=>n(()=>import("./TransactionListRoutes-C7qZdmUZ.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20])),settings:()=>n(()=>import("./SettingsRoutes-BzxQN_Az.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20])),reports:()=>n(()=>import("./ReportsRoutes-CWkv155p.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20])),chargeCards:()=>n(()=>import("./ChargeCardRoutes-C7ZPgkk_.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20])),people:()=>n(()=>import("./PeopleRoutes-DCpSQt8d.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20])),expenseAutomation:()=>n(()=>import("./ExpenseAutomationRoutes-G2jBVNVU.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20])),treasury:()=>n(()=>import("./TreasuryRoutes-c0G3A1dL.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20])),vendors:()=>n(()=>import("./VendorsRoutes-B3BHswUk.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20])),zeniAccounts:()=>n(()=>import("./ZeniAccountRoutes-DOB227kl.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))},Qs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},Xs=l(()=>n(()=>import("./ReportsRoutes-CWkv155p.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,14,18,10,24,13,17,20]))),en=l(()=>n(()=>import("./AddressRoutes-BTfuI9Bw.js"),__vite__mapDeps([50,1,2,3,22,4,5,6,7,14,20]))),sn=l(()=>n(()=>import("./PeopleRoutes-DCpSQt8d.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,14,9,10,17,20]))),nn=l(()=>n(()=>import("./PandLWithForecastRoutes-DEaEOUDv.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,14,18,9,10,24,13,17,20]))),an=l(()=>n(()=>import("./CustomerOnboardingRoutes-BeOGrGwK.js"),__vite__mapDeps([52,1,2,3,22,4,5,6,7,14,37,38,39,40,41,12,20]))),tn=l(()=>n(()=>import("./VendorsRoutes-B3BHswUk.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,22,14,18,13,48,9,10,17,25,36,20]))),rn=l(()=>n(()=>import("./TransactionDetailRoutes-CKqmkQac.js"),__vite__mapDeps([53,1,2,3,14,4,5,6,7,11,9,10,12,13,20]))),Ue=l(()=>n(()=>import("./EntityDetailRoutes-BMnEqgs2.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,12,8,9,10,11,13,20]))),on=l(()=>n(()=>import("./DashboardRoutes-BSQu3xMl.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20]))),He=l(()=>n(()=>import("./BillPayRoutes-CZhvS7X4.js"),__vite__mapDeps([21,1,2,3,4,5,6,7,22,14,23,9,10,24,25,17,18,26,15,13,27,28,29,30,20]))),ln=l(()=>n(()=>import("./SettingsRoutes-BzxQN_Az.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,22,14,15,27,13,16,37,38,39,40,41,12,28,29,32,20]))),Re=l(()=>n(()=>import("./ReimbursementRoutes-CvnLlTDQ.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,14,26,17,15,13,27,18,9,10,24,25,32,29,30,20]))),cn=l(()=>n(()=>import("./ZeniAccountRoutes-DOB227kl.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,14,26,17,15,13,27,18,23,22,9,10,34,20]))),dn=l(()=>n(()=>import("./TreasuryRoutes-c0G3A1dL.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,14,26,17,15,13,27,9,10,18,20]))),mn=l(()=>n(()=>import("./TransactionListRoutes-C7qZdmUZ.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,13,34,20]))),un=l(()=>n(()=>import("./ChargeCardRoutes-C7ZPgkk_.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,26,17,14,15,13,27,9,10,22,20]))),_n=l(()=>n(()=>import("./NotificationRoutes-17FmFpDt.js"),__vite__mapDeps([55,1,2,3,14,4,5,6,7,9,10,20]))),An=l(()=>n(()=>import("./PerformanceRoutes-Clc6K-Sz.js"),__vite__mapDeps([56,1,2,3,14,4,5,6,7,9,10,17,20]))),En=l(()=>n(()=>import("./ExpenseAutomationRoutes-G2jBVNVU.js"),__vite__mapDeps([45,1,2,3,14,4,5,6,7,9,10,11,12,13,8,36,25,20]))),pn=l(()=>n(()=>import("./RewardsRoutes-Bl8kgQI_.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,14,19,9,10,17,20]))),In=l(()=>n(()=>import("./TaskRoutes-DOluYvA-.js"),__vite__mapDeps([58,1,2,3,14,4,5,6,7,24,17,59,9,10,20]))),gn=l(()=>n(()=>import("./AiCfoScreen-BIhlfQQ_.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,48,20]))),f=l(()=>n(()=>import("./NotFoundScreen-C_3ycSKf.js"),__vite__mapDeps([14,1,2,3,4,5,6,7,20]))),xn=l(()=>n(()=>import("./TaskListScreen-FDYDQZ8O.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,10,17,20])));function wn({setTenantEmailDomain:i}){const U=Vs(),V=Ss(),{tenantEmailDomain:o}=Ns(),S=ws().mode,{setLoading:y,clearAllLoading:O,clearLoading:Z}=zs(),b=R.getSignedInUserTenant(o)?.tenantId,h=R.getSignedInUser(),J=os(h),G=Ms(),[N,be]=v.useState(!1),r=z(a=>ls(a)),{useFeatureGate:P}=Gs(),K=$s(),fe=Ys(),{isFeatureEnabled:ye}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Ce}=P(L.isExpenseAutomationEnabledV2),ve=Ce||ye&&J,{isFeatureEnabled:Oe}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:Pe}=P(L.isTreasuryEnabled),{isFeatureEnabled:Fe}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:se}=P(L.isDebitCardFeatureEnabled),j=z(a=>a.tenantState.fetchState),E=z(a=>a.tenantState.activeTenantFetchState.fetchState),u=E==="Completed"||j==="Completed"?cs(se,r):void 0,$=E==="Completed"||j==="Completed"?ds(r):void 0,Le=E==="Completed"||j==="Completed"?ms(r):void 0,Be=Fe||se||!!Le||!!$||!!u,{isFeatureEnabled:ke}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:Ve}=P(L.isAiCfoFileUploadEnabled),Y=z(a=>us(a));if(o!=null){const a=R.getSignedInUserTenant(o);h!=null&&a!=null&&je(h,r,S)}const w={tenantId:b,userId:h?.userId,sessionId:h?.zeniSessionId},ne=_s(),A=qs(),Se=r.company==null||A?.loggedInUserRoleMap!=null&&Ae(A.loggedInUserRole),Ne=As(A?.loggedInUserRoleMap),ae=v.useRef(!0),te=Te("/:tenantEmailDomain/onboarding/*")!==null,Q=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Me=z(a=>w.tenantId!=null?Es(a,w.tenantId):void 0);v.useEffect(()=>{y(B.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(Q!=null&&b!=null){const a=Q.params.selectedPeriod;if(a!=null){const H=a.split("-");if(H.length===2){const d=ps(Number(H[0])),s=Number(H[1]),m=Is(`01-${d<10?`0${d}`:d}-${s}`,he.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=gs();m.isAfter(M,"month")===!1?U(xs(b,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[Q,b]),v.useEffect(()=>{N||(be(!0),y(B.TENANT_FETCHING)),ae.current?ae.current=!1:!Ts(ne,w)&&R.isSignedIn()&&(y(B.TENANT_FETCHING),function(a,H,d,s){if(pe(H?.userId,H?.zeniSessionId,a.tenantId),d(Bs(!0)),d(Ie(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const m=R.getSignedInUserTenantWithId(a.tenantId);s&&he.updateAppLocaleID(Js(s)),m?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}a.userId!=null?X.identify(a.userId,{tenant_id:a.tenantId}):X.resetUserIdentity()}(w,h,U,Me))},[w,ne,h,U,R]),v.useEffect(()=>{R.isSignedIn()&&(y(B.TENANT_FETCHING),function(a,H,d,s,m,M,k){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const q=s!=null&&m?.zeniSessionId!=null,ts=d==null||d.tenantId!==s,is=d!=null&&d.excludedResources==null,rs=d!=null&&d.externalConnections==null;if(q&&ts){k(Ie(s));const W=R.getSignedInUserTenantWithId(s);W?.tenantEmailDomain!=null&&R.saveActiveTenantDomainForUser(W?.tenantEmailDomain),pe(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)))}else q&&is&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),k(ge(m.userId,s))),q&&rs&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),k(xe(m.userId,s)));if(q){X.identify(m.userId,{tenant_id:s});const W=s==null||s!=null&&(H==="Completed"||H==="Error");a==="Completed"||H!=="Not-Started"&&H!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(B.TENANT_FETCHING),k(ks(m.userId,s,m.zeniSessionId))),W&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),k(Ee(m.userId,m.zeniSessionId)))}}(j,E,r,b,h,y,U))},[b,E]),v.useEffect(()=>{R.isSignedIn()&&j==="Completed"&&Y.tenantsBaseInOrder.length>0&&(Z(B.TENANT_FETCHING),R.saveSignedInUserTenants(hs(Y.tenantsBaseInOrder)),h!=null&&je(h,r,S,void 0,Y.tenantsBaseInOrder))},[Y,j,r,h]),v.useEffect(()=>{E==="In-Progress"&&y(B.TENANT_FETCHING),E!=="Completed"&&E!=="Error"||(E==="Completed"&&b!=null?(O(),_.markActiveTenantFetchCompleted(b)):E==="Error"&&b!=null&&(_.markActiveTenantFetchFailed(b),Z(B.TENANT_FETCHING),Z(B.TENANT_SWITCHING))),j!=="Completed"&&j!=="Error"||(j==="Completed"?_.markAllTenantsFetchCompleted():j==="Error"&&_.markAllTenantsFetchFailed())},[E,j,b,N]);const ie=v.useRef(!1);v.useEffect(()=>{!ie.current&&E==="Completed"&&N&&(ie.current=!0,function(a=Qs,H=3e3){setTimeout(()=>{const d=s=>{if(s>=a.length)return;const m=a[s],M=Ks[m];M!=null?M().then(()=>ee(()=>d(s+1))).catch(()=>ee(()=>d(s+1))):d(s+1)};ee(()=>d(0))},H)}())},[E,N]);const C=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ze}=P(L.isReferralFeatureEnabled),we=r?.userRole!=null&&r.userRole.includes("charge_card_user"),ze=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ae(r.userRole),re=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,oe=Be&&!C,Ge=Us(A?.loggedInUserRoleMap),$e=r.externalConnections?.accounting[0]?.isValid,le=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,de=ce&&Hs(A?.loggedInUserRoleMap),me=Oe&&!C,Ye=r.company!=null&&Rs(r.company),qe=Pe&&Ye===!0&&!C,We=re&&Ds(A?.loggedInUserRoleMap),Je=oe&&bs(A?.loggedInUserRoleMap),Ke=me&&fs(A?.loggedInUserRoleMap),Qe=ys(A?.loggedInUserRoleMap),Xe=Cs(A?.loggedInUserRoleMap),p=vs(A?.loggedInUserRoleMap),I=Os(A?.loggedInUserRoleMap),g=Ps(A?.loggedInUserRoleMap),x=Fs(A?.loggedInUserRoleMap),T=Ls(A?.loggedInUserRoleMap),ue=re&&x,_e=ce&&T,es=me&&p,ss=qe&&I,ns=oe&&g,as=r.excludedResources?.resources?.find(a=>a.resource==="/invites")!=null||Ne===!0||Ge===!0||Qe===!0||Xe===!0;return R.isSignedIn()?b==null?j==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}):(h!=null&&j!=="In-Progress"&&U(Ee(h.userId,h.zeniSessionId)),null):E!=="In-Progress"&&E!=="Not-Started"||j==="Completed"?(le===!0||J&&!te)&&$e===!1&&u===!1&&$===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||le!==!1||te||J?N&&r?.userRole&&u!=null&&$!=null&&o!=null&&Object.keys(A.loggedInUserRoleMap).length>0?e.jsx(Zs,{children:e.jsxs(t,{element:e.jsx(Ws,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Tn,{isDashboardAccess:F,isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,isTenantCardsOnly:$})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(on,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(Xs,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:as||F?e.jsx(sn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(nn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(an,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||we||ze?e.jsx(rn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(mn,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(Ue,{entityType:"customer"}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:I,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(Ue,{entityType:"vendor"}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(xn,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(In,{})}),e.jsx(t,{path:"address/*",element:We||de||Ke||Je?e.jsx(en,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:es?e.jsx(cn,{}):e.jsx(f,{})}),e.jsx(t,{path:"treasury/*",element:ss?e.jsx(dn,{}):e.jsx(f,{})}),e.jsx(t,{path:"performance",element:fe?e.jsx(An,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:ve&&C===!1?e.jsx(En,{}):e.jsx(De,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(_n,{})}),e.jsx(t,{path:"vendors/*",element:Se?e.jsx(tn,{}):e.jsx(f,{})}),e.jsx(t,{path:"bill/*",element:ue?e.jsx(He,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:ue?e.jsx(He,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:_e?e.jsx(Re,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:_e?e.jsx(Re,{}):e.jsx(D,{isUserHasZeniAccountsAccess:p,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:I,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:ke?e.jsx(ln,{hasAdminLevelAccess:de}):e.jsx(f,{})}),e.jsx(t,{path:"cards/*",element:ns?e.jsx(un,{}):e.jsx(f,{})}),e.jsx(t,{path:"rewards/*",element:Ze?e.jsx(pn,{}):e.jsx(f,{})}),e.jsx(t,{path:"/ai-cfo",element:K?e.jsx(c,{to:"explore"}):e.jsx(f,{})}),e.jsx(t,{path:"/ai-cfo/",element:K?e.jsx(c,{to:"explore"}):e.jsx(f,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:K?e.jsx(gn,{isFileUploadEnabled:Ve}):e.jsx(f,{})}),e.jsx(t,{path:"*",element:e.jsx(f,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...G.state,message:"...",origin:G.pathname}}))}const Tn=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:y,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):y?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),D=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:y,tenantEmailDomain:O})=>y===!0||i?e.jsx(Hn,{tenantEmailDomain:O}):S?e.jsx(Un,{tenantEmailDomain:O}):U?e.jsx(Rn,{tenantEmailDomain:O}):V?e.jsx(jn,{tenantEmailDomain:O}):o?e.jsx(hn,{tenantEmailDomain:O}):e.jsx(f,{}),hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),jn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Un=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),Hn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Rn=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),De=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{D as FallBackRoute,wn as default};
|