@zeniai/web-app-ui 5.3.69-dev → 5.3.69-qa

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (71) hide show
  1. package/dist/assets/{AccountMappingScreen-CAQA7lne.js → AccountMappingScreen-_ej4z-IR.js} +1 -1
  2. package/dist/assets/{ActualMatchingMatchDetailScreen-BifxUBTA.js → ActualMatchingMatchDetailScreen-BSTuCiFK.js} +1 -1
  3. package/dist/assets/{AddressRoutes-D2DM52hy.js → AddressRoutes-C517WDi1.js} +1 -1
  4. package/dist/assets/{AddressScreen-icxXA3w4.js → AddressScreen--Jfrmx_9.js} +1 -1
  5. package/dist/assets/{AiCfoScreen-BWbqBoIu.js → AiCfoScreen-BNc_vpRn.js} +1 -1
  6. package/dist/assets/{AppDrawer-hE6okzG9.js → AppDrawer-DNmwo9UW.js} +1 -1
  7. package/dist/assets/{BillPayApprovalRoutes-eAwSxg7-.js → BillPayApprovalRoutes-DGYCNZA8.js} +1 -1
  8. package/dist/assets/{BillPayRoutes-CPSa9tRu.js → BillPayRoutes-CjVYIUwf.js} +1 -1
  9. package/dist/assets/{BusinessVerificationPageScreen-XOO4dt2W.js → BusinessVerificationPageScreen-BCj56xYx.js} +1 -1
  10. package/dist/assets/{CardsAiCfoScreen-oZaMLLYZ.js → CardsAiCfoScreen-CQF7LKPV.js} +1 -1
  11. package/dist/assets/{ChargeCardRoutes-CR22MdW5.js → ChargeCardRoutes-D6qT0B9p.js} +1 -1
  12. package/dist/assets/{CompanyPassportScreen-Cy2hV9k7.js → CompanyPassportScreen-SOXe4P3g.js} +1 -1
  13. package/dist/assets/{ConnectionAuthScreen-BBARCtpg.js → ConnectionAuthScreen-Czc08mTJ.js} +1 -1
  14. package/dist/assets/{CustomerOnboardingAuthScreen-B9cNdta1.js → CustomerOnboardingAuthScreen-DHWDR-Cl.js} +1 -1
  15. package/dist/assets/{CustomerOnboardingRoutes-DaBtZTum.js → CustomerOnboardingRoutes-ByIsWpfM.js} +1 -1
  16. package/dist/assets/{DashboardRoutes-ksNQmz1b.js → DashboardRoutes-WoUbyotK.js} +1 -1
  17. package/dist/assets/{DefaultTenantHome-6h7pYNWH.js → DefaultTenantHome-Nt1b5wse.js} +1 -1
  18. package/dist/assets/{DomesticWireDetailScreen-BYIVpvay.js → DomesticWireDetailScreen-BmflEZ_q.js} +1 -1
  19. package/dist/assets/{DrawerScreen-D2sNIMxZ.js → DrawerScreen-0K7kuSzC.js} +1 -1
  20. package/dist/assets/{EntityDetailRoutes-DaTOqhWC.js → EntityDetailRoutes-CePCCMqT.js} +1 -1
  21. package/dist/assets/{ExpenseAutomationRoutes-WQsWVsrz.js → ExpenseAutomationRoutes-BiJEeP3A.js} +1 -1
  22. package/dist/assets/{FeaturePreviewScreen-DrW5sKTA.js → FeaturePreviewScreen-CtNAe1_H.js} +1 -1
  23. package/dist/assets/{HubSpotOAuthCallbackScreen-CDRkL0Tq.js → HubSpotOAuthCallbackScreen-DDXKwaXx.js} +1 -1
  24. package/dist/assets/{InvoicingRoutes-EwIfHCd8.js → InvoicingRoutes-Dt22Vt58.js} +1 -1
  25. package/dist/assets/{MagicLinkRoutes-Df_wnLE7.js → MagicLinkRoutes-DlZzQsp9.js} +1 -1
  26. package/dist/assets/{MagicLinkSignInScreen-CByT-Ct-.js → MagicLinkSignInScreen-_mXKvM1u.js} +1 -1
  27. package/dist/assets/{MobileAppDrawer-r4WOmIWX.js → MobileAppDrawer-BrOHAjwP.js} +1 -1
  28. package/dist/assets/{NotFoundScreen-BbJtMThz.js → NotFoundScreen-CyVGP3Vp.js} +1 -1
  29. package/dist/assets/{NotificationRoutes-CxCX3W_0.js → NotificationRoutes-Cmigr5ed.js} +1 -1
  30. package/dist/assets/{OAuthConsentScreen-luQCTUbA.js → OAuthConsentScreen-CLk1l_3O.js} +1 -1
  31. package/dist/assets/{PandLWithForecastRoutes-DNnwlAH1.js → PandLWithForecastRoutes-Bh5hYQzx.js} +1 -1
  32. package/dist/assets/{PaymentLinkScreen-C_1-1L8E.js → PaymentLinkScreen-CMriKz_8.js} +1 -1
  33. package/dist/assets/{PeopleRoutes-BInCnWy4.js → PeopleRoutes-sCx80LTz.js} +1 -1
  34. package/dist/assets/{PerformanceRoutes-cn6KpA4Q.js → PerformanceRoutes-C99Rjk0q.js} +1 -1
  35. package/dist/assets/{QBOConnectionScreen-Cbteo3If.js → QBOConnectionScreen-CzL0viYI.js} +1 -1
  36. package/dist/assets/{ReimbursementApprovalRoutes-pw9U836q.js → ReimbursementApprovalRoutes-D9FySrGh.js} +1 -1
  37. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-Bs4p5t9E.js → ReimbursementApprovalRuleDetailScreen-DsMDfZXO.js} +1 -1
  38. package/dist/assets/{ReimbursementRoutes-BbvmwzbP.js → ReimbursementRoutes-BA1_AB5H.js} +1 -1
  39. package/dist/assets/{ReportsRoutes-DHQlYB_r.js → ReportsRoutes-ZTT__qgG.js} +1 -1
  40. package/dist/assets/{RewardsRoutes--4mAjEXA.js → RewardsRoutes-tAzEgpq8.js} +1 -1
  41. package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-DjYg30gm.js → ScheduleDetailsPrepaidExpensesScreen-kyZJN89C.js} +1 -1
  42. package/dist/assets/{ScreenRoutes-0M7Mtqep.js → ScreenRoutes-C4-I9-wk.js} +2 -2
  43. package/dist/assets/{SettingsRoutes-CN7GV-oe.js → SettingsRoutes-BUmZV8nU.js} +1 -1
  44. package/dist/assets/{SetupPagesScreen-BJMKj009.js → SetupPagesScreen-BzFDkOVI.js} +1 -1
  45. package/dist/assets/{SignInScreen-atM-bsdO.js → SignInScreen-DRFey9on.js} +1 -1
  46. package/dist/assets/{SignOutScreen-iiZR9Vvf.js → SignOutScreen-D2m0H2Zh.js} +1 -1
  47. package/dist/assets/{TaskListScreen-B70VtP2u.js → TaskListScreen-CxhPrz3Y.js} +1 -1
  48. package/dist/assets/{TaskRoutes-Bq52Yuvt.js → TaskRoutes-C0SyfIZR.js} +1 -1
  49. package/dist/assets/{TransactionDetailRoutes-DliVWUyB.js → TransactionDetailRoutes-BeM7Nvfr.js} +1 -1
  50. package/dist/assets/{TransactionDetailScreen-1gITEJfr.js → TransactionDetailScreen-BG6zUFU-.js} +1 -1
  51. package/dist/assets/{TransactionListRoutes-DoKdE5EQ.js → TransactionListRoutes-CnM0i_qu.js} +1 -1
  52. package/dist/assets/{TreasuryRoutes-DWmpGaGA.js → TreasuryRoutes-U7YfCj52.js} +1 -1
  53. package/dist/assets/{VendorsRoutes-B0HnUIhj.js → VendorsRoutes-B66p2onP.js} +1 -1
  54. package/dist/assets/{WiseConfirmationScreen-CmQFx7C9.js → WiseConfirmationScreen-CJytbhsa.js} +1 -1
  55. package/dist/assets/{ZeniAccountRoutes-BI-IsmW_.js → ZeniAccountRoutes-DRW5DlBI.js} +1 -1
  56. package/dist/assets/{ZeniAccountStatementScreen-CoNFUylV.js → ZeniAccountStatementScreen-B-cwN_qc.js} +1 -1
  57. package/dist/assets/{analyticsHelper-qAafKEWE.js → analyticsHelper-DdV5jqT5.js} +1 -1
  58. package/dist/assets/{getLocaleForTenant-Tff_ZVu3.js → getLocaleForTenant-C8sqw5jB.js} +1 -1
  59. package/dist/assets/{index-CaO8T0Mn.js → index-uoDX7H4L.js} +5 -5
  60. package/dist/assets/{routePaths-CIClX-hy.js → routePaths-DzLOO7Om.js} +1 -1
  61. package/dist/assets/{useActualMatchingMatchDetail-03OPYHW8.js → useActualMatchingMatchDetail-CM9S8AAl.js} +1 -1
  62. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-BdGVlzMy.js → useAiCfoDashboardSuggestedQuestionsChips-BNl2X51l.js} +1 -1
  63. package/dist/assets/{useAskAiCfoHostNavButtonProps-BeCZgIua.js → useAskAiCfoHostNavButtonProps-CsMZr2YE.js} +1 -1
  64. package/dist/assets/{useChargeCardPusherEvents-Z8m3rGDA.js → useChargeCardPusherEvents-4gxE-aSe.js} +1 -1
  65. package/dist/assets/{useEmailConnectResultRefresh-xLk05vNk.js → useEmailConnectResultRefresh-B85Z7XsM.js} +1 -1
  66. package/dist/assets/{useInitialThreadRequest-Decdti18.js → useInitialThreadRequest-DGvbt9bY.js} +1 -1
  67. package/dist/assets/{useTaskManagerAccess-CSCgZk-0.js → useTaskManagerAccess-OjN4ZWFp.js} +1 -1
  68. package/dist/assets/{useTaskManagerPusherEvents-9oqzMu2Z.js → useTaskManagerPusherEvents-BDQMuf8L.js} +1 -1
  69. package/dist/assets/{withTransactionSidePanel-BKpEvUWX.js → withTransactionSidePanel-MoXr5b9J.js} +1 -1
  70. package/dist/index.html +1 -1
  71. package/package.json +1 -1
