@zeniai/web-app-ui 5.2.0-dev → 5.2.0-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-oOQJC3Yo.js → AddressRoutes-DGCDOoKb.js} +1 -1
- package/dist/assets/{AddressScreen-B2g0EGq7.js → AddressScreen-Dzf83tSk.js} +1 -1
- package/dist/assets/{AiCfoScreen--Z8a2CnQ.js → AiCfoScreen-TZ---AU4.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-DI5OQIWZ.js → BillPayApprovalRoutes-iPPwT0JG.js} +1 -1
- package/dist/assets/{BillPayRoutes-CXhgkFrh.js → BillPayRoutes-U0Aszwdv.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-CHlhD1bn.js → BusinessVerificationPageScreen-B4os1LkS.js} +1 -1
- package/dist/assets/{CardsAiCfoScreen-BfeQo7N4.js → CardsAiCfoScreen-Db20Cfsg.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-DYWdITos.js → ChargeCardRoutes-rxetskAF.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-B0IdpqTW.js → CompanyPassportScreen-COm4H_kf.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-DLk20sBX.js → ConnectionAuthScreen-C5LpJddx.js} +1 -1
- package/dist/assets/{CustomerOnboardingAuthScreen-D31AAVKC.js → CustomerOnboardingAuthScreen-BIc9nbPF.js} +1 -1
- package/dist/assets/{CustomerOnboardingRoutes-D44ZNBEA.js → CustomerOnboardingRoutes-Id7ixv-a.js} +1 -1
- package/dist/assets/{DashboardRoutes-684orl8N.js → DashboardRoutes-D_SbIh49.js} +1 -1
- package/dist/assets/{DefaultTenantHome-3UFjXhiS.js → DefaultTenantHome-BsKeybH6.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-BtYZfhuG.js → DomesticWireDetailScreen-BKpkRMty.js} +1 -1
- package/dist/assets/{DrawerScreen-CSMp2A9F.js → DrawerScreen-BPgZ_1JF.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-CRNQJyjq.js → EntityDetailRoutes-BZ9Mr897.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-CB1lyxjv.js → ExpenseAutomationRoutes-CN3ihdCO.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-D3z2gcpi.js → FeaturePreviewScreen-Di3PuVRR.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-gDziUA5z.js → HubSpotOAuthCallbackScreen-CW56Ncxa.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-BMPUgnVn.js → MagicLinkRoutes-DJ7vyce1.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-_ZejKaCn.js → MagicLinkSignInScreen-BZfit8o3.js} +1 -1
- package/dist/assets/{MobileAppDrawer-8wrd6B-7.js → MobileAppDrawer-NdU6zrS3.js} +1 -1
- package/dist/assets/{NotFoundScreen-Bge2JGwW.js → NotFoundScreen-wlhddpbg.js} +1 -1
- package/dist/assets/{NotificationRoutes--6GU4tbu.js → NotificationRoutes-DbRksc78.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-B59fm6Kj.js → OAuthConsentScreen-sL3GodJ_.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-CxdNyFxC.js → PandLWithForecastRoutes-BoM4q2mR.js} +1 -1
- package/dist/assets/{PeopleRoutes-CmOZGcsk.js → PeopleRoutes-0fm-JoER.js} +1 -1
- package/dist/assets/{PerformanceRoutes-Bu3nN2tK.js → PerformanceRoutes-Cq8pT07f.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-8ZlWNPA9.js → QBOConnectionScreen-D9vGR9Iz.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-CTijKmMu.js → ReimbursementApprovalRoutes-DfMng3xh.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DIOgjJyZ.js → ReimbursementApprovalRuleDetailScreen-w7TPHMbb.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-DRMiWLSm.js → ReimbursementRoutes-uHKvr9EG.js} +1 -1
- package/dist/assets/{ReportsRoutes-DnRmWO_g.js → ReportsRoutes-BosLV3TS.js} +1 -1
- package/dist/assets/{RewardsRoutes-b9NXQyW4.js → RewardsRoutes-BPVfq5Np.js} +1 -1
- package/dist/assets/{ScreenRoutes-CkNF9DLW.js → ScreenRoutes-Drpg91zT.js} +2 -2
- package/dist/assets/{SettingsRoutes-D5DPlYhg.js → SettingsRoutes-BmbweE5j.js} +1 -1
- package/dist/assets/{SetupPagesScreen-BIZfrXFn.js → SetupPagesScreen-HhCCJlo-.js} +1 -1
- package/dist/assets/{SignInScreen-CHZM3Frk.js → SignInScreen-B8UhmfC2.js} +1 -1
- package/dist/assets/{SignOutScreen-Cx6F3vmB.js → SignOutScreen-CxWWZOhK.js} +1 -1
- package/dist/assets/{TaskListScreen-BnrFj0CA.js → TaskListScreen-B7M-Cqce.js} +1 -1
- package/dist/assets/{TaskRoutes-BAC-3C1s.js → TaskRoutes-CyLfJ8Tw.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-C9ZhFLf5.js → TransactionDetailRoutes-Ct4erWuE.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-BsgXSNNV.js → TransactionDetailScreen-DRzSksYw.js} +1 -1
- package/dist/assets/{TransactionListRoutes-BrzIlvyk.js → TransactionListRoutes-B191v9kk.js} +1 -1
- package/dist/assets/{TreasuryRoutes-Dyw-ZAPa.js → TreasuryRoutes-DZNZaxYZ.js} +1 -1
- package/dist/assets/{VendorsRoutes-BWBUUjTt.js → VendorsRoutes-CvrHlc-r.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-CcZrE5_R.js → WiseConfirmationScreen-B9yx7qcI.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-3OROP5vK.js → ZeniAccountRoutes-YPhOuFwx.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-B3_VR-tZ.js → ZeniAccountStatementScreen-DJU3198J.js} +1 -1
- package/dist/assets/{analyticsHelper-CixncN58.js → analyticsHelper-CbsMOq15.js} +1 -1
- package/dist/assets/{getLocaleForTenant-C5b46Qyn.js → getLocaleForTenant-BuGWeb9s.js} +1 -1
- package/dist/assets/{index-BWvweS0E.js → index-D7tfVykC.js} +5 -5
- package/dist/assets/{routePaths-D87yNyzK.js → routePaths-CVAI7AUa.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-COKjoYH2.js → useAiCfoDashboardSuggestedQuestionsChips-DwtRgARG.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-c_VzJZE9.js → useAskAiCfoHostNavButtonProps-Bl-nKTXG.js} +1 -1
- package/dist/assets/{useCashManagementBanner-OkHozYlV.js → useCashManagementBanner-SbCmMLis.js} +1 -1
- package/dist/assets/{useChargeCardPusherEvents-C2sCX5OQ.js → useChargeCardPusherEvents-Cg9Qn_oP.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-CMBVShl-.js → useEmailConnectResultRefresh-gsc6JcZn.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-EuACK97s.js → useInitialThreadRequest-CXnpfTcs.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-BJ1dqQdE.js → withTransactionSidePanel-ZQvLeKiY.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-s55OcG-D.js";import{g as G,h as Ce,u as ge,i as we,j as d,n as Ie,o as Se,p as H}from"./core-CnGMK-sC.js";import{eV as v,fR as w,Ms as Te,kz as Q,qT as W,rI as O,kn as Re,jr as Me,vf as X,rN as Ae,bs as Oe,Mt as Fe,bn as ke,wo as De,Mu as je,Mv as Ee,v7 as Pe,Mw as Y,Mx as ve,My as Le,Mz as Be,MA as Ve,MB as I,MC as F,MD as k,ME as N,MF as D,MG as j,dH as Ue,w4 as xe,vU as $,vV as q,wa as ze,vZ as Z,wg as Ge,MH as He,MI as Ye,MJ as Ne,MK as $e,ML as qe,fC as Ze,fA as Je}from"./zeni-epic-state-NrbJoBOX.js";import{V as Ke,W as Qe,X as We,Z as Xe,m as ea,C as ee,G as E,z as ae,_ as aa,T as sa,c as ta,$ as oa,a0 as na,x as ra,d as P,f as ia,a1 as la,v as se,a2 as ca,a3 as da,a4 as pa}from"./index-BWvweS0E.js";import"./mui-CggbPNN2.js";import fa from"./NotFoundScreen-Bge2JGwW.js";import{F as ma}from"./FeaturePreviewScreen-D3z2gcpi.js";import{a as _}from"./sentry-qwy54zvC.js";import{u as ua}from"./useInitialThreadRequest-EuACK97s.js";import{t as J,a as K,b as _a}from"./routePaths-D87yNyzK.js";import{M as ha}from"./MobileAppDrawer-8wrd6B-7.js";import"./recharts-CmLekiCG.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./utils-5Fz6z6US.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]="0eee6d51-5e85-4cea-abd2-6add07138779",e._sentryDebugIdIdentifier="sentry-dbid-0eee6d51-5e85-4cea-abd2-6add07138779")}catch{}})();const ba=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(j({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(F({resetLeftScroll:!0}))},ya=e=>{e(Ye()),e(Ne()),e($e()),e(qe())},Ca=Ie((function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=v(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=w(e),r=Fe(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:Q(e),isAccountingProjectsEnabled:W(e),currentTenantCompanyName:a,statementEndPoint:`${pa}/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(He(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(Ge(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:m,balancesRange:c}=l;let i=[...m];a==="year"&&(i=i.filter((C=>C!=="this_period_vs_same_period_last_year"&&C!=="this_period_vs_same_period_last_year_percent"&&C!=="same_period_last_year"))),e($(o.firstMonthOfFY,r,c.numberOfPeriods<1?1:c.numberOfPeriods,i)),m.length>0&&e(q(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",c.numberOfPeriods<1?1:c.numberOfPeriods,i))}t!==!0&&setTimeout((()=>y(e)),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(I(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"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(Z(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(ze(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e($(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(q(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((()=>y(e)),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(xe({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,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=Ue(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,c=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return J(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return K(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?_a(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,m,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?K(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,l):a.accountType!=null?J(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l):void 0})();if(c!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(c,{state:{pathnameStackToGoBack:i,referrer:S(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(N({scrollPosition:s}));break;case"balance_sheet":e(k({scrollPosition:s}));break;case"cash_flow":e(F({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(N({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(F({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",S(o.selectedReportID)),e(I("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",S(o.selectedReportID)),e(I("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",S(o.selectedReportID)),e(I("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Le({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(ve({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(Y({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(X())},onUpdateDisplayOrder:a=>{e(Ee(a))},onUpdateReportFormat:a=>{ya(e),e(je(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}}))(ca);function ga(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Xe(),f=ea(),u=da(f),a=Ce(),s=ge(),t=G(),{tenantEmailDomain:r}=we(),{useFeatureGate:l}=ee(),{isFeatureEnabled:m}=l(E.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,C]=_.useState(!1),[L,te]=_.useState(!1),{isFeatureEnabled:B}=l(E.isReportsCommentingEnabled);if(c==null)throw Error("Can't access reports page without signing in...");const T=d((n=>v(n))),oe=T.masterTOSInfo?.isMasterTOSAccepted??!1,ne=T.company?.companyInfo.firstMonthOfFY??1,re=ua(B?T?.companyId:void 0),g=d((n=>w(n).fetchState)),ie=d((n=>Te(n))),{areTenantIdsInSync:h}=aa(),R=d((n=>n.financeStatementState.selectedReportId)),V=d((n=>Q(n))),M=d((n=>W(n))),le=d((n=>w(n).isCompareModeOn)),b=d((n=>w(n).filter)),A=d((n=>w(n).selectedReportAndTimeframeFetchState)),ce=d((n=>n.profitAndLossClassesViewState.uiState.classViewLayout));_.useEffect((()=>{!i&&h&&(C(!0),s(O(c.userId,!0,!0,!1)))}),[i,c,s,h]),_.useEffect((()=>{i&&!L&&g==="Completed"&&h&&(s(O(c.userId,!1,!0,!1)),te(!0))}),[i,L,g,h]),_.useEffect((()=>{if(i&&A.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Ae(b.timeframe));break;case"profit_and_loss_by_projects":M&&s(X());break;case"balance_sheet":s(Me(b.timeframe));break;case"cash_flow":s(Re(b.timeframe))}}),[i,R,A,h,V,M]);const U=sa(),de=U?.loggedInUserRole!=null&&Oe(U?.loggedInUserRole)!==!0,[pe,fe]=_.useState(!1),x=n=>{fe(n)},me=ta(),ue=oa();return(function(n){const{isDataReady:_e}=n,{pathname:he}=G(),z=Ke(he??"")==="reports",be=Qe(_e),ye=_.useMemo((()=>z?ba:void 0),[z]);We({canFetchSuggestedQuestions:be,pageContexts:ye})})({isDataReady:g==="Completed"}),na({isDataReady:g==="Completed"}),p.jsxs(p.Fragment,{children:[g==="Completed"?p.jsx(ra,{analytics:P,onLoad:n=>n.trackPageLoaded(ia.Event.reports)}):null,p.jsx(ha,{isAppContentDrawerOpen:pe,handleDrawerToggle:x}),p.jsx(Ca,{firstMonthOfFY:ne,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:ce,selectedReportID:R,analytics:P,filter:b,isAccountingClassesEnabled:V,isAccountingProjectsEnabled:M,isCompareModeOn:le,hasTransactionAccess:de,signedInUser:c,selectedReportAndTimeframeFetchState:A,handleDrawerToggle:x,reportsResyncFetchState:ie.reportsResyncFetchState,isAiCfoAccessEnabled:ue&&me&&!e,onAskAiCfoClick:()=>{if(oe)if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else la({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:re})]})}const S=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 za(){const e=d((s=>v(s))),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(E.isDebitCardFeatureEnabled),u=Ze(f,e),a=Je(e);return u===!0||a===!0?p.jsx(ma,{}):p.jsxs(Se,{children:[p.jsx(H,{path:"/",element:p.jsx(ga,{})}),p.jsx(H,{path:"*",element:p.jsx(fa,{})})]})}export{za as default};
|
|
1
|
+
import{j as p}from"./liveblocks-s55OcG-D.js";import{g as G,h as Ce,u as ge,i as we,j as d,n as Ie,o as Se,p as H}from"./core-CnGMK-sC.js";import{eV as v,fR as w,Ms as Te,kz as Q,qT as W,rI as O,kn as Re,jr as Me,vf as X,rN as Ae,bs as Oe,Mt as Fe,bn as ke,wo as De,Mu as je,Mv as Ee,v7 as Pe,Mw as Y,Mx as ve,My as Le,Mz as Be,MA as Ve,MB as I,MC as F,MD as k,ME as N,MF as D,MG as j,dH as Ue,w4 as xe,vU as $,vV as q,wa as ze,vZ as Z,wg as Ge,MH as He,MI as Ye,MJ as Ne,MK as $e,ML as qe,fC as Ze,fA as Je}from"./zeni-epic-state-NrbJoBOX.js";import{V as Ke,W as Qe,X as We,Z as Xe,m as ea,C as ee,G as E,z as ae,_ as aa,T as sa,c as ta,$ as oa,a0 as na,x as ra,d as P,f as ia,a1 as la,v as se,a2 as ca,a3 as da,a4 as pa}from"./index-D7tfVykC.js";import"./mui-CggbPNN2.js";import fa from"./NotFoundScreen-wlhddpbg.js";import{F as ma}from"./FeaturePreviewScreen-Di3PuVRR.js";import{a as _}from"./sentry-qwy54zvC.js";import{u as ua}from"./useInitialThreadRequest-CXnpfTcs.js";import{t as J,a as K,b as _a}from"./routePaths-CVAI7AUa.js";import{M as ha}from"./MobileAppDrawer-NdU6zrS3.js";import"./recharts-CmLekiCG.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./utils-5Fz6z6US.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]="0eee6d51-5e85-4cea-abd2-6add07138779",e._sentryDebugIdIdentifier="sentry-dbid-0eee6d51-5e85-4cea-abd2-6add07138779")}catch{}})();const ba=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(j({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(F({resetLeftScroll:!0}))},ya=e=>{e(Ye()),e(Ne()),e($e()),e(qe())},Ca=Ie((function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=v(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=w(e),r=Fe(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:Q(e),isAccountingProjectsEnabled:W(e),currentTenantCompanyName:a,statementEndPoint:`${pa}/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(He(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(Ge(a)),s){const{isCompareModeOn:r,filter:l}=o,{additionalBalances:m,balancesRange:c}=l;let i=[...m];a==="year"&&(i=i.filter((C=>C!=="this_period_vs_same_period_last_year"&&C!=="this_period_vs_same_period_last_year_percent"&&C!=="same_period_last_year"))),e($(o.firstMonthOfFY,r,c.numberOfPeriods<1?1:c.numberOfPeriods,i)),m.length>0&&e(q(o.firstMonthOfFY,i.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",c.numberOfPeriods<1?1:c.numberOfPeriods,i))}t!==!0&&setTimeout((()=>y(e)),50)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(I(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"})),y(e)},onCOABalancesRangeChanged:(a,s)=>{e(Z(a,s)),y(e)},onThisPeriodChanged:(a,s,t)=>{e(ze(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&y(e)},onAdditionalBalanceSelectionChanged:(a,s,t,r)=>{e($(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(q(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((()=>y(e)),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,r)=>{e(xe({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,l;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(r=s.balanceTimeFrame,l=Ue(s)):s.balanceTimeFrame==="year"?(r="quarter",l={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),l!=null&&r!=null){const m=a.accountName===""?a.accountDescription:a.accountName,c=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return J(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return K(o.tenantEmailDomain,a.accountId,a.accountType,s.id,m,r,l)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?_a(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,m,r,l):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?K(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,l):a.accountType!=null?J(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l):void 0})();if(c!=null){const i=se(o.location.state?.pathnameStackToGoBack,o.location.pathname);f(c,{state:{pathnameStackToGoBack:i,referrer:S(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(N({scrollPosition:s}));break;case"balance_sheet":e(k({scrollPosition:s}));break;case"cash_flow":e(F({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(N({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(k({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(F({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",S(o.selectedReportID)),e(I("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",S(o.selectedReportID)),e(I("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",S(o.selectedReportID)),e(I("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(Le({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(ve({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(Y({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(X())},onUpdateDisplayOrder:a=>{e(Ee(a))},onUpdateReportFormat:a=>{ya(e),e(je(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}}))(ca);function ga(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Xe(),f=ea(),u=da(f),a=Ce(),s=ge(),t=G(),{tenantEmailDomain:r}=we(),{useFeatureGate:l}=ee(),{isFeatureEnabled:m}=l(E.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,C]=_.useState(!1),[L,te]=_.useState(!1),{isFeatureEnabled:B}=l(E.isReportsCommentingEnabled);if(c==null)throw Error("Can't access reports page without signing in...");const T=d((n=>v(n))),oe=T.masterTOSInfo?.isMasterTOSAccepted??!1,ne=T.company?.companyInfo.firstMonthOfFY??1,re=ua(B?T?.companyId:void 0),g=d((n=>w(n).fetchState)),ie=d((n=>Te(n))),{areTenantIdsInSync:h}=aa(),R=d((n=>n.financeStatementState.selectedReportId)),V=d((n=>Q(n))),M=d((n=>W(n))),le=d((n=>w(n).isCompareModeOn)),b=d((n=>w(n).filter)),A=d((n=>w(n).selectedReportAndTimeframeFetchState)),ce=d((n=>n.profitAndLossClassesViewState.uiState.classViewLayout));_.useEffect((()=>{!i&&h&&(C(!0),s(O(c.userId,!0,!0,!1)))}),[i,c,s,h]),_.useEffect((()=>{i&&!L&&g==="Completed"&&h&&(s(O(c.userId,!1,!0,!1)),te(!0))}),[i,L,g,h]),_.useEffect((()=>{if(i&&A.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Ae(b.timeframe));break;case"profit_and_loss_by_projects":M&&s(X());break;case"balance_sheet":s(Me(b.timeframe));break;case"cash_flow":s(Re(b.timeframe))}}),[i,R,A,h,V,M]);const U=sa(),de=U?.loggedInUserRole!=null&&Oe(U?.loggedInUserRole)!==!0,[pe,fe]=_.useState(!1),x=n=>{fe(n)},me=ta(),ue=oa();return(function(n){const{isDataReady:_e}=n,{pathname:he}=G(),z=Ke(he??"")==="reports",be=Qe(_e),ye=_.useMemo((()=>z?ba:void 0),[z]);We({canFetchSuggestedQuestions:be,pageContexts:ye})})({isDataReady:g==="Completed"}),na({isDataReady:g==="Completed"}),p.jsxs(p.Fragment,{children:[g==="Completed"?p.jsx(ra,{analytics:P,onLoad:n=>n.trackPageLoaded(ia.Event.reports)}):null,p.jsx(ha,{isAppContentDrawerOpen:pe,handleDrawerToggle:x}),p.jsx(Ca,{firstMonthOfFY:ne,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:ce,selectedReportID:R,analytics:P,filter:b,isAccountingClassesEnabled:V,isAccountingProjectsEnabled:M,isCompareModeOn:le,hasTransactionAccess:de,signedInUser:c,selectedReportAndTimeframeFetchState:A,handleDrawerToggle:x,reportsResyncFetchState:ie.reportsResyncFetchState,isAiCfoAccessEnabled:ue&&me&&!e,onAskAiCfoClick:()=>{if(oe)if(u){const n=se(t.state?.pathnameStackToGoBack,t.pathname);a(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:n,referrer:"Reports"}})}else o(!0);else la({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:m,isReportsCommentingEnabled:B,initialOpenThreadRequest:re})]})}const S=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 za(){const e=d((s=>v(s))),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(E.isDebitCardFeatureEnabled),u=Ze(f,e),a=Je(e);return u===!0||a===!0?p.jsx(ma,{}):p.jsxs(Se,{children:[p.jsx(H,{path:"/",element:p.jsx(ga,{})}),p.jsx(H,{path:"*",element:p.jsx(fa,{})})]})}export{za as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-s55OcG-D.js";import{z as b,x as S,d as u,f as C,d7 as E,C as I,G as k}from"./index-
|
|
1
|
+
import{j as a}from"./liveblocks-s55OcG-D.js";import{z as b,x as S,d as u,f as C,d7 as E,C as I,G as k}from"./index-D7tfVykC.js";import"./mui-CggbPNN2.js";import g from"./NotFoundScreen-wlhddpbg.js";import{a as c}from"./sentry-qwy54zvC.js";import{u as D,j as h,h as F,g as L,n as T,o as U,p as d,N as y}from"./core-CnGMK-sC.js";import{eV as V,TD as j,TE as p,vL as _,fI as P,TF as G,vJ as z}from"./zeni-epic-state-NrbJoBOX.js";import"./recharts-CmLekiCG.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./utils-5Fz6z6US.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]="5020a069-44b3-4991-b4d2-3f283e63b5d1",e._sentryDebugIdIdentifier="sentry-dbid-5020a069-44b3-4991-b4d2-3f283e63b5d1")}catch{}})();const J=T((function(e,t){const n=j(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}}),(function(e,t){const{navigate:n}=t,i=b.getSignedInUser();return{onDismissClick:()=>{e(p()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((m=>{s.push(m.companyName),r.push(m.emailIds[0])})),u.trackInviteEmailClicked("send",s,r,s.length)}e(z())},onUpdateInviteFormLocalData:s=>{e(G({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&u.trackInviteEmailClicked("cancel")}}}))(E),R=()=>{const e=D(),[t,n]=c.useState(!1),[i,s]=c.useState(!1),r=h((o=>V(o))),m=F(),w=L(),f=b.getSignedInUser();if(f==null)throw Error("Can't access invite referral screen without signing in...");const l=h((o=>j(o))),x=f?.firstName!=null?f.firstName:"User";c.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(_()),s(!0))}),[]),c.useEffect((()=>{t||l.fetchState!=="Not-Started"||(n(!0),e(P(!0)))}),[l.fetchState,e]);const v=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[l.fetchState==="Completed"?a.jsx(S,{analytics:u,onLoad:o=>(N=>N.trackPageLoaded(C.Event.inviteEmailViewed))(o)}):null,a.jsx(J,{navigate:m,location:w,currentTenant:r,companyName:v,userName:x,inviteFormCompayData:l.localData})]})};function ne(){const{useFeatureGate:e}=I(),{isFeatureEnabled:t}=e(k.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(d,{path:"/",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(d,{path:"how-it-works",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(d,{path:"refer/*",element:t?a.jsx(R,{}):a.jsx(g,{})}),a.jsx(d,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-
|
|
2
|
-
import{_ as t,bn as ls,eV as us,fC as ds,fA as cs,gk as ms,fp as _s,cV as Ee,cB as hs,fS as ps,ct as Es,bE as Rs,bo as xs,fW as gs,v as Is,L_ as Ts,bs as js,L$ as As,bK as fs,bJ as ys,bt as Ds,cp as bs,M0 as Cs,M1 as vs,cR as Us,cU as ws,cT as Os,cA as Ps,cH as Fs,ob as Re,fy as xe,gu as Ls,f_ as ge,gr as Ie,gs as Te,f$ as ks}from"./zeni-epic-state-NrbJoBOX.js";import{j as e}from"./liveblocks-s55OcG-D.js";import{a as O}from"./sentry-qwy54zvC.js";import{u as Hs,h as Bs,i as Vs,g as Ss,j as G,l as je,N as u,o as Ns,p as a}from"./core-CnGMK-sC.js";import{y as Ms,u as Zs,z as y,C as Gs,c as $s,E as zs,G as $,i as Ws,J as Ys,T as qs,L as F,a as Ae,t as _,P as Js,d as X,l}from"./index-BWvweS0E.js";import"./mui-CggbPNN2.js";import{f as fe}from"./analyticsHelper-CixncN58.js";import{t as Ks}from"./getLocaleForTenant-C5b46Qyn.js";import"./recharts-CmLekiCG.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./utils-5Fz6z6US.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},j=new o.Error().stack;j&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[j]="aff9985c-a7f1-4d31-afb4-168a072d52b1",o._sentryDebugIdIdentifier="sentry-dbid-aff9985c-a7f1-4d31-afb4-168a072d52b1")}catch{}})();const Qs={dashboard:()=>t((()=>import("./DashboardRoutes-684orl8N.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:()=>t((()=>import("./BillPayRoutes-CXhgkFrh.js")),__vite__mapDeps([21,1,2,3,4,5,6,7,22,13,23,9,14,24,17,19,25,15,12,26,27,28,29,20])),reimbursement:()=>t((()=>import("./ReimbursementRoutes-DRMiWLSm.js")),__vite__mapDeps([30,1,2,3,4,5,6,7,13,25,17,15,12,26,19,9,14,24,31,28,29,20])),transactions:()=>t((()=>import("./TransactionListRoutes-BrzIlvyk.js")),__vite__mapDeps([32,1,2,3,4,5,6,7,8,9,10,11,12,33,20])),settings:()=>t((()=>import("./SettingsRoutes-D5DPlYhg.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,17,35,22,13,15,26,12,16,36,37,38,39,40,41,11,27,28,31,20])),reports:()=>t((()=>import("./ReportsRoutes-DnRmWO_g.js")),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,20])),chargeCards:()=>t((()=>import("./ChargeCardRoutes-DYWdITos.js")),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,25,13,15,12,26,14,44,22,20])),people:()=>t((()=>import("./PeopleRoutes-CmOZGcsk.js")),__vite__mapDeps([45,1,2,3,4,5,6,7,13,9,17,20])),expenseAutomation:()=>t((()=>import("./ExpenseAutomationRoutes-CB1lyxjv.js")),__vite__mapDeps([46,1,2,3,13,4,5,6,7,9,10,11,12,8,35,24,20])),treasury:()=>t((()=>import("./TreasuryRoutes-Dyw-ZAPa.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,13,25,17,15,12,26,9,14,48,19,20])),vendors:()=>t((()=>import("./VendorsRoutes-BWBUUjTt.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,22,13,19,12,50,9,17,24,35,20])),zeniAccounts:()=>t((()=>import("./ZeniAccountRoutes-3OROP5vK.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,48,13,25,17,15,12,26,19,23,22,9,33,20]))},Xs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},et=l((()=>t((()=>import("./ReportsRoutes-DnRmWO_g.js")),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,20])))),st=l((()=>t((()=>import("./AddressRoutes-oOQJC3Yo.js")),__vite__mapDeps([52,1,2,3,22,4,5,6,7,13,20])))),tt=l((()=>t((()=>import("./PeopleRoutes-CmOZGcsk.js")),__vite__mapDeps([45,1,2,3,4,5,6,7,13,9,17,20])))),nt=l((()=>t((()=>import("./PandLWithForecastRoutes-CxdNyFxC.js")),__vite__mapDeps([53,1,2,3,4,5,6,7,13,19,9,14,12,17,20])))),at=l((()=>t((()=>import("./CustomerOnboardingRoutes-D44ZNBEA.js")),__vite__mapDeps([54,1,2,3,22,4,5,6,7,13,37,38,39,40,41,11,36,44,20])))),ot=l((()=>t((()=>import("./VendorsRoutes-BWBUUjTt.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,22,13,19,12,50,9,17,24,35,20])))),rt=l((()=>t((()=>import("./TransactionDetailRoutes-C9ZhFLf5.js")),__vite__mapDeps([55,1,2,3,13,4,5,6,7,10,9,11,12,20])))),ye=l((()=>t((()=>import("./EntityDetailRoutes-CRNQJyjq.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,11,8,9,10,12,20])))),it=l((()=>t((()=>import("./DashboardRoutes-684orl8N.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])))),De=l((()=>t((()=>import("./BillPayRoutes-CXhgkFrh.js")),__vite__mapDeps([21,1,2,3,4,5,6,7,22,13,23,9,14,24,17,19,25,15,12,26,27,28,29,20])))),lt=l((()=>t((()=>import("./SettingsRoutes-D5DPlYhg.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,17,35,22,13,15,26,12,16,36,37,38,39,40,41,11,27,28,31,20])))),be=l((()=>t((()=>import("./ReimbursementRoutes-DRMiWLSm.js")),__vite__mapDeps([30,1,2,3,4,5,6,7,13,25,17,15,12,26,19,9,14,24,31,28,29,20])))),ut=l((()=>t((()=>import("./ZeniAccountRoutes-3OROP5vK.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,48,13,25,17,15,12,26,19,23,22,9,33,20])))),dt=l((()=>t((()=>import("./TreasuryRoutes-Dyw-ZAPa.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,13,25,17,15,12,26,9,14,48,19,20])))),ct=l((()=>t((()=>import("./TransactionListRoutes-BrzIlvyk.js")),__vite__mapDeps([32,1,2,3,4,5,6,7,8,9,10,11,12,33,20])))),mt=l((()=>t((()=>import("./ChargeCardRoutes-DYWdITos.js")),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,25,13,15,12,26,14,44,22,20])))),_t=l((()=>t((()=>import("./NotificationRoutes--6GU4tbu.js")),__vite__mapDeps([57,1,2,3,13,4,5,6,7,9,20])))),ht=l((()=>t((()=>import("./PerformanceRoutes-Bu3nN2tK.js")),__vite__mapDeps([58,1,2,3,13,4,5,6,7,9,17,20])))),pt=l((()=>t((()=>import("./ExpenseAutomationRoutes-CB1lyxjv.js")),__vite__mapDeps([46,1,2,3,13,4,5,6,7,9,10,11,12,8,35,24,20])))),Et=l((()=>t((()=>import("./RewardsRoutes-b9NXQyW4.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,13,20])))),Rt=l((()=>t((()=>import("./TaskRoutes-BAC-3C1s.js")),__vite__mapDeps([60,1,2,3,13,4,5,6,7,14,17,61,9,20])))),xt=l((()=>t((()=>import("./AiCfoScreen--Z8a2CnQ.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,18,50,20])))),Ce=l((()=>t((()=>import("./CardsAiCfoScreen-BfeQo7N4.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,20])))),b=l((()=>t((()=>import("./NotFoundScreen-Bge2JGwW.js")),__vite__mapDeps([13,1,2,3,4,5,6,7,20])))),gt=l((()=>t((()=>import("./TaskListScreen-BnrFj0CA.js")),__vite__mapDeps([61,1,2,3,4,5,6,7,9,17,20]))));function St({setTenantEmailDomain:o}){const j=Hs(),B=Bs(),{tenantEmailDomain:i}=Vs(),L=Ms().mode,{setLoading:U,clearAllLoading:C,clearLoading:k}=Zs(),v=y.getSignedInUserTenant(i)?.tenantId,I=y.getSignedInUser(),se=ls(I),z=Ss(),[V,Pe]=O.useState(!1),r=G((n=>us(n))),{useFeatureGate:N}=Gs(),M=$s(),te=zs(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ke}=N($.isChargeCardFeatureEnabled),{isFeatureEnabled:ne}=N($.isDebitCardFeatureEnabled),A=G((n=>n.tenantState.fetchState)),T=G((n=>n.tenantState.activeTenantFetchState.fetchState)),h=T==="Completed"||A==="Completed"?ds(ne,r):void 0,J=T==="Completed"||A==="Completed"?cs(r):void 0,He=Ws(r,ke,ne),{isCardsHidden:Be}=Ys(r?.tenantId),Ve=!He||!!Be,{isFeatureEnabled:Se}=N($.isSettingsFeatureEnabled),{isFeatureEnabled:K}=N($.isAiCfoFileUploadEnabled),W=G((n=>ms(n)));if(i!=null){const n=y.getSignedInUserTenant(i);I!=null&&n!=null&&fe(I,r,L)}const Z={tenantId:v,userId:I?.userId,sessionId:I?.zeniSessionId},ae=_s(),p=qs(),Ne=r.company==null||p?.loggedInUserRoleMap!=null&&Ee(p.loggedInUserRole),Me=hs(p?.loggedInUserRoleMap),oe=O.useRef(!0),re=je("/:tenantEmailDomain/onboarding/*")!==null,Q=je("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Ze=G((n=>Z.tenantId!=null?ps(n,Z.tenantId):void 0));O.useEffect((()=>{U(F.TENANT_FETCHING),o(i)}),[i]),O.useEffect((()=>{if(Q!=null&&v!=null){const n=Q.params.selectedPeriod;if(n!=null){const f=n.split("-");if(f.length===2){const d=Es(Number(f[0])),s=Number(f[1]),c=Rs(`01-${d<10?`0${d}`:d}-${s}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),S=xs();c.isAfter(S,"month")===!1?j(gs(v,{month:d,year:s})):B("./month_end_close_checks/review")}}}}),[Q,v]),O.useEffect((()=>{V||(Pe(!0),U(F.TENANT_FETCHING)),oe.current?oe.current=!1:!Is(ae,Z)&&y.isSignedIn()&&(U(F.TENANT_FETCHING),(function(n,f,d,s){if(xe(f?.userId,f?.zeniSessionId,n.tenantId),d(Ls(!0)),d(ge(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const c=y.getSignedInUserTenantWithId(n.tenantId);s&&Ae.updateAppLocaleID(Ks(s)),c?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(c?.tenantEmailDomain)}n.userId!=null?X.identify(n.userId,{tenant_id:n.tenantId}):X.resetUserIdentity()})(Z,I,j,Ze))}),[Z,ae,I,j,y]),O.useEffect((()=>{y.isSignedIn()&&(U(F.TENANT_FETCHING),(function(n,f,d,s,c,S,H){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const Y=s!=null&&c?.zeniSessionId!=null,os=d==null||d.tenantId!==s,rs=d!=null&&d.excludedResources==null,is=d!=null&&d.externalConnections==null;if(Y&&os){H(ge(s));const q=y.getSignedInUserTenantWithId(s);q?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(q?.tenantEmailDomain),xe(c?.userId,c?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),H(Ie(c.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),H(Te(c.userId,s)))}else Y&&rs&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),H(Ie(c.userId,s))),Y&&is&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),H(Te(c.userId,s)));if(Y){X.identify(c.userId,{tenant_id:s});const q=s==null||s!=null&&(f==="Completed"||f==="Error");n==="Completed"||f!=="Not-Started"&&f!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),S(F.TENANT_FETCHING),H(ks(c.userId,s,c.zeniSessionId))),q&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),H(Re(c.userId,c.zeniSessionId)))}})(A,T,r,v,I,U,j))}),[v,T]),O.useEffect((()=>{y.isSignedIn()&&A==="Completed"&&W.tenantsBaseInOrder.length>0&&(k(F.TENANT_FETCHING),y.saveSignedInUserTenants(Ts(W.tenantsBaseInOrder)),I!=null&&fe(I,r,L,void 0,W.tenantsBaseInOrder))}),[W,A,r,I]),O.useEffect((()=>{T==="In-Progress"&&U(F.TENANT_FETCHING),T!=="Completed"&&T!=="Error"||(T==="Completed"&&v!=null?(C(),_.markActiveTenantFetchCompleted(v)):T==="Error"&&v!=null&&(_.markActiveTenantFetchFailed(v),k(F.TENANT_FETCHING),k(F.TENANT_SWITCHING))),A!=="Completed"&&A!=="Error"||(A==="Completed"?_.markAllTenantsFetchCompleted():A==="Error"&&_.markAllTenantsFetchFailed())}),[T,A,v,V]);const ie=O.useRef(!1);O.useEffect((()=>{!ie.current&&T==="Completed"&&V&&(ie.current=!0,(function(n=Xs,f=3e3){setTimeout((()=>{const d=s=>{if(s>=n.length)return;const c=n[s],S=Qs[c];S!=null?S().then((()=>ee((()=>d(s+1))))).catch((()=>ee((()=>d(s+1))))):d(s+1)};ee((()=>d(0)))}),f)})())}),[T,V]);const w=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ge}=N($.isReferralFeatureEnabled),$e=r?.userRole!=null&&r.userRole.includes("charge_card_user"),ze=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),P=r?.userRole!=null&&Ee(r.userRole),le=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!w,ue=!Ve&&!w,We=As(p?.loggedInUserRoleMap),Ye=r.externalConnections?.accounting[0]?.isValid,de=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!w,me=ce&&fs(p?.loggedInUserRoleMap),_e=Fe&&!w,qe=Le&&!w,Je=le&&ys(p?.loggedInUserRoleMap),Ke=ue&&Ds(p?.loggedInUserRoleMap),Qe=_e&&bs(p?.loggedInUserRoleMap),Xe=Cs(p?.loggedInUserRoleMap),es=vs(p?.loggedInUserRoleMap),ss=Us(p?.loggedInUserRoleMap),ts=ws(p?.loggedInUserRoleMap),ns=Os(p?.loggedInUserRoleMap),E=Ps(p?.loggedInUserRoleMap),R=Fs(p?.loggedInUserRoleMap),he=le&&E,pe=ce&&R,x=_e&&ss,g=qe&&ts,m=ue&&ns,as=r.excludedResources?.resources?.find((n=>n.resource==="/invites"))!=null||Me===!0||We===!0||Xe===!0||es===!0;return y.isSignedIn()?v==null?A==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(I!=null&&A!=="In-Progress"&&j(Re(I.userId,I.zeniSessionId)),null):T!=="In-Progress"&&T!=="Not-Started"||A==="Completed"?(de===!0||se&&!re)&&Ye===!1&&h===!1&&J===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!V||de!==!1||re||se?V&&r?.userRole&&h!=null&&J!=null&&i!=null&&Object.keys(p.loggedInUserRoleMap).length>0?e.jsx(Ns,{children:e.jsxs(a,{element:e.jsx(Js,{}),children:[e.jsx(a,{path:"/",element:e.jsx(It,{isDashboardAccess:P,showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,isTenantCardsOnly:J,showChargeCardRoute:m})}),e.jsx(a,{path:"dashboard/*",element:P?e.jsx(it,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reports/*",element:P?e.jsx(et,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"people/*",element:as||P?e.jsx(tt,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"forecast/*",element:P?e.jsx(nt,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"onboarding/*",element:e.jsx(at,{})}),e.jsx(a,{path:"transaction/*",element:P&&w===!1||$e||ze?e.jsx(rt,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"transactions/*",element:P&&w===!1?e.jsx(ct,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"customer/*",element:P&&w===!1?e.jsx(ye,{entityType:"customer"}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,isTenantBankingOnly:h,showTreasuryRoute:g,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"vendor/*",element:P&&w===!1?e.jsx(ye,{entityType:"vendor"}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"tasks",element:e.jsx(gt,{})}),e.jsx(a,{path:"tasks/*",element:e.jsx(Rt,{})}),e.jsx(a,{path:"address/*",element:Je||me||Qe||Ke?e.jsx(st,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"checking/*",element:x?e.jsx(ut,{}):e.jsx(b,{})}),e.jsx(a,{path:"treasury/*",element:g?e.jsx(dt,{}):e.jsx(b,{})}),e.jsx(a,{path:"performance",element:te===!0?e.jsx(ht,{}):e.jsx(Oe,{tenantEmailDomain:i})}),e.jsx(a,{path:"month_end_close_checks/review/*",element:te===!0&&w===!1?e.jsx(pt,{}):e.jsx(Oe,{tenantEmailDomain:i})}),e.jsx(a,{path:"notifications/*",element:e.jsx(_t,{})}),e.jsx(a,{path:"vendors/*",element:Ne?e.jsx(ot,{}):e.jsx(b,{})}),e.jsx(a,{path:"bill/*",element:he?e.jsx(De,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"bills/*",element:he?e.jsx(De,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursement/*",element:pe?e.jsx(be,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursements/*",element:pe?e.jsx(be,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"settings/*",element:Se?e.jsx(lt,{hasAdminLevelAccess:me}):e.jsx(b,{})}),e.jsx(a,{path:"cards/ask",element:m&&M?e.jsx(Ce,{isFileUploadEnabled:K}):e.jsx(b,{})}),e.jsx(a,{path:"cards/ask/:session_id",element:m&&M?e.jsx(Ce,{isFileUploadEnabled:K}):e.jsx(b,{})}),e.jsx(a,{path:"cards/*",element:m?e.jsx(mt,{}):e.jsx(b,{})}),e.jsx(a,{path:"rewards/*",element:Ge?e.jsx(Et,{}):e.jsx(b,{})}),e.jsx(a,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(a,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(a,{path:"/ai-cfo/:session_id",element:M?e.jsx(xt,{isFileUploadEnabled:K}):e.jsx(b,{})}),e.jsx(a,{path:"*",element:e.jsx(b,{})})]})}):null:(o(void 0),e.jsx(u,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}const It=({isDashboardAccess:o,showZeniAccountRoute:j,isUserHasBillPayAccess:B,isUserHasReimbursementAccess:i,showTreasuryRoute:L,isTenantBankingOnly:U,isTenantCardsOnly:C,showChargeCardRoute:k})=>{if(U===!0){if(j)return e.jsx(u,{to:"checking"});if(L)return e.jsx(u,{to:"treasury"});if(k)return e.jsx(u,{to:"cards"})}return C===!0&&k?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):j?e.jsx(u,{to:"checking"}):L?e.jsx(u,{to:"treasury"}):k?e.jsx(u,{to:"cards"}):B?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},D=({showZeniAccountRoute:o,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:B,showTreasuryRoute:i,isTenantBankingOnly:L,showChargeCardRoute:U,tenantEmailDomain:C})=>{if(L===!0){if(o)return e.jsx(Ue,{tenantEmailDomain:C});if(i)return e.jsx(ve,{tenantEmailDomain:C});if(U)return e.jsx(we,{tenantEmailDomain:C})}return o?e.jsx(Ue,{tenantEmailDomain:C}):i?e.jsx(ve,{tenantEmailDomain:C}):U?e.jsx(we,{tenantEmailDomain:C}):j?e.jsx(jt,{tenantEmailDomain:C}):B?e.jsx(Tt,{tenantEmailDomain:C}):e.jsx(b,{})},Tt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),jt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),ve=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),Ue=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),we=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),Oe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`});export{D as FallBackRoute,St as default};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-D_SbIh49.js","assets/sentry-qwy54zvC.js","assets/core-CnGMK-sC.js","assets/zeni-epic-state-NrbJoBOX.js","assets/index-D7tfVykC.js","assets/mui-CggbPNN2.js","assets/analytics-DhULAPA0.js","assets/utils-5Fz6z6US.js","assets/withTransactionSidePanel-ZQvLeKiY.js","assets/useAskAiCfoHostNavButtonProps-Bl-nKTXG.js","assets/TransactionDetailScreen-DRzSksYw.js","assets/decodeURIComponentSafe-uWfgYCNH.js","assets/routePaths-CVAI7AUa.js","assets/NotFoundScreen-wlhddpbg.js","assets/useInitialThreadRequest-CXnpfTcs.js","assets/analyticsHelper-CbsMOq15.js","assets/CompanyPassportScreen-COm4H_kf.js","assets/MobileAppDrawer-NdU6zrS3.js","assets/useAiCfoDashboardSuggestedQuestionsChips-DwtRgARG.js","assets/FeaturePreviewScreen-Di3PuVRR.js","assets/index-Czu7h9lW.css","assets/BillPayRoutes-U0Aszwdv.js","assets/AddressScreen-Dzf83tSk.js","assets/DomesticWireDetailScreen-BKpkRMty.js","assets/DrawerScreen-BPgZ_1JF.js","assets/SetupPagesScreen-HhCCJlo-.js","assets/BusinessVerificationPageScreen-B4os1LkS.js","assets/BillPayApprovalRoutes-iPPwT0JG.js","assets/ReimbursementApprovalRuleDetailScreen-w7TPHMbb.js","assets/getLocaleForTenant-BuGWeb9s.js","assets/ReimbursementRoutes-uHKvr9EG.js","assets/ReimbursementApprovalRoutes-DfMng3xh.js","assets/TransactionListRoutes-B191v9kk.js","assets/ZeniAccountStatementScreen-DJU3198J.js","assets/SettingsRoutes-BmbweE5j.js","assets/accountMappingHelper-SWFIL59M.js","assets/useEmailConnectResultRefresh-gsc6JcZn.js","assets/QBOConnectionScreen-D9vGR9Iz.js","assets/empty-AGnm4bIq.js","assets/index-b64yysEr.js","assets/url-CF9Fx3Jk.js","assets/index-CUaM5Y1I.js","assets/ReportsRoutes-BosLV3TS.js","assets/ChargeCardRoutes-rxetskAF.js","assets/useChargeCardPusherEvents-Cg9Qn_oP.js","assets/PeopleRoutes-0fm-JoER.js","assets/ExpenseAutomationRoutes-CN3ihdCO.js","assets/TreasuryRoutes-DZNZaxYZ.js","assets/useCashManagementBanner-SbCmMLis.js","assets/VendorsRoutes-CvrHlc-r.js","assets/pathToGoBack-DpxbYxCk.js","assets/ZeniAccountRoutes-YPhOuFwx.js","assets/AddressRoutes-DGCDOoKb.js","assets/PandLWithForecastRoutes-BoM4q2mR.js","assets/CustomerOnboardingRoutes-Id7ixv-a.js","assets/TransactionDetailRoutes-Ct4erWuE.js","assets/EntityDetailRoutes-BZ9Mr897.js","assets/NotificationRoutes-DbRksc78.js","assets/PerformanceRoutes-Cq8pT07f.js","assets/RewardsRoutes-BPVfq5Np.js","assets/TaskRoutes-CyLfJ8Tw.js","assets/TaskListScreen-B7M-Cqce.js","assets/AiCfoScreen-TZ---AU4.js","assets/CardsAiCfoScreen-Db20Cfsg.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as t,bn as ls,eV as us,fC as ds,fA as cs,gk as ms,fp as _s,cV as Ee,cB as hs,fS as ps,ct as Es,bE as Rs,bo as xs,fW as gs,v as Is,L_ as Ts,bs as js,L$ as As,bK as fs,bJ as ys,bt as Ds,cp as bs,M0 as Cs,M1 as vs,cR as Us,cU as ws,cT as Os,cA as Ps,cH as Fs,ob as Re,fy as xe,gu as Ls,f_ as ge,gr as Ie,gs as Te,f$ as ks}from"./zeni-epic-state-NrbJoBOX.js";import{j as e}from"./liveblocks-s55OcG-D.js";import{a as O}from"./sentry-qwy54zvC.js";import{u as Hs,h as Bs,i as Vs,g as Ss,j as G,l as je,N as u,o as Ns,p as a}from"./core-CnGMK-sC.js";import{y as Ms,u as Zs,z as y,C as Gs,c as $s,E as zs,G as $,i as Ws,J as Ys,T as qs,L as F,a as Ae,t as _,P as Js,d as X,l}from"./index-D7tfVykC.js";import"./mui-CggbPNN2.js";import{f as fe}from"./analyticsHelper-CbsMOq15.js";import{t as Ks}from"./getLocaleForTenant-BuGWeb9s.js";import"./recharts-CmLekiCG.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./utils-5Fz6z6US.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},j=new o.Error().stack;j&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[j]="aff9985c-a7f1-4d31-afb4-168a072d52b1",o._sentryDebugIdIdentifier="sentry-dbid-aff9985c-a7f1-4d31-afb4-168a072d52b1")}catch{}})();const Qs={dashboard:()=>t((()=>import("./DashboardRoutes-D_SbIh49.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:()=>t((()=>import("./BillPayRoutes-U0Aszwdv.js")),__vite__mapDeps([21,1,2,3,4,5,6,7,22,13,23,9,14,24,17,19,25,15,12,26,27,28,29,20])),reimbursement:()=>t((()=>import("./ReimbursementRoutes-uHKvr9EG.js")),__vite__mapDeps([30,1,2,3,4,5,6,7,13,25,17,15,12,26,19,9,14,24,31,28,29,20])),transactions:()=>t((()=>import("./TransactionListRoutes-B191v9kk.js")),__vite__mapDeps([32,1,2,3,4,5,6,7,8,9,10,11,12,33,20])),settings:()=>t((()=>import("./SettingsRoutes-BmbweE5j.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,17,35,22,13,15,26,12,16,36,37,38,39,40,41,11,27,28,31,20])),reports:()=>t((()=>import("./ReportsRoutes-BosLV3TS.js")),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,20])),chargeCards:()=>t((()=>import("./ChargeCardRoutes-rxetskAF.js")),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,25,13,15,12,26,14,44,22,20])),people:()=>t((()=>import("./PeopleRoutes-0fm-JoER.js")),__vite__mapDeps([45,1,2,3,4,5,6,7,13,9,17,20])),expenseAutomation:()=>t((()=>import("./ExpenseAutomationRoutes-CN3ihdCO.js")),__vite__mapDeps([46,1,2,3,13,4,5,6,7,9,10,11,12,8,35,24,20])),treasury:()=>t((()=>import("./TreasuryRoutes-DZNZaxYZ.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,13,25,17,15,12,26,9,14,48,19,20])),vendors:()=>t((()=>import("./VendorsRoutes-CvrHlc-r.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,22,13,19,12,50,9,17,24,35,20])),zeniAccounts:()=>t((()=>import("./ZeniAccountRoutes-YPhOuFwx.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,48,13,25,17,15,12,26,19,23,22,9,33,20]))},Xs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ee=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},et=l((()=>t((()=>import("./ReportsRoutes-BosLV3TS.js")),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,20])))),st=l((()=>t((()=>import("./AddressRoutes-DGCDOoKb.js")),__vite__mapDeps([52,1,2,3,22,4,5,6,7,13,20])))),tt=l((()=>t((()=>import("./PeopleRoutes-0fm-JoER.js")),__vite__mapDeps([45,1,2,3,4,5,6,7,13,9,17,20])))),nt=l((()=>t((()=>import("./PandLWithForecastRoutes-BoM4q2mR.js")),__vite__mapDeps([53,1,2,3,4,5,6,7,13,19,9,14,12,17,20])))),at=l((()=>t((()=>import("./CustomerOnboardingRoutes-Id7ixv-a.js")),__vite__mapDeps([54,1,2,3,22,4,5,6,7,13,37,38,39,40,41,11,36,44,20])))),ot=l((()=>t((()=>import("./VendorsRoutes-CvrHlc-r.js")),__vite__mapDeps([49,1,2,3,4,5,6,7,22,13,19,12,50,9,17,24,35,20])))),rt=l((()=>t((()=>import("./TransactionDetailRoutes-Ct4erWuE.js")),__vite__mapDeps([55,1,2,3,13,4,5,6,7,10,9,11,12,20])))),ye=l((()=>t((()=>import("./EntityDetailRoutes-BZ9Mr897.js")),__vite__mapDeps([56,1,2,3,4,5,6,7,11,8,9,10,12,20])))),it=l((()=>t((()=>import("./DashboardRoutes-D_SbIh49.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20])))),De=l((()=>t((()=>import("./BillPayRoutes-U0Aszwdv.js")),__vite__mapDeps([21,1,2,3,4,5,6,7,22,13,23,9,14,24,17,19,25,15,12,26,27,28,29,20])))),lt=l((()=>t((()=>import("./SettingsRoutes-BmbweE5j.js")),__vite__mapDeps([34,1,2,3,4,5,6,7,17,35,22,13,15,26,12,16,36,37,38,39,40,41,11,27,28,31,20])))),be=l((()=>t((()=>import("./ReimbursementRoutes-uHKvr9EG.js")),__vite__mapDeps([30,1,2,3,4,5,6,7,13,25,17,15,12,26,19,9,14,24,31,28,29,20])))),ut=l((()=>t((()=>import("./ZeniAccountRoutes-YPhOuFwx.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,48,13,25,17,15,12,26,19,23,22,9,33,20])))),dt=l((()=>t((()=>import("./TreasuryRoutes-DZNZaxYZ.js")),__vite__mapDeps([47,1,2,3,4,5,6,7,13,25,17,15,12,26,9,14,48,19,20])))),ct=l((()=>t((()=>import("./TransactionListRoutes-B191v9kk.js")),__vite__mapDeps([32,1,2,3,4,5,6,7,8,9,10,11,12,33,20])))),mt=l((()=>t((()=>import("./ChargeCardRoutes-rxetskAF.js")),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,25,13,15,12,26,14,44,22,20])))),_t=l((()=>t((()=>import("./NotificationRoutes-DbRksc78.js")),__vite__mapDeps([57,1,2,3,13,4,5,6,7,9,20])))),ht=l((()=>t((()=>import("./PerformanceRoutes-Cq8pT07f.js")),__vite__mapDeps([58,1,2,3,13,4,5,6,7,9,17,20])))),pt=l((()=>t((()=>import("./ExpenseAutomationRoutes-CN3ihdCO.js")),__vite__mapDeps([46,1,2,3,13,4,5,6,7,9,10,11,12,8,35,24,20])))),Et=l((()=>t((()=>import("./RewardsRoutes-BPVfq5Np.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,13,20])))),Rt=l((()=>t((()=>import("./TaskRoutes-CyLfJ8Tw.js")),__vite__mapDeps([60,1,2,3,13,4,5,6,7,14,17,61,9,20])))),xt=l((()=>t((()=>import("./AiCfoScreen-TZ---AU4.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,18,50,20])))),Ce=l((()=>t((()=>import("./CardsAiCfoScreen-Db20Cfsg.js")),__vite__mapDeps([63,1,2,3,4,5,6,7,20])))),b=l((()=>t((()=>import("./NotFoundScreen-wlhddpbg.js")),__vite__mapDeps([13,1,2,3,4,5,6,7,20])))),gt=l((()=>t((()=>import("./TaskListScreen-B7M-Cqce.js")),__vite__mapDeps([61,1,2,3,4,5,6,7,9,17,20]))));function St({setTenantEmailDomain:o}){const j=Hs(),B=Bs(),{tenantEmailDomain:i}=Vs(),L=Ms().mode,{setLoading:U,clearAllLoading:C,clearLoading:k}=Zs(),v=y.getSignedInUserTenant(i)?.tenantId,I=y.getSignedInUser(),se=ls(I),z=Ss(),[V,Pe]=O.useState(!1),r=G((n=>us(n))),{useFeatureGate:N}=Gs(),M=$s(),te=zs(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Le=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ke}=N($.isChargeCardFeatureEnabled),{isFeatureEnabled:ne}=N($.isDebitCardFeatureEnabled),A=G((n=>n.tenantState.fetchState)),T=G((n=>n.tenantState.activeTenantFetchState.fetchState)),h=T==="Completed"||A==="Completed"?ds(ne,r):void 0,J=T==="Completed"||A==="Completed"?cs(r):void 0,He=Ws(r,ke,ne),{isCardsHidden:Be}=Ys(r?.tenantId),Ve=!He||!!Be,{isFeatureEnabled:Se}=N($.isSettingsFeatureEnabled),{isFeatureEnabled:K}=N($.isAiCfoFileUploadEnabled),W=G((n=>ms(n)));if(i!=null){const n=y.getSignedInUserTenant(i);I!=null&&n!=null&&fe(I,r,L)}const Z={tenantId:v,userId:I?.userId,sessionId:I?.zeniSessionId},ae=_s(),p=qs(),Ne=r.company==null||p?.loggedInUserRoleMap!=null&&Ee(p.loggedInUserRole),Me=hs(p?.loggedInUserRoleMap),oe=O.useRef(!0),re=je("/:tenantEmailDomain/onboarding/*")!==null,Q=je("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),Ze=G((n=>Z.tenantId!=null?ps(n,Z.tenantId):void 0));O.useEffect((()=>{U(F.TENANT_FETCHING),o(i)}),[i]),O.useEffect((()=>{if(Q!=null&&v!=null){const n=Q.params.selectedPeriod;if(n!=null){const f=n.split("-");if(f.length===2){const d=Es(Number(f[0])),s=Number(f[1]),c=Rs(`01-${d<10?`0${d}`:d}-${s}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),S=xs();c.isAfter(S,"month")===!1?j(gs(v,{month:d,year:s})):B("./month_end_close_checks/review")}}}}),[Q,v]),O.useEffect((()=>{V||(Pe(!0),U(F.TENANT_FETCHING)),oe.current?oe.current=!1:!Is(ae,Z)&&y.isSignedIn()&&(U(F.TENANT_FETCHING),(function(n,f,d,s){if(xe(f?.userId,f?.zeniSessionId,n.tenantId),d(Ls(!0)),d(ge(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const c=y.getSignedInUserTenantWithId(n.tenantId);s&&Ae.updateAppLocaleID(Ks(s)),c?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(c?.tenantEmailDomain)}n.userId!=null?X.identify(n.userId,{tenant_id:n.tenantId}):X.resetUserIdentity()})(Z,I,j,Ze))}),[Z,ae,I,j,y]),O.useEffect((()=>{y.isSignedIn()&&(U(F.TENANT_FETCHING),(function(n,f,d,s,c,S,H){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const Y=s!=null&&c?.zeniSessionId!=null,os=d==null||d.tenantId!==s,rs=d!=null&&d.excludedResources==null,is=d!=null&&d.externalConnections==null;if(Y&&os){H(ge(s));const q=y.getSignedInUserTenantWithId(s);q?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(q?.tenantEmailDomain),xe(c?.userId,c?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),H(Ie(c.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),H(Te(c.userId,s)))}else Y&&rs&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),H(Ie(c.userId,s))),Y&&is&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),H(Te(c.userId,s)));if(Y){X.identify(c.userId,{tenant_id:s});const q=s==null||s!=null&&(f==="Completed"||f==="Error");n==="Completed"||f!=="Not-Started"&&f!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),S(F.TENANT_FETCHING),H(ks(c.userId,s,c.zeniSessionId))),q&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),H(Re(c.userId,c.zeniSessionId)))}})(A,T,r,v,I,U,j))}),[v,T]),O.useEffect((()=>{y.isSignedIn()&&A==="Completed"&&W.tenantsBaseInOrder.length>0&&(k(F.TENANT_FETCHING),y.saveSignedInUserTenants(Ts(W.tenantsBaseInOrder)),I!=null&&fe(I,r,L,void 0,W.tenantsBaseInOrder))}),[W,A,r,I]),O.useEffect((()=>{T==="In-Progress"&&U(F.TENANT_FETCHING),T!=="Completed"&&T!=="Error"||(T==="Completed"&&v!=null?(C(),_.markActiveTenantFetchCompleted(v)):T==="Error"&&v!=null&&(_.markActiveTenantFetchFailed(v),k(F.TENANT_FETCHING),k(F.TENANT_SWITCHING))),A!=="Completed"&&A!=="Error"||(A==="Completed"?_.markAllTenantsFetchCompleted():A==="Error"&&_.markAllTenantsFetchFailed())}),[T,A,v,V]);const ie=O.useRef(!1);O.useEffect((()=>{!ie.current&&T==="Completed"&&V&&(ie.current=!0,(function(n=Xs,f=3e3){setTimeout((()=>{const d=s=>{if(s>=n.length)return;const c=n[s],S=Qs[c];S!=null?S().then((()=>ee((()=>d(s+1))))).catch((()=>ee((()=>d(s+1))))):d(s+1)};ee((()=>d(0)))}),f)})())}),[T,V]);const w=r?.userRole!=null&&js(r?.userRole),{isFeatureEnabled:Ge}=N($.isReferralFeatureEnabled),$e=r?.userRole!=null&&r.userRole.includes("charge_card_user"),ze=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),P=r?.userRole!=null&&Ee(r.userRole),le=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!w,ue=!Ve&&!w,We=As(p?.loggedInUserRoleMap),Ye=r.externalConnections?.accounting[0]?.isValid,de=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!w,me=ce&&fs(p?.loggedInUserRoleMap),_e=Fe&&!w,qe=Le&&!w,Je=le&&ys(p?.loggedInUserRoleMap),Ke=ue&&Ds(p?.loggedInUserRoleMap),Qe=_e&&bs(p?.loggedInUserRoleMap),Xe=Cs(p?.loggedInUserRoleMap),es=vs(p?.loggedInUserRoleMap),ss=Us(p?.loggedInUserRoleMap),ts=ws(p?.loggedInUserRoleMap),ns=Os(p?.loggedInUserRoleMap),E=Ps(p?.loggedInUserRoleMap),R=Fs(p?.loggedInUserRoleMap),he=le&&E,pe=ce&&R,x=_e&&ss,g=qe&&ts,m=ue&&ns,as=r.excludedResources?.resources?.find((n=>n.resource==="/invites"))!=null||Me===!0||We===!0||Xe===!0||es===!0;return y.isSignedIn()?v==null?A==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(I!=null&&A!=="In-Progress"&&j(Re(I.userId,I.zeniSessionId)),null):T!=="In-Progress"&&T!=="Not-Started"||A==="Completed"?(de===!0||se&&!re)&&Ye===!1&&h===!1&&J===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!V||de!==!1||re||se?V&&r?.userRole&&h!=null&&J!=null&&i!=null&&Object.keys(p.loggedInUserRoleMap).length>0?e.jsx(Ns,{children:e.jsxs(a,{element:e.jsx(Js,{}),children:[e.jsx(a,{path:"/",element:e.jsx(It,{isDashboardAccess:P,showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,isTenantCardsOnly:J,showChargeCardRoute:m})}),e.jsx(a,{path:"dashboard/*",element:P?e.jsx(it,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reports/*",element:P?e.jsx(et,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"people/*",element:as||P?e.jsx(tt,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"forecast/*",element:P?e.jsx(nt,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"onboarding/*",element:e.jsx(at,{})}),e.jsx(a,{path:"transaction/*",element:P&&w===!1||$e||ze?e.jsx(rt,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"transactions/*",element:P&&w===!1?e.jsx(ct,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"customer/*",element:P&&w===!1?e.jsx(ye,{entityType:"customer"}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,isTenantBankingOnly:h,showTreasuryRoute:g,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"vendor/*",element:P&&w===!1?e.jsx(ye,{entityType:"vendor"}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"tasks",element:e.jsx(gt,{})}),e.jsx(a,{path:"tasks/*",element:e.jsx(Rt,{})}),e.jsx(a,{path:"address/*",element:Je||me||Qe||Ke?e.jsx(st,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"checking/*",element:x?e.jsx(ut,{}):e.jsx(b,{})}),e.jsx(a,{path:"treasury/*",element:g?e.jsx(dt,{}):e.jsx(b,{})}),e.jsx(a,{path:"performance",element:te===!0?e.jsx(ht,{}):e.jsx(Oe,{tenantEmailDomain:i})}),e.jsx(a,{path:"month_end_close_checks/review/*",element:te===!0&&w===!1?e.jsx(pt,{}):e.jsx(Oe,{tenantEmailDomain:i})}),e.jsx(a,{path:"notifications/*",element:e.jsx(_t,{})}),e.jsx(a,{path:"vendors/*",element:Ne?e.jsx(ot,{}):e.jsx(b,{})}),e.jsx(a,{path:"bill/*",element:he?e.jsx(De,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"bills/*",element:he?e.jsx(De,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursement/*",element:pe?e.jsx(be,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"reimbursements/*",element:pe?e.jsx(be,{}):e.jsx(D,{showZeniAccountRoute:x,isUserHasBillPayAccess:E,isUserHasReimbursementAccess:R,showTreasuryRoute:g,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(a,{path:"settings/*",element:Se?e.jsx(lt,{hasAdminLevelAccess:me}):e.jsx(b,{})}),e.jsx(a,{path:"cards/ask",element:m&&M?e.jsx(Ce,{isFileUploadEnabled:K}):e.jsx(b,{})}),e.jsx(a,{path:"cards/ask/:session_id",element:m&&M?e.jsx(Ce,{isFileUploadEnabled:K}):e.jsx(b,{})}),e.jsx(a,{path:"cards/*",element:m?e.jsx(mt,{}):e.jsx(b,{})}),e.jsx(a,{path:"rewards/*",element:Ge?e.jsx(Et,{}):e.jsx(b,{})}),e.jsx(a,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(a,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(b,{})}),e.jsx(a,{path:"/ai-cfo/:session_id",element:M?e.jsx(xt,{isFileUploadEnabled:K}):e.jsx(b,{})}),e.jsx(a,{path:"*",element:e.jsx(b,{})})]})}):null:(o(void 0),e.jsx(u,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}const It=({isDashboardAccess:o,showZeniAccountRoute:j,isUserHasBillPayAccess:B,isUserHasReimbursementAccess:i,showTreasuryRoute:L,isTenantBankingOnly:U,isTenantCardsOnly:C,showChargeCardRoute:k})=>{if(U===!0){if(j)return e.jsx(u,{to:"checking"});if(L)return e.jsx(u,{to:"treasury"});if(k)return e.jsx(u,{to:"cards"})}return C===!0&&k?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):j?e.jsx(u,{to:"checking"}):L?e.jsx(u,{to:"treasury"}):k?e.jsx(u,{to:"cards"}):B?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},D=({showZeniAccountRoute:o,isUserHasBillPayAccess:j,isUserHasReimbursementAccess:B,showTreasuryRoute:i,isTenantBankingOnly:L,showChargeCardRoute:U,tenantEmailDomain:C})=>{if(L===!0){if(o)return e.jsx(Ue,{tenantEmailDomain:C});if(i)return e.jsx(ve,{tenantEmailDomain:C});if(U)return e.jsx(we,{tenantEmailDomain:C})}return o?e.jsx(Ue,{tenantEmailDomain:C}):i?e.jsx(ve,{tenantEmailDomain:C}):U?e.jsx(we,{tenantEmailDomain:C}):j?e.jsx(jt,{tenantEmailDomain:C}):B?e.jsx(Tt,{tenantEmailDomain:C}):e.jsx(b,{})},Tt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),jt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),ve=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),Ue=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),we=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),Oe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`});export{D as FallBackRoute,St as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-s55OcG-D.js";import{a as u}from"./sentry-qwy54zvC.js";import{h as L,g as Q,u as U,j as S,s as le,n as Z,i as G,o as ne,p as v}from"./core-CnGMK-sC.js";import{bn as De,eV as P,gp as Me,n1 as re,Oj as Te,hF as he,Oa as Ue,qT as _e,kz as be,mZ as Fe,hH as Re,Oc as Be,Ob as Oe,Qz as Ve,zm as ze,EP as Le,Q8 as Ne,Qh as $e,c6 as ae,cM as Qe,cN as Ze,bs as Ge,Mb as He,xO as Ke,QA as Je,He as qe,Ev as Ye,Em as Se,Ej as We,xS as ye,Ep as Ce,Es as Ie,Ey as oe,uc as se,xR as Xe,kb as Y,ke as Ae,QB as en,lf as nn,y5 as tn,N2 as an,N3 as on,k9 as sn,QC as cn,kc as ln,rl as rn,MZ as dn,M_ as un,rp as pn,hq as gn,Mj as ee,hi as de,hf as mn,hn as fn,Mk as hn,y2 as bn,QD as Sn,QE as yn,EM as Cn,fA as Ee,fC as xe,QF as In,gd as An,Mt as En,y1 as ue,gi as pe,gh as xn,y0 as vn,gg as kn,gf as wn,QG as jn,fF as ve,QH as Pn,QI as Dn,y8 as Mn,x$ as ge,QJ as Tn,fV as Un,xY as _n,bZ as Fn,c5 as Rn,c4 as Bn,b_ as On,c2 as Vn,c1 as zn,c0 as Ln,c3 as Nn,b$ as $n}from"./zeni-epic-state-NrbJoBOX.js";import{C as W,G as O,z as w,ag as ke,bR as Qn,d as H,f as Zn,bC as Gn,T as K,B as ie,bS as Hn,i as we,J as je,bT as Kn,ar as Jn,j as Pe,bU as qn,bV as Yn,bW as Wn,_ as Xn,bX as et,v as nt,bY as tt}from"./index-
|
|
1
|
+
import{j as o}from"./liveblocks-s55OcG-D.js";import{a as u}from"./sentry-qwy54zvC.js";import{h as L,g as Q,u as U,j as S,s as le,n as Z,i as G,o as ne,p as v}from"./core-CnGMK-sC.js";import{bn as De,eV as P,gp as Me,n1 as re,Oj as Te,hF as he,Oa as Ue,qT as _e,kz as be,mZ as Fe,hH as Re,Oc as Be,Ob as Oe,Qz as Ve,zm as ze,EP as Le,Q8 as Ne,Qh as $e,c6 as ae,cM as Qe,cN as Ze,bs as Ge,Mb as He,xO as Ke,QA as Je,He as qe,Ev as Ye,Em as Se,Ej as We,xS as ye,Ep as Ce,Es as Ie,Ey as oe,uc as se,xR as Xe,kb as Y,ke as Ae,QB as en,lf as nn,y5 as tn,N2 as an,N3 as on,k9 as sn,QC as cn,kc as ln,rl as rn,MZ as dn,M_ as un,rp as pn,hq as gn,Mj as ee,hi as de,hf as mn,hn as fn,Mk as hn,y2 as bn,QD as Sn,QE as yn,EM as Cn,fA as Ee,fC as xe,QF as In,gd as An,Mt as En,y1 as ue,gi as pe,gh as xn,y0 as vn,gg as kn,gf as wn,QG as jn,fF as ve,QH as Pn,QI as Dn,y8 as Mn,x$ as ge,QJ as Tn,fV as Un,xY as _n,bZ as Fn,c5 as Rn,c4 as Bn,b_ as On,c2 as Vn,c1 as zn,c0 as Ln,c3 as Nn,b$ as $n}from"./zeni-epic-state-NrbJoBOX.js";import{C as W,G as O,z as w,ag as ke,bR as Qn,d as H,f as Zn,bC as Gn,T as K,B as ie,bS as Hn,i as we,J as je,bT as Kn,ar as Jn,j as Pe,bU as qn,bV as Yn,bW as Wn,_ as Xn,bX as et,v as nt,bY as tt}from"./index-D7tfVykC.js";import{n as V}from"./mui-CggbPNN2.js";import{M as R}from"./MobileAppDrawer-NdU6zrS3.js";import{a as J,g as q,m as at}from"./accountMappingHelper-SWFIL59M.js";import{t as ot,A as st}from"./AddressScreen-Dzf83tSk.js";import $ from"./NotFoundScreen-wlhddpbg.js";import{g as it}from"./analyticsHelper-CbsMOq15.js";import{B as ct}from"./BusinessVerificationPageScreen-B4os1LkS.js";import{C as lt}from"./CompanyPassportScreen-COm4H_kf.js";import{u as rt,a as dt}from"./useEmailConnectResultRefresh-gsc6JcZn.js";import{q as me}from"./QBOConnectionScreen-D9vGR9Iz.js";import{B as ut}from"./BillPayApprovalRoutes-iPPwT0JG.js";import{R as pt}from"./ReimbursementApprovalRoutes-DfMng3xh.js";import"./recharts-CmLekiCG.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./utils-5Fz6z6US.js";import"./routePaths-CVAI7AUa.js";import"./empty-AGnm4bIq.js";import"./pdf-lib-BzRjr6sI.js";import"./index-b64yysEr.js";import"./url-CF9Fx3Jk.js";import"./index-CUaM5Y1I.js";import"./decodeURIComponentSafe-uWfgYCNH.js";import"./ReimbursementApprovalRuleDetailScreen-w7TPHMbb.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]="1874f541-d231-40d4-b337-f763cd4b8401",e._sentryDebugIdIdentifier="sentry-dbid-1874f541-d231-40d4-b337-f763cd4b8401")}catch{}})();const gt=V.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-s55OcG-D.js";import{h as X,g as ee,u as ne,i as G,j as P,N as x,n as W,t as en}from"./core-CnGMK-sC.js";import{bJ as nn,cp as Ce,PY as ye,eV as V,cB as tn,zC as Q,zm as an,Q8 as sn,Qb as on,rE as te,rs as ae,l7 as ie,tK as z,Qd as Ie,gh as $e,gg as Ge,gf as We,Qe as cn,zL as rn,Ev as Ae,Em as ke,Ej as _e,E1 as J,Ep as ve,Es as Ee,Ey as Pe,uc as Te,gw as un,cw as dn,fC as ln,fA as pn,fB as mn,bt as yn,Qf as fn,D1 as le,DF as gn,Qg as bn,bK as Sn,FO as pe,EP as hn,Qh as Cn,Qi as In,FS as An,FW as kn,tD as _n,Kk as vn,Gr as he,Hr as me,Qj as En,Qk as Pn,Ql as Tn,Qm as He,Qn as wn,MN as Dn,Po as Un,N0 as On,Qo as Ke,E5 as Fn,N1 as Vn,E9 as Bn,Qp as Oe,GN as qe,lf as xn,rv as Je,tM as jn,bE as Re,tY as Ne,cz as Rn,Qq as Ye,fU as Nn,G9 as zn,Gd as Ln,Qr as Mn,Gu as ze,Qs as Zn,Qt as Qn,Qu as $n,Qv as Gn,gp as Wn,AW as Hn,Qw as Kn,A$ as qn,A_ as Jn}from"./zeni-epic-state-NrbJoBOX.js";import{T as se,C as oe,G as q,y as we,aS as Y,bC as Xe,z as U,x as ce,d as O,B as De,f as $,bD as Yn,au as re,bE as B,bF as Xn,bG as et,ag as xe,bH as nt,v as Le,av as Me,m as tt,F as at,bI as it,bJ as st,bK as ot,a9 as ct}from"./index-
|
|
1
|
+
import{j as u}from"./liveblocks-s55OcG-D.js";import{h as X,g as ee,u as ne,i as G,j as P,N as x,n as W,t as en}from"./core-CnGMK-sC.js";import{bJ as nn,cp as Ce,PY as ye,eV as V,cB as tn,zC as Q,zm as an,Q8 as sn,Qb as on,rE as te,rs as ae,l7 as ie,tK as z,Qd as Ie,gh as $e,gg as Ge,gf as We,Qe as cn,zL as rn,Ev as Ae,Em as ke,Ej as _e,E1 as J,Ep as ve,Es as Ee,Ey as Pe,uc as Te,gw as un,cw as dn,fC as ln,fA as pn,fB as mn,bt as yn,Qf as fn,D1 as le,DF as gn,Qg as bn,bK as Sn,FO as pe,EP as hn,Qh as Cn,Qi as In,FS as An,FW as kn,tD as _n,Kk as vn,Gr as he,Hr as me,Qj as En,Qk as Pn,Ql as Tn,Qm as He,Qn as wn,MN as Dn,Po as Un,N0 as On,Qo as Ke,E5 as Fn,N1 as Vn,E9 as Bn,Qp as Oe,GN as qe,lf as xn,rv as Je,tM as jn,bE as Re,tY as Ne,cz as Rn,Qq as Ye,fU as Nn,G9 as zn,Gd as Ln,Qr as Mn,Gu as ze,Qs as Zn,Qt as Qn,Qu as $n,Qv as Gn,gp as Wn,AW as Hn,Qw as Kn,A$ as qn,A_ as Jn}from"./zeni-epic-state-NrbJoBOX.js";import{T as se,C as oe,G as q,y as we,aS as Y,bC as Xe,z as U,x as ce,d as O,B as De,f as $,bD as Yn,au as re,bE as B,bF as Xn,bG as et,ag as xe,bH as nt,v as Le,av as Me,m as tt,F as at,bI as it,bJ as st,bK as ot,a9 as ct}from"./index-D7tfVykC.js";import{a as h}from"./sentry-qwy54zvC.js";import{n as Fe,D as rt,S as ut}from"./mui-CggbPNN2.js";import{M as fe}from"./MobileAppDrawer-NdU6zrS3.js";import N from"./NotFoundScreen-wlhddpbg.js";import{a as Ze}from"./analyticsHelper-CbsMOq15.js";import{d as Qe}from"./routePaths-CVAI7AUa.js";import{B as Ue}from"./BusinessVerificationPageScreen-B4os1LkS.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]="d0b0d7b1-0726-4af5-92b8-50860ce68180",e._sentryDebugIdIdentifier="sentry-dbid-d0b0d7b1-0726-4af5-92b8-50860ce68180")}catch{}})();const dt=Fe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-s55OcG-D.js";import{a as u,b as T,q as A}from"./sentry-qwy54zvC.js";import{u as M,h as z,j as l,g as D,N as j,n as O}from"./core-CnGMK-sC.js";import{u as _,z as s,y as P,d as E,a as F,e as B,f as N,h as V,g as Y,Y as $,j as v}from"./index-
|
|
1
|
+
import{j as f}from"./liveblocks-s55OcG-D.js";import{a as u,b as T,q as A}from"./sentry-qwy54zvC.js";import{u as M,h as z,j as l,g as D,N as j,n as O}from"./core-CnGMK-sC.js";import{u as _,z as s,y as P,d as E,a as F,e as B,f as N,h as V,g as Y,Y as $,j as v}from"./index-D7tfVykC.js";import{eV as q,LZ as J,L_ as W,fy as Z,f_ as H,M3 as G,go as K,cY as Q,M4 as b,M5 as R,M6 as X,bY as y}from"./zeni-epic-state-NrbJoBOX.js";import"./mui-CggbPNN2.js";import{u as ee}from"./useDeviceId-DPOieVuC.js";import{f as te}from"./analyticsHelper-CbsMOq15.js";import{t as ne}from"./getLocaleForTenant-BuGWeb9s.js";import"./recharts-CmLekiCG.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./utils-5Fz6z6US.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="e0708250-8ef6-4e0f-9d0f-f9524eeaca7b",t._sentryDebugIdIdentifier="sentry-dbid-e0708250-8ef6-4e0f-9d0f-f9524eeaca7b")}catch{}})();const ie=O((function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}=i;return{googleClientId:v.googleClientId,microsoftClientId:v.microsoftClientId,signInError:t.tenantState.error?.error,fetchState:d,sendMagicLinkStatus:g,magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}}),(function(t,i){const{location:d,navigate:g}=i;return console.warn(JSON.stringify(window.location)),{onOAuthError:(n,a)=>{A({message:`OAuth error from provider ${a} with error ${n}`,level:"error",tags:{authProvider:a,errorType:"zeni.login.error"},extra:{error:n,windowLocation:window.location.href}})},onOAuthSuccess:(n,a)=>{const c=a==="google"?window.location.origin:window.location.origin+window.location.pathname;t(X({authCode:n,oauthProvider:a,appType:"web",redirectUri:y(c),sourceUri:y(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(R(n,a)))},clearSignInError:()=>{t(b())}}}))($),ae=T.memo(ie);function ve({setTenantEmailDomain:t}){const i=M(),d=z(),{clearAllLoading:g}=_(),n=s.getSignedInUser();u.useLayoutEffect((()=>{g()}),[g]);const a=ee(),c=l((e=>e.tenantState.magicLinkCodeVerifier)),{sendEmailMagicLinkFetchState:h,accountLocked:C,accountUnlockTime:L}=l((e=>e.tenantState)),p=l((e=>e.tenantState.fetchState)),k=l((e=>e.tenantState.activeTenantFetchState.fetchState)),S=l((e=>e.tenantState.signInState)),o=l((e=>e.tenantState.loggedInUser)),r=l((e=>q(e))),I=l((e=>J(e))),m=D(),w=P().mode,U=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect((()=>{h.fetchState==="Completed"&&c!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))}),[h.fetchState,c]),u.useEffect((()=>{t(void 0)}),[]),u.useEffect((()=>{S!=="In-Progress"||p!=="Completed"&&k!=="Completed"||o?.zeniSessionId==null||r==null||(s.savePayNowInfoTooltip(!0,o.zeniSessionId),s.saveSignedInUserWithSession(o,o.zeniSessionId),s.saveSignedInUserTenants(W(I.tenantsInOrder),o.zeniSessionId),Z(o.userId,o.zeniSessionId,r.tenantId),i(H(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(G("Completed")),F.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),K().then((()=>{const e=Y();e!=null&&B(e)})),setTimeout((()=>{E.trackLogin(N.Event.loginSuccess,o.authProvider??"google",Q(r.productSettings))}),2e3))}),[S,p,k,o,r,I,w,m.state,i]),S==="In-Progress"&&p==="Completed"&&o?.zeniSessionId!=null&&r!=null||n!=null){const e=m.state?.origin??"/";return f.jsx(j,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!U,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),C===!0&&L!=null?f.jsx(V,{onClose:()=>i(b()),unlockDate:L}):null]})}export{ve as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-s55OcG-D.js";import{a as i}from"./sentry-qwy54zvC.js";import{u as l,g as c,N as u}from"./core-CnGMK-sC.js";import{z as n,d as a,f as m,B as p}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-s55OcG-D.js";import{a as i}from"./sentry-qwy54zvC.js";import{u as l,g as c,N as u}from"./core-CnGMK-sC.js";import{z as n,d as a,f as m,B as p}from"./index-D7tfVykC.js";import{gt as g,Ml as y}from"./zeni-epic-state-NrbJoBOX.js";import{n as b}from"./mui-CggbPNN2.js";import"./recharts-CmLekiCG.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./utils-5Fz6z6US.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]="5eda9b5f-9703-4d20-8778-5472f100ee65",e._sentryDebugIdIdentifier="sentry-dbid-5eda9b5f-9703-4d20-8778-5472f100ee65")}catch{}})();function M(){const e=l(),t=c(),r=i.useRef(!1),f=n.isSignedIn(),o=t.state?.message==="logout"||f;return i.useEffect((()=>{if(o&&!r.current){r.current=!0;try{e(g()),y(),a.trackLogout(m.Event.logoutSuccess),a.resetUserIdentity(),n.clearAll()}catch(d){console.error("Error during sign out:",d)}finally{window.location.replace("/signin/auth")}}}),[o,e]),o?s.jsx(h,{children:s.jsx(p,{fetchState:"In-Progress"})}):s.jsx(u,{to:"../",replace:!0})}const h=b.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as d}from"./liveblocks-s55OcG-D.js";import{a as G}from"./sentry-qwy54zvC.js";import{h as v,u as K,g as _,j as b,i as z,n as J}from"./core-CnGMK-sC.js";import{z as R,C as M,G as p,a0 as O,x as V,d as Z,f as Q,da as W,v as f,r as q}from"./index-
|
|
1
|
+
import{j as d}from"./liveblocks-s55OcG-D.js";import{a as G}from"./sentry-qwy54zvC.js";import{h as v,u as K,g as _,j as b,i as z,n as J}from"./core-CnGMK-sC.js";import{z as R,C as M,G as p,a0 as O,x as V,d as Z,f as Q,da as W,v as f,r as q}from"./index-D7tfVykC.js";import{eV as H,TK as x,J6 as I,TL as F,TG as Y,Iu as y,TM as X,IC as E,HY as aa,J7 as S,TN as B,fx as ea,IZ as ta,J2 as sa,IR as oa,IP as w,J3 as na,IM as ia,TO as la,TP as ra,TQ as ka,TR as ca,TS as T,eg as ua,TT as da,TU as pa}from"./zeni-epic-state-NrbJoBOX.js";import{n as Ta}from"./mui-CggbPNN2.js";import{u as ma}from"./useAskAiCfoHostNavButtonProps-Bl-nKTXG.js";import{M as fa}from"./MobileAppDrawer-NdU6zrS3.js";import"./recharts-CmLekiCG.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./utils-5Fz6z6US.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]="f62ca84f-62f1-4a95-9a2b-809f742fc5b9",e._sentryDebugIdIdentifier="sentry-dbid-f62ca84f-62f1-4a95-9a2b-809f742fc5b9")}catch{}})();const ga=Ta.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-s55OcG-D.js";import se from"./NotFoundScreen-
|
|
1
|
+
import{j as n}from"./liveblocks-s55OcG-D.js";import se from"./NotFoundScreen-wlhddpbg.js";import{a as l}from"./sentry-qwy54zvC.js";import{h as O,u as Z,j as g,g as ne,i as oe,N as ie,n as re,o as le,p as f}from"./core-CnGMK-sC.js";import{I9 as H,Ic as ce,I6 as de,eV as M,TG as J,Iq as Q,I3 as pe,IW as ue,IP as ke,TH as K,TI as V,H$ as me,HY as fe,rE as ge,rs as he,l7 as Ie,Ik as Se,TJ as Te,IB as be,Iy as Ee,If as Ge,Iv as Ce,Iu as De}from"./zeni-epic-state-NrbJoBOX.js";import{z as C,d8 as xe,Q as ye,C as je,G as b,r as W,v as w,x as ve,d as z,f as we,d9 as Re,j as q,au as Be}from"./index-D7tfVykC.js";import{n as Fe}from"./mui-CggbPNN2.js";import{u as Pe}from"./useInitialThreadRequest-CXnpfTcs.js";import{M as Ue}from"./MobileAppDrawer-NdU6zrS3.js";import Le from"./TaskListScreen-B7M-Cqce.js";import"./recharts-CmLekiCG.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./utils-5Fz6z6US.js";import"./useAskAiCfoHostNavButtonProps-Bl-nKTXG.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]="61ebfe75-fa83-46d4-8775-39f3de7df999",e._sentryDebugIdIdentifier="sentry-dbid-61ebfe75-fa83-46d4-8775-39f3de7df999")}catch{}})();function $e(){const e=O(),t=Z(),s=C.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=g((o=>o.cannedResponsesState)),c=l.useCallback((()=>{t(H())}),[t]),k=l.useCallback(((o,h,I)=>{t(ce({name:o,content:h,cannedResponseId:I}))}),[t]),a=l.useCallback((o=>{t(de({cannedResponseId:o}))}),[t]);if(s==null)throw Error("Can't access quick responses page without signing in...");return n.jsx(xe,{cannedResponses:u,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:c,onSave:k})}let A,_=[];const Ne=re((function(e,t){const{location:s,taskGroupId:u}=t,r=K(e,t.taskId),d=M(e),c=r.taskGroupId??u,k=c!=null?V(e.taskGroupState,c):void 0,a=C.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},I=J(e),{tenantEmailDomain:D}=d,E=r.recurringSourceTaskId,x=E!=null?`${q.appUrl}/${D}/tasks/${encodeURIComponent(E)}`:void 0;var S;return{taskDetailSelectorView:r,authParams:h,isZeniUser:C.isZeniUser(),userGroupList:((S=e.userGroupsState.userGroupByUserGroupId)!==A&&(A=S,_=Object.values(S)),_),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Be.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${q.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:x,tagListView:I,taskGroupName:c!=null&&k!=null&&k.isDefault===!1?k.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map((p=>V(e.taskGroupState,p))).filter((p=>p!=null&&!p.isDeleted)).map((p=>({id:p.id,name:p.name,isDefault:p.isDefault})))}}),(function(e,t){const{taskId:s,navigate:u,currentTenant:r,location:d,taskGroupId:c}=t,{tenantEmailDomain:k}=r;return{onSaveChangesToLocalStore:a=>{e(De({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ce(s,a??c))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ge(t.taskId))},onSnoozeTask:(a,o)=>{e(Ee(a,o))},onUnsnoozeTask:a=>{e(be(a))},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const a=W(d.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";u(o,{state:{pathnameStackToGoBack:a.newStack}})}else{const a=R(k),o=w(d.state?.pathnameStackToGoBack,d.pathname);u(a,{state:{pathnameStackToGoBack:o}})}e(Te({taskId:s}))},onDeleteTaskClick:()=>{e(Se(s))},updateFilesEntity:a=>{e(Ie({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(ge(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(Q(!1,s))},onCreateTagClick:a=>{e(fe(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(H())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}}))(Re);function v(){const e=O(),t=Z(),s=ne(),u=ye(),{taskId:r,taskGroupId:d}=oe(),c=g((i=>M(i))),k=Pe(c?.companyId),{useFeatureGate:a}=je(),{isFeatureEnabled:o}=a(b.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(b.isTaskVisibilityEnabled),{isFeatureEnabled:I}=a(b.isTaskCannedResponsesEnabled),{isFeatureEnabled:D}=a(b.isTaskRecurringParentEnabled),{isFeatureEnabled:E}=a(b.isTaskGroupAssigneesEnabled),[x,S]=l.useState(!1),[p,X]=l.useState(!1),[B,Y]=l.useState(!1),[F,ee]=l.useState(!1),[P,y]=l.useState(!1),T=l.useRef(!1),G=g((i=>i.taskListState.updateTasksFetchState.fetchState)),U=g((i=>J(i))),L=g((i=>i.taskGroupViewState.fetchState));l.useEffect((()=>{p||(X(!0),t(Q(!1,r)))}),[p,t]),l.useEffect((()=>{B||U.fetchState==="Completed"||(Y(!0),t(pe()))}),[B,t,U.fetchState]),l.useEffect((()=>{F||L==="Completed"||(ee(!0),t(ue()))}),[F,t,L]);const ae=l.useCallback((()=>{r!=null&&(T.current=!1,t(ke([r],null,{isArchived:!1})),y(!0))}),[t,r]);l.useEffect((()=>{if(P)if(G!=="In-Progress"){if(T.current){if(G==="Error")return y(!1),void(T.current=!1);if(G==="Completed"){y(!1),T.current=!1;const{tenantEmailDomain:i}=c;if(s.state?.message==="triggerBackClick"){const m=W(s.state?.pathnameStackToGoBack);e(m.poppedPathname??"../../dashboard",{state:{pathnameStackToGoBack:m.newStack}})}else{const m=R(i);e(m,{state:{pathnameStackToGoBack:w(s.state?.pathnameStackToGoBack,s.pathname)}})}}}}else T.current=!0}),[P,G,c,s,e]);const $=g((i=>K(i,r))),j=$.fetchState,N=C.getSignedInUser();if(N==null)throw Error("Can't access task detail page without signing in...");if(j==="Error"&&$.error?.code===400){const{tenantEmailDomain:i}=c,m=R(i),te=w(s.state?.pathnameStackToGoBack,s.pathname);return n.jsx(ie,{to:m,state:{pathnameStackToGoBack:te}})}return n.jsxs(n.Fragment,{children:[j==="Completed"?n.jsx(ve,{analytics:z,onLoad:i=>(m=>m.trackPageLoaded(we.Event.taskDetailPage))(i)}):null,n.jsxs(Ve,{children:[n.jsx(Ue,{isAppContentDrawerOpen:x,handleDrawerToggle:i=>{S(i)}}),n.jsx(Ne,{analytics:z,currentTenant:c,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:N,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:j,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:I,isTaskRecurringParentEnabled:D,isTaskGroupAssigneesEnabled:E})]})]})}const Ve=Fe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
package/dist/assets/{TransactionDetailRoutes-C9ZhFLf5.js → TransactionDetailRoutes-Ct4erWuE.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-s55OcG-D.js";import i from"./NotFoundScreen-
|
|
1
|
+
import{j as t}from"./liveblocks-s55OcG-D.js";import i from"./NotFoundScreen-wlhddpbg.js";import{T as r}from"./TransactionDetailScreen-DRzSksYw.js";import"./sentry-qwy54zvC.js";import{o as s,p as o}from"./core-CnGMK-sC.js";import"./zeni-epic-state-NrbJoBOX.js";import"./recharts-CmLekiCG.js";import"./index-D7tfVykC.js";import"./mui-CggbPNN2.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./utils-5Fz6z6US.js";import"./useAskAiCfoHostNavButtonProps-Bl-nKTXG.js";import"./decodeURIComponentSafe-uWfgYCNH.js";import"./routePaths-CVAI7AUa.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="a4852925-22e4-4d6c-b9c0-7fe8ce24ec96",e._sentryDebugIdIdentifier="sentry-dbid-a4852925-22e4-4d6c-b9c0-7fe8ce24ec96")}catch{}})();function k(){return t.jsxs(s,{children:[t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(o,{path:"/*",element:t.jsx(r,{})})]})}export{k as default};
|
package/dist/assets/{TransactionDetailScreen-BsgXSNNV.js → TransactionDetailScreen-DRzSksYw.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as x}from"./liveblocks-s55OcG-D.js";import{a as i}from"./sentry-qwy54zvC.js";import{u as W,k as Ke,j as S,s as fe,g as ge,h as Te,i as Ee,N as Qe,n as Ze}from"./core-CnGMK-sC.js";import{nQ as he,eV as Q,gp as Xe,Oj as ea,n1 as aa,mL as ta,bn as na,cV as be,bs as Ie,rc as q,Ni as H,Ok as ve,Ol as oe,NI as De,kK as Ce,Om as ke,NN as se,NO as ce,lz as Ae,Kd as ie,Nc as M,kE as Oe,kC as Ue,kO as oa,nD as sa,On as ca,Oo as ia,vs as K,kJ as xe,Jy as we,ci as ra,cZ as la,Op as da,Nb as ua,Oq as ma,vo as pa,Or as fa,Os as ha,Ot as ya,Ou as Sa,Ov as ga,kN as Ta,Ow as Ea,Ox as ba,Nd as Ia,Oy as va,Oz as Da,OA as Ca,Js as ka,Ji as Aa,JH as Oa,kP as Ua,Ke as ye,nI as xa}from"./zeni-epic-state-NrbJoBOX.js";import{C as J,G as w,z as Pe,aS as _e,y as wa,m as Pa,aT as _a,F as Fa,r as te,T as Va,aU as Na,v as ne,a0 as Ba,aV as za,d as Fe,aW as La,au as Ra,a4 as ae}from"./index-
|
|
1
|
+
import{j as x}from"./liveblocks-s55OcG-D.js";import{a as i}from"./sentry-qwy54zvC.js";import{u as W,k as Ke,j as S,s as fe,g as ge,h as Te,i as Ee,N as Qe,n as Ze}from"./core-CnGMK-sC.js";import{nQ as he,eV as Q,gp as Xe,Oj as ea,n1 as aa,mL as ta,bn as na,cV as be,bs as Ie,rc as q,Ni as H,Ok as ve,Ol as oe,NI as De,kK as Ce,Om as ke,NN as se,NO as ce,lz as Ae,Kd as ie,Nc as M,kE as Oe,kC as Ue,kO as oa,nD as sa,On as ca,Oo as ia,vs as K,kJ as xe,Jy as we,ci as ra,cZ as la,Op as da,Nb as ua,Oq as ma,vo as pa,Or as fa,Os as ha,Ot as ya,Ou as Sa,Ov as ga,kN as Ta,Ow as Ea,Ox as ba,Nd as Ia,Oy as va,Oz as Da,OA as Ca,Js as ka,Ji as Aa,JH as Oa,kP as Ua,Ke as ye,nI as xa}from"./zeni-epic-state-NrbJoBOX.js";import{C as J,G as w,z as Pe,aS as _e,y as wa,m as Pa,aT as _a,F as Fa,r as te,T as Va,aU as Na,v as ne,a0 as Ba,aV as za,d as Fe,aW as La,au as Ra,a4 as ae}from"./index-D7tfVykC.js";import{n as Ga,S as ja,D as $a}from"./mui-CggbPNN2.js";import{u as Ma}from"./useAskAiCfoHostNavButtonProps-Bl-nKTXG.js";import{d as Ve}from"./decodeURIComponentSafe-uWfgYCNH.js";import{h as Ne,c as Be,g as Wa,e as qa}from"./routePaths-CVAI7AUa.js";import{u as Ha}from"./utils-5Fz6z6US.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="e7a0610f-84a9-4d2a-bd36-a0fa33a2e083",a._sentryDebugIdIdentifier="sentry-dbid-e7a0610f-84a9-4d2a-bd36-a0fa33a2e083")}catch{}})();function Ja(a=!0){const e=W(),s=Ke(),{useFeatureGate:t}=J(),{isFeatureEnabled:n}=t(w.isCreateTransferEntryFromExpenseEnabled);i.useEffect((()=>{if(!a||n!==!0)return;const o=c=>{const r=s.getState().createTransferEntryState.transferAccountsByType[c].fetchState;return r!=="In-Progress"&&r!=="Completed"};o("transferEntryEligible")&&e(he({kind:"transferEntryEligible"})),o("creditCardOnlyEligible")&&e(he({kind:"creditCardOnlyEligible"}))}),[a,n,e,s])}function Ya(a,e){const s=(function(){const r=W(),[p,g]=i.useState(!1),[A,y]=i.useState(null),[m,O]=i.useState(null),{useDynamicConfig:T}=J(),{configValue:f,isDynamicConfigLoading:C}=T("transaction_categorization_config"),v=!C&&f?.capitalization_enabled===!0,k=S((h=>Q(h))),E=k.companyId,U=S((h=>Xe(h.companyState,k.companyId)?.company.companyLocaleInfo?.currencySymbol??"$")),{capitalizableAccounts:P,capitalizableAccountOverrides:N,dismissedAccounts:R}=S((h=>{const b=h.tenantState.currentTenantId,u=b!=null?h.tenantState.tenantsById[b]:void 0;return{capitalizableAccounts:u?.capitalizableAccounts??null,capitalizableAccountOverrides:u?.capitalizableAccountOverrides??null,dismissedAccounts:u?.capitalizationOnboardingDismissedAccounts??null}}),fe),G=i.useRef(P);G.current=P;const B=i.useRef(N);B.current=N;const _=i.useRef(R);_.current=R;const z=S((h=>ea(h.accountState)),fe),I=i.useMemo((()=>{const h={};for(const b of z)b.accountId!=null&&b.accountName!=null&&(h[b.accountId]=b.accountName);return h}),[z]),l=m!=null?I[m]??null:null,j=i.useCallback((h=>{if(!v)return;const b=G.current;if(b==null)return;const u=b.accounts??[],$=new Set(h),Z=B.current??{},Y=_.current;for(const L of u)if($.has(L.accountId)&&Z[L.accountId]==null&&Y?.[L.accountId]==null)return y(L.classificationType),O(L.accountId),void g(!0)}),[v]),D=i.useCallback(((h,b)=>{r(aa(E,h,b,!0)),g(!1),y(null),O(null)}),[r,E]),F=i.useCallback((()=>{m!=null&&(r(ta(E,m)),g(!1),y(null),O(null))}),[r,E,m]);return{showPopup:p&&v,popupType:A,popupAccountId:m,popupAccountName:l,currencySymbol:U,checkAndShowPopup:j,handleSubmit:D,handleDismiss:F}})(),t=i.useRef(void 0),n=i.useRef([]),o=i.useRef(s.checkAndShowPopup);o.current=s.checkAndShowPopup;const c=i.useRef(e);return c.current=e,i.useEffect((()=>{a==="In-Progress"&&(n.current=c.current()),a==="Completed"&&t.current==="In-Progress"&&n.current.length>0&&(o.current(n.current),n.current=[]),t.current=a}),[a]),s}const re=()=>{const a=Pe.getSignedInUser(),{useFeatureGate:e}=J(),{isFeatureEnabled:s}=e(w.isChainOfThoughtEnabled);return i.useMemo((()=>na(a)&&s),[a,s])};function ze(a){if(a!=null){if("customer"in a&&a.customer!=null){const{customer:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"customer",zeniId:e.id,qboId:e.id}}if("vendor"in a&&a.vendor!=null){const{vendor:e}=a;return{id:e.id,name:e.name,logo:e.logo,type:"vendor",zeniId:e.id,qboId:e.id}}}}function ht(a,e){const s=W(),{useFeatureGate:t,useDynamicConfig:n}=J(),o=S((u=>Q(u))),c=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),r=o.userRole!=null&&be(o.userRole),p=o.userRole!=null&&Ie(o.userRole),{isFeatureEnabled:g}=t(w.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:A}=t(w.isExpenseAutomationEnabled),{configValue:y}=n(_e.enableUncategorizedExpenseCategory),m=y?.uncategorized_expense_category_enabled===!0,O=re(),T=i.useMemo((()=>({id:a,type:q(e)})),[a,e]),f=S((u=>H(u,T))),C=f?.transactionDetailUpdateStatus?.fetchState,v=f?.transactionDetailLocalData?.lineItemById,k=S((u=>{const $=H(u,T)?.transactionDetailLocalData.vendorUpdates?.id;return $==null?"Not-Started":u.transactionVendorViewState.editVendorStateById[$]?.saveStatus.fetchState??"Not-Started"})),E=i.useMemo((()=>f?.fetchState==="Completed"?ze(f?.transaction):void 0),[f?.fetchState,f?.transaction]),U=S((u=>{if(E!=null)return ve(u.customerIncomeState,u.vendorExpenseState,u.trendState,E,"month")})),P=S((u=>oe(u))),N=S((u=>{if(E!=null)return De(u.trendWithTransactionsState,E,"TransactionDetail")})),R=o.company?.companyInfo.firstMonthOfFY??1,G=S((u=>Ce(u.accountState,u.accountListState,"accountList"))),[B,_]=i.useState(!1),[z,I]=i.useState(!1),[l,j]=i.useState(!1);i.useEffect((()=>{_(!1),I(!1),j(!1)}),[a,e]);const D=i.useCallback((()=>{_(!1),I(!1)}),[]),[F,h]=i.useState(!1),b=N?.selectedPeriod?.timePeriod;return i.useEffect((()=>{l||f==null||f.transaction==null||(s(ke({id:f.transaction.id,type:f.transaction.type})),j(!0)),E!=null&&(!c||r&&p===!1)&&(B?z||U==null||(I(!0),s(ie(E,"TransactionDetail",{timeframe:"month",timePeriod:b??U}))):(s(se()),s(ce()),_(!0),s(Ae(E))))}),[s,l,f?.fetchState,f?.transaction,E,c,r,p,B,z,U,b]),i.useEffect((()=>{P.newVendorState?.vendorDetailLocalData?.vendorName!=null?h(!0):h(!1)}),[P.newVendorState?.vendorDetailLocalData?.vendorName]),i.useEffect((()=>()=>{s(M("common"))}),[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:c,isUserHasDashboardAccess:r,isUserHasInvestorOrBankerAccess:p,isVendorBulkUpdateOnTransactionEnabled:g,isExpenseAutomationEnabled:A,isUncategorizedExpenseCategoryEnabled:m,isChainOfThoughtEnabled:O,selectedTransaction:T,transactionDetail:f,rawDetailSaveStatus:C,rawDetailLineItemById:v,vendorSaveStatus:k,tranEntity:E,defaultTrendTransactionTimePeriod:U,vendorViewDetails:P,uiState:N,firstMonthOfFY:R,uncategorizedAccounts:G,resetTrendIsFetchedStates:D,isCreateVendorDrawerOpen:F,setIsCreateVendorDrawerOpen:h}}const Ka={overlayWidth:new Fa(100,100,58)},Qa=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=wa(),c=Pa(),r=W(),p=S((y=>oe(y))),g=()=>{t()},A={vendorDetailView:n??p,onSaveSuccess:()=>{r(Ue()),r(oa("Not-Started")),s()},onSaveVendor:e,onCancelClick:g,saveVendorDetailLocalData:y=>{r(Oe({vendorId:void 0,localData:y}))}};return x.jsx($a,{anchor:"right",open:a,PaperProps:{style:{width:Ka.overlayWidth.valuePercentage(c),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:g,children:x.jsx(Za,{onClick:y=>y.stopPropagation(),children:x.jsx(_a,{...A})})})},Za=Ga(ja)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-s55OcG-D.js";import{h as Q,g as q,u as H,i as W,j as S,N as z,n as Z,o as ve,p as j}from"./core-CnGMK-sC.js";import{eV as U,qT as X,jY as u,RG as ee,K4 as De,bo as le,RH as Pe,kz as te,NK as ae,RI as ue,RJ as Ee,bE as Y,K0 as ye,RK as be,RL as me,RM as je,K3 as Ae,RN as xe,RO as pe,RP as Me,RQ as ge,RR as Le,RS as Ce,RT as fe,Lg as Be}from"./zeni-epic-state-NrbJoBOX.js";import{a as de,C as ne,G as K,d as G,co as ce,v as V,r as oe,_ as Fe,E as Oe}from"./index-BWvweS0E.js";import"./mui-CggbPNN2.js";import{a as g}from"./sentry-qwy54zvC.js";import{w as se}from"./withTransactionSidePanel-BJ1dqQdE.js";import{p as ie,c as re}from"./routePaths-D87yNyzK.js";import{v as Re}from"./utils-5Fz6z6US.js";import{d as P}from"./decodeURIComponentSafe-uWfgYCNH.js";import{Z as Ge}from"./ZeniAccountStatementScreen-B3_VR-tZ.js";import"./recharts-CmLekiCG.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./useAskAiCfoHostNavButtonProps-c_VzJZE9.js";import"./TransactionDetailScreen-BsgXSNNV.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="4cd31d9f-0a56-4702-a6e2-633ca3c7cf80",a._sentryDebugIdIdentifier="sentry-dbid-4cd31d9f-0a56-4702-a6e2-633ca3c7cf80")}catch{}})();const ze=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],J=a=>Re(a),we=Z((function(a,e){const t=Pe(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,J(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=de.getLocalizedStrings(),l=J(e.selectedAccount.tranListType),m=Ne(t,n,c,l,e.bookCloseDate);G.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(ue({uiState:{dateRange:m},type:J(e.selectedAccount.tranListType)})),a(De(l,u(m),!1,l==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(u(m))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=V(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ue({uiState:{scrollYOffset:t},type:J(e.selectedAccount.tranListType)}))}}}))(ce),N=se((function({...a}){const e=Q(),t=q(),n=H(),c=t.pathname.split("/").find((r=>ze.includes(r))),o=c??"uncategorized-expense",{tenantEmailDomain:l}=W(),m=de.getLocalizedStrings(),{accountType:h,title:T,subTitle:D}=_e(o),y="month",I=S((r=>U(r))),p=I.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:A}=ne(),{isFeatureEnabled:k}=A(K.isProjectsTransactionsEnabled),x=S((r=>X(r)))&&k,{dataAvailable:C,initialTimeframeTick:E}=$e(o,p,I.bookCloseDate),[B,b]=g.useState(!1),[F,O]=g.useState(void 0),f=g.useMemo((()=>{const r=u(E);return{tranListType:o,accountType:ee(h),title:T,subTitle:D,timeframe:y,period:r}}),[o,y,h,C]);g.useEffect((()=>{if(!B&&f!=null){b(!0),G.trackTransactionList(void 0,void 0,void 0,f.title);const r=J(f.tranListType);n(De(r,f.period,!0,r==="missingReceipts"?m.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}}),[B,f,n]);let M=f;return f!=null&&F!=null&&(M={...f,period:F}),c==null||M==null?s.jsx(z,{to:"../"}):s.jsx(we,{firstMonthOfFY:p,tenantEmailDomain:l,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:C,navigate:e,showProjectField:x,selectedAccount:M,referrerType:o,bookCloseDate:I.bookCloseDate,onSelectedTimePeriodChange:r=>O(r),...a})})),_e=a=>{let e="",t="";const n=de.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.uncategorizedTransactionList.expense.title;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.uncategorizedTransactionList.missingReceipt.title}return{accountType:e,title:t,subTitle:""}},$e=(a,e,t)=>{const n=le();let c=le().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:ie(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Ne=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Je=Z((function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Se();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),G.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(ye(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=V(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}}))(ce),Ke=se((function({referrerType:a,...e}){const t=Q(),n=q(),c=H(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,classIdEncoded:h,timeframe:T,startDate:D,endDate:y,titleEncoded:I}=W(),p=P(l??""),A=P(m??""),k=P(h??""),x=P(I??""),C=S((d=>Ee(d.transactionListState,A,p,k))),[E,B]=g.useState(!1),[b,F]=g.useState(void 0),O=S((d=>U(d))),f=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(K.isProjectsTransactionsEnabled),w=S((d=>X(d)))&&r;let i;const R=Ve(p,A,k,T,D,y,x);if(R){const d={startDate:Y(D,"YYYY-MM-DD"),endDate:Y(y,"YYYY-MM-DD")},_=qe(C?.dateRange,d);i={accountId:A,accountType:ee(p),classId:k,title:x,timeframe:T,period:_}}g.useEffect((()=>{E||i==null||(B(!0),G.trackTransactionList(i.accountId,void 0,a,i.title),c(ye(i.accountId,i.accountType,i.classId,i.period)))}),[E,i,c]);let L=i;i!=null&&b!=null&&(L={...i,period:b});const $=[l,m,h,T,D,y,I].filter((d=>d!=null));return R&&L!=null?s.jsx(Je,{firstMonthOfFY:f,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>F(d),...e}):s.jsx(z,{to:Se($.length)})})),Se=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ve=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&l!=null,qe=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),Ue=Z((function(a,e){const t=xe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??he();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),G.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(Ae(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=V(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}}))(ce),Qe=se((function({referrerType:a,...e}){const t=Q(),n=q(),c=H(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,projectIdEncoded:h,timeframe:T,startDate:D,endDate:y,titleEncoded:I}=W(),p=P(l??""),A=P(m??""),k=P(h??""),x=P(I??""),C=S((d=>je(d.transactionListState,A,p,k))),[E,B]=g.useState(!1),[b,F]=g.useState(void 0),O=S((d=>U(d))),f=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(K.isProjectsTransactionsEnabled),w=S((d=>X(d)))&&r;let i;const R=He(p,A,k,T,D,y,x);if(R){const d={startDate:Y(D,"YYYY-MM-DD"),endDate:Y(y,"YYYY-MM-DD")},_=We(C?.dateRange,d);i={accountId:A,accountType:ee(p),projectId:k,title:x,timeframe:T,period:_}}g.useEffect((()=>{E||i==null||(B(!0),G.trackTransactionList(i.accountId,void 0,a,i.title),c(Ae(i.accountId,i.accountType,i.projectId,i.period)))}),[E,i,c]);let L=i;i!=null&&b!=null&&(L={...i,period:b});const $=[l,m,h,T,D,y,I].filter((d=>d!=null));return R&&L!=null?s.jsx(Ue,{firstMonthOfFY:f,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>F(d),...e}):s.jsx(z,{to:he($.length)})})),he=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},He=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&l!=null,We=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),Ze=Z((function(a,e){const t=Le(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&Ce(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ie();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),G.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=V(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=tt(e.tenantEmailDomain),n=V(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}}))(ce),Te=se((function({referrerType:a,...e}){const t=Q(),n=q(),c=H(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,timeframe:h,startDate:T,endDate:D,titleEncoded:y,excludeSubAccounts:I}=W(),p=P(l??""),A=P(m??""),k=P(y??""),x=!(I!=null&&I==="exclude_subaccounts"),C=S((v=>Me(v.transactionListState,A,p))),[E,B]=g.useState(!1),[b,F]=g.useState(void 0),O=S((v=>U(v))),f=O.company?.featuresActivationInfo.connectedAccountProvider==="unit",M=O.company?.companyInfo.firstMonthOfFY??1;let r;const w=Xe(p,A,h,T,D,k);if(w){const v={startDate:Y(T,"YYYY-MM-DD"),endDate:Y(D,"YYYY-MM-DD")},Ye=et(C?.dateRange,v);r={accountId:A,accountType:ee(p),title:k,timeframe:h,period:Ye}}let i=r;r!=null&&b!=null&&(i={...r,period:b});const{useFeatureGate:R}=ne(),{isFeatureEnabled:L}=R(K.isTransactionCommentingEnabled),{isFeatureEnabled:$}=R(K.isProjectsTransactionsEnabled),d=S((v=>X(v)))&&$,{areTenantIdsInSync:_}=Fe();g.useEffect((()=>{!E&&r!=null&&_&&(B(!0),G.trackTransactionList(r.accountId,void 0,a,r.title),c(ge(r.accountId,r.accountType,r.period,void 0,!1,x)))}),[E,r,c,_]);const ke=[l,m,h,T,D,y].filter((v=>v!=null));return w&&i!=null?s.jsx(Ze,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:f,isTransactionCommentingEnabled:L,showProjectField:d,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:v=>F(v),...e}):s.jsx(z,{to:Ie(ke.length)})})),Ie=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Xe=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&Y(n,"YYYY-MM-DD").isValid()&&Y(c,"YYYY-MM-DD").isValid()&&o!=null,et=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),tt=a=>`/${a}/transactions/${Be}/statements`;function kt(){const a=q().state?.referrer,e=S((n=>n.expenseAutomationViewState.selectedPeriodByTenantId))[S((n=>U(n))).tenantId],t=Oe();return s.jsxs(ve,{children:[s.jsx(j,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/zeni-clearing-account/statements",element:s.jsx(Ge,{})}),s.jsx(j,{path:"/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/uncategorized-income/*",element:s.jsx(N,{})}),s.jsx(j,{path:"/uncategorized-expense/*",element:t?s.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/miscategorized-income/*",element:s.jsx(N,{})}),s.jsx(j,{path:"/miscategorized-expense/*",element:t?s.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/missing-receipts/*",element:t?s.jsx(z,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Ke,{referrerType:a})}),s.jsx(j,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Qe,{referrerType:a})})]})}export{kt as default};
|
|
1
|
+
import{j as s}from"./liveblocks-s55OcG-D.js";import{h as Q,g as q,u as H,i as W,j as S,N as z,n as Z,o as ve,p as j}from"./core-CnGMK-sC.js";import{eV as U,qT as X,jY as u,RG as ee,K4 as De,bo as le,RH as Pe,kz as te,NK as ae,RI as ue,RJ as Ee,bE as Y,K0 as ye,RK as be,RL as me,RM as je,K3 as Ae,RN as xe,RO as pe,RP as Me,RQ as ge,RR as Le,RS as Ce,RT as fe,Lg as Be}from"./zeni-epic-state-NrbJoBOX.js";import{a as de,C as ne,G as K,d as G,co as ce,v as V,r as oe,_ as Fe,E as Oe}from"./index-D7tfVykC.js";import"./mui-CggbPNN2.js";import{a as g}from"./sentry-qwy54zvC.js";import{w as se}from"./withTransactionSidePanel-ZQvLeKiY.js";import{p as ie,c as re}from"./routePaths-CVAI7AUa.js";import{v as Re}from"./utils-5Fz6z6US.js";import{d as P}from"./decodeURIComponentSafe-uWfgYCNH.js";import{Z as Ge}from"./ZeniAccountStatementScreen-DJU3198J.js";import"./recharts-CmLekiCG.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./useAskAiCfoHostNavButtonProps-Bl-nKTXG.js";import"./TransactionDetailScreen-DRzSksYw.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="4cd31d9f-0a56-4702-a6e2-633ca3c7cf80",a._sentryDebugIdIdentifier="sentry-dbid-4cd31d9f-0a56-4702-a6e2-633ca3c7cf80")}catch{}})();const ze=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],J=a=>Re(a),we=Z((function(a,e){const t=Pe(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,J(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=de.getLocalizedStrings(),l=J(e.selectedAccount.tranListType),m=Ne(t,n,c,l,e.bookCloseDate);G.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(ue({uiState:{dateRange:m},type:J(e.selectedAccount.tranListType)})),a(De(l,u(m),!1,l==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(u(m))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=V(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ue({uiState:{scrollYOffset:t},type:J(e.selectedAccount.tranListType)}))}}}))(ce),N=se((function({...a}){const e=Q(),t=q(),n=H(),c=t.pathname.split("/").find((r=>ze.includes(r))),o=c??"uncategorized-expense",{tenantEmailDomain:l}=W(),m=de.getLocalizedStrings(),{accountType:h,title:T,subTitle:D}=_e(o),y="month",I=S((r=>U(r))),p=I.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:A}=ne(),{isFeatureEnabled:k}=A(K.isProjectsTransactionsEnabled),x=S((r=>X(r)))&&k,{dataAvailable:C,initialTimeframeTick:E}=$e(o,p,I.bookCloseDate),[B,b]=g.useState(!1),[F,O]=g.useState(void 0),f=g.useMemo((()=>{const r=u(E);return{tranListType:o,accountType:ee(h),title:T,subTitle:D,timeframe:y,period:r}}),[o,y,h,C]);g.useEffect((()=>{if(!B&&f!=null){b(!0),G.trackTransactionList(void 0,void 0,void 0,f.title);const r=J(f.tranListType);n(De(r,f.period,!0,r==="missingReceipts"?m.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}}),[B,f,n]);let M=f;return f!=null&&F!=null&&(M={...f,period:F}),c==null||M==null?s.jsx(z,{to:"../"}):s.jsx(we,{firstMonthOfFY:p,tenantEmailDomain:l,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:C,navigate:e,showProjectField:x,selectedAccount:M,referrerType:o,bookCloseDate:I.bookCloseDate,onSelectedTimePeriodChange:r=>O(r),...a})})),_e=a=>{let e="",t="";const n=de.getLocalizedStrings();switch(a){case"uncategorized-income":e="income",t=n.uncategorizedTransactionList.income.title;break;case"uncategorized-expense":e="expenses",t=n.uncategorizedTransactionList.expense.title;break;case"miscategorized-expense":e="expenses",t=n.miscategorizedTransactionList.expense.title;break;case"miscategorized-income":e="income",t=n.miscategorizedTransactionList.income.title;break;case"missing-receipts":t=n.uncategorizedTransactionList.missingReceipt.title}return{accountType:e,title:t,subTitle:""}},$e=(a,e,t)=>{const n=le();let c=le().startOf("month").subtract(11,"month");return t!=null&&a!=="missing-receipts"?t.add(1,"day").isBefore(c)?{dataAvailable:{startDate:t.add(1,"day"),endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}:(c=t.add(1,"day"),{dataAvailable:{startDate:c,endDate:n},initialTimeframeTick:{startDate:c,endDate:n}}):{dataAvailable:ie(5,e),initialTimeframeTick:{startDate:c,endDate:n}}},Ne=(a,e,t,n,c)=>{let o=e;return n==="missingReceipts"||c==null?a.startDate.isBefore(e.startDate,t)?o={startDate:a.startDate,endDate:e.endDate}:a.startDate.isAfter(e.endDate,t)?o={startDate:e.startDate,endDate:a.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(a)}`):o=a.startDate.isBefore(c,t)?{startDate:c.add(1,"day"),endDate:e.endDate}:{startDate:a.startDate,endDate:e.endDate},o},Je=Z((function(a,e){const t=be(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Se();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),G.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(ye(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=V(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{scrollYOffset:t}}))}}}))(ce),Ke=se((function({referrerType:a,...e}){const t=Q(),n=q(),c=H(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,classIdEncoded:h,timeframe:T,startDate:D,endDate:y,titleEncoded:I}=W(),p=P(l??""),A=P(m??""),k=P(h??""),x=P(I??""),C=S((d=>Ee(d.transactionListState,A,p,k))),[E,B]=g.useState(!1),[b,F]=g.useState(void 0),O=S((d=>U(d))),f=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(K.isProjectsTransactionsEnabled),w=S((d=>X(d)))&&r;let i;const R=Ve(p,A,k,T,D,y,x);if(R){const d={startDate:Y(D,"YYYY-MM-DD"),endDate:Y(y,"YYYY-MM-DD")},_=qe(C?.dateRange,d);i={accountId:A,accountType:ee(p),classId:k,title:x,timeframe:T,period:_}}g.useEffect((()=>{E||i==null||(B(!0),G.trackTransactionList(i.accountId,void 0,a,i.title),c(ye(i.accountId,i.accountType,i.classId,i.period)))}),[E,i,c]);let L=i;i!=null&&b!=null&&(L={...i,period:b});const $=[l,m,h,T,D,y,I].filter((d=>d!=null));return R&&L!=null?s.jsx(Je,{firstMonthOfFY:f,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>F(d),...e}):s.jsx(z,{to:Se($.length)})})),Se=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Ve=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&l!=null,qe=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),Ue=Z((function(a,e){const t=xe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??he();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),G.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(Ae(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=V(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{scrollYOffset:t}}))}}}))(ce),Qe=se((function({referrerType:a,...e}){const t=Q(),n=q(),c=H(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,projectIdEncoded:h,timeframe:T,startDate:D,endDate:y,titleEncoded:I}=W(),p=P(l??""),A=P(m??""),k=P(h??""),x=P(I??""),C=S((d=>je(d.transactionListState,A,p,k))),[E,B]=g.useState(!1),[b,F]=g.useState(void 0),O=S((d=>U(d))),f=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=ne(),{isFeatureEnabled:r}=M(K.isProjectsTransactionsEnabled),w=S((d=>X(d)))&&r;let i;const R=He(p,A,k,T,D,y,x);if(R){const d={startDate:Y(D,"YYYY-MM-DD"),endDate:Y(y,"YYYY-MM-DD")},_=We(C?.dateRange,d);i={accountId:A,accountType:ee(p),projectId:k,title:x,timeframe:T,period:_}}g.useEffect((()=>{E||i==null||(B(!0),G.trackTransactionList(i.accountId,void 0,a,i.title),c(Ae(i.accountId,i.accountType,i.projectId,i.period)))}),[E,i,c]);let L=i;i!=null&&b!=null&&(L={...i,period:b});const $=[l,m,h,T,D,y,I].filter((d=>d!=null));return R&&L!=null?s.jsx(Ue,{firstMonthOfFY:f,tenantEmailDomain:o,location:n,navigate:t,showProjectField:w,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>F(d),...e}):s.jsx(z,{to:he($.length)})})),he=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},He=(a,e,t,n,c,o,l)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&o!=null&&(n==="month"||n==="quarter")&&Y(c,"YYYY-MM-DD").isValid()&&Y(o,"YYYY-MM-DD").isValid()&&l!=null,We=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),Ze=Z((function(a,e){const t=Le(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&Ce(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ae(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:te(a)}}),(function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ie();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),G.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,u(o))),e.onSelectedTimePeriodChange(u(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=V(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=tt(e.tenantEmailDomain),n=V(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}}))(ce),Te=se((function({referrerType:a,...e}){const t=Q(),n=q(),c=H(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:m,timeframe:h,startDate:T,endDate:D,titleEncoded:y,excludeSubAccounts:I}=W(),p=P(l??""),A=P(m??""),k=P(y??""),x=!(I!=null&&I==="exclude_subaccounts"),C=S((v=>Me(v.transactionListState,A,p))),[E,B]=g.useState(!1),[b,F]=g.useState(void 0),O=S((v=>U(v))),f=O.company?.featuresActivationInfo.connectedAccountProvider==="unit",M=O.company?.companyInfo.firstMonthOfFY??1;let r;const w=Xe(p,A,h,T,D,k);if(w){const v={startDate:Y(T,"YYYY-MM-DD"),endDate:Y(D,"YYYY-MM-DD")},Ye=et(C?.dateRange,v);r={accountId:A,accountType:ee(p),title:k,timeframe:h,period:Ye}}let i=r;r!=null&&b!=null&&(i={...r,period:b});const{useFeatureGate:R}=ne(),{isFeatureEnabled:L}=R(K.isTransactionCommentingEnabled),{isFeatureEnabled:$}=R(K.isProjectsTransactionsEnabled),d=S((v=>X(v)))&&$,{areTenantIdsInSync:_}=Fe();g.useEffect((()=>{!E&&r!=null&&_&&(B(!0),G.trackTransactionList(r.accountId,void 0,a,r.title),c(ge(r.accountId,r.accountType,r.period,void 0,!1,x)))}),[E,r,c,_]);const ke=[l,m,h,T,D,y].filter((v=>v!=null));return w&&i!=null?s.jsx(Ze,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:f,isTransactionCommentingEnabled:L,showProjectField:d,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:v=>F(v),...e}):s.jsx(z,{to:Ie(ke.length)})})),Ie=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Xe=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&Y(n,"YYYY-MM-DD").isValid()&&Y(c,"YYYY-MM-DD").isValid()&&o!=null,et=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?u(a):u(e),tt=a=>`/${a}/transactions/${Be}/statements`;function kt(){const a=q().state?.referrer,e=S((n=>n.expenseAutomationViewState.selectedPeriodByTenantId))[S((n=>U(n))).tenantId],t=Oe();return s.jsxs(ve,{children:[s.jsx(j,{path:"/:accountTypeEncoded/:accountIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/:excludeSubAccounts/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/zeni-clearing-account/statements",element:s.jsx(Ge,{})}),s.jsx(j,{path:"/*",element:s.jsx(Te,{referrerType:a})}),s.jsx(j,{path:"/uncategorized-income/*",element:s.jsx(N,{})}),s.jsx(j,{path:"/uncategorized-expense/*",element:t?s.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/miscategorized-income/*",element:s.jsx(N,{})}),s.jsx(j,{path:"/miscategorized-expense/*",element:t?s.jsx(z,{to:`../../month_end_close_checks/review/transaction_categorization/${e.month}-${e.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/missing-receipts/*",element:t?s.jsx(z,{to:`../../month_end_close_checks/review/missing_receipts/${e.month}-${e.year}`}):s.jsx(N,{})}),s.jsx(j,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Ke,{referrerType:a})}),s.jsx(j,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(Qe,{referrerType:a})})]})}export{kt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-s55OcG-D.js";import{h as F,g as U,u as B,i as O,j as g,N as D,n as N,o as we,p as k}from"./core-CnGMK-sC.js";import{cq as G,eV as E,Qq as L,Gr as ae,fU as H,G9 as ne,Qs as Ie,Gu as ke,Qo as be,Qp as se,QE as je,Ey as Ae,uc as Ee,Qu as ve,GN as De,Qr as re,cU as q,yv as oe,fA as Fe,fC as Ue,RD as Be,RE as Le,Ga as Pe,RF as Re,Gb as Me,Gk as Ve,bs as Oe,bJ as Ne,cB as Ge,bK as _e,cp as $e,bt as ze,L$ as Qe,co as He}from"./zeni-epic-state-NrbJoBOX.js";import{T as _,ar as qe,z as A,x as $,d as b,ch as Ze,ci as Ke,cj as Q,m as Z,y as We,_ as Je,a0 as Xe,C as ie,G as v,F as Ye,B as et,ck as tt,au as K,v as at,cl as nt,r as W,cm as st,H as X,cn as rt,i as ot}from"./index-
|
|
1
|
+
import{j as e}from"./liveblocks-s55OcG-D.js";import{h as F,g as U,u as B,i as O,j as g,N as D,n as N,o as we,p as k}from"./core-CnGMK-sC.js";import{cq as G,eV as E,Qq as L,Gr as ae,fU as H,G9 as ne,Qs as Ie,Gu as ke,Qo as be,Qp as se,QE as je,Ey as Ae,uc as Ee,Qu as ve,GN as De,Qr as re,cU as q,yv as oe,fA as Fe,fC as Ue,RD as Be,RE as Le,Ga as Pe,RF as Re,Gb as Me,Gk as Ve,bs as Oe,bJ as Ne,cB as Ge,bK as _e,cp as $e,bt as ze,L$ as Qe,co as He}from"./zeni-epic-state-NrbJoBOX.js";import{T as _,ar as qe,z as A,x as $,d as b,ch as Ze,ci as Ke,cj as Q,m as Z,y as We,_ as Je,a0 as Xe,C as ie,G as v,F as Ye,B as et,ck as tt,au as K,v as at,cl as nt,r as W,cm as st,H as X,cn as rt,i as ot}from"./index-D7tfVykC.js";import{D as it,n as R,S as ct}from"./mui-CggbPNN2.js";import lt from"./NotFoundScreen-wlhddpbg.js";import{S as Y}from"./SetupPagesScreen-HhCCJlo-.js";import{a as p}from"./sentry-qwy54zvC.js";import{u as ut}from"./useAskAiCfoHostNavButtonProps-Bl-nKTXG.js";import{u as dt}from"./useInitialThreadRequest-CXnpfTcs.js";import{u as pt}from"./useCashManagementBanner-SbCmMLis.js";import{M as ce}from"./MobileAppDrawer-NdU6zrS3.js";import{F as mt}from"./FeaturePreviewScreen-Di3PuVRR.js";import{a as ee}from"./analyticsHelper-CbsMOq15.js";import"./recharts-CmLekiCG.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./utils-5Fz6z6US.js";import"./routePaths-CVAI7AUa.js";import"./BusinessVerificationPageScreen-B4os1LkS.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="9cb486bc-20f5-490b-b55e-3652a9fe90da",t._sentryDebugIdIdentifier="sentry-dbid-9cb486bc-20f5-490b-b55e-3652a9fe90da")}catch{}})();const ft=N((function(t,a){const{companyId:n}=a;return{treasurySetupView:L(t,n),analytics:b}}),(function(t,a){const{navigate:n,analytics:r,treasurySetupView:m}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const s=m.fundAllocationLocalData;r.trackTreasuryPortfolioConfirm(s.riskScore,ee(s)),t(ke(!0))},onUpdateFundAllocation:s=>{r.trackTreasuryAllocationAction("update",ee(s)),t(Ie(s))}}}))(Ze);function yt(){const t=F(),a=U(),n=B(),{tenantEmailDomain:r}=O(),m=_(),s=g((I=>I.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState)),f=qe(s),o=G(m?.loggedInUserRoleMap),[u,i]=p.useState(!1),[d,T]=p.useState(!1),[c,l]=p.useState(!1),S=g((I=>E(I))),y=A.getSignedInUserTenant(r)?.companyId??S.companyId,x=A.getSignedInUser(),h=g((I=>L(I,y))),w=g((I=>I.treasurySetupViewState.fetchState)),C=g((I=>I.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),M=g((I=>I.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState));if(x==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(p.useEffect((()=>{u||w!=="Not-Started"||y==null||(i(!0),n(ae(y,!0,!1)))}),[u,w,y,n]),p.useEffect((()=>{c||M!=="Not-Started"||y==null||(l(!0),n(H()))}),[c,M,y,n]),p.useEffect((()=>{d||C!=="Not-Started"||y==null||(T(!0),n(ne()))}),[d,C,y,n]),p.useEffect((()=>{f==="In-Progress"&&s==="Completed"&&t("../")}),[f,s,t]),S.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(D,{to:"../promo"});const P=S.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||w!=="Completed";return e.jsxs(e.Fragment,{children:[!P&&e.jsx($,{analytics:b,onLoad:()=>{}}),e.jsx(ft,{navigate:t,location:a,companyId:y,isEditMode:!0,isLoading:P,isReadOnly:!o,treasurySetupView:h,analytics:b})]})}const gt=N((function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:je(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:L(t,n)}}),(function(t,a){const{navigate:n,transferDetails:r,treasurySetupView:m}=a,s=r.treasuryTransferMoneyLocalData,f=m.fundAllocationLocalData;return{onCancelClick:()=>{Q(a.analytics,"cancel",s,f,"Transfer"),t(se()),n("../")},onTransferClick:()=>{Q(a.analytics,"confirm",s,f,"Transfer"),t(De())},onSaveChangesToLocalStore:o=>{t(ve(o))},onFetchLinkTokenClick:o=>{t(Ee("treasury_setup",o))},onEstablishConnectionClick:o=>{t(Ae(o,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}}))(Ke),ht=({isFirstTransfer:t})=>{const a=F(),{tenantEmailDomain:n}=O(),r=B(),[m,s]=p.useState(!1),[f,o]=p.useState(!1),[u,i]=p.useState(!1),[d,T]=p.useState(!1),c=g((C=>C.treasurySetupViewState.fetchState)),l=g((C=>C.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState)),S=g((C=>C.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState)),y=g((C=>E(C))),x=A.getSignedInUserTenant(n)?.companyId??y.companyId,h=g((C=>be(C))),w=g((C=>L(C,x)));if(A.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return p.useEffect((()=>{f||c!=="Not-Started"||x==null||(o(!0),r(ae(x,!0,!1)))}),[f,c,x,r]),p.useEffect((()=>{u||l!=="Not-Started"||x==null||(i(!0),r(H()))}),[u,l,x,r]),p.useEffect((()=>{d||S!=="Not-Started"||x==null||(T(!0),r(ne()))}),[d,S,x,r]),e.jsxs(e.Fragment,{children:[e.jsx($,{analytics:b,onLoad:()=>{}}),e.jsx(gt,{analytics:b,navigate:a,transferDetails:h,onAnotherTransferClick:()=>{s(!1),r(se())},currentTenant:y,treasurySetupView:w,showReviewContent:m,maxInsuredAmount:5e5,onReviewClick:()=>{Q(b,"review",h.treasuryTransferMoneyLocalData,w.fundAllocationLocalData,"Transfer"),s(!0)},isFirstTransfer:t,setShowReviewContent:s,onBackClick:()=>{}})]})},St=R.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-s55OcG-D.js";import{a as f}from"./sentry-qwy54zvC.js";import{h as J,g as Y,i as B,j as S,n as G,u as K,o as at,p as N,N as $}from"./core-CnGMK-sC.js";import{eV as L,N8 as Ee,N9 as Re,gw as X,cw as be,cx as Ie,x4 as St,Na as nt,x8 as Kt,L7 as ee,kz as te,x2 as Yt,wY as qt,Nb as Ue,wQ as Ht,wP as Qt,wJ as Wt,wV as Zt,x9 as Xt,Nc as he,Nd as Me,wR as ea,Ne as pe,fH as ft,xo as gt,xh as vt,Nf as xt,pJ as Tt,xc as yt,xa as Dt,Ng as Ct,xv as Et,xs as bt,xd as It,xu as Je,Jy as wt,Nh as ta,Ni as aa,cz as na,Nj as sa,Nk as oa,Nl as me,Nm as ie,Nn as we,L8 as Ge,xK as ye,L6 as De,xx as kt,x5 as $e,No as la,L9 as H,Np as ze,w$ as ia,Nq as ca,Nr as da,Ns as Ke,Nt as Ye,Nu as qe,Nv as He,xE as ke,Nw as At,xl as jt,Nx as ra,Ny as ua,Nz as ha,NA as pa,NB as ma,NC as Sa,ND as fa,NE as ga,uo as va,uw as xa,up as Ta,Ke as je,NF as ya,NG as Da,jY as Fe,bo as Ca,NH as Ea,NI as ba,lx as Ia,lG as wa,Kd as Pe,bE as st,NJ as Ft,JQ as Pt,NK as ka,NL as Aa,NM as ja,lI as Fa,NN as ot,NO as lt,NP as it,NQ as ct,NR as Pa,lE as _a,NS as Va,lH as La,NT as Na,NU as _t,Kz as Vt,kX as Oa,NV as Ba,NW as _e,NX as Lt,Kx as Nt,A0 as Ra,NY as Ua,NZ as Ma,lf as Ot,N_ as Ja,N$ as Ga,KL as $a,rZ as za,O0 as Bt,O1 as dt,KI as Ve,O2 as rt,O3 as Ka,KN as Ya,O4 as qa,O5 as Ha,O6 as Qa,O7 as Wa,O8 as Za,s0 as Xa,O9 as en,La as tn,Oa as an,Kq as Le,hH as nn,Ob as sn,Oc as on,hF as ln,Od as cn,Oe as dn,A4 as rn,Of as un,Og as hn,Oh as pn,Oi as mn,k$ as Sn,bn as fn,fC as gn,fA as vn}from"./zeni-epic-state-NrbJoBOX.js";import{z as R,ar as Ne,B as Rt,x as W,d as j,a4 as Z,aB as xn,v as M,a as Ce,Q as ce,aC as Qe,aD as Tn,aE as yn,r as We,aF as Dn,y as Cn,m as de,F as Ze,C as ae,G as z,aG as En,j as Xe,a0 as Se,aH as bn,aI as Ut,_ as In,aJ as wn,T as kn,aK as An,au as Mt,aL as jn,o as Q,S as Fn,I as Jt,K as Pn,aM as _n,aN as Vn,f as et,aO as Ln,aP as Nn,q as On,aQ as Bn,aR as Rn}from"./index-
|
|
1
|
+
import{j as l}from"./liveblocks-s55OcG-D.js";import{a as f}from"./sentry-qwy54zvC.js";import{h as J,g as Y,i as B,j as S,n as G,u as K,o as at,p as N,N as $}from"./core-CnGMK-sC.js";import{eV as L,N8 as Ee,N9 as Re,gw as X,cw as be,cx as Ie,x4 as St,Na as nt,x8 as Kt,L7 as ee,kz as te,x2 as Yt,wY as qt,Nb as Ue,wQ as Ht,wP as Qt,wJ as Wt,wV as Zt,x9 as Xt,Nc as he,Nd as Me,wR as ea,Ne as pe,fH as ft,xo as gt,xh as vt,Nf as xt,pJ as Tt,xc as yt,xa as Dt,Ng as Ct,xv as Et,xs as bt,xd as It,xu as Je,Jy as wt,Nh as ta,Ni as aa,cz as na,Nj as sa,Nk as oa,Nl as me,Nm as ie,Nn as we,L8 as Ge,xK as ye,L6 as De,xx as kt,x5 as $e,No as la,L9 as H,Np as ze,w$ as ia,Nq as ca,Nr as da,Ns as Ke,Nt as Ye,Nu as qe,Nv as He,xE as ke,Nw as At,xl as jt,Nx as ra,Ny as ua,Nz as ha,NA as pa,NB as ma,NC as Sa,ND as fa,NE as ga,uo as va,uw as xa,up as Ta,Ke as je,NF as ya,NG as Da,jY as Fe,bo as Ca,NH as Ea,NI as ba,lx as Ia,lG as wa,Kd as Pe,bE as st,NJ as Ft,JQ as Pt,NK as ka,NL as Aa,NM as ja,lI as Fa,NN as ot,NO as lt,NP as it,NQ as ct,NR as Pa,lE as _a,NS as Va,lH as La,NT as Na,NU as _t,Kz as Vt,kX as Oa,NV as Ba,NW as _e,NX as Lt,Kx as Nt,A0 as Ra,NY as Ua,NZ as Ma,lf as Ot,N_ as Ja,N$ as Ga,KL as $a,rZ as za,O0 as Bt,O1 as dt,KI as Ve,O2 as rt,O3 as Ka,KN as Ya,O4 as qa,O5 as Ha,O6 as Qa,O7 as Wa,O8 as Za,s0 as Xa,O9 as en,La as tn,Oa as an,Kq as Le,hH as nn,Ob as sn,Oc as on,hF as ln,Od as cn,Oe as dn,A4 as rn,Of as un,Og as hn,Oh as pn,Oi as mn,k$ as Sn,bn as fn,fC as gn,fA as vn}from"./zeni-epic-state-NrbJoBOX.js";import{z as R,ar as Ne,B as Rt,x as W,d as j,a4 as Z,aB as xn,v as M,a as Ce,Q as ce,aC as Qe,aD as Tn,aE as yn,r as We,aF as Dn,y as Cn,m as de,F as Ze,C as ae,G as z,aG as En,j as Xe,a0 as Se,aH as bn,aI as Ut,_ as In,aJ as wn,T as kn,aK as An,au as Mt,aL as jn,o as Q,S as Fn,I as Jt,K as Pn,aM as _n,aN as Vn,f as et,aO as Ln,aP as Nn,q as On,aQ as Bn,aR as Rn}from"./index-D7tfVykC.js";import{n as U,D as Un,S as Gt}from"./mui-CggbPNN2.js";import{t as Mn,A as Jn}from"./AddressScreen-Dzf83tSk.js";import le from"./NotFoundScreen-wlhddpbg.js";import{F as Gn}from"./FeaturePreviewScreen-Di3PuVRR.js";import{c as q,v as tt,d as $n}from"./routePaths-CVAI7AUa.js";import{p as $t}from"./pathToGoBack-DpxbYxCk.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-Bl-nKTXG.js";import{M as ge}from"./MobileAppDrawer-NdU6zrS3.js";import{D as zn}from"./DrawerScreen-BPgZ_1JF.js";import{g as Kn,m as Yn}from"./accountMappingHelper-SWFIL59M.js";import"./recharts-CmLekiCG.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./utils-5Fz6z6US.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]="0e73632f-8394-48ba-aa84-f1712de749bf",e._sentryDebugIdIdentifier="sentry-dbid-0e73632f-8394-48ba-aa84-f1712de749bf")}catch{}})();const qn=Ce.getLocalizedStrings(),Hn=G((function(e,a){const s=Re(e,a.scheduleTab),t=e.tenantState.currentTenantId;return{authParams:{userId:a.signedInUser.userId??"",sessionId:a.signedInUser.zeniSessionId??"",tenantId:t??""},linkBillExpenseView:s.linkBillExpenseView,transactions:s.linkBillExpenseView.transactions}}),(function(e,a){const{navigate:s,location:t}=a;return{onTransactionSelect(n){e(nt({selectedTransaction:n}))},onBackClick:()=>{s("..",{relative:"path"})},onCancel(){e(nt({selectedTransaction:void 0})),e(Kt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${q(n,a.tenantEmailDomain)}`,c=M(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(St(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}}))(xn),Qn=({setShouldNavigateBack:e})=>{const a=J(),s=Y(),{scheduleDetailId:t,tenantEmailDomain:n}=B(),{scheduleType:o}=B();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S((g=>L(g))),r=Ee(o)??"accrued_expenses",h=R.getSignedInUser();if(h==null)throw Error("Can't access Link Bill Expensedetail page without signing in...");if(t==null)throw Error("Invalid Schedule Detail Id");const i=S((g=>Re(g,r))),p=i.selectedJELinkRowIndex,d=S((g=>X(g,c.companyId))),u=Ne(i.updateStatus.fetchState);f.useEffect((()=>{u==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})}),[u,i.updateStatus.fetchState]),f.useEffect((()=>{i.fetchState==="Not-Started"&&a("..",{relative:"path"})}),[]),f.useEffect((()=>{i.selectedJEAccruedSchedule!=null&&i.selectedJELinkRowIndex!=null||a("..",{relative:"path"})}),[i.selectedJEAccruedSchedule,i.selectedJELinkRowIndex]);const m=i.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:i.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Rt,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&p!=null?l.jsxs(l.Fragment,{children:[m===!0?l.jsx(W,{analytics:j,onLoad:()=>{Wn(i,r,d)}}):null,l.jsx(Hn,{signedInUser:h,attachmentEndPoint:`${Z}/vendor_attachments`,setShouldNavigateBack:e,scheduleVendorId:i.selectedJEAccruedSchedule.vendor.id??"",location:s,tenantEmailDomain:n,scheduleAccruedDetailsView:i,saveFetchState:i.updateStatus.fetchState,scheduleTab:r,navigate:a,analytics:j,controllerUserDetails:d,saveStatus:i.updateStatus.fetchState,jeAccruedSchedule:i.selectedJEAccruedSchedule,localData:i.scheduleAccruedDetailsLocalData.jeScheduleDetails[p]})]}):null})},zt=e=>{const a=qn.dateFormat.analytics.YYYYDashMMDashDDFormat;return{scheduleCreateDate:e.createTime.format(a)??null,scheduleMonthlyAmount:e.recurringAmount??null,startingBalance:e.otherAttributes.startingBalance??null,scheduleAccountCategory:e.jeCredit.account?.accountName??null,description:e.memo,runningBalance:e.balanceAsOfToday??null,currentBalance:e.balanceAsOfToday??null,currentStatus:e.status.label,period:e.period??null,startMonth:e.startDate?.format(a)??null,endMonth:e.endDate?.format(a)??null}},Wn=(e,a,s)=>{const t=e.selectedJEAccruedSchedule,n=e.selectedJELinkRowIndex;let o;n!=null&&t!=null&&(o=t.scheduledJournalEntry[n]);const{transactions:c}=e.linkBillExpenseView,r=c.some((p=>p.isRecommendedTransaction===!0)),h=be(s.controllers),i=Ie(s.controllerUserIds);t!=null&&j.trackScheduleAccruedDetailsJournalEntryLinkedLoaded({scheduleType:a,schedule:{...zt(t)},scheduleExpenseCategoryAndClass:{expenseCategory:t.jeDebit.account?.accountName??null,expenseClass:t.jeDebit.accountingClass?.className??null},journalEntryDetails:{wasRecommendationAvailable:r,journalEntryPostingStatus:o?.status.label??""},vendorName:t.vendor.name??null,controllerEmails:h,controllerUserIds:i})},Zn=U.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
package/dist/assets/{WiseConfirmationScreen-CcZrE5_R.js → WiseConfirmationScreen-B9yx7qcI.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-s55OcG-D.js";import{a as f}from"./sentry-qwy54zvC.js";import{t as u,u as h,j as y,N as I}from"./core-CnGMK-sC.js";import{Mi as b,fy as w,Bl as j}from"./zeni-epic-state-NrbJoBOX.js";import{z as l,B as x,I as S,K as D}from"./index-
|
|
1
|
+
import{j as o}from"./liveblocks-s55OcG-D.js";import{a as f}from"./sentry-qwy54zvC.js";import{t as u,u as h,j as y,N as I}from"./core-CnGMK-sC.js";import{Mi as b,fy as w,Bl as j}from"./zeni-epic-state-NrbJoBOX.js";import{z as l,B as x,I as S,K as D}from"./index-D7tfVykC.js";import{n as p}from"./mui-CggbPNN2.js";import"./recharts-CmLekiCG.js";import"./analytics-DhULAPA0.js";import"./plaid-d_bwfWrk.js";import"./dnd-BqCGp7Ed.js";import"./stripe-cKAAJElX.js";import"./lottie-DMKCl4ti.js";import"./lexical-DlqthnSG.js";import"./pdf-BD0zxvar.js";import"./utils-5Fz6z6US.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]="ba074be1-d555-4fdd-9875-88d089c27248",e._sentryDebugIdIdentifier="sentry-dbid-ba074be1-d555-4fdd-9875-88d089c27248")}catch{}})();const q=()=>{const[e]=u(),t=e.get("code")??"",i=e.get("state")??"",c=e.get("profileId")??"",[n,g]=f.useState(!1),a=h(),s=y((m=>b(m))),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(i);if(r==null||d==null)return o.jsx(I,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect((()=>{n||(g(!0),a(j(t,c,i)))}),[n,a]),s.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:s.error?.message??""})}):(s.fetchState==="Completed"&&window.close(),o.jsx(x,{fetchState:"In-Progress"}))},E=p.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
width: 100%;
|
|
4
4
|
height: 100vh;
|