@zeniai/web-app-ui 5.4.21-dev → 5.4.21-next
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/{AccountMappingScreen-CykY8jdu.js → AccountMappingScreen-CNps2c4g.js} +1 -1
- package/dist/assets/{ActualMatchingMatchDetailScreen-UFhJKVUq.js → ActualMatchingMatchDetailScreen-YEeqk6Zp.js} +1 -1
- package/dist/assets/AddressRoutes-DiGUM-Ah.js +1 -0
- package/dist/assets/{AddressScreen-DXVWlMXp.js → AddressScreen-DTHectLm.js} +1 -1
- package/dist/assets/{AiCfoScreen-UfYXu56F.js → AiCfoScreen-B2gtbDf7.js} +1 -1
- package/dist/assets/{AppDrawer-ky_X7SdS.js → AppDrawer-BNrm6Unj.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-BHV3_xPL.js → BillPayApprovalRoutes-BXjeKRQ0.js} +1 -1
- package/dist/assets/{BillPayRoutes-DwoZ4Wej.js → BillPayRoutes-9LIjosJx.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-DcJAu1U8.js → BusinessVerificationPageScreen-DfgDpNPJ.js} +1 -1
- package/dist/assets/{CardsAiCfoScreen-o65vXGHV.js → CardsAiCfoScreen-3_sFV2Ml.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-CX_ID8PO.js → ChargeCardRoutes-BrxWQBKB.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-wpe4W-A1.js → CompanyPassportScreen-D9J5NscU.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-D5XNzpDd.js → ConnectionAuthScreen-BPHZkh6G.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-Cud9qjqo.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-Crv7_qXD.js → CustomerOnboardingRoutes-B5SaMgHv.js} +1 -1
- package/dist/assets/{CustomersRoutes-CsT3I1KS.js → CustomersRoutes-CVgGJswf.js} +1 -1
- package/dist/assets/{DashboardRoutes-CkNHYlwe.js → DashboardRoutes-CPUNBtcw.js} +1 -1
- package/dist/assets/{DefaultTenantHome-BMhKHh4Y.js → DefaultTenantHome-C9USEe2D.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-BsNFmHCW.js → DomesticWireDetailScreen-D9Y4Vys1.js} +1 -1
- package/dist/assets/{DrawerScreen-DPBr2rYW.js → DrawerScreen-COYxf4a_.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-BEbJufIv.js → EntityDetailRoutes-CY-pNBzS.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-BWV2tipJ.js → ExpenseAutomationRoutes-DLMk8DPD.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-Co6UN19B.js → FeaturePreviewScreen-D7KvTxUl.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-BM3fROhV.js → HubSpotOAuthCallbackScreen-CpWODxVs.js} +1 -1
- package/dist/assets/{InboxNotificationsProvider-iLGG8Hne.js → InboxNotificationsProvider-DgU7-WH3.js} +1 -1
- package/dist/assets/{InvoicingRoutes-BDKU1kok.js → InvoicingRoutes-D7I28onf.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-LlQPtwmF.js → MagicLinkRoutes-DJxwtwLL.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-DiuwGQZA.js → MagicLinkSignInScreen-cjFRT0pp.js} +1 -1
- package/dist/assets/{MobileAppDrawer-Ct61dQgI.js → MobileAppDrawer-QsBOZtGR.js} +1 -1
- package/dist/assets/NotFoundScreen-62ZwPZD8.js +1 -0
- package/dist/assets/{NotificationRoutes-Bq6Q_RnE.js → NotificationRoutes-DgyyQzJn.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-QNvpnHLR.js → OAuthConsentScreen-oLGZ4UKO.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-spqAx7Nj.js → PandLWithForecastRoutes-Byqs-iPS.js} +1 -1
- package/dist/assets/{PaymentLinkScreen-Xa9F1vkq.js → PaymentLinkScreen-CtYs51-a.js} +1 -1
- package/dist/assets/{PeopleRoutes-BOxWPOrb.js → PeopleRoutes-B5A-Tpws.js} +1 -1
- package/dist/assets/{PerformanceRoutes-DIk329y5.js → PerformanceRoutes-CIq9UMN2.js} +1 -1
- package/dist/assets/{Preview-CfQKOy5n.js → Preview-B7YinIiQ.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-OL7fpWNi.js → QBOConnectionScreen-BvJN0vdq.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-Cz6prEK3.js → ReimbursementApprovalRoutes-DJFklLxf.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CsHKBNa1.js → ReimbursementApprovalRuleDetailScreen-CdMCxq5v.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-BJsGbiLA.js → ReimbursementRoutes-HqQZzHgE.js} +1 -1
- package/dist/assets/{ReportsRoutes-Q_1D8cZK.js → ReportsRoutes-CnGiYy5C.js} +1 -1
- package/dist/assets/{RewardsRoutes-Dl2249xj.js → RewardsRoutes-BsYJ465t.js} +1 -1
- package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-BdjCOE8f.js → ScheduleDetailsPrepaidExpensesScreen-gV26nTmK.js} +1 -1
- package/dist/assets/{ScreenRoutes-n390CBhV.js → ScreenRoutes-CQPbRX2a.js} +2 -2
- package/dist/assets/{SettingsRoutes-BpaF5UCO.js → SettingsRoutes-CD1wEg-n.js} +1 -1
- package/dist/assets/{SetupPagesScreen-B4mnKcCt.js → SetupPagesScreen-CGSGhPYa.js} +1 -1
- package/dist/assets/{SignInScreen-U-UH-98t.js → SignInScreen-CyZOVBTb.js} +1 -1
- package/dist/assets/{SignOutScreen-Bb8QCtlv.js → SignOutScreen-BzT1GyXB.js} +1 -1
- package/dist/assets/{TaskListScreen-cAzkNljY.js → TaskListScreen-CGZw_rHi.js} +1 -1
- package/dist/assets/{TaskRoutes-DWGwCtaS.js → TaskRoutes-wAulbJhb.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-DN0MAIjC.js → TransactionDetailRoutes-DkNDZeWn.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-BXxFjzdw.js → TransactionDetailScreen-DWGL2jzj.js} +1 -1
- package/dist/assets/{TransactionListRoutes-DydlnHAH.js → TransactionListRoutes-Ds8Blr0P.js} +1 -1
- package/dist/assets/{TreasuryRoutes-B4mGKq9W.js → TreasuryRoutes-CuPXFHKq.js} +1 -1
- package/dist/assets/{VendorsRoutes-D1ROPhMq.js → VendorsRoutes-DwomB3zm.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-B63B7RbG.js → WiseConfirmationScreen-BC7k73C3.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-CZ-mVo79.js → ZeniAccountRoutes-6G8fVXON.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-BkBxUanJ.js → ZeniAccountStatementScreen-CMk5KOCO.js} +1 -1
- package/dist/assets/{accountMappingHelper-D9GxJ4jJ.js → accountMappingHelper-eL9XJ0hM.js} +1 -1
- package/dist/assets/{analytics-BSiwA26E.js → analytics-DOSt68hW.js} +1 -1
- package/dist/assets/{analyticsHelper-Vk8jtaRR.js → analyticsHelper-DpuSAcdJ.js} +1 -1
- package/dist/assets/{core-Drb9PBdf.js → core-BLE-efAE.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-BeDShQ8t.js → decodeURIComponentSafe-Bwl2ftU9.js} +1 -1
- package/dist/assets/{dnd-BrXK45tY.js → dnd-_7Bcanxg.js} +1 -1
- package/dist/assets/{empty-De4DQHyL.js → empty-DawNxSIf.js} +1 -1
- package/dist/assets/{empty-CWmPtLB4.js → empty-DsF-r_38.js} +1 -1
- package/dist/assets/{emptyVideoElement-BiGfqLLw.js → emptyVideoElement-D3e7J9mt.js} +1 -1
- package/dist/assets/{epic-Bbr0Pn8Q.js → epic-CFCbdQa5.js} +1 -1
- package/dist/assets/{expenseAutomationHelper-X3OcZ-IX.js → expenseAutomationHelper-CeE0lEsm.js} +1 -1
- package/dist/assets/{getLocaleForTenant-DdWfA4jD.js → getLocaleForTenant-DtkHbzuc.js} +1 -1
- package/dist/assets/{index-t6kaSbkJ.js → index-B_crlpCt.js} +1 -1
- package/dist/assets/{index-CYlJ1a_s.js → index-CRJkFvq1.js} +1 -1
- package/dist/assets/{index-D05GaSwv.js → index-ClQj7mfP.js} +1 -1
- package/dist/assets/{index-Rm-5en55.js → index-CxmRqFuX.js} +1 -1
- package/dist/assets/{index-z_GphMeq.js → index-DByp7gYR.js} +8 -8
- package/dist/assets/{index-DIUoYuXz.js → index-DDiWh_gu.js} +1 -1
- package/dist/assets/{index-Bt49Udfl.js → index-DIZkTgPC.js} +1 -1
- package/dist/assets/{index-CfHkHPtG.js → index-DvSNyGXH.js} +2 -2
- package/dist/assets/{lexical-5AsGuqwY.js → lexical-CRb0eiRh.js} +1 -1
- package/dist/assets/{liveblocks-njwIYHC1.js → liveblocks-DsfYQPDU.js} +1 -1
- package/dist/assets/{lottie-C-ls43Md.js → lottie-CvlQ31Z0.js} +1 -1
- package/dist/assets/{mui-B5W8_mOr.js → mui-DsLgO0pD.js} +1 -1
- package/dist/assets/{pathToGoBack-BVrXlWbG.js → pathToGoBack-CA4HTT5M.js} +1 -1
- package/dist/assets/{pdf-BZk_6t2l.js → pdf-Nx2bnRAL.js} +3 -3
- package/dist/assets/{pdf-lib-DPpp3HiM.js → pdf-lib-bba0IcK_.js} +1 -1
- package/dist/assets/{plaid-Cr5PEIle.js → plaid-CsR4G1V6.js} +1 -1
- package/dist/assets/{pusher-CSQbRJHx.js → pusher-BNgRZjBz.js} +1 -1
- package/dist/assets/{react-Dh24EN9G.js → react-B2lUtNPV.js} +1 -1
- package/dist/assets/{react-DctGkwQV.js → react-BzXapfJl.js} +1 -1
- package/dist/assets/{react-N1WgNt-u.js → react-Cv_cvXX7.js} +1 -1
- package/dist/assets/{react-DYFog7aV.js → react-D72JaZj8.js} +1 -1
- package/dist/assets/{react-CXOn4Sf8.js → react-DlNNtpZg.js} +1 -1
- package/dist/assets/{react-mPSX53PV.js → react-bNqDJZ_D.js} +1 -1
- package/dist/assets/{recharts-CA6HYyTi.js → recharts-BrF9RV-y.js} +1 -1
- package/dist/assets/{reportTimeframe-BbZLWisn.js → reportTimeframe-iR64H8K5.js} +1 -1
- package/dist/assets/{routePaths-DR8gB3XS.js → routePaths-Bywswu4r.js} +1 -1
- package/dist/assets/{sentry-VFPS4V5K.js → sentry-BOcQ3kj3.js} +1 -1
- package/dist/assets/{stripSplatSuffix-DKTWsyEu.js → stripSplatSuffix-CdLD7Q-9.js} +1 -1
- package/dist/assets/{url-DK4U3B1Z.js → url-Bg72l38C.js} +1 -1
- package/dist/assets/{url-CvFWVqy3.js → url-HoGgtb9G.js} +1 -1
- package/dist/assets/{useActualMatchingMatchDetail-C8BSOHSu.js → useActualMatchingMatchDetail-BLrdVfvU.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-CyHYQDPy.js → useAiCfoDashboardSuggestedQuestionsChips-B5R3NZLn.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-BV1kovUD.js → useAskAiCfoHostNavButtonProps-DJfxJxgV.js} +1 -1
- package/dist/assets/{useChargeCardPusherEvents-BW-fScDD.js → useChargeCardPusherEvents-BX1c4wSC.js} +1 -1
- package/dist/assets/{useDeviceId-B5JBZYk7.js → useDeviceId-BkdpcqBS.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-DQJDDPj6.js → useEmailConnectResultRefresh-CmeR8OjB.js} +1 -1
- package/dist/assets/{useEnsureVendorListLoaded-T6HLY1O3.js → useEnsureVendorListLoaded-CllPhnHH.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-CE7-w0Ve.js → useInitialThreadRequest-vezVMaGs.js} +1 -1
- package/dist/assets/{useIsCustomersTabEnabled-CxdytBTD.js → useIsCustomersTabEnabled-DWpqS9JG.js} +1 -1
- package/dist/assets/{useTaskManagerAccess-D-MaKZ1u.js → useTaskManagerAccess-g91qWg_Z.js} +1 -1
- package/dist/assets/{useTaskManagerPusherEvents-UBdwYUHJ.js → useTaskManagerPusherEvents-Sy36jLlk.js} +1 -1
- package/dist/assets/{utils-CibnWgOj.js → utils-Dl4IzX4w.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-BLWvlaZt.js → withTransactionSidePanel-CJHd-i6O.js} +1 -1
- package/dist/assets/{zeni-epic-state-9qkFzYai.js → zeni-epic-state-Cj-eqUB4.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/AddressRoutes-D_IpH71K.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-H9oLbmaI.js +0 -1
- package/dist/assets/NotFoundScreen-BThXAXPU.js +0 -1
package/dist/assets/{PandLWithForecastRoutes-spqAx7Nj.js → PandLWithForecastRoutes-Byqs-iPS.js}
RENAMED
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as n}from"./liveblocks-
|
|
1
|
+
import{j as n}from"./liveblocks-DsfYQPDU.js";import{h as V,u as Y,g as z,i as J,j as d,l as H,n as K,o as S}from"./core-BLE-efAE.js";import{fJ as v,AN as R,vq as Q,Wv as w,vl as T,bq as X,c2 as Z,vm as ee,Ww as ae,Wc as C,el as te,EG as se,Wx as oe,F3 as re,e2 as ne,e1 as ce}from"./zeni-epic-state-Cj-eqUB4.js";import{ag as ie,z as le,ao as de,aq as me,V as fe,a6 as pe,h as M,aB as ue,j as he,p as Fe,_ as ge}from"./index-DByp7gYR.js";import"./mui-DsLgO0pD.js";import Ie from"./NotFoundScreen-62ZwPZD8.js";import{F as be}from"./FeaturePreviewScreen-D7KvTxUl.js";import{a as F}from"./sentry-BOcQ3kj3.js";import{u as Se}from"./useAskAiCfoHostNavButtonProps-DJfxJxgV.js";import{u as Ce}from"./useInitialThreadRequest-vezVMaGs.js";import{t as Te}from"./routePaths-Bywswu4r.js";import{M as ye}from"./MobileAppDrawer-QsBOZtGR.js";import"./recharts-BrF9RV-y.js";import"./analytics-DOSt68hW.js";import"./plaid-CsR4G1V6.js";import"./dnd-_7Bcanxg.js";import"./stripe-cKAAJElX.js";import"./lottie-CvlQ31Z0.js";import"./lexical-CRb0eiRh.js";import"./pdf-Nx2bnRAL.js";import"./utils-Dl4IzX4w.js";import"./InboxNotificationsProvider-DgU7-WH3.js";import"./useTaskManagerAccess-g91qWg_Z.js";import"./useIsCustomersTabEnabled-DWpqS9JG.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="32114e74-bd0c-4d89-b1c1-fa33f46bd1cd",s._sentryDebugIdIdentifier="sentry-dbid-32114e74-bd0c-4d89-b1c1-fa33f46bd1cd")}catch{}})();const y=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},xe=H((function(s){const e=ae(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach((r=>{a[r]=o[r]===!1})),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:M}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(w(a,o)),e.isPandLReportFetched(a)||s(T(a)),y(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(re(a))},onForecastVsActualsCompareToggle:a=>{s(oe(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(se(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,c;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,c=te(o)):o.balanceTimeFrame==="year"?(r="quarter",c={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),c!=null&&r!=null){const u=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,c),m=he(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(u,{state:{pathnameStackToGoBack:m,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}}))(ue);function U(){const s=ie(),e=V(),a=Y(),o=z(),{forecastId:r,tenantEmailDomain:c}=J(),[p,u]=F.useState(!1),[m,x]=F.useState(!1),g=le.getSignedInUser(),A=d((t=>v(t))),_=A.company?.companyInfo.firstMonthOfFY??1,i=d((t=>R(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),D=d((t=>t.profitAndLossState)),j=d((t=>t.reportUIOptionsState.selectedForecast)),k=t=>D.pandLByForecastID[t]!=null&&ee(t,D).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:I}=de();me({isDataReady:l});const{isAiCfoAccessEnabled:q,onAskAiCfoClick:N}=Se({mobileExploreReferrer:"Forecast"});F.useEffect((()=>{if(!p&&I)u(!0),l||a(Q());else if(l&&!m){x(!0);const t=((f,E,O)=>E!=null?f.forecasts.findIndex((b=>b.id===E)):O!=null?f.forecasts.findIndex((b=>b.id===O)):f.forecasts.length>0?0:-1)(i,r,j?.id);t===-1&&r!=null?e("page-not-found",{replace:!0}):t!==-1&&t!=j?.index?(a(w(i.forecasts[t].id,t)),y(r,i.forecasts[t].id,e,o.search)):r==null&&t!==-1&&y(void 0,i.forecasts[t].id,e,o.search),t!==-1&&!k(i.forecasts[t].id)&&I&&a(T(i.forecasts[t].id))}}),[p,u,a,l,i,m,x,R,T,I]);const L=fe(),W=L?.loggedInUserRole!=null&&X(L.loggedInUserRole),B=Ce(A?.companyId,{clearParams:l&&m}),[$,G]=F.useState(!1),h=new URL(s("forecast_pandl"));h.searchParams.set("firstname",g?.firstName??""),h.searchParams.set("lastname",g?.lastName??""),h.searchParams.set("email",g?.userEmail??"");const P=t=>{G(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(pe,{analytics:M,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:$,handleDrawerToggle:P}),n.jsx(xe,{firstMonthOfFY:_,tenantEmailDomain:c,forecastIdFromUrlPath:r,navigate:e,location:o,isPandLReportFetched:k,meetingUrl:Z(h.toString()),hasTransactionAccess:W,isAiCfoAccessEnabled:q,onAskAiCfoClick:N,initialOpenThreadRequest:B,onClickMenuIcon:()=>{P(!0)}})]})}function He(){const s=d((c=>v(c))),{useFeatureGate:e}=Fe(),{isFeatureEnabled:a}=e(ge.isDebitCardFeatureEnabled),o=ne(a,s),r=ce(s);return o===!0||r===!0?n.jsx(be,{}):n.jsxs(K,{children:[n.jsx(S,{path:"/",element:n.jsx(U,{})}),n.jsx(S,{path:"/:forecastId",element:n.jsx(U,{})}),n.jsx(S,{path:"/:forecastId/*",element:n.jsx(Ie,{})})]})}export{He as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-
|
|
1
|
+
import{j as r}from"./liveblocks-DsfYQPDU.js";import{a as p}from"./sentry-BOcQ3kj3.js";import{E as a,a7 as u,ab as f,ac as h}from"./index-DByp7gYR.js";import{s as d}from"./mui-DsLgO0pD.js";import{i as y}from"./core-BLE-efAE.js";import"./zeni-epic-state-Cj-eqUB4.js";import"./recharts-BrF9RV-y.js";import"./analytics-DOSt68hW.js";import"./plaid-CsR4G1V6.js";import"./dnd-_7Bcanxg.js";import"./stripe-cKAAJElX.js";import"./lottie-CvlQ31Z0.js";import"./lexical-CRb0eiRh.js";import"./pdf-Nx2bnRAL.js";import"./utils-Dl4IzX4w.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]="8e7dd9f4-06b5-4f16-8d32-9e3d111e8904",e._sentryDebugIdIdentifier="sentry-dbid-8e7dd9f4-06b5-4f16-8d32-9e3d111e8904")}catch{}})();const g=d("div")`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-DsfYQPDU.js";import{Wr as re,fJ as Y,m4 as _,e2 as q,e1 as le,Te as N,VP as de,Dw as Pe,Ws as Q,Dl as je,DG as Le,DA as ce,Dp as pe,DE as Te,DB as ve,Wt as ue,sM as Ae,ga as Re,gH as Ve,Wu as H,Dt as me,Ds as ge,DJ as Fe,cb as Oe}from"./zeni-epic-state-Cj-eqUB4.js";import{$ as fe,p as X,_ as W,z as G,f as he,R as Ce,ad as ye,ax as be,ay as Be,a9 as De,E as F,ae as Se,G as K,az as Ze,ao as Ue,aq as $e,a6 as ze,h as we,Q as He,j as We,aA as _e,V as Ge}from"./index-DByp7gYR.js";import{D as xe,n as M,S as Ie}from"./mui-DsLgO0pD.js";import ae from"./NotFoundScreen-62ZwPZD8.js";import{a as d}from"./sentry-BOcQ3kj3.js";import{u as ee,i as Ke,j as g,h as Me,g as Je,l as Qe,n as se,o as z}from"./core-BLE-efAE.js";import{u as Ye}from"./useAskAiCfoHostNavButtonProps-DJfxJxgV.js";import{M as qe}from"./MobileAppDrawer-QsBOZtGR.js";import"./recharts-BrF9RV-y.js";import"./analytics-DOSt68hW.js";import"./plaid-CsR4G1V6.js";import"./dnd-_7Bcanxg.js";import"./stripe-cKAAJElX.js";import"./lottie-CvlQ31Z0.js";import"./lexical-CRb0eiRh.js";import"./pdf-Nx2bnRAL.js";import"./utils-Dl4IzX4w.js";import"./InboxNotificationsProvider-DgU7-WH3.js";import"./useTaskManagerAccess-g91qWg_Z.js";import"./useIsCustomersTabEnabled-DWpqS9JG.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]="43a1adfc-0bad-4f95-9660-98724eb9f71a",e._sentryDebugIdIdentifier="sentry-dbid-43a1adfc-0bad-4f95-9660-98724eb9f71a")}catch{}})();const Ne={overlayWidth:new De(100,100,48)},te=K.getLocalizedStrings().peoplePage.invitePage,ne=K.getLocalizedStrings().common,Xe=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=fe(),m=ee(),[O,B]=d.useState(!1),[k,D]=d.useState(!1),{userId:S}=Ke(),r=g((l=>re(l))),p=g((l=>Y(l))),E=g((l=>_(l))),{useFeatureGate:x}=X(),{isFeatureEnabled:I}=x(W.isDebitCardFeatureEnabled),P=q(I,p),T=le(p),v=N(p),Z=de(p),U=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,w=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(G.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(Q()),b()},A=()=>{O===!0?D(!0):C()},$=c.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=x(W.isChargeCardFeatureEnabled),L=he(p,j,I),{isCardsHidden:R}=Ce(p?.tenantId),y=!L||R,V=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:v,isAccountingClassesEnabled:E,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:V===!1,isLiteRoleDisabled:Z===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:T,onResetClick:C,onDeleteUser:l=>{m(pe(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(ce({peopleLocalData:l})),B(!0)},onSaveClick:()=>{m(f==="zeni_only"?je(e):Le(v))},onCloseClick:A,isLoading:w||r.person==null},o={onOkClick:()=>{D(!1),C()},onCancelClick:()=>{D(!1)}};return d.useEffect((()=>{w===!1&&S!=null&&m(Pe(S))}),[w,S]),d.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(xe,{anchor:"right",open:i,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:ye.overlayDark,cursor:"pointer"}}},onClose:A,children:a.jsxs(ea,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(be,{titleComponent:a.jsx(ke,{children:te.discardTitle}),descriptionComponent:a.jsx(Ee,{children:te.discardDescription}),primaryButtonText:ne.yes,secondaryButtonText:ne.no,action:o,isEditPopup:!0}):null,a.jsx(Be,{...s})]})})},ea=M(Ie)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-DsfYQPDU.js";import E from"./NotFoundScreen-62ZwPZD8.js";import{a as r}from"./sentry-BOcQ3kj3.js";import{h as _,g as v,j as p,i as M,u as U,N as P,l as z,n as O,o as h}from"./core-BLE-efAE.js";import{fJ as Q,a2u as b,bo as B,bn as N,iQ as V,gl as q}from"./zeni-epic-state-Cj-eqUB4.js";import{v as F,z as I,aq as J,dQ as $}from"./index-DByp7gYR.js";import"./mui-DsLgO0pD.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-DJfxJxgV.js";import{M as H}from"./MobileAppDrawer-QsBOZtGR.js";import"./recharts-BrF9RV-y.js";import"./analytics-DOSt68hW.js";import"./plaid-CsR4G1V6.js";import"./dnd-_7Bcanxg.js";import"./stripe-cKAAJElX.js";import"./lottie-CvlQ31Z0.js";import"./lexical-CRb0eiRh.js";import"./pdf-Nx2bnRAL.js";import"./utils-Dl4IzX4w.js";import"./InboxNotificationsProvider-DgU7-WH3.js";import"./useTaskManagerAccess-g91qWg_Z.js";import"./useIsCustomersTabEnabled-DWpqS9JG.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]="b4515c84-85f5-41db-8331-3f0c22ad4cdc",e._sentryDebugIdIdentifier="sentry-dbid-b4515c84-85f5-41db-8331-3f0c22ad4cdc")}catch{}})();const K=z((function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}}),(function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}}))($),L=()=>{const e=_(),t=v(),c=F(),o=p((a=>Q(a))),{aggregatedReportViewState:n}=p((a=>b(a))),{tenantEmailDomain:f}=M(),u=U(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[S,w]=r.useState(!1),C=B(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=C||k||x,d=r.useCallback(((a,i,T)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:T}))}),[]);r.useEffect((()=>{n?.fetchState==="Completed"&&m.current&&(u(q({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)}),[n?.fetchState]);const D=r.useCallback(((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),m.current=!0}),[n?.fetchState,d]),j=r.useCallback(((a,i)=>{d(a,i,!1)}),[d]),g=a=>{w(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=G({mobileExploreReferrer:"Performance"});return J({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(H,{isAppContentDrawerOpen:S,handleDrawerToggle:g}),s.jsx(K,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:f,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(P,{to:`/${f}/dashboard`,replace:!0})};function be(){return s.jsxs(O,{children:[s.jsx(h,{path:"*",element:s.jsx(L,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{be as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,R as a}from"./sentry-
|
|
1
|
+
import{a as h,R as a}from"./sentry-BOcQ3kj3.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new r.Error().stack;t&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[t]="1e16de4c-304f-4e91-a86b-dc86bcc8d8a2",r._sentryDebugIdIdentifier="sentry-dbid-1e16de4c-304f-4e91-a86b-dc86bcc8d8a2")}catch{}})();const c="64px",u={};var k=({src:r,light:t,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:b})=>{const[p,i]=h.useState(null);h.useEffect((()=>{r&&t&&n&&v({src:r,light:t,oEmbedUrl:n})}),[r,t,n]);const v=async({src:e,light:s,oEmbedUrl:I})=>{if(a.isValidElement(s))return;if(typeof s=="string")return void i(s);if(u[e])return void i(u[e]);i(null);const E=await fetch(I.replace("{url}",e)),f=await E.json();if(f.thumbnail_url){const g=f.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(g),u[e]=g}},d=a.isValidElement(t),y={display:"flex",alignItems:"center",justifyContent:"center"},o={preview:{width:"100%",height:"100%",backgroundImage:p&&!d?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:d?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=a.createElement("div",{style:o.shadow,className:"react-player__shadow"},a.createElement("div",{style:o.playIcon,className:"react-player__play-icon"}));return a.createElement("div",{style:o.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...b?{"aria-label":b}:{}},d?t:null,w||_)};export{k as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as _l}from"./liveblocks-
|
|
1
|
+
import{j as _l}from"./liveblocks-DsfYQPDU.js";import{p as te,d as jc,c as an,g as Sl,a as Ol}from"./sentry-BOcQ3kj3.js";import{L as ge,c2 as xc,fJ as kc,UV as Tc,VN as jl,cb as xl}from"./zeni-epic-state-Cj-eqUB4.js";import{a as pe,b as kl,c as Tl,d as Al,e as un,f as Rl,g as Pl,h as Il,i as Ve,j as Ac,k as ot,l as xt,m as Ll,o as ct,p as Nl}from"./utils-Dl4IzX4w.js";import{r as cn}from"./empty-DawNxSIf.js";import{r as $l,a as Ml,b as Cl,c as Dl}from"./pdf-lib-bba0IcK_.js";import{a as Ye,r as Fl}from"./index-CxmRqFuX.js";import{r as Ul}from"./index-B_crlpCt.js";import{h as Bl,g as ql,u as Gl,j as _n,l as zl}from"./core-BLE-efAE.js";import{u as Zl,z as Rc,L as Hl,ai as Vl,aj as Yl,W as Wl,A as Kl}from"./index-DByp7gYR.js";import"./mui-DsLgO0pD.js";import{d as It}from"./decodeURIComponentSafe-Bwl2ftU9.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]="6c259799-78a3-4006-baf2-f74fd668cb3f",e._sentryDebugIdIdentifier="sentry-dbid-6c259799-78a3-4006-baf2-f74fd668cb3f")}catch{}})();var Sn,On={exports:{}},jn,xn,kn,Tn,An,Rn,Pn,In,Ln,Lt,Nn,$n,Mn,Cn,Dn,Fn,Un,Bn,qn,Gn,zn,Nt,Zn,Hn,Vn,Yn,Wn,Kn,Jn,$t,Xn,Qn,eo,to,ro,no,oo,Mt={exports:{}},Ct={exports:{}},Dt={};function Pc(){if(jn)return Dt;function e(r){return e=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(t){return typeof t}:function(t){return t&&typeof Symbol=="function"&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},e(r)}function o(r,t){return o=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(i,l){return i.__proto__=l,i},o(r,t)}function h(r){var t=(function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}})();return function(){var i,l=n(r);if(t){var u=n(this).constructor;i=Reflect.construct(l,arguments,u)}else i=l.apply(this,arguments);return(function(f,b){if(b&&(e(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return(function(m){if(m===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return m})(f)})(this,i)}}function n(r){return n=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(t){return t.__proto__||Object.getPrototypeOf(t)},n(r)}jn=1;var c,p,y={};function g(r,t,i){i||(i=Error);var l=(function(u){(function(a,d){if(typeof d!="function"&&d!==null)throw new TypeError("Super expression must either be null or a function");a.prototype=Object.create(d&&d.prototype,{constructor:{value:a,writable:!0,configurable:!0}}),Object.defineProperty(a,"prototype",{writable:!1}),d&&o(a,d)})(m,u);var f,b=h(m);function m(a,d,v){var _;return(function(w,S){if(!(w instanceof S))throw new TypeError("Cannot call a class as a function")})(this,m),_=b.call(this,(function(w,S,N){return typeof t=="string"?t:t(w,S,N)})(a,d,v)),_.code=r,_}return f=m,Object.defineProperty(f,"prototype",{writable:!1}),f})(i);y[r]=l}function s(r,t){if(Array.isArray(r)){var i=r.length;return r=r.map((function(l){return String(l)})),i>2?"one of ".concat(t," ").concat(r.slice(0,i-1).join(", "),", or ")+r[i-1]:i===2?"one of ".concat(t," ").concat(r[0]," or ").concat(r[1]):"of ".concat(t," ").concat(r[0])}return"of ".concat(t," ").concat(String(r))}return g("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),g("ERR_INVALID_ARG_TYPE",(function(r,t,i){var l,u,f;if(c===void 0&&(c=it()),c(typeof r=="string","'name' must be a string"),typeof t=="string"&&(u="not ",t.substr(0,u.length)===u)?(l="must not be",t=t.replace(/^not /,"")):l="must be",(function(m,a,d){return(d===void 0||d>m.length)&&(d=m.length),m.substring(d-a.length,d)===a})(r," argument"))f="The ".concat(r," ").concat(l," ").concat(s(t,"type"));else{var b=(function(m,a,d){return typeof d!="number"&&(d=0),!(d+a.length>m.length)&&m.indexOf(a,d)!==-1})(r,".")?"property":"argument";f='The "'.concat(r,'" ').concat(b," ").concat(l," ").concat(s(t,"type"))}return f+=". Received type ".concat(e(i))}),TypeError),g("ERR_INVALID_ARG_VALUE",(function(r,t){var i=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";p===void 0&&(p=pe());var l=p.inspect(t);return l.length>128&&(l="".concat(l.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(i,". Received ").concat(l)}),TypeError),g("ERR_INVALID_RETURN_VALUE",(function(r,t,i){var l;return l=i&&i.constructor&&i.constructor.name?"instance of ".concat(i.constructor.name):"type ".concat(e(i)),"Expected ".concat(r,' to be returned from the "').concat(t,'"')+" function but got ".concat(l,".")}),TypeError),g("ERR_MISSING_ARGS",(function(){for(var r=arguments.length,t=new Array(r),i=0;i<r;i++)t[i]=arguments[i];c===void 0&&(c=it()),c(t.length>0,"At least one arg needs to be specified");var l="The ",u=t.length;switch(t=t.map((function(f){return'"'.concat(f,'"')})),u){case 1:l+="".concat(t[0]," argument");break;case 2:l+="".concat(t[0]," and ").concat(t[1]," arguments");break;default:l+=t.slice(0,u-1).join(", "),l+=", and ".concat(t[u-1]," arguments")}return"".concat(l," must be specified")}),TypeError),Dt.codes=y,Dt}function Jl(){if(kn)return xn;function e(j,E){var O=Object.keys(j);if(Object.getOwnPropertySymbols){var P=Object.getOwnPropertySymbols(j);E&&(P=P.filter((function(x){return Object.getOwnPropertyDescriptor(j,x).enumerable}))),O.push.apply(O,P)}return O}function o(j){for(var E=1;E<arguments.length;E++){var O=arguments[E]!=null?arguments[E]:{};E%2?e(Object(O),!0).forEach((function(P){h(j,P,O[P])})):Object.getOwnPropertyDescriptors?Object.defineProperties(j,Object.getOwnPropertyDescriptors(O)):e(Object(O)).forEach((function(P){Object.defineProperty(j,P,Object.getOwnPropertyDescriptor(O,P))}))}return j}function h(j,E,O){return(E=c(E))in j?Object.defineProperty(j,E,{value:O,enumerable:!0,configurable:!0,writable:!0}):j[E]=O,j}function n(j,E,O){return E&&(function(P,x){for(var U=0;U<x.length;U++){var L=x[U];L.enumerable=L.enumerable||!1,L.configurable=!0,"value"in L&&(L.writable=!0),Object.defineProperty(P,c(L.key),L)}})(j.prototype,E),Object.defineProperty(j,"prototype",{writable:!1}),j}function c(j){var E=(function(O,P){if(l(O)!=="object"||O===null)return O;var x=O[Symbol.toPrimitive];if(x!==void 0){var U=x.call(O,P);if(l(U)!=="object")return U;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(O)})(j,"string");return l(E)==="symbol"?E:String(E)}function p(j,E){if(E&&(l(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return y(j)}function y(j){if(j===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return j}function g(j){var E=typeof Map=="function"?new Map:void 0;return g=function(O){if(O===null||(P=O,Function.toString.call(P).indexOf("[native code]")===-1))return O;var P;if(typeof O!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(O))return E.get(O);E.set(O,x)}function x(){return s(O,arguments,i(this).constructor)}return x.prototype=Object.create(O.prototype,{constructor:{value:x,enumerable:!1,writable:!0,configurable:!0}}),t(x,O)},g(j)}function s(j,E,O){return s=r()?Reflect.construct.bind():function(P,x,U){var L=[null];L.push.apply(L,x);var A=new(Function.bind.apply(P,L));return U&&t(A,U.prototype),A},s.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],(function(){}))),!0}catch{return!1}}function t(j,E){return t=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(O,P){return O.__proto__=P,O},t(j,E)}function i(j){return i=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},i(j)}function l(j){return l=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},l(j)}kn=1;var u=pe().inspect,f=Pc().codes.ERR_INVALID_ARG_TYPE;function b(j,E,O){return(O===void 0||O>j.length)&&(O=j.length),j.substring(O-E.length,O)===E}var m="",a="",d="",v="",_={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(j){var E=Object.keys(j),O=Object.create(Object.getPrototypeOf(j));return E.forEach((function(P){O[P]=j[P]})),Object.defineProperty(O,"message",{value:j.message}),O}function S(j){return u(j,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function N(j,E,O){var P="",x="",U=0,L="",A=!1,z=S(j),R=z.split(`
|
|
2
2
|
`),I=S(E).split(`
|
|
3
3
|
`),k=0,C="";if(O==="strictEqual"&&l(j)==="object"&&l(E)==="object"&&j!==null&&E!==null&&(O="strictEqualObject"),R.length===1&&I.length===1&&R[0]!==I[0]){var H=R[0].length+I[0].length;if(H<=10){if(!(l(j)==="object"&&j!==null||l(E)==="object"&&E!==null||j===0&&E===0))return"".concat(_[O],`
|
|
4
4
|
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as r}from"./liveblocks-
|
|
1
|
+
import{j as r}from"./liveblocks-DsfYQPDU.js";import z from"./NotFoundScreen-62ZwPZD8.js";import{a as p}from"./sentry-BOcQ3kj3.js";import{h as C,g as D,u as V,j as u,N as k,l as O,n as J,o as h}from"./core-BLE-efAE.js";import{fJ as E,_y as b,_Q as w,Os as U,Oo as L,Or as f,Oh as N,$d as $,Ol as K,Ou as Q}from"./zeni-epic-state-Cj-eqUB4.js";import{z as B,w as T,cd as q,n as _,bW as F,ce as G}from"./index-DByp7gYR.js";import"./mui-DsLgO0pD.js";import{u as H}from"./useEnsureVendorListLoaded-CllPhnHH.js";import{R as x}from"./ReimbursementApprovalRuleDetailScreen-CdMCxq5v.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="cf5a8ddf-578e-4ecd-9c4e-5df8a36045f3",e._sentryDebugIdIdentifier="sentry-dbid-cf5a8ddf-578e-4ecd-9c4e-5df8a36045f3")}catch{}})();const A="reimbursement-approval-rule-update",M=O((function(e){return{approvalView:b(e),remiSetupApproverViewUpdateData:w(e).remiSetupApproverViewUpdateData}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(A)&&e($(!1))},onBackClick:()=>{_(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(N(t,!1))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))}}}))(T(q)),P=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,y]=p.useState(!1),S=u((o=>o.remiSetupApproverViewState.fetchState)),c=u((o=>E(o))),d=u((o=>b(o))),g=u((o=>w(o).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{g?.updateStatus.fetchState==="Completed"&&a(U())}),[g]),p.useEffect((()=>{t||S!=="Not-Started"||e||(l(!0),a(L(!0,!1,!1,!1)))}),[t,S,e,a]),B.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{d.allApprovalRules.length===0&&d.fetchState==="Completed"&&(v||(y(!0),a(f())),s("./new"))}),[v,d,a]);const m={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${A}`]:[],eventCallback:(o,R,j)=>{o.endsWith(A)&&j.onApprovalRulesEventReceived(o)}};return c?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(k,{to:"../../promo"}):r.jsx(M,{currentTenant:c,location:n,navigate:s,...m})},I="reimbursement-approval-rule-update",X=O((function(e){const s=b(e),n=w(e).remiSetupApproverViewUpdateData,a={};for(const l of Object.values(e.vendorState.vendorByID))l?.id!=null&&(a[l.id]=l.name);const t={};for(const l of Object.values(e.classState.classesByKey))l?.classId!=null&&(t[l.classId]=l.className);return{approvalView:s,remiSetupApproverViewUpdateData:n,vendorNamesById:a,departmentNamesById:t}}),(function(e,s){const{navigate:n,location:a}=s;return{onApprovalRulesEventReceived:t=>{t.endsWith(I)&&e($(!1))},onBackClick:()=>{_(a)?n("../../"):n("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(N(t,!0))},onEditRuleClick:t=>{t!=null?(e(f(t)),n(`./${t}/edit`)):(e(f()),n("./new"))},onReorderRules:t=>{e(Q(t,!0))}}}))(T(G)),Y=()=>{const e=u((a=>E(a))),{isApprovalRulesV3Enabled:s,isLoading:n}=F(e?.tenantId);return s?r.jsx(Z,{isLoading:n}):r.jsx(P,{isLoading:n})},Z=({isLoading:e})=>{const s=C(),n=D(),a=V(),[t,l]=p.useState(!1),[v,y]=p.useState(!1),[S,c]=p.useState(!1),d=u((i=>i.remiSetupApproverViewState.fetchState)),g=u((i=>i.remiSetupApproverViewState.approverListState.fetchStatus.fetchState)),m=u((i=>E(i))),o=u((i=>b(i)));H();const R=u((i=>w(i).remiSetupApproverViewUpdateData));if(p.useEffect((()=>{R?.updateStatus.fetchState==="Completed"&&a(U())}),[R]),p.useEffect((()=>{t||d!=="Not-Started"||e||(l(!0),a(L(!0,!1,!1,!0)))}),[t,d,e,a]),p.useEffect((()=>{v||g!=="Not-Started"||e||(y(!0),a(K(!1,!0)))}),[v,g,e,a]),B.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect((()=>{o.allApprovalRules.length===0&&o.fetchState==="Completed"&&(S||(c(!0),a(f())),s("./new"))}),[S,o,a]);const j={events:m.companyId!=null?[`private-encrypted-${m.companyId}.${I}`]:[],eventCallback:(i,ee,W)=>{i.endsWith(I)&&W.onApprovalRulesEventReceived(i)}};return m?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(k,{to:"../../promo"}):r.jsx(X,{currentTenant:m,location:n,navigate:s,isLoading:e,...j})};function ue(){return r.jsxs(J,{children:[r.jsx(h,{path:"/",element:r.jsx(Y,{})}),r.jsx(h,{path:"/new",element:r.jsx(x,{})}),r.jsx(h,{path:"/:approvalRuleId/edit",element:r.jsx(x,{})}),r.jsx(h,{path:"*",element:r.jsx(z,{})})]})}export{ue as R};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as g}from"./liveblocks-
|
|
1
|
+
import{j as g}from"./liveblocks-DsfYQPDU.js";import{a as y}from"./sentry-BOcQ3kj3.js";import{h as U,u as x,g as C,i as V,j as S,l as k}from"./core-BLE-efAE.js";import{_Q as _,_y as O,Ok as j,Ox as B,Os as A,Ot as E,_R as F,fJ as z,Or as J}from"./zeni-epic-state-Cj-eqUB4.js";import{z as N,a5 as P,c4 as K,n as $,bW as L,c5 as Q}from"./index-DByp7gYR.js";import{u as q}from"./mui-DsLgO0pD.js";import{u as G}from"./useEnsureVendorListLoaded-CllPhnHH.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},p=new e.Error().stack;p&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[p]="631d9e5f-b8c7-4b21-906f-278be091656d",e._sentryDebugIdIdentifier="sentry-dbid-631d9e5f-b8c7-4b21-906f-278be091656d")}catch{}})();const H=k((function(e,p){const t=_(e),o=t.remiSetupApproverViewUpdateData?.type??"approval_create",s=o==="approval_create"&&t.allApprovalRules.length!==0;let i=t.allApprovalRules.length===0;return p.approvalRuleId&&(i=t.allApprovalRules.findIndex((r=>r.approvalRuleId===p.approvalRuleId))===0),{localData:t,hideUpperBoundField:s,isLowerBoundDisabled:i,approvalUpdateActionType:o}}),(function(e,p){const{navigate:t,approvalUpdateDataView:o,approverViewData:s,approvalRuleId:i}=p,r=o.remiSetupApproverViewUpdateData?.type,l=$(p.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const h=[];return v.forEach((u=>{const b=u.actors.selectedUsers.map((m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1}))),I=u.actors.selectedNonUsers.map((m=>{const f=(R=m.value,F(R)==null);var R;return{type:f?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!f}})),c=b.concat(I);h.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),h},n={amount:{type:"amount",comparator:"range",min:{amount:a.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:a.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(r==="approval_create"){const v={criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}else{const v={approvalRuleId:i,criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(v))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!1))},onSaveRuleSuccess:()=>{t("../")}}}))(K);function M(){const e=U(),p=x(),t=C(),{approvalRuleId:o}=V(),s=N.getSignedInUser(),i=q(),r=S((n=>_(n))),l=S((n=>O(n))),[a,d]=y.useState(!1);if(y.useEffect((()=>{a||(d(!0),p(j(!0)))})),y.useEffect((()=>{l.fetchState==="Not-Started"&&e(o!=null?"../../":"../")}),[l,o]),s==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(P,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):g.jsx(H,{navigate:e,approvalUpdateDataView:r,approvalRuleId:o,approverViewData:l,location:t})}function se(e){return F(e)==null}const X=k((function(e,p){const t=_(e),o=t.remiSetupApproverViewUpdateData?.type??"approval_create",s=[],i={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(s.push(r.id),i[r.id]=r.name);return{localData:t,approvalUpdateActionType:o,allVendorIds:s,vendorNamesById:i,editingRuleId:o==="approval_update"?p.approvalRuleId:void 0,allApprovalRulesWithUser:O(e).allApprovalRules}}),(function(e,p){const{navigate:t,approvalUpdateDataView:o,approverViewData:s,approvalRuleId:i}=p,r=o.remiSetupApproverViewUpdateData?.type,l=$(p.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const m=[];return c.forEach((f=>{const R=f.actorKind?.selectedOption,W=f.selectedRole?.selectedNonUsers??[];let D=[];R==="role"?D=W.map((w=>({type:"attribute",subType:w.value,userId:void 0,idType:void 0,isImplicitActor:!1}))):R==="specific_person"&&(D=(f.persons?.selectedUsers??[]).map((w=>({type:"user",subType:void 0,userId:w.userId,idType:"user",isImplicitActor:!1}))));const T=f.action??"require_approval";m.push({action:T,actors:D,operator:D.length>1?T==="require_approval"?"or":"and":"is"})})),m},n=a.amountCriteria,v=a.vendorCriteria,h=a.departmentCriteria,u={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;u.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:n.min,max:c==="greater_than"?void 0:n.max}}const b=v?.selection.selectedOptions??[];b.length>0&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:b});const I=h?.selection.selectedOptions??[];if(I.length>0&&(u.department={type:"department",operator:h?.operator.selectedOption??"is",departmentIds:I}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}else{const c={approvalRuleId:i,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(c))}},onResetClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||l?t("../"):s.allApprovalRules.length===0&&s.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(J(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(Q);function ne(){const e=S((t=>z(t))),{isApprovalRulesV3Enabled:p}=L(e?.tenantId);return p?g.jsx(Y,{}):g.jsx(M,{})}function Y(){const e=U(),p=x(),t=C(),{approvalRuleId:o}=V(),s=N.getSignedInUser(),i=q(),r=S((n=>_(n))),l=S((n=>O(n))),[a,d]=y.useState(!1);if(G(),y.useEffect((()=>{a||(d(!0),p(j(!1)))})),y.useEffect((()=>{l.fetchState==="Not-Started"&&e(o!=null?"../../":"../")}),[l,o]),s==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?g.jsx(P,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:i.colors.grey5}}):g.jsx(X,{navigate:e,approvalUpdateDataView:r,approvalRuleId:o,approverViewData:l,location:t},o??"new")}export{ne as R,se as i};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-njwIYHC1.js";import{u as ae,j as R,h as Y,g as X,i as ie,N,l as ee,q as lt,n as mt,o as E}from"./core-Drb9PBdf.js";import{fJ as H,Oo as ct,a0j as ge,cb as he,Nu as Ue,mf as dt,NJ as ce,NI as de,a0k as ut,bn as fe,g_ as Le,a0l as pt,XS as bt,m4 as $e,XT as ke,XU as gt,kS as ht,_k as ft,l5 as St,Ni as It,CO as yt,kZ as vt,O3 as Ne,a0m as Pe,a0n as Ce,a0o as At,a0p as Rt,a0q as kt,NP as we,lb as Ct,_t as wt,NH as xt,Ns as Et,a0r as Bt,Nr as Tt,a0s as Dt,Nz as xe,NT as jt,NS as Ft,NO as Ut,a0t as _e,Te as Lt,bo as $t,NC as Nt,Ol as Pt,a0u as _t,a0v as Mt,N$ as Ot,NY as Ee,ZQ as zt,Np as Gt,a0w as Me,OO as Be,OW as Zt,a0x as Vt,a0y as J,a0z as Ht,a0A as Oe,a0B as Wt,a0C as ze,a0D as Ge,Ob as ue,bw as qt,bN as Se,cQ as Ie,e2 as Ze,e1 as Ve,a0E as Jt,gl as Qt,_1 as Xt,a0F as Kt,a0G as He,_5 as Yt,_Q as en,a0H as tn,$d as nn,OT as Te,OS as an,a0I as sn,a0J as on,a0K as rn,a0L as ln,a0M as mn,_z as cn,OJ as dn,ON as un,bq as pn,bM as bn,cK as gn,cx as hn,bv as fn,Ve as Sn,de as In,dh as yn,dg as vn,cJ as An}from"./zeni-epic-state-9qkFzYai.js";import{bW as Rn,v as We,$ as qe,p as oe,_ as U,z as L,cV as Je,a6 as re,h as x,aQ as De,E as j,ac as se,ad as kn,G as Qe,cW as Cn,j as Q,aq as Xe,cX as wn,V as le,cY as xn,ao as En,a9 as Bn,a5 as ye,Q as Ke,w as Tn,bE as Dn,at as jn,ag as Fn,cZ as Un,f as Ln}from"./index-z_GphMeq.js";import{n as P,S as $n,u as Ye}from"./mui-B5W8_mOr.js";import pe from"./NotFoundScreen-BThXAXPU.js";import{S as je}from"./SetupPagesScreen-B4mnKcCt.js";import{F as et}from"./FeaturePreviewScreen-Co6UN19B.js";import{a as g}from"./sentry-VFPS4V5K.js";import{u as ve}from"./useAskAiCfoHostNavButtonProps-BV1kovUD.js";import{u as tt}from"./useInitialThreadRequest-CE7-w0Ve.js";import{D as Nn}from"./DrawerScreen-DPBr2rYW.js";import{M as nt}from"./MobileAppDrawer-Ct61dQgI.js";import{F as Pn}from"./ScreenRoutes-n390CBhV.js";import{R as _n}from"./ReimbursementApprovalRoutes-Cz6prEK3.js";import"./recharts-CA6HYyTi.js";import"./analytics-BSiwA26E.js";import"./plaid-Cr5PEIle.js";import"./dnd-BrXK45tY.js";import"./stripe-cKAAJElX.js";import"./lottie-C-ls43Md.js";import"./lexical-5AsGuqwY.js";import"./pdf-BZk_6t2l.js";import"./utils-CibnWgOj.js";import"./BusinessVerificationPageScreen-DcJAu1U8.js";import"./routePaths-DR8gB3XS.js";import"./analyticsHelper-Vk8jtaRR.js";import"./InboxNotificationsProvider-iLGG8Hne.js";import"./useTaskManagerAccess-D-MaKZ1u.js";import"./useIsCustomersTabEnabled-CxdytBTD.js";import"./getLocaleForTenant-DdWfA4jD.js";import"./useEnsureVendorListLoaded-T6HLY1O3.js";import"./ReimbursementApprovalRuleDetailScreen-CsHKBNa1.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]="c7dd2d98-84e2-4843-bbf6-e6a8f7e84b87",e._sentryDebugIdIdentifier="sentry-dbid-c7dd2d98-84e2-4843-bbf6-e6a8f7e84b87")}catch{}})();const at=e=>`/${e}/reimbursements`,Mn=e=>g.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},g.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:q,spendManagement:{reimbursement:{reimbursementDetail:ne}}}=Qe.getLocalizedStrings(),On=ee((function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),m=L.getSignedInUser(),c=fe(m),d=r.plaidConnectionDetails,i=Le(e.companyState,n),a=e.tenantState.currentTenantId,o={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:a??""},l=ge(e,t.reimbursementId),p=pt(e,m?.userId??"");let I=`${m?.firstName} ${m?.lastName}`,u=!0;t.reimbursementId!=null&&(I=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,u=m?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,y=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:y},authParams:o,defaultCurrency:{currencySymbol:i?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:i?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:i?.company.configInfo.mileageRateConfig,createdBy:I,isUserAdmin:he(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:d,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:p.bankAccountCreationState,bankAccounts:p.bankAccounts,analytics:x,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:u,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:$e(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:m,navigate:c,themeState:d}=t,{tenantEmailDomain:i}=r,a=L.getSignedInUser();return{onReceiptsUpload:(o,l,p)=>{o!=null&&e(de(o,l,p,n,a?.userId))},onExistingMerchantChange:(o,l)=>{e(xe(!1,l,n,o,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Ut(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Ft())},clearRemiSaveStatus:()=>{e(jt("Not-Started",n))},onDuplicateLineClick:(o,l)=>window.open(`/${i}/reimbursement/${o}#L${l}`),onNewMerchantChange:(o,l)=>{e(xe(!1,l,n,void 0,o))},removeFileFromLine:o=>{e(Dt({lineId:o,reimbursementId:n}))},onAmountChanged:(o,l)=>{e(Tt(l,o,n))},updateReimbursementType:(o,l,p)=>{e(Bt({reimbursementId:p,lineId:l,reimbursementType:o}))},onHomeCurrencyConversionUpdate:(o,l,p)=>{e(Et({reimbursementId:p,lineId:l,amountPayload:{amount:o.amount,currency_code:o.currencyCode,currency_symbol:o.currencySymbol}}))},onReimbursementDetailsChanged:o=>{e(xt({remiDetailLocalData:o,reimbursementId:n}))},saveRemiDetails:o=>{e(we(o,!1,n))},onUserBankDetailsUpdated:o=>{const{bankAccountSection:l}=o;e(wt({data:l}))},onFetchBankName:o=>{e(Ct(o))},submitRemiDetails:()=>{e(we("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:o=>{e(Ce({reimbursementId:o}))},updateInvoiceUploadFetchState:o=>{e(ce({reimbursementId:n,fetchState:o}))},clearTentativeNameForLine:o=>{e(kt({reimbursementId:n,lineId:o}))},removeDuplicateReimbursementForLine:o=>{e(Rt({lineId:o}))},onZeniLogoClick:()=>{d.toggle()},clearAddRemiAutoFields:o=>{e(At({reimbursementId:n,lineId:o}))},redirectToReimbursementListScreen:()=>{e(Pe()),e(Ce({}));const o=at(i),l=Q(m.state?.pathnameStackToGoBack,m.pathname);c(o,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(x.trackReimbursementDeleteReimbursement(n),e(Ne(n)))},onSaveBankAccount:()=>{a?.userId&&e(vt(a?.userId,n))},onFetchLinkTokenClick:o=>{e(yt("user_reimbursement_account",o))},onEstablishConnectionClick:o=>{e(It(o,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:o=>{e(St(o,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,l)=>{o.trim().length>=2?e(gt({searchString:o,entityType:l,searchOrigin:"common"})):e(ke("common"))},onCancelAutoComplete:()=>{e(ke("common"))}}}}))(Cn);function Fe(){const e=Y(),t=ae(),n=X(),{reimbursementId:r}=ie(),m=We(),c=qe(),d=g.useRef(!1),[i,a]=g.useState(r==null),[o,l]=g.useState(1),{useFeatureGate:p}=oe(),{isFeatureEnabled:I}=p(U.isLimitedCategoryForReimbursement),{isFeatureEnabled:u}=p(U.isShowDeletedReimbursementsFeatureEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:y}=ve({mobileExploreReferrer:"Reimbursement Details"}),B=X().pathname,D=B.includes("edit"),k=B.includes("reimbursement/new"),[C,v]=g.useState(!1),S=L.getSignedInUser(),w=R((b=>H(b))),h=R((b=>ge(b,r))),$=tt(w?.companyId,{clearParams:h.fetchState==="Completed"}),F=he(w?.userRole??[]);(function(){const b=ae(),M=R((K=>H(K))),O=M?.tenantId,{isApprovalRulesV3Enabled:z,isLoading:W}=Rn(O),G=R((K=>K.remiSetupApproverViewState.fetchState));g.useEffect((()=>{O==null||W||G==="Not-Started"&&b(ct(!0,!1,!1,z))}),[O,W,z,G,b])})(),g.useEffect((()=>{(k&&!C||D&&!C&&h.fetchState!="Completed"&&h.fetchState!="In-Progress")&&(v(!0),t(Ue(!1,I,u,r)))}));const A=R((b=>dt(b.accountState,b.accountListState,"reimbursementAccountList")));if(S==null)throw Error("Can't access address page without signing in...");const _={pathname:`../${r}`,search:n.search};return h.fetchState==="Completed"&&(d.current=!0),h.isDeleted===!0||h.billStage=="paid"||h.billStage=="scheduled"||d.current===!1&&h.fetchState==="Not-Started"||F&&h.billStatus==="rejected"||F===!1&&h.billStage==="pending_approval"&&h.billStatus!=="rejected"?s.jsx(N,{to:_}):d.current!==!1||h.deleteStatus.fetchState!=="In-Progress"&&h.fetchState==="Completed"?s.jsxs(zn,{windowSize:c,children:[s.jsx(re,{analytics:x,onLoad:b=>(M=>{r!=null&&h.deleteStatus.fetchState!=="Completed"&&M.trackReimbursementEditReimbursement(r)})(b)}),i&&c!=="small"?s.jsx(Gn,{}):null,i&&c!=="small"?s.jsx(Zn,{children:s.jsx(De,{showAutofill:i,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:w?.tenantId??""},onSkipAutofill:()=>a(!1),onInvoiceUpload:b=>{b!=null&&t(de(b,o,!0,r,S?.userId))},updateInvoiceUploadFetchState:b=>{t(ce({reimbursementId:r,fetchState:b}))},allowMultiFiles:i,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:j.sp3,paddingBottom:"15px",paddingLeft:j.sp5},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})}):null,i&&c==="small"?s.jsxs(Vn,{children:[s.jsx(Hn,{onClick:()=>a(!1),children:s.jsx(Mn,{})}),s.jsx(De,{showAutofill:i,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:w?.tenantId??""},onSkipAutofill:()=>a(!1),onInvoiceUpload:b=>{b!=null&&t(de(b,o,!0,r,S?.userId))},updateInvoiceUploadFetchState:b=>{t(ce({reimbursementId:r,fetchState:b}))},allowMultiFiles:i,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:j.sp5,paddingRight:j.sp3,paddingBottom:j.sp5,paddingLeft:j.sp3},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})]}):null,s.jsx(Wn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:$??void 0,location:n,navigate:e,currentTenant:w,reimbursementId:r,themeState:m,uncategorizedAccounts:A,disableInternalOverlay:!0,showSkipAutoFill:i,setShowSkipAutoFill:a,onCurrentLineIdForUploadChange:l,isAiCfoAccessEnabled:T,onAskAiCfoClick:y})})]}):s.jsx(Je,{isNewReimbursement:r==null})}const zn=P.div`
|
|
1
|
+
import{j as s}from"./liveblocks-DsfYQPDU.js";import{u as ae,j as R,h as Y,g as X,i as ie,N,l as ee,q as lt,n as mt,o as E}from"./core-BLE-efAE.js";import{fJ as H,Oo as ct,a0j as ge,cb as he,Nu as Ue,mf as dt,NJ as ce,NI as de,a0k as ut,bn as fe,g_ as Le,a0l as pt,XS as bt,m4 as $e,XT as ke,XU as gt,kS as ht,_k as ft,l5 as St,Ni as It,CO as yt,kZ as vt,O3 as Ne,a0m as Pe,a0n as Ce,a0o as At,a0p as Rt,a0q as kt,NP as we,lb as Ct,_t as wt,NH as xt,Ns as Et,a0r as Bt,Nr as Tt,a0s as Dt,Nz as xe,NT as jt,NS as Ft,NO as Ut,a0t as _e,Te as Lt,bo as $t,NC as Nt,Ol as Pt,a0u as _t,a0v as Mt,N$ as Ot,NY as Ee,ZQ as zt,Np as Gt,a0w as Me,OO as Be,OW as Zt,a0x as Vt,a0y as J,a0z as Ht,a0A as Oe,a0B as Wt,a0C as ze,a0D as Ge,Ob as ue,bw as qt,bN as Se,cQ as Ie,e2 as Ze,e1 as Ve,a0E as Jt,gl as Qt,_1 as Xt,a0F as Kt,a0G as He,_5 as Yt,_Q as en,a0H as tn,$d as nn,OT as Te,OS as an,a0I as sn,a0J as on,a0K as rn,a0L as ln,a0M as mn,_z as cn,OJ as dn,ON as un,bq as pn,bM as bn,cK as gn,cx as hn,bv as fn,Ve as Sn,de as In,dh as yn,dg as vn,cJ as An}from"./zeni-epic-state-Cj-eqUB4.js";import{bW as Rn,v as We,$ as qe,p as oe,_ as U,z as L,cV as Je,a6 as re,h as x,aQ as De,E as j,ac as se,ad as kn,G as Qe,cW as Cn,j as Q,aq as Xe,cX as wn,V as le,cY as xn,ao as En,a9 as Bn,a5 as ye,Q as Ke,w as Tn,bE as Dn,at as jn,ag as Fn,cZ as Un,f as Ln}from"./index-DByp7gYR.js";import{n as P,S as $n,u as Ye}from"./mui-DsLgO0pD.js";import pe from"./NotFoundScreen-62ZwPZD8.js";import{S as je}from"./SetupPagesScreen-CGSGhPYa.js";import{F as et}from"./FeaturePreviewScreen-D7KvTxUl.js";import{a as g}from"./sentry-BOcQ3kj3.js";import{u as ve}from"./useAskAiCfoHostNavButtonProps-DJfxJxgV.js";import{u as tt}from"./useInitialThreadRequest-vezVMaGs.js";import{D as Nn}from"./DrawerScreen-COYxf4a_.js";import{M as nt}from"./MobileAppDrawer-QsBOZtGR.js";import{F as Pn}from"./ScreenRoutes-CQPbRX2a.js";import{R as _n}from"./ReimbursementApprovalRoutes-DJFklLxf.js";import"./recharts-BrF9RV-y.js";import"./analytics-DOSt68hW.js";import"./plaid-CsR4G1V6.js";import"./dnd-_7Bcanxg.js";import"./stripe-cKAAJElX.js";import"./lottie-CvlQ31Z0.js";import"./lexical-CRb0eiRh.js";import"./pdf-Nx2bnRAL.js";import"./utils-Dl4IzX4w.js";import"./BusinessVerificationPageScreen-DfgDpNPJ.js";import"./routePaths-Bywswu4r.js";import"./analyticsHelper-DpuSAcdJ.js";import"./InboxNotificationsProvider-DgU7-WH3.js";import"./useTaskManagerAccess-g91qWg_Z.js";import"./useIsCustomersTabEnabled-DWpqS9JG.js";import"./getLocaleForTenant-DtkHbzuc.js";import"./useEnsureVendorListLoaded-CllPhnHH.js";import"./ReimbursementApprovalRuleDetailScreen-CdMCxq5v.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]="c7dd2d98-84e2-4843-bbf6-e6a8f7e84b87",e._sentryDebugIdIdentifier="sentry-dbid-c7dd2d98-84e2-4843-bbf6-e6a8f7e84b87")}catch{}})();const at=e=>`/${e}/reimbursements`,Mn=e=>g.createElement("svg",{viewBox:"0 0 16 16",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},g.createElement("path",{d:"M12.5 3.5L3.5 12.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"}),g.createElement("path",{d:"M12.5 12.5L3.5 3.5",stroke:"currentColor",strokeLinecap:"round",strokeLinejoin:"round"})),{common:q,spendManagement:{reimbursement:{reimbursementDetail:ne}}}=Qe.getLocalizedStrings(),On=ee((function(e,t){const n=t.currentTenant?.companyId,r=ut(e.plaidAccountViewState,"user_reimbursement_account"),m=L.getSignedInUser(),c=fe(m),d=r.plaidConnectionDetails,i=Le(e.companyState,n),a=e.tenantState.currentTenantId,o={userId:m?.userId??"",sessionId:m?.zeniSessionId??"",tenantId:a??""},l=ge(e,t.reimbursementId),p=pt(e,m?.userId??"");let I=`${m?.firstName} ${m?.lastName}`,u=!0;t.reimbursementId!=null&&(I=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`,u=m?.userId===l.createdBy?.userId);const T=e.entityAutoCompleteState?.autoCompleteText?.common,y=bt(e,"common");return{remiDetails:l,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,reimbursementId:t.reimbursementId,customerSearchAutoCompleteData:{autoCompleteText:T,entityAutoCompleteView:y},authParams:o,defaultCurrency:{currencySymbol:i?.company.companyLocaleInfo.currencySymbol??"$",currencyCode:i?.company.companyLocaleInfo.currencyCode??"USD"},companyMileageConfigInfo:i?.company.configInfo.mileageRateConfig,createdBy:I,isUserAdmin:he(t.currentTenant?.userRole??[]),isZeniUser:c,plaidConnectionDetails:d,bankNameByRouting:l.bankNameByRouting,bankAccountCreationState:p.bankAccountCreationState,bankAccounts:p.bankAccounts,analytics:x,bankAccountToCreate:l.bankAccountToCreate,fetchBankNameByRoutingStatus:l.fetchBankNameByRoutingStatus,isSignedInUserReimbursementCreator:u,disableInternalOverlay:t.disableInternalOverlay,showSkipAutoFill:t.showSkipAutoFill,setShowSkipAutoFill:t.setShowSkipAutoFill,isAccountingClassesEnabled:$e(e)}}),(function(e,t){const{reimbursementId:n,currentTenant:r,location:m,navigate:c,themeState:d}=t,{tenantEmailDomain:i}=r,a=L.getSignedInUser();return{onReceiptsUpload:(o,l,p)=>{o!=null&&e(de(o,l,p,n,a?.userId))},onExistingMerchantChange:(o,l)=>{e(xe(!1,l,n,o,void 0))},fetchDuplicateReimbursement:()=>{a?.userId!=null&&e(Ut(a.userId,!0,n))},clearDuplicateReimbursementDetail:()=>{e(Ft())},clearRemiSaveStatus:()=>{e(jt("Not-Started",n))},onDuplicateLineClick:(o,l)=>window.open(`/${i}/reimbursement/${o}#L${l}`),onNewMerchantChange:(o,l)=>{e(xe(!1,l,n,void 0,o))},removeFileFromLine:o=>{e(Dt({lineId:o,reimbursementId:n}))},onAmountChanged:(o,l)=>{e(Tt(l,o,n))},updateReimbursementType:(o,l,p)=>{e(Bt({reimbursementId:p,lineId:l,reimbursementType:o}))},onHomeCurrencyConversionUpdate:(o,l,p)=>{e(Et({reimbursementId:p,lineId:l,amountPayload:{amount:o.amount,currency_code:o.currencyCode,currency_symbol:o.currencySymbol}}))},onReimbursementDetailsChanged:o=>{e(xt({remiDetailLocalData:o,reimbursementId:n}))},saveRemiDetails:o=>{e(we(o,!1,n))},onUserBankDetailsUpdated:o=>{const{bankAccountSection:l}=o;e(wt({data:l}))},onFetchBankName:o=>{e(Ct(o))},submitRemiDetails:()=>{e(we("pending_approval",!0,n))},discardReimbursementDetailsFromLocalStore:o=>{e(Ce({reimbursementId:o}))},updateInvoiceUploadFetchState:o=>{e(ce({reimbursementId:n,fetchState:o}))},clearTentativeNameForLine:o=>{e(kt({reimbursementId:n,lineId:o}))},removeDuplicateReimbursementForLine:o=>{e(Rt({lineId:o}))},onZeniLogoClick:()=>{d.toggle()},clearAddRemiAutoFields:o=>{e(At({reimbursementId:n,lineId:o}))},redirectToReimbursementListScreen:()=>{e(Pe()),e(Ce({}));const o=at(i),l=Q(m.state?.pathnameStackToGoBack,m.pathname);c(o,{state:{pathnameStackToGoBack:l}})},redirectToReimbursementDetailScreen:()=>{t.navigate("../")},deleteReimbursement:()=>{n!=null&&(x.trackReimbursementDeleteReimbursement(n),e(Ne(n)))},onSaveBankAccount:()=>{a?.userId&&e(vt(a?.userId,n))},onFetchLinkTokenClick:o=>{e(yt("user_reimbursement_account",o))},onEstablishConnectionClick:o=>{e(It(o,r.companyId,"user_reimbursement_account",void 0,"link_account_no_microdeposit"))},deleteBankAccount:o=>{e(St(o,a?.userId??""))},onBackClickFromBankAccountPage:()=>{e(ht({fetchState:"Not-Started"})),e(ft())},customerSearchAutoCompleteActions:{onAutoCompleteInputChange:(o,l)=>{o.trim().length>=2?e(gt({searchString:o,entityType:l,searchOrigin:"common"})):e(ke("common"))},onCancelAutoComplete:()=>{e(ke("common"))}}}}))(Cn);function Fe(){const e=Y(),t=ae(),n=X(),{reimbursementId:r}=ie(),m=We(),c=qe(),d=g.useRef(!1),[i,a]=g.useState(r==null),[o,l]=g.useState(1),{useFeatureGate:p}=oe(),{isFeatureEnabled:I}=p(U.isLimitedCategoryForReimbursement),{isFeatureEnabled:u}=p(U.isShowDeletedReimbursementsFeatureEnabled),{isAiCfoAccessEnabled:T,onAskAiCfoClick:y}=ve({mobileExploreReferrer:"Reimbursement Details"}),B=X().pathname,D=B.includes("edit"),k=B.includes("reimbursement/new"),[C,v]=g.useState(!1),S=L.getSignedInUser(),w=R((b=>H(b))),h=R((b=>ge(b,r))),$=tt(w?.companyId,{clearParams:h.fetchState==="Completed"}),F=he(w?.userRole??[]);(function(){const b=ae(),M=R((K=>H(K))),O=M?.tenantId,{isApprovalRulesV3Enabled:z,isLoading:W}=Rn(O),G=R((K=>K.remiSetupApproverViewState.fetchState));g.useEffect((()=>{O==null||W||G==="Not-Started"&&b(ct(!0,!1,!1,z))}),[O,W,z,G,b])})(),g.useEffect((()=>{(k&&!C||D&&!C&&h.fetchState!="Completed"&&h.fetchState!="In-Progress")&&(v(!0),t(Ue(!1,I,u,r)))}));const A=R((b=>dt(b.accountState,b.accountListState,"reimbursementAccountList")));if(S==null)throw Error("Can't access address page without signing in...");const _={pathname:`../${r}`,search:n.search};return h.fetchState==="Completed"&&(d.current=!0),h.isDeleted===!0||h.billStage=="paid"||h.billStage=="scheduled"||d.current===!1&&h.fetchState==="Not-Started"||F&&h.billStatus==="rejected"||F===!1&&h.billStage==="pending_approval"&&h.billStatus!=="rejected"?s.jsx(N,{to:_}):d.current!==!1||h.deleteStatus.fetchState!=="In-Progress"&&h.fetchState==="Completed"?s.jsxs(zn,{windowSize:c,children:[s.jsx(re,{analytics:x,onLoad:b=>(M=>{r!=null&&h.deleteStatus.fetchState!=="Completed"&&M.trackReimbursementEditReimbursement(r)})(b)}),i&&c!=="small"?s.jsx(Gn,{}):null,i&&c!=="small"?s.jsx(Zn,{children:s.jsx(De,{showAutofill:i,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:w?.tenantId??""},onSkipAutofill:()=>a(!1),onInvoiceUpload:b=>{b!=null&&t(de(b,o,!0,r,S?.userId))},updateInvoiceUploadFetchState:b=>{t(ce({reimbursementId:r,fetchState:b}))},allowMultiFiles:i,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:"78px",paddingRight:j.sp3,paddingBottom:"15px",paddingLeft:j.sp5},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})}):null,i&&c==="small"?s.jsxs(Vn,{children:[s.jsx(Hn,{onClick:()=>a(!1),children:s.jsx(Mn,{})}),s.jsx(De,{showAutofill:i,uploadInvoiceEndPoint:`${se.communicationAgentMicroServiceBaseUrl}`,authParams:{userId:S?.userId??"",sessionId:S?.zeniSessionId??"",tenantId:w?.tenantId??""},onSkipAutofill:()=>a(!1),onInvoiceUpload:b=>{b!=null&&t(de(b,o,!0,r,S?.userId))},updateInvoiceUploadFetchState:b=>{t(ce({reimbursementId:r,fetchState:b}))},allowMultiFiles:i,showInfoText:!1,type:"reimbursement",style:{width:"100%",paddingTop:j.sp5,paddingRight:j.sp3,paddingBottom:j.sp5,paddingLeft:j.sp3},dropFilePlaceholder:{upload:q.upload,single:ne.dropReceipt.single,or:q.texts.or,multiple:ne.dropReceipt.multiple,receipts:q.texts.receipts2}})]}):null,s.jsx(Wn,{windowSize:c,children:s.jsx(On,{initialOpenThreadRequest:$??void 0,location:n,navigate:e,currentTenant:w,reimbursementId:r,themeState:m,uncategorizedAccounts:A,disableInternalOverlay:!0,showSkipAutoFill:i,setShowSkipAutoFill:a,onCurrentLineIdForUploadChange:l,isAiCfoAccessEnabled:T,onAskAiCfoClick:y})})]}):s.jsx(Je,{isNewReimbursement:r==null})}const zn=P.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
position: relative;
|
|
4
4
|
height: 100vh;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-njwIYHC1.js";import{g as te,h as ve,u as We,i as Ue,j as _,l as Ye,n as xe,o as oe}from"./core-Drb9PBdf.js";import{fJ as K,ER as S,VO as ze,m4 as ue,uv as he,vk as W,lL as O,lU as D,lM as P,kP as A,kG as E,kF as V,DU as U,vp as ye,bq as Ge,VP as He,bn as Ne,Fd as $e,VQ as qe,VR as Ze,cl as R,DN as ne,VS as re,VT as Qe,VU as Je,VV as Ke,VW as Xe,VX as ea,VY as aa,VZ as sa,V_ as ta,V$ as oa,W0 as na,W1 as ra,W2 as la,W3 as k,W4 as Y,W5 as x,W6 as z,W7 as G,W8 as H,W9 as N,Wa as $,Wb as q,Wc as Z,el as ca,ET as ia,EF as le,EG as ce,EZ as da,EK as ie,bH as j,Wd as de,dk as pe,EL as _e,F3 as pa,We as _a,Wf as fa,Wg as ba,Wh as ma,Wi as ua,Wj as ha,Wk as ya,Wl as Ca,Wm as wa,Wn as ga,e2 as Ra,e1 as Ia}from"./zeni-epic-state-9qkFzYai.js";import{al as Sa,am as Ta,an as ka,a as ja,$ as Fa,p as Ce,_ as Q,z as we,ao as Oa,V as Da,d as Pa,ap as Aa,aq as Ea,a6 as Va,h as J,Q as Ma,r as La,j as ge,ar as Ba,as as va,at as Wa}from"./index-z_GphMeq.js";import"./mui-B5W8_mOr.js";import Ua from"./NotFoundScreen-BThXAXPU.js";import{F as Ya}from"./FeaturePreviewScreen-Co6UN19B.js";import{a as u}from"./sentry-VFPS4V5K.js";import{u as xa}from"./useInitialThreadRequest-CE7-w0Ve.js";import{t as fe,a as be,b as za}from"./routePaths-DR8gB3XS.js";import{t as me}from"./reportTimeframe-BbZLWisn.js";import{M as Ga}from"./MobileAppDrawer-Ct61dQgI.js";import"./recharts-CA6HYyTi.js";import"./analytics-BSiwA26E.js";import"./plaid-Cr5PEIle.js";import"./dnd-BrXK45tY.js";import"./stripe-cKAAJElX.js";import"./lottie-C-ls43Md.js";import"./lexical-5AsGuqwY.js";import"./pdf-BZk_6t2l.js";import"./utils-CibnWgOj.js";import"./InboxNotificationsProvider-iLGG8Hne.js";import"./useTaskManagerAccess-D-MaKZ1u.js";import"./useIsCustomersTabEnabled-CxdytBTD.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]="eab7aa62-4650-47d2-9ca4-ec3bdcdaa902",e._sentryDebugIdIdentifier="sentry-dbid-eab7aa62-4650-47d2-9ca4-ec3bdcdaa902")}catch{}})();const Ha=["profit_loss","balance_sheet","cash_flow"],I=e=>e==="balance_sheet"||e==="balance_sheet_by_classes"||e==="balance_sheet_by_projects",h=e=>{e(Z({resetLeftScroll:!0})),e(q({resetLeftScroll:!0})),e($({resetLeftScroll:!0})),e(N({resetLeftScroll:!0})),e(H({resetLeftScroll:!0})),e(G({resetLeftScroll:!0})),e(Y({resetLeftScroll:!0})),e(z({resetLeftScroll:!0})),e(x({resetLeftScroll:!0}))},Na=e=>{e(fa()),e(ba()),e(ma()),e(ua()),e(ha()),e(ya()),e(Ca()),e(wa()),e(ga())},$a=Ye((function(e){const o=we.getSignedInUser(),b=e.tenantState.currentTenantId,m=K(e),a=m?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:b??""},t=S(e),n=He(m);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,balanceSheetClassesViewReport:t.balanceSheetByClassReport,cashFlowClassesViewReport:t.cashFlowByClassReport,cashFlowProjectViewReport:t.cashFlowByProjectReport,balanceSheetProjectViewReport:t.balanceSheetByProjectReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:J,isZeniUser:Ne(o),showAccountGroups:n===!0,isAccountingClassesEnabled:ue(e),isAccountingProjectsEnabled:he(e),currentTenantCompanyName:a,statementEndPoint:`${Wa}/statement`,authParams:s,isZeniCOAUsed:n}}),(function(e,o){const{navigate:b,handleDrawerToggle:m}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(W(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(_a(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(pa(a)),s){const{isCompareModeOn:n,filter:r}=o,{additionalBalances:i,balancesRange:d}=r;let c=[...i];a==="year"&&(c=c.filter((p=>p!=="this_period_vs_same_period_last_year"&&p!=="this_period_vs_same_period_last_year_percent"&&p!=="same_period_last_year"))),e(le(o.firstMonthOfFY,n,d.numberOfPeriods<1?1:d.numberOfPeriods,c)),i.length>0&&e(ce(o.firstMonthOfFY,c.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",d.numberOfPeriods<1?1:d.numberOfPeriods,c))}t!==!0&&setTimeout((()=>h(e)),50)},onInitialDateRangeAvailable:(a,s)=>{const{filter:t}=o,n=me(t.timeframe),r=j(a),i=j(s),d=de(o.firstMonthOfFY,n,{startDate:r,endDate:i})??t.balancesRange.numberOfPeriods,{startOfTimeframeFY:c,endOfTimeframeFY:p}=pe(i,o.firstMonthOfFY,n);e(_e({numberOfPeriods:d,orderBy:t.balancesRange.orderBy,thisPeriod:{startDate:c,endDate:p}}))},onCustomDateRangeChanged:(a,s,t)=>{const{filter:n}=o,r=me(t??n.timeframe);switch(o.selectedReportID){case"profit_and_loss":case"profit_and_loss_by_classes":e(ye(r,void 0,!0,!1,a,s)),o.selectedReportID==="profit_and_loss_by_classes"&&o.isAccountingClassesEnabled&&e(ne());break;case"profit_and_loss_by_projects":o.isAccountingProjectsEnabled&&e(U());break;case"balance_sheet":e(V(r,!0,!1,a,s));break;case"balance_sheet_by_classes":e(V(r,!0,!1,a,s)),o.isAccountingClassesEnabled&&e(E());break;case"balance_sheet_by_projects":e(V(r,!0,!1,a,s)),o.isAccountingProjectsEnabled&&e(A());break;case"cash_flow":e(O(r,!0,a,s));break;case"cash_flow_by_classes":e(O(r,!0,a,s)),o.isAccountingClassesEnabled&&e(P());break;case"cash_flow_by_projects":e(O(r,!0,a,s)),o.isAccountingProjectsEnabled&&e(D())}const i=j(a),d=j(s),c=de(o.firstMonthOfFY,r,{startDate:i,endDate:d})??n.balancesRange.numberOfPeriods,{startOfTimeframeFY:p,endOfTimeframeFY:M}=pe(d,o.firstMonthOfFY,r);e(_e({numberOfPeriods:c,orderBy:n.balancesRange.orderBy,thisPeriod:{startDate:p,endDate:M}})),h(e)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(k(a)),(I(a)||R(a))&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(ie({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(re({classViewLayout:"vertical"})),h(e)},onCOABalancesRangeChanged:(a,s)=>{e(ie(a,s)),h(e)},onThisPeriodChanged:(a,s,t)=>{e(da(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&h(e)},onAdditionalBalanceSelectionChanged:(a,s,t,n)=>{e(le(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(ce(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),n!==!0&&o.isCompareModeOn===a||setTimeout((()=>h(e)),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,n)=>{e(ia({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:n}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let n,r;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(n=s.balanceTimeFrame,r=ca(s)):s.balanceTimeFrame==="year"?(n="quarter",r={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),r!=null&&n!=null){const i=a.accountName===""?a.accountDescription:a.accountName,d=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return fe(o.tenantEmailDomain,a.accountId,a.accountType,i,n,r);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return be(o.tenantEmailDomain,a.accountId,a.accountType,s.id,i,n,r)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?za(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,i,n,r):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?be(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],i,n,r):a.accountType!=null?fe(o.tenantEmailDomain,a.accountId,a.accountType,i,n,r):void 0})();if(d!=null){const c=ge(o.location.state?.pathnameStackToGoBack,o.location.pathname);b(d,{state:{pathnameStackToGoBack:c,referrer:F(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(Z({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(q({scrollPosition:s}));break;case"profit_and_loss_by_projects":e($({scrollPosition:s}));break;case"balance_sheet":e(N({scrollPosition:s}));break;case"balance_sheet_by_classes":e(H({scrollPosition:s}));break;case"balance_sheet_by_projects":e(G({scrollPosition:s}));break;case"cash_flow_by_classes":e(z({scrollPosition:s}));break;case"cash_flow_by_projects":e(x({scrollPosition:s}));break;case"cash_flow":e(Y({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(Z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(q({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e($({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(N({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_classes":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_projects":e(G({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_classes":e(z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_projects":e(x({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{b("../../")},onUpdateAccountViewMode:(a,s)=>{const t=s??o.selectedReportID,n=I(t),r=R(t);r?(e(sa({viewMode:a})),e(ta({viewMode:a}))):n?(e(oa({viewMode:a})),e(na({viewMode:a}))):(e(ra({viewMode:a})),e(la({viewMode:a}))),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",F(t)),e(k(r?"cash_flow_by_classes":n?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",F(t)),e(k(r?"cash_flow_by_projects":n?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",F(t)),e(k(r?"cash_flow":n?"balance_sheet":"profit_and_loss"))),h(e)},onUpdateClassesToFilterOut:a=>{R(o.selectedReportID)?e(Xe({classesToFilterOut:a})):I(o.selectedReportID)?e(ea({classesToFilterOut:a})):e(aa({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{R(o.selectedReportID)?e(Qe({projectsToFilterOut:a})):I(o.selectedReportID)?e(Je({projectsToFilterOut:a})):e(Ke({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(re({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=I(o.selectedReportID),s=R(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?P():a?E():ne()),o.isAccountingProjectsEnabled&&e(s?D():a?A():U())},onUpdateDisplayOrder:a=>{e(Ze(a))},onUpdateReportFormat:a=>{Na(e),e(qe(a))},onClickMenuIcon:()=>{m(!0)},onResyncReports:()=>{const a=o.selectedReportID;e(a!=="balance_sheet_by_classes"?a!=="balance_sheet_by_projects"?a!=="cash_flow_by_classes"?a!=="cash_flow_by_projects"?$e(a==="profit_and_loss_by_projects"?"profit_and_loss_by_projects":"profit_and_loss_by_classes"):D(!0):P(!0):A(!0):E(!0))}}}))(Ba);function qa(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=ja(),b=Fa(),m=va(b),a=ve(),s=We(),t=te(),{tenantEmailDomain:n}=Ue(),{useFeatureGate:r}=Ce(),{isFeatureEnabled:i}=r(Q.isReportsHorizontalClassLayoutSwitchEnabled),{isFeatureEnabled:d}=r(Q.isReportsCustomDateRangeEnabled),c=we.getSignedInUser(),[p,M]=u.useState(!1),[X,Re]=u.useState(!1);if(c==null)throw Error("Can't access reports page without signing in...");const L=_((l=>K(l))),Ie=L.masterTOSInfo?.isMasterTOSAccepted??!1,Se=L.company?.companyInfo.firstMonthOfFY??1,Te=xa(L?.companyId),w=_((l=>S(l).fetchState)),ke=_((l=>ze(l))),{areTenantIdsInSync:y}=Oa(),B=_((l=>l.financeStatementState.selectedReportId)),T=_((l=>ue(l))),g=_((l=>he(l))),je=_((l=>S(l).isCompareModeOn)),C=_((l=>S(l).filter)),v=_((l=>S(l).selectedReportAndTimeframeFetchState)),Fe=_((l=>l.profitAndLossClassesViewState.uiState.classViewLayout));u.useEffect((()=>{!p&&y&&(M(!0),s(W(c.userId,!0,!0,!1)))}),[p,c,s,y]),u.useEffect((()=>{p&&!X&&w==="Completed"&&y&&(s(W(c.userId,!1,!0,!1)),Re(!0))}),[p,X,w,y]),u.useEffect((()=>{if(p&&v.fetchState==="Not-Started"&&C.timeframe!=="free_range"&&C.timeframe!=="week"&&y)switch(B){case"profit_and_loss":case"profit_and_loss_by_classes":s(ye(C.timeframe));break;case"profit_and_loss_by_projects":g&&s(U());break;case"balance_sheet":s(V(C.timeframe));break;case"balance_sheet_by_classes":T&&s(E());break;case"balance_sheet_by_projects":g&&s(A());break;case"cash_flow_by_classes":T&&s(P());break;case"cash_flow_by_projects":g&&s(D());break;case"cash_flow":s(O(C.timeframe))}}),[p,B,v,y,T,g]);const ee=Da(),Oe=ee?.loggedInUserRole!=null&&Ge(ee?.loggedInUserRole)!==!0,[De,Pe]=u.useState(!1),ae=l=>{Pe(l)},Ae=Pa(),Ee=Aa();return(function(l){const{isDataReady:Ve}=l,{pathname:Me}=te(),se=Sa(Me??"")==="reports",Le=Ta(Ve),Be=u.useMemo((()=>se?Ha:void 0),[se]);ka({canFetchSuggestedQuestions:Le,pageContexts:Be})})({isDataReady:w==="Completed"}),Ea({isDataReady:w==="Completed"}),f.jsxs(f.Fragment,{children:[w==="Completed"?f.jsx(Va,{analytics:J,onLoad:l=>l.trackPageLoaded(Ma.Event.reports)}):null,f.jsx(Ga,{isAppContentDrawerOpen:De,handleDrawerToggle:ae}),f.jsx($a,{firstMonthOfFY:Se,tenantEmailDomain:n,location:t,navigate:a,windowSize:b,classViewLayout:Fe,selectedReportID:B,analytics:J,filter:C,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:g,isCompareModeOn:je,hasTransactionAccess:Oe,signedInUser:c,selectedReportAndTimeframeFetchState:v,handleDrawerToggle:ae,reportsResyncFetchState:ke.reportsResyncFetchState,isAiCfoAccessEnabled:Ee&&Ae&&!e,onAskAiCfoClick:()=>{if(Ie)if(m){const l=ge(t.state?.pathnameStackToGoBack,t.pathname);a(`/${n}/ai-cfo/explore`,{state:{pathnameStackToGoBack:l,referrer:"Reports"}})}else o(!0);else La({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:i,isCustomDateRangeEnabled:d,initialOpenThreadRequest:Te})]})}const F=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":case"profit_and_loss_by_projects":return"Profit & Loss";case"balance_sheet":case"balance_sheet_by_classes":case"balance_sheet_by_projects":return"Balance Sheet";case"cash_flow":case"cash_flow_by_classes":case"cash_flow_by_projects":return"Cash Flow";default:return"Reports"}};function Cs(){const e=_((s=>K(s))),{useFeatureGate:o}=Ce(),{isFeatureEnabled:b}=o(Q.isDebitCardFeatureEnabled),m=Ra(b,e),a=Ia(e);return m===!0||a===!0?f.jsx(Ya,{}):f.jsxs(xe,{children:[f.jsx(oe,{path:"/",element:f.jsx(qa,{})}),f.jsx(oe,{path:"*",element:f.jsx(Ua,{})})]})}export{Cs as default};
|
|
1
|
+
import{j as f}from"./liveblocks-DsfYQPDU.js";import{g as te,h as ve,u as We,i as Ue,j as _,l as Ye,n as xe,o as oe}from"./core-BLE-efAE.js";import{fJ as K,ER as S,VO as ze,m4 as ue,uv as he,vk as W,lL as O,lU as D,lM as P,kP as A,kG as E,kF as V,DU as U,vp as ye,bq as Ge,VP as He,bn as Ne,Fd as $e,VQ as qe,VR as Ze,cl as R,DN as ne,VS as re,VT as Qe,VU as Je,VV as Ke,VW as Xe,VX as ea,VY as aa,VZ as sa,V_ as ta,V$ as oa,W0 as na,W1 as ra,W2 as la,W3 as k,W4 as Y,W5 as x,W6 as z,W7 as G,W8 as H,W9 as N,Wa as $,Wb as q,Wc as Z,el as ca,ET as ia,EF as le,EG as ce,EZ as da,EK as ie,bH as j,Wd as de,dk as pe,EL as _e,F3 as pa,We as _a,Wf as fa,Wg as ba,Wh as ma,Wi as ua,Wj as ha,Wk as ya,Wl as Ca,Wm as wa,Wn as ga,e2 as Ra,e1 as Ia}from"./zeni-epic-state-Cj-eqUB4.js";import{al as Sa,am as Ta,an as ka,a as ja,$ as Fa,p as Ce,_ as Q,z as we,ao as Oa,V as Da,d as Pa,ap as Aa,aq as Ea,a6 as Va,h as J,Q as Ma,r as La,j as ge,ar as Ba,as as va,at as Wa}from"./index-DByp7gYR.js";import"./mui-DsLgO0pD.js";import Ua from"./NotFoundScreen-62ZwPZD8.js";import{F as Ya}from"./FeaturePreviewScreen-D7KvTxUl.js";import{a as u}from"./sentry-BOcQ3kj3.js";import{u as xa}from"./useInitialThreadRequest-vezVMaGs.js";import{t as fe,a as be,b as za}from"./routePaths-Bywswu4r.js";import{t as me}from"./reportTimeframe-iR64H8K5.js";import{M as Ga}from"./MobileAppDrawer-QsBOZtGR.js";import"./recharts-BrF9RV-y.js";import"./analytics-DOSt68hW.js";import"./plaid-CsR4G1V6.js";import"./dnd-_7Bcanxg.js";import"./stripe-cKAAJElX.js";import"./lottie-CvlQ31Z0.js";import"./lexical-CRb0eiRh.js";import"./pdf-Nx2bnRAL.js";import"./utils-Dl4IzX4w.js";import"./InboxNotificationsProvider-DgU7-WH3.js";import"./useTaskManagerAccess-g91qWg_Z.js";import"./useIsCustomersTabEnabled-DWpqS9JG.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]="eab7aa62-4650-47d2-9ca4-ec3bdcdaa902",e._sentryDebugIdIdentifier="sentry-dbid-eab7aa62-4650-47d2-9ca4-ec3bdcdaa902")}catch{}})();const Ha=["profit_loss","balance_sheet","cash_flow"],I=e=>e==="balance_sheet"||e==="balance_sheet_by_classes"||e==="balance_sheet_by_projects",h=e=>{e(Z({resetLeftScroll:!0})),e(q({resetLeftScroll:!0})),e($({resetLeftScroll:!0})),e(N({resetLeftScroll:!0})),e(H({resetLeftScroll:!0})),e(G({resetLeftScroll:!0})),e(Y({resetLeftScroll:!0})),e(z({resetLeftScroll:!0})),e(x({resetLeftScroll:!0}))},Na=e=>{e(fa()),e(ba()),e(ma()),e(ua()),e(ha()),e(ya()),e(Ca()),e(wa()),e(ga())},$a=Ye((function(e){const o=we.getSignedInUser(),b=e.tenantState.currentTenantId,m=K(e),a=m?.companyName??"",s={userId:o?.userId??"",sessionId:o?.zeniSessionId??"",tenantId:b??""},t=S(e),n=He(m);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,balanceSheetClassesViewReport:t.balanceSheetByClassReport,cashFlowClassesViewReport:t.cashFlowByClassReport,cashFlowProjectViewReport:t.cashFlowByProjectReport,balanceSheetProjectViewReport:t.balanceSheetByProjectReport,cashFlowReport:t.cashFlowReport,downloadState:t.downloadState,analytics:J,isZeniUser:Ne(o),showAccountGroups:n===!0,isAccountingClassesEnabled:ue(e),isAccountingProjectsEnabled:he(e),currentTenantCompanyName:a,statementEndPoint:`${Wa}/statement`,authParams:s,isZeniCOAUsed:n}}),(function(e,o){const{navigate:b,handleDrawerToggle:m}=o;return{onReloadReport:()=>{o.signedInUser!=null&&e(W(o.signedInUser.userId,!0,!1))},updateDownloadStateHandler:a=>{e(_a(a))},onTimeframeSelectionChanged:(a,s,t)=>{if(e(pa(a)),s){const{isCompareModeOn:n,filter:r}=o,{additionalBalances:i,balancesRange:d}=r;let c=[...i];a==="year"&&(c=c.filter((p=>p!=="this_period_vs_same_period_last_year"&&p!=="this_period_vs_same_period_last_year_percent"&&p!=="same_period_last_year"))),e(le(o.firstMonthOfFY,n,d.numberOfPeriods<1?1:d.numberOfPeriods,c)),i.length>0&&e(ce(o.firstMonthOfFY,c.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",d.numberOfPeriods<1?1:d.numberOfPeriods,c))}t!==!0&&setTimeout((()=>h(e)),50)},onInitialDateRangeAvailable:(a,s)=>{const{filter:t}=o,n=me(t.timeframe),r=j(a),i=j(s),d=de(o.firstMonthOfFY,n,{startDate:r,endDate:i})??t.balancesRange.numberOfPeriods,{startOfTimeframeFY:c,endOfTimeframeFY:p}=pe(i,o.firstMonthOfFY,n);e(_e({numberOfPeriods:d,orderBy:t.balancesRange.orderBy,thisPeriod:{startDate:c,endDate:p}}))},onCustomDateRangeChanged:(a,s,t)=>{const{filter:n}=o,r=me(t??n.timeframe);switch(o.selectedReportID){case"profit_and_loss":case"profit_and_loss_by_classes":e(ye(r,void 0,!0,!1,a,s)),o.selectedReportID==="profit_and_loss_by_classes"&&o.isAccountingClassesEnabled&&e(ne());break;case"profit_and_loss_by_projects":o.isAccountingProjectsEnabled&&e(U());break;case"balance_sheet":e(V(r,!0,!1,a,s));break;case"balance_sheet_by_classes":e(V(r,!0,!1,a,s)),o.isAccountingClassesEnabled&&e(E());break;case"balance_sheet_by_projects":e(V(r,!0,!1,a,s)),o.isAccountingProjectsEnabled&&e(A());break;case"cash_flow":e(O(r,!0,a,s));break;case"cash_flow_by_classes":e(O(r,!0,a,s)),o.isAccountingClassesEnabled&&e(P());break;case"cash_flow_by_projects":e(O(r,!0,a,s)),o.isAccountingProjectsEnabled&&e(D())}const i=j(a),d=j(s),c=de(o.firstMonthOfFY,r,{startDate:i,endDate:d})??n.balancesRange.numberOfPeriods,{startOfTimeframeFY:p,endOfTimeframeFY:M}=pe(d,o.firstMonthOfFY,r);e(_e({numberOfPeriods:c,orderBy:n.balancesRange.orderBy,thisPeriod:{startDate:p,endDate:M}})),h(e)},onReportSelectionChanged:a=>{const s=o.selectedReportID;if(a===s)return;const t=o.classViewLayout;e(k(a)),(I(a)||R(a))&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(ie({numberOfPeriods:1,orderBy:"ascending_date"})),a!=="profit_and_loss"&&a!=="profit_and_loss_by_classes"&&s==="profit_and_loss_by_classes"&&t==="horizontal"&&e(re({classViewLayout:"vertical"})),h(e)},onCOABalancesRangeChanged:(a,s)=>{e(ie(a,s)),h(e)},onThisPeriodChanged:(a,s,t)=>{e(da(o.firstMonthOfFY,a,s<1?1:s)),t!==!0&&h(e)},onAdditionalBalanceSelectionChanged:(a,s,t,n)=>{e(le(o.firstMonthOfFY,a,t<1?1:t,s)),s.length>0&&e(ce(o.firstMonthOfFY,s.includes("this_period_vs_last_period")?"compare_mode_amount":"compare_mode_percent",t<1?1:t,s)),n!==!0&&o.isCompareModeOn===a||setTimeout((()=>h(e)),50)},onUpdateHighlightedNumberOfPeriods:(a,s,t,n)=>{e(ia({firstMonthOfFY:o.firstMonthOfFY,isCompareModeOn:s,additionalBalances:a,maxNumOfPeriodsToHighlight:t<1?1:t,coaBalances:n}))},onAccountBalanceClick:o.hasTransactionAccess!==!0?void 0:(a,s,t)=>{let n,r;if(s.balanceTimeFrame==="month"||s.balanceTimeFrame==="quarter"?(n=s.balanceTimeFrame,r=ca(s)):s.balanceTimeFrame==="year"?(n="quarter",r={startDate:s.endDate.startOf("quarter"),endDate:s.endDate}):console.error(`timeframe ${s.balanceTimeFrame} is not supported`),r!=null&&n!=null){const i=a.accountName===""?a.accountDescription:a.accountName,d=(()=>{if(o.selectedReportID==="profit_and_loss_by_classes"&&o.classViewLayout==="horizontal"&&a.accountType!=null){if(t?.isHorizontalClassTotalColumn===!0)return fe(o.tenantEmailDomain,a.accountId,a.accountType,i,n,r);if(t?.isHorizontalClassColumn===!0&&s.id!=null)return be(o.tenantEmailDomain,a.accountId,a.accountType,s.id,i,n,r)}return a.projectsViewParentId?.projectId!=null&&a.accountType!=null?za(o.tenantEmailDomain,a.accountId,a.accountType,a.projectsViewParentId.projectId,i,n,r):a.classesViewParentId!=null&&a.classesViewParentId.parentClassId!=null&&a.accountType!=null?be(o.tenantEmailDomain,a.accountId,a.accountType,a.classesViewParentId.parentClassId[0],i,n,r):a.accountType!=null?fe(o.tenantEmailDomain,a.accountId,a.accountType,i,n,r):void 0})();if(d!=null){const c=ge(o.location.state?.pathnameStackToGoBack,o.location.pathname);b(d,{state:{pathnameStackToGoBack:c,referrer:F(o.selectedReportID)}})}}},onTableScroll:(a,s)=>{switch(a){case"profit_and_loss":e(Z({scrollPosition:s}));break;case"profit_and_loss_by_classes":e(q({scrollPosition:s}));break;case"profit_and_loss_by_projects":e($({scrollPosition:s}));break;case"balance_sheet":e(N({scrollPosition:s}));break;case"balance_sheet_by_classes":e(H({scrollPosition:s}));break;case"balance_sheet_by_projects":e(G({scrollPosition:s}));break;case"cash_flow_by_classes":e(z({scrollPosition:s}));break;case"cash_flow_by_projects":e(x({scrollPosition:s}));break;case"cash_flow":e(Y({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(Z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_classes":e(q({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"profit_and_loss_by_projects":e($({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet":e(N({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_classes":e(H({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"balance_sheet_by_projects":e(G({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_classes":e(z({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow_by_projects":e(x({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;case"cash_flow":e(Y({nodeCollapseState:{nodeId:s,isCollapsed:t}}));break;default:console.log(`Collapse state toggle for ${a} is not handled`)}},onBackClick:()=>{b("../../")},onUpdateAccountViewMode:(a,s)=>{const t=s??o.selectedReportID,n=I(t),r=R(t);r?(e(sa({viewMode:a})),e(ta({viewMode:a}))):n?(e(oa({viewMode:a})),e(na({viewMode:a}))):(e(ra({viewMode:a})),e(la({viewMode:a}))),a==="classes"?(o.analytics?.trackGroupBySwitch("Classes",F(t)),e(k(r?"cash_flow_by_classes":n?"balance_sheet_by_classes":"profit_and_loss_by_classes"))):a==="project"?(o.analytics?.trackGroupBySwitch("Projects",F(t)),e(k(r?"cash_flow_by_projects":n?"balance_sheet_by_projects":"profit_and_loss_by_projects"))):(o.analytics?.trackGroupBySwitch("Accounts",F(t)),e(k(r?"cash_flow":n?"balance_sheet":"profit_and_loss"))),h(e)},onUpdateClassesToFilterOut:a=>{R(o.selectedReportID)?e(Xe({classesToFilterOut:a})):I(o.selectedReportID)?e(ea({classesToFilterOut:a})):e(aa({classesToFilterOut:a}))},onUpdateProjectsToFilterOut:a=>{R(o.selectedReportID)?e(Qe({projectsToFilterOut:a})):I(o.selectedReportID)?e(Je({projectsToFilterOut:a})):e(Ke({projectsToFilterOut:a}))},onUpdateClassViewLayout:a=>{e(re({classViewLayout:a}))},onOpenAccountViewMode:()=>{const a=I(o.selectedReportID),s=R(o.selectedReportID);o.isAccountingClassesEnabled&&e(s?P():a?E():ne()),o.isAccountingProjectsEnabled&&e(s?D():a?A():U())},onUpdateDisplayOrder:a=>{e(Ze(a))},onUpdateReportFormat:a=>{Na(e),e(qe(a))},onClickMenuIcon:()=>{m(!0)},onResyncReports:()=>{const a=o.selectedReportID;e(a!=="balance_sheet_by_classes"?a!=="balance_sheet_by_projects"?a!=="cash_flow_by_classes"?a!=="cash_flow_by_projects"?$e(a==="profit_and_loss_by_projects"?"profit_and_loss_by_projects":"profit_and_loss_by_classes"):D(!0):P(!0):A(!0):E(!0))}}}))(Ba);function qa(){const{isAiCfoOpen:e,setIsAiCfoOpen:o}=ja(),b=Fa(),m=va(b),a=ve(),s=We(),t=te(),{tenantEmailDomain:n}=Ue(),{useFeatureGate:r}=Ce(),{isFeatureEnabled:i}=r(Q.isReportsHorizontalClassLayoutSwitchEnabled),{isFeatureEnabled:d}=r(Q.isReportsCustomDateRangeEnabled),c=we.getSignedInUser(),[p,M]=u.useState(!1),[X,Re]=u.useState(!1);if(c==null)throw Error("Can't access reports page without signing in...");const L=_((l=>K(l))),Ie=L.masterTOSInfo?.isMasterTOSAccepted??!1,Se=L.company?.companyInfo.firstMonthOfFY??1,Te=xa(L?.companyId),w=_((l=>S(l).fetchState)),ke=_((l=>ze(l))),{areTenantIdsInSync:y}=Oa(),B=_((l=>l.financeStatementState.selectedReportId)),T=_((l=>ue(l))),g=_((l=>he(l))),je=_((l=>S(l).isCompareModeOn)),C=_((l=>S(l).filter)),v=_((l=>S(l).selectedReportAndTimeframeFetchState)),Fe=_((l=>l.profitAndLossClassesViewState.uiState.classViewLayout));u.useEffect((()=>{!p&&y&&(M(!0),s(W(c.userId,!0,!0,!1)))}),[p,c,s,y]),u.useEffect((()=>{p&&!X&&w==="Completed"&&y&&(s(W(c.userId,!1,!0,!1)),Re(!0))}),[p,X,w,y]),u.useEffect((()=>{if(p&&v.fetchState==="Not-Started"&&C.timeframe!=="free_range"&&C.timeframe!=="week"&&y)switch(B){case"profit_and_loss":case"profit_and_loss_by_classes":s(ye(C.timeframe));break;case"profit_and_loss_by_projects":g&&s(U());break;case"balance_sheet":s(V(C.timeframe));break;case"balance_sheet_by_classes":T&&s(E());break;case"balance_sheet_by_projects":g&&s(A());break;case"cash_flow_by_classes":T&&s(P());break;case"cash_flow_by_projects":g&&s(D());break;case"cash_flow":s(O(C.timeframe))}}),[p,B,v,y,T,g]);const ee=Da(),Oe=ee?.loggedInUserRole!=null&&Ge(ee?.loggedInUserRole)!==!0,[De,Pe]=u.useState(!1),ae=l=>{Pe(l)},Ae=Pa(),Ee=Aa();return(function(l){const{isDataReady:Ve}=l,{pathname:Me}=te(),se=Sa(Me??"")==="reports",Le=Ta(Ve),Be=u.useMemo((()=>se?Ha:void 0),[se]);ka({canFetchSuggestedQuestions:Le,pageContexts:Be})})({isDataReady:w==="Completed"}),Ea({isDataReady:w==="Completed"}),f.jsxs(f.Fragment,{children:[w==="Completed"?f.jsx(Va,{analytics:J,onLoad:l=>l.trackPageLoaded(Ma.Event.reports)}):null,f.jsx(Ga,{isAppContentDrawerOpen:De,handleDrawerToggle:ae}),f.jsx($a,{firstMonthOfFY:Se,tenantEmailDomain:n,location:t,navigate:a,windowSize:b,classViewLayout:Fe,selectedReportID:B,analytics:J,filter:C,isAccountingClassesEnabled:T,isAccountingProjectsEnabled:g,isCompareModeOn:je,hasTransactionAccess:Oe,signedInUser:c,selectedReportAndTimeframeFetchState:v,handleDrawerToggle:ae,reportsResyncFetchState:ke.reportsResyncFetchState,isAiCfoAccessEnabled:Ee&&Ae&&!e,onAskAiCfoClick:()=>{if(Ie)if(m){const l=ge(t.state?.pathnameStackToGoBack,t.pathname);a(`/${n}/ai-cfo/explore`,{state:{pathnameStackToGoBack:l,referrer:"Reports"}})}else o(!0);else La({location:t,navigate:a,mergeState:{referrer:"Reports"}})},isHorizontalClassReportSwitchEnabled:i,isCustomDateRangeEnabled:d,initialOpenThreadRequest:Te})]})}const F=e=>{switch(e){case"profit_and_loss":case"profit_and_loss_by_classes":case"profit_and_loss_by_projects":return"Profit & Loss";case"balance_sheet":case"balance_sheet_by_classes":case"balance_sheet_by_projects":return"Balance Sheet";case"cash_flow":case"cash_flow_by_classes":case"cash_flow_by_projects":return"Cash Flow";default:return"Reports"}};function Cs(){const e=_((s=>K(s))),{useFeatureGate:o}=Ce(),{isFeatureEnabled:b}=o(Q.isDebitCardFeatureEnabled),m=Ra(b,e),a=Ia(e);return m===!0||a===!0?f.jsx(Ya,{}):f.jsxs(xe,{children:[f.jsx(oe,{path:"/",element:f.jsx(qa,{})}),f.jsx(oe,{path:"*",element:f.jsx(Ua,{})})]})}export{Cs as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-DsfYQPDU.js";import{z as b,a6 as N,h as u,Q as S,e8 as k,p as C,_ as I}from"./index-DByp7gYR.js";import"./mui-DsLgO0pD.js";import g from"./NotFoundScreen-62ZwPZD8.js";import{a as c}from"./sentry-BOcQ3kj3.js";import{u as D,j as h,h as F,g as L,l as _,n as T,o as f,N as y}from"./core-BLE-efAE.js";import{fJ as U,a3r as w,a3s as p,Ew as P,qi as V,a3t as q,Eu as z}from"./zeni-epic-state-Cj-eqUB4.js";import"./recharts-BrF9RV-y.js";import"./analytics-DOSt68hW.js";import"./plaid-CsR4G1V6.js";import"./dnd-_7Bcanxg.js";import"./stripe-cKAAJElX.js";import"./lottie-CvlQ31Z0.js";import"./lexical-CRb0eiRh.js";import"./pdf-Nx2bnRAL.js";import"./utils-Dl4IzX4w.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]="117f432d-9c6d-47e3-89ef-d2b3c417f0bb",e._sentryDebugIdIdentifier="sentry-dbid-117f432d-9c6d-47e3-89ef-d2b3c417f0bb")}catch{}})();const G=_((function(e,t){const n=w(e);return{inviteFormView:n.localData,submitStatus:n.saveStatus,userName:t.userName,rewardsPlan:n.rewardsPlan,companyLegalName:t.companyName}}),(function(e,t){const{navigate:n}=t,i=b.getSignedInUser();return{onDismissClick:()=>{e(p()),n("/")},onSendClick:()=>{if(i!=null){const s=[],r=[];t.inviteFormCompayData.forEach((l=>{s.push(l.companyName),r.push(l.emailIds[0])})),u.trackInviteEmailClicked("send",s,r,s.length)}e(z())},onUpdateInviteFormLocalData:s=>{e(q({localData:s}))},onSubmitSuccess:()=>{e(p())},onCancelClick:()=>{i!=null&&u.trackInviteEmailClicked("cancel")}}}))(k),J=()=>{const e=D(),[t,n]=c.useState(!1),[i,s]=c.useState(!1),r=h((o=>U(o))),l=F(),j=L(),d=b.getSignedInUser();if(d==null)throw Error("Can't access invite referral screen without signing in...");const m=h((o=>w(o))),x=d?.firstName!=null?d.firstName:"User";c.useEffect((()=>{e(p()),r?.rewardsLastViewedTime==null&&i===!1&&(e(P()),s(!0))}),[]),c.useEffect((()=>{t||m.fetchState!=="Not-Started"||(n(!0),e(V(!0)))}),[m.fetchState,e]);const E=r.company?.companyInfo.companyLegalName??r.companyName;return a.jsxs(a.Fragment,{children:[m.fetchState==="Completed"?a.jsx(N,{analytics:u,onLoad:o=>(v=>v.trackPageLoaded(S.Event.inviteEmailViewed))(o)}):null,a.jsx(G,{navigate:l,location:j,currentTenant:r,companyName:E,userName:x,inviteFormCompayData:m.localData})]})};function ne(){const{useFeatureGate:e}=C(),{isFeatureEnabled:t}=e(I.isReferralFeatureEnabled);return a.jsxs(T,{children:[a.jsx(f,{path:"/",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(f,{path:"how-it-works",element:a.jsx(y,{to:"refer",replace:!0})}),a.jsx(f,{path:"refer/*",element:t?a.jsx(J,{}):a.jsx(g,{})}),a.jsx(f,{path:"*",element:a.jsx(g,{})})]})}export{ne as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as E}from"./liveblocks-
|
|
1
|
+
import{j as E}from"./liveblocks-DsfYQPDU.js";import{a as v}from"./sentry-BOcQ3kj3.js";import{i as F,u as H,h as Q,g as ee,j as r,l as te}from"./core-BLE-efAE.js";import{XN as Ge,XO as Ve,m4 as ae,sQ as Me,t0 as Fe,tg as $e,te as Re,th as Ke,tj as Ue,XP as Ye,fJ as K,WM as pe,XQ as Se,h3 as ne,cE as le,cF as se,FX as ve,XR as Ce,F$ as Xe,gT as ce,sT as qe,ts as ze,dH as We,dG as Ze,U5 as fe,FV as He,FP as Qe,XS as De,FH as et,FG as tt,FB as at,FM as nt,G0 as lt,XT as Y,XU as ge,FI as st,WN as oe,Gg as Ae,G9 as Ie,XV as xe,sW as Te,G3 as Be,G1 as Le,XW as Je,Gn as we,Gk as je,G4 as be,Gm as Ne}from"./zeni-epic-state-Cj-eqUB4.js";import{a2 as de,aW as ie,aX as ct,z as ot,g as dt,a5 as it,a6 as ue,h as _,at as ut,aY as rt,j as V,G as ye,v as Ee,aZ as ht,a_ as mt,a$ as pt}from"./index-DByp7gYR.js";import{n as re}from"./mui-DsLgO0pD.js";import{p as St}from"./pathToGoBack-CA4HTT5M.js";import{u as ft}from"./useActualMatchingMatchDetail-BLrdVfvU.js";import Z from"./NotFoundScreen-62ZwPZD8.js";import{c as M}from"./routePaths-Bywswu4r.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]="110fa19c-9c7d-447f-a7ce-df99308f409e",e._sentryDebugIdIdentifier="sentry-dbid-110fa19c-9c7d-447f-a7ce-df99308f409e")}catch{}})();function Ut({isRenderedInPanel:e=!1,accrualIdOverride:t,onPanelNavigateBack:c}={}){const{accrualId:l}=F(),s=t??l,n=H(),i=Q(),a=ee(),{accrual:d,actionFetchState:o,detailFetchState:h,localData:A}=r((u=>Ge(u,s??""))),m=r((u=>Ve(u))),C=r((u=>ae(u))),y=ft(),S=v.useCallback((()=>{const u=de(a.state?.pathnameStackToGoBack);i(u.poppedPathname??St(4),{state:{pathnameStackToGoBack:u.newStack}})}),[a.state,i]),I=v.useRef(!1);return v.useEffect((()=>{o.fetchState!=="In-Progress"&&I.current&&o.fetchState==="Completed"&&(I.current=!1,S())}),[o.fetchState,S]),v.useEffect((()=>{s!=null&&d==null&&h.fetchState==="Not-Started"&&n(Me(s))}),[s,d,h.fetchState]),v.useEffect((()=>{n(Fe({scheduleType:"prepaid_expenses",shouldResetEnteredData:!1}))}),[n]),s==null?E.jsx(Z,{}):d==null?h.fetchState==="Not-Started"||h.fetchState==="In-Progress"?E.jsx(ie,{}):E.jsx(Z,{}):E.jsx(Dt,{children:E.jsx(ct,{isRenderedInPanel:e,accrual:d,actionFetchState:o.fetchState,isAccountingClassesEnabled:C,localData:A,newAccrualAccountsView:m,onAccrualFormChange:(u,f)=>{n(Ye({accrualId:u,localData:f}))},onAccrualFormClear:u=>{n(Ue({accrualId:u}))},onApproveAndPost:u=>{n(Ke(s,u))},onNavigateBack:c??S,onOpenJournalEntry:y,onRevert:(u,f)=>{I.current=!0,n(Re(s,u,f))},onSkip:(u,f)=>{n($e(s,u,f))}})})}const Dt=re.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-
|
|
2
|
-
import{_ as s,bn as Es,fJ as ps,e2 as xs,e1 as gs,BC as Rs,dm as js,cb as Is,gN as Ts,gd as As,dj as pe,cK as bs,gr as fs,cB as Ds,bH as ys,br as vs,Va as Cs,v as Os,Vd as Ps,bq as Us,Ve as ws,bN as Fs,bM as Vs,bv as Ls,cx as Hs,Vf as ks,Vg as Bs,de as Ss,dh as Ns,dg as Ms,cJ as Zs,cQ as $s,q9 as xe,gm as ge,h1 as zs,go as Re,gP as je,gQ as Ie,gp as Gs}from"./zeni-epic-state-9qkFzYai.js";import{j as e}from"./liveblocks-njwIYHC1.js";import{a as U}from"./sentry-VFPS4V5K.js";import{N as u,u as qs,h as Ys,i as Js,g as Ws,j as $,q as Te,n as Ks,o as n}from"./core-Drb9PBdf.js";import{J as l,u as Qs,z as y,p as Xs,d as et,K as st,_ as S,f as tt,R as nt,V as at,L as F,G as Ae,t as _,P as ot,N as rt,h as ne}from"./index-z_GphMeq.js";import{u as it}from"./mui-B5W8_mOr.js";import{f as be}from"./analyticsHelper-Vk8jtaRR.js";import{t as lt}from"./getLocaleForTenant-DdWfA4jD.js";import{u as ut}from"./useIsCustomersTabEnabled-CxdytBTD.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new o.Error().stack;f&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[f]="285861d0-3e63-45a2-8f7c-091b98382bb5",o._sentryDebugIdIdentifier="sentry-dbid-285861d0-3e63-45a2-8f7c-091b98382bb5")}catch{}})();const dt=l((()=>s((()=>import("./NotFoundScreen-BThXAXPU.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ct=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),mt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),fe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),De=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),ye=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),v=({showZeniAccountRoute:o,isUserHasBillPayAccess:f,isUserHasReimbursementAccess:N,showTreasuryRoute:i,isTenantBankingOnly:L,showChargeCardRoute:O,tenantEmailDomain:C})=>{if(L===!0){if(o)return e.jsx(De,{tenantEmailDomain:C});if(i)return e.jsx(fe,{tenantEmailDomain:C});if(O)return e.jsx(ye,{tenantEmailDomain:C})}return o?e.jsx(De,{tenantEmailDomain:C}):i?e.jsx(fe,{tenantEmailDomain:C}):O?e.jsx(ye,{tenantEmailDomain:C}):f?e.jsx(mt,{tenantEmailDomain:C}):N?e.jsx(ct,{tenantEmailDomain:C}):e.jsx(dt,{})},_t={dashboard:()=>s((()=>import("./DashboardRoutes-CkNHYlwe.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,18,0,19,20,21,22,23,24,25,26,8])),bills:()=>s((()=>import("./BillPayRoutes-DwoZ4Wej.js")),__vite__mapDeps([27,1,2,3,4,5,6,7,28,0,29,11,14,30,15,22,23,24,18,31,26,32,20,33,34,35,36,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-BJsGbiLA.js")),__vite__mapDeps([37,1,2,3,4,5,6,7,0,32,30,15,22,23,24,18,20,26,11,14,31,38,34,35,36,8])),transactions:()=>s((()=>import("./TransactionListRoutes-DydlnHAH.js")),__vite__mapDeps([39,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,40,8])),settings:()=>s((()=>import("./SettingsRoutes-BpaF5UCO.js")),__vite__mapDeps([41,1,2,3,4,5,6,7,24,42,22,23,18,43,44,45,46,47,13,48,28,0,20,30,15,21,49,33,34,35,38,8])),reports:()=>s((()=>import("./ReportsRoutes-Q_1D8cZK.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,26,14,15,19,22,23,24,18,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-CX_ID8PO.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,11,22,23,24,18,32,30,15,0,20,14,52,28,8])),people:()=>s((()=>import("./PeopleRoutes-BOxWPOrb.js")),__vite__mapDeps([53,1,2,3,4,5,6,7,0,11,22,23,24,18,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-BWV2tipJ.js")),__vite__mapDeps([54,1,2,3,0,4,5,6,7,11,12,13,14,15,16,55,17,10,56,57,48,31,8])),treasury:()=>s((()=>import("./TreasuryRoutes-B4mGKq9W.js")),__vite__mapDeps([58,1,2,3,4,5,6,7,0,32,30,15,22,23,24,18,20,11,14,26,8])),vendors:()=>s((()=>import("./VendorsRoutes-D1ROPhMq.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,28,0,26,56,57,55,17,13,15,11,22,23,24,18,31,48,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-CZ-mVo79.js")),__vite__mapDeps([60,1,2,3,4,5,6,7,0,32,30,15,22,23,24,18,20,26,29,28,11,40,8]))},ht=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ae=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},Et=l((()=>s((()=>import("./ReportsRoutes-Q_1D8cZK.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,26,14,15,19,22,23,24,18,8])))),pt=l((()=>s((()=>import("./AddressRoutes-D_IpH71K.js")),__vite__mapDeps([61,1,2,3,28,4,5,6,7,0,8])))),xt=l((()=>s((()=>import("./PeopleRoutes-BOxWPOrb.js")),__vite__mapDeps([53,1,2,3,4,5,6,7,0,11,22,23,24,18,8])))),gt=l((()=>s((()=>import("./PandLWithForecastRoutes-spqAx7Nj.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,0,26,11,14,15,22,23,24,18,8])))),Rt=l((()=>s((()=>import("./CustomerOnboardingRoutes-Crv7_qXD.js")),__vite__mapDeps([63,1,2,3,28,4,5,6,7,0,43,44,45,46,47,13,49,52,8])))),jt=l((()=>s((()=>import("./VendorsRoutes-D1ROPhMq.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,28,0,26,56,57,55,17,13,15,11,22,23,24,18,31,48,8])))),It=l((()=>s((()=>import("./CustomersRoutes-CsT3I1KS.js")),__vite__mapDeps([64,1,2,3,4,5,6,7,15,0,11,22,23,24,18,8])))),Tt=l((()=>s((()=>import("./TransactionDetailRoutes-DN0MAIjC.js")),__vite__mapDeps([65,1,2,3,0,4,5,6,7,13,34,12,11,14,15,16,8])))),ve=l((()=>s((()=>import("./EntityDetailRoutes-BEbJufIv.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,13,10,11,12,14,15,16,17,18,8])))),At=l((()=>s((()=>import("./DashboardRoutes-CkNHYlwe.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,18,0,19,20,21,22,23,24,25,26,8])))),Ce=l((()=>s((()=>import("./BillPayRoutes-DwoZ4Wej.js")),__vite__mapDeps([27,1,2,3,4,5,6,7,28,0,29,11,14,30,15,22,23,24,18,31,26,32,20,33,34,35,36,8])))),bt=l((()=>s((()=>import("./SettingsRoutes-BpaF5UCO.js")),__vite__mapDeps([41,1,2,3,4,5,6,7,24,42,22,23,18,43,44,45,46,47,13,48,28,0,20,30,15,21,49,33,34,35,38,8])))),ft=l((()=>s((()=>import("./InvoicingRoutes-BDKU1kok.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,28,0,22,23,24,18,43,44,45,46,47,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-BJsGbiLA.js")),__vite__mapDeps([37,1,2,3,4,5,6,7,0,32,30,15,22,23,24,18,20,26,11,14,31,38,34,35,36,8])))),Dt=l((()=>s((()=>import("./ZeniAccountRoutes-CZ-mVo79.js")),__vite__mapDeps([60,1,2,3,4,5,6,7,0,32,30,15,22,23,24,18,20,26,29,28,11,40,8])))),yt=l((()=>s((()=>import("./TreasuryRoutes-B4mGKq9W.js")),__vite__mapDeps([58,1,2,3,4,5,6,7,0,32,30,15,22,23,24,18,20,11,14,26,8])))),vt=l((()=>s((()=>import("./TransactionListRoutes-DydlnHAH.js")),__vite__mapDeps([39,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,40,8])))),Ct=l((()=>s((()=>import("./ChargeCardRoutes-CX_ID8PO.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,11,22,23,24,18,32,30,15,0,20,14,52,28,8])))),Ot=l((()=>s((()=>import("./NotificationRoutes-Bq6Q_RnE.js")),__vite__mapDeps([68,1,2,3,0,4,5,6,7,11,24,8])))),Pt=l((()=>s((()=>import("./PerformanceRoutes-DIk329y5.js")),__vite__mapDeps([69,1,2,3,0,4,5,6,7,11,22,23,24,18,8])))),Ut=l((()=>s((()=>import("./ExpenseAutomationRoutes-BWV2tipJ.js")),__vite__mapDeps([54,1,2,3,0,4,5,6,7,11,12,13,14,15,16,55,17,10,56,57,48,31,8])))),wt=l((()=>s((()=>import("./ActualMatchingMatchDetailScreen-UFhJKVUq.js")),__vite__mapDeps([70,1,2,3,4,5,6,7,55,17,13,15,0,8])))),Ft=l((()=>s((()=>import("./RewardsRoutes-Dl2249xj.js")),__vite__mapDeps([71,1,2,3,4,5,6,7,0,8])))),Vt=l((()=>s((()=>import("./TaskRoutes-DWGwCtaS.js")),__vite__mapDeps([72,1,2,3,0,4,5,6,7,14,22,23,24,18,73,11,74,8])))),Lt=l((()=>s((()=>import("./AiCfoScreen-UfYXu56F.js")),__vite__mapDeps([75,1,2,3,4,5,6,7,25,57,15,74,8])))),Pe=l((()=>s((()=>import("./CardsAiCfoScreen-o65vXGHV.js")),__vite__mapDeps([76,1,2,3,4,5,6,7,8])))),I=l((()=>s((()=>import("./NotFoundScreen-BThXAXPU.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),Ht=l((()=>s((()=>import("./TaskListScreen-cAzkNljY.js").then((o=>o.f))),__vite__mapDeps([73,1,2,3,4,5,6,7,11,22,23,24,18,74,8])))),kt=({isDashboardAccess:o,showZeniAccountRoute:f,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:i,showTreasuryRoute:L,isTenantBankingOnly:O,isTenantCardsOnly:C,showChargeCardRoute:H})=>{if(O===!0){if(f)return e.jsx(u,{to:"checking"});if(L)return e.jsx(u,{to:"treasury"});if(H)return e.jsx(u,{to:"cards"})}return C===!0&&H?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):f?e.jsx(u,{to:"checking"}):L?e.jsx(u,{to:"treasury"}):H?e.jsx(u,{to:"cards"}):N?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Ue=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`}),Yt=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:o}){const f=qs(),N=Ys(),{tenantEmailDomain:i}=Js(),L=it().mode,{setLoading:O,clearAllLoading:C,clearLoading:H}=Qs(),D=y.getSignedInUserTenant(i)?.tenantId,T=y.getSignedInUser(),W=Es(T),z=Ws(),[V,we]=U.useState(!1),r=$((a=>ps(a))),{useFeatureGate:k}=Xs(),M=et(),K=st(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Ve=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Le}=k(S.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=k(S.isDebitCardFeatureEnabled),A=$((a=>a.tenantState.fetchState)),p=$((a=>a.tenantState.activeTenantFetchState.fetchState)),h=p==="Completed"||A==="Completed"?xs(oe,r):void 0,Q=p==="Completed"||A==="Completed"?gs(r):void 0,re=p==="Completed"||A==="Completed"?Rs(r)&&!js(r):void 0,He=tt(r,Le,oe),{isCardsHidden:ke}=nt(r?.tenantId),Be=!He||!!ke,{isFeatureEnabled:Se}=k(S.isSettingsFeatureEnabled),{isFeatureEnabled:X}=k(S.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=k(S.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||rt==="DEV",Ze=r?.userRole!=null&&Is(r.userRole),G=$((a=>Ts(a)));if(i!=null){const a=y.getSignedInUserTenant(i);T!=null&&a!=null&&be(T,r,L)}const Z={tenantId:D,userId:T?.userId,sessionId:T?.zeniSessionId},ie=As(),E=at(),$e=ut(r.company==null),ze=r.company==null||E?.loggedInUserRoleMap!=null&&pe(E.loggedInUserRole),Ge=bs(E?.loggedInUserRoleMap),ee=Te("/:tenantEmailDomain/onboarding/*")!==null,qe=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),se=qe?.params.selectedPeriod,Ye=$((a=>Z.tenantId!=null?fs(a,Z.tenantId):void 0));U.useEffect((()=>{O(F.TENANT_FETCHING),o(i)}),[i]),U.useEffect((()=>{if(se!=null&&D!=null){const a=se.split("-");if(a.length===2){const b=Ds(Number(a[0])),c=Number(a[1]),t=ys(`01-${b<10?`0${b}`:b}-${c}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),d=vs();t.isAfter(d,"month")===!1?f(Cs(D,{month:b,year:c})):N(`/${i}/month_end_close_checks/review`)}}}),[se,i,D]),U.useEffect((()=>{V||(we(!0),O(F.TENANT_FETCHING))}),[V,Z,ie,T,f,y]),U.useLayoutEffect((()=>{!Os(ie,Z)&&y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,b,c,t){if(ge(b?.userId,b?.zeniSessionId,a.tenantId),c(zs(!0)),c(Re(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const d=y.getSignedInUserTenantWithId(a.tenantId);t&&Ae.updateAppLocaleID(lt(t)),d?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(d?.tenantEmailDomain)}a.userId!=null?ne.identify(a.userId,{tenant_id:a.tenantId}):ne.resetUserIdentity()})(Z,T,f,Ye))}),[D]),U.useEffect((()=>{y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,b,c,t,d,q,B){if(c==null&&t==null)return void console.warn("There is no current tenant selected!!");const Y=t!=null&&d?.zeniSessionId!=null,ms=c==null||c.tenantId!==t,_s=c!=null&&c.excludedResources==null,hs=c!=null&&c.externalConnections==null;if(Y&&ms){B(Re(t));const J=y.getSignedInUserTenantWithId(t);J?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(J?.tenantEmailDomain),ge(d?.userId,d?.zeniSessionId,t),_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),B(je(d.userId,t))),_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),B(Ie(d.userId,t)))}else Y&&_s&&_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),B(je(d.userId,t))),Y&&hs&&_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),B(Ie(d.userId,t)));if(Y){ne.identify(d.userId,{tenant_id:t});const J=t==null||t!=null&&(b==="Completed"||b==="Error");a==="Completed"||b!=="Not-Started"&&b!=="Error"||t==null||!_.shouldFetchActiveTenant(t)||(_.markActiveTenantFetchStarted(t),q(F.TENANT_FETCHING),B(Gs(d.userId,t,d.zeniSessionId))),J&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),B(xe(d.userId,d.zeniSessionId)))}})(A,p,r,D,T,O,f))}),[D,p]),U.useEffect((()=>{y.isSignedIn()&&A==="Completed"&&G.tenantsBaseInOrder.length>0&&(H(F.TENANT_FETCHING),y.saveSignedInUserTenants(Ps(G.tenantsBaseInOrder)),T!=null&&be(T,r,L,void 0,G.tenantsBaseInOrder))}),[G,A,r,T]),U.useEffect((()=>{p==="In-Progress"&&O(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&D!=null?(C(),_.markActiveTenantFetchCompleted(D)):p==="Error"&&D!=null&&(_.markActiveTenantFetchFailed(D),H(F.TENANT_FETCHING),H(F.TENANT_SWITCHING))),A!=="Completed"&&A!=="Error"||(A==="Completed"?_.markAllTenantsFetchCompleted():A==="Error"&&_.markAllTenantsFetchFailed())}),[p,A,D,V]);const le=U.useRef(!1);U.useEffect((()=>{!le.current&&p==="Completed"&&V&&(le.current=!0,(function(a=ht,b=3e3){setTimeout((()=>{const c=t=>{if(t>=a.length)return;const d=a[t],q=_t[d];q!=null?q().then((()=>ae((()=>c(t+1))))).catch((()=>ae((()=>c(t+1))))):c(t+1)};ae((()=>c(0)))}),b)})())}),[p,V]);const P=r?.userRole!=null&&Us(r?.userRole),{isFeatureEnabled:Je}=k(S.isReferralFeatureEnabled),{isFeatureEnabled:We}=k(S.isAccrualEnabled),Ke=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Qe=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),w=r?.userRole!=null&&pe(r.userRole),ue=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!P,de=!Be&&!P,Xe=ws(E?.loggedInUserRoleMap),es=r.externalConnections?.accounting[0]?.isValid,ss=r.externalConnections?.fetchState==="Completed",te=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!P,me=ce&&Fs(E?.loggedInUserRoleMap),_e=Fe&&!P,ts=Ve&&!P,ns=ue&&Vs(E?.loggedInUserRoleMap),as=de&&Ls(E?.loggedInUserRoleMap),os=_e&&Hs(E?.loggedInUserRoleMap),rs=ks(E?.loggedInUserRoleMap),is=Bs(E?.loggedInUserRoleMap),ls=Ss(E?.loggedInUserRoleMap),us=Ns(E?.loggedInUserRoleMap),ds=Ms(E?.loggedInUserRoleMap),x=Zs(E?.loggedInUserRoleMap),g=$s(E?.loggedInUserRoleMap),he=ue&&x,Ee=ce&&g,R=_e&&ls,j=ts&&us,m=de&&ds,cs=r.excludedResources?.resources?.find((a=>a.resource==="/invites"))!=null||Ge===!0||Xe===!0||rs===!0||is===!0;return y.isSignedIn()?D==null?A==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(T!=null&&A!=="In-Progress"&&f(xe(T.userId,T.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||A==="Completed"?(te===!0||W&&!ee)&&ss&&es!==!0&&h===!1&&Q===!1&&re===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!V||re!==!0||te!==!0||ee||W?!V||te!==!1||ee||W?V&&r?.userRole&&h!=null&&Q!=null&&i!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Ks,{children:e.jsxs(n,{element:e.jsx(ot,{}),children:[e.jsx(n,{path:"/",element:e.jsx(kt,{isDashboardAccess:w,showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:h,isTenantCardsOnly:Q,showChargeCardRoute:m})}),e.jsx(n,{path:"dashboard/*",element:w?e.jsx(At,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reports/*",element:w?e.jsx(Et,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"people/*",element:cs||w?e.jsx(xt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"forecast/*",element:w?e.jsx(gt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"onboarding/*",element:e.jsx(Rt,{})}),e.jsx(n,{path:"transaction/*",element:w&&P===!1||Ke||Qe?e.jsx(Tt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"transactions/*",element:w&&P===!1?e.jsx(vt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"customer/*",element:w&&P===!1?e.jsx(ve,{entityType:"customer"}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,isTenantBankingOnly:h,showTreasuryRoute:j,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"vendor/*",element:w&&P===!1?e.jsx(ve,{entityType:"vendor"}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"tasks",element:e.jsx(Ht,{})}),e.jsx(n,{path:"tasks/*",element:e.jsx(Vt,{})}),e.jsx(n,{path:"address/*",element:ns||me||os||as?e.jsx(pt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"checking/*",element:R?e.jsx(Dt,{}):e.jsx(I,{})}),e.jsx(n,{path:"treasury/*",element:j?e.jsx(yt,{}):e.jsx(I,{})}),e.jsx(n,{path:"performance",element:K===!0?e.jsx(Pt,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(n,{path:"month_end_close_checks/review/*",element:K===!0&&P===!1?e.jsx(Ut,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(n,{path:"expense-automation/actual-matching/:matchId",element:K===!0&&P===!1&&We===!0?e.jsx(wt,{}):e.jsx(I,{})}),e.jsx(n,{path:"notifications/*",element:e.jsx(Ot,{})}),e.jsx(n,{path:"vendors/*",element:ze?e.jsx(jt,{}):e.jsx(I,{})}),e.jsx(n,{path:"customers/*",element:$e?e.jsx(It,{}):e.jsx(I,{})}),e.jsx(n,{path:"bill/*",element:he?e.jsx(Ce,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"bills/*",element:he?e.jsx(Ce,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursement/*",element:Ee?e.jsx(Oe,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursements/*",element:Ee?e.jsx(Oe,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"settings/*",element:Se?e.jsx(bt,{hasAdminLevelAccess:me}):e.jsx(I,{})}),e.jsx(n,{path:"invoicing/*",element:Me&&Ze?e.jsx(ft,{}):e.jsx(I,{})}),e.jsx(n,{path:"cards/ask",element:m&&M?e.jsx(Pe,{isFileUploadEnabled:X}):e.jsx(I,{})}),e.jsx(n,{path:"cards/ask/:session_id",element:m&&M?e.jsx(Pe,{isFileUploadEnabled:X}):e.jsx(I,{})}),e.jsx(n,{path:"cards/*",element:m?e.jsx(Ct,{}):e.jsx(I,{})}),e.jsx(n,{path:"rewards/*",element:Je?e.jsx(Ft,{}):e.jsx(I,{})}),e.jsx(n,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(I,{})}),e.jsx(n,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(I,{})}),e.jsx(n,{path:"/ai-cfo/:session_id",element:M?e.jsx(Lt,{isFileUploadEnabled:X}):e.jsx(I,{})}),e.jsx(n,{path:"*",element:e.jsx(I,{})})]})}):null:(o(void 0),e.jsx(u,{to:`/${i}/onboarding`,replace:!0})):(o(void 0),e.jsx(u,{to:`/${i}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{v as F,Yt as S};
|
|
1
|
+
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-62ZwPZD8.js","assets/sentry-BOcQ3kj3.js","assets/core-BLE-efAE.js","assets/zeni-epic-state-Cj-eqUB4.js","assets/index-DByp7gYR.js","assets/mui-DsLgO0pD.js","assets/analytics-DOSt68hW.js","assets/utils-Dl4IzX4w.js","assets/index-BQ3cXEYt.css","assets/DashboardRoutes-CPUNBtcw.js","assets/withTransactionSidePanel-CJHd-i6O.js","assets/useAskAiCfoHostNavButtonProps-DJfxJxgV.js","assets/TransactionDetailScreen-DWGL2jzj.js","assets/decodeURIComponentSafe-Bwl2ftU9.js","assets/useInitialThreadRequest-vezVMaGs.js","assets/routePaths-Bywswu4r.js","assets/expenseAutomationHelper-CeE0lEsm.js","assets/stripSplatSuffix-CdLD7Q-9.js","assets/useIsCustomersTabEnabled-DWpqS9JG.js","assets/reportTimeframe-iR64H8K5.js","assets/analyticsHelper-DpuSAcdJ.js","assets/CompanyPassportScreen-D9J5NscU.js","assets/MobileAppDrawer-QsBOZtGR.js","assets/InboxNotificationsProvider-DgU7-WH3.js","assets/useTaskManagerAccess-g91qWg_Z.js","assets/useAiCfoDashboardSuggestedQuestionsChips-B5R3NZLn.js","assets/FeaturePreviewScreen-D7KvTxUl.js","assets/BillPayRoutes-9LIjosJx.js","assets/AddressScreen-DTHectLm.js","assets/DomesticWireDetailScreen-D9Y4Vys1.js","assets/BusinessVerificationPageScreen-DfgDpNPJ.js","assets/DrawerScreen-COYxf4a_.js","assets/SetupPagesScreen-CGSGhPYa.js","assets/BillPayApprovalRoutes-BXjeKRQ0.js","assets/useEnsureVendorListLoaded-CllPhnHH.js","assets/ReimbursementApprovalRuleDetailScreen-CdMCxq5v.js","assets/getLocaleForTenant-DtkHbzuc.js","assets/ReimbursementRoutes-HqQZzHgE.js","assets/ReimbursementApprovalRoutes-DJFklLxf.js","assets/TransactionListRoutes-Ds8Blr0P.js","assets/ZeniAccountStatementScreen-CMk5KOCO.js","assets/SettingsRoutes-CD1wEg-n.js","assets/AccountMappingScreen-CNps2c4g.js","assets/QBOConnectionScreen-BvJN0vdq.js","assets/empty-DawNxSIf.js","assets/index-CxmRqFuX.js","assets/url-HoGgtb9G.js","assets/index-B_crlpCt.js","assets/accountMappingHelper-eL9XJ0hM.js","assets/useEmailConnectResultRefresh-CmeR8OjB.js","assets/ReportsRoutes-CnGiYy5C.js","assets/ChargeCardRoutes-BrxWQBKB.js","assets/useChargeCardPusherEvents-BX1c4wSC.js","assets/PeopleRoutes-B5A-Tpws.js","assets/ExpenseAutomationRoutes-DLMk8DPD.js","assets/useActualMatchingMatchDetail-BLrdVfvU.js","assets/ScheduleDetailsPrepaidExpensesScreen-gV26nTmK.js","assets/pathToGoBack-CA4HTT5M.js","assets/TreasuryRoutes-CuPXFHKq.js","assets/VendorsRoutes-DwomB3zm.js","assets/ZeniAccountRoutes-6G8fVXON.js","assets/AddressRoutes-DiGUM-Ah.js","assets/PandLWithForecastRoutes-Byqs-iPS.js","assets/CustomerOnboardingRoutes-B5SaMgHv.js","assets/CustomersRoutes-CVgGJswf.js","assets/TransactionDetailRoutes-DkNDZeWn.js","assets/EntityDetailRoutes-CY-pNBzS.js","assets/InvoicingRoutes-D7I28onf.js","assets/NotificationRoutes-DgyyQzJn.js","assets/PerformanceRoutes-CIq9UMN2.js","assets/ActualMatchingMatchDetailScreen-YEeqk6Zp.js","assets/RewardsRoutes-BsYJ465t.js","assets/TaskRoutes-wAulbJhb.js","assets/TaskListScreen-CGZw_rHi.js","assets/useTaskManagerPusherEvents-Sy36jLlk.js","assets/AiCfoScreen-B2gtbDf7.js","assets/CardsAiCfoScreen-3_sFV2Ml.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{_ as s,bn as Es,fJ as ps,e2 as xs,e1 as gs,BC as Rs,dm as js,cb as Is,gN as Ts,gd as As,dj as pe,cK as bs,gr as fs,cB as Ds,bH as ys,br as vs,Va as Cs,v as Os,Vd as Ps,bq as Us,Ve as ws,bN as Fs,bM as Vs,bv as Ls,cx as Hs,Vf as ks,Vg as Bs,de as Ss,dh as Ns,dg as Ms,cJ as Zs,cQ as $s,q9 as xe,gm as ge,h1 as zs,go as Re,gP as je,gQ as Ie,gp as Gs}from"./zeni-epic-state-Cj-eqUB4.js";import{j as e}from"./liveblocks-DsfYQPDU.js";import{a as U}from"./sentry-BOcQ3kj3.js";import{N as u,u as qs,h as Ys,i as Js,g as Ws,j as $,q as Te,n as Ks,o as n}from"./core-BLE-efAE.js";import{J as l,u as Qs,z as y,p as Xs,d as et,K as st,_ as S,f as tt,R as nt,V as at,L as F,G as Ae,t as _,P as ot,N as rt,h as ne}from"./index-DByp7gYR.js";import{u as it}from"./mui-DsLgO0pD.js";import{f as be}from"./analyticsHelper-DpuSAcdJ.js";import{t as lt}from"./getLocaleForTenant-DtkHbzuc.js";import{u as ut}from"./useIsCustomersTabEnabled-DWpqS9JG.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new o.Error().stack;f&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[f]="285861d0-3e63-45a2-8f7c-091b98382bb5",o._sentryDebugIdIdentifier="sentry-dbid-285861d0-3e63-45a2-8f7c-091b98382bb5")}catch{}})();const dt=l((()=>s((()=>import("./NotFoundScreen-62ZwPZD8.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),ct=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/reimbursements`}),mt=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/bills`}),fe=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/treasury`}),De=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/checking`}),ye=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/cards`}),v=({showZeniAccountRoute:o,isUserHasBillPayAccess:f,isUserHasReimbursementAccess:N,showTreasuryRoute:i,isTenantBankingOnly:L,showChargeCardRoute:O,tenantEmailDomain:C})=>{if(L===!0){if(o)return e.jsx(De,{tenantEmailDomain:C});if(i)return e.jsx(fe,{tenantEmailDomain:C});if(O)return e.jsx(ye,{tenantEmailDomain:C})}return o?e.jsx(De,{tenantEmailDomain:C}):i?e.jsx(fe,{tenantEmailDomain:C}):O?e.jsx(ye,{tenantEmailDomain:C}):f?e.jsx(mt,{tenantEmailDomain:C}):N?e.jsx(ct,{tenantEmailDomain:C}):e.jsx(dt,{})},_t={dashboard:()=>s((()=>import("./DashboardRoutes-CPUNBtcw.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,18,0,19,20,21,22,23,24,25,26,8])),bills:()=>s((()=>import("./BillPayRoutes-9LIjosJx.js")),__vite__mapDeps([27,1,2,3,4,5,6,7,28,0,29,11,14,30,15,22,23,24,18,31,26,32,20,33,34,35,36,8])),reimbursement:()=>s((()=>import("./ReimbursementRoutes-HqQZzHgE.js")),__vite__mapDeps([37,1,2,3,4,5,6,7,0,32,30,15,22,23,24,18,20,26,11,14,31,38,34,35,36,8])),transactions:()=>s((()=>import("./TransactionListRoutes-Ds8Blr0P.js")),__vite__mapDeps([39,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,40,8])),settings:()=>s((()=>import("./SettingsRoutes-CD1wEg-n.js")),__vite__mapDeps([41,1,2,3,4,5,6,7,24,42,22,23,18,43,44,45,46,47,13,48,28,0,20,30,15,21,49,33,34,35,38,8])),reports:()=>s((()=>import("./ReportsRoutes-CnGiYy5C.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,26,14,15,19,22,23,24,18,8])),chargeCards:()=>s((()=>import("./ChargeCardRoutes-BrxWQBKB.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,11,22,23,24,18,32,30,15,0,20,14,52,28,8])),people:()=>s((()=>import("./PeopleRoutes-B5A-Tpws.js")),__vite__mapDeps([53,1,2,3,4,5,6,7,0,11,22,23,24,18,8])),expenseAutomation:()=>s((()=>import("./ExpenseAutomationRoutes-DLMk8DPD.js")),__vite__mapDeps([54,1,2,3,0,4,5,6,7,11,12,13,14,15,16,55,17,10,56,57,48,31,8])),treasury:()=>s((()=>import("./TreasuryRoutes-CuPXFHKq.js")),__vite__mapDeps([58,1,2,3,4,5,6,7,0,32,30,15,22,23,24,18,20,11,14,26,8])),vendors:()=>s((()=>import("./VendorsRoutes-DwomB3zm.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,28,0,26,56,57,55,17,13,15,11,22,23,24,18,31,48,8])),zeniAccounts:()=>s((()=>import("./ZeniAccountRoutes-6G8fVXON.js")),__vite__mapDeps([60,1,2,3,4,5,6,7,0,32,30,15,22,23,24,18,20,26,29,28,11,40,8]))},ht=["bills","transactions","settings","reimbursement","reports","chargeCards","people"],ae=o=>{"requestIdleCallback"in window?requestIdleCallback(o):setTimeout(o,100)},Et=l((()=>s((()=>import("./ReportsRoutes-CnGiYy5C.js")),__vite__mapDeps([50,1,2,3,4,5,6,7,0,26,14,15,19,22,23,24,18,8])))),pt=l((()=>s((()=>import("./AddressRoutes-DiGUM-Ah.js")),__vite__mapDeps([61,1,2,3,28,4,5,6,7,0,8])))),xt=l((()=>s((()=>import("./PeopleRoutes-B5A-Tpws.js")),__vite__mapDeps([53,1,2,3,4,5,6,7,0,11,22,23,24,18,8])))),gt=l((()=>s((()=>import("./PandLWithForecastRoutes-Byqs-iPS.js")),__vite__mapDeps([62,1,2,3,4,5,6,7,0,26,11,14,15,22,23,24,18,8])))),Rt=l((()=>s((()=>import("./CustomerOnboardingRoutes-B5SaMgHv.js")),__vite__mapDeps([63,1,2,3,28,4,5,6,7,0,43,44,45,46,47,13,49,52,8])))),jt=l((()=>s((()=>import("./VendorsRoutes-DwomB3zm.js")),__vite__mapDeps([59,1,2,3,4,5,6,7,28,0,26,56,57,55,17,13,15,11,22,23,24,18,31,48,8])))),It=l((()=>s((()=>import("./CustomersRoutes-CVgGJswf.js")),__vite__mapDeps([64,1,2,3,4,5,6,7,15,0,11,22,23,24,18,8])))),Tt=l((()=>s((()=>import("./TransactionDetailRoutes-DkNDZeWn.js")),__vite__mapDeps([65,1,2,3,0,4,5,6,7,13,34,12,11,14,15,16,8])))),ve=l((()=>s((()=>import("./EntityDetailRoutes-CY-pNBzS.js")),__vite__mapDeps([66,1,2,3,4,5,6,7,13,10,11,12,14,15,16,17,18,8])))),At=l((()=>s((()=>import("./DashboardRoutes-CPUNBtcw.js")),__vite__mapDeps([9,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,18,0,19,20,21,22,23,24,25,26,8])))),Ce=l((()=>s((()=>import("./BillPayRoutes-9LIjosJx.js")),__vite__mapDeps([27,1,2,3,4,5,6,7,28,0,29,11,14,30,15,22,23,24,18,31,26,32,20,33,34,35,36,8])))),bt=l((()=>s((()=>import("./SettingsRoutes-CD1wEg-n.js")),__vite__mapDeps([41,1,2,3,4,5,6,7,24,42,22,23,18,43,44,45,46,47,13,48,28,0,20,30,15,21,49,33,34,35,38,8])))),ft=l((()=>s((()=>import("./InvoicingRoutes-D7I28onf.js")),__vite__mapDeps([67,1,2,3,4,5,6,7,28,0,22,23,24,18,43,44,45,46,47,13,8])))),Oe=l((()=>s((()=>import("./ReimbursementRoutes-HqQZzHgE.js")),__vite__mapDeps([37,1,2,3,4,5,6,7,0,32,30,15,22,23,24,18,20,26,11,14,31,38,34,35,36,8])))),Dt=l((()=>s((()=>import("./ZeniAccountRoutes-6G8fVXON.js")),__vite__mapDeps([60,1,2,3,4,5,6,7,0,32,30,15,22,23,24,18,20,26,29,28,11,40,8])))),yt=l((()=>s((()=>import("./TreasuryRoutes-CuPXFHKq.js")),__vite__mapDeps([58,1,2,3,4,5,6,7,0,32,30,15,22,23,24,18,20,11,14,26,8])))),vt=l((()=>s((()=>import("./TransactionListRoutes-Ds8Blr0P.js")),__vite__mapDeps([39,1,2,3,4,5,6,7,10,11,12,13,14,15,16,17,40,8])))),Ct=l((()=>s((()=>import("./ChargeCardRoutes-BrxWQBKB.js")),__vite__mapDeps([51,1,2,3,4,5,6,7,11,22,23,24,18,32,30,15,0,20,14,52,28,8])))),Ot=l((()=>s((()=>import("./NotificationRoutes-DgyyQzJn.js")),__vite__mapDeps([68,1,2,3,0,4,5,6,7,11,24,8])))),Pt=l((()=>s((()=>import("./PerformanceRoutes-CIq9UMN2.js")),__vite__mapDeps([69,1,2,3,0,4,5,6,7,11,22,23,24,18,8])))),Ut=l((()=>s((()=>import("./ExpenseAutomationRoutes-DLMk8DPD.js")),__vite__mapDeps([54,1,2,3,0,4,5,6,7,11,12,13,14,15,16,55,17,10,56,57,48,31,8])))),wt=l((()=>s((()=>import("./ActualMatchingMatchDetailScreen-YEeqk6Zp.js")),__vite__mapDeps([70,1,2,3,4,5,6,7,55,17,13,15,0,8])))),Ft=l((()=>s((()=>import("./RewardsRoutes-BsYJ465t.js")),__vite__mapDeps([71,1,2,3,4,5,6,7,0,8])))),Vt=l((()=>s((()=>import("./TaskRoutes-wAulbJhb.js")),__vite__mapDeps([72,1,2,3,0,4,5,6,7,14,22,23,24,18,73,11,74,8])))),Lt=l((()=>s((()=>import("./AiCfoScreen-B2gtbDf7.js")),__vite__mapDeps([75,1,2,3,4,5,6,7,25,57,15,74,8])))),Pe=l((()=>s((()=>import("./CardsAiCfoScreen-3_sFV2Ml.js")),__vite__mapDeps([76,1,2,3,4,5,6,7,8])))),I=l((()=>s((()=>import("./NotFoundScreen-62ZwPZD8.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),Ht=l((()=>s((()=>import("./TaskListScreen-CGZw_rHi.js").then((o=>o.f))),__vite__mapDeps([73,1,2,3,4,5,6,7,11,22,23,24,18,74,8])))),kt=({isDashboardAccess:o,showZeniAccountRoute:f,isUserHasBillPayAccess:N,isUserHasReimbursementAccess:i,showTreasuryRoute:L,isTenantBankingOnly:O,isTenantCardsOnly:C,showChargeCardRoute:H})=>{if(O===!0){if(f)return e.jsx(u,{to:"checking"});if(L)return e.jsx(u,{to:"treasury"});if(H)return e.jsx(u,{to:"cards"})}return C===!0&&H?e.jsx(u,{to:"cards"}):o?e.jsx(u,{to:"dashboard"}):f?e.jsx(u,{to:"checking"}):L?e.jsx(u,{to:"treasury"}):H?e.jsx(u,{to:"cards"}):N?e.jsx(u,{to:"bills"}):i?e.jsx(u,{to:"reimbursements"}):e.jsx(u,{to:"dashboard"})},Ue=({tenantEmailDomain:o})=>e.jsx(u,{to:`/${o}/dashboard`}),Yt=Object.freeze(Object.defineProperty({__proto__:null,default:function({setTenantEmailDomain:o}){const f=qs(),N=Ys(),{tenantEmailDomain:i}=Js(),L=it().mode,{setLoading:O,clearAllLoading:C,clearLoading:H}=Qs(),D=y.getSignedInUserTenant(i)?.tenantId,T=y.getSignedInUser(),W=Es(T),z=Ws(),[V,we]=U.useState(!1),r=$((a=>ps(a))),{useFeatureGate:k}=Xs(),M=et(),K=st(),Fe=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,Ve=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:Le}=k(S.isChargeCardFeatureEnabled),{isFeatureEnabled:oe}=k(S.isDebitCardFeatureEnabled),A=$((a=>a.tenantState.fetchState)),p=$((a=>a.tenantState.activeTenantFetchState.fetchState)),h=p==="Completed"||A==="Completed"?xs(oe,r):void 0,Q=p==="Completed"||A==="Completed"?gs(r):void 0,re=p==="Completed"||A==="Completed"?Rs(r)&&!js(r):void 0,He=tt(r,Le,oe),{isCardsHidden:ke}=nt(r?.tenantId),Be=!He||!!ke,{isFeatureEnabled:Se}=k(S.isSettingsFeatureEnabled),{isFeatureEnabled:X}=k(S.isAiCfoFileUploadEnabled),{isFeatureEnabled:Ne}=k(S.isInvoicingFeatureEnabled??"is_invoicing_feature_enabled"),Me=Ne||rt==="DEV",Ze=r?.userRole!=null&&Is(r.userRole),G=$((a=>Ts(a)));if(i!=null){const a=y.getSignedInUserTenant(i);T!=null&&a!=null&&be(T,r,L)}const Z={tenantId:D,userId:T?.userId,sessionId:T?.zeniSessionId},ie=As(),E=at(),$e=ut(r.company==null),ze=r.company==null||E?.loggedInUserRoleMap!=null&&pe(E.loggedInUserRole),Ge=bs(E?.loggedInUserRoleMap),ee=Te("/:tenantEmailDomain/onboarding/*")!==null,qe=Te("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*"),se=qe?.params.selectedPeriod,Ye=$((a=>Z.tenantId!=null?fs(a,Z.tenantId):void 0));U.useEffect((()=>{O(F.TENANT_FETCHING),o(i)}),[i]),U.useEffect((()=>{if(se!=null&&D!=null){const a=se.split("-");if(a.length===2){const b=Ds(Number(a[0])),c=Number(a[1]),t=ys(`01-${b<10?`0${b}`:b}-${c}`,Ae.getLocalizedStrings().dateFormat.analytics.DDDashMMDashYYYY),d=vs();t.isAfter(d,"month")===!1?f(Cs(D,{month:b,year:c})):N(`/${i}/month_end_close_checks/review`)}}}),[se,i,D]),U.useEffect((()=>{V||(we(!0),O(F.TENANT_FETCHING))}),[V,Z,ie,T,f,y]),U.useLayoutEffect((()=>{!Os(ie,Z)&&y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,b,c,t){if(ge(b?.userId,b?.zeniSessionId,a.tenantId),c(zs(!0)),c(Re(a.tenantId)),a.tenantId!=null&&_.clearTenant(a.tenantId),a.tenantId!=null){const d=y.getSignedInUserTenantWithId(a.tenantId);t&&Ae.updateAppLocaleID(lt(t)),d?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(d?.tenantEmailDomain)}a.userId!=null?ne.identify(a.userId,{tenant_id:a.tenantId}):ne.resetUserIdentity()})(Z,T,f,Ye))}),[D]),U.useEffect((()=>{y.isSignedIn()&&(O(F.TENANT_FETCHING),(function(a,b,c,t,d,q,B){if(c==null&&t==null)return void console.warn("There is no current tenant selected!!");const Y=t!=null&&d?.zeniSessionId!=null,ms=c==null||c.tenantId!==t,_s=c!=null&&c.excludedResources==null,hs=c!=null&&c.externalConnections==null;if(Y&&ms){B(Re(t));const J=y.getSignedInUserTenantWithId(t);J?.tenantEmailDomain!=null&&y.saveActiveTenantDomainForUser(J?.tenantEmailDomain),ge(d?.userId,d?.zeniSessionId,t),_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),B(je(d.userId,t))),_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),B(Ie(d.userId,t)))}else Y&&_s&&_.shouldFetchExcludedResources(t)&&(_.markExcludedResourcesFetchStarted(t),B(je(d.userId,t))),Y&&hs&&_.shouldFetchConnections(t)&&(_.markConnectionsFetchStarted(t),B(Ie(d.userId,t)));if(Y){ne.identify(d.userId,{tenant_id:t});const J=t==null||t!=null&&(b==="Completed"||b==="Error");a==="Completed"||b!=="Not-Started"&&b!=="Error"||t==null||!_.shouldFetchActiveTenant(t)||(_.markActiveTenantFetchStarted(t),q(F.TENANT_FETCHING),B(Gs(d.userId,t,d.zeniSessionId))),J&&(a==="Not-Started"||a==="Error")&&_.shouldFetchAllTenants()&&(_.markAllTenantsFetchStarted(),B(xe(d.userId,d.zeniSessionId)))}})(A,p,r,D,T,O,f))}),[D,p]),U.useEffect((()=>{y.isSignedIn()&&A==="Completed"&&G.tenantsBaseInOrder.length>0&&(H(F.TENANT_FETCHING),y.saveSignedInUserTenants(Ps(G.tenantsBaseInOrder)),T!=null&&be(T,r,L,void 0,G.tenantsBaseInOrder))}),[G,A,r,T]),U.useEffect((()=>{p==="In-Progress"&&O(F.TENANT_FETCHING),p!=="Completed"&&p!=="Error"||(p==="Completed"&&D!=null?(C(),_.markActiveTenantFetchCompleted(D)):p==="Error"&&D!=null&&(_.markActiveTenantFetchFailed(D),H(F.TENANT_FETCHING),H(F.TENANT_SWITCHING))),A!=="Completed"&&A!=="Error"||(A==="Completed"?_.markAllTenantsFetchCompleted():A==="Error"&&_.markAllTenantsFetchFailed())}),[p,A,D,V]);const le=U.useRef(!1);U.useEffect((()=>{!le.current&&p==="Completed"&&V&&(le.current=!0,(function(a=ht,b=3e3){setTimeout((()=>{const c=t=>{if(t>=a.length)return;const d=a[t],q=_t[d];q!=null?q().then((()=>ae((()=>c(t+1))))).catch((()=>ae((()=>c(t+1))))):c(t+1)};ae((()=>c(0)))}),b)})())}),[p,V]);const P=r?.userRole!=null&&Us(r?.userRole),{isFeatureEnabled:Je}=k(S.isReferralFeatureEnabled),{isFeatureEnabled:We}=k(S.isAccrualEnabled),Ke=r?.userRole!=null&&r.userRole.includes("charge_card_user"),Qe=r?.userRole!=null&&r.userRole.includes("charge_card_admin"),w=r?.userRole!=null&&pe(r.userRole),ue=r?.company==null||r.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!P,de=!Be&&!P,Xe=ws(E?.loggedInUserRoleMap),es=r.externalConnections?.accounting[0]?.isValid,ss=r.externalConnections?.fetchState==="Completed",te=r.company?.companyOnboardingInfo.isOnboardingCompleted,ce=r?.company==null||r.company.featuresActivationInfo?.isReimbursementFeatureEnabled&&!P,me=ce&&Fs(E?.loggedInUserRoleMap),_e=Fe&&!P,ts=Ve&&!P,ns=ue&&Vs(E?.loggedInUserRoleMap),as=de&&Ls(E?.loggedInUserRoleMap),os=_e&&Hs(E?.loggedInUserRoleMap),rs=ks(E?.loggedInUserRoleMap),is=Bs(E?.loggedInUserRoleMap),ls=Ss(E?.loggedInUserRoleMap),us=Ns(E?.loggedInUserRoleMap),ds=Ms(E?.loggedInUserRoleMap),x=Zs(E?.loggedInUserRoleMap),g=$s(E?.loggedInUserRoleMap),he=ue&&x,Ee=ce&&g,R=_e&&ls,j=ts&&us,m=de&&ds,cs=r.excludedResources?.resources?.find((a=>a.resource==="/invites"))!=null||Ge===!0||Xe===!0||rs===!0||is===!0;return y.isSignedIn()?D==null?A==="Completed"?e.jsx(u,{to:"/",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}):(T!=null&&A!=="In-Progress"&&f(xe(T.userId,T.zeniSessionId)),null):p!=="In-Progress"&&p!=="Not-Started"||A==="Completed"?(te===!0||W&&!ee)&&ss&&es!==!0&&h===!1&&Q===!1&&re===!1?(o(void 0),e.jsx(u,{to:"/connection/auth",replace:!0})):!V||re!==!0||te!==!0||ee||W?!V||te!==!1||ee||W?V&&r?.userRole&&h!=null&&Q!=null&&i!=null&&Object.keys(E.loggedInUserRoleMap).length>0?e.jsx(Ks,{children:e.jsxs(n,{element:e.jsx(ot,{}),children:[e.jsx(n,{path:"/",element:e.jsx(kt,{isDashboardAccess:w,showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:h,isTenantCardsOnly:Q,showChargeCardRoute:m})}),e.jsx(n,{path:"dashboard/*",element:w?e.jsx(At,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reports/*",element:w?e.jsx(Et,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"people/*",element:cs||w?e.jsx(xt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"forecast/*",element:w?e.jsx(gt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"onboarding/*",element:e.jsx(Rt,{})}),e.jsx(n,{path:"transaction/*",element:w&&P===!1||Ke||Qe?e.jsx(Tt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"transactions/*",element:w&&P===!1?e.jsx(vt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"customer/*",element:w&&P===!1?e.jsx(ve,{entityType:"customer"}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,isTenantBankingOnly:h,showTreasuryRoute:j,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"vendor/*",element:w&&P===!1?e.jsx(ve,{entityType:"vendor"}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"tasks",element:e.jsx(Ht,{})}),e.jsx(n,{path:"tasks/*",element:e.jsx(Vt,{})}),e.jsx(n,{path:"address/*",element:ns||me||os||as?e.jsx(pt,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"checking/*",element:R?e.jsx(Dt,{}):e.jsx(I,{})}),e.jsx(n,{path:"treasury/*",element:j?e.jsx(yt,{}):e.jsx(I,{})}),e.jsx(n,{path:"performance",element:K===!0?e.jsx(Pt,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(n,{path:"month_end_close_checks/review/*",element:K===!0&&P===!1?e.jsx(Ut,{}):e.jsx(Ue,{tenantEmailDomain:i})}),e.jsx(n,{path:"expense-automation/actual-matching/:matchId",element:K===!0&&P===!1&&We===!0?e.jsx(wt,{}):e.jsx(I,{})}),e.jsx(n,{path:"notifications/*",element:e.jsx(Ot,{})}),e.jsx(n,{path:"vendors/*",element:ze?e.jsx(jt,{}):e.jsx(I,{})}),e.jsx(n,{path:"customers/*",element:$e?e.jsx(It,{}):e.jsx(I,{})}),e.jsx(n,{path:"bill/*",element:he?e.jsx(Ce,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"bills/*",element:he?e.jsx(Ce,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursement/*",element:Ee?e.jsx(Oe,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"reimbursements/*",element:Ee?e.jsx(Oe,{}):e.jsx(v,{showZeniAccountRoute:R,isUserHasBillPayAccess:x,isUserHasReimbursementAccess:g,showTreasuryRoute:j,isTenantBankingOnly:h,showChargeCardRoute:m,tenantEmailDomain:i})}),e.jsx(n,{path:"settings/*",element:Se?e.jsx(bt,{hasAdminLevelAccess:me}):e.jsx(I,{})}),e.jsx(n,{path:"invoicing/*",element:Me&&Ze?e.jsx(ft,{}):e.jsx(I,{})}),e.jsx(n,{path:"cards/ask",element:m&&M?e.jsx(Pe,{isFileUploadEnabled:X}):e.jsx(I,{})}),e.jsx(n,{path:"cards/ask/:session_id",element:m&&M?e.jsx(Pe,{isFileUploadEnabled:X}):e.jsx(I,{})}),e.jsx(n,{path:"cards/*",element:m?e.jsx(Ct,{}):e.jsx(I,{})}),e.jsx(n,{path:"rewards/*",element:Je?e.jsx(Ft,{}):e.jsx(I,{})}),e.jsx(n,{path:"/ai-cfo",element:M?e.jsx(u,{to:"explore"}):e.jsx(I,{})}),e.jsx(n,{path:"/ai-cfo/",element:M?e.jsx(u,{to:"explore"}):e.jsx(I,{})}),e.jsx(n,{path:"/ai-cfo/:session_id",element:M?e.jsx(Lt,{isFileUploadEnabled:X}):e.jsx(I,{})}),e.jsx(n,{path:"*",element:e.jsx(I,{})})]})}):null:(o(void 0),e.jsx(u,{to:`/${i}/onboarding`,replace:!0})):(o(void 0),e.jsx(u,{to:`/${i}/onboarding/thankyou`,replace:!0})):null:(console.warn("User logged out!!"),o(void 0),e.jsx(u,{to:"/signin/auth",replace:!0,state:{...z.state,message:"...",origin:z.pathname}}))}},Symbol.toStringTag,{value:"Module"}));export{v as F,Yt as S};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-DsfYQPDU.js";import{a as d}from"./sentry-BOcQ3kj3.js";import{h as $,g as H,u as U,i as F,j as C,l as W,n as J,o as k}from"./core-BLE-efAE.js";import{fJ as w,_S as je,Oo as ve,_p as we,_y as Ae,cb as Y,cX as _e,cY as De,bq as Ue,di as Re,GG as Te,_T as Me,PR as Be,Nf as Ne,N6 as de,N3 as Ve,GK as ue,N9 as pe,Nc as ge,Ni as Q,CO as ee,GJ as Oe,lz as Z,lC as me,_U as $e,mM as Fe,G$ as Le,WG as Ge,WH as Ze,lx as He,_V as We,lA as Ke,uZ as ze,WB as qe,WC as Je,v1 as Xe,h_ as Ye,Vy as q,hS as ae,hP as Qe,hX as en,Vz as nn,GY as tn,_W as an,_X as on,Nw as sn,m4 as rn,e1 as fe,e2 as he,_Y as ln,gG as cn,VP as dn,GX as oe,gL as se,gK as un,GW as pn,gJ as gn,gI as mn,_Z as fn,UZ as Ce,__ as hn,_$ as Cn,$0 as yn,$1 as bn,$2 as Sn,$3 as In,H2 as xn,$4 as En,GV as ie,GP as G,$5 as kn,$6 as Pn,$7 as re,$8 as jn,dW as vn,$9 as wn,$a as An,$b as _n,V9 as Dn,c3 as Un,ca as Rn,c9 as Tn,c4 as Mn,$c as Bn,c7 as Nn,c6 as Vn,c8 as On,c5 as $n}from"./zeni-epic-state-Cj-eqUB4.js";import{bW as Fn,z as v,V as L,a5 as ne,c6 as Ln,h as K,p as te,_ as V,f as ye,R as be,c7 as Gn,g as Zn,W as Se,c8 as Hn,ag as Wn,c9 as Kn,ca as zn,ao as qn,cb as Jn,j as Xn,c as Ie,cc as Yn}from"./index-DByp7gYR.js";import{n as B}from"./mui-DsLgO0pD.js";import{u as xe}from"./useTaskManagerAccess-g91qWg_Z.js";import{U as Qn}from"./AccountMappingScreen-CNps2c4g.js";import{t as et,A as nt}from"./AddressScreen-DTHectLm.js";import O from"./NotFoundScreen-62ZwPZD8.js";import{g as tt}from"./analyticsHelper-DpuSAcdJ.js";import{u as at,B as ot}from"./BusinessVerificationPageScreen-DfgDpNPJ.js";import{C as st}from"./CompanyPassportScreen-D9J5NscU.js";import{M as T}from"./MobileAppDrawer-QsBOZtGR.js";import{u as it,a as rt}from"./useEmailConnectResultRefresh-CmeR8OjB.js";import{q as le}from"./QBOConnectionScreen-BvJN0vdq.js";import{B as lt}from"./BillPayApprovalRoutes-BXjeKRQ0.js";import{R as ct}from"./ReimbursementApprovalRoutes-DJFklLxf.js";import"./recharts-BrF9RV-y.js";import"./analytics-DOSt68hW.js";import"./plaid-CsR4G1V6.js";import"./dnd-_7Bcanxg.js";import"./stripe-cKAAJElX.js";import"./lottie-CvlQ31Z0.js";import"./lexical-CRb0eiRh.js";import"./pdf-Nx2bnRAL.js";import"./utils-Dl4IzX4w.js";import"./accountMappingHelper-eL9XJ0hM.js";import"./routePaths-Bywswu4r.js";import"./InboxNotificationsProvider-DgU7-WH3.js";import"./useIsCustomersTabEnabled-DWpqS9JG.js";import"./empty-DawNxSIf.js";import"./pdf-lib-bba0IcK_.js";import"./index-CxmRqFuX.js";import"./url-HoGgtb9G.js";import"./index-B_crlpCt.js";import"./decodeURIComponentSafe-Bwl2ftU9.js";import"./useEnsureVendorListLoaded-CllPhnHH.js";import"./ReimbursementApprovalRuleDetailScreen-CdMCxq5v.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new e.Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="2d020b6c-b136-492f-87d0-4ba8df999563",e._sentryDebugIdIdentifier="sentry-dbid-2d020b6c-b136-492f-87d0-4ba8df999563")}catch{}})();const dt=B.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|