@zeniai/web-app-ui 5.1.22-dev → 5.1.22-qa
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AddressRoutes-DFAo71dm.js → AddressRoutes-CT41ny-f.js} +1 -1
- package/dist/assets/{AddressScreen-CAEk8mk_.js → AddressScreen-CLP4FP-O.js} +1 -1
- package/dist/assets/{AiCfoScreen-BKo76Cv4.js → AiCfoScreen-BLZXZArd.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-CHqAEZsW.js → BillPayApprovalRoutes-B93D6K86.js} +1 -1
- package/dist/assets/{BillPayRoutes-C35OH9Bu.js → BillPayRoutes-BjRPRC0a.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-CgVN0Nsi.js → BusinessVerificationPageScreen-COS298yT.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-D1ynSFue.js → ChargeCardRoutes-DOf8ZxFe.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-CZyzwqAN.js → CompanyPassportScreen-E_X2D3vf.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-BxOtTv2G.js → ConnectionAuthScreen-Cu1m3qnO.js} +1 -1
- package/dist/assets/{CustomerOnboardingAuthScreen-dnPP_THl.js → CustomerOnboardingAuthScreen-BlnEv_rI.js} +1 -1
- package/dist/assets/{CustomerOnboardingRoutes-CV3lMFDm.js → CustomerOnboardingRoutes-DKTu3TSV.js} +1 -1
- package/dist/assets/{DashboardRoutes-CyRdXBry.js → DashboardRoutes-DQ8scLPs.js} +1 -1
- package/dist/assets/{DefaultTenantHome-2SpQFMEh.js → DefaultTenantHome-Bz8KR5te.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-BwV8uHFK.js → DomesticWireDetailScreen-Dt8QkNl1.js} +1 -1
- package/dist/assets/{DrawerScreen-C8Y4hZ9A.js → DrawerScreen-B0s6XB_a.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-Cf-UIj8k.js → EntityDetailRoutes-BFnZxzSO.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-DlB2tX8j.js → ExpenseAutomationRoutes-Du15OqPm.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-CzGmkIs5.js → FeaturePreviewScreen-B1hf1dDh.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-J9VXEJ_b.js → HubSpotOAuthCallbackScreen-Btz0OQdh.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-Dzny_0z8.js → MagicLinkRoutes-BkrcEfxv.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-B7WrkbOS.js → MagicLinkSignInScreen-B7-oTG61.js} +1 -1
- package/dist/assets/{MobileAppDrawer-NgQTATqT.js → MobileAppDrawer-CzXbfz6E.js} +1 -1
- package/dist/assets/{NotFoundScreen-Dnnx5_jI.js → NotFoundScreen-B6lzVM70.js} +1 -1
- package/dist/assets/{NotificationRoutes-5ZrD3JXy.js → NotificationRoutes-m1_3MbJD.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-DMk4QIE9.js → OAuthConsentScreen-C3grO2B9.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-DXkA6slP.js → PandLWithForecastRoutes-tDYLv6EF.js} +1 -1
- package/dist/assets/{PeopleRoutes-DT-OdVos.js → PeopleRoutes-BvrpCiXR.js} +1 -1
- package/dist/assets/{PerformanceRoutes-GPH8MNJm.js → PerformanceRoutes-D65HLS4l.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-CAQUllDp.js → QBOConnectionScreen-CoUX8FMs.js} +1 -1
- package/dist/assets/{ReferralListScreen-DAm5IsxS.js → ReferralListScreen-BJK_FqYN.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-DEpRS8Cq.js → ReimbursementApprovalRoutes-Deq3_qrD.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-BvSQCWpJ.js → ReimbursementApprovalRuleDetailScreen-B-HB-2Ii.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-gjTC-Wvb.js → ReimbursementRoutes-CT53GTQR.js} +1 -1
- package/dist/assets/{ReportsRoutes-BNBlzfhF.js → ReportsRoutes-Bd2DqBOB.js} +1 -1
- package/dist/assets/{RewardsRoutes-CIjKku01.js → RewardsRoutes-D5m9btlG.js} +1 -1
- package/dist/assets/{ScreenRoutes-CrJaHpxC.js → ScreenRoutes-B800Vl-U.js} +2 -2
- package/dist/assets/{SettingsRoutes-DQuZAuVf.js → SettingsRoutes-BTpkC5ER.js} +1 -1
- package/dist/assets/{SetupPagesScreen-ALhX_tKy.js → SetupPagesScreen-BLeSibic.js} +1 -1
- package/dist/assets/{SignInScreen-Cg3_Sp1a.js → SignInScreen-D56meGXv.js} +1 -1
- package/dist/assets/{SignOutScreen-Dca3TL76.js → SignOutScreen-D3B_wlKC.js} +1 -1
- package/dist/assets/{TaskListScreen-C_Tqt5Br.js → TaskListScreen-DV56A-OD.js} +1 -1
- package/dist/assets/{TaskRoutes-WPpNWz-g.js → TaskRoutes-C1MBk6tP.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-DhINrWYz.js → TransactionDetailRoutes-D8PM2qy_.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-Ciduelax.js → TransactionDetailScreen-CrAEKQhU.js} +1 -1
- package/dist/assets/{TransactionListRoutes-DmwWnTvd.js → TransactionListRoutes-BcEl6aLg.js} +1 -1
- package/dist/assets/{TreasuryRoutes-BaAE21GJ.js → TreasuryRoutes-udOEEHS2.js} +1 -1
- package/dist/assets/{VendorsRoutes-ONRRLMlr.js → VendorsRoutes-DIXbOVo9.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-DtERxgVf.js → WiseConfirmationScreen-CO9e9Q0A.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-BZd2UMK8.js → ZeniAccountRoutes-BcmFR78c.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-DkPXPFSa.js → ZeniAccountStatementScreen-seV3Vtmq.js} +1 -1
- package/dist/assets/{analyticsHelper-uVQynfBH.js → analyticsHelper-DLVGE934.js} +1 -1
- package/dist/assets/{getLocaleForTenant-BikYpzid.js → getLocaleForTenant-D8ujXHmv.js} +1 -1
- package/dist/assets/{index-CYj5jhrI.js → index-BRBKIeck.js} +5 -5
- package/dist/assets/{routePaths-CJs7QSKh.js → routePaths-f58A_7uy.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-DliEl8yr.js → useAiCfoDashboardSuggestedQuestionsChips-CDWxxCLl.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-CyyAGXJ-.js → useAskAiCfoHostNavButtonProps-lMf8y8xS.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-Chgglzdd.js → useInitialThreadRequest-B5lLxxrW.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-DYzLuoli.js → withTransactionSidePanel-Dqu6-_83.js} +1 -1
- package/dist/index.html +1 -1
- package/package.json +1 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as e}from"./liveblocks-oKBQUmhq.js";import{A as d}from"./AddressScreen-
|
|
1
|
+
import{j as e}from"./liveblocks-oKBQUmhq.js";import{A as d}from"./AddressScreen-CLP4FP-O.js";import i from"./NotFoundScreen-B6lzVM70.js";import"./sentry-p9ArnUH9.js";import{o as s,p as r}from"./core-rmRh_ZE8.js";import"./zeni-epic-state-DH4sFgeZ.js";import"./recharts-BG7SNYPF.js";import"./index-BRBKIeck.js";import"./mui-DRkb5v8u.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./utils-B4k-7_rU.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="4677917c-1bd8-4b00-9bd0-d308073173a3",t._sentryDebugIdIdentifier="sentry-dbid-4677917c-1bd8-4b00-9bd0-d308073173a3")}catch{}})();function _(){return e.jsxs(s,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(d,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(d,{})}),e.jsx(r,{path:"*",element:e.jsx(i,{})})]})}export{_ as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as d}from"./liveblocks-oKBQUmhq.js";import{a as h}from"./sentry-p9ArnUH9.js";import{h as T,u as _,g as E,i as j,j as K,n as B}from"./core-rmRh_ZE8.js";import{J as M,h as $,z as D,k as L,s as R,K as z,c as C,e as S,m as F,i as b,n as N}from"./index-
|
|
1
|
+
import{j as d}from"./liveblocks-oKBQUmhq.js";import{a as h}from"./sentry-p9ArnUH9.js";import{h as T,u as _,g as E,i as j,j as K,n as B}from"./core-rmRh_ZE8.js";import{J as M,h as $,z as D,k as L,s as R,K as z,c as C,e as S,m as F,i as b,n as N}from"./index-BRBKIeck.js";import{Kd as k,h1 as U,eP as G,Ke as O,c2 as V,Kf as q,km as H}from"./zeni-epic-state-DH4sFgeZ.js";import{n as J}from"./mui-DRkb5v8u.js";import Q from"./NotFoundScreen-B6lzVM70.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]="ad1725a7-85e7-40b1-96a3-ea4751a0e169",e._sentryDebugIdIdentifier="sentry-dbid-ad1725a7-85e7-40b1-96a3-ea4751a0e169")}catch{}})();const W=J.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as c}from"./liveblocks-oKBQUmhq.js";import{a as r}from"./sentry-p9ArnUH9.js";import{u as ge,h as Ce,g as Ie,j as Y,i as be,n as ke}from"./core-rmRh_ZE8.js";import{O as we,z as xe,J as Pe,cR as Ee,cS as Te,b4 as J,cT as ve,b3 as Z,n as D,K as L,c as I,cU as F,cV as ye,cW as Qe,a1 as _e,e as Oe,a7 as Ae,cX as Ue,a2 as je,q as Le,b0 as Fe,cY as Re}from"./index-
|
|
1
|
+
import{j as c}from"./liveblocks-oKBQUmhq.js";import{a as r}from"./sentry-p9ArnUH9.js";import{u as ge,h as Ce,g as Ie,j as Y,i as be,n as ke}from"./core-rmRh_ZE8.js";import{O as we,z as xe,J as Pe,cR as Ee,cS as Te,b4 as J,cT as ve,b3 as Z,n as D,K as L,c as I,cU as F,cV as ye,cW as Qe,a1 as _e,e as Oe,a7 as Ae,cX as Ue,a2 as je,q as Le,b0 as Fe,cY as Re}from"./index-BRBKIeck.js";import{fI as De,eO as ee,eP as Be,hH as Me,QY as Ve,eS as Ge,hR as Ne,hN as $e,eQ as R,ft as qe,fm as We,fq as K,fu as ze,fv as He,fw as Ye,fx as Je,fy as Ke}from"./zeni-epic-state-DH4sFgeZ.js";import{D as Xe,n as b,S as Ze,P as et}from"./mui-DRkb5v8u.js";import{u as tt}from"./useAiCfoDashboardSuggestedQuestionsChips-CDWxxCLl.js";import{p as st}from"./pathToGoBack-BjLk76KL.js";import"./recharts-BG7SNYPF.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./utils-B4k-7_rU.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new a.Error().stack;i&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[i]="a102298b-be5a-4d9f-a8cb-ef3432fd4965",a._sentryDebugIdIdentifier="sentry-dbid-a102298b-be5a-4d9f-a8cb-ef3432fd4965")}catch{}})();const te="chat-response-generated",ot=ke(function(a,i){const s=ee(a),m=i.isSubmitting;return{showSampleQuestions:i.sessionFromUrl==="explore"&&s.uiState.currentChatSessionId==null,aiCfoView:s,isSubmitting:m,isNewChatSession:i.sessionFromUrl==="new_chat"||i.sessionFromUrl==="explore",isFullView:!0,tableDownloadEndPoint:`${je}/tableDownload`,emailLinkQuestion:i.emailLinkQuestion,autoSubmitEmailLinkQuestion:i.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:i.onEmailLinkQuestionProcessed,routedInitialQuestionSource:i.routedInitialQuestionSource,routedInitialQuestionSuggestionIndex:i.routedInitialQuestionSuggestionIndex,exploreSuggestedPromptQuestions:i.exploreSuggestedPromptQuestions,exploreSuggestedPromptQuestionsLoading:i.exploreSuggestedPromptQuestionsLoading,isFileUploadEnabled:i.isFileUploadEnabled,isUploadPromoVisible:i.isUploadPromoVisible,onUploadPromoClose:i.onUploadPromoClose}},function(a,i){const{location:s,currentTenant:m,userId:l,navigate:S,currentChatSessionId:h,allSessionsWithOrderedQuestionAnswers:d,setIsAiCfoOpen:f}=i;return{onEventReceived:(e,p)=>{if(e===te&&typeof p.text=="string"&&typeof p.metadata=="object"){const o=p,u=He(o.type),t=o.metadata.chat_session_id??null,{currentChatSession:E,currentQuestionAnswer:k,currentQuestionAnswerSummary:T}=Z(d,t);u!=="answer"?I.trackAICFOChatResponseGenerated(u,k?.question.questionText??"",o.text,t,Re(T,E),o.metadata.message_id??null):I.trackAICFOChatAnswerGenerated(o.text,k?.question.questionText??"",(o.follow_up_questions?.length??0)>0,!!o.assumptions,!!o.insights,o.visualization!=null,Ye(o.visualization?.type??"")??null,t,o.summarized_title,o.metadata.message_id??null),a(Je({chatSessionId:o.metadata.chat_session_id,responseType:u,fetchState:{fetchState:"Completed",error:void 0}})),a(Ke({chatSessionId:o.metadata.chat_session_id,answerPayload:o,userId:l}))}},onSubmit:(e,p,o,u)=>{e&&Fe(a,e,p,h,d,l,u,o)},updateCurrentInput:e=>{a(K(e))},onStopSubmit:()=>{},onUpdateScrollYOffset:e=>{a(ze(e))},onSelectSampleQuestion:()=>{},onBackClick:()=>{S(-1)},onCloseClick:()=>{const e=D(s.state?.pathnameStackToGoBack),p=e.poppedPathname??st(1);S(p,{state:{...s.state,pathnameStackToGoBack:e.newStack}}),a(K(""))},togglePageView:()=>{const e=D(s.state?.pathnameStackToGoBack),p=e.poppedPathname??`/${m.tenantEmailDomain}/dashboard`;S(p,{state:{...s.state,pathnameStackToGoBack:e.newStack,message:"open_ai_cfo_drawer"}}),f(!0)},onCopy:()=>{},onThumbsUp:()=>{},onThumbsDown:()=>{},onTogglePageView:()=>{S(-1)},onNewChatClick:()=>{h!=null&&a(We());const e=Le(s.state?.pathnameStackToGoBack,s.pathname);S(`/${m.tenantEmailDomain}/ai-cfo/new_chat`,{state:{pathnameStackToGoBack:e.slice(0,-1),referrer:"Sidebar"}})},onToggleCotCollapsed:(e,p)=>{a(qe({questionAnswerId:e,isCollapsed:p}))},onMenuClick:i.onMenuClick}})(Ae(Ue)),Et=({isFileUploadEnabled:a})=>{const{setIsAiCfoOpen:i}=we(),s=ge(),m=Ce(),l=Ie(),[S,h]=r.useState(!1);r.useEffect(()=>{s(De())},[s]);const d=Y(n=>ee(n)),f=xe.getSignedInUser(),{session_id:e}=be(),p=Pe(),o=_e(p),u=Y(n=>Be(n)),t=d.uiState.currentChatSessionId,E=u.tenantEmailDomain,{handleUploadPromoClose:k,isUploadPromoVisible:T}=Ee({isFileUploadEnabled:a,tenantEmailDomain:E}),v=Te({currentTenant:u,currentChatSessionId:t,aiCfoView:d}),{isSuggestedQuestionsLoading:se,suggestedPromptQuestions:oe}=tt(),w=l.state,x=w?.aiCfoInitialQuestion,B=!!w?.aiCfoShouldSubmit;r.useEffect(()=>{const n=l.state;if(n?.[J]!==!0)return;h(!0);const g={...n};delete g[J],m(l,{replace:!0,state:g})},[l.pathname,l.search,l.state,m]);const[ae,y]=r.useState(null),[ne,Q]=r.useState(!1),[ie,_]=r.useState(void 0),[re,O]=r.useState(void 0),M=r.useRef(!1);r.useEffect(()=>{if(!M.current&&x!=null&&x!==""){const n=l.state;y(x),Q(B),_(n?.aiCfoInitialSubmissionSource!=null?n.aiCfoInitialSubmissionSource:void 0);const g=n?.aiCfoSuggestionIndex;O(typeof g=="number"?g:void 0),M.current=!0}},[x,B,l.state]);const le=r.useCallback(()=>{y(null),Q(!1),_(void 0),O(void 0)},[]),V=r.useMemo(()=>new URLSearchParams(l.search),[l.search]),G=V.get("ref")??w?.aiCfoRef,A=V.get("emailRefId")??w?.aiCfoEmailRefId,N=r.useRef(!1);r.useEffect(()=>{N.current||G!=="month-end-email"||A==null||t!=null||f==null||(s(Me("controller",f.userId,A,"MONTH_END_EMAIL")),N.current=!0)},[G,A,t,s,f]);const P=d.uiState.lastContextMessage;r.useEffect(()=>{P!=null&&P!==""&&t!=null&&(y(P),Q(!0),_(void 0),O(void 0),s(Ve()))},[P,t,s]);const ce=u.masterTOSInfo,C=ce?.isMasterTOSAccepted??!1,{visitedSessions:$}=ve(t),U=d.fetchState,j=d.uiState.chatSessionsNextPageToken.hasMore||!d.uiState.chatSessionsFirstPageFetched,q=t!=null?d.fetchChatSessionHistoryByChatSessionId?.[t]?.fetchState??"Not-Started":"Not-Started",W=t==null||(d.uiState.chatHistoryNextPageToken[t]?.hasMore??!0),z=d.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:ue}=Z(z,t),de=ue.length===0;r.useEffect(()=>{C||o||m("../dashboard",{state:{...l.state,message:"open_ai_cfo_drawer"}})},[C,o,m,l.state]);const me=r.useCallback(()=>{const n=D(l.state?.pathnameStackToGoBack),g=u.tenantEmailDomain;m(n.poppedPathname??(g!=null?`/${g}/dashboard`:".."),{state:{...l.state,pathnameStackToGoBack:n.newStack}})},[u.tenantEmailDomain,l.state,m]);r.useEffect(()=>{t!=null&&e!==t&&m(`../ai-cfo/${t}`,{state:{...l.state}})},[t,e]),r.useEffect(()=>{e!=null&&t==null&&e!=="new_chat"&&e!=="explore"&&s(Ge({sessionId:e,agentId:"controller"}))},[]);const pe=r.useMemo(()=>({events:$.map(n=>`private-encrypted-chat-${n}.${te}`),eventCallback:(n,g,fe)=>fe.onEventReceived(n,g)}),[$]);r.useEffect(()=>{U!=="In-Progress"&&j&&s(Ne())},[U,j,s]),r.useEffect(()=>{t!=null&&q!=="In-Progress"&&W&&f!=null&&U==="Completed"&&!j&&s($e(t,f.userId))},[q,W,t,f,s]);const H=n=>n.trackAICFOOnboardingScreenStateChanged("open","first_visit");if(f==null||e==null)throw Error("Can't access AI Controller page without signing in...");const he=t!=null&&d.responseStateByChatSessionId?.[t]?.answer?.fetchState==="In-Progress";if(!C&&o)return c.jsxs(nt,{children:[c.jsx(L,{analytics:I,onLoad:H}),v.drawerElement,c.jsx(it,{children:c.jsx(X,{children:c.jsx(F,{isTOSAccepted:!1,acceptMasterTOSState:d.masterTOSAcceptanceState,onCloseClick:me,onCompleteClick:()=>{u.userRoleId!=null&&s(R(u.userRoleId))}})})})]});const Se=c.jsxs(c.Fragment,{children:[S&&!C?c.jsx(L,{analytics:I,onLoad:H}):null,c.jsx(F,{isTOSAccepted:C,acceptMasterTOSState:d.masterTOSAcceptanceState,showHeader:!1,togglePageView:C?()=>h(!1):void 0,onCloseClick:()=>h(!1),onCompleteClick:()=>{C||u.userRoleId==null||s(R(u.userRoleId)),h(!1)}})]});return c.jsxs(c.Fragment,{children:[c.jsxs(at,{children:[c.jsx(L,{analytics:I,onLoad:n=>n.trackPageLoaded(Oe.Event.aiCFOPage)}),o&&v.drawerElement,c.jsx(ot,{...pe,currentChatSessionId:t,allSessionsWithOrderedQuestionAnswers:z,openOnboardingPage:()=>h(!0),userId:f.userId,setIsAiCfoOpen:i,navigate:m,sessionFromUrl:e,location:l,isSubmitting:he,isEmptyChatWithSession:de,currentTenant:u,emailLinkQuestion:ae??void 0,autoSubmitEmailLinkQuestion:ne,onEmailLinkQuestionProcessed:le,routedInitialQuestionSource:ie,routedInitialQuestionSuggestionIndex:re,onMenuClick:o?v.open:void 0,isFileUploadEnabled:a,isUploadPromoVisible:T,onUploadPromoClose:k,exploreSuggestedPromptQuestions:oe,exploreSuggestedPromptQuestionsLoading:se}),S&&o?c.jsx(Xe,{anchor:"right",open:S,transitionDuration:250,PaperProps:{component:rt,style:{width:"100%"}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>h(!1),children:c.jsx(X,{onClick:n=>n.stopPropagation(),children:c.jsx(F,{isTOSAccepted:C,acceptMasterTOSState:d.masterTOSAcceptanceState,onCloseClick:()=>h(!1),onCompleteClick:()=>{C||u.userRoleId==null||s(R(u.userRoleId)),h(!1)}})})}):null]}),S&&!o?c.jsx(ye,{open:S,onClose:()=>h(!1),children:c.jsx(Qe,{children:Se})}):null]})},X=b(Ze)`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
flex-direction: column;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-oKBQUmhq.js";import{a as f}from"./sentry-p9ArnUH9.js";import{h as U,g as B,u as j,j as v,N,n as T,i as $,o as O,p as h}from"./core-rmRh_ZE8.js";import{eP as F,Nw as R,Nc as b,xW as x,xQ as L,xU as w,xJ as W,Ne as q,xM as z,xY as G,xX as C}from"./zeni-epic-state-DH4sFgeZ.js";import{h as P,z as k,s as V,a7 as J,bF as M,af as _,bG as Q}from"./index-
|
|
1
|
+
import{j as l}from"./liveblocks-oKBQUmhq.js";import{a as f}from"./sentry-p9ArnUH9.js";import{h as U,g as B,u as j,j as v,N,n as T,i as $,o as O,p as h}from"./core-rmRh_ZE8.js";import{eP as F,Nw as R,Nc as b,xW as x,xQ as L,xU as w,xJ as W,Ne as q,xM as z,xY as G,xX as C}from"./zeni-epic-state-DH4sFgeZ.js";import{h as P,z as k,s as V,a7 as J,bF as M,af as _,bG as Q}from"./index-BRBKIeck.js";import"./mui-DRkb5v8u.js";import{i as X}from"./ReimbursementApprovalRuleDetailScreen-B-HB-2Ii.js";import Y from"./NotFoundScreen-B6lzVM70.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="f0e85721-e018-43df-8722-025a8015def7",e._sentryDebugIdIdentifier="sentry-dbid-f0e85721-e018-43df-8722-025a8015def7")}catch{}})();const I="bill-approval-rule-update",H=T(function(e){return{approvalView:R(e),billPaySetupApproverViewUpdateData:b(e).billPaySetupApproverViewUpdateData}},function(e,o){const{navigate:t,location:p}=o;return{onApprovalRulesEventReceived:a=>{a.endsWith(I)&&e(q(!1))},onBackClick:()=>{_(p)?t("../../"):t("../../../bills/setup")},onDeleteRuleClick:a=>{e(W(a))},onEditRuleClick:a=>{a!=null?(e(w(a)),t(`./${a}/edit`)):(e(w()),t("./new"))}}})(J(M)),K=()=>{const e=U(),o=B(),t=j(),[p,a]=f.useState(!1),[u,s]=f.useState(!1),d=P(),n=v(i=>i.billPaySetupApproverViewState.fetchState),c=v(i=>F(i)),r=v(i=>R(i)),g=v(i=>b(i).billPaySetupApproverViewUpdateData);if(f.useEffect(()=>{g?.updateStatus.fetchState==="Completed"&&t(x())},[g]),f.useEffect(()=>{p||n!=="Not-Started"||(a(!0),t(L(!0)))},[p,n,t]),k.getSignedInUser()==null)throw Error("Can't access billpay approval without signing in...");f.useEffect(()=>{r.allApprovalRules.length===0&&r.fetchState==="Completed"&&(u||(s(!0),t(w())),e("./new"))},[u,r,t]);const y={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${I}`]:[],eventCallback:(i,A,m)=>{i.endsWith(I)&&m.onApprovalRulesEventReceived(i)}};return c.companyBillPayInfo?.info?.isBillPayTOSAccepted===!1?l.jsx(N,{to:"../../promo"}):c.companyBillPayInfo?.info?.isBillPayTOSAccepted!==!0||r.fetchState!=="Completed"&&r.fetchState!=="Error"?l.jsx(V,{fetchState:"In-Progress",style:{backgroundColor:d.colors.grey5}}):l.jsx(H,{currentTenant:c,location:o,navigate:e,...y})},Z=T(function(e,o){const t=b(e),p=t.billPaySetupApproverViewUpdateData?.type??"approval_create",a=p==="approval_create"&&t.allApprovalRules.length!==0;let u=t.allApprovalRules.length===0;return o.approvalRuleId&&(u=t.allApprovalRules.findIndex(s=>s.approvalRuleId===o.approvalRuleId)===0),{localData:t,hideUpperBoundField:a,isLowerBoundDisabled:u,approvalUpdateActionType:p}},function(e,o){const{navigate:t,approvalUpdateDataView:p,approverViewData:a,approvalRuleId:u}=o,s=p.billPaySetupApproverViewUpdateData?.type,d=_(o.location);return{onApprovalRuleDataUpdated:n=>{const c=r=>{const g=[];return r.forEach(y=>{const i=y.actors.selectedUsers.map(S=>({type:"user",userId:S.userId,isImplicitActor:!1})),A=y.actors.selectedNonUsers.map(S=>{const E=!!X(S.value);return{type:E?"attribute":"role",subType:S.value,userId:void 0,idType:void 0,isImplicitActor:!E}}),m=i.concat(A);g.push({action:y.stepType.selectedOption,actors:m,operator:m.length>1?y.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),g};if(s==="approval_create"){const r={criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:n.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:n.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(n.steps),isApplicableOnPendingApprovalEntity:n.applyToExistingBills.includes("applyToExistingBills")};e(C(r))}else{const r={approvalRuleId:u,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:n.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:n.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(n.steps),isApplicableOnPendingApprovalEntity:n.applyToExistingBills.includes("applyToExistingBills")};e(C(r))}},onResetClick:()=>{e(x()),s==="approval_update"||d?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(x()),s==="approval_update"||d?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(G())},onSaveRuleSuccess:()=>{t("../")}}})(Q);function D(){const e=U(),o=j(),t=B(),{approvalRuleId:p}=$(),a=k.getSignedInUser(),u=P(),s=v(r=>b(r)),d=v(r=>R(r)),[n,c]=f.useState(!1);if(f.useEffect(()=>{n||(c(!0),o(z(!0)))}),f.useEffect(()=>{d.fetchState==="Not-Started"&&e(p!=null?"../../":"../")},[d,p]),a==null)throw Error("Can't access address page without signing in...");return s.approverListFetchStatus.fetchState=="Not-Started"||s.approverListFetchStatus.fetchState==="In-Progress"?l.jsx(V,{fetchState:s.approverListFetchStatus.fetchState,style:{backgroundColor:u.colors.grey5}}):l.jsx(Z,{navigate:e,approvalUpdateDataView:s,approvalRuleId:p,approverViewData:d,location:t})}function se(){return l.jsxs(O,{children:[l.jsx(h,{path:"/",element:l.jsx(K,{})}),l.jsx(h,{path:"/new",element:l.jsx(D,{})}),l.jsx(h,{path:"/:approvalRuleId/edit",element:l.jsx(D,{})}),l.jsx(h,{path:"*",element:l.jsx(Y,{})})]})}export{se as B};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-oKBQUmhq.js";import{h as Y,u as se,g as J,i as ae,j as v,N as te,n as Q,l as na,o as ia,p as S}from"./core-rmRh_ZE8.js";import{eP as Z,MO as _e,bt as It,HI as oa,bo as wt,bF as pe,MP as xt,xe as Ct,yo as $e,xN as la,bn as De,MQ as sa,MR as ra,c2 as ca,MS as da,jG as Bt,MT as At,MU as Et,yZ as Le,xt as Be,MV as ua,x2 as tt,MW as pa,C9 as ma,x6 as ba,xc as Dt,MX as ke,MY as Me,yp as Ge,MZ as ha,M_ as ga,ys as Oe,M$ as ya,yF as Sa,N0 as jt,y9 as at,ye as fa,N1 as ka,N2 as ue,N3 as Tt,N4 as Pt,N5 as Ft,fM as va,xy as Ne,cx as Rt,N6 as Ia,gT as wa,N7 as xa,N8 as Ca,e_ as Vt,eY as $t,N9 as ze,Na as Ba,Nb as Aa,Kx as Ze,Nc as Ea,Ky as oe,Kz as He,Nd as Da,Ne as ja,Nf as Ta,yg as nt,yd as Pa,Ng as Fa,Nh as Ra,Ni as Va,x$ as $a,Nj as Na,Nk as Ua,Nl as _a,cl as Nt,cM as Ut,jR as La,bL as Ma,bq as _t,bM as Lt,wk as Ga,Nm as Oa,BY as za,C2 as Za,sR as Ha,yq as Wa,z4 as qa,k2 as fe,Nn as Ka,No as Mt,kw as Ya,jY as Gt,kh as Ot,kg as it,bE as be,bK as Ja,Np as Qa,Nq as ve,iB as Xa,Nr as ot,Ns as en,iF as tn,i_ as an,zi as nn,Nt as on,kp as ln,z8 as sn,Nu as lt,zc as rn,zh as cn,ze as dn,z6 as un,Nv as zt,xn as pn,Nw as mn,Nx as bn,fE as hn,fD as gn,fC as yn,k5 as Sn,kn as st,ky as fn,qo as kn,ke as vn,za as In,iL as wn,kD as xn,Ny as Cn,iD as Bn,qf as An,Nz as En,y5 as Dn,bG as jn,bs as Tn,Js as Pn,cO as Fn,cN as Rn,cw as Vn,cC as $n}from"./zeni-epic-state-DH4sFgeZ.js";import{h as me,z as V,k as Ie,_ as We,v as le,T as y,aN as Ae,s as re,o as A,K as je,c as D,bc as Nn,n as z,a2 as qe,q as E,J as we,bd as rt,be as ct,bf as Un,ak as _n,y as Ln,aH as Mn,x as Zt,D as Ke,A as Ye,bg as Gn,at as Ht,bh as On,V as zn,e as Wt,a7 as Zn,bi as Hn,bj as Wn,bk as qn,bl as Kn,bm as Yn,bn as Jn,bo as Qn,bp as Xn,bq as ei,N as ti,br as ai,b7 as ni,bs as ii,bt as oi,a9 as li}from"./index-CYj5jhrI.js";import{n as U,S as si}from"./mui-DRkb5v8u.js";import{A as dt}from"./AddressScreen-CAEk8mk_.js";import{g as ie,a as Te,i as qt,V as Je,b as Qe,c as ri,v as ci,d as di,A as he,D as ge}from"./DomesticWireDetailScreen-BwV8uHFK.js";import{a as f}from"./sentry-p9ArnUH9.js";import{u as Xe}from"./useAskAiCfoHostNavButtonProps-CyyAGXJ-.js";import{u as Kt}from"./useInitialThreadRequest-Chgglzdd.js";import Ee from"./NotFoundScreen-Dnnx5_jI.js";import{D as ui}from"./DrawerScreen-C8Y4hZ9A.js";import{M as Yt}from"./MobileAppDrawer-NgQTATqT.js";import{F as Jt}from"./FeaturePreviewScreen-CzGmkIs5.js";import{S as Pe}from"./SetupPagesScreen-ALhX_tKy.js";import{B as pi}from"./BillPayApprovalRoutes-CHqAEZsW.js";import{FallBackRoute as mi}from"./ScreenRoutes-CrJaHpxC.js";import"./recharts-BG7SNYPF.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./utils-B4k-7_rU.js";import"./analyticsHelper-uVQynfBH.js";import"./routePaths-CJs7QSKh.js";import"./BusinessVerificationPageScreen-CgVN0Nsi.js";import"./ReimbursementApprovalRuleDetailScreen-BvSQCWpJ.js";import"./getLocaleForTenant-BikYpzid.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]="0be626bb-c5ba-44a8-8a9f-7f46a530365a",e._sentryDebugIdIdentifier="sentry-dbid-0be626bb-c5ba-44a8-8a9f-7f46a530365a")}catch{}})();const bi=Q(function(e,t){const l=_e(e,t.billId),i=V.getSignedInUser(),c=e.tenantState.currentTenantId,r={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},u=z(t.location.state?.pathnameStackToGoBack);let o=!0;u.poppedPathname?.includes("bills")===!0&&(o=!1);let s=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`;const n=De(i);n||!l.createdBy?.email?.includes("zeni.ai")||(s="Zeni");let d=!1,p=!1;if(l?.billActivities.length>0){const{isApprovalorRejectBtnVisible:g,isMarkAsPaidBtnVisible:b}=sa(l.billActivities,ra(t.currentTenant),i);d=g,p=b}const m=ca(t.currentTenant?.userRole??[]),h=l.transactionDetails!=null&&da(l.transactionDetails,m,i);return{billDetails:l,isAccountingClassesEnabled:Bt(e),createdBy:s,authParams:r,transactionAttachmentEndpoint:`${qe}/transaction_attachment`,signedInUser:i,showBackButton:o,isAdmin:m,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,showApproveRejectBtns:d,showMarkAsPaidButtonToApprover:p,hasZeniAssistAccess:t.hasZeniAssistAccess,analytics:D,showMarkAsPaidButtonToCreator:h,isZeniUser:n}},function(e,t){const{billId:l,currentTenant:i,location:c,navigate:r}=t,{tenantEmailDomain:u}=i;return{redirectToBillsScreen:()=>{const o=ie(u),s=E(c.state?.pathnameStackToGoBack,c.pathname);r(o,{state:{pathnameStackToGoBack:s}})},redirectToEditableBillScreen:()=>{const o=E(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}})},discardBillDetailsFromLocalStore:()=>{e(ke({}))},deleteBill:o=>{D.trackBillPayDeleteBill(l,o),e(Dt(l))},cancelAndDeleteBill:(o,s)=>{s===!0?D.trackBillPayCancelAndDeleteBill(l,o):D.trackBillPayCancelBill(l),e(ba(l,s))},onSaveRealTimeApprovals:o=>{e(ma(l,"bill_pay",o))},updateEditRealTimeApproverClicked:o=>{e(pa({isEdit:o,entityId:l,entityType:"bill_pay"}))},approveOrRejectBill:o=>{o.type==="approved"?e(tt(l,o.type,"")):e(tt(l,o.type,o.description??""))},retryOrRefundBill:o=>{o.type==="retry"?e(Be(l,"retry")):e(Be(l,"refund"))},onAddNewRule:()=>{r("../../bills/approval-rules")},onAttachmentClick:(o,s)=>{const n=Te(u,o,s),d=E(c.state?.pathnameStackToGoBack,c.pathname);r(n,{state:{pathnameStackToGoBack:d}})},onBackClick:()=>{const o=z(t.location.state?.pathnameStackToGoBack),s=o.poppedPathname??ie(u);r(s,{state:{pathnameStackToGoBack:o.newStack}})},onRetryPaymentClick:()=>{const o=E(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}}),e(ua({billId:t.billId}))},onRefundPaymentClick:()=>{e(Be(t.billId,"refund"))},saveBillDetails:(o,s,n)=>{o&&e(Et({data:n,billId:l})),e(Le(o?"paid":"pending_approval",o,s,l))},discardOutsideZeniPaymentData:()=>{e(At({billId:l}))}}})(Nn);function hi(){const e=Y(),t=se(),l=J(),{billId:i}=ae(),c=me(),r=V.getSignedInUser(),u=Ie(),o=v(G=>Z(G)),s=v(G=>_e(G,i??"")),n=s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1,d=Kt(o?.companyId,{clearParams:s.fetchState==="Completed"&&!n}),{isAiCfoAccessEnabled:p,onAskAiCfoClick:m}=Xe({mobileExploreReferrer:"Bill Details"});We({isDataReady:s.fetchState==="Completed"});const h=o?.userRole!=null&&It(o?.userRole),g=o?.company==null||o.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!h,[b,k]=f.useState(!1),[j,x]=f.useState(!1),[C,L]=f.useState(!1),{useFeatureGate:T,useDynamicConfig:_}=le(),{isFeatureEnabled:$}=T(y.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:I}=T(y.isBillPayCommentingEnabled),{isFeatureEnabled:H}=T(y.isBillPayDetectInsufficientFundsEnabled),{configValue:M}=_(Ae.zeniAssistConfig),B=oa(o),q=wt(o.userRole),W=g&&pe(u?.loggedInUserRoleMap),N=M.user_ids!=null&&r?.userId!=null&&M.user_ids.includes(r?.userId),{isFeatureEnabled:K}=T(y.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:X}=T(y.billPaySetupShowInternationalPaymentByWise);if(f.useEffect(()=>{$&&s.transactionDetails?.isDeleted===!0||o.isZeni===!0&&r?.userEmailDomain==="zeni.ai"&&B===!1?L(!1):L(s.billActivities[0]?.isRealTimeApprovalEnabled&&(q||W||s.allApprovers.find(G=>G.user.userId===r?.userId)!=null||s.transactionDetails?.lastUpdatedByUserId===r?.userId))},[s.billActivities[0]?.isRealTimeApprovalEnabled,s.allApprovers,s.transactionDetails?.lastUpdatedByUserId,q,W,o.isZeni,B,r]),f.useEffect(()=>{i!=null&&t(xt(i))},[i]),f.useEffect(()=>{b||s.fetchState=="Completed"||s.fetchState=="In-Progress"||(k(!0),t(Ct(i??"",$,N,!1)))},[b,s,i,t]),f.useEffect(()=>{j||s.fetchState!="Completed"||s.transactionDetails?.billPayInfo.stage.code=="paid"||(x(!0),t($e(!1,$,N,X,i)),s.billActivities[0]?.isRealTimeApprovalEnabled===!0&&t(la()))},[j,s,i,t]),r==null)throw Error("Can't access address page without signing in...");return s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1?a.jsx(te,{to:`./edit${l.search}`}):s.deleteStatus.fetchState==="In-Progress"||s.cancelAndDeleteStatus.fetchState==="In-Progress"||s.cancelStatus.fetchState==="In-Progress"?a.jsx(re,{fetchState:s.deleteStatus.fetchState,style:{boxShadow:`0px 2px ${A.sp1} ${c.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[a.jsx(je,{analytics:D,onLoad:G=>(ee=>{i!=null&&ee.trackBillPayBillDetails(i,s.isRecurring)})(G)}),a.jsx(bi,{initialOpenThreadRequest:d??void 0,isShowDeletedBillsEnabled:$,location:l,navigate:e,isBillPayCommentingEnabled:I,isRealTimeApprovalEnabled:C,currentTenant:o,billId:i??"",isInternationalPaymentShaVsOurEnabled:K,hasZeniAssistAccess:N,isDetectInsufficientFundsEnabled:H,isAiCfoAccessEnabled:p,onAskAiCfoClick:m})]})}const ye=Ke.getLocalizedStrings().spendManagement.billPay.billDetails,gi={containerWidth:new Zt(100,58)},ut=Q(function(e,t){const l=V.getSignedInUser(),i=e.tenantState.currentTenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i??""},r=t.showActionButtons,u=r&&t.file==null;return{uploadInvoiceEndPoint:`${Ht.communicationAgentMicroServiceBaseUrl}`,authParams:c,billId:t.billId,file:t.file,showAutofill:t.showAutofill,analytics:D,entityId:t.billId,showTitlebarIcon:r,showTitlebar:r&&t?.file!=null,uploadStatus:t.uploadStatus,shouldNotShowAttachment:u,style:{paddingTop:A.sp10,paddingRight:A.sp3,paddingBottom:"15px",paddingLeft:A.sp5,...t.showAutofill?{}:{backgroundColor:t.backgroundColor,paddingBottom:"128px"}}}},function(e,t){const l=V.getSignedInUser();return{onInvoiceUpload:i=>{i!=null&&(t.file!=null||t.billId!=null||t.isInitialEdit?(t.setPayload(i),t.setShowConfirmationPopup(!0)):e(Oe(i,t.isVendorRecommendationEnabled,t.billId)))},updateInvoiceUploadFetchState:i=>{e(Sa({fetchState:{fetchState:i,error:void 0},billId:t.billId}))},onSkipAutofill:i=>{D?.trackBillPaySkipAutofill(),e(Ge(i))},onDeleteClick:()=>{e(ya({billId:t.billId})),D?.trackInvoiceActionClick(t.billStage??"","delete",l?.userEmail??"",null)}}})(Mn);function w({appContent:e}){const t=se(),l=Y(),{billId:i}=ae(),c=J(),r=c.pathname,u=r.includes("bill/new")||r.includes("/edit"),o=we(),s=me(),n=V.getSignedInUser(),{useFeatureGate:d,useDynamicConfig:p}=le(),{isFeatureEnabled:m}=d(y.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:h}=d(y.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:g}=d(y.isDepositAccountsFeatureEnabled),{isFeatureEnabled:b}=d(y.billPaySetupShowInternationalPaymentByWise),{configValue:k}=p(Ae.zeniAssistConfig),j=k.user_ids!=null&&n?.userId!=null&&k.user_ids.includes(n?.userId),x=v(F=>Z(F)),[C,L]=f.useState(!1),[T,_]=f.useState(!1),[$,I]=f.useState(!1),[H,M]=f.useState(),B=v(F=>Me(F,m,g,i));let q=B.fetchState,W=B.file,N=B.showAutofill;const K=v(F=>_e(F,i??""));u===!1&&(q=K.fetchState,W=K.transactionDetails?.attachments?.[0],N=!1);const X=B.billPayInfo!=null&&B.billPayInfo.stage.code==="pending_approval"?B.billPayInfo.billStatus.code:B.billStage;f.useEffect(()=>{i==null&&t(Ge(!0))},[i,t]),f.useEffect(()=>{q==="Not-Started"&&(u&&T?_(!1):!u&&C&&L(!1))},[i]),f.useEffect(()=>{C||i==null||u||(L(!0),t(Ct(i,h,j,!1)),T||(_(!0),t($e(!1,h,j,b,i)))),u&&!T&&(_(!0),t($e(!1,h,j,b,i)))},[C,T,u,i,t]);const G={onOkClick:()=>{if(I(!1),!H)return;const F=W!=null?"replace":"upload";D?.trackInvoiceActionClick(X??"",F,n?.userEmail??"","yes"),t(ga({replaceBillData:!0,billId:i})),t(Oe(H,m,i))},onCancelClick:()=>{if(I(!1),!H)return;const F=W!=null?"replace":"upload";D?.trackInvoiceActionClick(X??"",F,n?.userEmail??"","no"),t(ha({file:H,billId:i}))}},ee=f.useCallback(()=>{const F=z(c.state?.pathnameStackToGoBack),ce=F.poppedPathname??ie(x.tenantEmailDomain);t(ke({billId:i})),l(ce,{state:{pathnameStackToGoBack:F.newStack}})},[c.state,x.tenantEmailDomain,i,t,l]);if(n==null)throw Error("Can't access address page without signing in...");if(q==="Error"||K.fetchState==="Error")return a.jsx(Ee,{});if(q!="Completed")return i==null&&o!=="small"?a.jsx(rt,{fallback:ee,children:a.jsxs(Fe,{windowSize:o,children:[a.jsx(mt,{}),a.jsx(Re,{}),a.jsx(ut,{backgroundColor:s.colors.grey4,billId:i,file:W,showAutofill:!0,uploadStatus:B.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:void 0,setShowConfirmationPopup:I,setPayload:M,showActionButtons:!1,isInitialEdit:!!B.isInitialEdit,billStage:X}),a.jsx(Ve,{windowSize:o,children:a.jsx(ct,{isNewBill:!0})})]})}):a.jsxs(Fe,{windowSize:o,children:[o==="small"||N?null:a.jsx(pt,{children:a.jsx(Qt,{onClick:ee,"data-testid":"nav-bar-back-click"})}),o!=="small"?a.jsx(Re,{}):null,a.jsx(Un,{}),a.jsx(Ve,{windowSize:o,children:a.jsx(ct,{isNewBill:i==null})})]});{const F=B.billPayInfo!=null&&B.billPayInfo.stage.code==="pending_approval"?B.billPayInfo.billStatus.code:B.billStage;return a.jsx(rt,{fallback:ee,children:a.jsxs(Fe,{windowSize:o,children:[N&&o!=="small"?a.jsx(mt,{}):null,$?a.jsx(_n,{titleComponent:a.jsx(wi,{children:ye.overwriteTitle}),descriptionComponent:a.jsx(xi,{children:ye.overwriteDescription}),primaryButtonText:ye.buttons.yes,secondaryButtonText:ye.buttons.no,action:G,isEditPopup:!0}):null,o==="small"||N?null:a.jsx(pt,{children:a.jsx(yi,{})}),o!=="small"?a.jsx(Re,{}):null,a.jsx(ut,{backgroundColor:s.colors.grey4,billId:i,file:W,showAutofill:N,uploadStatus:B.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:Si(u,K,B),setShowConfirmationPopup:I,setPayload:M,showActionButtons:fi(u,B),isInitialEdit:!!B.isInitialEdit,billStage:F}),a.jsx(Ve,{windowSize:o,children:e})]})})}}function yi(){const{triggerBack:e}=Gn();return a.jsx(Qt,{onClick:e,"data-testid":"nav-bar-back-click"})}function Si(e,t,l){let i,c;return e?(i=l.recurringConfig?.currentInstance,c=l.recurringConfig?.totalPaymentCycles):(i=t.transactionDetails?.recurringBillInstance,c=t.recurringBillConfigDetail?.totalPaymentCycles),t?.isRecurring===!0?a.jsxs(ki,{children:[a.jsx(vi,{children:`${ye.recurringBill.recurringCycle}
|
|
1
|
+
import{j as a}from"./liveblocks-oKBQUmhq.js";import{h as Y,u as se,g as J,i as ae,j as v,N as te,n as Q,l as na,o as ia,p as S}from"./core-rmRh_ZE8.js";import{eP as Z,MO as _e,bt as It,HI as oa,bo as wt,bF as pe,MP as xt,xe as Ct,yo as $e,xN as la,bn as De,MQ as sa,MR as ra,c2 as ca,MS as da,jG as Bt,MT as At,MU as Et,yZ as Le,xt as Be,MV as ua,x2 as tt,MW as pa,C9 as ma,x6 as ba,xc as Dt,MX as ke,MY as Me,yp as Ge,MZ as ha,M_ as ga,ys as Oe,M$ as ya,yF as Sa,N0 as jt,y9 as at,ye as fa,N1 as ka,N2 as ue,N3 as Tt,N4 as Pt,N5 as Ft,fM as va,xy as Ne,cx as Rt,N6 as Ia,gT as wa,N7 as xa,N8 as Ca,e_ as Vt,eY as $t,N9 as ze,Na as Ba,Nb as Aa,Kx as Ze,Nc as Ea,Ky as oe,Kz as He,Nd as Da,Ne as ja,Nf as Ta,yg as nt,yd as Pa,Ng as Fa,Nh as Ra,Ni as Va,x$ as $a,Nj as Na,Nk as Ua,Nl as _a,cl as Nt,cM as Ut,jR as La,bL as Ma,bq as _t,bM as Lt,wk as Ga,Nm as Oa,BY as za,C2 as Za,sR as Ha,yq as Wa,z4 as qa,k2 as fe,Nn as Ka,No as Mt,kw as Ya,jY as Gt,kh as Ot,kg as it,bE as be,bK as Ja,Np as Qa,Nq as ve,iB as Xa,Nr as ot,Ns as en,iF as tn,i_ as an,zi as nn,Nt as on,kp as ln,z8 as sn,Nu as lt,zc as rn,zh as cn,ze as dn,z6 as un,Nv as zt,xn as pn,Nw as mn,Nx as bn,fE as hn,fD as gn,fC as yn,k5 as Sn,kn as st,ky as fn,qo as kn,ke as vn,za as In,iL as wn,kD as xn,Ny as Cn,iD as Bn,qf as An,Nz as En,y5 as Dn,bG as jn,bs as Tn,Js as Pn,cO as Fn,cN as Rn,cw as Vn,cC as $n}from"./zeni-epic-state-DH4sFgeZ.js";import{h as me,z as V,k as Ie,_ as We,v as le,T as y,aN as Ae,s as re,o as A,K as je,c as D,bc as Nn,n as z,a2 as qe,q as E,J as we,bd as rt,be as ct,bf as Un,ak as _n,y as Ln,aH as Mn,x as Zt,D as Ke,A as Ye,bg as Gn,at as Ht,bh as On,V as zn,e as Wt,a7 as Zn,bi as Hn,bj as Wn,bk as qn,bl as Kn,bm as Yn,bn as Jn,bo as Qn,bp as Xn,bq as ei,N as ti,br as ai,b7 as ni,bs as ii,bt as oi,a9 as li}from"./index-BRBKIeck.js";import{n as U,S as si}from"./mui-DRkb5v8u.js";import{A as dt}from"./AddressScreen-CLP4FP-O.js";import{g as ie,a as Te,i as qt,V as Je,b as Qe,c as ri,v as ci,d as di,A as he,D as ge}from"./DomesticWireDetailScreen-Dt8QkNl1.js";import{a as f}from"./sentry-p9ArnUH9.js";import{u as Xe}from"./useAskAiCfoHostNavButtonProps-lMf8y8xS.js";import{u as Kt}from"./useInitialThreadRequest-B5lLxxrW.js";import Ee from"./NotFoundScreen-B6lzVM70.js";import{D as ui}from"./DrawerScreen-B0s6XB_a.js";import{M as Yt}from"./MobileAppDrawer-CzXbfz6E.js";import{F as Jt}from"./FeaturePreviewScreen-B1hf1dDh.js";import{S as Pe}from"./SetupPagesScreen-BLeSibic.js";import{B as pi}from"./BillPayApprovalRoutes-B93D6K86.js";import{FallBackRoute as mi}from"./ScreenRoutes-B800Vl-U.js";import"./recharts-BG7SNYPF.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./utils-B4k-7_rU.js";import"./analyticsHelper-DLVGE934.js";import"./routePaths-f58A_7uy.js";import"./BusinessVerificationPageScreen-COS298yT.js";import"./ReimbursementApprovalRuleDetailScreen-B-HB-2Ii.js";import"./getLocaleForTenant-D8ujXHmv.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]="0be626bb-c5ba-44a8-8a9f-7f46a530365a",e._sentryDebugIdIdentifier="sentry-dbid-0be626bb-c5ba-44a8-8a9f-7f46a530365a")}catch{}})();const bi=Q(function(e,t){const l=_e(e,t.billId),i=V.getSignedInUser(),c=e.tenantState.currentTenantId,r={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},u=z(t.location.state?.pathnameStackToGoBack);let o=!0;u.poppedPathname?.includes("bills")===!0&&(o=!1);let s=`${l.createdBy?.firstName??"Zeni"} ${l.createdBy?.lastName??""}`;const n=De(i);n||!l.createdBy?.email?.includes("zeni.ai")||(s="Zeni");let d=!1,p=!1;if(l?.billActivities.length>0){const{isApprovalorRejectBtnVisible:g,isMarkAsPaidBtnVisible:b}=sa(l.billActivities,ra(t.currentTenant),i);d=g,p=b}const m=ca(t.currentTenant?.userRole??[]),h=l.transactionDetails!=null&&da(l.transactionDetails,m,i);return{billDetails:l,isAccountingClassesEnabled:Bt(e),createdBy:s,authParams:r,transactionAttachmentEndpoint:`${qe}/transaction_attachment`,signedInUser:i,showBackButton:o,isAdmin:m,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,showApproveRejectBtns:d,showMarkAsPaidButtonToApprover:p,hasZeniAssistAccess:t.hasZeniAssistAccess,analytics:D,showMarkAsPaidButtonToCreator:h,isZeniUser:n}},function(e,t){const{billId:l,currentTenant:i,location:c,navigate:r}=t,{tenantEmailDomain:u}=i;return{redirectToBillsScreen:()=>{const o=ie(u),s=E(c.state?.pathnameStackToGoBack,c.pathname);r(o,{state:{pathnameStackToGoBack:s}})},redirectToEditableBillScreen:()=>{const o=E(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}})},discardBillDetailsFromLocalStore:()=>{e(ke({}))},deleteBill:o=>{D.trackBillPayDeleteBill(l,o),e(Dt(l))},cancelAndDeleteBill:(o,s)=>{s===!0?D.trackBillPayCancelAndDeleteBill(l,o):D.trackBillPayCancelBill(l),e(ba(l,s))},onSaveRealTimeApprovals:o=>{e(ma(l,"bill_pay",o))},updateEditRealTimeApproverClicked:o=>{e(pa({isEdit:o,entityId:l,entityType:"bill_pay"}))},approveOrRejectBill:o=>{o.type==="approved"?e(tt(l,o.type,"")):e(tt(l,o.type,o.description??""))},retryOrRefundBill:o=>{o.type==="retry"?e(Be(l,"retry")):e(Be(l,"refund"))},onAddNewRule:()=>{r("../../bills/approval-rules")},onAttachmentClick:(o,s)=>{const n=Te(u,o,s),d=E(c.state?.pathnameStackToGoBack,c.pathname);r(n,{state:{pathnameStackToGoBack:d}})},onBackClick:()=>{const o=z(t.location.state?.pathnameStackToGoBack),s=o.poppedPathname??ie(u);r(s,{state:{pathnameStackToGoBack:o.newStack}})},onRetryPaymentClick:()=>{const o=E(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}}),e(ua({billId:t.billId}))},onRefundPaymentClick:()=>{e(Be(t.billId,"refund"))},saveBillDetails:(o,s,n)=>{o&&e(Et({data:n,billId:l})),e(Le(o?"paid":"pending_approval",o,s,l))},discardOutsideZeniPaymentData:()=>{e(At({billId:l}))}}})(Nn);function hi(){const e=Y(),t=se(),l=J(),{billId:i}=ae(),c=me(),r=V.getSignedInUser(),u=Ie(),o=v(G=>Z(G)),s=v(G=>_e(G,i??"")),n=s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1,d=Kt(o?.companyId,{clearParams:s.fetchState==="Completed"&&!n}),{isAiCfoAccessEnabled:p,onAskAiCfoClick:m}=Xe({mobileExploreReferrer:"Bill Details"});We({isDataReady:s.fetchState==="Completed"});const h=o?.userRole!=null&&It(o?.userRole),g=o?.company==null||o.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!h,[b,k]=f.useState(!1),[j,x]=f.useState(!1),[C,L]=f.useState(!1),{useFeatureGate:T,useDynamicConfig:_}=le(),{isFeatureEnabled:$}=T(y.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:I}=T(y.isBillPayCommentingEnabled),{isFeatureEnabled:H}=T(y.isBillPayDetectInsufficientFundsEnabled),{configValue:M}=_(Ae.zeniAssistConfig),B=oa(o),q=wt(o.userRole),W=g&&pe(u?.loggedInUserRoleMap),N=M.user_ids!=null&&r?.userId!=null&&M.user_ids.includes(r?.userId),{isFeatureEnabled:K}=T(y.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:X}=T(y.billPaySetupShowInternationalPaymentByWise);if(f.useEffect(()=>{$&&s.transactionDetails?.isDeleted===!0||o.isZeni===!0&&r?.userEmailDomain==="zeni.ai"&&B===!1?L(!1):L(s.billActivities[0]?.isRealTimeApprovalEnabled&&(q||W||s.allApprovers.find(G=>G.user.userId===r?.userId)!=null||s.transactionDetails?.lastUpdatedByUserId===r?.userId))},[s.billActivities[0]?.isRealTimeApprovalEnabled,s.allApprovers,s.transactionDetails?.lastUpdatedByUserId,q,W,o.isZeni,B,r]),f.useEffect(()=>{i!=null&&t(xt(i))},[i]),f.useEffect(()=>{b||s.fetchState=="Completed"||s.fetchState=="In-Progress"||(k(!0),t(Ct(i??"",$,N,!1)))},[b,s,i,t]),f.useEffect(()=>{j||s.fetchState!="Completed"||s.transactionDetails?.billPayInfo.stage.code=="paid"||(x(!0),t($e(!1,$,N,X,i)),s.billActivities[0]?.isRealTimeApprovalEnabled===!0&&t(la()))},[j,s,i,t]),r==null)throw Error("Can't access address page without signing in...");return s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1?a.jsx(te,{to:`./edit${l.search}`}):s.deleteStatus.fetchState==="In-Progress"||s.cancelAndDeleteStatus.fetchState==="In-Progress"||s.cancelStatus.fetchState==="In-Progress"?a.jsx(re,{fetchState:s.deleteStatus.fetchState,style:{boxShadow:`0px 2px ${A.sp1} ${c.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[a.jsx(je,{analytics:D,onLoad:G=>(ee=>{i!=null&&ee.trackBillPayBillDetails(i,s.isRecurring)})(G)}),a.jsx(bi,{initialOpenThreadRequest:d??void 0,isShowDeletedBillsEnabled:$,location:l,navigate:e,isBillPayCommentingEnabled:I,isRealTimeApprovalEnabled:C,currentTenant:o,billId:i??"",isInternationalPaymentShaVsOurEnabled:K,hasZeniAssistAccess:N,isDetectInsufficientFundsEnabled:H,isAiCfoAccessEnabled:p,onAskAiCfoClick:m})]})}const ye=Ke.getLocalizedStrings().spendManagement.billPay.billDetails,gi={containerWidth:new Zt(100,58)},ut=Q(function(e,t){const l=V.getSignedInUser(),i=e.tenantState.currentTenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:i??""},r=t.showActionButtons,u=r&&t.file==null;return{uploadInvoiceEndPoint:`${Ht.communicationAgentMicroServiceBaseUrl}`,authParams:c,billId:t.billId,file:t.file,showAutofill:t.showAutofill,analytics:D,entityId:t.billId,showTitlebarIcon:r,showTitlebar:r&&t?.file!=null,uploadStatus:t.uploadStatus,shouldNotShowAttachment:u,style:{paddingTop:A.sp10,paddingRight:A.sp3,paddingBottom:"15px",paddingLeft:A.sp5,...t.showAutofill?{}:{backgroundColor:t.backgroundColor,paddingBottom:"128px"}}}},function(e,t){const l=V.getSignedInUser();return{onInvoiceUpload:i=>{i!=null&&(t.file!=null||t.billId!=null||t.isInitialEdit?(t.setPayload(i),t.setShowConfirmationPopup(!0)):e(Oe(i,t.isVendorRecommendationEnabled,t.billId)))},updateInvoiceUploadFetchState:i=>{e(Sa({fetchState:{fetchState:i,error:void 0},billId:t.billId}))},onSkipAutofill:i=>{D?.trackBillPaySkipAutofill(),e(Ge(i))},onDeleteClick:()=>{e(ya({billId:t.billId})),D?.trackInvoiceActionClick(t.billStage??"","delete",l?.userEmail??"",null)}}})(Mn);function w({appContent:e}){const t=se(),l=Y(),{billId:i}=ae(),c=J(),r=c.pathname,u=r.includes("bill/new")||r.includes("/edit"),o=we(),s=me(),n=V.getSignedInUser(),{useFeatureGate:d,useDynamicConfig:p}=le(),{isFeatureEnabled:m}=d(y.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:h}=d(y.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:g}=d(y.isDepositAccountsFeatureEnabled),{isFeatureEnabled:b}=d(y.billPaySetupShowInternationalPaymentByWise),{configValue:k}=p(Ae.zeniAssistConfig),j=k.user_ids!=null&&n?.userId!=null&&k.user_ids.includes(n?.userId),x=v(F=>Z(F)),[C,L]=f.useState(!1),[T,_]=f.useState(!1),[$,I]=f.useState(!1),[H,M]=f.useState(),B=v(F=>Me(F,m,g,i));let q=B.fetchState,W=B.file,N=B.showAutofill;const K=v(F=>_e(F,i??""));u===!1&&(q=K.fetchState,W=K.transactionDetails?.attachments?.[0],N=!1);const X=B.billPayInfo!=null&&B.billPayInfo.stage.code==="pending_approval"?B.billPayInfo.billStatus.code:B.billStage;f.useEffect(()=>{i==null&&t(Ge(!0))},[i,t]),f.useEffect(()=>{q==="Not-Started"&&(u&&T?_(!1):!u&&C&&L(!1))},[i]),f.useEffect(()=>{C||i==null||u||(L(!0),t(Ct(i,h,j,!1)),T||(_(!0),t($e(!1,h,j,b,i)))),u&&!T&&(_(!0),t($e(!1,h,j,b,i)))},[C,T,u,i,t]);const G={onOkClick:()=>{if(I(!1),!H)return;const F=W!=null?"replace":"upload";D?.trackInvoiceActionClick(X??"",F,n?.userEmail??"","yes"),t(ga({replaceBillData:!0,billId:i})),t(Oe(H,m,i))},onCancelClick:()=>{if(I(!1),!H)return;const F=W!=null?"replace":"upload";D?.trackInvoiceActionClick(X??"",F,n?.userEmail??"","no"),t(ha({file:H,billId:i}))}},ee=f.useCallback(()=>{const F=z(c.state?.pathnameStackToGoBack),ce=F.poppedPathname??ie(x.tenantEmailDomain);t(ke({billId:i})),l(ce,{state:{pathnameStackToGoBack:F.newStack}})},[c.state,x.tenantEmailDomain,i,t,l]);if(n==null)throw Error("Can't access address page without signing in...");if(q==="Error"||K.fetchState==="Error")return a.jsx(Ee,{});if(q!="Completed")return i==null&&o!=="small"?a.jsx(rt,{fallback:ee,children:a.jsxs(Fe,{windowSize:o,children:[a.jsx(mt,{}),a.jsx(Re,{}),a.jsx(ut,{backgroundColor:s.colors.grey4,billId:i,file:W,showAutofill:!0,uploadStatus:B.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:void 0,setShowConfirmationPopup:I,setPayload:M,showActionButtons:!1,isInitialEdit:!!B.isInitialEdit,billStage:X}),a.jsx(Ve,{windowSize:o,children:a.jsx(ct,{isNewBill:!0})})]})}):a.jsxs(Fe,{windowSize:o,children:[o==="small"||N?null:a.jsx(pt,{children:a.jsx(Qt,{onClick:ee,"data-testid":"nav-bar-back-click"})}),o!=="small"?a.jsx(Re,{}):null,a.jsx(Un,{}),a.jsx(Ve,{windowSize:o,children:a.jsx(ct,{isNewBill:i==null})})]});{const F=B.billPayInfo!=null&&B.billPayInfo.stage.code==="pending_approval"?B.billPayInfo.billStatus.code:B.billStage;return a.jsx(rt,{fallback:ee,children:a.jsxs(Fe,{windowSize:o,children:[N&&o!=="small"?a.jsx(mt,{}):null,$?a.jsx(_n,{titleComponent:a.jsx(wi,{children:ye.overwriteTitle}),descriptionComponent:a.jsx(xi,{children:ye.overwriteDescription}),primaryButtonText:ye.buttons.yes,secondaryButtonText:ye.buttons.no,action:G,isEditPopup:!0}):null,o==="small"||N?null:a.jsx(pt,{children:a.jsx(yi,{})}),o!=="small"?a.jsx(Re,{}):null,a.jsx(ut,{backgroundColor:s.colors.grey4,billId:i,file:W,showAutofill:N,uploadStatus:B.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:Si(u,K,B),setShowConfirmationPopup:I,setPayload:M,showActionButtons:fi(u,B),isInitialEdit:!!B.isInitialEdit,billStage:F}),a.jsx(Ve,{windowSize:o,children:e})]})})}}function yi(){const{triggerBack:e}=Gn();return a.jsx(Qt,{onClick:e,"data-testid":"nav-bar-back-click"})}function Si(e,t,l){let i,c;return e?(i=l.recurringConfig?.currentInstance,c=l.recurringConfig?.totalPaymentCycles):(i=t.transactionDetails?.recurringBillInstance,c=t.recurringBillConfigDetail?.totalPaymentCycles),t?.isRecurring===!0?a.jsxs(ki,{children:[a.jsx(vi,{children:`${ye.recurringBill.recurringCycle}
|
|
2
2
|
${i}/${c}`}),a.jsx(Ii,{})]}):void 0}function fi(e,t){const l=t.billActivities?.[0],i=t.billStage==="pending_approval"&&l?.areApprovalsSerialized===!0&&l?.currentPendingStepIndex===0;return e&&(t.billStage==="draft"||i)}const pt=U.div`
|
|
3
3
|
margin-bottom: 20px;
|
|
4
4
|
margin-top: 20px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as T}from"./liveblocks-oKBQUmhq.js";import{a as N}from"./sentry-p9ArnUH9.js";import{h as ae,g as ne,u as se,i as ie,j as C,N as oe,n as re}from"./core-rmRh_ZE8.js";import{k as ce,v as ue,aN as de,z as B,K as pe,c as z,af as x,e as E,bB as le,at as me,q as P,au as M}from"./index-
|
|
1
|
+
import{j as T}from"./liveblocks-oKBQUmhq.js";import{a as N}from"./sentry-p9ArnUH9.js";import{h as ae,g as ne,u as se,i as ie,j as C,N as oe,n as re}from"./core-rmRh_ZE8.js";import{k as ce,v as ue,aN as de,z as B,K as pe,c as z,af as x,e as E,bB as le,at as me,q as P,au as M}from"./index-BRBKIeck.js";import{Nk as fe,eP as q,sg as ye,HM as Se,x$ as ge,AI as Ie,Df as be,DU as he,EN as De,NH as ke,NI as Oe,NJ as Te,NK as Ce,NL as Ne,Ke as Ve,MJ as we,Kq as Ae,km as _e,fE as ve,fD as Fe,fC as xe,qo as Ee,qf as Be,qc as ze,ke as Pe,sp as Me,sn as R,bE as L,sB as U,cv as Re}from"./zeni-epic-state-DH4sFgeZ.js";import{n as Le}from"./mui-DRkb5v8u.js";import{d as j}from"./routePaths-f58A_7uy.js";import{M as Ue}from"./MobileAppDrawer-CzXbfz6E.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new e.Error().stack;d&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[d]="c8cef151-51d9-49c8-b555-a345bbfee24a",e._sentryDebugIdIdentifier="sentry-dbid-c8cef151-51d9-49c8-b555-a345bbfee24a")}catch{}})();const je=Le.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
min-height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-oKBQUmhq.js";import{h as me,i as ba,u as Ce,j as S,g as Se,n as he,N as Fa,s as jt,o as Rn,p as se}from"./core-rmRh_ZE8.js";import{eP as de,bs as He,Pe as ja,eY as Ie,eZ as Ae,e_ as Ee,fT as qe,cs as Je,Pf as Xe,Pg as lt,tv as xa,jO as Ba,Ph as La,gT as pa,z$ as ca,A1 as Ne,A2 as ut,jE as Vt,Pi as Qe,zP as ha,Pj as Un,Pk as On,zS as Va,Pl as jn,NE as Na,rH as Nt,zY as na,h2 as Vn,Pm as Ht,Pn as ea,bq as Nn,Po as Hn,fE as Ha,fD as Ma,Aw as Mn,fC as $a,Nk as $n,Pp as Mt,cl as $t,cM as Gn,ND as ya,B6 as Gt,Pq as Tt,AI as fa,Pr as zt,B7 as zn,O3 as Yn,B8 as Zn,C2 as Kn,sR as Wn,BY as qn,Ps as Jn,A0 as Ze,Pt as Xn,Pu as Qn,Pv as er,Pw as ar,Px as tr,Py as mt,Pz as nr,Ah as Yt,Aa as rr,PA as sr,fV as cr,Aq as Zt,Au as Kt,fU as or,PB as ir,AU as Wt,PC as dr,PD as lr,PE as ur,As as qt,Ad as Jt,zV as Xt,Am as Qt,Ak as en,Ao as mr,PF as an,PG as Ga,AF as ga,Kj as tn,cN as Ct,PH as Cr,PI as pr,PJ as hr,PK as fr,AC as st,A$ as gr,AX as br,Ay as yr,AZ as Sr,AP as Ir,AR as Ar,PL as nn,B5 as Ta,HI as Er,PM as kr,PN as _r,PO as Dr,PP as rn,PQ as Pr,Bs as wr,AH as sn,AB as ve,AG as vr,PR as Tr,PS as Fr,zM as xr,PT as cn,PU as on,PV as Br,zO as Lr,zN as Ft,PW as Rr,PX as Ur,PY as Or,Kf as jr,PZ as pt,P_ as Vr,wn as dn,km as Nr,gU as Hr,Bx as Mr,P$ as ln,Q0 as $r,By as Gr,Q1 as zr,de as Yr,tp as Zr,Bn as Kr,Bh as Ve,bt as Wr,bF as qr,cx as Jr,bG as Xr,Js as Qr}from"./zeni-epic-state-DH4sFgeZ.js";import{z as ee,k as $e,v as oe,T as Y,s as Sa,c2 as za,cd as es,ce as as,cf as ts,n as Re,cg as ns,ch as rs,J as Ia,aN as Le,q as ye,bm as ht,ci as ss,x as Aa,i as Ya,h as ft,c as q,D as gt,a7 as Za,cj as cs,_ as un,aq as bt,by as ra,ck as ct,cl as os,K as yt,cm as is,at as mn,a2 as ot,V as Cn,e as pn,cn as ds,co as ls,cp as us,cq as ms,cr as Cs,cs as ps,o as Ra,ct as hs,cu as fs,cv as at,N as gs,cw as bs,cx as ys,cy as Ss,cz as Is,cA as As,a9 as Es}from"./index-CYj5jhrI.js";import{n as Te,D as hn,S as ks}from"./mui-DRkb5v8u.js";import{a as d}from"./sentry-p9ArnUH9.js";import{g as pe,a as Ea,b as fn,c as ke,d as _e,e as Me,f as Ge,h as ze,A as _s,i as St,P as Ds,j as It,s as sa,k as gn,l as Ke,m as bn,n as Ps,o as yn,p as ws,S as xt}from"./SetupPagesScreen-ALhX_tKy.js";import{u as Sn}from"./useInitialThreadRequest-Chgglzdd.js";import Ka from"./NotFoundScreen-Dnnx5_jI.js";import{M as We}from"./MobileAppDrawer-NgQTATqT.js";import{u as In}from"./useAskAiCfoHostNavButtonProps-CyyAGXJ-.js";import{v as Bt}from"./utils-B4k-7_rU.js";import{d as vs}from"./recharts-BG7SNYPF.js";import{t as Ts}from"./AddressScreen-CAEk8mk_.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./analyticsHelper-uVQynfBH.js";import"./routePaths-CJs7QSKh.js";import"./BusinessVerificationPageScreen-CgVN0Nsi.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]="620fbc26-1bf0-4fc4-9d08-bb9cfb0b1d41",e._sentryDebugIdIdentifier="sentry-dbid-620fbc26-1bf0-4fc4-9d08-bb9cfb0b1d41")}catch{}})();function Fs(){const e=me(),{cardId:a}=ba(),t=Ce(),r=ee.getSignedInUser(),n=S(K=>de(K)),f=$e(),p=He(f?.loggedInUserRoleMap),{useFeatureGate:g}=oe();if(r==null)throw Error("Can't access Add To Wallet Page without signing in...");const[_,c]=d.useState(!1),l=S(K=>ja(K).firstViewAfterActivation);if(a==null)throw Error("Empty card id is not valid...");const v=n.userRole.includes("charge_card_user"),{isFeatureEnabled:y}=g(Y.isChargeCardFeatureEnabled),h=!!n.companyChargeCardInfo?.info?.isChargeCardEnabled,{isFeatureEnabled:B}=g(Y.isDebitCardFeatureEnabled),F=Ie(n),L=Ae(n),C=Ee(B,n),u=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,D=ke({isDebitCardFeatureEnabled:B,isBankingOnlyTenant:C}),o=_e({isCardsOnlyTenant:F,isChargeCardFeatureEnabled:y,isBookKeepingTenant:L,isDebitCardProductVisible:D,chargeCardsCreditAccountLimit:u}),I=!!n.companyDebitCardInfo?.info?.isDebitCardEnabled,A=S(K=>qe(K,n.companyId)),j=Je(A.controllers),{creditAccount:E,creditAccountRepayment:b}=S(K=>Xe(K)),x=S(K=>K.classListState.fetchState),i=!v&&o&&h,m=S(K=>lt(K,a,i,o)),[U,M]=d.useState(!1),R=m.chargeCard,T=R?.cardCreatedByUser?.userId,$=S(K=>T!=null?xa(K.userRoleState,T):void 0),G=$?.accountingClassIDs[0],V=S(K=>G!=null?Ba(K.classState,{classId:G,reportId:"class_list"}):void 0),P=R?.cardHolderUser?.userId,Z=S(K=>P!=null?xa(K.userRoleState,P):void 0),J=Z?.accountingClassIDs[0],w=S(K=>J!=null?Ba(K.classState,{classId:J,reportId:"class_list"}):void 0),O=R?.type.code==="business_physical_credit_card"||R?.type.code==="business_physical_debit_card",te=R?.type.code==="business_physical_debit_card";d.useEffect(()=>{l&&_===!1&&O&&(c(!0),setTimeout(()=>{t(La()),te&&t(pa({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[l,_,O,te]),d.useEffect(()=>{U||m.fetchState==="Completed"||m.fetchState==="In-Progress"||a==null||(M(!0),t(ca(a,i,!1)))},[U,m,a,t]),d.useEffect(()=>{if(m.fetchState==="Completed"&&(O===!1||O&&R?.status?.code!=="active"||R?.cardHolderUserId!==r.userId||l===!1&&_===!1||R?.type.code==="business_physical_debit_card"||R?.type.code==="business_virtual_debit_card")){const K=pe(n.tenantEmailDomain,a,r,R,l);e(K)}},[m.fetchState,l,O]),d.useEffect(()=>{E.fetchState!=="Completed"&&E.fetchState!=="In-Progress"&&o&&h&&p&&t(Ne()),b.fetchState!=="Completed"&&b.fetchState!=="In-Progress"&&o&&h&&p&&t(ut()),x!=="Completed"&&x!=="In-Progress"&&t(Vt())},[E.fetchState,b.fetchState,t,o,h,p,x]);const ae=()=>{if(r!=null&&a!=null){t(La());const K=pe(n.tenantEmailDomain,a,r);e(K)}},k=R?.type.code==="business_physical_debit_card"||R?.type.code==="business_virtual_debit_card",z=Me(o,D,I,h),X=Ea(o,h,p,E,b),Q=fn(k,m);return m.fetchState!=="Completed"?s.jsx(Sa,{fetchState:"In-Progress"}):s.jsxs(s.Fragment,{children:[s.jsx(za,{showConfetti:l}),s.jsx(es,{onGotItClick:ae,isDebitCard:R?.type.code==="business_physical_debit_card",controllerEmails:j,isChargeCardFeatureEnabled:o,isDebitCardFeatureEnabled:D,isDebitCardSetupEnabled:I,isChargeCardSetupEnabled:h,productInformation:z,creditAccountInformation:X,debitAccountInformation:Q,chargeCardDetailView:m,creditAccount:E,classListFetchState:x,creditAccountRepayment:b,cardIssuedByRoles:$?.userRoles,cardIssuedByDepartmentName:V?.className,cardHolderRoles:Z?.userRoles,cardHolderDepartmentName:w?.className})]})}const At=e=>{const{events:a,onEvent:t,onSubscribed:r}=e,n=as(),f=d.useRef(t),p=d.useRef(r),g=d.useRef(0);d.useEffect(()=>{f.current=t},[t]),d.useEffect(()=>{p.current=r},[r]);const _=d.useMemo(()=>[...a].sort().join("|"),[a]);d.useEffect(()=>{if(n==null||a.length===0)return;const c=[],l=new Set,v=()=>{if(p.current==null)return;const y=Date.now();y-g.current<5e3||(g.current=y,p.current())};return a.forEach(y=>{const[h,B]=ts(y);if(B==="")return;const F=n.channel(h),L=u=>{f.current(B,u)};let C;if(F?.subscribed===!0)C=F,C.bind(B,L),l.has(h)||(l.add(h),v()),c.push(()=>{F.unbind(B,L)});else{if(C=F??n.subscribe(h),C.bind(B,L),!l.has(h)){l.add(h);const u=()=>{v()};C.bind("pusher:subscription_succeeded",u),c.push(()=>{C.unbind("pusher:subscription_succeeded",u)})}c.push(()=>{C.unbind(B,L)})}}),()=>{c.forEach(y=>y())}},[n,_])},An="charge-card-transaction-update",En="charge-card-transaction-created",kn="charge-card-transaction-declined",_n="charge-card-transaction-updated",Dn="charge-card-transaction-receipt-uploaded",aa="charge-card-status-update",Et="charge-card-spending-updated",Wa="credit-account-balance-updated",qa="charge-card-created",kt="charge-card-limit-updated",_t="charge-card-limit-reset",Dt="charge-card-renamed",xs="charge-card-department-updated",Pn="charge-card-repayment-completed",wn="charge-card-payment-date-updated",ka="charge-card-cashback-redeemed",_a="charge-card-cashback-earned",ta=(e,a)=>e==null||e===""?[]:a.map(t=>`private-encrypted-${e}.${t}`),Bs=[_a,ka],Ls=he(function(e){const a=Qe(e);return{insightsData:a.insight,cashbackByPeriod:a.cashbackByPeriod,uiState:a.uiState,cashbackSummary:a.cashbackSummary}},function(e){return{onColumnSortConfigChanged:(a,t)=>{e(Un({uiState:{sortKey:a,sortOrder:t}}))}}})(rs);function Rs(){const e=me(),a=Ce(),t=Se(),r=ee.getSignedInUser(),n=S(B=>de(B)),{useFeatureGate:f}=oe(),{isFeatureEnabled:p}=f(Y.isCardsCommentingEnabled),[g,_]=d.useState(!1),c=S(B=>Qe(B)),l=Sn(n.companyId,{clearParams:c.fetchState==="Completed"}),v=d.useCallback(()=>{const B=Re(t.state?.pathnameStackToGoBack),F=B.poppedPathname??Us(n.tenantEmailDomain);e(F,{state:{pathnameStackToGoBack:B.newStack}})},[e,t,n.tenantEmailDomain]),y=Ge(n);if(At({events:ta(y,Bs),onEvent:B=>{switch(B){case _a:case ka:return void a(ha(!0))}},onSubscribed:()=>{a(ha(!0))}}),d.useEffect(()=>{g||c.fetchState==="Completed"||c.fetchState==="In-Progress"||(_(!0),a(ha()))},[g,c,a]),r==null)throw Error("Can't access cashback detail page without signing in...");const h=c.cashbackSummary?.cashbackEarned?.amount!=null&&c.fetchState!=="Not-Started";return c.fetchState!=="In-Progress"||h?(c.cashbackSummary?.cashbackEarned?.amount??0)===0&&c.fetchState==="Completed"?s.jsx(Ka,{}):s.jsx(Ls,{onBackClick:v,isCardsCommentingEnabled:p,initialOpenThreadRequest:l}):s.jsx(ns,{onBackClick:v})}const Us=e=>`/${e}/cards`,Os={containerWidth:new Aa(100,58)},js=({appContent:e})=>{const a=Ia(),t=Ce(),r=me(),{cardId:n}=ba(),f=Se(),{useDynamicConfig:p}=oe(),[g,_]=d.useState(!1),[c,l]=d.useState(!1),[v,y]=d.useState(!1),[h,B]=d.useState(!1),F=ee.getSignedInUser();if(F==null)throw Error("Can't access onboarding card page without signing in...");const L=S(w=>de(w));if(n==null)throw Error("Empty card id is not valid...");const{configValue:C}=p(Le.zeniCardsConfig),u=C.max_charge_card_activation_attempts_by_card_id,D=S(w=>On(w,n)),o=D.chargeCard,I=S(w=>w.chargeCardConfigState.fetchState),{useFeatureGate:A}=oe(),{isFeatureEnabled:j}=A(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:E}=A(Y.isDebitCardFeatureEnabled),b=Ee(E,L),x=ke({isDebitCardFeatureEnabled:E,isBankingOnlyTenant:b}),i=!!L.companyChargeCardInfo?.info?.isChargeCardEnabled,m=L.userRole.includes("charge_card_user"),U=Ie(L),M=Ae(L),R=L.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,T=_e({isCardsOnlyTenant:U,isChargeCardFeatureEnabled:j,isBookKeepingTenant:M,isDebitCardProductVisible:x,chargeCardsCreditAccountLimit:R}),$=!m&&T&&i;d.useEffect(()=>{g===!1&&I!=="In-Progress"&&I!=="Completed"&&(t(Va()),_(!0)),c===!1&&D.fetchState==="Not-Started"&&(l(!0),t(ca(n,$,T)))},[c,D.fetchState,g,I]);const G=o?.type.code==="business_physical_credit_card"||o?.type.code==="business_physical_debit_card";d.useEffect(()=>{if(D.fetchState==="Completed"){if(v===!1&&(G===!1||G&&o?.status?.code!=="inactive"||o?.cardHolderUserId!==F.userId)){const w=pe(L.tenantEmailDomain,n,F,o,!0),O=ye(f.state?.pathnameStackToGoBack,f.pathname);r(w,{state:{pathnameStackToGoBack:O}})}else if(v&&D.isRefreshingViewInBackground===!1&&o?.status?.code==="active"){t(jn({chargeCardId:n}));const w=pe(L.tenantEmailDomain,n,F,o,!0),O=ye(f.state?.pathnameStackToGoBack,f.pathname);t(Na()),r(w,{state:{pathnameStackToGoBack:O}})}}},[D.fetchState,o?.type.code,v,D.isRefreshingViewInBackground]);const V=ee.getZeniOtpTokenForCardHolder(n),P=S(w=>Nt(w.userState,F.userId)),Z=()=>{o?.status?.code!=="active"&&t(na(n,!0))};d.useEffect(()=>{D.updatePhysicalChargeCardAttemptFetchState.fetchState==="Completed"&&o?.cardActivationAttemptHistory.some(w=>w.statusCode==="success")===!0&&v===!1&&(setTimeout(Z,3e3),y(!0))},[D.updatePhysicalChargeCardAttemptFetchState.fetchState,o?.cardActivationAttemptHistory]);const J=w=>{B(w)};if(I!=="Completed"||o==null)return s.jsx(Sa,{fetchState:"In-Progress"});if(o.shippingAddressId==null)throw Error("Can't access shippingAddressId.");if(P?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(Hs,{children:[s.jsx(We,{isAppContentDrawerOpen:h,handleDrawerToggle:J}),s.jsx(Vs,{cardId:n,card:o,shippingAddressId:o.shippingAddressId,phone:P.phone,signedInUser:F,isSandboxEnv:ht(),chargeCardDetailState:D,signedInUserToken:V,navigate:r,currentTenant:L,location:f,maxChargeCardActivationAttempts:u[n]!=null?u[n]:C.default_max_charge_card_activation_attempts!=null?C.default_max_charge_card_activation_attempts:3,chargeCardCashbackRatePerTransaction:C.charge_card_cashback_rate_per_transaction!=null?C.charge_card_cashback_rate_per_transaction:.0175,onClickMenuIcon:()=>{J(!0)}}),e!=null?s.jsx(Ns,{windowSize:a,children:e}):null]})},Vs=he(function(e,{chargeCardDetailState:a,shippingAddressId:t,location:r,cardId:n}){const f=Vn(e.addressState,t);if(f==null)throw Error("Can't access shippingAddress.");const p=Ht(e,n),g=a.updateStatus,_=ea(e,!1,!1,!1);let c=!1;_.fetchState==="Completed"&&_.cards.length<=1&&(c=!0);const l=r.state?.message==="comingFromV2UrlPath";return{showActivatePage:a.chargeCard?.providerCardCreateTime!=null&&a.chargeCard.providerCardCreateTime.add(24,"h").isBefore(Nn())||l,showMenuIcon:c,shippingAddress:f,vgsVaultId:Ya.cardVaultId,twoFAView:p,activationWaitStatus:g,isRefreshingViewInBackground:a.isRefreshingViewInBackground}},function(e,a){const{navigate:t,cardId:r,location:n,currentTenant:f,chargeCardDetailState:p}=a,g=p.chargeCard?.cardProviderID,{tenantEmailDomain:_}=f;return{onGetOtp:c=>{g!=null&&e($a(c,"ChargeCardHolder",r))},onUpdatePhysicalChargeCardAttempt:c=>{e(Mn(r,c))},onResendOtp:c=>{g!=null&&e(Ma(c,"ChargeCardHolder",r))},onVerifyOtp:(c,l)=>{g!=null&&e(Ha(c,l,"ChargeCardHolder",r))},onVerifyOtpSuccess:c=>{c!=null&&ee.saveZeniOtpTokenForCardHolder(c,r)},onCVVActivateSuccess:()=>{e(Hn({chargeCardId:r}))},onBackClick:()=>{const c=Re(n.state?.pathnameStackToGoBack),l=c.poppedPathname==null||c.poppedPathname.includes("onboard")===!0?ze(_):c.poppedPathname;t(l,{state:{pathnameStackToGoBack:c.newStack}})}}})(ss),Ns=Te.div`
|
|
1
|
+
import{j as s}from"./liveblocks-oKBQUmhq.js";import{h as me,i as ba,u as Ce,j as S,g as Se,n as he,N as Fa,s as jt,o as Rn,p as se}from"./core-rmRh_ZE8.js";import{eP as de,bs as He,Pe as ja,eY as Ie,eZ as Ae,e_ as Ee,fT as qe,cs as Je,Pf as Xe,Pg as lt,tv as xa,jO as Ba,Ph as La,gT as pa,z$ as ca,A1 as Ne,A2 as ut,jE as Vt,Pi as Qe,zP as ha,Pj as Un,Pk as On,zS as Va,Pl as jn,NE as Na,rH as Nt,zY as na,h2 as Vn,Pm as Ht,Pn as ea,bq as Nn,Po as Hn,fE as Ha,fD as Ma,Aw as Mn,fC as $a,Nk as $n,Pp as Mt,cl as $t,cM as Gn,ND as ya,B6 as Gt,Pq as Tt,AI as fa,Pr as zt,B7 as zn,O3 as Yn,B8 as Zn,C2 as Kn,sR as Wn,BY as qn,Ps as Jn,A0 as Ze,Pt as Xn,Pu as Qn,Pv as er,Pw as ar,Px as tr,Py as mt,Pz as nr,Ah as Yt,Aa as rr,PA as sr,fV as cr,Aq as Zt,Au as Kt,fU as or,PB as ir,AU as Wt,PC as dr,PD as lr,PE as ur,As as qt,Ad as Jt,zV as Xt,Am as Qt,Ak as en,Ao as mr,PF as an,PG as Ga,AF as ga,Kj as tn,cN as Ct,PH as Cr,PI as pr,PJ as hr,PK as fr,AC as st,A$ as gr,AX as br,Ay as yr,AZ as Sr,AP as Ir,AR as Ar,PL as nn,B5 as Ta,HI as Er,PM as kr,PN as _r,PO as Dr,PP as rn,PQ as Pr,Bs as wr,AH as sn,AB as ve,AG as vr,PR as Tr,PS as Fr,zM as xr,PT as cn,PU as on,PV as Br,zO as Lr,zN as Ft,PW as Rr,PX as Ur,PY as Or,Kf as jr,PZ as pt,P_ as Vr,wn as dn,km as Nr,gU as Hr,Bx as Mr,P$ as ln,Q0 as $r,By as Gr,Q1 as zr,de as Yr,tp as Zr,Bn as Kr,Bh as Ve,bt as Wr,bF as qr,cx as Jr,bG as Xr,Js as Qr}from"./zeni-epic-state-DH4sFgeZ.js";import{z as ee,k as $e,v as oe,T as Y,s as Sa,c2 as za,cd as es,ce as as,cf as ts,n as Re,cg as ns,ch as rs,J as Ia,aN as Le,q as ye,bm as ht,ci as ss,x as Aa,i as Ya,h as ft,c as q,D as gt,a7 as Za,cj as cs,_ as un,aq as bt,by as ra,ck as ct,cl as os,K as yt,cm as is,at as mn,a2 as ot,V as Cn,e as pn,cn as ds,co as ls,cp as us,cq as ms,cr as Cs,cs as ps,o as Ra,ct as hs,cu as fs,cv as at,N as gs,cw as bs,cx as ys,cy as Ss,cz as Is,cA as As,a9 as Es}from"./index-BRBKIeck.js";import{n as Te,D as hn,S as ks}from"./mui-DRkb5v8u.js";import{a as d}from"./sentry-p9ArnUH9.js";import{g as pe,a as Ea,b as fn,c as ke,d as _e,e as Me,f as Ge,h as ze,A as _s,i as St,P as Ds,j as It,s as sa,k as gn,l as Ke,m as bn,n as Ps,o as yn,p as ws,S as xt}from"./SetupPagesScreen-BLeSibic.js";import{u as Sn}from"./useInitialThreadRequest-B5lLxxrW.js";import Ka from"./NotFoundScreen-B6lzVM70.js";import{M as We}from"./MobileAppDrawer-CzXbfz6E.js";import{u as In}from"./useAskAiCfoHostNavButtonProps-lMf8y8xS.js";import{v as Bt}from"./utils-B4k-7_rU.js";import{d as vs}from"./recharts-BG7SNYPF.js";import{t as Ts}from"./AddressScreen-CLP4FP-O.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./analyticsHelper-DLVGE934.js";import"./routePaths-f58A_7uy.js";import"./BusinessVerificationPageScreen-COS298yT.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]="620fbc26-1bf0-4fc4-9d08-bb9cfb0b1d41",e._sentryDebugIdIdentifier="sentry-dbid-620fbc26-1bf0-4fc4-9d08-bb9cfb0b1d41")}catch{}})();function Fs(){const e=me(),{cardId:a}=ba(),t=Ce(),r=ee.getSignedInUser(),n=S(K=>de(K)),f=$e(),p=He(f?.loggedInUserRoleMap),{useFeatureGate:g}=oe();if(r==null)throw Error("Can't access Add To Wallet Page without signing in...");const[_,c]=d.useState(!1),l=S(K=>ja(K).firstViewAfterActivation);if(a==null)throw Error("Empty card id is not valid...");const v=n.userRole.includes("charge_card_user"),{isFeatureEnabled:y}=g(Y.isChargeCardFeatureEnabled),h=!!n.companyChargeCardInfo?.info?.isChargeCardEnabled,{isFeatureEnabled:B}=g(Y.isDebitCardFeatureEnabled),F=Ie(n),L=Ae(n),C=Ee(B,n),u=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,D=ke({isDebitCardFeatureEnabled:B,isBankingOnlyTenant:C}),o=_e({isCardsOnlyTenant:F,isChargeCardFeatureEnabled:y,isBookKeepingTenant:L,isDebitCardProductVisible:D,chargeCardsCreditAccountLimit:u}),I=!!n.companyDebitCardInfo?.info?.isDebitCardEnabled,A=S(K=>qe(K,n.companyId)),j=Je(A.controllers),{creditAccount:E,creditAccountRepayment:b}=S(K=>Xe(K)),x=S(K=>K.classListState.fetchState),i=!v&&o&&h,m=S(K=>lt(K,a,i,o)),[U,M]=d.useState(!1),R=m.chargeCard,T=R?.cardCreatedByUser?.userId,$=S(K=>T!=null?xa(K.userRoleState,T):void 0),G=$?.accountingClassIDs[0],V=S(K=>G!=null?Ba(K.classState,{classId:G,reportId:"class_list"}):void 0),P=R?.cardHolderUser?.userId,Z=S(K=>P!=null?xa(K.userRoleState,P):void 0),J=Z?.accountingClassIDs[0],w=S(K=>J!=null?Ba(K.classState,{classId:J,reportId:"class_list"}):void 0),O=R?.type.code==="business_physical_credit_card"||R?.type.code==="business_physical_debit_card",te=R?.type.code==="business_physical_debit_card";d.useEffect(()=>{l&&_===!1&&O&&(c(!0),setTimeout(()=>{t(La()),te&&t(pa({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[l,_,O,te]),d.useEffect(()=>{U||m.fetchState==="Completed"||m.fetchState==="In-Progress"||a==null||(M(!0),t(ca(a,i,!1)))},[U,m,a,t]),d.useEffect(()=>{if(m.fetchState==="Completed"&&(O===!1||O&&R?.status?.code!=="active"||R?.cardHolderUserId!==r.userId||l===!1&&_===!1||R?.type.code==="business_physical_debit_card"||R?.type.code==="business_virtual_debit_card")){const K=pe(n.tenantEmailDomain,a,r,R,l);e(K)}},[m.fetchState,l,O]),d.useEffect(()=>{E.fetchState!=="Completed"&&E.fetchState!=="In-Progress"&&o&&h&&p&&t(Ne()),b.fetchState!=="Completed"&&b.fetchState!=="In-Progress"&&o&&h&&p&&t(ut()),x!=="Completed"&&x!=="In-Progress"&&t(Vt())},[E.fetchState,b.fetchState,t,o,h,p,x]);const ae=()=>{if(r!=null&&a!=null){t(La());const K=pe(n.tenantEmailDomain,a,r);e(K)}},k=R?.type.code==="business_physical_debit_card"||R?.type.code==="business_virtual_debit_card",z=Me(o,D,I,h),X=Ea(o,h,p,E,b),Q=fn(k,m);return m.fetchState!=="Completed"?s.jsx(Sa,{fetchState:"In-Progress"}):s.jsxs(s.Fragment,{children:[s.jsx(za,{showConfetti:l}),s.jsx(es,{onGotItClick:ae,isDebitCard:R?.type.code==="business_physical_debit_card",controllerEmails:j,isChargeCardFeatureEnabled:o,isDebitCardFeatureEnabled:D,isDebitCardSetupEnabled:I,isChargeCardSetupEnabled:h,productInformation:z,creditAccountInformation:X,debitAccountInformation:Q,chargeCardDetailView:m,creditAccount:E,classListFetchState:x,creditAccountRepayment:b,cardIssuedByRoles:$?.userRoles,cardIssuedByDepartmentName:V?.className,cardHolderRoles:Z?.userRoles,cardHolderDepartmentName:w?.className})]})}const At=e=>{const{events:a,onEvent:t,onSubscribed:r}=e,n=as(),f=d.useRef(t),p=d.useRef(r),g=d.useRef(0);d.useEffect(()=>{f.current=t},[t]),d.useEffect(()=>{p.current=r},[r]);const _=d.useMemo(()=>[...a].sort().join("|"),[a]);d.useEffect(()=>{if(n==null||a.length===0)return;const c=[],l=new Set,v=()=>{if(p.current==null)return;const y=Date.now();y-g.current<5e3||(g.current=y,p.current())};return a.forEach(y=>{const[h,B]=ts(y);if(B==="")return;const F=n.channel(h),L=u=>{f.current(B,u)};let C;if(F?.subscribed===!0)C=F,C.bind(B,L),l.has(h)||(l.add(h),v()),c.push(()=>{F.unbind(B,L)});else{if(C=F??n.subscribe(h),C.bind(B,L),!l.has(h)){l.add(h);const u=()=>{v()};C.bind("pusher:subscription_succeeded",u),c.push(()=>{C.unbind("pusher:subscription_succeeded",u)})}c.push(()=>{C.unbind(B,L)})}}),()=>{c.forEach(y=>y())}},[n,_])},An="charge-card-transaction-update",En="charge-card-transaction-created",kn="charge-card-transaction-declined",_n="charge-card-transaction-updated",Dn="charge-card-transaction-receipt-uploaded",aa="charge-card-status-update",Et="charge-card-spending-updated",Wa="credit-account-balance-updated",qa="charge-card-created",kt="charge-card-limit-updated",_t="charge-card-limit-reset",Dt="charge-card-renamed",xs="charge-card-department-updated",Pn="charge-card-repayment-completed",wn="charge-card-payment-date-updated",ka="charge-card-cashback-redeemed",_a="charge-card-cashback-earned",ta=(e,a)=>e==null||e===""?[]:a.map(t=>`private-encrypted-${e}.${t}`),Bs=[_a,ka],Ls=he(function(e){const a=Qe(e);return{insightsData:a.insight,cashbackByPeriod:a.cashbackByPeriod,uiState:a.uiState,cashbackSummary:a.cashbackSummary}},function(e){return{onColumnSortConfigChanged:(a,t)=>{e(Un({uiState:{sortKey:a,sortOrder:t}}))}}})(rs);function Rs(){const e=me(),a=Ce(),t=Se(),r=ee.getSignedInUser(),n=S(B=>de(B)),{useFeatureGate:f}=oe(),{isFeatureEnabled:p}=f(Y.isCardsCommentingEnabled),[g,_]=d.useState(!1),c=S(B=>Qe(B)),l=Sn(n.companyId,{clearParams:c.fetchState==="Completed"}),v=d.useCallback(()=>{const B=Re(t.state?.pathnameStackToGoBack),F=B.poppedPathname??Us(n.tenantEmailDomain);e(F,{state:{pathnameStackToGoBack:B.newStack}})},[e,t,n.tenantEmailDomain]),y=Ge(n);if(At({events:ta(y,Bs),onEvent:B=>{switch(B){case _a:case ka:return void a(ha(!0))}},onSubscribed:()=>{a(ha(!0))}}),d.useEffect(()=>{g||c.fetchState==="Completed"||c.fetchState==="In-Progress"||(_(!0),a(ha()))},[g,c,a]),r==null)throw Error("Can't access cashback detail page without signing in...");const h=c.cashbackSummary?.cashbackEarned?.amount!=null&&c.fetchState!=="Not-Started";return c.fetchState!=="In-Progress"||h?(c.cashbackSummary?.cashbackEarned?.amount??0)===0&&c.fetchState==="Completed"?s.jsx(Ka,{}):s.jsx(Ls,{onBackClick:v,isCardsCommentingEnabled:p,initialOpenThreadRequest:l}):s.jsx(ns,{onBackClick:v})}const Us=e=>`/${e}/cards`,Os={containerWidth:new Aa(100,58)},js=({appContent:e})=>{const a=Ia(),t=Ce(),r=me(),{cardId:n}=ba(),f=Se(),{useDynamicConfig:p}=oe(),[g,_]=d.useState(!1),[c,l]=d.useState(!1),[v,y]=d.useState(!1),[h,B]=d.useState(!1),F=ee.getSignedInUser();if(F==null)throw Error("Can't access onboarding card page without signing in...");const L=S(w=>de(w));if(n==null)throw Error("Empty card id is not valid...");const{configValue:C}=p(Le.zeniCardsConfig),u=C.max_charge_card_activation_attempts_by_card_id,D=S(w=>On(w,n)),o=D.chargeCard,I=S(w=>w.chargeCardConfigState.fetchState),{useFeatureGate:A}=oe(),{isFeatureEnabled:j}=A(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:E}=A(Y.isDebitCardFeatureEnabled),b=Ee(E,L),x=ke({isDebitCardFeatureEnabled:E,isBankingOnlyTenant:b}),i=!!L.companyChargeCardInfo?.info?.isChargeCardEnabled,m=L.userRole.includes("charge_card_user"),U=Ie(L),M=Ae(L),R=L.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,T=_e({isCardsOnlyTenant:U,isChargeCardFeatureEnabled:j,isBookKeepingTenant:M,isDebitCardProductVisible:x,chargeCardsCreditAccountLimit:R}),$=!m&&T&&i;d.useEffect(()=>{g===!1&&I!=="In-Progress"&&I!=="Completed"&&(t(Va()),_(!0)),c===!1&&D.fetchState==="Not-Started"&&(l(!0),t(ca(n,$,T)))},[c,D.fetchState,g,I]);const G=o?.type.code==="business_physical_credit_card"||o?.type.code==="business_physical_debit_card";d.useEffect(()=>{if(D.fetchState==="Completed"){if(v===!1&&(G===!1||G&&o?.status?.code!=="inactive"||o?.cardHolderUserId!==F.userId)){const w=pe(L.tenantEmailDomain,n,F,o,!0),O=ye(f.state?.pathnameStackToGoBack,f.pathname);r(w,{state:{pathnameStackToGoBack:O}})}else if(v&&D.isRefreshingViewInBackground===!1&&o?.status?.code==="active"){t(jn({chargeCardId:n}));const w=pe(L.tenantEmailDomain,n,F,o,!0),O=ye(f.state?.pathnameStackToGoBack,f.pathname);t(Na()),r(w,{state:{pathnameStackToGoBack:O}})}}},[D.fetchState,o?.type.code,v,D.isRefreshingViewInBackground]);const V=ee.getZeniOtpTokenForCardHolder(n),P=S(w=>Nt(w.userState,F.userId)),Z=()=>{o?.status?.code!=="active"&&t(na(n,!0))};d.useEffect(()=>{D.updatePhysicalChargeCardAttemptFetchState.fetchState==="Completed"&&o?.cardActivationAttemptHistory.some(w=>w.statusCode==="success")===!0&&v===!1&&(setTimeout(Z,3e3),y(!0))},[D.updatePhysicalChargeCardAttemptFetchState.fetchState,o?.cardActivationAttemptHistory]);const J=w=>{B(w)};if(I!=="Completed"||o==null)return s.jsx(Sa,{fetchState:"In-Progress"});if(o.shippingAddressId==null)throw Error("Can't access shippingAddressId.");if(P?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(Hs,{children:[s.jsx(We,{isAppContentDrawerOpen:h,handleDrawerToggle:J}),s.jsx(Vs,{cardId:n,card:o,shippingAddressId:o.shippingAddressId,phone:P.phone,signedInUser:F,isSandboxEnv:ht(),chargeCardDetailState:D,signedInUserToken:V,navigate:r,currentTenant:L,location:f,maxChargeCardActivationAttempts:u[n]!=null?u[n]:C.default_max_charge_card_activation_attempts!=null?C.default_max_charge_card_activation_attempts:3,chargeCardCashbackRatePerTransaction:C.charge_card_cashback_rate_per_transaction!=null?C.charge_card_cashback_rate_per_transaction:.0175,onClickMenuIcon:()=>{J(!0)}}),e!=null?s.jsx(Ns,{windowSize:a,children:e}):null]})},Vs=he(function(e,{chargeCardDetailState:a,shippingAddressId:t,location:r,cardId:n}){const f=Vn(e.addressState,t);if(f==null)throw Error("Can't access shippingAddress.");const p=Ht(e,n),g=a.updateStatus,_=ea(e,!1,!1,!1);let c=!1;_.fetchState==="Completed"&&_.cards.length<=1&&(c=!0);const l=r.state?.message==="comingFromV2UrlPath";return{showActivatePage:a.chargeCard?.providerCardCreateTime!=null&&a.chargeCard.providerCardCreateTime.add(24,"h").isBefore(Nn())||l,showMenuIcon:c,shippingAddress:f,vgsVaultId:Ya.cardVaultId,twoFAView:p,activationWaitStatus:g,isRefreshingViewInBackground:a.isRefreshingViewInBackground}},function(e,a){const{navigate:t,cardId:r,location:n,currentTenant:f,chargeCardDetailState:p}=a,g=p.chargeCard?.cardProviderID,{tenantEmailDomain:_}=f;return{onGetOtp:c=>{g!=null&&e($a(c,"ChargeCardHolder",r))},onUpdatePhysicalChargeCardAttempt:c=>{e(Mn(r,c))},onResendOtp:c=>{g!=null&&e(Ma(c,"ChargeCardHolder",r))},onVerifyOtp:(c,l)=>{g!=null&&e(Ha(c,l,"ChargeCardHolder",r))},onVerifyOtpSuccess:c=>{c!=null&&ee.saveZeniOtpTokenForCardHolder(c,r)},onCVVActivateSuccess:()=>{e(Hn({chargeCardId:r}))},onBackClick:()=>{const c=Re(n.state?.pathnameStackToGoBack),l=c.poppedPathname==null||c.poppedPathname.includes("onboard")===!0?ze(_):c.poppedPathname;t(l,{state:{pathnameStackToGoBack:c.newStack}})}}})(ss),Ns=Te.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
width: ${e=>`${Os.containerWidth.value(e.windowSize)}%`};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-oKBQUmhq.js";import{a as g}from"./sentry-p9ArnUH9.js";import{h as w,u as k,g as x,i as T,j as O,n as E}from"./core-rmRh_ZE8.js";import{z as N,b7 as P,K as F,c as V,e as j,af as C,b8 as A,at as L,au as M,q as U}from"./index-
|
|
1
|
+
import{j as m}from"./liveblocks-oKBQUmhq.js";import{a as g}from"./sentry-p9ArnUH9.js";import{h as w,u as k,g as x,i as T,j as O,n as E}from"./core-rmRh_ZE8.js";import{z as N,b7 as P,K as F,c as V,e as j,af as C,b8 as A,at as L,au as M,q as U}from"./index-BRBKIeck.js";import{eP as D,fG as B,sg as _,fB as G,c2 as R,MJ as q,bn as z,qo as K,qc as Y,ke as H,lK as S,MK as J,bE as Z,cv as b,lS as $,lV as Q}from"./zeni-epic-state-DH4sFgeZ.js";import"./mui-DRkb5v8u.js";import{d as W}from"./routePaths-f58A_7uy.js";import{M as X}from"./MobileAppDrawer-CzXbfz6E.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="933efc88-c8ad-44aa-a7fe-9c5e4baa40e6",n._sentryDebugIdIdentifier="sentry-dbid-933efc88-c8ad-44aa-a7fe-9c5e4baa40e6")}catch{}})();const ee=E(function(n){const t=G(n),i=N.getSignedInUser(),l=D(n),c=l.tenantId,p={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=R(l?.userRole??[])&&t.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=q(n.companyConfigState),a=n.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:t.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:t,allIndustries:e.companyIndustries??[],allNationalityCountries:a,isDisabled:f,authParams:p,filesEndPoint:`${L.fileMicroServiceBaseUrl}`,isZeniUser:z(i)}},function(n,t){const{companyId:i,currentTenant:l,navigate:c,location:p}=t,{tenantEmailDomain:f}=l;return{onScheduleClick:e=>{let a=e.href;a.includes("http")||(a="https://".concat(a)),window.open(a,"_blank")},onSaveAll:()=>{n(Q())},onAddressClick:e=>{const a=W(f,e),o=U(p.state?.pathnameStackToGoBack,p.pathname);c(a,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{n($({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:a,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=a,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:h}=r,v={companyInfo:{...a,website:u!=""&&u!=null?b(u):void 0,meetingLink:y!=""&&y!=null?b(y):void 0,industry:a.industry.selectedOption,companyIndustryType:a.companyIndustryType?.selectedOption??void 0,companySubIndustry:a.companySubIndustry?.selectedOption??void 0,businessModel:a.businessModel.selectedOption??"",companySourceOfFunds:a.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:a.companySourceOfFundsDescription??void 0,countriesOfOperations:a.countriesOfOperations?.selectedOptions?.map(I=>I.length===2?I:M(I))??[],transactionVolume:a.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:a.transactionVolumeDescription??void 0,regulatedStatus:a.regulatedStatus??void 0,regulatedStatusDescription:a.regulatedStatusDescription??void 0,usNexus:a.usNexus??void 0,usNexusTypes:a.usNexusTypes?.selectedOptions??[],purposeOfAccount:a.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:a.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?Z(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:h.selectedOptions.map(I=>parseInt(I)),fileId:r.fileIds[0]}};n(S({companyDetails:v}))},onPrimaryContactDetailsUpdated:e=>{n(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{n(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:void 0}]}))},onNewCompanyOfficerRemoved:e=>{n(J(e))},onCompanyOfficerUpdated:e=>{n(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:e.userId}]}))},updateFilesEntity:e=>{n(H({files:e}))},onDeleteFile:e=>{n(Y(e))},onEditFileName:(e,a)=>{n(K(e,a.split(".")[0]))}}})(A);function de(){const n=w(),t=k(),i=x(),{tenantEmailDomain:l}=T(),[c,p]=g.useState(!1),[f,e]=g.useState(!1),a=O(s=>s.companyViewState.passportView.fetchState),o=O(s=>s.companyConfigState.fetchState),r=O(s=>D(s)),d=r.companyId??N.getSignedInUserTenant(l)?.companyId;if(N.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect(()=>{c||a!=="Not-Started"||d==null||(p(!0),t(B(d)))},[c,a,d,t]),g.useEffect(()=>{o==="Not-Started"&&t(_())},[o,t]);const u=s=>{e(s)},y=a==="Not-Started"||a==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&a==="Error"?m.jsx(P,{onGoHome:()=>n("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(F,{analytics:V,onLoad:s=>s.trackPageLoaded(j.Event.companyPassport,C(i)?"Settings":"Company Passport")}),C(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:n,location:i,isLoading:y,currentTenant:r,isSettings:C(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-oKBQUmhq.js";import{a}from"./sentry-p9ArnUH9.js";import{u as D,g as v,j as m,N as w}from"./core-rmRh_ZE8.js";import{Jo as A,eP as O,fo as j,mW as U,fP as h,fn as _,eW as L,Jv as F}from"./zeni-epic-state-DH4sFgeZ.js";import{u as P,z as u,L as g,D as $,o as k}from"./index-
|
|
1
|
+
import{j as C}from"./liveblocks-oKBQUmhq.js";import{a}from"./sentry-p9ArnUH9.js";import{u as D,g as v,j as m,N as w}from"./core-rmRh_ZE8.js";import{Jo as A,eP as O,fo as j,mW as U,fP as h,fn as _,eW as L,Jv as F}from"./zeni-epic-state-DH4sFgeZ.js";import{u as P,z as u,L as g,D as $,o as k}from"./index-BRBKIeck.js";import{n as H}from"./mui-DRkb5v8u.js";import{t as z}from"./getLocaleForTenant-D8ujXHmv.js";import{g as R,Q as J}from"./QBOConnectionScreen-CoUX8FMs.js";import"./recharts-BG7SNYPF.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./utils-B4k-7_rU.js";import"./empty-BR41JKH4.js";import"./pdf-lib-B5Yv6f0X.js";import"./index-BcKPNqyh.js";import"./url-B-b7cLPz.js";import"./index-CTpsdld-.js";import"./decodeURIComponentSafe-C5DyNl7Z.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new t.Error().stack;d&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[d]="e44c546e-ff9e-499b-beb5-5fa29599332f",t._sentryDebugIdIdentifier="sentry-dbid-e44c546e-ff9e-499b-beb5-5fa29599332f")}catch{}})();const W=H.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex: 1 1 auto;
|
|
4
4
|
flex-direction: row;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-oKBQUmhq.js";import{z as n}from"./index-
|
|
1
|
+
import{j as i}from"./liveblocks-oKBQUmhq.js";import{z as n}from"./index-BRBKIeck.js";import{g as d}from"./QBOConnectionScreen-CoUX8FMs.js";import"./sentry-p9ArnUH9.js";import{g as p,N as a}from"./core-rmRh_ZE8.js";import"./zeni-epic-state-DH4sFgeZ.js";import"./recharts-BG7SNYPF.js";import"./mui-DRkb5v8u.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./utils-B4k-7_rU.js";import"./empty-BR41JKH4.js";import"./pdf-lib-B5Yv6f0X.js";import"./index-BcKPNqyh.js";import"./url-B-b7cLPz.js";import"./index-CTpsdld-.js";import"./decodeURIComponentSafe-C5DyNl7Z.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]="e53e9b9f-4e1e-4d41-afae-a46e42efc4b3",e._sentryDebugIdIdentifier="sentry-dbid-e53e9b9f-4e1e-4d41-afae-a46e42efc4b3")}catch{}})();const U=()=>{const e=p(),{code:t,realmId:o,state:r}=d(e.search),s=n.getSignedInUser()?.userId??"";if(f(t,o,r,s)===!0){const m=`../../${r}/onboarding?code=${t}&realmId=${o}&state=auth_flow`;return i.jsx(a,{to:m})}return i.jsx(a,{to:"../../"})},f=(e,t,o,r)=>e!=""&&t!=""&&o!=""&&r!=null&&r!="";export{U as default,f as hasValidParams};
|
package/dist/assets/{CustomerOnboardingRoutes-CV3lMFDm.js → CustomerOnboardingRoutes-DKTu3TSV.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-oKBQUmhq.js";import{t as $e,A as Ce}from"./AddressScreen-
|
|
1
|
+
import{j as a}from"./liveblocks-oKBQUmhq.js";import{t as $e,A as Ce}from"./AddressScreen-CLP4FP-O.js";import Ke from"./NotFoundScreen-B6lzVM70.js";import{a as g}from"./sentry-p9ArnUH9.js";import{h as se,g as oe,u as ie,i as re,j as A,N as E,n as ce,l as qe,o as Me,p as q}from"./core-rmRh_ZE8.js";import{N as de,k as le,z as B,v as ue,h as ze,T as _,q as V,K as J,c as N,s as ve,e as Y,ap as Qe,J as Ze,aq as Ie,i as te,ar as He,as as ke,o as Je,at as We,au as Ee,av as Ye}from"./index-BRBKIeck.js";import{bn as Xe,eP as ee,fg as et,e_ as pe,eY as me,bt as tt,mU as at,fc as nt,bO as st,ji as ae,jl as we,JU as ot,bT as it,c2 as ge,su as he,sf as rt,Ko as X,sv as _e,HM as ct,km as Ue,Kp as Ve,Kq as dt,Kr as lt,Ks as ut,jg as pt,jj as mt,sh as Be,st as gt,bE as Te,cv as ht,sH as xe,qo as ft,qc as yt,ke as St,fE as bt,fD as Ct,fC as It,Kt as kt,s9 as Et,sI as Tt,sL as xt,sO as Ot,sU as Pt,cT as Dt}from"./zeni-epic-state-DH4sFgeZ.js";import{n as fe}from"./mui-DRkb5v8u.js";import{g as At,h as Ft,q as ne}from"./QBOConnectionScreen-CoUX8FMs.js";import"./recharts-BG7SNYPF.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./utils-B4k-7_rU.js";import"./empty-BR41JKH4.js";import"./pdf-lib-B5Yv6f0X.js";import"./index-BcKPNqyh.js";import"./url-B-b7cLPz.js";import"./index-CTpsdld-.js";import"./decodeURIComponentSafe-C5DyNl7Z.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="227ebac0-3da5-4384-a251-960c838c6969",t._sentryDebugIdIdentifier="sentry-dbid-227ebac0-3da5-4384-a251-960c838c6969")}catch{}})();const jt=ce(function(t,s){const o=[];s.isApAgingFeatureEnabled===!1&&o.push("accounts_payable_aging"),s.isArAgingFeatureEnabled===!1&&o.push("accounts_receivable_aging"),s.shouldFetchZeniAccountsPromoCard===!1&&o.push("zeni_accounts_promo_card"),s.shouldFetchRewardsPlanCard===!1&&o.push("rewards_card"),s.isExpenseAutomationEnabledForUser===!1&&o.push("expense_automation_card");const u=nt(t,o,s.signedInUser,s.isExpenseAutomationFeatureEnabledV2,s.isExpenseAutomationEnabledForUser,s.isTreasuryEnabled);return{dashboardFetchState:st(u.reportsInOrder.map(d=>({fetchState:d.fetchState,error:d.error}))).fetchState}},function(t,s){const{themeState:o,navigate:u,location:d}=s;return{onZeniLogoClick:()=>{o.toggle()},onDashboardFetchDone:()=>{const r=V(d.state?.pathnameStackToGoBack,d.pathname);u("../../dashboard",{state:{pathnameStackToGoBack:r,message:"activation"}})}}})(Qe),vt=()=>{const t=se(),s=oe(),o=ie(),u=de(),[d,r]=g.useState(!1),[p,S]=g.useState(!1),{tenantEmailDomain:e}=re(),n=le(),i=B.getSignedInUser(),h=Xe(i),{useFeatureGate:m}=ue(),k=ze(),{isFeatureEnabled:T}=m(_.isApAgingFeatureEnabled),{isFeatureEnabled:x}=m(_.isArAgingFeatureEnabled),{isFeatureEnabled:I}=m(_.isDepositAccountsFeatureEnabled),{isFeatureEnabled:f}=m(_.isReferralFeatureEnabled),{isFeatureEnabled:U}=m(_.isExpenseAutomationEnabled),{isFeatureEnabled:C}=m(_.isExpenseAutomationEnabledV2),{isFeatureEnabled:F}=m(_.isDebitCardFeatureEnabled),$=C||U&&h,c=A(l=>ee(l)),{isFeatureEnabled:L}=m(_.isTreasuryEnabled),j=c.company!=null&&et(c.company),R=L&&j,O=A(l=>l.onboardingCustomerViewState.fetchState),b=c.excludedResources,G=c.companyId??B.getSignedInUserTenant(e)?.companyId;if(i==null)throw Error("Can't access onboarding flow without signing in...");const v=pe(F,c),P=me(c),D=[],Q=b?.resources?.find(l=>l.resource==="/reports/top_expenses")==null,K=b?.resources?.find(l=>l.resource==="/reports/task_card")==null,M=c?.userRole!=null&&tt(c?.userRole),w=b?.resources?.find(l=>l.resource==="/bills")==null&&!M,z=b?.resources?.find(l=>l.resource==="/reimbursements")==null;if(Q===!1&&D.push("top_expenses"),K===!1&&D.push("task_card"),w===!1&&D.push("bill_pay_card","bill_pay_promo_card"),z===!1&&D.push("reimbursement_card","reimbursement_promo_card"),I===!1&&D.push("zeni_accounts_promo_card"),f===!1&&D.push("rewards_card"),g.useEffect(()=>{O!=="Completed"||d||v||P||(r(!0),o(at(i.userId,G,c.tenantId,!0,!1,D)))},[d,O,v,P,i,c.tenantId,o]),g.useEffect(()=>{(v||P)&&setTimeout(()=>{S(!0)},5e3)},[v,P]),O!=="Completed")return a.jsx(E,{to:"../"});if(O==="Completed"&&p){const l=V(s.state?.pathnameStackToGoBack,s.pathname);if(v)return a.jsx(E,{to:"../../checking",state:{...s.state,pathnameStackToGoBack:l,message:"activation"}});if(P)return a.jsx(E,{to:"../../cards",state:{...s.state,pathnameStackToGoBack:l,message:"activation"}})}return n?.loggedInUserRoleMap!=null?a.jsxs(a.Fragment,{children:[a.jsx(J,{analytics:N,onLoad:l=>(Z=>Z.trackPageLoaded(Y.Event.onboardingDashboardActivation))(l)}),a.jsx(jt,{navigate:t,location:s,themeState:u,signedInUser:i,isApAgingFeatureEnabled:T,isArAgingFeatureEnabled:x,shouldFetchZeniAccountsPromoCard:I,shouldFetchRewardsPlanCard:f,isExpenseAutomationEnabledForUser:$,isExpenseAutomationFeatureEnabledV2:C,isTreasuryEnabled:R,loggedInUserRoleMap:n?.loggedInUserRoleMap})]}):a.jsx(ve,{fetchState:"In-Progress",style:{backgroundColor:k.colors.grey5}})},Oe=fe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
background-color: ${t=>t.theme.colors.grey4};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as d}from"./liveblocks-oKBQUmhq.js";import{i as K,j as _,g as H,u as z,h as W,n as te,k as oa,o as gt,p as F}from"./core-rmRh_ZE8.js";import{eP as U,KJ as Xe,bE as sa,bq as xe,LW as In,i6 as Tn,LX as Nt,LY as xn,i9 as bt,LZ as Qe,L_ as Dn,ie as wn,L$ as $t,M0 as Fn,ij as Ct,M1 as He,M2 as On,cl as St,M3 as Pn,M4 as Mn,L1 as Rn,jc as Bn,M5 as jn,bn as Ge,M6 as ra,Kx as ce,bc as ia,jq as ca,n2 as la,j9 as da,Kz as le,Ky as ee,eO as ua,eU as Ln,fq as kt,M7 as Un,M8 as Gn,M9 as ma,Ma as Re,um as Ye,un as Ve,uK as De,uE as de,ur as Ne,Mb as Yn,Mc as Vn,Md as Nn,Me as pa,Mf as Be,Mg as $n,dE as Je,qY as ha,Mh as zn,Mi as Kn,Mj as qn,Mk as yt,JW as At,jG as we,uS as vt,r4 as Zn,Ml as Qn,uo as zt,q$ as Ie,qX as fa,Mm as ge,Mn as Hn,Mo as Et,JV as It,sY as ga,Mp as Wn,Mq as Xn,Mr as Jn,Ms as Tt,t9 as eo,Mt as to,uq as Kt,sX as ba,Mu as be,Mv as ao,bt as Ca,uW as ka,Mw as no,Mx as oo,My as so,Mz as xt,uR as ro,MA as io,up as qt,uV as _a,MB as Ce,MC as co,MD as lo,ME as Sa,jv as ya,m$ as Aa,jA as va,mZ as Ea,mY as Ia,mX as Ta,sk as uo,fg as mo,cN as po,cO as ho,mU as fo,fc as go,n9 as bo,D_ as Zt,MF as Co,MG as ko,MH as _o,MI as So,b5 as et,f4 as yo,gR as Ao,fG as vo,n3 as Eo,j2 as Io,n0 as To,m_ as xo,e_ as Do,eY as wo}from"./zeni-epic-state-DH4sFgeZ.js";import{z as j,a2 as ae,q as D,c as x,D as q,aU as Fo,_ as $e,K as ze,aV as xa,e as N,aW as Oo,k as _e,aX as Da,v as Se,T as R,h as Po,aY as Mo,aZ as Ro,O as wa,J as Fa,a as Oa,Z as Bo,a_ as jo,I as Lo,aN as Pa,$ as se,a$ as Ma,b0 as Ra,a1 as Ba,b1 as Uo,b2 as Go,aq as Yo,n as Vo,V as No,b3 as $o,b4 as zo,b5 as Ko,b6 as ke}from"./index-CYj5jhrI.js";import{n as Dt}from"./mui-DRkb5v8u.js";import{a as b}from"./sentry-p9ArnUH9.js";import{w as ja}from"./withTransactionSidePanel-DYzLuoli.js";import{c as La,t as Fe,f as ue,a as wt,v as qo}from"./routePaths-CJs7QSKh.js";import{u as ne}from"./useAskAiCfoHostNavButtonProps-CyyAGXJ-.js";import Ue from"./NotFoundScreen-Dnnx5_jI.js";import{u as Ft}from"./useInitialThreadRequest-Chgglzdd.js";import{t as Ua}from"./analyticsHelper-uVQynfBH.js";import{C as Zo}from"./CompanyPassportScreen-CZyzwqAN.js";import{u as Qo}from"./useAiCfoDashboardSuggestedQuestionsChips-DliEl8yr.js";import{F as Ho}from"./FeaturePreviewScreen-CzGmkIs5.js";import{R as Wo}from"./ReferralListScreen-DAm5IsxS.js";import"./recharts-BG7SNYPF.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./utils-B4k-7_rU.js";import"./TransactionDetailScreen-Ciduelax.js";import"./decodeURIComponentSafe-C5DyNl7Z.js";import"./MobileAppDrawer-NgQTATqT.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]="8e58704a-4746-47e1-99f2-260a6f5d8e35",e._sentryDebugIdIdentifier="sentry-dbid-8e58704a-4746-47e1-99f2-260a6f5d8e35")}catch{}})();const Xo=ja(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=K(),s=j.getSignedInUser(),i=_(y=>y.tenantState.currentTenantId),c=_(y=>U(y)),{tenantEmailDomain:m}=K(),g=H(),C=c?.companyName??"",u={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},l=b.useMemo(()=>({authParams:u,companyName:C,downloadEndPoint:`${ae}/agingDetailedReport`,timezone:Xe()}),[]),h=b.useMemo(()=>r!=null?sa(r):xe(),[r]),p=z(),f=W(),A=_(y=>In(y,h,o)),E=b.useCallback(()=>{o!=null&&A.fetchState!=="In-Progress"&&A.fetchState!=="Completed"&&p(Tn(o,h))},[h]),S=b.useCallback(()=>{f("../../",{relative:"path"})},[]),I=b.useCallback((y,M)=>{p(Nt({sortKey:y,sortOrder:M}))},[]),T=b.useCallback(y=>{p(Nt({downloadState:y}))},[]),L=b.useCallback(y=>{if(e)e(y.transactionId,y.transactionType);else if(m!=null){const M=La({id:y.transactionId,type:y.transactionType},m);f(M);const X=D(g.state?.pathnameStackToGoBack,g.pathname);f(M,{state:{pathnameStackToGoBack:X}})}},[m,e]),k=b.useCallback(()=>{A.vendor!=null&&x.trackApAgingDetail("AP Aging",h.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),A.vendor.id,A.vendor.name)},[A.vendor,h]);return b.useEffect(()=>{E()},[]),b.useEffect(()=>{A.fetchState==="Completed"&&k()},[k,A.fetchState]),d.jsx(Fo,{apAgingDetail:A,downloadParams:l,reportDate:h,analytics:x,onTransactionClick:L,onReload:E,onBackClick:S,onColumnSortConfigChanged:I,updateDownloadStateHandler:T,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),Jo=()=>{const e=z(),a=W(),t=_(I=>xn(I)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ne({mobileExploreReferrer:"AP Aging"});$e({isDataReady:t.fetchState==="Completed"});const r=j.getSignedInUser(),s=_(I=>I.tenantState.currentTenantId),i=_(I=>U(I)),c=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},g=b.useMemo(()=>({authParams:m,companyName:c,downloadEndPoint:`${ae}/agingReport`,timezone:Xe()}),[]),C=t.apAgingUIState.selectedDate??xe(),u=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(bt(C))},[]);b.useEffect(()=>{u()},[]);const l=b.useCallback(()=>{a("../",{relative:"path"})},[]),h=b.useCallback(I=>{e(Qe({searchString:I}))},[]),p=b.useCallback((I,T)=>{e(Qe({sortKey:T,sortOrder:I}))},[]),f=b.useCallback(I=>{a(`./${I}/${C.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[C]),A=b.useCallback(I=>{e(Qe({downloadState:I}))},[]),E=b.useCallback((I,T)=>{},[]),S=b.useCallback((I,T)=>{e(Qe({selectedDate:I,agingDateSelectionType:T})),e(bt(I))},[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(ze,{analytics:x,onLoad:I=>I.trackPageLoaded(N.Event.agingReport,"AP Aging")}):null,d.jsx(xa,{uiState:t.apAgingUIState,report:t,downloadParams:g,analytics:x,onReloadReport:u,onBackClick:l,onSearchTextChange:h,onSortOrderChange:p,onEntityNameClick:f,updateDownloadStateHandler:A,onSelectedDateChanged:S,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},es=ja(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=K(),s=j.getSignedInUser(),i=_(k=>U(k)),{tenantEmailDomain:c}=K(),m=H(),g=i.companyName,C={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},u=b.useMemo(()=>({authParams:C,companyName:g,downloadEndPoint:`${ae}/agingDetailedReport`,timezone:Xe()}),[]),l=b.useMemo(()=>r!=null?sa(r):xe(),[r]),h=z(),p=W(),f=_(k=>Dn(k,l,o)),A=b.useCallback(()=>{o!=null&&f.fetchState!=="In-Progress"&&f.fetchState!=="Completed"&&h(wn(o,l))},[l]),E=b.useCallback(()=>{p("../../",{relative:"path"})},[]),S=b.useCallback((k,y)=>{h($t({sortKey:k,sortOrder:y}))},[]),I=b.useCallback(k=>{h($t({downloadState:k}))},[]),T=b.useCallback(k=>{if(e)e(k.transactionId,k.transactionType);else if(c!=null){const y=La({id:k.transactionId,type:k.transactionType},c);p(y);const M=D(m.state?.pathnameStackToGoBack,m.pathname);p(y,{state:{pathnameStackToGoBack:M}})}},[c,e]),L=b.useCallback(()=>{f.customer!=null&&x.trackArAgingDetail("AR Aging",l.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),f.customer.id,f.customer.name)},[f.customer,l]);return b.useEffect(()=>{A()},[]),b.useEffect(()=>{f.fetchState==="Completed"&&L()},[f.fetchState,L]),d.jsx(Oo,{arAgingDetail:f,downloadParams:u,reportDate:l,analytics:x,onTransactionClick:T,onReload:A,onBackClick:E,onColumnSortConfigChanged:S,updateDownloadStateHandler:I,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),ts=()=>{const e=z(),a=W(),t=_(S=>Fn(S)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ne({mobileExploreReferrer:"AR Aging"});$e({isDataReady:t.fetchState==="Completed"});const r=j.getSignedInUser(),s=_(S=>U(S)),i=s.companyName,c={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=b.useMemo(()=>({authParams:c,companyName:i,downloadEndPoint:`${ae}/agingReport`,timezone:Xe()}),[]),g=t.arAgingUIState.selectedDate??xe(),C=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(Ct(g))},[]);b.useEffect(()=>{C()},[]);const u=b.useCallback(()=>{a("../",{relative:"path"})},[]),l=b.useCallback(S=>{e(He({searchString:S}))},[]),h=b.useCallback((S,I)=>{e(He({sortKey:I,sortOrder:S}))},[]),p=b.useCallback(S=>{a(`./${S}/${g.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[g]),f=b.useCallback(S=>{e(He({downloadState:S}))},[]),A=b.useCallback((S,I)=>{e(He({selectedDate:S,agingDateSelectionType:I})),e(Ct(S))},[]),E=b.useCallback((S,I)=>{e(On({nodeId:S,isCollapsed:I}))},[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(ze,{analytics:x,onLoad:S=>S.trackPageLoaded(N.Event.agingReport,"AR Aging")}):null,d.jsx(xa,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:x,onReloadReport:C,onBackClick:u,onSearchTextChange:l,onSortOrderChange:h,onEntityNameClick:p,updateDownloadStateHandler:f,onSelectedDateChanged:A,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Ga=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function Ya(e,a){const t=Rn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=Fe(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(Bn(n,o))},onPromoCardBtnClick:n=>{if(a.isZeniAccountsAdmin){let o=`../../checking/${n}`;n?x.trackZeniAccountsCashBalancePromoClicked("Move Money"):(x.trackZeniAccountsCashBalancePromoClicked("Sign Up for Free"),o="../../checking/promo");const r=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(o,{state:{pathnameStackToGoBack:r}})}else x.trackZeniAccountsCashBalancePromoClicked("Learn More"),window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}const as=te(function(e){const a=Pn(e).accountsInOrder.map((n,o)=>Ga(n,o)),t=Mn(e);return{sectionTitle:q.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:x}},Ya)(Da),ns=te(function(e){const a=jn(e).accountsInOrder.map((o,r)=>Ga(o,r)),t=j.getSignedInUser(),n=Ge(t);return{sectionTitle:q.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:x}},Ya)(Da);function os(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=_e(),o=_(s=>U(s).company?.companyInfo.firstMonthOfFY??1),r=St(n?.loggedInUserRoleMap);return _(s=>s.cashBalanceState.fetchState)==="Error"?d.jsx(Ue,{}):d.jsx(as,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function ss(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=_e(),o=St(n?.loggedInUserRoleMap),r=_(s=>U(s).company?.companyInfo.firstMonthOfFY??1);return _(s=>s.cardBalanceState.fetchState)==="Error"?d.jsx(Ue,{}):d.jsx(ns,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const rs=Dt.div`
|
|
1
|
+
import{j as d}from"./liveblocks-oKBQUmhq.js";import{i as K,j as _,g as H,u as z,h as W,n as te,k as oa,o as gt,p as F}from"./core-rmRh_ZE8.js";import{eP as U,KJ as Xe,bE as sa,bq as xe,LW as In,i6 as Tn,LX as Nt,LY as xn,i9 as bt,LZ as Qe,L_ as Dn,ie as wn,L$ as $t,M0 as Fn,ij as Ct,M1 as He,M2 as On,cl as St,M3 as Pn,M4 as Mn,L1 as Rn,jc as Bn,M5 as jn,bn as Ge,M6 as ra,Kx as ce,bc as ia,jq as ca,n2 as la,j9 as da,Kz as le,Ky as ee,eO as ua,eU as Ln,fq as kt,M7 as Un,M8 as Gn,M9 as ma,Ma as Re,um as Ye,un as Ve,uK as De,uE as de,ur as Ne,Mb as Yn,Mc as Vn,Md as Nn,Me as pa,Mf as Be,Mg as $n,dE as Je,qY as ha,Mh as zn,Mi as Kn,Mj as qn,Mk as yt,JW as At,jG as we,uS as vt,r4 as Zn,Ml as Qn,uo as zt,q$ as Ie,qX as fa,Mm as ge,Mn as Hn,Mo as Et,JV as It,sY as ga,Mp as Wn,Mq as Xn,Mr as Jn,Ms as Tt,t9 as eo,Mt as to,uq as Kt,sX as ba,Mu as be,Mv as ao,bt as Ca,uW as ka,Mw as no,Mx as oo,My as so,Mz as xt,uR as ro,MA as io,up as qt,uV as _a,MB as Ce,MC as co,MD as lo,ME as Sa,jv as ya,m$ as Aa,jA as va,mZ as Ea,mY as Ia,mX as Ta,sk as uo,fg as mo,cN as po,cO as ho,mU as fo,fc as go,n9 as bo,D_ as Zt,MF as Co,MG as ko,MH as _o,MI as So,b5 as et,f4 as yo,gR as Ao,fG as vo,n3 as Eo,j2 as Io,n0 as To,m_ as xo,e_ as Do,eY as wo}from"./zeni-epic-state-DH4sFgeZ.js";import{z as j,a2 as ae,q as D,c as x,D as q,aU as Fo,_ as $e,K as ze,aV as xa,e as N,aW as Oo,k as _e,aX as Da,v as Se,T as R,h as Po,aY as Mo,aZ as Ro,O as wa,J as Fa,a as Oa,Z as Bo,a_ as jo,I as Lo,aN as Pa,$ as se,a$ as Ma,b0 as Ra,a1 as Ba,b1 as Uo,b2 as Go,aq as Yo,n as Vo,V as No,b3 as $o,b4 as zo,b5 as Ko,b6 as ke}from"./index-BRBKIeck.js";import{n as Dt}from"./mui-DRkb5v8u.js";import{a as b}from"./sentry-p9ArnUH9.js";import{w as ja}from"./withTransactionSidePanel-Dqu6-_83.js";import{c as La,t as Fe,f as ue,a as wt,v as qo}from"./routePaths-f58A_7uy.js";import{u as ne}from"./useAskAiCfoHostNavButtonProps-lMf8y8xS.js";import Ue from"./NotFoundScreen-B6lzVM70.js";import{u as Ft}from"./useInitialThreadRequest-B5lLxxrW.js";import{t as Ua}from"./analyticsHelper-DLVGE934.js";import{C as Zo}from"./CompanyPassportScreen-E_X2D3vf.js";import{u as Qo}from"./useAiCfoDashboardSuggestedQuestionsChips-CDWxxCLl.js";import{F as Ho}from"./FeaturePreviewScreen-B1hf1dDh.js";import{R as Wo}from"./ReferralListScreen-BJK_FqYN.js";import"./recharts-BG7SNYPF.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./utils-B4k-7_rU.js";import"./TransactionDetailScreen-CrAEKQhU.js";import"./decodeURIComponentSafe-C5DyNl7Z.js";import"./MobileAppDrawer-CzXbfz6E.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]="8e58704a-4746-47e1-99f2-260a6f5d8e35",e._sentryDebugIdIdentifier="sentry-dbid-8e58704a-4746-47e1-99f2-260a6f5d8e35")}catch{}})();const Xo=ja(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=K(),s=j.getSignedInUser(),i=_(y=>y.tenantState.currentTenantId),c=_(y=>U(y)),{tenantEmailDomain:m}=K(),g=H(),C=c?.companyName??"",u={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},l=b.useMemo(()=>({authParams:u,companyName:C,downloadEndPoint:`${ae}/agingDetailedReport`,timezone:Xe()}),[]),h=b.useMemo(()=>r!=null?sa(r):xe(),[r]),p=z(),f=W(),A=_(y=>In(y,h,o)),E=b.useCallback(()=>{o!=null&&A.fetchState!=="In-Progress"&&A.fetchState!=="Completed"&&p(Tn(o,h))},[h]),S=b.useCallback(()=>{f("../../",{relative:"path"})},[]),I=b.useCallback((y,M)=>{p(Nt({sortKey:y,sortOrder:M}))},[]),T=b.useCallback(y=>{p(Nt({downloadState:y}))},[]),L=b.useCallback(y=>{if(e)e(y.transactionId,y.transactionType);else if(m!=null){const M=La({id:y.transactionId,type:y.transactionType},m);f(M);const X=D(g.state?.pathnameStackToGoBack,g.pathname);f(M,{state:{pathnameStackToGoBack:X}})}},[m,e]),k=b.useCallback(()=>{A.vendor!=null&&x.trackApAgingDetail("AP Aging",h.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),A.vendor.id,A.vendor.name)},[A.vendor,h]);return b.useEffect(()=>{E()},[]),b.useEffect(()=>{A.fetchState==="Completed"&&k()},[k,A.fetchState]),d.jsx(Fo,{apAgingDetail:A,downloadParams:l,reportDate:h,analytics:x,onTransactionClick:L,onReload:E,onBackClick:S,onColumnSortConfigChanged:I,updateDownloadStateHandler:T,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),Jo=()=>{const e=z(),a=W(),t=_(I=>xn(I)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ne({mobileExploreReferrer:"AP Aging"});$e({isDataReady:t.fetchState==="Completed"});const r=j.getSignedInUser(),s=_(I=>I.tenantState.currentTenantId),i=_(I=>U(I)),c=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},g=b.useMemo(()=>({authParams:m,companyName:c,downloadEndPoint:`${ae}/agingReport`,timezone:Xe()}),[]),C=t.apAgingUIState.selectedDate??xe(),u=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(bt(C))},[]);b.useEffect(()=>{u()},[]);const l=b.useCallback(()=>{a("../",{relative:"path"})},[]),h=b.useCallback(I=>{e(Qe({searchString:I}))},[]),p=b.useCallback((I,T)=>{e(Qe({sortKey:T,sortOrder:I}))},[]),f=b.useCallback(I=>{a(`./${I}/${C.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[C]),A=b.useCallback(I=>{e(Qe({downloadState:I}))},[]),E=b.useCallback((I,T)=>{},[]),S=b.useCallback((I,T)=>{e(Qe({selectedDate:I,agingDateSelectionType:T})),e(bt(I))},[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(ze,{analytics:x,onLoad:I=>I.trackPageLoaded(N.Event.agingReport,"AP Aging")}):null,d.jsx(xa,{uiState:t.apAgingUIState,report:t,downloadParams:g,analytics:x,onReloadReport:u,onBackClick:l,onSearchTextChange:h,onSortOrderChange:p,onEntityNameClick:f,updateDownloadStateHandler:A,onSelectedDateChanged:S,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},es=ja(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=K(),s=j.getSignedInUser(),i=_(k=>U(k)),{tenantEmailDomain:c}=K(),m=H(),g=i.companyName,C={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},u=b.useMemo(()=>({authParams:C,companyName:g,downloadEndPoint:`${ae}/agingDetailedReport`,timezone:Xe()}),[]),l=b.useMemo(()=>r!=null?sa(r):xe(),[r]),h=z(),p=W(),f=_(k=>Dn(k,l,o)),A=b.useCallback(()=>{o!=null&&f.fetchState!=="In-Progress"&&f.fetchState!=="Completed"&&h(wn(o,l))},[l]),E=b.useCallback(()=>{p("../../",{relative:"path"})},[]),S=b.useCallback((k,y)=>{h($t({sortKey:k,sortOrder:y}))},[]),I=b.useCallback(k=>{h($t({downloadState:k}))},[]),T=b.useCallback(k=>{if(e)e(k.transactionId,k.transactionType);else if(c!=null){const y=La({id:k.transactionId,type:k.transactionType},c);p(y);const M=D(m.state?.pathnameStackToGoBack,m.pathname);p(y,{state:{pathnameStackToGoBack:M}})}},[c,e]),L=b.useCallback(()=>{f.customer!=null&&x.trackArAgingDetail("AR Aging",l.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),f.customer.id,f.customer.name)},[f.customer,l]);return b.useEffect(()=>{A()},[]),b.useEffect(()=>{f.fetchState==="Completed"&&L()},[f.fetchState,L]),d.jsx(Oo,{arAgingDetail:f,downloadParams:u,reportDate:l,analytics:x,onTransactionClick:T,onReload:A,onBackClick:E,onColumnSortConfigChanged:S,updateDownloadStateHandler:I,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),ts=()=>{const e=z(),a=W(),t=_(S=>Fn(S)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ne({mobileExploreReferrer:"AR Aging"});$e({isDataReady:t.fetchState==="Completed"});const r=j.getSignedInUser(),s=_(S=>U(S)),i=s.companyName,c={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=b.useMemo(()=>({authParams:c,companyName:i,downloadEndPoint:`${ae}/agingReport`,timezone:Xe()}),[]),g=t.arAgingUIState.selectedDate??xe(),C=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(Ct(g))},[]);b.useEffect(()=>{C()},[]);const u=b.useCallback(()=>{a("../",{relative:"path"})},[]),l=b.useCallback(S=>{e(He({searchString:S}))},[]),h=b.useCallback((S,I)=>{e(He({sortKey:I,sortOrder:S}))},[]),p=b.useCallback(S=>{a(`./${S}/${g.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[g]),f=b.useCallback(S=>{e(He({downloadState:S}))},[]),A=b.useCallback((S,I)=>{e(He({selectedDate:S,agingDateSelectionType:I})),e(Ct(S))},[]),E=b.useCallback((S,I)=>{e(On({nodeId:S,isCollapsed:I}))},[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(ze,{analytics:x,onLoad:S=>S.trackPageLoaded(N.Event.agingReport,"AR Aging")}):null,d.jsx(xa,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:x,onReloadReport:C,onBackClick:u,onSearchTextChange:l,onSortOrderChange:h,onEntityNameClick:p,updateDownloadStateHandler:f,onSelectedDateChanged:A,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Ga=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function Ya(e,a){const t=Rn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=Fe(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(Bn(n,o))},onPromoCardBtnClick:n=>{if(a.isZeniAccountsAdmin){let o=`../../checking/${n}`;n?x.trackZeniAccountsCashBalancePromoClicked("Move Money"):(x.trackZeniAccountsCashBalancePromoClicked("Sign Up for Free"),o="../../checking/promo");const r=D(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(o,{state:{pathnameStackToGoBack:r}})}else x.trackZeniAccountsCashBalancePromoClicked("Learn More"),window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}const as=te(function(e){const a=Pn(e).accountsInOrder.map((n,o)=>Ga(n,o)),t=Mn(e);return{sectionTitle:q.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:x}},Ya)(Da),ns=te(function(e){const a=jn(e).accountsInOrder.map((o,r)=>Ga(o,r)),t=j.getSignedInUser(),n=Ge(t);return{sectionTitle:q.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:x}},Ya)(Da);function os(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=_e(),o=_(s=>U(s).company?.companyInfo.firstMonthOfFY??1),r=St(n?.loggedInUserRoleMap);return _(s=>s.cashBalanceState.fetchState)==="Error"?d.jsx(Ue,{}):d.jsx(as,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function ss(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=_e(),o=St(n?.loggedInUserRoleMap),r=_(s=>U(s).company?.companyInfo.firstMonthOfFY??1);return _(s=>s.cardBalanceState.fetchState)==="Error"?d.jsx(Ue,{}):d.jsx(ns,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const rs=Dt.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex: 1 1 auto;
|
|
4
4
|
min-height: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as v}from"./liveblocks-oKBQUmhq.js";import{a as u}from"./sentry-p9ArnUH9.js";import{u as y,j as b,n as w,g as A,N}from"./core-rmRh_ZE8.js";import{Jo as U,eP as _,fo as k,Jp as L,mW as R,Jq as z}from"./zeni-epic-state-DH4sFgeZ.js";import{u as j,z as f,L as T,t as I,D as O,b as $}from"./index-
|
|
1
|
+
import{j as v}from"./liveblocks-oKBQUmhq.js";import{a as u}from"./sentry-p9ArnUH9.js";import{u as y,j as b,n as w,g as A,N}from"./core-rmRh_ZE8.js";import{Jo as U,eP as _,fo as k,Jp as L,mW as R,Jq as z}from"./zeni-epic-state-DH4sFgeZ.js";import{u as j,z as f,L as T,t as I,D as O,b as $}from"./index-BRBKIeck.js";import"./mui-DRkb5v8u.js";import{t as P}from"./getLocaleForTenant-D8ujXHmv.js";import"./recharts-BG7SNYPF.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./utils-B4k-7_rU.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="41e106af-3673-4a62-ade2-778b7b9350fc",t._sentryDebugIdIdentifier="sentry-dbid-41e106af-3673-4a62-ade2-778b7b9350fc")}catch{}})();const q=w(function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}})(function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=A(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map(l=>l.tenantEmailDomain),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce((l,F)=>l||i.split("/").find(D=>D===F)!=null,!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=$(c,p);return v.jsx(N,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}});function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=j(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b(e=>U(e)),n=b(e=>e.tenantState.fetchState),i=b(e=>e.tenantState.error),a=b(e=>e.tenantState.activeTenantFetchState.fetchState),c=b(e=>_(e)),d=f.getSignedInUser();return u.useLayoutEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)},[a,n]),u.useEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(k(d.userId,e))))},[n,a,d,t]),u.useEffect(()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!L(i))&&t(R(e.userId)))},[n,a,i,d,t]),u.useEffect(()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())},[m.tenantsCoreDetailsInOrder,n]),u.useEffect(()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(O.updateAppLocaleID(P(c)),o())},[n,a,c]),v.jsx(q,{})}const J=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],Q={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of J)if(t.toLocaleLowerCase().includes(s))return Q[s]}export{oe as default};
|
package/dist/assets/{DomesticWireDetailScreen-BwV8uHFK.js → DomesticWireDetailScreen-Dt8QkNl1.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-oKBQUmhq.js";import{h as w,g as C,j as h,n as A,i as B}from"./core-rmRh_ZE8.js";import{Nq as k,Nx as _,fE as W,fD as J,fC as K,iD as M,Ky as Y,qf as L,eP as D,MY as V,iB as T,Nr as v,NA as F,iz as G,iW as N}from"./zeni-epic-state-DH4sFgeZ.js";import{bu as Q,J as j,v as R,z as U,h as z,n as p,T as S,s as O,bv as X,o as Z,bw as ee,q as te}from"./index-
|
|
1
|
+
import{j as l}from"./liveblocks-oKBQUmhq.js";import{h as w,g as C,j as h,n as A,i as B}from"./core-rmRh_ZE8.js";import{Nq as k,Nx as _,fE as W,fD as J,fC as K,iD as M,Ky as Y,qf as L,eP as D,MY as V,iB as T,Nr as v,NA as F,iz as G,iW as N}from"./zeni-epic-state-DH4sFgeZ.js";import{bu as Q,J as j,v as R,z as U,h as z,n as p,T as S,s as O,bv as X,o as Z,bw as ee,q as te}from"./index-BRBKIeck.js";import{n as q}from"./mui-DRkb5v8u.js";import"./sentry-p9ArnUH9.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]="62408aa8-09ae-4f22-9036-82e0f1468fe2",e._sentryDebugIdIdentifier="sentry-dbid-62408aa8-09ae-4f22-9036-82e0f1468fe2")}catch{}})();const ne=A(null,function(e,t){return{onSaveVendor:n=>{e(M(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(Y("common")),n!=null&&e(L(n))},onGetOtp:n=>{e(K(n,"BillPayVendor"))},onResendOtp:n=>{e(J(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(W(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(_(n,a,o))}}})(Q);function H({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h(i=>k(i,e));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=q.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-oKBQUmhq.js";import{J as f,x as l,h as c}from"./index-
|
|
1
|
+
import{j as i}from"./liveblocks-oKBQUmhq.js";import{J as f,x as l,h as c}from"./index-BRBKIeck.js";import{D as p}from"./mui-DRkb5v8u.js";import"./sentry-p9ArnUH9.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="6914df4e-18ee-4d16-860e-ba01e5fdbcff",e._sentryDebugIdIdentifier="sentry-dbid-6914df4e-18ee-4d16-860e-ba01e5fdbcff")}catch{}})();const b={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:s}=e,n=f(),d=o?.valuePx(n)??b.drawerLeftMargin.valuePx(n),a=c();return i.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${d})`}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.8,cursor:"pointer"}}},onClose:s,children:t})}export{h as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-oKBQUmhq.js";import{a as c}from"./sentry-p9ArnUH9.js";import{h as A,u as B,g as q,i as F,j as d,N as L,n as K,o as N,p as _}from"./core-rmRh_ZE8.js";import{LF as z,eP as O,L2 as R,kG as H,HE as k,LK as M,Kx as W,jG as Y,HF as S,L7 as $,L8 as V,Kz as J,Ky as Q}from"./zeni-epic-state-DH4sFgeZ.js";import{aR as U,c as X,n as Z,q as tt}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-oKBQUmhq.js";import{a as c}from"./sentry-p9ArnUH9.js";import{h as A,u as B,g as q,i as F,j as d,N as L,n as K,o as N,p as _}from"./core-rmRh_ZE8.js";import{LF as z,eP as O,L2 as R,kG as H,HE as k,LK as M,Kx as W,jG as Y,HF as S,L7 as $,L8 as V,Kz as J,Ky as Q}from"./zeni-epic-state-DH4sFgeZ.js";import{aR as U,c as X,n as Z,q as tt}from"./index-BRBKIeck.js";import"./mui-DRkb5v8u.js";import{d as b}from"./decodeURIComponentSafe-C5DyNl7Z.js";import{w as et}from"./withTransactionSidePanel-Dqu6-_83.js";import{f as at,c as nt}from"./routePaths-f58A_7uy.js";import"./recharts-BG7SNYPF.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./utils-B4k-7_rU.js";import"./useAskAiCfoHostNavButtonProps-lMf8y8xS.js";import"./TransactionDetailScreen-CrAEKQhU.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="f0b10702-7fc9-48af-9bf8-5ce8bc477a57",a._sentryDebugIdIdentifier="sentry-dbid-f0b10702-7fc9-48af-9bf8-5ce8bc477a57")}catch{}})();const ot=K(function(a,t){const e=t.entity,o=M(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:W(a,"common")},trendWithTransactionsReport:o,analytics:X,isAccountingClassesEnabled:Y(a)}},function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,l=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:l}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(J({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(Q("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a($()),a(V()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??I();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(k(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(U),it=et(function({entityType:a,...t}){const e=A(),o=B(),l=q(),[m,T]=c.useState(!1),[h,D]=c.useState(!1),{tenantEmailDomain:C,entityIdEncoded:x,entityNameEncoded:j}=F(),r=b(x??""),f=b(j??""),p=rt(r,f),w=[r,f].filter(n=>n!=null),i={name:f,id:r,type:a,zeniId:r,qboId:r},g=d(n=>z(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),G=d(n=>O(n).company?.companyInfo.firstMonthOfFY??1),u=d(n=>R(n.trendWithTransactionsState,i,"EntityDetail"));c.useEffect(()=>{m===!1&&p===!0&&(T(!0),o(H(i)))},[m,p,i]);const E=d(n=>n.trendState.fetchState),P=u?.selectedPeriod?.timePeriod??g,v=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(u?.selectedPeriod?.timePeriod,g);return c.useEffect(()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(k(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))},[m,h,E]),p?s.jsx(ot,{firstMonthOfFY:G,tenantEmailDomain:C,location:l,navigate:e,entity:i,defaultTransactionTimePeriod:v,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(L,{to:I(w.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,I=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function xt({entityType:a}){return s.jsx(N,{children:s.jsx(_,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{xt as EntityDetailRoutes,xt as default};
|
package/dist/assets/{ExpenseAutomationRoutes-DlB2tX8j.js → ExpenseAutomationRoutes-Du15OqPm.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-oKBQUmhq.js";import Rn from"./NotFoundScreen-
|
|
1
|
+
import{j as C}from"./liveblocks-oKBQUmhq.js";import Rn from"./NotFoundScreen-B6lzVM70.js";import{a,b as wt}from"./sentry-p9ArnUH9.js";import{n as Fe,S as Dn}from"./mui-DRkb5v8u.js";import{u as de,h as Pt,g as qe,j as F,n as Un,i as rt,o as Fn,p as ze}from"./core-rmRh_ZE8.js";import{eP as Re,Q7 as Bn,n4 as ke,fj as _n,qS as Vn,nm as xt,nH as Rt,Q8 as Dt,nR as Mn,Q9 as Ut,nf as jn,qo as On,f3 as fe,Qa as De,sR as Ft,C2 as Bt,Qb as _t,Qc as zn,pY as Ge,LG as dt,LI as Ln,jJ as Qn,LJ as $n,jQ as qn,cV as Gn,tW as Je,ns as Vt,nW as Ue,Qd as Jn,Kz as ut,Ky as we,Qe as mt,k5 as Nn,Qf as Yn,Qg as Kn,Qh as Hn,Qi as Wn,nz as Zn,nk as ue,nZ as Pe,Qj as Xn,Qk as ea,Ql as ta,o4 as na,jU as aa,jL as oa,Qm as sa,jT as ht,LQ as ca,Qn as ia,Qo as la,pU as ra,pw as da,nX as le,pv as Le,Qp as ua,Qq as ma,Qr as ha,lo as pa,bq as ga,lj as pt,l5 as Ca,Qs as Sa,gT as gt,fU as Ia,lg as fa,vP as ka,Qt as Ea,ov as va,oq as ba,ou as ya,of as Aa,Qu as Ta,f6 as Mt,nK as wa,nv as Pa,fk as Ct,n$ as xa,Qv as Ra,nY as jt,Qw as Da,Qx as Ua,Qy as Fa,Qz as Ba,QA as St,q4 as _a,pm as Va,Kx as Ma,jS as ja,QB as Oa,GA as za,jR as La,jG as Qa,f5 as $a,oW as Ot,pe as qa,nV as It,n_ as Ga,bE as Ja,ld as Na,la as Ya,QC as Ka,oe as ft,pc as kt,pa as Ha,o$ as Wa,oG as Za,pd as Xa,QD as eo,QE as to,oK as no,QF as ao,oA as oo,oJ as so,oH as co,ph as io}from"./zeni-epic-state-DH4sFgeZ.js";import{v as zt,T as re,c as z,q as H,V as Lt,_ as Qt,cE as lo,z as Be,cF as ro,at as xe,cG as uo,aT as Et,s as $t,cH as mo,aq as Qe,D as ho,cI as po,a2 as go,cJ as Co,O as So,cK as Io,cL as fo,N as ko,k as Eo,aN as vo,b7 as bo,x as yo,cM as Ao}from"./index-BRBKIeck.js";import{u as qt}from"./useAskAiCfoHostNavButtonProps-lMf8y8xS.js";import{c as vt,C as To}from"./TransactionDetailScreen-CrAEKQhU.js";import{w as wo}from"./withTransactionSidePanel-Dqu6-_83.js";import{h as Po,v as xo}from"./routePaths-f58A_7uy.js";import{g as $e}from"./accountMappingHelper-DjOpJLte.js";import{D as Ro}from"./DrawerScreen-B0s6XB_a.js";import"./recharts-BG7SNYPF.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./utils-B4k-7_rU.js";import"./decodeURIComponentSafe-C5DyNl7Z.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]="990fe08d-3266-44b2-b19b-7e7060b9a7bf",t._sentryDebugIdIdentifier="sentry-dbid-990fe08d-3266-44b2-b19b-7e7060b9a7bf")}catch{}})();const Do=()=>{const t=de(),i=Pt(),A=qe(),f=F(d=>Re(d)),{useFeatureGate:E}=zt(),{isFeatureEnabled:g}=E(re.isRealtimeInsightsFeatureEnabled),u=F(d=>d.expenseAutomationViewState.selectedPeriodByTenantId),o=F(d=>Bn(d,f.tenantId)),{isAiCfoAccessEnabled:v,onAskAiCfoClick:S}=qt({mobileExploreReferrer:"Month-End Close Overview"}),m=a.useCallback((d,R,Y=!1)=>{t(ke({tenantId:R,period:{month:d.month,year:d.year},refreshViewInBackground:Y}))},[]),b=a.useCallback(d=>{const R=A.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&z.trackMonthCloseAuditPage(d.month,d.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,R??null),t(_n(f.tenantId,d))},[f.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),r=u[f.tenantId],_=a.useCallback(()=>{const d=A.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&z.trackMonthCloseAuditPage(r.month,r.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),m(r,f.tenantId,!0)},[m,r,f.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),h=H(A.state?.pathnameStackToGoBack,A.pathname),T=a.useCallback(()=>{if(o.monthEndCloseChecks!=null&&r!=null){const d=o.monthEndCloseChecks.monthEndCloseCheckList.find(R=>R.progress<100);if(d!=null)return void i(`./${d.id}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview"}});i(`./month_end_insights/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview"}})}},[o.monthEndCloseChecks,r]),{areTenantIdsInSync:I}=Lt();return Qt({isDataReady:o.fetchState==="Completed"}),a.useEffect(()=>{r!=null&&o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&I&&m(r,f.tenantId)},[m,r,o.fetchState,f.tenantId,I]),a.useEffect(()=>{r!=null&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&I&&t(Vn(r))},[r,o.monthClosePerformanceTrendFetchStatus.fetchState,I]),a.useEffect(()=>{const d=setInterval(()=>{o.fetchState!=="In-Progress"&&o.fetchState==="Completed"&&_()},3e5);return()=>clearInterval(d)},[o.fetchState]),a.useEffect(()=>{if(o.fetchState==="Completed"&&o.monthEndCloseChecks?.auditSummary!=null){const d=A.state?.referrer;z.trackMonthCloseAuditPage(o.selectedPeriod.month,o.selectedPeriod.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null)}},[o.fetchState,o.selectedPeriod,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),C.jsx(Uo,{children:C.jsx(lo,{monthEndCloseChecksView:o,isRealtimeInsightsFeatureEnabled:g,onMonthEndCheckClick:d=>{i(`./${d}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:b,handleReviewButtonClick:T,onBackClick:()=>{i("../../dashboard")},onReload:_,isAiCfoAccessEnabled:v,onAskAiCfoClick:S})})},Uo=Fe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-oKBQUmhq.js";import{a as r}from"./sentry-p9ArnUH9.js";import{a3 as l,a4 as p,a5 as d,n as m}from"./index-
|
|
1
|
+
import{j as s}from"./liveblocks-oKBQUmhq.js";import{a as r}from"./sentry-p9ArnUH9.js";import{a3 as l,a4 as p,a5 as d,n as m}from"./index-BRBKIeck.js";import"./mui-DRkb5v8u.js";import c from"./NotFoundScreen-B6lzVM70.js";import{h as u,g as b}from"./core-rmRh_ZE8.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]="e5992879-11fa-4121-8a97-eb0ecebef062",e._sentryDebugIdIdentifier="sentry-dbid-e5992879-11fa-4121-8a97-eb0ecebef062")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),i=r.useCallback(()=>{(()=>{const n=m(a.state?.pathnameStackToGoBack),f=n.poppedPathname??k();e(f,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=l(a.pathname);return o!=null?s.jsx(p,{menuItem:d(o),onDemoClick:t,onGoBack:i}):s.jsx(c,{})},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-p9ArnUH9.js";import{u as l,h as f,g as m}from"./core-rmRh_ZE8.js";import{gA as p,JM as g,JN as _}from"./zeni-epic-state-DH4sFgeZ.js";import{u as b,L as h,z as y}from"./index-
|
|
1
|
+
import{a as r}from"./sentry-p9ArnUH9.js";import{u as l,h as f,g as m}from"./core-rmRh_ZE8.js";import{gA as p,JM as g,JN as _}from"./zeni-epic-state-DH4sFgeZ.js";import{u as b,L as h,z as y}from"./index-BRBKIeck.js";import"./liveblocks-oKBQUmhq.js";import"./recharts-BG7SNYPF.js";import"./mui-DRkb5v8u.js";import"./analytics-CnRKHa3G.js";import"./plaid-DkZRc6lf.js";import"./dnd-DhJJZ165.js";import"./stripe-DMRn4zHo.js";import"./lottie-BEwdV52_.js";import"./lexical-Bbb_9RJE.js";import"./pdf-DTUmIE_Y.js";import"./utils-B4k-7_rU.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]="c3143327-0e0d-4fc6-83b3-9f591aea766a",e._sentryDebugIdIdentifier="sentry-dbid-c3143327-0e0d-4fc6-83b3-9f591aea766a")}catch{}})();function R(){const e=l(),n=f(),o=m(),{setLoading:i,clearAllLoading:d}=b(),s=r.useRef(!1);return r.useLayoutEffect(()=>{i(h.CONNECTION_AUTH)},[i]),r.useEffect(()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),c=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&c!=null){const t=JSON.parse(c);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}d();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})},[]),null}export{R as default};
|