@zeniai/web-app-ui 5.1.85-dev → 5.1.86-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/AddressRoutes-CYnGGpGr.js +1 -0
- package/dist/assets/AddressScreen-Cgf_DSfy.js +9 -0
- package/dist/assets/{AiCfoScreen-D2GxwJyN.js → AiCfoScreen-DK7jWO5l.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-Csh9SPnU.js → BillPayApprovalRoutes-Bufqh5bf.js} +1 -1
- package/dist/assets/{BillPayRoutes-Dg9I-63-.js → BillPayRoutes-DQrVntHX.js} +12 -12
- package/dist/assets/{BusinessVerificationPageScreen-BLuK4dS7.js → BusinessVerificationPageScreen-BVO4LcOB.js} +2 -2
- package/dist/assets/{CardsAiCfoScreen-D8ZPE13M.js → CardsAiCfoScreen-BPq182YL.js} +1 -1
- package/dist/assets/ChargeCardRoutes--1Cz6d6F.js +71 -0
- package/dist/assets/CompanyPassportScreen-Cr6_STQF.js +1 -0
- package/dist/assets/{ConnectionAuthScreen-C8nHjroP.js → ConnectionAuthScreen-DPDyawJA.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-CwgXB2Ot.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-Dk5stUMd.js → CustomerOnboardingRoutes-DBUibBfl.js} +4 -4
- package/dist/assets/{DashboardRoutes-B2SXqHam.js → DashboardRoutes-CWiRUKmL.js} +3 -3
- package/dist/assets/{DefaultTenantHome-DDzJzPvG.js → DefaultTenantHome-Q8Gr6wzz.js} +1 -1
- package/dist/assets/DomesticWireDetailScreen-Bg4bD2vf.js +18 -0
- package/dist/assets/DrawerScreen-ESB0V3An.js +1 -0
- package/dist/assets/EntityDetailRoutes-BgIcnD30.js +1 -0
- package/dist/assets/{ExpenseAutomationRoutes-B0EQq9x4.js → ExpenseAutomationRoutes-DRdJk7UH.js} +3 -3
- package/dist/assets/FeaturePreviewScreen-CPre8DhJ.js +1 -0
- package/dist/assets/{HubSpotOAuthCallbackScreen-DiHy3hck.js → HubSpotOAuthCallbackScreen-D1vja8MF.js} +1 -1
- package/dist/assets/MagicLinkRoutes-50BdhE1X.js +72 -0
- package/dist/assets/MagicLinkSignInScreen-oln-_jh3.js +12 -0
- package/dist/assets/{MobileAppDrawer-ChAhLGZE.js → MobileAppDrawer-CNkPd-0r.js} +1 -1
- package/dist/assets/NotFoundScreen-C4hj38o6.js +1 -0
- package/dist/assets/NotificationRoutes-CDTyM5yC.js +1 -0
- package/dist/assets/{OAuthConsentScreen-_yz0BOYy.js → OAuthConsentScreen-Bfra_k87.js} +1 -1
- package/dist/assets/PandLWithForecastRoutes-CgJVRO_P.js +1 -0
- package/dist/assets/PeopleRoutes-DsSKCjjc.js +22 -0
- package/dist/assets/PerformanceRoutes-5mjMtnxs.js +1 -0
- package/dist/assets/{Preview-D29JeEmY.js → Preview-ng4_PqRv.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-CwZNkZEW.js → QBOConnectionScreen-B3-UhwG_.js} +1 -1
- package/dist/assets/ReferralListScreen-Dt6a-ZaL.js +5 -0
- package/dist/assets/{ReimbursementApprovalRoutes-DAVTSD8z.js → ReimbursementApprovalRoutes-DJ6r8--7.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CtUn349v.js → ReimbursementApprovalRuleDetailScreen-CGou3dCd.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-BYbEE0sN.js → ReimbursementRoutes-C1KqmlyM.js} +6 -6
- package/dist/assets/ReportsRoutes-BTVnfyaM.js +1 -0
- package/dist/assets/RewardsRoutes-DdOKhqcE.js +1 -0
- package/dist/assets/ScreenRoutes-CR7u1SOQ.js +2 -0
- package/dist/assets/SettingsRoutes-ZI-PRowa.js +57 -0
- package/dist/assets/{SetupPagesScreen-Drdx2Cz2.js → SetupPagesScreen-CnFtaoyZ.js} +5 -5
- package/dist/assets/{SignInScreen-HaZFyYNm.js → SignInScreen-BoQaZMzp.js} +1 -1
- package/dist/assets/SignOutScreen-BWN6fg9F.js +9 -0
- package/dist/assets/{TaskListScreen-B2sNWFUZ.js → TaskListScreen-wwlTbcpO.js} +2 -2
- package/dist/assets/TaskRoutes-BZfNRRg-.js +9 -0
- package/dist/assets/{TransactionDetailRoutes-BBXGE-Zw.js → TransactionDetailRoutes-75MHva3P.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-D7m7OZhn.js → TransactionDetailScreen-BdRaLDX3.js} +2 -2
- package/dist/assets/{TransactionListRoutes-C8nLf9Ob.js → TransactionListRoutes-BK2uV7qm.js} +1 -1
- package/dist/assets/{TreasuryRoutes-CAqMFzPt.js → TreasuryRoutes-JT_IY3Gx.js} +6 -6
- package/dist/assets/{VendorsRoutes-kgQCFQez.js → VendorsRoutes-BS6JrHkM.js} +19 -19
- package/dist/assets/{WiseConfirmationScreen-Dj8vTbGW.js → WiseConfirmationScreen-CrmCNnnU.js} +2 -2
- package/dist/assets/{ZeniAccountRoutes-B85icQ0n.js → ZeniAccountRoutes-BPiHmqg-.js} +7 -7
- package/dist/assets/ZeniAccountStatementScreen-DxgFXxRD.js +9 -0
- package/dist/assets/{accountMappingHelper-B3v4RMhl.js → accountMappingHelper-COLWfB1U.js} +1 -1
- package/dist/assets/{analytics-7PXXxPIN.js → analytics-dJ9Vu0DH.js} +1 -1
- package/dist/assets/{analyticsHelper-Ce6ZNBVM.js → analyticsHelper-B2nQzr20.js} +1 -1
- package/dist/assets/{core-BDPZcSG4.js → core-Ca6G0voE.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-BR3AOxh5.js → decodeURIComponentSafe-BMcEUj25.js} +1 -1
- package/dist/assets/{dnd-fU8QmJ8U.js → dnd-Be5WoH8E.js} +1 -1
- package/dist/assets/{empty-DridEUN5.js → empty-DHGdIlcJ.js} +1 -1
- package/dist/assets/{empty-CM59KsLF.js → empty-uy3M1msm.js} +1 -1
- package/dist/assets/{emptyVideoElement--ZfOaFPu.js → emptyVideoElement-IUbgWLFZ.js} +1 -1
- package/dist/assets/{epic-D7C6_Y7q.js → epic-DoVGgmyH.js} +1 -1
- package/dist/assets/getLocaleForTenant-DVEihZ-H.js +1 -0
- package/dist/assets/{index-BZG4Ai-c.js → index-BMVCuDFR.js} +1 -1
- package/dist/assets/{index-DA1h5kq3.js → index-Ck8HU4ZH.js} +1 -1
- package/dist/assets/{index-DNm9oOTV.js → index-D3FowIif.js} +1 -1
- package/dist/assets/{index-B1tuor_E.js → index-DD9OmSLj.js} +14116 -14020
- package/dist/assets/{index-CAEfbAkM.js → index-Dcmv7y8l.js} +1 -1
- package/dist/assets/{index-TPK5ayqQ.js → index-Dpm9OcRr.js} +1 -1
- package/dist/assets/{index-BEZZznbS.js → index-Vw1oLCxE.js} +2 -2
- package/dist/assets/{index-BAkEFBVP.js → index-sd36C9hC.js} +1 -1
- package/dist/assets/{lexical-_D-pPLdL.js → lexical-DTpvAJin.js} +1 -1
- package/dist/assets/{liveblocks-B2nLBm11.js → liveblocks-4PIBJMyE.js} +1 -1
- package/dist/assets/{lottie--jYlW6ya.js → lottie-B7am_Gp2.js} +1 -1
- package/dist/assets/{mui-HaM5aBuG.js → mui-BI3ZId9r.js} +1 -1
- package/dist/assets/{pathToGoBack-Bp5QCbKd.js → pathToGoBack-CrG50xVP.js} +1 -1
- package/dist/assets/{pdf-CbrAe2yy.js → pdf-DUHWpwzW.js} +3 -3
- package/dist/assets/{pdf-lib-CHfVanCJ.js → pdf-lib-DyNMbFeB.js} +1 -1
- package/dist/assets/{plaid-DuKDxXr2.js → plaid-BFzM5Kog.js} +1 -1
- package/dist/assets/{pusher-p1571_5u.js → pusher-BmnXBdoc.js} +1 -1
- package/dist/assets/{react-DZP7sDw7.js → react-BOWfROr3.js} +1 -1
- package/dist/assets/{react-Di2JdnAu.js → react-CZFZzs7c.js} +1 -1
- package/dist/assets/{react-BvU2rtwe.js → react-CffrEBOp.js} +1 -1
- package/dist/assets/{react-BzGU_BeP.js → react-DM-Vx6Nk.js} +1 -1
- package/dist/assets/{react-CXLD6oJa.js → react-DMQWnTjk.js} +1 -1
- package/dist/assets/{react-D7-m9gXP.js → react-Wm4oo8rw.js} +1 -1
- package/dist/assets/{recharts-srrgu-jp.js → recharts-D6NnjcYi.js} +1 -1
- package/dist/assets/{routePaths-DbVBNvPC.js → routePaths-BumbtdKN.js} +1 -1
- package/dist/assets/{sentry-CLlo3TXi.js → sentry-CXcgkCeA.js} +1 -1
- package/dist/assets/{url-DqIeqdCZ.js → url-DVO5HPAn.js} +1 -1
- package/dist/assets/{url-ky0ROLAQ.js → url-DsqsNUWn.js} +1 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-DQzT3CdB.js +1 -0
- package/dist/assets/useAskAiCfoHostNavButtonProps-CSLK93Wz.js +1 -0
- package/dist/assets/useCashManagementBanner-BNEI8i2V.js +1 -0
- package/dist/assets/useChargeCardPusherEvents-CtFgCR2P.js +1 -0
- package/dist/assets/{useDeviceId-CQ3pf2OT.js → useDeviceId-BbYF3u-l.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-7EeCPqR2.js → useEmailConnectResultRefresh-CMs316dl.js} +1 -1
- package/dist/assets/useInitialThreadRequest-B6-oXb8Z.js +1 -0
- package/dist/assets/{utils-BPOASmy-.js → utils-DFP_hVXq.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-DKz4VB48.js → withTransactionSidePanel-iSi7Lgwj.js} +3 -3
- package/dist/assets/{zeni-epic-state-pQFlpfOQ.js → zeni-epic-state-BIxjj87B.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +2 -2
- package/dist/assets/AddressRoutes-DpMeCgDh.js +0 -1
- package/dist/assets/AddressScreen-jEbIVhK3.js +0 -9
- package/dist/assets/ChargeCardRoutes-CyGButQm.js +0 -71
- package/dist/assets/CompanyPassportScreen--SPdIRlf.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-C6uz2GLr.js +0 -1
- package/dist/assets/DomesticWireDetailScreen-DDaUfwcf.js +0 -18
- package/dist/assets/DrawerScreen-DZ4DkgHO.js +0 -1
- package/dist/assets/EntityDetailRoutes-CFPPv2Q-.js +0 -1
- package/dist/assets/FeaturePreviewScreen-Dgm-EaRp.js +0 -1
- package/dist/assets/MagicLinkRoutes-CPrGkntv.js +0 -72
- package/dist/assets/MagicLinkSignInScreen-BHI5Ju3h.js +0 -12
- package/dist/assets/NotFoundScreen-By2F-w6l.js +0 -1
- package/dist/assets/NotificationRoutes-0mjOYLwF.js +0 -1
- package/dist/assets/PandLWithForecastRoutes-CSm9JBFf.js +0 -1
- package/dist/assets/PeopleRoutes-DF4Scn5d.js +0 -22
- package/dist/assets/PerformanceRoutes-C0h70RAc.js +0 -1
- package/dist/assets/ReferralListScreen-C3Yy7aIK.js +0 -5
- package/dist/assets/ReportsRoutes-Cb8uSh4z.js +0 -1
- package/dist/assets/RewardsRoutes-BqWi3Rha.js +0 -1
- package/dist/assets/ScreenRoutes-CFWhfVwu.js +0 -2
- package/dist/assets/SettingsRoutes-Dqo8Gg1_.js +0 -57
- package/dist/assets/SignOutScreen-DGQ597Ur.js +0 -9
- package/dist/assets/TaskRoutes-DqlemW4d.js +0 -9
- package/dist/assets/ZeniAccountStatementScreen-CPK7RprH.js +0 -9
- package/dist/assets/getLocaleForTenant-5gC9KZpR.js +0 -1
- package/dist/assets/useAiCfoDashboardSuggestedQuestionsChips-Dpypv2iO.js +0 -1
- package/dist/assets/useAskAiCfoHostNavButtonProps-CtdOXC4O.js +0 -1
- package/dist/assets/useCashManagementBanner-DTfbqox_.js +0 -1
- package/dist/assets/useChargeCardPusherEvents-BSAOVtAf.js +0 -1
- package/dist/assets/useInitialThreadRequest-DaoYHqyn.js +0 -1
package/dist/assets/{ExpenseAutomationRoutes-B0EQq9x4.js → ExpenseAutomationRoutes-DRdJk7UH.js}
RENAMED
|
@@ -1,11 +1,11 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-
|
|
1
|
+
import{j as h}from"./liveblocks-4PIBJMyE.js";import oa from"./NotFoundScreen-C4hj38o6.js";import{a as o,b as Nt}from"./sentry-CXcgkCeA.js";import{n as Ue,S as sa}from"./mui-BI3ZId9r.js";import{u as pe,h as Yt,g as Ke,j as x,n as ca,i as xt,o as ia,p as Ge}from"./core-Ca6G0voE.js";import{eX as Re,S$ as la,oj as Ee,fY as ra,s4 as da,oB as Kt,oW as Zt,T0 as Ht,p4 as ua,T1 as Qt,ou as ma,rC as pa,fJ as Ie,T2 as De,ub as Wt,Eu as Xt,T3 as en,T4 as ha,ra as Ze,Oh as Pt,Oj as ga,kA as Ca,Ok as Sa,kH as fa,c_ as Ia,vo as He,oH as tn,p9 as Fe,oz as de,T5 as Ea,N9 as Rt,N8 as we,T6 as Dt,kY as ka,T7 as Ta,T8 as ya,T9 as ba,Ta as va,oO as Aa,pc as xe,Tb as wa,Tc as xa,Td as Pa,pj as Ra,kL as Da,kC as Fa,Te as Ua,kK as Ft,Or as Ba,Tf as Oa,Tg as Va,r6 as _a,qK as za,pa as me,qJ as Je,Th as Ma,Ti as ja,Tj as La,mf as $a,bo as qa,ma as Ut,lY as Ga,Tk as Ja,fz as Bt,gx as Na,m7 as Ya,xh as Ka,Tl as Za,pK as Ha,pF as Qa,pJ as Wa,pu as Xa,Tm as eo,fM as nn,oZ as to,oK as no,fZ as Ot,pe as ao,Tn as oo,To as so,pb as an,Tp as co,Tq as io,Tr as lo,Ts as ro,Tt as Vt,ri as uo,qB as mo,N7 as po,Tu as ho,Tv as go,kJ as Co,Tw as So,Ja as fo,kI as Io,kx as Eo,fL as ko,q7 as on,qt as To,p8 as _t,pd as yo,bE as bo,m4 as vo,m1 as Ao,Tx as wo,pt as zt,qp as Mt,qn as xo,Ty as Po,qc as Ro,pU as Do,qq as Fo,Tz as Uo,TA as Bo,pY as Oo,TB as Vo,pP as _o,pX as zo,pV as Mo,qw as jo}from"./zeni-epic-state-BIxjj87B.js";import{C as sn,U as X,e as q,s as ae,_ as cn,a0 as ln,c$ as Lo,z as Be,d0 as $o,au as Pe,d1 as qo,aZ as jt,B as rn,d2 as Go,ar as Ne,a as Jo,a9 as No,d3 as Yo,a4 as Ko,d4 as Zo,Z as Ho,d5 as Qo,d6 as Wo,F as Xo,j as es,aS as ts,d7 as ns,d8 as as,be as os,E as ss,aV as cs}from"./index-DD9OmSLj.js";import{u as dn}from"./useAskAiCfoHostNavButtonProps-CSLK93Wz.js";import{f as Lt,a as is,b as ls,g as rs,C as ds}from"./TransactionDetailScreen-BdRaLDX3.js";import{w as us}from"./withTransactionSidePanel-iSi7Lgwj.js";import{h as ms,v as ps}from"./routePaths-BumbtdKN.js";import{g as Ye}from"./accountMappingHelper-COLWfB1U.js";import{D as hs}from"./DrawerScreen-ESB0V3An.js";import"./recharts-D6NnjcYi.js";import"./analytics-dJ9Vu0DH.js";import"./plaid-BFzM5Kog.js";import"./dnd-Be5WoH8E.js";import"./stripe-DMRn4zHo.js";import"./lottie-B7am_Gp2.js";import"./lexical-DTpvAJin.js";import"./pdf-DUHWpwzW.js";import"./utils-DFP_hVXq.js";import"./decodeURIComponentSafe-BMcEUj25.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="bcb3d7e4-76b7-417d-8c23-08e6dffd015c",t._sentryDebugIdIdentifier="sentry-dbid-bcb3d7e4-76b7-417d-8c23-08e6dffd015c")}catch{}})();const gs=()=>{const t=pe(),l=Yt(),B=Ke(),f=x(d=>Re(d)),{useFeatureGate:b}=sn(),{isFeatureEnabled:S}=b(X.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=b(X.aiAuditScorePercentage),I=x(d=>d.expenseAutomationViewState.selectedPeriodByTenantId),s=x(d=>la(d,f.tenantId)),{isAiCfoAccessEnabled:p,onAskAiCfoClick:u}=dn({mobileExploreReferrer:"Month-End Close Overview"}),k=o.useCallback((d,G,ee=!1)=>{t(Ee({tenantId:G,period:{month:d.month,year:d.year},refreshViewInBackground:ee}))},[]),v=o.useCallback(d=>{const G=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&q.trackMonthCloseAuditPage(d.month,d.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,G??null),t(ra(f.tenantId,d))},[f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),g=I[f.tenantId],m=o.useCallback(()=>{const d=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&q.trackMonthCloseAuditPage(g.month,g.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),k(g,f.tenantId,!0)},[k,g,f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),P=ae(B.state?.pathnameStackToGoBack,B.pathname),E=o.useCallback(()=>{if(s.monthEndCloseChecks!=null&&g!=null){const d=s.monthEndCloseChecks.monthEndCloseCheckList.find(G=>G.progress<100);if(d!=null)return void l(`./${d.id}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview"}});l(`./month_end_insights/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview"}})}},[s.monthEndCloseChecks,g]),{areTenantIdsInSync:T}=cn();return ln({isDataReady:s.fetchState==="Completed"}),o.useEffect(()=>{g!=null&&s.fetchState!=="In-Progress"&&s.fetchState!=="Completed"&&T&&k(g,f.tenantId)},[k,g,s.fetchState,f.tenantId,T]),o.useEffect(()=>{g!=null&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&T&&t(da(g))},[g,s.monthClosePerformanceTrendFetchStatus.fetchState,T]),o.useEffect(()=>{const d=setInterval(()=>{s.fetchState!=="In-Progress"&&s.fetchState==="Completed"&&m()},3e5);return()=>clearInterval(d)},[s.fetchState]),o.useEffect(()=>{if(s.fetchState==="Completed"&&s.monthEndCloseChecks?.auditSummary!=null){const d=B.state?.referrer;q.trackMonthCloseAuditPage(s.selectedPeriod.month,s.selectedPeriod.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null)}},[s.fetchState,s.selectedPeriod,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),h.jsx(Cs,{children:h.jsx(Lo,{monthEndCloseChecksView:s,isRealtimeInsightsFeatureEnabled:S,onMonthEndCheckClick:d=>{l(`./${d}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:v,handleReviewButtonClick:E,onBackClick:()=>{l("../../dashboard")},onReload:m,isAiCfoAccessEnabled:p,onAskAiCfoClick:u,aiAuditScorePercentageEnabled:r})})},Cs=Ue.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
5
5
|
flex: 1 1 auto;
|
|
6
6
|
flex-direction: column;
|
|
7
7
|
background-color: ${t=>t.theme.colors.grey4};
|
|
8
|
-
`,Ss=Nt.memo(({reconciliation:t,selectedDrawerAccountId:l,onClose:B,onFetchLinkTokenClick:f,onEstablishConnectionClick:b})=>{const S=pe(),r=Be.getSignedInUser(),I=x(e=>Re(e)),s=t.excludedAccountIDs,p=o.useMemo(()=>({userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:I?.tenantId??""}),[r?.userId,r?.zeniSessionId,I?.tenantId]),{accountReconciliationsByAccountID:u,monthYearPeriod:
|
|
8
|
+
`,Ss=Nt.memo(({reconciliation:t,selectedDrawerAccountId:l,onClose:B,onFetchLinkTokenClick:f,onEstablishConnectionClick:b})=>{const S=pe(),r=Be.getSignedInUser(),I=x(e=>Re(e)),s=t.excludedAccountIDs,p=o.useMemo(()=>({userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:I?.tenantId??""}),[r?.userId,r?.zeniSessionId,I?.tenantId]),{accountReconciliationsByAccountID:u,monthYearPeriod:k,statementUploadChosen:v}=t,g=u[l],m=g?.accountReconEntity.statementMetaData?.statementUploadId,P=(e,n)=>{S(pa(e,n.split(".")[0]))},E=e=>{m!=null&&S(ma({accountId:l,selectedPeriod:k,fileId:e,statementUploadId:m}))},T=()=>{S(Ht({statementUploadChosen:!1}))},d=e=>{S(ua({accountId:l,selectedPeriod:k,payload:e}))},G=e=>{S(Qt({accountId:l,selectedPeriod:k,localData:{accountSource:e}}))},ee=o.useCallback(()=>{S(Kt({accountId:l}))},[S,l]),z=o.useCallback(()=>{S(Zt({accountId:l}))},[S,l]),V=s.includes(l)?t.excludedAccountReconciliationByAccountID[l]:void 0;return g!=null?h.jsx($t,{children:h.jsx(qt,{children:h.jsx($o,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:g,monthYearPeriod:k,onDismissClick:B,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:f,onEstablishConnectionClick:b,onEditFileName:P,onDeleteFile:E,onSelectSourceType:G,filesEndPoint:Pe.fileMicroServiceBaseUrl,authParams:p,openFilePicker:v,onStatementUploadSuccess:d,onUploadWindowOpenedOnce:T,onExcludeFromReconciliation:ee})})}):V!=null?h.jsx($t,{children:h.jsx(qt,{children:h.jsx(qo,{excludedAccountReconciliation:V,includeAccountFetch:t.includeAccountFetchState,onIncludeIntoReconciliation:z})})}):null}),$t=Ue.div`
|
|
9
9
|
display: flex;
|
|
10
10
|
flex-direction: column;
|
|
11
11
|
height: 100%;
|
|
@@ -18,7 +18,7 @@ import{j as h}from"./liveblocks-B2nLBm11.js";import oa from"./NotFoundScreen-By2
|
|
|
18
18
|
min-width: 0;
|
|
19
19
|
overflow-x: hidden;
|
|
20
20
|
overflow-y: auto;
|
|
21
|
-
`;function fs({companyId:t,closeCustomerRequestDrawer:l,addCustomerRequest:B,resetCustomerRequest:f}){const b=Be.getSignedInUser();if(b==null)throw Error("Can't access Customer Request page without signing in...");const S=x(r=>ha(r,t,b));return o.useEffect(()=>{f()},[]),h.jsx(h.Fragment,{children:S.fetchState==="In-Progress"||S.companyMonthEndReportTemplatesData.fetchState==="In-Progress"?h.jsx(rn,{fetchState:"In-Progress"}):h.jsx(Go,{onCloseClick:l,addCustomerRequest:B,snippets:S.companyMonthEndReportTemplatesData,bulletPoints:S.zeniRequestsData??[]})})}const Is=t=>t.sections.generalExpense.vendors.length+t.sections.reimbursement.vendors.length,un="reconciliation-status-updated",mn="statement-status-updated",{common:{strings:{hyphen:ks,comma:Gt,space:Es}},dateFormat:pn}=Jo.getLocalizedStrings(),Jt=jo,Ts=ca(function(t,l){const{uncategorizedAccounts:B,vendorSearchAutoCompleteData:f,monthEndInsightsCustomerRequestData:b,monthEndInsightsPreviewMode:S,companyId:r,isMissingReceiptsBulkUploadEnabled:I,isTransactionActivityEnabled:s}=l,p=Be.getSignedInUser(),u=t.tenantState.currentTenantId,E={userId:p?.userId??"",sessionId:p?.zeniSessionId??"",tenantId:u??""},v=Ie(t),{selectedTransactionCategorizationTab:g}=v;return{expenseAutomationViewSelector:v,bulkUploadSelector:I===!0?v.missingReceipts.bulkUpload:void 0,vendorSearchAutoCompleteData:f,authParams:E,receiptUploadEndpoint:`${Pe.accountMicroServiceBaseUrl}`,transactionAttachmentsEndpoint:`${Ko}/transaction_attachments`,bulkUploadEndpoint:I===!0?`${Pe.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`:void 0,isDisabled:!1,currentTab:g,monthEndInsightsCustomerRequestData:b,monthEndInsightsPreviewMode:S,allThreadsSectionOpen:!1,enableMonthEndInsightsZeniGPTFeature:!1,loggedInUser:p,uncategorizedAccounts:B,companyId:r,isTransactionActivityEnabled:s}},function(t,l){const{themeState:B,isAccountingClassesEnabled:f,isCOTEnabled:b,isUncategorizedExpenseCategoryEnabled:S,isMissingReceiptsBulkUploadEnabled:r,location:I,vendorSearchAutoCompleteData:s,expenseAutomationViewSelector:p,currentTenant:u,uncategorizedAccounts:E,navigate:v,onClickCustomerRequest:g,handleEditClick:m,setActivityLogTransactionId:P}=l,{selectedPeriod:k,currentSelectedView:T,reconciliation:{selectedAccountId:d}}=p,{accountSettingsView:G}=p.jeSchedules,ee=tn(k),z=Fe(ee.start),V=Fe(ee.end);return{onZeniLogoClick:()=>{B.toggle()},onUploadReceiptAttachment:e=>{q.trackMissingReceiptAttached(k.month,k.year),t(mo(e))},onUploadTransactionReceipt:(e,n,c,i,y,C)=>{t(Vt(e,n,{fetchState:"In-Progress"}));const A=()=>t(Vt(e,n,{fetchState:"Error"}));Zo(`${Pe.accountMicroServiceBaseUrl}/1.0/transactions/${n}/attachments`,C,n,c,i,y).then(O=>{O!=null?t(uo(e,O)):A()}).catch(A)},onMissingReceiptsRowClick:(e,n)=>{if(l.openTransactionPanel)return void l.openTransactionPanel(e,n);const c=ae(I.state?.pathnameStackToGoBack,I.pathname);v(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",origin:"missing_receipts"}})},onUploadReceiptComplete:(e,n)=>{t(ro(e,n)),u!=null&&t(ke({tenantId:u.tenantId,period:n,refreshViewInBackground:!0}))},onUploadReceiptFetchStatus:(e,n,c,i)=>{t(lo(e,{fetchState:n,error:c})),c!=null&&t(Bt({messageSection:"missing_receipts_attachment",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"__message__",variableValue:i!=null?Es+ks+i+Gt:Gt}]}))},onUpdateJESchedulesUIState:e=>{t(io(e))},onUpdateMissingReceiptsUIState:e=>{t(co(e))},onFetchMissingReceiptsList:()=>{V!=null&&z!=null&&t(an({start:z,end:V},{amount:75,currencyCode:"USD",currencySymbol:"$"},!0,!1))},...r===!0?{onBulkUploadFiles:e=>{t(Mo(e))},onBulkUploadProgress:e=>{t(zo(e))},onBulkUploadSuccess:e=>{t(_o({batchId:e}))},onBulkUploadUploadedFileCount:e=>{t(Vo(e))},onConfirmBulkUploadMatch:(e,n,c,i,y)=>{t(Oo(e,n,c,i,y))},onBulkUploadConfirmMatchAcknowledged:()=>{t(Bo())},onSetBulkUploadResultsTab:e=>{t(Uo(e))},onSetBulkUploadCompletedSubTab:e=>{t(Fo(e))},onSetBulkUploadSortConfig:(e,n)=>{t(Mt({sortKey:e,sortOrder:n}))},onClearBulkUpload:()=>{t(Do())},onSearchTransactionsForManualMatch:(e,n)=>{t(Jt(e,n??void 0))},onLoadMoreManualSearch:()=>{const{manualSearch:e}=p.missingReceipts.bulkUpload;e.nextPageToken!=null&&e.searchQuery!==""&&t(Jt(e.searchQuery,e.nextPageToken))},onFetchCompletedTransactions:(e,n)=>{t(Ro(e,n))},onClearBulkUploadBatchDetailsForScopeChange:()=>{t(Po())},onFetchBulkUploadBatches:e=>{t(on(e))},onFetchMoreBatchDetails:()=>{t(xo())},onResetBulkUploadSort:()=>{t(Mt({sortKey:void 0,sortOrder:void 0}))}}:{},onClearMissingReceiptsTabNavigation:()=>{t(so())},onSearchTextChanged:e=>{const n=p.currentSelectedView,c=p.selectedTransactionCategorizationTab;n==="transaction_categorization"&&(t(Je({selectedTab:c,uiState:{searchString:e}})),V!=null&&z!=null&&t(me(c,{start:z,end:V},!0,!1,e,void 0,!1,!0)))},onFiltersChange:e=>{const n=p.selectedTransactionCategorizationTab;t(oo({filters:e,selectedTab:n}))},onRefresh:()=>{l.trackExpenseAutomationTabAnalytics(!0),t(ao(S))},onClose:()=>{T==="reconciliation"&&d!=null&&t(Ot({selectedAccountId:void 0})),v("../")},onBack:()=>{T==="reconciliation"&&d!=null&&t(Ot({selectedAccountId:void 0}))},onSaveReconciliation:e=>{t(no(e))},onSaveReconciliationReview:e=>{t(to(e))},onUpdateStep:e=>{const{selectedPeriod:n}=p,c=ae(I.state?.pathnameStackToGoBack,I.pathname);v(`../${e}/${n.month}-${n.year}`,{state:{pathnameStackToGoBack:c,referrer:p.currentSelectedView}}),t(nn(e))},handleLogOutClick:()=>{const e=ae(I.state?.pathnameStackToGoBack,I.pathname);v("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},onJeAccountSettingsChange:e=>{const{vendorsAccountSection:n}=e,{prepaidExpensesAccount:c,fixedAssetsAccount:i,accruedExpensesAccount:y}=n,C=Ye(G.prepaidExpensesAccountList,c.selectedOptions),A=Ye(G.fixedAssetsAccountList,i.selectedOptions),O=Ye(G.accruedExpensesAccountList,y.selectedOptions),R={selectedPrepaidExpensesAccountIds:C.map(D=>D.accountId),selectedFixedAssetsAccountIds:A.map(D=>D.accountId),selectedAccruedExpensesAccountIds:O.map(D=>D.accountId)};t(eo({data:R}))},onSaveJeAccountSettingsClick:()=>{t(Xa())},onJESchedulesFormDataChange(e,n){const{jeScheduleID:c,accumulatedDepreciationCategory:i,scheduleClass:y,scheduleExpenseCategory:C,vendor:A}=n,{allAccountList:O,allClassList:R,allDepreciationAccountList:D}=p.jeSchedules,j=s.entityAutoCompleteView.vendor.length>0?s.entityAutoCompleteView.vendor.find(N=>N.id===A?.selectedOption):void 0,oe={id:j?.zeniId??A?.selectedOption??"",name:j?.name??A?.defaultOptions.find(N=>N.value===A?.selectedOption)?.label??"",logo:j?.logo},se=C?.selectedOption!=null?O.find(N=>N.qboId===C.selectedOption):void 0,Oe=y?.selectedOption!=null?R.find(N=>N.classId===y.selectedOption):void 0,Ve=i?.selectedOption!=null?D.find(N=>N.qboId===i.selectedOption):void 0;t(Wa({scheduledJournalEntryID:e,localData:{jeScheduleID:c,scheduledJournalEntryID:e,updatedCategoryId:se?.accountId,updatedClassId:Oe?.classId,updatedAccumulatedDepreciationCategoryID:Ve?.accountId,updatedVendor:{id:oe.id,name:oe.name}}}))},ignoreRecommendedJeSchedule(e,n){t(Qa(e,n))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(e,n)=>{e.trim().length>=2?t(Rt({searchString:e,entityType:n,searchOrigin:"common"})):e.trim().length===0&&t(we("common"))},onCancelAutoComplete:()=>{t(we("common"))}},onPostJESchedule(e,n){t(Ha({scheduledJournalEntryID:e,jeScheduleTransactionKey:n}))},clearJeScheduleLocalData(){t(Za())},handleJeScheduleClick:(e,n,c)=>{t(Ka({selectedJEScheduleKey:n}));const i=ae(I.state?.pathnameStackToGoBack,I.pathname);v(`../../vendors/schedules/${c}/details/${e}`,{state:{pathnameStackToGoBack:i,message:"expenseAutomation",origin:"je_schedules"}})},improveMonthEndInsightsUsingZeniGPTClick:e=>{u!=null&&t(Ya(e,u.companyId,u.tenantId))},onClickCustomerRequest:g,setActivityLogTransactionId:P,onCloseAllThreadsSection:()=>{},onCloseFileAttachmentSnackBar:()=>{t(Na())},onOpenFileAttachmentSnackBar:()=>{t(Bt({messageSection:"cockpit_month_end_email_attachment_upload",messageText:"failed",type:"error",showStatusIcon:!0}))},onRemoveFileAttachment:e=>{t(Ja(e))},onUpdateFileAttachment:e=>{t(Ga({files:e}))},previewMonthEndReport:(e,n,c,i)=>{u!=null&&t(Ut(e,u.companyId,n,!0,c,i,u.tenantId))},saveMonthEndReport:(e,n,c,i)=>{u!=null&&t(Ut(e,u.companyId,n,!1,c,i,u.tenantId))},onEditMonthEndInsightsClick:m,sendMonthEndReport:e=>{const n=I.state?.referrer,{selectedPeriod:c,auditSummary:i}=p;u!=null&&i?.auditScorePercentage!=null&&(t($a(u.companyId,e,u.tenantId)),q.trackInsightsEmailPage(c.month,c.year,!1,"draft",i.auditScorePercentage,qa().format(pn.analytics.MMMDDCommaYYYYformat),n??null))},onTransactionCategorizationRowClick:(e,n)=>{if(l.openTransactionPanel)return void l.openTransactionPanel(e,n);const c=ae(I.state?.pathnameStackToGoBack,I.pathname);v(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",origin:"transaction_categorization"}})},setLocalDataForCategoryAndClass:(e,n,c,i,y,C,A,O,R,D,j,oe,se)=>{t(La(e,n,c,i,E,y,C,A,O,R,D,j,oe,se))},onCancelAutoComplete:()=>{t(we("common"))},updateExpenseAutomationReconListScrollPosition:e=>{t(Dt({scrollPosition:e}))},onUpdateTab:e=>{l.closeSidePanel?.(),V!=null&&z!=null&&(t(me(e,{start:z,end:V},!1,!1)),t(ja(e)))},onUpdateTransactionCategorizationCompletedSubTab:e=>{l.closeSidePanel?.(),V!=null&&z!=null&&(t(Ma(e)),t(me("autoCategorized",{start:z,end:V},!1,!1)))},onUpdateTransactionCategorizationUIState:(e,n)=>{t(Je({selectedTab:e,uiState:n})),V!=null&&z!=null&&t(me(e,{start:z,end:V},!1,!1,n.searchString,null,!0))},onUpdateScrollYOffSetTransactionCategorizationUIState:(e,n)=>{t(Je({selectedTab:e,uiState:n}))},onFetchTransactionCategorizationList:(e,n,c,i,y,C,A)=>{V!=null&&z!=null&&t(me(e,{start:z,end:V},!0,c,n,i,y,C,A))},resetTransactionCategorizationLocalData:(e,n,c,i,y,C,A,O)=>{t(za(e,n,c,i,O??null,y,C,!1,A))},updateSelectedVendorForTransaction:(e,n,c,i,y)=>{t(Ft({selectedTab:e,transactionId:n,lineId:c,selectedTransaction:i,uncategorizedAccounts:E,updatedVendor:y,isAccountingClassesEnabled:f}))},onSaveUpdateTransactionCategorization:(e,n,c)=>{const i=I.state?.referrer;e==="autoCategorized"?q.trackTransactionsAutoCategorisedPage(k.month,k.year,p.transactionView.totalCountByTab.autoCategorized,n.length,!1,i??null):q.trackTransactionsReviewPage(k.month,k.year,p.transactionView.totalCountByTab.review,n.length,!1,i??null),t(_a(e,n,c,S))},onUpdateSelectedCheckboxTransactionIds:(e,n)=>{t(Va({selectedTab:e,transactionIds:n}))},onFetchRecommendationsForEntityCategorizationWithCustomer:(e,n,c,i,y,C,A)=>{const{transactionId:O,transaction:R,lineIds:D}=n;C!=null&&t(Ba({transactionId:O,customerUpdates:C})),t(Oa({selectedTab:i,transactionId:O.id,lineId:D[0],selectedTransaction:R,uncategorizedAccounts:E,updatedCustomer:C,selectedEntity:y,isAccountingClassesEnabled:f,isUncategorizedExpenseCategoryEnabled:A})),y!=null&&t(He({entity:y,amount:e,transactionDetails:n,flowType:"categorization",selectedTab:i,isFetchCOT:b,isUncategorizedExpenseCategoryEnabled:A}))},onFetchRecommendationsForEntityCategorization:(e,n,c,i,y,C,A)=>{const{transactionId:O,transaction:R,lineIds:D}=n;C!=null&&(t(Da({transactionId:O,vendorUpdates:{name:C.name,id:C.id?C.id:void 0}})),t(Fa({vendorId:C.id?C.id:void 0,localData:{vendorName:C.name,vendorId:C.id?C.id:void 0}}))),C?.id?(t(Ft({selectedTab:i,transactionId:O.id,lineId:D[0],selectedTransaction:R,uncategorizedAccounts:E,updatedVendor:C,selectedEntity:y,isAccountingClassesEnabled:f,isUncategorizedExpenseCategoryEnabled:A})),y!=null&&t(He({entity:y,amount:e,transactionDetails:n,flowType:"categorization",selectedTab:i,isFetchCOT:b,isUncategorizedExpenseCategoryEnabled:A}))):t(Ua({selectedTab:i,transactionId:O.id,lineId:D[0]}))},fetchFluxViewOnScroll:(e,n)=>{t(xe(e,!0,!1,n,!1,!0))},onFetchFluxViewList:()=>{t(xe(k,!0,!1,null,!1,!1))},markAsReview:(e,n,c,i)=>{q.trackFluxAnalysisReviewed(c.month,c.year,i??!1,e),t(Ra(n,e,c,i??!1))},onUpdateFluxAnalysisUIState:e=>{t(Pa(e))},updateOperatingExpensesIdsForReview:e=>{t(xa({operatingExpenseIds:e,selectedPeriod:k}))},redirectToVendorDetailPage:e=>{if(l.tenantEmailDomain!=null){const n=ps(e.id,e.qboId,l.tenantEmailDomain),c=ae(l.location.state?.pathnameStackToGoBack,l.location.pathname);l.navigate(n,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",referrer:"Vendor List",origin:"flux_analysis"}})}},updateSectionIdsForReview:e=>{t(wa({sectionId:e,selectedPeriod:k}))},onFetchReimbursementView:(e,n,c)=>{t(xe(e,!0,!1,n,!0,c))},onReviewClicked:e=>{t(de(k,e))},setOpenDrawerClicked:e=>{t(De({selectedDrawerAccountId:e}))},onFetchLinkTokenClick:(e,n)=>{t(Wt("expense_automation_reconcile",e,n))},onEstablishConnectionClick:(e,n)=>{const c=u?.companyId;c!=null&&(t(Xt(e,c,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",n)),t(en({accountId:n,connectionInProgress:!0})))},onAddStatementClick:e=>{t(De({selectedDrawerAccountId:e})),t(Qt({accountId:e,selectedPeriod:k,localData:{accountSource:"bank_statement"}})),t(Ht({statementUploadChosen:!0}))},onReloadReconciliationListPage:()=>{t(de(k,void 0,!0,!1))},onUpdateReconcileTabLocalData:e=>{t(Aa({selectedTransactionIds:e}))},onReconTabColumnSortConfigChanged:(e,n)=>{t(va({sortKey:e,sortOrder:n}))},onReconReviewTabColumnSortConfigChanged:(e,n)=>{t(ba({sortKey:e,sortOrder:n}))},onReconTabUpdate:e=>{l.closeSidePanel?.(),t(ya({selectedTab:e}))},updateReconReviewTabLocalData:(e,n,c)=>{const i=e.vendor?.id;c&&i!=null&&t(Ea(i)),t(Ta({data:e,transactionId:n}))},onReconMatchedTransactionClick:e=>{if(l.openTransactionPanel)return void l.openTransactionPanel(e,Ze("bill"));const n=ae(I.state?.pathnameStackToGoBack,I.pathname);v(`../../transaction/bill/${e}`,{state:{pathnameStackToGoBack:n,message:"expenseAutomation",origin:"reconciliation"}})},onReloadPage:()=>{window.location.reload()},onBackClick:()=>{v(-1)},onReconListPageScroll:e=>{t(Dt({scrollPosition:e}))},onVendorAutoCompleteInputChange:e=>{e.trim().length>=2?t(Rt({searchString:e,searchOrigin:"common"})):e.trim().length===0&&t(we("common"))},onReconNodeCollapseToggled:(e,n)=>{t(ka({nodeId:e,collapsed:n}))},updateSectionCollapseStatus:()=>{},onExcludeAccountFromReconciliation:e=>{t(Kt({accountId:e}))},onIncludeAccountIntoReconciliation:e=>{t(Zt({accountId:e}))},onReconciliationPusherEventReceived:e=>{e!==un&&e!==mn||T!=="reconciliation"||t(de(k,d,!0,!0))}}},(t,l,B)=>{const{isMissingReceiptsBulkUploadEnabled:f,...b}=B;return function(S,r,I){return{...S,...r,...I,onUploadTransactionReceipt:(s,p,u,E,v)=>{r.onUploadTransactionReceipt(s,p,u,E,v,S.authParams)}}}(t,l,b)})(No(Yo)),ys=us(function(t){const l=t.displayName??t.name??"Component",B=Nt.memo(t),f=b=>{const S=pe(),r=function(){const P=pe(),k=x(T=>Ie(T).reconciliation.selectedDrawerAccountId);return{isOpen:k!=null,selectedAccountId:k,openPanel:o.useCallback(T=>{P(De({selectedDrawerAccountId:T}))},[P]),closePanel:o.useCallback(()=>{P(De({selectedDrawerAccountId:void 0}))},[P])}}(),I=x(P=>Ie(P).reconciliation),s=x(P=>Re(P)),p=o.useCallback((P,k)=>{S(Wt("expense_automation_reconcile",P,k))},[S]),u=o.useCallback((P,k)=>{const T=s?.companyId;T!=null&&(S(Xt(P,T,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",k)),S(en({accountId:k,connectionInProgress:!0})))},[S,s?.companyId]),E=o.useMemo(()=>{if(r.isOpen&&r.selectedAccountId!=null)return h.jsx(Ss,{reconciliation:I,selectedDrawerAccountId:r.selectedAccountId,onClose:r.closePanel,onFetchLinkTokenClick:p,onEstablishConnectionClick:u})},[r.isOpen,r.selectedAccountId,r.closePanel,I,p,u]),v=o.useMemo(()=>({reconPanelContent:E,reconSidePanelIsOpen:r.isOpen,closeReconSidePanel:r.closePanel}),[E,r.isOpen,r.closePanel]),g=o.useContext(jt),m=o.useMemo(()=>r.isOpen?{closePanel:r.closePanel,selectedItemId:r.selectedAccountId}:g,[r.isOpen,r.closePanel,r.selectedAccountId,g]);return h.jsx(jt.Provider,{value:m,children:h.jsx(B,{...b,...v})})};return f.displayName=`withReconSidePanel(${l})`,f}(({closeSidePanel:t,openTransactionPanel:l,panelContent:B,sidePanelIsFullView:f,sidePanelIsOpen:b,reconPanelContent:S,reconSidePanelIsOpen:r,closeReconSidePanel:I})=>{const{isAiCfoOpen:s,setIsAiCfoOpen:p}=Ho(),u=Qo(),{isOpen:E}=Wo(),v=Yt(),g=Ke(),m=pe(),{isAiCfoAccessEnabled:P,onAskAiCfoClick:k}=dn({mobileExploreReferrer:"Transaction categorization"}),T=o.useCallback(()=>{b===!0&&f!==!0&&t?.()},[t,b,f]),{areTenantIdsInSync:d}=cn(),G=(()=>{const a=x(J=>Ie(J)),U=Ke(),{currentSelectedViewFetchState:L,currentSelectedView:$,selectedPeriod:w}=a,Q=Ne($),Y=Ne(L.fetchState),H=o.useCallback(J=>{const W=U.state?.referrer;$==="transaction_categorization"&&(a.selectedTransactionCategorizationTab==="review"?q.trackTransactionsReviewPage(w.month,w.year,a.transactionView.totalCountByTab.review,0,J,W??null):q.trackTransactionsAutoCategorisedPage(w.month,w.year,a.transactionView.totalCountByTab.autoCategorized,0,J,W??null)),$==="missing_receipts"&&q.trackMissingReceiptsPage(w.month,w.year,J,a.missingReceipts.transactions.length,W??null),$==="je_schedules"&&q.trackMonthCloseScheduleListPage(w.month,w.year,J,a.jeSchedules.draftSchedules.length,a.jeSchedules.resolveSchedules.length,W??null),$==="flux_analysis"&&q.trackFluxAnalysisPage(w.month,w.year,J,Is(a.fluxAnalysis),W??null),$==="month_end_insights"&&a.auditSummary?.auditScorePercentage!=null&&q.trackInsightsEmailPage(w.month,w.year,J,"draft",a.auditSummary.auditScorePercentage,null,W??null)},[w,a]);return o.useEffect(()=>{Y===L.fetchState&&$===Q||L.fetchState!=="Completed"||H(!1)},[$,L.fetchState,Q]),H})(),ee=Xo(),[z,V]=o.useState(!1),e=x(a=>Pt(a)),n=x(a=>Re(a)),[c,i]=o.useState(!1),[y,C]=o.useState(!1),[A,O]=o.useState([]),[R,D]=o.useState(null),j=o.useCallback(()=>{D(null)},[]),oe=R?.contentType==="activity"?R.detail.transactionId:void 0,se=o.useCallback(a=>{a!=null?(s&&p(!1),u(),T(),D({contentType:"activity",detail:{transactionId:a}})):D(U=>U?.contentType==="activity"?null:U)},[T,s,u,p]),Oe=o.useCallback(a=>{s&&p(!1),u(),T(),D({contentType:"transfer",detail:a})},[T,s,u,p]),Ve=o.useCallback(()=>{u(),j(),T(),k()},[T,j,k,u]),N=o.useRef(s);o.useEffect(()=>{s===!0&&N.current===!1&&(u(),j(),T()),N.current=s},[T,j,s,u]);const Qe=o.useRef(E);o.useEffect(()=>{E===!0&&Qe.current===!1&&(s&&p(!1),j(),b===!0&&f!==!0&&t?.()),Qe.current=E},[j,t,E,s,p,f,b]);const Ee=b===!0&&f!==!0,We=o.useRef(Ee);o.useEffect(()=>{Ee&&!We.current&&(s&&p(!1),u(),j()),We.current=Ee},[j,s,Ee,u,p]);const[Xe,hn]=o.useState(!1),et=o.useRef(!1),{selectedTab:tt}=xt(),{tenantEmailDomain:gn}=xt(),[_e,nt]=o.useState(g.state?.message==="comingFromTransactionDetail"),at=g.state?.message==="comingFromOverview",Cn=es(),ze=Be.getSignedInUser(),{useDynamicConfig:Sn,useFeatureGate:ce}=sn(),{configValue:fn}=Sn(ts.enableUncategorizedExpenseCategory),te=fn?.uncategorized_expense_category_enabled===!0,{isFeatureEnabled:ot}=ce(X.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:he}=ce(X.isMissingReceiptsBulkUploadEnabled),{isFeatureEnabled:Me}=ce(X.isTransactionActivityEnabled),{isFeatureEnabled:st}=ce(X.isCreateTransferEntryFromExpenseEnabled),{isFeatureEnabled:In}=ce(X.isExpenseAutomationCommentingEnabled),{isFeatureEnabled:kn}=ce(X.isProjectsTransactionsEnabled),{isFeatureEnabled:En}=ce(X.isJEScheduleCOTEnabled),Tn=o.useCallback(a=>{const U=Ze(a.view==="reconciliation"?"bill":"expense");l?.(a.entityId,U)},[l]),yn=x(a=>po(a,"common")),M=x(a=>Ie(a)),{categoryOptions:bn,paymentAccountNames:vn}=x(a=>ho(a.accountState)),An=x(a=>go(a.classState)),{monthEndCloseChecksView:Z,currentSelectedView:F,selectedPeriod:_,selectedTransactionCategorizationTab:je,currentSelectedViewBackgroundRefreshFetchState:wn,currentSelectedViewFetchState:ie,jeSchedules:Le,reconciliation:xn}=M;is(F==="transaction_categorization");const Pn=M.transactionView.saveStatus.fetchState,ct=M.transactionView.transactions,it=o.useRef(ct);it.current=ct;const lt=x(a=>a.expenseAutomationTransactionsViewState?.transactionCategorizationView),rt=x(a=>a.expenseAutomationTransactionsViewState?.selectedTransactionCategorizationTab),dt=o.useRef(lt);dt.current=lt;const ut=o.useRef(rt);ut.current=rt;const ne=ls(Pn,()=>{const a=[],U=ut.current,L=dt.current,$=L!=null&&U!=null?L[U]:void 0;if($?.transactionReviewLocalDataById!=null)for(const Q of Object.values($.transactionReviewLocalDataById)){const Y=Q?.transactionReviewLocalData?.lineItemById;if(Y!=null)for(const H of Object.values(Y)){const J=H?.account;J?.accountId!=null&&a.push(J.accountId)}}const w=it.current;for(const Q of w)for(const Y of Q.lines??[])"account"in Y&&Y.account?.accountId!=null&&a.push(Y.account.accountId);return a});o.useEffect(()=>{F==="transaction_categorization"&&b!==!0||se(void 0)},[F,se,b]);const Rn=M.transactionView.selectedTransactionCategorizationCompletedSubTab,Te=`${je}|${Rn}`,ye=o.useRef(null);o.useEffect(()=>{ye.current!==null?ye.current!==Te&&(ye.current=Te,F==="transaction_categorization"&&j()):ye.current=Te},[j,F,Te]);const Dn=x(a=>oe==null?void 0:Co(a.transactionState,oe)),le=Dn?.qboId,mt=x(a=>le==null?void 0:So(a,le));o.useEffect(()=>{le!=null&&m(fo(le))},[m,le]);const{createTransferEntryStatus:pt,creditCardTransferAccountsList:ht,transferAccounts:gt}=M.transactionView,Ct=o.useCallback(a=>rs(m,a),[m]),St=o.useMemo(()=>F!=="transaction_categorization"||R==null?null:R.contentType==="activity"?Me===!0?h.jsx(ns,{activityLogView:mt,qboId:le,onClose:()=>D(null),selectedTransactionId:R.detail.transactionId,isQuickViewCardStyle:!0},String(R.detail.transactionId)):null:R.contentType==="transfer"?h.jsx(as,{createTransferEntryStatus:pt,transaction:R.detail,transferAccounts:R.detail.transactionType==="credit_card_payment"?ht:gt,onClose:()=>D(null),onCreateTransfer:Ct,isQuickViewCardStyle:!0},String(R.detail.transactionId)):null,[F,R,Me,mt,le,pt,ht,gt,Ct]),Fn=St!=null,{selectedAccountId:ge}=xn,ft=Ne(Le.accountSettingsView.saveState.fetchState),Un=x(a=>Io(a.accountState,a.accountListState,"accountList")),Bn=x(a=>ko(a)),Ce=tt!=null?Eo(tt):F,On=x(a=>a.entityAutoCompleteState.autoCompleteText.common);if(ln({isDataReady:ie.fetchState==="Completed"}),ze==null)throw Error("Can't access expense automation screen without signing in...");const It=tn(_),Se=Fe(It.start),fe=Fe(It.end);if(Se==null||fe==null)throw Error(`Invalid start - ${Se} and end - ${fe} period from given ${_}`);const Vn=o.useCallback(()=>{i(!1)},[]),_n=o.useCallback(()=>{C(!0)},[]),zn=o.useCallback(a=>{O(a),C(!1)},[]),Mn=o.useCallback(()=>{O([])},[]),be=M.missingReceipts.bulkUpload.phase,kt=M.missingReceipts.bulkUpload.currentBatchId;o.useEffect(()=>{he===!0&&F==="missing_receipts"&&be==="matching"&&kt!=null&&m(on({cacheOverride:!0}))},[he,F,be,kt,m]);const Et=ze?.userId,jn=_.month,Ln=_.year,Tt=n?.tenantId;o.useEffect(()=>{F==="missing_receipts"&&he!==!1&&be==="idle"&&Et!=null&&Tt!=null&&m(To())},[F,he,be,Et,Tt,jn,Ln,m]),o.useEffect(()=>{e.newVendorState?.vendorDetailLocalData?.vendorName!=null?V(!0):V(!1)},[e.newVendorState?.vendorDetailLocalData?.vendorName]),o.useEffect(()=>{Ce!=null&&F!==Ce&&m(nn(Ce))},[Ce]),o.useEffect(()=>{Xe!==!1||ie.fetchState!=="Completed"&&ie.fetchState!=="Error"||!d||(hn(!0),m(_t(!1,!1,te)))},[Xe,ie,d,te]),o.useEffect(()=>{!at&&d&&(m(_t(!1,!1,te)),m(de(_,ge,!1,!1)))},[_.month,_.year,d,te]);const yt=o.useCallback((a=!1,U=!1)=>{const L={start:Se,end:fe};switch(F){case"transaction_categorization":m(me(je,L,a,!_e,void 0,void 0,U,void 0,te)),nt(!1);break;case"flux_analysis":m(xe(_,a,U,null));break;case"month_end_insights":if(U===!1){const $=new Date(_.year,_.month,0),w=bo($.toDateString()).format(pn.analytics.YYYYDashMMDashDDFormat);m(vo(!0,n.companyId,n.tenantId,w)),m(Ao(n.companyId,n.tenantId))}break;case"je_schedules":m(yo(L,U));break;case"missing_receipts":m(an(L,{amount:75,currencyCode:"USD",currencySymbol:"$"},a,U));break;default:m(de(_,ge,a,U))}},[F,Se,fe,n.companyId,n.tenantId,je,_,ge,_e,nt,te]);o.useEffect(()=>{F===Ce&&ie.fetchState==="Not-Started"&&d&&yt(!0)},[ie,Se,fe,n.companyId,n.tenantId,d]),o.useEffect(()=>{at||_e||et.current||wn.fetchState==="In-Progress"||ie.fetchState!=="Completed"||(et.current=!0,yt(!0,!0))},[]),o.useEffect(()=>{Z.fetchState!=="In-Progress"&&Z.fetchState!=="Completed"&&m(ke({tenantId:n.tenantId,period:_,refreshViewInBackground:!1}))},[Z.fetchState,n.tenantId]),o.useEffect(()=>{M.monthEndInsights?.previewMonthEndReportStatus?.fetchState==="Completed"?i(!0):i(!1)},[M.monthEndInsights?.previewMonthEndReportStatus?.fetchState]),o.useEffect(()=>{M.monthEndInsights?.sendMonthEndReportStatus?.fetchState==="Completed"&&d&&(m(ke({tenantId:n.tenantId,period:_,refreshViewInBackground:!0})),m(wo({companyId:n.companyId})),v("../"))},[M.monthEndInsights?.sendMonthEndReportStatus?.fetchState,n.tenantId,_,n.companyId,d]),o.useEffect(()=>{const a=setInterval(()=>{Z.fetchState!=="In-Progress"&&Z.fetchState==="Completed"&&m(ke({tenantId:n.tenantId,period:_,refreshViewInBackground:!0}))},3e5);return()=>clearInterval(a)},[Z.fetchState,n.tenantId,_,m]),o.useEffect(()=>{const a=setInterval(()=>{F==="reconciliation"&&ge==null&&M.reconciliation.fetchStatus.fetchState==="Completed"&&M.reconciliation.refreshStatus.fetchState!=="In-Progress"&&m(de(_,void 0,!0,!0))},3e5);return()=>clearInterval(a)},[F,m,M.reconciliation.fetchStatus.fetchState,M.reconciliation.refreshStatus.fetchState,de,ge,_]);const $n=Lt();o.useEffect(()=>{const a=(Z.monthEndCloseChecks?.monthEndCloseCheckList.find(U=>U.id==="month_end_insights")?.isDisabled??!1)&&!ot;F!=="month_end_insights"||!a&&Z.monthEndCloseChecks?.reportEmailSentDate==null||v("../")},[F,Z.monthEndCloseChecks]);const qn=r===!0?S:B,Gn=r===!0||b===!0,Jn=r===!0?I:t;o.useEffect(()=>{ft==="In-Progress"&&Le.accountSettingsView.saveState.fetchState==="Completed"&&m(zt())},[ft,Le.accountSettingsView.saveState.fetchState,zt]);const{transactionId:bt,onSaveVendor:Nn,onSaveSuccess:Yn,onCancel:Kn,vendorViewDetails:Zn}=(({expenseAutomationViewSelector:a,closeDrawerHandler:U,currentSelectedView:L,isUncategorizedExpenseCategoryEnabled:$})=>{const w=pe();let Q,Y,H;const J=Lt(),W=a.transactionView;let vt=()=>{};const{transactions:Qn,selectedTransactionId:ue,selectedTransactionLineId:ve,transactionLocalData:Wn}=W;if(L==="transaction_categorization"){const $e=Wn.find(re=>re.transactionId===ue),K=Qn.find(re=>re.id===ue),At=ve!=null?$e?.transactionReviewLocalData?.lineItemById[ve]:void 0,wt=At?.account;Y=At?.class?.classId,Q=["Uncategorized Income","Uncategorized Expense"].includes(wt?.accountName??"")?void 0:wt?.accountId;const ea=ms(ue,K?.typeOfTransaction);K!=null&&ea&&(H={id:ue,type:Ze(K.typeOfTransaction)}),vt=()=>{if(ue!=null&&ve!=null&&K!=null){const re=W.transactionLocalData.find(Ae=>Ae.transactionId===ue)?.transactionReviewLocalData;if(re!=null&&K.lines!=null&&K.lines.length>0){const Ae=re.lineItemById[ve];let qe=re.selectedEntity;if(Ia(K)||(qe=Ae.selectedEntityLine),qe!=null){const ta=qe,na={transactionId:{id:K.id,type:K.type},transaction:K,lineIds:K.lines.map(aa=>aa.id)??[]};w(He({entity:ta,amount:Ae.amount.amount,transactionDetails:na,flowType:"categorization",selectedTab:a.selectedTransactionCategorizationTab,isFetchCOT:J,isUncategorizedExpenseCategoryEnabled:$}))}}}}}const Xn=x($e=>Pt($e,void 0,Q,Y));return{transactionId:H,onSaveVendor:()=>{w(fa(H,void 0,!1,!0))},onSaveSuccess:vt,onCancel:()=>{H!=null&&w(ga({transactionId:H})),w(Ca()),w(Sa()),U()},vendorViewDetails:Xn}})({expenseAutomationViewSelector:M,closeDrawerHandler:()=>{V(!1)},currentSelectedView:F,isUncategorizedExpenseCategoryEnabled:te}),Hn={events:n.companyId!=null?[`private-encrypted-${n.companyId}.${un}`,`private-encrypted-${n.companyId}.${mn}`]:[],eventCallback:(a,U,L)=>{L.onReconciliationPusherEventReceived(a)}};return Cn?.loggedInUserRoleMap==null?Z.fetchState==="Error"?h.jsx(os,{onGoHome:()=>v("../",{replace:!0}),onReload:()=>window.location.reload()}):h.jsx(rn,{fetchState:"In-Progress"}):h.jsxs(h.Fragment,{children:[h.jsx(hs,{isOpen:y,drawerLeftMargin:new ss(0,0,300,650),onClose:()=>{C(!1)},children:h.jsx(bs,{onClick:a=>a.stopPropagation(),children:h.jsx(fs,{companyId:n.companyId,closeCustomerRequestDrawer:()=>C(!1),addCustomerRequest:zn,resetCustomerRequest:Mn})})}),bt!=null&&z&&h.jsx(ds,{isOpen:z,transactionId:bt,onSaveVendor:Nn,onSaveSuccess:Yn,onCancel:Kn,vendorViewDetails:Zn}),h.jsx(Ts,{...Hn,navigate:v,location:g,themeState:ee,categoryOptions:bn,classesForFilters:An,accountsForFilters:vn,vendorSearchAutoCompleteData:{autoCompleteText:On,entityAutoCompleteView:yn},expenseAutomationViewSelector:M,isMissingReceiptsBulkUploadEnabled:he,monthEndInsightsPreviewMode:c,monthEndInsightsCustomerRequestData:A,isRealtimeInsightsFeatureEnabled:ot,isCreateTransferEntryFromExpenseEnabled:st,isUncategorizedExpenseCategoryEnabled:te,isAccountingClassesEnabled:Bn,isProjectsTransactionsEnabled:kn,isCOTEnabled:$n,isJEScheduleCOTEnabled:En,currentTenant:n,companyId:n.companyId,signedInUser:ze,isTransactionActivityEnabled:Me,isRightPanelOpen:Fn,rightSidePanel:St,onOpenTransferRightPanel:st===!0?Oe:void 0,uncategorizedAccounts:Un,onClickCustomerRequest:_n,handleEditClick:Vn,tenantEmailDomain:gn,trackExpenseAutomationTabAnalytics:G,setActivityLogTransactionId:se,closeSidePanel:Jn,openTransactionPanel:l,sidePanelIsOpen:Gn,sidePanelIsFullView:r!==!0&&f,panelContent:qn,isAiCfoAccessEnabled:P,onAskAiCfoClick:Ve,isExpenseAutomationCommentingEnabled:In,onExpenseAutomationCommentingThreadClick:Tn,sidePanelListPercent:r===!0?66:void 0}),ne.showPopup&&ne.popupType!=null&&h.jsx(cs,{popupType:ne.popupType,currencySymbol:ne.currencySymbol,accountId:ne.popupAccountId??"",accountName:ne.popupAccountName??"",onSubmit:ne.handleSubmit,onDismiss:ne.handleDismiss})]})})),bs=Ue(sa)`
|
|
21
|
+
`;function fs({companyId:t,closeCustomerRequestDrawer:l,addCustomerRequest:B,resetCustomerRequest:f}){const b=Be.getSignedInUser();if(b==null)throw Error("Can't access Customer Request page without signing in...");const S=x(r=>ha(r,t,b));return o.useEffect(()=>{f()},[]),h.jsx(h.Fragment,{children:S.fetchState==="In-Progress"||S.companyMonthEndReportTemplatesData.fetchState==="In-Progress"?h.jsx(rn,{fetchState:"In-Progress"}):h.jsx(Go,{onCloseClick:l,addCustomerRequest:B,snippets:S.companyMonthEndReportTemplatesData,bulletPoints:S.zeniRequestsData??[]})})}const Is=t=>t.sections.generalExpense.vendors.length+t.sections.reimbursement.vendors.length,un="reconciliation-status-updated",mn="statement-status-updated",{common:{strings:{hyphen:Es,comma:Gt,space:ks}},dateFormat:pn}=Jo.getLocalizedStrings(),Jt=jo,Ts=ca(function(t,l){const{uncategorizedAccounts:B,vendorSearchAutoCompleteData:f,monthEndInsightsCustomerRequestData:b,monthEndInsightsPreviewMode:S,companyId:r,isMissingReceiptsBulkUploadEnabled:I,isTransactionActivityEnabled:s}=l,p=Be.getSignedInUser(),u=t.tenantState.currentTenantId,k={userId:p?.userId??"",sessionId:p?.zeniSessionId??"",tenantId:u??""},v=Ie(t),{selectedTransactionCategorizationTab:g}=v;return{expenseAutomationViewSelector:v,bulkUploadSelector:I===!0?v.missingReceipts.bulkUpload:void 0,vendorSearchAutoCompleteData:f,authParams:k,receiptUploadEndpoint:`${Pe.accountMicroServiceBaseUrl}`,transactionAttachmentsEndpoint:`${Ko}/transaction_attachments`,bulkUploadEndpoint:I===!0?`${Pe.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`:void 0,isDisabled:!1,currentTab:g,monthEndInsightsCustomerRequestData:b,monthEndInsightsPreviewMode:S,allThreadsSectionOpen:!1,enableMonthEndInsightsZeniGPTFeature:!1,loggedInUser:p,uncategorizedAccounts:B,companyId:r,isTransactionActivityEnabled:s}},function(t,l){const{themeState:B,isAccountingClassesEnabled:f,isCOTEnabled:b,isUncategorizedExpenseCategoryEnabled:S,isMissingReceiptsBulkUploadEnabled:r,location:I,vendorSearchAutoCompleteData:s,expenseAutomationViewSelector:p,currentTenant:u,uncategorizedAccounts:k,navigate:v,onClickCustomerRequest:g,handleEditClick:m,setActivityLogTransactionId:P}=l,{selectedPeriod:E,currentSelectedView:T,reconciliation:{selectedAccountId:d}}=p,{accountSettingsView:G}=p.jeSchedules,ee=tn(E),z=Fe(ee.start),V=Fe(ee.end);return{onZeniLogoClick:()=>{B.toggle()},onUploadReceiptAttachment:e=>{q.trackMissingReceiptAttached(E.month,E.year),t(mo(e))},onUploadTransactionReceipt:(e,n,c,i,y,C)=>{t(Vt(e,n,{fetchState:"In-Progress"}));const A=()=>t(Vt(e,n,{fetchState:"Error"}));Zo(`${Pe.accountMicroServiceBaseUrl}/1.0/transactions/${n}/attachments`,C,n,c,i,y).then(O=>{O!=null?t(uo(e,O)):A()}).catch(A)},onMissingReceiptsRowClick:(e,n)=>{if(l.openTransactionPanel)return void l.openTransactionPanel(e,n);const c=ae(I.state?.pathnameStackToGoBack,I.pathname);v(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",origin:"missing_receipts"}})},onUploadReceiptComplete:(e,n)=>{t(ro(e,n)),u!=null&&t(Ee({tenantId:u.tenantId,period:n,refreshViewInBackground:!0}))},onUploadReceiptFetchStatus:(e,n,c,i)=>{t(lo(e,{fetchState:n,error:c})),c!=null&&t(Bt({messageSection:"missing_receipts_attachment",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"__message__",variableValue:i!=null?ks+Es+i+Gt:Gt}]}))},onUpdateJESchedulesUIState:e=>{t(io(e))},onUpdateMissingReceiptsUIState:e=>{t(co(e))},onFetchMissingReceiptsList:()=>{V!=null&&z!=null&&t(an({start:z,end:V},{amount:75,currencyCode:"USD",currencySymbol:"$"},!0,!1))},...r===!0?{onBulkUploadFiles:e=>{t(Mo(e))},onBulkUploadProgress:e=>{t(zo(e))},onBulkUploadSuccess:e=>{t(_o({batchId:e}))},onBulkUploadUploadedFileCount:e=>{t(Vo(e))},onConfirmBulkUploadMatch:(e,n,c,i,y)=>{t(Oo(e,n,c,i,y))},onBulkUploadConfirmMatchAcknowledged:()=>{t(Bo())},onSetBulkUploadResultsTab:e=>{t(Uo(e))},onSetBulkUploadCompletedSubTab:e=>{t(Fo(e))},onSetBulkUploadSortConfig:(e,n)=>{t(Mt({sortKey:e,sortOrder:n}))},onClearBulkUpload:()=>{t(Do())},onSearchTransactionsForManualMatch:(e,n)=>{t(Jt(e,n??void 0))},onLoadMoreManualSearch:()=>{const{manualSearch:e}=p.missingReceipts.bulkUpload;e.nextPageToken!=null&&e.searchQuery!==""&&t(Jt(e.searchQuery,e.nextPageToken))},onFetchCompletedTransactions:(e,n)=>{t(Ro(e,n))},onClearBulkUploadBatchDetailsForScopeChange:()=>{t(Po())},onFetchBulkUploadBatches:e=>{t(on(e))},onFetchMoreBatchDetails:()=>{t(xo())},onResetBulkUploadSort:()=>{t(Mt({sortKey:void 0,sortOrder:void 0}))}}:{},onClearMissingReceiptsTabNavigation:()=>{t(so())},onSearchTextChanged:e=>{const n=p.currentSelectedView,c=p.selectedTransactionCategorizationTab;n==="transaction_categorization"&&(t(Je({selectedTab:c,uiState:{searchString:e}})),V!=null&&z!=null&&t(me(c,{start:z,end:V},!0,!1,e,void 0,!1,!0)))},onFiltersChange:e=>{const n=p.selectedTransactionCategorizationTab;t(oo({filters:e,selectedTab:n}))},onRefresh:()=>{l.trackExpenseAutomationTabAnalytics(!0),t(ao(S))},onClose:()=>{T==="reconciliation"&&d!=null&&t(Ot({selectedAccountId:void 0})),v("../")},onBack:()=>{T==="reconciliation"&&d!=null&&t(Ot({selectedAccountId:void 0}))},onSaveReconciliation:e=>{t(no(e))},onSaveReconciliationReview:e=>{t(to(e))},onUpdateStep:e=>{const{selectedPeriod:n}=p,c=ae(I.state?.pathnameStackToGoBack,I.pathname);v(`../${e}/${n.month}-${n.year}`,{state:{pathnameStackToGoBack:c,referrer:p.currentSelectedView}}),t(nn(e))},handleLogOutClick:()=>{const e=ae(I.state?.pathnameStackToGoBack,I.pathname);v("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},onJeAccountSettingsChange:e=>{const{vendorsAccountSection:n}=e,{prepaidExpensesAccount:c,fixedAssetsAccount:i,accruedExpensesAccount:y}=n,C=Ye(G.prepaidExpensesAccountList,c.selectedOptions),A=Ye(G.fixedAssetsAccountList,i.selectedOptions),O=Ye(G.accruedExpensesAccountList,y.selectedOptions),R={selectedPrepaidExpensesAccountIds:C.map(D=>D.accountId),selectedFixedAssetsAccountIds:A.map(D=>D.accountId),selectedAccruedExpensesAccountIds:O.map(D=>D.accountId)};t(eo({data:R}))},onSaveJeAccountSettingsClick:()=>{t(Xa())},onJESchedulesFormDataChange(e,n){const{jeScheduleID:c,accumulatedDepreciationCategory:i,scheduleClass:y,scheduleExpenseCategory:C,vendor:A}=n,{allAccountList:O,allClassList:R,allDepreciationAccountList:D}=p.jeSchedules,j=s.entityAutoCompleteView.vendor.length>0?s.entityAutoCompleteView.vendor.find(N=>N.id===A?.selectedOption):void 0,oe={id:j?.zeniId??A?.selectedOption??"",name:j?.name??A?.defaultOptions.find(N=>N.value===A?.selectedOption)?.label??"",logo:j?.logo},se=C?.selectedOption!=null?O.find(N=>N.qboId===C.selectedOption):void 0,Oe=y?.selectedOption!=null?R.find(N=>N.classId===y.selectedOption):void 0,Ve=i?.selectedOption!=null?D.find(N=>N.qboId===i.selectedOption):void 0;t(Wa({scheduledJournalEntryID:e,localData:{jeScheduleID:c,scheduledJournalEntryID:e,updatedCategoryId:se?.accountId,updatedClassId:Oe?.classId,updatedAccumulatedDepreciationCategoryID:Ve?.accountId,updatedVendor:{id:oe.id,name:oe.name}}}))},ignoreRecommendedJeSchedule(e,n){t(Qa(e,n))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(e,n)=>{e.trim().length>=2?t(Rt({searchString:e,entityType:n,searchOrigin:"common"})):e.trim().length===0&&t(we("common"))},onCancelAutoComplete:()=>{t(we("common"))}},onPostJESchedule(e,n){t(Ha({scheduledJournalEntryID:e,jeScheduleTransactionKey:n}))},clearJeScheduleLocalData(){t(Za())},handleJeScheduleClick:(e,n,c)=>{t(Ka({selectedJEScheduleKey:n}));const i=ae(I.state?.pathnameStackToGoBack,I.pathname);v(`../../vendors/schedules/${c}/details/${e}`,{state:{pathnameStackToGoBack:i,message:"expenseAutomation",origin:"je_schedules"}})},improveMonthEndInsightsUsingZeniGPTClick:e=>{u!=null&&t(Ya(e,u.companyId,u.tenantId))},onClickCustomerRequest:g,setActivityLogTransactionId:P,onCloseAllThreadsSection:()=>{},onCloseFileAttachmentSnackBar:()=>{t(Na())},onOpenFileAttachmentSnackBar:()=>{t(Bt({messageSection:"cockpit_month_end_email_attachment_upload",messageText:"failed",type:"error",showStatusIcon:!0}))},onRemoveFileAttachment:e=>{t(Ja(e))},onUpdateFileAttachment:e=>{t(Ga({files:e}))},previewMonthEndReport:(e,n,c,i)=>{u!=null&&t(Ut(e,u.companyId,n,!0,c,i,u.tenantId))},saveMonthEndReport:(e,n,c,i)=>{u!=null&&t(Ut(e,u.companyId,n,!1,c,i,u.tenantId))},onEditMonthEndInsightsClick:m,sendMonthEndReport:e=>{const n=I.state?.referrer,{selectedPeriod:c,auditSummary:i}=p;u!=null&&i?.auditScorePercentage!=null&&(t($a(u.companyId,e,u.tenantId)),q.trackInsightsEmailPage(c.month,c.year,!1,"draft",i.auditScorePercentage,qa().format(pn.analytics.MMMDDCommaYYYYformat),n??null))},onTransactionCategorizationRowClick:(e,n)=>{if(l.openTransactionPanel)return void l.openTransactionPanel(e,n);const c=ae(I.state?.pathnameStackToGoBack,I.pathname);v(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",origin:"transaction_categorization"}})},setLocalDataForCategoryAndClass:(e,n,c,i,y,C,A,O,R,D,j,oe,se)=>{t(La(e,n,c,i,k,y,C,A,O,R,D,j,oe,se))},onCancelAutoComplete:()=>{t(we("common"))},updateExpenseAutomationReconListScrollPosition:e=>{t(Dt({scrollPosition:e}))},onUpdateTab:e=>{l.closeSidePanel?.(),V!=null&&z!=null&&(t(me(e,{start:z,end:V},!1,!1)),t(ja(e)))},onUpdateTransactionCategorizationCompletedSubTab:e=>{l.closeSidePanel?.(),V!=null&&z!=null&&(t(Ma(e)),t(me("autoCategorized",{start:z,end:V},!1,!1)))},onUpdateTransactionCategorizationUIState:(e,n)=>{t(Je({selectedTab:e,uiState:n})),V!=null&&z!=null&&t(me(e,{start:z,end:V},!1,!1,n.searchString,null,!0))},onUpdateScrollYOffSetTransactionCategorizationUIState:(e,n)=>{t(Je({selectedTab:e,uiState:n}))},onFetchTransactionCategorizationList:(e,n,c,i,y,C,A)=>{V!=null&&z!=null&&t(me(e,{start:z,end:V},!0,c,n,i,y,C,A))},resetTransactionCategorizationLocalData:(e,n,c,i,y,C,A,O)=>{t(za(e,n,c,i,O??null,y,C,!1,A))},updateSelectedVendorForTransaction:(e,n,c,i,y)=>{t(Ft({selectedTab:e,transactionId:n,lineId:c,selectedTransaction:i,uncategorizedAccounts:k,updatedVendor:y,isAccountingClassesEnabled:f}))},onSaveUpdateTransactionCategorization:(e,n,c)=>{const i=I.state?.referrer;e==="autoCategorized"?q.trackTransactionsAutoCategorisedPage(E.month,E.year,p.transactionView.totalCountByTab.autoCategorized,n.length,!1,i??null):q.trackTransactionsReviewPage(E.month,E.year,p.transactionView.totalCountByTab.review,n.length,!1,i??null),t(_a(e,n,c,S))},onUpdateSelectedCheckboxTransactionIds:(e,n)=>{t(Va({selectedTab:e,transactionIds:n}))},onFetchRecommendationsForEntityCategorizationWithCustomer:(e,n,c,i,y,C,A)=>{const{transactionId:O,transaction:R,lineIds:D}=n;C!=null&&t(Ba({transactionId:O,customerUpdates:C})),t(Oa({selectedTab:i,transactionId:O.id,lineId:D[0],selectedTransaction:R,uncategorizedAccounts:k,updatedCustomer:C,selectedEntity:y,isAccountingClassesEnabled:f,isUncategorizedExpenseCategoryEnabled:A})),y!=null&&t(He({entity:y,amount:e,transactionDetails:n,flowType:"categorization",selectedTab:i,isFetchCOT:b,isUncategorizedExpenseCategoryEnabled:A}))},onFetchRecommendationsForEntityCategorization:(e,n,c,i,y,C,A)=>{const{transactionId:O,transaction:R,lineIds:D}=n;C!=null&&(t(Da({transactionId:O,vendorUpdates:{name:C.name,id:C.id?C.id:void 0}})),t(Fa({vendorId:C.id?C.id:void 0,localData:{vendorName:C.name,vendorId:C.id?C.id:void 0}}))),C?.id?(t(Ft({selectedTab:i,transactionId:O.id,lineId:D[0],selectedTransaction:R,uncategorizedAccounts:k,updatedVendor:C,selectedEntity:y,isAccountingClassesEnabled:f,isUncategorizedExpenseCategoryEnabled:A})),y!=null&&t(He({entity:y,amount:e,transactionDetails:n,flowType:"categorization",selectedTab:i,isFetchCOT:b,isUncategorizedExpenseCategoryEnabled:A}))):t(Ua({selectedTab:i,transactionId:O.id,lineId:D[0]}))},fetchFluxViewOnScroll:(e,n)=>{t(xe(e,!0,!1,n,!1,!0))},onFetchFluxViewList:()=>{t(xe(E,!0,!1,null,!1,!1))},markAsReview:(e,n,c,i)=>{q.trackFluxAnalysisReviewed(c.month,c.year,i??!1,e),t(Ra(n,e,c,i??!1))},onUpdateFluxAnalysisUIState:e=>{t(Pa(e))},updateOperatingExpensesIdsForReview:e=>{t(xa({operatingExpenseIds:e,selectedPeriod:E}))},redirectToVendorDetailPage:e=>{if(l.tenantEmailDomain!=null){const n=ps(e.id,e.qboId,l.tenantEmailDomain),c=ae(l.location.state?.pathnameStackToGoBack,l.location.pathname);l.navigate(n,{state:{pathnameStackToGoBack:c,message:"expenseAutomation",referrer:"Vendor List",origin:"flux_analysis"}})}},updateSectionIdsForReview:e=>{t(wa({sectionId:e,selectedPeriod:E}))},onFetchReimbursementView:(e,n,c)=>{t(xe(e,!0,!1,n,!0,c))},onReviewClicked:e=>{t(de(E,e))},setOpenDrawerClicked:e=>{t(De({selectedDrawerAccountId:e}))},onFetchLinkTokenClick:(e,n)=>{t(Wt("expense_automation_reconcile",e,n))},onEstablishConnectionClick:(e,n)=>{const c=u?.companyId;c!=null&&(t(Xt(e,c,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",n)),t(en({accountId:n,connectionInProgress:!0})))},onAddStatementClick:e=>{t(De({selectedDrawerAccountId:e})),t(Qt({accountId:e,selectedPeriod:E,localData:{accountSource:"bank_statement"}})),t(Ht({statementUploadChosen:!0}))},onReloadReconciliationListPage:()=>{t(de(E,void 0,!0,!1))},onUpdateReconcileTabLocalData:e=>{t(Aa({selectedTransactionIds:e}))},onReconTabColumnSortConfigChanged:(e,n)=>{t(va({sortKey:e,sortOrder:n}))},onReconReviewTabColumnSortConfigChanged:(e,n)=>{t(ba({sortKey:e,sortOrder:n}))},onReconTabUpdate:e=>{l.closeSidePanel?.(),t(ya({selectedTab:e}))},updateReconReviewTabLocalData:(e,n,c)=>{const i=e.vendor?.id;c&&i!=null&&t(ka(i)),t(Ta({data:e,transactionId:n}))},onReconMatchedTransactionClick:e=>{if(l.openTransactionPanel)return void l.openTransactionPanel(e,Ze("bill"));const n=ae(I.state?.pathnameStackToGoBack,I.pathname);v(`../../transaction/bill/${e}`,{state:{pathnameStackToGoBack:n,message:"expenseAutomation",origin:"reconciliation"}})},onReloadPage:()=>{window.location.reload()},onBackClick:()=>{v(-1)},onReconListPageScroll:e=>{t(Dt({scrollPosition:e}))},onVendorAutoCompleteInputChange:e=>{e.trim().length>=2?t(Rt({searchString:e,searchOrigin:"common"})):e.trim().length===0&&t(we("common"))},onReconNodeCollapseToggled:(e,n)=>{t(Ea({nodeId:e,collapsed:n}))},updateSectionCollapseStatus:()=>{},onExcludeAccountFromReconciliation:e=>{t(Kt({accountId:e}))},onIncludeAccountIntoReconciliation:e=>{t(Zt({accountId:e}))},onReconciliationPusherEventReceived:e=>{e!==un&&e!==mn||T!=="reconciliation"||t(de(E,d,!0,!0))}}},(t,l,B)=>{const{isMissingReceiptsBulkUploadEnabled:f,...b}=B;return function(S,r,I){return{...S,...r,...I,onUploadTransactionReceipt:(s,p,u,k,v)=>{r.onUploadTransactionReceipt(s,p,u,k,v,S.authParams)}}}(t,l,b)})(No(Yo)),ys=us(function(t){const l=t.displayName??t.name??"Component",B=Nt.memo(t),f=b=>{const S=pe(),r=function(){const P=pe(),E=x(T=>Ie(T).reconciliation.selectedDrawerAccountId);return{isOpen:E!=null,selectedAccountId:E,openPanel:o.useCallback(T=>{P(De({selectedDrawerAccountId:T}))},[P]),closePanel:o.useCallback(()=>{P(De({selectedDrawerAccountId:void 0}))},[P])}}(),I=x(P=>Ie(P).reconciliation),s=x(P=>Re(P)),p=o.useCallback((P,E)=>{S(Wt("expense_automation_reconcile",P,E))},[S]),u=o.useCallback((P,E)=>{const T=s?.companyId;T!=null&&(S(Xt(P,T,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",E)),S(en({accountId:E,connectionInProgress:!0})))},[S,s?.companyId]),k=o.useMemo(()=>{if(r.isOpen&&r.selectedAccountId!=null)return h.jsx(Ss,{reconciliation:I,selectedDrawerAccountId:r.selectedAccountId,onClose:r.closePanel,onFetchLinkTokenClick:p,onEstablishConnectionClick:u})},[r.isOpen,r.selectedAccountId,r.closePanel,I,p,u]),v=o.useMemo(()=>({reconPanelContent:k,reconSidePanelIsOpen:r.isOpen,closeReconSidePanel:r.closePanel}),[k,r.isOpen,r.closePanel]),g=o.useContext(jt),m=o.useMemo(()=>r.isOpen?{closePanel:r.closePanel,selectedItemId:r.selectedAccountId}:g,[r.isOpen,r.closePanel,r.selectedAccountId,g]);return h.jsx(jt.Provider,{value:m,children:h.jsx(B,{...b,...v})})};return f.displayName=`withReconSidePanel(${l})`,f}(({closeSidePanel:t,openTransactionPanel:l,panelContent:B,sidePanelIsFullView:f,sidePanelIsOpen:b,reconPanelContent:S,reconSidePanelIsOpen:r,closeReconSidePanel:I})=>{const{isAiCfoOpen:s,setIsAiCfoOpen:p}=Ho(),u=Qo(),{isOpen:k}=Wo(),v=Yt(),g=Ke(),m=pe(),{isAiCfoAccessEnabled:P,onAskAiCfoClick:E}=dn({mobileExploreReferrer:"Transaction categorization"}),T=o.useCallback(()=>{b===!0&&f!==!0&&t?.()},[t,b,f]),{areTenantIdsInSync:d}=cn(),G=(()=>{const a=x(J=>Ie(J)),U=Ke(),{currentSelectedViewFetchState:L,currentSelectedView:$,selectedPeriod:w}=a,Q=Ne($),Y=Ne(L.fetchState),H=o.useCallback(J=>{const W=U.state?.referrer;$==="transaction_categorization"&&(a.selectedTransactionCategorizationTab==="review"?q.trackTransactionsReviewPage(w.month,w.year,a.transactionView.totalCountByTab.review,0,J,W??null):q.trackTransactionsAutoCategorisedPage(w.month,w.year,a.transactionView.totalCountByTab.autoCategorized,0,J,W??null)),$==="missing_receipts"&&q.trackMissingReceiptsPage(w.month,w.year,J,a.missingReceipts.transactions.length,W??null),$==="je_schedules"&&q.trackMonthCloseScheduleListPage(w.month,w.year,J,a.jeSchedules.draftSchedules.length,a.jeSchedules.resolveSchedules.length,W??null),$==="flux_analysis"&&q.trackFluxAnalysisPage(w.month,w.year,J,Is(a.fluxAnalysis),W??null),$==="month_end_insights"&&a.auditSummary?.auditScorePercentage!=null&&q.trackInsightsEmailPage(w.month,w.year,J,"draft",a.auditSummary.auditScorePercentage,null,W??null)},[w,a]);return o.useEffect(()=>{Y===L.fetchState&&$===Q||L.fetchState!=="Completed"||H(!1)},[$,L.fetchState,Q]),H})(),ee=Xo(),[z,V]=o.useState(!1),e=x(a=>Pt(a)),n=x(a=>Re(a)),[c,i]=o.useState(!1),[y,C]=o.useState(!1),[A,O]=o.useState([]),[R,D]=o.useState(null),j=o.useCallback(()=>{D(null)},[]),oe=R?.contentType==="activity"?R.detail.transactionId:void 0,se=o.useCallback(a=>{a!=null?(s&&p(!1),u(),T(),D({contentType:"activity",detail:{transactionId:a}})):D(U=>U?.contentType==="activity"?null:U)},[T,s,u,p]),Oe=o.useCallback(a=>{s&&p(!1),u(),T(),D({contentType:"transfer",detail:a})},[T,s,u,p]),Ve=o.useCallback(()=>{u(),j(),T(),E()},[T,j,E,u]),N=o.useRef(s);o.useEffect(()=>{s===!0&&N.current===!1&&(u(),j(),T()),N.current=s},[T,j,s,u]);const Qe=o.useRef(k);o.useEffect(()=>{k===!0&&Qe.current===!1&&(s&&p(!1),j(),b===!0&&f!==!0&&t?.()),Qe.current=k},[j,t,k,s,p,f,b]);const ke=b===!0&&f!==!0,We=o.useRef(ke);o.useEffect(()=>{ke&&!We.current&&(s&&p(!1),u(),j()),We.current=ke},[j,s,ke,u,p]);const[Xe,hn]=o.useState(!1),et=o.useRef(!1),{selectedTab:tt}=xt(),{tenantEmailDomain:gn}=xt(),[_e,nt]=o.useState(g.state?.message==="comingFromTransactionDetail"),at=g.state?.message==="comingFromOverview",Cn=es(),ze=Be.getSignedInUser(),{useDynamicConfig:Sn,useFeatureGate:ce}=sn(),{configValue:fn}=Sn(ts.enableUncategorizedExpenseCategory),te=fn?.uncategorized_expense_category_enabled===!0,{isFeatureEnabled:ot}=ce(X.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:he}=ce(X.isMissingReceiptsBulkUploadEnabled),{isFeatureEnabled:Me}=ce(X.isTransactionActivityEnabled),{isFeatureEnabled:st}=ce(X.isCreateTransferEntryFromExpenseEnabled),{isFeatureEnabled:In}=ce(X.isExpenseAutomationCommentingEnabled),{isFeatureEnabled:En}=ce(X.isProjectsTransactionsEnabled),{isFeatureEnabled:kn}=ce(X.isJEScheduleCOTEnabled),Tn=o.useCallback(a=>{const U=Ze(a.view==="reconciliation"?"bill":"expense");l?.(a.entityId,U)},[l]),yn=x(a=>po(a,"common")),M=x(a=>Ie(a)),{categoryOptions:bn,paymentAccountNames:vn}=x(a=>ho(a.accountState)),An=x(a=>go(a.classState)),{monthEndCloseChecksView:Z,currentSelectedView:F,selectedPeriod:_,selectedTransactionCategorizationTab:je,currentSelectedViewBackgroundRefreshFetchState:wn,currentSelectedViewFetchState:ie,jeSchedules:Le,reconciliation:xn}=M;is(F==="transaction_categorization");const Pn=M.transactionView.saveStatus.fetchState,ct=M.transactionView.transactions,it=o.useRef(ct);it.current=ct;const lt=x(a=>a.expenseAutomationTransactionsViewState?.transactionCategorizationView),rt=x(a=>a.expenseAutomationTransactionsViewState?.selectedTransactionCategorizationTab),dt=o.useRef(lt);dt.current=lt;const ut=o.useRef(rt);ut.current=rt;const ne=ls(Pn,()=>{const a=[],U=ut.current,L=dt.current,$=L!=null&&U!=null?L[U]:void 0;if($?.transactionReviewLocalDataById!=null)for(const Q of Object.values($.transactionReviewLocalDataById)){const Y=Q?.transactionReviewLocalData?.lineItemById;if(Y!=null)for(const H of Object.values(Y)){const J=H?.account;J?.accountId!=null&&a.push(J.accountId)}}const w=it.current;for(const Q of w)for(const Y of Q.lines??[])"account"in Y&&Y.account?.accountId!=null&&a.push(Y.account.accountId);return a});o.useEffect(()=>{F==="transaction_categorization"&&b!==!0||se(void 0)},[F,se,b]);const Rn=M.transactionView.selectedTransactionCategorizationCompletedSubTab,Te=`${je}|${Rn}`,ye=o.useRef(null);o.useEffect(()=>{ye.current!==null?ye.current!==Te&&(ye.current=Te,F==="transaction_categorization"&&j()):ye.current=Te},[j,F,Te]);const Dn=x(a=>oe==null?void 0:Co(a.transactionState,oe)),le=Dn?.qboId,mt=x(a=>le==null?void 0:So(a,le));o.useEffect(()=>{le!=null&&m(fo(le))},[m,le]);const{createTransferEntryStatus:pt,creditCardTransferAccountsList:ht,transferAccounts:gt}=M.transactionView,Ct=o.useCallback(a=>rs(m,a),[m]),St=o.useMemo(()=>F!=="transaction_categorization"||R==null?null:R.contentType==="activity"?Me===!0?h.jsx(ns,{activityLogView:mt,qboId:le,onClose:()=>D(null),selectedTransactionId:R.detail.transactionId,isQuickViewCardStyle:!0},String(R.detail.transactionId)):null:R.contentType==="transfer"?h.jsx(as,{createTransferEntryStatus:pt,transaction:R.detail,transferAccounts:R.detail.transactionType==="credit_card_payment"?ht:gt,onClose:()=>D(null),onCreateTransfer:Ct,isQuickViewCardStyle:!0},String(R.detail.transactionId)):null,[F,R,Me,mt,le,pt,ht,gt,Ct]),Fn=St!=null,{selectedAccountId:ge}=xn,ft=Ne(Le.accountSettingsView.saveState.fetchState),Un=x(a=>Io(a.accountState,a.accountListState,"accountList")),Bn=x(a=>Eo(a)),Ce=tt!=null?ko(tt):F,On=x(a=>a.entityAutoCompleteState.autoCompleteText.common);if(ln({isDataReady:ie.fetchState==="Completed"}),ze==null)throw Error("Can't access expense automation screen without signing in...");const It=tn(_),Se=Fe(It.start),fe=Fe(It.end);if(Se==null||fe==null)throw Error(`Invalid start - ${Se} and end - ${fe} period from given ${_}`);const Vn=o.useCallback(()=>{i(!1)},[]),_n=o.useCallback(()=>{C(!0)},[]),zn=o.useCallback(a=>{O(a),C(!1)},[]),Mn=o.useCallback(()=>{O([])},[]),be=M.missingReceipts.bulkUpload.phase,Et=M.missingReceipts.bulkUpload.currentBatchId;o.useEffect(()=>{he===!0&&F==="missing_receipts"&&be==="matching"&&Et!=null&&m(on({cacheOverride:!0}))},[he,F,be,Et,m]);const kt=ze?.userId,jn=_.month,Ln=_.year,Tt=n?.tenantId;o.useEffect(()=>{F==="missing_receipts"&&he!==!1&&be==="idle"&&kt!=null&&Tt!=null&&m(To())},[F,he,be,kt,Tt,jn,Ln,m]),o.useEffect(()=>{e.newVendorState?.vendorDetailLocalData?.vendorName!=null?V(!0):V(!1)},[e.newVendorState?.vendorDetailLocalData?.vendorName]),o.useEffect(()=>{Ce!=null&&F!==Ce&&m(nn(Ce))},[Ce]),o.useEffect(()=>{Xe!==!1||ie.fetchState!=="Completed"&&ie.fetchState!=="Error"||!d||(hn(!0),m(_t(!1,!1,te)))},[Xe,ie,d,te]),o.useEffect(()=>{!at&&d&&(m(_t(!1,!1,te)),m(de(_,ge,!1,!1)))},[_.month,_.year,d,te]);const yt=o.useCallback((a=!1,U=!1)=>{const L={start:Se,end:fe};switch(F){case"transaction_categorization":m(me(je,L,a,!_e,void 0,void 0,U,void 0,te)),nt(!1);break;case"flux_analysis":m(xe(_,a,U,null));break;case"month_end_insights":if(U===!1){const $=new Date(_.year,_.month,0),w=bo($.toDateString()).format(pn.analytics.YYYYDashMMDashDDFormat);m(vo(!0,n.companyId,n.tenantId,w)),m(Ao(n.companyId,n.tenantId))}break;case"je_schedules":m(yo(L,U));break;case"missing_receipts":m(an(L,{amount:75,currencyCode:"USD",currencySymbol:"$"},a,U));break;default:m(de(_,ge,a,U))}},[F,Se,fe,n.companyId,n.tenantId,je,_,ge,_e,nt,te]);o.useEffect(()=>{F===Ce&&ie.fetchState==="Not-Started"&&d&&yt(!0)},[ie,Se,fe,n.companyId,n.tenantId,d]),o.useEffect(()=>{at||_e||et.current||wn.fetchState==="In-Progress"||ie.fetchState!=="Completed"||(et.current=!0,yt(!0,!0))},[]),o.useEffect(()=>{Z.fetchState!=="In-Progress"&&Z.fetchState!=="Completed"&&m(Ee({tenantId:n.tenantId,period:_,refreshViewInBackground:!1}))},[Z.fetchState,n.tenantId]),o.useEffect(()=>{M.monthEndInsights?.previewMonthEndReportStatus?.fetchState==="Completed"?i(!0):i(!1)},[M.monthEndInsights?.previewMonthEndReportStatus?.fetchState]),o.useEffect(()=>{M.monthEndInsights?.sendMonthEndReportStatus?.fetchState==="Completed"&&d&&(m(Ee({tenantId:n.tenantId,period:_,refreshViewInBackground:!0})),m(wo({companyId:n.companyId})),v("../"))},[M.monthEndInsights?.sendMonthEndReportStatus?.fetchState,n.tenantId,_,n.companyId,d]),o.useEffect(()=>{const a=setInterval(()=>{Z.fetchState!=="In-Progress"&&Z.fetchState==="Completed"&&m(Ee({tenantId:n.tenantId,period:_,refreshViewInBackground:!0}))},3e5);return()=>clearInterval(a)},[Z.fetchState,n.tenantId,_,m]),o.useEffect(()=>{const a=setInterval(()=>{F==="reconciliation"&&ge==null&&M.reconciliation.fetchStatus.fetchState==="Completed"&&M.reconciliation.refreshStatus.fetchState!=="In-Progress"&&m(de(_,void 0,!0,!0))},3e5);return()=>clearInterval(a)},[F,m,M.reconciliation.fetchStatus.fetchState,M.reconciliation.refreshStatus.fetchState,de,ge,_]);const $n=Lt();o.useEffect(()=>{const a=(Z.monthEndCloseChecks?.monthEndCloseCheckList.find(U=>U.id==="month_end_insights")?.isDisabled??!1)&&!ot;F!=="month_end_insights"||!a&&Z.monthEndCloseChecks?.reportEmailSentDate==null||v("../")},[F,Z.monthEndCloseChecks]);const qn=r===!0?S:B,Gn=r===!0||b===!0,Jn=r===!0?I:t;o.useEffect(()=>{ft==="In-Progress"&&Le.accountSettingsView.saveState.fetchState==="Completed"&&m(zt())},[ft,Le.accountSettingsView.saveState.fetchState,zt]);const{transactionId:bt,onSaveVendor:Nn,onSaveSuccess:Yn,onCancel:Kn,vendorViewDetails:Zn}=(({expenseAutomationViewSelector:a,closeDrawerHandler:U,currentSelectedView:L,isUncategorizedExpenseCategoryEnabled:$})=>{const w=pe();let Q,Y,H;const J=Lt(),W=a.transactionView;let vt=()=>{};const{transactions:Qn,selectedTransactionId:ue,selectedTransactionLineId:ve,transactionLocalData:Wn}=W;if(L==="transaction_categorization"){const $e=Wn.find(re=>re.transactionId===ue),K=Qn.find(re=>re.id===ue),At=ve!=null?$e?.transactionReviewLocalData?.lineItemById[ve]:void 0,wt=At?.account;Y=At?.class?.classId,Q=["Uncategorized Income","Uncategorized Expense"].includes(wt?.accountName??"")?void 0:wt?.accountId;const ea=ms(ue,K?.typeOfTransaction);K!=null&&ea&&(H={id:ue,type:Ze(K.typeOfTransaction)}),vt=()=>{if(ue!=null&&ve!=null&&K!=null){const re=W.transactionLocalData.find(Ae=>Ae.transactionId===ue)?.transactionReviewLocalData;if(re!=null&&K.lines!=null&&K.lines.length>0){const Ae=re.lineItemById[ve];let qe=re.selectedEntity;if(Ia(K)||(qe=Ae.selectedEntityLine),qe!=null){const ta=qe,na={transactionId:{id:K.id,type:K.type},transaction:K,lineIds:K.lines.map(aa=>aa.id)??[]};w(He({entity:ta,amount:Ae.amount.amount,transactionDetails:na,flowType:"categorization",selectedTab:a.selectedTransactionCategorizationTab,isFetchCOT:J,isUncategorizedExpenseCategoryEnabled:$}))}}}}}const Xn=x($e=>Pt($e,void 0,Q,Y));return{transactionId:H,onSaveVendor:()=>{w(fa(H,void 0,!1,!0))},onSaveSuccess:vt,onCancel:()=>{H!=null&&w(ga({transactionId:H})),w(Ca()),w(Sa()),U()},vendorViewDetails:Xn}})({expenseAutomationViewSelector:M,closeDrawerHandler:()=>{V(!1)},currentSelectedView:F,isUncategorizedExpenseCategoryEnabled:te}),Hn={events:n.companyId!=null?[`private-encrypted-${n.companyId}.${un}`,`private-encrypted-${n.companyId}.${mn}`]:[],eventCallback:(a,U,L)=>{L.onReconciliationPusherEventReceived(a)}};return Cn?.loggedInUserRoleMap==null?Z.fetchState==="Error"?h.jsx(os,{onGoHome:()=>v("../",{replace:!0}),onReload:()=>window.location.reload()}):h.jsx(rn,{fetchState:"In-Progress"}):h.jsxs(h.Fragment,{children:[h.jsx(hs,{isOpen:y,drawerLeftMargin:new ss(0,0,300,650),onClose:()=>{C(!1)},children:h.jsx(bs,{onClick:a=>a.stopPropagation(),children:h.jsx(fs,{companyId:n.companyId,closeCustomerRequestDrawer:()=>C(!1),addCustomerRequest:zn,resetCustomerRequest:Mn})})}),bt!=null&&z&&h.jsx(ds,{isOpen:z,transactionId:bt,onSaveVendor:Nn,onSaveSuccess:Yn,onCancel:Kn,vendorViewDetails:Zn}),h.jsx(Ts,{...Hn,navigate:v,location:g,themeState:ee,categoryOptions:bn,classesForFilters:An,accountsForFilters:vn,vendorSearchAutoCompleteData:{autoCompleteText:On,entityAutoCompleteView:yn},expenseAutomationViewSelector:M,isMissingReceiptsBulkUploadEnabled:he,monthEndInsightsPreviewMode:c,monthEndInsightsCustomerRequestData:A,isRealtimeInsightsFeatureEnabled:ot,isCreateTransferEntryFromExpenseEnabled:st,isUncategorizedExpenseCategoryEnabled:te,isAccountingClassesEnabled:Bn,isProjectsTransactionsEnabled:En,isCOTEnabled:$n,isJEScheduleCOTEnabled:kn,currentTenant:n,companyId:n.companyId,signedInUser:ze,isTransactionActivityEnabled:Me,isRightPanelOpen:Fn,rightSidePanel:St,onOpenTransferRightPanel:st===!0?Oe:void 0,uncategorizedAccounts:Un,onClickCustomerRequest:_n,handleEditClick:Vn,tenantEmailDomain:gn,trackExpenseAutomationTabAnalytics:G,setActivityLogTransactionId:se,closeSidePanel:Jn,openTransactionPanel:l,sidePanelIsOpen:Gn,sidePanelIsFullView:r!==!0&&f,panelContent:qn,isAiCfoAccessEnabled:P,onAskAiCfoClick:Ve,isExpenseAutomationCommentingEnabled:In,onExpenseAutomationCommentingThreadClick:Tn,sidePanelListPercent:r===!0?66:void 0}),ne.showPopup&&ne.popupType!=null&&h.jsx(cs,{popupType:ne.popupType,currencySymbol:ne.currencySymbol,accountId:ne.popupAccountId??"",accountName:ne.popupAccountName??"",onSubmit:ne.handleSubmit,onDismiss:ne.handleDismiss})]})})),bs=Ue(sa)`
|
|
22
22
|
display: flex;
|
|
23
23
|
min-height: 100%;
|
|
24
24
|
flex-direction: column;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-4PIBJMyE.js";import{a as r}from"./sentry-CXcgkCeA.js";import{a5 as c,a6 as l,a7 as p,q as b}from"./index-DD9OmSLj.js";import"./mui-BI3ZId9r.js";import m from"./NotFoundScreen-C4hj38o6.js";import{h as f,g as u}from"./core-Ca6G0voE.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new e.Error().stack;a&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[a]="527d9e25-3d01-4280-b0c1-0c01931b4bab",e._sentryDebugIdIdentifier="sentry-dbid-527d9e25-3d01-4280-b0c1-0c01931b4bab")}catch{}})();const _=()=>{const e=f(),a=u(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),d=r.useCallback(()=>{(()=>{const n=b(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=c(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:d}):s.jsx(m,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./sentry-
|
|
1
|
+
import{a as r}from"./sentry-CXcgkCeA.js";import{u as l,h as m,g as p}from"./core-Ca6G0voE.js";import{ht as f,Mf as g,Mg as _}from"./zeni-epic-state-BIxjj87B.js";import{u as b,L as h,z as y}from"./index-DD9OmSLj.js";import"./liveblocks-4PIBJMyE.js";import"./recharts-D6NnjcYi.js";import"./mui-BI3ZId9r.js";import"./analytics-dJ9Vu0DH.js";import"./plaid-BFzM5Kog.js";import"./dnd-Be5WoH8E.js";import"./stripe-DMRn4zHo.js";import"./lottie-B7am_Gp2.js";import"./lexical-DTpvAJin.js";import"./pdf-DUHWpwzW.js";import"./utils-DFP_hVXq.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="ca071d2d-875c-46d5-a900-da06571bb95a",e._sentryDebugIdIdentifier="sentry-dbid-ca071d2d-875c-46d5-a900-da06571bb95a")}catch{}})();function R(){const e=l(),n=m(),o=p(),{setLoading:i,clearAllLoading:u}=b(),a=r.useRef(!1);return r.useLayoutEffect(()=>{i(h.CONNECTION_AUTH)},[i]),r.useEffect(()=>{if(a.current)return;a.current=!0;const s=new URLSearchParams(o.search).get("code"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),s!=null&&d!=null){const t=JSON.parse(d);e(f(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:s,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}u();const c=y.getActiveTenantForUser();n(c?.tenantEmailDomain!=null?`/${c.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})},[]),null}export{R as default};
|
|
@@ -0,0 +1,72 @@
|
|
|
1
|
+
import{j as a}from"./liveblocks-4PIBJMyE.js";import{i as S,n as x,h as C,g as y,u as ee,t as ae,j as E,N as te,o as ne,p}from"./core-Ca6G0voE.js";import{M8 as k,M9 as v,Ma as M,Bc as B,A_ as T,Mb as D,Mc as oe,Md as ie,B2 as se,fA as $,B9 as le,B6 as re}from"./zeni-epic-state-BIxjj87B.js";import{K as g,o as r,n as de,e as j,k as G,p as ce,q as me,r as pe,s as _,C as ue,U as he,v as xe,F as ge,y as fe,w as we,B as be,x as Se,H as ye,S as ke,D as ve,E as je,G as $e}from"./index-DD9OmSLj.js";import{n as m}from"./mui-BI3ZId9r.js";import f from"./NotFoundScreen-C4hj38o6.js";import{a as I}from"./sentry-CXcgkCeA.js";import"./recharts-D6NnjcYi.js";import"./analytics-dJ9Vu0DH.js";import"./plaid-BFzM5Kog.js";import"./dnd-Be5WoH8E.js";import"./stripe-DMRn4zHo.js";import"./lottie-B7am_Gp2.js";import"./lexical-DTpvAJin.js";import"./pdf-DUHWpwzW.js";import"./utils-DFP_hVXq.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]="8a25754c-f11e-4ca2-9db3-558a4d16fb0f",e._sentryDebugIdIdentifier="sentry-dbid-8a25754c-f11e-4ca2-9db3-558a4d16fb0f")}catch{}})();const Ie=m.div`
|
|
2
|
+
display: flex;
|
|
3
|
+
height: 100%;
|
|
4
|
+
width: 100%;
|
|
5
|
+
flex: 1 1 auto;
|
|
6
|
+
flex-direction: column;
|
|
7
|
+
align-items: center;
|
|
8
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
9
|
+
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
10
|
+
`,Ce=x(function(e){const t=k(e),n=v(e),{companyName:o}=t;return{companyName:o,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:t}},function(e,t){const{vendorId:n,billId:o}=t;return{onFetchBankName:i=>{e(T(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(B(i,"standard",n,o))},onACHDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(M({data:l}))}}})(de);function F(){const e=g(),{vendorId:t,billId:n}=S();return t==null||n==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(Ie,{windowSize:e,children:a.jsx(Ce,{vendorId:t,billId:n})})})}const Be=m.div`
|
|
11
|
+
display: flex;
|
|
12
|
+
height: 100vh;
|
|
13
|
+
width: 100%;
|
|
14
|
+
flex: 1 1 auto;
|
|
15
|
+
flex-direction: column;
|
|
16
|
+
align-items: center;
|
|
17
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
18
|
+
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
19
|
+
`,De=x(function(e,t){const{isSubPage:n}=t;return{addressToEdit:D(e),googleAPIKey:G.googleMapsAPIKey,isSubPage:n}},function(e,t){const{navigate:n,location:o}=t,i=()=>{const l=me(o.state?.pathnameStackToGoBack),s=l.poppedPathname??Pe();n(s,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const s=ze(l);e(oe({addressToCreate:s})),i()},onCancel:()=>{i()}}})(ce);function Ae({isSubPage:e}){const t=C(),n=y(),o=g();return a.jsx(a.Fragment,{children:a.jsx(Be,{windowSize:o,children:a.jsx(De,{location:n,navigate:t,isSubPage:e===!0,googleAPIKey:G.googleMapsAPIKey})})})}const Pe=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},ze=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng}),Le=m.div`
|
|
20
|
+
display: flex;
|
|
21
|
+
height: 100%;
|
|
22
|
+
width: 100%;
|
|
23
|
+
flex: 1 1 auto;
|
|
24
|
+
flex-direction: column;
|
|
25
|
+
align-items: center;
|
|
26
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
27
|
+
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
28
|
+
`,Ne=x(function(e){const t=k(e),n=v(e),o=D(e),{companyName:i}=t;return{companyName:i,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}},function(e,t){const{navigate:n,location:o,vendorId:i,billId:l}=t;return{onFetchBankName:s=>{e(T(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(s,"us-domestic",i,l))},onWireDetailsUpdated:s=>{const{bankAccountSection:d}=s;e(M({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("us-domestic","address"),d=_(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}})(pe);function Ee(){const e=C(),t=y(),n=g(),{vendorId:o,billId:i}=S();return o==null||i==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(Le,{windowSize:n,children:a.jsx(Ne,{location:t,navigate:e,vendorId:o,billId:i})})})}const Fe=m.div`
|
|
29
|
+
display: flex;
|
|
30
|
+
height: 100%;
|
|
31
|
+
width: 100%;
|
|
32
|
+
flex: 1 1 auto;
|
|
33
|
+
flex-direction: column;
|
|
34
|
+
align-items: center;
|
|
35
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
36
|
+
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
37
|
+
`,Me=x(function(e){const t=k(e),n=v(e),o=D(e),{companyName:i}=t;return{companyName:i,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}},function(e,t){const{navigate:n,location:o,vendorId:i,billId:l}=t;return{onFetchBankNameBySwift:s=>{e(se(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(s,"international",i,l,t.isLocalCurrencyEnabled))},onBankDetailsUpdated:s=>{const{internationalWireSwiftAccountSection:d}=s;e(ie({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("international","address"),d=_(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}})(xe);function Te(){const e=C(),t=y(),n=g(),{vendorId:o,billId:i}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:s}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||i==null?a.jsx(f,{}):a.jsx(Fe,{windowSize:n,children:a.jsx(Me,{location:t,navigate:e,vendorId:o,billId:i,isLocalCurrencyEnabled:s})})}const Ge={containerWidth:new je(100,58)},_e=m(ke)`
|
|
38
|
+
width: ${r.sp4};
|
|
39
|
+
height: ${r.sp4};
|
|
40
|
+
margin-bottom: ${r.sp3};
|
|
41
|
+
margin-top: ${r.sp3};
|
|
42
|
+
margin-left: ${r.sp8};
|
|
43
|
+
cursor: pointer;
|
|
44
|
+
position: absolute;
|
|
45
|
+
color: ${e=>e.theme.colors.brandColorJade};
|
|
46
|
+
`,Ke=m.div`
|
|
47
|
+
display: flex;
|
|
48
|
+
height: 100vh;
|
|
49
|
+
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
50
|
+
width: 100vw;
|
|
51
|
+
overflow-y: scroll;
|
|
52
|
+
background-color: ${e=>e.theme.colors.grey4};
|
|
53
|
+
`,Ve=m.div`
|
|
54
|
+
display: flex;
|
|
55
|
+
flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
|
|
56
|
+
flex-direction: column;
|
|
57
|
+
width: ${e=>`${Ge.containerWidth.value(e.windowSize)}%`};
|
|
58
|
+
${e=>e.windowSize!=="small"?"overflow: auto;":""}
|
|
59
|
+
box-shadow: ${e=>`0px 2px ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
|
|
60
|
+
padding-top: ${e=>e.windowSize!=="small"?r.sp2:"0px"};
|
|
61
|
+
`,He=m.div`
|
|
62
|
+
display: flex;
|
|
63
|
+
flex-direction: column;
|
|
64
|
+
align-items: center;
|
|
65
|
+
justify-content: center;
|
|
66
|
+
padding: ${e=>e.windowSize==="small"?r.sp3:`62px ${r.sp6} ${r.sp9} ${r.sp8}`};
|
|
67
|
+
height: ${e=>e.windowSize==="small"?"490px":"auto"};
|
|
68
|
+
overflow: ${e=>e.windowSize==="small"?"unset":"hidden"};
|
|
69
|
+
width: ${e=>e.windowSize=="small"?"auto":"42%"};
|
|
70
|
+
background-color: ${e=>e.windowSize==="small"?e.theme.colors.grey4:e.theme.colors.background};
|
|
71
|
+
margin-top: ${e=>e.windowSize==="small"?e.isAddressPage?"0px":"186px":"unset"};
|
|
72
|
+
`,Ue=x(function(e,t){return{file:t.file,type:t.type}})(ve);function h({appContent:e}){const t=ee(),n=y(),{tenantEmailDomain:o,vendorId:i,billId:l}=S(),[s]=ae(),d=s.get("token"),K=n.pathname.includes("address"),w=g(),V=ge(),A=fe(),b=we(),H=()=>{V.toggle()},U=E(u=>k(u)),W=E(u=>v(u)),{authParams:O,fetchState:c,billAttachment:q,billFetchState:P,companyName:J,currencySymbol:Q,amount:R}=U,{tenantId:z,userId:L,sessionId:N}=O,{fetchState:X,internationalBankAccountCreateStatus:Y}=W;return I.useEffect(()=>{$()},[]),I.useEffect(()=>{b&&c==="Not-Started"&&i!=null&&o!=null&&d!=null&&t(le(i,o,d))},[b,c,i,o,d,t]),I.useEffect(()=>{b&&c==="Completed"&&($(L,N,z),l!=null&&t(re(l)))},[c,b,L,N,z,l,t]),c==="Error"?a.jsx(f,{}):X==="Completed"||Y.fetchState==="Completed"?($(),a.jsx(te,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?a.jsx(be,{fetchState:c,style:{height:"100vh",backgroundColor:A.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${A.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[c==="Completed"&&P==="Completed"&&a.jsx(Se,{analytics:j,onLoad:u=>(Z=>Z.trackBillPayMagicLinkPageLoad(o??"",i??"",J,l??"",We(n.pathname),Q,R))(u)}),a.jsxs(Ke,{windowSize:w,children:[w!=="small"?a.jsx(_e,{onClick:H}):null,a.jsx(He,{windowSize:w,isAddressPage:K,children:P==="In-Progress"?a.jsx(ye,{size:"ExtraLarge",start:!0}):a.jsx(Ue,{file:q,type:"bill"})}),a.jsx(Ve,{windowSize:w,children:e})]})]})}const We=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function Oe(){return a.jsx($e,{})}function da(){return a.jsxs(ne,{children:[a.jsx(p,{path:"bank/account/save/success",element:a.jsx(Oe,{})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:a.jsx(h,{appContent:a.jsx(Ae,{isSubPage:!0})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:a.jsx(h,{appContent:a.jsx(Ee,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:a.jsx(h,{appContent:a.jsx(Te,{})})}),a.jsx(p,{path:"*",element:a.jsx(f,{})})]})}export{da as default};
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import{j as u}from"./liveblocks-4PIBJMyE.js";import{a as g}from"./sentry-CXcgkCeA.js";import{u as M,g as O,h as V,t as _,j as l,N as T}from"./core-Ca6G0voE.js";import{z as r,y as w,a as A,f as P,e as N,g as W,V as $,H,h as R}from"./index-DD9OmSLj.js";import{eX as X,LV as Y,M3 as q,LW as B,fA as G,g0 as J,L$ as K,go as Q,cY as Z,M4 as ee,M5 as te}from"./zeni-epic-state-BIxjj87B.js";import{n as ne}from"./mui-BI3ZId9r.js";import{u as se}from"./useDeviceId-BbYF3u-l.js";import{f as ie}from"./analyticsHelper-B2nQzr20.js";import{t as ae}from"./getLocaleForTenant-DVEihZ-H.js";import"./recharts-D6NnjcYi.js";import"./analytics-dJ9Vu0DH.js";import"./plaid-BFzM5Kog.js";import"./dnd-Be5WoH8E.js";import"./stripe-DMRn4zHo.js";import"./lottie-B7am_Gp2.js";import"./lexical-DTpvAJin.js";import"./pdf-DUHWpwzW.js";import"./utils-DFP_hVXq.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new t.Error().stack;i&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[i]="0073e5d0-6300-457d-b984-13d3f4b5dd38",t._sentryDebugIdIdentifier="sentry-dbid-0073e5d0-6300-457d-b984-13d3f4b5dd38")}catch{}})();const x=(t,i)=>t!=null&&t.length>0&&i==="magic_links";function xe(){const t=M(),i=O(),m=V(),[y]=_(),n=y.get("token"),p=y.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),a=se(),{otpChallenge:d,twoFAPhoneNumber:z,magicLinkEmail:c,verifyDeviceFetchState:C,resendVerifyDeviceOTPFetchState:D}=l(e=>e.tenantState),S=l(e=>e.tenantState.fetchState),k=l(e=>e.tenantState.activeTenantFetchState.fetchState),h=l(e=>e.tenantState.signInState),I=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>X(e)),b=l(e=>Y(e)),E=r.getSignedInUser(),v=w().mode;g.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&x(n,p)&&a!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(q(n,a,f)))},[n,p,t,a,f,s?.zeniSessionId]),g.useEffect(()=>{h!=="In-Progress"||S!=="Completed"&&k!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(B(b.tenantsInOrder),s.zeniSessionId),G(s.userId,s.zeniSessionId,o.tenantId),t(J(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(K("Completed")),A.updateAppLocaleID(ae(o)),ie(s,o,v,void 0,b.tenantsInOrder),Q().then(()=>{const e=R();e!=null&&P(e)}),setTimeout(()=>{N.trackLogin(W.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[h,S,k,s,o,b,v,i.state,t]);const U=g.useCallback(()=>{m("/signin/auth")},[m]),j=g.useCallback(()=>{a!=null&&d!=null&&c!=null&&t(ee(a,c,d))},[a,d,t,c]),F=g.useCallback(e=>{a!=null&&n!=null&&c!=null&&d!=null&&t(te(e,a,c,d))},[a,n,t,c,d]);if(I==="Completed"&&d!=null)return u.jsx($,{phoneNumber:z,verifyOtpFetchState:C.fetchState,resendVerifyDeviceOTPFetchState:D,onResendOtp:j,onVerifyOtp:F,onCancelVerifyDevice:U});if(h==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=i.state?.origin??"/";return u.jsx(T,{to:e,state:{...i.state,origin:""}})}if(!x(n,p)||f==null||I==="Error"){const e=i.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...i.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||I==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(H,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
|
+
position: fixed;
|
|
3
|
+
top: 0;
|
|
4
|
+
left: 0;
|
|
5
|
+
right: 0;
|
|
6
|
+
bottom: 0;
|
|
7
|
+
display: flex;
|
|
8
|
+
align-items: center;
|
|
9
|
+
justify-content: center;
|
|
10
|
+
z-index: 9999;
|
|
11
|
+
background-color: ${t=>t.theme.colors.background};
|
|
12
|
+
`;export{xe as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as N}from"./liveblocks-
|
|
1
|
+
import{j as N}from"./liveblocks-4PIBJMyE.js";import{a as c}from"./sentry-CXcgkCeA.js";import{u as fe,j as n,i as Ye,g as We,h as Xe,l as P}from"./core-Ca6G0voE.js";import{eX as me,fF as qe,fG as be,fr as Ke,bn as Qe,eW as Je,fH as ea,fI as aa,fK as ta,fN as na,fO as g,fQ as sa,fR as de,fU as oa,fS as ia,fT as ra,fV as da,cN as la,fX as ca,cT as ua,fq as fa,g0 as ma,g1 as ba,f$ as pa}from"./zeni-epic-state-BIxjj87B.js";import{a9 as ha,aa as Sa,F as ga,C as Ea,z as k,w as ka,u as Ca,U as r,i as ya,d as Ia,ab as Ta,j as wa,c as Aa,ac as _a,a5 as Fa,ad as Da,ae as va,af as le,ag as ce,L as $a,ah as Ga,ai as ue,e as R,a1 as Ma,s as w,aj as x,ak as Pa}from"./index-DD9OmSLj.js";import{D as Ra}from"./mui-BI3ZId9r.js";(function(){try{var f=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new f.Error().stack;d&&(f._sentryDebugIds=f._sentryDebugIds||{},f._sentryDebugIds[d]="02407b25-fb44-47a4-8b29-aef7cfd3f263",f._sentryDebugIdIdentifier="sentry-dbid-02407b25-fb44-47a4-8b29-aef7cfd3f263")}catch{}})();const xa=ha(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=Ye(),a=We(),C=ga(),o=Xe(),U=Ke(),m=fe(),{useFeatureGate:i}=Ea(),V=k.getSignedInUser(),B=Qe(V),s=n(e=>me(e)),pe=s.masterTOSInfo?.isMasterTOSAccepted??!1,O=n(e=>Je(e)),j=O.uiState.currentChatSessionId,y=ka(),{setLoading:he}=Ca(),[A,L]=c.useState(void 0),_=P("/:tenantEmailDomain/dashboard")!==null,z=P("/:tenantEmailDomain/reports")!==null,I=P("/:tenantEmailDomain/onboarding/*")!==null,Se=!!s.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:ge}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:Z}=i(r.isDebitCardFeatureEnabled),Ee=ya(s,ge,Z),{isFeatureEnabled:ke}=i(r.isSettingsFeatureEnabled),H=n(e=>ea(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),F=n(e=>aa(e));c.useEffect(()=>{y&&T&&!I&&F.fetchState==="Not-Started"&&m(ta(!0))},[y,T,F.fetchState,I]);const h=k.getSignedInUser(),D=n(e=>e.tenantState),Ce=n(e=>D.fetchState==="Completed"?na(e):[]),E=n(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:ye}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Ie}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:Te}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:we}=i(r.isExpenseAutomationEnabledV2),Y=Ia(),{isFeatureEnabled:Ae}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:_e}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarNewYearAnimationEnabled),v=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ve}=i(r.isTaskManagerCustomerUserAccessEnabled),$e=B||!B&&ve,Ge=n(e=>g(e).totalUnreadCount),Me=n(e=>g(e).reducedFetchCountState),W=n(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),X=n(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Pe=n(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),$=n(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:q,isLoading:K,isFetchingMore:Q,hasFetchedAll:J,fetchMore:Re}=Ta();c.useEffect(()=>{const e=setTimeout(()=>Re?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(K===!1&&Q===!1&&J===!0)if(s?.companyId!=null&&q!=null){const e=`dashboard_${s.companyId}`;L(q.filter(u=>u.roomId===e&&u.readAt==null).length)}else L(0)},[K,Q,J]),c.useEffect(()=>{y&&!I&&Pe.fetchState==="Not-Started"&&U.tenantId!=null&&m(sa("task_manager","dashboard"))},[y,U.tenantId]),c.useEffect(()=>{I||$.fetchState!=="Not-Started"||m(de({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{A!=null&&$.fetchState==="In-Progress"&&(m(de({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(be({unreadCount:A},"comments")))},[A,$.fetchState]);const xe={fetchStatus:Me,count:Ge},ee=t!=null?k.getSignedInUserTenant(t):null,ae=n(e=>ee?.tenantId!=null?oa(e,ee.tenantId):void 0),S=[];ye===!1&&S.push("accounts_payable_aging"),Ie===!1&&S.push("accounts_receivable_aging"),S.push("zeni_accounts_promo_card","treasury_promo_card"),T===!1&&S.push("rewards_card"),Y===!1&&S.push("expense_automation_card");const Ne=wa(),te=n(e=>ia(e,S,h,we,Te).fetchState),ne=n(e=>ra(e).fetchState),Ue=_&&(te==="Completed"||te==="Error")||z&&(ne==="Completed"||ne==="Error")||!_&&!z?void 0:"disabled",Ve=c.useMemo(()=>da(s.userRole),[s.userRole]),Be=la(Ve),Oe=s?.rewardsLastViewedTime==null,je=h?.userEmail!=null&&H.fetchState==="Completed"&&ca(H.notificationSettings,h.userEmail,Z,s),se=Aa(),Le=se&&_a(a),oe=ua(Ne?.loggedInUserRoleMap),ie=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,G=c.useCallback(()=>v&&oe&&!k.getTreasuryPopupSeen(t??"")&&ie===!1&&Fa(a.pathname)!=="treasury",[v,oe,ie,a.pathname,t]),[ze,re]=c.useState(G);c.useEffect(()=>{re(G())},[G]);const Ze=n(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,He=Da(Ze);return N.jsx(Ra,{container:window.document.body,variant:"temporary",open:f,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:N.jsx(va,{signedInUser:V,currentTenantId:D.currentTenantId??"",tenants:D.fetchState==="Completed"?Ce:ae!=null?[ae]:[],currentTenant:s,isTenantDropdownDisabled:Ue,isSettings:ce(a),isSettingsFeatureEnabled:ke,isVendorsTabVisible:Be,isZeniAccountEnabled:Se,isChargeCardEnabled:Ee,isTreasuryEnabled:v,treasuryYieldPercentage:He,isTreasuryPopupVisible:ze,isNotificationsTabVisible:je,notificationCountDetails:xe,isExpenseAutomationEnabledForUser:Y,selectedMenu:le(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Oe,rewardsPlan:F.rewardsPlan},isAiCfoAccessEnabled:se,onNotificationIconClick:()=>{d(!1);let e=W===0&&X>0?"notifications/comments":"notifications/tasks";ce(a)&&(e=W===0&&X>0?"../../notifications/comments":"../../notifications/tasks");const u=w(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=w(a.state?.pathnameStackToGoBack,a.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),t==null)return;if(e.type==="ai_cfo"){if(R.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),!pe)return void Ma({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const p=w(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:p,referrer:"Sidebar"}})}const u=w(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,b=x(l)&&l!=="command_center";if(x(e.type)&&E[s.tenantId]!=null&&R.trackMonthEndCloseClicked(E[s.tenantId].month,E[s.tenantId].year,"Sidebar"),b&&E[s.tenantId]!=null){const p=E[s.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${p.month}-${p.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const M=Pa(e.type);ue(e.type)?(j!=null&&m(pa()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${M}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${t}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${t}/rewards`)},handleBackClick:()=>{o(`/${t}/dashboard`)},handleTenantSelect:e=>{he($a.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=le(a);let b=`/${encodeURIComponent(u)}/`;const M=x(l);l==="home"?b+="dashboard":l==="users_and_roles"?b+="people":Ga(l)?b+="settings/my_profile":ue(l)?b+=`ai-cfo/${l}`:b+=l==="task_checklist"?"tasks":M?"month_end_close_checks/review":encodeURIComponent(l),o(b,{replace:!0}),h!=null&&(m(ma(e.tenantId)),m(ba(h.userId,e.tenantId,h.zeniSessionId)));const p=e;R.trackCompanySwitch(p.companyId,p.companyName,p.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),re(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Le,aiCfoView:O,isOnDashboard:_,updateCurrentChatSessionId:e=>{m(fa({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:Ae,isTaskManagerAccessEnabled:$e,thanksGivingAnimationEnabled:_e,christmasAnimationEnabled:Fe,newYearAnimationEnabled:De})})}),La=f=>{const d=fe(),t=n(C=>me(C)),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Sa(o)&&qe(o.mode)==="dashboard"&&d(be({unreadCount:o.data.unread},"tasks"))}};return N.jsx(xa,{...f,...a})};export{La as M};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as r}from"./liveblocks-4PIBJMyE.js";import{h as n,n as e}from"./core-Ca6G0voE.js";import{R as i}from"./index-DD9OmSLj.js";import"./mui-BI3ZId9r.js";import"./sentry-CXcgkCeA.js";import"./zeni-epic-state-BIxjj87B.js";import"./recharts-D6NnjcYi.js";import"./analytics-dJ9Vu0DH.js";import"./plaid-BFzM5Kog.js";import"./dnd-Be5WoH8E.js";import"./stripe-DMRn4zHo.js";import"./lottie-B7am_Gp2.js";import"./lexical-DTpvAJin.js";import"./pdf-DUHWpwzW.js";import"./utils-DFP_hVXq.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="9ceba748-25d5-4d32-9a3c-da4194015415",o._sentryDebugIdIdentifier="sentry-dbid-9ceba748-25d5-4d32-9a3c-da4194015415")}catch{}})();const a=e(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(i);function _(){const o=n();return r.jsx(a,{navigate:o})}export{_ as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{l as ct,a as mt,m as dt,j as E}from"./liveblocks-4PIBJMyE.js";import lt from"./NotFoundScreen-C4hj38o6.js";import{a as k}from"./sentry-CXcgkCeA.js";import{h as ft,g as ut,i as ht,u as pt,j as S,n as kt,o as gt,p as q}from"./core-Ca6G0voE.js";import{cu as St,fH as Y,eX as H,fV as bt,fO as b,SW as J,fR as d,fG as y,so as M,xU as It,SX as Ct,fF as Tt,fX as yt,st as _t,SY as F,bo as $,fz as w,sx as O,SZ as At,cG as Et,cz as Nt}from"./zeni-epic-state-BIxjj87B.js";import{_ as xt,z as Bt,C as wt,U as Rt,a0 as Ut,cY as Gt,s as N,a9 as Dt,cZ as vt,aa as Pt,q as Ft}from"./index-DD9OmSLj.js";import"./mui-BI3ZId9r.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-CSLK93Wz.js";import"./recharts-D6NnjcYi.js";import"./analytics-dJ9Vu0DH.js";import"./plaid-BFzM5Kog.js";import"./dnd-Be5WoH8E.js";import"./stripe-DMRn4zHo.js";import"./lottie-B7am_Gp2.js";import"./lexical-DTpvAJin.js";import"./pdf-DUHWpwzW.js";import"./utils-DFP_hVXq.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="3d0a9c43-8cad-4f1e-9da4-aa68ffc0765e",t._sentryDebugIdIdentifier="sentry-dbid-3d0a9c43-8cad-4f1e-9da4-aa68ffc0765e")}catch{}})();const Mt=(t,l)=>new Promise((n,u)=>{const g=t.map(i=>new Promise(s=>{l(i),s()}));Promise.all(g).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),jt=kt(function(t,l){const n=Y(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=H(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:x,fetchMoreCommentsNotifications:R}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(O("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(x(a),t(F([a],$())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!Et(g)&&(r="not-found"),c[1].startsWith("bill")&&!Nt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(J(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(At(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(M("task_manager","dashboard",m))}else R?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(O("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(x(r),t(F([r],$())))})).then(()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,x).then(()=>{t(F(s,$())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=Ft(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(Dt(vt)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=xt(),i=St(u??""),s=pt(),h=Bt.getSignedInUser(),[x,R]=k.useState(!1),a=S(e=>Y(e)),o=S(e=>H(e)),{useFeatureGate:m}=wt(),{isFeatureEnabled:c}=m(Rt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=$t({mobileExploreReferrer:"Notifications"});Ut({isDataReady:!0});const K=bt(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),V=S(e=>b(e).currentTab),U=S(e=>b(e).currentSubTab),Q=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),G=S(e=>b(e).notificationDetailsByTab.comments.fetchState),tt=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),et=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),at=Gt().allUsers,{inboxNotifications:B,isLoading:_,hasFetchedAll:C,isFetchingMore:D,fetchMore:ot}=ct(),{threads:z,isLoading:W,fetchMore:L,isFetchingMore:X,hasFetchedAll:Z}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(V!==i&&i!=null&&s(J(i)),i==null){const e=`../${V}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{Q.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(_===!1&&C===!0&&o?.companyId!=null&&B!=null){const e=`dashboard_${o.companyId}`,p=B.filter(T=>T.roomId===e&&T.readAt==null).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}},[_,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>ot?.(),0);return()=>clearTimeout(e)});const v=_||D===!0||C!==!0||_||D===!0||C!==!0;k.useEffect(()=>{v&&G!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):v||G!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[v,G]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&x===!1&&(R(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(_===!1&&W===!1&&B!=null&&z!=null){const e=`dashboard_${o.companyId}`,p=B.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),A=p.map(f=>f.id),it=p.map(f=>{const P=z.find(rt=>rt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(X||Z===!0||L==null||L(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:A},"comments")),s(y({totalCount:A.length,unreadCount:T.length},"comments")),s(Ct(it))}},[_,D,X,C,Z,W,B?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Pt(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const A=[];U==="all"?A.push("read","unread"):U!=="mentions"&&A.push(U),s(M("task_manager",T,A,!0))}}}},nt=dt();return E.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:K,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return E.jsxs(gt,{children:[E.jsx(q,{path:"/:selectedTab",element:E.jsx(Vt,{})}),E.jsx(q,{path:"*",element:E.jsx(lt,{})})]})}export{ne as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-
|
|
1
|
+
import{j as m}from"./liveblocks-4PIBJMyE.js";import{a as r}from"./sentry-CXcgkCeA.js";import{u as T,g as j,j as o,N as A}from"./core-Ca6G0voE.js";import{Mi as C,eX as N,fN as P,Mj as x,Mk as z,Ml as D,Mm as L,o9 as R,Lf as k}from"./zeni-epic-state-BIxjj87B.js";import{z as h,N as I}from"./index-DD9OmSLj.js";import"./mui-BI3ZId9r.js";import"./recharts-D6NnjcYi.js";import"./analytics-dJ9Vu0DH.js";import"./plaid-BFzM5Kog.js";import"./dnd-Be5WoH8E.js";import"./stripe-DMRn4zHo.js";import"./lottie-B7am_Gp2.js";import"./lexical-DTpvAJin.js";import"./pdf-DUHWpwzW.js";import"./utils-DFP_hVXq.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="d4b3d738-22df-419b-86a9-b3eb4b68f218",n._sentryDebugIdIdentifier="sentry-dbid-d4b3d738-22df-419b-86a9-b3eb4b68f218")}catch{}})();function ee(){const n=T(),s=j(),{params:t,error:i}=r.useMemo(()=>C(s.search),[s.search]),b=r.useMemo(()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application",[s.search,t]),f=h.isSignedIn(),a=h.getSignedInUser(),p=o(e=>N(e)),l=o(e=>P(e)),d=o(e=>e.tenantState.fetchState),w=o(x),y=o(z),u=o(D),[v,S]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(L())},[n,s.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{f&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(R(a.userId,a.zeniSessionId??void 0))))},[f,a,d,n]),r.useEffect(()=>{u!=null&&u!==""&&(window.location.href=u)},[u]);const M=r.useMemo(()=>{if(p?.tenantId!=null)return p.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(U=>U.tenantId===e)?e:l.length===1?l[0].tenantId:null},[p?.tenantId,l]),c=v??M;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):f?m.jsx(I,{variant:"signed_in",clientName:b,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:c,onSelectTenant:S,approveError:E??y,isApproving:w==="In-Progress",showAllowButton:c!=null,onApprove:()=>{t!=null&&a!=null&&c!=null&&n(k(a.userId,a.zeniSessionId??void 0,c,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(A,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as n}from"./liveblocks-4PIBJMyE.js";import{h as z,u as H,g as K,i as Q,j as d,n as X,o as Z,p as I}from"./core-Ca6G0voE.js";import{eX as U,sc as P,rM as J,MP as v,rH as S,bs as ee,bn as ae,bY as te,rI as se,MQ as oe,MC as C,dK as re,vR as ne,MR as ie,wc as ce,fE as le,fC as de}from"./zeni-epic-state-BIxjj87B.js";import{z as me,_ as fe,a0 as pe,j as ue,C as O,U as w,x as he,e as $,ap as ge,s as Fe}from"./index-DD9OmSLj.js";import"./mui-BI3ZId9r.js";import be from"./NotFoundScreen-C4hj38o6.js";import{F as Ie}from"./FeaturePreviewScreen-CPre8DhJ.js";import{a as g}from"./sentry-CXcgkCeA.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-CSLK93Wz.js";import{u as Se}from"./useInitialThreadRequest-B6-oXb8Z.js";import{t as Te}from"./routePaths-BumbtdKN.js";import{M as ye}from"./MobileAppDrawer-CNkPd-0r.js";import"./recharts-D6NnjcYi.js";import"./analytics-dJ9Vu0DH.js";import"./plaid-BFzM5Kog.js";import"./dnd-Be5WoH8E.js";import"./stripe-DMRn4zHo.js";import"./lottie-B7am_Gp2.js";import"./lexical-DTpvAJin.js";import"./pdf-DUHWpwzW.js";import"./utils-DFP_hVXq.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]="aa6b3d09-552f-41a9-9ed1-6e2256a33eff",s._sentryDebugIdIdentifier="sentry-dbid-aa6b3d09-552f-41a9-9ed1-6e2256a33eff")}catch{}})();const T=(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=X(function(s){const e=oe(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{a[r]=o[r]===!1}),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:$}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(v(a,o)),e.isPandLReportFetched(a)||s(S(a)),T(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ce(a))},onForecastVsActualsCompareToggle:a=>{s(ie(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ne(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,i;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=re(o)):o.balanceTimeFrame==="year"?(r="quarter",i={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),i!=null&&r!=null){const m=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,i),u=Fe(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(m,{state:{pathnameStackToGoBack:u,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}})(ge);function M(){const s=z(),e=H(),a=K(),{forecastId:o,tenantEmailDomain:r}=Q(),[i,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),y=d(t=>U(t)),_=y.company?.companyInfo.firstMonthOfFY??1,c=d(t=>P(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),x=d(t=>t.profitAndLossState),A=d(t=>t.reportUIOptionsState.selectedForecast),k=t=>x.pandLByForecastID[t]!=null&&se(t,x).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();pe({isDataReady:l});const{isAiCfoAccessEnabled:B,onAskAiCfoClick:N}=Ce({mobileExploreReferrer:"Forecast"});g.useEffect(()=>{if(!i&&F)p(!0),l||e(J());else if(l&&!m){u(!0);const t=((f,L,R)=>L!=null?f.forecasts.findIndex(b=>b.id===L):R!=null?f.forecasts.findIndex(b=>b.id===R):f.forecasts.length>0?0:-1)(c,o,A?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=A?.index?(e(v(c.forecasts[t].id,t)),T(o,c.forecasts[t].id,s,a.search)):o==null&&t!==-1&&T(void 0,c.forecasts[t].id,s,a.search),t!==-1&&!k(c.forecasts[t].id)&&F&&e(S(c.forecasts[t].id))}},[i,p,e,l,c,m,u,P,S,F]);const D=ue(),W=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:q}=O(),{isFeatureEnabled:j}=q(w.isReportsCommentingEnabled),G=Se(j?y?.companyId:void 0,{clearParams:l&&m}),[Y,V]=g.useState(!1),E=t=>{V(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:$,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:Y,handleDrawerToggle:E}),n.jsx(xe,{firstMonthOfFY:_,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:k,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:W,isAiCfoAccessEnabled:B,onAskAiCfoClick:N,isReportsCommentingEnabled:j,isZeniUser:ae(h),initialOpenThreadRequest:G,onClickMenuIcon:()=>{E(!0)}})]})}function Ve(){const s=d(i=>U(i)),{useFeatureGate:e}=O(),{isFeatureEnabled:a}=e(w.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(Z,{children:[n.jsx(I,{path:"/",element:n.jsx(M,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(M,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{Ve as PandLWithForecastRoutes,Ve as default};
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
import{j as a}from"./liveblocks-4PIBJMyE.js";import{ML as ne,eX as Q,kx as G,fE as Y,fC as oe,Kd as q,Mp as ie,uO as ke,MM as N,uD as Ee,uY as Pe,uS as re,uH as le,uW as je,uT as Le,MN as ce,wD as Te,fo as ve,ge as Oe,MO as H,uL as de,uK as pe,u$ as Ae,c6 as Re}from"./zeni-epic-state-BIxjj87B.js";import{K as ue,C as ee,U as _,z as W,i as me,M as ge,I as fe,al as he,am as Fe,E as Ce,o as F,J as ye,a as be,an as Ve,_ as Ze,a0 as Ue,x as Be,e as Se,g as $e,s as Me,ao as He,j as _e}from"./index-DD9OmSLj.js";import{D as we,n as J,S as xe}from"./mui-BI3ZId9r.js";import se from"./NotFoundScreen-C4hj38o6.js";import{a as c}from"./sentry-CXcgkCeA.js";import{u as ae,i as Ke,j as g,h as ze,g as Ge,n as We,o as te,p as M}from"./core-Ca6G0voE.js";import{u as Je}from"./useAskAiCfoHostNavButtonProps-CSLK93Wz.js";import{M as Xe}from"./MobileAppDrawer-CNkPd-0r.js";import"./recharts-D6NnjcYi.js";import"./analytics-dJ9Vu0DH.js";import"./plaid-BFzM5Kog.js";import"./dnd-Be5WoH8E.js";import"./stripe-DMRn4zHo.js";import"./lottie-B7am_Gp2.js";import"./lexical-DTpvAJin.js";import"./pdf-DUHWpwzW.js";import"./utils-DFP_hVXq.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]="618acd45-686a-4c10-8228-08ecff87c96d",e._sentryDebugIdIdentifier="sentry-dbid-618acd45-686a-4c10-8228-08ecff87c96d")}catch{}})();const Ne={overlayWidth:new Ce(100,100,48)},K=be.getLocalizedStrings().peoplePage.invitePage,Qe=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=ue(),m=ae(),[V,Z]=c.useState(!1),[k,S]=c.useState(!1),{userId:w}=Ke(),r=g(l=>ne(l)),p=g(l=>Q(l)),E=g(l=>G(l)),{useFeatureGate:D}=ee(),{isFeatureEnabled:I}=D(_.isDebitCardFeatureEnabled),P=Y(I,p),T=oe(p),v=q(p),U=ie(p),B=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!P&&E&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(N()),b()},O=()=>{V===!0?S(!0):C()},$=d.companyView?.controllers?.map(l=>l.user),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=D(_.isChargeCardFeatureEnabled),L=me(p,j,I),{isCardsHidden:A}=ge(p?.tenantId),y=!L||A,R=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:v,isAccountingClassesEnabled:E,isReimbursementDisabled:B===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:R===!1,isLiteRoleDisabled:U===!1,isBankingOnlyTenant:P,isCardsOnlyTenant:T,onResetClick:C,onDeleteUser:l=>{m(le(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(re({peopleLocalData:l})),Z(!0)},onSaveClick:()=>{m(f==="zeni_only"?Ee(e):Pe(v))},onCloseClick:O,isLoading:x||r.person==null},o={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return c.useEffect(()=>{x===!1&&w!=null&&m(ke(w))},[x,w]),c.useEffect(()=>{r.updatePersonState.fetchState==="Completed"&&C()},[r.updatePersonState.fetchState]),a.jsx(we,{anchor:"right",open:i,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:fe.overlayDark,cursor:"pointer"}}},onClose:O,children:a.jsxs(Ye,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(he,{titleComponent:a.jsx(De,{children:K.discardTitle}),descriptionComponent:a.jsx(Ie,{children:K.discardDescription}),primaryButtonText:K.discard,secondaryButtonText:K.no,action:o,isEditPopup:!0}):null,a.jsx(Fe,{...s})]})})},Ye=J(xe)`
|
|
2
|
+
display: flex;
|
|
3
|
+
min-height: 100%;
|
|
4
|
+
flex-direction: column;
|
|
5
|
+
`,De=J(ye.H6Regular)`
|
|
6
|
+
margin-top: ${F.sp7};
|
|
7
|
+
padding-left: ${F.sp8};
|
|
8
|
+
padding-right: ${F.sp8};
|
|
9
|
+
color: ${e=>e.theme.colors.primary};
|
|
10
|
+
word-break: break-word;
|
|
11
|
+
`,Ie=J(ye.LargeRegularSp)`
|
|
12
|
+
color: ${e=>e.theme.colors.hero};
|
|
13
|
+
padding-left: ${F.sp8};
|
|
14
|
+
padding-right: ${F.sp8};
|
|
15
|
+
margin-bottom: 30px;
|
|
16
|
+
margin-top: ${F.sp4};
|
|
17
|
+
white-space: pre-line;
|
|
18
|
+
`,qe={overlayWidth:new Ce(100,100,48)},z=be.getLocalizedStrings().peoplePage.invitePage,ea=({companyId:e,managersListView:t,companyPassportView:d,classListView:n,mode:f,isInvitePeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=ue(),m=ae(),[V,Z]=c.useState(!1),[k,S]=c.useState(!1),w=g(o=>ne(o)),r=g(o=>Q(o)),p=g(o=>G(o)),{useFeatureGate:E}=ee(),{isFeatureEnabled:D}=E(_.isDebitCardFeatureEnabled),I=Y(D,r),P=oe(r),T=q(r),v=ie(r),U=!!r.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,B=!I&&p&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||d.fetchState!=="Completed"||e==null;if(W.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{b(),m(N())},C=()=>{V===!0?S(!0):x()},O={onOkClick:()=>{S(!1),x()},onCancelClick:()=>{S(!1)}},$=d.companyView?.controllers.map(o=>o.user),u=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:j}=E(_.isChargeCardFeatureEnabled),L=me(r,j,D),{isCardsHidden:A}=ge(r?.tenantId),y=!L||A,R=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:T,onPeopleLocalDataUpdated:o=>{m(re({peopleLocalData:o})),Z(!0)},onResetClick:x,onSaveClick:()=>{m(f==="zeni_only"?je(e):Le())},onCloseClick:C,peopleDetails:w,isAccountingClassesEnabled:p,isReimbursementDisabled:U===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:R===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:P,isLoading:B};return c.useEffect(()=>{w.invitePersonState.fetchState==="Completed"&&(b(),m(N()))},[w.invitePersonState.fetchState]),a.jsx(we,{anchor:"right",open:i,PaperProps:{style:{width:qe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:fe.overlayDark,cursor:"pointer"}}},onClose:C,children:a.jsxs(aa,{onClick:o=>o.stopPropagation(),children:[k===!0?a.jsx(he,{titleComponent:a.jsx(De,{children:z.discardTitle}),descriptionComponent:a.jsx(Ie,{children:z.discardDescription}),primaryButtonText:z.discard,secondaryButtonText:z.no,action:O}):null,a.jsx(Ve,{...s})]})})},aa=J(xe)`
|
|
19
|
+
display: flex;
|
|
20
|
+
min-height: 100%;
|
|
21
|
+
flex-direction: column;
|
|
22
|
+
`,sa=We(function(e,t){const d=ce(e),n=W.getSignedInUser();return{data:d,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:G(e),analytics:Se}},function(e,t){const{navigate:d,companyId:n,shouldFetchClasses:f}=t;return{personAction:{onPersonDelete:(i,b)=>{e(le(i,b))},onResendInvite:i=>{e(Ae(i))},onReloadPeople:()=>{e(de()),e(pe(n,f))},onBackClick:()=>{d("../../")},onModeChange:i=>{e(H({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(H({searchText:i}))}}}})(He);function X({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:t}){const d=ze(),n=ae(),f=Ge(),{areTenantIdsInSync:i}=Ze(),b=W.getSignedInUser(),h=g(s=>Q(s)),{useFeatureGate:m}=ee(),{isFeatureEnabled:V}=m(_.isDebitCardFeatureEnabled),Z=g(s=>G(s)),k=!Y(V,h)&&Z,S=q(h),w=h?.tenantId,{tenantEmailDomain:r}=h,[p,E]=c.useState(!1),[D,I]=c.useState(!1),[P,T]=c.useState(!1),[v,U]=c.useState("off"),[B,x]=c.useState(!1),C=s=>{x(s)},{isAiCfoAccessEnabled:O,onAskAiCfoClick:$}=Je({mobileExploreReferrer:"People"}),u=g(s=>ce(s));Ue({isDataReady:u.fetchState==="Completed"});const j=g(s=>Te(s.classState,s.classListState)),L=g(s=>ve(s.userState,s.userRoleState,s.userListViewState,"manager")),A=g(s=>Oe(s)),y=h?.companyId;c.useEffect(()=>{p&&v===u.uiState.mode||!i||(n(H({searchText:"",sortKey:"name",sortOrder:"ascending"})),U(u.uiState.mode),E(!0),n(de()))},[p,b,w,n,u.uiState.mode,i]),c.useEffect(()=>{y!=null&&i&&n(pe(y,k))},[y,k,i]),c.useEffect(()=>{I(e!=null&&e===!0),T(t!=null&&t===!0&&t)},[e,t]),c.useEffect(()=>{n(H({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const R=()=>{I(!1),T(!1),d("../")};return a.jsxs(a.Fragment,{children:[u.fetchState==="Completed"?a.jsx(Be,{analytics:Se,onLoad:s=>s.trackPageLoaded($e.Event.members)}):null,D===!0?a.jsx(ea,{closeDrawerHandler:R,isInvitePeopleDrawerOpen:D,managersListView:L,companyPassportView:A,classListView:j,companyId:y,mode:u.uiState.mode}):null,P===!0?a.jsx(Qe,{closeDrawerHandler:R,isEditPeopleDrawerOpen:P,managersListView:L,companyPassportView:A,classListView:j,companyId:y,mode:u.uiState.mode}):null,a.jsx(Xe,{isAppContentDrawerOpen:B,handleDrawerToggle:C}),a.jsx(sa,{navigate:d,signedInUser:b,isZeni:h.isZeni,isZeniTenant:S,peopleUIState:u.uiState,companyId:y,shouldFetchClasses:k,classList:j,managersView:L,peopleView:u,onInvitePeopleClick:()=>{d("./new")},onColumnSortConfigChanged:(s,o)=>{n(H({sortKey:s,sortOrder:o}))},onRowClick:s=>{const o=`/${r}/people/${encodeURIComponent(s)}/edit`,l=Me(f.state?.pathnameStackToGoBack,f.pathname);d(o,{state:{pathnameStackToGoBack:l}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:O,onAskAiCfoClick:$})]})}function wa(){const e=_e();return Re(e?.loggedInUserRole??[])?a.jsxs(te,{children:[a.jsx(M,{path:"/",element:a.jsx(X,{})}),a.jsx(M,{path:"new",element:a.jsx(X,{isInvitePeopleDrawerOpen:!0})}),a.jsx(M,{path:":userId/edit",element:a.jsx(X,{isEditPeopleDrawerOpen:!0})}),a.jsx(M,{path:"*",element:a.jsx(se,{})})]}):a.jsx(te,{children:a.jsx(M,{path:"*",element:a.jsx(se,{})})})}export{wa as default};
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as s}from"./liveblocks-4PIBJMyE.js";import _ from"./NotFoundScreen-C4hj38o6.js";import{a as r}from"./sentry-CXcgkCeA.js";import{h as E,g as v,j as p,i as M,u as U,N as z,n as P,o as F,p as b}from"./core-Ca6G0voE.js";import{eX as O,S_ as h,bq as B,bn as N,ie as V,fz as q}from"./zeni-epic-state-BIxjj87B.js";import{F as X,z as I,a0 as $,c_ as G}from"./index-DD9OmSLj.js";import"./mui-BI3ZId9r.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-CSLK93Wz.js";import{M as J}from"./MobileAppDrawer-CNkPd-0r.js";import"./recharts-D6NnjcYi.js";import"./analytics-dJ9Vu0DH.js";import"./plaid-BFzM5Kog.js";import"./dnd-Be5WoH8E.js";import"./stripe-DMRn4zHo.js";import"./lottie-B7am_Gp2.js";import"./lexical-DTpvAJin.js";import"./pdf-DUHWpwzW.js";import"./utils-DFP_hVXq.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]="4755f0c7-5f1b-41b2-bdbc-e735e85ba78d",e._sentryDebugIdIdentifier="sentry-dbid-4755f0c7-5f1b-41b2-bdbc-e735e85ba78d")}catch{}})();const K=P(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=h(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(G),L=()=>{const e=E(),t=v(),c=X(),o=p(a=>O(a)),{aggregatedReportViewState:n}=p(a=>h(a)),{tenantEmailDomain:m}=M(),u=U(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const f=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"&&f.current&&(u(q({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),f.current=!1)},[n?.fetchState]);const D=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),f.current=!0},[n?.fetchState,d]),j=r.useCallback((a,i)=>{d(a,i,!1)},[d]),g=a=>{w(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:A}=H({mobileExploreReferrer:"Performance"});return $({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(J,{isAppContentDrawerOpen:S,handleDrawerToggle:g}),s.jsx(K,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:m,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:A})]}):s.jsx(z,{to:`/${m}/dashboard`,replace:!0})};function ge(){return s.jsxs(F,{children:[s.jsx(b,{path:"*",element:s.jsx(L,{})}),s.jsx(b,{path:"*",element:s.jsx(_,{})})]})}export{ge as default};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as h,b as t}from"./sentry-
|
|
1
|
+
import{a as h,b as t}from"./sentry-CXcgkCeA.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new r.Error().stack;a&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[a]="a301a95b-8420-43bd-aa56-5738077199ba",r._sentryDebugIdIdentifier="sentry-dbid-a301a95b-8420-43bd-aa56-5738077199ba")}catch{}})();const c="64px",b={};var k=({src:r,light:a,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:u})=>{const[p,i]=h.useState(null);h.useEffect(()=>{r&&a&&n&&v({src:r,light:a,oEmbedUrl:n})},[r,a,n]);const v=async({src:e,light:d,oEmbedUrl:I})=>{if(t.isValidElement(d))return;if(typeof d=="string")return void i(d);if(b[e])return void i(b[e]);i(null);const E=await fetch(I.replace("{url}",e)),g=await E.json();if(g.thumbnail_url){const f=g.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(f),b[e]=f}},o=t.isValidElement(a),y={display:"flex",alignItems:"center",justifyContent:"center"},s={preview:{width:"100%",height:"100%",backgroundImage:p&&!o?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:o?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=t.createElement("div",{style:s.shadow,className:"react-player__shadow"},t.createElement("div",{style:s.playIcon,className:"react-player__play-icon"}));return t.createElement("div",{style:s.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...u?{"aria-label":u}:{}},o?a:null,w||_)};export{k as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as Ol}from"./liveblocks-
|
|
1
|
+
import{j as Ol}from"./liveblocks-4PIBJMyE.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-CXcgkCeA.js";import{L as dt,bY as Tc,eX as Ac,LV as Rc,Mn as kl,c6 as Tl,g0 as Al,g1 as Rl}from"./zeni-epic-state-BIxjj87B.js";import{a as lt,b as Il,c as Pl,d as Nl,e as an,f as Ll,g as $l,h as Ml,i as Vt,j as Ic,k as oe,l as je,m as Cl,o as Yt,p as ue,q as Dl}from"./utils-DFP_hVXq.js";import{r as un}from"./empty-uy3M1msm.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-DyNMbFeB.js";import{r as Gl}from"./index-Dcmv7y8l.js";import{r as zl}from"./index-D3FowIif.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-Ca6G0voE.js";import{u as Kl,z as Pc,L as Wl,O as Jl,Q as Xl,k as Ql,e as tf}from"./index-DD9OmSLj.js";import"./mui-BI3ZId9r.js";import{d as Pe}from"./decodeURIComponentSafe-BMcEUj25.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new t.Error().stack;f&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[f]="4b4c349c-fe8f-4796-a523-53b1e1868fad",t._sentryDebugIdIdentifier="sentry-dbid-4b4c349c-fe8f-4796-a523-53b1e1868fad")}catch{}})();var _n,Sn={exports:{}},On,jn,xn,kn,Tn,An,Rn,In,Pn,Ne,Nn,Ln,$n,Mn,Cn,Dn,Fn,Bn,Un,qn,Gn,Le,zn,Zn,Hn,Vn,Yn,Kn,Wn,$e,Jn,Xn,Qn,to,eo,ro,no,Me={exports:{}},Ce={exports:{}},De={};function Nc(){if(On)return De;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function f(r,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},f(r,e)}function m(r){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var a,p=s(r);if(e){var h=s(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return function(d,b){if(b&&(t(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}(d)}(this,a)}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(r)}On=1;var l,o,n={};function i(r,e,a){a||(a=Error);var p=function(h){(function(c,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(y&&y.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),y&&f(c,y)})(g,h);var d,b=m(g);function g(c,y,v){var S;return function(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")}(this,g),S=b.call(this,function(w,_,M){return typeof e=="string"?e:e(w,_,M)}(c,y,v)),S.code=r,S}return d=g,Object.defineProperty(d,"prototype",{writable:!1}),d}(a);n[r]=p}function u(r,e){if(Array.isArray(r)){var a=r.length;return r=r.map(function(p){return String(p)}),a>2?"one of ".concat(e," ").concat(r.slice(0,a-1).join(", "),", or ")+r[a-1]:a===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}return i("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),i("ERR_INVALID_ARG_TYPE",function(r,e,a){var p,h,d;if(l===void 0&&(l=ie()),l(typeof r=="string","'name' must be a string"),typeof e=="string"&&(h="not ",e.substr(0,h.length)===h)?(p="must not be",e=e.replace(/^not /,"")):p="must be",function(g,c,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-c.length,y)===c}(r," argument"))d="The ".concat(r," ").concat(p," ").concat(u(e,"type"));else{var b=function(g,c,y){return typeof y!="number"&&(y=0),!(y+c.length>g.length)&&g.indexOf(c,y)!==-1}(r,".")?"property":"argument";d='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(u(e,"type"))}return d+=". Received type ".concat(t(a))},TypeError),i("ERR_INVALID_ARG_VALUE",function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";o===void 0&&(o=lt());var p=o.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)},TypeError),i("ERR_INVALID_RETURN_VALUE",function(r,e,a){var p;return p=a&&a.constructor&&a.constructor.name?"instance of ".concat(a.constructor.name):"type ".concat(t(a)),"Expected ".concat(r,' to be returned from the "').concat(e,'"')+" function but got ".concat(p,".")},TypeError),i("ERR_MISSING_ARGS",function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];l===void 0&&(l=ie()),l(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map(function(d){return'"'.concat(d,'"')}),h){case 1:p+="".concat(e[0]," argument");break;case 2:p+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:p+=e.slice(0,h-1).join(", "),p+=", and ".concat(e[h-1]," arguments")}return"".concat(p," must be specified")},TypeError),De.codes=n,De}function ef(){if(xn)return jn;function t(k,E){var j=Object.keys(k);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(k);E&&(x=x.filter(function(O){return Object.getOwnPropertyDescriptor(k,O).enumerable})),j.push.apply(j,x)}return j}function f(k){for(var E=1;E<arguments.length;E++){var j=arguments[E]!=null?arguments[E]:{};E%2?t(Object(j),!0).forEach(function(x){m(k,x,j[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(j)):t(Object(j)).forEach(function(x){Object.defineProperty(k,x,Object.getOwnPropertyDescriptor(j,x))})}return k}function m(k,E,j){return(E=l(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function s(k,E,j){return E&&function(x,O){for(var $=0;$<O.length;$++){var N=O[$];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,l(N.key),N)}}(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function l(k){var E=function(j,x){if(p(j)!=="object"||j===null)return j;var O=j[Symbol.toPrimitive];if(O!==void 0){var $=O.call(j,x);if(p($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(j)}(k,"string");return p(E)==="symbol"?E:String(E)}function o(k,E){if(E&&(p(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(k)}function n(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function i(k){var E=typeof Map=="function"?new Map:void 0;return i=function(j){if(j===null||(x=j,Function.toString.call(x).indexOf("[native code]")===-1))return j;var x;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(j))return E.get(j);E.set(j,O)}function O(){return u(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},i(k)}function u(k,E,j){return u=r()?Reflect.construct.bind():function(x,O,$){var N=[null];N.push.apply(N,O);var P=new(Function.bind.apply(x,N));return $&&e(P,$.prototype),P},u.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function e(k,E){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,x){return j.__proto__=x,j},e(k,E)}function a(k){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},a(k)}function p(k){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},p(k)}xn=1;var h=lt().inspect,d=Nc().codes.ERR_INVALID_ARG_TYPE;function b(k,E,j){return(j===void 0||j>k.length)&&(j=k.length),k.substring(j-E.length,j)===E}var g="",c="",y="",v="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(k){var E=Object.keys(k),j=Object.create(Object.getPrototypeOf(k));return E.forEach(function(x){j[x]=k[x]}),Object.defineProperty(j,"message",{value:k.message}),j}function _(k){return h(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(k,E,j){var x="",O="",$=0,N="",P=!1,G=_(k),A=G.split(`
|
|
2
2
|
`),I=_(E).split(`
|
|
3
3
|
`),R=0,B="";if(j==="strictEqual"&&p(k)==="object"&&p(E)==="object"&&k!==null&&E!==null&&(j="strictEqualObject"),A.length===1&&I.length===1&&A[0]!==I[0]){var V=A[0].length+I[0].length;if(V<=10){if(!(p(k)==="object"&&k!==null||p(E)==="object"&&E!==null||k===0&&E===0))return"".concat(S[j],`
|
|
4
4
|
|