@zeniai/web-app-ui 5.0.45-next → 5.0.45-prod
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-CFoMHtSx.js +1 -0
- package/dist/assets/{AddressScreen-BMzElnPN.js → AddressScreen-CQqDQYzZ.js} +1 -1
- package/dist/assets/{AiCfoScreen-qrZZj4eS.js → AiCfoScreen-O0x2PbNJ.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-BCAhIi_G.js → BillPayApprovalRoutes-T2plN4Qo.js} +1 -1
- package/dist/assets/{BillPayRoutes-CWaYXNJy.js → BillPayRoutes-BhuXCZc0.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-s19Xn8G4.js → BusinessVerificationPageScreen-37mIDOgw.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-C9s4Nh4o.js → ChargeCardRoutes-WhGYYg9j.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-CCAj18my.js → CompanyPassportScreen-Cq-jjy6A.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-B8GDqDCW.js → ConnectionAuthScreen-B3reNI5c.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-CUaR2XYD.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-CL4UjR27.js → CustomerOnboardingRoutes-dfzGdY89.js} +1 -1
- package/dist/assets/{DashboardRoutes-DjDCtzYY.js → DashboardRoutes-vtbifwbj.js} +1 -1
- package/dist/assets/{DefaultTenantHome-fzK85sak.js → DefaultTenantHome-CqFt3zN0.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-CpcHl85M.js → DomesticWireDetailScreen-D-pyPi8Z.js} +1 -1
- package/dist/assets/{DrawerScreen-BTWAnel_.js → DrawerScreen-Da9xfeW6.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-aRHzZYPY.js → EntityDetailRoutes-DLRriFm0.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-BWI_01WU.js → ExpenseAutomationRoutes-BPgb9AW4.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-Dv0X4e82.js → FeaturePreviewScreen-CDLU6W9q.js} +1 -1
- package/dist/assets/{MagicLinkRoutes-CPhR_Xtw.js → MagicLinkRoutes-CUqPG7F6.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-BCokp4DR.js → MagicLinkSignInScreen-DUSVM9vN.js} +1 -1
- package/dist/assets/{MobileAppDrawer-B-X4LQ1O.js → MobileAppDrawer-CxhHSpBC.js} +1 -1
- package/dist/assets/NotFoundScreen-BiC86yKG.js +1 -0
- package/dist/assets/{NotificationRoutes-CgtKUsxH.js → NotificationRoutes-BNIIfrNw.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-8dH78fbi.js → PandLWithForecastRoutes-DdkKmjNn.js} +1 -1
- package/dist/assets/{PeopleRoutes-CrHusDbp.js → PeopleRoutes-9f80fdDb.js} +1 -1
- package/dist/assets/{PerformanceRoutes-BVKtQ8Ka.js → PerformanceRoutes-Cwy07sjV.js} +1 -1
- package/dist/assets/{Preview-1jhjHyxQ.js → Preview-BvQqk6BT.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-tS3XktTG.js → QBOConnectionScreen-CB_EMg8L.js} +1 -1
- package/dist/assets/{ReferralListScreen-DMSwhuSJ.js → ReferralListScreen-C1K9Itgb.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-DBh2KZ4K.js → ReimbursementApprovalRoutes-BYfwitKD.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CD0zr_A3.js → ReimbursementApprovalRuleDetailScreen-CpHfZhjo.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-B2_Ut1ww.js → ReimbursementRoutes-DSpoK8fs.js} +1 -1
- package/dist/assets/{ReportsRoutes-OiswXAqg.js → ReportsRoutes-pJaY6-Sg.js} +1 -1
- package/dist/assets/{RewardsRoutes-BrjuayHx.js → RewardsRoutes-BXMmA6Z4.js} +1 -1
- package/dist/assets/{ScreenRoutes-BRRei_Gs.js → ScreenRoutes-C4QHxmGo.js} +2 -2
- package/dist/assets/{SettingsRoutes-ArzMLDsK.js → SettingsRoutes-B65fC0EB.js} +1 -1
- package/dist/assets/{SetupPagesScreen-BtHa-XN0.js → SetupPagesScreen-CE0NmwDW.js} +1 -1
- package/dist/assets/{SignInScreen-BM4Hcj15.js → SignInScreen-BZNaE0KA.js} +1 -1
- package/dist/assets/{SignOutScreen-DkBwO4ib.js → SignOutScreen-CgWiovb3.js} +1 -1
- package/dist/assets/{TaskListScreen-CmbgKmgM.js → TaskListScreen-IOPEsU_l.js} +1 -1
- package/dist/assets/{TaskRoutes-ygTG3zS1.js → TaskRoutes-CSdZt_Xf.js} +1 -1
- package/dist/assets/TransactionDetailRoutes-B_BTma8z.js +1 -0
- package/dist/assets/{TransactionDetailScreen-CD84n5uo.js → TransactionDetailScreen-BoDb87tz.js} +1 -1
- package/dist/assets/{TransactionListRoutes-4QWBsWZP.js → TransactionListRoutes-Dz-TCVqi.js} +1 -1
- package/dist/assets/{TreasuryRoutes-C7Z8BTDU.js → TreasuryRoutes-qgtg7AWX.js} +1 -1
- package/dist/assets/{VendorsRoutes-DHlvOLgP.js → VendorsRoutes-DO961KZH.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-DiAdhTpY.js → WiseConfirmationScreen-DKd2pnQn.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-BUaoIi1u.js → ZeniAccountRoutes-DdYSzLSk.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-D5AcNCk0.js → ZeniAccountStatementScreen-DwNcIbLa.js} +1 -1
- package/dist/assets/{accountMappingHelper-CoDL3GOL.js → accountMappingHelper-pYI6wHSd.js} +1 -1
- package/dist/assets/{analytics-ADuFGfPN.js → analytics-S8XSXbkg.js} +1 -1
- package/dist/assets/{analyticsHelper-HLG9u2xY.js → analyticsHelper-8nU-4onk.js} +1 -1
- package/dist/assets/{core-DwJJnDQz.js → core-CSmvXf1e.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-CbGAGP0J.js → decodeURIComponentSafe-4EPJQS4u.js} +1 -1
- package/dist/assets/{dnd-DnGGlfA4.js → dnd-CnZ2VsWj.js} +1 -1
- package/dist/assets/{empty-Bn4CBn-f.js → empty-B7rlXGce.js} +1 -1
- package/dist/assets/{empty-FfJT3vN1.js → empty-BPGNHox4.js} +1 -1
- package/dist/assets/{emptyVideoElement-CLo9uuwl.js → emptyVideoElement-BV0AKUHA.js} +1 -1
- package/dist/assets/{epic-Drcka5yT.js → epic-Bv9S0QrS.js} +1 -1
- package/dist/assets/{getLocaleForTenant-By2KgTBM.js → getLocaleForTenant-48XX730Y.js} +1 -1
- package/dist/assets/{index-CV6lgbZb.js → index-5ATbjUFX.js} +1 -1
- package/dist/assets/{index-B14SVLkM.js → index-BKF634x3.js} +7 -7
- package/dist/assets/{index-CDzpV8f0.js → index-BnDEIJsa.js} +1 -1
- package/dist/assets/{index-DcVjFkev.js → index-DEHP2ald.js} +1 -1
- package/dist/assets/{index-DZKUInC6.js → index-DVdqZPmW.js} +1 -1
- package/dist/assets/{index-zjsZSbGl.js → index-gb_OLhus.js} +1 -1
- package/dist/assets/{index-DtXpWBvx.js → index-kgXx8_qr.js} +2 -2
- package/dist/assets/{lexical-BPK4xa_j.js → lexical-B1edU3GD.js} +1 -1
- package/dist/assets/{liveblocks-CGrMC7LY.js → liveblocks-cLm9kffv.js} +1 -1
- package/dist/assets/{lottie-BPjG59xT.js → lottie-iBLAIHYG.js} +1 -1
- package/dist/assets/{mui-BCq6cQ6-.js → mui-B3yy7ZVf.js} +1 -1
- package/dist/assets/{pathToGoBack-poWMX-ij.js → pathToGoBack-D5ulRUzJ.js} +1 -1
- package/dist/assets/{pdf-yBp3cCxB.js → pdf-DV6OIXck.js} +3 -3
- package/dist/assets/{pdf-lib-C3sSe9pM.js → pdf-lib-CdsHJWfm.js} +1 -1
- package/dist/assets/{plaid-De27RLr_.js → plaid-BSEfMXOW.js} +1 -1
- package/dist/assets/{pusher-nY4hPWS8.js → pusher-D4X9MEmq.js} +1 -1
- package/dist/assets/{react-8-mKzB97.js → react-BTEZjOy4.js} +1 -1
- package/dist/assets/{react-BOXi60C0.js → react-CDz6dTcm.js} +1 -1
- package/dist/assets/{react-COUnhOoz.js → react-Ct7oKM3O.js} +1 -1
- package/dist/assets/{react-COOlDqb2.js → react-DZlzX3WG.js} +1 -1
- package/dist/assets/{react-CVCh-Lit.js → react-ZXl3zIAU.js} +1 -1
- package/dist/assets/{react-Dd2MZd6Q.js → react-c6uEO0Hw.js} +1 -1
- package/dist/assets/{recharts-YoiFCZ1K.js → recharts-D9O-Y9LK.js} +1 -1
- package/dist/assets/{routePaths-C_gA2Ku6.js → routePaths-BoMWlYq1.js} +1 -1
- package/dist/assets/{sentry-Dq99UNze.js → sentry-CPqvXt28.js} +1 -1
- package/dist/assets/{url-Cq_zK33x.js → url-Ckvq63Bc.js} +1 -1
- package/dist/assets/{url-mEYwePjU.js → url-CpY-DkRz.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-DRAkhC9m.js → useAskAiCfoHostNavButtonProps-ByIcRpQk.js} +1 -1
- package/dist/assets/{useDeviceId-CDh6fqxl.js → useDeviceId-C23qLuYx.js} +1 -1
- package/dist/assets/{useFetchSuggestedQuestionsWhenReady-BZlBMgfX.js → useFetchSuggestedQuestionsWhenReady-CFG18ow7.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-Dx1uy83L.js → useInitialThreadRequest-zu0r7xtU.js} +1 -1
- package/dist/assets/{utils-DXne195x.js → utils-CLZrfj5b.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-BeLlGbx-.js → withTransactionSidePanel-BGx0Sk-J.js} +1 -1
- package/dist/assets/{zeni-epic-state-BVm4B4Kq.js → zeni-epic-state-BfUwh_Vg.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +1 -1
- package/dist/assets/AddressRoutes-CLUBJP56.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-BZLGkSo3.js +0 -1
- package/dist/assets/NotFoundScreen-tegRdp3m.js +0 -1
- package/dist/assets/TransactionDetailRoutes-BR-nuJ7q.js +0 -1
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as e}from"./liveblocks-cLm9kffv.js";import{A as d}from"./AddressScreen-CQqDQYzZ.js";import i from"./NotFoundScreen-BiC86yKG.js";import"./sentry-CPqvXt28.js";import{n as s,o as r}from"./core-CSmvXf1e.js";import"./zeni-epic-state-BfUwh_Vg.js";import"./recharts-D9O-Y9LK.js";import"./index-BKF634x3.js";import"./mui-B3yy7ZVf.js";import"./analytics-S8XSXbkg.js";import"./plaid-BSEfMXOW.js";import"./dnd-CnZ2VsWj.js";import"./stripe-DMRn4zHo.js";import"./lottie-iBLAIHYG.js";import"./lexical-B1edU3GD.js";import"./pdf-DV6OIXck.js";import"./utils-CLZrfj5b.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]="4bd15e18-5b5f-4be1-8d33-8bd696c76da2",t._sentryDebugIdIdentifier="sentry-dbid-4bd15e18-5b5f-4be1-8d33-8bd696c76da2")}catch{}})();function _(){return e.jsxs(s,{children:[e.jsx(r,{path:"/edit/:addressType/:addressId",element:e.jsx(d,{})}),e.jsx(r,{path:"/new/:addressType",element:e.jsx(d,{})}),e.jsx(r,{path:"*",element:e.jsx(i,{})})]})}export{_ as default};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as d}from"./liveblocks-
|
|
1
|
+
import{j as d}from"./liveblocks-cLm9kffv.js";import{a as h}from"./sentry-CPqvXt28.js";import{j as T,h as _,u as j,l as E,g as B,k as M}from"./core-CSmvXf1e.js";import{Z as $,h as D,z as L,A as K,B as N,w as J,e as C,g as m,p as z,k as b,q as F}from"./index-BKF634x3.js";import{J0 as k,gN as R,eN as U,J1 as q,c0 as G,J2 as O,k7 as V}from"./zeni-epic-state-BfUwh_Vg.js";import{n as H}from"./mui-B3yy7ZVf.js";import Z from"./NotFoundScreen-BiC86yKG.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]="61f2ea6f-0068-462c-afe3-f31efd8b7ef6",e._sentryDebugIdIdentifier="sentry-dbid-61f2ea6f-0068-462c-afe3-f31efd8b7ef6")}catch{}})();const Q=H.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as f}from"./liveblocks-
|
|
1
|
+
import{j as f}from"./liveblocks-cLm9kffv.js";import{a as r}from"./sentry-CPqvXt28.js";import{h as oe,j as ne,u as ie,g as j,l as re,k as le}from"./core-CSmvXf1e.js";import{H as ce,cF as ue,z as de,Z as me,cG as pe,cH as he,cI as fe,cJ as q,w as Se,e as v,J as G,cK as ge,cL as Ce,g as be,a1 as ke,cM as we,K as Ie,s as Ee,q as V,aX as Pe,cN as Te}from"./index-BKF634x3.js";import{fE as ye,f3 as H,eN as _e,hr as xe,Py as ve,eM as Ue,hB as Ae,hx as Qe,fu as Oe,fo as Fe,fh as De,fl as $,fp as Me,fq as Be,fr as Le,fs as Re,ft as Ne}from"./zeni-epic-state-BfUwh_Vg.js";import{D as je,n as U,P as Ge,S as Ve}from"./mui-B3yy7ZVf.js";import{p as $e}from"./pathToGoBack-D5ulRUzJ.js";import"./recharts-D9O-Y9LK.js";import"./analytics-S8XSXbkg.js";import"./plaid-BSEfMXOW.js";import"./dnd-CnZ2VsWj.js";import"./stripe-DMRn4zHo.js";import"./lottie-iBLAIHYG.js";import"./lexical-B1edU3GD.js";import"./pdf-DV6OIXck.js";import"./utils-CLZrfj5b.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new s.Error().stack;i&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[i]="39a03027-57cc-4cad-a649-9de7e462b854",s._sentryDebugIdIdentifier="sentry-dbid-39a03027-57cc-4cad-a649-9de7e462b854")}catch{}})();const W="chat-response-generated",qe=le(function(s,i){const a=H(s),m=i.isSubmitting;return{showSampleQuestions:i.sessionFromUrl==="explore"&&a.uiState.currentChatSessionId==null,aiCfoView:a,isSubmitting:m,isNewChatSession:i.sessionFromUrl==="new_chat"||i.sessionFromUrl==="explore",isFullView:!0,tableDownloadEndPoint:`${Ie}/tableDownload`,emailLinkQuestion:i.emailLinkQuestion,autoSubmitEmailLinkQuestion:i.autoSubmitEmailLinkQuestion,onEmailLinkQuestionProcessed:i.onEmailLinkQuestionProcessed,isFileUploadEnabled:i.isFileUploadEnabled,isUploadPromoVisible:i.isUploadPromoVisible,onUploadPromoClose:i.onUploadPromoClose}},function(s,i){const{location:a,currentTenant:m,userId:d,navigate:p,currentChatSessionId:h,allSessionsWithOrderedQuestionAnswers:S,setIsAiCfoOpen:l}=i;return{onEventReceived:(e,o)=>{if(e===W&&typeof o.text=="string"&&typeof o.metadata=="object"){const n=o,c=Be(n.type),t=n.metadata.chat_session_id??null,{currentChatSession:I,currentQuestionAnswer:g,currentQuestionAnswerSummary:E}=q(S,t);c!=="answer"?v.trackAICFOChatResponseGenerated(c,g?.question.questionText??"",n.text,t,Te(E,I),n.metadata.message_id??null):v.trackAICFOChatAnswerGenerated(n.text,g?.question.questionText??"",(n.follow_up_questions?.length??0)>0,!!n.assumptions,!!n.insights,n.visualization!=null,Le(n.visualization?.type??"")??null,t,n.summarized_title,n.metadata.message_id??null),s(Re({chatSessionId:n.metadata.chat_session_id,responseType:c,fetchState:{fetchState:"Completed",error:void 0}})),s(Ne({chatSessionId:n.metadata.chat_session_id,answerPayload:n,userId:d}))}},onSubmit:(e,o,n,c)=>{e&&Pe(s,e,o,h,S,d,c,n)},updateCurrentInput:e=>{s($(e))},onStopSubmit:()=>{},onUpdateScrollYOffset:e=>{s(Me(e))},onSelectSampleQuestion:()=>{},onBackClick:()=>{p(-1)},onCloseClick:()=>{const e=V(a.state?.pathnameStackToGoBack),o=e.poppedPathname??$e(1);p(o,{state:{...a.state,pathnameStackToGoBack:e.newStack}}),s($(""))},togglePageView:()=>{const e=V(a.state?.pathnameStackToGoBack),o=e.poppedPathname??`/${m.tenantEmailDomain}/dashboard`;p(o,{state:{...a.state,pathnameStackToGoBack:e.newStack,message:"open_ai_cfo_drawer"}}),l(!0)},onCopy:()=>{},onThumbsUp:()=>{},onThumbsDown:()=>{},onTogglePageView:()=>{p(-1)},onNewChatClick:()=>{h!=null&&s(De());const e=Ee(a.state?.pathnameStackToGoBack,a.pathname);p(`/${m.tenantEmailDomain}/ai-cfo/new_chat`,{state:{pathnameStackToGoBack:e.slice(0,-1),referrer:"Sidebar"}})},onToggleCotCollapsed:(e,o)=>{s(Fe({questionAnswerId:e,isCollapsed:o}))},onMenuClick:i.onMenuClick}})(ke(we)),dt=({isFileUploadEnabled:s})=>{const{setIsAiCfoOpen:i}=ce(),a=oe(),m=ne(),d=ie(),[p,h]=r.useState(!1);r.useEffect(()=>{a(ye())},[a]);const{customPageTitle:S}=ue(),l=j(u=>H(u)),e=de.getSignedInUser(),{session_id:o}=re(),n=me(),c=j(u=>_e(u)),t=l.uiState.currentChatSessionId,I=c.tenantEmailDomain,{handleUploadPromoClose:g,isUploadPromoVisible:E}=pe({isFileUploadEnabled:s,tenantEmailDomain:I}),A=he({currentTenant:c,currentChatSessionId:t,aiCfoView:l}),C=d.state,b=C?.aiCfoInitialQuestion,Q=!!C?.aiCfoShouldSubmit,[z,P]=r.useState(null),[J,T]=r.useState(!1),O=r.useRef(!1);r.useEffect(()=>{O.current||b==null||b===""||(P(b),T(Q),O.current=!0)},[b,Q]);const K=r.useCallback(()=>{P(null),T(!1)},[]),F=r.useMemo(()=>new URLSearchParams(d.search),[d.search]),D=F.get("ref")??C?.aiCfoRef,y=F.get("emailRefId")??C?.aiCfoEmailRefId,M=r.useRef(!1);r.useEffect(()=>{M.current||D!=="month-end-email"||y==null||t!=null||e==null||(a(xe("controller",e.userId,y,"MONTH_END_EMAIL")),M.current=!0)},[D,y,t,a,e]);const k=l.uiState.lastContextMessage;r.useEffect(()=>{k!=null&&k!==""&&t!=null&&(P(k),T(!0),a(ve()))},[k,t,a]);const Z=c.masterTOSInfo,w=Z?.isMasterTOSAccepted??!1,{visitedSessions:B}=fe(t),_=l.fetchState,x=l.uiState.chatSessionsNextPageToken.hasMore||!l.uiState.chatSessionsFirstPageFetched,L=t!=null?l.fetchChatSessionHistoryByChatSessionId?.[t]?.fetchState??"Not-Started":"Not-Started",R=t==null||(l.uiState.chatHistoryNextPageToken[t]?.hasMore??!0),N=l.allSessionsWithOrderedQuestionAnswers,{currentSessionQuestionAnswers:X}=q(N,t),Y=X.length===0;r.useEffect(()=>{w||m("../dashboard",{state:{...d.state,message:"open_ai_cfo_drawer"}})},[w]),r.useEffect(()=>{t!=null&&o!==t&&m(`../ai-cfo/${t}`,{state:{...d.state}})},[t,o]),r.useEffect(()=>{o!=null&&t==null&&o!=="new_chat"&&o!=="explore"&&a(Ue({sessionId:o,agentId:"controller"}))},[]);const ee=r.useMemo(()=>({events:B.map(u=>`private-chat-${u}.${W}`),eventCallback:(u,se,ae)=>ae.onEventReceived(u,se)}),[B]);if(r.useEffect(()=>{_!=="In-Progress"&&x&&a(Ae())},[_,x,a]),r.useEffect(()=>{t!=null&&L!=="In-Progress"&&R&&e!=null&&_==="Completed"&&!x&&a(Qe(t,e.userId))},[L,R,t,e,a]),e==null||o==null)throw Error("Can't access AI Controller page without signing in...");const te=t!=null&&l.responseStateByChatSessionId?.[t]?.answer?.fetchState==="In-Progress";return f.jsxs(We,{children:[f.jsx(Se,{analytics:v,onLoad:u=>u.trackPageLoaded(be.Event.aiCFOPage)}),G(n)&&A.drawerElement,f.jsx(qe,{...ee,currentChatSessionId:t,allSessionsWithOrderedQuestionAnswers:N,openOnboardingPage:()=>h(!0),userId:e.userId,setIsAiCfoOpen:i,navigate:m,sessionFromUrl:o,location:d,isSubmitting:te,isEmptyChatWithSession:Y,customPageTitle:S,currentTenant:c,emailLinkQuestion:z??void 0,autoSubmitEmailLinkQuestion:J,onEmailLinkQuestionProcessed:K,onMenuClick:G(n)?A.open:void 0,isFileUploadEnabled:s,isUploadPromoVisible:E,onUploadPromoClose:g}),f.jsx(je,{anchor:"right",open:p,transitionDuration:250,PaperProps:{component:ze,style:{width:`${ge}vw`}},slotProps:{backdrop:{style:{backgroundColor:"transparent",cursor:"pointer"}}},onClose:()=>h(!1),children:f.jsx(He,{onClick:u=>u.stopPropagation(),children:f.jsx(Ce,{isTOSAccepted:w,acceptMasterTOSState:l.masterTOSAcceptanceState,customPageTitle:S,onCloseClick:()=>h(!1),onCompleteClick:()=>{w||c.userRoleId==null||a(Oe(c.userRoleId)),h(!1)}})})})]})},He=U(Ve)`
|
|
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-cLm9kffv.js";import{a as y}from"./sentry-CPqvXt28.js";import{j as B,u as U,h as j,g as v,N as $,k as T,l as N,n as O,o as h}from"./core-CSmvXf1e.js";import{eN as L,Mj as A,L$ as b,x9 as w,x3 as F,x7 as x,wY as M,M1 as W,w$ as q,xb as z,xa as C}from"./zeni-epic-state-BfUwh_Vg.js";import{h as P,z as k,B as V,a1 as Y,bx as G,aa as _,by as H}from"./index-BKF634x3.js";import"./mui-B3yy7ZVf.js";import{i as J}from"./ReimbursementApprovalRuleDetailScreen-CpHfZhjo.js";import K from"./NotFoundScreen-BiC86yKG.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]="da225e2a-cb3c-4443-84b7-ce29c94436cf",e._sentryDebugIdIdentifier="sentry-dbid-da225e2a-cb3c-4443-84b7-ce29c94436cf")}catch{}})();const I="bill-approval-rule-update",Q=T(function(e){return{approvalView:A(e),billPaySetupApproverViewUpdateData:b(e).billPaySetupApproverViewUpdateData}},function(e,o){const{navigate:t,location:p}=o;return{onApprovalRulesEventReceived:a=>{a.endsWith(I)&&e(W(!1))},onBackClick:()=>{_(p)?t("../../"):t("../../../bills/setup")},onDeleteRuleClick:a=>{e(M(a))},onEditRuleClick:a=>{a!=null?(e(x(a)),t(`./${a}/edit`)):(e(x()),t("./new"))}}})(Y(G)),X=()=>{const e=B(),o=U(),t=j(),[p,a]=y.useState(!1),[u,s]=y.useState(!1),d=P(),n=v(i=>i.billPaySetupApproverViewState.fetchState),c=v(i=>L(i)),r=v(i=>A(i)),g=v(i=>b(i).billPaySetupApproverViewUpdateData);if(y.useEffect(()=>{g?.updateStatus.fetchState==="Completed"&&t(w())},[g]),y.useEffect(()=>{p||n!=="Not-Started"||(a(!0),t(F(!0)))},[p,n,t]),k.getSignedInUser()==null)throw Error("Can't access billpay approval without signing in...");y.useEffect(()=>{r.allApprovalRules.length===0&&r.fetchState==="Completed"&&(u||(s(!0),t(x())),e("./new"))},[u,r,t]);const f={events:c.companyId!=null?[`private-${c.companyId}.${I}`]:[],eventCallback:(i,R,m)=>{i.endsWith(I)&&m.onApprovalRulesEventReceived(i)}};return c.companyBillPayInfo?.info?.isBillPayTOSAccepted===!1?l.jsx($,{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),p=t.billPaySetupApproverViewUpdateData?.type??"approval_create",a=p==="approval_create"&&t.allApprovalRules.length!==0;let u=t.allApprovalRules.length===0;return o.approvalRuleId&&(u=t.allApprovalRules.findIndex(s=>s.approvalRuleId===o.approvalRuleId)===0),{localData:t,hideUpperBoundField:a,isLowerBoundDisabled:u,approvalUpdateActionType:p}},function(e,o){const{navigate:t,approvalUpdateDataView:p,approverViewData:a,approvalRuleId:u}=o,s=p.billPaySetupApproverViewUpdateData?.type,d=_(o.location);return{onApprovalRuleDataUpdated:n=>{const c=r=>{const g=[];return r.forEach(f=>{const i=f.actors.selectedUsers.map(S=>({type:"user",userId:S.userId,isImplicitActor:!1})),R=f.actors.selectedNonUsers.map(S=>{const E=!!J(S.value);return{type:E?"attribute":"role",subType:S.value,userId:void 0,idType:void 0,isImplicitActor:!E}}),m=i.concat(R);g.push({action:f.stepType.selectedOption,actors:m,operator:m.length>1?f.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),g};if(s==="approval_create"){const r={criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:n.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:n.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(n.steps),isApplicableOnPendingApprovalEntity:n.applyToExistingBills.includes("applyToExistingBills")};e(C(r))}else{const r={approvalRuleId:u,criteria:{rangeType:"range",rangeEntity:"currency",range:{min:{amount:n.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:n.upperBound,currencyCode:"USD",currencySymbol:"$"}}},steps:c(n.steps),isApplicableOnPendingApprovalEntity:n.applyToExistingBills.includes("applyToExistingBills")};e(C(r))}},onResetClick:()=>{e(w()),s==="approval_update"||d?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(w()),s==="approval_update"||d?t("../"):a.allApprovalRules.length===0&&a.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(z())},onSaveRuleSuccess:()=>{t("../")}}})(H);function D(){const e=B(),o=j(),t=U(),{approvalRuleId:p}=N(),a=k.getSignedInUser(),u=P(),s=v(r=>b(r)),d=v(r=>A(r)),[n,c]=y.useState(!1);if(y.useEffect(()=>{n||(c(!0),o(q(!0)))}),y.useEffect(()=>{d.fetchState==="Not-Started"&&e(p!=null?"../../":"../")},[d,p]),a==null)throw Error("Can't access address page without signing in...");return s.approverListFetchStatus.fetchState=="Not-Started"||s.approverListFetchStatus.fetchState==="In-Progress"?l.jsx(V,{fetchState:s.approverListFetchStatus.fetchState,style:{backgroundColor:u.colors.grey5}}):l.jsx(Z,{navigate:e,approvalUpdateDataView:s,approvalRuleId:p,approverViewData:d,location:t})}function se(){return l.jsxs(O,{children:[l.jsx(h,{path:"/",element:l.jsx(X,{})}),l.jsx(h,{path:"/new",element:l.jsx(D,{})}),l.jsx(h,{path:"/:approvalRuleId/edit",element:l.jsx(D,{})}),l.jsx(h,{path:"*",element:l.jsx(K,{})})]})}export{se as B};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-CGrMC7LY.js";import{j as K,h as re,u as Q,l as te,g as k,N as ee,k as X,i as la,n as sa,o as y}from"./core-DwJJnDQz.js";import{eN as Z,LB as Ge,bv as At,GE as ra,bo as xt,bD as pe,LC as Bt,wt as Et,xD as Ue,x0 as ca,bn as je,LD as da,LE as ua,c0 as pa,LF as ma,jr as Dt,LG as jt,LH as Tt,yc as Oe,wI as Be,LI as ba,wh as it,LJ as ha,Bo as ga,wl as Sa,wr as Pt,LK as Ie,LL as Ne,xE as ze,LM as ya,LN as fa,xH as Ze,LO as Ia,xU as ka,LP as Ft,xo as ot,xt as va,LQ as wa,LR as ue,LS as Rt,LT as Lt,LU as Vt,fI as Ca,wN as Me,cv as $t,LV as Aa,gD as xa,LW as Ba,LX as Ea,eT as Ut,eR as Mt,LY as He,LZ as Da,L_ as ja,Jk as We,L$ as Ta,Jl as ie,Jm as qe,M0 as Pa,M1 as Fa,M2 as Ra,xv as lt,xs as La,M3 as Va,M4 as $a,M5 as Ua,xe as Ma,M6 as _a,M7 as Ga,M8 as Oa,cj as _t,cL as Gt,jC as Na,bJ as za,bq as Ot,bK as Nt,vz as Za,M9 as Ha,Bb as Wa,Bh as qa,s6 as Ja,xF as Ka,yj as Qa,jP as fe,Ma as Xa,Mb as zt,kh as Ya,jJ as Zt,k2 as Ht,k1 as st,bC as be,bI as en,Mc as tn,Md as ke,il as an,Me as rt,Mf as nn,iq as on,iL as ln,yx as sn,Mg as rn,ka as cn,yn as dn,Mh as ct,yr as un,yw as pn,yt as mn,yl as bn,Mi as Wt,wC as hn,Mj as gn,Mk as Sn,fA as yn,fz as fn,fy as In,jS as kn,k8 as dt,kj as vn,pF as wn,j$ as Cn,yp as An,iw as xn,ko as Bn,Ml as En,io as Dn,pw as jn,Mm as Tn,xk as Pn,bE as Fn,bs as Rn,Il as Ln,cN as Vn,cM as $n,cu as Un,cA as Mn}from"./zeni-epic-state-BVm4B4Kq.js";import{h as me,z as L,A as ve,H as Je,a as oe,d as S,aI as Ee,B as ce,o as E,w as Te,e as j,b4 as _n,q as z,K as Ke,s as D,Z as we,b5 as ut,b6 as pt,b7 as Gn,af as On,E as Nn,aC as zn,x as qt,D as Qe,W as Xe,b8 as Zn,ao as Jt,b9 as Hn,I as Wn,g as Kt,a1 as qn,ba as Jn,bb as Kn,bc as Qn,bd as Xn,be as Yn,bf as ei,bg as ti,bh as ai,bi as ni,C as ii,bj as oi,b0 as li,bk as si,bl as ri,a4 as ci}from"./index-B14SVLkM.js";import{n as V,S as di}from"./mui-BCq6cQ6-.js";import{A as mt}from"./AddressScreen-BMzElnPN.js";import{g as ne,a as Pe,i as Qt,V as Ye,b as et,c as ui,v as pi,d as mi,A as he,D as ge}from"./DomesticWireDetailScreen-CpcHl85M.js";import{a as f}from"./sentry-Dq99UNze.js";import{u as tt}from"./useAskAiCfoHostNavButtonProps-DRAkhC9m.js";import{c as at}from"./useFetchSuggestedQuestionsWhenReady-BZlBMgfX.js";import{u as Xt}from"./useInitialThreadRequest-Dx1uy83L.js";import De from"./NotFoundScreen-tegRdp3m.js";import{D as bi}from"./DrawerScreen-BTWAnel_.js";import{M as Yt}from"./MobileAppDrawer-B-X4LQ1O.js";import{F as ea}from"./FeaturePreviewScreen-Dv0X4e82.js";import{S as Re}from"./SetupPagesScreen-BtHa-XN0.js";import{B as hi}from"./BillPayApprovalRoutes-BCAhIi_G.js";import{FallBackRoute as gi}from"./ScreenRoutes-BRRei_Gs.js";import"./recharts-YoiFCZ1K.js";import"./analytics-ADuFGfPN.js";import"./plaid-De27RLr_.js";import"./dnd-DnGGlfA4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BPjG59xT.js";import"./lexical-BPK4xa_j.js";import"./pdf-yBp3cCxB.js";import"./utils-DXne195x.js";import"./analyticsHelper-HLG9u2xY.js";import"./routePaths-C_gA2Ku6.js";import"./BusinessVerificationPageScreen-s19Xn8G4.js";import"./ReimbursementApprovalRuleDetailScreen-CD0zr_A3.js";import"./getLocaleForTenant-By2KgTBM.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]="3287fd0b-e685-4b3d-921b-9cd819945003",e._sentryDebugIdIdentifier="sentry-dbid-3287fd0b-e685-4b3d-921b-9cd819945003")}catch{}})();const Si=X(function(e,t){const l=Ge(e,t.billId),n=L.getSignedInUser(),c=e.tenantState.currentTenantId,r={userId:n?.userId??"",sessionId:n?.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 i=je(n);i||!l.createdBy?.email?.includes("zeni.ai")||(s="Zeni");let d=!1,p=!1;if(l?.billActivities.length>0){const{isApprovalorRejectBtnVisible:m,isMarkAsPaidBtnVisible:b}=da(l.billActivities,ua(t.currentTenant),n);d=m,p=b}const h=pa(t.currentTenant?.userRole??[]),g=l.transactionDetails!=null&&ma(l.transactionDetails,h,n);return{billDetails:l,isAccountingClassesEnabled:Dt(e),createdBy:s,authParams:r,transactionAttachmentEndpoint:`${Ke}/transaction_attachment`,signedInUser:n,showBackButton:o,isAdmin:h,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,showApproveRejectBtns:d,showMarkAsPaidButtonToApprover:p,hasZeniAssistAccess:t.hasZeniAssistAccess,analytics:j,showMarkAsPaidButtonToCreator:g,isZeniUser:i}},function(e,t){const{billId:l,currentTenant:n,location:c,navigate:r}=t,{tenantEmailDomain:u}=n;return{redirectToBillsScreen:()=>{const o=ne(u),s=D(c.state?.pathnameStackToGoBack,c.pathname);r(o,{state:{pathnameStackToGoBack:s}})},redirectToEditableBillScreen:()=>{const o=D(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}})},discardBillDetailsFromLocalStore:()=>{e(Ie({}))},deleteBill:o=>{j.trackBillPayDeleteBill(l,o),e(Pt(l))},cancelAndDeleteBill:(o,s)=>{s===!0?j.trackBillPayCancelAndDeleteBill(l,o):j.trackBillPayCancelBill(l),e(Sa(l,s))},onSaveRealTimeApprovals:o=>{e(ga(l,"bill_pay",o))},updateEditRealTimeApproverClicked:o=>{e(ha({isEdit:o,entityId:l,entityType:"bill_pay"}))},approveOrRejectBill:o=>{o.type==="approved"?e(it(l,o.type,"")):e(it(l,o.type,o.description??""))},retryOrRefundBill:o=>{o.type==="retry"?e(Be(l,"retry")):e(Be(l,"refund"))},onAddNewRule:()=>{r("../../bills/approval-rules")},onAttachmentClick:(o,s)=>{const i=Pe(u,o,s),d=D(c.state?.pathnameStackToGoBack,c.pathname);r(i,{state:{pathnameStackToGoBack:d}})},onBackClick:()=>{const o=z(t.location.state?.pathnameStackToGoBack),s=o.poppedPathname??ne(u);r(s,{state:{pathnameStackToGoBack:o.newStack}})},onRetryPaymentClick:()=>{const o=D(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}}),e(ba({billId:t.billId}))},onRefundPaymentClick:()=>{e(Be(t.billId,"refund"))},saveBillDetails:(o,s,i)=>{o&&e(Tt({data:i,billId:l})),e(Oe(o?"paid":"pending_approval",o,s,l))},discardOutsideZeniPaymentData:()=>{e(jt({billId:l}))}}})(_n);function yi(){const e=K(),t=re(),l=Q(),{billId:n}=te(),c=me(),r=L.getSignedInUser(),u=ve(),o=k(w=>Z(w)),s=k(w=>Ge(w,n??"")),i=s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1,d=Xt(o?.companyId,{clearParams:s.fetchState==="Completed"&&!i}),{isAiCfoOpen:p,setIsAiCfoOpen:h}=Je(),{isAiCfoAccessEnabled:g,onAskAiCfoClick:m}=tt({isAiCfoOpen:p,setIsAiCfoOpen:h,mobileExploreReferrer:"Bill Details"});at({isDataReady:s.fetchState==="Completed"});const b=o?.userRole!=null&&At(o?.userRole),A=o?.company==null||o.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!b,[T,I]=f.useState(!1),[v,H]=f.useState(!1),[M,_]=f.useState(!1),{useFeatureGate:F,useDynamicConfig:x}=oe(),{isFeatureEnabled:$}=F(S.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:U}=F(S.isBillPayCommentingEnabled),{isFeatureEnabled:B}=F(S.isBillPayDetectInsufficientFundsEnabled),{configValue:O}=x(Ee.zeniAssistConfig),W=ra(o),q=xt(o.userRole),J=A&&pe(u?.loggedInUserRoleMap),G=O.user_ids!=null&&r?.userId!=null&&O.user_ids.includes(r?.userId),{isFeatureEnabled:le}=F(S.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:Y}=F(S.billPaySetupShowInternationalPaymentByWise);if(f.useEffect(()=>{$&&s.transactionDetails?.isDeleted===!0||o.isZeni===!0&&r?.userEmailDomain==="zeni.ai"&&W===!1?_(!1):_(s.billActivities[0]?.isRealTimeApprovalEnabled&&(q||J||s.allApprovers.find(w=>w.user.userId===r?.userId)!=null||s.transactionDetails?.lastUpdatedByUserId===r?.userId))},[s.billActivities[0]?.isRealTimeApprovalEnabled,s.allApprovers,s.transactionDetails?.lastUpdatedByUserId,q,J,o.isZeni,W,r]),f.useEffect(()=>{n!=null&&t(Bt(n))},[n]),f.useEffect(()=>{T||s.fetchState=="Completed"||s.fetchState=="In-Progress"||(I(!0),t(Et(n??"",$,G,!1)))},[T,s,n,t]),f.useEffect(()=>{v||s.fetchState!="Completed"||s.transactionDetails?.billPayInfo.stage.code=="paid"||(H(!0),t(Ue(!1,$,G,Y,n)),s.billActivities[0]?.isRealTimeApprovalEnabled===!0&&t(ca()))},[v,s,n,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(ee,{to:`./edit${l.search}`}):s.deleteStatus.fetchState==="In-Progress"||s.cancelAndDeleteStatus.fetchState==="In-Progress"||s.cancelStatus.fetchState==="In-Progress"?a.jsx(ce,{fetchState:s.deleteStatus.fetchState,style:{boxShadow:`0px 2px ${E.sp1} ${c.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[a.jsx(Te,{analytics:j,onLoad:w=>(se=>{n!=null&&se.trackBillPayBillDetails(n,s.isRecurring)})(w)}),a.jsx(Si,{initialOpenThreadRequest:d??void 0,isShowDeletedBillsEnabled:$,location:l,navigate:e,isBillPayCommentingEnabled:U,isRealTimeApprovalEnabled:M,currentTenant:o,billId:n??"",isInternationalPaymentShaVsOurEnabled:le,hasZeniAssistAccess:G,isDetectInsufficientFundsEnabled:B,isAiCfoAccessEnabled:g,onAskAiCfoClick:m})]})}const Se=Qe.getLocalizedStrings().spendManagement.billPay.billDetails,fi={containerWidth:new qt(100,58)},bt=X(function(e,t){const l=L.getSignedInUser(),n=e.tenantState.currentTenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:n??""},r=t.showActionButtons,u=r&&t.file==null;return{uploadInvoiceEndPoint:`${Jt.communicationAgentMicroServiceBaseUrl}`,authParams:c,billId:t.billId,file:t.file,showAutofill:t.showAutofill,analytics:j,entityId:t.billId,showTitlebarIcon:r,showTitlebar:r&&t?.file!=null,uploadStatus:t.uploadStatus,shouldNotShowAttachment:u,style:{paddingTop:E.sp10,paddingRight:E.sp3,paddingBottom:"15px",paddingLeft:E.sp5,...t.showAutofill?{}:{backgroundColor:t.backgroundColor,paddingBottom:"128px"}}}},function(e,t){const l=L.getSignedInUser();return{onInvoiceUpload:n=>{n!=null&&(t.file!=null||t.billId!=null||t.isInitialEdit?(t.setPayload(n),t.setShowConfirmationPopup(!0)):e(Ze(n,t.isVendorRecommendationEnabled,t.billId)))},updateInvoiceUploadFetchState:n=>{e(ka({fetchState:{fetchState:n,error:void 0},billId:t.billId}))},onSkipAutofill:n=>{j?.trackBillPaySkipAutofill(),e(ze(n))},onDeleteClick:()=>{e(Ia({billId:t.billId})),j?.trackInvoiceActionClick(t.billStage??"","delete",l?.userEmail??"",null)}}})(zn);function C({appContent:e}){const t=re(),l=K(),{billId:n}=te(),c=Q(),r=c.pathname,u=r.includes("bill/new")||r.includes("/edit"),o=we(),s=me(),i=L.getSignedInUser(),{useFeatureGate:d,useDynamicConfig:p}=oe(),{isFeatureEnabled:h}=d(S.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:g}=d(S.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:m}=d(S.isDepositAccountsFeatureEnabled),{isFeatureEnabled:b}=d(S.billPaySetupShowInternationalPaymentByWise),{configValue:A}=p(Ee.zeniAssistConfig),T=A.user_ids!=null&&i?.userId!=null&&A.user_ids.includes(i?.userId),I=k(w=>Z(w)),[v,H]=f.useState(!1),[M,_]=f.useState(!1),[F,x]=f.useState(!1),[$,U]=f.useState(),B=k(w=>Ne(w,h,m,n));let O=B.fetchState,W=B.file,q=B.showAutofill;const J=k(w=>Ge(w,n??""));u===!1&&(O=J.fetchState,W=J.transactionDetails?.attachments?.[0],q=!1);const G=B.billPayInfo!=null&&B.billPayInfo.stage.code==="pending_approval"?B.billPayInfo.billStatus.code:B.billStage;f.useEffect(()=>{n==null&&t(ze(!0))},[n,t]),f.useEffect(()=>{O==="Not-Started"&&(u&&M?_(!1):!u&&v&&H(!1))},[n]),f.useEffect(()=>{v||n==null||u||(H(!0),t(Et(n,g,T,!1)),M||(_(!0),t(Ue(!1,g,T,b,n)))),u&&!M&&(_(!0),t(Ue(!1,g,T,b,n)))},[v,M,u,n,t]);const le={onOkClick:()=>{if(x(!1),!$)return;const w=W!=null?"replace":"upload";j?.trackInvoiceActionClick(G??"",w,i?.userEmail??"","yes"),t(fa({replaceBillData:!0,billId:n})),t(Ze($,h,n))},onCancelClick:()=>{if(x(!1),!$)return;const w=W!=null?"replace":"upload";j?.trackInvoiceActionClick(G??"",w,i?.userEmail??"","no"),t(ya({file:$,billId:n}))}},Y=f.useCallback(()=>{const w=z(c.state?.pathnameStackToGoBack),se=w.poppedPathname??ne(I.tenantEmailDomain);t(Ie({billId:n})),l(se,{state:{pathnameStackToGoBack:w.newStack}})},[c.state,I.tenantEmailDomain,n,t,l]);if(i==null)throw Error("Can't access address page without signing in...");if(O==="Error"||J.fetchState==="Error")return a.jsx(De,{});if(O!="Completed")return n==null&&o!=="small"?a.jsx(ut,{fallback:Y,children:a.jsxs(Le,{windowSize:o,children:[a.jsx(gt,{}),a.jsx(Ve,{}),a.jsx(bt,{backgroundColor:s.colors.grey4,billId:n,file:W,showAutofill:!0,uploadStatus:B.uploadStatus,isVendorRecommendationEnabled:h,attachmentTitle:void 0,setShowConfirmationPopup:x,setPayload:U,showActionButtons:!1,isInitialEdit:!!B.isInitialEdit,billStage:G}),a.jsx($e,{windowSize:o,children:a.jsx(pt,{isNewBill:!0})})]})}):a.jsxs(Le,{windowSize:o,children:[o==="small"||q?null:a.jsx(ht,{children:a.jsx(ta,{onClick:Y,"data-testid":"nav-bar-back-click"})}),o!=="small"?a.jsx(Ve,{}):null,a.jsx(Gn,{}),a.jsx($e,{windowSize:o,children:a.jsx(pt,{isNewBill:n==null})})]});{const w=B.billPayInfo!=null&&B.billPayInfo.stage.code==="pending_approval"?B.billPayInfo.billStatus.code:B.billStage;return a.jsx(ut,{fallback:Y,children:a.jsxs(Le,{windowSize:o,children:[q&&o!=="small"?a.jsx(gt,{}):null,F?a.jsx(On,{titleComponent:a.jsx(xi,{children:Se.overwriteTitle}),descriptionComponent:a.jsx(Bi,{children:Se.overwriteDescription}),primaryButtonText:Se.buttons.yes,secondaryButtonText:Se.buttons.no,action:le,isEditPopup:!0}):null,o==="small"||q?null:a.jsx(ht,{children:a.jsx(Ii,{})}),o!=="small"?a.jsx(Ve,{}):null,a.jsx(bt,{backgroundColor:s.colors.grey4,billId:n,file:W,showAutofill:q,uploadStatus:B.uploadStatus,isVendorRecommendationEnabled:h,attachmentTitle:ki(u,J,B),setShowConfirmationPopup:x,setPayload:U,showActionButtons:vi(u,B),isInitialEdit:!!B.isInitialEdit,billStage:w}),a.jsx($e,{windowSize:o,children:e})]})})}}function Ii(){const{triggerBack:e}=Zn();return a.jsx(ta,{onClick:e,"data-testid":"nav-bar-back-click"})}function ki(e,t,l){let n,c;return e?(n=l.recurringConfig?.currentInstance,c=l.recurringConfig?.totalPaymentCycles):(n=t.transactionDetails?.recurringBillInstance,c=t.recurringBillConfigDetail?.totalPaymentCycles),t?.isRecurring===!0?a.jsxs(wi,{children:[a.jsx(Ci,{children:`${Se.recurringBill.recurringCycle}
|
|
1
|
+
import{j as a}from"./liveblocks-cLm9kffv.js";import{j as K,h as re,u as Q,l as te,g as k,N as ee,k as X,i as la,n as sa,o as y}from"./core-CSmvXf1e.js";import{eN as Z,LB as Ge,bv as At,GE as ra,bo as xt,bD as pe,LC as Bt,wt as Et,xD as Ue,x0 as ca,bn as je,LD as da,LE as ua,c0 as pa,LF as ma,jr as Dt,LG as jt,LH as Tt,yc as Oe,wI as Be,LI as ba,wh as it,LJ as ha,Bo as ga,wl as Sa,wr as Pt,LK as Ie,LL as Ne,xE as ze,LM as ya,LN as fa,xH as Ze,LO as Ia,xU as ka,LP as Ft,xo as ot,xt as va,LQ as wa,LR as ue,LS as Rt,LT as Lt,LU as Vt,fI as Ca,wN as Me,cv as $t,LV as Aa,gD as xa,LW as Ba,LX as Ea,eT as Ut,eR as Mt,LY as He,LZ as Da,L_ as ja,Jk as We,L$ as Ta,Jl as ie,Jm as qe,M0 as Pa,M1 as Fa,M2 as Ra,xv as lt,xs as La,M3 as Va,M4 as $a,M5 as Ua,xe as Ma,M6 as _a,M7 as Ga,M8 as Oa,cj as _t,cL as Gt,jC as Na,bJ as za,bq as Ot,bK as Nt,vz as Za,M9 as Ha,Bb as Wa,Bh as qa,s6 as Ja,xF as Ka,yj as Qa,jP as fe,Ma as Xa,Mb as zt,kh as Ya,jJ as Zt,k2 as Ht,k1 as st,bC as be,bI as en,Mc as tn,Md as ke,il as an,Me as rt,Mf as nn,iq as on,iL as ln,yx as sn,Mg as rn,ka as cn,yn as dn,Mh as ct,yr as un,yw as pn,yt as mn,yl as bn,Mi as Wt,wC as hn,Mj as gn,Mk as Sn,fA as yn,fz as fn,fy as In,jS as kn,k8 as dt,kj as vn,pF as wn,j$ as Cn,yp as An,iw as xn,ko as Bn,Ml as En,io as Dn,pw as jn,Mm as Tn,xk as Pn,bE as Fn,bs as Rn,Il as Ln,cN as Vn,cM as $n,cu as Un,cA as Mn}from"./zeni-epic-state-BfUwh_Vg.js";import{h as me,z as L,A as ve,H as Je,a as oe,d as S,aI as Ee,B as ce,o as E,w as Te,e as j,b4 as _n,q as z,K as Ke,s as D,Z as we,b5 as ut,b6 as pt,b7 as Gn,af as On,E as Nn,aC as zn,x as qt,D as Qe,W as Xe,b8 as Zn,ao as Jt,b9 as Hn,I as Wn,g as Kt,a1 as qn,ba as Jn,bb as Kn,bc as Qn,bd as Xn,be as Yn,bf as ei,bg as ti,bh as ai,bi as ni,C as ii,bj as oi,b0 as li,bk as si,bl as ri,a4 as ci}from"./index-BKF634x3.js";import{n as V,S as di}from"./mui-B3yy7ZVf.js";import{A as mt}from"./AddressScreen-CQqDQYzZ.js";import{g as ne,a as Pe,i as Qt,V as Ye,b as et,c as ui,v as pi,d as mi,A as he,D as ge}from"./DomesticWireDetailScreen-D-pyPi8Z.js";import{a as f}from"./sentry-CPqvXt28.js";import{u as tt}from"./useAskAiCfoHostNavButtonProps-ByIcRpQk.js";import{c as at}from"./useFetchSuggestedQuestionsWhenReady-CFG18ow7.js";import{u as Xt}from"./useInitialThreadRequest-zu0r7xtU.js";import De from"./NotFoundScreen-BiC86yKG.js";import{D as bi}from"./DrawerScreen-Da9xfeW6.js";import{M as Yt}from"./MobileAppDrawer-CxhHSpBC.js";import{F as ea}from"./FeaturePreviewScreen-CDLU6W9q.js";import{S as Re}from"./SetupPagesScreen-CE0NmwDW.js";import{B as hi}from"./BillPayApprovalRoutes-T2plN4Qo.js";import{FallBackRoute as gi}from"./ScreenRoutes-C4QHxmGo.js";import"./recharts-D9O-Y9LK.js";import"./analytics-S8XSXbkg.js";import"./plaid-BSEfMXOW.js";import"./dnd-CnZ2VsWj.js";import"./stripe-DMRn4zHo.js";import"./lottie-iBLAIHYG.js";import"./lexical-B1edU3GD.js";import"./pdf-DV6OIXck.js";import"./utils-CLZrfj5b.js";import"./analyticsHelper-8nU-4onk.js";import"./routePaths-BoMWlYq1.js";import"./BusinessVerificationPageScreen-37mIDOgw.js";import"./ReimbursementApprovalRuleDetailScreen-CpHfZhjo.js";import"./getLocaleForTenant-48XX730Y.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]="3287fd0b-e685-4b3d-921b-9cd819945003",e._sentryDebugIdIdentifier="sentry-dbid-3287fd0b-e685-4b3d-921b-9cd819945003")}catch{}})();const Si=X(function(e,t){const l=Ge(e,t.billId),n=L.getSignedInUser(),c=e.tenantState.currentTenantId,r={userId:n?.userId??"",sessionId:n?.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 i=je(n);i||!l.createdBy?.email?.includes("zeni.ai")||(s="Zeni");let d=!1,p=!1;if(l?.billActivities.length>0){const{isApprovalorRejectBtnVisible:m,isMarkAsPaidBtnVisible:b}=da(l.billActivities,ua(t.currentTenant),n);d=m,p=b}const h=pa(t.currentTenant?.userRole??[]),g=l.transactionDetails!=null&&ma(l.transactionDetails,h,n);return{billDetails:l,isAccountingClassesEnabled:Dt(e),createdBy:s,authParams:r,transactionAttachmentEndpoint:`${Ke}/transaction_attachment`,signedInUser:n,showBackButton:o,isAdmin:h,isRealTimeApprovalEnabled:t.isRealTimeApprovalEnabled,showApproveRejectBtns:d,showMarkAsPaidButtonToApprover:p,hasZeniAssistAccess:t.hasZeniAssistAccess,analytics:j,showMarkAsPaidButtonToCreator:g,isZeniUser:i}},function(e,t){const{billId:l,currentTenant:n,location:c,navigate:r}=t,{tenantEmailDomain:u}=n;return{redirectToBillsScreen:()=>{const o=ne(u),s=D(c.state?.pathnameStackToGoBack,c.pathname);r(o,{state:{pathnameStackToGoBack:s}})},redirectToEditableBillScreen:()=>{const o=D(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}})},discardBillDetailsFromLocalStore:()=>{e(Ie({}))},deleteBill:o=>{j.trackBillPayDeleteBill(l,o),e(Pt(l))},cancelAndDeleteBill:(o,s)=>{s===!0?j.trackBillPayCancelAndDeleteBill(l,o):j.trackBillPayCancelBill(l),e(Sa(l,s))},onSaveRealTimeApprovals:o=>{e(ga(l,"bill_pay",o))},updateEditRealTimeApproverClicked:o=>{e(ha({isEdit:o,entityId:l,entityType:"bill_pay"}))},approveOrRejectBill:o=>{o.type==="approved"?e(it(l,o.type,"")):e(it(l,o.type,o.description??""))},retryOrRefundBill:o=>{o.type==="retry"?e(Be(l,"retry")):e(Be(l,"refund"))},onAddNewRule:()=>{r("../../bills/approval-rules")},onAttachmentClick:(o,s)=>{const i=Pe(u,o,s),d=D(c.state?.pathnameStackToGoBack,c.pathname);r(i,{state:{pathnameStackToGoBack:d}})},onBackClick:()=>{const o=z(t.location.state?.pathnameStackToGoBack),s=o.poppedPathname??ne(u);r(s,{state:{pathnameStackToGoBack:o.newStack}})},onRetryPaymentClick:()=>{const o=D(c.state?.pathnameStackToGoBack,c.pathname);r("./edit",{state:{pathnameStackToGoBack:o}}),e(ba({billId:t.billId}))},onRefundPaymentClick:()=>{e(Be(t.billId,"refund"))},saveBillDetails:(o,s,i)=>{o&&e(Tt({data:i,billId:l})),e(Oe(o?"paid":"pending_approval",o,s,l))},discardOutsideZeniPaymentData:()=>{e(jt({billId:l}))}}})(_n);function yi(){const e=K(),t=re(),l=Q(),{billId:n}=te(),c=me(),r=L.getSignedInUser(),u=ve(),o=k(w=>Z(w)),s=k(w=>Ge(w,n??"")),i=s.transactionDetails?.billPayInfo.stage.code==="draft"&&s.transactionDetails.isDeleted===!1,d=Xt(o?.companyId,{clearParams:s.fetchState==="Completed"&&!i}),{isAiCfoOpen:p,setIsAiCfoOpen:h}=Je(),{isAiCfoAccessEnabled:g,onAskAiCfoClick:m}=tt({isAiCfoOpen:p,setIsAiCfoOpen:h,mobileExploreReferrer:"Bill Details"});at({isDataReady:s.fetchState==="Completed"});const b=o?.userRole!=null&&At(o?.userRole),A=o?.company==null||o.company.featuresActivationInfo?.isBillPayFeatureEnabled&&!b,[T,I]=f.useState(!1),[v,H]=f.useState(!1),[M,_]=f.useState(!1),{useFeatureGate:F,useDynamicConfig:x}=oe(),{isFeatureEnabled:$}=F(S.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:U}=F(S.isBillPayCommentingEnabled),{isFeatureEnabled:B}=F(S.isBillPayDetectInsufficientFundsEnabled),{configValue:O}=x(Ee.zeniAssistConfig),W=ra(o),q=xt(o.userRole),J=A&&pe(u?.loggedInUserRoleMap),G=O.user_ids!=null&&r?.userId!=null&&O.user_ids.includes(r?.userId),{isFeatureEnabled:le}=F(S.isInternationalPaymentShaVsOurFeatureEnabled),{isFeatureEnabled:Y}=F(S.billPaySetupShowInternationalPaymentByWise);if(f.useEffect(()=>{$&&s.transactionDetails?.isDeleted===!0||o.isZeni===!0&&r?.userEmailDomain==="zeni.ai"&&W===!1?_(!1):_(s.billActivities[0]?.isRealTimeApprovalEnabled&&(q||J||s.allApprovers.find(w=>w.user.userId===r?.userId)!=null||s.transactionDetails?.lastUpdatedByUserId===r?.userId))},[s.billActivities[0]?.isRealTimeApprovalEnabled,s.allApprovers,s.transactionDetails?.lastUpdatedByUserId,q,J,o.isZeni,W,r]),f.useEffect(()=>{n!=null&&t(Bt(n))},[n]),f.useEffect(()=>{T||s.fetchState=="Completed"||s.fetchState=="In-Progress"||(I(!0),t(Et(n??"",$,G,!1)))},[T,s,n,t]),f.useEffect(()=>{v||s.fetchState!="Completed"||s.transactionDetails?.billPayInfo.stage.code=="paid"||(H(!0),t(Ue(!1,$,G,Y,n)),s.billActivities[0]?.isRealTimeApprovalEnabled===!0&&t(ca()))},[v,s,n,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(ee,{to:`./edit${l.search}`}):s.deleteStatus.fetchState==="In-Progress"||s.cancelAndDeleteStatus.fetchState==="In-Progress"||s.cancelStatus.fetchState==="In-Progress"?a.jsx(ce,{fetchState:s.deleteStatus.fetchState,style:{boxShadow:`0px 2px ${E.sp1} ${c.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[a.jsx(Te,{analytics:j,onLoad:w=>(se=>{n!=null&&se.trackBillPayBillDetails(n,s.isRecurring)})(w)}),a.jsx(Si,{initialOpenThreadRequest:d??void 0,isShowDeletedBillsEnabled:$,location:l,navigate:e,isBillPayCommentingEnabled:U,isRealTimeApprovalEnabled:M,currentTenant:o,billId:n??"",isInternationalPaymentShaVsOurEnabled:le,hasZeniAssistAccess:G,isDetectInsufficientFundsEnabled:B,isAiCfoAccessEnabled:g,onAskAiCfoClick:m})]})}const Se=Qe.getLocalizedStrings().spendManagement.billPay.billDetails,fi={containerWidth:new qt(100,58)},bt=X(function(e,t){const l=L.getSignedInUser(),n=e.tenantState.currentTenantId,c={userId:l?.userId??"",sessionId:l?.zeniSessionId??"",tenantId:n??""},r=t.showActionButtons,u=r&&t.file==null;return{uploadInvoiceEndPoint:`${Jt.communicationAgentMicroServiceBaseUrl}`,authParams:c,billId:t.billId,file:t.file,showAutofill:t.showAutofill,analytics:j,entityId:t.billId,showTitlebarIcon:r,showTitlebar:r&&t?.file!=null,uploadStatus:t.uploadStatus,shouldNotShowAttachment:u,style:{paddingTop:E.sp10,paddingRight:E.sp3,paddingBottom:"15px",paddingLeft:E.sp5,...t.showAutofill?{}:{backgroundColor:t.backgroundColor,paddingBottom:"128px"}}}},function(e,t){const l=L.getSignedInUser();return{onInvoiceUpload:n=>{n!=null&&(t.file!=null||t.billId!=null||t.isInitialEdit?(t.setPayload(n),t.setShowConfirmationPopup(!0)):e(Ze(n,t.isVendorRecommendationEnabled,t.billId)))},updateInvoiceUploadFetchState:n=>{e(ka({fetchState:{fetchState:n,error:void 0},billId:t.billId}))},onSkipAutofill:n=>{j?.trackBillPaySkipAutofill(),e(ze(n))},onDeleteClick:()=>{e(Ia({billId:t.billId})),j?.trackInvoiceActionClick(t.billStage??"","delete",l?.userEmail??"",null)}}})(zn);function C({appContent:e}){const t=re(),l=K(),{billId:n}=te(),c=Q(),r=c.pathname,u=r.includes("bill/new")||r.includes("/edit"),o=we(),s=me(),i=L.getSignedInUser(),{useFeatureGate:d,useDynamicConfig:p}=oe(),{isFeatureEnabled:h}=d(S.isVendorRecommendationFeatureEnabled),{isFeatureEnabled:g}=d(S.isShowDeletedBillsFeatureEnabled),{isFeatureEnabled:m}=d(S.isDepositAccountsFeatureEnabled),{isFeatureEnabled:b}=d(S.billPaySetupShowInternationalPaymentByWise),{configValue:A}=p(Ee.zeniAssistConfig),T=A.user_ids!=null&&i?.userId!=null&&A.user_ids.includes(i?.userId),I=k(w=>Z(w)),[v,H]=f.useState(!1),[M,_]=f.useState(!1),[F,x]=f.useState(!1),[$,U]=f.useState(),B=k(w=>Ne(w,h,m,n));let O=B.fetchState,W=B.file,q=B.showAutofill;const J=k(w=>Ge(w,n??""));u===!1&&(O=J.fetchState,W=J.transactionDetails?.attachments?.[0],q=!1);const G=B.billPayInfo!=null&&B.billPayInfo.stage.code==="pending_approval"?B.billPayInfo.billStatus.code:B.billStage;f.useEffect(()=>{n==null&&t(ze(!0))},[n,t]),f.useEffect(()=>{O==="Not-Started"&&(u&&M?_(!1):!u&&v&&H(!1))},[n]),f.useEffect(()=>{v||n==null||u||(H(!0),t(Et(n,g,T,!1)),M||(_(!0),t(Ue(!1,g,T,b,n)))),u&&!M&&(_(!0),t(Ue(!1,g,T,b,n)))},[v,M,u,n,t]);const le={onOkClick:()=>{if(x(!1),!$)return;const w=W!=null?"replace":"upload";j?.trackInvoiceActionClick(G??"",w,i?.userEmail??"","yes"),t(fa({replaceBillData:!0,billId:n})),t(Ze($,h,n))},onCancelClick:()=>{if(x(!1),!$)return;const w=W!=null?"replace":"upload";j?.trackInvoiceActionClick(G??"",w,i?.userEmail??"","no"),t(ya({file:$,billId:n}))}},Y=f.useCallback(()=>{const w=z(c.state?.pathnameStackToGoBack),se=w.poppedPathname??ne(I.tenantEmailDomain);t(Ie({billId:n})),l(se,{state:{pathnameStackToGoBack:w.newStack}})},[c.state,I.tenantEmailDomain,n,t,l]);if(i==null)throw Error("Can't access address page without signing in...");if(O==="Error"||J.fetchState==="Error")return a.jsx(De,{});if(O!="Completed")return n==null&&o!=="small"?a.jsx(ut,{fallback:Y,children:a.jsxs(Le,{windowSize:o,children:[a.jsx(gt,{}),a.jsx(Ve,{}),a.jsx(bt,{backgroundColor:s.colors.grey4,billId:n,file:W,showAutofill:!0,uploadStatus:B.uploadStatus,isVendorRecommendationEnabled:h,attachmentTitle:void 0,setShowConfirmationPopup:x,setPayload:U,showActionButtons:!1,isInitialEdit:!!B.isInitialEdit,billStage:G}),a.jsx($e,{windowSize:o,children:a.jsx(pt,{isNewBill:!0})})]})}):a.jsxs(Le,{windowSize:o,children:[o==="small"||q?null:a.jsx(ht,{children:a.jsx(ta,{onClick:Y,"data-testid":"nav-bar-back-click"})}),o!=="small"?a.jsx(Ve,{}):null,a.jsx(Gn,{}),a.jsx($e,{windowSize:o,children:a.jsx(pt,{isNewBill:n==null})})]});{const w=B.billPayInfo!=null&&B.billPayInfo.stage.code==="pending_approval"?B.billPayInfo.billStatus.code:B.billStage;return a.jsx(ut,{fallback:Y,children:a.jsxs(Le,{windowSize:o,children:[q&&o!=="small"?a.jsx(gt,{}):null,F?a.jsx(On,{titleComponent:a.jsx(xi,{children:Se.overwriteTitle}),descriptionComponent:a.jsx(Bi,{children:Se.overwriteDescription}),primaryButtonText:Se.buttons.yes,secondaryButtonText:Se.buttons.no,action:le,isEditPopup:!0}):null,o==="small"||q?null:a.jsx(ht,{children:a.jsx(Ii,{})}),o!=="small"?a.jsx(Ve,{}):null,a.jsx(bt,{backgroundColor:s.colors.grey4,billId:n,file:W,showAutofill:q,uploadStatus:B.uploadStatus,isVendorRecommendationEnabled:h,attachmentTitle:ki(u,J,B),setShowConfirmationPopup:x,setPayload:U,showActionButtons:vi(u,B),isInitialEdit:!!B.isInitialEdit,billStage:w}),a.jsx($e,{windowSize:o,children:e})]})})}}function Ii(){const{triggerBack:e}=Zn();return a.jsx(ta,{onClick:e,"data-testid":"nav-bar-back-click"})}function ki(e,t,l){let n,c;return e?(n=l.recurringConfig?.currentInstance,c=l.recurringConfig?.totalPaymentCycles):(n=t.transactionDetails?.recurringBillInstance,c=t.recurringBillConfigDetail?.totalPaymentCycles),t?.isRecurring===!0?a.jsxs(wi,{children:[a.jsx(Ci,{children:`${Se.recurringBill.recurringCycle}
|
|
2
2
|
${n}/${c}`}),a.jsx(Ai,{})]}):void 0}function vi(e,t){const l=t.billActivities?.[0],n=t.billStage==="pending_approval"&&l?.areApprovalsSerialized===!0&&l?.currentPendingStepIndex===0;return e&&(t.billStage==="draft"||n)}const ht=V.div`
|
|
3
3
|
margin-bottom: 20px;
|
|
4
4
|
margin-top: 20px;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as k}from"./liveblocks-
|
|
1
|
+
import{j as k}from"./liveblocks-cLm9kffv.js";import{a as V}from"./sentry-CPqvXt28.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-CSmvXf1e.js";import{A as ce,a as ue,aI as de,z as E,w as pe,e as M,aa as x,g as z,bt as le,ao as me,s as B,ap as P}from"./index-BKF634x3.js";import{M7 as fe,eN as G,rx as ye,GI as Se,xe as ge,zX as Ie,Cu as be,D7 as he,E0 as De,Mu as Oe,Mv as Te,Mw as ke,Mx as Ce,My as Ve,J1 as we,Lw as Ae,Jd as Ne,k7 as _e,fA as Fe,fz as ve,fy as xe,pF as ze,pw as Ee,pt as Me,j$ as Be,rG as Pe,rE as R,bC as L,rS as j,ct as Re}from"./zeni-epic-state-BfUwh_Vg.js";import{n as Le}from"./mui-B3yy7ZVf.js";import{c as U}from"./routePaths-BoMWlYq1.js";import{M as je}from"./MobileAppDrawer-CxhHSpBC.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]="beacc6ae-0618-4b30-8014-16655f3049fb",e._sentryDebugIdIdentifier="sentry-dbid-beacc6ae-0618-4b30-8014-16655f3049fb")}catch{}})();const Ue=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-CGrMC7LY.js";import{j as ue,l as la,h as me,g as S,u as ye,k as ge,N as ya,q as mt,n as Qt,o as te}from"./core-DwJJnDQz.js";import{eN as ie,bs as Be,N_ as _a,eR as Se,eS as Ie,eT as Ae,fP as Me,cq as ze,N$ as $e,O0 as $a,sM as Sa,jz as Ia,O1 as Aa,gD as ca,ze as aa,zg as Ga,zh as Ya,jp as Ct,O2 as Ge,z2 as pt,O3 as Xt,O4 as Jt,z5 as wa,O5 as en,Mr as Pa,qY as ht,zb as Za,gO as an,O6 as ft,O7 as Ye,bq as tn,O8 as nn,fA as Ta,fz as Fa,zL as rn,fy as va,M7 as sn,O9 as gt,cj as bt,cL as on,Mq as ua,Al as cn,Oa as rt,zX as Oa,Ob as yt,Am as dn,MR as ln,An as un,Bh as mn,s6 as Cn,Bb as pn,zw as St,zp as hn,Oc as fn,fR as gn,zF as It,zJ as At,fQ as bn,Od as yn,A7 as Et,Oe as Sn,Of as In,Og as An,zH as kt,zs as Dt,z8 as _t,zB as wt,zz as Pt,zD as En,zf as st,Oh as Tt,Oi as xa,zU as Ea,J6 as Ft,cM as Ka,Oj as kn,Ok as Dn,Ol as _n,Om as wn,zR as Ha,Ae as Pn,Aa as Tn,zN as Fn,Ac as vn,A2 as On,A4 as xn,On as vt,Ak as Ot,GE as Bn,Oo as Ln,Op as Rn,Oq as Un,Or as xt,Os as jn,AH as Nn,zW as Bt,zQ as da,zV as Vn,Ot as Hn,Ou as Mn,y$ as zn,Ov as Lt,Ow as Rt,Ox as $n,z1 as Gn,z0 as ot,Oy as Yn,Oz as Zn,OA as Kn,J2 as Wn,OB as Wa,OC as qn,vC as Ut,k7 as Qn,gE as Xn,AM as Jn,OD as jt,OE as er,AN as ar,OF as tr,dc as nr,sG as rr,AC as sr,Aw as xe,bv as or,bD as ir,cv as cr,bE as dr,Il as lr}from"./zeni-epic-state-BVm4B4Kq.js";import{z as J,A as Re,a as oe,d as Z,B as Ze,bX as Ba,c6 as ur,q as ve,c7 as mr,c8 as Cr,Z as ma,aI as Fe,s as be,be as qa,c9 as pr,x as Ca,k as La,h as Qa,e as Q,D as Xa,ca as hr,H as Nt,al as Ja,bq as Je,cb as Ma,cc as fr,w as et,a1 as gr,cd as br,ao as Vt,K as za,I as Ht,g as Mt,ce as yr,cf as Sr,cg as Ir,ch as Ar,ci as Er,o as ka,cj as kr,ck as Dr,cl as ja,C as _r,cm as wr,cn as Pr,co as Tr,cp as Fr,a4 as vr}from"./index-B14SVLkM.js";import{n as _e,D as zt,S as Or}from"./mui-BCq6cQ6-.js";import{a as c}from"./sentry-Dq99UNze.js";import{g as fe,a as pa,b as $t,c as Ee,d as ke,e as Le,f as Ue,A as xr,h as at,P as Br,i as tt,s as ea,j as Gt,k as He,l as Yt,m as Lr,n as Zt,p as Rr,S as it}from"./SetupPagesScreen-BtHa-XN0.js";import Ra from"./NotFoundScreen-tegRdp3m.js";import{M as ha}from"./MobileAppDrawer-B-X4LQ1O.js";import{u as Kt}from"./useAskAiCfoHostNavButtonProps-DRAkhC9m.js";import{c as Wt}from"./useFetchSuggestedQuestionsWhenReady-BZlBMgfX.js";import{v as ct}from"./utils-DXne195x.js";import{t as Ur}from"./AddressScreen-BMzElnPN.js";import"./recharts-YoiFCZ1K.js";import"./analytics-ADuFGfPN.js";import"./plaid-De27RLr_.js";import"./dnd-DnGGlfA4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BPjG59xT.js";import"./lexical-BPK4xa_j.js";import"./pdf-yBp3cCxB.js";import"./analyticsHelper-HLG9u2xY.js";import"./routePaths-C_gA2Ku6.js";import"./BusinessVerificationPageScreen-s19Xn8G4.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]="6de5f687-ea70-4d42-a85f-7138e044034a",e._sentryDebugIdIdentifier="sentry-dbid-6de5f687-ea70-4d42-a85f-7138e044034a")}catch{}})();function jr(){const e=ue(),{cardId:t}=la(),a=me(),r=J.getSignedInUser(),n=S(G=>ie(G)),u=Re(),m=Be(u?.loggedInUserRoleMap),{useFeatureGate:C}=oe();if(r==null)throw Error("Can't access Add To Wallet Page without signing in...");const[I,o]=c.useState(!1),i=S(G=>_a(G).firstViewAfterActivation);if(t==null)throw Error("Empty card id is not valid...");const D=n.userRole.includes("charge_card_user"),{isFeatureEnabled:A}=C(Z.isChargeCardFeatureEnabled),f=!!n.companyChargeCardInfo?.info?.isChargeCardEnabled,{isFeatureEnabled:B}=C(Z.isDebitCardFeatureEnabled),v=Se(n),k=Ie(n),h=Ae(B,n),b=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,g=Ee({isDebitCardFeatureEnabled:B,isBankingOnlyTenant:h}),l=ke({isCardsOnlyTenant:v,isChargeCardFeatureEnabled:A,isBookKeepingTenant:k,isDebitCardProductVisible:g,chargeCardsCreditAccountLimit:b}),w=!!n.companyDebitCardInfo?.info?.isDebitCardEnabled,L=S(G=>Me(G,n.companyId)),j=ze(L.controllers),{creditAccount:T,creditAccountRepayment:P}=S(G=>$e(G)),N=S(G=>G.classListState.fetchState),p=!D&&l&&f,d=S(G=>$a(G,t,p,l)),[_,F]=c.useState(!1),U=d.chargeCard,M=U?.cardCreatedByUser?.userId,W=S(G=>M!=null?Sa(G.userRoleState,M):void 0),y=W?.accountingClassIDs[0],O=S(G=>y!=null?Ia(G.classState,{classId:y,reportId:"class_list"}):void 0),$=U?.cardHolderUser?.userId,R=S(G=>$!=null?Sa(G.userRoleState,$):void 0),Y=R?.accountingClassIDs[0],E=S(G=>Y!=null?Ia(G.classState,{classId:Y,reportId:"class_list"}):void 0),q=U?.type.code==="business_physical_credit_card"||U?.type.code==="business_physical_debit_card",K=U?.type.code==="business_physical_debit_card";c.useEffect(()=>{i&&I===!1&&q&&(o(!0),setTimeout(()=>{a(Aa()),K&&a(ca({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[i,I,q,K]),c.useEffect(()=>{_||d.fetchState==="Completed"||d.fetchState==="In-Progress"||t==null||(F(!0),a(aa(t,p,!1)))},[_,d,t,a]),c.useEffect(()=>{if(d.fetchState==="Completed"&&(q===!1||q&&U?.status?.code!=="active"||U?.cardHolderUserId!==r.userId||i===!1&&I===!1||U?.type.code==="business_physical_debit_card"||U?.type.code==="business_virtual_debit_card")){const G=fe(n.tenantEmailDomain,t,r,U,i);e(G)}},[d.fetchState,i,q]),c.useEffect(()=>{T.fetchState!=="Completed"&&T.fetchState!=="In-Progress"&&l&&f&&m&&a(Ga()),P.fetchState!=="Completed"&&P.fetchState!=="In-Progress"&&l&&f&&m&&a(Ya()),N!=="Completed"&&N!=="In-Progress"&&a(Ct())},[T.fetchState,P.fetchState,a,l,f,m,N]);const z=()=>{if(r!=null&&t!=null){a(Aa());const G=fe(n.tenantEmailDomain,t,r);e(G)}},Ce=U?.type.code==="business_physical_debit_card"||U?.type.code==="business_virtual_debit_card",ae=Le(l,g,w,f),x=pa(l,f,m,T,P),pe=$t(Ce,d);return d.fetchState!=="Completed"?s.jsx(Ze,{fetchState:"In-Progress"}):s.jsxs(s.Fragment,{children:[s.jsx(Ba,{showConfetti:i}),s.jsx(ur,{onGotItClick:z,isDebitCard:U?.type.code==="business_physical_debit_card",controllerEmails:j,isChargeCardFeatureEnabled:l,isDebitCardFeatureEnabled:g,isDebitCardSetupEnabled:w,isChargeCardSetupEnabled:f,productInformation:ae,creditAccountInformation:x,debitAccountInformation:pe,chargeCardDetailView:d,creditAccount:T,classListFetchState:N,creditAccountRepayment:P,cardIssuedByRoles:W?.userRoles,cardIssuedByDepartmentName:O?.className,cardHolderRoles:R?.userRoles,cardHolderDepartmentName:E?.className})]})}const Nr=ge(function(e){const t=Ge(e);return{insightsData:t.insight,cashbackByPeriod:t.cashbackByPeriod,uiState:t.uiState,cashbackSummary:t.cashbackSummary}},function(e){return{onColumnSortConfigChanged:(t,a)=>{e(Xt({uiState:{sortKey:t,sortOrder:a}}))}}})(Cr);function Vr(){const e=ue(),t=me(),a=ye(),r=J.getSignedInUser(),n=S(o=>ie(o)),[u,m]=c.useState(!1),C=S(o=>Ge(o)),I=c.useCallback(()=>{const o=ve(a.state?.pathnameStackToGoBack),i=o.poppedPathname??Hr(n.tenantEmailDomain);e(i,{state:{pathnameStackToGoBack:o.newStack}})},[e,a,n.tenantEmailDomain]);if(c.useEffect(()=>{u||C.fetchState==="Completed"||C.fetchState==="In-Progress"||(m(!0),t(pt()))},[u,C,t]),r==null)throw Error("Can't access cashback detail page without signing in...");return C.fetchState==="In-Progress"?s.jsx(mr,{onBackClick:I}):C.cashbackSummary.cashbackEarned.amount===0&&C.fetchState==="Completed"?s.jsx(Ra,{}):s.jsx(Nr,{onBackClick:I})}const Hr=e=>`/${e}/cards`,Mr={containerWidth:new Ca(100,58)},zr=({appContent:e})=>{const t=ma(),a=me(),r=ue(),{cardId:n}=la(),u=ye(),{useDynamicConfig:m}=oe(),[C,I]=c.useState(!1),[o,i]=c.useState(!1),[D,A]=c.useState(!1),[f,B]=c.useState(!1),v=J.getSignedInUser();if(v==null)throw Error("Can't access onboarding card page without signing in...");const k=S(E=>ie(E));if(n==null)throw Error("Empty card id is not valid...");const{configValue:h}=m(Fe.zeniCardsConfig),b=h.max_charge_card_activation_attempts_by_card_id,g=S(E=>Jt(E,n)),l=g.chargeCard,w=S(E=>E.chargeCardConfigState.fetchState),{useFeatureGate:L}=oe(),{isFeatureEnabled:j}=L(Z.isChargeCardFeatureEnabled),{isFeatureEnabled:T}=L(Z.isDebitCardFeatureEnabled),P=Ae(T,k),N=Ee({isDebitCardFeatureEnabled:T,isBankingOnlyTenant:P}),p=!!k.companyChargeCardInfo?.info?.isChargeCardEnabled,d=k.userRole.includes("charge_card_user"),_=Se(k),F=Ie(k),U=k.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,M=ke({isCardsOnlyTenant:_,isChargeCardFeatureEnabled:j,isBookKeepingTenant:F,isDebitCardProductVisible:N,chargeCardsCreditAccountLimit:U}),W=!d&&M&&p;c.useEffect(()=>{C===!1&&w!=="In-Progress"&&w!=="Completed"&&(a(wa()),I(!0)),o===!1&&g.fetchState==="Not-Started"&&(i(!0),a(aa(n,W,M)))},[o,g.fetchState,C,w]);const y=l?.type.code==="business_physical_credit_card"||l?.type.code==="business_physical_debit_card";c.useEffect(()=>{if(g.fetchState==="Completed"){if(D===!1&&(y===!1||y&&l?.status?.code!=="inactive"||l?.cardHolderUserId!==v.userId)){const E=fe(k.tenantEmailDomain,n,v,l,!0),q=be(u.state?.pathnameStackToGoBack,u.pathname);r(E,{state:{pathnameStackToGoBack:q}})}else if(D&&g.isRefreshingViewInBackground===!1&&l?.status?.code==="active"){a(en({chargeCardId:n}));const E=fe(k.tenantEmailDomain,n,v,l,!0),q=be(u.state?.pathnameStackToGoBack,u.pathname);a(Pa()),r(E,{state:{pathnameStackToGoBack:q}})}}},[g.fetchState,l?.type.code,D,g.isRefreshingViewInBackground]);const O=J.getZeniOtpTokenForCardHolder(n),$=S(E=>ht(E.userState,v.userId)),R=()=>{l?.status?.code!=="active"&&a(Za(n,!0))};c.useEffect(()=>{g.updatePhysicalChargeCardAttemptFetchState.fetchState==="Completed"&&l?.cardActivationAttemptHistory.some(E=>E.statusCode==="success")===!0&&D===!1&&(setTimeout(R,3e3),A(!0))},[g.updatePhysicalChargeCardAttemptFetchState.fetchState,l?.cardActivationAttemptHistory]);const Y=E=>{B(E)};if(w!=="Completed"||l==null)return s.jsx(Ze,{fetchState:"In-Progress"});if(l.shippingAddressId==null)throw Error("Can't access shippingAddressId.");if($?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(Yr,{children:[s.jsx(ha,{isAppContentDrawerOpen:f,handleDrawerToggle:Y}),s.jsx($r,{cardId:n,card:l,shippingAddressId:l.shippingAddressId,phone:$.phone,signedInUser:v,isSandboxEnv:qa(),chargeCardDetailState:g,signedInUserToken:O,navigate:r,currentTenant:k,location:u,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:()=>{Y(!0)}}),e!=null?s.jsx(Gr,{windowSize:t,children:e}):null]})},$r=ge(function(e,{chargeCardDetailState:t,shippingAddressId:a,location:r,cardId:n}){const u=an(e.addressState,a);if(u==null)throw Error("Can't access shippingAddress.");const m=ft(e,n),C=t.updateStatus,I=Ye(e,!1,!1,!1);let o=!1;I.fetchState==="Completed"&&I.cards.length<=1&&(o=!0);const i=r.state?.message==="comingFromV2UrlPath";return{showActivatePage:t.chargeCard?.providerCardCreateTime!=null&&t.chargeCard.providerCardCreateTime.add(24,"h").isBefore(tn())||i,showMenuIcon:o,shippingAddress:u,vgsVaultId:La.cardVaultId,twoFAView:m,activationWaitStatus:C,isRefreshingViewInBackground:t.isRefreshingViewInBackground}},function(e,t){const{navigate:a,cardId:r,location:n,currentTenant:u,chargeCardDetailState:m}=t,C=m.chargeCard?.cardProviderID,{tenantEmailDomain:I}=u;return{onGetOtp:o=>{C!=null&&e(va(o,"ChargeCardHolder",r))},onUpdatePhysicalChargeCardAttempt:o=>{e(rn(r,o))},onResendOtp:o=>{C!=null&&e(Fa(o,"ChargeCardHolder",r))},onVerifyOtp:(o,i)=>{C!=null&&e(Ta(o,i,"ChargeCardHolder",r))},onVerifyOtpSuccess:o=>{o!=null&&J.saveZeniOtpTokenForCardHolder(o,r)},onCVVActivateSuccess:()=>{e(nn({chargeCardId:r}))},onBackClick:()=>{const o=ve(n.state?.pathnameStackToGoBack),i=o.poppedPathname==null||o.poppedPathname.includes("onboard")===!0?Ue(I):o.poppedPathname;a(i,{state:{pathnameStackToGoBack:o.newStack}})}}})(pr),Gr=_e.div`
|
|
1
|
+
import{j as s}from"./liveblocks-cLm9kffv.js";import{j as ue,l as la,h as me,g as S,u as ye,k as ge,N as ya,q as mt,n as Qt,o as te}from"./core-CSmvXf1e.js";import{eN as ie,bs as Be,N_ as _a,eR as Se,eS as Ie,eT as Ae,fP as Me,cq as ze,N$ as $e,O0 as $a,sM as Sa,jz as Ia,O1 as Aa,gD as ca,ze as aa,zg as Ga,zh as Ya,jp as Ct,O2 as Ge,z2 as pt,O3 as Xt,O4 as Jt,z5 as wa,O5 as en,Mr as Pa,qY as ht,zb as Za,gO as an,O6 as ft,O7 as Ye,bq as tn,O8 as nn,fA as Ta,fz as Fa,zL as rn,fy as va,M7 as sn,O9 as gt,cj as bt,cL as on,Mq as ua,Al as cn,Oa as rt,zX as Oa,Ob as yt,Am as dn,MR as ln,An as un,Bh as mn,s6 as Cn,Bb as pn,zw as St,zp as hn,Oc as fn,fR as gn,zF as It,zJ as At,fQ as bn,Od as yn,A7 as Et,Oe as Sn,Of as In,Og as An,zH as kt,zs as Dt,z8 as _t,zB as wt,zz as Pt,zD as En,zf as st,Oh as Tt,Oi as xa,zU as Ea,J6 as Ft,cM as Ka,Oj as kn,Ok as Dn,Ol as _n,Om as wn,zR as Ha,Ae as Pn,Aa as Tn,zN as Fn,Ac as vn,A2 as On,A4 as xn,On as vt,Ak as Ot,GE as Bn,Oo as Ln,Op as Rn,Oq as Un,Or as xt,Os as jn,AH as Nn,zW as Bt,zQ as da,zV as Vn,Ot as Hn,Ou as Mn,y$ as zn,Ov as Lt,Ow as Rt,Ox as $n,z1 as Gn,z0 as ot,Oy as Yn,Oz as Zn,OA as Kn,J2 as Wn,OB as Wa,OC as qn,vC as Ut,k7 as Qn,gE as Xn,AM as Jn,OD as jt,OE as er,AN as ar,OF as tr,dc as nr,sG as rr,AC as sr,Aw as xe,bv as or,bD as ir,cv as cr,bE as dr,Il as lr}from"./zeni-epic-state-BfUwh_Vg.js";import{z as J,A as Re,a as oe,d as Z,B as Ze,bX as Ba,c6 as ur,q as ve,c7 as mr,c8 as Cr,Z as ma,aI as Fe,s as be,be as qa,c9 as pr,x as Ca,k as La,h as Qa,e as Q,D as Xa,ca as hr,H as Nt,al as Ja,bq as Je,cb as Ma,cc as fr,w as et,a1 as gr,cd as br,ao as Vt,K as za,I as Ht,g as Mt,ce as yr,cf as Sr,cg as Ir,ch as Ar,ci as Er,o as ka,cj as kr,ck as Dr,cl as ja,C as _r,cm as wr,cn as Pr,co as Tr,cp as Fr,a4 as vr}from"./index-BKF634x3.js";import{n as _e,D as zt,S as Or}from"./mui-B3yy7ZVf.js";import{a as c}from"./sentry-CPqvXt28.js";import{g as fe,a as pa,b as $t,c as Ee,d as ke,e as Le,f as Ue,A as xr,h as at,P as Br,i as tt,s as ea,j as Gt,k as He,l as Yt,m as Lr,n as Zt,p as Rr,S as it}from"./SetupPagesScreen-CE0NmwDW.js";import Ra from"./NotFoundScreen-BiC86yKG.js";import{M as ha}from"./MobileAppDrawer-CxhHSpBC.js";import{u as Kt}from"./useAskAiCfoHostNavButtonProps-ByIcRpQk.js";import{c as Wt}from"./useFetchSuggestedQuestionsWhenReady-CFG18ow7.js";import{v as ct}from"./utils-CLZrfj5b.js";import{t as Ur}from"./AddressScreen-CQqDQYzZ.js";import"./recharts-D9O-Y9LK.js";import"./analytics-S8XSXbkg.js";import"./plaid-BSEfMXOW.js";import"./dnd-CnZ2VsWj.js";import"./stripe-DMRn4zHo.js";import"./lottie-iBLAIHYG.js";import"./lexical-B1edU3GD.js";import"./pdf-DV6OIXck.js";import"./analyticsHelper-8nU-4onk.js";import"./routePaths-BoMWlYq1.js";import"./BusinessVerificationPageScreen-37mIDOgw.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]="6de5f687-ea70-4d42-a85f-7138e044034a",e._sentryDebugIdIdentifier="sentry-dbid-6de5f687-ea70-4d42-a85f-7138e044034a")}catch{}})();function jr(){const e=ue(),{cardId:t}=la(),a=me(),r=J.getSignedInUser(),n=S(G=>ie(G)),u=Re(),m=Be(u?.loggedInUserRoleMap),{useFeatureGate:C}=oe();if(r==null)throw Error("Can't access Add To Wallet Page without signing in...");const[I,o]=c.useState(!1),i=S(G=>_a(G).firstViewAfterActivation);if(t==null)throw Error("Empty card id is not valid...");const D=n.userRole.includes("charge_card_user"),{isFeatureEnabled:A}=C(Z.isChargeCardFeatureEnabled),f=!!n.companyChargeCardInfo?.info?.isChargeCardEnabled,{isFeatureEnabled:B}=C(Z.isDebitCardFeatureEnabled),v=Se(n),k=Ie(n),h=Ae(B,n),b=n.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,g=Ee({isDebitCardFeatureEnabled:B,isBankingOnlyTenant:h}),l=ke({isCardsOnlyTenant:v,isChargeCardFeatureEnabled:A,isBookKeepingTenant:k,isDebitCardProductVisible:g,chargeCardsCreditAccountLimit:b}),w=!!n.companyDebitCardInfo?.info?.isDebitCardEnabled,L=S(G=>Me(G,n.companyId)),j=ze(L.controllers),{creditAccount:T,creditAccountRepayment:P}=S(G=>$e(G)),N=S(G=>G.classListState.fetchState),p=!D&&l&&f,d=S(G=>$a(G,t,p,l)),[_,F]=c.useState(!1),U=d.chargeCard,M=U?.cardCreatedByUser?.userId,W=S(G=>M!=null?Sa(G.userRoleState,M):void 0),y=W?.accountingClassIDs[0],O=S(G=>y!=null?Ia(G.classState,{classId:y,reportId:"class_list"}):void 0),$=U?.cardHolderUser?.userId,R=S(G=>$!=null?Sa(G.userRoleState,$):void 0),Y=R?.accountingClassIDs[0],E=S(G=>Y!=null?Ia(G.classState,{classId:Y,reportId:"class_list"}):void 0),q=U?.type.code==="business_physical_credit_card"||U?.type.code==="business_physical_debit_card",K=U?.type.code==="business_physical_debit_card";c.useEffect(()=>{i&&I===!1&&q&&(o(!0),setTimeout(()=>{a(Aa()),K&&a(ca({messageSection:"set_debit_card_pin",messageText:"success",type:"success",showStatusIcon:!0}))},5e3))},[i,I,q,K]),c.useEffect(()=>{_||d.fetchState==="Completed"||d.fetchState==="In-Progress"||t==null||(F(!0),a(aa(t,p,!1)))},[_,d,t,a]),c.useEffect(()=>{if(d.fetchState==="Completed"&&(q===!1||q&&U?.status?.code!=="active"||U?.cardHolderUserId!==r.userId||i===!1&&I===!1||U?.type.code==="business_physical_debit_card"||U?.type.code==="business_virtual_debit_card")){const G=fe(n.tenantEmailDomain,t,r,U,i);e(G)}},[d.fetchState,i,q]),c.useEffect(()=>{T.fetchState!=="Completed"&&T.fetchState!=="In-Progress"&&l&&f&&m&&a(Ga()),P.fetchState!=="Completed"&&P.fetchState!=="In-Progress"&&l&&f&&m&&a(Ya()),N!=="Completed"&&N!=="In-Progress"&&a(Ct())},[T.fetchState,P.fetchState,a,l,f,m,N]);const z=()=>{if(r!=null&&t!=null){a(Aa());const G=fe(n.tenantEmailDomain,t,r);e(G)}},Ce=U?.type.code==="business_physical_debit_card"||U?.type.code==="business_virtual_debit_card",ae=Le(l,g,w,f),x=pa(l,f,m,T,P),pe=$t(Ce,d);return d.fetchState!=="Completed"?s.jsx(Ze,{fetchState:"In-Progress"}):s.jsxs(s.Fragment,{children:[s.jsx(Ba,{showConfetti:i}),s.jsx(ur,{onGotItClick:z,isDebitCard:U?.type.code==="business_physical_debit_card",controllerEmails:j,isChargeCardFeatureEnabled:l,isDebitCardFeatureEnabled:g,isDebitCardSetupEnabled:w,isChargeCardSetupEnabled:f,productInformation:ae,creditAccountInformation:x,debitAccountInformation:pe,chargeCardDetailView:d,creditAccount:T,classListFetchState:N,creditAccountRepayment:P,cardIssuedByRoles:W?.userRoles,cardIssuedByDepartmentName:O?.className,cardHolderRoles:R?.userRoles,cardHolderDepartmentName:E?.className})]})}const Nr=ge(function(e){const t=Ge(e);return{insightsData:t.insight,cashbackByPeriod:t.cashbackByPeriod,uiState:t.uiState,cashbackSummary:t.cashbackSummary}},function(e){return{onColumnSortConfigChanged:(t,a)=>{e(Xt({uiState:{sortKey:t,sortOrder:a}}))}}})(Cr);function Vr(){const e=ue(),t=me(),a=ye(),r=J.getSignedInUser(),n=S(o=>ie(o)),[u,m]=c.useState(!1),C=S(o=>Ge(o)),I=c.useCallback(()=>{const o=ve(a.state?.pathnameStackToGoBack),i=o.poppedPathname??Hr(n.tenantEmailDomain);e(i,{state:{pathnameStackToGoBack:o.newStack}})},[e,a,n.tenantEmailDomain]);if(c.useEffect(()=>{u||C.fetchState==="Completed"||C.fetchState==="In-Progress"||(m(!0),t(pt()))},[u,C,t]),r==null)throw Error("Can't access cashback detail page without signing in...");return C.fetchState==="In-Progress"?s.jsx(mr,{onBackClick:I}):C.cashbackSummary.cashbackEarned.amount===0&&C.fetchState==="Completed"?s.jsx(Ra,{}):s.jsx(Nr,{onBackClick:I})}const Hr=e=>`/${e}/cards`,Mr={containerWidth:new Ca(100,58)},zr=({appContent:e})=>{const t=ma(),a=me(),r=ue(),{cardId:n}=la(),u=ye(),{useDynamicConfig:m}=oe(),[C,I]=c.useState(!1),[o,i]=c.useState(!1),[D,A]=c.useState(!1),[f,B]=c.useState(!1),v=J.getSignedInUser();if(v==null)throw Error("Can't access onboarding card page without signing in...");const k=S(E=>ie(E));if(n==null)throw Error("Empty card id is not valid...");const{configValue:h}=m(Fe.zeniCardsConfig),b=h.max_charge_card_activation_attempts_by_card_id,g=S(E=>Jt(E,n)),l=g.chargeCard,w=S(E=>E.chargeCardConfigState.fetchState),{useFeatureGate:L}=oe(),{isFeatureEnabled:j}=L(Z.isChargeCardFeatureEnabled),{isFeatureEnabled:T}=L(Z.isDebitCardFeatureEnabled),P=Ae(T,k),N=Ee({isDebitCardFeatureEnabled:T,isBankingOnlyTenant:P}),p=!!k.companyChargeCardInfo?.info?.isChargeCardEnabled,d=k.userRole.includes("charge_card_user"),_=Se(k),F=Ie(k),U=k.companyChargeCardInfo?.info?.chargeCardsCreditAccountLimit??0,M=ke({isCardsOnlyTenant:_,isChargeCardFeatureEnabled:j,isBookKeepingTenant:F,isDebitCardProductVisible:N,chargeCardsCreditAccountLimit:U}),W=!d&&M&&p;c.useEffect(()=>{C===!1&&w!=="In-Progress"&&w!=="Completed"&&(a(wa()),I(!0)),o===!1&&g.fetchState==="Not-Started"&&(i(!0),a(aa(n,W,M)))},[o,g.fetchState,C,w]);const y=l?.type.code==="business_physical_credit_card"||l?.type.code==="business_physical_debit_card";c.useEffect(()=>{if(g.fetchState==="Completed"){if(D===!1&&(y===!1||y&&l?.status?.code!=="inactive"||l?.cardHolderUserId!==v.userId)){const E=fe(k.tenantEmailDomain,n,v,l,!0),q=be(u.state?.pathnameStackToGoBack,u.pathname);r(E,{state:{pathnameStackToGoBack:q}})}else if(D&&g.isRefreshingViewInBackground===!1&&l?.status?.code==="active"){a(en({chargeCardId:n}));const E=fe(k.tenantEmailDomain,n,v,l,!0),q=be(u.state?.pathnameStackToGoBack,u.pathname);a(Pa()),r(E,{state:{pathnameStackToGoBack:q}})}}},[g.fetchState,l?.type.code,D,g.isRefreshingViewInBackground]);const O=J.getZeniOtpTokenForCardHolder(n),$=S(E=>ht(E.userState,v.userId)),R=()=>{l?.status?.code!=="active"&&a(Za(n,!0))};c.useEffect(()=>{g.updatePhysicalChargeCardAttemptFetchState.fetchState==="Completed"&&l?.cardActivationAttemptHistory.some(E=>E.statusCode==="success")===!0&&D===!1&&(setTimeout(R,3e3),A(!0))},[g.updatePhysicalChargeCardAttemptFetchState.fetchState,l?.cardActivationAttemptHistory]);const Y=E=>{B(E)};if(w!=="Completed"||l==null)return s.jsx(Ze,{fetchState:"In-Progress"});if(l.shippingAddressId==null)throw Error("Can't access shippingAddressId.");if($?.phone==null)throw Error("Can't access user phone number.");return s.jsxs(Yr,{children:[s.jsx(ha,{isAppContentDrawerOpen:f,handleDrawerToggle:Y}),s.jsx($r,{cardId:n,card:l,shippingAddressId:l.shippingAddressId,phone:$.phone,signedInUser:v,isSandboxEnv:qa(),chargeCardDetailState:g,signedInUserToken:O,navigate:r,currentTenant:k,location:u,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:()=>{Y(!0)}}),e!=null?s.jsx(Gr,{windowSize:t,children:e}):null]})},$r=ge(function(e,{chargeCardDetailState:t,shippingAddressId:a,location:r,cardId:n}){const u=an(e.addressState,a);if(u==null)throw Error("Can't access shippingAddress.");const m=ft(e,n),C=t.updateStatus,I=Ye(e,!1,!1,!1);let o=!1;I.fetchState==="Completed"&&I.cards.length<=1&&(o=!0);const i=r.state?.message==="comingFromV2UrlPath";return{showActivatePage:t.chargeCard?.providerCardCreateTime!=null&&t.chargeCard.providerCardCreateTime.add(24,"h").isBefore(tn())||i,showMenuIcon:o,shippingAddress:u,vgsVaultId:La.cardVaultId,twoFAView:m,activationWaitStatus:C,isRefreshingViewInBackground:t.isRefreshingViewInBackground}},function(e,t){const{navigate:a,cardId:r,location:n,currentTenant:u,chargeCardDetailState:m}=t,C=m.chargeCard?.cardProviderID,{tenantEmailDomain:I}=u;return{onGetOtp:o=>{C!=null&&e(va(o,"ChargeCardHolder",r))},onUpdatePhysicalChargeCardAttempt:o=>{e(rn(r,o))},onResendOtp:o=>{C!=null&&e(Fa(o,"ChargeCardHolder",r))},onVerifyOtp:(o,i)=>{C!=null&&e(Ta(o,i,"ChargeCardHolder",r))},onVerifyOtpSuccess:o=>{o!=null&&J.saveZeniOtpTokenForCardHolder(o,r)},onCVVActivateSuccess:()=>{e(nn({chargeCardId:r}))},onBackClick:()=>{const o=ve(n.state?.pathnameStackToGoBack),i=o.poppedPathname==null||o.poppedPathname.includes("onboard")===!0?Ue(I):o.poppedPathname;a(i,{state:{pathnameStackToGoBack:o.newStack}})}}})(pr),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-cLm9kffv.js";import{a as g}from"./sentry-CPqvXt28.js";import{j as w,h as x,u as k,l as T,g as O,k as E}from"./core-CSmvXf1e.js";import{z as N,b0 as F,w as P,e as L,g as V,aa as b,b1 as j,ao as A,ap as U,s as B}from"./index-BKF634x3.js";import{eN as D,fC as M,rx as _,fx as G,c0 as R,Lw as z,bn as Y,pF as $,pt as H,j$ as Z,lv as S,Lx as q,bC as J,ct as C,lD as K,lG as Q}from"./zeni-epic-state-BfUwh_Vg.js";import"./mui-B3yy7ZVf.js";import{c as W}from"./routePaths-BoMWlYq1.js";import{M as X}from"./MobileAppDrawer-CxhHSpBC.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new n.Error().stack;a&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[a]="be7b3d02-4c55-4ce2-9d19-b2bff737977e",n._sentryDebugIdIdentifier="sentry-dbid-be7b3d02-4c55-4ce2-9d19-b2bff737977e")}catch{}})();const ee=E(function(n){const a=G(n),i=N.getSignedInUser(),l=D(n),c=l.tenantId,p={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=R(l?.userRole??[])&&a.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=z(n.companyConfigState),t=n.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:a.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:a,allIndustries:e.companyIndustries??[],allNationalityCountries:t,isDisabled:f,authParams:p,filesEndPoint:`${A.fileMicroServiceBaseUrl}`,isZeniUser:Y(i)}},function(n,a){const{companyId:i,currentTenant:l,navigate:c,location:p}=a,{tenantEmailDomain:f}=l;return{onScheduleClick:e=>{let t=e.href;t.includes("http")||(t="https://".concat(t)),window.open(t,"_blank")},onSaveAll:()=>{n(Q())},onAddressClick:e=>{const t=W(f,e),o=B(p.state?.pathnameStackToGoBack,p.pathname);c(t,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{n(K({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:t,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=t,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:h}=r,v={companyInfo:{...t,website:u!=""&&u!=null?C(u):void 0,meetingLink:y!=""&&y!=null?C(y):void 0,industry:t.industry.selectedOption,companyIndustryType:t.companyIndustryType?.selectedOption??void 0,companySubIndustry:t.companySubIndustry?.selectedOption??void 0,businessModel:t.businessModel.selectedOption??"",companySourceOfFunds:t.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:t.companySourceOfFundsDescription??void 0,countriesOfOperations:t.countriesOfOperations?.selectedOptions?.map(I=>I.length===2?I:U(I))??[],transactionVolume:t.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:t.transactionVolumeDescription??void 0,regulatedStatus:t.regulatedStatus??void 0,regulatedStatusDescription:t.regulatedStatusDescription??void 0,usNexus:t.usNexus??void 0,usNexusTypes:t.usNexusTypes?.selectedOptions??[],purposeOfAccount:t.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:t.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]}};n(S({companyDetails:v}))},onPrimaryContactDetailsUpdated:e=>{n(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{n(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:void 0}]}))},onNewCompanyOfficerRemoved:e=>{n(q(e))},onCompanyOfficerUpdated:e=>{n(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:e.userId}]}))},updateFilesEntity:e=>{n(Z({files:e}))},onDeleteFile:e=>{n(H(e))},onEditFileName:(e,t)=>{n($(e,t.split(".")[0]))}}})(j);function de(){const n=w(),a=x(),i=k(),{tenantEmailDomain:l}=T(),[c,p]=g.useState(!1),[f,e]=g.useState(!1),t=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||t!=="Not-Started"||d==null||(p(!0),a(M(d)))},[c,t,d,a]),g.useEffect(()=>{o==="Not-Started"&&a(_())},[o,a]);const u=s=>{e(s)},y=t==="Not-Started"||t==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&t==="Error"?m.jsx(F,{onGoHome:()=>n("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(P,{analytics:L,onLoad:s=>s.trackPageLoaded(V.Event.companyPassport,b(i)?"Settings":"Company Passport")}),b(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:n,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-cLm9kffv.js";import{a}from"./sentry-CPqvXt28.js";import{h as D,u as v,g as u,N as w}from"./core-CSmvXf1e.js";import{Ih as O,eN as A,fj as _,mm as j,fL as E,fi as L,eO as U,Io as F}from"./zeni-epic-state-BfUwh_Vg.js";import{u as $,z as c,L as g,D as k,o as H}from"./index-BKF634x3.js";import{n as z}from"./mui-B3yy7ZVf.js";import{t as R}from"./getLocaleForTenant-48XX730Y.js";import{g as P,Q as G}from"./QBOConnectionScreen-CB_EMg8L.js";import"./recharts-D9O-Y9LK.js";import"./analytics-S8XSXbkg.js";import"./plaid-BSEfMXOW.js";import"./dnd-CnZ2VsWj.js";import"./stripe-DMRn4zHo.js";import"./lottie-iBLAIHYG.js";import"./lexical-B1edU3GD.js";import"./pdf-DV6OIXck.js";import"./utils-CLZrfj5b.js";import"./empty-B7rlXGce.js";import"./pdf-lib-CdsHJWfm.js";import"./index-DVdqZPmW.js";import"./url-Ckvq63Bc.js";import"./index-DEHP2ald.js";import"./decodeURIComponentSafe-4EPJQS4u.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]="6675bced-3101-4937-bc7b-af33a8cfa4e2",t._sentryDebugIdIdentifier="sentry-dbid-6675bced-3101-4937-bc7b-af33a8cfa4e2")}catch{}})();const Q=z.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
flex: 1 1 auto;
|
|
4
4
|
flex-direction: row;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
import{j as d}from"./liveblocks-cLm9kffv.js";import{z as n}from"./index-BKF634x3.js";import{g as p}from"./QBOConnectionScreen-CB_EMg8L.js";import"./sentry-CPqvXt28.js";import{u as a,N as i}from"./core-CSmvXf1e.js";import"./zeni-epic-state-BfUwh_Vg.js";import"./recharts-D9O-Y9LK.js";import"./mui-B3yy7ZVf.js";import"./analytics-S8XSXbkg.js";import"./plaid-BSEfMXOW.js";import"./dnd-CnZ2VsWj.js";import"./stripe-DMRn4zHo.js";import"./lottie-iBLAIHYG.js";import"./lexical-B1edU3GD.js";import"./pdf-DV6OIXck.js";import"./utils-CLZrfj5b.js";import"./empty-B7rlXGce.js";import"./pdf-lib-CdsHJWfm.js";import"./index-DVdqZPmW.js";import"./url-Ckvq63Bc.js";import"./index-DEHP2ald.js";import"./decodeURIComponentSafe-4EPJQS4u.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]="b68d0d57-e81d-4cfb-97e6-d4dd5e5b7ebd",t._sentryDebugIdIdentifier="sentry-dbid-b68d0d57-e81d-4cfb-97e6-d4dd5e5b7ebd")}catch{}})();const U=()=>{const t=a(),{code:o,realmId:r,state:e}=p(t.search),s=n.getSignedInUser()?.userId??"";if(f(o,r,e,s)===!0){const m=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return d.jsx(i,{to:m})}return d.jsx(i,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
|
package/dist/assets/{CustomerOnboardingRoutes-CL4UjR27.js → CustomerOnboardingRoutes-dfzGdY89.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-cLm9kffv.js";import{t as $e,A as Ce}from"./AddressScreen-CQqDQYzZ.js";import Me from"./NotFoundScreen-BiC86yKG.js";import{a as g}from"./sentry-CPqvXt28.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 ze,n as qe,o as z}from"./core-CSmvXf1e.js";import{C as de,A as le,z as B,a as ue,h as Ke,d as _,s as V,w as H,e as N,B as je,g as Y,ak as Qe,Z as Ze,al as ke,k as te,am as Je,an as Ie,o as He,ao as We,ap as Te,aq as Ye}from"./index-BKF634x3.js";import{bn as Xe,eN as ee,fb as et,eT as pe,eR as me,bv as tt,mk as at,f7 as nt,bM as ot,j3 as ae,j6 as ve,I$ as st,bR as it,c0 as ge,rL as fe,rw as rt,Jb as X,rM as _e,GI as ct,k7 as Ue,Jc as Ve,Jd as dt,Je as lt,Jf as ut,j1 as pt,j4 as mt,ry as Be,rK as gt,bC as Ee,ct as ft,rY as xe,pF as ht,pt as yt,j$ as bt,fA as St,fz as Ct,fy as kt,Jg as It,rq as Tt,rZ as Et,s0 as xt,s3 as Ot,s9 as At,cS as Pt}from"./zeni-epic-state-BfUwh_Vg.js";import{n as he}from"./mui-B3yy7ZVf.js";import{g as Dt,h as Ft,q as ne}from"./QBOConnectionScreen-CB_EMg8L.js";import"./recharts-D9O-Y9LK.js";import"./analytics-S8XSXbkg.js";import"./plaid-BSEfMXOW.js";import"./dnd-CnZ2VsWj.js";import"./stripe-DMRn4zHo.js";import"./lottie-iBLAIHYG.js";import"./lexical-B1edU3GD.js";import"./pdf-DV6OIXck.js";import"./utils-CLZrfj5b.js";import"./empty-B7rlXGce.js";import"./pdf-lib-CdsHJWfm.js";import"./index-DVdqZPmW.js";import"./url-Ckvq63Bc.js";import"./index-DEHP2ald.js";import"./decodeURIComponentSafe-4EPJQS4u.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]="4f1d70be-fcb4-490c-b174-2cb6f7928abc",t._sentryDebugIdIdentifier="sentry-dbid-4f1d70be-fcb4-490c-b174-2cb6f7928abc")}catch{}})();const wt=ce(function(t,o){const s=[];o.isApAgingFeatureEnabled===!1&&s.push("accounts_payable_aging"),o.isArAgingFeatureEnabled===!1&&s.push("accounts_receivable_aging"),o.shouldFetchZeniAccountsPromoCard===!1&&s.push("zeni_accounts_promo_card"),o.shouldFetchRewardsPlanCard===!1&&s.push("rewards_card"),o.isExpenseAutomationEnabledForUser===!1&&s.push("expense_automation_card");const 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"}})}}})(Qe),jt=()=>{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(),f=Xe(i),{useFeatureGate:m}=ue(),I=Ke(),{isFeatureEnabled:E}=m(_.isApAgingFeatureEnabled),{isFeatureEnabled:x}=m(_.isArAgingFeatureEnabled),{isFeatureEnabled:k}=m(_.isDepositAccountsFeatureEnabled),{isFeatureEnabled:h}=m(_.isReferralFeatureEnabled),{isFeatureEnabled:U}=m(_.isExpenseAutomationEnabled),{isFeatureEnabled:C}=m(_.isExpenseAutomationEnabledV2),{isFeatureEnabled:F}=m(_.isDebitCardFeatureEnabled),$=C||U&&f,c=D(l=>ee(l)),{isFeatureEnabled:L}=m(_.isTreasuryEnabled),w=c.company!=null&&et(c.company),R=L&&w,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 j=pe(F,c),A=me(c),P=[],Q=S?.resources?.find(l=>l.resource==="/reports/top_expenses")==null,M=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,K=S?.resources?.find(l=>l.resource==="/reimbursements")==null;if(Q===!1&&P.push("top_expenses"),M===!1&&P.push("task_card"),v===!1&&P.push("bill_pay_card","bill_pay_promo_card"),K===!1&&P.push("reimbursement_card","reimbursement_promo_card"),k===!1&&P.push("zeni_accounts_promo_card"),h===!1&&P.push("rewards_card"),g.useEffect(()=>{O!=="Completed"||d||j||A||(r(!0),s(at(i.userId,G,c.tenantId,!0,!1,P)))},[d,O,j,A,i,c.tenantId,s]),g.useEffect(()=>{(j||A)&&setTimeout(()=>{b(!0)},5e3)},[j,A]),O!=="Completed")return a.jsx(T,{to:"../"});if(O==="Completed"&&p){const l=V(o.state?.pathnameStackToGoBack,o.pathname);if(j)return a.jsx(T,{to:"../../checking",state:{...o.state,pathnameStackToGoBack:l,message:"activation"}});if(A)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=>(Z=>Z.trackPageLoaded(Y.Event.onboardingDashboardActivation))(l)}),a.jsx(wt,{navigate:t,location:o,themeState:u,signedInUser:i,isApAgingFeatureEnabled:E,isArAgingFeatureEnabled:x,shouldFetchZeniAccountsPromoCard:k,shouldFetchRewardsPlanCard:h,isExpenseAutomationEnabledForUser:$,isExpenseAutomationFeatureEnabledV2:C,isTreasuryEnabled:R,loggedInUserRoleMap:n?.loggedInUserRoleMap})]}):a.jsx(je,{fetchState:"In-Progress",style:{backgroundColor:I.colors.grey5}})},Oe=he.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100vh;
|
|
4
4
|
background-color: ${t=>t.theme.colors.grey4};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-CGrMC7LY.js";import{l as K,g as k,u as z,h as N,j as q,k as H,s as $a,n as at,o as D}from"./core-DwJJnDQz.js";import{eN as L,Jw as Le,bC as Yt,bq as de,KJ as za,hT as qa,KK as wt,KL as Za,hW as nt,KM as Be,KN as Ha,h$ as Ja,KO as xt,KP as Qa,i3 as ot,KQ as Re,KR as Wa,cj as rt,KS as Xa,KT as en,JQ as tn,iZ as an,KU as nn,bn as Se,KV as Gt,Jk as X,bc as Vt,jb as Nt,mu as Kt,iW as $t,Jm as ee,Jl as Z,f3 as on,fl as sn,KW as rn,KX as cn,KY as zt,KZ as fe,tB as ye,tC as ve,tZ as ue,tT as te,tG as Ie,K_ as ln,K$ as dn,L0 as un,L1 as qt,L2 as ge,L3 as mn,dB as Me,qd as Zt,L4 as pn,L5 as hn,L6 as fn,L7 as it,IH as ct,jr as lt,u5 as dt,ql as gn,L8 as Cn,tD as Dt,qg as ce,qc as Ht,L9 as oe,La as bn,Lb as ut,IG as mt,sd as Jt,Lc as _n,Ld as kn,Le as Sn,Lf as pt,sq as yn,Lg as vn,tF as Ot,sc as Qt,Lh as se,Li as In,bv as Wt,u9 as Xt,Lj as An,Lk as En,Ll as Tn,Lm as ht,u4 as wn,Ln as xn,tE as Ft,u8 as ea,Lo as re,Lp as Dn,Lq as On,Lr as ta,jg as aa,mr as na,jl as oa,mp as sa,mo as ra,mn as ia,rB as Fn,fb as Pn,cM as Bn,cN as Rn,mk as jn,f7 as Ln,mA as Mn,Ls as Un,Dd as Yn,Lt as Gn,Lu as Vn,Lv as Nn,b5 as ft,eZ as Kn,gB as $n,fC as zn,mv as qn,iP as Zn,ms as Hn,mq as Jn,eT as Qn,eR as Wn}from"./zeni-epic-state-BVm4B4Kq.js";import{z as j,K as J,s as O,e as I,D as $,aP as Xn,H as Ae,w as Ee,aQ as ca,g as G,aR as eo,A as Te,aS as la,a as Ue,d as M,h as to,aT as ao,aU as no,Z as oo,c as da,$ as so,aV as ro,aI as ua,aW as io,aX as co,J as lo,aY as we,aZ as uo,al as mo,q as po,I as ho,a_ as fo,a$ as be}from"./index-B14SVLkM.js";import{n as gt}from"./mui-BCq6cQ6-.js";import{a as _}from"./sentry-Dq99UNze.js";import{w as ma}from"./withTransactionSidePanel-BeLlGbx-.js";import{b as pa,t as me,e as ae,a as Ct,v as go}from"./routePaths-C_gA2Ku6.js";import{u as Ye}from"./useAskAiCfoHostNavButtonProps-DRAkhC9m.js";import{c as xe,b as Co}from"./useFetchSuggestedQuestionsWhenReady-BZlBMgfX.js";import ke from"./NotFoundScreen-tegRdp3m.js";import{t as ha}from"./analyticsHelper-HLG9u2xY.js";import{C as bo}from"./CompanyPassportScreen-CCAj18my.js";import{F as _o}from"./FeaturePreviewScreen-Dv0X4e82.js";import{R as ko}from"./ReferralListScreen-DMSwhuSJ.js";import"./recharts-YoiFCZ1K.js";import"./analytics-ADuFGfPN.js";import"./plaid-De27RLr_.js";import"./dnd-DnGGlfA4.js";import"./stripe-DMRn4zHo.js";import"./lottie-BPjG59xT.js";import"./lexical-BPK4xa_j.js";import"./pdf-yBp3cCxB.js";import"./utils-DXne195x.js";import"./TransactionDetailScreen-CD84n5uo.js";import"./decodeURIComponentSafe-CbGAGP0J.js";import"./MobileAppDrawer-B-X4LQ1O.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]="432cc961-8d1c-49e4-88d9-f69dd54b37cc",e._sentryDebugIdIdentifier="sentry-dbid-432cc961-8d1c-49e4-88d9-f69dd54b37cc")}catch{}})();const So=ma(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=K(),s=j.getSignedInUser(),i=k(T=>T.tenantState.currentTenantId),d=k(T=>L(T)),{tenantEmailDomain:f}=K(),g=z(),C=d?.companyName??"",p={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=_.useMemo(()=>({authParams:p,companyName:C,downloadEndPoint:`${J}/agingDetailedReport`,timezone:Le()}),[]),u=_.useMemo(()=>r!=null?Yt(r):de(),[r]),h=N(),m=q(),b=k(T=>za(T,u,o)),S=_.useCallback(()=>{o!=null&&b.fetchState!=="In-Progress"&&b.fetchState!=="Completed"&&h(qa(o,u))},[u]),A=_.useCallback(()=>{m("../../",{relative:"path"})},[]),P=_.useCallback((T,B)=>{h(wt({sortKey:T,sortOrder:B}))},[]),E=_.useCallback(T=>{h(wt({downloadState:T}))},[]),y=_.useCallback(T=>{if(e)e(T.transactionId,T.transactionType);else if(f!=null){const B=pa({id:T.transactionId,type:T.transactionType},f);m(B);const pe=O(g.state?.pathnameStackToGoBack,g.pathname);m(B,{state:{pathnameStackToGoBack:pe}})}},[f,e]),w=_.useCallback(()=>{b.vendor!=null&&I.trackApAgingDetail("AP Aging",u.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),b.vendor.id,b.vendor.name)},[b.vendor,u]);return _.useEffect(()=>{S()},[]),_.useEffect(()=>{b.fetchState==="Completed"&&w()},[w,b.fetchState]),l.jsx(Xn,{apAgingDetail:b,downloadParams:c,reportDate:u,analytics:I,onTransactionClick:y,onReload:S,onBackClick:A,onColumnSortConfigChanged:P,updateDownloadStateHandler:E,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),yo=()=>{const{isAiCfoOpen:e,setIsAiCfoOpen:a}=Ae(),t=N(),n=q(),o=k(y=>Za(y)),{isAiCfoAccessEnabled:r,onAskAiCfoClick:s}=Ye({isAiCfoOpen:e,setIsAiCfoOpen:a,mobileExploreReferrer:"AP Aging"});xe({isDataReady:o.fetchState==="Completed"});const i=j.getSignedInUser(),d=k(y=>y.tenantState.currentTenantId),f=k(y=>L(y)),g=f?.companyName??"",C={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:d??""},p=_.useMemo(()=>({authParams:C,companyName:g,downloadEndPoint:`${J}/agingReport`,timezone:Le()}),[]),c=o.apAgingUIState.selectedDate??de(),u=_.useCallback(()=>{o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&t(nt(c))},[]);_.useEffect(()=>{u()},[]);const h=_.useCallback(()=>{n("../",{relative:"path"})},[]),m=_.useCallback(y=>{t(Be({searchString:y}))},[]),b=_.useCallback((y,w)=>{t(Be({sortKey:w,sortOrder:y}))},[]),S=_.useCallback(y=>{n(`./${y}/${c.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[c]),A=_.useCallback(y=>{t(Be({downloadState:y}))},[]),P=_.useCallback((y,w)=>{},[]),E=_.useCallback((y,w)=>{t(Be({selectedDate:y,agingDateSelectionType:w})),t(nt(y))},[]);return l.jsxs(l.Fragment,{children:[o.fetchState==="Completed"?l.jsx(Ee,{analytics:I,onLoad:y=>y.trackPageLoaded(G.Event.agingReport,"AP Aging")}):null,l.jsx(ca,{uiState:o.apAgingUIState,report:o,downloadParams:p,analytics:I,onReloadReport:u,onBackClick:h,onSearchTextChange:m,onSortOrderChange:b,onEntityNameClick:S,updateDownloadStateHandler:A,onSelectedDateChanged:E,onNodeCollapseToggled:P,isAiCfoAccessEnabled:r,onAskAiCfoClick:s})]})},vo=ma(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=K(),s=j.getSignedInUser(),i=k(w=>L(w)),{tenantEmailDomain:d}=K(),f=z(),g=i.companyName,C={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},p=_.useMemo(()=>({authParams:C,companyName:g,downloadEndPoint:`${J}/agingDetailedReport`,timezone:Le()}),[]),c=_.useMemo(()=>r!=null?Yt(r):de(),[r]),u=N(),h=q(),m=k(w=>Ha(w,c,o)),b=_.useCallback(()=>{o!=null&&m.fetchState!=="In-Progress"&&m.fetchState!=="Completed"&&u(Ja(o,c))},[c]),S=_.useCallback(()=>{h("../../",{relative:"path"})},[]),A=_.useCallback((w,T)=>{u(xt({sortKey:w,sortOrder:T}))},[]),P=_.useCallback(w=>{u(xt({downloadState:w}))},[]),E=_.useCallback(w=>{if(e)e(w.transactionId,w.transactionType);else if(d!=null){const T=pa({id:w.transactionId,type:w.transactionType},d);h(T);const B=O(f.state?.pathnameStackToGoBack,f.pathname);h(T,{state:{pathnameStackToGoBack:B}})}},[d,e]),y=_.useCallback(()=>{m.customer!=null&&I.trackArAgingDetail("AR Aging",c.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),m.customer.id,m.customer.name)},[m.customer,c]);return _.useEffect(()=>{b()},[]),_.useEffect(()=>{m.fetchState==="Completed"&&y()},[m.fetchState,y]),l.jsx(eo,{arAgingDetail:m,downloadParams:p,reportDate:c,analytics:I,onTransactionClick:E,onReload:b,onBackClick:S,onColumnSortConfigChanged:A,updateDownloadStateHandler:P,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),Io=()=>{const{isAiCfoOpen:e,setIsAiCfoOpen:a}=Ae(),t=N(),n=q(),o=k(E=>Qa(E)),{isAiCfoAccessEnabled:r,onAskAiCfoClick:s}=Ye({isAiCfoOpen:e,setIsAiCfoOpen:a,mobileExploreReferrer:"AR Aging"});xe({isDataReady:o.fetchState==="Completed"});const i=j.getSignedInUser(),d=k(E=>L(E)),f=d.companyName,g={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:d.tenantId},C=_.useMemo(()=>({authParams:g,companyName:f,downloadEndPoint:`${J}/agingReport`,timezone:Le()}),[]),p=o.arAgingUIState.selectedDate??de(),c=_.useCallback(()=>{o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&t(ot(p))},[]);_.useEffect(()=>{c()},[]);const u=_.useCallback(()=>{n("../",{relative:"path"})},[]),h=_.useCallback(E=>{t(Re({searchString:E}))},[]),m=_.useCallback((E,y)=>{t(Re({sortKey:y,sortOrder:E}))},[]),b=_.useCallback(E=>{n(`./${E}/${p.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[p]),S=_.useCallback(E=>{t(Re({downloadState:E}))},[]),A=_.useCallback((E,y)=>{t(Re({selectedDate:E,agingDateSelectionType:y})),t(ot(E))},[]),P=_.useCallback((E,y)=>{t(Wa({nodeId:E,isCollapsed:y}))},[]);return l.jsxs(l.Fragment,{children:[o.fetchState==="Completed"?l.jsx(Ee,{analytics:I,onLoad:E=>E.trackPageLoaded(G.Event.agingReport,"AR Aging")}):null,l.jsx(ca,{uiState:o.arAgingUIState,report:o,downloadParams:C,analytics:I,onReloadReport:c,onBackClick:u,onSearchTextChange:h,onSortOrderChange:m,onEntityNameClick:b,updateDownloadStateHandler:S,onSelectedDateChanged:A,onNodeCollapseToggled:P,isAiCfoAccessEnabled:r,onAskAiCfoClick:s})]})},fa=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function ga(e,a){const t=tn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=me(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(an(n,o))},onPromoCardBtnClick:n=>{if(a.isZeniAccountsAdmin){let o=`../../checking/${n}`;n?I.trackZeniAccountsCashBalancePromoClicked("Move Money"):(I.trackZeniAccountsCashBalancePromoClicked("Sign Up for Free"),o="../../checking/promo");const r=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(o,{state:{pathnameStackToGoBack:r}})}else I.trackZeniAccountsCashBalancePromoClicked("Learn More"),window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}const Ao=H(function(e){const a=Xa(e).accountsInOrder.map((n,o)=>fa(n,o)),t=en(e);return{sectionTitle:$.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:I}},ga)(la),Eo=H(function(e){const a=nn(e).accountsInOrder.map((o,r)=>fa(o,r)),t=j.getSignedInUser(),n=Se(t);return{sectionTitle:$.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:I}},ga)(la);function To(){const e=q(),a=z(),{tenantEmailDomain:t}=K(),n=Te(),o=k(s=>L(s).company?.companyInfo.firstMonthOfFY??1),r=rt(n?.loggedInUserRoleMap);return k(s=>s.cashBalanceState.fetchState)==="Error"?l.jsx(ke,{}):l.jsx(Ao,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function wo(){const e=q(),a=z(),{tenantEmailDomain:t}=K(),n=Te(),o=rt(n?.loggedInUserRoleMap),r=k(s=>L(s).company?.companyInfo.firstMonthOfFY??1);return k(s=>s.cardBalanceState.fetchState)==="Error"?l.jsx(ke,{}):l.jsx(Eo,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const xo=gt.div`
|
|
1
|
+
import{j as l}from"./liveblocks-cLm9kffv.js";import{l as K,g as k,u as z,h as N,j as q,k as H,s as $a,n as at,o as D}from"./core-CSmvXf1e.js";import{eN as L,Jw as Le,bC as Yt,bq as de,KJ as za,hT as qa,KK as wt,KL as Za,hW as nt,KM as Be,KN as Ha,h$ as Ja,KO as xt,KP as Qa,i3 as ot,KQ as Re,KR as Wa,cj as rt,KS as Xa,KT as en,JQ as tn,iZ as an,KU as nn,bn as Se,KV as Gt,Jk as X,bc as Vt,jb as Nt,mu as Kt,iW as $t,Jm as ee,Jl as Z,f3 as on,fl as sn,KW as rn,KX as cn,KY as zt,KZ as fe,tB as ye,tC as ve,tZ as ue,tT as te,tG as Ie,K_ as ln,K$ as dn,L0 as un,L1 as qt,L2 as ge,L3 as mn,dB as Me,qd as Zt,L4 as pn,L5 as hn,L6 as fn,L7 as it,IH as ct,jr as lt,u5 as dt,ql as gn,L8 as Cn,tD as Dt,qg as ce,qc as Ht,L9 as oe,La as bn,Lb as ut,IG as mt,sd as Jt,Lc as _n,Ld as kn,Le as Sn,Lf as pt,sq as yn,Lg as vn,tF as Ot,sc as Qt,Lh as se,Li as In,bv as Wt,u9 as Xt,Lj as An,Lk as En,Ll as Tn,Lm as ht,u4 as wn,Ln as xn,tE as Ft,u8 as ea,Lo as re,Lp as Dn,Lq as On,Lr as ta,jg as aa,mr as na,jl as oa,mp as sa,mo as ra,mn as ia,rB as Fn,fb as Pn,cM as Bn,cN as Rn,mk as jn,f7 as Ln,mA as Mn,Ls as Un,Dd as Yn,Lt as Gn,Lu as Vn,Lv as Nn,b5 as ft,eZ as Kn,gB as $n,fC as zn,mv as qn,iP as Zn,ms as Hn,mq as Jn,eT as Qn,eR as Wn}from"./zeni-epic-state-BfUwh_Vg.js";import{z as j,K as J,s as O,e as I,D as $,aP as Xn,H as Ae,w as Ee,aQ as ca,g as G,aR as eo,A as Te,aS as la,a as Ue,d as M,h as to,aT as ao,aU as no,Z as oo,c as da,$ as so,aV as ro,aI as ua,aW as io,aX as co,J as lo,aY as we,aZ as uo,al as mo,q as po,I as ho,a_ as fo,a$ as be}from"./index-BKF634x3.js";import{n as gt}from"./mui-B3yy7ZVf.js";import{a as _}from"./sentry-CPqvXt28.js";import{w as ma}from"./withTransactionSidePanel-BGx0Sk-J.js";import{b as pa,t as me,e as ae,a as Ct,v as go}from"./routePaths-BoMWlYq1.js";import{u as Ye}from"./useAskAiCfoHostNavButtonProps-ByIcRpQk.js";import{c as xe,b as Co}from"./useFetchSuggestedQuestionsWhenReady-CFG18ow7.js";import ke from"./NotFoundScreen-BiC86yKG.js";import{t as ha}from"./analyticsHelper-8nU-4onk.js";import{C as bo}from"./CompanyPassportScreen-Cq-jjy6A.js";import{F as _o}from"./FeaturePreviewScreen-CDLU6W9q.js";import{R as ko}from"./ReferralListScreen-C1K9Itgb.js";import"./recharts-D9O-Y9LK.js";import"./analytics-S8XSXbkg.js";import"./plaid-BSEfMXOW.js";import"./dnd-CnZ2VsWj.js";import"./stripe-DMRn4zHo.js";import"./lottie-iBLAIHYG.js";import"./lexical-B1edU3GD.js";import"./pdf-DV6OIXck.js";import"./utils-CLZrfj5b.js";import"./TransactionDetailScreen-BoDb87tz.js";import"./decodeURIComponentSafe-4EPJQS4u.js";import"./MobileAppDrawer-CxhHSpBC.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]="432cc961-8d1c-49e4-88d9-f69dd54b37cc",e._sentryDebugIdIdentifier="sentry-dbid-432cc961-8d1c-49e4-88d9-f69dd54b37cc")}catch{}})();const So=ma(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=K(),s=j.getSignedInUser(),i=k(T=>T.tenantState.currentTenantId),d=k(T=>L(T)),{tenantEmailDomain:f}=K(),g=z(),C=d?.companyName??"",p={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=_.useMemo(()=>({authParams:p,companyName:C,downloadEndPoint:`${J}/agingDetailedReport`,timezone:Le()}),[]),u=_.useMemo(()=>r!=null?Yt(r):de(),[r]),h=N(),m=q(),b=k(T=>za(T,u,o)),S=_.useCallback(()=>{o!=null&&b.fetchState!=="In-Progress"&&b.fetchState!=="Completed"&&h(qa(o,u))},[u]),A=_.useCallback(()=>{m("../../",{relative:"path"})},[]),P=_.useCallback((T,B)=>{h(wt({sortKey:T,sortOrder:B}))},[]),E=_.useCallback(T=>{h(wt({downloadState:T}))},[]),y=_.useCallback(T=>{if(e)e(T.transactionId,T.transactionType);else if(f!=null){const B=pa({id:T.transactionId,type:T.transactionType},f);m(B);const pe=O(g.state?.pathnameStackToGoBack,g.pathname);m(B,{state:{pathnameStackToGoBack:pe}})}},[f,e]),w=_.useCallback(()=>{b.vendor!=null&&I.trackApAgingDetail("AP Aging",u.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),b.vendor.id,b.vendor.name)},[b.vendor,u]);return _.useEffect(()=>{S()},[]),_.useEffect(()=>{b.fetchState==="Completed"&&w()},[w,b.fetchState]),l.jsx(Xn,{apAgingDetail:b,downloadParams:c,reportDate:u,analytics:I,onTransactionClick:y,onReload:S,onBackClick:A,onColumnSortConfigChanged:P,updateDownloadStateHandler:E,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),yo=()=>{const{isAiCfoOpen:e,setIsAiCfoOpen:a}=Ae(),t=N(),n=q(),o=k(y=>Za(y)),{isAiCfoAccessEnabled:r,onAskAiCfoClick:s}=Ye({isAiCfoOpen:e,setIsAiCfoOpen:a,mobileExploreReferrer:"AP Aging"});xe({isDataReady:o.fetchState==="Completed"});const i=j.getSignedInUser(),d=k(y=>y.tenantState.currentTenantId),f=k(y=>L(y)),g=f?.companyName??"",C={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:d??""},p=_.useMemo(()=>({authParams:C,companyName:g,downloadEndPoint:`${J}/agingReport`,timezone:Le()}),[]),c=o.apAgingUIState.selectedDate??de(),u=_.useCallback(()=>{o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&t(nt(c))},[]);_.useEffect(()=>{u()},[]);const h=_.useCallback(()=>{n("../",{relative:"path"})},[]),m=_.useCallback(y=>{t(Be({searchString:y}))},[]),b=_.useCallback((y,w)=>{t(Be({sortKey:w,sortOrder:y}))},[]),S=_.useCallback(y=>{n(`./${y}/${c.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[c]),A=_.useCallback(y=>{t(Be({downloadState:y}))},[]),P=_.useCallback((y,w)=>{},[]),E=_.useCallback((y,w)=>{t(Be({selectedDate:y,agingDateSelectionType:w})),t(nt(y))},[]);return l.jsxs(l.Fragment,{children:[o.fetchState==="Completed"?l.jsx(Ee,{analytics:I,onLoad:y=>y.trackPageLoaded(G.Event.agingReport,"AP Aging")}):null,l.jsx(ca,{uiState:o.apAgingUIState,report:o,downloadParams:p,analytics:I,onReloadReport:u,onBackClick:h,onSearchTextChange:m,onSortOrderChange:b,onEntityNameClick:S,updateDownloadStateHandler:A,onSelectedDateChanged:E,onNodeCollapseToggled:P,isAiCfoAccessEnabled:r,onAskAiCfoClick:s})]})},vo=ma(function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=K(),s=j.getSignedInUser(),i=k(w=>L(w)),{tenantEmailDomain:d}=K(),f=z(),g=i.companyName,C={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},p=_.useMemo(()=>({authParams:C,companyName:g,downloadEndPoint:`${J}/agingDetailedReport`,timezone:Le()}),[]),c=_.useMemo(()=>r!=null?Yt(r):de(),[r]),u=N(),h=q(),m=k(w=>Ha(w,c,o)),b=_.useCallback(()=>{o!=null&&m.fetchState!=="In-Progress"&&m.fetchState!=="Completed"&&u(Ja(o,c))},[c]),S=_.useCallback(()=>{h("../../",{relative:"path"})},[]),A=_.useCallback((w,T)=>{u(xt({sortKey:w,sortOrder:T}))},[]),P=_.useCallback(w=>{u(xt({downloadState:w}))},[]),E=_.useCallback(w=>{if(e)e(w.transactionId,w.transactionType);else if(d!=null){const T=pa({id:w.transactionId,type:w.transactionType},d);h(T);const B=O(f.state?.pathnameStackToGoBack,f.pathname);h(T,{state:{pathnameStackToGoBack:B}})}},[d,e]),y=_.useCallback(()=>{m.customer!=null&&I.trackArAgingDetail("AR Aging",c.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),m.customer.id,m.customer.name)},[m.customer,c]);return _.useEffect(()=>{b()},[]),_.useEffect(()=>{m.fetchState==="Completed"&&y()},[m.fetchState,y]),l.jsx(eo,{arAgingDetail:m,downloadParams:p,reportDate:c,analytics:I,onTransactionClick:E,onReload:b,onBackClick:S,onColumnSortConfigChanged:A,updateDownloadStateHandler:P,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})}),Io=()=>{const{isAiCfoOpen:e,setIsAiCfoOpen:a}=Ae(),t=N(),n=q(),o=k(E=>Qa(E)),{isAiCfoAccessEnabled:r,onAskAiCfoClick:s}=Ye({isAiCfoOpen:e,setIsAiCfoOpen:a,mobileExploreReferrer:"AR Aging"});xe({isDataReady:o.fetchState==="Completed"});const i=j.getSignedInUser(),d=k(E=>L(E)),f=d.companyName,g={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:d.tenantId},C=_.useMemo(()=>({authParams:g,companyName:f,downloadEndPoint:`${J}/agingReport`,timezone:Le()}),[]),p=o.arAgingUIState.selectedDate??de(),c=_.useCallback(()=>{o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&t(ot(p))},[]);_.useEffect(()=>{c()},[]);const u=_.useCallback(()=>{n("../",{relative:"path"})},[]),h=_.useCallback(E=>{t(Re({searchString:E}))},[]),m=_.useCallback((E,y)=>{t(Re({sortKey:y,sortOrder:E}))},[]),b=_.useCallback(E=>{n(`./${E}/${p.format($.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)},[p]),S=_.useCallback(E=>{t(Re({downloadState:E}))},[]),A=_.useCallback((E,y)=>{t(Re({selectedDate:E,agingDateSelectionType:y})),t(ot(E))},[]),P=_.useCallback((E,y)=>{t(Wa({nodeId:E,isCollapsed:y}))},[]);return l.jsxs(l.Fragment,{children:[o.fetchState==="Completed"?l.jsx(Ee,{analytics:I,onLoad:E=>E.trackPageLoaded(G.Event.agingReport,"AR Aging")}):null,l.jsx(ca,{uiState:o.arAgingUIState,report:o,downloadParams:C,analytics:I,onReloadReport:c,onBackClick:u,onSearchTextChange:h,onSortOrderChange:m,onEntityNameClick:b,updateDownloadStateHandler:S,onSelectedDateChanged:A,onNodeCollapseToggled:P,isAiCfoAccessEnabled:r,onAskAiCfoClick:s})]})},fa=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function ga(e,a){const t=tn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=me(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(an(n,o))},onPromoCardBtnClick:n=>{if(a.isZeniAccountsAdmin){let o=`../../checking/${n}`;n?I.trackZeniAccountsCashBalancePromoClicked("Move Money"):(I.trackZeniAccountsCashBalancePromoClicked("Sign Up for Free"),o="../../checking/promo");const r=O(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(o,{state:{pathnameStackToGoBack:r}})}else I.trackZeniAccountsCashBalancePromoClicked("Learn More"),window.open("https://www.zeni.ai/product/business-checking-accounts","_blank")}}}const Ao=H(function(e){const a=Xa(e).accountsInOrder.map((n,o)=>fa(n,o)),t=en(e);return{sectionTitle:$.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,zeniAccountsPromoCardReport:t,fetchState:e.cashBalanceState.fetchState,analytics:I}},ga)(la),Eo=H(function(e){const a=nn(e).accountsInOrder.map((o,r)=>fa(o,r)),t=j.getSignedInUser(),n=Se(t);return{sectionTitle:$.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:I}},ga)(la);function To(){const e=q(),a=z(),{tenantEmailDomain:t}=K(),n=Te(),o=k(s=>L(s).company?.companyInfo.firstMonthOfFY??1),r=rt(n?.loggedInUserRoleMap);return k(s=>s.cashBalanceState.fetchState)==="Error"?l.jsx(ke,{}):l.jsx(Ao,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,isZeniAccountsAdmin:r,firstMonthOfFY:o})}function wo(){const e=q(),a=z(),{tenantEmailDomain:t}=K(),n=Te(),o=rt(n?.loggedInUserRoleMap),r=k(s=>L(s).company?.companyInfo.firstMonthOfFY??1);return k(s=>s.cardBalanceState.fetchState)==="Error"?l.jsx(ke,{}):l.jsx(Eo,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,isZeniAccountsAdmin:o,firstMonthOfFY:r})}const xo=gt.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-cLm9kffv.js";import{a as u}from"./sentry-CPqvXt28.js";import{h as y,g as b,k as w,u as A,N}from"./core-CSmvXf1e.js";import{Ih as k,eN as _,fj as U,Ii as L,mm as R,Ij as j}from"./zeni-epic-state-BfUwh_Vg.js";import{u as z,z as f,L as T,t as S,D as O,b as $}from"./index-BKF634x3.js";import"./mui-B3yy7ZVf.js";import{t as P}from"./getLocaleForTenant-48XX730Y.js";import"./recharts-D9O-Y9LK.js";import"./analytics-S8XSXbkg.js";import"./plaid-BSEfMXOW.js";import"./dnd-CnZ2VsWj.js";import"./stripe-DMRn4zHo.js";import"./lottie-iBLAIHYG.js";import"./lexical-B1edU3GD.js";import"./pdf-DV6OIXck.js";import"./utils-CLZrfj5b.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]="4db9fc4c-2401-4b72-b102-b75e5e095755",t._sentryDebugIdIdentifier="sentry-dbid-4db9fc4c-2401-4b72-b102-b75e5e095755")}catch{}})();const Q=w(function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:j(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(N,{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=>k(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(R(e.userId)))},[n,a,i,d,t]),u.useEffect(()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())},[m.tenantsCoreDetailsInOrder,n]),u.useEffect(()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(O.updateAppLocaleID(P(c)),o())},[n,a,c]),v.jsx(Q,{})}const 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-CpcHl85M.js → DomesticWireDetailScreen-D-pyPi8Z.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as l}from"./liveblocks-
|
|
1
|
+
import{j as l}from"./liveblocks-cLm9kffv.js";import{j as w,u as C,g as h,k as A,l as B}from"./core-CSmvXf1e.js";import{Md as k,Mk as _,fA as L,fz as q,fy as J,io as W,Jl as K,pw as Q,eN as V,LL as D,il as T,Me as S,Mn as F,ij as G,iH as j}from"./zeni-epic-state-BfUwh_Vg.js";import{bm as X,Z as N,a as R,z as U,h as Z,q as p,d as v,B as z,bn as Y,o as H,bo as ee,s as te}from"./index-BKF634x3.js";import{n as M}from"./mui-B3yy7ZVf.js";import"./sentry-CPqvXt28.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]="81acb483-c6e1-435e-808a-b37d534a4dbc",e._sentryDebugIdIdentifier="sentry-dbid-81acb483-c6e1-435e-808a-b37d534a4dbc")}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(K("common")),n!=null&&e(Q(n))},onGetOtp:n=>{e(J(n,"BillPayVendor"))},onResendOtp:n=>{e(q(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(L(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(_(n,a,o))}}})(X);function O({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=M.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-cLm9kffv.js";import{Z as c,x as l,h as f}from"./index-BKF634x3.js";import{D as p}from"./mui-B3yy7ZVf.js";import"./sentry-CPqvXt28.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]="d478a96c-c81f-40aa-a3e9-c20fc3914082",e._sentryDebugIdIdentifier="sentry-dbid-d478a96c-c81f-40aa-a3e9-c20fc3914082")}catch{}})();const u={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:n,onClose:t}=e,a=c(),s=o?.valuePx(a)??u.drawerLeftMargin.valuePx(a),d=f();return i.jsx(p,{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{h as D};
|
|
@@ -1 +1 @@
|
|
|
1
|
-
import{j as s}from"./liveblocks-
|
|
1
|
+
import{j as s}from"./liveblocks-cLm9kffv.js";import{a as d}from"./sentry-CPqvXt28.js";import{j as B,h as A,u as J,l as q,g as l,N,k as F,n as R,o as W}from"./core-CSmvXf1e.js";import{Ks as _,eN as M,JR as O,kr as K,GA as I,Kx as Y,Jk as $,jr as z,GB as S,JW as V,JX as X,Jm as H,Jl as L}from"./zeni-epic-state-BfUwh_Vg.js";import{aM as Q,e as U,q as Z,s as tt}from"./index-BKF634x3.js";import"./mui-B3yy7ZVf.js";import{d as k}from"./decodeURIComponentSafe-4EPJQS4u.js";import{w as et}from"./withTransactionSidePanel-BGx0Sk-J.js";import{e as at,b as nt}from"./routePaths-BoMWlYq1.js";import"./recharts-D9O-Y9LK.js";import"./analytics-S8XSXbkg.js";import"./plaid-BSEfMXOW.js";import"./dnd-CnZ2VsWj.js";import"./stripe-DMRn4zHo.js";import"./lottie-iBLAIHYG.js";import"./lexical-B1edU3GD.js";import"./pdf-DV6OIXck.js";import"./utils-CLZrfj5b.js";import"./useAskAiCfoHostNavButtonProps-ByIcRpQk.js";import"./useFetchSuggestedQuestionsWhenReady-CFG18ow7.js";import"./TransactionDetailScreen-BoDb87tz.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]="ce006ef7-bd62-47d8-8d84-17a84ea30cca",a._sentryDebugIdIdentifier="sentry-dbid-ce006ef7-bd62-47d8-8d84-17a84ea30cca")}catch{}})();const ot=F(function(a,t){const e=t.entity,o=Y(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:$(a,"common")},trendWithTransactionsReport:o,analytics:U,isAccountingClassesEnabled:z(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(H({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(L("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(V()),a(X()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(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=A(),c=J(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:x,entityNameEncoded:j}=q(),r=k(x??""),p=k(j??""),u=rt(r,p),G=[r,p].filter(n=>n!=null),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=l(n=>_(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter")),v=l(n=>M(n).company?.companyInfo.firstMonthOfFY??1),f=l(n=>O(n.trendWithTransactionsState,i,"EntityDetail"));d.useEffect(()=>{m===!1&&u===!0&&(T(!0),o(K(i)))},[m,u,i]);const E=l(n=>n.trendState.fetchState),P=f?.selectedPeriod?.timePeriod??g,w=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:w,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(N,{to:b(G.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 jt({entityType:a}){return s.jsx(R,{children:s.jsx(W,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{jt as EntityDetailRoutes,jt as default};
|
package/dist/assets/{ExpenseAutomationRoutes-BWI_01WU.js → ExpenseAutomationRoutes-BPgb9AW4.js}
RENAMED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as p}from"./liveblocks-
|
|
1
|
+
import{j as p}from"./liveblocks-cLm9kffv.js";import xn from"./NotFoundScreen-BiC86yKG.js";import{a as s,b as Pt}from"./sentry-CPqvXt28.js";import{n as De,S as Rn}from"./mui-B3yy7ZVf.js";import{h as se,j as wt,u as Ge,g as F,k as Dn,l as rt,n as Un,o as je}from"./core-CSmvXf1e.js";import{eN as we,OL as On,f0 as Ce,fe as Fn,q7 as Bn,mN as xt,n6 as Rt,OM as Dt,ng as _n,ON as Ut,mG as Vn,pF as Mn,eY as he,OO as xe,s6 as Ot,Bh as Ft,OP as Bt,OQ as jn,pk as qe,Kt as dt,Kv as zn,ju as Ln,Kw as $n,jB as Gn,cU as qn,t9 as Je,jr as Jn,mT as _t,nl as Re,OR as Nn,Jm as ut,Jl as Ae,OS as mt,jS as Yn,OT as Kn,OU as Wn,OV as Hn,OW as Qn,m_ as Zn,mL as ce,no as Te,OX as Xn,OY as ea,OZ as ta,nv as na,jF as aa,jw as oa,O_ as sa,jE as ht,KD as ca,O$ as ia,P0 as la,pg as ra,oX as da,nm as pe,oW as ze,P1 as ua,P2 as ma,l9 as ha,bq as pa,l4 as pt,kS as ga,P3 as Ca,gD as gt,fQ as Sa,l1 as Ia,v2 as fa,P4 as ka,nW as Ea,nR as va,nV as ya,nG as ba,P5 as Aa,e$ as Vt,n9 as Ta,mW as Pa,ff as Ct,nq as wa,P6 as xa,nn as Mt,P7 as Ra,P8 as Da,P9 as Ua,Pa as Oa,Pb as St,ps as Fa,oM as Ba,Jk as _a,jD as Va,Pc as Ma,FB as ja,jC as za,e_ as La,ol as jt,oE as $a,nk as It,np as Ga,bC as qa,k_ as Ja,kX as Na,Pd as Ya,nF as ft,oC as kt,oA as Ka,oq as Wa,o5 as Ha,oD as Qa,Pe as Za,Pf as Xa,o9 as eo,Pg as to,n$ as no,o8 as ao,o6 as oo,oH as so}from"./zeni-epic-state-BfUwh_Vg.js";import{H as zt,a as Lt,d as ge,e as L,s as Q,I as $t,ct as co,z as Ue,cu as io,ao as Pe,cv as lo,aO as Et,B as Gt,cw as ro,al as Le,D as uo,cx as mo,K as ho,cy as po,cz as go,cA as Co,C as So,A as Io,aI as fo,b0 as ko,x as Eo,cB as vo}from"./index-BKF634x3.js";import{u as qt}from"./useAskAiCfoHostNavButtonProps-ByIcRpQk.js";import{c as Jt}from"./useFetchSuggestedQuestionsWhenReady-CFG18ow7.js";import{c as vt,C as yo}from"./TransactionDetailScreen-BoDb87tz.js";import{w as bo}from"./withTransactionSidePanel-BGx0Sk-J.js";import{h as Ao,v as To}from"./routePaths-BoMWlYq1.js";import{g as $e}from"./accountMappingHelper-pYI6wHSd.js";import{D as Po}from"./DrawerScreen-Da9xfeW6.js";import"./recharts-D9O-Y9LK.js";import"./analytics-S8XSXbkg.js";import"./plaid-BSEfMXOW.js";import"./dnd-CnZ2VsWj.js";import"./stripe-DMRn4zHo.js";import"./lottie-iBLAIHYG.js";import"./lexical-B1edU3GD.js";import"./pdf-DV6OIXck.js";import"./utils-CLZrfj5b.js";import"./decodeURIComponentSafe-4EPJQS4u.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new t.Error().stack;d&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[d]="aeec3446-0081-4306-83de-326956d20338",t._sentryDebugIdIdentifier="sentry-dbid-aeec3446-0081-4306-83de-326956d20338")}catch{}})();const wo=()=>{const{isAiCfoOpen:t,setIsAiCfoOpen:d}=zt(),U=se(),E=wt(),S=Ge(),u=F(g=>we(g)),{useFeatureGate:c}=Lt(),{isFeatureEnabled:B}=c(ge.isRealtimeInsightsFeatureEnabled),m=F(g=>g.expenseAutomationViewState.selectedPeriodByTenantId),o=F(g=>On(g,u.tenantId)),{isAiCfoAccessEnabled:v,onAskAiCfoClick:f}=qt({isAiCfoOpen:t,setIsAiCfoOpen:d,mobileExploreReferrer:"Month-End Close Overview"}),y=s.useCallback((g,T,_=!1)=>{U(Ce({tenantId:T,period:{month:g.month,year:g.year},refreshViewInBackground:_}))},[]),V=s.useCallback(g=>{const T=S.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&L.trackMonthCloseAuditPage(g.month,g.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,T??null),U(Fn(u.tenantId,g))},[u.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),i=m[u.tenantId],h=s.useCallback(()=>{const g=S.state?.referrer;o.monthEndCloseChecks?.auditSummary!=null&&L.trackMonthCloseAuditPage(i.month,i.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,g??null),y(i,u.tenantId,!0)},[y,i,u.tenantId,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),w=Q(S.state?.pathnameStackToGoBack,S.pathname),A=s.useCallback(()=>{if(o.monthEndCloseChecks!=null&&i!=null){const g=o.monthEndCloseChecks.monthEndCloseCheckList.find(T=>T.progress<100);if(g!=null)return void E(`./${g.id}/${i.month}-${i.year}`,{state:{pathnameStackToGoBack:w,message:"comingFromOverview"}});E(`./month_end_insights/${i.month}-${i.year}`,{state:{pathnameStackToGoBack:w,message:"comingFromOverview"}})}},[o.monthEndCloseChecks,i]),{areTenantIdsInSync:x}=$t();return Jt({isDataReady:o.fetchState==="Completed"}),s.useEffect(()=>{i!=null&&o.fetchState!=="In-Progress"&&o.fetchState!=="Completed"&&x&&y(i,u.tenantId)},[y,i,o.fetchState,u.tenantId,x]),s.useEffect(()=>{i!=null&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&o.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&x&&U(Bn(i))},[i,o.monthClosePerformanceTrendFetchStatus.fetchState,x]),s.useEffect(()=>{const g=setInterval(()=>{o.fetchState!=="In-Progress"&&o.fetchState==="Completed"&&h()},3e5);return()=>clearInterval(g)},[o.fetchState]),s.useEffect(()=>{if(o.fetchState==="Completed"&&o.monthEndCloseChecks?.auditSummary!=null){const g=S.state?.referrer;L.trackMonthCloseAuditPage(o.selectedPeriod.month,o.selectedPeriod.year,o.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",o.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,g??null)}},[o.fetchState,o.selectedPeriod,o.monthEndCloseChecks?.auditSummary,o.monthEndCloseChecks?.reportEmailSentDate]),p.jsx(xo,{children:p.jsx(co,{monthEndCloseChecksView:o,isRealtimeInsightsFeatureEnabled:B,onMonthEndCheckClick:g=>{E(`./${g}/${i.month}-${i.year}`,{state:{pathnameStackToGoBack:w,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:V,handleReviewButtonClick:A,onBackClick:()=>{E("../../dashboard")},onReload:h,isAiCfoAccessEnabled:v,onAskAiCfoClick:f})})},xo=De.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-cLm9kffv.js";import{a as r}from"./sentry-CPqvXt28.js";import{X as f,Y as c,_ as l,q as p}from"./index-BKF634x3.js";import"./mui-B3yy7ZVf.js";import m from"./NotFoundScreen-BiC86yKG.js";import{j as b,u}from"./core-CSmvXf1e.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]="12ec3bef-a86f-43e0-b893-9d245d74b7ec",e._sentryDebugIdIdentifier="sentry-dbid-12ec3bef-a86f-43e0-b893-9d245d74b7ec")}catch{}})();const j=()=>{const e=b(),t=u(),a=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),d=r.useCallback(()=>{(()=>{const n=p(t.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=f(t.pathname);return o!=null?s.jsx(c,{menuItem:l(o),onDemoClick:a,onGoBack:d}):s.jsx(m,{})},k=(e=2)=>{let t="../";for(let a=0;a<e;a++)t=`${t}../`;return t};export{j as F};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as a}from"./liveblocks-
|
|
1
|
+
import{j as a}from"./liveblocks-cLm9kffv.js";import{l as b,k as x,j,u as y,h as Y,q as ee,g as A,N as ae,n as te,o as p}from"./core-CSmvXf1e.js";import{Iy as S,Iz as k,IA as L,yU as $,yG as N,IB as C,IC as ne,ID as oe,yK as ie,eO as I,yR as se,yO as le}from"./zeni-epic-state-BfUwh_Vg.js";import{Z as g,o as d,n as de,e as v,k as E,p as re,q as ce,r as me,s as F,a as pe,d as ue,v as he,C as xe,h as ge,B as fe,w as we,m as be,S as ye,R as Se,x as ke,y as ve}from"./index-BKF634x3.js";import{n as c}from"./mui-B3yy7ZVf.js";import f from"./NotFoundScreen-BiC86yKG.js";import{a as P}from"./sentry-CPqvXt28.js";import"./recharts-D9O-Y9LK.js";import"./analytics-S8XSXbkg.js";import"./plaid-BSEfMXOW.js";import"./dnd-CnZ2VsWj.js";import"./stripe-DMRn4zHo.js";import"./lottie-iBLAIHYG.js";import"./lexical-B1edU3GD.js";import"./pdf-DV6OIXck.js";import"./utils-CLZrfj5b.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]="5280d3dc-3442-42d8-931c-aa7c12ea88c8",e._sentryDebugIdIdentifier="sentry-dbid-5280d3dc-3442-42d8-931c-aa7c12ea88c8")}catch{}})();const Ie=c.div`
|
|
2
2
|
display: flex;
|
|
3
3
|
height: 100%;
|
|
4
4
|
width: 100%;
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import{j as u}from"./liveblocks-
|
|
1
|
+
import{j as u}from"./liveblocks-cLm9kffv.js";import{a as f}from"./sentry-CPqvXt28.js";import{h as O,u as _,j as w,q as M,g as l,N as T}from"./core-CSmvXf1e.js";import{z as r,h as P,D as V,f as A,e as N,g as q,G,m as H,i as R}from"./index-BKF634x3.js";import{eN as W,Ij as $,It as B,Ik as J,eO as K,fi as Q,Ip as X,fH as Y,cS as Z,Iu as ee,Iv as te}from"./zeni-epic-state-BfUwh_Vg.js";import{n as ne}from"./mui-B3yy7ZVf.js";import{u as ae}from"./useDeviceId-C23qLuYx.js";import{f as se}from"./analyticsHelper-8nU-4onk.js";import{t as ie}from"./getLocaleForTenant-48XX730Y.js";import"./recharts-D9O-Y9LK.js";import"./analytics-S8XSXbkg.js";import"./plaid-BSEfMXOW.js";import"./dnd-CnZ2VsWj.js";import"./stripe-DMRn4zHo.js";import"./lottie-iBLAIHYG.js";import"./lexical-B1edU3GD.js";import"./pdf-DV6OIXck.js";import"./utils-CLZrfj5b.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]="7a28ab12-b8ff-4879-a655-fbb6aa19db91",t._sentryDebugIdIdentifier="sentry-dbid-7a28ab12-b8ff-4879-a655-fbb6aa19db91")}catch{}})();const D=(t,s)=>t!=null&&t.length>0&&s==="magic_links";function De(){const t=O(),s=_(),m=w(),[k]=M(),n=k.get("token"),p=k.get("stytch_token_type"),g=r.getMagicLinkCodeVerifier(),i=ae(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:C}=l(e=>e.tenantState),I=l(e=>e.tenantState.fetchState),y=l(e=>e.tenantState.activeTenantFetchState.fetchState),S=l(e=>e.tenantState.signInState),b=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),a=l(e=>e.tenantState.loggedInUser),o=l(e=>W(e)),h=l(e=>$(e)),E=r.getSignedInUser(),v=P().mode;f.useEffect(()=>{a?.zeniSessionId==null&&n!=null&&D(n,p)&&i!=null&&g!=null&&(r.saveMagicLinkTriggered(n),t(B(n,i,g)))},[n,p,t,i,g,a?.zeniSessionId]),f.useEffect(()=>{S!=="In-Progress"||I!=="Completed"&&y!=="Completed"||a?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(a,a.zeniSessionId),r.saveSignedInUserTenants(J(h.tenantsInOrder),a.zeniSessionId),K(a.userId,a.zeniSessionId,o.tenantId),t(Q(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),V.updateAppLocaleID(ie(o)),se(a,o,v,void 0,h.tenantsInOrder),Y().then(()=>{const e=R();e!=null&&A(e)}),setTimeout(()=>{N.trackLogin(q.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[S,I,y,a,o,h,v,s.state,t]);const j=f.useCallback(()=>{m("/signin/auth")},[m]),U=f.useCallback(()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))},[i,d,t,c]),F=f.useCallback(e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))},[i,n,t,c,d]);if(b==="Completed"&&d!=null)return u.jsx(G,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:C,onResendOtp:U,onVerifyOtp:F,onCancelVerifyDevice:j});if(S==="In-Progress"&&I==="Completed"&&a?.zeniSessionId!=null&&o!=null||E!=null){const e=s.state?.origin??"/";return u.jsx(T,{to:e,state:{...s.state,origin:""}})}if(!D(n,p)||g==null||b==="Error"){const e=s.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(T,{to:e,state:{...s.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||b==="Error"&&a?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(H,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
|
|
2
2
|
position: fixed;
|
|
3
3
|
top: 0;
|
|
4
4
|
left: 0;
|