@zeniai/web-app-ui 5.0.78-next → 5.0.78-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-BTXAYebf.js +1 -0
- package/dist/assets/{AddressScreen-DLY0B5X2.js → AddressScreen-eTY0sZvp.js} +1 -1
- package/dist/assets/{AiCfoScreen-BrFGp0Rw.js → AiCfoScreen-Bkyb6Zx1.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-DGTEW0Ts.js → BillPayApprovalRoutes-BI_Y1b8l.js} +1 -1
- package/dist/assets/{BillPayRoutes-B4DyZg9q.js → BillPayRoutes-oC-NzmtU.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-CJhDGXDa.js → BusinessVerificationPageScreen-CiVtyVMD.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-ouivBCgA.js → ChargeCardRoutes-DjxijFKo.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-Cv1RmmZ2.js → CompanyPassportScreen-DhxtS0hb.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-BGLgRykg.js → ConnectionAuthScreen-zri-JRoW.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-CCTHlQM4.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-CCJ8rzxG.js → CustomerOnboardingRoutes-B7NKLiFW.js} +1 -1
- package/dist/assets/{DashboardRoutes-DpMwQkOO.js → DashboardRoutes-D3SHWcHr.js} +1 -1
- package/dist/assets/{DefaultTenantHome-BjKn1NRZ.js → DefaultTenantHome-D8JSlgld.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-Da3AjbNa.js → DomesticWireDetailScreen-7xR18qFa.js} +1 -1
- package/dist/assets/{DrawerScreen-BtlXa6K0.js → DrawerScreen-Bfal1rIA.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-DwRVDUuS.js → EntityDetailRoutes-BfgUmjkv.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-UwZsuZMU.js → ExpenseAutomationRoutes-0hG_n7Gy.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-CUAIKz1i.js → FeaturePreviewScreen-BTGMWD-c.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-vr1PQzA9.js → HubSpotOAuthCallbackScreen-CUvlNWTg.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-pq1cqXvR.js → MagicLinkRoutes-D69UoMIO.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-CJZyHulf.js → MagicLinkSignInScreen-Bjtynlh1.js} +1 -1
- package/dist/assets/{MobileAppDrawer-DSdJwfd5.js → MobileAppDrawer-uxmqh_ak.js} +1 -1
- package/dist/assets/NotFoundScreen-Bgm7QovY.js +1 -0
- package/dist/assets/{NotificationRoutes-BpqbcrT3.js → NotificationRoutes-BWClZ6R9.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-Cr5NZApw.js → OAuthConsentScreen-DISHSUDY.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-CrHHjUmh.js → PandLWithForecastRoutes-WDlNQdop.js} +1 -1
- package/dist/assets/{PeopleRoutes-DjAv-Cbm.js → PeopleRoutes-BzQYmD9S.js} +1 -1
- package/dist/assets/{PerformanceRoutes-ap8B_-S5.js → PerformanceRoutes-DeQxYgB5.js} +1 -1
- package/dist/assets/{Preview-BlbTJX4y.js → Preview-DZV44_GA.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-gihlHabK.js → QBOConnectionScreen---6d_O2t.js} +1 -1
- package/dist/assets/{ReferralListScreen-DiGYqmEw.js → ReferralListScreen-V548TPRB.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-Dkrm7ab1.js → ReimbursementApprovalRoutes-7WHxbekg.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-B-jeaK-0.js → ReimbursementApprovalRuleDetailScreen-CEN6ZBSv.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-Df1rene3.js → ReimbursementRoutes-WCYzbqkO.js} +1 -1
- package/dist/assets/{ReportsRoutes-01ZBxNzi.js → ReportsRoutes-DKzteMEe.js} +1 -1
- package/dist/assets/{RewardsRoutes-C_RjM3wM.js → RewardsRoutes-BdJWc-Yf.js} +1 -1
- package/dist/assets/{ScreenRoutes-XUGVTlJU.js → ScreenRoutes-CG_Gnubt.js} +2 -2
- package/dist/assets/{SettingsRoutes-DgDaKTnp.js → SettingsRoutes-DtQSWV43.js} +1 -1
- package/dist/assets/{SetupPagesScreen-DFNkJSDZ.js → SetupPagesScreen-CNq2NGTh.js} +1 -1
- package/dist/assets/{SignInScreen-4QpxmPGm.js → SignInScreen-C3Yd4KAx.js} +1 -1
- package/dist/assets/{SignOutScreen-B8MdXYvN.js → SignOutScreen-tjwxOeb2.js} +1 -1
- package/dist/assets/{TaskListScreen-BDFYRBL0.js → TaskListScreen-BA5nkXWU.js} +1 -1
- package/dist/assets/{TaskRoutes-DT2WLVpc.js → TaskRoutes-C2JkPxm6.js} +1 -1
- package/dist/assets/TransactionDetailRoutes-V4nSypXh.js +1 -0
- package/dist/assets/{TransactionDetailScreen-Ci4ZELq0.js → TransactionDetailScreen-Dufv1-Zd.js} +1 -1
- package/dist/assets/{TransactionListRoutes-BvA_L1Bn.js → TransactionListRoutes-BIHPwXds.js} +1 -1
- package/dist/assets/{TreasuryRoutes-CCwpqIb0.js → TreasuryRoutes-tO1rZI1W.js} +1 -1
- package/dist/assets/{VendorsRoutes-CEucFn4v.js → VendorsRoutes-f7hlersr.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-74LRyISH.js → WiseConfirmationScreen-BGxHbRg3.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-C_yIwLbb.js → ZeniAccountRoutes-BWCKIQtd.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-C7x2WOwU.js → ZeniAccountStatementScreen-fRWwWarV.js} +1 -1
- package/dist/assets/{accountMappingHelper-dm9IDhd5.js → accountMappingHelper-BkNWBFnf.js} +1 -1
- package/dist/assets/{analytics-LRXDxB9U.js → analytics-CYMgeTT5.js} +1 -1
- package/dist/assets/{analyticsHelper-CM7-DzIH.js → analyticsHelper-kA_46WRt.js} +1 -1
- package/dist/assets/{core-DrFqYlht.js → core-B2Hxdfie.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-BIE62qI8.js → decodeURIComponentSafe-BcAs3k9x.js} +1 -1
- package/dist/assets/{dnd-DjCTgA16.js → dnd-ChJsuxMK.js} +1 -1
- package/dist/assets/{empty-B_1j7UZd.js → empty-CYXfR6Pz.js} +1 -1
- package/dist/assets/{empty-Btqpa3Dn.js → empty-DJcdURMB.js} +1 -1
- package/dist/assets/{emptyVideoElement-DUjVh48Y.js → emptyVideoElement-DLkg1CzQ.js} +1 -1
- package/dist/assets/{epic-DUdYUOqK.js → epic-C0Eo73Oo.js} +1 -1
- package/dist/assets/{getLocaleForTenant-CtOQ1QSt.js → getLocaleForTenant-BC4keiZu.js} +1 -1
- package/dist/assets/{index-g9hTOOdd.js → index-0xo6Gnn6.js} +1 -1
- package/dist/assets/{index-B7-w4njp.js → index-BGx8Cqw2.js} +1 -1
- package/dist/assets/{index-gIHwUZJz.js → index-BsI-BcOG.js} +7 -7
- package/dist/assets/{index-BUJjaTE7.js → index-COkZQ6VK.js} +2 -2
- package/dist/assets/{index-vvusuUAb.js → index-CXaTyYPI.js} +1 -1
- package/dist/assets/{index-BIdZz-Lu.js → index-CsMY6Obb.js} +1 -1
- package/dist/assets/{index-BxB1wE84.js → index-eJRNQy-q.js} +1 -1
- package/dist/assets/{index-CuGjO8q5.js → index-m_9cQfeA.js} +1 -1
- package/dist/assets/{lexical-BvSd63VE.js → lexical-WK6PZ_Fc.js} +1 -1
- package/dist/assets/{liveblocks-C6NDyiJv.js → liveblocks-C_VE9Mu9.js} +1 -1
- package/dist/assets/{lottie-CRrBZj94.js → lottie-DL0TkQBF.js} +1 -1
- package/dist/assets/{mui-BfKuxuES.js → mui-tg9Pwou2.js} +1 -1
- package/dist/assets/{pathToGoBack-CUljzXbA.js → pathToGoBack-8wBiRMg4.js} +1 -1
- package/dist/assets/{pdf-WyHfBZP8.js → pdf-DJRvlcHv.js} +3 -3
- package/dist/assets/{pdf-lib-Ni58cQtF.js → pdf-lib-BAv_DefF.js} +1 -1
- package/dist/assets/{plaid-BfLcb-Mu.js → plaid-B_jGdYrM.js} +1 -1
- package/dist/assets/{pusher-BetHGDvL.js → pusher-DYar66K5.js} +1 -1
- package/dist/assets/{react-CdUYyNlS.js → react-BmsK-Z5g.js} +1 -1
- package/dist/assets/{react-CKFyZHqR.js → react-C72jUlOf.js} +1 -1
- package/dist/assets/{react-BWdafFx3.js → react-CL3atXxv.js} +1 -1
- package/dist/assets/{react-D7NpAKPT.js → react-Ce2HDnkF.js} +1 -1
- package/dist/assets/{react-DPXh3mWt.js → react-Dz065-ys.js} +1 -1
- package/dist/assets/{react-CZxiptYj.js → react-vGzgrc8s.js} +1 -1
- package/dist/assets/{recharts-DzFRpM3n.js → recharts-Ep8XanlT.js} +1 -1
- package/dist/assets/{routePaths-DwqXZ9IC.js → routePaths-BtZYDC_i.js} +1 -1
- package/dist/assets/{sentry-DorFMwQU.js → sentry-Byikl8iY.js} +1 -1
- package/dist/assets/{url-CkJQeQOD.js → url-CsuiCVcH.js} +1 -1
- package/dist/assets/{url-yU2RR5Y5.js → url-pgCCDGVL.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-SdJdV09H.js → useAskAiCfoHostNavButtonProps-kK55rQTy.js} +1 -1
- package/dist/assets/{useDeviceId-B51M4N2b.js → useDeviceId-rn2ep5ML.js} +1 -1
- package/dist/assets/{useFetchSuggestedQuestionsWhenReady-1RkvixCJ.js → useFetchSuggestedQuestionsWhenReady-D_ChcTLo.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-C8hN7EcF.js → useInitialThreadRequest-TLWHLSZh.js} +1 -1
- package/dist/assets/{utils-BiDInqYy.js → utils-KJcQ4RjB.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-51Ock1rJ.js → withTransactionSidePanel-CxundvVG.js} +1 -1
- package/dist/assets/{zeni-epic-state-vpQnS6PI.js → zeni-epic-state-BZK5iHMQ.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/AddressRoutes-Bs0ffT2X.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-xT3UtszS.js +0 -1
- package/dist/assets/NotFoundScreen-Du1hgJnA.js +0 -1
- package/dist/assets/TransactionDetailRoutes-Buw31_AN.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./liveblocks-C_VE9Mu9.js";import{A as i}from"./AddressScreen-eTY0sZvp.js";import s from"./NotFoundScreen-Bgm7QovY.js";import"./sentry-Byikl8iY.js";import{n as d,o as r}from"./core-B2Hxdfie.js";import"./zeni-epic-state-BZK5iHMQ.js";import"./recharts-Ep8XanlT.js";import"./index-BsI-BcOG.js";import"./mui-tg9Pwou2.js";import"./analytics-CYMgeTT5.js";import"./plaid-B_jGdYrM.js";import"./dnd-ChJsuxMK.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL0TkQBF.js";import"./lexical-WK6PZ_Fc.js";import"./pdf-DJRvlcHv.js";import"./utils-KJcQ4RjB.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]="624154e3-3694-4a3c-b645-a66b8e12404c",t._sentryDebugIdIdentifier="sentry-dbid-624154e3-3694-4a3c-b645-a66b8e12404c")}catch{}})();function _(){return e.jsxs(d,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(i,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(i,{})}),e.jsx(r,{path:"*",element:e.jsx(s,{})})]})}export{_ as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as d}from"./liveblocks-
|
|
1
|
+
import{j as d}from"./liveblocks-C_VE9Mu9.js";import{a as h}from"./sentry-Byikl8iY.js";import{j as T,h as _,u as E,l as j,g as B,k as M}from"./core-B2Hxdfie.js";import{Z as $,m as D,z as L,k as K,B as F,A as G,c as C,e as S,p as J,f as b,q as z}from"./index-BsI-BcOG.js";import{JE as k,gW as O,eO as R,JF as U,c1 as q,JG as N,kg as V}from"./zeni-epic-state-BZK5iHMQ.js";import{n as H}from"./mui-tg9Pwou2.js";import W from"./NotFoundScreen-Bgm7QovY.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]="ba2385d0-87ca-46e3-bf92-efa1a60084fa",e._sentryDebugIdIdentifier="sentry-dbid-ba2385d0-87ca-46e3-bf92-efa1a60084fa")}catch{}})();const Z=H.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as h}from"./liveblocks-
|
|
1
|
+
import{j as h}from"./liveblocks-C_VE9Mu9.js";import{a as l}from"./sentry-Byikl8iY.js";import{h as de,j as me,u as pe,g as $,l as he,k as fe}from"./core-B2Hxdfie.js";import{U as Se,cJ as ge,z as Ce,Z as ke,cK as be,cL as we,cM as V,cN as Ie,cO as K,q as Q,A as q,c as T,cP as z,cQ as Ee,X as Pe,e as Te,a3 as ye,cR as xe,Y as _e,r as ve,aY as Oe,cS as Ae}from"./index-BsI-BcOG.js";import{fE as Ue,f3 as J,eO as Qe,hA as De,Qc as je,eN as Fe,hK as Be,hG as Le,fu as H,fo as Re,fh as Me,fl as W,fp as Ge,fq as Ne,fr as $e,fs as Ve,ft as qe}from"./zeni-epic-state-BZK5iHMQ.js";import{D as ze,n as b,S as He,P as We}from"./mui-tg9Pwou2.js";import{p as Ye}from"./pathToGoBack-8wBiRMg4.js";import"./recharts-Ep8XanlT.js";import"./analytics-CYMgeTT5.js";import"./plaid-B_jGdYrM.js";import"./dnd-ChJsuxMK.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL0TkQBF.js";import"./lexical-WK6PZ_Fc.js";import"./pdf-DJRvlcHv.js";import"./utils-KJcQ4RjB.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new s.Error().stack;r&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[r]="f6c2c423-7633-4069-b296-882f119e60f5",s._sentryDebugIdIdentifier="sentry-dbid-f6c2c423-7633-4069-b296-882f119e60f5")}catch{}})();const X="chat-response-generated",Ke=fe(function(s,r){const t=J(s),m=r.isSubmitting;return{showSampleQuestions:r.sessionFromUrl==="explore"&&t.uiState.currentChatSessionId==null,aiCfoView:t,isSubmitting:m,isNewChatSession:r.sessionFromUrl==="new_chat"||r.sessionFromUrl==="explore",isFullView:!0,tableDownloadEndPoint:`${_e}/tableDownload`,emailLinkQuestion:r.emailLinkQuestion,autoSubmitEmailLinkQuestion:r.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:r.onEmailLinkQuestionProcessed,isFileUploadEnabled:r.isFileUploadEnabled,isUploadPromoVisible:r.isUploadPromoVisible,onUploadPromoClose:r.onUploadPromoClose}},function(s,r){const{location:t,currentTenant:m,userId:c,navigate:S,currentChatSessionId:f,allSessionsWithOrderedQuestionAnswers:C,setIsAiCfoOpen:u}=r;return{onEventReceived:(e,o)=>{if(e===X&&typeof o.text=="string"&&typeof o.metadata=="object"){const n=o,p=Ne(n.type),d=n.metadata.chat_session_id??null,{currentChatSession:a,currentQuestionAnswer:w,currentQuestionAnswerSummary:y}=K(C,d);p!=="answer"?T.trackAICFOChatResponseGenerated(p,w?.question.questionText??"",n.text,d,Ae(y,a),n.metadata.message_id??null):T.trackAICFOChatAnswerGenerated(n.text,w?.question.questionText??"",(n.follow_up_questions?.length??0)>0,!!n.assumptions,!!n.insights,n.visualization!=null,$e(n.visualization?.type??"")??null,d,n.summarized_title,n.metadata.message_id??null),s(Ve({chatSessionId:n.metadata.chat_session_id,responseType:p,fetchState:{fetchState:"Completed",error:void 0}})),s(qe({chatSessionId:n.metadata.chat_session_id,answerPayload:n,userId:c}))}},onSubmit:(e,o,n,p)=>{e&&Oe(s,e,o,f,C,c,p,n)},updateCurrentInput:e=>{s(W(e))},onStopSubmit:()=>{},onUpdateScrollYOffset:e=>{s(Ge(e))},onSelectSampleQuestion:()=>{},onBackClick:()=>{S(-1)},onCloseClick:()=>{const e=Q(t.state?.pathnameStackToGoBack),o=e.poppedPathname??Ye(1);S(o,{state:{...t.state,pathnameStackToGoBack:e.newStack}}),s(W(""))},togglePageView:()=>{const e=Q(t.state?.pathnameStackToGoBack),o=e.poppedPathname??`/${m.tenantEmailDomain}/dashboard`;S(o,{state:{...t.state,pathnameStackToGoBack:e.newStack,message:"open_ai_cfo_drawer"}}),u(!0)},onCopy:()=>{},onThumbsUp:()=>{},onThumbsDown:()=>{},onTogglePageView:()=>{S(-1)},onNewChatClick:()=>{f!=null&&s(Me());const e=ve(t.state?.pathnameStackToGoBack,t.pathname);S(`/${m.tenantEmailDomain}/ai-cfo/new_chat`,{state:{pathnameStackToGoBack:e.slice(0,-1),referrer:"Sidebar"}})},onToggleCotCollapsed:(e,o)=>{s(Re({questionAnswerId:e,isCollapsed:o}))},onMenuClick:r.onMenuClick}})(ye(xe)),gt=({isFileUploadEnabled:s})=>{const{setIsAiCfoOpen:r}=Se(),t=de(),m=me(),c=pe(),[S,f]=l.useState(!1);l.useEffect(()=>{t(Ue())},[t]);const{customPageTitle:C}=ge(),u=$(i=>J(i)),e=Ce.getSignedInUser(),{session_id:o}=he(),n=ke(),p=Pe(n),d=$(i=>Qe(i)),a=u.uiState.currentChatSessionId,w=d.tenantEmailDomain,{handleUploadPromoClose:y,isUploadPromoVisible:Z}=be({isFileUploadEnabled:s,tenantEmailDomain:w}),x=we({currentTenant:d,currentChatSessionId:a,aiCfoView:u}),I=c.state,E=I?.aiCfoInitialQuestion,D=!!I?.aiCfoShouldSubmit;l.useEffect(()=>{const i=c.state;if(i?.[V]!==!0)return;f(!0);const g={...i};delete g[V],m(c,{replace:!0,state:g})},[c.pathname,c.search,c.state,m]);const[ee,_]=l.useState(null),[te,v]=l.useState(!1),j=l.useRef(!1);l.useEffect(()=>{j.current||E==null||E===""||(_(E),v(D),j.current=!0)},[E,D]);const ae=l.useCallback(()=>{_(null),v(!1)},[]),F=l.useMemo(()=>new URLSearchParams(c.search),[c.search]),B=F.get("ref")??I?.aiCfoRef,O=F.get("emailRefId")??I?.aiCfoEmailRefId,L=l.useRef(!1);l.useEffect(()=>{L.current||B!=="month-end-email"||O==null||a!=null||e==null||(t(De("controller",e.userId,O,"MONTH_END_EMAIL")),L.current=!0)},[B,O,a,t,e]);const P=u.uiState.lastContextMessage;l.useEffect(()=>{P!=null&&P!==""&&a!=null&&(_(P),v(!0),t(je()))},[P,a,t]);const se=d.masterTOSInfo,k=se?.isMasterTOSAccepted??!1,{visitedSessions:R}=Ie(a),A=u.fetchState,U=u.uiState.chatSessionsNextPageToken.hasMore||!u.uiState.chatSessionsFirstPageFetched,M=a!=null?u.fetchChatSessionHistoryByChatSessionId?.[a]?.fetchState??"Not-Started":"Not-Started",G=a==null||(u.uiState.chatHistoryNextPageToken[a]?.hasMore??!0),N=u.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:oe}=K(N,a),ne=oe.length===0;l.useEffect(()=>{k||p||m("../dashboard",{state:{...c.state,message:"open_ai_cfo_drawer"}})},[k,p,m,c.state]);const ie=l.useCallback(()=>{const i=Q(c.state?.pathnameStackToGoBack),g=d.tenantEmailDomain;m(i.poppedPathname??(g!=null?`/${g}/dashboard`:".."),{state:{...c.state,pathnameStackToGoBack:i.newStack}})},[d.tenantEmailDomain,c.state,m]);l.useEffect(()=>{a!=null&&o!==a&&m(`../ai-cfo/${a}`,{state:{...c.state}})},[a,o]),l.useEffect(()=>{o!=null&&a==null&&o!=="new_chat"&&o!=="explore"&&t(Fe({sessionId:o,agentId:"controller"}))},[]);const le=l.useMemo(()=>({events:R.map(i=>`private-encrypted-chat-${i}.${X}`),eventCallback:(i,g,ue)=>ue.onEventReceived(i,g)}),[R]);l.useEffect(()=>{A!=="In-Progress"&&U&&t(Be())},[A,U,t]),l.useEffect(()=>{a!=null&&M!=="In-Progress"&&G&&e!=null&&A==="Completed"&&!U&&t(Le(a,e.userId))},[M,G,a,e,t]);const re=i=>i.trackAICFOOnboardingScreenStateChanged("open","first_visit");if(e==null||o==null)throw Error("Can't access AI Controller page without signing in...");const ce=a!=null&&u.responseStateByChatSessionId?.[a]?.answer?.fetchState==="In-Progress";return!k&&p?h.jsxs(Xe,{children:[h.jsx(q,{analytics:T,onLoad:re}),x.drawerElement,h.jsx(Ze,{children:h.jsx(Y,{children:h.jsx(z,{isTOSAccepted:!1,acceptMasterTOSState:u.masterTOSAcceptanceState,customPageTitle:C,onCloseClick:ie,onCompleteClick:()=>{d.userRoleId!=null&&t(H(d.userRoleId))}})})})]}):h.jsxs(Je,{children:[h.jsx(q,{analytics:T,onLoad:i=>i.trackPageLoaded(Te.Event.aiCFOPage)}),p&&x.drawerElement,h.jsx(Ke,{...le,currentChatSessionId:a,allSessionsWithOrderedQuestionAnswers:N,openOnboardingPage:()=>f(!0),userId:e.userId,setIsAiCfoOpen:r,navigate:m,sessionFromUrl:o,location:c,isSubmitting:ce,isEmptyChatWithSession:ne,customPageTitle:C,currentTenant:d,emailLinkQuestion:ee??void 0,autoSubmitEmailLinkQuestion:te,onEmailLinkQuestionProcessed:ae,onMenuClick:p?x.open:void 0,isFileUploadEnabled:s,isUploadPromoVisible:Z,onUploadPromoClose:y}),h.jsx(ze,{anchor:"right",open:S,transitionDuration:250,PaperProps:{component:et,style:{width:p?"100%":`${Ee}vw`}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>f(!1),children:h.jsx(Y,{onClick:i=>i.stopPropagation(),children:h.jsx(z,{isTOSAccepted:k,acceptMasterTOSState:u.masterTOSAcceptanceState,customPageTitle:C,onCloseClick:()=>f(!1),onCompleteClick:()=>{k||d.userRoleId==null||t(H(d.userRoleId)),f(!1)}})})})]})},Y=b(He)`
|
|
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-C_VE9Mu9.js";import{a as y}from"./sentry-Byikl8iY.js";import{j as B,u as U,h as j,g as v,N as O,k as T,l as $,n as F,o as h}from"./core-B2Hxdfie.js";import{eO as N,MX as R,MD as b,xp as x,xj as L,xn as I,xc as M,MF as q,xf as z,xr as W,xq as E}from"./zeni-epic-state-BZK5iHMQ.js";import{m as P,z as k,B as V,a3 as X,by as G,ac as _,bz as H}from"./index-BsI-BcOG.js";import"./mui-tg9Pwou2.js";import{i as J}from"./ReimbursementApprovalRuleDetailScreen-CEN6ZBSv.js";import K from"./NotFoundScreen-Bgm7QovY.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]="496507a6-e6f9-4345-aa2b-74fcd44e3c5b",e._sentryDebugIdIdentifier="sentry-dbid-496507a6-e6f9-4345-aa2b-74fcd44e3c5b")}catch{}})();const w="bill-approval-rule-update",Q=T(function(e){return{approvalView:R(e),billPaySetupApproverViewUpdateData:b(e).billPaySetupApproverViewUpdateData}},function(e,o){const{navigate:t,location:n}=o;return{onApprovalRulesEventReceived:a=>{a.endsWith(w)&&e(q(!1))},onBackClick:()=>{_(n)?t("../../"):t("../../../bills/setup")},onDeleteRuleClick:a=>{e(M(a))},onEditRuleClick:a=>{a!=null?(e(I(a)),t(`./${a}/edit`)):(e(I()),t("./new"))}}})(X(G)),Y=()=>{const e=B(),o=U(),t=j(),[n,a]=y.useState(!1),[u,s]=y.useState(!1),d=P(),p=v(i=>i.billPaySetupApproverViewState.fetchState),c=v(i=>N(i)),r=v(i=>R(i)),g=v(i=>b(i).billPaySetupApproverViewUpdateData);if(y.useEffect(()=>{g?.updateStatus.fetchState==="Completed"&&t(x())},[g]),y.useEffect(()=>{n||p!=="Not-Started"||(a(!0),t(L(!0)))},[n,p,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(I())),e("./new"))},[u,r,t]);const f={events:c.companyId!=null?[`private-encrypted-${c.companyId}.${w}`]:[],eventCallback:(i,A,m)=>{i.endsWith(w)&&m.onApprovalRulesEventReceived(i)}};return c.companyBillPayInfo?.info?.isBillPayTOSAccepted===!1?l.jsx(O,{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(Q,{currentTenant:c,location:o,navigate:e,...f})},Z=T(function(e,o){const t=b(e),n=t.billPaySetupApproverViewUpdateData?.type??"approval_create",a=n==="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:n}},function(e,o){const{navigate:t,approvalUpdateDataView:n,approverViewData:a,approvalRuleId:u}=o,s=n.billPaySetupApproverViewUpdateData?.type,d=_(o.location);return{onApprovalRuleDataUpdated:p=>{const c=r=>{const g=[];return r.forEach(f=>{const i=f.actors.selectedUsers.map(S=>({type:"user",userId:S.userId,isImplicitActor:!1})),A=f.actors.selectedNonUsers.map(S=>{const D=!!J(S.value);return{type:D?"attribute":"role",subType:S.value,userId:void 0,idType:void 0,isImplicitActor:!D}}),m=i.concat(A);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:p.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:p.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(p.steps),isApplicableOnPendingApprovalEntity:p.applyToExistingBills.includes("applyToExistingBills")};e(E(r))}else{const r={approvalRuleId:u,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:p.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:p.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(p.steps),isApplicableOnPendingApprovalEntity:p.applyToExistingBills.includes("applyToExistingBills")};e(E(r))}},onResetClick:()=>{e(x()),s==="approval_update"||d?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(x()),s==="approval_update"||d?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(W())},onSaveRuleSuccess:()=>{t("../")}}})(H);function C(){const e=B(),o=j(),t=U(),{approvalRuleId:n}=$(),a=k.getSignedInUser(),u=P(),s=v(r=>b(r)),d=v(r=>R(r)),[p,c]=y.useState(!1);if(y.useEffect(()=>{p||(c(!0),o(z(!0)))}),y.useEffect(()=>{d.fetchState==="Not-Started"&&e(n!=null?"../../":"../")},[d,n]),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:n,approverViewData:d,location:t})}function se(){return l.jsxs(F,{children:[l.jsx(h,{path:"/",element:l.jsx(Y,{})}),l.jsx(h,{path:"/new",element:l.jsx(C,{})}),l.jsx(h,{path:"/:approvalRuleId/edit",element:l.jsx(C,{})}),l.jsx(h,{path:"*",element:l.jsx(K,{})})]})}export{se as B};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-C6NDyiJv.js";import{j as Y,h as se,u as K,l as ae,g as v,N as te,k as X,i as na,n as ia,o as y}from"./core-DrFqYlht.js";import{eO as Z,Md as Le,bv as It,H6 as oa,bo as wt,bE as pe,Me as xt,wJ as Bt,xT as Ve,xg as la,bn as De,Mf as sa,Mg as ra,c1 as ca,Mh as da,jA as At,Mi as Ct,Mj as Et,ys as _e,wY as Ae,Mk as ua,wx as tt,Ml as pa,BE as ma,wB as ba,wH as Dt,Mm as ke,Mn as Ge,xU as Oe,Mo as ha,Mp as ga,xX as Ne,Mq as Sa,y8 as ya,Mr as jt,xE as at,xJ as fa,Ms as ka,Mt as ue,Mu as Tt,Mv as Pt,Mw as Ft,fI as va,x1 as $e,cw as Rt,Mx as Ia,gM as wa,My as xa,Mz as Ba,eU as Mt,eS as Vt,MA as ze,MB as Aa,MC as Ca,JY as Ze,MD as Ea,JZ as oe,J_ as He,ME as Da,MF as ja,MG as Ta,xL as nt,xI as Pa,MH as Fa,MI as Ra,MJ as Ma,xu as Va,MK as $a,ML as Ua,MM as La,ck as $t,cM as Ut,jL as _a,bK as Ga,bq as Lt,bL as _t,vP as Oa,MN as Na,Br as za,Bx as Za,sm as Ha,xV as Wa,yz as qa,jY as fe,MO as Ja,MP as Gt,kq as Ya,jS as Ot,kb as Nt,ka as it,bD as be,bJ as Ka,MQ as Xa,MR as ve,iv as Qa,MS as ot,MT as en,iz as tn,iU as an,yN as nn,MU as on,kj as ln,yD as sn,MV as lt,yH as rn,yM as cn,yJ as dn,yB as un,MW as zt,wS as pn,MX as mn,MY as bn,fA as hn,fz as gn,fy as Sn,j$ as yn,kh as st,ks as fn,pO as kn,k8 as vn,yF as In,iF as wn,kx as xn,MZ as Bn,ix as An,pF as Cn,M_ as En,xA as Dn,bF as jn,bs as Tn,IS as Pn,cO as Fn,cN as Rn,cv as Mn,cB as Vn}from"./zeni-epic-state-vpQnS6PI.js";import{m as me,z as M,k as Ie,y as le,S,aK as Ce,B as re,o as C,A as je,c as D,b5 as $n,q as z,Y as We,r as E,Z as we,b6 as rt,b7 as ct,b8 as Un,ah as Ln,I as _n,aE as Gn,G as Zt,D as qe,J as Je,b9 as On,aq as Ht,ba as Nn,V as zn,e as Wt,a3 as Zn,bb as Hn,bc as Wn,bd as qn,be as Jn,bf as Yn,bg as Kn,bh as Xn,bi as Qn,bj as ei,w as ti,bk as ai,b1 as ni,bl as ii,bm as oi,a6 as li}from"./index-gIHwUZJz.js";import{n as U,S as si}from"./mui-BfKuxuES.js";import{A as dt}from"./AddressScreen-DLY0B5X2.js";import{g as ie,a as Te,i as qt,V as Ye,b as Ke,c as ri,v as ci,d as di,A as he,D as ge}from"./DomesticWireDetailScreen-Da3AjbNa.js";import{a as f}from"./sentry-DorFMwQU.js";import{u as Xe}from"./useAskAiCfoHostNavButtonProps-SdJdV09H.js";import{c as Qe}from"./useFetchSuggestedQuestionsWhenReady-1RkvixCJ.js";import{u as Jt}from"./useInitialThreadRequest-C8hN7EcF.js";import Ee from"./NotFoundScreen-Du1hgJnA.js";import{D as ui}from"./DrawerScreen-BtlXa6K0.js";import{M as Yt}from"./MobileAppDrawer-DSdJwfd5.js";import{F as Kt}from"./FeaturePreviewScreen-CUAIKz1i.js";import{S as Pe}from"./SetupPagesScreen-DFNkJSDZ.js";import{B as pi}from"./BillPayApprovalRoutes-DGTEW0Ts.js";import{FallBackRoute as mi}from"./ScreenRoutes-XUGVTlJU.js";import"./recharts-DzFRpM3n.js";import"./analytics-LRXDxB9U.js";import"./plaid-BfLcb-Mu.js";import"./dnd-DjCTgA16.js";import"./stripe-DMRn4zHo.js";import"./lottie-CRrBZj94.js";import"./lexical-BvSd63VE.js";import"./pdf-WyHfBZP8.js";import"./utils-BiDInqYy.js";import"./analyticsHelper-CM7-DzIH.js";import"./routePaths-DwqXZ9IC.js";import"./BusinessVerificationPageScreen-CJhDGXDa.js";import"./ReimbursementApprovalRuleDetailScreen-B-jeaK-0.js";import"./getLocaleForTenant-CtOQ1QSt.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]="6890dd99-e4e0-4fc8-917a-434801b5d06c",e._sentryDebugIdIdentifier="sentry-dbid-6890dd99-e4e0-4fc8-917a-434801b5d06c")}catch{}})();const bi=X(function(e,t){const l=Le(e,t.billId),i=M.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:At(e),createdBy:s,authParams:r,transactionAttachmentEndpoint:`${We}/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(Ae(l,"retry")):e(Ae(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(Ae(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(Ct({billId:l}))}}})($n);function hi(){const e=Y(),t=se(),l=K(),{billId:i}=ae(),c=me(),r=M.getSignedInUser(),u=Ie(),o=v(O=>Z(O)),s=v(O=>Le(O,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}=Xe({mobileExploreReferrer:"Bill Details"});Qe({isDataReady:s.fetchState==="Completed"});const h=o?.userRole!=null&&It(o?.userRole),g=o?.company==null||o.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!h,[b,k]=f.useState(!1),[j,x]=f.useState(!1),[B,_]=f.useState(!1),{useFeatureGate:T,useDynamicConfig:L}=le(),{isFeatureEnabled:V}=T(S.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:I}=T(S.isBillPayCommentingEnabled),{isFeatureEnabled:H}=T(S.isBillPayDetectInsufficientFundsEnabled),{configValue:G}=L(Ce.zeniAssistConfig),A=oa(o),q=wt(o.userRole),W=g&&pe(u?.loggedInUserRoleMap),$=G.user_ids!=null&&r?.userId!=null&&G.user_ids.includes(r?.userId),{isFeatureEnabled:J}=T(S.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:Q}=T(S.billPaySetupShowInternationalPaymentByWise);if(f.useEffect(()=>{V&&s.transactionDetails?.isDeleted===!0||o.isZeni===!0&&r?.userEmailDomain==="zeni.ai"&&A===!1?_(!1):_(s.billActivities[0]?.isRealTimeApprovalEnabled&&(q||W||s.allApprovers.find(O=>O.user.userId===r?.userId)!=null||s.transactionDetails?.lastUpdatedByUserId===r?.userId))},[s.billActivities[0]?.isRealTimeApprovalEnabled,s.allApprovers,s.transactionDetails?.lastUpdatedByUserId,q,W,o.isZeni,A,r]),f.useEffect(()=>{i!=null&&t(xt(i))},[i]),f.useEffect(()=>{b||s.fetchState=="Completed"||s.fetchState=="In-Progress"||(k(!0),t(Bt(i??"",V,$,!1)))},[b,s,i,t]),f.useEffect(()=>{j||s.fetchState!="Completed"||s.transactionDetails?.billPayInfo.stage.code=="paid"||(x(!0),t(Ve(!1,V,$,Q,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 ${C.sp1} ${c.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[a.jsx(je,{analytics:D,onLoad:O=>(ee=>{i!=null&&ee.trackBillPayBillDetails(i,s.isRecurring)})(O)}),a.jsx(bi,{initialOpenThreadRequest:d??void 0,isShowDeletedBillsEnabled:V,location:l,navigate:e,isBillPayCommentingEnabled:I,isRealTimeApprovalEnabled:B,currentTenant:o,billId:i??"",isInternationalPaymentShaVsOurEnabled:J,hasZeniAssistAccess:$,isDetectInsufficientFundsEnabled:H,isAiCfoAccessEnabled:p,onAskAiCfoClick:m})]})}const Se=qe.getLocalizedStrings().spendManagement.billPay.billDetails,gi={containerWidth:new Zt(100,58)},ut=X(function(e,t){const l=M.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:C.sp10,paddingRight:C.sp3,paddingBottom:"15px",paddingLeft:C.sp5,...t.showAutofill?{}:{backgroundColor:t.backgroundColor,paddingBottom:"128px"}}}},function(e,t){const l=M.getSignedInUser();return{onInvoiceUpload:i=>{i!=null&&(t.file!=null||t.billId!=null||t.isInitialEdit?(t.setPayload(i),t.setShowConfirmationPopup(!0)):e(Ne(i,t.isVendorRecommendationEnabled,t.billId)))},updateInvoiceUploadFetchState:i=>{e(ya({fetchState:{fetchState:i,error:void 0},billId:t.billId}))},onSkipAutofill:i=>{D?.trackBillPaySkipAutofill(),e(Oe(i))},onDeleteClick:()=>{e(Sa({billId:t.billId})),D?.trackInvoiceActionClick(t.billStage??"","delete",l?.userEmail??"",null)}}})(Gn);function w({appContent:e}){const t=se(),l=Y(),{billId:i}=ae(),c=K(),r=c.pathname,u=r.includes("bill/new")||r.includes("/edit"),o=we(),s=me(),n=M.getSignedInUser(),{useFeatureGate:d,useDynamicConfig:p}=le(),{isFeatureEnabled:m}=d(S.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:h}=d(S.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:g}=d(S.isDepositAccountsFeatureEnabled),{isFeatureEnabled:b}=d(S.billPaySetupShowInternationalPaymentByWise),{configValue:k}=p(Ce.zeniAssistConfig),j=k.user_ids!=null&&n?.userId!=null&&k.user_ids.includes(n?.userId),x=v(F=>Z(F)),[B,_]=f.useState(!1),[T,L]=f.useState(!1),[V,I]=f.useState(!1),[H,G]=f.useState(),A=v(F=>Ge(F,m,g,i));let q=A.fetchState,W=A.file,$=A.showAutofill;const J=v(F=>Le(F,i??""));u===!1&&(q=J.fetchState,W=J.transactionDetails?.attachments?.[0],$=!1);const Q=A.billPayInfo!=null&&A.billPayInfo.stage.code==="pending_approval"?A.billPayInfo.billStatus.code:A.billStage;f.useEffect(()=>{i==null&&t(Oe(!0))},[i,t]),f.useEffect(()=>{q==="Not-Started"&&(u&&T?L(!1):!u&&B&&_(!1))},[i]),f.useEffect(()=>{B||i==null||u||(_(!0),t(Bt(i,h,j,!1)),T||(L(!0),t(Ve(!1,h,j,b,i)))),u&&!T&&(L(!0),t(Ve(!1,h,j,b,i)))},[B,T,u,i,t]);const O={onOkClick:()=>{if(I(!1),!H)return;const F=W!=null?"replace":"upload";D?.trackInvoiceActionClick(Q??"",F,n?.userEmail??"","yes"),t(ga({replaceBillData:!0,billId:i})),t(Ne(H,m,i))},onCancelClick:()=>{if(I(!1),!H)return;const F=W!=null?"replace":"upload";D?.trackInvoiceActionClick(Q??"",F,n?.userEmail??"","no"),t(ha({file:H,billId:i}))}},ee=f.useCallback(()=>{const F=z(c.state?.pathnameStackToGoBack),ce=F.poppedPathname??ie(x.tenantEmailDomain);t(ke({billId:i})),l(ce,{state:{pathnameStackToGoBack:F.newStack}})},[c.state,x.tenantEmailDomain,i,t,l]);if(n==null)throw Error("Can't access address page without signing in...");if(q==="Error"||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:A.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:void 0,setShowConfirmationPopup:I,setPayload:G,showActionButtons:!1,isInitialEdit:!!A.isInitialEdit,billStage:Q}),a.jsx(Me,{windowSize:o,children:a.jsx(ct,{isNewBill:!0})})]})}):a.jsxs(Fe,{windowSize:o,children:[o==="small"||$?null:a.jsx(pt,{children:a.jsx(Xt,{onClick:ee,"data-testid":"nav-bar-back-click"})}),o!=="small"?a.jsx(Re,{}):null,a.jsx(Un,{}),a.jsx(Me,{windowSize:o,children:a.jsx(ct,{isNewBill:i==null})})]});{const F=A.billPayInfo!=null&&A.billPayInfo.stage.code==="pending_approval"?A.billPayInfo.billStatus.code:A.billStage;return a.jsx(rt,{fallback:ee,children:a.jsxs(Fe,{windowSize:o,children:[$&&o!=="small"?a.jsx(mt,{}):null,V?a.jsx(Ln,{titleComponent:a.jsx(wi,{children:Se.overwriteTitle}),descriptionComponent:a.jsx(xi,{children:Se.overwriteDescription}),primaryButtonText:Se.buttons.yes,secondaryButtonText:Se.buttons.no,action:O,isEditPopup:!0}):null,o==="small"||$?null:a.jsx(pt,{children:a.jsx(Si,{})}),o!=="small"?a.jsx(Re,{}):null,a.jsx(ut,{backgroundColor:s.colors.grey4,billId:i,file:W,showAutofill:$,uploadStatus:A.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:yi(u,J,A),setShowConfirmationPopup:I,setPayload:G,showActionButtons:fi(u,A),isInitialEdit:!!A.isInitialEdit,billStage:F}),a.jsx(Me,{windowSize:o,children:e})]})})}}function Si(){const{triggerBack:e}=On();return a.jsx(Xt,{onClick:e,"data-testid":"nav-bar-back-click"})}function yi(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:`${Se.recurringBill.recurringCycle}
|
|
1
|
+
import{j as a}from"./liveblocks-C_VE9Mu9.js";import{j as Y,h as se,u as K,l as ae,g as v,N as te,k as X,i as na,n as ia,o as y}from"./core-B2Hxdfie.js";import{eO as Z,Md as Le,bv as It,H6 as oa,bo as wt,bE as pe,Me as xt,wJ as Bt,xT as Ve,xg as la,bn as De,Mf as sa,Mg as ra,c1 as ca,Mh as da,jA as At,Mi as Ct,Mj as Et,ys as _e,wY as Ae,Mk as ua,wx as tt,Ml as pa,BE as ma,wB as ba,wH as Dt,Mm as ke,Mn as Ge,xU as Oe,Mo as ha,Mp as ga,xX as Ne,Mq as Sa,y8 as ya,Mr as jt,xE as at,xJ as fa,Ms as ka,Mt as ue,Mu as Tt,Mv as Pt,Mw as Ft,fI as va,x1 as $e,cw as Rt,Mx as Ia,gM as wa,My as xa,Mz as Ba,eU as Mt,eS as Vt,MA as ze,MB as Aa,MC as Ca,JY as Ze,MD as Ea,JZ as oe,J_ as He,ME as Da,MF as ja,MG as Ta,xL as nt,xI as Pa,MH as Fa,MI as Ra,MJ as Ma,xu as Va,MK as $a,ML as Ua,MM as La,ck as $t,cM as Ut,jL as _a,bK as Ga,bq as Lt,bL as _t,vP as Oa,MN as Na,Br as za,Bx as Za,sm as Ha,xV as Wa,yz as qa,jY as fe,MO as Ja,MP as Gt,kq as Ya,jS as Ot,kb as Nt,ka as it,bD as be,bJ as Ka,MQ as Xa,MR as ve,iv as Qa,MS as ot,MT as en,iz as tn,iU as an,yN as nn,MU as on,kj as ln,yD as sn,MV as lt,yH as rn,yM as cn,yJ as dn,yB as un,MW as zt,wS as pn,MX as mn,MY as bn,fA as hn,fz as gn,fy as Sn,j$ as yn,kh as st,ks as fn,pO as kn,k8 as vn,yF as In,iF as wn,kx as xn,MZ as Bn,ix as An,pF as Cn,M_ as En,xA as Dn,bF as jn,bs as Tn,IS as Pn,cO as Fn,cN as Rn,cv as Mn,cB as Vn}from"./zeni-epic-state-BZK5iHMQ.js";import{m as me,z as M,k as Ie,y as le,S,aK as Ce,B as re,o as C,A as je,c as D,b5 as $n,q as z,Y as We,r as E,Z as we,b6 as rt,b7 as ct,b8 as Un,ah as Ln,I as _n,aE as Gn,G as Zt,D as qe,J as Je,b9 as On,aq as Ht,ba as Nn,V as zn,e as Wt,a3 as Zn,bb as Hn,bc as Wn,bd as qn,be as Jn,bf as Yn,bg as Kn,bh as Xn,bi as Qn,bj as ei,w as ti,bk as ai,b1 as ni,bl as ii,bm as oi,a6 as li}from"./index-BsI-BcOG.js";import{n as U,S as si}from"./mui-tg9Pwou2.js";import{A as dt}from"./AddressScreen-eTY0sZvp.js";import{g as ie,a as Te,i as qt,V as Ye,b as Ke,c as ri,v as ci,d as di,A as he,D as ge}from"./DomesticWireDetailScreen-7xR18qFa.js";import{a as f}from"./sentry-Byikl8iY.js";import{u as Xe}from"./useAskAiCfoHostNavButtonProps-kK55rQTy.js";import{c as Qe}from"./useFetchSuggestedQuestionsWhenReady-D_ChcTLo.js";import{u as Jt}from"./useInitialThreadRequest-TLWHLSZh.js";import Ee from"./NotFoundScreen-Bgm7QovY.js";import{D as ui}from"./DrawerScreen-Bfal1rIA.js";import{M as Yt}from"./MobileAppDrawer-uxmqh_ak.js";import{F as Kt}from"./FeaturePreviewScreen-BTGMWD-c.js";import{S as Pe}from"./SetupPagesScreen-CNq2NGTh.js";import{B as pi}from"./BillPayApprovalRoutes-BI_Y1b8l.js";import{FallBackRoute as mi}from"./ScreenRoutes-CG_Gnubt.js";import"./recharts-Ep8XanlT.js";import"./analytics-CYMgeTT5.js";import"./plaid-B_jGdYrM.js";import"./dnd-ChJsuxMK.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL0TkQBF.js";import"./lexical-WK6PZ_Fc.js";import"./pdf-DJRvlcHv.js";import"./utils-KJcQ4RjB.js";import"./analyticsHelper-kA_46WRt.js";import"./routePaths-BtZYDC_i.js";import"./BusinessVerificationPageScreen-CiVtyVMD.js";import"./ReimbursementApprovalRuleDetailScreen-CEN6ZBSv.js";import"./getLocaleForTenant-BC4keiZu.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]="6890dd99-e4e0-4fc8-917a-434801b5d06c",e._sentryDebugIdIdentifier="sentry-dbid-6890dd99-e4e0-4fc8-917a-434801b5d06c")}catch{}})();const bi=X(function(e,t){const l=Le(e,t.billId),i=M.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:At(e),createdBy:s,authParams:r,transactionAttachmentEndpoint:`${We}/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(Ae(l,"retry")):e(Ae(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(Ae(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(Ct({billId:l}))}}})($n);function hi(){const e=Y(),t=se(),l=K(),{billId:i}=ae(),c=me(),r=M.getSignedInUser(),u=Ie(),o=v(O=>Z(O)),s=v(O=>Le(O,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}=Xe({mobileExploreReferrer:"Bill Details"});Qe({isDataReady:s.fetchState==="Completed"});const h=o?.userRole!=null&&It(o?.userRole),g=o?.company==null||o.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!h,[b,k]=f.useState(!1),[j,x]=f.useState(!1),[B,_]=f.useState(!1),{useFeatureGate:T,useDynamicConfig:L}=le(),{isFeatureEnabled:V}=T(S.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:I}=T(S.isBillPayCommentingEnabled),{isFeatureEnabled:H}=T(S.isBillPayDetectInsufficientFundsEnabled),{configValue:G}=L(Ce.zeniAssistConfig),A=oa(o),q=wt(o.userRole),W=g&&pe(u?.loggedInUserRoleMap),$=G.user_ids!=null&&r?.userId!=null&&G.user_ids.includes(r?.userId),{isFeatureEnabled:J}=T(S.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:Q}=T(S.billPaySetupShowInternationalPaymentByWise);if(f.useEffect(()=>{V&&s.transactionDetails?.isDeleted===!0||o.isZeni===!0&&r?.userEmailDomain==="zeni.ai"&&A===!1?_(!1):_(s.billActivities[0]?.isRealTimeApprovalEnabled&&(q||W||s.allApprovers.find(O=>O.user.userId===r?.userId)!=null||s.transactionDetails?.lastUpdatedByUserId===r?.userId))},[s.billActivities[0]?.isRealTimeApprovalEnabled,s.allApprovers,s.transactionDetails?.lastUpdatedByUserId,q,W,o.isZeni,A,r]),f.useEffect(()=>{i!=null&&t(xt(i))},[i]),f.useEffect(()=>{b||s.fetchState=="Completed"||s.fetchState=="In-Progress"||(k(!0),t(Bt(i??"",V,$,!1)))},[b,s,i,t]),f.useEffect(()=>{j||s.fetchState!="Completed"||s.transactionDetails?.billPayInfo.stage.code=="paid"||(x(!0),t(Ve(!1,V,$,Q,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 ${C.sp1} ${c.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[a.jsx(je,{analytics:D,onLoad:O=>(ee=>{i!=null&&ee.trackBillPayBillDetails(i,s.isRecurring)})(O)}),a.jsx(bi,{initialOpenThreadRequest:d??void 0,isShowDeletedBillsEnabled:V,location:l,navigate:e,isBillPayCommentingEnabled:I,isRealTimeApprovalEnabled:B,currentTenant:o,billId:i??"",isInternationalPaymentShaVsOurEnabled:J,hasZeniAssistAccess:$,isDetectInsufficientFundsEnabled:H,isAiCfoAccessEnabled:p,onAskAiCfoClick:m})]})}const Se=qe.getLocalizedStrings().spendManagement.billPay.billDetails,gi={containerWidth:new Zt(100,58)},ut=X(function(e,t){const l=M.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:C.sp10,paddingRight:C.sp3,paddingBottom:"15px",paddingLeft:C.sp5,...t.showAutofill?{}:{backgroundColor:t.backgroundColor,paddingBottom:"128px"}}}},function(e,t){const l=M.getSignedInUser();return{onInvoiceUpload:i=>{i!=null&&(t.file!=null||t.billId!=null||t.isInitialEdit?(t.setPayload(i),t.setShowConfirmationPopup(!0)):e(Ne(i,t.isVendorRecommendationEnabled,t.billId)))},updateInvoiceUploadFetchState:i=>{e(ya({fetchState:{fetchState:i,error:void 0},billId:t.billId}))},onSkipAutofill:i=>{D?.trackBillPaySkipAutofill(),e(Oe(i))},onDeleteClick:()=>{e(Sa({billId:t.billId})),D?.trackInvoiceActionClick(t.billStage??"","delete",l?.userEmail??"",null)}}})(Gn);function w({appContent:e}){const t=se(),l=Y(),{billId:i}=ae(),c=K(),r=c.pathname,u=r.includes("bill/new")||r.includes("/edit"),o=we(),s=me(),n=M.getSignedInUser(),{useFeatureGate:d,useDynamicConfig:p}=le(),{isFeatureEnabled:m}=d(S.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:h}=d(S.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:g}=d(S.isDepositAccountsFeatureEnabled),{isFeatureEnabled:b}=d(S.billPaySetupShowInternationalPaymentByWise),{configValue:k}=p(Ce.zeniAssistConfig),j=k.user_ids!=null&&n?.userId!=null&&k.user_ids.includes(n?.userId),x=v(F=>Z(F)),[B,_]=f.useState(!1),[T,L]=f.useState(!1),[V,I]=f.useState(!1),[H,G]=f.useState(),A=v(F=>Ge(F,m,g,i));let q=A.fetchState,W=A.file,$=A.showAutofill;const J=v(F=>Le(F,i??""));u===!1&&(q=J.fetchState,W=J.transactionDetails?.attachments?.[0],$=!1);const Q=A.billPayInfo!=null&&A.billPayInfo.stage.code==="pending_approval"?A.billPayInfo.billStatus.code:A.billStage;f.useEffect(()=>{i==null&&t(Oe(!0))},[i,t]),f.useEffect(()=>{q==="Not-Started"&&(u&&T?L(!1):!u&&B&&_(!1))},[i]),f.useEffect(()=>{B||i==null||u||(_(!0),t(Bt(i,h,j,!1)),T||(L(!0),t(Ve(!1,h,j,b,i)))),u&&!T&&(L(!0),t(Ve(!1,h,j,b,i)))},[B,T,u,i,t]);const O={onOkClick:()=>{if(I(!1),!H)return;const F=W!=null?"replace":"upload";D?.trackInvoiceActionClick(Q??"",F,n?.userEmail??"","yes"),t(ga({replaceBillData:!0,billId:i})),t(Ne(H,m,i))},onCancelClick:()=>{if(I(!1),!H)return;const F=W!=null?"replace":"upload";D?.trackInvoiceActionClick(Q??"",F,n?.userEmail??"","no"),t(ha({file:H,billId:i}))}},ee=f.useCallback(()=>{const F=z(c.state?.pathnameStackToGoBack),ce=F.poppedPathname??ie(x.tenantEmailDomain);t(ke({billId:i})),l(ce,{state:{pathnameStackToGoBack:F.newStack}})},[c.state,x.tenantEmailDomain,i,t,l]);if(n==null)throw Error("Can't access address page without signing in...");if(q==="Error"||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:A.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:void 0,setShowConfirmationPopup:I,setPayload:G,showActionButtons:!1,isInitialEdit:!!A.isInitialEdit,billStage:Q}),a.jsx(Me,{windowSize:o,children:a.jsx(ct,{isNewBill:!0})})]})}):a.jsxs(Fe,{windowSize:o,children:[o==="small"||$?null:a.jsx(pt,{children:a.jsx(Xt,{onClick:ee,"data-testid":"nav-bar-back-click"})}),o!=="small"?a.jsx(Re,{}):null,a.jsx(Un,{}),a.jsx(Me,{windowSize:o,children:a.jsx(ct,{isNewBill:i==null})})]});{const F=A.billPayInfo!=null&&A.billPayInfo.stage.code==="pending_approval"?A.billPayInfo.billStatus.code:A.billStage;return a.jsx(rt,{fallback:ee,children:a.jsxs(Fe,{windowSize:o,children:[$&&o!=="small"?a.jsx(mt,{}):null,V?a.jsx(Ln,{titleComponent:a.jsx(wi,{children:Se.overwriteTitle}),descriptionComponent:a.jsx(xi,{children:Se.overwriteDescription}),primaryButtonText:Se.buttons.yes,secondaryButtonText:Se.buttons.no,action:O,isEditPopup:!0}):null,o==="small"||$?null:a.jsx(pt,{children:a.jsx(Si,{})}),o!=="small"?a.jsx(Re,{}):null,a.jsx(ut,{backgroundColor:s.colors.grey4,billId:i,file:W,showAutofill:$,uploadStatus:A.uploadStatus,isVendorRecommendationEnabled:m,attachmentTitle:yi(u,J,A),setShowConfirmationPopup:I,setPayload:G,showActionButtons:fi(u,A),isInitialEdit:!!A.isInitialEdit,billStage:F}),a.jsx(Me,{windowSize:o,children:e})]})})}}function Si(){const{triggerBack:e}=On();return a.jsx(Xt,{onClick:e,"data-testid":"nav-bar-back-click"})}function yi(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:`${Se.recurringBill.recurringCycle}
|
|
2
2
|
${i}/${c}`}),a.jsx(Ii,{})]}):void 0}function fi(e,t){const l=t.billActivities?.[0],i=t.billStage==="pending_approval"&&l?.areApprovalsSerialized===!0&&l?.currentPendingStepIndex===0;return e&&(t.billStage==="draft"||i)}const pt=U.div`
|
|
3
3
|
margin-bottom: 20px;
|
|
4
4
|
margin-top: 20px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as T}from"./liveblocks-
|
|
1
|
+
import{j as T}from"./liveblocks-C_VE9Mu9.js";import{a as V}from"./sentry-Byikl8iY.js";import{j as ae,u as ne,h as se,l as ie,g as C,N as oe,k as re}from"./core-B2Hxdfie.js";import{k as ce,y as ue,aK as de,z as E,A as pe,c as B,ac as x,e as z,bu as le,aq as me,r as R,ar as M}from"./index-BsI-BcOG.js";import{ML as fe,eO as G,rN as ye,Ha as Se,xu as ge,Ab as Ie,CK as be,Dn as he,Eg as Oe,N6 as De,N7 as ke,N8 as Te,N9 as Ce,Na as Ve,JF as Ne,M8 as Ae,JR as we,kg as Fe,fA as _e,fz as ve,fy as xe,pO as ze,pF as Ee,pC as Be,k8 as Re,rW as Me,rU as P,bD as L,s6 as U,cu as Pe}from"./zeni-epic-state-BZK5iHMQ.js";import{n as Le}from"./mui-tg9Pwou2.js";import{c as j}from"./routePaths-BtZYDC_i.js";import{M as Ue}from"./MobileAppDrawer-uxmqh_ak.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]="c2cc9a71-7429-4873-b3e0-a84df3f2bede",e._sentryDebugIdIdentifier="sentry-dbid-c2cc9a71-7429-4873-b3e0-a84df3f2bede")}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-C6NDyiJv.js";import{j as le,l as ia,h as ue,g as y,u as ge,k as pe,N as ga,q as ut,n as Wt,o as te}from"./core-DrFqYlht.js";import{eO as ie,bs as Re,OD as ka,eS as be,eT as ye,eU as Se,fP as $e,cr as Ge,OE as Ye,OF as Ma,t0 as ba,jI as ya,OG as Sa,gM as oa,zu as Xe,zw as za,zx as $a,jy as mt,OH as Ze,zi as Ct,OI as qt,OJ as Jt,zl as Da,OK as Qt,N3 as _a,rc as pt,zr as Ga,gX as Xt,OL as ht,OM as Ke,bq as en,ON as an,fA as Pa,fz as wa,z$ as tn,fy as Ta,ML as nn,OO as ft,ck as gt,cM as rn,N2 as da,AB as sn,OP as tt,Ab as Fa,OQ as bt,AC as on,Nu as cn,AD as dn,Bx as ln,sm as un,Br as mn,zM as yt,zF as Cn,OR as pn,fR as hn,zV as St,zZ as It,fQ as fn,OS as gn,An as At,OT as bn,OU as yn,OV as Sn,zX as Et,zI as kt,zo as Dt,zR as _t,zP as Pt,zT as In,zv as nt,OW as wt,OX as va,A8 as Ia,JK as Tt,cN as Ya,OY as An,OZ as En,O_ as kn,O$ as Dn,A5 as Na,Au as _n,Aq as Pn,A1 as wn,As as Tn,Ai as Fn,Ak as vn,P0 as Ft,AA as vt,H6 as xn,P1 as Ln,P2 as Bn,P3 as On,P4 as xt,P5 as Rn,AX as Un,Aa as Lt,A4 as ca,A9 as jn,P6 as Nn,P7 as Vn,zf as Hn,P8 as Bt,P9 as Ot,Pa as Mn,zh as zn,zg as rt,Pb as $n,Pc as Gn,Pd as Yn,JG as Zn,Pe as Za,Pf as Kn,vS as Rt,kg as Wn,gN as qn,B0 as Jn,Pg as Ut,Ph as Qn,B1 as Xn,Pi as er,dd as ar,sW as tr,AS as nr,AM as Oe,bv as rr,bE as sr,cw as or,bF as cr,IS as ir}from"./zeni-epic-state-vpQnS6PI.js";import{z as X,k as je,y as ce,S as Y,B as la,bY as xa,c7 as dr,q as ve,c8 as lr,c9 as ur,Z as ua,aK as Fe,r as fe,bf as Ka,ca as mr,G as ma,f as La,m as Wa,c as J,D as qa,cb as Cr,an as Ja,br as Je,cc as Va,cd as pr,A as Qa,a3 as hr,ce as fr,aq as jt,Y as Ha,V as Nt,e as Vt,cf as gr,cg as br,ch as yr,ci as Sr,cj as Ir,ck as Ar,o as Aa,cl as Er,cm as kr,cn as Ra,w as Dr,co as _r,cp as Pr,cq as wr,cr as Tr,cs as Fr,a6 as vr}from"./index-gIHwUZJz.js";import{n as _e,D as Ht,S as xr}from"./mui-BfKuxuES.js";import{a as i}from"./sentry-DorFMwQU.js";import{g as Ce,a as Ca,b as Mt,c as Ie,d as Ae,e as Ue,f as Ne,A as Lr,h as Xa,P as Br,i as et,s as Qe,j as zt,k as Me,l as $t,m as Or,n as Gt,p as Rr,S as st}from"./SetupPagesScreen-DFNkJSDZ.js";import Ba from"./NotFoundScreen-Du1hgJnA.js";import{M as ze}from"./MobileAppDrawer-DSdJwfd5.js";import{u as Yt}from"./useAskAiCfoHostNavButtonProps-SdJdV09H.js";import{c as Zt}from"./useFetchSuggestedQuestionsWhenReady-1RkvixCJ.js";import{v as ot}from"./utils-BiDInqYy.js";import{t as Ur}from"./AddressScreen-DLY0B5X2.js";import"./recharts-DzFRpM3n.js";import"./analytics-LRXDxB9U.js";import"./plaid-BfLcb-Mu.js";import"./dnd-DjCTgA16.js";import"./stripe-DMRn4zHo.js";import"./lottie-CRrBZj94.js";import"./lexical-BvSd63VE.js";import"./pdf-WyHfBZP8.js";import"./analyticsHelper-CM7-DzIH.js";import"./routePaths-DwqXZ9IC.js";import"./BusinessVerificationPageScreen-CJhDGXDa.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]="b75afebe-1cda-4c2b-a03e-33fc451f233d",e._sentryDebugIdIdentifier="sentry-dbid-b75afebe-1cda-4c2b-a03e-33fc451f233d")}catch{}})();function jr(){const e=le(),{cardId:t}=ia(),a=ue(),r=X.getSignedInUser(),n=y(Q=>ie(Q)),C=je(),p=Re(C?.loggedInUserRoleMap),{useFeatureGate:u}=ce();if(r==null)throw Error("Can't access Add To Wallet Page without signing in...");const[S,o]=i.useState(!1),c=y(Q=>ka(Q).firstViewAfterActivation);if(t==null)throw Error("Empty card id is not valid...");const _=n.userRole.includes("charge_card_user"),{isFeatureEnabled:A}=u(Y.isChargeCardFeatureEnabled),f=!!n.companyChargeCardInfo?.info?.isChargeCardEnabled,{isFeatureEnabled:R}=u(Y.isDebitCardFeatureEnabled),F=be(n),k=ye(n),h=Se(R,n),b=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,g=Ie({isDebitCardFeatureEnabled:R,isBankingOnlyTenant:h}),d=Ae({isCardsOnlyTenant:F,isChargeCardFeatureEnabled:A,isBookKeepingTenant:k,isDebitCardProductVisible:g,chargeCardsCreditAccountLimit:b}),D=!!n.companyDebitCardInfo?.info?.isDebitCardEnabled,v=y(Q=>$e(Q,n.companyId)),N=Ge(v.controllers),{creditAccount:B,creditAccountRepayment:w}=y(Q=>Ye(Q)),V=y(Q=>Q.classListState.fetchState),m=!_&&d&&f,l=y(Q=>Ma(Q,t,m,d)),[P,T]=i.useState(!1),H=l.chargeCard,O=H?.cardCreatedByUser?.userId,K=y(Q=>O!=null?ba(Q.userRoleState,O):void 0),I=K?.accountingClassIDs[0],L=y(Q=>I!=null?ya(Q.classState,{classId:I,reportId:"class_list"}):void 0),j=H?.cardHolderUser?.userId,U=y(Q=>j!=null?ba(Q.userRoleState,j):void 0),W=U?.accountingClassIDs[0],E=y(Q=>W!=null?ya(Q.classState,{classId:W,reportId:"class_list"}):void 0),G=H?.type.code==="business_physical_credit_card"||H?.type.code==="business_physical_debit_card",q=H?.type.code==="business_physical_debit_card";i.useEffect(()=>{c&&S===!1&&G&&(o(!0),setTimeout(()=>{a(Sa()),q&&a(oa({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[c,S,G,q]),i.useEffect(()=>{P||l.fetchState==="Completed"||l.fetchState==="In-Progress"||t==null||(T(!0),a(Xe(t,m,!1)))},[P,l,t,a]),i.useEffect(()=>{if(l.fetchState==="Completed"&&(G===!1||G&&H?.status?.code!=="active"||H?.cardHolderUserId!==r.userId||c===!1&&S===!1||H?.type.code==="business_physical_debit_card"||H?.type.code==="business_virtual_debit_card")){const Q=Ce(n.tenantEmailDomain,t,r,H,c);e(Q)}},[l.fetchState,c,G]),i.useEffect(()=>{B.fetchState!=="Completed"&&B.fetchState!=="In-Progress"&&d&&f&&p&&a(za()),w.fetchState!=="Completed"&&w.fetchState!=="In-Progress"&&d&&f&&p&&a($a()),V!=="Completed"&&V!=="In-Progress"&&a(mt())},[B.fetchState,w.fetchState,a,d,f,p,V]);const $=()=>{if(r!=null&&t!=null){a(Sa());const Q=Ce(n.tenantEmailDomain,t,r);e(Q)}},x=H?.type.code==="business_physical_debit_card"||H?.type.code==="business_virtual_debit_card",se=Ue(d,g,D,f),ae=Ca(d,f,p,B,w),ne=Mt(x,l);return l.fetchState!=="Completed"?s.jsx(la,{fetchState:"In-Progress"}):s.jsxs(s.Fragment,{children:[s.jsx(xa,{showConfetti:c}),s.jsx(dr,{onGotItClick:$,isDebitCard:H?.type.code==="business_physical_debit_card",controllerEmails:N,isChargeCardFeatureEnabled:d,isDebitCardFeatureEnabled:g,isDebitCardSetupEnabled:D,isChargeCardSetupEnabled:f,productInformation:se,creditAccountInformation:ae,debitAccountInformation:ne,chargeCardDetailView:l,creditAccount:B,classListFetchState:V,creditAccountRepayment:w,cardIssuedByRoles:K?.userRoles,cardIssuedByDepartmentName:L?.className,cardHolderRoles:U?.userRoles,cardHolderDepartmentName:E?.className})]})}const Nr=pe(function(e){const t=Ze(e);return{insightsData:t.insight,cashbackByPeriod:t.cashbackByPeriod,uiState:t.uiState,cashbackSummary:t.cashbackSummary}},function(e){return{onColumnSortConfigChanged:(t,a)=>{e(qt({uiState:{sortKey:t,sortOrder:a}}))}}})(ur);function Vr(){const e=le(),t=ue(),a=ge(),r=X.getSignedInUser(),n=y(o=>ie(o)),[C,p]=i.useState(!1),u=y(o=>Ze(o)),S=i.useCallback(()=>{const o=ve(a.state?.pathnameStackToGoBack),c=o.poppedPathname??Hr(n.tenantEmailDomain);e(c,{state:{pathnameStackToGoBack:o.newStack}})},[e,a,n.tenantEmailDomain]);if(i.useEffect(()=>{C||u.fetchState==="Completed"||u.fetchState==="In-Progress"||(p(!0),t(Ct()))},[C,u,t]),r==null)throw Error("Can't access cashback detail page without signing in...");return u.fetchState==="In-Progress"?s.jsx(lr,{onBackClick:S}):u.cashbackSummary.cashbackEarned.amount===0&&u.fetchState==="Completed"?s.jsx(Ba,{}):s.jsx(Nr,{onBackClick:S})}const Hr=e=>`/${e}/cards`,Mr={containerWidth:new ma(100,58)},zr=({appContent:e})=>{const t=ua(),a=ue(),r=le(),{cardId:n}=ia(),C=ge(),{useDynamicConfig:p}=ce(),[u,S]=i.useState(!1),[o,c]=i.useState(!1),[_,A]=i.useState(!1),[f,R]=i.useState(!1),F=X.getSignedInUser();if(F==null)throw Error("Can't access onboarding card page without signing in...");const k=y(E=>ie(E));if(n==null)throw Error("Empty card id is not valid...");const{configValue:h}=p(Fe.zeniCardsConfig),b=h.max_charge_card_activation_attempts_by_card_id,g=y(E=>Jt(E,n)),d=g.chargeCard,D=y(E=>E.chargeCardConfigState.fetchState),{useFeatureGate:v}=ce(),{isFeatureEnabled:N}=v(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:B}=v(Y.isDebitCardFeatureEnabled),w=Se(B,k),V=Ie({isDebitCardFeatureEnabled:B,isBankingOnlyTenant:w}),m=!!k.companyChargeCardInfo?.info?.isChargeCardEnabled,l=k.userRole.includes("charge_card_user"),P=be(k),T=ye(k),H=k.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,O=Ae({isCardsOnlyTenant:P,isChargeCardFeatureEnabled:N,isBookKeepingTenant:T,isDebitCardProductVisible:V,chargeCardsCreditAccountLimit:H}),K=!l&&O&&m;i.useEffect(()=>{u===!1&&D!=="In-Progress"&&D!=="Completed"&&(a(Da()),S(!0)),o===!1&&g.fetchState==="Not-Started"&&(c(!0),a(Xe(n,K,O)))},[o,g.fetchState,u,D]);const I=d?.type.code==="business_physical_credit_card"||d?.type.code==="business_physical_debit_card";i.useEffect(()=>{if(g.fetchState==="Completed"){if(_===!1&&(I===!1||I&&d?.status?.code!=="inactive"||d?.cardHolderUserId!==F.userId)){const E=Ce(k.tenantEmailDomain,n,F,d,!0),G=fe(C.state?.pathnameStackToGoBack,C.pathname);r(E,{state:{pathnameStackToGoBack:G}})}else if(_&&g.isRefreshingViewInBackground===!1&&d?.status?.code==="active"){a(Qt({chargeCardId:n}));const E=Ce(k.tenantEmailDomain,n,F,d,!0),G=fe(C.state?.pathnameStackToGoBack,C.pathname);a(_a()),r(E,{state:{pathnameStackToGoBack:G}})}}},[g.fetchState,d?.type.code,_,g.isRefreshingViewInBackground]);const L=X.getZeniOtpTokenForCardHolder(n),j=y(E=>pt(E.userState,F.userId)),U=()=>{d?.status?.code!=="active"&&a(Ga(n,!0))};i.useEffect(()=>{g.updatePhysicalChargeCardAttemptFetchState.fetchState==="Completed"&&d?.cardActivationAttemptHistory.some(E=>E.statusCode==="success")===!0&&_===!1&&(setTimeout(U,3e3),A(!0))},[g.updatePhysicalChargeCardAttemptFetchState.fetchState,d?.cardActivationAttemptHistory]);const W=E=>{R(E)};if(D!=="Completed"||d==null)return s.jsx(la,{fetchState:"In-Progress"});if(d.shippingAddressId==null)throw Error("Can't access shippingAddressId.");if(j?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(Yr,{children:[s.jsx(ze,{isAppContentDrawerOpen:f,handleDrawerToggle:W}),s.jsx($r,{cardId:n,card:d,shippingAddressId:d.shippingAddressId,phone:j.phone,signedInUser:F,isSandboxEnv:Ka(),chargeCardDetailState:g,signedInUserToken:L,navigate:r,currentTenant:k,location:C,maxChargeCardActivationAttempts:b[n]!=null?b[n]:h.default_max_charge_card_activation_attempts!=null?h.default_max_charge_card_activation_attempts:3,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,onClickMenuIcon:()=>{W(!0)}}),e!=null?s.jsx(Gr,{windowSize:t,children:e}):null]})},$r=pe(function(e,{chargeCardDetailState:t,shippingAddressId:a,location:r,cardId:n}){const C=Xt(e.addressState,a);if(C==null)throw Error("Can't access shippingAddress.");const p=ht(e,n),u=t.updateStatus,S=Ke(e,!1,!1,!1);let o=!1;S.fetchState==="Completed"&&S.cards.length<=1&&(o=!0);const c=r.state?.message==="comingFromV2UrlPath";return{showActivatePage:t.chargeCard?.providerCardCreateTime!=null&&t.chargeCard.providerCardCreateTime.add(24,"h").isBefore(en())||c,showMenuIcon:o,shippingAddress:C,vgsVaultId:La.cardVaultId,twoFAView:p,activationWaitStatus:u,isRefreshingViewInBackground:t.isRefreshingViewInBackground}},function(e,t){const{navigate:a,cardId:r,location:n,currentTenant:C,chargeCardDetailState:p}=t,u=p.chargeCard?.cardProviderID,{tenantEmailDomain:S}=C;return{onGetOtp:o=>{u!=null&&e(Ta(o,"ChargeCardHolder",r))},onUpdatePhysicalChargeCardAttempt:o=>{e(tn(r,o))},onResendOtp:o=>{u!=null&&e(wa(o,"ChargeCardHolder",r))},onVerifyOtp:(o,c)=>{u!=null&&e(Pa(o,c,"ChargeCardHolder",r))},onVerifyOtpSuccess:o=>{o!=null&&X.saveZeniOtpTokenForCardHolder(o,r)},onCVVActivateSuccess:()=>{e(an({chargeCardId:r}))},onBackClick:()=>{const o=ve(n.state?.pathnameStackToGoBack),c=o.poppedPathname==null||o.poppedPathname.includes("onboard")===!0?Ne(S):o.poppedPathname;a(c,{state:{pathnameStackToGoBack:o.newStack}})}}})(mr),Gr=_e.div`
|
|
1
|
+
import{j as s}from"./liveblocks-C_VE9Mu9.js";import{j as le,l as ia,h as ue,g as y,u as ge,k as pe,N as ga,q as ut,n as Wt,o as te}from"./core-B2Hxdfie.js";import{eO as ie,bs as Re,OD as ka,eS as be,eT as ye,eU as Se,fP as $e,cr as Ge,OE as Ye,OF as Ma,t0 as ba,jI as ya,OG as Sa,gM as oa,zu as Xe,zw as za,zx as $a,jy as mt,OH as Ze,zi as Ct,OI as qt,OJ as Jt,zl as Da,OK as Qt,N3 as _a,rc as pt,zr as Ga,gX as Xt,OL as ht,OM as Ke,bq as en,ON as an,fA as Pa,fz as wa,z$ as tn,fy as Ta,ML as nn,OO as ft,ck as gt,cM as rn,N2 as da,AB as sn,OP as tt,Ab as Fa,OQ as bt,AC as on,Nu as cn,AD as dn,Bx as ln,sm as un,Br as mn,zM as yt,zF as Cn,OR as pn,fR as hn,zV as St,zZ as It,fQ as fn,OS as gn,An as At,OT as bn,OU as yn,OV as Sn,zX as Et,zI as kt,zo as Dt,zR as _t,zP as Pt,zT as In,zv as nt,OW as wt,OX as va,A8 as Ia,JK as Tt,cN as Ya,OY as An,OZ as En,O_ as kn,O$ as Dn,A5 as Na,Au as _n,Aq as Pn,A1 as wn,As as Tn,Ai as Fn,Ak as vn,P0 as Ft,AA as vt,H6 as xn,P1 as Ln,P2 as Bn,P3 as On,P4 as xt,P5 as Rn,AX as Un,Aa as Lt,A4 as ca,A9 as jn,P6 as Nn,P7 as Vn,zf as Hn,P8 as Bt,P9 as Ot,Pa as Mn,zh as zn,zg as rt,Pb as $n,Pc as Gn,Pd as Yn,JG as Zn,Pe as Za,Pf as Kn,vS as Rt,kg as Wn,gN as qn,B0 as Jn,Pg as Ut,Ph as Qn,B1 as Xn,Pi as er,dd as ar,sW as tr,AS as nr,AM as Oe,bv as rr,bE as sr,cw as or,bF as cr,IS as ir}from"./zeni-epic-state-BZK5iHMQ.js";import{z as X,k as je,y as ce,S as Y,B as la,bY as xa,c7 as dr,q as ve,c8 as lr,c9 as ur,Z as ua,aK as Fe,r as fe,bf as Ka,ca as mr,G as ma,f as La,m as Wa,c as J,D as qa,cb as Cr,an as Ja,br as Je,cc as Va,cd as pr,A as Qa,a3 as hr,ce as fr,aq as jt,Y as Ha,V as Nt,e as Vt,cf as gr,cg as br,ch as yr,ci as Sr,cj as Ir,ck as Ar,o as Aa,cl as Er,cm as kr,cn as Ra,w as Dr,co as _r,cp as Pr,cq as wr,cr as Tr,cs as Fr,a6 as vr}from"./index-BsI-BcOG.js";import{n as _e,D as Ht,S as xr}from"./mui-tg9Pwou2.js";import{a as i}from"./sentry-Byikl8iY.js";import{g as Ce,a as Ca,b as Mt,c as Ie,d as Ae,e as Ue,f as Ne,A as Lr,h as Xa,P as Br,i as et,s as Qe,j as zt,k as Me,l as $t,m as Or,n as Gt,p as Rr,S as st}from"./SetupPagesScreen-CNq2NGTh.js";import Ba from"./NotFoundScreen-Bgm7QovY.js";import{M as ze}from"./MobileAppDrawer-uxmqh_ak.js";import{u as Yt}from"./useAskAiCfoHostNavButtonProps-kK55rQTy.js";import{c as Zt}from"./useFetchSuggestedQuestionsWhenReady-D_ChcTLo.js";import{v as ot}from"./utils-KJcQ4RjB.js";import{t as Ur}from"./AddressScreen-eTY0sZvp.js";import"./recharts-Ep8XanlT.js";import"./analytics-CYMgeTT5.js";import"./plaid-B_jGdYrM.js";import"./dnd-ChJsuxMK.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL0TkQBF.js";import"./lexical-WK6PZ_Fc.js";import"./pdf-DJRvlcHv.js";import"./analyticsHelper-kA_46WRt.js";import"./routePaths-BtZYDC_i.js";import"./BusinessVerificationPageScreen-CiVtyVMD.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]="b75afebe-1cda-4c2b-a03e-33fc451f233d",e._sentryDebugIdIdentifier="sentry-dbid-b75afebe-1cda-4c2b-a03e-33fc451f233d")}catch{}})();function jr(){const e=le(),{cardId:t}=ia(),a=ue(),r=X.getSignedInUser(),n=y(Q=>ie(Q)),C=je(),p=Re(C?.loggedInUserRoleMap),{useFeatureGate:u}=ce();if(r==null)throw Error("Can't access Add To Wallet Page without signing in...");const[S,o]=i.useState(!1),c=y(Q=>ka(Q).firstViewAfterActivation);if(t==null)throw Error("Empty card id is not valid...");const _=n.userRole.includes("charge_card_user"),{isFeatureEnabled:A}=u(Y.isChargeCardFeatureEnabled),f=!!n.companyChargeCardInfo?.info?.isChargeCardEnabled,{isFeatureEnabled:R}=u(Y.isDebitCardFeatureEnabled),F=be(n),k=ye(n),h=Se(R,n),b=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,g=Ie({isDebitCardFeatureEnabled:R,isBankingOnlyTenant:h}),d=Ae({isCardsOnlyTenant:F,isChargeCardFeatureEnabled:A,isBookKeepingTenant:k,isDebitCardProductVisible:g,chargeCardsCreditAccountLimit:b}),D=!!n.companyDebitCardInfo?.info?.isDebitCardEnabled,v=y(Q=>$e(Q,n.companyId)),N=Ge(v.controllers),{creditAccount:B,creditAccountRepayment:w}=y(Q=>Ye(Q)),V=y(Q=>Q.classListState.fetchState),m=!_&&d&&f,l=y(Q=>Ma(Q,t,m,d)),[P,T]=i.useState(!1),H=l.chargeCard,O=H?.cardCreatedByUser?.userId,K=y(Q=>O!=null?ba(Q.userRoleState,O):void 0),I=K?.accountingClassIDs[0],L=y(Q=>I!=null?ya(Q.classState,{classId:I,reportId:"class_list"}):void 0),j=H?.cardHolderUser?.userId,U=y(Q=>j!=null?ba(Q.userRoleState,j):void 0),W=U?.accountingClassIDs[0],E=y(Q=>W!=null?ya(Q.classState,{classId:W,reportId:"class_list"}):void 0),G=H?.type.code==="business_physical_credit_card"||H?.type.code==="business_physical_debit_card",q=H?.type.code==="business_physical_debit_card";i.useEffect(()=>{c&&S===!1&&G&&(o(!0),setTimeout(()=>{a(Sa()),q&&a(oa({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[c,S,G,q]),i.useEffect(()=>{P||l.fetchState==="Completed"||l.fetchState==="In-Progress"||t==null||(T(!0),a(Xe(t,m,!1)))},[P,l,t,a]),i.useEffect(()=>{if(l.fetchState==="Completed"&&(G===!1||G&&H?.status?.code!=="active"||H?.cardHolderUserId!==r.userId||c===!1&&S===!1||H?.type.code==="business_physical_debit_card"||H?.type.code==="business_virtual_debit_card")){const Q=Ce(n.tenantEmailDomain,t,r,H,c);e(Q)}},[l.fetchState,c,G]),i.useEffect(()=>{B.fetchState!=="Completed"&&B.fetchState!=="In-Progress"&&d&&f&&p&&a(za()),w.fetchState!=="Completed"&&w.fetchState!=="In-Progress"&&d&&f&&p&&a($a()),V!=="Completed"&&V!=="In-Progress"&&a(mt())},[B.fetchState,w.fetchState,a,d,f,p,V]);const $=()=>{if(r!=null&&t!=null){a(Sa());const Q=Ce(n.tenantEmailDomain,t,r);e(Q)}},x=H?.type.code==="business_physical_debit_card"||H?.type.code==="business_virtual_debit_card",se=Ue(d,g,D,f),ae=Ca(d,f,p,B,w),ne=Mt(x,l);return l.fetchState!=="Completed"?s.jsx(la,{fetchState:"In-Progress"}):s.jsxs(s.Fragment,{children:[s.jsx(xa,{showConfetti:c}),s.jsx(dr,{onGotItClick:$,isDebitCard:H?.type.code==="business_physical_debit_card",controllerEmails:N,isChargeCardFeatureEnabled:d,isDebitCardFeatureEnabled:g,isDebitCardSetupEnabled:D,isChargeCardSetupEnabled:f,productInformation:se,creditAccountInformation:ae,debitAccountInformation:ne,chargeCardDetailView:l,creditAccount:B,classListFetchState:V,creditAccountRepayment:w,cardIssuedByRoles:K?.userRoles,cardIssuedByDepartmentName:L?.className,cardHolderRoles:U?.userRoles,cardHolderDepartmentName:E?.className})]})}const Nr=pe(function(e){const t=Ze(e);return{insightsData:t.insight,cashbackByPeriod:t.cashbackByPeriod,uiState:t.uiState,cashbackSummary:t.cashbackSummary}},function(e){return{onColumnSortConfigChanged:(t,a)=>{e(qt({uiState:{sortKey:t,sortOrder:a}}))}}})(ur);function Vr(){const e=le(),t=ue(),a=ge(),r=X.getSignedInUser(),n=y(o=>ie(o)),[C,p]=i.useState(!1),u=y(o=>Ze(o)),S=i.useCallback(()=>{const o=ve(a.state?.pathnameStackToGoBack),c=o.poppedPathname??Hr(n.tenantEmailDomain);e(c,{state:{pathnameStackToGoBack:o.newStack}})},[e,a,n.tenantEmailDomain]);if(i.useEffect(()=>{C||u.fetchState==="Completed"||u.fetchState==="In-Progress"||(p(!0),t(Ct()))},[C,u,t]),r==null)throw Error("Can't access cashback detail page without signing in...");return u.fetchState==="In-Progress"?s.jsx(lr,{onBackClick:S}):u.cashbackSummary.cashbackEarned.amount===0&&u.fetchState==="Completed"?s.jsx(Ba,{}):s.jsx(Nr,{onBackClick:S})}const Hr=e=>`/${e}/cards`,Mr={containerWidth:new ma(100,58)},zr=({appContent:e})=>{const t=ua(),a=ue(),r=le(),{cardId:n}=ia(),C=ge(),{useDynamicConfig:p}=ce(),[u,S]=i.useState(!1),[o,c]=i.useState(!1),[_,A]=i.useState(!1),[f,R]=i.useState(!1),F=X.getSignedInUser();if(F==null)throw Error("Can't access onboarding card page without signing in...");const k=y(E=>ie(E));if(n==null)throw Error("Empty card id is not valid...");const{configValue:h}=p(Fe.zeniCardsConfig),b=h.max_charge_card_activation_attempts_by_card_id,g=y(E=>Jt(E,n)),d=g.chargeCard,D=y(E=>E.chargeCardConfigState.fetchState),{useFeatureGate:v}=ce(),{isFeatureEnabled:N}=v(Y.isChargeCardFeatureEnabled),{isFeatureEnabled:B}=v(Y.isDebitCardFeatureEnabled),w=Se(B,k),V=Ie({isDebitCardFeatureEnabled:B,isBankingOnlyTenant:w}),m=!!k.companyChargeCardInfo?.info?.isChargeCardEnabled,l=k.userRole.includes("charge_card_user"),P=be(k),T=ye(k),H=k.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,O=Ae({isCardsOnlyTenant:P,isChargeCardFeatureEnabled:N,isBookKeepingTenant:T,isDebitCardProductVisible:V,chargeCardsCreditAccountLimit:H}),K=!l&&O&&m;i.useEffect(()=>{u===!1&&D!=="In-Progress"&&D!=="Completed"&&(a(Da()),S(!0)),o===!1&&g.fetchState==="Not-Started"&&(c(!0),a(Xe(n,K,O)))},[o,g.fetchState,u,D]);const I=d?.type.code==="business_physical_credit_card"||d?.type.code==="business_physical_debit_card";i.useEffect(()=>{if(g.fetchState==="Completed"){if(_===!1&&(I===!1||I&&d?.status?.code!=="inactive"||d?.cardHolderUserId!==F.userId)){const E=Ce(k.tenantEmailDomain,n,F,d,!0),G=fe(C.state?.pathnameStackToGoBack,C.pathname);r(E,{state:{pathnameStackToGoBack:G}})}else if(_&&g.isRefreshingViewInBackground===!1&&d?.status?.code==="active"){a(Qt({chargeCardId:n}));const E=Ce(k.tenantEmailDomain,n,F,d,!0),G=fe(C.state?.pathnameStackToGoBack,C.pathname);a(_a()),r(E,{state:{pathnameStackToGoBack:G}})}}},[g.fetchState,d?.type.code,_,g.isRefreshingViewInBackground]);const L=X.getZeniOtpTokenForCardHolder(n),j=y(E=>pt(E.userState,F.userId)),U=()=>{d?.status?.code!=="active"&&a(Ga(n,!0))};i.useEffect(()=>{g.updatePhysicalChargeCardAttemptFetchState.fetchState==="Completed"&&d?.cardActivationAttemptHistory.some(E=>E.statusCode==="success")===!0&&_===!1&&(setTimeout(U,3e3),A(!0))},[g.updatePhysicalChargeCardAttemptFetchState.fetchState,d?.cardActivationAttemptHistory]);const W=E=>{R(E)};if(D!=="Completed"||d==null)return s.jsx(la,{fetchState:"In-Progress"});if(d.shippingAddressId==null)throw Error("Can't access shippingAddressId.");if(j?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(Yr,{children:[s.jsx(ze,{isAppContentDrawerOpen:f,handleDrawerToggle:W}),s.jsx($r,{cardId:n,card:d,shippingAddressId:d.shippingAddressId,phone:j.phone,signedInUser:F,isSandboxEnv:Ka(),chargeCardDetailState:g,signedInUserToken:L,navigate:r,currentTenant:k,location:C,maxChargeCardActivationAttempts:b[n]!=null?b[n]:h.default_max_charge_card_activation_attempts!=null?h.default_max_charge_card_activation_attempts:3,chargeCardCashbackRatePerTransaction:h.charge_card_cashback_rate_per_transaction!=null?h.charge_card_cashback_rate_per_transaction:.0175,onClickMenuIcon:()=>{W(!0)}}),e!=null?s.jsx(Gr,{windowSize:t,children:e}):null]})},$r=pe(function(e,{chargeCardDetailState:t,shippingAddressId:a,location:r,cardId:n}){const C=Xt(e.addressState,a);if(C==null)throw Error("Can't access shippingAddress.");const p=ht(e,n),u=t.updateStatus,S=Ke(e,!1,!1,!1);let o=!1;S.fetchState==="Completed"&&S.cards.length<=1&&(o=!0);const c=r.state?.message==="comingFromV2UrlPath";return{showActivatePage:t.chargeCard?.providerCardCreateTime!=null&&t.chargeCard.providerCardCreateTime.add(24,"h").isBefore(en())||c,showMenuIcon:o,shippingAddress:C,vgsVaultId:La.cardVaultId,twoFAView:p,activationWaitStatus:u,isRefreshingViewInBackground:t.isRefreshingViewInBackground}},function(e,t){const{navigate:a,cardId:r,location:n,currentTenant:C,chargeCardDetailState:p}=t,u=p.chargeCard?.cardProviderID,{tenantEmailDomain:S}=C;return{onGetOtp:o=>{u!=null&&e(Ta(o,"ChargeCardHolder",r))},onUpdatePhysicalChargeCardAttempt:o=>{e(tn(r,o))},onResendOtp:o=>{u!=null&&e(wa(o,"ChargeCardHolder",r))},onVerifyOtp:(o,c)=>{u!=null&&e(Pa(o,c,"ChargeCardHolder",r))},onVerifyOtpSuccess:o=>{o!=null&&X.saveZeniOtpTokenForCardHolder(o,r)},onCVVActivateSuccess:()=>{e(an({chargeCardId:r}))},onBackClick:()=>{const o=ve(n.state?.pathnameStackToGoBack),c=o.poppedPathname==null||o.poppedPathname.includes("onboard")===!0?Ne(S):o.poppedPathname;a(c,{state:{pathnameStackToGoBack:o.newStack}})}}})(mr),Gr=_e.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex-direction: column;
|
|
4
4
|
width: ${e=>`${Mr.containerWidth.value(e.windowSize)}%`};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as m}from"./liveblocks-
|
|
1
|
+
import{j as m}from"./liveblocks-C_VE9Mu9.js";import{a as g}from"./sentry-Byikl8iY.js";import{j as w,h as k,u as x,l as T,g as O,k as E}from"./core-B2Hxdfie.js";import{z as N,b1 as P,A as F,c as V,e as A,ac as b,b2 as j,aq as L,ar as M,r as U}from"./index-BsI-BcOG.js";import{eO as D,fC as B,rN as _,fx as R,c1 as z,M8 as G,bn as Y,pO as q,pC as H,k8 as Z,lE as S,M9 as $,bD as J,cu as C,lM as K,lP as Q}from"./zeni-epic-state-BZK5iHMQ.js";import"./mui-tg9Pwou2.js";import{c as W}from"./routePaths-BtZYDC_i.js";import{M as X}from"./MobileAppDrawer-uxmqh_ak.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]="1b7c4e64-c29b-4e4b-9c69-3671e419f93d",t._sentryDebugIdIdentifier="sentry-dbid-1b7c4e64-c29b-4e4b-9c69-3671e419f93d")}catch{}})();const ee=E(function(t){const a=R(t),i=N.getSignedInUser(),l=D(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=G(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:`${L.fileMicroServiceBaseUrl}`,isZeniUser:Y(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(Q())},onAddressClick:e=>{const n=W(f,e),o=U(p.state?.pathnameStackToGoBack,p.pathname);c(n,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{t(K({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?C(u):void 0,meetingLink:y!=""&&y!=null?C(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:M(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?J(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($(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(Z({files:e}))},onDeleteFile:e=>{t(H(e))},onEditFileName:(e,n)=>{t(q(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=>D(s)),d=r.companyId??N.getSignedInUserTenant(l)?.companyId;if(N.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect(()=>{c||n!=="Not-Started"||d==null||(p(!0),a(B(d)))},[c,n,d,a]),g.useEffect(()=>{o==="Not-Started"&&a(_())},[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(P,{onGoHome:()=>t("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(F,{analytics:V,onLoad:s=>s.trackPageLoaded(A.Event.companyPassport,b(i)?"Settings":"Company Passport")}),b(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:t,location:i,isLoading:y,currentTenant:r,isSettings:b(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-C_VE9Mu9.js";import{a}from"./sentry-Byikl8iY.js";import{h as D,u as v,g as u,N as w}from"./core-B2Hxdfie.js";import{IO as O,eO as A,fj as j,mv as L,fL as h,fi as U,eP as _,IV as F}from"./zeni-epic-state-BZK5iHMQ.js";import{u as $,z as c,L as g,D as k,o as H}from"./index-BsI-BcOG.js";import{n as P}from"./mui-tg9Pwou2.js";import{t as z}from"./getLocaleForTenant-BC4keiZu.js";import{g as R,Q as V}from"./QBOConnectionScreen---6d_O2t.js";import"./recharts-Ep8XanlT.js";import"./analytics-CYMgeTT5.js";import"./plaid-B_jGdYrM.js";import"./dnd-ChJsuxMK.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL0TkQBF.js";import"./lexical-WK6PZ_Fc.js";import"./pdf-DJRvlcHv.js";import"./utils-KJcQ4RjB.js";import"./empty-DJcdURMB.js";import"./pdf-lib-BAv_DefF.js";import"./index-m_9cQfeA.js";import"./url-pgCCDGVL.js";import"./index-CsMY6Obb.js";import"./decodeURIComponentSafe-BcAs3k9x.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]="a30747ce-8ad1-4595-93a5-8c52b283213e",t._sentryDebugIdIdentifier="sentry-dbid-a30747ce-8ad1-4595-93a5-8c52b283213e")}catch{}})();const G=P.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-C_VE9Mu9.js";import{z as a}from"./index-BsI-BcOG.js";import{g as n}from"./QBOConnectionScreen---6d_O2t.js";import"./sentry-Byikl8iY.js";import{u as p,N as s}from"./core-B2Hxdfie.js";import"./zeni-epic-state-BZK5iHMQ.js";import"./recharts-Ep8XanlT.js";import"./mui-tg9Pwou2.js";import"./analytics-CYMgeTT5.js";import"./plaid-B_jGdYrM.js";import"./dnd-ChJsuxMK.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL0TkQBF.js";import"./lexical-WK6PZ_Fc.js";import"./pdf-DJRvlcHv.js";import"./utils-KJcQ4RjB.js";import"./empty-DJcdURMB.js";import"./pdf-lib-BAv_DefF.js";import"./index-m_9cQfeA.js";import"./url-pgCCDGVL.js";import"./index-CsMY6Obb.js";import"./decodeURIComponentSafe-BcAs3k9x.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]="8d904e89-6b8e-4c86-980c-585a84d9d789",t._sentryDebugIdIdentifier="sentry-dbid-8d904e89-6b8e-4c86-980c-585a84d9d789")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=n(t.search),d=a.getSignedInUser()?.userId??"";if(f(o,r,e,d)===!0){const m=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(s,{to:m})}return i.jsx(s,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
|
package/dist/assets/{CustomerOnboardingRoutes-CCJ8rzxG.js → CustomerOnboardingRoutes-B7NKLiFW.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-C_VE9Mu9.js";import{t as $e,A as Ce}from"./AddressScreen-eTY0sZvp.js";import ze from"./NotFoundScreen-Bgm7QovY.js";import{a as g}from"./sentry-Byikl8iY.js";import{j as oe,u as se,h as ie,l as re,g as D,N as T,k as ce,i as Me,n as Qe,o as M}from"./core-B2Hxdfie.js";import{w as de,k as le,z as B,y as ue,m as qe,S as _,r as V,A as H,c as N,B as we,e as X,am as Je,Z as Ke,an as ke,f as te,ao as Ze,ap as Ie,o as He,aq as We,ar as Te,as as Xe}from"./index-BsI-BcOG.js";import{bn as Ye,eO as ee,fb as et,eU as pe,eS as me,bv as tt,mt as at,f7 as nt,bN as ot,jc as ae,jf as ve,Ji as st,bS as it,c1 as ge,r$ as he,rM as rt,JP as Y,s0 as _e,Ha as ct,kg as Ue,JQ as Ve,JR as dt,JS as lt,JT as ut,ja as pt,jd as mt,rO as Be,r_ as gt,bD as Ee,cu as ht,sc as xe,pO as ft,pC as yt,k8 as bt,fA as St,fz as Ct,fy as kt,JU as It,rG as Tt,sd as Et,sg as xt,sj as Ot,sp as Pt,cT as At}from"./zeni-epic-state-BZK5iHMQ.js";import{n as fe}from"./mui-tg9Pwou2.js";import{g as Dt,h as Ft,q as ne}from"./QBOConnectionScreen---6d_O2t.js";import"./recharts-Ep8XanlT.js";import"./analytics-CYMgeTT5.js";import"./plaid-B_jGdYrM.js";import"./dnd-ChJsuxMK.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL0TkQBF.js";import"./lexical-WK6PZ_Fc.js";import"./pdf-DJRvlcHv.js";import"./utils-KJcQ4RjB.js";import"./empty-DJcdURMB.js";import"./pdf-lib-BAv_DefF.js";import"./index-m_9cQfeA.js";import"./url-pgCCDGVL.js";import"./index-CsMY6Obb.js";import"./decodeURIComponentSafe-BcAs3k9x.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]="89184618-bd41-4923-b598-9cf11371cabb",t._sentryDebugIdIdentifier="sentry-dbid-89184618-bd41-4923-b598-9cf11371cabb")}catch{}})();const jt=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 u=nt(t,s,o.signedInUser,o.isExpenseAutomationFeatureEnabledV2,o.isExpenseAutomationEnabledForUser,o.isTreasuryEnabled);return{dashboardFetchState:ot(u.reportsInOrder.map(d=>({fetchState:d.fetchState,error:d.error}))).fetchState}},function(t,o){const{themeState:s,navigate:u,location:d}=o;return{onZeniLogoClick:()=>{s.toggle()},onDashboardFetchDone:()=>{const r=V(d.state?.pathnameStackToGoBack,d.pathname);u("../../dashboard",{state:{pathnameStackToGoBack:r,message:"activation"}})}}})(Je),wt=()=>{const t=oe(),o=se(),s=ie(),u=de(),[d,r]=g.useState(!1),[p,b]=g.useState(!1),{tenantEmailDomain:e}=re(),n=le(),i=B.getSignedInUser(),h=Ye(i),{useFeatureGate:m}=ue(),I=qe(),{isFeatureEnabled:E}=m(_.isApAgingFeatureEnabled),{isFeatureEnabled:x}=m(_.isArAgingFeatureEnabled),{isFeatureEnabled:k}=m(_.isDepositAccountsFeatureEnabled),{isFeatureEnabled:f}=m(_.isReferralFeatureEnabled),{isFeatureEnabled:U}=m(_.isExpenseAutomationEnabled),{isFeatureEnabled:C}=m(_.isExpenseAutomationEnabledV2),{isFeatureEnabled:F}=m(_.isDebitCardFeatureEnabled),$=C||U&&h,c=D(l=>ee(l)),{isFeatureEnabled:L}=m(_.isTreasuryEnabled),j=c.company!=null&&et(c.company),R=L&&j,O=D(l=>l.onboardingCustomerViewState.fetchState),S=c.excludedResources,G=c.companyId??B.getSignedInUserTenant(e)?.companyId;if(i==null)throw Error("Can't access onboarding flow without signing in...");const w=pe(F,c),P=me(c),A=[],J=S?.resources?.find(l=>l.resource==="/reports/top_expenses")==null,z=S?.resources?.find(l=>l.resource==="/reports/task_card")==null,Q=c?.userRole!=null&&tt(c?.userRole),v=S?.resources?.find(l=>l.resource==="/bills")==null&&!Q,q=S?.resources?.find(l=>l.resource==="/reimbursements")==null;if(J===!1&&A.push("top_expenses"),z===!1&&A.push("task_card"),v===!1&&A.push("bill_pay_card","bill_pay_promo_card"),q===!1&&A.push("reimbursement_card","reimbursement_promo_card"),k===!1&&A.push("zeni_accounts_promo_card"),f===!1&&A.push("rewards_card"),g.useEffect(()=>{O!=="Completed"||d||w||P||(r(!0),s(at(i.userId,G,c.tenantId,!0,!1,A)))},[d,O,w,P,i,c.tenantId,s]),g.useEffect(()=>{(w||P)&&setTimeout(()=>{b(!0)},5e3)},[w,P]),O!=="Completed")return a.jsx(T,{to:"../"});if(O==="Completed"&&p){const l=V(o.state?.pathnameStackToGoBack,o.pathname);if(w)return a.jsx(T,{to:"../../checking",state:{...o.state,pathnameStackToGoBack:l,message:"activation"}});if(P)return a.jsx(T,{to:"../../cards",state:{...o.state,pathnameStackToGoBack:l,message:"activation"}})}return n?.loggedInUserRoleMap!=null?a.jsxs(a.Fragment,{children:[a.jsx(H,{analytics:N,onLoad:l=>(K=>K.trackPageLoaded(X.Event.onboardingDashboardActivation))(l)}),a.jsx(jt,{navigate:t,location:o,themeState:u,signedInUser:i,isApAgingFeatureEnabled:E,isArAgingFeatureEnabled:x,shouldFetchZeniAccountsPromoCard:k,shouldFetchRewardsPlanCard:f,isExpenseAutomationEnabledForUser:$,isExpenseAutomationFeatureEnabledV2:C,isTreasuryEnabled:R,loggedInUserRoleMap:n?.loggedInUserRoleMap})]}):a.jsx(we,{fetchState:"In-Progress",style:{backgroundColor:I.colors.grey5}})},Oe=fe.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
background-color: ${t=>t.theme.colors.grey4};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-C6NDyiJv.js";import{l as $,g as S,u as q,h as N,j as Z,k as Q,s as Ka,n as st,o as w}from"./core-DrFqYlht.js";import{eO as L,K8 as Ye,bD as Gt,bq as he,Ll as qa,i0 as Za,Lm as wt,Ln as Ha,i3 as rt,Lo as je,Lp as Qa,i8 as Ja,Lq as Dt,Lr as Xa,ic as it,Ls as Me,Lt as Wa,ck as lt,Lu as en,Lv as tn,Ks as an,j6 as nn,Lw as on,bn as Ee,Lx as Nt,JY as ae,bc as zt,jk as $t,mD as Kt,j3 as qt,J_ as ne,JZ as H,f3 as sn,eL as rn,fl as cn,Ly as ln,Lz as dn,LA as Zt,LB as _e,tR as Ie,tS as Te,ud as fe,u7 as oe,tW as xe,LC as un,LD as mn,LE as pn,LF as Ht,LG as ke,LH as hn,dC as Ve,qm as Qt,LI as fn,LJ as gn,LK as bn,LL as dt,Jl as ut,jA as ge,ul as mt,qu as Cn,LM as _n,tT as Ft,qp as me,ql as Jt,LN as ie,LO as kn,LP as pt,Jj as ht,st as Xt,LQ as Sn,LR as yn,LS as An,LT as ft,sG as vn,LU as En,tV as Ot,ss as Wt,LV as ce,LW as In,bv as ea,up as ta,LX as Tn,LY as xn,LZ as wn,L_ as gt,uk as Dn,L$ as Fn,tU as Pt,uo as aa,M0 as le,M1 as On,M2 as Pn,M3 as na,jp as oa,mA as sa,ju as ra,my as ia,mx as ca,mw as la,rR as Rn,fb as Bn,cN as Ln,cO as jn,mt as Mn,f7 as Un,mK as Yn,Dt as Rt,M4 as Vn,M5 as Gn,M6 as Nn,M7 as zn,b5 as bt,e_ as $n,gK as Kn,fC as qn,mE as Zn,iY as Hn,mB as Qn,mz as Jn,eU as Xn,eS as Wn}from"./zeni-epic-state-vpQnS6PI.js";import{z as B,Y as J,r as D,c as E,D as K,aR as eo,A as we,aS as da,e as V,aT as to,k as De,aU as ua,y as Ge,S as j,m as ao,aV as no,aW as oo,U as ma,Z as so,a as pa,a1 as ro,aK as ha,aX as io,aY as co,X as lo,aZ as uo,a_ as mo,an as po,q as ho,V as fo,a$ as go,b0 as ye}from"./index-gIHwUZJz.js";import{n as Ct}from"./mui-BfKuxuES.js";import{a as C}from"./sentry-DorFMwQU.js";import{w as fa}from"./withTransactionSidePanel-51Ock1rJ.js";import{b as ga,t as be,e as se,a as _t,v as bo}from"./routePaths-DwqXZ9IC.js";import{u as X}from"./useAskAiCfoHostNavButtonProps-SdJdV09H.js";import{c as Fe,b as Co,u as _o}from"./useFetchSuggestedQuestionsWhenReady-1RkvixCJ.js";import ve from"./NotFoundScreen-Du1hgJnA.js";import{t as ba}from"./analyticsHelper-CM7-DzIH.js";import{C as ko}from"./CompanyPassportScreen-Cv1RmmZ2.js";import{F as So}from"./FeaturePreviewScreen-CUAIKz1i.js";import{R as yo}from"./ReferralListScreen-DiGYqmEw.js";import"./recharts-DzFRpM3n.js";import"./analytics-LRXDxB9U.js";import"./plaid-BfLcb-Mu.js";import"./dnd-DjCTgA16.js";import"./stripe-DMRn4zHo.js";import"./lottie-CRrBZj94.js";import"./lexical-BvSd63VE.js";import"./pdf-WyHfBZP8.js";import"./utils-BiDInqYy.js";import"./TransactionDetailScreen-Ci4ZELq0.js";import"./decodeURIComponentSafe-BIE62qI8.js";import"./MobileAppDrawer-DSdJwfd5.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]="204e7fee-13d3-47e2-a38b-bc4ed59ff604",e._sentryDebugIdIdentifier="sentry-dbid-204e7fee-13d3-47e2-a38b-bc4ed59ff604")}catch{}})();const Ao=fa(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=$(),s=B.getSignedInUser(),i=S(I=>I.tenantState.currentTenantId),d=S(I=>L(I)),{tenantEmailDomain:p}=$(),_=q(),g=d?.companyName??"",u={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=C.useMemo(()=>({authParams:u,companyName:g,downloadEndPoint:`${J}/agingDetailedReport`,timezone:Ye()}),[]),m=C.useMemo(()=>r!=null?Gt(r):he(),[r]),h=N(),f=Z(),k=S(I=>qa(I,m,o)),y=C.useCallback(()=>{o!=null&&k.fetchState!=="In-Progress"&&k.fetchState!=="Completed"&&h(Za(o,m))},[m]),b=C.useCallback(()=>{f("../../",{relative:"path"})},[]),A=C.useCallback((I,z)=>{h(wt({sortKey:I,sortOrder:z}))},[]),T=C.useCallback(I=>{h(wt({downloadState:I}))},[]),M=C.useCallback(I=>{if(e)e(I.transactionId,I.transactionType);else if(p!=null){const z=ga({id:I.transactionId,type:I.transactionType},p);f(z);const de=D(_.state?.pathnameStackToGoBack,_.pathname);f(z,{state:{pathnameStackToGoBack:de}})}},[p,e]),F=C.useCallback(()=>{k.vendor!=null&&E.trackApAgingDetail("AP Aging",m.format(K.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),k.vendor.id,k.vendor.name)},[k.vendor,m]);return C.useEffect(()=>{y()},[]),C.useEffect(()=>{k.fetchState==="Completed"&&F()},[F,k.fetchState]),l.jsx(eo,{apAgingDetail:k,downloadParams:c,reportDate:m,analytics:E,onTransactionClick:M,onReload:y,onBackClick:b,onColumnSortConfigChanged:A,updateDownloadStateHandler:T,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),vo=()=>{const e=N(),a=Z(),t=S(A=>Ha(A)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=X({mobileExploreReferrer:"AP Aging"});Fe({isDataReady:t.fetchState==="Completed"});const r=B.getSignedInUser(),s=S(A=>A.tenantState.currentTenantId),i=S(A=>L(A)),d=i?.companyName??"",p={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},_=C.useMemo(()=>({authParams:p,companyName:d,downloadEndPoint:`${J}/agingReport`,timezone:Ye()}),[]),g=t.apAgingUIState.selectedDate??he(),u=C.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(rt(g))},[]);C.useEffect(()=>{u()},[]);const c=C.useCallback(()=>{a("../",{relative:"path"})},[]),m=C.useCallback(A=>{e(je({searchString:A}))},[]),h=C.useCallback((A,T)=>{e(je({sortKey:T,sortOrder:A}))},[]),f=C.useCallback(A=>{a(`./${A}/${g.format(K.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[g]),k=C.useCallback(A=>{e(je({downloadState:A}))},[]),y=C.useCallback((A,T)=>{},[]),b=C.useCallback((A,T)=>{e(je({selectedDate:A,agingDateSelectionType:T})),e(rt(A))},[]);return l.jsxs(l.Fragment,{children:[t.fetchState==="Completed"?l.jsx(we,{analytics:E,onLoad:A=>A.trackPageLoaded(V.Event.agingReport,"AP Aging")}):null,l.jsx(da,{uiState:t.apAgingUIState,report:t,downloadParams:_,analytics:E,onReloadReport:u,onBackClick:c,onSearchTextChange:m,onSortOrderChange:h,onEntityNameClick:f,updateDownloadStateHandler:k,onSelectedDateChanged:b,onNodeCollapseToggled:y,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Eo=fa(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=$(),s=B.getSignedInUser(),i=S(F=>L(F)),{tenantEmailDomain:d}=$(),p=q(),_=i.companyName,g={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},u=C.useMemo(()=>({authParams:g,companyName:_,downloadEndPoint:`${J}/agingDetailedReport`,timezone:Ye()}),[]),c=C.useMemo(()=>r!=null?Gt(r):he(),[r]),m=N(),h=Z(),f=S(F=>Qa(F,c,o)),k=C.useCallback(()=>{o!=null&&f.fetchState!=="In-Progress"&&f.fetchState!=="Completed"&&m(Ja(o,c))},[c]),y=C.useCallback(()=>{h("../../",{relative:"path"})},[]),b=C.useCallback((F,I)=>{m(Dt({sortKey:F,sortOrder:I}))},[]),A=C.useCallback(F=>{m(Dt({downloadState:F}))},[]),T=C.useCallback(F=>{if(e)e(F.transactionId,F.transactionType);else if(d!=null){const I=ga({id:F.transactionId,type:F.transactionType},d);h(I);const z=D(p.state?.pathnameStackToGoBack,p.pathname);h(I,{state:{pathnameStackToGoBack:z}})}},[d,e]),M=C.useCallback(()=>{f.customer!=null&&E.trackArAgingDetail("AR Aging",c.format(K.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),f.customer.id,f.customer.name)},[f.customer,c]);return C.useEffect(()=>{k()},[]),C.useEffect(()=>{f.fetchState==="Completed"&&M()},[f.fetchState,M]),l.jsx(to,{arAgingDetail:f,downloadParams:u,reportDate:c,analytics:E,onTransactionClick:T,onReload:k,onBackClick:y,onColumnSortConfigChanged:b,updateDownloadStateHandler:A,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),Io=()=>{const e=N(),a=Z(),t=S(b=>Xa(b)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=X({mobileExploreReferrer:"AR Aging"});Fe({isDataReady:t.fetchState==="Completed"});const r=B.getSignedInUser(),s=S(b=>L(b)),i=s.companyName,d={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},p=C.useMemo(()=>({authParams:d,companyName:i,downloadEndPoint:`${J}/agingReport`,timezone:Ye()}),[]),_=t.arAgingUIState.selectedDate??he(),g=C.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(it(_))},[]);C.useEffect(()=>{g()},[]);const u=C.useCallback(()=>{a("../",{relative:"path"})},[]),c=C.useCallback(b=>{e(Me({searchString:b}))},[]),m=C.useCallback((b,A)=>{e(Me({sortKey:A,sortOrder:b}))},[]),h=C.useCallback(b=>{a(`./${b}/${_.format(K.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[_]),f=C.useCallback(b=>{e(Me({downloadState:b}))},[]),k=C.useCallback((b,A)=>{e(Me({selectedDate:b,agingDateSelectionType:A})),e(it(b))},[]),y=C.useCallback((b,A)=>{e(Wa({nodeId:b,isCollapsed:A}))},[]);return l.jsxs(l.Fragment,{children:[t.fetchState==="Completed"?l.jsx(we,{analytics:E,onLoad:b=>b.trackPageLoaded(V.Event.agingReport,"AR Aging")}):null,l.jsx(da,{uiState:t.arAgingUIState,report:t,downloadParams:p,analytics:E,onReloadReport:g,onBackClick:u,onSearchTextChange:c,onSortOrderChange:m,onEntityNameClick:h,updateDownloadStateHandler:f,onSelectedDateChanged:k,onNodeCollapseToggled:y,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Ca=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function _a(e,a){const t=an(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=be(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(nn(n,o))},onPromoCardBtnClick:n=>{if(a.isZeniAccountsAdmin){let o=`../../checking/${n}`;n?E.trackZeniAccountsCashBalancePromoClicked("Move Money"):(E.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 E.trackZeniAccountsCashBalancePromoClicked("Learn More"),window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}const To=Q(function(e){const a=en(e).accountsInOrder.map((n,o)=>Ca(n,o)),t=tn(e);return{sectionTitle:K.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:E}},_a)(ua),xo=Q(function(e){const a=on(e).accountsInOrder.map((o,r)=>Ca(o,r)),t=B.getSignedInUser(),n=Ee(t);return{sectionTitle:K.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:E}},_a)(ua);function wo(){const e=Z(),a=q(),{tenantEmailDomain:t}=$(),n=De(),o=S(s=>L(s).company?.companyInfo.firstMonthOfFY??1),r=lt(n?.loggedInUserRoleMap);return S(s=>s.cashBalanceState.fetchState)==="Error"?l.jsx(ve,{}):l.jsx(To,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function Do(){const e=Z(),a=q(),{tenantEmailDomain:t}=$(),n=De(),o=lt(n?.loggedInUserRoleMap),r=S(s=>L(s).company?.companyInfo.firstMonthOfFY??1);return S(s=>s.cardBalanceState.fetchState)==="Error"?l.jsx(ve,{}):l.jsx(xo,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const Fo=Ct.div`
|
|
1
|
+
import{j as l}from"./liveblocks-C_VE9Mu9.js";import{l as $,g as S,u as q,h as N,j as Z,k as Q,s as Ka,n as st,o as w}from"./core-B2Hxdfie.js";import{eO as L,K8 as Ye,bD as Gt,bq as he,Ll as qa,i0 as Za,Lm as wt,Ln as Ha,i3 as rt,Lo as je,Lp as Qa,i8 as Ja,Lq as Dt,Lr as Xa,ic as it,Ls as Me,Lt as Wa,ck as lt,Lu as en,Lv as tn,Ks as an,j6 as nn,Lw as on,bn as Ee,Lx as Nt,JY as ae,bc as zt,jk as $t,mD as Kt,j3 as qt,J_ as ne,JZ as H,f3 as sn,eL as rn,fl as cn,Ly as ln,Lz as dn,LA as Zt,LB as _e,tR as Ie,tS as Te,ud as fe,u7 as oe,tW as xe,LC as un,LD as mn,LE as pn,LF as Ht,LG as ke,LH as hn,dC as Ve,qm as Qt,LI as fn,LJ as gn,LK as bn,LL as dt,Jl as ut,jA as ge,ul as mt,qu as Cn,LM as _n,tT as Ft,qp as me,ql as Jt,LN as ie,LO as kn,LP as pt,Jj as ht,st as Xt,LQ as Sn,LR as yn,LS as An,LT as ft,sG as vn,LU as En,tV as Ot,ss as Wt,LV as ce,LW as In,bv as ea,up as ta,LX as Tn,LY as xn,LZ as wn,L_ as gt,uk as Dn,L$ as Fn,tU as Pt,uo as aa,M0 as le,M1 as On,M2 as Pn,M3 as na,jp as oa,mA as sa,ju as ra,my as ia,mx as ca,mw as la,rR as Rn,fb as Bn,cN as Ln,cO as jn,mt as Mn,f7 as Un,mK as Yn,Dt as Rt,M4 as Vn,M5 as Gn,M6 as Nn,M7 as zn,b5 as bt,e_ as $n,gK as Kn,fC as qn,mE as Zn,iY as Hn,mB as Qn,mz as Jn,eU as Xn,eS as Wn}from"./zeni-epic-state-BZK5iHMQ.js";import{z as B,Y as J,r as D,c as E,D as K,aR as eo,A as we,aS as da,e as V,aT as to,k as De,aU as ua,y as Ge,S as j,m as ao,aV as no,aW as oo,U as ma,Z as so,a as pa,a1 as ro,aK as ha,aX as io,aY as co,X as lo,aZ as uo,a_ as mo,an as po,q as ho,V as fo,a$ as go,b0 as ye}from"./index-BsI-BcOG.js";import{n as Ct}from"./mui-tg9Pwou2.js";import{a as C}from"./sentry-Byikl8iY.js";import{w as fa}from"./withTransactionSidePanel-CxundvVG.js";import{b as ga,t as be,e as se,a as _t,v as bo}from"./routePaths-BtZYDC_i.js";import{u as X}from"./useAskAiCfoHostNavButtonProps-kK55rQTy.js";import{c as Fe,b as Co,u as _o}from"./useFetchSuggestedQuestionsWhenReady-D_ChcTLo.js";import ve from"./NotFoundScreen-Bgm7QovY.js";import{t as ba}from"./analyticsHelper-kA_46WRt.js";import{C as ko}from"./CompanyPassportScreen-DhxtS0hb.js";import{F as So}from"./FeaturePreviewScreen-BTGMWD-c.js";import{R as yo}from"./ReferralListScreen-V548TPRB.js";import"./recharts-Ep8XanlT.js";import"./analytics-CYMgeTT5.js";import"./plaid-B_jGdYrM.js";import"./dnd-ChJsuxMK.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL0TkQBF.js";import"./lexical-WK6PZ_Fc.js";import"./pdf-DJRvlcHv.js";import"./utils-KJcQ4RjB.js";import"./TransactionDetailScreen-Dufv1-Zd.js";import"./decodeURIComponentSafe-BcAs3k9x.js";import"./MobileAppDrawer-uxmqh_ak.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]="204e7fee-13d3-47e2-a38b-bc4ed59ff604",e._sentryDebugIdIdentifier="sentry-dbid-204e7fee-13d3-47e2-a38b-bc4ed59ff604")}catch{}})();const Ao=fa(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=$(),s=B.getSignedInUser(),i=S(I=>I.tenantState.currentTenantId),d=S(I=>L(I)),{tenantEmailDomain:p}=$(),_=q(),g=d?.companyName??"",u={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=C.useMemo(()=>({authParams:u,companyName:g,downloadEndPoint:`${J}/agingDetailedReport`,timezone:Ye()}),[]),m=C.useMemo(()=>r!=null?Gt(r):he(),[r]),h=N(),f=Z(),k=S(I=>qa(I,m,o)),y=C.useCallback(()=>{o!=null&&k.fetchState!=="In-Progress"&&k.fetchState!=="Completed"&&h(Za(o,m))},[m]),b=C.useCallback(()=>{f("../../",{relative:"path"})},[]),A=C.useCallback((I,z)=>{h(wt({sortKey:I,sortOrder:z}))},[]),T=C.useCallback(I=>{h(wt({downloadState:I}))},[]),M=C.useCallback(I=>{if(e)e(I.transactionId,I.transactionType);else if(p!=null){const z=ga({id:I.transactionId,type:I.transactionType},p);f(z);const de=D(_.state?.pathnameStackToGoBack,_.pathname);f(z,{state:{pathnameStackToGoBack:de}})}},[p,e]),F=C.useCallback(()=>{k.vendor!=null&&E.trackApAgingDetail("AP Aging",m.format(K.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),k.vendor.id,k.vendor.name)},[k.vendor,m]);return C.useEffect(()=>{y()},[]),C.useEffect(()=>{k.fetchState==="Completed"&&F()},[F,k.fetchState]),l.jsx(eo,{apAgingDetail:k,downloadParams:c,reportDate:m,analytics:E,onTransactionClick:M,onReload:y,onBackClick:b,onColumnSortConfigChanged:A,updateDownloadStateHandler:T,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),vo=()=>{const e=N(),a=Z(),t=S(A=>Ha(A)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=X({mobileExploreReferrer:"AP Aging"});Fe({isDataReady:t.fetchState==="Completed"});const r=B.getSignedInUser(),s=S(A=>A.tenantState.currentTenantId),i=S(A=>L(A)),d=i?.companyName??"",p={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},_=C.useMemo(()=>({authParams:p,companyName:d,downloadEndPoint:`${J}/agingReport`,timezone:Ye()}),[]),g=t.apAgingUIState.selectedDate??he(),u=C.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(rt(g))},[]);C.useEffect(()=>{u()},[]);const c=C.useCallback(()=>{a("../",{relative:"path"})},[]),m=C.useCallback(A=>{e(je({searchString:A}))},[]),h=C.useCallback((A,T)=>{e(je({sortKey:T,sortOrder:A}))},[]),f=C.useCallback(A=>{a(`./${A}/${g.format(K.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[g]),k=C.useCallback(A=>{e(je({downloadState:A}))},[]),y=C.useCallback((A,T)=>{},[]),b=C.useCallback((A,T)=>{e(je({selectedDate:A,agingDateSelectionType:T})),e(rt(A))},[]);return l.jsxs(l.Fragment,{children:[t.fetchState==="Completed"?l.jsx(we,{analytics:E,onLoad:A=>A.trackPageLoaded(V.Event.agingReport,"AP Aging")}):null,l.jsx(da,{uiState:t.apAgingUIState,report:t,downloadParams:_,analytics:E,onReloadReport:u,onBackClick:c,onSearchTextChange:m,onSortOrderChange:h,onEntityNameClick:f,updateDownloadStateHandler:k,onSelectedDateChanged:b,onNodeCollapseToggled:y,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Eo=fa(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=$(),s=B.getSignedInUser(),i=S(F=>L(F)),{tenantEmailDomain:d}=$(),p=q(),_=i.companyName,g={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},u=C.useMemo(()=>({authParams:g,companyName:_,downloadEndPoint:`${J}/agingDetailedReport`,timezone:Ye()}),[]),c=C.useMemo(()=>r!=null?Gt(r):he(),[r]),m=N(),h=Z(),f=S(F=>Qa(F,c,o)),k=C.useCallback(()=>{o!=null&&f.fetchState!=="In-Progress"&&f.fetchState!=="Completed"&&m(Ja(o,c))},[c]),y=C.useCallback(()=>{h("../../",{relative:"path"})},[]),b=C.useCallback((F,I)=>{m(Dt({sortKey:F,sortOrder:I}))},[]),A=C.useCallback(F=>{m(Dt({downloadState:F}))},[]),T=C.useCallback(F=>{if(e)e(F.transactionId,F.transactionType);else if(d!=null){const I=ga({id:F.transactionId,type:F.transactionType},d);h(I);const z=D(p.state?.pathnameStackToGoBack,p.pathname);h(I,{state:{pathnameStackToGoBack:z}})}},[d,e]),M=C.useCallback(()=>{f.customer!=null&&E.trackArAgingDetail("AR Aging",c.format(K.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),f.customer.id,f.customer.name)},[f.customer,c]);return C.useEffect(()=>{k()},[]),C.useEffect(()=>{f.fetchState==="Completed"&&M()},[f.fetchState,M]),l.jsx(to,{arAgingDetail:f,downloadParams:u,reportDate:c,analytics:E,onTransactionClick:T,onReload:k,onBackClick:y,onColumnSortConfigChanged:b,updateDownloadStateHandler:A,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),Io=()=>{const e=N(),a=Z(),t=S(b=>Xa(b)),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=X({mobileExploreReferrer:"AR Aging"});Fe({isDataReady:t.fetchState==="Completed"});const r=B.getSignedInUser(),s=S(b=>L(b)),i=s.companyName,d={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},p=C.useMemo(()=>({authParams:d,companyName:i,downloadEndPoint:`${J}/agingReport`,timezone:Ye()}),[]),_=t.arAgingUIState.selectedDate??he(),g=C.useCallback(()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(it(_))},[]);C.useEffect(()=>{g()},[]);const u=C.useCallback(()=>{a("../",{relative:"path"})},[]),c=C.useCallback(b=>{e(Me({searchString:b}))},[]),m=C.useCallback((b,A)=>{e(Me({sortKey:A,sortOrder:b}))},[]),h=C.useCallback(b=>{a(`./${b}/${_.format(K.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[_]),f=C.useCallback(b=>{e(Me({downloadState:b}))},[]),k=C.useCallback((b,A)=>{e(Me({selectedDate:b,agingDateSelectionType:A})),e(it(b))},[]),y=C.useCallback((b,A)=>{e(Wa({nodeId:b,isCollapsed:A}))},[]);return l.jsxs(l.Fragment,{children:[t.fetchState==="Completed"?l.jsx(we,{analytics:E,onLoad:b=>b.trackPageLoaded(V.Event.agingReport,"AR Aging")}):null,l.jsx(da,{uiState:t.arAgingUIState,report:t,downloadParams:p,analytics:E,onReloadReport:g,onBackClick:u,onSearchTextChange:c,onSortOrderChange:m,onEntityNameClick:h,updateDownloadStateHandler:f,onSelectedDateChanged:k,onNodeCollapseToggled:y,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Ca=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function _a(e,a){const t=an(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=be(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(nn(n,o))},onPromoCardBtnClick:n=>{if(a.isZeniAccountsAdmin){let o=`../../checking/${n}`;n?E.trackZeniAccountsCashBalancePromoClicked("Move Money"):(E.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 E.trackZeniAccountsCashBalancePromoClicked("Learn More"),window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}const To=Q(function(e){const a=en(e).accountsInOrder.map((n,o)=>Ca(n,o)),t=tn(e);return{sectionTitle:K.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:E}},_a)(ua),xo=Q(function(e){const a=on(e).accountsInOrder.map((o,r)=>Ca(o,r)),t=B.getSignedInUser(),n=Ee(t);return{sectionTitle:K.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:E}},_a)(ua);function wo(){const e=Z(),a=q(),{tenantEmailDomain:t}=$(),n=De(),o=S(s=>L(s).company?.companyInfo.firstMonthOfFY??1),r=lt(n?.loggedInUserRoleMap);return S(s=>s.cashBalanceState.fetchState)==="Error"?l.jsx(ve,{}):l.jsx(To,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function Do(){const e=Z(),a=q(),{tenantEmailDomain:t}=$(),n=De(),o=lt(n?.loggedInUserRoleMap),r=S(s=>L(s).company?.companyInfo.firstMonthOfFY??1);return S(s=>s.cardBalanceState.fetchState)==="Error"?l.jsx(ve,{}):l.jsx(xo,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const Fo=Ct.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-C_VE9Mu9.js";import{a as u}from"./sentry-Byikl8iY.js";import{h as y,g as b,k as w,u as A,N as k}from"./core-B2Hxdfie.js";import{IO as N,eO as _,fj as U,IP as L,mv as O,IQ as R}from"./zeni-epic-state-BZK5iHMQ.js";import{u as z,z as f,L as T,t as S,D as j,b as $}from"./index-BsI-BcOG.js";import"./mui-tg9Pwou2.js";import{t as P}from"./getLocaleForTenant-BC4keiZu.js";import"./recharts-Ep8XanlT.js";import"./analytics-CYMgeTT5.js";import"./plaid-B_jGdYrM.js";import"./dnd-ChJsuxMK.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL0TkQBF.js";import"./lexical-WK6PZ_Fc.js";import"./pdf-DJRvlcHv.js";import"./utils-KJcQ4RjB.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]="ba04bac4-2a9e-46f5-a872-db8f8cb6a481",t._sentryDebugIdIdentifier="sentry-dbid-ba04bac4-2a9e-46f5-a872-db8f8cb6a481")}catch{}})();const Q=w(function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:R(t).tenantsInOrder}})(function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=A(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map(l=>l.tenantEmailDomain),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,I=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce((l,F)=>l||i.split("/").find(D=>D===F)!=null,!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,I=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=$(c,p);return v.jsx(k,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:I}})}});function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=z(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b(e=>N(e)),n=b(e=>e.tenantState.fetchState),i=b(e=>e.tenantState.error),a=b(e=>e.tenantState.activeTenantFetchState.fetchState),c=b(e=>_(e)),d=f.getSignedInUser();return u.useLayoutEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)},[a,n]),u.useEffect(()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&S.shouldFetchActiveTenant(e)&&(h.current=!0,S.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,I=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&I&&S.shouldFetchAllTenants()&&(r.current=!0,S.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!L(i))&&t(O(e.userId)))},[n,a,i,d,t]),u.useEffect(()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())},[m.tenantsCoreDetailsInOrder,n]),u.useEffect(()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(j.updateAppLocaleID(P(c)),o())},[n,a,c]),v.jsx(Q,{})}const q=["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"],G={"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 q)if(t.toLocaleLowerCase().includes(s))return G[s]}export{oe as default};
|
package/dist/assets/{DomesticWireDetailScreen-Da3AjbNa.js → DomesticWireDetailScreen-7xR18qFa.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-
|
|
1
|
+
import{j as l}from"./liveblocks-C_VE9Mu9.js";import{j as w,u as C,g as h,k as A,l as B}from"./core-B2Hxdfie.js";import{MR as k,MY as _,fA as q,fz as J,fy as Q,ix as W,JZ as Y,pF as K,eO as V,Mn as D,iv as F,MS as S,M$ as T,it as G,iQ as j}from"./zeni-epic-state-BZK5iHMQ.js";import{bn as L,Z as R,y as N,z as U,m as Z,q as p,S as v,B as M,bo as X,o as O,bp as ee,r as te}from"./index-BsI-BcOG.js";import{n as z}from"./mui-tg9Pwou2.js";import"./sentry-Byikl8iY.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]="fdd81e04-3809-4f55-bf92-f2f5e0c8cccf",e._sentryDebugIdIdentifier="sentry-dbid-fdd81e04-3809-4f55-bf92-f2f5e0c8cccf")}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(Y("common")),n!=null&&e(K(n))},onGetOtp:n=>{e(Q(n,"BillPayVendor"))},onResendOtp:n=>{e(J(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(q(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(_(n,a,o))}}})(L);function H({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=z.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as i}from"./liveblocks-
|
|
1
|
+
import{j as i}from"./liveblocks-C_VE9Mu9.js";import{Z as c,G as l,m as f}from"./index-BsI-BcOG.js";import{D as b}from"./mui-tg9Pwou2.js";import"./sentry-Byikl8iY.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]="b26b4ae4-0c9b-47d2-a9ac-ad4f0f5041c7",e._sentryDebugIdIdentifier="sentry-dbid-b26b4ae4-0c9b-47d2-a9ac-ad4f0f5041c7")}catch{}})();const p={drawerLeftMargin:new l(0,0,240)};function m(e){const{isOpen:r,drawerLeftMargin:o,children:n,onClose:t}=e,a=c(),s=o?.valuePx(a)??p.drawerLeftMargin.valuePx(a),d=f();return i.jsx(b,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:t,children:n})}export{m as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-C_VE9Mu9.js";import{a as d}from"./sentry-Byikl8iY.js";import{j as B,h as q,u as G,l as O,g as l,N as F,k as _,n as N,o as z}from"./core-B2Hxdfie.js";import{L4 as H,eO as J,Kt as K,kA as Y,H2 as I,L9 as L,JY as M,jA as R,H3 as S,Ky as W,Kz as $,J_ as V,JZ as Z}from"./zeni-epic-state-BZK5iHMQ.js";import{aO as Q,c as U,q as X,r as tt}from"./index-BsI-BcOG.js";import"./mui-tg9Pwou2.js";import{d as k}from"./decodeURIComponentSafe-BcAs3k9x.js";import{w as et}from"./withTransactionSidePanel-CxundvVG.js";import{e as at,b as nt}from"./routePaths-BtZYDC_i.js";import"./recharts-Ep8XanlT.js";import"./analytics-CYMgeTT5.js";import"./plaid-B_jGdYrM.js";import"./dnd-ChJsuxMK.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL0TkQBF.js";import"./lexical-WK6PZ_Fc.js";import"./pdf-DJRvlcHv.js";import"./utils-KJcQ4RjB.js";import"./useAskAiCfoHostNavButtonProps-kK55rQTy.js";import"./useFetchSuggestedQuestionsWhenReady-D_ChcTLo.js";import"./TransactionDetailScreen-Dufv1-Zd.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]="e8113482-b712-4f29-92dd-883e15d83473",a._sentryDebugIdIdentifier="sentry-dbid-e8113482-b712-4f29-92dd-883e15d83473")}catch{}})();const ot=_(function(a,t){const e=t.entity,o=L(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:M(a,"common")},trendWithTransactionsReport:o,analytics:U,isAccountingClassesEnabled:R(a)}},function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,c=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:c}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(V({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(Z("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(W()),a($()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=X(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??b();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(I(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}})(Q),it=et(function({entityType:a,...t}){const e=B(),o=q(),c=G(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:j,entityNameEncoded:w}=O(),r=k(j??""),p=k(w??""),u=rt(r,p),x=[r,p].filter(n=>n!=null),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=l(n=>H(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),v=l(n=>J(n).company?.companyInfo.firstMonthOfFY??1),f=l(n=>K(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&u===!0&&(T(!0),o(Y(i)))},[m,u,i]);const E=l(n=>n.trendState.fetchState),P=f?.selectedPeriod?.timePeriod??g,A=function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y}(f?.selectedPeriod?.timePeriod,g);return d.useEffect(()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(I(i,"EntityDetail",{timeframe:f?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))},[m,h,E]),u?s.jsx(ot,{firstMonthOfFY:v,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:A,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(F,{to:b(x.length)})}),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,b=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function wt({entityType:a}){return s.jsx(N,{children:s.jsx(z,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{wt as EntityDetailRoutes,wt as default};
|
package/dist/assets/{ExpenseAutomationRoutes-UwZsuZMU.js → ExpenseAutomationRoutes-0hG_n7Gy.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as C}from"./liveblocks-
|
|
1
|
+
import{j as C}from"./liveblocks-C_VE9Mu9.js";import xn from"./NotFoundScreen-Bgm7QovY.js";import{a,b as Tt}from"./sentry-Byikl8iY.js";import{n as Fe,S as Rn}from"./mui-tg9Pwou2.js";import{h as ce,j as wt,u as qe,g as U,k as Dn,l as rt,n as Un,o as Le}from"./core-B2Hxdfie.js";import{eO as Re,Po as Fn,mF as Se,fe as Bn,qg as _n,mX as xt,ng as Rt,Pp as Dt,nq as Vn,Pq as Ut,mQ as Mn,pO as On,eZ as pe,Pr as De,sm as Ft,Bx as Bt,Ps as _t,Pt as jn,pt as Je,L5 as dt,L7 as Ln,jD as zn,L8 as $n,jK as Gn,cV as qn,tp as Ne,n1 as Vt,nv as Ue,Pu as Jn,J_ as ut,JZ as Te,Pv as mt,j$ as Nn,Pw as Yn,Px as Kn,Py as Qn,Pz as Zn,n8 as Hn,mV as ie,ny as we,PA as Wn,PB as Xn,PC as ea,nF as ta,jO as na,jF as aa,PD as oa,jN as ht,Lf as sa,PE as ca,PF as ia,pp as la,p4 as ra,nw as ge,p3 as ze,PG as da,PH as ua,li as ma,bq as ha,ld as pt,k$ as pa,PI as ga,gM as gt,fQ as Ca,la as Sa,vi as fa,PJ as Ia,o4 as ka,n$ as Ea,o3 as va,nQ as ya,PK as Pa,f0 as Mt,nj as ba,n4 as Aa,ff as Ct,nA as Ta,PL as wa,nx as Ot,PM as xa,PN as Ra,PO as Da,PP as Ua,PQ as St,pB as Fa,oW as Ba,JY as _a,jM as Va,PR as Ma,G3 as Oa,jL as ja,jA as La,e$ as za,ov as jt,oO as $a,nu as ft,nz as Ga,bD as qa,l7 as Ja,l4 as Na,PS as Ya,nP as It,oM as kt,oK as Ka,oA as Qa,of as Za,oN as Ha,PT as Wa,PU as Xa,oj as eo,PV as to,o9 as no,oi as ao,og as oo,oR as so}from"./zeni-epic-state-BZK5iHMQ.js";import{y as Lt,S as Ce,c as L,r as Z,V as zt,cw as co,z as Be,cx as io,aq as xe,cy as lo,aQ as Et,B as $t,cz as ro,an as $e,D as uo,cA as mo,Y as ho,cB as po,U as go,cC as Co,cD as So,w as fo,k as Io,aK as ko,b1 as Eo,G as vo,cE as yo}from"./index-BsI-BcOG.js";import{u as Gt}from"./useAskAiCfoHostNavButtonProps-kK55rQTy.js";import{c as qt}from"./useFetchSuggestedQuestionsWhenReady-D_ChcTLo.js";import{c as vt,C as Po}from"./TransactionDetailScreen-Dufv1-Zd.js";import{w as bo}from"./withTransactionSidePanel-CxundvVG.js";import{h as Ao,v as To}from"./routePaths-BtZYDC_i.js";import{g as Ge}from"./accountMappingHelper-BkNWBFnf.js";import{D as wo}from"./DrawerScreen-Bfal1rIA.js";import"./recharts-Ep8XanlT.js";import"./analytics-CYMgeTT5.js";import"./plaid-B_jGdYrM.js";import"./dnd-ChJsuxMK.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL0TkQBF.js";import"./lexical-WK6PZ_Fc.js";import"./pdf-DJRvlcHv.js";import"./utils-KJcQ4RjB.js";import"./decodeURIComponentSafe-BcAs3k9x.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]="4417dc45-f699-40ff-9924-08e3a72e6cfb",t._sentryDebugIdIdentifier="sentry-dbid-4417dc45-f699-40ff-9924-08e3a72e6cfb")}catch{}})();const xo=()=>{const t=ce(),i=wt(),b=qe(),I=U(d=>Re(d)),{useFeatureGate:E}=Lt(),{isFeatureEnabled:g}=E(Ce.isRealtimeInsightsFeatureEnabled),u=U(d=>d.expenseAutomationViewState.selectedPeriodByTenantId),o=U(d=>Fn(d,I.tenantId)),{isAiCfoAccessEnabled:v,onAskAiCfoClick:S}=Gt({mobileExploreReferrer:"Month-End Close Overview"}),m=a.useCallback((d,R,K=!1)=>{t(Se({tenantId:R,period:{month:d.month,year:d.year},refreshViewInBackground:K}))},[]),y=a.useCallback(d=>{const R=b.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&L.trackMonthCloseAuditPage(d.month,d.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,R??null),t(Bn(I.tenantId,d))},[I.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),r=u[I.tenantId],B=a.useCallback(()=>{const d=b.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&L.trackMonthCloseAuditPage(r.month,r.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),m(r,I.tenantId,!0)},[m,r,I.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),h=Z(b.state?.pathnameStackToGoBack,b.pathname),A=a.useCallback(()=>{if(o.monthEndCloseChecks!=null&&r!=null){const d=o.monthEndCloseChecks.monthEndCloseCheckList.find(R=>R.progress<100);if(d!=null)return void i(`./${d.id}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview"}});i(`./month_end_insights/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview"}})}},[o.monthEndCloseChecks,r]),{areTenantIdsInSync:f}=zt();return qt({isDataReady:o.fetchState==="Completed"}),a.useEffect(()=>{r!=null&&o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&f&&m(r,I.tenantId)},[m,r,o.fetchState,I.tenantId,f]),a.useEffect(()=>{r!=null&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&f&&t(_n(r))},[r,o.monthClosePerformanceTrendFetchStatus.fetchState,f]),a.useEffect(()=>{const d=setInterval(()=>{o.fetchState!=="In-Progress"&&o.fetchState==="Completed"&&B()},3e5);return()=>clearInterval(d)},[o.fetchState]),a.useEffect(()=>{if(o.fetchState==="Completed"&&o.monthEndCloseChecks?.auditSummary!=null){const d=b.state?.referrer;L.trackMonthCloseAuditPage(o.selectedPeriod.month,o.selectedPeriod.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null)}},[o.fetchState,o.selectedPeriod,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),C.jsx(Ro,{children:C.jsx(co,{monthEndCloseChecksView:o,isRealtimeInsightsFeatureEnabled:g,onMonthEndCheckClick:d=>{i(`./${d}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:h,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:y,handleReviewButtonClick:A,onBackClick:()=>{i("../../dashboard")},onReload:B,isAiCfoAccessEnabled:v,onAskAiCfoClick:S})})},Ro=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-C_VE9Mu9.js";import{a as r}from"./sentry-Byikl8iY.js";import{_ as i,$ as f,a0 as l,q as p}from"./index-BsI-BcOG.js";import"./mui-tg9Pwou2.js";import m from"./NotFoundScreen-Bgm7QovY.js";import{j as u,u as b}from"./core-B2Hxdfie.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]="96d23c27-0578-4d73-aa34-ffc8c19889b7",e._sentryDebugIdIdentifier="sentry-dbid-96d23c27-0578-4d73-aa34-ffc8c19889b7")}catch{}})();const j=()=>{const e=u(),a=b(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),d=r.useCallback(()=>{(()=>{const n=p(a.state?.pathnameStackToGoBack),c=n.poppedPathname??k();e(c,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=i(a.pathname);return o!=null?s.jsx(f,{menuItem:l(o),onDemoClick:t,onGoBack:d}):s.jsx(m,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{j as F};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{a as r}from"./sentry-
|
|
1
|
+
import{a as r}from"./sentry-Byikl8iY.js";import{h as l,j as f,u as m}from"./core-B2Hxdfie.js";import{gt as p,Ja as g,Jb as b}from"./zeni-epic-state-BZK5iHMQ.js";import{u as _,L as h,z as y}from"./index-BsI-BcOG.js";import"./liveblocks-C_VE9Mu9.js";import"./recharts-Ep8XanlT.js";import"./mui-tg9Pwou2.js";import"./analytics-CYMgeTT5.js";import"./plaid-B_jGdYrM.js";import"./dnd-ChJsuxMK.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL0TkQBF.js";import"./lexical-WK6PZ_Fc.js";import"./pdf-DJRvlcHv.js";import"./utils-KJcQ4RjB.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]="768ad7e3-0477-4b5f-8592-ca18cc93b2ab",e._sentryDebugIdIdentifier="sentry-dbid-768ad7e3-0477-4b5f-8592-ca18cc93b2ab")}catch{}})();function C(){const e=l(),n=f(),o=m(),{setLoading:i,clearAllLoading:d}=_(),a=r.useRef(!1);return r.useLayoutEffect(()=>{i(h.CONNECTION_AUTH)},[i]),r.useEffect(()=>{if(a.current)return;a.current=!0;const s=new URLSearchParams(o.search).get("code"),c=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),s!=null&&c!=null){const t=JSON.parse(c);e(p(t.tenant_id,t.connection_id,g("revenue"),b("hubspot"),{authorization_code:s,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}d();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})},[]),null}export{C as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as t}from"./liveblocks-
|
|
1
|
+
import{j as t}from"./liveblocks-C_VE9Mu9.js";import{l as S,k as x,j as C,u as y,h as ee,q as te,g as E,N as ae,n as ne,o as p}from"./core-B2Hxdfie.js";import{J3 as k,J4 as v,J5 as T,z8 as B,yW as G,J6 as D,J7 as oe,J8 as ie,y_ as se,eP as $,z5 as le,z2 as re}from"./zeni-epic-state-BZK5iHMQ.js";import{Z as g,o as r,n as de,c as j,f as J,p as ce,q as me,F as pe,r as M,y as ue,S as he,N as xe,w as ge,m as fe,x as we,B as be,A as Se,i as ye,C as ke,E as ve,G as je,H as $e}from"./index-BsI-BcOG.js";import{n as m}from"./mui-tg9Pwou2.js";import f from"./NotFoundScreen-Bgm7QovY.js";import{a as I}from"./sentry-Byikl8iY.js";import"./recharts-Ep8XanlT.js";import"./analytics-CYMgeTT5.js";import"./plaid-B_jGdYrM.js";import"./dnd-ChJsuxMK.js";import"./stripe-DMRn4zHo.js";import"./lottie-DL0TkQBF.js";import"./lexical-WK6PZ_Fc.js";import"./pdf-DJRvlcHv.js";import"./utils-KJcQ4RjB.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]="51c37753-935c-457b-8d2b-c795df1940a9",e._sentryDebugIdIdentifier="sentry-dbid-51c37753-935c-457b-8d2b-c795df1940a9")}catch{}})();const Ie=m.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|