@zeniai/web-app-ui 5.1.65-prod → 5.1.65-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-B8Ckgpa3.js +1 -0
- package/dist/assets/{AddressScreen-DBh2kopg.js → AddressScreen-C462o9IS.js} +1 -1
- package/dist/assets/{AiCfoScreen-0P2uyYnp.js → AiCfoScreen-jf_vh6RV.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-Bf6ESEC4.js → BillPayApprovalRoutes-Dv07YBai.js} +1 -1
- package/dist/assets/{BillPayRoutes-JaK42ohp.js → BillPayRoutes-BfH1dGV8.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-yN_GrrFh.js → BusinessVerificationPageScreen-NFhMF-eZ.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-DIGTV0Mu.js → ChargeCardRoutes-CmSQC_Lv.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-ioZCXwD_.js → CompanyPassportScreen-BTh0h3W9.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-BjfktFq2.js → ConnectionAuthScreen-DbUrzBEF.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-DSwHpsbC.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-Br-Z1BtF.js → CustomerOnboardingRoutes-D6x8LO5z.js} +1 -1
- package/dist/assets/{DashboardRoutes-CvxLfoR-.js → DashboardRoutes-CdLho0oB.js} +1 -1
- package/dist/assets/{DefaultTenantHome-GIFjQHwa.js → DefaultTenantHome-Cvz__eKe.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-DM1m923S.js → DomesticWireDetailScreen-Fo4R4YRQ.js} +1 -1
- package/dist/assets/{DrawerScreen-Bw0Jl3tu.js → DrawerScreen-DHL_W742.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-DpkUcZ1b.js → EntityDetailRoutes-OYUKZsw7.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-D1H-vOTZ.js → ExpenseAutomationRoutes-BSNLpHm-.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-RdL9x4ht.js → FeaturePreviewScreen-CEy-pIWu.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-ChOR5mQ9.js → HubSpotOAuthCallbackScreen-DYNBQ5WX.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-B0Bm7tIZ.js → MagicLinkRoutes-AN0N6Bbm.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-BSGPgcvY.js → MagicLinkSignInScreen-CABl7ivE.js} +1 -1
- package/dist/assets/{MobileAppDrawer-qPZdyrO4.js → MobileAppDrawer-BB6nxZVq.js} +1 -1
- package/dist/assets/NotFoundScreen-DxqYM2wk.js +1 -0
- package/dist/assets/{NotificationRoutes-CsG2sL7b.js → NotificationRoutes-CcsjMt50.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-y-MvR-GE.js → OAuthConsentScreen-DuYRDMYr.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-DhJIPrDf.js → PandLWithForecastRoutes-D-lH2ScL.js} +1 -1
- package/dist/assets/{PeopleRoutes-Bj5rMpkn.js → PeopleRoutes-D8H5LhLo.js} +1 -1
- package/dist/assets/{PerformanceRoutes-Dh41RQnX.js → PerformanceRoutes-CrUlvbe8.js} +1 -1
- package/dist/assets/{Preview-Dk_ia_hl.js → Preview-BcvozuOU.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-DMhJk96k.js → QBOConnectionScreen-CoBJUifN.js} +1 -1
- package/dist/assets/{ReferralListScreen-BTezTn63.js → ReferralListScreen-CAddpyLT.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-DMZ_8HxF.js → ReimbursementApprovalRoutes-OLrHIpq5.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-D4-WsBma.js → ReimbursementApprovalRuleDetailScreen-DrKUThOY.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-CEmvBqU2.js → ReimbursementRoutes-CC_SGbNZ.js} +1 -1
- package/dist/assets/{ReportsRoutes-DHk4zguu.js → ReportsRoutes-BWCj8bTz.js} +1 -1
- package/dist/assets/{RewardsRoutes-a_wmpytf.js → RewardsRoutes-DtcaGdke.js} +1 -1
- package/dist/assets/{ScreenRoutes-DRJIZt7d.js → ScreenRoutes-JqGTg3y4.js} +2 -2
- package/dist/assets/{SettingsRoutes-C70whJIl.js → SettingsRoutes-BTveFGVQ.js} +1 -1
- package/dist/assets/{SetupPagesScreen-BN4AuJYP.js → SetupPagesScreen-3YiJuF5G.js} +1 -1
- package/dist/assets/{SignInScreen-l-2YMbZy.js → SignInScreen-BWGG1xLU.js} +1 -1
- package/dist/assets/{SignOutScreen-Yt1oM0Fq.js → SignOutScreen-DnGtoVfY.js} +1 -1
- package/dist/assets/{TaskListScreen-DHIOYmiB.js → TaskListScreen-Nj-zc58y.js} +1 -1
- package/dist/assets/{TaskRoutes-PlhqIOO4.js → TaskRoutes-B_U8Y-wv.js} +1 -1
- package/dist/assets/{TransactionDetailRoutes-Da9AxMSb.js → TransactionDetailRoutes-DTXuYQuX.js} +1 -1
- package/dist/assets/{TransactionDetailScreen-DT8xA3x1.js → TransactionDetailScreen-BN5X1_PJ.js} +1 -1
- package/dist/assets/{TransactionListRoutes-BukrAqP2.js → TransactionListRoutes-CKJb2lcU.js} +1 -1
- package/dist/assets/{TreasuryRoutes-CoolddxK.js → TreasuryRoutes-DvRWBU40.js} +1 -1
- package/dist/assets/{VendorsRoutes-Hio5Sfl7.js → VendorsRoutes-DUhDEUNQ.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-CvwI66d8.js → WiseConfirmationScreen-Db88Xwe3.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-Bdh4wUlu.js → ZeniAccountRoutes-D1NhLIdB.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-C1LlIbPZ.js → ZeniAccountStatementScreen-CszrCwc6.js} +1 -1
- package/dist/assets/{accountMappingHelper-BJc8FF-F.js → accountMappingHelper-DcHRTvHW.js} +1 -1
- package/dist/assets/{analytics-7_b07CgE.js → analytics-C--DBRuq.js} +1 -1
- package/dist/assets/{analyticsHelper-DGI02sYS.js → analyticsHelper-BYU7ljxB.js} +1 -1
- package/dist/assets/{core-C1GB7aB-.js → core-yFUZRhgi.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-okum9C8e.js → decodeURIComponentSafe-DJGiVKY3.js} +1 -1
- package/dist/assets/{dnd-BKLSY4Qp.js → dnd-BsfjgQaS.js} +1 -1
- package/dist/assets/{empty-BAGbIBoq.js → empty-36OhCPgu.js} +1 -1
- package/dist/assets/{empty-DcVAbZV4.js → empty-DWXN0zXu.js} +1 -1
- package/dist/assets/{emptyVideoElement-2r8hCQGV.js → emptyVideoElement-W528gJEP.js} +1 -1
- package/dist/assets/{epic-BFBt-3XZ.js → epic-CIRzUJFx.js} +1 -1
- package/dist/assets/{getLocaleForTenant-COPdXUFc.js → getLocaleForTenant-BhAx8guK.js} +1 -1
- package/dist/assets/{index-D934ejNp.js → index-BN3A7Q7k.js} +1 -1
- package/dist/assets/{index-D4_FYu1h.js → index-BiOCnxUr.js} +7 -7
- package/dist/assets/{index-DcSDyNQG.js → index-Biw-dXZD.js} +1 -1
- package/dist/assets/{index-CJkoGhEu.js → index-BjC87z-8.js} +1 -1
- package/dist/assets/{index-Cgq5e8kx.js → index-D6SI2XXD.js} +1 -1
- package/dist/assets/{index-DFPmY4t1.js → index-D8lrtix7.js} +1 -1
- package/dist/assets/{index-DwUJQ44f.js → index-Tz5qKzzr.js} +2 -2
- package/dist/assets/{index-DgOeAv6K.js → index-_WROnW1b.js} +1 -1
- package/dist/assets/{lexical-Dcuk4Yua.js → lexical-a5QW-f2c.js} +1 -1
- package/dist/assets/{liveblocks-Dx9GJaKJ.js → liveblocks-DQxWCA7d.js} +1 -1
- package/dist/assets/{lottie-MYbVFail.js → lottie-CUC8jYi2.js} +1 -1
- package/dist/assets/{mui-S6TXegyD.js → mui-ChC8whdU.js} +1 -1
- package/dist/assets/{pathToGoBack-CYxRwoYN.js → pathToGoBack-48OEEFN8.js} +1 -1
- package/dist/assets/{pdf-BijcgxIK.js → pdf-BzsAlPE_.js} +3 -3
- package/dist/assets/{pdf-lib-DXIgr0ip.js → pdf-lib-Bunmyp1f.js} +1 -1
- package/dist/assets/{plaid-nqaFvQD8.js → plaid-G4AU8x-v.js} +1 -1
- package/dist/assets/{pusher-Dwxn49q9.js → pusher-C00F4DWB.js} +1 -1
- package/dist/assets/{react-BmdAxlR-.js → react-7oSJc21D.js} +1 -1
- package/dist/assets/{react-ClmE3BGe.js → react-B-EV2fAl.js} +1 -1
- package/dist/assets/{react-CtohstEB.js → react-B_Y4cViF.js} +1 -1
- package/dist/assets/{react-0X27mp_1.js → react-C6PubH1a.js} +1 -1
- package/dist/assets/{react-BKDInzaa.js → react-gwfdXk9P.js} +1 -1
- package/dist/assets/{react-BK9aeab9.js → react-y_zdXwGN.js} +1 -1
- package/dist/assets/{recharts-DgDFrpbv.js → recharts-BPALCGe7.js} +1 -1
- package/dist/assets/{routePaths-dZ-9-pnI.js → routePaths-CpYaPUdg.js} +1 -1
- package/dist/assets/{sentry-i8uQ0afM.js → sentry-yFsVWhao.js} +1 -1
- package/dist/assets/{url-DUqjNyjV.js → url-CItc7ZnZ.js} +1 -1
- package/dist/assets/{url-B7pK2_FE.js → url-DdmozPE3.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-zin4AQfk.js → useAiCfoDashboardSuggestedQuestionsChips-ouZaiHV2.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-Zz8eSFW2.js → useAskAiCfoHostNavButtonProps-BsQuCyy5.js} +1 -1
- package/dist/assets/{useDeviceId-AH1KsB1z.js → useDeviceId-BY2vlOSe.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-BKY0Q6gT.js → useInitialThreadRequest-CTq6SdMM.js} +1 -1
- package/dist/assets/{utils-BGTnhJzp.js → utils-CaIGWeOv.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-yGfWimRu.js → withTransactionSidePanel-CNVv5_p9.js} +1 -1
- package/dist/assets/{zeni-epic-state-BJXbyZuT.js → zeni-epic-state-Co_KJ39L.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/AddressRoutes-CaAZUR1d.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-Dzpz1U1f.js +0 -1
- package/dist/assets/NotFoundScreen-CLwfUXdC.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./liveblocks-DQxWCA7d.js";import{A as d}from"./AddressScreen-C462o9IS.js";import i from"./NotFoundScreen-DxqYM2wk.js";import"./sentry-yFsVWhao.js";import{o as s,p as r}from"./core-yFUZRhgi.js";import"./zeni-epic-state-Co_KJ39L.js";import"./recharts-BPALCGe7.js";import"./index-BiOCnxUr.js";import"./mui-ChC8whdU.js";import"./analytics-C--DBRuq.js";import"./plaid-G4AU8x-v.js";import"./dnd-BsfjgQaS.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUC8jYi2.js";import"./lexical-a5QW-f2c.js";import"./pdf-BzsAlPE_.js";import"./utils-CaIGWeOv.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 r}from"./liveblocks-
|
|
1
|
+
import{j as r}from"./liveblocks-DQxWCA7d.js";import{a as h}from"./sentry-yFsVWhao.js";import{h as T,u as _,g as E,i as j,j as B,n as K}from"./core-yFUZRhgi.js";import{J as M,m as L,z as $,k as D,B as R,v as N,d as C,f as S,E as z,h as b,p as F}from"./index-BiOCnxUr.js";import{KL as k,h3 as U,eR as G,KM as O,c1 as V,KN as q,ko as H}from"./zeni-epic-state-Co_KJ39L.js";import{n as J}from"./mui-ChC8whdU.js";import Q from"./NotFoundScreen-DxqYM2wk.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]="620ae79e-3bf2-4c91-9ddb-f97c6af3cad7",e._sentryDebugIdIdentifier="sentry-dbid-620ae79e-3bf2-4c91-9ddb-f97c6af3cad7")}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-
|
|
1
|
+
import{j as c}from"./liveblocks-DQxWCA7d.js";import{a as r}from"./sentry-yFsVWhao.js";import{u as ge,h as Ce,g as Ie,j as J,i as be,n as ke}from"./core-yFUZRhgi.js";import{N as we,z as xe,J as Pe,cU as Ee,cV as ve,b6 as Y,cW as ye,b5 as Z,p as D,v as L,d as I,cX as F,cY as Te,cZ as Qe,a1 as _e,f as Oe,a7 as Ae,c_ as Ue,a2 as je,q as Le,b1 as Fe,c$ as Re}from"./index-BiOCnxUr.js";import{fK as De,eQ as ee,eR as Be,hJ as Me,Ry as Ve,eU as Ge,hT as $e,hP as Ne,eS as R,fv as qe,fo as ze,fs as X,fw as He,fx as We,fy as Je,fz as Ye,fA as Xe}from"./zeni-epic-state-Co_KJ39L.js";import{D as Ke,n as b,S as Ze,P as et}from"./mui-ChC8whdU.js";import{u as tt}from"./useAiCfoDashboardSuggestedQuestionsChips-ouZaiHV2.js";import{p as st}from"./pathToGoBack-48OEEFN8.js";import"./recharts-BPALCGe7.js";import"./analytics-C--DBRuq.js";import"./plaid-G4AU8x-v.js";import"./dnd-BsfjgQaS.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUC8jYi2.js";import"./lexical-a5QW-f2c.js";import"./pdf-BzsAlPE_.js";import"./utils-CaIGWeOv.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]="7ef44d0c-99b0-4421-b895-749e64d0a658",a._sentryDebugIdIdentifier="sentry-dbid-7ef44d0c-99b0-4421-b895-749e64d0a658")}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=We(o.type),t=o.metadata.chat_session_id??null,{currentChatSession:E,currentQuestionAnswer:k,currentQuestionAnswerSummary:v}=Z(d,t);u!=="answer"?I.trackAICFOChatResponseGenerated(u,k?.question.questionText??"",o.text,t,Re(v,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,Je(o.visualization?.type??"")??null,t,o.summarized_title,o.metadata.message_id??null),a(Ye({chatSessionId:o.metadata.chat_session_id,responseType:u,fetchState:{fetchState:"Completed",error:void 0}})),a(Xe({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(X(e))},onStopSubmit:()=>{},onUpdateScrollYOffset:e=>{a(He(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(X(""))},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(ze());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=J(n=>ee(n)),f=xe.getSignedInUser(),{session_id:e}=be(),p=Pe(),o=_e(p),u=J(n=>Be(n)),t=d.uiState.currentChatSessionId,E=u.tenantEmailDomain,{handleUploadPromoClose:k,isUploadPromoVisible:v}=Ee({isFileUploadEnabled:a,tenantEmailDomain:E}),y=ve({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?.[Y]!==!0)return;h(!0);const g={...n};delete g[Y],m(l,{replace:!0,state:g})},[l.pathname,l.search,l.state,m]);const[ae,T]=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;T(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(()=>{T(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,$=r.useRef(!1);r.useEffect(()=>{$.current||G!=="month-end-email"||A==null||t!=null||f==null||(s(Me("controller",f.userId,A,"MONTH_END_EMAIL")),$.current=!0)},[G,A,t,s,f]);const P=d.uiState.lastContextMessage;r.useEffect(()=>{P!=null&&P!==""&&t!=null&&(T(P),Q(!0),_(void 0),O(void 0),s(Ve()))},[P,t,s]);const ce=u.masterTOSInfo,C=ce?.isMasterTOSAccepted??!1,{visitedSessions:N}=ye(t),U=d.fetchState,j=d.uiState.chatSessionsNextPageToken.hasMore||!d.uiState.chatSessionsFirstPageFetched,q=t!=null?d.fetchChatSessionHistoryByChatSessionId?.[t]?.fetchState??"Not-Started":"Not-Started",z=t==null||(d.uiState.chatHistoryNextPageToken[t]?.hasMore??!0),H=d.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:ue}=Z(H,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:N.map(n=>`private-encrypted-chat-${n}.${te}`),eventCallback:(n,g,fe)=>fe.onEventReceived(n,g)}),[N]);r.useEffect(()=>{U!=="In-Progress"&&j&&s($e())},[U,j,s]),r.useEffect(()=>{t!=null&&q!=="In-Progress"&&z&&f!=null&&U==="Completed"&&!j&&s(Ne(t,f.userId))},[q,z,t,f,s]);const W=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:W}),y.drawerElement,c.jsx(it,{children:c.jsx(K,{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:W}):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&&y.drawerElement,c.jsx(ot,{...pe,currentChatSessionId:t,allSessionsWithOrderedQuestionAnswers:H,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?y.open:void 0,isFileUploadEnabled:a,isUploadPromoVisible:v,onUploadPromoClose:k,exploreSuggestedPromptQuestions:oe,exploreSuggestedPromptQuestionsLoading:se}),S&&o?c.jsx(Ke,{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(K,{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(Te,{open:S,onClose:()=>h(!1),children:c.jsx(Qe,{children:Se})}):null]})},K=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-
|
|
1
|
+
import{j as l}from"./liveblocks-DQxWCA7d.js";import{a as y}from"./sentry-yFsVWhao.js";import{h as B,g as U,u as j,j as v,N,n as T,i as O,o as $,p as h}from"./core-yFUZRhgi.js";import{eR as L,O1 as A,NJ as b,yp as I,yj as F,yn as w,yc as q,NL as W,yf as z,yr as H,yq as C}from"./zeni-epic-state-Co_KJ39L.js";import{m as P,z as k,B as V,a7 as J,bH as G,af as _,bI as K}from"./index-BiOCnxUr.js";import"./mui-ChC8whdU.js";import{i as M}from"./ReimbursementApprovalRuleDetailScreen-DrKUThOY.js";import Q from"./NotFoundScreen-DxqYM2wk.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]="d51299f7-24d7-421d-917a-b959648e7f5c",e._sentryDebugIdIdentifier="sentry-dbid-d51299f7-24d7-421d-917a-b959648e7f5c")}catch{}})();const R="bill-approval-rule-update",X=T(function(e){return{approvalView:A(e),billPaySetupApproverViewUpdateData:b(e).billPaySetupApproverViewUpdateData}},function(e,o){const{navigate:t,location:p}=o;return{onApprovalRulesEventReceived:a=>{a.endsWith(R)&&e(W(!1))},onBackClick:()=>{_(p)?t("../../"):t("../../../bills/setup")},onDeleteRuleClick:a=>{e(q(a))},onEditRuleClick:a=>{a!=null?(e(w(a)),t(`./${a}/edit`)):(e(w()),t("./new"))}}})(J(G)),Y=()=>{const e=B(),o=U(),t=j(),[p,a]=y.useState(!1),[u,s]=y.useState(!1),d=P(),n=v(i=>i.billPaySetupApproverViewState.fetchState),c=v(i=>L(i)),r=v(i=>A(i)),g=v(i=>b(i).billPaySetupApproverViewUpdateData);if(y.useEffect(()=>{g?.updateStatus.fetchState==="Completed"&&t(I())},[g]),y.useEffect(()=>{p||n!=="Not-Started"||(a(!0),t(F(!0)))},[p,n,t]),k.getSignedInUser()==null)throw Error("Can't access billpay approval without signing in...");y.useEffect(()=>{r.allApprovalRules.length===0&&r.fetchState==="Completed"&&(u||(s(!0),t(w())),e("./new"))},[u,r,t]);const f={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${R}`]:[],eventCallback:(i,x,m)=>{i.endsWith(R)&&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(X,{currentTenant:c,location:o,navigate:e,...f})},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(f=>{const i=f.actors.selectedUsers.map(S=>({type:"user",userId:S.userId,isImplicitActor:!1})),x=f.actors.selectedNonUsers.map(S=>{const E=!!M(S.value);return{type:E?"attribute":"role",subType:S.value,userId:void 0,idType:void 0,isImplicitActor:!E}}),m=i.concat(x);g.push({action:f.stepType.selectedOption,actors:m,operator:m.length>1?f.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(I()),s==="approval_update"||d?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(I()),s==="approval_update"||d?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(H())},onSaveRuleSuccess:()=>{t("../")}}})(K);function D(){const e=B(),o=j(),t=U(),{approvalRuleId:p}=O(),a=k.getSignedInUser(),u=P(),s=v(r=>b(r)),d=v(r=>A(r)),[n,c]=y.useState(!1);if(y.useEffect(()=>{n||(c(!0),o(z(!0)))}),y.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($,{children:[l.jsx(h,{path:"/",element:l.jsx(Y,{})}),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(Q,{})})]})}export{se as B};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-Dx9GJaKJ.js";import{h as K,u as se,g as Q,i as ae,j as v,N as te,n as X,l as na,o as ia,p as S}from"./core-C1GB7aB-.js";import{eR as Z,Nj as Ue,bs as It,Ie as oa,bq as wt,bF as pe,Nk as Ct,xJ as Bt,yT as Ne,yg as la,bn as De,Nl as sa,Nm as ra,c1 as ca,Nn as da,jI as xt,No as At,Np as Et,zs as _e,xY as xe,Nq as ua,xx as tt,Nr as pa,CE as ma,xB as ba,xH as Dt,Ns as ke,Nt as Ge,yU as Me,Nu as ha,Nv as ga,yX as Oe,Nw as ya,z8 as Sa,Nx as jt,yE as at,yJ as fa,Ny as ka,Nz as ue,NA as Tt,NB as Pt,NC as Ft,fO as va,y1 as Le,cw as Rt,ND as Ia,gV as wa,NE as Ca,NF as Ba,f0 as Vt,e_ as Nt,NG as ze,NH as xa,NI as Aa,L3 as Ze,NJ as Ea,L4 as oe,L5 as He,NK as Da,NL as ja,NM as Ta,yL as nt,yI as Pa,NN as Fa,NO as Ra,NP as Va,yu as Na,NQ as La,NR as $a,NS as Ua,ck as Lt,cL as $t,jT as _a,bL as Ga,bo as Ut,bM as _t,wP as Ma,NT as Oa,Cr as za,Cx as Za,tc as Ha,yV as Wa,zz as qa,k4 as fe,NU as Ja,NV as Gt,ky as Ka,j_ as Mt,kj as Ot,ki as it,bE as be,bK as Qa,NW as Xa,NX as ve,iD as Ya,NY as ot,NZ as en,iH as tn,j0 as an,zN as nn,N_ as on,kr as ln,zD as sn,N$ as lt,zH as rn,zM as cn,zJ as dn,zB as un,O0 as zt,xS as pn,O1 as mn,O2 as bn,fG as hn,fF as gn,fE as yn,k7 as Sn,kp as st,kA as fn,qL as kn,kg as vn,zF as In,iN as wn,kF as Cn,O3 as Bn,iF as xn,qC as An,O4 as En,yA as Dn,bG as jn,bt as Tn,J_ as Pn,cN as Fn,cM as Rn,cv as Vn,cB as Nn}from"./zeni-epic-state-BJXbyZuT.js";import{m as me,z as V,k as Ie,W as We,a as le,G as y,aN as Ae,B as re,o as A,v as je,d as D,be as Ln,p as z,a2 as qe,q as E,J as we,bf as rt,bg as ct,bh as $n,ak as Un,A as _n,aH as Gn,y as Zt,D as Je,T as Ke,bi as Mn,at as Ht,bj as On,U as zn,f as Wt,a7 as Zn,bk as Hn,bl as Wn,bm as qn,bn as Jn,bo as Kn,bp as Qn,bq as Xn,br as Yn,bs as ei,Q as ti,bt as ai,b9 as ni,bu as ii,bv as oi,a9 as li}from"./index-D4_FYu1h.js";import{n as $,S as si}from"./mui-S6TXegyD.js";import{A as dt}from"./AddressScreen-DBh2kopg.js";import{g as ie,a as Te,i as qt,V as Qe,b as Xe,c as ri,v as ci,d as di,A as he,D as ge}from"./DomesticWireDetailScreen-DM1m923S.js";import{a as f}from"./sentry-i8uQ0afM.js";import{u as Ye}from"./useAskAiCfoHostNavButtonProps-Zz8eSFW2.js";import{u as Jt}from"./useInitialThreadRequest-BKY0Q6gT.js";import Ee from"./NotFoundScreen-CLwfUXdC.js";import{D as ui}from"./DrawerScreen-Bw0Jl3tu.js";import{M as Kt}from"./MobileAppDrawer-qPZdyrO4.js";import{F as Qt}from"./FeaturePreviewScreen-RdL9x4ht.js";import{S as Pe}from"./SetupPagesScreen-BN4AuJYP.js";import{B as pi}from"./BillPayApprovalRoutes-Bf6ESEC4.js";import{FallBackRoute as mi}from"./ScreenRoutes-DRJIZt7d.js";import"./recharts-DgDFrpbv.js";import"./analytics-7_b07CgE.js";import"./plaid-nqaFvQD8.js";import"./dnd-BKLSY4Qp.js";import"./stripe-DMRn4zHo.js";import"./lottie-MYbVFail.js";import"./lexical-Dcuk4Yua.js";import"./pdf-BijcgxIK.js";import"./utils-BGTnhJzp.js";import"./analyticsHelper-DGI02sYS.js";import"./routePaths-dZ-9-pnI.js";import"./BusinessVerificationPageScreen-yN_GrrFh.js";import"./ReimbursementApprovalRuleDetailScreen-D4-WsBma.js";import"./getLocaleForTenant-COPdXUFc.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]="debd2d59-8cff-48db-ae86-04dfa9398e89",e._sentryDebugIdIdentifier="sentry-dbid-debd2d59-8cff-48db-ae86-04dfa9398e89")}catch{}})();const bi=X(function(e,t){const l=Ue(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:xt(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(xe(l,"retry")):e(xe(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(xe(t.billId,"refund"))},saveBillDetails:(o,s,n)=>{o&&e(Et({data:n,billId:l})),e(_e(o?"paid":"pending_approval",o,s,l))},discardOutsideZeniPaymentData:()=>{e(At({billId:l}))}}})(Ln);function hi(){const e=K(),t=se(),l=Q(),{billId:i}=ae(),c=me(),r=V.getSignedInUser(),u=Ie(),o=v(M=>Z(M)),s=v(M=>Ue(M,i??"")),n=s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1,d=Jt(o?.companyId,{clearParams:s.fetchState==="Completed"&&!n}),{isAiCfoAccessEnabled:p,onAskAiCfoClick:m}=Ye({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,C]=f.useState(!1),[B,_]=f.useState(!1),{useFeatureGate:T,useDynamicConfig:U}=le(),{isFeatureEnabled:N}=T(y.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:I}=T(y.isBillPayCommentingEnabled),{isFeatureEnabled:H}=T(y.isBillPayDetectInsufficientFundsEnabled),{configValue:G}=U(Ae.zeniAssistConfig),x=oa(o),q=wt(o.userRole),W=g&&pe(u?.loggedInUserRoleMap),L=G.user_ids!=null&&r?.userId!=null&&G.user_ids.includes(r?.userId),{isFeatureEnabled:J}=T(y.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:Y}=T(y.billPaySetupShowInternationalPaymentByWise);if(f.useEffect(()=>{N&&s.transactionDetails?.isDeleted===!0||o.isZeni===!0&&r?.userEmailDomain==="zeni.ai"&&x===!1?_(!1):_(s.billActivities[0]?.isRealTimeApprovalEnabled&&(q||W||s.allApprovers.find(M=>M.user.userId===r?.userId)!=null||s.transactionDetails?.lastUpdatedByUserId===r?.userId))},[s.billActivities[0]?.isRealTimeApprovalEnabled,s.allApprovers,s.transactionDetails?.lastUpdatedByUserId,q,W,o.isZeni,x,r]),f.useEffect(()=>{i!=null&&t(Ct(i))},[i]),f.useEffect(()=>{b||s.fetchState=="Completed"||s.fetchState=="In-Progress"||(k(!0),t(Bt(i??"",N,L,!1)))},[b,s,i,t]),f.useEffect(()=>{j||s.fetchState!="Completed"||s.transactionDetails?.billPayInfo.stage.code=="paid"||(C(!0),t(Ne(!1,N,L,Y,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:M=>(ee=>{i!=null&&ee.trackBillPayBillDetails(i,s.isRecurring)})(M)}),a.jsx(bi,{initialOpenThreadRequest:d??void 0,isShowDeletedBillsEnabled:N,location:l,navigate:e,isBillPayCommentingEnabled:I,isRealTimeApprovalEnabled:B,currentTenant:o,billId:i??"",isInternationalPaymentShaVsOurEnabled:J,hasZeniAssistAccess:L,isDetectInsufficientFundsEnabled:H,isAiCfoAccessEnabled:p,onAskAiCfoClick:m})]})}const ye=Je.getLocalizedStrings().spendManagement.billPay.billDetails,gi={containerWidth:new Zt(100,58)},ut=X(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(Me(i))},onDeleteClick:()=>{e(ya({billId:t.billId})),D?.trackInvoiceActionClick(t.billStage??"","delete",l?.userEmail??"",null)}}})(Gn);function w({appContent:e}){const t=se(),l=K(),{billId:i}=ae(),c=Q(),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),C=v(F=>Z(F)),[B,_]=f.useState(!1),[T,U]=f.useState(!1),[N,I]=f.useState(!1),[H,G]=f.useState(),x=v(F=>Ge(F,m,g,i));let q=x.fetchState,W=x.file,L=x.showAutofill;const J=v(F=>Ue(F,i??""));u===!1&&(q=J.fetchState,W=J.transactionDetails?.attachments?.[0],L=!1);const Y=x.billPayInfo!=null&&x.billPayInfo.stage.code==="pending_approval"?x.billPayInfo.billStatus.code:x.billStage;f.useEffect(()=>{i==null&&t(Me(!0))},[i,t]),f.useEffect(()=>{q==="Not-Started"&&(u&&T?U(!1):!u&&B&&_(!1))},[i]),f.useEffect(()=>{B||i==null||u||(_(!0),t(Bt(i,h,j,!1)),T||(U(!0),t(Ne(!1,h,j,b,i)))),u&&!T&&(U(!0),t(Ne(!1,h,j,b,i)))},[B,T,u,i,t]);const M={onOkClick:()=>{if(I(!1),!H)return;const F=W!=null?"replace":"upload";D?.trackInvoiceActionClick(Y??"",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(Y??"",F,n?.userEmail??"","no"),t(ha({file:H,billId:i}))}},ee=f.useCallback(()=>{const F=z(c.state?.pathnameStackToGoBack),ce=F.poppedPathname??ie(C.tenantEmailDomain);t(ke({billId:i})),l(ce,{state:{pathnameStackToGoBack:F.newStack}})},[c.state,C.tenantEmailDomain,i,t,l]);if(n==null)throw Error("Can't access address page without signing in...");if(q==="Error"||J.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:x.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:void 0,setShowConfirmationPopup:I,setPayload:G,showActionButtons:!1,isInitialEdit:!!x.isInitialEdit,billStage:Y}),a.jsx(Ve,{windowSize:o,children:a.jsx(ct,{isNewBill:!0})})]})}):a.jsxs(Fe,{windowSize:o,children:[o==="small"||L?null:a.jsx(pt,{children:a.jsx(Xt,{onClick:ee,"data-testid":"nav-bar-back-click"})}),o!=="small"?a.jsx(Re,{}):null,a.jsx($n,{}),a.jsx(Ve,{windowSize:o,children:a.jsx(ct,{isNewBill:i==null})})]});{const F=x.billPayInfo!=null&&x.billPayInfo.stage.code==="pending_approval"?x.billPayInfo.billStatus.code:x.billStage;return a.jsx(rt,{fallback:ee,children:a.jsxs(Fe,{windowSize:o,children:[L&&o!=="small"?a.jsx(mt,{}):null,N?a.jsx(Un,{titleComponent:a.jsx(wi,{children:ye.overwriteTitle}),descriptionComponent:a.jsx(Ci,{children:ye.overwriteDescription}),primaryButtonText:ye.buttons.yes,secondaryButtonText:ye.buttons.no,action:M,isEditPopup:!0}):null,o==="small"||L?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:L,uploadStatus:x.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:Si(u,J,x),setShowConfirmationPopup:I,setPayload:G,showActionButtons:fi(u,x),isInitialEdit:!!x.isInitialEdit,billStage:F}),a.jsx(Ve,{windowSize:o,children:e})]})})}}function yi(){const{triggerBack:e}=Mn();return a.jsx(Xt,{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-DQxWCA7d.js";import{h as K,u as se,g as Q,i as ae,j as v,N as te,n as X,l as na,o as ia,p as S}from"./core-yFUZRhgi.js";import{eR as Z,Nj as Ue,bs as It,Ie as oa,bq as wt,bF as pe,Nk as Ct,xJ as Bt,yT as Ne,yg as la,bn as De,Nl as sa,Nm as ra,c1 as ca,Nn as da,jI as xt,No as At,Np as Et,zs as _e,xY as xe,Nq as ua,xx as tt,Nr as pa,CE as ma,xB as ba,xH as Dt,Ns as ke,Nt as Ge,yU as Me,Nu as ha,Nv as ga,yX as Oe,Nw as ya,z8 as Sa,Nx as jt,yE as at,yJ as fa,Ny as ka,Nz as ue,NA as Tt,NB as Pt,NC as Ft,fO as va,y1 as Le,cw as Rt,ND as Ia,gV as wa,NE as Ca,NF as Ba,f0 as Vt,e_ as Nt,NG as ze,NH as xa,NI as Aa,L3 as Ze,NJ as Ea,L4 as oe,L5 as He,NK as Da,NL as ja,NM as Ta,yL as nt,yI as Pa,NN as Fa,NO as Ra,NP as Va,yu as Na,NQ as La,NR as $a,NS as Ua,ck as Lt,cL as $t,jT as _a,bL as Ga,bo as Ut,bM as _t,wP as Ma,NT as Oa,Cr as za,Cx as Za,tc as Ha,yV as Wa,zz as qa,k4 as fe,NU as Ja,NV as Gt,ky as Ka,j_ as Mt,kj as Ot,ki as it,bE as be,bK as Qa,NW as Xa,NX as ve,iD as Ya,NY as ot,NZ as en,iH as tn,j0 as an,zN as nn,N_ as on,kr as ln,zD as sn,N$ as lt,zH as rn,zM as cn,zJ as dn,zB as un,O0 as zt,xS as pn,O1 as mn,O2 as bn,fG as hn,fF as gn,fE as yn,k7 as Sn,kp as st,kA as fn,qL as kn,kg as vn,zF as In,iN as wn,kF as Cn,O3 as Bn,iF as xn,qC as An,O4 as En,yA as Dn,bG as jn,bt as Tn,J_ as Pn,cN as Fn,cM as Rn,cv as Vn,cB as Nn}from"./zeni-epic-state-Co_KJ39L.js";import{m as me,z as V,k as Ie,W as We,a as le,G as y,aN as Ae,B as re,o as A,v as je,d as D,be as Ln,p as z,a2 as qe,q as E,J as we,bf as rt,bg as ct,bh as $n,ak as Un,A as _n,aH as Gn,y as Zt,D as Je,T as Ke,bi as Mn,at as Ht,bj as On,U as zn,f as Wt,a7 as Zn,bk as Hn,bl as Wn,bm as qn,bn as Jn,bo as Kn,bp as Qn,bq as Xn,br as Yn,bs as ei,Q as ti,bt as ai,b9 as ni,bu as ii,bv as oi,a9 as li}from"./index-BiOCnxUr.js";import{n as $,S as si}from"./mui-ChC8whdU.js";import{A as dt}from"./AddressScreen-C462o9IS.js";import{g as ie,a as Te,i as qt,V as Qe,b as Xe,c as ri,v as ci,d as di,A as he,D as ge}from"./DomesticWireDetailScreen-Fo4R4YRQ.js";import{a as f}from"./sentry-yFsVWhao.js";import{u as Ye}from"./useAskAiCfoHostNavButtonProps-BsQuCyy5.js";import{u as Jt}from"./useInitialThreadRequest-CTq6SdMM.js";import Ee from"./NotFoundScreen-DxqYM2wk.js";import{D as ui}from"./DrawerScreen-DHL_W742.js";import{M as Kt}from"./MobileAppDrawer-BB6nxZVq.js";import{F as Qt}from"./FeaturePreviewScreen-CEy-pIWu.js";import{S as Pe}from"./SetupPagesScreen-3YiJuF5G.js";import{B as pi}from"./BillPayApprovalRoutes-Dv07YBai.js";import{FallBackRoute as mi}from"./ScreenRoutes-JqGTg3y4.js";import"./recharts-BPALCGe7.js";import"./analytics-C--DBRuq.js";import"./plaid-G4AU8x-v.js";import"./dnd-BsfjgQaS.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUC8jYi2.js";import"./lexical-a5QW-f2c.js";import"./pdf-BzsAlPE_.js";import"./utils-CaIGWeOv.js";import"./analyticsHelper-BYU7ljxB.js";import"./routePaths-CpYaPUdg.js";import"./BusinessVerificationPageScreen-NFhMF-eZ.js";import"./ReimbursementApprovalRuleDetailScreen-DrKUThOY.js";import"./getLocaleForTenant-BhAx8guK.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]="debd2d59-8cff-48db-ae86-04dfa9398e89",e._sentryDebugIdIdentifier="sentry-dbid-debd2d59-8cff-48db-ae86-04dfa9398e89")}catch{}})();const bi=X(function(e,t){const l=Ue(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:xt(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(xe(l,"retry")):e(xe(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(xe(t.billId,"refund"))},saveBillDetails:(o,s,n)=>{o&&e(Et({data:n,billId:l})),e(_e(o?"paid":"pending_approval",o,s,l))},discardOutsideZeniPaymentData:()=>{e(At({billId:l}))}}})(Ln);function hi(){const e=K(),t=se(),l=Q(),{billId:i}=ae(),c=me(),r=V.getSignedInUser(),u=Ie(),o=v(M=>Z(M)),s=v(M=>Ue(M,i??"")),n=s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1,d=Jt(o?.companyId,{clearParams:s.fetchState==="Completed"&&!n}),{isAiCfoAccessEnabled:p,onAskAiCfoClick:m}=Ye({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,C]=f.useState(!1),[B,_]=f.useState(!1),{useFeatureGate:T,useDynamicConfig:U}=le(),{isFeatureEnabled:N}=T(y.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:I}=T(y.isBillPayCommentingEnabled),{isFeatureEnabled:H}=T(y.isBillPayDetectInsufficientFundsEnabled),{configValue:G}=U(Ae.zeniAssistConfig),x=oa(o),q=wt(o.userRole),W=g&&pe(u?.loggedInUserRoleMap),L=G.user_ids!=null&&r?.userId!=null&&G.user_ids.includes(r?.userId),{isFeatureEnabled:J}=T(y.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:Y}=T(y.billPaySetupShowInternationalPaymentByWise);if(f.useEffect(()=>{N&&s.transactionDetails?.isDeleted===!0||o.isZeni===!0&&r?.userEmailDomain==="zeni.ai"&&x===!1?_(!1):_(s.billActivities[0]?.isRealTimeApprovalEnabled&&(q||W||s.allApprovers.find(M=>M.user.userId===r?.userId)!=null||s.transactionDetails?.lastUpdatedByUserId===r?.userId))},[s.billActivities[0]?.isRealTimeApprovalEnabled,s.allApprovers,s.transactionDetails?.lastUpdatedByUserId,q,W,o.isZeni,x,r]),f.useEffect(()=>{i!=null&&t(Ct(i))},[i]),f.useEffect(()=>{b||s.fetchState=="Completed"||s.fetchState=="In-Progress"||(k(!0),t(Bt(i??"",N,L,!1)))},[b,s,i,t]),f.useEffect(()=>{j||s.fetchState!="Completed"||s.transactionDetails?.billPayInfo.stage.code=="paid"||(C(!0),t(Ne(!1,N,L,Y,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:M=>(ee=>{i!=null&&ee.trackBillPayBillDetails(i,s.isRecurring)})(M)}),a.jsx(bi,{initialOpenThreadRequest:d??void 0,isShowDeletedBillsEnabled:N,location:l,navigate:e,isBillPayCommentingEnabled:I,isRealTimeApprovalEnabled:B,currentTenant:o,billId:i??"",isInternationalPaymentShaVsOurEnabled:J,hasZeniAssistAccess:L,isDetectInsufficientFundsEnabled:H,isAiCfoAccessEnabled:p,onAskAiCfoClick:m})]})}const ye=Je.getLocalizedStrings().spendManagement.billPay.billDetails,gi={containerWidth:new Zt(100,58)},ut=X(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(Me(i))},onDeleteClick:()=>{e(ya({billId:t.billId})),D?.trackInvoiceActionClick(t.billStage??"","delete",l?.userEmail??"",null)}}})(Gn);function w({appContent:e}){const t=se(),l=K(),{billId:i}=ae(),c=Q(),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),C=v(F=>Z(F)),[B,_]=f.useState(!1),[T,U]=f.useState(!1),[N,I]=f.useState(!1),[H,G]=f.useState(),x=v(F=>Ge(F,m,g,i));let q=x.fetchState,W=x.file,L=x.showAutofill;const J=v(F=>Ue(F,i??""));u===!1&&(q=J.fetchState,W=J.transactionDetails?.attachments?.[0],L=!1);const Y=x.billPayInfo!=null&&x.billPayInfo.stage.code==="pending_approval"?x.billPayInfo.billStatus.code:x.billStage;f.useEffect(()=>{i==null&&t(Me(!0))},[i,t]),f.useEffect(()=>{q==="Not-Started"&&(u&&T?U(!1):!u&&B&&_(!1))},[i]),f.useEffect(()=>{B||i==null||u||(_(!0),t(Bt(i,h,j,!1)),T||(U(!0),t(Ne(!1,h,j,b,i)))),u&&!T&&(U(!0),t(Ne(!1,h,j,b,i)))},[B,T,u,i,t]);const M={onOkClick:()=>{if(I(!1),!H)return;const F=W!=null?"replace":"upload";D?.trackInvoiceActionClick(Y??"",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(Y??"",F,n?.userEmail??"","no"),t(ha({file:H,billId:i}))}},ee=f.useCallback(()=>{const F=z(c.state?.pathnameStackToGoBack),ce=F.poppedPathname??ie(C.tenantEmailDomain);t(ke({billId:i})),l(ce,{state:{pathnameStackToGoBack:F.newStack}})},[c.state,C.tenantEmailDomain,i,t,l]);if(n==null)throw Error("Can't access address page without signing in...");if(q==="Error"||J.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:x.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:void 0,setShowConfirmationPopup:I,setPayload:G,showActionButtons:!1,isInitialEdit:!!x.isInitialEdit,billStage:Y}),a.jsx(Ve,{windowSize:o,children:a.jsx(ct,{isNewBill:!0})})]})}):a.jsxs(Fe,{windowSize:o,children:[o==="small"||L?null:a.jsx(pt,{children:a.jsx(Xt,{onClick:ee,"data-testid":"nav-bar-back-click"})}),o!=="small"?a.jsx(Re,{}):null,a.jsx($n,{}),a.jsx(Ve,{windowSize:o,children:a.jsx(ct,{isNewBill:i==null})})]});{const F=x.billPayInfo!=null&&x.billPayInfo.stage.code==="pending_approval"?x.billPayInfo.billStatus.code:x.billStage;return a.jsx(rt,{fallback:ee,children:a.jsxs(Fe,{windowSize:o,children:[L&&o!=="small"?a.jsx(mt,{}):null,N?a.jsx(Un,{titleComponent:a.jsx(wi,{children:ye.overwriteTitle}),descriptionComponent:a.jsx(Ci,{children:ye.overwriteDescription}),primaryButtonText:ye.buttons.yes,secondaryButtonText:ye.buttons.no,action:M,isEditPopup:!0}):null,o==="small"||L?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:L,uploadStatus:x.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:Si(u,J,x),setShowConfirmationPopup:I,setPayload:G,showActionButtons:fi(u,x),isInitialEdit:!!x.isInitialEdit,billStage:F}),a.jsx(Ve,{windowSize:o,children:e})]})})}}function yi(){const{triggerBack:e}=Mn();return a.jsx(Xt,{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=$.div`
|
|
3
3
|
margin-bottom: 20px;
|
|
4
4
|
margin-top: 20px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as k}from"./liveblocks-
|
|
1
|
+
import{j as k}from"./liveblocks-DQxWCA7d.js";import{a as V}from"./sentry-yFsVWhao.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-yFUZRhgi.js";import{k as ce,a as ue,aN as de,z,v as pe,d as B,af as E,f as x,bD as le,at as me,q as R,au as M}from"./index-BiOCnxUr.js";import{NR as fe,eR as q,sD as ye,Ii as Se,yu as ge,Bb as Ie,DK as be,En as he,Fo as Oe,Oc as De,Od as Te,Oe as ke,Of as Ce,Og as Ve,KM as Ne,Ne as we,KY as Ae,ko as Fe,fG as _e,fF as ve,fE as Ee,qL as xe,qC as ze,qz as Be,kg as Re,sM as Me,sK as P,bE as L,sY as U,cu as Pe}from"./zeni-epic-state-Co_KJ39L.js";import{n as Le}from"./mui-ChC8whdU.js";import{d as j}from"./routePaths-CpYaPUdg.js";import{M as Ue}from"./MobileAppDrawer-BB6nxZVq.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]="15216bd8-f301-4f04-a0b6-e6730db9cc62",e._sentryDebugIdIdentifier="sentry-dbid-15216bd8-f301-4f04-a0b6-e6730db9cc62")}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-Dx9GJaKJ.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-C1GB7aB-.js";import{eR as de,bt as He,PM as ja,e_ as Ie,e$ as Ae,f0 as Ee,fV as Ke,cr as qe,PN as Xe,PO as lt,tS as Ba,jQ as xa,PP as La,gV as pa,Au as ca,Aw as Ne,Ax as ut,jG as Vt,PQ as Je,Ai as ha,PR as On,PS as Un,Al as Va,PT as jn,O9 as Na,s2 as Nt,Ar as na,h4 as Vn,PU as Ht,PV as ea,bo as Nn,PW as Hn,fG as Ha,fF as Ma,A$ as Mn,fE as Ga,NR as Gn,PX as Mt,ck as Gt,cL as $n,O8 as ya,BB as $t,PY as Tt,Bb as fa,PZ as zt,BC as zn,OB as Qn,BD as Zn,Cx as Yn,tc as Wn,Cr as Kn,P_ as qn,Av as Ze,P$ as Xn,Q0 as Jn,Q1 as er,Q2 as ar,Q3 as tr,Q4 as mt,Q5 as nr,AM as Qt,AF as rr,Q6 as sr,fX as cr,AV as Zt,AZ as Yt,fW as or,Q7 as ir,Bn as Wt,Q8 as dr,Q9 as lr,Qa as ur,AX as Kt,AI as qt,Ao as Xt,AR as Jt,AP as en,AT as mr,Qb as an,Qc as $a,B8 as ga,KR as tn,cM as Ct,Qd as Cr,Qe as pr,Qf as hr,Qg as fr,B5 as st,Bu as gr,Bq as br,B1 as yr,Bs as Sr,Bi as Ir,Bk as Ar,Qh as nn,BA as Ta,Ie as Er,Qi as kr,Qj as _r,Qk as Dr,Ql as rn,Qm as wr,BX as Pr,Ba as sn,B4 as ve,B9 as vr,Qn as Tr,Qo as Fr,Af as Br,Qp as cn,Qq as on,Qr as xr,Ah as Lr,Ag as Ft,Qs as Rr,Qt as Or,Qu as Ur,KN as jr,Qv as pt,Qw as Vr,wS as dn,ko as Nr,gW as Hr,C0 as Mr,Qx as ln,Qy as Gr,C1 as $r,Qz as zr,de as Qr,tM as Zr,BS as Yr,BM as Ve,bs as Wr,bF as Kr,cw as qr,bG as Xr,J_ as Jr}from"./zeni-epic-state-BJXbyZuT.js";import{z as ee,k as Ge,a as oe,G as Q,B as Sa,c4 as za,cf as es,cg as as,ch as ts,p as Re,ci as ns,cj as rs,J as Ia,aN as Le,q as ye,bo as ht,ck as ss,y as Aa,h as Qa,m as ft,d as K,D as gt,a7 as Za,cl as cs,W as un,aq as bt,bA as ra,cm as ct,cn as os,v as yt,co as is,at as mn,a2 as ot,U as Cn,f as pn,cp as ds,cq as ls,cr as us,cs as ms,ct as Cs,cu as ps,o as Ra,cv as hs,cw as fs,cx as at,Q as gs,cy as bs,cz as ys,cA as Ss,cB as Is,cC as As,a9 as Es}from"./index-D4_FYu1h.js";import{n as Te,D as hn,S as ks}from"./mui-S6TXegyD.js";import{a as d}from"./sentry-i8uQ0afM.js";import{g as pe,a as Ea,b as fn,c as ke,d as _e,e as Me,f as $e,h as ze,A as _s,i as St,P as Ds,j as It,s as sa,k as gn,l as Ye,m as bn,n as ws,o as yn,p as Ps,S as Bt}from"./SetupPagesScreen-BN4AuJYP.js";import{u as Sn}from"./useInitialThreadRequest-BKY0Q6gT.js";import Ya from"./NotFoundScreen-CLwfUXdC.js";import{M as We}from"./MobileAppDrawer-qPZdyrO4.js";import{u as In}from"./useAskAiCfoHostNavButtonProps-Zz8eSFW2.js";import{v as xt}from"./utils-BGTnhJzp.js";import{d as vs}from"./recharts-DgDFrpbv.js";import{t as Ts}from"./AddressScreen-DBh2kopg.js";import"./analytics-7_b07CgE.js";import"./plaid-nqaFvQD8.js";import"./dnd-BKLSY4Qp.js";import"./stripe-DMRn4zHo.js";import"./lottie-MYbVFail.js";import"./lexical-Dcuk4Yua.js";import"./pdf-BijcgxIK.js";import"./analyticsHelper-DGI02sYS.js";import"./routePaths-dZ-9-pnI.js";import"./BusinessVerificationPageScreen-yN_GrrFh.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]="372b6297-39c7-44eb-acff-ad1b08594dd3",e._sentryDebugIdIdentifier="sentry-dbid-372b6297-39c7-44eb-acff-ad1b08594dd3")}catch{}})();function Fs(){const e=me(),{cardId:a}=ba(),t=Ce(),r=ee.getSignedInUser(),n=S(Y=>de(Y)),f=Ge(),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(Y=>ja(Y).firstViewAfterActivation);if(a==null)throw Error("Empty card id is not valid...");const v=n.userRole.includes("charge_card_user"),{isFeatureEnabled:y}=g(Q.isChargeCardFeatureEnabled),h=!!n.companyChargeCardInfo?.info?.isChargeCardEnabled,{isFeatureEnabled:x}=g(Q.isDebitCardFeatureEnabled),F=Ie(n),L=Ae(n),C=Ee(x,n),u=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,D=ke({isDebitCardFeatureEnabled:x,isBankingOnlyTenant:C}),o=_e({isCardsOnlyTenant:F,isChargeCardFeatureEnabled:y,isBookKeepingTenant:L,isDebitCardProductVisible:D,chargeCardsCreditAccountLimit:u}),I=!!n.companyDebitCardInfo?.info?.isDebitCardEnabled,A=S(Y=>Ke(Y,n.companyId)),j=qe(A.controllers),{creditAccount:E,creditAccountRepayment:b}=S(Y=>Xe(Y)),B=S(Y=>Y.classListState.fetchState),i=!v&&o&&h,m=S(Y=>lt(Y,a,i,o)),[O,M]=d.useState(!1),R=m.chargeCard,T=R?.cardCreatedByUser?.userId,G=S(Y=>T!=null?Ba(Y.userRoleState,T):void 0),$=G?.accountingClassIDs[0],V=S(Y=>$!=null?xa(Y.classState,{classId:$,reportId:"class_list"}):void 0),w=R?.cardHolderUser?.userId,Z=S(Y=>w!=null?Ba(Y.userRoleState,w):void 0),q=Z?.accountingClassIDs[0],P=S(Y=>q!=null?xa(Y.classState,{classId:q,reportId:"class_list"}):void 0),U=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&&U&&(c(!0),setTimeout(()=>{t(La()),te&&t(pa({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[l,_,U,te]),d.useEffect(()=>{O||m.fetchState==="Completed"||m.fetchState==="In-Progress"||a==null||(M(!0),t(ca(a,i,!1)))},[O,m,a,t]),d.useEffect(()=>{if(m.fetchState==="Completed"&&(U===!1||U&&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 Y=pe(n.tenantEmailDomain,a,r,R,l);e(Y)}},[m.fetchState,l,U]),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()),B!=="Completed"&&B!=="In-Progress"&&t(Vt())},[E.fetchState,b.fetchState,t,o,h,p,B]);const ae=()=>{if(r!=null&&a!=null){t(La());const Y=pe(n.tenantEmailDomain,a,r);e(Y)}},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),J=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:J,chargeCardDetailView:m,creditAccount:E,classListFetchState:B,creditAccountRepayment:b,cardIssuedByRoles:G?.userRoles,cardIssuedByDepartmentName:V?.className,cardHolderRoles:Z?.userRoles,cardHolderDepartmentName:P?.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,x]=ts(y);if(x==="")return;const F=n.channel(h),L=u=>{f.current(x,u)};let C;if(F?.subscribed===!0)C=F,C.bind(x,L),l.has(h)||(l.add(h),v()),c.push(()=>{F.unbind(x,L)});else{if(C=F??n.subscribe(h),C.bind(x,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(x,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",Ka="charge-card-created",kt="charge-card-limit-updated",_t="charge-card-limit-reset",Dt="charge-card-renamed",Bs="charge-card-department-updated",wn="charge-card-repayment-completed",Pn="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}`),xs=[_a,ka],Ls=he(function(e){const a=Je(e);return{insightsData:a.insight,cashbackByPeriod:a.cashbackByPeriod,uiState:a.uiState,cashbackSummary:a.cashbackSummary}},function(e){return{onColumnSortConfigChanged:(a,t)=>{e(On({uiState:{sortKey:a,sortOrder:t}}))}}})(rs);function Rs(){const e=me(),a=Ce(),t=Se(),r=ee.getSignedInUser(),n=S(x=>de(x)),{useFeatureGate:f}=oe(),{isFeatureEnabled:p}=f(Q.isCardsCommentingEnabled),[g,_]=d.useState(!1),c=S(x=>Je(x)),l=Sn(n.companyId,{clearParams:c.fetchState==="Completed"}),v=d.useCallback(()=>{const x=Re(t.state?.pathnameStackToGoBack),F=x.poppedPathname??Os(n.tenantEmailDomain);e(F,{state:{pathnameStackToGoBack:x.newStack}})},[e,t,n.tenantEmailDomain]),y=$e(n);if(At({events:ta(y,xs),onEvent:x=>{switch(x){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(Ya,{}):s.jsx(Ls,{onBackClick:v,isCardsCommentingEnabled:p,initialOpenThreadRequest:l}):s.jsx(ns,{onBackClick:v})}const Os=e=>`/${e}/cards`,Us={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,x]=d.useState(!1),F=ee.getSignedInUser();if(F==null)throw Error("Can't access onboarding card page without signing in...");const L=S(P=>de(P));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(P=>Un(P,n)),o=D.chargeCard,I=S(P=>P.chargeCardConfigState.fetchState),{useFeatureGate:A}=oe(),{isFeatureEnabled:j}=A(Q.isChargeCardFeatureEnabled),{isFeatureEnabled:E}=A(Q.isDebitCardFeatureEnabled),b=Ee(E,L),B=ke({isDebitCardFeatureEnabled:E,isBankingOnlyTenant:b}),i=!!L.companyChargeCardInfo?.info?.isChargeCardEnabled,m=L.userRole.includes("charge_card_user"),O=Ie(L),M=Ae(L),R=L.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,T=_e({isCardsOnlyTenant:O,isChargeCardFeatureEnabled:j,isBookKeepingTenant:M,isDebitCardProductVisible:B,chargeCardsCreditAccountLimit:R}),G=!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,G,T)))},[c,D.fetchState,g,I]);const $=o?.type.code==="business_physical_credit_card"||o?.type.code==="business_physical_debit_card";d.useEffect(()=>{if(D.fetchState==="Completed"){if(v===!1&&($===!1||$&&o?.status?.code!=="inactive"||o?.cardHolderUserId!==F.userId)){const P=pe(L.tenantEmailDomain,n,F,o,!0),U=ye(f.state?.pathnameStackToGoBack,f.pathname);r(P,{state:{pathnameStackToGoBack:U}})}else if(v&&D.isRefreshingViewInBackground===!1&&o?.status?.code==="active"){t(jn({chargeCardId:n}));const P=pe(L.tenantEmailDomain,n,F,o,!0),U=ye(f.state?.pathnameStackToGoBack,f.pathname);t(Na()),r(P,{state:{pathnameStackToGoBack:U}})}}},[D.fetchState,o?.type.code,v,D.isRefreshingViewInBackground]);const V=ee.getZeniOtpTokenForCardHolder(n),w=S(P=>Nt(P.userState,F.userId)),Z=()=>{o?.status?.code!=="active"&&t(na(n,!0))};d.useEffect(()=>{D.updatePhysicalChargeCardAttemptFetchState.fetchState==="Completed"&&o?.cardActivationAttemptHistory.some(P=>P.statusCode==="success")===!0&&v===!1&&(setTimeout(Z,3e3),y(!0))},[D.updatePhysicalChargeCardAttemptFetchState.fetchState,o?.cardActivationAttemptHistory]);const q=P=>{x(P)};if(I!=="Completed"||o==null)return s.jsx(Sa,{fetchState:"In-Progress"});if(o.shippingAddressId==null)throw Error("Can't access shippingAddressId.");if(w?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(Hs,{children:[s.jsx(We,{isAppContentDrawerOpen:h,handleDrawerToggle:q}),s.jsx(Vs,{cardId:n,card:o,shippingAddressId:o.shippingAddressId,phone:w.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:()=>{q(!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:Qa.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(Ga(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-DQxWCA7d.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-yFUZRhgi.js";import{eR as de,bt as He,PM as ja,e_ as Ie,e$ as Ae,f0 as Ee,fV as Ke,cr as qe,PN as Xe,PO as lt,tS as Ba,jQ as xa,PP as La,gV as pa,Au as ca,Aw as Ne,Ax as ut,jG as Vt,PQ as Je,Ai as ha,PR as On,PS as Un,Al as Va,PT as jn,O9 as Na,s2 as Nt,Ar as na,h4 as Vn,PU as Ht,PV as ea,bo as Nn,PW as Hn,fG as Ha,fF as Ma,A$ as Mn,fE as Ga,NR as Gn,PX as Mt,ck as Gt,cL as $n,O8 as ya,BB as $t,PY as Tt,Bb as fa,PZ as zt,BC as zn,OB as Qn,BD as Zn,Cx as Yn,tc as Wn,Cr as Kn,P_ as qn,Av as Ze,P$ as Xn,Q0 as Jn,Q1 as er,Q2 as ar,Q3 as tr,Q4 as mt,Q5 as nr,AM as Qt,AF as rr,Q6 as sr,fX as cr,AV as Zt,AZ as Yt,fW as or,Q7 as ir,Bn as Wt,Q8 as dr,Q9 as lr,Qa as ur,AX as Kt,AI as qt,Ao as Xt,AR as Jt,AP as en,AT as mr,Qb as an,Qc as $a,B8 as ga,KR as tn,cM as Ct,Qd as Cr,Qe as pr,Qf as hr,Qg as fr,B5 as st,Bu as gr,Bq as br,B1 as yr,Bs as Sr,Bi as Ir,Bk as Ar,Qh as nn,BA as Ta,Ie as Er,Qi as kr,Qj as _r,Qk as Dr,Ql as rn,Qm as wr,BX as Pr,Ba as sn,B4 as ve,B9 as vr,Qn as Tr,Qo as Fr,Af as Br,Qp as cn,Qq as on,Qr as xr,Ah as Lr,Ag as Ft,Qs as Rr,Qt as Or,Qu as Ur,KN as jr,Qv as pt,Qw as Vr,wS as dn,ko as Nr,gW as Hr,C0 as Mr,Qx as ln,Qy as Gr,C1 as $r,Qz as zr,de as Qr,tM as Zr,BS as Yr,BM as Ve,bs as Wr,bF as Kr,cw as qr,bG as Xr,J_ as Jr}from"./zeni-epic-state-Co_KJ39L.js";import{z as ee,k as Ge,a as oe,G as Q,B as Sa,c4 as za,cf as es,cg as as,ch as ts,p as Re,ci as ns,cj as rs,J as Ia,aN as Le,q as ye,bo as ht,ck as ss,y as Aa,h as Qa,m as ft,d as K,D as gt,a7 as Za,cl as cs,W as un,aq as bt,bA as ra,cm as ct,cn as os,v as yt,co as is,at as mn,a2 as ot,U as Cn,f as pn,cp as ds,cq as ls,cr as us,cs as ms,ct as Cs,cu as ps,o as Ra,cv as hs,cw as fs,cx as at,Q as gs,cy as bs,cz as ys,cA as Ss,cB as Is,cC as As,a9 as Es}from"./index-BiOCnxUr.js";import{n as Te,D as hn,S as ks}from"./mui-ChC8whdU.js";import{a as d}from"./sentry-yFsVWhao.js";import{g as pe,a as Ea,b as fn,c as ke,d as _e,e as Me,f as $e,h as ze,A as _s,i as St,P as Ds,j as It,s as sa,k as gn,l as Ye,m as bn,n as ws,o as yn,p as Ps,S as Bt}from"./SetupPagesScreen-3YiJuF5G.js";import{u as Sn}from"./useInitialThreadRequest-CTq6SdMM.js";import Ya from"./NotFoundScreen-DxqYM2wk.js";import{M as We}from"./MobileAppDrawer-BB6nxZVq.js";import{u as In}from"./useAskAiCfoHostNavButtonProps-BsQuCyy5.js";import{v as xt}from"./utils-CaIGWeOv.js";import{d as vs}from"./recharts-BPALCGe7.js";import{t as Ts}from"./AddressScreen-C462o9IS.js";import"./analytics-C--DBRuq.js";import"./plaid-G4AU8x-v.js";import"./dnd-BsfjgQaS.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUC8jYi2.js";import"./lexical-a5QW-f2c.js";import"./pdf-BzsAlPE_.js";import"./analyticsHelper-BYU7ljxB.js";import"./routePaths-CpYaPUdg.js";import"./BusinessVerificationPageScreen-NFhMF-eZ.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]="372b6297-39c7-44eb-acff-ad1b08594dd3",e._sentryDebugIdIdentifier="sentry-dbid-372b6297-39c7-44eb-acff-ad1b08594dd3")}catch{}})();function Fs(){const e=me(),{cardId:a}=ba(),t=Ce(),r=ee.getSignedInUser(),n=S(Y=>de(Y)),f=Ge(),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(Y=>ja(Y).firstViewAfterActivation);if(a==null)throw Error("Empty card id is not valid...");const v=n.userRole.includes("charge_card_user"),{isFeatureEnabled:y}=g(Q.isChargeCardFeatureEnabled),h=!!n.companyChargeCardInfo?.info?.isChargeCardEnabled,{isFeatureEnabled:x}=g(Q.isDebitCardFeatureEnabled),F=Ie(n),L=Ae(n),C=Ee(x,n),u=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,D=ke({isDebitCardFeatureEnabled:x,isBankingOnlyTenant:C}),o=_e({isCardsOnlyTenant:F,isChargeCardFeatureEnabled:y,isBookKeepingTenant:L,isDebitCardProductVisible:D,chargeCardsCreditAccountLimit:u}),I=!!n.companyDebitCardInfo?.info?.isDebitCardEnabled,A=S(Y=>Ke(Y,n.companyId)),j=qe(A.controllers),{creditAccount:E,creditAccountRepayment:b}=S(Y=>Xe(Y)),B=S(Y=>Y.classListState.fetchState),i=!v&&o&&h,m=S(Y=>lt(Y,a,i,o)),[O,M]=d.useState(!1),R=m.chargeCard,T=R?.cardCreatedByUser?.userId,G=S(Y=>T!=null?Ba(Y.userRoleState,T):void 0),$=G?.accountingClassIDs[0],V=S(Y=>$!=null?xa(Y.classState,{classId:$,reportId:"class_list"}):void 0),w=R?.cardHolderUser?.userId,Z=S(Y=>w!=null?Ba(Y.userRoleState,w):void 0),q=Z?.accountingClassIDs[0],P=S(Y=>q!=null?xa(Y.classState,{classId:q,reportId:"class_list"}):void 0),U=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&&U&&(c(!0),setTimeout(()=>{t(La()),te&&t(pa({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[l,_,U,te]),d.useEffect(()=>{O||m.fetchState==="Completed"||m.fetchState==="In-Progress"||a==null||(M(!0),t(ca(a,i,!1)))},[O,m,a,t]),d.useEffect(()=>{if(m.fetchState==="Completed"&&(U===!1||U&&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 Y=pe(n.tenantEmailDomain,a,r,R,l);e(Y)}},[m.fetchState,l,U]),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()),B!=="Completed"&&B!=="In-Progress"&&t(Vt())},[E.fetchState,b.fetchState,t,o,h,p,B]);const ae=()=>{if(r!=null&&a!=null){t(La());const Y=pe(n.tenantEmailDomain,a,r);e(Y)}},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),J=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:J,chargeCardDetailView:m,creditAccount:E,classListFetchState:B,creditAccountRepayment:b,cardIssuedByRoles:G?.userRoles,cardIssuedByDepartmentName:V?.className,cardHolderRoles:Z?.userRoles,cardHolderDepartmentName:P?.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,x]=ts(y);if(x==="")return;const F=n.channel(h),L=u=>{f.current(x,u)};let C;if(F?.subscribed===!0)C=F,C.bind(x,L),l.has(h)||(l.add(h),v()),c.push(()=>{F.unbind(x,L)});else{if(C=F??n.subscribe(h),C.bind(x,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(x,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",Ka="charge-card-created",kt="charge-card-limit-updated",_t="charge-card-limit-reset",Dt="charge-card-renamed",Bs="charge-card-department-updated",wn="charge-card-repayment-completed",Pn="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}`),xs=[_a,ka],Ls=he(function(e){const a=Je(e);return{insightsData:a.insight,cashbackByPeriod:a.cashbackByPeriod,uiState:a.uiState,cashbackSummary:a.cashbackSummary}},function(e){return{onColumnSortConfigChanged:(a,t)=>{e(On({uiState:{sortKey:a,sortOrder:t}}))}}})(rs);function Rs(){const e=me(),a=Ce(),t=Se(),r=ee.getSignedInUser(),n=S(x=>de(x)),{useFeatureGate:f}=oe(),{isFeatureEnabled:p}=f(Q.isCardsCommentingEnabled),[g,_]=d.useState(!1),c=S(x=>Je(x)),l=Sn(n.companyId,{clearParams:c.fetchState==="Completed"}),v=d.useCallback(()=>{const x=Re(t.state?.pathnameStackToGoBack),F=x.poppedPathname??Os(n.tenantEmailDomain);e(F,{state:{pathnameStackToGoBack:x.newStack}})},[e,t,n.tenantEmailDomain]),y=$e(n);if(At({events:ta(y,xs),onEvent:x=>{switch(x){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(Ya,{}):s.jsx(Ls,{onBackClick:v,isCardsCommentingEnabled:p,initialOpenThreadRequest:l}):s.jsx(ns,{onBackClick:v})}const Os=e=>`/${e}/cards`,Us={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,x]=d.useState(!1),F=ee.getSignedInUser();if(F==null)throw Error("Can't access onboarding card page without signing in...");const L=S(P=>de(P));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(P=>Un(P,n)),o=D.chargeCard,I=S(P=>P.chargeCardConfigState.fetchState),{useFeatureGate:A}=oe(),{isFeatureEnabled:j}=A(Q.isChargeCardFeatureEnabled),{isFeatureEnabled:E}=A(Q.isDebitCardFeatureEnabled),b=Ee(E,L),B=ke({isDebitCardFeatureEnabled:E,isBankingOnlyTenant:b}),i=!!L.companyChargeCardInfo?.info?.isChargeCardEnabled,m=L.userRole.includes("charge_card_user"),O=Ie(L),M=Ae(L),R=L.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,T=_e({isCardsOnlyTenant:O,isChargeCardFeatureEnabled:j,isBookKeepingTenant:M,isDebitCardProductVisible:B,chargeCardsCreditAccountLimit:R}),G=!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,G,T)))},[c,D.fetchState,g,I]);const $=o?.type.code==="business_physical_credit_card"||o?.type.code==="business_physical_debit_card";d.useEffect(()=>{if(D.fetchState==="Completed"){if(v===!1&&($===!1||$&&o?.status?.code!=="inactive"||o?.cardHolderUserId!==F.userId)){const P=pe(L.tenantEmailDomain,n,F,o,!0),U=ye(f.state?.pathnameStackToGoBack,f.pathname);r(P,{state:{pathnameStackToGoBack:U}})}else if(v&&D.isRefreshingViewInBackground===!1&&o?.status?.code==="active"){t(jn({chargeCardId:n}));const P=pe(L.tenantEmailDomain,n,F,o,!0),U=ye(f.state?.pathnameStackToGoBack,f.pathname);t(Na()),r(P,{state:{pathnameStackToGoBack:U}})}}},[D.fetchState,o?.type.code,v,D.isRefreshingViewInBackground]);const V=ee.getZeniOtpTokenForCardHolder(n),w=S(P=>Nt(P.userState,F.userId)),Z=()=>{o?.status?.code!=="active"&&t(na(n,!0))};d.useEffect(()=>{D.updatePhysicalChargeCardAttemptFetchState.fetchState==="Completed"&&o?.cardActivationAttemptHistory.some(P=>P.statusCode==="success")===!0&&v===!1&&(setTimeout(Z,3e3),y(!0))},[D.updatePhysicalChargeCardAttemptFetchState.fetchState,o?.cardActivationAttemptHistory]);const q=P=>{x(P)};if(I!=="Completed"||o==null)return s.jsx(Sa,{fetchState:"In-Progress"});if(o.shippingAddressId==null)throw Error("Can't access shippingAddressId.");if(w?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(Hs,{children:[s.jsx(We,{isAppContentDrawerOpen:h,handleDrawerToggle:q}),s.jsx(Vs,{cardId:n,card:o,shippingAddressId:o.shippingAddressId,phone:w.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:()=>{q(!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:Qa.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(Ga(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=>`${Us.containerWidth.value(e.windowSize)}%`};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-
|
|
1
|
+
import{j as m}from"./liveblocks-DQxWCA7d.js";import{a as g}from"./sentry-yFsVWhao.js";import{h as w,u as k,g as x,i as T,j as O,n as E}from"./core-yFUZRhgi.js";import{z as b,b9 as F,v as P,d as V,f as L,af as N,ba as j,at as A,au as U,q as M}from"./index-BiOCnxUr.js";import{eR as C,fI as B,sD as R,fD as _,c1 as z,Ne as q,bn as G,qL as Y,qz as H,kg as X,lM as S,Nf as Z,bE as $,cu as D,lU as J,lX as K}from"./zeni-epic-state-Co_KJ39L.js";import"./mui-ChC8whdU.js";import{d as Q}from"./routePaths-CpYaPUdg.js";import{M as W}from"./MobileAppDrawer-BB6nxZVq.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="9f1f86c2-f36b-4674-821e-369177050eba",t._sentryDebugIdIdentifier="sentry-dbid-9f1f86c2-f36b-4674-821e-369177050eba")}catch{}})();const ee=E(function(t){const a=_(t),i=b.getSignedInUser(),l=C(t),c=l.tenantId,p={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=z(l?.userRole??[])&&a.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=q(t.companyConfigState),n=t.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:a.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:a,allIndustries:e.companyIndustries??[],allNationalityCountries:n,isDisabled:f,authParams:p,filesEndPoint:`${A.fileMicroServiceBaseUrl}`,isZeniUser:G(i)}},function(t,a){const{companyId:i,currentTenant:l,navigate:c,location:p}=a,{tenantEmailDomain:f}=l;return{onScheduleClick:e=>{let n=e.href;n.includes("http")||(n="https://".concat(n)),window.open(n,"_blank")},onSaveAll:()=>{t(K())},onAddressClick:e=>{const n=Q(f,e),o=M(p.state?.pathnameStackToGoBack,p.pathname);c(n,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{t(J({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:n,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=n,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:h}=r,v={companyInfo:{...n,website:u!=""&&u!=null?D(u):void 0,meetingLink:y!=""&&y!=null?D(y):void 0,industry:n.industry.selectedOption,companyIndustryType:n.companyIndustryType?.selectedOption??void 0,companySubIndustry:n.companySubIndustry?.selectedOption??void 0,businessModel:n.businessModel.selectedOption??"",companySourceOfFunds:n.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:n.companySourceOfFundsDescription??void 0,countriesOfOperations:n.countriesOfOperations?.selectedOptions?.map(I=>I.length===2?I:U(I))??[],transactionVolume:n.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:n.transactionVolumeDescription??void 0,regulatedStatus:n.regulatedStatus??void 0,regulatedStatusDescription:n.regulatedStatusDescription??void 0,usNexus:n.usNexus??void 0,usNexusTypes:n.usNexusTypes?.selectedOptions??[],purposeOfAccount:n.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:n.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?$(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]}};t(S({companyDetails:v}))},onPrimaryContactDetailsUpdated:e=>{t(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{t(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=>{t(Z(e))},onCompanyOfficerUpdated:e=>{t(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=>{t(X({files:e}))},onDeleteFile:e=>{t(H(e))},onEditFileName:(e,n)=>{t(Y(e,n.split(".")[0]))}}})(j);function de(){const t=w(),a=k(),i=x(),{tenantEmailDomain:l}=T(),[c,p]=g.useState(!1),[f,e]=g.useState(!1),n=O(s=>s.companyViewState.passportView.fetchState),o=O(s=>s.companyConfigState.fetchState),r=O(s=>C(s)),d=r.companyId??b.getSignedInUserTenant(l)?.companyId;if(b.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect(()=>{c||n!=="Not-Started"||d==null||(p(!0),a(B(d)))},[c,n,d,a]),g.useEffect(()=>{o==="Not-Started"&&a(R())},[o,a]);const u=s=>{e(s)},y=n==="Not-Started"||n==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&n==="Error"?m.jsx(F,{onGoHome:()=>t("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(P,{analytics:V,onLoad:s=>s.trackPageLoaded(L.Event.companyPassport,N(i)?"Settings":"Company Passport")}),N(i)?m.jsx(W,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:t,location:i,isLoading:y,currentTenant:r,isSettings:N(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-
|
|
1
|
+
import{j as C}from"./liveblocks-DQxWCA7d.js";import{a}from"./sentry-yFsVWhao.js";import{u as D,g as v,j as c,N as w}from"./core-yFUZRhgi.js";import{JW as A,eR as O,fq as _,ng as j,fR as h,fp as U,eY as L,K1 as F}from"./zeni-epic-state-Co_KJ39L.js";import{u as R,z as m,L as g,D as $,o as k}from"./index-BiOCnxUr.js";import{n as H}from"./mui-ChC8whdU.js";import{t as z}from"./getLocaleForTenant-BhAx8guK.js";import{g as P,Q as q}from"./QBOConnectionScreen-CoBJUifN.js";import"./recharts-BPALCGe7.js";import"./analytics-C--DBRuq.js";import"./plaid-G4AU8x-v.js";import"./dnd-BsfjgQaS.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUC8jYi2.js";import"./lexical-a5QW-f2c.js";import"./pdf-BzsAlPE_.js";import"./utils-CaIGWeOv.js";import"./empty-DWXN0zXu.js";import"./pdf-lib-Bunmyp1f.js";import"./index-D6SI2XXD.js";import"./url-CItc7ZnZ.js";import"./index-D8lrtix7.js";import"./decodeURIComponentSafe-DJGiVKY3.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]="f10c3328-1d53-41c5-bd07-4d8aa4b90ecf",t._sentryDebugIdIdentifier="sentry-dbid-f10c3328-1d53-41c5-bd07-4d8aa4b90ecf")}catch{}})();const G=H.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex: 1 1 auto;
|
|
4
4
|
flex-direction: row;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as i}from"./liveblocks-DQxWCA7d.js";import{z as n}from"./index-BiOCnxUr.js";import{g as d}from"./QBOConnectionScreen-CoBJUifN.js";import"./sentry-yFsVWhao.js";import{g as p,N as a}from"./core-yFUZRhgi.js";import"./zeni-epic-state-Co_KJ39L.js";import"./recharts-BPALCGe7.js";import"./mui-ChC8whdU.js";import"./analytics-C--DBRuq.js";import"./plaid-G4AU8x-v.js";import"./dnd-BsfjgQaS.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUC8jYi2.js";import"./lexical-a5QW-f2c.js";import"./pdf-BzsAlPE_.js";import"./utils-CaIGWeOv.js";import"./empty-DWXN0zXu.js";import"./pdf-lib-Bunmyp1f.js";import"./index-D6SI2XXD.js";import"./url-CItc7ZnZ.js";import"./index-D8lrtix7.js";import"./decodeURIComponentSafe-DJGiVKY3.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-Br-Z1BtF.js → CustomerOnboardingRoutes-D6x8LO5z.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-DQxWCA7d.js";import{t as Ke,A as Ce}from"./AddressScreen-C462o9IS.js";import $e from"./NotFoundScreen-DxqYM2wk.js";import{a as g}from"./sentry-yFsVWhao.js";import{h as oe,g as se,u as ie,i as re,j as w,N as D,n as ce,l as ze,o as qe,p as $}from"./core-yFUZRhgi.js";import{Q as de,k as le,z as V,a as ue,m as Me,G as _,_ as Qe,q as U,v as W,d as R,B as je,f as J,ap as Ze,J as We,aq as Ie,h as te,ar as He,as as ke,o as Je,at as Xe,au as Ee,av as Ye}from"./index-BiOCnxUr.js";import{eR as Y,fi as et,f0 as pe,e_ as me,bs as tt,ne as at,fe as nt,bO as ot,jk as ae,jn as ve,Kq as st,bT as it,c1 as ge,sR as fe,sC as rt,KW as X,sS as _e,Ii as ct,ko as Ue,KX as Ve,KY as dt,KZ as lt,K_ as ut,ji as pt,jl as mt,sE as Be,sQ as gt,bE as xe,cu as ft,t2 as Te,qL as ht,qz as yt,kg as St,fG as bt,fF as Ct,fE as It,K$ as kt,sw as Et,t3 as xt,t6 as Tt,t9 as Ot,tf as Pt,cS as Dt}from"./zeni-epic-state-Co_KJ39L.js";import{n as he}from"./mui-ChC8whdU.js";import{g as At,h as Ft,q as ne}from"./QBOConnectionScreen-CoBJUifN.js";import"./recharts-BPALCGe7.js";import"./analytics-C--DBRuq.js";import"./plaid-G4AU8x-v.js";import"./dnd-BsfjgQaS.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUC8jYi2.js";import"./lexical-a5QW-f2c.js";import"./pdf-BzsAlPE_.js";import"./utils-CaIGWeOv.js";import"./empty-DWXN0zXu.js";import"./pdf-lib-Bunmyp1f.js";import"./index-D6SI2XXD.js";import"./url-CItc7ZnZ.js";import"./index-D8lrtix7.js";import"./decodeURIComponentSafe-DJGiVKY3.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]="fdb0321d-0b43-4ac5-a32c-3af712232419",t._sentryDebugIdIdentifier="sentry-dbid-fdb0321d-0b43-4ac5-a32c-3af712232419")}catch{}})();const wt=ce(function(t,o){const s=[];o.isApAgingFeatureEnabled===!1&&s.push("accounts_payable_aging"),o.isArAgingFeatureEnabled===!1&&s.push("accounts_receivable_aging"),o.shouldFetchZeniAccountsPromoCard===!1&&s.push("zeni_accounts_promo_card"),o.shouldFetchRewardsPlanCard===!1&&s.push("rewards_card"),o.isExpenseAutomationEnabledForUser===!1&&s.push("expense_automation_card");const d=nt(t,s,o.signedInUser,o.isExpenseAutomationFeatureEnabledV2,o.isExpenseAutomationEnabledForUser,o.isTreasuryEnabled);return{dashboardFetchState:ot(d.reportsInOrder.map(c=>({fetchState:c.fetchState,error:c.error}))).fetchState}},function(t,o){const{themeState:s,navigate:d,location:c}=o;return{onZeniLogoClick:()=>{s.toggle()},onDashboardFetchDone:()=>{const r=U(c.state?.pathnameStackToGoBack,c.pathname);d("../../dashboard",{state:{pathnameStackToGoBack:r,message:"activation"}})}}})(Ze),jt=()=>{const t=oe(),o=se(),s=ie(),d=de(),[c,r]=g.useState(!1),[p,y]=g.useState(!1),{tenantEmailDomain:e}=re(),n=le(),i=V.getSignedInUser(),{useFeatureGate:l}=ue(),C=Me(),{isFeatureEnabled:x}=l(_.isApAgingFeatureEnabled),{isFeatureEnabled:A}=l(_.isArAgingFeatureEnabled),{isFeatureEnabled:T}=l(_.isDepositAccountsFeatureEnabled),{isFeatureEnabled:k}=l(_.isReferralFeatureEnabled),{isFeatureEnabled:S}=l(_.isExpenseAutomationEnabledV2),{isFeatureEnabled:v}=l(_.isDebitCardFeatureEnabled),I=Qe(),f=w(u=>Y(u)),{isFeatureEnabled:G}=l(_.isTreasuryEnabled),m=f.company!=null&&et(f.company),B=G&&m,E=w(u=>u.onboardingCustomerViewState.fetchState),F=f.excludedResources,L=f.companyId??V.getSignedInUserTenant(e)?.companyId;if(i==null)throw Error("Can't access onboarding flow without signing in...");const b=pe(v,f),O=me(f),P=[],N=F?.resources?.find(u=>u.resource==="/reports/top_expenses")==null,M=F?.resources?.find(u=>u.resource==="/reports/task_card")==null,Q=f?.userRole!=null&&tt(f?.userRole),K=F?.resources?.find(u=>u.resource==="/bills")==null&&!Q,z=F?.resources?.find(u=>u.resource==="/reimbursements")==null;if(N===!1&&P.push("top_expenses"),M===!1&&P.push("task_card"),K===!1&&P.push("bill_pay_card","bill_pay_promo_card"),z===!1&&P.push("reimbursement_card","reimbursement_promo_card"),T===!1&&P.push("zeni_accounts_promo_card"),k===!1&&P.push("rewards_card"),g.useEffect(()=>{E!=="Completed"||c||b||O||(r(!0),s(at(i.userId,L,f.tenantId,!0,!1,P)))},[c,E,b,O,i,f.tenantId,s]),g.useEffect(()=>{(b||O)&&setTimeout(()=>{y(!0)},5e3)},[b,O]),E!=="Completed")return a.jsx(D,{to:"../"});if(E==="Completed"&&p){const u=U(o.state?.pathnameStackToGoBack,o.pathname);if(b)return a.jsx(D,{to:"../../checking",state:{...o.state,pathnameStackToGoBack:u,message:"activation"}});if(O)return a.jsx(D,{to:"../../cards",state:{...o.state,pathnameStackToGoBack:u,message:"activation"}})}return n?.loggedInUserRoleMap!=null?a.jsxs(a.Fragment,{children:[a.jsx(W,{analytics:R,onLoad:u=>(q=>q.trackPageLoaded(J.Event.onboardingDashboardActivation))(u)}),a.jsx(wt,{navigate:t,location:o,themeState:d,signedInUser:i,isApAgingFeatureEnabled:x,isArAgingFeatureEnabled:A,shouldFetchZeniAccountsPromoCard:T,shouldFetchRewardsPlanCard:k,isExpenseAutomationEnabledForUser:I,isExpenseAutomationFeatureEnabledV2:S,isTreasuryEnabled:B,loggedInUserRoleMap:n?.loggedInUserRoleMap})]}):a.jsx(je,{fetchState:"In-Progress",style:{backgroundColor:C.colors.grey5}})},Oe=he.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-Dx9GJaKJ.js";import{i as K,j as S,g as H,u as z,h as W,n as ee,k as ia,o as Ct,p as F}from"./core-C1GB7aB-.js";import{eR as U,Lf as We,bE as ca,bo as xe,Ms as Pn,i8 as Fn,Mt as qt,Mu as On,ib as _t,Mv as Ze,Mw as Mn,ih as Rn,Mx as Zt,My as Bn,il as St,Mz as Qe,MA as jn,ck as At,MB as Ln,MC as Un,Lz as Nn,je as Gn,MD as Vn,bn as Xe,ME as la,L3 as ce,bc as da,js as ua,no as ma,jb as pa,L5 as le,L4 as J,eQ as ha,eW as Yn,fs as kt,MF as $n,MG as zn,MH as fa,MI as Oe,uR as Le,uS as Ue,vd as De,v7 as de,uW as Ne,MJ as Kn,MK as qn,ML as Zn,MM as ga,MN as Me,MO as Qn,dE as Je,rj as ba,MP as Hn,MQ as Wn,MR as Xn,MS as vt,Ks as It,jI as we,vl as Et,rr as Jn,MT as eo,uT as Qt,rm as Ee,ri as Ca,MU as ge,MV as to,MW as Tt,Kr as xt,tj as _a,MX as ao,MY as no,MZ as oo,M_ as Dt,tw as so,M$ as ro,uV as Ht,ti as Sa,N0 as be,N1 as io,bs as ka,vp as ya,N2 as co,N3 as lo,N4 as uo,N5 as wt,vk as mo,N6 as po,uU as Wt,vo as Aa,N7 as Ce,N8 as ho,N9 as fo,Na as va,jx as Ia,nl as Ea,jC as Ta,nj as xa,ni as Da,nh as wa,sH as go,fi as bo,cM as Co,cN as _o,ne as So,fe as ko,nv as yo,EB as ut,Et as Ao,Ex as vo,Nb as Io,Nc as Eo,Nd as To,b5 as et,f6 as xo,gT as Do,fI as wo,np as Po,j4 as Fo,nm as Oo,nk as Mo,f0 as Ro,e_ as Bo}from"./zeni-epic-state-BJXbyZuT.js";import{z as j,a2 as te,q as D,d as T,D as q,aV as jo,W as Ge,v as Ve,aW as Pa,f as Y,aX as Lo,k as Se,aY as Fa,a as ke,G as R,m as Uo,aZ as No,a_ as Go,N as Oa,J as Ma,c as Ra,V as Vo,a$ as Yo,I as $o,aN as Ba,$ as se,b0 as ja,b1 as La,a1 as Ua,b2 as zo,b3 as Ko,_ as qo,aq as Zo,p as Qo,U as Ho,b4 as Wo,b5 as Xo,b6 as Jo,b7 as es,b8 as _e}from"./index-D4_FYu1h.js";import{n as Pt}from"./mui-S6TXegyD.js";import{a as b}from"./sentry-i8uQ0afM.js";import{w as Na}from"./withTransactionSidePanel-yGfWimRu.js";import{c as Ga,t as Pe,f as ue,a as Ft,v as ts}from"./routePaths-dZ-9-pnI.js";import{u as ae}from"./useAskAiCfoHostNavButtonProps-Zz8eSFW2.js";import je from"./NotFoundScreen-CLwfUXdC.js";import{u as Ot}from"./useInitialThreadRequest-BKY0Q6gT.js";import{t as Va}from"./analyticsHelper-DGI02sYS.js";import{C as as}from"./CompanyPassportScreen-ioZCXwD_.js";import{u as ns}from"./useAiCfoDashboardSuggestedQuestionsChips-zin4AQfk.js";import{F as os}from"./FeaturePreviewScreen-RdL9x4ht.js";import{R as ss}from"./ReferralListScreen-BTezTn63.js";import"./recharts-DgDFrpbv.js";import"./analytics-7_b07CgE.js";import"./plaid-nqaFvQD8.js";import"./dnd-BKLSY4Qp.js";import"./stripe-DMRn4zHo.js";import"./lottie-MYbVFail.js";import"./lexical-Dcuk4Yua.js";import"./pdf-BijcgxIK.js";import"./utils-BGTnhJzp.js";import"./TransactionDetailScreen-DT8xA3x1.js";import"./decodeURIComponentSafe-okum9C8e.js";import"./MobileAppDrawer-qPZdyrO4.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]="e09f9dcc-0c6e-40da-a796-5ba805722b92",e._sentryDebugIdIdentifier="sentry-dbid-e09f9dcc-0c6e-40da-a796-5ba805722b92")}catch{}})();const rs=Na(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=K(),s=j.getSignedInUser(),i=S(I=>I.tenantState.currentTenantId),c=S(I=>U(I)),{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:`${te}/agingDetailedReport`,timezone:We()}),[]),h=b.useMemo(()=>r!=null?ca(r):xe(),[r]),p=z(),f=W(),k=S(I=>Pn(I,h,o)),E=b.useCallback(()=>{o!=null&&k.fetchState!=="In-Progress"&&k.fetchState!=="Completed"&&p(Fn(o,h))},[h]),A=b.useCallback(()=>{f("../../",{relative:"path"})},[]),_=b.useCallback((I,L)=>{p(qt({sortKey:I,sortOrder:L}))},[]),x=b.useCallback(I=>{p(qt({downloadState:I}))},[]),w=b.useCallback(I=>{if(e)e(I.transactionId,I.transactionType);else if(m!=null){const L=Ga({id:I.transactionId,type:I.transactionType},m);f(L);const ne=D(g.state?.pathnameStackToGoBack,g.pathname);f(L,{state:{pathnameStackToGoBack:ne}})}},[m,e]),y=b.useCallback(()=>{k.vendor!=null&&T.trackApAgingDetail("AP Aging",h.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),k.vendor.id,k.vendor.name)},[k.vendor,h]);return b.useEffect(()=>{E()},[]),b.useEffect(()=>{k.fetchState==="Completed"&&y()},[y,k.fetchState]),d.jsx(jo,{apAgingDetail:k,downloadParams:l,reportDate:h,analytics:T,onTransactionClick:w,onReload:E,onBackClick:A,onColumnSortConfigChanged:_,updateDownloadStateHandler:x,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),is=()=>{const e=z(),a=W(),t=S(_=>On(_)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ae({mobileExploreReferrer:"AP Aging"});Ge({isDataReady:t.fetchState==="Completed"});const r=j.getSignedInUser(),s=S(_=>_.tenantState.currentTenantId),i=S(_=>U(_)),c=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},g=b.useMemo(()=>({authParams:m,companyName:c,downloadEndPoint:`${te}/agingReport`,timezone:We()}),[]),C=t.apAgingUIState.selectedDate??xe(),u=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(_t(C))},[]);b.useEffect(()=>{u()},[]);const l=b.useCallback(()=>{a("../",{relative:"path"})},[]),h=b.useCallback(_=>{e(Ze({searchString:_}))},[]),p=b.useCallback((_,x)=>{e(Ze({sortKey:x,sortOrder:_}))},[]),f=b.useCallback(_=>{a(`./${_}/${C.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[C]),k=b.useCallback(_=>{e(Ze({downloadState:_}))},[]),E=b.useCallback((_,x)=>{},[]),A=b.useCallback((_,x)=>{e(Ze({selectedDate:_,agingDateSelectionType:x})),e(_t(_))},[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ve,{analytics:T,onLoad:_=>_.trackPageLoaded(Y.Event.agingReport,"AP Aging")}):null,d.jsx(Pa,{uiState:t.apAgingUIState,report:t,downloadParams:g,analytics:T,onReloadReport:u,onBackClick:l,onSearchTextChange:h,onSortOrderChange:p,onEntityNameClick:f,updateDownloadStateHandler:k,onSelectedDateChanged:A,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},cs=Na(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=K(),s=j.getSignedInUser(),i=S(y=>U(y)),{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:`${te}/agingDetailedReport`,timezone:We()}),[]),l=b.useMemo(()=>r!=null?ca(r):xe(),[r]),h=z(),p=W(),f=S(y=>Mn(y,l,o)),k=b.useCallback(()=>{o!=null&&f.fetchState!=="In-Progress"&&f.fetchState!=="Completed"&&h(Rn(o,l))},[l]),E=b.useCallback(()=>{p("../../",{relative:"path"})},[]),A=b.useCallback((y,I)=>{h(Zt({sortKey:y,sortOrder:I}))},[]),_=b.useCallback(y=>{h(Zt({downloadState:y}))},[]),x=b.useCallback(y=>{if(e)e(y.transactionId,y.transactionType);else if(c!=null){const I=Ga({id:y.transactionId,type:y.transactionType},c);p(I);const L=D(m.state?.pathnameStackToGoBack,m.pathname);p(I,{state:{pathnameStackToGoBack:L}})}},[c,e]),w=b.useCallback(()=>{f.customer!=null&&T.trackArAgingDetail("AR Aging",l.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),f.customer.id,f.customer.name)},[f.customer,l]);return b.useEffect(()=>{k()},[]),b.useEffect(()=>{f.fetchState==="Completed"&&w()},[f.fetchState,w]),d.jsx(Lo,{arAgingDetail:f,downloadParams:u,reportDate:l,analytics:T,onTransactionClick:x,onReload:k,onBackClick:E,onColumnSortConfigChanged:A,updateDownloadStateHandler:_,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),ls=()=>{const e=z(),a=W(),t=S(A=>Bn(A)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ae({mobileExploreReferrer:"AR Aging"});Ge({isDataReady:t.fetchState==="Completed"});const r=j.getSignedInUser(),s=S(A=>U(A)),i=s.companyName,c={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=b.useMemo(()=>({authParams:c,companyName:i,downloadEndPoint:`${te}/agingReport`,timezone:We()}),[]),g=t.arAgingUIState.selectedDate??xe(),C=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(St(g))},[]);b.useEffect(()=>{C()},[]);const u=b.useCallback(()=>{a("../",{relative:"path"})},[]),l=b.useCallback(A=>{e(Qe({searchString:A}))},[]),h=b.useCallback((A,_)=>{e(Qe({sortKey:_,sortOrder:A}))},[]),p=b.useCallback(A=>{a(`./${A}/${g.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[g]),f=b.useCallback(A=>{e(Qe({downloadState:A}))},[]),k=b.useCallback((A,_)=>{e(Qe({selectedDate:A,agingDateSelectionType:_})),e(St(A))},[]),E=b.useCallback((A,_)=>{e(jn({nodeId:A,isCollapsed:_}))},[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ve,{analytics:T,onLoad:A=>A.trackPageLoaded(Y.Event.agingReport,"AR Aging")}):null,d.jsx(Pa,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:T,onReloadReport:C,onBackClick:u,onSearchTextChange:l,onSortOrderChange:h,onEntityNameClick:p,updateDownloadStateHandler:f,onSelectedDateChanged:k,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Ya=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function $a(e,a){const t=Nn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=Pe(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(Gn(n,o))},onPromoCardBtnClick:n=>{if(a.isZeniAccountsAdmin){let o=`../../checking/${n}`;n?T.trackZeniAccountsCashBalancePromoClicked("Move Money"):(T.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 T.trackZeniAccountsCashBalancePromoClicked("Learn More"),window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}const ds=ee(function(e){const a=Ln(e).accountsInOrder.map((n,o)=>Ya(n,o)),t=Un(e);return{sectionTitle:q.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:T}},$a)(Fa),us=ee(function(e){const a=Vn(e).accountsInOrder.map((o,r)=>Ya(o,r)),t=j.getSignedInUser(),n=Xe(t);return{sectionTitle:q.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:T}},$a)(Fa);function ms(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=Se(),o=S(s=>U(s).company?.companyInfo.firstMonthOfFY??1),r=At(n?.loggedInUserRoleMap);return S(s=>s.cashBalanceState.fetchState)==="Error"?d.jsx(je,{}):d.jsx(ds,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function ps(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=Se(),o=At(n?.loggedInUserRoleMap),r=S(s=>U(s).company?.companyInfo.firstMonthOfFY??1);return S(s=>s.cardBalanceState.fetchState)==="Error"?d.jsx(je,{}):d.jsx(us,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const hs=Pt.div`
|
|
1
|
+
import{j as d}from"./liveblocks-DQxWCA7d.js";import{i as K,j as S,g as H,u as z,h as W,n as ee,k as ia,o as Ct,p as F}from"./core-yFUZRhgi.js";import{eR as U,Lf as We,bE as ca,bo as xe,Ms as Pn,i8 as Fn,Mt as qt,Mu as On,ib as _t,Mv as Ze,Mw as Mn,ih as Rn,Mx as Zt,My as Bn,il as St,Mz as Qe,MA as jn,ck as At,MB as Ln,MC as Un,Lz as Nn,je as Gn,MD as Vn,bn as Xe,ME as la,L3 as ce,bc as da,js as ua,no as ma,jb as pa,L5 as le,L4 as J,eQ as ha,eW as Yn,fs as kt,MF as $n,MG as zn,MH as fa,MI as Oe,uR as Le,uS as Ue,vd as De,v7 as de,uW as Ne,MJ as Kn,MK as qn,ML as Zn,MM as ga,MN as Me,MO as Qn,dE as Je,rj as ba,MP as Hn,MQ as Wn,MR as Xn,MS as vt,Ks as It,jI as we,vl as Et,rr as Jn,MT as eo,uT as Qt,rm as Ee,ri as Ca,MU as ge,MV as to,MW as Tt,Kr as xt,tj as _a,MX as ao,MY as no,MZ as oo,M_ as Dt,tw as so,M$ as ro,uV as Ht,ti as Sa,N0 as be,N1 as io,bs as ka,vp as ya,N2 as co,N3 as lo,N4 as uo,N5 as wt,vk as mo,N6 as po,uU as Wt,vo as Aa,N7 as Ce,N8 as ho,N9 as fo,Na as va,jx as Ia,nl as Ea,jC as Ta,nj as xa,ni as Da,nh as wa,sH as go,fi as bo,cM as Co,cN as _o,ne as So,fe as ko,nv as yo,EB as ut,Et as Ao,Ex as vo,Nb as Io,Nc as Eo,Nd as To,b5 as et,f6 as xo,gT as Do,fI as wo,np as Po,j4 as Fo,nm as Oo,nk as Mo,f0 as Ro,e_ as Bo}from"./zeni-epic-state-Co_KJ39L.js";import{z as j,a2 as te,q as D,d as T,D as q,aV as jo,W as Ge,v as Ve,aW as Pa,f as Y,aX as Lo,k as Se,aY as Fa,a as ke,G as R,m as Uo,aZ as No,a_ as Go,N as Oa,J as Ma,c as Ra,V as Vo,a$ as Yo,I as $o,aN as Ba,$ as se,b0 as ja,b1 as La,a1 as Ua,b2 as zo,b3 as Ko,_ as qo,aq as Zo,p as Qo,U as Ho,b4 as Wo,b5 as Xo,b6 as Jo,b7 as es,b8 as _e}from"./index-BiOCnxUr.js";import{n as Pt}from"./mui-ChC8whdU.js";import{a as b}from"./sentry-yFsVWhao.js";import{w as Na}from"./withTransactionSidePanel-CNVv5_p9.js";import{c as Ga,t as Pe,f as ue,a as Ft,v as ts}from"./routePaths-CpYaPUdg.js";import{u as ae}from"./useAskAiCfoHostNavButtonProps-BsQuCyy5.js";import je from"./NotFoundScreen-DxqYM2wk.js";import{u as Ot}from"./useInitialThreadRequest-CTq6SdMM.js";import{t as Va}from"./analyticsHelper-BYU7ljxB.js";import{C as as}from"./CompanyPassportScreen-BTh0h3W9.js";import{u as ns}from"./useAiCfoDashboardSuggestedQuestionsChips-ouZaiHV2.js";import{F as os}from"./FeaturePreviewScreen-CEy-pIWu.js";import{R as ss}from"./ReferralListScreen-CAddpyLT.js";import"./recharts-BPALCGe7.js";import"./analytics-C--DBRuq.js";import"./plaid-G4AU8x-v.js";import"./dnd-BsfjgQaS.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUC8jYi2.js";import"./lexical-a5QW-f2c.js";import"./pdf-BzsAlPE_.js";import"./utils-CaIGWeOv.js";import"./TransactionDetailScreen-BN5X1_PJ.js";import"./decodeURIComponentSafe-DJGiVKY3.js";import"./MobileAppDrawer-BB6nxZVq.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]="e09f9dcc-0c6e-40da-a796-5ba805722b92",e._sentryDebugIdIdentifier="sentry-dbid-e09f9dcc-0c6e-40da-a796-5ba805722b92")}catch{}})();const rs=Na(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=K(),s=j.getSignedInUser(),i=S(I=>I.tenantState.currentTenantId),c=S(I=>U(I)),{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:`${te}/agingDetailedReport`,timezone:We()}),[]),h=b.useMemo(()=>r!=null?ca(r):xe(),[r]),p=z(),f=W(),k=S(I=>Pn(I,h,o)),E=b.useCallback(()=>{o!=null&&k.fetchState!=="In-Progress"&&k.fetchState!=="Completed"&&p(Fn(o,h))},[h]),A=b.useCallback(()=>{f("../../",{relative:"path"})},[]),_=b.useCallback((I,L)=>{p(qt({sortKey:I,sortOrder:L}))},[]),x=b.useCallback(I=>{p(qt({downloadState:I}))},[]),w=b.useCallback(I=>{if(e)e(I.transactionId,I.transactionType);else if(m!=null){const L=Ga({id:I.transactionId,type:I.transactionType},m);f(L);const ne=D(g.state?.pathnameStackToGoBack,g.pathname);f(L,{state:{pathnameStackToGoBack:ne}})}},[m,e]),y=b.useCallback(()=>{k.vendor!=null&&T.trackApAgingDetail("AP Aging",h.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),k.vendor.id,k.vendor.name)},[k.vendor,h]);return b.useEffect(()=>{E()},[]),b.useEffect(()=>{k.fetchState==="Completed"&&y()},[y,k.fetchState]),d.jsx(jo,{apAgingDetail:k,downloadParams:l,reportDate:h,analytics:T,onTransactionClick:w,onReload:E,onBackClick:A,onColumnSortConfigChanged:_,updateDownloadStateHandler:x,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),is=()=>{const e=z(),a=W(),t=S(_=>On(_)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ae({mobileExploreReferrer:"AP Aging"});Ge({isDataReady:t.fetchState==="Completed"});const r=j.getSignedInUser(),s=S(_=>_.tenantState.currentTenantId),i=S(_=>U(_)),c=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},g=b.useMemo(()=>({authParams:m,companyName:c,downloadEndPoint:`${te}/agingReport`,timezone:We()}),[]),C=t.apAgingUIState.selectedDate??xe(),u=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(_t(C))},[]);b.useEffect(()=>{u()},[]);const l=b.useCallback(()=>{a("../",{relative:"path"})},[]),h=b.useCallback(_=>{e(Ze({searchString:_}))},[]),p=b.useCallback((_,x)=>{e(Ze({sortKey:x,sortOrder:_}))},[]),f=b.useCallback(_=>{a(`./${_}/${C.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[C]),k=b.useCallback(_=>{e(Ze({downloadState:_}))},[]),E=b.useCallback((_,x)=>{},[]),A=b.useCallback((_,x)=>{e(Ze({selectedDate:_,agingDateSelectionType:x})),e(_t(_))},[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ve,{analytics:T,onLoad:_=>_.trackPageLoaded(Y.Event.agingReport,"AP Aging")}):null,d.jsx(Pa,{uiState:t.apAgingUIState,report:t,downloadParams:g,analytics:T,onReloadReport:u,onBackClick:l,onSearchTextChange:h,onSortOrderChange:p,onEntityNameClick:f,updateDownloadStateHandler:k,onSelectedDateChanged:A,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},cs=Na(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=K(),s=j.getSignedInUser(),i=S(y=>U(y)),{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:`${te}/agingDetailedReport`,timezone:We()}),[]),l=b.useMemo(()=>r!=null?ca(r):xe(),[r]),h=z(),p=W(),f=S(y=>Mn(y,l,o)),k=b.useCallback(()=>{o!=null&&f.fetchState!=="In-Progress"&&f.fetchState!=="Completed"&&h(Rn(o,l))},[l]),E=b.useCallback(()=>{p("../../",{relative:"path"})},[]),A=b.useCallback((y,I)=>{h(Zt({sortKey:y,sortOrder:I}))},[]),_=b.useCallback(y=>{h(Zt({downloadState:y}))},[]),x=b.useCallback(y=>{if(e)e(y.transactionId,y.transactionType);else if(c!=null){const I=Ga({id:y.transactionId,type:y.transactionType},c);p(I);const L=D(m.state?.pathnameStackToGoBack,m.pathname);p(I,{state:{pathnameStackToGoBack:L}})}},[c,e]),w=b.useCallback(()=>{f.customer!=null&&T.trackArAgingDetail("AR Aging",l.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),f.customer.id,f.customer.name)},[f.customer,l]);return b.useEffect(()=>{k()},[]),b.useEffect(()=>{f.fetchState==="Completed"&&w()},[f.fetchState,w]),d.jsx(Lo,{arAgingDetail:f,downloadParams:u,reportDate:l,analytics:T,onTransactionClick:x,onReload:k,onBackClick:E,onColumnSortConfigChanged:A,updateDownloadStateHandler:_,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),ls=()=>{const e=z(),a=W(),t=S(A=>Bn(A)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ae({mobileExploreReferrer:"AR Aging"});Ge({isDataReady:t.fetchState==="Completed"});const r=j.getSignedInUser(),s=S(A=>U(A)),i=s.companyName,c={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=b.useMemo(()=>({authParams:c,companyName:i,downloadEndPoint:`${te}/agingReport`,timezone:We()}),[]),g=t.arAgingUIState.selectedDate??xe(),C=b.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(St(g))},[]);b.useEffect(()=>{C()},[]);const u=b.useCallback(()=>{a("../",{relative:"path"})},[]),l=b.useCallback(A=>{e(Qe({searchString:A}))},[]),h=b.useCallback((A,_)=>{e(Qe({sortKey:_,sortOrder:A}))},[]),p=b.useCallback(A=>{a(`./${A}/${g.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[g]),f=b.useCallback(A=>{e(Qe({downloadState:A}))},[]),k=b.useCallback((A,_)=>{e(Qe({selectedDate:A,agingDateSelectionType:_})),e(St(A))},[]),E=b.useCallback((A,_)=>{e(jn({nodeId:A,isCollapsed:_}))},[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ve,{analytics:T,onLoad:A=>A.trackPageLoaded(Y.Event.agingReport,"AR Aging")}):null,d.jsx(Pa,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:T,onReloadReport:C,onBackClick:u,onSearchTextChange:l,onSortOrderChange:h,onEntityNameClick:p,updateDownloadStateHandler:f,onSelectedDateChanged:k,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Ya=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function $a(e,a){const t=Nn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=Pe(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(Gn(n,o))},onPromoCardBtnClick:n=>{if(a.isZeniAccountsAdmin){let o=`../../checking/${n}`;n?T.trackZeniAccountsCashBalancePromoClicked("Move Money"):(T.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 T.trackZeniAccountsCashBalancePromoClicked("Learn More"),window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}const ds=ee(function(e){const a=Ln(e).accountsInOrder.map((n,o)=>Ya(n,o)),t=Un(e);return{sectionTitle:q.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:T}},$a)(Fa),us=ee(function(e){const a=Vn(e).accountsInOrder.map((o,r)=>Ya(o,r)),t=j.getSignedInUser(),n=Xe(t);return{sectionTitle:q.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:T}},$a)(Fa);function ms(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=Se(),o=S(s=>U(s).company?.companyInfo.firstMonthOfFY??1),r=At(n?.loggedInUserRoleMap);return S(s=>s.cashBalanceState.fetchState)==="Error"?d.jsx(je,{}):d.jsx(ds,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function ps(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=Se(),o=At(n?.loggedInUserRoleMap),r=S(s=>U(s).company?.companyInfo.firstMonthOfFY??1);return S(s=>s.cardBalanceState.fetchState)==="Error"?d.jsx(je,{}):d.jsx(us,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const hs=Pt.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-
|
|
1
|
+
import{j as v}from"./liveblocks-DQxWCA7d.js";import{a as u}from"./sentry-yFsVWhao.js";import{u as y,j as p,n as w,g as A,N}from"./core-yFUZRhgi.js";import{JW as R,eR as _,fq as U,JX as k,ng as L,JY as z}from"./zeni-epic-state-Co_KJ39L.js";import{u as j,z as f,L as T,t as I,D as O,b as $}from"./index-BiOCnxUr.js";import"./mui-ChC8whdU.js";import{t as P}from"./getLocaleForTenant-BhAx8guK.js";import"./recharts-BPALCGe7.js";import"./analytics-C--DBRuq.js";import"./plaid-G4AU8x-v.js";import"./dnd-BsfjgQaS.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUC8jYi2.js";import"./lexical-a5QW-f2c.js";import"./pdf-BzsAlPE_.js";import"./utils-CaIGWeOv.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]="4f090bb4-cfb6-4be7-936a-27cdbd832b5e",t._sentryDebugIdIdentifier="sentry-dbid-4f090bb4-cfb6-4be7-936a-27cdbd832b5e")}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(),m=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let b="";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}`,b="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=m.get("question")?.replace(/^["']|["']$/g,"")??null,e=m.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}`,b="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,m);return v.jsx(N,{to:x,replace:!0,state:{...r.state,origin:"",message:b,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),m=u.useRef(null),b=p(e=>R(e)),n=p(e=>e.tenantState.fetchState),i=p(e=>e.tenantState.error),a=p(e=>e.tenantState.activeTenantFetchState.fetchState),c=p(e=>_(e)),d=f.getSignedInUser();return u.useLayoutEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId??null;m.current!==e&&(m.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(U(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"&&!k(i))&&t(L(e.userId)))},[n,a,i,d,t]),u.useEffect(()=>{f.isSignedIn()&&n==="Completed"&&b.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(b.tenantsCoreDetailsInOrder),o())},[b.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-DM1m923S.js → DomesticWireDetailScreen-Fo4R4YRQ.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-
|
|
1
|
+
import{j as l}from"./liveblocks-DQxWCA7d.js";import{h as w,g as C,j as h,n as A,i as P}from"./core-yFUZRhgi.js";import{NX as k,O2 as q,fG as Y,fF as J,fE as L,iF as W,L4 as X,qC as K,eR as V,Nt as D,iD as F,NY as S,O5 as G,iB as T,iY as j}from"./zeni-epic-state-Co_KJ39L.js";import{bw as M,J as N,a as R,z as O,m as U,p,G as v,B as Z,bx as Q,o as z,by as ee,q as te}from"./index-BiOCnxUr.js";import{n as H}from"./mui-ChC8whdU.js";import"./sentry-yFsVWhao.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]="7de054d0-27d3-4d95-988e-6d86d10352cb",e._sentryDebugIdIdentifier="sentry-dbid-7de054d0-27d3-4d95-988e-6d86d10352cb")}catch{}})();const ne=A(null,function(e,t){return{onSaveVendor:n=>{e(W(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(X("common")),n!=null&&e(K(n))},onGetOtp:n=>{e(L(n,"BillPayVendor"))},onResendOtp:n=>{e(J(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(Y(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(q(n,a,o))}}})(M);function _({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h(r=>k(r,e));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=H.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as d}from"./liveblocks-
|
|
1
|
+
import{j as d}from"./liveblocks-DQxWCA7d.js";import{J as l,y as c,m as f}from"./index-BiOCnxUr.js";import{D as b}from"./mui-ChC8whdU.js";import"./sentry-yFsVWhao.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]="793cfb95-c09a-4b69-beab-9f863397b87e",e._sentryDebugIdIdentifier="sentry-dbid-793cfb95-c09a-4b69-beab-9f863397b87e")}catch{}})();const p={drawerLeftMargin:new c(0,0,240)};function m(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:a}=e,n=l(),s=o?.valuePx(n)??p.drawerLeftMargin.valuePx(n),i=f();return d.jsx(b,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:i.colors.black,opacity:.8,cursor:"pointer"}}},onClose:a,children:t})}export{m as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-DQxWCA7d.js";import{a as d}from"./sentry-yFsVWhao.js";import{h as A,u as B,g as L,i as q,j as c,N as F,n as M,o as N,p as O}from"./core-yFUZRhgi.js";import{Mb as _,eR as R,LA as W,kI as Y,Ia as I,Mg as $,L3 as z,jI as V,Ib as P,LF as H,LG as J,L5 as K,L4 as Q}from"./zeni-epic-state-Co_KJ39L.js";import{aS as U,d as X,p as Z,q as tt}from"./index-BiOCnxUr.js";import"./mui-ChC8whdU.js";import{d as S}from"./decodeURIComponentSafe-DJGiVKY3.js";import{w as et}from"./withTransactionSidePanel-CNVv5_p9.js";import{f as at,c as nt}from"./routePaths-CpYaPUdg.js";import"./recharts-BPALCGe7.js";import"./analytics-C--DBRuq.js";import"./plaid-G4AU8x-v.js";import"./dnd-BsfjgQaS.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUC8jYi2.js";import"./lexical-a5QW-f2c.js";import"./pdf-BzsAlPE_.js";import"./utils-CaIGWeOv.js";import"./useAskAiCfoHostNavButtonProps-BsQuCyy5.js";import"./TransactionDetailScreen-BN5X1_PJ.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]="46fb9796-fcb9-4c4b-b2c2-7b4f0495620d",a._sentryDebugIdIdentifier="sentry-dbid-46fb9796-fcb9-4c4b-b2c2-7b4f0495620d")}catch{}})();const ot=M(function(a,t){const e=t.entity,o=$(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:z(a,"common")},trendWithTransactionsReport:o,analytics:X,isAccountingClassesEnabled:V(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(K({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(Q("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(H()),a(J()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??k();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(P(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(I(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(P(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(U),it=et(function({entityType:a,...t}){const e=A(),o=B(),l=L(),[m,T]=d.useState(!1),[h,g]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:j,entityNameEncoded:w}=q(),r=S(j??""),p=S(w??""),f=rt(r,p),x=[r,p].filter(n=>n!=null),i={name:p,id:r,type:a,zeniId:r,qboId:r},D=c(n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),v=c(n=>R(n).company?.companyInfo.firstMonthOfFY??1),u=c(n=>W(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&f===!0&&(T(!0),o(Y(i)))},[m,f,i]);const b=c(n=>n.trendState.fetchState),E=u?.selectedPeriod?.timePeriod??D,G=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(u?.selectedPeriod?.timePeriod,D);return d.useEffect(()=>{m===!0&&h===!1&&b==="Completed"&&(g(!0),E!=null&&o(I(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:E})))},[m,h,b]),f?s.jsx(ot,{firstMonthOfFY:v,tenantEmailDomain:C,location:l,navigate:e,entity:i,defaultTransactionTimePeriod:G,resetTrendIsFetchedStates:()=>{T(!1),g(!1)},...t}):s.jsx(F,{to:k(x.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,k=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function jt({entityType:a}){return s.jsx(N,{children:s.jsx(O,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{jt as EntityDetailRoutes,jt as default};
|
package/dist/assets/{ExpenseAutomationRoutes-D1H-vOTZ.js → ExpenseAutomationRoutes-BSNLpHm-.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-
|
|
1
|
+
import{j as h}from"./liveblocks-DQxWCA7d.js";import aa from"./NotFoundScreen-DxqYM2wk.js";import{a as o,b as Nt}from"./sentry-yFsVWhao.js";import{n as Fe,S as oa}from"./mui-ChC8whdU.js";import{u as pe,h as Jt,g as Ye,j as w,n as sa,i as wt,o as ca,p as qe}from"./core-yFUZRhgi.js";import{eR as xe,QF as ia,nq as ye,fl as la,rd as ra,nI as Yt,o1 as Kt,QG as Wt,ob as da,QH as Ht,nB as ua,qL as ma,f5 as Ie,QI as De,tc as Zt,Cx as Xt,QJ as en,QK as pa,qj as Ke,Mc as Pt,Me as ha,jL as ga,Mf as Ca,jS as Sa,cU as fa,up as We,nO as tn,og as Ue,nG as le,QL as Ia,L5 as xt,L4 as Re,QM as Dt,k7 as ya,QN as Ea,QO as ka,QP as ba,QQ as Ta,nV as va,oj as we,QR as Aa,QS as Ra,QT as wa,oq as Pa,jW as xa,jN as Da,QU as Ua,jV as Ut,Mm as Fa,QV as Ba,QW as Va,qf as Oa,pT as _a,oh as me,pS as Ge,QX as Ma,QY as za,QZ as ja,lq as La,bo as $a,ll as Ft,l7 as Qa,Q_ as qa,gV as Bt,fW as Ga,li as Na,wi as Ja,Q$ as Ya,oR as Ka,oM as Wa,oQ as Ha,oB as Za,R0 as Xa,f8 as nn,o4 as eo,nR as to,fm as Vt,ol as no,R1 as ao,R2 as oo,oi as an,R3 as so,R4 as co,R5 as io,R6 as lo,R7 as Ot,qr as ro,pK as uo,L3 as mo,R8 as po,R9 as ho,jU as go,Ra as Co,Hb as So,jT as fo,jI as Io,f7 as yo,ph as on,pC as Eo,of as _t,ok as ko,bE as bo,lf as To,lc as vo,Rb as Ao,oA as Mt,py as zt,pw as Ro,Rc as wo,p2 as Po,p0 as xo,pz as Do,Rd as Uo,Re as Fo,p6 as Bo,Rf as Vo,oW as Oo,p5 as _o,p3 as Mo,pF as zo}from"./zeni-epic-state-Co_KJ39L.js";import{a as sn,G as ne,d as Q,q as te,U as cn,W as ln,cG as jo,z as Be,cH as Lo,at as Pe,cI as $o,aU as jt,B as rn,cJ as Qo,aq as Ne,D as qo,a7 as Go,cK as No,a2 as Jo,cL as Yo,N as Ko,cM as Wo,cN as Ho,Q as Zo,k as Xo,aN as es,cO as ts,cP as ns,b9 as as,y as os,aQ as ss}from"./index-BiOCnxUr.js";import{u as dn}from"./useAskAiCfoHostNavButtonProps-BsQuCyy5.js";import{f as Lt,a as cs,b as is,g as ls,C as rs}from"./TransactionDetailScreen-BN5X1_PJ.js";import{w as ds}from"./withTransactionSidePanel-CNVv5_p9.js";import{h as us,v as ms}from"./routePaths-CpYaPUdg.js";import{g as Je}from"./accountMappingHelper-DcHRTvHW.js";import{D as ps}from"./DrawerScreen-DHL_W742.js";import"./recharts-BPALCGe7.js";import"./analytics-C--DBRuq.js";import"./plaid-G4AU8x-v.js";import"./dnd-BsfjgQaS.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUC8jYi2.js";import"./lexical-a5QW-f2c.js";import"./pdf-BzsAlPE_.js";import"./utils-CaIGWeOv.js";import"./decodeURIComponentSafe-DJGiVKY3.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="e7dea5ee-fef6-4aab-a05d-24d45b57846d",t._sentryDebugIdIdentifier="sentry-dbid-e7dea5ee-fef6-4aab-a05d-24d45b57846d")}catch{}})();const hs=()=>{const t=pe(),l=Jt(),B=Ye(),f=w(d=>xe(d)),{useFeatureGate:T}=sn(),{isFeatureEnabled:S}=T(ne.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=T(ne.aiAuditScorePercentage),I=w(d=>d.expenseAutomationViewState.selectedPeriodByTenantId),s=w(d=>ia(d,f.tenantId)),{isAiCfoAccessEnabled:p,onAskAiCfoClick:u}=dn({mobileExploreReferrer:"Month-End Close Overview"}),E=o.useCallback((d,q,X=!1)=>{t(ye({tenantId:q,period:{month:d.month,year:d.year},refreshViewInBackground:X}))},[]),v=o.useCallback(d=>{const q=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&Q.trackMonthCloseAuditPage(d.month,d.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,q??null),t(la(f.tenantId,d))},[f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),g=I[f.tenantId],m=o.useCallback(()=>{const d=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&Q.trackMonthCloseAuditPage(g.month,g.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),E(g,f.tenantId,!0)},[E,g,f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),P=te(B.state?.pathnameStackToGoBack,B.pathname),y=o.useCallback(()=>{if(s.monthEndCloseChecks!=null&&g!=null){const d=s.monthEndCloseChecks.monthEndCloseCheckList.find(q=>q.progress<100);if(d!=null)return void l(`./${d.id}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview"}});l(`./month_end_insights/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview"}})}},[s.monthEndCloseChecks,g]),{areTenantIdsInSync:k}=cn();return ln({isDataReady:s.fetchState==="Completed"}),o.useEffect(()=>{g!=null&&s.fetchState!=="In-Progress"&&s.fetchState!=="Completed"&&k&&E(g,f.tenantId)},[E,g,s.fetchState,f.tenantId,k]),o.useEffect(()=>{g!=null&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&k&&t(ra(g))},[g,s.monthClosePerformanceTrendFetchStatus.fetchState,k]),o.useEffect(()=>{const d=setInterval(()=>{s.fetchState!=="In-Progress"&&s.fetchState==="Completed"&&m()},3e5);return()=>clearInterval(d)},[s.fetchState]),o.useEffect(()=>{if(s.fetchState==="Completed"&&s.monthEndCloseChecks?.auditSummary!=null){const d=B.state?.referrer;Q.trackMonthCloseAuditPage(s.selectedPeriod.month,s.selectedPeriod.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null)}},[s.fetchState,s.selectedPeriod,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),h.jsx(gs,{children:h.jsx(jo,{monthEndCloseChecksView:s,isRealtimeInsightsFeatureEnabled:S,onMonthEndCheckClick:d=>{l(`./${d}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:v,handleReviewButtonClick:y,onBackClick:()=>{l("../../dashboard")},onReload:m,isAiCfoAccessEnabled:p,onAskAiCfoClick:u,aiAuditScorePercentageEnabled:r})})},gs=Fe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-DQxWCA7d.js";import{a as r}from"./sentry-yFsVWhao.js";import{a3 as f,a4 as l,a5 as p,p as m}from"./index-BiOCnxUr.js";import"./mui-ChC8whdU.js";import c from"./NotFoundScreen-DxqYM2wk.js";import{h as u,g as b}from"./core-yFUZRhgi.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]="720da2d7-8f85-4925-8f09-ee6187521283",e._sentryDebugIdIdentifier="sentry-dbid-720da2d7-8f85-4925-8f09-ee6187521283")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),d=r.useCallback(()=>{(()=>{const n=m(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=f(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:d}):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 i}from"./sentry-
|
|
1
|
+
import{a as i}from"./sentry-yFsVWhao.js";import{u as d,h as l,g as m}from"./core-yFUZRhgi.js";import{gC as p,Ki as g,Kj as b}from"./zeni-epic-state-Co_KJ39L.js";import{u as _,L as h,z as y}from"./index-BiOCnxUr.js";import"./liveblocks-DQxWCA7d.js";import"./recharts-BPALCGe7.js";import"./mui-ChC8whdU.js";import"./analytics-C--DBRuq.js";import"./plaid-G4AU8x-v.js";import"./dnd-BsfjgQaS.js";import"./stripe-DMRn4zHo.js";import"./lottie-CUC8jYi2.js";import"./lexical-a5QW-f2c.js";import"./pdf-BzsAlPE_.js";import"./utils-CaIGWeOv.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]="0974b3ee-928b-4ffb-8e8e-f6fe1b69009e",e._sentryDebugIdIdentifier="sentry-dbid-0974b3ee-928b-4ffb-8e8e-f6fe1b69009e")}catch{}})();function K(){const e=d(),n=l(),r=m(),{setLoading:o,clearAllLoading:c}=_(),s=i.useRef(!1);return i.useLayoutEffect(()=>{o(h.CONNECTION_AUTH)},[o]),i.useEffect(()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(r.search).get("code"),u=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&u!=null){const t=JSON.parse(u);e(p(t.tenant_id,t.connection_id,g("revenue"),b("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}c();const f=y.getActiveTenantForUser();n(f?.tenantEmailDomain!=null?`/${f.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})},[]),null}export{K as default};
|