@@ -1 +1 @@
1
- import{j as m}from"./liveblocks-DtuUpF5h.js";import{a as g}from"./sentry-BWDuLt7o.js";import{h as w,u as x,g as T,i as k,j as O,l as E}from"./core-Dk5JD2l2.js";import{z as N,bs as F,a8 as P,m as V,V as L,s as b,bt as j,ae as A,aG as M,p as U}from"./index-CaO8T0Mn.js";import{fI as D,gL as B,BM as G,gG as R,c9 as _,Ys as Y,bn as z,v1 as H,uR as Z,mC as $,ob as S,Yt as q,bF as J,cF as C,om as K,ow as Q}from"./zeni-epic-state-BtP47QJT.js";import"./mui-DAOUhz91.js";import{d as W}from"./routePaths-CIClX-hy.js";import{M as X}from"./MobileAppDrawer-r4WOmIWX.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]="d9431558-e3b8-4742-8e94-6cd3f09d132b",n._sentryDebugIdIdentifier="sentry-dbid-d9431558-e3b8-4742-8e94-6cd3f09d132b")}catch{}})();const ee=E((function(n){const a=R(n),i=N.getSignedInUser(),p=D(n),c=p.tenantId,l={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=_(p?.userRole??[])&&a.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=Y(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:l,filesEndPoint:`${A.fileMicroServiceBaseUrl}`,isZeniUser:z(i)}}),(function(n,a){const{companyId:i,currentTenant:p,navigate:c,location:l}=a,{tenantEmailDomain:f}=p;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=U(l.state?.pathnameStackToGoBack,l.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:M(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($({files:e}))},onDeleteFile:e=>{n(Z(e))},onEditFileName:(e,t)=>{n(H(e,t.split(".")[0]))}}}))(j);function de(){const n=w(),a=x(),i=T(),{tenantEmailDomain:p}=k(),[c,l]=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(p)?.companyId;if(N.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect((()=>{c||t!=="Not-Started"||d==null||(l(!0),a(B(d)))}),[c,t,d,a]),g.useEffect((()=>{o==="Not-Started"&&a(G())}),[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:V,onLoad:s=>s.trackPageLoaded(L.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
+ import{j as m}from"./liveblocks-DtuUpF5h.js";import{a as g}from"./sentry-BWDuLt7o.js";import{h as w,u as x,g as T,i as k,j as O,l as E}from"./core-Dk5JD2l2.js";import{z as N,bs as F,a8 as P,m as V,V as L,s as b,bt as j,ae as A,aG as M,p as U}from"./index-uoDX7H4L.js";import{fI as D,gL as B,BM as G,gG as R,c9 as _,Ys as Y,bn as z,v1 as H,uR as Z,mC as $,ob as S,Yt as q,bF as J,cF as C,om as K,ow as Q}from"./zeni-epic-state-BtP47QJT.js";import"./mui-DAOUhz91.js";import{d as W}from"./routePaths-DzLOO7Om.js";import{M as X}from"./MobileAppDrawer-BrOHAjwP.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]="d9431558-e3b8-4742-8e94-6cd3f09d132b",n._sentryDebugIdIdentifier="sentry-dbid-d9431558-e3b8-4742-8e94-6cd3f09d132b")}catch{}})();const ee=E((function(n){const a=R(n),i=N.getSignedInUser(),p=D(n),c=p.tenantId,l={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=_(p?.userRole??[])&&a.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=Y(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:l,filesEndPoint:`${A.fileMicroServiceBaseUrl}`,isZeniUser:z(i)}}),(function(n,a){const{companyId:i,currentTenant:p,navigate:c,location:l}=a,{tenantEmailDomain:f}=p;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=U(l.state?.pathnameStackToGoBack,l.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:M(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($({files:e}))},onDeleteFile:e=>{n(Z(e))},onEditFileName:(e,t)=>{n(H(e,t.split(".")[0]))}}}))(j);function de(){const n=w(),a=x(),i=T(),{tenantEmailDomain:p}=k(),[c,l]=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(p)?.companyId;if(N.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect((()=>{c||t!=="Not-Started"||d==null||(l(!0),a(B(d)))}),[c,t,d,a]),g.useEffect((()=>{o==="Not-Started"&&a(G())}),[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:V,onLoad:s=>s.trackPageLoaded(L.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 I}from"./liveblocks-DtuUpF5h.js";import{a as o}from"./sentry-BWDuLt7o.js";import{u as F,h as R,g as H,j as C,N as j}from"./core-Dk5JD2l2.js";import{U6 as q,fI as z,go as G,pV as V,gP as U,gn as Q,gl as B,Uw as J,gk as A}from"./zeni-epic-state-BtP47QJT.js";import{u as K,z as E,L as T,G as M,N as W}from"./index-CaO8T0Mn.js";import{n as X}from"./mui-DAOUhz91.js";import{P as b,a as _}from"./AccountMappingScreen-CAQA7lne.js";import{t as Y}from"./getLocaleForTenant-Tff_ZVu3.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-Cbteo3If.js";import"./recharts-BMD3jyO6.js";import"./analytics-C6U4wpfB.js";import"./plaid-DBHSfOGH.js";import"./dnd-CSZKLHxv.js";import"./stripe-cKAAJElX.js";import"./lottie-BlG_vWSt.js";import"./lexical-BtWXzxnq.js";import"./pdf-iocWnEuY.js";import"./utils-CWVNtCN5.js";import"./MobileAppDrawer-r4WOmIWX.js";import"./InboxNotificationsProvider-D6GwXgCp.js";import"./useTaskManagerAccess-CSCgZk-0.js";import"./accountMappingHelper-D-qmKFUw.js";import"./empty-CDCQLT9Y.js";import"./pdf-lib-BLLTrAOR.js";import"./index-BzY7ptmA.js";import"./url-CCl9sM9J.js";import"./index-BFxiz-4U.js";import"./decodeURIComponentSafe-NBY1IhYb.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]="6ceb3716-cbd8-4ca6-a1db-2f58e70cd1d4",t._sentryDebugIdIdentifier="sentry-dbid-6ceb3716-cbd8-4ca6-a1db-2f58e70cd1d4")}catch{}})();const te=X.div`
1
+ import{j as I}from"./liveblocks-DtuUpF5h.js";import{a as o}from"./sentry-BWDuLt7o.js";import{u as F,h as R,g as H,j as C,N as j}from"./core-Dk5JD2l2.js";import{U6 as q,fI as z,go as G,pV as V,gP as U,gn as Q,gl as B,Uw as J,gk as A}from"./zeni-epic-state-BtP47QJT.js";import{u as K,z as E,L as T,G as M,N as W}from"./index-uoDX7H4L.js";import{n as X}from"./mui-DAOUhz91.js";import{P as b,a as _}from"./AccountMappingScreen-_ej4z-IR.js";import{t as Y}from"./getLocaleForTenant-C8sqw5jB.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-CzL0viYI.js";import"./recharts-BMD3jyO6.js";import"./analytics-C6U4wpfB.js";import"./plaid-DBHSfOGH.js";import"./dnd-CSZKLHxv.js";import"./stripe-cKAAJElX.js";import"./lottie-BlG_vWSt.js";import"./lexical-BtWXzxnq.js";import"./pdf-iocWnEuY.js";import"./utils-CWVNtCN5.js";import"./MobileAppDrawer-BrOHAjwP.js";import"./InboxNotificationsProvider-D6GwXgCp.js";import"./useTaskManagerAccess-OjN4ZWFp.js";import"./accountMappingHelper-D-qmKFUw.js";import"./empty-CDCQLT9Y.js";import"./pdf-lib-BLLTrAOR.js";import"./index-BzY7ptmA.js";import"./url-CCl9sM9J.js";import"./index-BFxiz-4U.js";import"./decodeURIComponentSafe-NBY1IhYb.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]="6ceb3716-cbd8-4ca6-a1db-2f58e70cd1d4",t._sentryDebugIdIdentifier="sentry-dbid-6ceb3716-cbd8-4ca6-a1db-2f58e70cd1d4")}catch{}})();const te=X.div`
2
2
  display: flex;
3
3
  flex: 1 1 auto;
4
4
  flex-direction: row;
