@zeniai/web-app-ui 5.1.44-dev → 5.1.44-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-8gRhHPlq.js → AddressRoutes-B61fN_Ku.js} +1 -1
- package/dist/assets/{AddressScreen-DPs7jKyd.js → AddressScreen-BF-3RAYM.js} +1 -1
- package/dist/assets/{AiCfoScreen-Bp7iBQCF.js → AiCfoScreen-BPdC66wo.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-DwElFGIC.js → BillPayApprovalRoutes-QJ1EpW6M.js} +1 -1
- package/dist/assets/{BillPayRoutes-CcQHQh3Z.js → BillPayRoutes-Bna0uGqV.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-CRI_zbAG.js → BusinessVerificationPageScreen-0dmMGz8A.js} +1 -1
- package/dist/assets/{CardsAiCfoScreen-Cn4K24os.js → CardsAiCfoScreen-BtSV6YdK.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-D8Tom0l5.js → ChargeCardRoutes-DKr2nu1e.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-DPJK2btv.js → CompanyPassportScreen-BOxFkTz6.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-DDGywryh.js → ConnectionAuthScreen-BYP_nDK9.js} +1 -1
- package/dist/assets/{CustomerOnboardingAuthScreen-DnJWeWwh.js → CustomerOnboardingAuthScreen-4HAF86rh.js} +1 -1
- package/dist/assets/{CustomerOnboardingRoutes-CAThwW9P.js → CustomerOnboardingRoutes-CxS9lLTl.js} +1 -1
- package/dist/assets/{DashboardRoutes-CafL1C3x.js → DashboardRoutes-D2v4ZF_E.js} +1 -1
- package/dist/assets/{DefaultTenantHome-BDsIXAxj.js → DefaultTenantHome-Dbi3Jzbe.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-DdvB-Hbh.js → DomesticWireDetailScreen-BHpce-fZ.js} +1 -1
- package/dist/assets/{DrawerScreen-BMmlRoqi.js → DrawerScreen-QceXJJGv.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-CnMM1wvf.js → EntityDetailRoutes-cFyrvi31.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-V-R3AFJQ.js → ExpenseAutomationRoutes-CUBrIS6y.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-CBC6jNb-.js → FeaturePreviewScreen-AUOPnl37.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-CPP6O7Kt.js → HubSpotOAuthCallbackScreen-IFaSwoId.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-BVmPAQoY.js → MagicLinkRoutes-BIAaZldq.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-COv9DoLZ.js → MagicLinkSignInScreen-BVEM6zNA.js} +1 -1
- package/dist/assets/{MobileAppDrawer-BpbByRGV.js → MobileAppDrawer-CLztF99b.js} +1 -1
- package/dist/assets/{NotFoundScreen-CiwLb5Sm.js → NotFoundScreen-BVW1mHQl.js} +1 -1
- package/dist/assets/{NotificationRoutes-DeCoRUH5.js → NotificationRoutes-Bt0oSYPF.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-C5rnSpaM.js → OAuthConsentScreen-86UCYr7M.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-CgREv28H.js → PandLWithForecastRoutes-DDpGKk3b.js} +1 -1
- package/dist/assets/{PeopleRoutes-Cvh7SESL.js → PeopleRoutes-Dj-CT0eD.js} +1 -1
- package/dist/assets/{PerformanceRoutes-DZB5u4lB.js → PerformanceRoutes-DsWM-lYk.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-L9petFDu.js → QBOConnectionScreen-eD76plFQ.js} +1 -1
- package/dist/assets/{ReferralListScreen-Cz3Ll36o.js → ReferralListScreen-DxoomfXt.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-DcR9SJt8.js → ReimbursementApprovalRoutes-B7uUwiM0.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BdjIgOOJ.js → ReimbursementApprovalRuleDetailScreen-B5p0qX7h.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-BOGqzYA3.js → ReimbursementRoutes-Dh1G5yct.js} +1 -1
- package/dist/assets/{ReportsRoutes-tKvN7scu.js → ReportsRoutes-y7MnzGll.js} +1 -1
- package/dist/assets/{RewardsRoutes-DUkSJAe0.js → RewardsRoutes-Fh9U07tc.js} +1 -1
- package/dist/assets/{ScreenRoutes-DvorYiQN.js → ScreenRoutes-B-k_ZyHL.js} +2 -2
- package/dist/assets/{SettingsRoutes-BdrupBKM.js → SettingsRoutes-X4MKf4TH.js} +1 -1
- package/dist/assets/{SetupPagesScreen-C1DrVmba.js → SetupPagesScreen-Uer5YsTX.js} +1 -1
- package/dist/assets/{SignInScreen-BcivZgMD.js → SignInScreen-BpX_mdSj.js} +1 -1
- package/dist/assets/{SignOutScreen-x33X8VDG.js → SignOutScreen-gWOZtfBm.js} +1 -1
- package/dist/assets/{TaskListScreen-CKfjqqhC.js → TaskListScreen-CoC_5M60.js} +1 -1
- package/dist/assets/{TaskRoutes-BNGauwWr.js → TaskRoutes-DEDS1cCa.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-DoEO9RhU.js → TransactionDetailRoutes-BMVLeepD.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-BabZW4yC.js → TransactionDetailScreen-BOsA-UF4.js} +1 -1
- package/dist/assets/{TransactionListRoutes-73dX3i3x.js → TransactionListRoutes-D-o7gV2V.js} +1 -1
- package/dist/assets/{TreasuryRoutes-BXTQGc91.js → TreasuryRoutes-CzaTrrCq.js} +1 -1
- package/dist/assets/{VendorsRoutes-CgVxrKP3.js → VendorsRoutes-CA2szW0j.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-egcHJS2j.js → WiseConfirmationScreen-BcU-8yI5.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-CtmM7uy-.js → ZeniAccountRoutes-B92jFFWR.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-BiD6-8br.js → ZeniAccountStatementScreen-Czxe84tm.js} +1 -1
- package/dist/assets/{analyticsHelper-BLGte-6z.js → analyticsHelper-DO0i_Ozz.js} +1 -1
- package/dist/assets/{getLocaleForTenant-D-xlVXss.js → getLocaleForTenant-B-mnTkE0.js} +1 -1
- package/dist/assets/{index-CWDdvACz.js → index-aKhhTDIh.js} +5 -5
- package/dist/assets/{routePaths-BrOGk8hR.js → routePaths-DQbleX1q.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-CRuBS_0m.js → useAiCfoDashboardSuggestedQuestionsChips-C07ZgQEG.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-0ZlblxUj.js → useAskAiCfoHostNavButtonProps-BY9akMo_.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-DE3A7e2N.js → useInitialThreadRequest-ClxKOF2S.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-3L4TkBmm.js → withTransactionSidePanel-CCFVon-p.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-PtDFv95_.js";import{g as G,h as ge,u as Ce,i as Ie,j as d,n as Se,o as we,p as H}from"./core-BZimyUuM.js";import{eT as M,fp as I,LD as Te,kp as J,qK as X,rz as A,kd as Re,jh as Le,uW as Z,rE as Oe,bt as Ae,LE as Fe,bn as ke,w3 as De,LF as Ee,LG as je,uO as Pe,LH as Y,LI as Me,LJ as ve,LK as Be,LL as Ve,LM as S,LN as F,LO as k,LP as N,LQ as D,LR as E,dG as Ue,vL as xe,vz as q,vA as $,vR as ze,vE as K,vX as Ge,LS as He,LT as Ye,LU as Ne,LV as qe,LW as $e,fa as Ke,f8 as Qe}from"./zeni-epic-state-D1RAQ_Ab.js";import{K as We,M as Je,Q as Xe,V as Ze,J as ea,a as ee,x as j,z as ae,W as aa,A as sa,c as ta,X as oa,Y as na,v as ra,d as P,f as ia,_ as la,q as se,a0 as ca,a1 as da,a2 as pa}from"./index-CWDdvACz.js";import"./mui-BcLZDyi8.js";import fa from"./NotFoundScreen-CiwLb5Sm.js";import{F as ma}from"./FeaturePreviewScreen-CBC6jNb-.js";import{a as _}from"./sentry-mCXLUbmc.js";import{u as ua}from"./useInitialThreadRequest-DE3A7e2N.js";import{t as Q,a as W,b as _a}from"./routePaths-BrOGk8hR.js";import{M as ha}from"./MobileAppDrawer-BpbByRGV.js";import"./recharts-Nefi66IQ.js";import"./analytics-CVef-z80.js";import"./plaid-CooQT--5.js";import"./dnd-Ck7mLEKI.js";import"./stripe-DMRn4zHo.js";import"./lottie-D7iBAvwy.js";import"./lexical-D_s6IbSB.js";import"./pdf-CPbk6pQ4.js";import"./utils-C9yOAUzR.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]="fb42db21-7297-435f-96e9-960b6d2b2904",e._sentryDebugIdIdentifier="sentry-dbid-fb42db21-7297-435f-96e9-960b6d2b2904")}catch{}})();const ba=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(E({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(F({resetLeftScroll:!0}))},ya=e=>{e(Ye()),e(Ne()),e(qe()),e($e())},ga=Se(function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=M(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=I(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:J(e),isAccountingProjectsEnabled:X(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(A(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(g=>g!=="this_period_vs_same_period_last_year"&&g!=="this_period_vs_same_period_last_year_percent"&&g!=="same_period_last_year")),e(q(o.firstMonthOfFY,r,c.numberOfPeriods<1?1:c.numberOfPeriods,i)),m.length>0&&e($(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(S(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(K({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(K(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(q(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e($(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>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 Q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return W(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?W(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,l):a.accountType!=null?Q(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:w(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(E({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(E({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",w(o.selectedReportID)),e(S("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",w(o.selectedReportID)),e(S("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",w(o.selectedReportID)),e(S("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(ve({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Me({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(Y({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(Z())},onUpdateDisplayOrder:a=>{e(je(a))},onUpdateReportFormat:a=>{ya(e),e(Ee(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}})(ca);function Ca(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Ze(),f=ea(),u=da(f),a=ge(),s=Ce(),t=G(),{tenantEmailDomain:r}=Ie(),{useFeatureGate:l}=ee(),{isFeatureEnabled:m}=l(j.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,g]=_.useState(!1),[v,te]=_.useState(!1),{isFeatureEnabled:B}=l(j.isReportsCommentingEnabled);if(c==null)throw Error("Can't access reports page without signing in...");const T=d(n=>M(n)),oe=T.masterTOSInfo?.isMasterTOSAccepted??!1,ne=T.company?.companyInfo.firstMonthOfFY??1,re=ua(B?T?.companyId:void 0),C=d(n=>I(n).fetchState),ie=d(n=>Te(n)),{areTenantIdsInSync:h}=aa(),R=d(n=>n.financeStatementState.selectedReportId),V=d(n=>J(n)),L=d(n=>X(n)),le=d(n=>I(n).isCompareModeOn),b=d(n=>I(n).filter),O=d(n=>I(n).selectedReportAndTimeframeFetchState),ce=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(g(!0),s(A(c.userId,!0,!0,!1)))},[i,c,s,h]),_.useEffect(()=>{i&&!v&&C==="Completed"&&h&&(s(A(c.userId,!1,!0,!1)),te(!0))},[i,v,C,h]),_.useEffect(()=>{if(i&&O.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Oe(b.timeframe));break;case"profit_and_loss_by_projects":L&&s(Z());break;case"balance_sheet":s(Le(b.timeframe));break;case"cash_flow":s(Re(b.timeframe))}},[i,R,O,h,V,L]);const U=sa(),de=U?.loggedInUserRole!=null&&Ae(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=We(he??"")==="reports",be=Je(_e),ye=_.useMemo(()=>z?ba:void 0,[z]);Xe({canFetchSuggestedQuestions:be,pageContexts:ye})}({isDataReady:C==="Completed"}),na({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(ra,{analytics:P,onLoad:n=>n.trackPageLoaded(ia.Event.reports)}):null,p.jsx(ha,{isAppContentDrawerOpen:pe,handleDrawerToggle:x}),p.jsx(ga,{firstMonthOfFY:ne,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:ce,selectedReportID:R,analytics:P,filter:b,isAccountingClassesEnabled:V,isAccountingProjectsEnabled:L,isCompareModeOn:le,hasTransactionAccess:de,signedInUser:c,selectedReportAndTimeframeFetchState:O,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 w=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function za(){const e=d(s=>M(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(j.isDebitCardFeatureEnabled),u=Ke(f,e),a=Qe(e);return u===!0||a===!0?p.jsx(ma,{}):p.jsxs(we,{children:[p.jsx(H,{path:"/",element:p.jsx(Ca,{})}),p.jsx(H,{path:"*",element:p.jsx(fa,{})})]})}export{za as default};
|
|
1
|
+
import{j as p}from"./liveblocks-PtDFv95_.js";import{g as G,h as ge,u as Ce,i as Ie,j as d,n as Se,o as we,p as H}from"./core-BZimyUuM.js";import{eT as M,fp as I,LD as Te,kp as J,qK as X,rz as A,kd as Re,jh as Le,uW as Z,rE as Oe,bt as Ae,LE as Fe,bn as ke,w3 as De,LF as Ee,LG as je,uO as Pe,LH as Y,LI as Me,LJ as ve,LK as Be,LL as Ve,LM as S,LN as F,LO as k,LP as N,LQ as D,LR as E,dG as Ue,vL as xe,vz as q,vA as $,vR as ze,vE as K,vX as Ge,LS as He,LT as Ye,LU as Ne,LV as qe,LW as $e,fa as Ke,f8 as Qe}from"./zeni-epic-state-D1RAQ_Ab.js";import{K as We,M as Je,Q as Xe,V as Ze,J as ea,a as ee,x as j,z as ae,W as aa,A as sa,c as ta,X as oa,Y as na,v as ra,d as P,f as ia,_ as la,q as se,a0 as ca,a1 as da,a2 as pa}from"./index-aKhhTDIh.js";import"./mui-BcLZDyi8.js";import fa from"./NotFoundScreen-BVW1mHQl.js";import{F as ma}from"./FeaturePreviewScreen-AUOPnl37.js";import{a as _}from"./sentry-mCXLUbmc.js";import{u as ua}from"./useInitialThreadRequest-ClxKOF2S.js";import{t as Q,a as W,b as _a}from"./routePaths-DQbleX1q.js";import{M as ha}from"./MobileAppDrawer-CLztF99b.js";import"./recharts-Nefi66IQ.js";import"./analytics-CVef-z80.js";import"./plaid-CooQT--5.js";import"./dnd-Ck7mLEKI.js";import"./stripe-DMRn4zHo.js";import"./lottie-D7iBAvwy.js";import"./lexical-D_s6IbSB.js";import"./pdf-CPbk6pQ4.js";import"./utils-C9yOAUzR.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]="fb42db21-7297-435f-96e9-960b6d2b2904",e._sentryDebugIdIdentifier="sentry-dbid-fb42db21-7297-435f-96e9-960b6d2b2904")}catch{}})();const ba=["profit_loss","balance_sheet","cash_flow"],y=e=>{e(E({resetLeftScroll:!0})),e(D({resetLeftScroll:!0})),e(k({resetLeftScroll:!0})),e(F({resetLeftScroll:!0}))},ya=e=>{e(Ye()),e(Ne()),e(qe()),e($e())},ga=Se(function(e){const o=ae.getSignedInUser(),f=e.tenantState.currentTenantId,u=M(e),a=u?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:f??""},t=I(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:J(e),isAccountingProjectsEnabled:X(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(A(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(g=>g!=="this_period_vs_same_period_last_year"&&g!=="this_period_vs_same_period_last_year_percent"&&g!=="same_period_last_year")),e(q(o.firstMonthOfFY,r,c.numberOfPeriods<1?1:c.numberOfPeriods,i)),m.length>0&&e($(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(S(a)),(a==="balance_sheet"||a==="cash_flow")&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(K({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(K(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(q(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e($(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),r!==!0&&o.isCompareModeOn===a||setTimeout(()=>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 Q(o.tenantEmailDomain,a.accountId,a.accountType,m,r,l);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return W(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?W(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],m,r,l):a.accountType!=null?Q(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:w(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(E({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(E({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",w(o.selectedReportID)),e(S("profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",w(o.selectedReportID)),e(S("profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",w(o.selectedReportID)),e(S("profit_and_loss"))),y(e)},onUpdateClassesToFilterOut:a=>{e(ve({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{e(Me({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(Y({classViewLayout:a}))},onOpenAccountViewMode:()=>{o.isAccountingClassesEnabled&&e(Pe()),o.isAccountingProjectsEnabled&&e(Z())},onUpdateDisplayOrder:a=>{e(je(a))},onUpdateReportFormat:a=>{ya(e),e(Ee(a))},onClickMenuIcon:()=>{u(!0)},onResyncReports:()=>{e(De("profit_and_loss_by_classes"))}}})(ca);function Ca(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=Ze(),f=ea(),u=da(f),a=ge(),s=Ce(),t=G(),{tenantEmailDomain:r}=Ie(),{useFeatureGate:l}=ee(),{isFeatureEnabled:m}=l(j.isReportsHorizontalClassLayoutSwitchEnabled),c=ae.getSignedInUser(),[i,g]=_.useState(!1),[v,te]=_.useState(!1),{isFeatureEnabled:B}=l(j.isReportsCommentingEnabled);if(c==null)throw Error("Can't access reports page without signing in...");const T=d(n=>M(n)),oe=T.masterTOSInfo?.isMasterTOSAccepted??!1,ne=T.company?.companyInfo.firstMonthOfFY??1,re=ua(B?T?.companyId:void 0),C=d(n=>I(n).fetchState),ie=d(n=>Te(n)),{areTenantIdsInSync:h}=aa(),R=d(n=>n.financeStatementState.selectedReportId),V=d(n=>J(n)),L=d(n=>X(n)),le=d(n=>I(n).isCompareModeOn),b=d(n=>I(n).filter),O=d(n=>I(n).selectedReportAndTimeframeFetchState),ce=d(n=>n.profitAndLossClassesViewState.uiState.classViewLayout);_.useEffect(()=>{!i&&h&&(g(!0),s(A(c.userId,!0,!0,!1)))},[i,c,s,h]),_.useEffect(()=>{i&&!v&&C==="Completed"&&h&&(s(A(c.userId,!1,!0,!1)),te(!0))},[i,v,C,h]),_.useEffect(()=>{if(i&&O.fetchState==="Not-Started"&&b.timeframe!=="free_range"&&b.timeframe!=="week"&&h)switch(R){case"profit_and_loss":case"profit_and_loss_by_classes":s(Oe(b.timeframe));break;case"profit_and_loss_by_projects":L&&s(Z());break;case"balance_sheet":s(Le(b.timeframe));break;case"cash_flow":s(Re(b.timeframe))}},[i,R,O,h,V,L]);const U=sa(),de=U?.loggedInUserRole!=null&&Ae(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=We(he??"")==="reports",be=Je(_e),ye=_.useMemo(()=>z?ba:void 0,[z]);Xe({canFetchSuggestedQuestions:be,pageContexts:ye})}({isDataReady:C==="Completed"}),na({isDataReady:C==="Completed"}),p.jsxs(p.Fragment,{children:[C==="Completed"?p.jsx(ra,{analytics:P,onLoad:n=>n.trackPageLoaded(ia.Event.reports)}):null,p.jsx(ha,{isAppContentDrawerOpen:pe,handleDrawerToggle:x}),p.jsx(ga,{firstMonthOfFY:ne,tenantEmailDomain:r,location:t,navigate:a,windowSize:f,classViewLayout:ce,selectedReportID:R,analytics:P,filter:b,isAccountingClassesEnabled:V,isAccountingProjectsEnabled:L,isCompareModeOn:le,hasTransactionAccess:de,signedInUser:c,selectedReportAndTimeframeFetchState:O,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 w=e=>{switch(e){case"profit_and_loss":return"Profit & Loss";case"balance_sheet":return"Balance Sheet";case"cash_flow":return"Cash Flow";default:return"Reports"}};function za(){const e=d(s=>M(s)),{useFeatureGate:o}=ee(),{isFeatureEnabled:f}=o(j.isDebitCardFeatureEnabled),u=Ke(f,e),a=Qe(e);return u===!0||a===!0?p.jsx(ma,{}):p.jsxs(we,{children:[p.jsx(H,{path:"/",element:p.jsx(Ca,{})}),p.jsx(H,{path:"*",element:p.jsx(fa,{})})]})}export{za as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-PtDFv95_.js";import{a as j,z as w,aN as h,v as E,d as p,f as F,c_ as P,x as L}from"./index-
|
|
1
|
+
import{j as a}from"./liveblocks-PtDFv95_.js";import{a as j,z as w,aN as h,v as E,d as p,f as F,c_ as P,x as L}from"./index-aKhhTDIh.js";import"./mui-BcLZDyi8.js";import m from"./NotFoundScreen-BVW1mHQl.js";import{a as f}from"./sentry-mCXLUbmc.js";import{u as T,j as y,h as V,g as A,n as R,o as U,p as u}from"./core-BZimyUuM.js";import{eT as z,SI as v,P0 as Y,SJ as C,vq as q,fg as G,SK as J,vo as K}from"./zeni-epic-state-D1RAQ_Ab.js";import{R as x}from"./ReferralListScreen-DxoomfXt.js";import"./recharts-Nefi66IQ.js";import"./analytics-CVef-z80.js";import"./plaid-CooQT--5.js";import"./dnd-Ck7mLEKI.js";import"./stripe-DMRn4zHo.js";import"./lottie-D7iBAvwy.js";import"./lexical-D_s6IbSB.js";import"./pdf-CPbk6pQ4.js";import"./utils-C9yOAUzR.js";import"./useAskAiCfoHostNavButtonProps-BY9akMo_.js";import"./MobileAppDrawer-CLztF99b.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]="3b7fede5-bfe5-44bb-be3b-3a8515e5964b",e._sentryDebugIdIdentifier="sentry-dbid-3b7fede5-bfe5-44bb-be3b-3a8515e5964b")}catch{}})();const O=R(function(e,t){const n=v(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=w.getSignedInUser();return{onDismissClick:()=>{e(C()),n("..")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach(c=>{s.push(c.companyName),r.push(c.emailIds[0])}),p.trackInviteEmailClicked("send",s,r,s.length)}e(K())},onUpdateInviteFormLocalData:s=>{e(J({localData:s}))},onSubmitSuccess:()=>{n("../../")},onCancelClick:()=>{i!=null&&p.trackInviteEmailClicked("cancel")}}})(P),B=()=>{const e=T(),[t,n]=f.useState(!1),[i,s]=f.useState(!1),r=y(o=>z(o)),c=V(),S=A(),{useDynamicConfig:g}=j(),d=w.getSignedInUser();if(d==null)throw Error("Can't access invite referral screen without signing in...");const l=y(o=>v(o)),_=d?.firstName!=null?d.firstName:"User",{configValue:b}=g(h.zeniCardsConfig),{configValue:D}=g(h.zeniAccountsConfig),k=Y(D);f.useEffect(()=>{e(C()),r?.rewardsLastViewedTime==null&&i===!1&&(e(q()),s(!0))},[]),f.useEffect(()=>{t||l.fetchState!=="Not-Started"||(n(!0),e(G(!0)))},[l.fetchState,e]);const I=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[l.fetchState==="Completed"?a.jsx(E,{analytics:p,onLoad:o=>(N=>N.trackPageLoaded(F.Event.inviteEmailViewed))(o)}):null,a.jsx(O,{navigate:c,location:S,currentTenant:r,companyName:I,userName:_,inviteFormCompayData:l.localData,chargeCardCashbackRatePerTransaction:b.charge_card_cashback_rate_per_transaction!=null?b.charge_card_cashback_rate_per_transaction:.0175,maxAnnualPercentageYield:k.maxAnnualPercentageYield})]})};function ue(){const{useFeatureGate:e}=j(),{isFeatureEnabled:t}=e(L.isReferralFeatureEnabled);return a.jsxs(U,{children:[a.jsx(u,{path:"/",element:t?a.jsx(x,{}):a.jsx(m,{})}),a.jsx(u,{path:"how-it-works",element:t?a.jsx(x,{isReferralDrawerOpen:!0}):a.jsx(m,{})}),a.jsx(u,{path:"refer/*",element:t?a.jsx(B,{}):a.jsx(m,{})}),a.jsx(u,{path:"*",element:a.jsx(m,{})})]})}export{ue as default};
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-
|
|
2
|
-
import{_ as a,bn as ls,eT as cs,fa as ds,f8 as ms,f9 as us,gf as _s,e_ as Es,cQ as Ae,cy as ps,fq as As,cq as xs,bE as gs,bq as Is,fv as Ts,v as js,L9 as hs,bt as Us,La as bs,bG as Hs,fs as Rs,bF as Ds,bs as ys,cm as fs,Lb as Cs,Lc as vs,cN as Os,cP as Ps,cO as Fs,cx as Ls,cD as ks,o2 as xe,f6 as ge,gp as Bs,fz as Ie,gm as Te,gn as je,fA as Vs}from"./zeni-epic-state-D1RAQ_Ab.js";import{j as e}from"./liveblocks-PtDFv95_.js";import{a as v}from"./sentry-mCXLUbmc.js";import{u as Ss,h as Ns,i as Ms,g as Zs,j as G,l as he,N as c,o as ws,p as t}from"./core-BZimyUuM.js";import{m as zs,u as Gs,z as H,a as $s,c as qs,g as Ys,x as L,A as Ws,L as k,O as Ue,t as _,P as Qs,d as se,l}from"./index-CWDdvACz.js";import"./mui-BcLZDyi8.js";import{f as be}from"./analyticsHelper-BLGte-6z.js";import{t as Js}from"./getLocaleForTenant-D-xlVXss.js";import"./recharts-Nefi66IQ.js";import"./analytics-CVef-z80.js";import"./plaid-CooQT--5.js";import"./dnd-Ck7mLEKI.js";import"./stripe-DMRn4zHo.js";import"./lottie-D7iBAvwy.js";import"./lexical-D_s6IbSB.js";import"./pdf-CPbk6pQ4.js";import"./utils-C9yOAUzR.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new i.Error().stack;U&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[U]="41d9d694-d16f-4783-8d80-2b1692149b10",i._sentryDebugIdIdentifier="sentry-dbid-41d9d694-d16f-4783-8d80-2b1692149b10")}catch{}})();const Ks={dashboard:()=>a(()=>import("./DashboardRoutes-CafL1C3x.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),bills:()=>a(()=>import("./BillPayRoutes-CcQHQh3Z.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21])),reimbursement:()=>a(()=>import("./ReimbursementRoutes-BOGqzYA3.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21])),transactions:()=>a(()=>import("./TransactionListRoutes-73dX3i3x.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21])),settings:()=>a(()=>import("./SettingsRoutes-BdrupBKM.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21])),reports:()=>a(()=>import("./ReportsRoutes-tKvN7scu.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21])),chargeCards:()=>a(()=>import("./ChargeCardRoutes-D8Tom0l5.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,26,13,15,12,27,14,23,21])),people:()=>a(()=>import("./PeopleRoutes-Cvh7SESL.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21])),expenseAutomation:()=>a(()=>import("./ExpenseAutomationRoutes-V-R3AFJQ.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21])),treasury:()=>a(()=>import("./TreasuryRoutes-BXTQGc91.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21])),vendors:()=>a(()=>import("./VendorsRoutes-CgVxrKP3.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21])),zeniAccounts:()=>a(()=>import("./ZeniAccountRoutes-CtmM7uy-.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))},Xs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ae=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},ea=l(()=>a(()=>import("./ReportsRoutes-tKvN7scu.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21]))),sa=l(()=>a(()=>import("./AddressRoutes-8gRhHPlq.js"),__vite__mapDeps([50,1,2,3,23,4,5,6,7,13,21]))),aa=l(()=>a(()=>import("./PeopleRoutes-Cvh7SESL.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21]))),na=l(()=>a(()=>import("./PandLWithForecastRoutes-CgREv28H.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,13,19,9,14,12,17,21]))),ta=l(()=>a(()=>import("./CustomerOnboardingRoutes-CAThwW9P.js"),__vite__mapDeps([52,1,2,3,23,4,5,6,7,13,37,38,39,40,41,11,21]))),ia=l(()=>a(()=>import("./VendorsRoutes-CgVxrKP3.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21]))),ra=l(()=>a(()=>import("./TransactionDetailRoutes-DoEO9RhU.js"),__vite__mapDeps([53,1,2,3,13,4,5,6,7,10,9,11,12,21]))),He=l(()=>a(()=>import("./EntityDetailRoutes-CnMM1wvf.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,11,8,9,10,12,21]))),oa=l(()=>a(()=>import("./DashboardRoutes-CafL1C3x.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]))),Re=l(()=>a(()=>import("./BillPayRoutes-CcQHQh3Z.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21]))),la=l(()=>a(()=>import("./SettingsRoutes-BdrupBKM.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21]))),De=l(()=>a(()=>import("./ReimbursementRoutes-BOGqzYA3.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21]))),ca=l(()=>a(()=>import("./ZeniAccountRoutes-CtmM7uy-.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))),da=l(()=>a(()=>import("./TreasuryRoutes-BXTQGc91.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21]))),ma=l(()=>a(()=>import("./TransactionListRoutes-73dX3i3x.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21]))),ua=l(()=>a(()=>import("./ChargeCardRoutes-D8Tom0l5.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,26,13,15,12,27,14,23,21]))),_a=l(()=>a(()=>import("./NotificationRoutes-DeCoRUH5.js"),__vite__mapDeps([55,1,2,3,13,4,5,6,7,9,21]))),Ea=l(()=>a(()=>import("./PerformanceRoutes-DZB5u4lB.js"),__vite__mapDeps([56,1,2,3,13,4,5,6,7,9,17,21]))),pa=l(()=>a(()=>import("./ExpenseAutomationRoutes-V-R3AFJQ.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21]))),Aa=l(()=>a(()=>import("./RewardsRoutes-DUkSJAe0.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,13,20,9,17,21]))),xa=l(()=>a(()=>import("./TaskRoutes-BNGauwWr.js"),__vite__mapDeps([58,1,2,3,13,4,5,6,7,14,17,59,9,21]))),ga=l(()=>a(()=>import("./AiCfoScreen-Bp7iBQCF.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,18,48,21]))),ye=l(()=>a(()=>import("./CardsAiCfoScreen-Cn4K24os.js"),__vite__mapDeps([61,1,2,3,7,4,5,6,21]))),D=l(()=>a(()=>import("./NotFoundScreen-CiwLb5Sm.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,21]))),Ia=l(()=>a(()=>import("./TaskListScreen-CKfjqqhC.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,17,21])));function wa({setTenantEmailDomain:i}){const U=Ss(),V=Ns(),{tenantEmailDomain:o}=Ms(),S=zs().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=Gs(),y=H.getSignedInUserTenant(o)?.tenantId,j=H.getSignedInUser(),J=ls(j),$=Zs(),[N,Ce]=v.useState(!1),r=G(n=>cs(n)),{useFeatureGate:P}=$s(),w=qs(),ve=Ys(),{isFeatureEnabled:Oe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Pe}=P(L.isExpenseAutomationEnabledV2),Fe=Pe||Oe&&J,{isFeatureEnabled:Le}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:ke}=P(L.isTreasuryEnabled),{isFeatureEnabled:Be}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:ne}=P(L.isDebitCardFeatureEnabled),h=G(n=>n.tenantState.fetchState),p=G(n=>n.tenantState.activeTenantFetchState.fetchState),u=p==="Completed"||h==="Completed"?ds(ne,r):void 0,q=p==="Completed"||h==="Completed"?ms(r):void 0,Ve=p==="Completed"||h==="Completed"?us(r):void 0,Se=Be||ne||!!Ve||!!q||!!u,{isFeatureEnabled:Ne}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:K}=P(L.isAiCfoFileUploadEnabled),Y=G(n=>_s(n));if(o!=null){const n=H.getSignedInUserTenant(o);j!=null&&n!=null&&be(j,r,S)}const z={tenantId:y,userId:j?.userId,sessionId:j?.zeniSessionId},te=Es(),E=Ws(),Me=r.company==null||E?.loggedInUserRoleMap!=null&&Ae(E.loggedInUserRole),Ze=ps(E?.loggedInUserRoleMap),ie=v.useRef(!0),re=he("/:tenantEmailDomain/onboarding/*")!==null,X=he("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),we=G(n=>z.tenantId!=null?As(n,z.tenantId):void 0);v.useEffect(()=>{f(k.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(X!=null&&y!=null){const n=X.params.selectedPeriod;if(n!=null){const b=n.split("-");if(b.length===2){const d=xs(Number(b[0])),s=Number(b[1]),m=gs(`01-${d<10?`0${d}`:d}-${s}`,Ue.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=Is();m.isAfter(M,"month")===!1?U(Ts(y,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[X,y]),v.useEffect(()=>{N||(Ce(!0),f(k.TENANT_FETCHING)),ie.current?ie.current=!1:!js(te,z)&&H.isSignedIn()&&(f(k.TENANT_FETCHING),function(n,b,d,s){if(ge(b?.userId,b?.zeniSessionId,n.tenantId),d(Bs(!0)),d(Ie(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const m=H.getSignedInUserTenantWithId(n.tenantId);s&&Ue.updateAppLocaleID(Js(s)),m?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}n.userId!=null?se.identify(n.userId,{tenant_id:n.tenantId}):se.resetUserIdentity()}(z,j,U,we))},[z,te,j,U,H]),v.useEffect(()=>{H.isSignedIn()&&(f(k.TENANT_FETCHING),function(n,b,d,s,m,M,B){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const W=s!=null&&m?.zeniSessionId!=null,is=d==null||d.tenantId!==s,rs=d!=null&&d.excludedResources==null,os=d!=null&&d.externalConnections==null;if(W&&is){B(Ie(s));const Q=H.getSignedInUserTenantWithId(s);Q?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(Q?.tenantEmailDomain),ge(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),B(Te(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),B(je(m.userId,s)))}else W&&rs&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),B(Te(m.userId,s))),W&&os&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),B(je(m.userId,s)));if(W){se.identify(m.userId,{tenant_id:s});const Q=s==null||s!=null&&(b==="Completed"||b==="Error");n==="Completed"||b!=="Not-Started"&&b!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(k.TENANT_FETCHING),B(Vs(m.userId,s,m.zeniSessionId))),Q&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),B(xe(m.userId,m.zeniSessionId)))}}(h,p,r,y,j,f,U))},[y,p]),v.useEffect(()=>{H.isSignedIn()&&h==="Completed"&&Y.tenantsBaseInOrder.length>0&&(Z(k.TENANT_FETCHING),H.saveSignedInUserTenants(hs(Y.tenantsBaseInOrder)),j!=null&&be(j,r,S,void 0,Y.tenantsBaseInOrder))},[Y,h,r,j]),v.useEffect(()=>{p==="In-Progress"&&f(k.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&y!=null?(O(),_.markActiveTenantFetchCompleted(y)):p==="Error"&&y!=null&&(_.markActiveTenantFetchFailed(y),Z(k.TENANT_FETCHING),Z(k.TENANT_SWITCHING))),h!=="Completed"&&h!=="Error"||(h==="Completed"?_.markAllTenantsFetchCompleted():h==="Error"&&_.markAllTenantsFetchFailed())},[p,h,y,N]);const oe=v.useRef(!1);v.useEffect(()=>{!oe.current&&p==="Completed"&&N&&(oe.current=!0,function(n=Xs,b=3e3){setTimeout(()=>{const d=s=>{if(s>=n.length)return;const m=n[s],M=Ks[m];M!=null?M().then(()=>ae(()=>d(s+1))).catch(()=>ae(()=>d(s+1))):d(s+1)};ae(()=>d(0))},b)}())},[p,N]);const C=r?.userRole!=null&&Us(r?.userRole),{isFeatureEnabled:ze}=P(L.isReferralFeatureEnabled),Ge=r?.userRole!=null&&r.userRole.includes("charge_card_user"),$e=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ae(r.userRole),le=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,ce=Se&&!C,qe=bs(E?.loggedInUserRoleMap),Ye=r.externalConnections?.accounting[0]?.isValid,de=r.company?.companyOnboardingInfo.isOnboardingCompleted,me=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,ue=me&&Hs(E?.loggedInUserRoleMap),_e=Le&&!C,We=r.company!=null&&Rs(r.company),Qe=ke&&We===!0&&!C,Je=le&&Ds(E?.loggedInUserRoleMap),Ke=ce&&ys(E?.loggedInUserRoleMap),Xe=_e&&fs(E?.loggedInUserRoleMap),es=Cs(E?.loggedInUserRoleMap),ss=vs(E?.loggedInUserRoleMap),A=Os(E?.loggedInUserRoleMap),x=Ps(E?.loggedInUserRoleMap),g=Fs(E?.loggedInUserRoleMap),I=Ls(E?.loggedInUserRoleMap),T=ks(E?.loggedInUserRoleMap),Ee=le&&I,pe=me&&T,as=_e&&A,ns=Qe&&x,ee=ce&&g,ts=r.excludedResources?.resources?.find(n=>n.resource==="/invites")!=null||Ze===!0||qe===!0||es===!0||ss===!0;return H.isSignedIn()?y==null?h==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(j!=null&&h!=="In-Progress"&&U(xe(j.userId,j.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||h==="Completed"?(de===!0||J&&!re)&&Ye===!1&&u===!1&&q===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||de!==!1||re||J?N&&r?.userRole&&u!=null&&q!=null&&o!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(ws,{children:e.jsxs(t,{element:e.jsx(Qs,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Ta,{isDashboardAccess:F,isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,isTenantCardsOnly:q})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(oa,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(ea,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:ts||F?e.jsx(aa,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(na,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(ta,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||Ge||$e?e.jsx(ra,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(ma,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(He,{entityType:"customer"}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:x,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(He,{entityType:"vendor"}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(Ia,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(xa,{})}),e.jsx(t,{path:"address/*",element:Je||ue||Xe||Ke?e.jsx(sa,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:as?e.jsx(ca,{}):e.jsx(D,{})}),e.jsx(t,{path:"treasury/*",element:ns?e.jsx(da,{}):e.jsx(D,{})}),e.jsx(t,{path:"performance",element:ve?e.jsx(Ea,{}):e.jsx(fe,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:Fe&&C===!1?e.jsx(pa,{}):e.jsx(fe,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(_a,{})}),e.jsx(t,{path:"vendors/*",element:Me?e.jsx(ia,{}):e.jsx(D,{})}),e.jsx(t,{path:"bill/*",element:Ee?e.jsx(Re,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:Ee?e.jsx(Re,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:pe?e.jsx(De,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:pe?e.jsx(De,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:Ne?e.jsx(la,{hasAdminLevelAccess:ue}):e.jsx(D,{})}),e.jsx(t,{path:"cards/ask",element:ee&&w?e.jsx(ye,{isFileUploadEnabled:K}):e.jsx(D,{})}),e.jsx(t,{path:"cards/ask/:session_id",element:ee&&w?e.jsx(ye,{isFileUploadEnabled:K}):e.jsx(D,{})}),e.jsx(t,{path:"cards/*",element:ee?e.jsx(ua,{}):e.jsx(D,{})}),e.jsx(t,{path:"rewards/*",element:ze?e.jsx(Aa,{}):e.jsx(D,{})}),e.jsx(t,{path:"/ai-cfo",element:w?e.jsx(c,{to:"explore"}):e.jsx(D,{})}),e.jsx(t,{path:"/ai-cfo/",element:w?e.jsx(c,{to:"explore"}):e.jsx(D,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:w?e.jsx(ga,{isFileUploadEnabled:K}):e.jsx(D,{})}),e.jsx(t,{path:"*",element:e.jsx(D,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}const Ta=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:f,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):f?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),R=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:f,tenantEmailDomain:O})=>f===!0||i?e.jsx(ba,{tenantEmailDomain:O}):S?e.jsx(Ua,{tenantEmailDomain:O}):U?e.jsx(Ha,{tenantEmailDomain:O}):V?e.jsx(ha,{tenantEmailDomain:O}):o?e.jsx(ja,{tenantEmailDomain:O}):e.jsx(D,{}),ja=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),ha=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Ua=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),ba=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Ha=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),fe=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{R as FallBackRoute,wa as default};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/DashboardRoutes-D2v4ZF_E.js","assets/sentry-mCXLUbmc.js","assets/core-BZimyUuM.js","assets/zeni-epic-state-D1RAQ_Ab.js","assets/index-aKhhTDIh.js","assets/mui-BcLZDyi8.js","assets/analytics-CVef-z80.js","assets/utils-C9yOAUzR.js","assets/withTransactionSidePanel-CCFVon-p.js","assets/useAskAiCfoHostNavButtonProps-BY9akMo_.js","assets/TransactionDetailScreen-BOsA-UF4.js","assets/decodeURIComponentSafe-CfH0YvB4.js","assets/routePaths-DQbleX1q.js","assets/NotFoundScreen-BVW1mHQl.js","assets/useInitialThreadRequest-ClxKOF2S.js","assets/analyticsHelper-DO0i_Ozz.js","assets/CompanyPassportScreen-BOxFkTz6.js","assets/MobileAppDrawer-CLztF99b.js","assets/useAiCfoDashboardSuggestedQuestionsChips-C07ZgQEG.js","assets/FeaturePreviewScreen-AUOPnl37.js","assets/ReferralListScreen-DxoomfXt.js","assets/index-BUmr5maU.css","assets/BillPayRoutes-Bna0uGqV.js","assets/AddressScreen-BF-3RAYM.js","assets/DomesticWireDetailScreen-BHpce-fZ.js","assets/DrawerScreen-QceXJJGv.js","assets/SetupPagesScreen-Uer5YsTX.js","assets/BusinessVerificationPageScreen-0dmMGz8A.js","assets/BillPayApprovalRoutes-QJ1EpW6M.js","assets/ReimbursementApprovalRuleDetailScreen-B5p0qX7h.js","assets/getLocaleForTenant-B-mnTkE0.js","assets/ReimbursementRoutes-Dh1G5yct.js","assets/ReimbursementApprovalRoutes-B7uUwiM0.js","assets/TransactionListRoutes-D-o7gV2V.js","assets/ZeniAccountStatementScreen-Czxe84tm.js","assets/SettingsRoutes-X4MKf4TH.js","assets/accountMappingHelper-CUOH4oaZ.js","assets/QBOConnectionScreen-eD76plFQ.js","assets/empty-B1O8rDIf.js","assets/index-B4buEPtI.js","assets/url-DwL5mRAv.js","assets/index-ky9cAsxd.js","assets/ReportsRoutes-y7MnzGll.js","assets/ChargeCardRoutes-DKr2nu1e.js","assets/PeopleRoutes-Dj-CT0eD.js","assets/ExpenseAutomationRoutes-CUBrIS6y.js","assets/TreasuryRoutes-CzaTrrCq.js","assets/VendorsRoutes-CA2szW0j.js","assets/pathToGoBack-Bmk3vSys.js","assets/ZeniAccountRoutes-B92jFFWR.js","assets/AddressRoutes-B61fN_Ku.js","assets/PandLWithForecastRoutes-DDpGKk3b.js","assets/CustomerOnboardingRoutes-CxS9lLTl.js","assets/TransactionDetailRoutes-BMVLeepD.js","assets/EntityDetailRoutes-cFyrvi31.js","assets/NotificationRoutes-Bt0oSYPF.js","assets/PerformanceRoutes-DsWM-lYk.js","assets/RewardsRoutes-Fh9U07tc.js","assets/TaskRoutes-DEDS1cCa.js","assets/TaskListScreen-CoC_5M60.js","assets/AiCfoScreen-BPdC66wo.js","assets/CardsAiCfoScreen-BtSV6YdK.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as a,bn as ls,eT as cs,fa as ds,f8 as ms,f9 as us,gf as _s,e_ as Es,cQ as Ae,cy as ps,fq as As,cq as xs,bE as gs,bq as Is,fv as Ts,v as js,L9 as hs,bt as Us,La as bs,bG as Hs,fs as Rs,bF as Ds,bs as ys,cm as fs,Lb as Cs,Lc as vs,cN as Os,cP as Ps,cO as Fs,cx as Ls,cD as ks,o2 as xe,f6 as ge,gp as Bs,fz as Ie,gm as Te,gn as je,fA as Vs}from"./zeni-epic-state-D1RAQ_Ab.js";import{j as e}from"./liveblocks-PtDFv95_.js";import{a as v}from"./sentry-mCXLUbmc.js";import{u as Ss,h as Ns,i as Ms,g as Zs,j as G,l as he,N as c,o as ws,p as t}from"./core-BZimyUuM.js";import{m as zs,u as Gs,z as H,a as $s,c as qs,g as Ys,x as L,A as Ws,L as k,O as Ue,t as _,P as Qs,d as se,l}from"./index-aKhhTDIh.js";import"./mui-BcLZDyi8.js";import{f as be}from"./analyticsHelper-DO0i_Ozz.js";import{t as Js}from"./getLocaleForTenant-B-mnTkE0.js";import"./recharts-Nefi66IQ.js";import"./analytics-CVef-z80.js";import"./plaid-CooQT--5.js";import"./dnd-Ck7mLEKI.js";import"./stripe-DMRn4zHo.js";import"./lottie-D7iBAvwy.js";import"./lexical-D_s6IbSB.js";import"./pdf-CPbk6pQ4.js";import"./utils-C9yOAUzR.js";(function(){try{var i=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},U=new i.Error().stack;U&&(i._sentryDebugIds=i._sentryDebugIds||{},i._sentryDebugIds[U]="41d9d694-d16f-4783-8d80-2b1692149b10",i._sentryDebugIdIdentifier="sentry-dbid-41d9d694-d16f-4783-8d80-2b1692149b10")}catch{}})();const Ks={dashboard:()=>a(()=>import("./DashboardRoutes-D2v4ZF_E.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21])),bills:()=>a(()=>import("./BillPayRoutes-Bna0uGqV.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21])),reimbursement:()=>a(()=>import("./ReimbursementRoutes-Dh1G5yct.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21])),transactions:()=>a(()=>import("./TransactionListRoutes-D-o7gV2V.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21])),settings:()=>a(()=>import("./SettingsRoutes-X4MKf4TH.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21])),reports:()=>a(()=>import("./ReportsRoutes-y7MnzGll.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21])),chargeCards:()=>a(()=>import("./ChargeCardRoutes-DKr2nu1e.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,26,13,15,12,27,14,23,21])),people:()=>a(()=>import("./PeopleRoutes-Dj-CT0eD.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21])),expenseAutomation:()=>a(()=>import("./ExpenseAutomationRoutes-CUBrIS6y.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21])),treasury:()=>a(()=>import("./TreasuryRoutes-CzaTrrCq.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21])),vendors:()=>a(()=>import("./VendorsRoutes-CA2szW0j.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21])),zeniAccounts:()=>a(()=>import("./ZeniAccountRoutes-B92jFFWR.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))},Xs=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ae=i=>{"requestIdleCallback"in window?requestIdleCallback(i):setTimeout(i,100)},ea=l(()=>a(()=>import("./ReportsRoutes-y7MnzGll.js"),__vite__mapDeps([42,1,2,3,4,5,6,7,13,19,14,12,17,21]))),sa=l(()=>a(()=>import("./AddressRoutes-B61fN_Ku.js"),__vite__mapDeps([50,1,2,3,23,4,5,6,7,13,21]))),aa=l(()=>a(()=>import("./PeopleRoutes-Dj-CT0eD.js"),__vite__mapDeps([44,1,2,3,4,5,6,7,13,9,17,21]))),na=l(()=>a(()=>import("./PandLWithForecastRoutes-DDpGKk3b.js"),__vite__mapDeps([51,1,2,3,4,5,6,7,13,19,9,14,12,17,21]))),ta=l(()=>a(()=>import("./CustomerOnboardingRoutes-CxS9lLTl.js"),__vite__mapDeps([52,1,2,3,23,4,5,6,7,13,37,38,39,40,41,11,21]))),ia=l(()=>a(()=>import("./VendorsRoutes-CA2szW0j.js"),__vite__mapDeps([47,1,2,3,4,5,6,7,23,13,19,12,48,9,17,25,36,21]))),ra=l(()=>a(()=>import("./TransactionDetailRoutes-BMVLeepD.js"),__vite__mapDeps([53,1,2,3,13,4,5,6,7,10,9,11,12,21]))),He=l(()=>a(()=>import("./EntityDetailRoutes-cFyrvi31.js"),__vite__mapDeps([54,1,2,3,4,5,6,7,11,8,9,10,12,21]))),oa=l(()=>a(()=>import("./DashboardRoutes-D2v4ZF_E.js"),__vite__mapDeps([0,1,2,3,4,5,6,7,8,9,10,11,12,13,14,15,16,17,18,19,20,21]))),Re=l(()=>a(()=>import("./BillPayRoutes-Bna0uGqV.js"),__vite__mapDeps([22,1,2,3,4,5,6,7,23,13,24,9,14,25,17,19,26,15,12,27,28,29,30,21]))),la=l(()=>a(()=>import("./SettingsRoutes-X4MKf4TH.js"),__vite__mapDeps([35,1,2,3,4,5,6,7,17,36,23,13,15,27,12,16,37,38,39,40,41,11,28,29,32,21]))),De=l(()=>a(()=>import("./ReimbursementRoutes-Dh1G5yct.js"),__vite__mapDeps([31,1,2,3,4,5,6,7,13,26,17,15,12,27,19,9,14,25,32,29,30,21]))),ca=l(()=>a(()=>import("./ZeniAccountRoutes-B92jFFWR.js"),__vite__mapDeps([49,1,2,3,4,5,6,7,13,26,17,15,12,27,19,24,23,9,34,21]))),da=l(()=>a(()=>import("./TreasuryRoutes-CzaTrrCq.js"),__vite__mapDeps([46,1,2,3,4,5,6,7,13,26,17,15,12,27,9,14,19,21]))),ma=l(()=>a(()=>import("./TransactionListRoutes-D-o7gV2V.js"),__vite__mapDeps([33,1,2,3,4,5,6,7,8,9,10,11,12,34,21]))),ua=l(()=>a(()=>import("./ChargeCardRoutes-DKr2nu1e.js"),__vite__mapDeps([43,1,2,3,4,5,6,7,9,17,26,13,15,12,27,14,23,21]))),_a=l(()=>a(()=>import("./NotificationRoutes-Bt0oSYPF.js"),__vite__mapDeps([55,1,2,3,13,4,5,6,7,9,21]))),Ea=l(()=>a(()=>import("./PerformanceRoutes-DsWM-lYk.js"),__vite__mapDeps([56,1,2,3,13,4,5,6,7,9,17,21]))),pa=l(()=>a(()=>import("./ExpenseAutomationRoutes-CUBrIS6y.js"),__vite__mapDeps([45,1,2,3,13,4,5,6,7,9,10,11,12,8,36,25,21]))),Aa=l(()=>a(()=>import("./RewardsRoutes-Fh9U07tc.js"),__vite__mapDeps([57,1,2,3,4,5,6,7,13,20,9,17,21]))),xa=l(()=>a(()=>import("./TaskRoutes-DEDS1cCa.js"),__vite__mapDeps([58,1,2,3,13,4,5,6,7,14,17,59,9,21]))),ga=l(()=>a(()=>import("./AiCfoScreen-BPdC66wo.js"),__vite__mapDeps([60,1,2,3,4,5,6,7,18,48,21]))),ye=l(()=>a(()=>import("./CardsAiCfoScreen-BtSV6YdK.js"),__vite__mapDeps([61,1,2,3,7,4,5,6,21]))),D=l(()=>a(()=>import("./NotFoundScreen-BVW1mHQl.js"),__vite__mapDeps([13,1,2,3,4,5,6,7,21]))),Ia=l(()=>a(()=>import("./TaskListScreen-CoC_5M60.js"),__vite__mapDeps([59,1,2,3,4,5,6,7,9,17,21])));function wa({setTenantEmailDomain:i}){const U=Ss(),V=Ns(),{tenantEmailDomain:o}=Ms(),S=zs().mode,{setLoading:f,clearAllLoading:O,clearLoading:Z}=Gs(),y=H.getSignedInUserTenant(o)?.tenantId,j=H.getSignedInUser(),J=ls(j),$=Zs(),[N,Ce]=v.useState(!1),r=G(n=>cs(n)),{useFeatureGate:P}=$s(),w=qs(),ve=Ys(),{isFeatureEnabled:Oe}=P(L.isExpenseAutomationEnabled),{isFeatureEnabled:Pe}=P(L.isExpenseAutomationEnabledV2),Fe=Pe||Oe&&J,{isFeatureEnabled:Le}=P(L.isDepositAccountsFeatureEnabled),{isFeatureEnabled:ke}=P(L.isTreasuryEnabled),{isFeatureEnabled:Be}=P(L.isChargeCardFeatureEnabled),{isFeatureEnabled:ne}=P(L.isDebitCardFeatureEnabled),h=G(n=>n.tenantState.fetchState),p=G(n=>n.tenantState.activeTenantFetchState.fetchState),u=p==="Completed"||h==="Completed"?ds(ne,r):void 0,q=p==="Completed"||h==="Completed"?ms(r):void 0,Ve=p==="Completed"||h==="Completed"?us(r):void 0,Se=Be||ne||!!Ve||!!q||!!u,{isFeatureEnabled:Ne}=P(L.isSettingsFeatureEnabled),{isFeatureEnabled:K}=P(L.isAiCfoFileUploadEnabled),Y=G(n=>_s(n));if(o!=null){const n=H.getSignedInUserTenant(o);j!=null&&n!=null&&be(j,r,S)}const z={tenantId:y,userId:j?.userId,sessionId:j?.zeniSessionId},te=Es(),E=Ws(),Me=r.company==null||E?.loggedInUserRoleMap!=null&&Ae(E.loggedInUserRole),Ze=ps(E?.loggedInUserRoleMap),ie=v.useRef(!0),re=he("/:tenantEmailDomain/onboarding/*")!==null,X=he("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),we=G(n=>z.tenantId!=null?As(n,z.tenantId):void 0);v.useEffect(()=>{f(k.TENANT_FETCHING),i(o)},[o]),v.useEffect(()=>{if(X!=null&&y!=null){const n=X.params.selectedPeriod;if(n!=null){const b=n.split("-");if(b.length===2){const d=xs(Number(b[0])),s=Number(b[1]),m=gs(`01-${d<10?`0${d}`:d}-${s}`,Ue.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),M=Is();m.isAfter(M,"month")===!1?U(Ts(y,{month:d,year:s})):V("./month_end_close_checks/review")}}}},[X,y]),v.useEffect(()=>{N||(Ce(!0),f(k.TENANT_FETCHING)),ie.current?ie.current=!1:!js(te,z)&&H.isSignedIn()&&(f(k.TENANT_FETCHING),function(n,b,d,s){if(ge(b?.userId,b?.zeniSessionId,n.tenantId),d(Bs(!0)),d(Ie(n.tenantId)),n.tenantId!=null&&_.clearTenant(n.tenantId),n.tenantId!=null){const m=H.getSignedInUserTenantWithId(n.tenantId);s&&Ue.updateAppLocaleID(Js(s)),m?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(m?.tenantEmailDomain)}n.userId!=null?se.identify(n.userId,{tenant_id:n.tenantId}):se.resetUserIdentity()}(z,j,U,we))},[z,te,j,U,H]),v.useEffect(()=>{H.isSignedIn()&&(f(k.TENANT_FETCHING),function(n,b,d,s,m,M,B){if(d==null&&s==null)return void console.warn("There is no current tenant selected!!");const W=s!=null&&m?.zeniSessionId!=null,is=d==null||d.tenantId!==s,rs=d!=null&&d.excludedResources==null,os=d!=null&&d.externalConnections==null;if(W&&is){B(Ie(s));const Q=H.getSignedInUserTenantWithId(s);Q?.tenantEmailDomain!=null&&H.saveActiveTenantDomainForUser(Q?.tenantEmailDomain),ge(m?.userId,m?.zeniSessionId,s),_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),B(Te(m.userId,s))),_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),B(je(m.userId,s)))}else W&&rs&&_.shouldFetchExcludedResources(s)&&(_.markExcludedResourcesFetchStarted(s),B(Te(m.userId,s))),W&&os&&_.shouldFetchConnections(s)&&(_.markConnectionsFetchStarted(s),B(je(m.userId,s)));if(W){se.identify(m.userId,{tenant_id:s});const Q=s==null||s!=null&&(b==="Completed"||b==="Error");n==="Completed"||b!=="Not-Started"&&b!=="Error"||s==null||!_.shouldFetchActiveTenant(s)||(_.markActiveTenantFetchStarted(s),M(k.TENANT_FETCHING),B(Vs(m.userId,s,m.zeniSessionId))),Q&&(n==="Not-Started"||n==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),B(xe(m.userId,m.zeniSessionId)))}}(h,p,r,y,j,f,U))},[y,p]),v.useEffect(()=>{H.isSignedIn()&&h==="Completed"&&Y.tenantsBaseInOrder.length>0&&(Z(k.TENANT_FETCHING),H.saveSignedInUserTenants(hs(Y.tenantsBaseInOrder)),j!=null&&be(j,r,S,void 0,Y.tenantsBaseInOrder))},[Y,h,r,j]),v.useEffect(()=>{p==="In-Progress"&&f(k.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&y!=null?(O(),_.markActiveTenantFetchCompleted(y)):p==="Error"&&y!=null&&(_.markActiveTenantFetchFailed(y),Z(k.TENANT_FETCHING),Z(k.TENANT_SWITCHING))),h!=="Completed"&&h!=="Error"||(h==="Completed"?_.markAllTenantsFetchCompleted():h==="Error"&&_.markAllTenantsFetchFailed())},[p,h,y,N]);const oe=v.useRef(!1);v.useEffect(()=>{!oe.current&&p==="Completed"&&N&&(oe.current=!0,function(n=Xs,b=3e3){setTimeout(()=>{const d=s=>{if(s>=n.length)return;const m=n[s],M=Ks[m];M!=null?M().then(()=>ae(()=>d(s+1))).catch(()=>ae(()=>d(s+1))):d(s+1)};ae(()=>d(0))},b)}())},[p,N]);const C=r?.userRole!=null&&Us(r?.userRole),{isFeatureEnabled:ze}=P(L.isReferralFeatureEnabled),Ge=r?.userRole!=null&&r.userRole.includes("charge_card_user"),$e=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),F=r?.userRole!=null&&Ae(r.userRole),le=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!C,ce=Se&&!C,qe=bs(E?.loggedInUserRoleMap),Ye=r.externalConnections?.accounting[0]?.isValid,de=r.company?.companyOnboardingInfo.isOnboardingCompleted,me=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!C,ue=me&&Hs(E?.loggedInUserRoleMap),_e=Le&&!C,We=r.company!=null&&Rs(r.company),Qe=ke&&We===!0&&!C,Je=le&&Ds(E?.loggedInUserRoleMap),Ke=ce&&ys(E?.loggedInUserRoleMap),Xe=_e&&fs(E?.loggedInUserRoleMap),es=Cs(E?.loggedInUserRoleMap),ss=vs(E?.loggedInUserRoleMap),A=Os(E?.loggedInUserRoleMap),x=Ps(E?.loggedInUserRoleMap),g=Fs(E?.loggedInUserRoleMap),I=Ls(E?.loggedInUserRoleMap),T=ks(E?.loggedInUserRoleMap),Ee=le&&I,pe=me&&T,as=_e&&A,ns=Qe&&x,ee=ce&&g,ts=r.excludedResources?.resources?.find(n=>n.resource==="/invites")!=null||Ze===!0||qe===!0||es===!0||ss===!0;return H.isSignedIn()?y==null?h==="Completed"?e.jsx(c,{to:"/",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}):(j!=null&&h!=="In-Progress"&&U(xe(j.userId,j.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||h==="Completed"?(de===!0||J&&!re)&&Ye===!1&&u===!1&&q===!1?(i(void 0),e.jsx(c,{to:"/connection/auth",replace:!0})):!N||de!==!1||re||J?N&&r?.userRole&&u!=null&&q!=null&&o!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(ws,{children:e.jsxs(t,{element:e.jsx(Qs,{}),children:[e.jsx(t,{path:"/",element:e.jsx(Ta,{isDashboardAccess:F,isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,isTenantCardsOnly:q})}),e.jsx(t,{path:"dashboard/*",element:F?e.jsx(oa,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reports/*",element:F?e.jsx(ea,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"people/*",element:ts||F?e.jsx(aa,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"forecast/*",element:F?e.jsx(na,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"onboarding/*",element:e.jsx(ta,{})}),e.jsx(t,{path:"transaction/*",element:F&&C===!1||Ge||$e?e.jsx(ra,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"transactions/*",element:F&&C===!1?e.jsx(ma,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"customer/*",element:F&&C===!1?e.jsx(He,{entityType:"customer"}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isTenantBankingOnly:u,isUserHasTreasuryAccess:x,tenantEmailDomain:o})}),e.jsx(t,{path:"vendor/*",element:F&&C===!1?e.jsx(He,{entityType:"vendor"}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"tasks",element:e.jsx(Ia,{})}),e.jsx(t,{path:"tasks/*",element:e.jsx(xa,{})}),e.jsx(t,{path:"address/*",element:Je||ue||Xe||Ke?e.jsx(sa,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"checking/*",element:as?e.jsx(ca,{}):e.jsx(D,{})}),e.jsx(t,{path:"treasury/*",element:ns?e.jsx(da,{}):e.jsx(D,{})}),e.jsx(t,{path:"performance",element:ve?e.jsx(Ea,{}):e.jsx(fe,{tenantEmailDomain:o})}),e.jsx(t,{path:"month_end_close_checks/review/*",element:Fe&&C===!1?e.jsx(pa,{}):e.jsx(fe,{tenantEmailDomain:o})}),e.jsx(t,{path:"notifications/*",element:e.jsx(_a,{})}),e.jsx(t,{path:"vendors/*",element:Me?e.jsx(ia,{}):e.jsx(D,{})}),e.jsx(t,{path:"bill/*",element:Ee?e.jsx(Re,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"bills/*",element:Ee?e.jsx(Re,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursement/*",element:pe?e.jsx(De,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"reimbursements/*",element:pe?e.jsx(De,{}):e.jsx(R,{isUserHasZeniAccountsAccess:A,isUserHasChargeCardAccess:g,isUserHasBillPayAccess:I,isUserHasReimbursementAccess:T,isUserHasTreasuryAccess:x,isTenantBankingOnly:u,tenantEmailDomain:o})}),e.jsx(t,{path:"settings/*",element:Ne?e.jsx(la,{hasAdminLevelAccess:ue}):e.jsx(D,{})}),e.jsx(t,{path:"cards/ask",element:ee&&w?e.jsx(ye,{isFileUploadEnabled:K}):e.jsx(D,{})}),e.jsx(t,{path:"cards/ask/:session_id",element:ee&&w?e.jsx(ye,{isFileUploadEnabled:K}):e.jsx(D,{})}),e.jsx(t,{path:"cards/*",element:ee?e.jsx(ua,{}):e.jsx(D,{})}),e.jsx(t,{path:"rewards/*",element:ze?e.jsx(Aa,{}):e.jsx(D,{})}),e.jsx(t,{path:"/ai-cfo",element:w?e.jsx(c,{to:"explore"}):e.jsx(D,{})}),e.jsx(t,{path:"/ai-cfo/",element:w?e.jsx(c,{to:"explore"}):e.jsx(D,{})}),e.jsx(t,{path:"/ai-cfo/:session_id",element:w?e.jsx(ga,{isFileUploadEnabled:K}):e.jsx(D,{})}),e.jsx(t,{path:"*",element:e.jsx(D,{})})]})}):null:(i(void 0),e.jsx(c,{to:"onboarding",replace:!0})):null:(console.warn("User logged out!!"),i(void 0),e.jsx(c,{to:"/signin/auth",replace:!0,state:{...$.state,message:"...",origin:$.pathname}}))}const Ta=({isDashboardAccess:i,isUserHasZeniAccountsAccess:U,isUserHasChargeCardAccess:V,isUserHasBillPayAccess:o,isUserHasReimbursementAccess:S,isUserHasTreasuryAccess:f,isTenantBankingOnly:O,isTenantCardsOnly:Z})=>O===!0&&U?e.jsx(c,{to:"checking"}):Z===!0?e.jsx(c,{to:"cards"}):i?e.jsx(c,{to:"dashboard"}):U?e.jsx(c,{to:"checking"}):f?e.jsx(c,{to:"treasury"}):V?e.jsx(c,{to:"cards"}):o?e.jsx(c,{to:"bills"}):S?e.jsx(c,{to:"reimbursements"}):e.jsx(c,{to:"dashboard"}),R=({isUserHasZeniAccountsAccess:i,isUserHasChargeCardAccess:U,isUserHasBillPayAccess:V,isUserHasReimbursementAccess:o,isUserHasTreasuryAccess:S,isTenantBankingOnly:f,tenantEmailDomain:O})=>f===!0||i?e.jsx(ba,{tenantEmailDomain:O}):S?e.jsx(Ua,{tenantEmailDomain:O}):U?e.jsx(Ha,{tenantEmailDomain:O}):V?e.jsx(ha,{tenantEmailDomain:O}):o?e.jsx(ja,{tenantEmailDomain:O}):e.jsx(D,{}),ja=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/reimbursements`}),ha=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/bills`}),Ua=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/treasury`}),ba=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/checking`}),Ha=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/cards`}),fe=({tenantEmailDomain:i})=>e.jsx(c,{to:`/${i}/dashboard`});export{R as FallBackRoute,wa as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-PtDFv95_.js";import{a as p}from"./sentry-mCXLUbmc.js";import{h as L,g as $,u as T,j as h,s as se,n as G,i as K,o as W,p as I}from"./core-BZimyUuM.js";import{bn as Ee,eT as j,gk as Ae,mT as Pe,PD as ve,hw as ue,Nd as we,qK as ke,kp as pe,mP as je,hy as De,Nf as Te,Ne as Me,PE as Ue,z1 as _e,E0 as Re,Pc as Fe,Pl as Be,c3 as ee,cI as ze,cJ as Le,Ll as Ve,PF as Oe,Lm as Ne,xt as $e,PG as Ge,Go as Ke,DI as He,Dz as ge,Dw as Ze,xx as me,DC as he,DF as fe,DL as ne,tX as te,xw as Je,k1 as X,k4 as be,PH as Qe,l5 as qe,xM as We,M8 as Xe,M9 as Ye,j$ as en,PI as nn,k2 as tn,rc as an,PJ as on,PK as sn,rg as cn,hh as ln,Lu as q,ha as rn,hd as dn,Lv as un,xJ as pn,PL as gn,PM as mn,DZ as hn,f8 as Se,fa as ye,PN as fn,g8 as bn,LE as Sn,xI as ie,gd as ce,gc as yn,xH as Cn,gb as In,ga as xn,PO as En,fd as Ce,PP as An,PQ as Pn,xP as vn,xG as le,PR as wn,fu as kn,xD as jn,bW as Dn,c2 as Tn,c1 as Mn,bX as Un,b$ as _n,b_ as Rn,bZ as Fn,c0 as Bn,bY as zn}from"./zeni-epic-state-D1RAQ_Ab.js";import{a as ae,x as R,z as A,af as Ie,bK as Ln,d as Q,f as Vn,A as H,B as oe,bL as On,bM as Nn,aq as $n,i as xe,bN as Gn,bO as Kn,bP as Hn,a9 as Zn,W as Jn,bQ as Qn,q as qn,bR as Wn}from"./index-
|
|
1
|
+
import{j as o}from"./liveblocks-PtDFv95_.js";import{a as p}from"./sentry-mCXLUbmc.js";import{h as L,g as $,u as T,j as h,s as se,n as G,i as K,o as W,p as I}from"./core-BZimyUuM.js";import{bn as Ee,eT as j,gk as Ae,mT as Pe,PD as ve,hw as ue,Nd as we,qK as ke,kp as pe,mP as je,hy as De,Nf as Te,Ne as Me,PE as Ue,z1 as _e,E0 as Re,Pc as Fe,Pl as Be,c3 as ee,cI as ze,cJ as Le,Ll as Ve,PF as Oe,Lm as Ne,xt as $e,PG as Ge,Go as Ke,DI as He,Dz as ge,Dw as Ze,xx as me,DC as he,DF as fe,DL as ne,tX as te,xw as Je,k1 as X,k4 as be,PH as Qe,l5 as qe,xM as We,M8 as Xe,M9 as Ye,j$ as en,PI as nn,k2 as tn,rc as an,PJ as on,PK as sn,rg as cn,hh as ln,Lu as q,ha as rn,hd as dn,Lv as un,xJ as pn,PL as gn,PM as mn,DZ as hn,f8 as Se,fa as ye,PN as fn,g8 as bn,LE as Sn,xI as ie,gd as ce,gc as yn,xH as Cn,gb as In,ga as xn,PO as En,fd as Ce,PP as An,PQ as Pn,xP as vn,xG as le,PR as wn,fu as kn,xD as jn,bW as Dn,c2 as Tn,c1 as Mn,bX as Un,b$ as _n,b_ as Rn,bZ as Fn,c0 as Bn,bY as zn}from"./zeni-epic-state-D1RAQ_Ab.js";import{a as ae,x as R,z as A,af as Ie,bK as Ln,d as Q,f as Vn,A as H,B as oe,bL as On,bM as Nn,aq as $n,i as xe,bN as Gn,bO as Kn,bP as Hn,a9 as Zn,W as Jn,bQ as Qn,q as qn,bR as Wn}from"./index-aKhhTDIh.js";import{n as F}from"./mui-BcLZDyi8.js";import{M}from"./MobileAppDrawer-CLztF99b.js";import{a as Z,g as J,m as Xn}from"./accountMappingHelper-CUOH4oaZ.js";import{t as Yn,A as et}from"./AddressScreen-BF-3RAYM.js";import N from"./NotFoundScreen-BVW1mHQl.js";import{g as nt}from"./analyticsHelper-DO0i_Ozz.js";import{B as tt}from"./BusinessVerificationPageScreen-0dmMGz8A.js";import{C as at}from"./CompanyPassportScreen-BOxFkTz6.js";import{q as re}from"./QBOConnectionScreen-eD76plFQ.js";import{B as ot}from"./BillPayApprovalRoutes-QJ1EpW6M.js";import{R as st}from"./ReimbursementApprovalRoutes-B7uUwiM0.js";import"./recharts-Nefi66IQ.js";import"./analytics-CVef-z80.js";import"./plaid-CooQT--5.js";import"./dnd-Ck7mLEKI.js";import"./stripe-DMRn4zHo.js";import"./lottie-D7iBAvwy.js";import"./lexical-D_s6IbSB.js";import"./pdf-CPbk6pQ4.js";import"./utils-C9yOAUzR.js";import"./routePaths-DQbleX1q.js";import"./empty-B1O8rDIf.js";import"./pdf-lib-DYmF-pgM.js";import"./index-B4buEPtI.js";import"./url-DwL5mRAv.js";import"./index-ky9cAsxd.js";import"./decodeURIComponentSafe-CfH0YvB4.js";import"./ReimbursementApprovalRuleDetailScreen-B5p0qX7h.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]="bda0fe8e-f150-4e07-b8eb-788ae4f89d9c",e._sentryDebugIdIdentifier="sentry-dbid-bda0fe8e-f150-4e07-b8eb-788ae4f89d9c")}catch{}})();const it=F.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-PtDFv95_.js";import{h as X,g as Y,u as Q,i as G,j as E,N as z,n as W,t as Ye}from"./core-BZimyUuM.js";import{bF as Qe,cm as Ie,P0 as ye,eT as x,cy as en,zc as Z,z1 as nn,Pc as tn,Pf as an,rv as ee,rj as ne,kZ as te,tt as N,Ph as Ae,gc as $e,gb as Ge,ga as We,Pi as sn,zl as on,DI as ke,Dz as Pe,Dw as _e,Dn as K,DC as ve,DF as Ee,DL as we,tX as De,gr as cn,ct as rn,fa as un,f8 as dn,f9 as ln,bs as pn,Pj as mn,Cn as le,C$ as yn,Pk as fn,bG as gn,EY as pe,E0 as Sn,Pl as bn,Pm as hn,F0 as Cn,F4 as In,tm as An,Jv as kn,FB as Ce,GC as me,Pn,Po as _n,Pp as vn,Pq as He,Pr as En,LY as wn,Op as Dn,M7 as Tn,Ps as qe,Pt as Be,FX as Ke,l5 as Un,rm as Je,tv as On,bE as je,tH as ze,cw as Fn,Pu as Xe,ft as Bn,Fj as xn,Fn as Vn,Pv as jn,FE as Re,Pw as zn,Px as Rn,Py as Nn,Pz as Ln,gk as Mn,Aw as Zn,PA as $n,AB as Gn,AA as Wn}from"./zeni-epic-state-D1RAQ_Ab.js";import{A as ae,a as ie,x as de,m as Te,aN as J,z as w,v as se,d as D,B as Ue,f as $,bz as Hn,at as oe,bA as V,bB as qn,bC as Kn,af as Ve,bD as Jn,q as Ne,au as Le,J as Xn,y as Yn,bE as Qn,bF as et,bG as nt,a7 as tt}from"./index-
|
|
1
|
+
import{j as u}from"./liveblocks-PtDFv95_.js";import{h as X,g as Y,u as Q,i as G,j as E,N as z,n as W,t as Ye}from"./core-BZimyUuM.js";import{bF as Qe,cm as Ie,P0 as ye,eT as x,cy as en,zc as Z,z1 as nn,Pc as tn,Pf as an,rv as ee,rj as ne,kZ as te,tt as N,Ph as Ae,gc as $e,gb as Ge,ga as We,Pi as sn,zl as on,DI as ke,Dz as Pe,Dw as _e,Dn as K,DC as ve,DF as Ee,DL as we,tX as De,gr as cn,ct as rn,fa as un,f8 as dn,f9 as ln,bs as pn,Pj as mn,Cn as le,C$ as yn,Pk as fn,bG as gn,EY as pe,E0 as Sn,Pl as bn,Pm as hn,F0 as Cn,F4 as In,tm as An,Jv as kn,FB as Ce,GC as me,Pn,Po as _n,Pp as vn,Pq as He,Pr as En,LY as wn,Op as Dn,M7 as Tn,Ps as qe,Pt as Be,FX as Ke,l5 as Un,rm as Je,tv as On,bE as je,tH as ze,cw as Fn,Pu as Xe,ft as Bn,Fj as xn,Fn as Vn,Pv as jn,FE as Re,Pw as zn,Px as Rn,Py as Nn,Pz as Ln,gk as Mn,Aw as Zn,PA as $n,AB as Gn,AA as Wn}from"./zeni-epic-state-D1RAQ_Ab.js";import{A as ae,a as ie,x as de,m as Te,aN as J,z as w,v as se,d as D,B as Ue,f as $,bz as Hn,at as oe,bA as V,bB as qn,bC as Kn,af as Ve,bD as Jn,q as Ne,au as Le,J as Xn,y as Yn,bE as Qn,bF as et,bG as nt,a7 as tt}from"./index-aKhhTDIh.js";import{a as C}from"./sentry-mCXLUbmc.js";import{n as xe,D as at,S as it}from"./mui-BcLZDyi8.js";import{M as fe}from"./MobileAppDrawer-CLztF99b.js";import R from"./NotFoundScreen-BVW1mHQl.js";import{a as Me}from"./analyticsHelper-DO0i_Ozz.js";import{d as Ze}from"./routePaths-DQbleX1q.js";import{B as Fe}from"./BusinessVerificationPageScreen-0dmMGz8A.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]="090ceb72-b0f5-4102-bf86-a2f04d7545f1",e._sentryDebugIdIdentifier="sentry-dbid-090ceb72-b0f5-4102-bf86-a2f04d7545f1")}catch{}})();const st=xe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-PtDFv95_.js";import{a as u,b as T,q as A}from"./sentry-mCXLUbmc.js";import{u as z,h as D,j as l,g as M,N as O,n as j}from"./core-BZimyUuM.js";import{u as P,z as s,m as F,d as E,O as _,e as B,f as N,U as V,h as $,T as q,i as b}from"./index-
|
|
1
|
+
import{j as f}from"./liveblocks-PtDFv95_.js";import{a as u,b as T,q as A}from"./sentry-mCXLUbmc.js";import{u as z,h as D,j as l,g as M,N as O,n as j}from"./core-BZimyUuM.js";import{u as P,z as s,m as F,d as E,O as _,e as B,f as N,U as V,h as $,T as q,i as b}from"./index-aKhhTDIh.js";import{eT as J,L8 as W,L9 as G,f6 as H,fz as K,Le as Q,gj as R,cU as X,Lf as y,Lg as Y,Lh as Z,bU as v}from"./zeni-epic-state-D1RAQ_Ab.js";import"./mui-BcLZDyi8.js";import{u as ee}from"./useDeviceId-r7OfXqIX.js";import{f as te}from"./analyticsHelper-DO0i_Ozz.js";import{t as ne}from"./getLocaleForTenant-B-mnTkE0.js";import"./recharts-Nefi66IQ.js";import"./analytics-CVef-z80.js";import"./plaid-CooQT--5.js";import"./dnd-Ck7mLEKI.js";import"./stripe-DMRn4zHo.js";import"./lottie-D7iBAvwy.js";import"./lexical-D_s6IbSB.js";import"./pdf-CPbk6pQ4.js";import"./utils-C9yOAUzR.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]="aa8b4089-ddd7-40b5-97b3-7b686b7ef6ab",t._sentryDebugIdIdentifier="sentry-dbid-aa8b4089-ddd7-40b5-97b3-7b686b7ef6ab")}catch{}})();const ie=j(function(t,i){const d=t.tenantState.fetchState,g=t.tenantState.sendEmailMagicLinkFetchState,{magicLinkExpired:n,magicLinkAlreadyUsed:a,magicLinkExpiredEmail:c}=i;return{googleClientId:b.googleClientId,microsoftClientId:b.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(Z({authCode:n,oauthProvider:a,appType:"web",redirectUri:v(c),sourceUri:v(d.state!=null?d.state.origin:"")}))},getSignedInUser:()=>s.getSignedInUser(),onSignedInCallback:()=>{const n=d.state?.origin;n&&n!=="/"?g(n,{replace:!0}):window.open(window.location.origin,"_self")},sendMagicLink:n=>{const{deviceId:a}=i;a!=null&&(s.saveMagicLinkEmail(n),t(Y(n,a)))},clearSignInError:()=>{t(y())}}})(q),ae=T.memo(ie);function be({setTenantEmailDomain:t}){const i=z(),d=D(),{clearAllLoading:g}=P(),n=s.getSignedInUser();u.useLayoutEffect(()=>{g()},[g]);const a=ee(),c=l(e=>e.tenantState.magicLinkCodeVerifier),{sendEmailMagicLinkFetchState:L,accountLocked:U,accountUnlockTime:h}=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=>J(e)),I=l(e=>W(e)),m=M(),w=F().mode,C=m.state?.magicLinkExpired,x=m.state?.magicLinkAlreadyUsed;if(u.useEffect(()=>{L.fetchState==="Completed"&&c!=null&&(E.trackSignInLinkSent(),s.saveMagicLinkCodeVerifier(c))},[L.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(G(I.tenantsInOrder),o.zeniSessionId),H(o.userId,o.zeniSessionId,r.tenantId),i(K(r.tenantId)),s.saveActiveTenantDomainForUser(r.tenantEmailDomain),i(Q("Completed")),_.updateAppLocaleID(ne(r)),te(o,r,w,void 0,I.tenantsInOrder),R().then(()=>{const e=$();e!=null&&B(e)}),setTimeout(()=>{E.trackLogin(N.Event.loginSuccess,o.authProvider??"google",X(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(O,{to:e,state:{...m.state,origin:""}})}return f.jsxs(f.Fragment,{children:[f.jsx(ae,{magicLinkExpired:!!C,magicLinkAlreadyUsed:!!x,magicLinkExpiredEmail:s.getMagicLinkEmail()??void 0,location:m,navigate:d,deviceId:a??void 0,showEmailLogin:!0}),U===!0&&h!=null?f.jsx(V,{onClose:()=>i(y()),unlockDate:h}):null]})}export{be as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-PtDFv95_.js";import{a}from"./sentry-mCXLUbmc.js";import{u,g as m,h as g,N as p}from"./core-BZimyUuM.js";import{z as f,B as b,t as y,d as c,f as h}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-PtDFv95_.js";import{a}from"./sentry-mCXLUbmc.js";import{u,g as m,h as g,N as p}from"./core-BZimyUuM.js";import{z as f,B as b,t as y,d as c,f as h}from"./index-aKhhTDIh.js";import{go as x,gp as I,Lw as w}from"./zeni-epic-state-D1RAQ_Ab.js";import{n as j}from"./mui-BcLZDyi8.js";import"./recharts-Nefi66IQ.js";import"./analytics-CVef-z80.js";import"./plaid-CooQT--5.js";import"./dnd-Ck7mLEKI.js";import"./stripe-DMRn4zHo.js";import"./lottie-D7iBAvwy.js";import"./lexical-D_s6IbSB.js";import"./pdf-CPbk6pQ4.js";import"./utils-C9yOAUzR.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]="25bf4bb1-2fd1-43c4-b09b-76c312b79ac3",e._sentryDebugIdIdentifier="sentry-dbid-25bf4bb1-2fd1-43c4-b09b-76c312b79ac3")}catch{}})();function q(){const e=u(),t=m(),i=g(),n=a.useRef(!1),d=f.isSignedIn(),r=t.state?.message==="logout",o=r||d;return a.useEffect(()=>{o&&!n.current&&(n.current=!0,setTimeout(()=>{try{f.clearAll(),e(x()),e(I(!1)),w(),y.reset(),c.trackLogout(h.Event.logoutSuccess),c.resetUserIdentity()}catch(l){console.error("Error during sign out:",l)}finally{r||i("/signin/auth",{replace:!0})}},0))},[o,r]),o?s.jsx(v,{children:s.jsx(b,{fetchState:"In-Progress"})}):s.jsx(p,{to:"../",replace:!0})}const v=j.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as d}from"./liveblocks-PtDFv95_.js";import{a as b}from"./sentry-mCXLUbmc.js";import{h as v,u as _,g as H,j as G,i as K,n as z}from"./core-BZimyUuM.js";import{z as F,a as V,x as p,Y as W,v as Z,d as q,f as M,d1 as O,q as g,p as Q}from"./index-
|
|
1
|
+
import{j as d}from"./liveblocks-PtDFv95_.js";import{a as b}from"./sentry-mCXLUbmc.js";import{h as v,u as _,g as H,j as G,i as K,n as z}from"./core-BZimyUuM.js";import{z as F,a as V,x as p,Y as W,v as Z,d as q,f as M,d1 as O,q as g,p as Q}from"./index-aKhhTDIh.js";import{eT as X,SP as R,Ih as C,SQ as x,SL as Y,HF as I,SR as J,HN as y,H7 as aa,Ii as E,SS as B,hC as ea,I8 as ta,Id as sa,I0 as oa,H_ as w,Ie as na,HX as ia,ST as la,SU as ra,SV as ca,SW as ka,SX as T,ef as ua,SY as da,SZ as pa}from"./zeni-epic-state-D1RAQ_Ab.js";import{n as Ta}from"./mui-BcLZDyi8.js";import{u as ma}from"./useAskAiCfoHostNavButtonProps-BY9akMo_.js";import{M as ga}from"./MobileAppDrawer-CLztF99b.js";import"./recharts-Nefi66IQ.js";import"./analytics-CVef-z80.js";import"./plaid-CooQT--5.js";import"./dnd-Ck7mLEKI.js";import"./stripe-DMRn4zHo.js";import"./lottie-D7iBAvwy.js";import"./lexical-D_s6IbSB.js";import"./pdf-CPbk6pQ4.js";import"./utils-C9yOAUzR.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]="9ea259c7-759a-4af9-a81b-416188b9c1bc",e._sentryDebugIdIdentifier="sentry-dbid-9ea259c7-759a-4af9-a81b-416188b9c1bc")}catch{}})();const fa=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-PtDFv95_.js";import se from"./NotFoundScreen-
|
|
1
|
+
import{j as n}from"./liveblocks-PtDFv95_.js";import se from"./NotFoundScreen-BVW1mHQl.js";import{a as c}from"./sentry-mCXLUbmc.js";import{h as A,u as M,j as g,g as ne,i as oe,N as ie,n as re,o as ce,p as f}from"./core-BZimyUuM.js";import{Hk as O,Hn as le,Hh as de,eT as Z,SL as J,HB as W,He as pe,I5 as ue,H_ as ke,SM as X,SN as N,Ha as me,H7 as fe,rv as ge,rj as he,kZ as Se,Hv as Ie,SO as Te,HM as be,HJ as Ee,Hq as Ge,HG as Ce,HF as De}from"./zeni-epic-state-D1RAQ_Ab.js";import{z as C,c$ as xe,I as je,a as ve,x as b,p as Y,q as w,v as ye,d as z,f as we,d0 as Re,i as V,at as Fe}from"./index-aKhhTDIh.js";import{n as Be}from"./mui-BcLZDyi8.js";import{u as Ue}from"./useInitialThreadRequest-ClxKOF2S.js";import{M as He}from"./MobileAppDrawer-CLztF99b.js";import Pe from"./TaskListScreen-CoC_5M60.js";import"./recharts-Nefi66IQ.js";import"./analytics-CVef-z80.js";import"./plaid-CooQT--5.js";import"./dnd-Ck7mLEKI.js";import"./stripe-DMRn4zHo.js";import"./lottie-D7iBAvwy.js";import"./lexical-D_s6IbSB.js";import"./pdf-CPbk6pQ4.js";import"./utils-C9yOAUzR.js";import"./useAskAiCfoHostNavButtonProps-BY9akMo_.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]="83a0896d-8f73-4934-bbfb-086c51e37d11",e._sentryDebugIdIdentifier="sentry-dbid-83a0896d-8f73-4934-bbfb-086c51e37d11")}catch{}})();function Le(){const e=A(),t=M(),s=C.getSignedInUser(),{cannedResponses:u,fetchState:r,saveFetchState:d}=g(o=>o.cannedResponsesState),l=c.useCallback(()=>{t(O())},[t]),k=c.useCallback((o,h,S)=>{t(le({name:o,content:h,cannedResponseId:S}))},[t]),a=c.useCallback(o=>{t(de({cannedResponseId:o}))},[t]);if(s==null)throw Error("Can't access quick responses page without signing in...");return n.jsx(xe,{cannedResponses:u,isLoading:r==="In-Progress"||r==="Not-Started",isSaving:d==="In-Progress",onBackClick:()=>e(-1),onDelete:a,onFetch:l,onSave:k})}let _,q=[];const $e=re(function(e,t){const{location:s,taskGroupId:u}=t,r=X(e,t.taskId),d=Z(e),l=r.taskGroupId??u,k=l!=null?N(e.taskGroupState,l):void 0,a=C.getSignedInUser(),o=d.tenantId,h={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:o??""},S=J(e),{tenantEmailDomain:D}=d,E=r.recurringSourceTaskId,x=E!=null?`${V.appUrl}/${D}/tasks/${encodeURIComponent(E)}`:void 0;var I;return{taskDetailSelectorView:r,authParams:h,isZeniUser:C.isZeniUser(),userGroupList:((I=e.userGroupsState.userGroupByUserGroupId)!==_&&(_=I,q=Object.values(I)),q),isNewClicked:s.state?.message==="comingFromTaskListPage",filesEndPoint:Fe.fileMicroServiceBaseUrl,companyName:t.currentTenant.companyName,companyId:t.currentTenant.companyId,currentUrl:`${V.appUrl}${t.location.pathname}`,cannedResponses:e.cannedResponsesState.cannedResponses,isCannedResponsesLoading:e.cannedResponsesState.fetchState==="In-Progress",recurringSourceTaskUrl:x,tagListView:S,taskGroupName:l!=null&&k!=null&&k.isDefault===!1?k.name:void 0,taskGroupList:e.taskGroupViewState.taskGroupsIds.map(p=>N(e.taskGroupState,p)).filter(p=>p!=null&&!p.isDeleted).map(p=>({id:p.id,name:p.name,isDefault:p.isDefault}))}},function(e,t){const{taskId:s,navigate:u,currentTenant:r,location:d,taskGroupId:l}=t,{tenantEmailDomain:k}=r;return{onSaveChangesToLocalStore:a=>{e(De({taskDetailLocalData:a,taskId:s}))},onSaveDetailClick:a=>{e(Ce(s,a??l))},onArchiveTaskClick:()=>{t.taskId!=null&&e(Ge(t.taskId))},onSnoozeTask:(a,o)=>{e(Ee(a,o))},onUnsnoozeTask:a=>{e(be(a))},onDismissClick:()=>{if(d.state?.message==="triggerBackClick"){const a=Y(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(Ie(s))},updateFilesEntity:a=>{e(Se({files:a}))},onDeleteFile:a=>{e(he(a))},onEditFileName:(a,o)=>{e(ge(a,o.split(".")[0]))},onReloadTaskDetailPage:()=>{e(W(!1,s))},onCreateTagClick:a=>{e(fe(a,s))},onDeleteTagClick:a=>{e(me(a,s))},onFetchCannedResponses:()=>{e(O())},onManageTemplatesClick:()=>{u(`/${r.tenantEmailDomain}/tasks/quick-responses`)}}})(Re);function y(){const e=A(),t=M(),s=ne(),u=je(),{taskId:r,taskGroupId:d}=oe(),l=g(i=>Z(i)),k=Ue(l?.companyId),{useFeatureGate:a}=ve(),{isFeatureEnabled:o}=a(b.isTaskSnoozeEnabled),{isFeatureEnabled:h}=a(b.isTaskVisibilityEnabled),{isFeatureEnabled:S}=a(b.isTaskCannedResponsesEnabled),{isFeatureEnabled:D}=a(b.isTaskRecurringParentEnabled),{isFeatureEnabled:E}=a(b.isTaskGroupAssigneesEnabled),[x,I]=c.useState(!1),[p,K]=c.useState(!1),[F,Q]=c.useState(!1),[B,ee]=c.useState(!1),[U,j]=c.useState(!1),T=c.useRef(!1),G=g(i=>i.taskListState.updateTasksFetchState.fetchState),H=g(i=>J(i)),P=g(i=>i.taskGroupViewState.fetchState);c.useEffect(()=>{p||(K(!0),t(W(!1,r)))},[p,t]),c.useEffect(()=>{F||H.fetchState==="Completed"||(Q(!0),t(pe()))},[F,t,H.fetchState]),c.useEffect(()=>{B||P==="Completed"||(ee(!0),t(ue()))},[B,t,P]);const ae=c.useCallback(()=>{r!=null&&(T.current=!1,t(ke([r],null,{isArchived:!1})),j(!0))},[t,r]);c.useEffect(()=>{if(U)if(G!=="In-Progress"){if(T.current){if(G==="Error")return j(!1),void(T.current=!1);if(G==="Completed"){j(!1),T.current=!1;const{tenantEmailDomain:i}=l;if(s.state?.message==="triggerBackClick"){const m=Y(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},[U,G,l,s,e]);const L=g(i=>X(i,r)),v=L.fetchState,$=C.getSignedInUser();if($==null)throw Error("Can't access task detail page without signing in...");if(v==="Error"&&L.error?.code===400){const{tenantEmailDomain:i}=l,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:[v==="Completed"?n.jsx(ye,{analytics:z,onLoad:i=>(m=>m.trackPageLoaded(we.Event.taskDetailPage))(i)}):null,n.jsxs(Ne,{children:[n.jsx(He,{isAppContentDrawerOpen:x,handleDrawerToggle:i=>{I(i)}}),n.jsx($e,{analytics:z,currentTenant:l,handleZeniLogoClick:()=>{u.toggle()},initialOpenThreadRequest:k,location:s,loggedInUser:$,navigate:e,taskGroupId:d,taskId:r,taskDetailFetchState:v,onUnarchiveTaskClick:ae,isTaskSnoozeEnabled:o,isTaskVisibilityEnabled:h,isTaskCannedResponsesEnabled:S,isTaskRecurringParentEnabled:D,isTaskGroupAssigneesEnabled:E})]})]})}const Ne=Be.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
package/dist/assets/{TransactionDetailRoutes-DoEO9RhU.js → TransactionDetailRoutes-BMVLeepD.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-PtDFv95_.js";import i from"./NotFoundScreen-
|
|
1
|
+
import{j as t}from"./liveblocks-PtDFv95_.js";import i from"./NotFoundScreen-BVW1mHQl.js";import{T as r}from"./TransactionDetailScreen-BOsA-UF4.js";import"./sentry-mCXLUbmc.js";import{o as a,p as o}from"./core-BZimyUuM.js";import"./zeni-epic-state-D1RAQ_Ab.js";import"./recharts-Nefi66IQ.js";import"./index-aKhhTDIh.js";import"./mui-BcLZDyi8.js";import"./analytics-CVef-z80.js";import"./plaid-CooQT--5.js";import"./dnd-Ck7mLEKI.js";import"./stripe-DMRn4zHo.js";import"./lottie-D7iBAvwy.js";import"./lexical-D_s6IbSB.js";import"./pdf-CPbk6pQ4.js";import"./utils-C9yOAUzR.js";import"./useAskAiCfoHostNavButtonProps-BY9akMo_.js";import"./decodeURIComponentSafe-CfH0YvB4.js";import"./routePaths-DQbleX1q.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]="56b6774e-1a6b-43e6-92ce-ea2969956395",e._sentryDebugIdIdentifier="sentry-dbid-56b6774e-1a6b-43e6-92ce-ea2969956395")}catch{}})();function k(){return t.jsxs(a,{children:[t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId",element:t.jsx(r,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/page-not-found",element:t.jsx(i,{})}),t.jsx(o,{path:"/:transactionTypeEncoded/:transactionId/vendor/create",element:t.jsx(r,{})}),t.jsx(o,{path:"/*",element:t.jsx(r,{})})]})}export{k as default};
|
package/dist/assets/{TransactionDetailScreen-BabZW4yC.js → TransactionDetailScreen-BOsA-UF4.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as w}from"./liveblocks-PtDFv95_.js";import{a as r}from"./sentry-mCXLUbmc.js";import{u as G,k as Je,j as h,s as Qe,g as he,h as ge,i as ye,N as Ke,n as Xe}from"./core-BZimyUuM.js";import{nG as me,eT as J,gk as Ze,mT as ea,mB as aa,bn as ta,cQ as Se,bt as Te,r3 as j,Ml as $,Nm as be,Nn as ae,ML as Ee,kA as Ie,No as ve,MQ as te,MR as ne,lp as Ce,Jo as oe,Mf as R,ku as De,ks as ke,kE as na,nt as oa,Np as sa,Nq as ia,v7 as Y,kz as Ae,IJ as xe,cV as ra,cW as ca,Nr as la,Me as da,Ns as ua,v3 as ma,Nt as pa,Nu as fa,Nv as ha,Nw as ga,Nx as ya,kD as Sa,Ny as Ta,Nz as ba,Mg as Ea,NA as Ia,NB as va,NC as Ca,ID as Da,It as ka,IS as Aa,kF as xa,Jp as pe,ny as wa}from"./zeni-epic-state-D1RAQ_Ab.js";import{a as q,x as F,z as we,aN as Fe,m as Fa,J as Pa,aO as Ua,y as _a,p as Z,A as Na,aP as Va,q as ee,Y as Ba,aQ as za,d as Pe,aR as La,at as Oa,a2 as X}from"./index-
|
|
1
|
+
import{j as w}from"./liveblocks-PtDFv95_.js";import{a as r}from"./sentry-mCXLUbmc.js";import{u as G,k as Je,j as h,s as Qe,g as he,h as ge,i as ye,N as Ke,n as Xe}from"./core-BZimyUuM.js";import{nG as me,eT as J,gk as Ze,mT as ea,mB as aa,bn as ta,cQ as Se,bt as Te,r3 as j,Ml as $,Nm as be,Nn as ae,ML as Ee,kA as Ie,No as ve,MQ as te,MR as ne,lp as Ce,Jo as oe,Mf as R,ku as De,ks as ke,kE as na,nt as oa,Np as sa,Nq as ia,v7 as Y,kz as Ae,IJ as xe,cV as ra,cW as ca,Nr as la,Me as da,Ns as ua,v3 as ma,Nt as pa,Nu as fa,Nv as ha,Nw as ga,Nx as ya,kD as Sa,Ny as Ta,Nz as ba,Mg as Ea,NA as Ia,NB as va,NC as Ca,ID as Da,It as ka,IS as Aa,kF as xa,Jp as pe,ny as wa}from"./zeni-epic-state-D1RAQ_Ab.js";import{a as q,x as F,z as we,aN as Fe,m as Fa,J as Pa,aO as Ua,y as _a,p as Z,A as Na,aP as Va,q as ee,Y as Ba,aQ as za,d as Pe,aR as La,at as Oa,a2 as X}from"./index-aKhhTDIh.js";import{n as Ra,S as Ga,D as Ma}from"./mui-BcLZDyi8.js";import{u as ja}from"./useAskAiCfoHostNavButtonProps-BY9akMo_.js";import{d as Ue}from"./decodeURIComponentSafe-CfH0YvB4.js";import{h as _e,c as Ne,g as $a,e as qa}from"./routePaths-DQbleX1q.js";import{u as Wa}from"./utils-C9yOAUzR.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]="7bd28d35-4b92-4f78-96ba-fa9f82ee1cf2",a._sentryDebugIdIdentifier="sentry-dbid-7bd28d35-4b92-4f78-96ba-fa9f82ee1cf2")}catch{}})();function Ha(a=!0){const e=G(),s=Je(),{useFeatureGate:t}=q(),{isFeatureEnabled:n}=t(F.isCreateTransferEntryFromExpenseEnabled);r.useEffect(()=>{if(!a||n!==!0)return;const o=i=>{const l=s.getState().createTransferEntryState.transferAccountsByType[i].fetchState;return l!=="In-Progress"&&l!=="Completed"};o("transferEntryEligible")&&e(me({kind:"transferEntryEligible"})),o("creditCardOnlyEligible")&&e(me({kind:"creditCardOnlyEligible"}))},[a,n,e,s])}function Ya(a,e){const s=function(){const l=G(),[m,f]=r.useState(!1),[E,p]=r.useState(null),{useDynamicConfig:g}=q(),{configValue:P,isDynamicConfigLoading:T}=g("transaction_categorization_config"),u=!T&&P?.capitalization_enabled===!0,D=h(v=>J(v)),I=D.companyId,A=h(v=>Ze(v.companyState,D.companyId)?.company.companyLocaleInfo?.currencySymbol??"$"),{capitalizableAccounts:b,globalThreshold:k,maxCeiling:U,onboardingShownForPrepaid:_,onboardingShownForFixedAsset:B}=h(v=>{const y=v.tenantState.currentTenantId,c=y!=null?v.tenantState.tenantsById[y]:void 0;return{capitalizableAccounts:c?.capitalizableAccounts??null,globalThreshold:c?.capitalizationThreshold??null,maxCeiling:c?.capitalizationThresholdMaxCeiling??null,onboardingShownForPrepaid:c?.capitalizationOnboardingShownForPrepaid===!0,onboardingShownForFixedAsset:c?.capitalizationOnboardingShownForFixedAsset===!0}},Qe),M=r.useCallback(v=>{if(!u||b==null||k!=null&&k>0)return;const y=b.accounts??[],c=new Set(v);let V=!1,C=!1;for(const x of y)c.has(x.accountId)&&(x.classificationType==="prepaid"?V=!0:x.classificationType==="fixed_asset"&&(C=!0));V&&!_?(p("prepaid"),f(!0)):C&&!B&&(p("fixed_asset"),f(!0))},[u,b,k,_,B]),z=r.useCallback(v=>{E!=null&&(l(ea(I,v,U,E)),f(!1),p(null))},[l,I,E,U]),N=r.useCallback(()=>{E!=null&&(l(aa(I,E)),f(!1),p(null))},[l,I,E]);return{showPopup:m&&u,popupType:E,currencySymbol:A,checkAndShowPopup:M,handleSubmit:z,handleDismiss:N}}(),t=r.useRef(void 0),n=r.useRef([]),o=r.useRef(s.checkAndShowPopup);o.current=s.checkAndShowPopup;const i=r.useRef(e);return i.current=e,r.useEffect(()=>{a==="In-Progress"&&(n.current=i.current()),a==="Completed"&&t.current==="In-Progress"&&n.current.length>0&&(o.current(n.current),n.current=[]),t.current=a},[a]),s}const se=()=>{const a=we.getSignedInUser(),{useFeatureGate:e}=q(),{isFeatureEnabled:s}=e(F.isChainOfThoughtEnabled);return r.useMemo(()=>ta(a)&&s,[a,s])};function Ve(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 ft(a,e){const s=G(),{useFeatureGate:t,useDynamicConfig:n}=q(),o=h(S=>J(S)),i=o.userRole.includes("charge_card_user")||o.userRole.includes("charge_card_admin"),l=o.userRole!=null&&Se(o.userRole),m=o.userRole!=null&&Te(o.userRole),{isFeatureEnabled:f}=t(F.isVendorBulkUpdateOnTransactionEnabled),{isFeatureEnabled:E}=t(F.isExpenseAutomationEnabled),{configValue:p}=n(Fe.enableUncategorizedExpenseCategory),g=p?.uncategorized_expense_category_enabled===!0,P=se(),T=r.useMemo(()=>({id:a,type:j(e)}),[a,e]),u=h(S=>$(S,T)),D=u?.transactionDetailUpdateStatus?.fetchState,I=u?.transactionDetailLocalData?.lineItemById,A=h(S=>{const H=$(S,T)?.transactionDetailLocalData.vendorUpdates?.id;return H==null?"Not-Started":S.transactionVendorViewState.editVendorStateById[H]?.saveStatus.fetchState??"Not-Started"}),b=r.useMemo(()=>u?.fetchState==="Completed"?Ve(u?.transaction):void 0,[u?.fetchState,u?.transaction]),k=h(S=>{if(b!=null)return be(S.customerIncomeState,S.vendorExpenseState,S.trendState,b,"month")}),U=h(S=>ae(S)),_=h(S=>{if(b!=null)return Ee(S.trendWithTransactionsState,b,"TransactionDetail")}),B=o.company?.companyInfo.firstMonthOfFY??1,M=h(S=>Ie(S.accountState,S.accountListState,"accountList")),[z,N]=r.useState(!1),[v,y]=r.useState(!1),[c,V]=r.useState(!1);r.useEffect(()=>{N(!1),y(!1),V(!1)},[a,e]);const C=r.useCallback(()=>{N(!1),y(!1)},[]),[x,L]=r.useState(!1),W=_?.selectedPeriod?.timePeriod;return r.useEffect(()=>{c||u==null||u.transaction==null||(s(ve({id:u.transaction.id,type:u.transaction.type})),V(!0)),b!=null&&(!i||l&&m===!1)&&(z?v||k==null||(y(!0),s(oe(b,"TransactionDetail",{timeframe:"month",timePeriod:W??k}))):(s(te()),s(ne()),N(!0),s(Ce(b))))},[s,c,u?.fetchState,u?.transaction,b,i,l,m,z,v,k,W]),r.useEffect(()=>{U.newVendorState?.vendorDetailLocalData?.vendorName!=null?L(!0):L(!1)},[U.newVendorState?.vendorDetailLocalData?.vendorName]),r.useEffect(()=>()=>{s(R("common"))},[s]),{currentTenant:o,loggedInUserHasCardUserOrAdminRole:i,isUserHasDashboardAccess:l,isUserHasInvestorOrBankerAccess:m,isVendorBulkUpdateOnTransactionEnabled:f,isExpenseAutomationEnabled:E,isUncategorizedExpenseCategoryEnabled:g,isChainOfThoughtEnabled:P,selectedTransaction:T,transactionDetail:u,rawDetailSaveStatus:D,rawDetailLineItemById:I,vendorSaveStatus:A,tranEntity:b,defaultTrendTransactionTimePeriod:k,vendorViewDetails:U,uiState:_,firstMonthOfFY:B,uncategorizedAccounts:M,resetTrendIsFetchedStates:C,isCreateVendorDrawerOpen:x,setIsCreateVendorDrawerOpen:L}}const Ja={overlayWidth:new _a(100,100,58)},Qa=({isOpen:a,onSaveVendor:e,onSaveSuccess:s,onCancel:t,vendorViewDetails:n})=>{const o=Fa(),i=Pa(),l=G(),m=h(p=>ae(p)),f=()=>{t()},E={vendorDetailView:n??m,onSaveSuccess:()=>{l(ke()),l(na("Not-Started")),s()},onSaveVendor:e,onCancelClick:f,saveVendorDetailLocalData:p=>{l(De({vendorId:void 0,localData:p}))}};return w.jsx(Ma,{anchor:"right",open:a,PaperProps:{style:{width:Ja.overlayWidth.valuePercentage(i),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:o.colors.black,opacity:.4,cursor:"pointer"}}},onClose:f,children:w.jsx(Ka,{onClick:p=>p.stopPropagation(),children:w.jsx(Ua,{...E})})})},Ka=Ra(Ga)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-PtDFv95_.js";import{h as W,g as J,u as H,i as Z,j as h,N as G,n as X,o as be,p as j}from"./core-BZimyUuM.js";import{eT as U,qK as ee,jO as p,QJ as te,Jf as De,bq as le,QK as ve,kp as ae,MN as ne,QL as ue,QM as Ee,bE as Y,Jb as ye,QN as Pe,QO as me,QP as je,Je as Ae,QQ as xe,QR as pe,QS as Me,QT as ge,QU as Le,QV as Fe,QW as fe,Kr as Ce,bn as Be}from"./zeni-epic-state-D1RAQ_Ab.js";import{O as de,a as K,x as _,d as w,ce,q,p as oe,W as Oe,z as ze}from"./index-CWDdvACz.js";import"./mui-BcLZDyi8.js";import{a as S}from"./sentry-mCXLUbmc.js";import{w as se}from"./withTransactionSidePanel-3L4TkBmm.js";import{p as ie,c as re}from"./routePaths-BrOGk8hR.js";import{v as we}from"./utils-C9yOAUzR.js";import{d as v}from"./decodeURIComponentSafe-CfH0YvB4.js";import{Z as Ge}from"./ZeniAccountStatementScreen-BiD6-8br.js";import"./recharts-Nefi66IQ.js";import"./analytics-CVef-z80.js";import"./plaid-CooQT--5.js";import"./dnd-Ck7mLEKI.js";import"./stripe-DMRn4zHo.js";import"./lottie-D7iBAvwy.js";import"./lexical-D_s6IbSB.js";import"./pdf-CPbk6pQ4.js";import"./useAskAiCfoHostNavButtonProps-0ZlblxUj.js";import"./TransactionDetailScreen-BabZW4yC.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]="1afa00ec-b46d-4dec-84d1-c51fa034e56b",a._sentryDebugIdIdentifier="sentry-dbid-1afa00ec-b46d-4dec-84d1-c51fa034e56b")}catch{}})();const _e=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],N=a=>we(a),Qe=X(function(a,e){const t=ve(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,N(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=de.getLocalizedStrings(),l=N(e.selectedAccount.tranListType),u=Ve(t,n,c,l,e.bookCloseDate);w.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(ue({uiState:{dateRange:u},type:N(e.selectedAccount.tranListType)})),a(De(l,p(u),!1,l==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(p(u))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=q(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ue({uiState:{scrollYOffset:t},type:N(e.selectedAccount.tranListType)}))}}})(ce),V=se(function({...a}){const e=W(),t=J(),n=H(),c=t.pathname.split("/").find(r=>_e.includes(r)),o=c??"uncategorized-expense",{tenantEmailDomain:l}=Z(),u=de.getLocalizedStrings(),{accountType:m,title:D,subTitle:y}=$e(o),A="month",I=h(r=>U(r)),f=I.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:g}=K(),{isFeatureEnabled:k}=g(_.isProjectsTransactionsEnabled),x=h(r=>ee(r))&&k,{dataAvailable:F,initialTimeframeTick:E}=Re(o,f,I.bookCloseDate),[C,P]=S.useState(!1),[B,O]=S.useState(void 0),T=S.useMemo(()=>{const r=p(E);return{tranListType:o,accountType:te(m),title:D,subTitle:y,timeframe:A,period:r}},[o,A,m,F]);S.useEffect(()=>{if(!C&&T!=null){P(!0),w.trackTransactionList(void 0,void 0,void 0,T.title);const r=N(T.tranListType);n(De(r,T.period,!0,r==="missingReceipts"?u.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[C,T,n]);let M=T;return T!=null&&B!=null&&(M={...T,period:B}),c==null||M==null?s.jsx(G,{to:"../"}):s.jsx(Qe,{firstMonthOfFY:f,tenantEmailDomain:l,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:F,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:""}},Re=(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}}},Ve=(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},Ne=X(function(a,e){const t=Pe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Se();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),w.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(ye(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=q(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),qe=se(function({referrerType:a,...e}){const t=W(),n=J(),c=H(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:u,classIdEncoded:m,timeframe:D,startDate:y,endDate:A,titleEncoded:I}=Z(),f=v(l??""),g=v(u??""),k=v(m??""),x=v(I??""),F=h(d=>Ee(d.transactionListState,g,f,k)),[E,C]=S.useState(!1),[P,B]=S.useState(void 0),O=h(d=>U(d)),T=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=K(),{isFeatureEnabled:r}=M(_.isProjectsTransactionsEnabled),Q=h(d=>ee(d))&&r;let i;const z=Je(f,g,k,D,y,A,x);if(z){const d={startDate:Y(y,"YYYY-MM-DD"),endDate:Y(A,"YYYY-MM-DD")},$=Ue(F?.dateRange,d);i={accountId:g,accountType:te(f),classId:k,title:x,timeframe:D,period:$}}S.useEffect(()=>{E||i==null||(C(!0),w.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&&P!=null&&(L={...i,period:P});const R=[l,u,m,D,y,A,I].filter(d=>d!=null);return z&&L!=null?s.jsx(Ne,{firstMonthOfFY:T,tenantEmailDomain:o,location:n,navigate:t,showProjectField:Q,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>B(d),...e}):s.jsx(G,{to:Se(R.length)})}),Se=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Je=(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,Ue=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),Ke=X(function(a,e){const t=xe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??he();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),w.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(Ae(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=q(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),We=se(function({referrerType:a,...e}){const t=W(),n=J(),c=H(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:u,projectIdEncoded:m,timeframe:D,startDate:y,endDate:A,titleEncoded:I}=Z(),f=v(l??""),g=v(u??""),k=v(m??""),x=v(I??""),F=h(d=>je(d.transactionListState,g,f,k)),[E,C]=S.useState(!1),[P,B]=S.useState(void 0),O=h(d=>U(d)),T=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=K(),{isFeatureEnabled:r}=M(_.isProjectsTransactionsEnabled),Q=h(d=>ee(d))&&r;let i;const z=He(f,g,k,D,y,A,x);if(z){const d={startDate:Y(y,"YYYY-MM-DD"),endDate:Y(A,"YYYY-MM-DD")},$=Ze(F?.dateRange,d);i={accountId:g,accountType:te(f),projectId:k,title:x,timeframe:D,period:$}}S.useEffect(()=>{E||i==null||(C(!0),w.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&&P!=null&&(L={...i,period:P});const R=[l,u,m,D,y,A,I].filter(d=>d!=null);return z&&L!=null?s.jsx(Ke,{firstMonthOfFY:T,tenantEmailDomain:o,location:n,navigate:t,showProjectField:Q,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>B(d),...e}):s.jsx(G,{to:he(R.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,Ze=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),Xe=X(function(a,e){const t=Le(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&Fe(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ie();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),w.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=q(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=at(e.tenantEmailDomain),n=q(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ce),Te=se(function({referrerType:a,...e}){const t=W(),n=J(),c=H(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:u,timeframe:m,startDate:D,endDate:y,titleEncoded:A,excludeSubAccounts:I}=Z(),f=v(l??""),g=v(u??""),k=v(A??""),x=!(I!=null&&I==="exclude_subaccounts"),F=h(b=>Me(b.transactionListState,g,f)),[E,C]=S.useState(!1),[P,B]=S.useState(void 0),O=h(b=>U(b)),T=O.company?.featuresActivationInfo.connectedAccountProvider==="unit",M=O.company?.companyInfo.firstMonthOfFY??1;let r;const Q=et(f,g,m,D,y,k);if(Q){const b={startDate:Y(D,"YYYY-MM-DD"),endDate:Y(y,"YYYY-MM-DD")},Ye=tt(F?.dateRange,b);r={accountId:g,accountType:te(f),title:k,timeframe:m,period:Ye}}let i=r;r!=null&&P!=null&&(i={...r,period:P});const{useFeatureGate:z}=K(),{isFeatureEnabled:L}=z(_.isTransactionCommentingEnabled),{isFeatureEnabled:R}=z(_.isProjectsTransactionsEnabled),d=h(b=>ee(b))&&R,{areTenantIdsInSync:$}=Oe();S.useEffect(()=>{!E&&r!=null&&$&&(C(!0),w.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,u,m,D,y,A].filter(b=>b!=null);return Q&&i!=null?s.jsx(Xe,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:T,isTransactionCommentingEnabled:L,showProjectField:d,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:b=>B(b),...e}):s.jsx(G,{to:Ie(ke.length)})}),Ie=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},et=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&Y(n,"YYYY-MM-DD").isValid()&&Y(c,"YYYY-MM-DD").isValid()&&o!=null,tt=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),at=a=>`/${a}/transactions/${Ce}/statements`;function Yt(){const a=J().state?.referrer,e=ze.getSignedInUser(),t=Be(e),{useFeatureGate:n}=K(),{isFeatureEnabled:c}=n(_.isExpenseAutomationEnabled),o=h(m=>m.expenseAutomationViewState.selectedPeriodByTenantId)[h(m=>U(m)).tenantId],{isFeatureEnabled:l}=n(_.isExpenseAutomationEnabledV2),u=l||c&&t;return s.jsxs(be,{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(V,{})}),s.jsx(j,{path:"/uncategorized-expense/*",element:u?s.jsx(G,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):s.jsx(V,{})}),s.jsx(j,{path:"/miscategorized-income/*",element:s.jsx(V,{})}),s.jsx(j,{path:"/miscategorized-expense/*",element:u?s.jsx(G,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):s.jsx(V,{})}),s.jsx(j,{path:"/missing-receipts/*",element:u?s.jsx(G,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):s.jsx(V,{})}),s.jsx(j,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(qe,{referrerType:a})}),s.jsx(j,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(We,{referrerType:a})})]})}export{Yt as default};
|
|
1
|
+
import{j as s}from"./liveblocks-PtDFv95_.js";import{h as W,g as J,u as H,i as Z,j as h,N as G,n as X,o as be,p as j}from"./core-BZimyUuM.js";import{eT as U,qK as ee,jO as p,QJ as te,Jf as De,bq as le,QK as ve,kp as ae,MN as ne,QL as ue,QM as Ee,bE as Y,Jb as ye,QN as Pe,QO as me,QP as je,Je as Ae,QQ as xe,QR as pe,QS as Me,QT as ge,QU as Le,QV as Fe,QW as fe,Kr as Ce,bn as Be}from"./zeni-epic-state-D1RAQ_Ab.js";import{O as de,a as K,x as _,d as w,ce,q,p as oe,W as Oe,z as ze}from"./index-aKhhTDIh.js";import"./mui-BcLZDyi8.js";import{a as S}from"./sentry-mCXLUbmc.js";import{w as se}from"./withTransactionSidePanel-CCFVon-p.js";import{p as ie,c as re}from"./routePaths-DQbleX1q.js";import{v as we}from"./utils-C9yOAUzR.js";import{d as v}from"./decodeURIComponentSafe-CfH0YvB4.js";import{Z as Ge}from"./ZeniAccountStatementScreen-Czxe84tm.js";import"./recharts-Nefi66IQ.js";import"./analytics-CVef-z80.js";import"./plaid-CooQT--5.js";import"./dnd-Ck7mLEKI.js";import"./stripe-DMRn4zHo.js";import"./lottie-D7iBAvwy.js";import"./lexical-D_s6IbSB.js";import"./pdf-CPbk6pQ4.js";import"./useAskAiCfoHostNavButtonProps-BY9akMo_.js";import"./TransactionDetailScreen-BOsA-UF4.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]="1afa00ec-b46d-4dec-84d1-c51fa034e56b",a._sentryDebugIdIdentifier="sentry-dbid-1afa00ec-b46d-4dec-84d1-c51fa034e56b")}catch{}})();const _e=["uncategorized-income","uncategorized-expense","miscategorized-income","miscategorized-expense","missing-receipts"],N=a=>we(a),Qe=X(function(a,e){const t=ve(a.transactionState,a.transactionListState,e.selectedAccount.period,e.selectedAccount.timeframe,N(e.selectedAccount.tranListType));return{title:e.selectedAccount.title,subTitle:e.selectedAccount.subTitle,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:e.dataAvailableForPeriod,report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??"../../";e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();const o=de.getLocalizedStrings(),l=N(e.selectedAccount.tranListType),u=Ve(t,n,c,l,e.bookCloseDate);w.trackTransactionList(void 0,void 0,void 0,e.selectedAccount.title,void 0,!0),a(ue({uiState:{dateRange:u},type:N(e.selectedAccount.tranListType)})),a(De(l,p(u),!1,l==="missingReceipts"?o.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0)),e.onSelectedTimePeriodChange(p(u))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=q(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(ue({uiState:{scrollYOffset:t},type:N(e.selectedAccount.tranListType)}))}}})(ce),V=se(function({...a}){const e=W(),t=J(),n=H(),c=t.pathname.split("/").find(r=>_e.includes(r)),o=c??"uncategorized-expense",{tenantEmailDomain:l}=Z(),u=de.getLocalizedStrings(),{accountType:m,title:D,subTitle:y}=$e(o),A="month",I=h(r=>U(r)),f=I.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:g}=K(),{isFeatureEnabled:k}=g(_.isProjectsTransactionsEnabled),x=h(r=>ee(r))&&k,{dataAvailable:F,initialTimeframeTick:E}=Re(o,f,I.bookCloseDate),[C,P]=S.useState(!1),[B,O]=S.useState(void 0),T=S.useMemo(()=>{const r=p(E);return{tranListType:o,accountType:te(m),title:D,subTitle:y,timeframe:A,period:r}},[o,A,m,F]);S.useEffect(()=>{if(!C&&T!=null){P(!0),w.trackTransactionList(void 0,void 0,void 0,T.title);const r=N(T.tranListType);n(De(r,T.period,!0,r==="missingReceipts"?u.uncategorizedTransactionList.missingReceipt.missingReceiptMinAmount:void 0))}},[C,T,n]);let M=T;return T!=null&&B!=null&&(M={...T,period:B}),c==null||M==null?s.jsx(G,{to:"../"}):s.jsx(Qe,{firstMonthOfFY:f,tenantEmailDomain:l,location:t,useFixedPeriod:{timeframe:"month",numberOfPeriods:12},dataAvailableForPeriod:F,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:""}},Re=(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}}},Ve=(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},Ne=X(function(a,e){const t=Pe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Se();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),w.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(me({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,classId:e.selectedAccount.classId,uiState:{dateRange:o}})),a(ye(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.classId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=q(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),qe=se(function({referrerType:a,...e}){const t=W(),n=J(),c=H(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:u,classIdEncoded:m,timeframe:D,startDate:y,endDate:A,titleEncoded:I}=Z(),f=v(l??""),g=v(u??""),k=v(m??""),x=v(I??""),F=h(d=>Ee(d.transactionListState,g,f,k)),[E,C]=S.useState(!1),[P,B]=S.useState(void 0),O=h(d=>U(d)),T=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=K(),{isFeatureEnabled:r}=M(_.isProjectsTransactionsEnabled),Q=h(d=>ee(d))&&r;let i;const z=Je(f,g,k,D,y,A,x);if(z){const d={startDate:Y(y,"YYYY-MM-DD"),endDate:Y(A,"YYYY-MM-DD")},$=Ue(F?.dateRange,d);i={accountId:g,accountType:te(f),classId:k,title:x,timeframe:D,period:$}}S.useEffect(()=>{E||i==null||(C(!0),w.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&&P!=null&&(L={...i,period:P});const R=[l,u,m,D,y,A,I].filter(d=>d!=null);return z&&L!=null?s.jsx(Ne,{firstMonthOfFY:T,tenantEmailDomain:o,location:n,navigate:t,showProjectField:Q,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>B(d),...e}):s.jsx(G,{to:Se(R.length)})}),Se=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},Je=(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,Ue=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),Ke=X(function(a,e){const t=xe(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,e.selectedAccount.timeframe,e.selectedAccount.period);return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??he();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),w.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(pe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,projectId:e.selectedAccount.projectId,uiState:{dateRange:o}})),a(Ae(e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.projectId,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=q(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),We=se(function({referrerType:a,...e}){const t=W(),n=J(),c=H(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:u,projectIdEncoded:m,timeframe:D,startDate:y,endDate:A,titleEncoded:I}=Z(),f=v(l??""),g=v(u??""),k=v(m??""),x=v(I??""),F=h(d=>je(d.transactionListState,g,f,k)),[E,C]=S.useState(!1),[P,B]=S.useState(void 0),O=h(d=>U(d)),T=O.company?.companyInfo.firstMonthOfFY??1,{useFeatureGate:M}=K(),{isFeatureEnabled:r}=M(_.isProjectsTransactionsEnabled),Q=h(d=>ee(d))&&r;let i;const z=He(f,g,k,D,y,A,x);if(z){const d={startDate:Y(y,"YYYY-MM-DD"),endDate:Y(A,"YYYY-MM-DD")},$=Ze(F?.dateRange,d);i={accountId:g,accountType:te(f),projectId:k,title:x,timeframe:D,period:$}}S.useEffect(()=>{E||i==null||(C(!0),w.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&&P!=null&&(L={...i,period:P});const R=[l,u,m,D,y,A,I].filter(d=>d!=null);return z&&L!=null?s.jsx(Ke,{firstMonthOfFY:T,tenantEmailDomain:o,location:n,navigate:t,showProjectField:Q,selectedAccount:L,referrerType:a,onSelectedTimePeriodChange:d=>B(d),...e}):s.jsx(G,{to:he(R.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,Ze=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),Xe=X(function(a,e){const t=Le(a.transactionState,a.transactionListState,e.selectedAccount.accountId,e.selectedAccount.accountType,e.selectedAccount.timeframe,e.selectedAccount.period),n=t.account?.coaId,c=e.isConnectedAccountProviderUnit&&Fe(n??"");return{accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,title:e.selectedAccount.title,timeframe:e.selectedAccount.timeframe,timePeriod:ne(e.selectedAccount.period),dataAvailableForPeriod:ie(5,e.firstMonthOfFY),report:t,currentScrollYOffset:t.uiState?.scrollYOffset??0,showStatementPageIcon:c,isAccountingClassesEnabled:ae(a)}},function(a,e){return{onBackClick:()=>{const t=oe(e.location.state?.pathnameStackToGoBack),n=t.poppedPathname??Ie();e.navigate(n,{state:{pathnameStackToGoBack:t.newStack}})},onTimePeriodChange:(t,n,c)=>{e.closeSidePanel?.();let o=n;t.startDate.isBefore(n.startDate,c)?o={startDate:t.startDate,endDate:n.endDate}:t.startDate.isAfter(n.endDate,c)?o={startDate:n.startDate,endDate:t.endDate}:console.error(`Invalid addTimePeriod ${JSON.stringify(t)}`),w.trackTransactionList(e.selectedAccount.accountId,void 0,e.referrerType,e.selectedAccount.title,void 0,!0),a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{dateRange:o}})),a(ge(e.selectedAccount.accountId,e.selectedAccount.accountType,p(o))),e.onSelectedTimePeriodChange(p(o))},onTransactionItemClick:t=>{if(e.openTransactionPanel)return void e.openTransactionPanel(t.id,t.type);const n=re(t,e.tenantEmailDomain),c=q(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(n,{state:{pathnameStackToGoBack:c}})},onTransactionListScroll:t=>{a(fe({accountId:e.selectedAccount.accountId,accountType:e.selectedAccount.accountType,uiState:{scrollYOffset:t}}))},onStatementPageIconClick:()=>{const t=at(e.tenantEmailDomain),n=q(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(t,{state:{pathnameStackToGoBack:n}})}}})(ce),Te=se(function({referrerType:a,...e}){const t=W(),n=J(),c=H(),{tenantEmailDomain:o,accountTypeEncoded:l,accountIdEncoded:u,timeframe:m,startDate:D,endDate:y,titleEncoded:A,excludeSubAccounts:I}=Z(),f=v(l??""),g=v(u??""),k=v(A??""),x=!(I!=null&&I==="exclude_subaccounts"),F=h(b=>Me(b.transactionListState,g,f)),[E,C]=S.useState(!1),[P,B]=S.useState(void 0),O=h(b=>U(b)),T=O.company?.featuresActivationInfo.connectedAccountProvider==="unit",M=O.company?.companyInfo.firstMonthOfFY??1;let r;const Q=et(f,g,m,D,y,k);if(Q){const b={startDate:Y(D,"YYYY-MM-DD"),endDate:Y(y,"YYYY-MM-DD")},Ye=tt(F?.dateRange,b);r={accountId:g,accountType:te(f),title:k,timeframe:m,period:Ye}}let i=r;r!=null&&P!=null&&(i={...r,period:P});const{useFeatureGate:z}=K(),{isFeatureEnabled:L}=z(_.isTransactionCommentingEnabled),{isFeatureEnabled:R}=z(_.isProjectsTransactionsEnabled),d=h(b=>ee(b))&&R,{areTenantIdsInSync:$}=Oe();S.useEffect(()=>{!E&&r!=null&&$&&(C(!0),w.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,u,m,D,y,A].filter(b=>b!=null);return Q&&i!=null?s.jsx(Xe,{firstMonthOfFY:M,tenantEmailDomain:o,location:n,navigate:t,isConnectedAccountProviderUnit:T,isTransactionCommentingEnabled:L,showProjectField:d,selectedAccount:i,referrerType:a,onSelectedTimePeriodChange:b=>B(b),...e}):s.jsx(G,{to:Ie(ke.length)})}),Ie=(a=7)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e},et=(a,e,t,n,c,o)=>a!=null&&e!=null&&t!=null&&n!=null&&c!=null&&(t==="month"||t==="quarter")&&Y(n,"YYYY-MM-DD").isValid()&&Y(c,"YYYY-MM-DD").isValid()&&o!=null,tt=(a,e)=>a!=null&&a.endDate.isSame(e.endDate,"day")&&a.startDate.isBefore(e.startDate,"day")?p(a):p(e),at=a=>`/${a}/transactions/${Ce}/statements`;function Yt(){const a=J().state?.referrer,e=ze.getSignedInUser(),t=Be(e),{useFeatureGate:n}=K(),{isFeatureEnabled:c}=n(_.isExpenseAutomationEnabled),o=h(m=>m.expenseAutomationViewState.selectedPeriodByTenantId)[h(m=>U(m)).tenantId],{isFeatureEnabled:l}=n(_.isExpenseAutomationEnabledV2),u=l||c&&t;return s.jsxs(be,{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(V,{})}),s.jsx(j,{path:"/uncategorized-expense/*",element:u?s.jsx(G,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):s.jsx(V,{})}),s.jsx(j,{path:"/miscategorized-income/*",element:s.jsx(V,{})}),s.jsx(j,{path:"/miscategorized-expense/*",element:u?s.jsx(G,{to:`../../month_end_close_checks/review/transaction_categorization/${o.month}-${o.year}`}):s.jsx(V,{})}),s.jsx(j,{path:"/missing-receipts/*",element:u?s.jsx(G,{to:`../../month_end_close_checks/review/missing_receipts/${o.month}-${o.year}`}):s.jsx(V,{})}),s.jsx(j,{path:"/by-class/:accountTypeEncoded/:accountIdEncoded/:classIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(qe,{referrerType:a})}),s.jsx(j,{path:"/by-project/:accountTypeEncoded/:accountIdEncoded/:projectIdEncoded/:timeframe/:startDate/:endDate/:titleEncoded/*",element:s.jsx(We,{referrerType:a})})]})}export{Yt as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-PtDFv95_.js";import{h as L,g as B,u as U,i as V,j as f,N as P,n as O,o as Te,p as k}from"./core-BZimyUuM.js";import{cn as N,eT as D,Pu as R,FB as ae,ft as H,Fj as ne,Pw as we,FE as Ie,Ps as Ce,Pt as se,PM as ke,DL as je,tX as be,Py as Ae,FX as Ee,Pv as re,cP as W,ya as oe,f8 as ve,fa as De,QG as Fe,QH as Pe,Fk as Le,QI as Be,Fl as Ue,Fu as Re,bt as Me,bF as Ve,cy as Oe,bG as Ne,cm as _e,fs as ze,bs as Ge,La as $e,cl as qe}from"./zeni-epic-state-D1RAQ_Ab.js";import{A as _,aq as He,z as A,v as z,d as j,c7 as We,c8 as Ze,c9 as q,J as Z,m as Je,W as Ke,Y as Qe,a as ie,x as v,y as Xe,B as Ye,ca as et,at as J,q as tt,cb as at,p as K,cc as nt,R as X,cd as st,a9 as rt}from"./index-
|
|
1
|
+
import{j as e}from"./liveblocks-PtDFv95_.js";import{h as L,g as B,u as U,i as V,j as f,N as P,n as O,o as Te,p as k}from"./core-BZimyUuM.js";import{cn as N,eT as D,Pu as R,FB as ae,ft as H,Fj as ne,Pw as we,FE as Ie,Ps as Ce,Pt as se,PM as ke,DL as je,tX as be,Py as Ae,FX as Ee,Pv as re,cP as W,ya as oe,f8 as ve,fa as De,QG as Fe,QH as Pe,Fk as Le,QI as Be,Fl as Ue,Fu as Re,bt as Me,bF as Ve,cy as Oe,bG as Ne,cm as _e,fs as ze,bs as Ge,La as $e,cl as qe}from"./zeni-epic-state-D1RAQ_Ab.js";import{A as _,aq as He,z as A,v as z,d as j,c7 as We,c8 as Ze,c9 as q,J as Z,m as Je,W as Ke,Y as Qe,a as ie,x as v,y as Xe,B as Ye,ca as et,at as J,q as tt,cb as at,p as K,cc as nt,R as X,cd as st,a9 as rt}from"./index-aKhhTDIh.js";import{D as ot,n as M,S as it}from"./mui-BcLZDyi8.js";import ct from"./NotFoundScreen-BVW1mHQl.js";import{S as Y}from"./SetupPagesScreen-Uer5YsTX.js";import{a as d}from"./sentry-mCXLUbmc.js";import{u as lt}from"./useAskAiCfoHostNavButtonProps-BY9akMo_.js";import{u as ut}from"./useInitialThreadRequest-ClxKOF2S.js";import{M as ce}from"./MobileAppDrawer-CLztF99b.js";import{F as dt}from"./FeaturePreviewScreen-AUOPnl37.js";import{a as ee}from"./analyticsHelper-DO0i_Ozz.js";import"./recharts-Nefi66IQ.js";import"./analytics-CVef-z80.js";import"./plaid-CooQT--5.js";import"./dnd-Ck7mLEKI.js";import"./stripe-DMRn4zHo.js";import"./lottie-D7iBAvwy.js";import"./lexical-D_s6IbSB.js";import"./pdf-CPbk6pQ4.js";import"./utils-C9yOAUzR.js";import"./routePaths-DQbleX1q.js";import"./BusinessVerificationPageScreen-0dmMGz8A.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]="04375301-27b8-4dc1-a729-8ecd61101fcf",t._sentryDebugIdIdentifier="sentry-dbid-04375301-27b8-4dc1-a729-8ecd61101fcf")}catch{}})();const pt=O(function(t,a){const{companyId:n}=a;return{treasurySetupView:R(t,n),analytics:j}},function(t,a){const{navigate:n,analytics:o,treasurySetupView:p}=a;return{onBackClick:()=>{n("../")},onNextClick:()=>{const r=p.fundAllocationLocalData;o.trackTreasuryPortfolioConfirm(r.riskScore,ee(r)),t(Ie(!0))},onUpdateFundAllocation:r=>{o.trackTreasuryAllocationAction("update",ee(r)),t(we(r))}}})(We);function mt(){const t=L(),a=B(),n=U(),{tenantEmailDomain:o}=V(),p=_(),r=f(C=>C.treasurySetupViewState.portfolioAllocationUpdateStatus?.fetchState),m=He(r),s=N(p?.loggedInUserRoleMap),[l,i]=d.useState(!1),[g,I]=d.useState(!1),[u,c]=d.useState(!1),h=f(C=>D(C)),y=A.getSignedInUserTenant(o)?.companyId??h.companyId,T=A.getSignedInUser(),S=f(C=>R(C,y)),w=f(C=>C.treasurySetupViewState.fetchState),x=f(C=>C.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),F=f(C=>C.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState);if(T==null)throw Error("Can't access treasury portfolio allocation page without signing in...");if(d.useEffect(()=>{l||w!=="Not-Started"||y==null||(i(!0),n(ae(y,!0,!1)))},[l,w,y,n]),d.useEffect(()=>{u||F!=="Not-Started"||y==null||(c(!0),n(H()))},[u,F,y,n]),d.useEffect(()=>{g||x!=="Not-Started"||y==null||(I(!0),n(ne()))},[g,x,y,n]),d.useEffect(()=>{m==="In-Progress"&&r==="Completed"&&t("../")},[m,r,t]),h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted===!1)return e.jsx(P,{to:"../promo"});const E=h.companyTreasuryInfo?.info?.isTreasuryTOSAccepted!==!0||w!=="Completed";return e.jsxs(e.Fragment,{children:[!E&&e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(pt,{navigate:t,location:a,companyId:y,isEditMode:!0,isLoading:E,isReadOnly:!s,treasurySetupView:S,analytics:j})]})}const ft=O(function(t,a){const n=a.currentTenant?.companyId;return{plaidConnectionDetails:ke(t,n,"zeni_treasury","treasury_setup").plaidConnectionDetails,treasurySetupView:R(t,n)}},function(t,a){const{navigate:n,transferDetails:o,treasurySetupView:p}=a,r=o.treasuryTransferMoneyLocalData,m=p.fundAllocationLocalData;return{onCancelClick:()=>{q(a.analytics,"cancel",r,m,"Transfer"),t(se()),n("../")},onTransferClick:()=>{q(a.analytics,"confirm",r,m,"Transfer"),t(Ee())},onSaveChangesToLocalStore:s=>{t(Ae(s))},onFetchLinkTokenClick:s=>{t(be("treasury_setup",s))},onEstablishConnectionClick:s=>{t(je(s,a.currentTenant?.companyId,"treasury_setup","zeni_treasury"))}}})(Ze),yt=({isFirstTransfer:t})=>{const a=L(),{tenantEmailDomain:n}=V(),o=U(),[p,r]=d.useState(!1),[m,s]=d.useState(!1),[l,i]=d.useState(!1),[g,I]=d.useState(!1),u=f(x=>x.treasurySetupViewState.fetchState),c=f(x=>x.treasurySetupViewState.treasuryFundsDetails?.fetchStatus?.fetchState),h=f(x=>x.treasurySetupViewState.currentAllocation.fetchStatus?.fetchState),y=f(x=>D(x)),T=A.getSignedInUserTenant(n)?.companyId??y.companyId,S=f(x=>Ce(x)),w=f(x=>R(x,T));if(A.getSignedInUser()==null)throw Error("Can't access treasury transfer page without signing in...");return d.useEffect(()=>{m||u!=="Not-Started"||T==null||(s(!0),o(ae(T,!0,!1)))},[m,u,T,o]),d.useEffect(()=>{l||c!=="Not-Started"||T==null||(i(!0),o(H()))},[l,c,T,o]),d.useEffect(()=>{g||h!=="Not-Started"||T==null||(I(!0),o(ne()))},[g,h,T,o]),e.jsxs(e.Fragment,{children:[e.jsx(z,{analytics:j,onLoad:()=>{}}),e.jsx(ft,{analytics:j,navigate:a,transferDetails:S,onAnotherTransferClick:()=>{r(!1),o(se())},currentTenant:y,treasurySetupView:w,showReviewContent:p,maxInsuredAmount:5e5,onReviewClick:()=>{q(j,"review",S.treasuryTransferMoneyLocalData,w.fundAllocationLocalData,"Transfer"),r(!0)},isFirstTransfer:t,setShowReviewContent:r,onBackClick:()=>{}})]})},gt=M.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-PtDFv95_.js";import{a as g}from"./sentry-mCXLUbmc.js";import{h as J,g as K,i as O,j as S,n as G,u as Y,o as at,p as M,N as $}from"./core-BZimyUuM.js";import{eT as L,Mb as Ee,Mc as Ne,gr as X,ct as be,cu as we,wL as St,Md as nt,wP as Yt,Ki as ee,kp as te,wJ as Kt,wD as qt,Me as Re,wv as Wt,wu as Ht,wo as Qt,wA as Zt,wQ as Xt,Mf as he,Mg as Ue,ww as ea,Mh as pe,ff as ft,x3 as gt,wY as vt,Mi as xt,pA as Tt,wT as yt,wR as Dt,Mj as Ct,xa as Et,x7 as bt,wU as wt,x9 as Je,IJ as It,Mk as ta,Ml as aa,cw as na,Mm as sa,Mn as oa,Mo as me,Mp as ie,Mq as Ie,Kj as Ge,xp as ye,Kh as De,xc as kt,wM as $e,Mr as la,Kk as W,Ms as ze,wG as ia,Mt as ca,Mu as da,Mv as Ye,Mw as Ke,Mx as qe,My as We,xj as ke,Mz as At,x0 as jt,MA as ra,MB as ua,MC as ha,MD as pa,ME as ma,MF as Sa,MG as fa,MH as ga,u7 as va,u8 as xa,Jp as je,MI as Ta,MJ as ya,jO as Fe,bq as Da,MK as Ca,ML as Ea,ln as ba,lw as wa,Jo as Pe,bE as st,MM as Ft,I$ as Pt,MN as Ia,MO as ka,MP as Aa,ly as ja,MQ as ot,MR as lt,MS as it,MT as ct,MU as Fa,lu as Pa,MV as _a,lx as Va,MW as La,MX as _t,JK as Vt,kN as Ma,MY as Ba,MZ as _e,M_ as Lt,JI as Mt,zC as Oa,M$ as Na,N0 as Ra,l5 as Bt,N1 as Ua,N2 as Ja,JW as Ga,rQ as $a,N3 as Ot,N4 as dt,JT as Ve,N5 as rt,N6 as za,JY as Ya,N7 as Ka,N8 as qa,N9 as Wa,Na as Ha,Nb as Qa,rT as Za,Nc as Xa,Kl as en,Nd as tn,JB as Le,hy as an,Ne as nn,Nf as sn,hw as on,Ng as ln,Nh as cn,zG as dn,Ni as rn,Nj as un,Nk as hn,Nl as pn,kR as mn,bn as Sn,fa as fn,f8 as gn}from"./zeni-epic-state-D1RAQ_Ab.js";import{z as N,aq as Me,B as Nt,v as Q,d as j,a2 as Z,aw as vn,q as U,O as Ce,I as ce,ax as He,ay as xn,az as Tn,p as Qe,aA as yn,m as Dn,J as de,y as Ze,a as ae,x as z,aB as Cn,i as Xe,Y as Se,aC as En,aD as Rt,W as bn,aE as wn,A as In,aF as kn,at as Ut,aG as An,o as H,S as jn,D as Jt,N as Fn,aH as Pn,aI as _n,f as et,aJ as Vn,aK as Ln,$ as Mn,aL as Bn,aM as On}from"./index-
|
|
1
|
+
import{j as l}from"./liveblocks-PtDFv95_.js";import{a as g}from"./sentry-mCXLUbmc.js";import{h as J,g as K,i as O,j as S,n as G,u as Y,o as at,p as M,N as $}from"./core-BZimyUuM.js";import{eT as L,Mb as Ee,Mc as Ne,gr as X,ct as be,cu as we,wL as St,Md as nt,wP as Yt,Ki as ee,kp as te,wJ as Kt,wD as qt,Me as Re,wv as Wt,wu as Ht,wo as Qt,wA as Zt,wQ as Xt,Mf as he,Mg as Ue,ww as ea,Mh as pe,ff as ft,x3 as gt,wY as vt,Mi as xt,pA as Tt,wT as yt,wR as Dt,Mj as Ct,xa as Et,x7 as bt,wU as wt,x9 as Je,IJ as It,Mk as ta,Ml as aa,cw as na,Mm as sa,Mn as oa,Mo as me,Mp as ie,Mq as Ie,Kj as Ge,xp as ye,Kh as De,xc as kt,wM as $e,Mr as la,Kk as W,Ms as ze,wG as ia,Mt as ca,Mu as da,Mv as Ye,Mw as Ke,Mx as qe,My as We,xj as ke,Mz as At,x0 as jt,MA as ra,MB as ua,MC as ha,MD as pa,ME as ma,MF as Sa,MG as fa,MH as ga,u7 as va,u8 as xa,Jp as je,MI as Ta,MJ as ya,jO as Fe,bq as Da,MK as Ca,ML as Ea,ln as ba,lw as wa,Jo as Pe,bE as st,MM as Ft,I$ as Pt,MN as Ia,MO as ka,MP as Aa,ly as ja,MQ as ot,MR as lt,MS as it,MT as ct,MU as Fa,lu as Pa,MV as _a,lx as Va,MW as La,MX as _t,JK as Vt,kN as Ma,MY as Ba,MZ as _e,M_ as Lt,JI as Mt,zC as Oa,M$ as Na,N0 as Ra,l5 as Bt,N1 as Ua,N2 as Ja,JW as Ga,rQ as $a,N3 as Ot,N4 as dt,JT as Ve,N5 as rt,N6 as za,JY as Ya,N7 as Ka,N8 as qa,N9 as Wa,Na as Ha,Nb as Qa,rT as Za,Nc as Xa,Kl as en,Nd as tn,JB as Le,hy as an,Ne as nn,Nf as sn,hw as on,Ng as ln,Nh as cn,zG as dn,Ni as rn,Nj as un,Nk as hn,Nl as pn,kR as mn,bn as Sn,fa as fn,f8 as gn}from"./zeni-epic-state-D1RAQ_Ab.js";import{z as N,aq as Me,B as Nt,v as Q,d as j,a2 as Z,aw as vn,q as U,O as Ce,I as ce,ax as He,ay as xn,az as Tn,p as Qe,aA as yn,m as Dn,J as de,y as Ze,a as ae,x as z,aB as Cn,i as Xe,Y as Se,aC as En,aD as Rt,W as bn,aE as wn,A as In,aF as kn,at as Ut,aG as An,o as H,S as jn,D as Jt,N as Fn,aH as Pn,aI as _n,f as et,aJ as Vn,aK as Ln,$ as Mn,aL as Bn,aM as On}from"./index-aKhhTDIh.js";import{n as R,D as Nn,S as Gt}from"./mui-BcLZDyi8.js";import{t as Rn,A as Un}from"./AddressScreen-BF-3RAYM.js";import le from"./NotFoundScreen-BVW1mHQl.js";import{F as Jn}from"./FeaturePreviewScreen-AUOPnl37.js";import{c as q,v as tt,d as Gn}from"./routePaths-DQbleX1q.js";import{p as $t}from"./pathToGoBack-Bmk3vSys.js";import{u as fe}from"./useAskAiCfoHostNavButtonProps-BY9akMo_.js";import{M as ge}from"./MobileAppDrawer-CLztF99b.js";import{D as $n}from"./DrawerScreen-QceXJJGv.js";import{g as zn,m as Yn}from"./accountMappingHelper-CUOH4oaZ.js";import"./recharts-Nefi66IQ.js";import"./analytics-CVef-z80.js";import"./plaid-CooQT--5.js";import"./dnd-Ck7mLEKI.js";import"./stripe-DMRn4zHo.js";import"./lottie-D7iBAvwy.js";import"./lexical-D_s6IbSB.js";import"./pdf-CPbk6pQ4.js";import"./utils-C9yOAUzR.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]="d80b44c1-f513-4e7a-a911-bcc99187926b",e._sentryDebugIdIdentifier="sentry-dbid-d80b44c1-f513-4e7a-a911-bcc99187926b")}catch{}})();const Kn=Ce.getLocalizedStrings(),qn=G(function(e,a){const s=Ne(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(Yt()),s("..",{relative:"path"})},onTransactionClick:n=>{const o=`${q(n,a.tenantEmailDomain)}`,c=U(t.state?.pathnameStackToGoBack,t.pathname);s(o,{state:{pathnameStackToGoBack:c}})},onLinkSave(){a.setShouldNavigateBack(!1),e(St(a.scheduleTab,a.scheduleAccruedDetailsView.selectedJEAccruedSchedule?.jeScheduleId))}}})(vn),Wn=({setShouldNavigateBack:e})=>{const a=J(),s=K(),{scheduleDetailId:t,tenantEmailDomain:n}=O(),{scheduleType:o}=O();if(n==null)throw Error("Can't access Link Bill Expense page without tenant Email Domain");const c=S(f=>L(f)),r=Ee(o)??"accrued_expenses",h=N.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(f=>Ne(f,r)),m=i.selectedJELinkRowIndex,d=S(f=>X(f,c.companyId)),u=Me(i.updateStatus.fetchState);g.useEffect(()=>{u==="In-Progress"&&i.updateStatus.fetchState==="Completed"&&a("..",{relative:"path"})},[u,i.updateStatus.fetchState]),g.useEffect(()=>{i.fetchState==="Not-Started"&&a("..",{relative:"path"})},[]),g.useEffect(()=>{i.selectedJEAccruedSchedule!=null&&i.selectedJELinkRowIndex!=null||a("..",{relative:"path"})},[i.selectedJEAccruedSchedule,i.selectedJELinkRowIndex]);const p=i.linkBillExpenseView.fetchState==="Completed";return l.jsx(l.Fragment,{children:i.linkBillExpenseView.fetchState==="In-Progress"?l.jsx(Nt,{fetchState:i.linkBillExpenseView.fetchState}):i.selectedJEAccruedSchedule!=null&&m!=null?l.jsxs(l.Fragment,{children:[p===!0?l.jsx(Q,{analytics:j,onLoad:()=>{Hn(i,r,d)}}):null,l.jsx(qn,{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[m]})]}):null})},zt=e=>{const a=Kn.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}},Hn=(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(m=>m.isRecommendedTransaction===!0),h=be(s.controllers),i=we(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})},Qn=R.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
package/dist/assets/{WiseConfirmationScreen-egcHJS2j.js → WiseConfirmationScreen-BcU-8yI5.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as o}from"./liveblocks-PtDFv95_.js";import{a as f}from"./sentry-mCXLUbmc.js";import{t as u,u as h,j as b,N as y}from"./core-BZimyUuM.js";import{Lt as I,f6 as w,AX as j}from"./zeni-epic-state-D1RAQ_Ab.js";import{z as l,B as x,D as S,N as D}from"./index-
|
|
1
|
+
import{j as o}from"./liveblocks-PtDFv95_.js";import{a as f}from"./sentry-mCXLUbmc.js";import{t as u,u as h,j as b,N as y}from"./core-BZimyUuM.js";import{Lt as I,f6 as w,AX as j}from"./zeni-epic-state-D1RAQ_Ab.js";import{z as l,B as x,D as S,N as D}from"./index-aKhhTDIh.js";import{n as p}from"./mui-BcLZDyi8.js";import"./recharts-Nefi66IQ.js";import"./analytics-CVef-z80.js";import"./plaid-CooQT--5.js";import"./dnd-Ck7mLEKI.js";import"./stripe-DMRn4zHo.js";import"./lottie-D7iBAvwy.js";import"./lexical-D_s6IbSB.js";import"./pdf-CPbk6pQ4.js";import"./utils-C9yOAUzR.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]="f43bd47a-9668-41e0-9922-34b02811b37f",e._sentryDebugIdIdentifier="sentry-dbid-f43bd47a-9668-41e0-9922-34b02811b37f")}catch{}})();const q=()=>{const[e]=u(),t=e.get("code")??"",s=e.get("state")??"",g=e.get("profileId")??"",[n,m]=f.useState(!1),a=h(),i=b(c=>I(c)),r=l.getSignedInUser(),d=l.getSignedInUserTenantWithId(s);if(r==null||d==null)return o.jsx(y,{to:"/signin/auth",replace:!0});if(r==null)throw Error("Can't access this page without signing in...");return w(r.userId,r.zeniSessionId,d?.tenantId),f.useEffect(()=>{n||(m(!0),a(j(t,g,s)))},[n,a]),i.fetchState==="Error"?o.jsx(E,{children:o.jsx(_,{children:i.error?.message??""})}):(i.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;
|