@@ -1 +1 @@
1
- import{j as i}from"./liveblocks-DtuUpF5h.js";import{z as m}from"./index-CaO8T0Mn.js";import{g as n}from"./QBOConnectionScreen-Cbteo3If.js";import"./sentry-BWDuLt7o.js";import{g as p,N as a}from"./core-Dk5JD2l2.js";import"./zeni-epic-state-BtP47QJT.js";import"./recharts-BMD3jyO6.js";import"./mui-DAOUhz91.js";import"./analytics-C6U4wpfB.js";import"./plaid-DBHSfOGH.js";import"./dnd-CSZKLHxv.js";import"./stripe-cKAAJElX.js";import"./lottie-BlG_vWSt.js";import"./lexical-BtWXzxnq.js";import"./pdf-iocWnEuY.js";import"./utils-CWVNtCN5.js";import"./empty-CDCQLT9Y.js";import"./pdf-lib-BLLTrAOR.js";import"./index-BzY7ptmA.js";import"./url-CCl9sM9J.js";import"./index-BFxiz-4U.js";import"./decodeURIComponentSafe-NBY1IhYb.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]="a1205b81-d106-415b-bd92-85aeae53ace3",t._sentryDebugIdIdentifier="sentry-dbid-a1205b81-d106-415b-bd92-85aeae53ace3")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=n(t.search),s=m.getSignedInUser()?.userId??"";if(f(o,r,e,s)===!0){const d=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(a,{to:d})}return i.jsx(a,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
1
+ import{j as i}from"./liveblocks-DtuUpF5h.js";import{z as m}from"./index-uoDX7H4L.js";import{g as n}from"./QBOConnectionScreen-CzL0viYI.js";import"./sentry-BWDuLt7o.js";import{g as p,N as a}from"./core-Dk5JD2l2.js";import"./zeni-epic-state-BtP47QJT.js";import"./recharts-BMD3jyO6.js";import"./mui-DAOUhz91.js";import"./analytics-C6U4wpfB.js";import"./plaid-DBHSfOGH.js";import"./dnd-CSZKLHxv.js";import"./stripe-cKAAJElX.js";import"./lottie-BlG_vWSt.js";import"./lexical-BtWXzxnq.js";import"./pdf-iocWnEuY.js";import"./utils-CWVNtCN5.js";import"./empty-CDCQLT9Y.js";import"./pdf-lib-BLLTrAOR.js";import"./index-BzY7ptmA.js";import"./url-CCl9sM9J.js";import"./index-BFxiz-4U.js";import"./decodeURIComponentSafe-NBY1IhYb.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]="a1205b81-d106-415b-bd92-85aeae53ace3",t._sentryDebugIdIdentifier="sentry-dbid-a1205b81-d106-415b-bd92-85aeae53ace3")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=n(t.search),s=m.getSignedInUser()?.userId??"";if(f(o,r,e,s)===!0){const d=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(a,{to:d})}return i.jsx(a,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-DtuUpF5h.js";import{t as wn,A as Ge}from"./AddressScreen-icxXA3w4.js";import An from"./NotFoundScreen-BbJtMThz.js";import{a as d,t as Me}from"./sentry-BWDuLt7o.js";import{h as _e,g as xe,u as se,i as Te,j as E,N as Q,q as Pn,l as cn,n as Dn,o as H}from"./core-Dk5JD2l2.js";import{fI as X,e0 as Ee,d$ as we,bq as jn,Un as Bn,bS as Fn,pT as Vn,Bw as Un,Bz as Rn,VK as Ln,VL as Nn,lx as Oe,lA as dn,U_ as $n,c0 as Gn,c9 as fe,B_ as Ae,BL as Mn,VM as me,B$ as un,Sx as Qn,mK as ln,dj as pn,VN as Kn,VO as zn,uK as qn,UN as Ce,hY as Hn,UM as be,hV as Zn,Gp as Jn,uO as Wn,hN as Yn,hQ as Qe,VP as mn,VQ as Xn,Mf as et,VR as nt,Mj as tt,BC as at,VS as ot,VT as st,lv as rt,ly as it,Cb as ct,BN as gn,BZ as dt,bF as Ke,cF as ut,Ca as ze,v1 as lt,uR as pt,mC as mt,gJ as gt,gI as ft,gH as yt,VU as ht,BF as Ct,Cc as bt,Cf as St,Ci as It,Co as kt,dk as Ot}from"./zeni-epic-state-BtP47QJT.js";import{z,c as Pe,g as W,h as vt,p as q,a8 as re,m as g,aE as _t,ai as fn,a1 as xt,d as yn,Q as hn,l as Y,Z as ge,V as ve,aF as Tt,N as qe,y as He,ae as Et,aG as Ze,aH as wt,aI as At}from"./index-CaO8T0Mn.js";import{n as De}from"./mui-DAOUhz91.js";import{g as Pt,h as Dt,q as ie}from"./QBOConnectionScreen-Cbteo3If.js";import{u as jt,a as Bt}from"./useEmailConnectResultRefresh-xLk05vNk.js";import{u as Ft}from"./useChargeCardPusherEvents-Z8m3rGDA.js";import"./recharts-BMD3jyO6.js";import"./analytics-C6U4wpfB.js";import"./plaid-DBHSfOGH.js";import"./dnd-CSZKLHxv.js";import"./stripe-cKAAJElX.js";import"./lottie-BlG_vWSt.js";import"./lexical-BtWXzxnq.js";import"./pdf-iocWnEuY.js";import"./utils-CWVNtCN5.js";import"./empty-CDCQLT9Y.js";import"./pdf-lib-BLLTrAOR.js";import"./index-BzY7ptmA.js";import"./url-CCl9sM9J.js";import"./index-BFxiz-4U.js";import"./decodeURIComponentSafe-NBY1IhYb.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new e.Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="9dcde0bb-cb89-4353-a196-e06b5c53fa98",e._sentryDebugIdIdentifier="sentry-dbid-9dcde0bb-cb89-4353-a196-e06b5c53fa98")}catch{}})();const Je=e=>{switch(e){case"Complete":return"yes";case"Pending Review":case"Incomplete":return"partially";default:return"no"}},Vt=()=>{const e=_e(),l=xe(),i=se(),[a,p]=d.useState(!1),[u,c]=d.useState(!1),{tenantEmailDomain:v}=Te(),n=z.getSignedInUser(),{useFeatureGate:t}=Pe(),{isFeatureEnabled:C}=t(W.isApAgingFeatureEnabled),{isFeatureEnabled:o}=t(W.isArAgingFeatureEnabled),{isFeatureEnabled:A}=t(W.isReferralFeatureEnabled),{isFeatureEnabled:w}=t(W.isDebitCardFeatureEnabled),k=vt(),O=E((S=>X(S))),P=E((S=>S.onboardingCustomerViewState.fetchState)),_=O.excludedResources,F=O.companyId??z.getSignedInUserTenant(v)?.companyId;if(n==null)throw Error("Can't access onboarding flow without signing in...");const m=Ee(w,O),b=we(O),D=[],U=_?.resources?.find((S=>S.resource==="/reports/top_expenses"))==null,h=_?.resources?.find((S=>S.resource==="/reports/task_card"))==null,r=O?.userRole!=null&&jn(O?.userRole),x=_?.resources?.find((S=>S.resource==="/bills"))==null&&!r,T=_?.resources?.find((S=>S.resource==="/reimbursements"))==null;U===!1&&D.push("top_expenses"),h===!1&&D.push("task_card"),x===!1&&D.push("bill_pay_card","bill_pay_promo_card"),T===!1&&D.push("reimbursement_card","reimbursement_promo_card"),D.push("zeni_accounts_promo_card","treasury_promo_card"),A===!1&&D.push("rewards_card");const f=E((S=>{const V=[];C===!1&&V.push("accounts_payable_aging"),o===!1&&V.push("accounts_receivable_aging"),V.push("zeni_accounts_promo_card","treasury_promo_card"),A===!1&&V.push("rewards_card"),k===!1&&V.push("expense_automation_card");const Z=Bn(S,V);return Fn(Z.reportsInOrder.map((G=>({fetchState:G.fetchState,error:G.error})))).fetchState}));d.useEffect((()=>{P!=="Completed"||a||m||b||(p(!0),i(Vn(n.userId,F,O.tenantId,!0,!1,D)))}),[a,P,m,b,n,O.tenantId,i]);const j=d.useRef(!1),N=d.useCallback((()=>{const S={pathnameStackToGoBack:q(l.state?.pathnameStackToGoBack,l.pathname),message:"activation"};e(m?"../../checking":b?"../../cards":"../../dashboard",{state:S})}),[e,l,m,b]),$=d.useCallback((()=>{j.current||(j.current=!0,N())}),[N]);if(d.useEffect((()=>{const S=setTimeout((()=>c(!0)),3e3);return()=>clearTimeout(S)}),[]),d.useEffect((()=>{const S=setTimeout($,6e3);return()=>clearTimeout(S)}),[$]),d.useEffect((()=>{m||b||!u||f!=="Completed"&&f!=="Error"||$()}),[u,f,m,b,$]),P!=="Completed")return s.jsx(Q,{to:"../"});const L=O.company?.companyOnboardingInfo?.onboardingInfo,ee={timeSinceQuoteSign:L?.onboardingTimeSinceQuoteSigned??"",timeSinceQuoteSignInMinutes:L?.onboardingToQuoteSignMinutes??0,isKybDone:Je(L?.businessVerified?.status),isKycDone:Je(L?.identityVerified?.status),paymentType:"",paymentSource:"",qboConnectionSource:L?.accountingConnectionCreationMode??""};return s.jsxs(s.Fragment,{children:[s.jsx(re,{analytics:g,onLoad:S=>S.trackOnboardingDashboardActivation(ee)}),s.jsx(_t,{show:!0,onComplete:$})]})},Se=["reading_books","finance_graph","reconciliation","cfo_foundation"],Ie=["llm_fine_tuning","rag_knowledge_graph","personalized_context"],We=(e,l)=>{const i=new Map(e.map((a=>[a.key,a])));return l.map((a=>{return p=i.get(a)?.status,p==="starting"||p==="building"?p:"idle";var p}))},Ye=(e,l)=>{if(e.length===0)return!1;const i=new Map(e.map((a=>[a.key,a])));return l.every((a=>i.get(a)?.status==="ready"))},Xe=De.div`
1
+ import{j as s}from"./liveblocks-DtuUpF5h.js";import{t as wn,A as Ge}from"./AddressScreen--Jfrmx_9.js";import An from"./NotFoundScreen-CyVGP3Vp.js";import{a as d,t as Me}from"./sentry-BWDuLt7o.js";import{h as _e,g as xe,u as se,i as Te,j as E,N as Q,q as Pn,l as cn,n as Dn,o as H}from"./core-Dk5JD2l2.js";import{fI as X,e0 as Ee,d$ as we,bq as jn,Un as Bn,bS as Fn,pT as Vn,Bw as Un,Bz as Rn,VK as Ln,VL as Nn,lx as Oe,lA as dn,U_ as $n,c0 as Gn,c9 as fe,B_ as Ae,BL as Mn,VM as me,B$ as un,Sx as Qn,mK as ln,dj as pn,VN as Kn,VO as zn,uK as qn,UN as Ce,hY as Hn,UM as be,hV as Zn,Gp as Jn,uO as Wn,hN as Yn,hQ as Qe,VP as mn,VQ as Xn,Mf as et,VR as nt,Mj as tt,BC as at,VS as ot,VT as st,lv as rt,ly as it,Cb as ct,BN as gn,BZ as dt,bF as Ke,cF as ut,Ca as ze,v1 as lt,uR as pt,mC as mt,gJ as gt,gI as ft,gH as yt,VU as ht,BF as Ct,Cc as bt,Cf as St,Ci as It,Co as kt,dk as Ot}from"./zeni-epic-state-BtP47QJT.js";import{z,c as Pe,g as W,h as vt,p as q,a8 as re,m as g,aE as _t,ai as fn,a1 as xt,d as yn,Q as hn,l as Y,Z as ge,V as ve,aF as Tt,N as qe,y as He,ae as Et,aG as Ze,aH as wt,aI as At}from"./index-uoDX7H4L.js";import{n as De}from"./mui-DAOUhz91.js";import{g as Pt,h as Dt,q as ie}from"./QBOConnectionScreen-CzL0viYI.js";import{u as jt,a as Bt}from"./useEmailConnectResultRefresh-B85Z7XsM.js";import{u as Ft}from"./useChargeCardPusherEvents-4gxE-aSe.js";import"./recharts-BMD3jyO6.js";import"./analytics-C6U4wpfB.js";import"./plaid-DBHSfOGH.js";import"./dnd-CSZKLHxv.js";import"./stripe-cKAAJElX.js";import"./lottie-BlG_vWSt.js";import"./lexical-BtWXzxnq.js";import"./pdf-iocWnEuY.js";import"./utils-CWVNtCN5.js";import"./empty-CDCQLT9Y.js";import"./pdf-lib-BLLTrAOR.js";import"./index-BzY7ptmA.js";import"./url-CCl9sM9J.js";import"./index-BFxiz-4U.js";import"./decodeURIComponentSafe-NBY1IhYb.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new e.Error().stack;l&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[l]="9dcde0bb-cb89-4353-a196-e06b5c53fa98",e._sentryDebugIdIdentifier="sentry-dbid-9dcde0bb-cb89-4353-a196-e06b5c53fa98")}catch{}})();const Je=e=>{switch(e){case"Complete":return"yes";case"Pending Review":case"Incomplete":return"partially";default:return"no"}},Vt=()=>{const e=_e(),l=xe(),i=se(),[a,p]=d.useState(!1),[u,c]=d.useState(!1),{tenantEmailDomain:v}=Te(),n=z.getSignedInUser(),{useFeatureGate:t}=Pe(),{isFeatureEnabled:C}=t(W.isApAgingFeatureEnabled),{isFeatureEnabled:o}=t(W.isArAgingFeatureEnabled),{isFeatureEnabled:A}=t(W.isReferralFeatureEnabled),{isFeatureEnabled:w}=t(W.isDebitCardFeatureEnabled),k=vt(),O=E((S=>X(S))),P=E((S=>S.onboardingCustomerViewState.fetchState)),_=O.excludedResources,F=O.companyId??z.getSignedInUserTenant(v)?.companyId;if(n==null)throw Error("Can't access onboarding flow without signing in...");const m=Ee(w,O),b=we(O),D=[],U=_?.resources?.find((S=>S.resource==="/reports/top_expenses"))==null,h=_?.resources?.find((S=>S.resource==="/reports/task_card"))==null,r=O?.userRole!=null&&jn(O?.userRole),x=_?.resources?.find((S=>S.resource==="/bills"))==null&&!r,T=_?.resources?.find((S=>S.resource==="/reimbursements"))==null;U===!1&&D.push("top_expenses"),h===!1&&D.push("task_card"),x===!1&&D.push("bill_pay_card","bill_pay_promo_card"),T===!1&&D.push("reimbursement_card","reimbursement_promo_card"),D.push("zeni_accounts_promo_card","treasury_promo_card"),A===!1&&D.push("rewards_card");const f=E((S=>{const V=[];C===!1&&V.push("accounts_payable_aging"),o===!1&&V.push("accounts_receivable_aging"),V.push("zeni_accounts_promo_card","treasury_promo_card"),A===!1&&V.push("rewards_card"),k===!1&&V.push("expense_automation_card");const Z=Bn(S,V);return Fn(Z.reportsInOrder.map((G=>({fetchState:G.fetchState,error:G.error})))).fetchState}));d.useEffect((()=>{P!=="Completed"||a||m||b||(p(!0),i(Vn(n.userId,F,O.tenantId,!0,!1,D)))}),[a,P,m,b,n,O.tenantId,i]);const j=d.useRef(!1),N=d.useCallback((()=>{const S={pathnameStackToGoBack:q(l.state?.pathnameStackToGoBack,l.pathname),message:"activation"};e(m?"../../checking":b?"../../cards":"../../dashboard",{state:S})}),[e,l,m,b]),$=d.useCallback((()=>{j.current||(j.current=!0,N())}),[N]);if(d.useEffect((()=>{const S=setTimeout((()=>c(!0)),3e3);return()=>clearTimeout(S)}),[]),d.useEffect((()=>{const S=setTimeout($,6e3);return()=>clearTimeout(S)}),[$]),d.useEffect((()=>{m||b||!u||f!=="Completed"&&f!=="Error"||$()}),[u,f,m,b,$]),P!=="Completed")return s.jsx(Q,{to:"../"});const L=O.company?.companyOnboardingInfo?.onboardingInfo,ee={timeSinceQuoteSign:L?.onboardingTimeSinceQuoteSigned??"",timeSinceQuoteSignInMinutes:L?.onboardingToQuoteSignMinutes??0,isKybDone:Je(L?.businessVerified?.status),isKycDone:Je(L?.identityVerified?.status),paymentType:"",paymentSource:"",qboConnectionSource:L?.accountingConnectionCreationMode??""};return s.jsxs(s.Fragment,{children:[s.jsx(re,{analytics:g,onLoad:S=>S.trackOnboardingDashboardActivation(ee)}),s.jsx(_t,{show:!0,onComplete:$})]})},Se=["reading_books","finance_graph","reconciliation","cfo_foundation"],Ie=["llm_fine_tuning","rag_knowledge_graph","personalized_context"],We=(e,l)=>{const i=new Map(e.map((a=>[a.key,a])));return l.map((a=>{return p=i.get(a)?.status,p==="starting"||p==="building"?p:"idle";var p}))},Ye=(e,l)=>{if(e.length===0)return!1;const i=new Map(e.map((a=>[a.key,a])));return l.every((a=>i.get(a)?.status==="ready"))},Xe=De.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  background-color: ${e=>e.theme.colors.grey4};
@@ -1,4 +1,4 @@
1
- import{j as d}from"./liveblocks-DtuUpF5h.js";import{i as K,j as _,g as H,u as X,h as W,l as ne,k as oa,n as ht,o as P,N as vn}from"./core-Dk5JD2l2.js";import{fI as B,W4 as We,bF as sa,br as Ee,Xs as En,kd as wn,Xt as Vt,Xu as Tn,kg as ft,Xv as Qe,Xw as xn,kl as Dn,Xx as Gt,Xy as Pn,kp as gt,Xz as Ze,XA as On,XB as Fn,Wo as jn,lr as Rn,XC as Mn,bn as Je,XD as ra,X2 as le,bc as ia,lF as ca,lo as la,X4 as de,X3 as ae,fH as da,gd as Bn,gt as bt,XE as Yn,XF as Un,XG as ua,XH as Oe,E7 as Be,E8 as Ye,Ew as we,Eq as ue,Ec as Ue,XI as Ln,c0 as Le,XJ as Vn,XK as Gn,XL as ma,XM as Fe,XN as Nn,ek as et,Ai as pa,XO as $n,XP as ha,XQ as Xn,XR as zn,XS as Kn,XT as St,V0 as _t,ug as Te,m2 as xe,EG as kt,Ap as qn,Aw as Qn,XU as Zn,XV as Hn,E9 as Nt,XW as Wn,Al as Ie,Ag as fa,XX as ge,XY as $t,XZ as Jn,X_ as yt,U$ as At,Ct as ga,X$ as eo,Y0 as ba,Y1 as to,Y2 as ao,Y3 as no,Y4 as It,CI as oo,CP as so,Y5 as ro,Y6 as io,Eb as Xt,Y7 as co,Cr as Ca,Y8 as be,Y9 as zt,Ya as lo,bq as Sa,EL as _a,Yb as uo,Yc as ka,Yd as mo,Ye as po,Yf as ho,Yg as vt,ED as fo,EF as go,Yh as bo,Yi as Co,Ea as Kt,Yj as So,EJ as ya,Yk as Ce,Yl as qt,Ym as _o,Yn as ko,Yo as Aa,lT as Ia,p_ as va,lY as Ea,pY as wa,pX as Ta,pW as xa,BQ as yo,dd as Ao,pT as Io,Un as vo,q8 as Eo,Yp as wo,Yq as To,Yr as xo,b5 as Et,q2 as Do,ig as Po,gL as Oo,q1 as Fo,lh as jo,p$ as Ro,pZ as Mo,e0 as Bo,d$ as Yo}from"./zeni-epic-state-BtP47QJT.js";import{z as Y,av as oe,p as O,m as T,G as q,bb as Uo,as as Ve,a8 as Ge,bc as Da,V as N,bd as Lo,be as Pa,E as Vo,bf as Go,bg as No,a as Oa,a1 as Fa,f as ja,ar as $o,bh as Xo,ao as zo,c as wt,bi as Ra,A as re,bj as Ma,bk as Ba,au as Ya,bl as Ko,ai as Ne,Q as $e,bm as qo,U as Qo,bn as Zo,g as G,h as Ho,l as Wo,a4 as Jo,aq as es,bo as ts,bp as as,bq as ns,br as ve}from"./index-CaO8T0Mn.js";import{n as Tt}from"./mui-DAOUhz91.js";import{a as b}from"./sentry-BWDuLt7o.js";import{w as Ua}from"./withTransactionSidePanel-BKpEvUWX.js";import{c as La,t as De,f as me,b as xt,a as Dt,v as os}from"./routePaths-CIClX-hy.js";import{u as se}from"./useAskAiCfoHostNavButtonProps-BeCZgIua.js";import Me from"./NotFoundScreen-BbJtMThz.js";import{u as Pt}from"./useInitialThreadRequest-Decdti18.js";import{t as Va}from"./analyticsHelper-qAafKEWE.js";import{C as ss}from"./CompanyPassportScreen-Cy2hV9k7.js";import{u as rs}from"./useAiCfoDashboardSuggestedQuestionsChips-BdGVlzMy.js";import{F as is}from"./FeaturePreviewScreen-DrW5sKTA.js";import"./recharts-BMD3jyO6.js";import"./analytics-C6U4wpfB.js";import"./plaid-DBHSfOGH.js";import"./dnd-CSZKLHxv.js";import"./stripe-cKAAJElX.js";import"./lottie-BlG_vWSt.js";import"./lexical-BtWXzxnq.js";import"./pdf-iocWnEuY.js";import"./utils-CWVNtCN5.js";import"./TransactionDetailScreen-1gITEJfr.js";import"./decodeURIComponentSafe-NBY1IhYb.js";import"./expenseAutomationHelper-BwdyIQYD.js";import"./stripSplatSuffix-KkY0P5Vm.js";import"./MobileAppDrawer-r4WOmIWX.js";import"./InboxNotificationsProvider-D6GwXgCp.js";import"./useTaskManagerAccess-CSCgZk-0.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]="1bb5239b-b808-41d9-ae28-0ffa965683d5",e._sentryDebugIdIdentifier="sentry-dbid-1bb5239b-b808-41d9-ae28-0ffa965683d5")}catch{}})();const cs=Ua((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=K(),s=Y.getSignedInUser(),i=_((S=>S.tenantState.currentTenantId)),l=_((S=>B(S))),{tenantEmailDomain:m}=K(),p=H(),h=l?.companyName??"",f={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=b.useMemo((()=>({authParams:f,companyName:h,downloadEndPoint:`${oe}/agingDetailedReport`,timezone:We()})),[]),u=b.useMemo((()=>r!=null?sa(r):Ee()),[r]),C=X(),g=W(),y=_((S=>En(S,u,o))),E=b.useCallback((()=>{o!=null&&y.fetchState!=="In-Progress"&&y.fetchState!=="Completed"&&C(wn(o,u))}),[u]),I=b.useCallback((()=>{g("../../",{relative:"path"})}),[]),k=b.useCallback(((S,A)=>{C(Vt({sortKey:S,sortOrder:A}))}),[]),w=b.useCallback((S=>{C(Vt({downloadState:S}))}),[]),R=b.useCallback((S=>{if(e)e(S.transactionId,S.transactionType);else if(m!=null){const A=La({id:S.transactionId,type:S.transactionType},m);g(A);const U=O(p.state?.pathnameStackToGoBack,p.pathname);g(A,{state:{pathnameStackToGoBack:U}})}}),[m,e]),x=b.useCallback((()=>{y.vendor!=null&&T.trackApAgingDetail("AP Aging",u.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),y.vendor.id,y.vendor.name)}),[y.vendor,u]);return b.useEffect((()=>{E()}),[]),b.useEffect((()=>{y.fetchState==="Completed"&&x()}),[x,y.fetchState]),d.jsx(Uo,{apAgingDetail:y,downloadParams:c,reportDate:u,analytics:T,onTransactionClick:R,onReload:E,onBackClick:I,onColumnSortConfigChanged:k,updateDownloadStateHandler:w,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),ls=()=>{const e=X(),a=W(),t=_((k=>Tn(k))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AP Aging"});Ve({isDataReady:t.fetchState==="Completed"});const r=Y.getSignedInUser(),s=_((k=>k.tenantState.currentTenantId)),i=_((k=>B(k))),l=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},p=b.useMemo((()=>({authParams:m,companyName:l,downloadEndPoint:`${oe}/agingReport`,timezone:We()})),[]),h=t.apAgingUIState.selectedDate??Ee(),f=b.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(ft(h))}),[]);b.useEffect((()=>{f()}),[]);const c=b.useCallback((()=>{a("../",{relative:"path"})}),[]),u=b.useCallback((k=>{e(Qe({searchString:k}))}),[]),C=b.useCallback(((k,w)=>{e(Qe({sortKey:w,sortOrder:k}))}),[]),g=b.useCallback((k=>{a(`./${k}/${h.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[h]),y=b.useCallback((k=>{e(Qe({downloadState:k}))}),[]),E=b.useCallback(((k,w)=>{}),[]),I=b.useCallback(((k,w)=>{e(Qe({selectedDate:k,agingDateSelectionType:w})),e(ft(k))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ge,{analytics:T,onLoad:k=>k.trackPageLoaded(N.Event.agingReport,"AP Aging")}):null,d.jsx(Da,{uiState:t.apAgingUIState,report:t,downloadParams:p,analytics:T,onReloadReport:f,onBackClick:c,onSearchTextChange:u,onSortOrderChange:C,onEntityNameClick:g,updateDownloadStateHandler:y,onSelectedDateChanged:I,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},ds=Ua((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=K(),s=Y.getSignedInUser(),i=_((x=>B(x))),{tenantEmailDomain:l}=K(),m=H(),p=i.companyName,h={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},f=b.useMemo((()=>({authParams:h,companyName:p,downloadEndPoint:`${oe}/agingDetailedReport`,timezone:We()})),[]),c=b.useMemo((()=>r!=null?sa(r):Ee()),[r]),u=X(),C=W(),g=_((x=>xn(x,c,o))),y=b.useCallback((()=>{o!=null&&g.fetchState!=="In-Progress"&&g.fetchState!=="Completed"&&u(Dn(o,c))}),[c]),E=b.useCallback((()=>{C("../../",{relative:"path"})}),[]),I=b.useCallback(((x,S)=>{u(Gt({sortKey:x,sortOrder:S}))}),[]),k=b.useCallback((x=>{u(Gt({downloadState:x}))}),[]),w=b.useCallback((x=>{if(e)e(x.transactionId,x.transactionType);else if(l!=null){const S=La({id:x.transactionId,type:x.transactionType},l);C(S);const A=O(m.state?.pathnameStackToGoBack,m.pathname);C(S,{state:{pathnameStackToGoBack:A}})}}),[l,e]),R=b.useCallback((()=>{g.customer!=null&&T.trackArAgingDetail("AR Aging",c.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),g.customer.id,g.customer.name)}),[g.customer,c]);return b.useEffect((()=>{y()}),[]),b.useEffect((()=>{g.fetchState==="Completed"&&R()}),[g.fetchState,R]),d.jsx(Lo,{arAgingDetail:g,downloadParams:f,reportDate:c,analytics:T,onTransactionClick:w,onReload:y,onBackClick:E,onColumnSortConfigChanged:I,updateDownloadStateHandler:k,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),us=()=>{const e=X(),a=W(),t=_((I=>Pn(I))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AR Aging"});Ve({isDataReady:t.fetchState==="Completed"});const r=Y.getSignedInUser(),s=_((I=>B(I))),i=s.companyName,l={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=b.useMemo((()=>({authParams:l,companyName:i,downloadEndPoint:`${oe}/agingReport`,timezone:We()})),[]),p=t.arAgingUIState.selectedDate??Ee(),h=b.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(gt(p))}),[]);b.useEffect((()=>{h()}),[]);const f=b.useCallback((()=>{a("../",{relative:"path"})}),[]),c=b.useCallback((I=>{e(Ze({searchString:I}))}),[]),u=b.useCallback(((I,k)=>{e(Ze({sortKey:k,sortOrder:I}))}),[]),C=b.useCallback((I=>{a(`./${I}/${p.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[p]),g=b.useCallback((I=>{e(Ze({downloadState:I}))}),[]),y=b.useCallback(((I,k)=>{e(Ze({selectedDate:I,agingDateSelectionType:k})),e(gt(I))}),[]),E=b.useCallback(((I,k)=>{e(On({nodeId:I,isCollapsed:k}))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ge,{analytics:T,onLoad:I=>I.trackPageLoaded(N.Event.agingReport,"AR Aging")}):null,d.jsx(Da,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:T,onReloadReport:h,onBackClick:f,onSearchTextChange:c,onSortOrderChange:u,onEntityNameClick:C,updateDownloadStateHandler:g,onSelectedDateChanged:y,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Ga=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function Na(e,a){const t=jn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=De(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(Rn(n,o))}}}const ms=ne((function(e){const a=Fn(e).accountsInOrder.map(((t,n)=>Ga(t,n)));return{sectionTitle:q.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,fetchState:e.cashBalanceState.fetchState,analytics:T}}),Na)(Pa),ps=ne((function(e){const a=Mn(e).accountsInOrder.map(((o,r)=>Ga(o,r))),t=Y.getSignedInUser(),n=Je(t);return{sectionTitle:q.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:T}}),Na)(Pa);function hs(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=_((o=>B(o).company?.companyInfo.firstMonthOfFY??1));return _((o=>o.cashBalanceState.fetchState))==="Error"?d.jsx(Me,{}):d.jsx(ms,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,firstMonthOfFY:n})}function fs(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=_((o=>B(o).company?.companyInfo.firstMonthOfFY??1));return _((o=>o.cardBalanceState.fetchState))==="Error"?d.jsx(Me,{}):d.jsx(ps,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,firstMonthOfFY:n})}const gs=Tt.div`
1
+ import{j as d}from"./liveblocks-DtuUpF5h.js";import{i as K,j as _,g as H,u as X,h as W,l as ne,k as oa,n as ht,o as P,N as vn}from"./core-Dk5JD2l2.js";import{fI as B,W4 as We,bF as sa,br as Ee,Xs as En,kd as wn,Xt as Vt,Xu as Tn,kg as ft,Xv as Qe,Xw as xn,kl as Dn,Xx as Gt,Xy as Pn,kp as gt,Xz as Ze,XA as On,XB as Fn,Wo as jn,lr as Rn,XC as Mn,bn as Je,XD as ra,X2 as le,bc as ia,lF as ca,lo as la,X4 as de,X3 as ae,fH as da,gd as Bn,gt as bt,XE as Yn,XF as Un,XG as ua,XH as Oe,E7 as Be,E8 as Ye,Ew as we,Eq as ue,Ec as Ue,XI as Ln,c0 as Le,XJ as Vn,XK as Gn,XL as ma,XM as Fe,XN as Nn,ek as et,Ai as pa,XO as $n,XP as ha,XQ as Xn,XR as zn,XS as Kn,XT as St,V0 as _t,ug as Te,m2 as xe,EG as kt,Ap as qn,Aw as Qn,XU as Zn,XV as Hn,E9 as Nt,XW as Wn,Al as Ie,Ag as fa,XX as ge,XY as $t,XZ as Jn,X_ as yt,U$ as At,Ct as ga,X$ as eo,Y0 as ba,Y1 as to,Y2 as ao,Y3 as no,Y4 as It,CI as oo,CP as so,Y5 as ro,Y6 as io,Eb as Xt,Y7 as co,Cr as Ca,Y8 as be,Y9 as zt,Ya as lo,bq as Sa,EL as _a,Yb as uo,Yc as ka,Yd as mo,Ye as po,Yf as ho,Yg as vt,ED as fo,EF as go,Yh as bo,Yi as Co,Ea as Kt,Yj as So,EJ as ya,Yk as Ce,Yl as qt,Ym as _o,Yn as ko,Yo as Aa,lT as Ia,p_ as va,lY as Ea,pY as wa,pX as Ta,pW as xa,BQ as yo,dd as Ao,pT as Io,Un as vo,q8 as Eo,Yp as wo,Yq as To,Yr as xo,b5 as Et,q2 as Do,ig as Po,gL as Oo,q1 as Fo,lh as jo,p$ as Ro,pZ as Mo,e0 as Bo,d$ as Yo}from"./zeni-epic-state-BtP47QJT.js";import{z as Y,av as oe,p as O,m as T,G as q,bb as Uo,as as Ve,a8 as Ge,bc as Da,V as N,bd as Lo,be as Pa,E as Vo,bf as Go,bg as No,a as Oa,a1 as Fa,f as ja,ar as $o,bh as Xo,ao as zo,c as wt,bi as Ra,A as re,bj as Ma,bk as Ba,au as Ya,bl as Ko,ai as Ne,Q as $e,bm as qo,U as Qo,bn as Zo,g as G,h as Ho,l as Wo,a4 as Jo,aq as es,bo as ts,bp as as,bq as ns,br as ve}from"./index-uoDX7H4L.js";import{n as Tt}from"./mui-DAOUhz91.js";import{a as b}from"./sentry-BWDuLt7o.js";import{w as Ua}from"./withTransactionSidePanel-MoXr5b9J.js";import{c as La,t as De,f as me,b as xt,a as Dt,v as os}from"./routePaths-DzLOO7Om.js";import{u as se}from"./useAskAiCfoHostNavButtonProps-CsMZr2YE.js";import Me from"./NotFoundScreen-CyVGP3Vp.js";import{u as Pt}from"./useInitialThreadRequest-DGvbt9bY.js";import{t as Va}from"./analyticsHelper-DdV5jqT5.js";import{C as ss}from"./CompanyPassportScreen-SOXe4P3g.js";import{u as rs}from"./useAiCfoDashboardSuggestedQuestionsChips-BNl2X51l.js";import{F as is}from"./FeaturePreviewScreen-CtNAe1_H.js";import"./recharts-BMD3jyO6.js";import"./analytics-C6U4wpfB.js";import"./plaid-DBHSfOGH.js";import"./dnd-CSZKLHxv.js";import"./stripe-cKAAJElX.js";import"./lottie-BlG_vWSt.js";import"./lexical-BtWXzxnq.js";import"./pdf-iocWnEuY.js";import"./utils-CWVNtCN5.js";import"./TransactionDetailScreen-BG6zUFU-.js";import"./decodeURIComponentSafe-NBY1IhYb.js";import"./expenseAutomationHelper-BwdyIQYD.js";import"./stripSplatSuffix-KkY0P5Vm.js";import"./MobileAppDrawer-BrOHAjwP.js";import"./InboxNotificationsProvider-D6GwXgCp.js";import"./useTaskManagerAccess-OjN4ZWFp.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]="1bb5239b-b808-41d9-ae28-0ffa965683d5",e._sentryDebugIdIdentifier="sentry-dbid-1bb5239b-b808-41d9-ae28-0ffa965683d5")}catch{}})();const cs=Ua((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=K(),s=Y.getSignedInUser(),i=_((S=>S.tenantState.currentTenantId)),l=_((S=>B(S))),{tenantEmailDomain:m}=K(),p=H(),h=l?.companyName??"",f={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=b.useMemo((()=>({authParams:f,companyName:h,downloadEndPoint:`${oe}/agingDetailedReport`,timezone:We()})),[]),u=b.useMemo((()=>r!=null?sa(r):Ee()),[r]),C=X(),g=W(),y=_((S=>En(S,u,o))),E=b.useCallback((()=>{o!=null&&y.fetchState!=="In-Progress"&&y.fetchState!=="Completed"&&C(wn(o,u))}),[u]),I=b.useCallback((()=>{g("../../",{relative:"path"})}),[]),k=b.useCallback(((S,A)=>{C(Vt({sortKey:S,sortOrder:A}))}),[]),w=b.useCallback((S=>{C(Vt({downloadState:S}))}),[]),R=b.useCallback((S=>{if(e)e(S.transactionId,S.transactionType);else if(m!=null){const A=La({id:S.transactionId,type:S.transactionType},m);g(A);const U=O(p.state?.pathnameStackToGoBack,p.pathname);g(A,{state:{pathnameStackToGoBack:U}})}}),[m,e]),x=b.useCallback((()=>{y.vendor!=null&&T.trackApAgingDetail("AP Aging",u.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),y.vendor.id,y.vendor.name)}),[y.vendor,u]);return b.useEffect((()=>{E()}),[]),b.useEffect((()=>{y.fetchState==="Completed"&&x()}),[x,y.fetchState]),d.jsx(Uo,{apAgingDetail:y,downloadParams:c,reportDate:u,analytics:T,onTransactionClick:R,onReload:E,onBackClick:I,onColumnSortConfigChanged:k,updateDownloadStateHandler:w,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),ls=()=>{const e=X(),a=W(),t=_((k=>Tn(k))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AP Aging"});Ve({isDataReady:t.fetchState==="Completed"});const r=Y.getSignedInUser(),s=_((k=>k.tenantState.currentTenantId)),i=_((k=>B(k))),l=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},p=b.useMemo((()=>({authParams:m,companyName:l,downloadEndPoint:`${oe}/agingReport`,timezone:We()})),[]),h=t.apAgingUIState.selectedDate??Ee(),f=b.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(ft(h))}),[]);b.useEffect((()=>{f()}),[]);const c=b.useCallback((()=>{a("../",{relative:"path"})}),[]),u=b.useCallback((k=>{e(Qe({searchString:k}))}),[]),C=b.useCallback(((k,w)=>{e(Qe({sortKey:w,sortOrder:k}))}),[]),g=b.useCallback((k=>{a(`./${k}/${h.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[h]),y=b.useCallback((k=>{e(Qe({downloadState:k}))}),[]),E=b.useCallback(((k,w)=>{}),[]),I=b.useCallback(((k,w)=>{e(Qe({selectedDate:k,agingDateSelectionType:w})),e(ft(k))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ge,{analytics:T,onLoad:k=>k.trackPageLoaded(N.Event.agingReport,"AP Aging")}):null,d.jsx(Da,{uiState:t.apAgingUIState,report:t,downloadParams:p,analytics:T,onReloadReport:f,onBackClick:c,onSearchTextChange:u,onSortOrderChange:C,onEntityNameClick:g,updateDownloadStateHandler:y,onSelectedDateChanged:I,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},ds=Ua((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=K(),s=Y.getSignedInUser(),i=_((x=>B(x))),{tenantEmailDomain:l}=K(),m=H(),p=i.companyName,h={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},f=b.useMemo((()=>({authParams:h,companyName:p,downloadEndPoint:`${oe}/agingDetailedReport`,timezone:We()})),[]),c=b.useMemo((()=>r!=null?sa(r):Ee()),[r]),u=X(),C=W(),g=_((x=>xn(x,c,o))),y=b.useCallback((()=>{o!=null&&g.fetchState!=="In-Progress"&&g.fetchState!=="Completed"&&u(Dn(o,c))}),[c]),E=b.useCallback((()=>{C("../../",{relative:"path"})}),[]),I=b.useCallback(((x,S)=>{u(Gt({sortKey:x,sortOrder:S}))}),[]),k=b.useCallback((x=>{u(Gt({downloadState:x}))}),[]),w=b.useCallback((x=>{if(e)e(x.transactionId,x.transactionType);else if(l!=null){const S=La({id:x.transactionId,type:x.transactionType},l);C(S);const A=O(m.state?.pathnameStackToGoBack,m.pathname);C(S,{state:{pathnameStackToGoBack:A}})}}),[l,e]),R=b.useCallback((()=>{g.customer!=null&&T.trackArAgingDetail("AR Aging",c.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),g.customer.id,g.customer.name)}),[g.customer,c]);return b.useEffect((()=>{y()}),[]),b.useEffect((()=>{g.fetchState==="Completed"&&R()}),[g.fetchState,R]),d.jsx(Lo,{arAgingDetail:g,downloadParams:f,reportDate:c,analytics:T,onTransactionClick:w,onReload:y,onBackClick:E,onColumnSortConfigChanged:I,updateDownloadStateHandler:k,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),us=()=>{const e=X(),a=W(),t=_((I=>Pn(I))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AR Aging"});Ve({isDataReady:t.fetchState==="Completed"});const r=Y.getSignedInUser(),s=_((I=>B(I))),i=s.companyName,l={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=b.useMemo((()=>({authParams:l,companyName:i,downloadEndPoint:`${oe}/agingReport`,timezone:We()})),[]),p=t.arAgingUIState.selectedDate??Ee(),h=b.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(gt(p))}),[]);b.useEffect((()=>{h()}),[]);const f=b.useCallback((()=>{a("../",{relative:"path"})}),[]),c=b.useCallback((I=>{e(Ze({searchString:I}))}),[]),u=b.useCallback(((I,k)=>{e(Ze({sortKey:k,sortOrder:I}))}),[]),C=b.useCallback((I=>{a(`./${I}/${p.format(q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[p]),g=b.useCallback((I=>{e(Ze({downloadState:I}))}),[]),y=b.useCallback(((I,k)=>{e(Ze({selectedDate:I,agingDateSelectionType:k})),e(gt(I))}),[]),E=b.useCallback(((I,k)=>{e(On({nodeId:I,isCollapsed:k}))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ge,{analytics:T,onLoad:I=>I.trackPageLoaded(N.Event.agingReport,"AR Aging")}):null,d.jsx(Da,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:T,onReloadReport:h,onBackClick:f,onSearchTextChange:c,onSortOrderChange:u,onEntityNameClick:C,updateDownloadStateHandler:g,onSelectedDateChanged:y,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Ga=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function Na(e,a){const t=jn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=De(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(Rn(n,o))}}}const ms=ne((function(e){const a=Fn(e).accountsInOrder.map(((t,n)=>Ga(t,n)));return{sectionTitle:q.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,fetchState:e.cashBalanceState.fetchState,analytics:T}}),Na)(Pa),ps=ne((function(e){const a=Mn(e).accountsInOrder.map(((o,r)=>Ga(o,r))),t=Y.getSignedInUser(),n=Je(t);return{sectionTitle:q.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:T}}),Na)(Pa);function hs(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=_((o=>B(o).company?.companyInfo.firstMonthOfFY??1));return _((o=>o.cashBalanceState.fetchState))==="Error"?d.jsx(Me,{}):d.jsx(ms,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,firstMonthOfFY:n})}function fs(){const e=W(),a=H(),{tenantEmailDomain:t}=K(),n=_((o=>B(o).company?.companyInfo.firstMonthOfFY??1));return _((o=>o.cardBalanceState.fetchState))==="Error"?d.jsx(Me,{}):d.jsx(ps,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,firstMonthOfFY:n})}const gs=Tt.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-DtuUpF5h.js";import{a as u}from"./sentry-BWDuLt7o.js";import{u as y,j as p,l as U,g as w,N as A}from"./core-Dk5JD2l2.js";import{U6 as N,fI as _,go as k,U7 as L,pV as R,U8 as z}from"./zeni-epic-state-BtP47QJT.js";import{u as j,z as f,L as T,t as I,G as O,b as $}from"./index-CaO8T0Mn.js";import"./mui-DAOUhz91.js";import{t as P}from"./getLocaleForTenant-Tff_ZVu3.js";import"./recharts-BMD3jyO6.js";import"./analytics-C6U4wpfB.js";import"./plaid-DBHSfOGH.js";import"./dnd-CSZKLHxv.js";import"./stripe-cKAAJElX.js";import"./lottie-BlG_vWSt.js";import"./lexical-BtWXzxnq.js";import"./pdf-iocWnEuY.js";import"./utils-CWVNtCN5.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]="76b0bffb-b25c-4c61-b203-51a9ba0b91b6",t._sentryDebugIdIdentifier="sentry-dbid-76b0bffb-b25c-4c61-b203-51a9ba0b91b6")}catch{}})();const G=U((function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}}))((function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:b}){const r=w(),m=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let h="";const n=b.map((l=>l.tenantEmailDomain)),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,h="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=m.get("question")?.replace(/^["']|["']$/g,"")??null,e=m.get("should_submit")==="true");else if(i!=null)if(n.reduce(((l,F)=>l||i.split("/").find((D=>D===F))!=null),!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,h="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=$(c,m);return v.jsx(A,{to:x,replace:!0,state:{...r.state,origin:"",message:h,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}}));function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=j(),b=u.useRef(!1),r=u.useRef(!1),m=u.useRef(null),h=p((e=>N(e))),n=p((e=>e.tenantState.fetchState)),i=p((e=>e.tenantState.error)),a=p((e=>e.tenantState.activeTenantFetchState.fetchState)),c=p((e=>_(e))),d=f.getSignedInUser();return u.useLayoutEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId??null;m.current!==e&&(m.current=e,b.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!b.current||a!=="Completed"&&a!=="Error"||(b.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)}),[a,n]),u.useEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId;b.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(b.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(k(d.userId,e))))}),[n,a,d,t]),u.useEffect((()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!L(i))&&t(R(e.userId)))}),[n,a,i,d,t]),u.useEffect((()=>{f.isSignedIn()&&n==="Completed"&&h.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(h.tenantsCoreDetailsInOrder),o())}),[h.tenantsCoreDetailsInOrder,n]),u.useEffect((()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(O.updateAppLocaleID(P(c)),o())}),[n,a,c]),v.jsx(G,{})}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"],V={"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 V[s]}export{oe as default};
1
+ import{j as v}from"./liveblocks-DtuUpF5h.js";import{a as u}from"./sentry-BWDuLt7o.js";import{u as y,j as p,l as U,g as w,N as A}from"./core-Dk5JD2l2.js";import{U6 as N,fI as _,go as k,U7 as L,pV as R,U8 as z}from"./zeni-epic-state-BtP47QJT.js";import{u as j,z as f,L as T,t as I,G as O,b as $}from"./index-uoDX7H4L.js";import"./mui-DAOUhz91.js";import{t as P}from"./getLocaleForTenant-C8sqw5jB.js";import"./recharts-BMD3jyO6.js";import"./analytics-C6U4wpfB.js";import"./plaid-DBHSfOGH.js";import"./dnd-CSZKLHxv.js";import"./stripe-cKAAJElX.js";import"./lottie-BlG_vWSt.js";import"./lexical-BtWXzxnq.js";import"./pdf-iocWnEuY.js";import"./utils-CWVNtCN5.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]="76b0bffb-b25c-4c61-b203-51a9ba0b91b6",t._sentryDebugIdIdentifier="sentry-dbid-76b0bffb-b25c-4c61-b203-51a9ba0b91b6")}catch{}})();const G=U((function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}}))((function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:b}){const r=w(),m=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let h="";const n=b.map((l=>l.tenantEmailDomain)),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,h="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=m.get("question")?.replace(/^["']|["']$/g,"")??null,e=m.get("should_submit")==="true");else if(i!=null)if(n.reduce(((l,F)=>l||i.split("/").find((D=>D===F))!=null),!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,h="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=$(c,m);return v.jsx(A,{to:x,replace:!0,state:{...r.state,origin:"",message:h,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}}));function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=j(),b=u.useRef(!1),r=u.useRef(!1),m=u.useRef(null),h=p((e=>N(e))),n=p((e=>e.tenantState.fetchState)),i=p((e=>e.tenantState.error)),a=p((e=>e.tenantState.activeTenantFetchState.fetchState)),c=p((e=>_(e))),d=f.getSignedInUser();return u.useLayoutEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId??null;m.current!==e&&(m.current=e,b.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!b.current||a!=="Completed"&&a!=="Error"||(b.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)}),[a,n]),u.useEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId;b.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(b.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(k(d.userId,e))))}),[n,a,d,t]),u.useEffect((()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!L(i))&&t(R(e.userId)))}),[n,a,i,d,t]),u.useEffect((()=>{f.isSignedIn()&&n==="Completed"&&h.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(h.tenantsCoreDetailsInOrder),o())}),[h.tenantsCoreDetailsInOrder,n]),u.useEffect((()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(O.updateAppLocaleID(P(c)),o())}),[n,a,c]),v.jsx(G,{})}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"],V={"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 V[s]}export{oe as default};
@@ -1,4 +1,4 @@
1
- import{j as l}from"./liveblocks-DtuUpF5h.js";import{h as w,g as C,j as h,l as E,i as V}from"./core-Dk5JD2l2.js";import{Z5 as k,Zc as J,gJ as Q,gI as W,gH as X,kS as Y,X3 as q,uU as K,fI as B,YE as D,kQ as T,Z6 as S,Zf as F,kO as G,l9 as j}from"./zeni-epic-state-BtP47QJT.js";import{bN as L,a1 as N,c as R,z as Z,E as U,a4 as p,g as v,a7 as O,bO as M,N as H,bP as ee,p as te}from"./index-CaO8T0Mn.js";import{n as z}from"./mui-DAOUhz91.js";import"./sentry-BWDuLt7o.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]="d9abe04a-de0f-47f1-8893-67b26e9283f3",e._sentryDebugIdIdentifier="sentry-dbid-d9abe04a-de0f-47f1-8893-67b26e9283f3")}catch{}})();const ae=E(null,(function(e,t){return{onSaveVendor:a=>{e(Y(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(q("common")),a!=null&&e(K(a))},onGetOtp:a=>{e(X(a,"BillPayVendor"))},onResendOtp:a=>{e(W(a,"BillPayVendor"))},onVerifyOtp:(a,n)=>{e(Q(a,n,"BillPayVendor"))},onVerifyOtpSuccess:(a,n,o)=>{e(J(a,n,o))}}}))(L);function _({vendorId:e,billId:t,isExpressPayPage:a}){const n=w(),o=C(),s=h((d=>k(d,e)));return l.jsx(ae,{location:o,navigate:n,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:a??!1})}const ne=z.div`
1
+ import{j as l}from"./liveblocks-DtuUpF5h.js";import{h as w,g as C,j as h,l as E,i as V}from"./core-Dk5JD2l2.js";import{Z5 as k,Zc as J,gJ as Q,gI as W,gH as X,kS as Y,X3 as q,uU as K,fI as B,YE as D,kQ as T,Z6 as S,Zf as F,kO as G,l9 as j}from"./zeni-epic-state-BtP47QJT.js";import{bN as L,a1 as N,c as R,z as Z,E as U,a4 as p,g as v,a7 as O,bO as M,N as H,bP as ee,p as te}from"./index-uoDX7H4L.js";import{n as z}from"./mui-DAOUhz91.js";import"./sentry-BWDuLt7o.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]="d9abe04a-de0f-47f1-8893-67b26e9283f3",e._sentryDebugIdIdentifier="sentry-dbid-d9abe04a-de0f-47f1-8893-67b26e9283f3")}catch{}})();const ae=E(null,(function(e,t){return{onSaveVendor:a=>{e(Y(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(q("common")),a!=null&&e(K(a))},onGetOtp:a=>{e(X(a,"BillPayVendor"))},onResendOtp:a=>{e(W(a,"BillPayVendor"))},onVerifyOtp:(a,n)=>{e(Q(a,n,"BillPayVendor"))},onVerifyOtpSuccess:(a,n,o)=>{e(J(a,n,o))}}}))(L);function _({vendorId:e,billId:t,isExpressPayPage:a}){const n=w(),o=C(),s=h((d=>k(d,e)));return l.jsx(ae,{location:o,navigate:n,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:a??!1})}const ne=z.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as i}from"./liveblocks-DtuUpF5h.js";import{a1 as c,ab as l,E as f}from"./index-CaO8T0Mn.js";import{D as p}from"./mui-DAOUhz91.js";import"./sentry-BWDuLt7o.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]="c06e3c71-2cdd-4b4c-9d6d-3f270023e5b2",e._sentryDebugIdIdentifier="sentry-dbid-c06e3c71-2cdd-4b4c-9d6d-3f270023e5b2")}catch{}})();const b={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:d}=e,n=c(),s=o?.valuePx(n)??b.drawerLeftMargin.valuePx(n),a=f();return i.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.8,cursor:"pointer"}}},onClose:d,children:t})}export{h as D};
1
+ import{j as i}from"./liveblocks-DtuUpF5h.js";import{a1 as c,ab as l,E as f}from"./index-uoDX7H4L.js";import{D as p}from"./mui-DAOUhz91.js";import"./sentry-BWDuLt7o.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]="c06e3c71-2cdd-4b4c-9d6d-3f270023e5b2",e._sentryDebugIdIdentifier="sentry-dbid-c06e3c71-2cdd-4b4c-9d6d-3f270023e5b2")}catch{}})();const b={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:d}=e,n=c(),s=o?.valuePx(n)??b.drawerLeftMargin.valuePx(n),a=f();return i.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.8,cursor:"pointer"}}},onClose:d,children:t})}export{h as D};
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-DtuUpF5h.js";import{a as d}from"./sentry-BWDuLt7o.js";import{h as q,u as A,g as G,i as W,j as l,N as X,l as F,n as N,o as O}from"./core-Dk5JD2l2.js";import{X8 as _,fI as M,Wp as R,n2 as Y,Sq as k,Xd as $,X2 as z,m2 as V,Sr as S,Wu as H,Wv as J,X4 as K,X3 as L}from"./zeni-epic-state-BtP47QJT.js";import{b8 as Q,m as U,a4 as Z,p as tt}from"./index-CaO8T0Mn.js";import"./mui-DAOUhz91.js";import{d as I}from"./decodeURIComponentSafe-NBY1IhYb.js";import{w as et}from"./withTransactionSidePanel-BKpEvUWX.js";import{f as nt,c as at}from"./routePaths-CIClX-hy.js";import"./recharts-BMD3jyO6.js";import"./analytics-C6U4wpfB.js";import"./plaid-DBHSfOGH.js";import"./dnd-CSZKLHxv.js";import"./stripe-cKAAJElX.js";import"./lottie-BlG_vWSt.js";import"./lexical-BtWXzxnq.js";import"./pdf-iocWnEuY.js";import"./utils-CWVNtCN5.js";import"./useAskAiCfoHostNavButtonProps-BeCZgIua.js";import"./TransactionDetailScreen-1gITEJfr.js";import"./useInitialThreadRequest-Decdti18.js";import"./expenseAutomationHelper-BwdyIQYD.js";import"./stripSplatSuffix-KkY0P5Vm.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="347d79e9-d38f-4982-8f41-f442c60be80e",n._sentryDebugIdIdentifier="sentry-dbid-347d79e9-d38f-4982-8f41-f442c60be80e")}catch{}})();const ot=F((function(n,t){const e=t.entity,o=$(n,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:z(n,"common")},trendWithTransactionsReport:o,analytics:U,isAccountingClassesEnabled:V(n)}}),(function(n,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${at(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?n(K({searchString:e,searchOrigin:"common"})):e.trim().length===0&&n(L("common"))},onAutoCompleteEntity:e=>{const o=nt(e,t.tenantEmailDomain);n(H()),n(J()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??b();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&n(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};n(k(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),n(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(Q),it=et((function({entityType:n,...t}){const e=q(),o=A(),c=G(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:v,entityNameEncoded:w}=W(),r=I(v??""),p=I(w??""),f=rt(r,p),x=[r,p].filter((a=>a!=null)),i={name:p,id:r,type:n,zeniId:r,qboId:r},g=l((a=>_(a.customerIncomeState,a.vendorExpenseState,a.trendState,i,"quarter"))),j=l((a=>M(a).company?.companyInfo.firstMonthOfFY??1)),u=l((a=>R(a.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&f===!0&&(T(!0),o(Y(i)))}),[m,f,i]);const E=l((a=>a.trendState.fetchState)),P=u?.selectedPeriod?.timePeriod??g,B=(function(a,y){return a!=null&&y!=null?{startDate:a.startDate,endDate:y?.endDate}:y})(u?.selectedPeriod?.timePeriod,g);return d.useEffect((()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(k(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[m,h,E]),f?s.jsx(ot,{firstMonthOfFY:j,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:B,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(X,{to:b(x.length)})})),rt=(n,t)=>t!=null&&t.length>0&&n!=null&&n.length>0,b=(n=2)=>{let t="../";for(let e=0;e<n;e++)t=`${t}../`;return t};function jt({entityType:n}){return s.jsx(N,{children:s.jsx(O,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:n})})})}export{jt as EntityDetailRoutes,jt as default};
1
+ import{j as s}from"./liveblocks-DtuUpF5h.js";import{a as d}from"./sentry-BWDuLt7o.js";import{h as q,u as A,g as G,i as W,j as l,N as X,l as F,n as N,o as O}from"./core-Dk5JD2l2.js";import{X8 as _,fI as M,Wp as R,n2 as Y,Sq as k,Xd as $,X2 as z,m2 as V,Sr as S,Wu as H,Wv as J,X4 as K,X3 as L}from"./zeni-epic-state-BtP47QJT.js";import{b8 as Q,m as U,a4 as Z,p as tt}from"./index-uoDX7H4L.js";import"./mui-DAOUhz91.js";import{d as I}from"./decodeURIComponentSafe-NBY1IhYb.js";import{w as et}from"./withTransactionSidePanel-MoXr5b9J.js";import{f as nt,c as at}from"./routePaths-DzLOO7Om.js";import"./recharts-BMD3jyO6.js";import"./analytics-C6U4wpfB.js";import"./plaid-DBHSfOGH.js";import"./dnd-CSZKLHxv.js";import"./stripe-cKAAJElX.js";import"./lottie-BlG_vWSt.js";import"./lexical-BtWXzxnq.js";import"./pdf-iocWnEuY.js";import"./utils-CWVNtCN5.js";import"./useAskAiCfoHostNavButtonProps-CsMZr2YE.js";import"./TransactionDetailScreen-BG6zUFU-.js";import"./useInitialThreadRequest-DGvbt9bY.js";import"./expenseAutomationHelper-BwdyIQYD.js";import"./stripSplatSuffix-KkY0P5Vm.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new n.Error().stack;t&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[t]="347d79e9-d38f-4982-8f41-f442c60be80e",n._sentryDebugIdIdentifier="sentry-dbid-347d79e9-d38f-4982-8f41-f442c60be80e")}catch{}})();const ot=F((function(n,t){const e=t.entity,o=$(n,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:z(n,"common")},trendWithTransactionsReport:o,analytics:U,isAccountingClassesEnabled:V(n)}}),(function(n,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${at(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?n(K({searchString:e,searchOrigin:"common"})):e.trim().length===0&&n(L("common"))},onAutoCompleteEntity:e=>{const o=nt(e,t.tenantEmailDomain);n(H()),n(J()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??b();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&n(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};n(k(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),n(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(Q),it=et((function({entityType:n,...t}){const e=q(),o=A(),c=G(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:v,entityNameEncoded:w}=W(),r=I(v??""),p=I(w??""),f=rt(r,p),x=[r,p].filter((a=>a!=null)),i={name:p,id:r,type:n,zeniId:r,qboId:r},g=l((a=>_(a.customerIncomeState,a.vendorExpenseState,a.trendState,i,"quarter"))),j=l((a=>M(a).company?.companyInfo.firstMonthOfFY??1)),u=l((a=>R(a.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&f===!0&&(T(!0),o(Y(i)))}),[m,f,i]);const E=l((a=>a.trendState.fetchState)),P=u?.selectedPeriod?.timePeriod??g,B=(function(a,y){return a!=null&&y!=null?{startDate:a.startDate,endDate:y?.endDate}:y})(u?.selectedPeriod?.timePeriod,g);return d.useEffect((()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(k(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[m,h,E]),f?s.jsx(ot,{firstMonthOfFY:j,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:B,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(X,{to:b(x.length)})})),rt=(n,t)=>t!=null&&t.length>0&&n!=null&&n.length>0,b=(n=2)=>{let t="../";for(let e=0;e<n;e++)t=`${t}../`;return t};function jt({entityType:n}){return s.jsx(N,{children:s.jsx(O,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:n})})})}export{jt as EntityDetailRoutes,jt as default};
@@ -1,4 +1,4 @@
1
- import{j as k}from"./liveblocks-DtuUpF5h.js";import{u as ge,h as nt,g as be,j as F,i as Be,t as Jn,l as Yn,n as Hn,o as We,N as Wn}from"./core-Dk5JD2l2.js";import{fI as ke,a1g as Xn,q3 as Me,Up as Kn,Ab as Qn,a1h as Zn,a1i as es,a1j as ts,a1k as Ct,a1l as Ke,gk as Tt,a1m as ia,eY as as,g3 as ns,a1n as la,a1o as Qe,qW as ss,uX as os,gV as cs,gT as is,a1p as ls,r7 as rs,rg as ds,qe as us,qs as Ra,gS as ue,gU as ms,a1q as ps,qO as Da,rh as hs,qp as Ss,qk as gs,v1 as Cs,gR as Oe,a1r as tt,Cl as Fa,ML as _a,a1s as Ma,FG as Oa,a1t as fs,f0 as Is,f2 as ks,sY as Pt,X9 as ra,Xb as bs,m5 as Ts,Xc as Ps,mc as ys,dm as vs,DE as yt,a1u as Es,a1v as As,a1w as xs,a1x as ws,fp as vt,sM as da,X2 as Rs,a1y as Ds,a1z as Fs,me as _s,a1A as Ms,Rr as Os,md as Us,m2 as Bs,qH as Ua,rm as at,tz as Ba,tV as Vs,Uf as Va,rl as ua,ro as ja,rq as js,bF as zs,nB as Ls,ny as $s,rp as Ze,rn as Se,a1B as Gs,rH as ma,a1C as Ns,a1D as qs,sQ as Js,sR as Ys,W_ as Hs,W4 as Ws,a0K as Xs,a1E as Ks,X4 as pa,X3 as Xe,a1F as ha,mt as Qs,a1G as Zs,a1H as eo,a1I as to,a1J as ao,qC as no,a1K as so,a1L as oo,a1M as co,rx as io,mg as lo,m7 as ro,a1N as uo,mf as Sa,Xm as mo,a1O as po,a1P as ho,uy as So,u9 as go,u8 as ft,a1Q as Co,a1R as fo,a1S as Io,a1T as ko,nM as bo,br as To,nH as ga,nt as Po,a1U as yo,h2 as vo,nE as Eo,s_ as Ao,t0 as xo,sJ as wo,W7 as Ro,W8 as Do,F8 as Fo,F7 as _o,Fo as Mo,a1V as Ca,sP as Oo,sk as Uo,a1W as Bo,s0 as Vo,s5 as jo,sg as zo,s3 as Lo,a1X as $o,rY as Go,sf as No,sV as qo,a1Y as Jo,t6 as Yo,sD as Ho,tc as Wo,sI as Xo,rI as Ko,a1Z as Qo,q_ as Zo,qy as ec,qF as fa,rs as tc,a1_ as ac,a1$ as nc,a20 as sc,a21 as oc,a22 as cc,a23 as ic,a24 as lc,tg as rc,a25 as dc,a26 as uc,a27 as Ia,uJ as mc,u0 as pc,tR as ka,tP as hc,a28 as Sc,tE as gc,tj as Cc,tS as fc,a29 as Ic,a2a as kc,tp as bc,a2b as Tc,tk as Pc,to as yc,tm as vc,tY as Ec}from"./zeni-epic-state-BtP47QJT.js";import za from"./NotFoundScreen-BbJtMThz.js";import{a as s,R as La}from"./sentry-BWDuLt7o.js";import{n as Te,S as Ac}from"./mui-DAOUhz91.js";import{c as Ve,g as H,m as W,p as ee,aq as $a,as as Ga,dO as xc,dP as wc,z as st,dQ as Rc,dR as Dc,dS as Fc,ae as Ue,dT as _c,dU as ba,ba as Ta,dV as Mc,a7 as Na,dW as Oc,l as et,a as Uc,dX as Bc,dY as Vc,d as jc,Q as zc,dZ as Lc,d_ as $c,d$ as Gc,b4 as Nc,bs as qc,ab as Jc,b5 as Yc,b6 as Hc,G as Wc,w as Xc,e0 as Kc,av as Pa,e1 as Qc}from"./index-CaO8T0Mn.js";import{u as qa}from"./useAskAiCfoHostNavButtonProps-BeCZgIua.js";import{g as ya,b as Zc,c as ei,h as ti,a as ai,i as ni,r as si,C as oi}from"./TransactionDetailScreen-1gITEJfr.js";import{u as ci,a as ii}from"./useActualMatchingMatchDetail-03OPYHW8.js";import{d as li}from"./decodeURIComponentSafe-NBY1IhYb.js";import{m as Ja,a as Ya}from"./expenseAutomationHelper-BwdyIQYD.js";import{u as Ha,a as Wa,w as ri}from"./withTransactionSidePanel-BKpEvUWX.js";import{b as di,S as ui,a as mi,J as pi}from"./ScheduleDetailsPrepaidExpensesScreen-DjYg30gm.js";import{s as va,i as Xa,h as hi,v as Si,c as gi}from"./routePaths-CIClX-hy.js";import{a as It}from"./accountMappingHelper-D-qmKFUw.js";import{D as Ci}from"./DrawerScreen-D2sNIMxZ.js";import"./recharts-BMD3jyO6.js";import"./analytics-C6U4wpfB.js";import"./plaid-DBHSfOGH.js";import"./dnd-CSZKLHxv.js";import"./stripe-cKAAJElX.js";import"./lottie-BlG_vWSt.js";import"./lexical-BtWXzxnq.js";import"./pdf-iocWnEuY.js";import"./utils-CWVNtCN5.js";import"./useInitialThreadRequest-Decdti18.js";import"./stripSplatSuffix-KkY0P5Vm.js";import"./pathToGoBack-CcxULKW_.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="da075276-8cb0-46a6-974b-4d58027e2b48",t._sentryDebugIdIdentifier="sentry-dbid-da075276-8cb0-46a6-974b-4d58027e2b48")}catch{}})();const fi=()=>{const t=ge(),n=nt(),S=be(),g=F((p=>ke(p))),{useFeatureGate:d}=Ve(),{isFeatureEnabled:i}=d(H.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=d(H.aiAuditScorePercentage),A=F((p=>p.expenseAutomationViewState.selectedPeriodByTenantId)),l=F((p=>Xn(p,g.tenantId))),{isAiCfoAccessEnabled:v,onAskAiCfoClick:x}=qa({mobileExploreReferrer:"Month-End Close Overview"}),T=s.useCallback(((p,P,_=!1)=>{t(Me({tenantId:P,period:{month:p.month,year:p.year},refreshViewInBackground:_}))}),[]),C=s.useCallback((p=>{const P=S.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&W.trackMonthCloseAuditPage(p.month,p.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,P??null),t(Kn(g.tenantId,p))}),[g.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),f=A[g.tenantId],m=s.useCallback((()=>{const p=S.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&W.trackMonthCloseAuditPage(f.month,f.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,p??null),T(f,g.tenantId,!0)}),[T,f,g.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),z=ee(S.state?.pathnameStackToGoBack,S.pathname),w=s.useCallback((()=>{if(l.monthEndCloseChecks!=null&&f!=null){const p=l.monthEndCloseChecks.monthEndCloseCheckList.find((P=>P.progress<100));if(p!=null)return void n(`./${p.id}/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:z,message:"comingFromOverview"}});n(`./month_end_insights/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:z,message:"comingFromOverview"}})}}),[l.monthEndCloseChecks,f]),{areTenantIdsInSync:I}=$a();return Ga({isDataReady:l.fetchState==="Completed"}),s.useEffect((()=>{f!=null&&l.fetchState!=="In-Progress"&&l.fetchState!=="Completed"&&I&&T(f,g.tenantId)}),[T,f,l.fetchState,g.tenantId,I]),s.useEffect((()=>{f!=null&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&I&&t(Qn(f))}),[f,l.monthClosePerformanceTrendFetchStatus.fetchState,I]),s.useEffect((()=>{const p=setInterval((()=>{l.fetchState!=="In-Progress"&&l.fetchState==="Completed"&&m()}),3e5);return()=>clearInterval(p)}),[l.fetchState]),s.useEffect((()=>{if(l.fetchState==="Completed"&&l.monthEndCloseChecks?.auditSummary!=null){const p=S.state?.referrer;W.trackMonthCloseAuditPage(l.selectedPeriod.month,l.selectedPeriod.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,p??null)}}),[l.fetchState,l.selectedPeriod,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),k.jsx(Ii,{children:k.jsx(xc,{monthEndCloseChecksView:l,isRealtimeInsightsFeatureEnabled:i,onMonthEndCheckClick:p=>{n(`./${p}/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:z,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:C,handleReviewButtonClick:w,onBackClick:()=>{n("../../dashboard")},onReload:m,isAiCfoAccessEnabled:v,onAskAiCfoClick:x,aiAuditScorePercentageEnabled:r})})},Ii=Te.div`
1
+ import{j as k}from"./liveblocks-DtuUpF5h.js";import{u as ge,h as nt,g as be,j as F,i as Be,t as Jn,l as Yn,n as Hn,o as We,N as Wn}from"./core-Dk5JD2l2.js";import{fI as ke,a1g as Xn,q3 as Me,Up as Kn,Ab as Qn,a1h as Zn,a1i as es,a1j as ts,a1k as Ct,a1l as Ke,gk as Tt,a1m as ia,eY as as,g3 as ns,a1n as la,a1o as Qe,qW as ss,uX as os,gV as cs,gT as is,a1p as ls,r7 as rs,rg as ds,qe as us,qs as Ra,gS as ue,gU as ms,a1q as ps,qO as Da,rh as hs,qp as Ss,qk as gs,v1 as Cs,gR as Oe,a1r as tt,Cl as Fa,ML as _a,a1s as Ma,FG as Oa,a1t as fs,f0 as Is,f2 as ks,sY as Pt,X9 as ra,Xb as bs,m5 as Ts,Xc as Ps,mc as ys,dm as vs,DE as yt,a1u as Es,a1v as As,a1w as xs,a1x as ws,fp as vt,sM as da,X2 as Rs,a1y as Ds,a1z as Fs,me as _s,a1A as Ms,Rr as Os,md as Us,m2 as Bs,qH as Ua,rm as at,tz as Ba,tV as Vs,Uf as Va,rl as ua,ro as ja,rq as js,bF as zs,nB as Ls,ny as $s,rp as Ze,rn as Se,a1B as Gs,rH as ma,a1C as Ns,a1D as qs,sQ as Js,sR as Ys,W_ as Hs,W4 as Ws,a0K as Xs,a1E as Ks,X4 as pa,X3 as Xe,a1F as ha,mt as Qs,a1G as Zs,a1H as eo,a1I as to,a1J as ao,qC as no,a1K as so,a1L as oo,a1M as co,rx as io,mg as lo,m7 as ro,a1N as uo,mf as Sa,Xm as mo,a1O as po,a1P as ho,uy as So,u9 as go,u8 as ft,a1Q as Co,a1R as fo,a1S as Io,a1T as ko,nM as bo,br as To,nH as ga,nt as Po,a1U as yo,h2 as vo,nE as Eo,s_ as Ao,t0 as xo,sJ as wo,W7 as Ro,W8 as Do,F8 as Fo,F7 as _o,Fo as Mo,a1V as Ca,sP as Oo,sk as Uo,a1W as Bo,s0 as Vo,s5 as jo,sg as zo,s3 as Lo,a1X as $o,rY as Go,sf as No,sV as qo,a1Y as Jo,t6 as Yo,sD as Ho,tc as Wo,sI as Xo,rI as Ko,a1Z as Qo,q_ as Zo,qy as ec,qF as fa,rs as tc,a1_ as ac,a1$ as nc,a20 as sc,a21 as oc,a22 as cc,a23 as ic,a24 as lc,tg as rc,a25 as dc,a26 as uc,a27 as Ia,uJ as mc,u0 as pc,tR as ka,tP as hc,a28 as Sc,tE as gc,tj as Cc,tS as fc,a29 as Ic,a2a as kc,tp as bc,a2b as Tc,tk as Pc,to as yc,tm as vc,tY as Ec}from"./zeni-epic-state-BtP47QJT.js";import za from"./NotFoundScreen-CyVGP3Vp.js";import{a as s,R as La}from"./sentry-BWDuLt7o.js";import{n as Te,S as Ac}from"./mui-DAOUhz91.js";import{c as Ve,g as H,m as W,p as ee,aq as $a,as as Ga,dO as xc,dP as wc,z as st,dQ as Rc,dR as Dc,dS as Fc,ae as Ue,dT as _c,dU as ba,ba as Ta,dV as Mc,a7 as Na,dW as Oc,l as et,a as Uc,dX as Bc,dY as Vc,d as jc,Q as zc,dZ as Lc,d_ as $c,d$ as Gc,b4 as Nc,bs as qc,ab as Jc,b5 as Yc,b6 as Hc,G as Wc,w as Xc,e0 as Kc,av as Pa,e1 as Qc}from"./index-uoDX7H4L.js";import{u as qa}from"./useAskAiCfoHostNavButtonProps-CsMZr2YE.js";import{g as ya,b as Zc,c as ei,h as ti,a as ai,i as ni,r as si,C as oi}from"./TransactionDetailScreen-BG6zUFU-.js";import{u as ci,a as ii}from"./useActualMatchingMatchDetail-CM9S8AAl.js";import{d as li}from"./decodeURIComponentSafe-NBY1IhYb.js";import{m as Ja,a as Ya}from"./expenseAutomationHelper-BwdyIQYD.js";import{u as Ha,a as Wa,w as ri}from"./withTransactionSidePanel-MoXr5b9J.js";import{b as di,S as ui,a as mi,J as pi}from"./ScheduleDetailsPrepaidExpensesScreen-kyZJN89C.js";import{s as va,i as Xa,h as hi,v as Si,c as gi}from"./routePaths-DzLOO7Om.js";import{a as It}from"./accountMappingHelper-D-qmKFUw.js";import{D as Ci}from"./DrawerScreen-0K7kuSzC.js";import"./recharts-BMD3jyO6.js";import"./analytics-C6U4wpfB.js";import"./plaid-DBHSfOGH.js";import"./dnd-CSZKLHxv.js";import"./stripe-cKAAJElX.js";import"./lottie-BlG_vWSt.js";import"./lexical-BtWXzxnq.js";import"./pdf-iocWnEuY.js";import"./utils-CWVNtCN5.js";import"./useInitialThreadRequest-DGvbt9bY.js";import"./stripSplatSuffix-KkY0P5Vm.js";import"./pathToGoBack-CcxULKW_.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new t.Error().stack;n&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[n]="da075276-8cb0-46a6-974b-4d58027e2b48",t._sentryDebugIdIdentifier="sentry-dbid-da075276-8cb0-46a6-974b-4d58027e2b48")}catch{}})();const fi=()=>{const t=ge(),n=nt(),S=be(),g=F((p=>ke(p))),{useFeatureGate:d}=Ve(),{isFeatureEnabled:i}=d(H.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=d(H.aiAuditScorePercentage),A=F((p=>p.expenseAutomationViewState.selectedPeriodByTenantId)),l=F((p=>Xn(p,g.tenantId))),{isAiCfoAccessEnabled:v,onAskAiCfoClick:x}=qa({mobileExploreReferrer:"Month-End Close Overview"}),T=s.useCallback(((p,P,_=!1)=>{t(Me({tenantId:P,period:{month:p.month,year:p.year},refreshViewInBackground:_}))}),[]),C=s.useCallback((p=>{const P=S.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&W.trackMonthCloseAuditPage(p.month,p.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,P??null),t(Kn(g.tenantId,p))}),[g.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),f=A[g.tenantId],m=s.useCallback((()=>{const p=S.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&W.trackMonthCloseAuditPage(f.month,f.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,p??null),T(f,g.tenantId,!0)}),[T,f,g.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),z=ee(S.state?.pathnameStackToGoBack,S.pathname),w=s.useCallback((()=>{if(l.monthEndCloseChecks!=null&&f!=null){const p=l.monthEndCloseChecks.monthEndCloseCheckList.find((P=>P.progress<100));if(p!=null)return void n(`./${p.id}/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:z,message:"comingFromOverview"}});n(`./month_end_insights/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:z,message:"comingFromOverview"}})}}),[l.monthEndCloseChecks,f]),{areTenantIdsInSync:I}=$a();return Ga({isDataReady:l.fetchState==="Completed"}),s.useEffect((()=>{f!=null&&l.fetchState!=="In-Progress"&&l.fetchState!=="Completed"&&I&&T(f,g.tenantId)}),[T,f,l.fetchState,g.tenantId,I]),s.useEffect((()=>{f!=null&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&I&&t(Qn(f))}),[f,l.monthClosePerformanceTrendFetchStatus.fetchState,I]),s.useEffect((()=>{const p=setInterval((()=>{l.fetchState!=="In-Progress"&&l.fetchState==="Completed"&&m()}),3e5);return()=>clearInterval(p)}),[l.fetchState]),s.useEffect((()=>{if(l.fetchState==="Completed"&&l.monthEndCloseChecks?.auditSummary!=null){const p=S.state?.referrer;W.trackMonthCloseAuditPage(l.selectedPeriod.month,l.selectedPeriod.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,p??null)}}),[l.fetchState,l.selectedPeriod,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),k.jsx(Ii,{children:k.jsx(xc,{monthEndCloseChecksView:l,isRealtimeInsightsFeatureEnabled:i,onMonthEndCheckClick:p=>{n(`./${p}/${f.month}-${f.year}`,{state:{pathnameStackToGoBack:z,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:C,handleReviewButtonClick:w,onBackClick:()=>{n("../../dashboard")},onReload:m,isAiCfoAccessEnabled:v,onAskAiCfoClick:x,aiAuditScorePercentageEnabled:r})})},Ii=Te.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-DtuUpF5h.js";import{a as r}from"./sentry-BWDuLt7o.js";import{aw as i,ax as l,v as p,a4 as m}from"./index-CaO8T0Mn.js";import"./mui-DAOUhz91.js";import c from"./NotFoundScreen-BbJtMThz.js";import{h as u,g as b}from"./core-Dk5JD2l2.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="12db23f3-a3af-47a0-ad83-5eba9eef5259",a._sentryDebugIdIdentifier="sentry-dbid-12db23f3-a3af-47a0-ad83-5eba9eef5259")}catch{}})();const _=()=>{const a=u(),e=b(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),d=r.useCallback((()=>{(()=>{const n=m(e.state?.pathnameStackToGoBack),f=n.poppedPathname??k();a(f,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=i(e.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:d}):s.jsx(c,{})},k=(a=2)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e};export{_ as F};
1
+ import{j as s}from"./liveblocks-DtuUpF5h.js";import{a as r}from"./sentry-BWDuLt7o.js";import{aw as i,ax as l,v as p,a4 as m}from"./index-uoDX7H4L.js";import"./mui-DAOUhz91.js";import c from"./NotFoundScreen-CyVGP3Vp.js";import{h as u,g as b}from"./core-Dk5JD2l2.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new a.Error().stack;e&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[e]="12db23f3-a3af-47a0-ad83-5eba9eef5259",a._sentryDebugIdIdentifier="sentry-dbid-12db23f3-a3af-47a0-ad83-5eba9eef5259")}catch{}})();const _=()=>{const a=u(),e=b(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),d=r.useCallback((()=>{(()=>{const n=m(e.state?.pathnameStackToGoBack),f=n.poppedPathname??k();a(f,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=i(e.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:d}):s.jsx(c,{})},k=(a=2)=>{let e="../";for(let t=0;t<a;t++)e=`${e}../`;return e};export{_ as F};
@@ -1 +1 @@
1
- import{a as r}from"./sentry-BWDuLt7o.js";import{u as l,h as f,g as m}from"./core-Dk5JD2l2.js";import{h$ as p,UM as g,UN as _}from"./zeni-epic-state-BtP47QJT.js";import{u as b,L as h,z as y}from"./index-CaO8T0Mn.js";import"./liveblocks-DtuUpF5h.js";import"./recharts-BMD3jyO6.js";import"./mui-DAOUhz91.js";import"./analytics-C6U4wpfB.js";import"./plaid-DBHSfOGH.js";import"./dnd-CSZKLHxv.js";import"./stripe-cKAAJElX.js";import"./lottie-BlG_vWSt.js";import"./lexical-BtWXzxnq.js";import"./pdf-iocWnEuY.js";import"./utils-CWVNtCN5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1748819b-70df-45fe-8ed4-429074b6c65e",e._sentryDebugIdIdentifier="sentry-dbid-1748819b-70df-45fe-8ed4-429074b6c65e")}catch{}})();function $(){const e=l(),n=f(),o=m(),{setLoading:i,clearAllLoading:c}=b(),s=r.useRef(!1);return r.useLayoutEffect((()=>{i(h.CONNECTION_AUTH)}),[i]),r.useEffect((()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&d!=null){const t=JSON.parse(d);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}c();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{$ as default};
1
+ import{a as r}from"./sentry-BWDuLt7o.js";import{u as l,h as f,g as m}from"./core-Dk5JD2l2.js";import{h$ as p,UM as g,UN as _}from"./zeni-epic-state-BtP47QJT.js";import{u as b,L as h,z as y}from"./index-uoDX7H4L.js";import"./liveblocks-DtuUpF5h.js";import"./recharts-BMD3jyO6.js";import"./mui-DAOUhz91.js";import"./analytics-C6U4wpfB.js";import"./plaid-DBHSfOGH.js";import"./dnd-CSZKLHxv.js";import"./stripe-cKAAJElX.js";import"./lottie-BlG_vWSt.js";import"./lexical-BtWXzxnq.js";import"./pdf-iocWnEuY.js";import"./utils-CWVNtCN5.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new e.Error().stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="1748819b-70df-45fe-8ed4-429074b6c65e",e._sentryDebugIdIdentifier="sentry-dbid-1748819b-70df-45fe-8ed4-429074b6c65e")}catch{}})();function $(){const e=l(),n=f(),o=m(),{setLoading:i,clearAllLoading:c}=b(),s=r.useRef(!1);return r.useLayoutEffect((()=>{i(h.CONNECTION_AUTH)}),[i]),r.useEffect((()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&d!=null){const t=JSON.parse(d);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}c();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{$ as default};