@zeniai/web-app-ui 5.4.19-dev → 5.4.19-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 (74) hide show
  1. package/dist/assets/{AccountMappingScreen-BpJDQCQx.js → AccountMappingScreen-B_TkOsXF.js} +1 -1
  2. package/dist/assets/{ActualMatchingMatchDetailScreen-fK8c-oot.js → ActualMatchingMatchDetailScreen-BSGSGFd_.js} +1 -1
  3. package/dist/assets/{AddressRoutes-_bCuEkwx.js → AddressRoutes-MQiA9f7I.js} +1 -1
  4. package/dist/assets/{AddressScreen-Dh4KOVQ1.js → AddressScreen-2uUNyZUQ.js} +1 -1
  5. package/dist/assets/{AiCfoScreen-03lSUwaj.js → AiCfoScreen-Da96F691.js} +1 -1
  6. package/dist/assets/{AppDrawer-DtBNEFvY.js → AppDrawer-CFin-_di.js} +1 -1
  7. package/dist/assets/{BillPayApprovalRoutes-D1JvUYMQ.js → BillPayApprovalRoutes-BwX_LelL.js} +1 -1
  8. package/dist/assets/{BillPayRoutes-DosvZj42.js → BillPayRoutes-CUUTvN-o.js} +1 -1
  9. package/dist/assets/{BusinessVerificationPageScreen-CeIfGxLQ.js → BusinessVerificationPageScreen-tC5awgdj.js} +1 -1
  10. package/dist/assets/{CardsAiCfoScreen-C8_v-BYR.js → CardsAiCfoScreen-B4NEjdpt.js} +1 -1
  11. package/dist/assets/{ChargeCardRoutes-BZz4pRiz.js → ChargeCardRoutes-CS3a4dBG.js} +1 -1
  12. package/dist/assets/{CompanyPassportScreen-BieP2EZa.js → CompanyPassportScreen-C7Wa5c9G.js} +1 -1
  13. package/dist/assets/{ConnectionAuthScreen-C1MNasE2.js → ConnectionAuthScreen-DxsMDeer.js} +1 -1
  14. package/dist/assets/{CustomerOnboardingAuthScreen-DYKZjGKN.js → CustomerOnboardingAuthScreen-BVkOA0eq.js} +1 -1
  15. package/dist/assets/{CustomerOnboardingRoutes-DyVqaxvR.js → CustomerOnboardingRoutes-x1rT530A.js} +1 -1
  16. package/dist/assets/{CustomersRoutes-CtL2o5-n.js → CustomersRoutes-CtIzyj1-.js} +1 -1
  17. package/dist/assets/{DashboardRoutes-7yhAEy7g.js → DashboardRoutes-Bn-AOUEy.js} +1 -1
  18. package/dist/assets/{DefaultTenantHome-DHs0Czed.js → DefaultTenantHome-DDXT9MvS.js} +1 -1
  19. package/dist/assets/{DomesticWireDetailScreen-BIF8BW0a.js → DomesticWireDetailScreen-CW_sfUk-.js} +1 -1
  20. package/dist/assets/{DrawerScreen-XY9r5sqx.js → DrawerScreen-Brp-giik.js} +1 -1
  21. package/dist/assets/{EntityDetailRoutes-CLCMxp18.js → EntityDetailRoutes-D3O2kCNF.js} +1 -1
  22. package/dist/assets/{ExpenseAutomationRoutes-CA-VSGA_.js → ExpenseAutomationRoutes-BK56n2EU.js} +1 -1
  23. package/dist/assets/{FallBackRoute-BmlOw1z3.js → FallBackRoute-CNk6Evuv.js} +2 -2
  24. package/dist/assets/{FeaturePreviewScreen-C2u4cMYG.js → FeaturePreviewScreen-BmH3ZYPC.js} +1 -1
  25. package/dist/assets/{HubSpotOAuthCallbackScreen-CdL4B6fj.js → HubSpotOAuthCallbackScreen-8k4tGQBr.js} +1 -1
  26. package/dist/assets/{InvoicingRoutes-Ds8bd8V8.js → InvoicingRoutes-rTOKf9u7.js} +1 -1
  27. package/dist/assets/{MagicLinkRoutes-BCx3YLpp.js → MagicLinkRoutes-IgFkpGO8.js} +1 -1
  28. package/dist/assets/{MagicLinkSignInScreen-BJFFKbta.js → MagicLinkSignInScreen-B-E_KmE7.js} +1 -1
  29. package/dist/assets/{MobileAppDrawer-BLYS912H.js → MobileAppDrawer-BGhooxvb.js} +1 -1
  30. package/dist/assets/{NotFoundScreen-BDU6ccX1.js → NotFoundScreen-BLdHlF0f.js} +1 -1
  31. package/dist/assets/{NotificationRoutes-B3DfKahf.js → NotificationRoutes-BwRHNbvw.js} +1 -1
  32. package/dist/assets/{OAuthConsentScreen-DMS9CTOV.js → OAuthConsentScreen-vXwcWLup.js} +1 -1
  33. package/dist/assets/{PandLWithForecastRoutes-D4c4br1B.js → PandLWithForecastRoutes-CYeUQPq6.js} +1 -1
  34. package/dist/assets/{PaymentLinkScreen-BEA834bi.js → PaymentLinkScreen-Nc72L2pE.js} +1 -1
  35. package/dist/assets/{PeopleRoutes-By8BlbIz.js → PeopleRoutes-HyNYediS.js} +1 -1
  36. package/dist/assets/{PerformanceRoutes-CQ6Hxkqk.js → PerformanceRoutes-n4YI8VHX.js} +1 -1
  37. package/dist/assets/{QBOConnectionScreen-DyZaNX6V.js → QBOConnectionScreen-BVHythpX.js} +1 -1
  38. package/dist/assets/{ReimbursementApprovalRoutes-CPfPh7_I.js → ReimbursementApprovalRoutes-BJQptKVv.js} +1 -1
  39. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DrgxKZH7.js → ReimbursementApprovalRuleDetailScreen-ChsEhKuN.js} +1 -1
  40. package/dist/assets/{ReimbursementRoutes-Bq5czlC0.js → ReimbursementRoutes-aim1_SRB.js} +1 -1
  41. package/dist/assets/{ReportsRoutes-DxNr6i5Y.js → ReportsRoutes-MQfVKr-3.js} +1 -1
  42. package/dist/assets/{RewardsRoutes-CO6TuNiV.js → RewardsRoutes-CndlMuVb.js} +1 -1
  43. package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-BxMaq7Gq.js → ScheduleDetailsPrepaidExpensesScreen-Dk3kI_um.js} +1 -1
  44. package/dist/assets/{ScreenRoutes-LEc4L-Ek.js → ScreenRoutes-DI5tHgnr.js} +2 -2
  45. package/dist/assets/{SettingsRoutes-Cc8RIjZt.js → SettingsRoutes-DLMgjhfW.js} +1 -1
  46. package/dist/assets/{SetupPagesScreen-BgAn4bD3.js → SetupPagesScreen-F5zTUkYx.js} +1 -1
  47. package/dist/assets/{SignInScreen-Di05f1i8.js → SignInScreen-DjuqZad6.js} +1 -1
  48. package/dist/assets/{SignOutScreen-CiQsSj2I.js → SignOutScreen-XXabWAFl.js} +1 -1
  49. package/dist/assets/{TaskListScreen-CBFYc4EW.js → TaskListScreen-BwZHMLXv.js} +1 -1
  50. package/dist/assets/{TaskRoutes-w6Z4j7Vq.js → TaskRoutes-B6TIhT3s.js} +1 -1
  51. package/dist/assets/{TransactionDetailRoutes-ggKexh3-.js → TransactionDetailRoutes-DIaZtep2.js} +1 -1
  52. package/dist/assets/{TransactionDetailScreen-BBWVy8TW.js → TransactionDetailScreen-CRhyoXmE.js} +1 -1
  53. package/dist/assets/{TransactionListRoutes-B7kikvJW.js → TransactionListRoutes-BoaLC6AE.js} +1 -1
  54. package/dist/assets/{TreasuryRoutes-DnYXMIpO.js → TreasuryRoutes-BQGJgpKX.js} +1 -1
  55. package/dist/assets/{VendorsRoutes-BtVR0Vii.js → VendorsRoutes-CyVKSXys.js} +1 -1
  56. package/dist/assets/{WiseConfirmationScreen-8Hcaa3Fc.js → WiseConfirmationScreen-CcXko6Yq.js} +1 -1
  57. package/dist/assets/{ZeniAccountRoutes-VM-T0h6_.js → ZeniAccountRoutes-FyNmEtGc.js} +1 -1
  58. package/dist/assets/{ZeniAccountStatementScreen-CM9U5Zls.js → ZeniAccountStatementScreen-CiCl4r2I.js} +1 -1
  59. package/dist/assets/{analyticsHelper-CKG9W7dC.js → analyticsHelper-C_Bq8-qH.js} +1 -1
  60. package/dist/assets/{getLocaleForTenant-CI9ZVduS.js → getLocaleForTenant-D-NWQxBL.js} +1 -1
  61. package/dist/assets/{index-Dme9CBSK.js → index-B1jJZ6kq.js} +6 -6
  62. package/dist/assets/{routePaths-TIOEKAr9.js → routePaths-Dpxra6eQ.js} +1 -1
  63. package/dist/assets/{useActualMatchingMatchDetail-ClGwke9Y.js → useActualMatchingMatchDetail-Y4mqKvG2.js} +1 -1
  64. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-CF91keX4.js → useAiCfoDashboardSuggestedQuestionsChips-DLTMg2t8.js} +1 -1
  65. package/dist/assets/{useAskAiCfoHostNavButtonProps-DO-bnRp-.js → useAskAiCfoHostNavButtonProps-B2P8ke_p.js} +1 -1
  66. package/dist/assets/{useChargeCardPusherEvents-DTd9bnXH.js → useChargeCardPusherEvents-D7fAhhEd.js} +1 -1
  67. package/dist/assets/{useEmailConnectResultRefresh-BJWnx3gQ.js → useEmailConnectResultRefresh-BlELL7U2.js} +1 -1
  68. package/dist/assets/{useInitialThreadRequest-DCdvOJx6.js → useInitialThreadRequest-C-eszkgP.js} +1 -1
  69. package/dist/assets/{useIsCustomersTabEnabled-DZ7jecHx.js → useIsCustomersTabEnabled-Bs9VGXUR.js} +1 -1
  70. package/dist/assets/{useTaskManagerAccess-Z6bIfXqO.js → useTaskManagerAccess-ByBT4RdT.js} +1 -1
  71. package/dist/assets/{useTaskManagerPusherEvents-Doj7t2BI.js → useTaskManagerPusherEvents-hrwd8lXy.js} +1 -1
  72. package/dist/assets/{withTransactionSidePanel-DybBA6JZ.js → withTransactionSidePanel-Bcsqg7yc.js} +1 -1
  73. package/dist/index.html +1 -1
  74. package/package.json +1 -1
@@ -1 +1 @@
1
- import{j as l}from"./liveblocks-XOqCw7q2.js";import{a as g}from"./sentry-CNIAdl-1.js";import{h as w,u as x,g as T,i as k,j as O,l as E}from"./core-BVdj_noT.js";import{z as b,aZ as F,a9 as P,c as V,R as j,B as h,a8 as L,bf as A,af as U,bg as M,s as B}from"./index-Dme9CBSK.js";import{fJ as N,gM as R,Ci as _,gH as Y,c8 as z,YP as G,bm as H,vm as Z,va as J,mL as Q,ok as S,YQ as $,bF as q,cw as C,ov as K,oF as W}from"./zeni-epic-state-BSu6fdxh.js";import"./mui-BZ0jnpww.js";import{d as X}from"./routePaths-TIOEKAr9.js";import{M as ee}from"./MobileAppDrawer-BLYS912H.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new a.Error().stack;n&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[n]="f895bbdf-0215-4ec2-a97f-1c43c4864479",a._sentryDebugIdIdentifier="sentry-dbid-f895bbdf-0215-4ec2-a97f-1c43c4864479")}catch{}})();const te=E((function(a){const n=Y(a),i=b.getSignedInUser(),p=N(a),c=p.tenantId,u={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},y=z(p?.userRole??[])&&n.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=G(a.companyConfigState),t=a.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:n.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:n,allIndustries:e.companyIndustries??[],allNationalityCountries:t,isDisabled:y,authParams:u,filesEndPoint:`${U.fileMicroServiceBaseUrl}`,isZeniUser:H(i)}}),(function(a,n){const{companyId:i,currentTenant:p,navigate:c,location:u}=n,{tenantEmailDomain:y}=p;return{onScheduleClick:e=>{let t=e.href;t.includes("http")||(t="https://".concat(t)),window.open(t,"_blank")},onSaveAll:()=>{a(W())},onAddressClick:e=>{const t=X(y,e),o=B(u.state?.pathnameStackToGoBack,u.pathname);c(t,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{a(K({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:t,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:m}=t,{meetingLink:f}=d,{incDate:s}=o,{taxesFiledYears:v}=r,D={companyInfo:{...t,website:m!=""&&m!=null?C(m):void 0,meetingLink:f!=""&&f!=null?C(f):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?q(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:v.selectedOptions.map((I=>parseInt(I))),fileId:r.fileIds[0]}};a(S({companyDetails:D}))},onPrimaryContactDetailsUpdated:e=>{a(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{a(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=>{a($(e))},onCompanyOfficerUpdated:e=>{a(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=>{a(Q({files:e}))},onDeleteFile:e=>{a(J(e))},onEditFileName:(e,t)=>{a(Z(e,t.split(".")[0]))}}}))(A);function le(){const a=w(),n=x(),i=T(),{tenantEmailDomain:p}=k(),[c,u]=g.useState(!1),[y,e]=g.useState(!1),t=O((s=>s.companyViewState.passportView.fetchState)),o=O((s=>s.companyConfigState.fetchState)),r=O((s=>N(s))),d=r.companyId??b.getSignedInUserTenant(p)?.companyId;if(b.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect((()=>{c||t!=="Not-Started"||d==null||(u(!0),n(R(d)))}),[c,t,d,n]),g.useEffect((()=>{o==="Not-Started"&&n(_())}),[o,n]);const m=s=>{e(s)},f=t==="Not-Started"||t==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&t==="Error"?l.jsx(F,{onGoHome:()=>a("../",{replace:!0}),onReload:()=>window.location.reload()}):l.jsxs(l.Fragment,{children:[l.jsx(P,{analytics:V,onLoad:s=>s.trackPageLoaded(j.Event.companyPassport,h(i)?"Settings":"Company Passport")}),h(i)?l.jsx(ee,{isAppContentDrawerOpen:y,handleDrawerToggle:m}):null,f?l.jsx(L,{fetchState:"In-Progress",style:{height:"calc(100vh - 110px)"}}):l.jsx(te,{companyId:d,navigate:a,location:i,isLoading:f,currentTenant:r,isSettings:h(i),onClickMenuIcon:()=>{m(!0)}})]})}export{le as C};
1
+ import{j as l}from"./liveblocks-XOqCw7q2.js";import{a as g}from"./sentry-CNIAdl-1.js";import{h as w,u as x,g as T,i as k,j as O,l as E}from"./core-BVdj_noT.js";import{z as b,aZ as F,a9 as P,c as V,R as j,B as h,a8 as L,bf as A,af as U,bg as M,s as B}from"./index-B1jJZ6kq.js";import{fJ as N,gM as R,Ci as _,gH as Y,c8 as z,YP as G,bm as H,vm as Z,va as J,mL as Q,ok as S,YQ as $,bF as q,cw as C,ov as K,oF as W}from"./zeni-epic-state-BSu6fdxh.js";import"./mui-BZ0jnpww.js";import{d as X}from"./routePaths-Dpxra6eQ.js";import{M as ee}from"./MobileAppDrawer-BGhooxvb.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},n=new a.Error().stack;n&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[n]="f895bbdf-0215-4ec2-a97f-1c43c4864479",a._sentryDebugIdIdentifier="sentry-dbid-f895bbdf-0215-4ec2-a97f-1c43c4864479")}catch{}})();const te=E((function(a){const n=Y(a),i=b.getSignedInUser(),p=N(a),c=p.tenantId,u={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},y=z(p?.userRole??[])&&n.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=G(a.companyConfigState),t=a.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:n.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:n,allIndustries:e.companyIndustries??[],allNationalityCountries:t,isDisabled:y,authParams:u,filesEndPoint:`${U.fileMicroServiceBaseUrl}`,isZeniUser:H(i)}}),(function(a,n){const{companyId:i,currentTenant:p,navigate:c,location:u}=n,{tenantEmailDomain:y}=p;return{onScheduleClick:e=>{let t=e.href;t.includes("http")||(t="https://".concat(t)),window.open(t,"_blank")},onSaveAll:()=>{a(W())},onAddressClick:e=>{const t=X(y,e),o=B(u.state?.pathnameStackToGoBack,u.pathname);c(t,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{a(K({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:t,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:m}=t,{meetingLink:f}=d,{incDate:s}=o,{taxesFiledYears:v}=r,D={companyInfo:{...t,website:m!=""&&m!=null?C(m):void 0,meetingLink:f!=""&&f!=null?C(f):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?q(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:v.selectedOptions.map((I=>parseInt(I))),fileId:r.fileIds[0]}};a(S({companyDetails:D}))},onPrimaryContactDetailsUpdated:e=>{a(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{a(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=>{a($(e))},onCompanyOfficerUpdated:e=>{a(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=>{a(Q({files:e}))},onDeleteFile:e=>{a(J(e))},onEditFileName:(e,t)=>{a(Z(e,t.split(".")[0]))}}}))(A);function le(){const a=w(),n=x(),i=T(),{tenantEmailDomain:p}=k(),[c,u]=g.useState(!1),[y,e]=g.useState(!1),t=O((s=>s.companyViewState.passportView.fetchState)),o=O((s=>s.companyConfigState.fetchState)),r=O((s=>N(s))),d=r.companyId??b.getSignedInUserTenant(p)?.companyId;if(b.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect((()=>{c||t!=="Not-Started"||d==null||(u(!0),n(R(d)))}),[c,t,d,n]),g.useEffect((()=>{o==="Not-Started"&&n(_())}),[o,n]);const m=s=>{e(s)},f=t==="Not-Started"||t==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&t==="Error"?l.jsx(F,{onGoHome:()=>a("../",{replace:!0}),onReload:()=>window.location.reload()}):l.jsxs(l.Fragment,{children:[l.jsx(P,{analytics:V,onLoad:s=>s.trackPageLoaded(j.Event.companyPassport,h(i)?"Settings":"Company Passport")}),h(i)?l.jsx(ee,{isAppContentDrawerOpen:y,handleDrawerToggle:m}):null,f?l.jsx(L,{fetchState:"In-Progress",style:{height:"calc(100vh - 110px)"}}):l.jsx(te,{companyId:d,navigate:a,location:i,isLoading:f,currentTenant:r,isSettings:h(i),onClickMenuIcon:()=>{m(!0)}})]})}export{le as C};
@@ -1,4 +1,4 @@
1
- import{j as I}from"./liveblocks-XOqCw7q2.js";import{a as o}from"./sentry-CNIAdl-1.js";import{u as R,h as k,g as H,j as C,N as w}from"./core-BVdj_noT.js";import{UY as q,fJ as z,gp as G,he as Q,gQ as A,go as V,gm as J,Vh as Y,gl as O}from"./zeni-epic-state-BSu6fdxh.js";import{u as B,z as E,L as D,G as K,N as M}from"./index-Dme9CBSK.js";import{n as W}from"./mui-BZ0jnpww.js";import{P as h,a as T}from"./AccountMappingScreen-BpJDQCQx.js";import{t as X}from"./getLocaleForTenant-CI9ZVduS.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-DyZaNX6V.js";import"./recharts-VHHravhf.js";import"./analytics-u8j262Ga.js";import"./plaid-CCMRXiQR.js";import"./dnd-Ex3ltzzE.js";import"./stripe-cKAAJElX.js";import"./lottie-C5YZIzuj.js";import"./lexical-CVwGZsIc.js";import"./pdf-q1-3GLH6.js";import"./utils-BtSqr9lx.js";import"./MobileAppDrawer-BLYS912H.js";import"./InboxNotificationsProvider-DvvXiK-n.js";import"./useTaskManagerAccess-Z6bIfXqO.js";import"./useIsCustomersTabEnabled-DZ7jecHx.js";import"./accountMappingHelper-8C9JQylV.js";import"./empty-C5tm1JkN.js";import"./pdf-lib-BIDHf6ZS.js";import"./index-Ch4hjMoy.js";import"./url-uObfQ0XR.js";import"./index-BtE2ozWs.js";import"./decodeURIComponentSafe-JMSvQveN.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]="1e22f507-3397-4b54-87a0-8a783d07dbd0",t._sentryDebugIdIdentifier="sentry-dbid-1e22f507-3397-4b54-87a0-8a783d07dbd0")}catch{}})();const te=W.div`
1
+ import{j as I}from"./liveblocks-XOqCw7q2.js";import{a as o}from"./sentry-CNIAdl-1.js";import{u as R,h as k,g as H,j as C,N as w}from"./core-BVdj_noT.js";import{UY as q,fJ as z,gp as G,he as Q,gQ as A,go as V,gm as J,Vh as Y,gl as O}from"./zeni-epic-state-BSu6fdxh.js";import{u as B,z as E,L as D,G as K,N as M}from"./index-B1jJZ6kq.js";import{n as W}from"./mui-BZ0jnpww.js";import{P as h,a as T}from"./AccountMappingScreen-B_TkOsXF.js";import{t as X}from"./getLocaleForTenant-D-NWQxBL.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-BVHythpX.js";import"./recharts-VHHravhf.js";import"./analytics-u8j262Ga.js";import"./plaid-CCMRXiQR.js";import"./dnd-Ex3ltzzE.js";import"./stripe-cKAAJElX.js";import"./lottie-C5YZIzuj.js";import"./lexical-CVwGZsIc.js";import"./pdf-q1-3GLH6.js";import"./utils-BtSqr9lx.js";import"./MobileAppDrawer-BGhooxvb.js";import"./InboxNotificationsProvider-DvvXiK-n.js";import"./useTaskManagerAccess-ByBT4RdT.js";import"./useIsCustomersTabEnabled-Bs9VGXUR.js";import"./accountMappingHelper-8C9JQylV.js";import"./empty-C5tm1JkN.js";import"./pdf-lib-BIDHf6ZS.js";import"./index-Ch4hjMoy.js";import"./url-uObfQ0XR.js";import"./index-BtE2ozWs.js";import"./decodeURIComponentSafe-JMSvQveN.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]="1e22f507-3397-4b54-87a0-8a783d07dbd0",t._sentryDebugIdIdentifier="sentry-dbid-1e22f507-3397-4b54-87a0-8a783d07dbd0")}catch{}})();const te=W.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-XOqCw7q2.js";import{z as f}from"./index-Dme9CBSK.js";import{g as n}from"./QBOConnectionScreen-DyZaNX6V.js";import"./sentry-CNIAdl-1.js";import{g as d,N as s}from"./core-BVdj_noT.js";import"./zeni-epic-state-BSu6fdxh.js";import"./recharts-VHHravhf.js";import"./mui-BZ0jnpww.js";import"./analytics-u8j262Ga.js";import"./plaid-CCMRXiQR.js";import"./dnd-Ex3ltzzE.js";import"./stripe-cKAAJElX.js";import"./lottie-C5YZIzuj.js";import"./lexical-CVwGZsIc.js";import"./pdf-q1-3GLH6.js";import"./utils-BtSqr9lx.js";import"./empty-C5tm1JkN.js";import"./pdf-lib-BIDHf6ZS.js";import"./index-Ch4hjMoy.js";import"./url-uObfQ0XR.js";import"./index-BtE2ozWs.js";import"./decodeURIComponentSafe-JMSvQveN.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]="1683af82-1807-41b7-af56-48f3fbdf9020",t._sentryDebugIdIdentifier="sentry-dbid-1683af82-1807-41b7-af56-48f3fbdf9020")}catch{}})();const U=()=>{const t=d(),{code:o,realmId:r,state:e}=n(t.search),a=f.getSignedInUser()?.userId??"";if(p(o,r,e,a)===!0){const m=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(s,{to:m})}return i.jsx(s,{to:"../../"})},p=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,p as hasValidParams};
1
+ import{j as i}from"./liveblocks-XOqCw7q2.js";import{z as f}from"./index-B1jJZ6kq.js";import{g as n}from"./QBOConnectionScreen-BVHythpX.js";import"./sentry-CNIAdl-1.js";import{g as d,N as s}from"./core-BVdj_noT.js";import"./zeni-epic-state-BSu6fdxh.js";import"./recharts-VHHravhf.js";import"./mui-BZ0jnpww.js";import"./analytics-u8j262Ga.js";import"./plaid-CCMRXiQR.js";import"./dnd-Ex3ltzzE.js";import"./stripe-cKAAJElX.js";import"./lottie-C5YZIzuj.js";import"./lexical-CVwGZsIc.js";import"./pdf-q1-3GLH6.js";import"./utils-BtSqr9lx.js";import"./empty-C5tm1JkN.js";import"./pdf-lib-BIDHf6ZS.js";import"./index-Ch4hjMoy.js";import"./url-uObfQ0XR.js";import"./index-BtE2ozWs.js";import"./decodeURIComponentSafe-JMSvQveN.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]="1683af82-1807-41b7-af56-48f3fbdf9020",t._sentryDebugIdIdentifier="sentry-dbid-1683af82-1807-41b7-af56-48f3fbdf9020")}catch{}})();const U=()=>{const t=d(),{code:o,realmId:r,state:e}=n(t.search),a=f.getSignedInUser()?.userId??"";if(p(o,r,e,a)===!0){const m=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(s,{to:m})}return i.jsx(s,{to:"../../"})},p=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,p as hasValidParams};
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-XOqCw7q2.js";import{t as wn,A as $e}from"./AddressScreen-Dh4KOVQ1.js";import An from"./NotFoundScreen-BDU6ccX1.js";import{a as d,x as Me}from"./sentry-CNIAdl-1.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-BVdj_noT.js";import{fJ as X,er as Ee,eq as we,bp as jn,Vd as Fn,bS as Bn,qe as Vn,C2 as Un,C5 as Rn,a28 as Ln,a29 as Nn,lG as ve,lJ as dn,a1t as Gn,e0 as $n,c8 as fe,Cw as Ae,Ch as Mn,a2a as me,Cx as un,Tn as Qn,mT as ln,d4 as pn,Yo as Kn,Yp as zn,v3 as qn,Vx as he,i5 as Hn,Vw as be,i2 as Jn,H1 as Wn,v7 as Yn,hW as Zn,hZ as Qe,a2b as mn,a1m as Xn,MT as et,a1n as nt,MX as tt,C8 as at,Yl as ot,Ym as st,lE as rt,lH as it,CJ as ct,Cj as gn,Cv as dt,bF as Ke,cw as ut,CI as ze,vm as lt,va as pt,mL as mt,gK as gt,gJ as ft,gI as yt,a2c as Ct,Cb as ht,CK as bt,CN as St,CQ as It,CW as kt,d5 as vt}from"./zeni-epic-state-BSu6fdxh.js";import{z,p as Pe,_ as Y,h as Ot,s as q,a9 as re,c as g,dm as _t,az as fn,a2 as xt,j as yn,V as Cn,o as Z,W as ge,R as Oe,dn as Tt,N as qe,D as He,af as Et,bg as Je,dp as wt,dq as At}from"./index-Dme9CBSK.js";import{n as De}from"./mui-BZ0jnpww.js";import{g as Pt,h as Dt,q as ie}from"./QBOConnectionScreen-DyZaNX6V.js";import{u as jt,a as Ft}from"./useEmailConnectResultRefresh-BJWnx3gQ.js";import{u as Bt}from"./useChargeCardPusherEvents-DTd9bnXH.js";import"./recharts-VHHravhf.js";import"./analytics-u8j262Ga.js";import"./plaid-CCMRXiQR.js";import"./dnd-Ex3ltzzE.js";import"./stripe-cKAAJElX.js";import"./lottie-C5YZIzuj.js";import"./lexical-CVwGZsIc.js";import"./pdf-q1-3GLH6.js";import"./utils-BtSqr9lx.js";import"./empty-C5tm1JkN.js";import"./pdf-lib-BIDHf6ZS.js";import"./index-Ch4hjMoy.js";import"./url-uObfQ0XR.js";import"./index-BtE2ozWs.js";import"./decodeURIComponentSafe-JMSvQveN.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]="469b5052-4984-4371-991e-5d442bb0dd4c",e._sentryDebugIdIdentifier="sentry-dbid-469b5052-4984-4371-991e-5d442bb0dd4c")}catch{}})();const We=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(),[o,p]=d.useState(!1),[u,c]=d.useState(!1),{tenantEmailDomain:O}=Te(),n=z.getSignedInUser(),{useFeatureGate:t}=Pe(),{isFeatureEnabled:h}=t(Y.isApAgingFeatureEnabled),{isFeatureEnabled:a}=t(Y.isArAgingFeatureEnabled),{isFeatureEnabled:A}=t(Y.isReferralFeatureEnabled),{isFeatureEnabled:w}=t(Y.isDebitCardFeatureEnabled),k=Ot(),v=E((S=>X(S))),P=E((S=>S.onboardingCustomerViewState.fetchState)),_=v.excludedResources,B=v.companyId??z.getSignedInUserTenant(O)?.companyId;if(n==null)throw Error("Can't access onboarding flow without signing in...");const m=Ee(w,v),b=we(v),D=[],U=_?.resources?.find((S=>S.resource==="/reports/top_expenses"))==null,C=_?.resources?.find((S=>S.resource==="/reports/task_card"))==null,r=v?.userRole!=null&&jn(v?.userRole),x=_?.resources?.find((S=>S.resource==="/bills"))==null&&!r,T=_?.resources?.find((S=>S.resource==="/reimbursements"))==null;U===!1&&D.push("top_expenses"),C===!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=[];h===!1&&V.push("accounts_payable_aging"),a===!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 J=Fn(S,V);return Bn(J.reportsInOrder.map(($=>({fetchState:$.fetchState,error:$.error})))).fetchState}));d.useEffect((()=>{P!=="Completed"||o||m||b||(p(!0),i(Vn(n.userId,B,v.tenantId,!0,!1,D)))}),[o,P,m,b,n,v.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]),G=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(G,6e3);return()=>clearTimeout(S)}),[G]),d.useEffect((()=>{m||b||!u||f!=="Completed"&&f!=="Error"||G()}),[u,f,m,b,G]),P!=="Completed")return s.jsx(Q,{to:"../"});const L=v.company?.companyOnboardingInfo?.onboardingInfo,ee={timeSinceQuoteSign:L?.onboardingTimeSinceQuoteSigned??"",timeSinceQuoteSignInMinutes:L?.onboardingToQuoteSignMinutes??0,isKybDone:We(L?.businessVerified?.status),isKycDone:We(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:G})]})},Se=["reading_books","finance_graph","reconciliation","cfo_foundation"],Ie=["llm_fine_tuning","rag_knowledge_graph","personalized_context"],Ye=(e,l)=>{const i=new Map(e.map((o=>[o.key,o])));return l.map((o=>{return p=i.get(o)?.status,p==="starting"||p==="building"?p:"idle";var p}))},Ze=(e,l)=>{if(e.length===0)return!1;const i=new Map(e.map((o=>[o.key,o])));return l.every((o=>i.get(o)?.status==="ready"))},Xe=De.div`
1
+ import{j as s}from"./liveblocks-XOqCw7q2.js";import{t as wn,A as $e}from"./AddressScreen-2uUNyZUQ.js";import An from"./NotFoundScreen-BLdHlF0f.js";import{a as d,x as Me}from"./sentry-CNIAdl-1.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-BVdj_noT.js";import{fJ as X,er as Ee,eq as we,bp as jn,Vd as Fn,bS as Bn,qe as Vn,C2 as Un,C5 as Rn,a28 as Ln,a29 as Nn,lG as ve,lJ as dn,a1t as Gn,e0 as $n,c8 as fe,Cw as Ae,Ch as Mn,a2a as me,Cx as un,Tn as Qn,mT as ln,d4 as pn,Yo as Kn,Yp as zn,v3 as qn,Vx as he,i5 as Hn,Vw as be,i2 as Jn,H1 as Wn,v7 as Yn,hW as Zn,hZ as Qe,a2b as mn,a1m as Xn,MT as et,a1n as nt,MX as tt,C8 as at,Yl as ot,Ym as st,lE as rt,lH as it,CJ as ct,Cj as gn,Cv as dt,bF as Ke,cw as ut,CI as ze,vm as lt,va as pt,mL as mt,gK as gt,gJ as ft,gI as yt,a2c as Ct,Cb as ht,CK as bt,CN as St,CQ as It,CW as kt,d5 as vt}from"./zeni-epic-state-BSu6fdxh.js";import{z,p as Pe,_ as Y,h as Ot,s as q,a9 as re,c as g,dm as _t,az as fn,a2 as xt,j as yn,V as Cn,o as Z,W as ge,R as Oe,dn as Tt,N as qe,D as He,af as Et,bg as Je,dp as wt,dq as At}from"./index-B1jJZ6kq.js";import{n as De}from"./mui-BZ0jnpww.js";import{g as Pt,h as Dt,q as ie}from"./QBOConnectionScreen-BVHythpX.js";import{u as jt,a as Ft}from"./useEmailConnectResultRefresh-BlELL7U2.js";import{u as Bt}from"./useChargeCardPusherEvents-D7fAhhEd.js";import"./recharts-VHHravhf.js";import"./analytics-u8j262Ga.js";import"./plaid-CCMRXiQR.js";import"./dnd-Ex3ltzzE.js";import"./stripe-cKAAJElX.js";import"./lottie-C5YZIzuj.js";import"./lexical-CVwGZsIc.js";import"./pdf-q1-3GLH6.js";import"./utils-BtSqr9lx.js";import"./empty-C5tm1JkN.js";import"./pdf-lib-BIDHf6ZS.js";import"./index-Ch4hjMoy.js";import"./url-uObfQ0XR.js";import"./index-BtE2ozWs.js";import"./decodeURIComponentSafe-JMSvQveN.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]="469b5052-4984-4371-991e-5d442bb0dd4c",e._sentryDebugIdIdentifier="sentry-dbid-469b5052-4984-4371-991e-5d442bb0dd4c")}catch{}})();const We=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(),[o,p]=d.useState(!1),[u,c]=d.useState(!1),{tenantEmailDomain:O}=Te(),n=z.getSignedInUser(),{useFeatureGate:t}=Pe(),{isFeatureEnabled:h}=t(Y.isApAgingFeatureEnabled),{isFeatureEnabled:a}=t(Y.isArAgingFeatureEnabled),{isFeatureEnabled:A}=t(Y.isReferralFeatureEnabled),{isFeatureEnabled:w}=t(Y.isDebitCardFeatureEnabled),k=Ot(),v=E((S=>X(S))),P=E((S=>S.onboardingCustomerViewState.fetchState)),_=v.excludedResources,B=v.companyId??z.getSignedInUserTenant(O)?.companyId;if(n==null)throw Error("Can't access onboarding flow without signing in...");const m=Ee(w,v),b=we(v),D=[],U=_?.resources?.find((S=>S.resource==="/reports/top_expenses"))==null,C=_?.resources?.find((S=>S.resource==="/reports/task_card"))==null,r=v?.userRole!=null&&jn(v?.userRole),x=_?.resources?.find((S=>S.resource==="/bills"))==null&&!r,T=_?.resources?.find((S=>S.resource==="/reimbursements"))==null;U===!1&&D.push("top_expenses"),C===!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=[];h===!1&&V.push("accounts_payable_aging"),a===!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 J=Fn(S,V);return Bn(J.reportsInOrder.map(($=>({fetchState:$.fetchState,error:$.error})))).fetchState}));d.useEffect((()=>{P!=="Completed"||o||m||b||(p(!0),i(Vn(n.userId,B,v.tenantId,!0,!1,D)))}),[o,P,m,b,n,v.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]),G=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(G,6e3);return()=>clearTimeout(S)}),[G]),d.useEffect((()=>{m||b||!u||f!=="Completed"&&f!=="Error"||G()}),[u,f,m,b,G]),P!=="Completed")return s.jsx(Q,{to:"../"});const L=v.company?.companyOnboardingInfo?.onboardingInfo,ee={timeSinceQuoteSign:L?.onboardingTimeSinceQuoteSigned??"",timeSinceQuoteSignInMinutes:L?.onboardingToQuoteSignMinutes??0,isKybDone:We(L?.businessVerified?.status),isKycDone:We(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:G})]})},Se=["reading_books","finance_graph","reconciliation","cfo_foundation"],Ie=["llm_fine_tuning","rag_knowledge_graph","personalized_context"],Ye=(e,l)=>{const i=new Map(e.map((o=>[o.key,o])));return l.map((o=>{return p=i.get(o)?.status,p==="starting"||p==="building"?p:"idle";var p}))},Ze=(e,l)=>{if(e.length===0)return!1;const i=new Map(e.map((o=>[o.key,o])));return l.every((o=>i.get(o)?.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 o}from"./liveblocks-XOqCw7q2.js";import{a as i}from"./sentry-CNIAdl-1.js";import{u as Y,h as _,g as F,i as A,j as c,n as G,o as C,N as V}from"./core-BVdj_noT.js";import{a2d as q,a2e as Q,a2f as K,fJ as N,a1x as W,a2g as z,a0e as J,a2h as L,a2i as U,a2j as $,q4 as Z,a0d as H,lr as P,bw as x,a2k as j,SR as M,Tf as w,VP as X,Tg as ee,a2l as te,a2m as ae,qb as re,Y4 as ne,Tc as se,a2n as oe,mb as ie,q7 as I,a2o as O,a2p as le}from"./zeni-epic-state-BSu6fdxh.js";import{V as me,dr as ce,s as B,a5 as de,al as ue,ds as fe}from"./index-Dme9CBSK.js";import{n as pe}from"./mui-BZ0jnpww.js";import{t as he,k as Se}from"./routePaths-TIOEKAr9.js";import ge from"./NotFoundScreen-BDU6ccX1.js";import{u as ye}from"./useAskAiCfoHostNavButtonProps-DO-bnRp-.js";import{M as be}from"./MobileAppDrawer-BLYS912H.js";import{d as ke}from"./recharts-VHHravhf.js";import"./analytics-u8j262Ga.js";import"./plaid-CCMRXiQR.js";import"./dnd-Ex3ltzzE.js";import"./stripe-cKAAJElX.js";import"./lottie-C5YZIzuj.js";import"./lexical-CVwGZsIc.js";import"./pdf-q1-3GLH6.js";import"./utils-BtSqr9lx.js";import"./InboxNotificationsProvider-DvvXiK-n.js";import"./useTaskManagerAccess-Z6bIfXqO.js";import"./useIsCustomersTabEnabled-DZ7jecHx.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},u=new t.Error().stack;u&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[u]="54b5d62e-38e1-44ab-8c98-239ec26435e2",t._sentryDebugIdIdentifier="sentry-dbid-54b5d62e-38e1-44ab-8c98-239ec26435e2")}catch{}})();const R=t=>se(t.id,t.name,{startDate:x().subtract(1,"year").startOf("year").format("YYYY-MM-DD"),endDate:x().format("YYYY-MM-DD")});function Te(){const t=Y(),u=_(),f=F(),b=me(),{tenantEmailDomain:n,customerId:s=""}=A(),p=c((e=>q(e,s))),k=c(Q),l=c(K),d=c((e=>N(e).company?.companyInfo.firstMonthOfFY)),S=d??1,r=i.useMemo((()=>s!==""?{id:s,name:"",type:"customer",zeniId:s,qboId:""}:void 0),[s]),m=c((e=>r!=null?W(e,r,"EntityDetail"):void 0)),g=c((e=>r!=null&&l!=null?z(e,r,l.numberOfQuartersFetched):void 0)),y=c((e=>r!=null?J(e.trendWithTransactionsState,r,"EntityDetail"):void 0)),a=c(L),T=i.useMemo((()=>{const e=m?.trendReport,h=e?.trendReport,D=p.customer?.revenue;return m!=null&&e!=null&&h instanceof U&&D!=null?{...m,trendReport:{...e,trendReport:h.withFilter({filter:a,firstMonthOfFY:S,last30DaysRevenue:D.last_30_days_revenue,last90DaysRevenue:D.last_90_days_revenue})}}:m}),[m,a,S,p.customer]),[v,E]=i.useState(!1);return i.useEffect((()=>{s!==""&&(t($(s)),p.fetchState!=="Not-Started"&&p.fetchState!=="Error"||t(Z(s)),E(!0))}),[s]),i.useEffect((()=>{if(r!=null&&d!=null&&v){if(E(!1),t(R(r)),l==null){const e=H(d,2),h=P({startDate:e.startDate,endDate:x()});t(j({timePeriod:h,numberOfQuartersFetched:3})),t(M(r,h,!1,!0))}t(w(r,"EntityDetail",{timeframe:y?.selectedPeriod?.timeframe??"quarter",timePeriod:y?.selectedPeriod?.timePeriod??X(d)},d))}}),[r,v,d,y?.selectedPeriod,l,t]),s===""||n==null?o.jsx(ge,{}):o.jsx(ce,{allTransactionsTabData:l!=null?{timePeriod:ne(l.timePeriod),numberOfQuartersFetched:l.numberOfQuartersFetched}:void 0,allTransactionsView:g,detailView:p,firstMonthOfFY:S,readOnlyMode:b?.loggedInUserRoleMap?.bookkeeping_user===!0,selectedTab:k,trendFilter:a,trendWithTransactions:T,onBackClick:()=>{const e=de(f.state?.pathnameStackToGoBack);u(e.poppedPathname??"..",{state:{pathnameStackToGoBack:e.newStack}})},onLoadPreviousTransactionsClick:(e,h)=>{r!=null&&(t(j({timePeriod:P(e),numberOfQuartersFetched:h})),t(M(r,P(e),!0,!0)))},onSave:e=>t(re(s,e)),onTabChange:e=>t(ae(e)),onTrendRetry:()=>{r!=null&&t(R(r))},onTrendFilterChange:e=>t(te(e)),onTransactionItemClick:e=>{u(he(e,n),{state:{pathnameStackToGoBack:B(f.state?.pathnameStackToGoBack,f.pathname)}})},onTrendSelectedPeriodChange:e=>{r!=null&&e!=null&&(t(w(r,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod},S)),t(ee(r,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate}})))}},s)}const De=pe.div`
1
+ import{j as o}from"./liveblocks-XOqCw7q2.js";import{a as i}from"./sentry-CNIAdl-1.js";import{u as Y,h as _,g as F,i as A,j as c,n as G,o as C,N as V}from"./core-BVdj_noT.js";import{a2d as q,a2e as Q,a2f as K,fJ as N,a1x as W,a2g as z,a0e as J,a2h as L,a2i as U,a2j as $,q4 as Z,a0d as H,lr as P,bw as x,a2k as j,SR as M,Tf as w,VP as X,Tg as ee,a2l as te,a2m as ae,qb as re,Y4 as ne,Tc as se,a2n as oe,mb as ie,q7 as I,a2o as O,a2p as le}from"./zeni-epic-state-BSu6fdxh.js";import{V as me,dr as ce,s as B,a5 as de,al as ue,ds as fe}from"./index-B1jJZ6kq.js";import{n as pe}from"./mui-BZ0jnpww.js";import{t as he,k as Se}from"./routePaths-Dpxra6eQ.js";import ge from"./NotFoundScreen-BLdHlF0f.js";import{u as ye}from"./useAskAiCfoHostNavButtonProps-B2P8ke_p.js";import{M as be}from"./MobileAppDrawer-BGhooxvb.js";import{d as ke}from"./recharts-VHHravhf.js";import"./analytics-u8j262Ga.js";import"./plaid-CCMRXiQR.js";import"./dnd-Ex3ltzzE.js";import"./stripe-cKAAJElX.js";import"./lottie-C5YZIzuj.js";import"./lexical-CVwGZsIc.js";import"./pdf-q1-3GLH6.js";import"./utils-BtSqr9lx.js";import"./InboxNotificationsProvider-DvvXiK-n.js";import"./useTaskManagerAccess-ByBT4RdT.js";import"./useIsCustomersTabEnabled-Bs9VGXUR.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},u=new t.Error().stack;u&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[u]="54b5d62e-38e1-44ab-8c98-239ec26435e2",t._sentryDebugIdIdentifier="sentry-dbid-54b5d62e-38e1-44ab-8c98-239ec26435e2")}catch{}})();const R=t=>se(t.id,t.name,{startDate:x().subtract(1,"year").startOf("year").format("YYYY-MM-DD"),endDate:x().format("YYYY-MM-DD")});function Te(){const t=Y(),u=_(),f=F(),b=me(),{tenantEmailDomain:n,customerId:s=""}=A(),p=c((e=>q(e,s))),k=c(Q),l=c(K),d=c((e=>N(e).company?.companyInfo.firstMonthOfFY)),S=d??1,r=i.useMemo((()=>s!==""?{id:s,name:"",type:"customer",zeniId:s,qboId:""}:void 0),[s]),m=c((e=>r!=null?W(e,r,"EntityDetail"):void 0)),g=c((e=>r!=null&&l!=null?z(e,r,l.numberOfQuartersFetched):void 0)),y=c((e=>r!=null?J(e.trendWithTransactionsState,r,"EntityDetail"):void 0)),a=c(L),T=i.useMemo((()=>{const e=m?.trendReport,h=e?.trendReport,D=p.customer?.revenue;return m!=null&&e!=null&&h instanceof U&&D!=null?{...m,trendReport:{...e,trendReport:h.withFilter({filter:a,firstMonthOfFY:S,last30DaysRevenue:D.last_30_days_revenue,last90DaysRevenue:D.last_90_days_revenue})}}:m}),[m,a,S,p.customer]),[v,E]=i.useState(!1);return i.useEffect((()=>{s!==""&&(t($(s)),p.fetchState!=="Not-Started"&&p.fetchState!=="Error"||t(Z(s)),E(!0))}),[s]),i.useEffect((()=>{if(r!=null&&d!=null&&v){if(E(!1),t(R(r)),l==null){const e=H(d,2),h=P({startDate:e.startDate,endDate:x()});t(j({timePeriod:h,numberOfQuartersFetched:3})),t(M(r,h,!1,!0))}t(w(r,"EntityDetail",{timeframe:y?.selectedPeriod?.timeframe??"quarter",timePeriod:y?.selectedPeriod?.timePeriod??X(d)},d))}}),[r,v,d,y?.selectedPeriod,l,t]),s===""||n==null?o.jsx(ge,{}):o.jsx(ce,{allTransactionsTabData:l!=null?{timePeriod:ne(l.timePeriod),numberOfQuartersFetched:l.numberOfQuartersFetched}:void 0,allTransactionsView:g,detailView:p,firstMonthOfFY:S,readOnlyMode:b?.loggedInUserRoleMap?.bookkeeping_user===!0,selectedTab:k,trendFilter:a,trendWithTransactions:T,onBackClick:()=>{const e=de(f.state?.pathnameStackToGoBack);u(e.poppedPathname??"..",{state:{pathnameStackToGoBack:e.newStack}})},onLoadPreviousTransactionsClick:(e,h)=>{r!=null&&(t(j({timePeriod:P(e),numberOfQuartersFetched:h})),t(M(r,P(e),!0,!0)))},onSave:e=>t(re(s,e)),onTabChange:e=>t(ae(e)),onTrendRetry:()=>{r!=null&&t(R(r))},onTrendFilterChange:e=>t(te(e)),onTransactionItemClick:e=>{u(he(e,n),{state:{pathnameStackToGoBack:B(f.state?.pathnameStackToGoBack,f.pathname)}})},onTrendSelectedPeriodChange:e=>{r!=null&&e!=null&&(t(w(r,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod},S)),t(ee(r,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate}})))}},s)}const De=pe.div`
2
2
  display: flex;
3
3
  min-height: 100%;
4
4
  width: 100%;
@@ -1,4 +1,4 @@
1
- import{j as m}from"./liveblocks-XOqCw7q2.js";import{i as H,j as S,g as ee,u as $,h as te,l as se,k as ga,n as kt,o as R,N as xn}from"./core-BVdj_noT.js";import{fJ as Y,VE as at,bF as z,bw as Fe,VF as wn,km as Fn,VG as Jt,VH as Pn,kp as yt,VI as Je,VJ as Rn,ku as Bn,VK as ea,VL as jn,ky as At,VM as et,VN as Mn,VO as Vn,VP as Ln,lA as Un,VQ as Yn,bm as nt,VR as Ca,VS as ge,bc as ba,lO as Sa,lx as _a,VT as Ce,VU as oe,fI as ka,ge as Gn,gu as Et,VV as Nn,VW as Wn,VX as ya,m0 as vt,VY as Ye,d2 as Ge,ER as qn,VZ as Te,EK as Ne,EL as We,F8 as Pe,F2 as be,EP as qe,V_ as Kn,e0 as Ke,V$ as zn,W0 as $n,W1 as Aa,m5 as Dt,ES as Qn,W2 as Oe,W3 as Hn,ej as ot,AR as Ea,W4 as Zn,W5 as Ia,W6 as Xn,W7 as Jn,W8 as eo,W9 as Tt,Wa as Ot,uB as Re,mb as Be,qi as xt,EV as to,Wb as de,Fi as wt,AY as ao,B3 as no,Wc as oo,Wd as so,EM as ta,We as ro,AU as xe,AP as va,Wf as aa,Wg as io,Wh as Ft,Wi as Pt,C$ as Da,Wj as co,Wk as Ta,Wl as lo,Wm as uo,Wn as mo,Wo as Rt,qg as Bt,EU as po,Wp as ue,De as fo,Dl as ho,Wq as go,Wr as Co,EO as na,Ws as bo,CZ as Oa,Wt as oa,Wu as So,bp as xa,Fn as wa,Wv as _o,Ww as Fa,Wx as ko,Wy as yo,Wz as Ao,WA as jt,qh as Mt,ET as Eo,WB as me,Ff as Io,Fh as vo,WC as Do,WD as To,EN as sa,WE as Oo,Fl as Pa,WF as ra,WG as xo,WH as wo,WI as Ra,qk as Ba,Cm as Fo,ee as Po,qe as Ro,Vd as Bo,qu as jo,WJ as Mo,WK as Vo,WL as Lo,b5 as Vt,qo as Uo,iq as Yo,gM as Go,qn as No,lq as Wo,ql as qo,qj as Ko,er as zo,eq as $o}from"./zeni-epic-state-BSu6fdxh.js";import{z as G,aj as re,s as B,c as T,G as Z,ak as Qo,al as ze,a9 as $e,am as ja,R as q,an as Ho,ao as Ma,ap as Zo,aq as Xo,g as Va,a2 as La,a as Ua,ar as Jo,as as es,at as ts,p as Se,au as Ya,E as pe,av as Ga,aw as Na,ax as Wa,ay as as,az as Qe,_ as V,V as He,aA as ns,K as os,aB as ss,h as rs,o as is,a5 as cs,aC as ls,aD as ds,aE as us,aF as ms,aG as we}from"./index-Dme9CBSK.js";import{u as ps,n as Lt}from"./mui-BZ0jnpww.js";import{a as C}from"./sentry-CNIAdl-1.js";import{w as qa}from"./withTransactionSidePanel-DybBA6JZ.js";import{t as Ka,a as je,e as _e,b as Ut,c as Yt,v as fs}from"./routePaths-TIOEKAr9.js";import{u as ie}from"./useAskAiCfoHostNavButtonProps-DO-bnRp-.js";import{u as ke}from"./useIsCustomersTabEnabled-DZ7jecHx.js";import Ue from"./NotFoundScreen-BDU6ccX1.js";import{t as st}from"./reportTimeframe-BTqRG1HM.js";import{u as Gt}from"./useInitialThreadRequest-DCdvOJx6.js";import{t as za}from"./analyticsHelper-CKG9W7dC.js";import{C as hs}from"./CompanyPassportScreen-BieP2EZa.js";import{u as gs}from"./useAiCfoDashboardSuggestedQuestionsChips-CF91keX4.js";import{F as Cs}from"./FeaturePreviewScreen-C2u4cMYG.js";import"./recharts-VHHravhf.js";import"./analytics-u8j262Ga.js";import"./plaid-CCMRXiQR.js";import"./dnd-Ex3ltzzE.js";import"./stripe-cKAAJElX.js";import"./lottie-C5YZIzuj.js";import"./lexical-CVwGZsIc.js";import"./pdf-q1-3GLH6.js";import"./utils-BtSqr9lx.js";import"./TransactionDetailScreen-BBWVy8TW.js";import"./decodeURIComponentSafe-JMSvQveN.js";import"./expenseAutomationHelper-BtpowfoM.js";import"./stripSplatSuffix-CLHAbjpi.js";import"./MobileAppDrawer-BLYS912H.js";import"./InboxNotificationsProvider-DvvXiK-n.js";import"./useTaskManagerAccess-Z6bIfXqO.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]="93c7dae7-4024-4703-8539-085fbaec4529",e._sentryDebugIdIdentifier="sentry-dbid-93c7dae7-4024-4703-8539-085fbaec4529")}catch{}})();const bs=qa((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:s}=H(),r=G.getSignedInUser(),i=S((D=>D.tenantState.currentTenantId)),d=S((D=>Y(D))),{tenantEmailDomain:c}=H(),h=ee(),u=d?.companyName??"",f={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:i??""},l=C.useMemo((()=>({authParams:f,companyName:u,downloadEndPoint:`${re}/agingDetailedReport`,timezone:at()})),[]),p=C.useMemo((()=>s!=null?z(s):Fe()),[s]),b=$(),g=te(),k=S((D=>wn(D,p,o))),E=C.useCallback((()=>{o!=null&&k.fetchState!=="In-Progress"&&k.fetchState!=="Completed"&&b(Fn(o,p))}),[p]),_=C.useCallback((()=>{g("../../",{relative:"path"})}),[]),A=C.useCallback(((D,j)=>{b(Jt({sortKey:D,sortOrder:j}))}),[]),v=C.useCallback((D=>{b(Jt({downloadState:D}))}),[]),U=C.useCallback((D=>{if(e)e(D.transactionId,D.transactionType);else if(c!=null){const j=Ka({id:D.transactionId,type:D.transactionType},c);g(j);const w=B(h.state?.pathnameStackToGoBack,h.pathname);g(j,{state:{pathnameStackToGoBack:w}})}}),[c,e]),x=C.useCallback((()=>{k.vendor!=null&&T.trackApAgingDetail("AP Aging",p.format(Z.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),k.vendor.id,k.vendor.name)}),[k.vendor,p]);return C.useEffect((()=>{E()}),[]),C.useEffect((()=>{k.fetchState==="Completed"&&x()}),[x,k.fetchState]),m.jsx(Qo,{apAgingDetail:k,downloadParams:l,reportDate:p,analytics:T,onTransactionClick:U,onReload:E,onBackClick:_,onColumnSortConfigChanged:A,updateDownloadStateHandler:v,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),Ss=()=>{const e=$(),a=te(),t=S((A=>Pn(A))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ie({mobileExploreReferrer:"AP Aging"});ze({isDataReady:t.fetchState==="Completed"});const s=G.getSignedInUser(),r=S((A=>A.tenantState.currentTenantId)),i=S((A=>Y(A))),d=i?.companyName??"",c={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:r??""},h=C.useMemo((()=>({authParams:c,companyName:d,downloadEndPoint:`${re}/agingReport`,timezone:at()})),[]),u=t.apAgingUIState.selectedDate??Fe(),f=C.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(yt(u))}),[]);C.useEffect((()=>{f()}),[]);const l=C.useCallback((()=>{a("../",{relative:"path"})}),[]),p=C.useCallback((A=>{e(Je({searchString:A}))}),[]),b=C.useCallback(((A,v)=>{e(Je({sortKey:v,sortOrder:A}))}),[]),g=C.useCallback((A=>{a(`./${A}/${u.format(Z.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[u]),k=C.useCallback((A=>{e(Je({downloadState:A}))}),[]),E=C.useCallback(((A,v)=>{}),[]),_=C.useCallback(((A,v)=>{e(Je({selectedDate:A,agingDateSelectionType:v})),e(yt(A))}),[]);return m.jsxs(m.Fragment,{children:[t.fetchState==="Completed"?m.jsx($e,{analytics:T,onLoad:A=>A.trackPageLoaded(q.Event.agingReport,"AP Aging")}):null,m.jsx(ja,{uiState:t.apAgingUIState,report:t,downloadParams:h,analytics:T,onReloadReport:f,onBackClick:l,onSearchTextChange:p,onSortOrderChange:b,onEntityNameClick:g,updateDownloadStateHandler:k,onSelectedDateChanged:_,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},_s=qa((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:s}=H(),r=G.getSignedInUser(),i=S((x=>Y(x))),{tenantEmailDomain:d}=H(),c=ee(),h=i.companyName,u={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:i.tenantId},f=C.useMemo((()=>({authParams:u,companyName:h,downloadEndPoint:`${re}/agingDetailedReport`,timezone:at()})),[]),l=C.useMemo((()=>s!=null?z(s):Fe()),[s]),p=$(),b=te(),g=S((x=>Rn(x,l,o))),k=C.useCallback((()=>{o!=null&&g.fetchState!=="In-Progress"&&g.fetchState!=="Completed"&&p(Bn(o,l))}),[l]),E=C.useCallback((()=>{b("../../",{relative:"path"})}),[]),_=C.useCallback(((x,D)=>{p(ea({sortKey:x,sortOrder:D}))}),[]),A=C.useCallback((x=>{p(ea({downloadState:x}))}),[]),v=C.useCallback((x=>{if(e)e(x.transactionId,x.transactionType);else if(d!=null){const D=Ka({id:x.transactionId,type:x.transactionType},d);b(D);const j=B(c.state?.pathnameStackToGoBack,c.pathname);b(D,{state:{pathnameStackToGoBack:j}})}}),[d,e]),U=C.useCallback((()=>{g.customer!=null&&T.trackArAgingDetail("AR Aging",l.format(Z.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),g.customer.id,g.customer.name)}),[g.customer,l]);return C.useEffect((()=>{k()}),[]),C.useEffect((()=>{g.fetchState==="Completed"&&U()}),[g.fetchState,U]),m.jsx(Ho,{arAgingDetail:g,downloadParams:f,reportDate:l,analytics:T,onTransactionClick:v,onReload:k,onBackClick:E,onColumnSortConfigChanged:_,updateDownloadStateHandler:A,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),ks=()=>{const e=$(),a=te(),t=S((_=>jn(_))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ie({mobileExploreReferrer:"AR Aging"});ze({isDataReady:t.fetchState==="Completed"});const s=G.getSignedInUser(),r=S((_=>Y(_))),i=r.companyName,d={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:r.tenantId},c=C.useMemo((()=>({authParams:d,companyName:i,downloadEndPoint:`${re}/agingReport`,timezone:at()})),[]),h=t.arAgingUIState.selectedDate??Fe(),u=C.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(At(h))}),[]);C.useEffect((()=>{u()}),[]);const f=C.useCallback((()=>{a("../",{relative:"path"})}),[]),l=C.useCallback((_=>{e(et({searchString:_}))}),[]),p=C.useCallback(((_,A)=>{e(et({sortKey:A,sortOrder:_}))}),[]),b=C.useCallback((_=>{a(`./${_}/${h.format(Z.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[h]),g=C.useCallback((_=>{e(et({downloadState:_}))}),[]),k=C.useCallback(((_,A)=>{e(et({selectedDate:_,agingDateSelectionType:A})),e(At(_))}),[]),E=C.useCallback(((_,A)=>{e(Mn({nodeId:_,isCollapsed:A}))}),[]);return m.jsxs(m.Fragment,{children:[t.fetchState==="Completed"?m.jsx($e,{analytics:T,onLoad:_=>_.trackPageLoaded(q.Event.agingReport,"AR Aging")}):null,m.jsx(ja,{uiState:t.arAgingUIState,report:t,downloadParams:c,analytics:T,onReloadReport:u,onBackClick:f,onSearchTextChange:l,onSortOrderChange:p,onEntityNameClick:b,updateDownloadStateHandler:g,onSelectedDateChanged:k,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},$a=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function Qa(e,a){const t=Ln(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const s=o.accountName===""?o.accountDescription:o.accountName,r=je(a.tenantEmailDomain,o.accountId,o.accountType,s,"quarter",t,!1),i=B(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(r,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(Un(n,o))}}}const ys=se((function(e){const a=Vn(e).accountsInOrder.map(((t,n)=>$a(t,n)));return{sectionTitle:Z.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,fetchState:e.cashBalanceState.fetchState,analytics:T}}),Qa)(Ma),As=se((function(e){const a=Yn(e).accountsInOrder.map(((o,s)=>$a(o,s))),t=G.getSignedInUser(),n=nt(t);return{sectionTitle:Z.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:T}}),Qa)(Ma);function Es(){const e=te(),a=ee(),{tenantEmailDomain:t}=H(),n=S((o=>Y(o).company?.companyInfo.firstMonthOfFY??1));return S((o=>o.cashBalanceState.fetchState))==="Error"?m.jsx(Ue,{}):m.jsx(ys,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,firstMonthOfFY:n})}function Is(){const e=te(),a=ee(),{tenantEmailDomain:t}=H(),n=S((o=>Y(o).company?.companyInfo.firstMonthOfFY??1));return S((o=>o.cardBalanceState.fetchState))==="Error"?m.jsx(Ue,{}):m.jsx(As,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,firstMonthOfFY:n})}const vs=Lt.div`
1
+ import{j as m}from"./liveblocks-XOqCw7q2.js";import{i as H,j as S,g as ee,u as $,h as te,l as se,k as ga,n as kt,o as R,N as xn}from"./core-BVdj_noT.js";import{fJ as Y,VE as at,bF as z,bw as Fe,VF as wn,km as Fn,VG as Jt,VH as Pn,kp as yt,VI as Je,VJ as Rn,ku as Bn,VK as ea,VL as jn,ky as At,VM as et,VN as Mn,VO as Vn,VP as Ln,lA as Un,VQ as Yn,bm as nt,VR as Ca,VS as ge,bc as ba,lO as Sa,lx as _a,VT as Ce,VU as oe,fI as ka,ge as Gn,gu as Et,VV as Nn,VW as Wn,VX as ya,m0 as vt,VY as Ye,d2 as Ge,ER as qn,VZ as Te,EK as Ne,EL as We,F8 as Pe,F2 as be,EP as qe,V_ as Kn,e0 as Ke,V$ as zn,W0 as $n,W1 as Aa,m5 as Dt,ES as Qn,W2 as Oe,W3 as Hn,ej as ot,AR as Ea,W4 as Zn,W5 as Ia,W6 as Xn,W7 as Jn,W8 as eo,W9 as Tt,Wa as Ot,uB as Re,mb as Be,qi as xt,EV as to,Wb as de,Fi as wt,AY as ao,B3 as no,Wc as oo,Wd as so,EM as ta,We as ro,AU as xe,AP as va,Wf as aa,Wg as io,Wh as Ft,Wi as Pt,C$ as Da,Wj as co,Wk as Ta,Wl as lo,Wm as uo,Wn as mo,Wo as Rt,qg as Bt,EU as po,Wp as ue,De as fo,Dl as ho,Wq as go,Wr as Co,EO as na,Ws as bo,CZ as Oa,Wt as oa,Wu as So,bp as xa,Fn as wa,Wv as _o,Ww as Fa,Wx as ko,Wy as yo,Wz as Ao,WA as jt,qh as Mt,ET as Eo,WB as me,Ff as Io,Fh as vo,WC as Do,WD as To,EN as sa,WE as Oo,Fl as Pa,WF as ra,WG as xo,WH as wo,WI as Ra,qk as Ba,Cm as Fo,ee as Po,qe as Ro,Vd as Bo,qu as jo,WJ as Mo,WK as Vo,WL as Lo,b5 as Vt,qo as Uo,iq as Yo,gM as Go,qn as No,lq as Wo,ql as qo,qj as Ko,er as zo,eq as $o}from"./zeni-epic-state-BSu6fdxh.js";import{z as G,aj as re,s as B,c as T,G as Z,ak as Qo,al as ze,a9 as $e,am as ja,R as q,an as Ho,ao as Ma,ap as Zo,aq as Xo,g as Va,a2 as La,a as Ua,ar as Jo,as as es,at as ts,p as Se,au as Ya,E as pe,av as Ga,aw as Na,ax as Wa,ay as as,az as Qe,_ as V,V as He,aA as ns,K as os,aB as ss,h as rs,o as is,a5 as cs,aC as ls,aD as ds,aE as us,aF as ms,aG as we}from"./index-B1jJZ6kq.js";import{u as ps,n as Lt}from"./mui-BZ0jnpww.js";import{a as C}from"./sentry-CNIAdl-1.js";import{w as qa}from"./withTransactionSidePanel-Bcsqg7yc.js";import{t as Ka,a as je,e as _e,b as Ut,c as Yt,v as fs}from"./routePaths-Dpxra6eQ.js";import{u as ie}from"./useAskAiCfoHostNavButtonProps-B2P8ke_p.js";import{u as ke}from"./useIsCustomersTabEnabled-Bs9VGXUR.js";import Ue from"./NotFoundScreen-BLdHlF0f.js";import{t as st}from"./reportTimeframe-BTqRG1HM.js";import{u as Gt}from"./useInitialThreadRequest-C-eszkgP.js";import{t as za}from"./analyticsHelper-C_Bq8-qH.js";import{C as hs}from"./CompanyPassportScreen-C7Wa5c9G.js";import{u as gs}from"./useAiCfoDashboardSuggestedQuestionsChips-DLTMg2t8.js";import{F as Cs}from"./FeaturePreviewScreen-BmH3ZYPC.js";import"./recharts-VHHravhf.js";import"./analytics-u8j262Ga.js";import"./plaid-CCMRXiQR.js";import"./dnd-Ex3ltzzE.js";import"./stripe-cKAAJElX.js";import"./lottie-C5YZIzuj.js";import"./lexical-CVwGZsIc.js";import"./pdf-q1-3GLH6.js";import"./utils-BtSqr9lx.js";import"./TransactionDetailScreen-CRhyoXmE.js";import"./decodeURIComponentSafe-JMSvQveN.js";import"./expenseAutomationHelper-BtpowfoM.js";import"./stripSplatSuffix-CLHAbjpi.js";import"./MobileAppDrawer-BGhooxvb.js";import"./InboxNotificationsProvider-DvvXiK-n.js";import"./useTaskManagerAccess-ByBT4RdT.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]="93c7dae7-4024-4703-8539-085fbaec4529",e._sentryDebugIdIdentifier="sentry-dbid-93c7dae7-4024-4703-8539-085fbaec4529")}catch{}})();const bs=qa((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:s}=H(),r=G.getSignedInUser(),i=S((D=>D.tenantState.currentTenantId)),d=S((D=>Y(D))),{tenantEmailDomain:c}=H(),h=ee(),u=d?.companyName??"",f={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:i??""},l=C.useMemo((()=>({authParams:f,companyName:u,downloadEndPoint:`${re}/agingDetailedReport`,timezone:at()})),[]),p=C.useMemo((()=>s!=null?z(s):Fe()),[s]),b=$(),g=te(),k=S((D=>wn(D,p,o))),E=C.useCallback((()=>{o!=null&&k.fetchState!=="In-Progress"&&k.fetchState!=="Completed"&&b(Fn(o,p))}),[p]),_=C.useCallback((()=>{g("../../",{relative:"path"})}),[]),A=C.useCallback(((D,j)=>{b(Jt({sortKey:D,sortOrder:j}))}),[]),v=C.useCallback((D=>{b(Jt({downloadState:D}))}),[]),U=C.useCallback((D=>{if(e)e(D.transactionId,D.transactionType);else if(c!=null){const j=Ka({id:D.transactionId,type:D.transactionType},c);g(j);const w=B(h.state?.pathnameStackToGoBack,h.pathname);g(j,{state:{pathnameStackToGoBack:w}})}}),[c,e]),x=C.useCallback((()=>{k.vendor!=null&&T.trackApAgingDetail("AP Aging",p.format(Z.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),k.vendor.id,k.vendor.name)}),[k.vendor,p]);return C.useEffect((()=>{E()}),[]),C.useEffect((()=>{k.fetchState==="Completed"&&x()}),[x,k.fetchState]),m.jsx(Qo,{apAgingDetail:k,downloadParams:l,reportDate:p,analytics:T,onTransactionClick:U,onReload:E,onBackClick:_,onColumnSortConfigChanged:A,updateDownloadStateHandler:v,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),Ss=()=>{const e=$(),a=te(),t=S((A=>Pn(A))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ie({mobileExploreReferrer:"AP Aging"});ze({isDataReady:t.fetchState==="Completed"});const s=G.getSignedInUser(),r=S((A=>A.tenantState.currentTenantId)),i=S((A=>Y(A))),d=i?.companyName??"",c={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:r??""},h=C.useMemo((()=>({authParams:c,companyName:d,downloadEndPoint:`${re}/agingReport`,timezone:at()})),[]),u=t.apAgingUIState.selectedDate??Fe(),f=C.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(yt(u))}),[]);C.useEffect((()=>{f()}),[]);const l=C.useCallback((()=>{a("../",{relative:"path"})}),[]),p=C.useCallback((A=>{e(Je({searchString:A}))}),[]),b=C.useCallback(((A,v)=>{e(Je({sortKey:v,sortOrder:A}))}),[]),g=C.useCallback((A=>{a(`./${A}/${u.format(Z.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[u]),k=C.useCallback((A=>{e(Je({downloadState:A}))}),[]),E=C.useCallback(((A,v)=>{}),[]),_=C.useCallback(((A,v)=>{e(Je({selectedDate:A,agingDateSelectionType:v})),e(yt(A))}),[]);return m.jsxs(m.Fragment,{children:[t.fetchState==="Completed"?m.jsx($e,{analytics:T,onLoad:A=>A.trackPageLoaded(q.Event.agingReport,"AP Aging")}):null,m.jsx(ja,{uiState:t.apAgingUIState,report:t,downloadParams:h,analytics:T,onReloadReport:f,onBackClick:l,onSearchTextChange:p,onSortOrderChange:b,onEntityNameClick:g,updateDownloadStateHandler:k,onSelectedDateChanged:_,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},_s=qa((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:s}=H(),r=G.getSignedInUser(),i=S((x=>Y(x))),{tenantEmailDomain:d}=H(),c=ee(),h=i.companyName,u={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:i.tenantId},f=C.useMemo((()=>({authParams:u,companyName:h,downloadEndPoint:`${re}/agingDetailedReport`,timezone:at()})),[]),l=C.useMemo((()=>s!=null?z(s):Fe()),[s]),p=$(),b=te(),g=S((x=>Rn(x,l,o))),k=C.useCallback((()=>{o!=null&&g.fetchState!=="In-Progress"&&g.fetchState!=="Completed"&&p(Bn(o,l))}),[l]),E=C.useCallback((()=>{b("../../",{relative:"path"})}),[]),_=C.useCallback(((x,D)=>{p(ea({sortKey:x,sortOrder:D}))}),[]),A=C.useCallback((x=>{p(ea({downloadState:x}))}),[]),v=C.useCallback((x=>{if(e)e(x.transactionId,x.transactionType);else if(d!=null){const D=Ka({id:x.transactionId,type:x.transactionType},d);b(D);const j=B(c.state?.pathnameStackToGoBack,c.pathname);b(D,{state:{pathnameStackToGoBack:j}})}}),[d,e]),U=C.useCallback((()=>{g.customer!=null&&T.trackArAgingDetail("AR Aging",l.format(Z.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),g.customer.id,g.customer.name)}),[g.customer,l]);return C.useEffect((()=>{k()}),[]),C.useEffect((()=>{g.fetchState==="Completed"&&U()}),[g.fetchState,U]),m.jsx(Ho,{arAgingDetail:g,downloadParams:f,reportDate:l,analytics:T,onTransactionClick:v,onReload:k,onBackClick:E,onColumnSortConfigChanged:_,updateDownloadStateHandler:A,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),ks=()=>{const e=$(),a=te(),t=S((_=>jn(_))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ie({mobileExploreReferrer:"AR Aging"});ze({isDataReady:t.fetchState==="Completed"});const s=G.getSignedInUser(),r=S((_=>Y(_))),i=r.companyName,d={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:r.tenantId},c=C.useMemo((()=>({authParams:d,companyName:i,downloadEndPoint:`${re}/agingReport`,timezone:at()})),[]),h=t.arAgingUIState.selectedDate??Fe(),u=C.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(At(h))}),[]);C.useEffect((()=>{u()}),[]);const f=C.useCallback((()=>{a("../",{relative:"path"})}),[]),l=C.useCallback((_=>{e(et({searchString:_}))}),[]),p=C.useCallback(((_,A)=>{e(et({sortKey:A,sortOrder:_}))}),[]),b=C.useCallback((_=>{a(`./${_}/${h.format(Z.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[h]),g=C.useCallback((_=>{e(et({downloadState:_}))}),[]),k=C.useCallback(((_,A)=>{e(et({selectedDate:_,agingDateSelectionType:A})),e(At(_))}),[]),E=C.useCallback(((_,A)=>{e(Mn({nodeId:_,isCollapsed:A}))}),[]);return m.jsxs(m.Fragment,{children:[t.fetchState==="Completed"?m.jsx($e,{analytics:T,onLoad:_=>_.trackPageLoaded(q.Event.agingReport,"AR Aging")}):null,m.jsx(ja,{uiState:t.arAgingUIState,report:t,downloadParams:c,analytics:T,onReloadReport:u,onBackClick:f,onSearchTextChange:l,onSortOrderChange:p,onEntityNameClick:b,updateDownloadStateHandler:g,onSelectedDateChanged:k,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},$a=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function Qa(e,a){const t=Ln(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const s=o.accountName===""?o.accountDescription:o.accountName,r=je(a.tenantEmailDomain,o.accountId,o.accountType,s,"quarter",t,!1),i=B(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(r,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(Un(n,o))}}}const ys=se((function(e){const a=Vn(e).accountsInOrder.map(((t,n)=>$a(t,n)));return{sectionTitle:Z.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,fetchState:e.cashBalanceState.fetchState,analytics:T}}),Qa)(Ma),As=se((function(e){const a=Yn(e).accountsInOrder.map(((o,s)=>$a(o,s))),t=G.getSignedInUser(),n=nt(t);return{sectionTitle:Z.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:T}}),Qa)(Ma);function Es(){const e=te(),a=ee(),{tenantEmailDomain:t}=H(),n=S((o=>Y(o).company?.companyInfo.firstMonthOfFY??1));return S((o=>o.cashBalanceState.fetchState))==="Error"?m.jsx(Ue,{}):m.jsx(ys,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,firstMonthOfFY:n})}function Is(){const e=te(),a=ee(),{tenantEmailDomain:t}=H(),n=S((o=>Y(o).company?.companyInfo.firstMonthOfFY??1));return S((o=>o.cardBalanceState.fetchState))==="Error"?m.jsx(Ue,{}):m.jsx(As,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,firstMonthOfFY:n})}const vs=Lt.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-XOqCw7q2.js";import{a as u}from"./sentry-CNIAdl-1.js";import{u as y,j as b,l as U,g as w,N as A}from"./core-BVdj_noT.js";import{UY as N,fJ as _,gp as k,UZ as L,he as R,U_ as z}from"./zeni-epic-state-BSu6fdxh.js";import{u as j,z as f,L as T,t as I,G as O,e as $}from"./index-Dme9CBSK.js";import"./mui-BZ0jnpww.js";import{t as P}from"./getLocaleForTenant-CI9ZVduS.js";import"./recharts-VHHravhf.js";import"./analytics-u8j262Ga.js";import"./plaid-CCMRXiQR.js";import"./dnd-Ex3ltzzE.js";import"./stripe-cKAAJElX.js";import"./lottie-C5YZIzuj.js";import"./lexical-CVwGZsIc.js";import"./pdf-q1-3GLH6.js";import"./utils-BtSqr9lx.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]="942a2d6c-8679-4306-8d46-26b6f895ecf5",t._sentryDebugIdIdentifier="sentry-dbid-942a2d6c-8679-4306-8d46-26b6f895ecf5")}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:h}){const r=w(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map((l=>l.tenantEmailDomain)),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce(((l,F)=>l||i.split("/").find((D=>D===F))!=null),!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=$(c,p);return v.jsx(A,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}}));function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=j(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b((e=>N(e))),n=b((e=>e.tenantState.fetchState)),i=b((e=>e.tenantState.error)),a=b((e=>e.tenantState.activeTenantFetchState.fetchState)),c=b((e=>_(e))),d=f.getSignedInUser();return u.useLayoutEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)}),[a,n]),u.useEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(k(d.userId,e))))}),[n,a,d,t]),u.useEffect((()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!L(i))&&t(R(e.userId)))}),[n,a,i,d,t]),u.useEffect((()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())}),[m.tenantsCoreDetailsInOrder,n]),u.useEffect((()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(O.updateAppLocaleID(P(c)),o())}),[n,a,c]),v.jsx(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"],q={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of Q)if(t.toLocaleLowerCase().includes(s))return q[s]}export{oe as default};
1
+ import{j as v}from"./liveblocks-XOqCw7q2.js";import{a as u}from"./sentry-CNIAdl-1.js";import{u as y,j as b,l as U,g as w,N as A}from"./core-BVdj_noT.js";import{UY as N,fJ as _,gp as k,UZ as L,he as R,U_ as z}from"./zeni-epic-state-BSu6fdxh.js";import{u as j,z as f,L as T,t as I,G as O,e as $}from"./index-B1jJZ6kq.js";import"./mui-BZ0jnpww.js";import{t as P}from"./getLocaleForTenant-D-NWQxBL.js";import"./recharts-VHHravhf.js";import"./analytics-u8j262Ga.js";import"./plaid-CCMRXiQR.js";import"./dnd-Ex3ltzzE.js";import"./stripe-cKAAJElX.js";import"./lottie-C5YZIzuj.js";import"./lexical-CVwGZsIc.js";import"./pdf-q1-3GLH6.js";import"./utils-BtSqr9lx.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]="942a2d6c-8679-4306-8d46-26b6f895ecf5",t._sentryDebugIdIdentifier="sentry-dbid-942a2d6c-8679-4306-8d46-26b6f895ecf5")}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:h}){const r=w(),p=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let m="";const n=h.map((l=>l.tenantEmailDomain)),i=r.state?.origin,a=r.state?.queryParams;let c=`../${o.tenantEmailDomain}`,d=null,e=!1,g=null,S=null;const C=E(r.pathname);if(C!=null)c=`../${o.tenantEmailDomain}/${C}`,m="comingFromV2UrlPath",C==="ai-cfo/explore"&&(d=p.get("question")?.replace(/^["']|["']$/g,"")??null,e=p.get("should_submit")==="true");else if(i!=null)if(n.reduce(((l,F)=>l||i.split("/").find((D=>D===F))!=null),!1))c=i,i.includes("ai-cfo")&&a!=null&&(g=a.aiCfoRef??null,S=a.aiCfoEmailRefId??null);else{const l=E(i);l!=null?(c=`../${o.tenantEmailDomain}/${l}`,m="comingFromV2UrlPath",l==="ai-cfo/explore"&&a!=null&&(a.aiCfoQuestion!=null&&(d=a.aiCfoQuestion),a.aiCfoShouldSubmit==="true"&&(e=!0))):console.warn("Don't have access to previous path tenant!")}const x=$(c,p);return v.jsx(A,{to:x,replace:!0,state:{...r.state,origin:"",message:m,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}}));function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=j(),h=u.useRef(!1),r=u.useRef(!1),p=u.useRef(null),m=b((e=>N(e))),n=b((e=>e.tenantState.fetchState)),i=b((e=>e.tenantState.error)),a=b((e=>e.tenantState.activeTenantFetchState.fetchState)),c=b((e=>_(e))),d=f.getSignedInUser();return u.useLayoutEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId??null;p.current!==e&&(p.current=e,h.current=!1,r.current=!1,s(T.TENANT_FETCHING)),!h.current||a!=="Completed"&&a!=="Error"||(h.current=!1),!r.current||n!=="Completed"&&n!=="Error"||(r.current=!1)}),[a,n]),u.useEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId;h.current===!1&&d!=null&&e!=null&&I.shouldFetchActiveTenant(e)&&(h.current=!0,I.markActiveTenantFetchStarted(e),n==="Completed"||a!=="Not-Started"&&a!=="Error"||(s(T.TENANT_FETCHING),t(k(d.userId,e))))}),[n,a,d,t]),u.useEffect((()=>{const e=f.getSignedInUser(),g=f.getActiveTenantForUser()?.tenantId,S=g==null||a==="Completed"||a==="Error";r.current===!1&&e!=null&&S&&I.shouldFetchAllTenants()&&(r.current=!0,I.markAllTenantsFetchStarted(),(n==="Not-Started"||n==="Error"&&!L(i))&&t(R(e.userId)))}),[n,a,i,d,t]),u.useEffect((()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())}),[m.tenantsCoreDetailsInOrder,n]),u.useEffect((()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(O.updateAppLocaleID(P(c)),o())}),[n,a,c]),v.jsx(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"],q={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of Q)if(t.toLocaleLowerCase().includes(s))return q[s]}export{oe as default};
@@ -1,4 +1,4 @@
1
- import{j as l}from"./liveblocks-XOqCw7q2.js";import{h as w,g as C,j as h,l as E,i as P}from"./core-BVdj_noT.js";import{Xn as k,Xu as z,gK as H,gJ as J,gI as K,k$ as q,VU as L,vd as M,fJ as B,WW as D,kZ as F,Xo as v,XF as T,kX as G,li as j}from"./zeni-epic-state-BSu6fdxh.js";import{cV as Q,a2 as N,p as R,z as U,a5 as p,_ as S,a8 as X,cW as Y,N as Z,cX as ee,s as te}from"./index-Dme9CBSK.js";import{u as _,n as O}from"./mui-BZ0jnpww.js";import"./sentry-CNIAdl-1.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]="88273fa5-423f-4a1c-8117-093564c7b8bc",e._sentryDebugIdIdentifier="sentry-dbid-88273fa5-423f-4a1c-8117-093564c7b8bc")}catch{}})();const ae=E(null,(function(e,t){return{onSaveVendor:a=>{e(q(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(L("common")),a!=null&&e(M(a))},onGetOtp:a=>{e(K(a,"BillPayVendor"))},onResendOtp:a=>{e(J(a,"BillPayVendor"))},onVerifyOtp:(a,n)=>{e(H(a,n,"BillPayVendor"))},onVerifyOtpSuccess:(a,n,o)=>{e(z(a,n,o))}}}))(Q);function W({vendorId:e,billId:t,isExpressPayPage:a}){const n=w(),o=C(),s=h((r=>k(r,e)));return l.jsx(ae,{location:o,navigate:n,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:a??!1})}const ne=O.div`
1
+ import{j as l}from"./liveblocks-XOqCw7q2.js";import{h as w,g as C,j as h,l as E,i as P}from"./core-BVdj_noT.js";import{Xn as k,Xu as z,gK as H,gJ as J,gI as K,k$ as q,VU as L,vd as M,fJ as B,WW as D,kZ as F,Xo as v,XF as T,kX as G,li as j}from"./zeni-epic-state-BSu6fdxh.js";import{cV as Q,a2 as N,p as R,z as U,a5 as p,_ as S,a8 as X,cW as Y,N as Z,cX as ee,s as te}from"./index-B1jJZ6kq.js";import{u as _,n as O}from"./mui-BZ0jnpww.js";import"./sentry-CNIAdl-1.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]="88273fa5-423f-4a1c-8117-093564c7b8bc",e._sentryDebugIdIdentifier="sentry-dbid-88273fa5-423f-4a1c-8117-093564c7b8bc")}catch{}})();const ae=E(null,(function(e,t){return{onSaveVendor:a=>{e(q(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(L("common")),a!=null&&e(M(a))},onGetOtp:a=>{e(K(a,"BillPayVendor"))},onResendOtp:a=>{e(J(a,"BillPayVendor"))},onVerifyOtp:(a,n)=>{e(H(a,n,"BillPayVendor"))},onVerifyOtpSuccess:(a,n,o)=>{e(z(a,n,o))}}}))(Q);function W({vendorId:e,billId:t,isExpressPayPage:a}){const n=w(),o=C(),s=h((r=>k(r,e)));return l.jsx(ae,{location:o,navigate:n,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:a??!1})}const ne=O.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as c}from"./liveblocks-XOqCw7q2.js";import{a2 as i,ac as l}from"./index-Dme9CBSK.js";import{u as f,D as p}from"./mui-BZ0jnpww.js";import"./sentry-CNIAdl-1.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]="cd7757c9-311c-4b96-86e7-ddf3c130c0ba",e._sentryDebugIdIdentifier="sentry-dbid-cd7757c9-311c-4b96-86e7-ddf3c130c0ba")}catch{}})();const b={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:a}=e,n=i(),s=o?.valuePx(n)??b.drawerLeftMargin.valuePx(n),d=f();return c.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:a,children:t})}export{h as D};
1
+ import{j as c}from"./liveblocks-XOqCw7q2.js";import{a2 as i,ac as l}from"./index-B1jJZ6kq.js";import{u as f,D as p}from"./mui-BZ0jnpww.js";import"./sentry-CNIAdl-1.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]="cd7757c9-311c-4b96-86e7-ddf3c130c0ba",e._sentryDebugIdIdentifier="sentry-dbid-cd7757c9-311c-4b96-86e7-ddf3c130c0ba")}catch{}})();const b={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:a}=e,n=i(),s=o?.valuePx(n)??b.drawerLeftMargin.valuePx(n),d=f();return c.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:d.colors.black,opacity:.8,cursor:"pointer"}}},onClose:a,children:t})}export{h as D};
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-XOqCw7q2.js";import{a as l}from"./sentry-CNIAdl-1.js";import{h as G,u as V,g as q,i as F,j as c,N,l as O,n as _,o as R}from"./core-BVdj_noT.js";import{a1v as z,fJ as M,a0e as W,nb as Y,Tf as k,a1x as $,VS as H,mb as J,Tg as S,a0i as U,a0j as K,VT as L,VU as Q}from"./zeni-epic-state-BSu6fdxh.js";import{dv as X,c as Z,a5 as tt,s as et}from"./index-Dme9CBSK.js";import"./mui-BZ0jnpww.js";import{d as b}from"./decodeURIComponentSafe-JMSvQveN.js";import{w as at}from"./withTransactionSidePanel-DybBA6JZ.js";import{e as nt,t as ot}from"./routePaths-TIOEKAr9.js";import{u as it}from"./useIsCustomersTabEnabled-DZ7jecHx.js";import"./recharts-VHHravhf.js";import"./analytics-u8j262Ga.js";import"./plaid-CCMRXiQR.js";import"./dnd-Ex3ltzzE.js";import"./stripe-cKAAJElX.js";import"./lottie-C5YZIzuj.js";import"./lexical-CVwGZsIc.js";import"./pdf-q1-3GLH6.js";import"./utils-BtSqr9lx.js";import"./useAskAiCfoHostNavButtonProps-DO-bnRp-.js";import"./TransactionDetailScreen-BBWVy8TW.js";import"./useInitialThreadRequest-DCdvOJx6.js";import"./expenseAutomationHelper-BtpowfoM.js";import"./stripSplatSuffix-CLHAbjpi.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="a34e4f19-99a6-4d4e-b5ef-444be1893f74",a._sentryDebugIdIdentifier="sentry-dbid-a34e4f19-99a6-4d4e-b5ef-444be1893f74")}catch{}})();const rt=O((function(a,t){const e=t.entity,o=$(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:H(a,"common")},trendWithTransactionsReport:o,analytics:Z,isAccountingClassesEnabled:J(a)}}),(function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${ot(e,t.tenantEmailDomain)}`,m=et(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:m}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(L({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(Q("common"))},onAutoCompleteEntity:e=>{const o=nt(e,t.tenantEmailDomain,t.isCustomersTabEnabled===!0);a(U()),a(K()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=tt(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??C();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(k(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(X),st=at((function({entityType:a,...t}){const e=it(),o=G(),m=V(),I=q(),[d,T]=l.useState(!1),[h,g]=l.useState(!1),{tenantEmailDomain:v,entityIdEncoded:x,entityNameEncoded:j}=F(),r=b(x??""),p=b(j??""),f=mt(r,p),w=[r,p].filter((n=>n!=null)),i={name:p,id:r,type:a,zeniId:r,qboId:r},D=c((n=>z(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),A=c((n=>M(n).company?.companyInfo.firstMonthOfFY??1)),u=c((n=>W(n.trendWithTransactionsState,i,"EntityDetail")));l.useEffect((()=>{d===!1&&f===!0&&(T(!0),m(Y(i)))}),[d,f,i]);const E=c((n=>n.trendState.fetchState)),P=u?.selectedPeriod?.timePeriod??D,B=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(u?.selectedPeriod?.timePeriod,D);return l.useEffect((()=>{d===!0&&h===!1&&E==="Completed"&&(g(!0),P!=null&&m(k(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[d,h,E]),f?s.jsx(rt,{isCustomersTabEnabled:e,firstMonthOfFY:A,tenantEmailDomain:v,location:I,navigate:o,entity:i,defaultTransactionTimePeriod:B,resetTrendIsFetchedStates:()=>{T(!1),g(!1)},...t}):s.jsx(N,{to:C(w.length)})})),mt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,C=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function Gt({entityType:a}){return s.jsx(_,{children:s.jsx(R,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(st,{entityType:a})})})}export{Gt as EntityDetailRoutes,Gt as default};
1
+ import{j as s}from"./liveblocks-XOqCw7q2.js";import{a as l}from"./sentry-CNIAdl-1.js";import{h as G,u as V,g as q,i as F,j as c,N,l as O,n as _,o as R}from"./core-BVdj_noT.js";import{a1v as z,fJ as M,a0e as W,nb as Y,Tf as k,a1x as $,VS as H,mb as J,Tg as S,a0i as U,a0j as K,VT as L,VU as Q}from"./zeni-epic-state-BSu6fdxh.js";import{dv as X,c as Z,a5 as tt,s as et}from"./index-B1jJZ6kq.js";import"./mui-BZ0jnpww.js";import{d as b}from"./decodeURIComponentSafe-JMSvQveN.js";import{w as at}from"./withTransactionSidePanel-Bcsqg7yc.js";import{e as nt,t as ot}from"./routePaths-Dpxra6eQ.js";import{u as it}from"./useIsCustomersTabEnabled-Bs9VGXUR.js";import"./recharts-VHHravhf.js";import"./analytics-u8j262Ga.js";import"./plaid-CCMRXiQR.js";import"./dnd-Ex3ltzzE.js";import"./stripe-cKAAJElX.js";import"./lottie-C5YZIzuj.js";import"./lexical-CVwGZsIc.js";import"./pdf-q1-3GLH6.js";import"./utils-BtSqr9lx.js";import"./useAskAiCfoHostNavButtonProps-B2P8ke_p.js";import"./TransactionDetailScreen-CRhyoXmE.js";import"./useInitialThreadRequest-C-eszkgP.js";import"./expenseAutomationHelper-BtpowfoM.js";import"./stripSplatSuffix-CLHAbjpi.js";(function(){try{var a=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new a.Error().stack;t&&(a._sentryDebugIds=a._sentryDebugIds||{},a._sentryDebugIds[t]="a34e4f19-99a6-4d4e-b5ef-444be1893f74",a._sentryDebugIdIdentifier="sentry-dbid-a34e4f19-99a6-4d4e-b5ef-444be1893f74")}catch{}})();const rt=O((function(a,t){const e=t.entity,o=$(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:H(a,"common")},trendWithTransactionsReport:o,analytics:Z,isAccountingClassesEnabled:J(a)}}),(function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${ot(e,t.tenantEmailDomain)}`,m=et(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:m}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(L({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(Q("common"))},onAutoCompleteEntity:e=>{const o=nt(e,t.tenantEmailDomain,t.isCustomersTabEnabled===!0);a(U()),a(K()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=tt(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??C();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(k(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(X),st=at((function({entityType:a,...t}){const e=it(),o=G(),m=V(),I=q(),[d,T]=l.useState(!1),[h,g]=l.useState(!1),{tenantEmailDomain:v,entityIdEncoded:x,entityNameEncoded:j}=F(),r=b(x??""),p=b(j??""),f=mt(r,p),w=[r,p].filter((n=>n!=null)),i={name:p,id:r,type:a,zeniId:r,qboId:r},D=c((n=>z(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),A=c((n=>M(n).company?.companyInfo.firstMonthOfFY??1)),u=c((n=>W(n.trendWithTransactionsState,i,"EntityDetail")));l.useEffect((()=>{d===!1&&f===!0&&(T(!0),m(Y(i)))}),[d,f,i]);const E=c((n=>n.trendState.fetchState)),P=u?.selectedPeriod?.timePeriod??D,B=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(u?.selectedPeriod?.timePeriod,D);return l.useEffect((()=>{d===!0&&h===!1&&E==="Completed"&&(g(!0),P!=null&&m(k(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[d,h,E]),f?s.jsx(rt,{isCustomersTabEnabled:e,firstMonthOfFY:A,tenantEmailDomain:v,location:I,navigate:o,entity:i,defaultTransactionTimePeriod:B,resetTrendIsFetchedStates:()=>{T(!1),g(!1)},...t}):s.jsx(N,{to:C(w.length)})})),mt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,C=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function Gt({entityType:a}){return s.jsx(_,{children:s.jsx(R,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(st,{entityType:a})})})}export{Gt as EntityDetailRoutes,Gt as default};
@@ -1,4 +1,4 @@
1
- import{j as k}from"./liveblocks-XOqCw7q2.js";import{u as Ie,h as Be,g as Ce,j as B,i as Ae,s as po,t as Hn,l as ho,n as So,o as Je,N as fo}from"./core-BVdj_noT.js";import{fJ as xe,_A as Kn,qp as Me,h9 as Rt,AK as Io,_B as Co,_C as go,_D as ko,_E as yt,_F as ct,gl as wt,_G as bn,eI as bo,g4 as To,_H as Tn,_I as it,rg as yo,vg as Po,gX as vo,gV as Eo,_J as Ao,rt as xo,rC as Ro,qA as wo,qO as Qn,gU as me,gW as Do,_K as _o,r8 as Wn,rD as Fo,qL as Mo,qG as Bo,vm as Oo,gT as Ee,_L as dt,CT as Zn,Nn as Xn,_M as ea,_N as $o,Gi as ta,_O as Uo,f0 as Vo,f2 as jo,ti as Dt,_P as yn,_Q as Lo,me as zo,_R as Go,ml as No,d7 as qo,Ea as _t,_S as Jo,_T as Yo,_U as Ho,_V as Ko,fq as Ft,t6 as Pn,_W as Qo,VS as Wo,_X as Zo,_Y as Xo,mn as es,_Z as ts,S3 as ns,mm as as,mb as os,r1 as na,rI as ut,tV as aa,uf as ss,V5 as oa,rH as vn,rK as sa,rM as cs,bF as is,nK as ls,nH as rs,rL as lt,rJ as ve,__ as ds,s1 as En,_$ as us,$0 as ms,ta as ps,tb as hs,$1 as Ss,VE as ca,_2 as fs,$2 as Is,VT as An,VU as st,$3 as xn,mC as Cs,$4 as gs,$5 as ks,$6 as bs,$7 as Ts,qY as ys,$8 as Ps,$9 as vs,$a as Es,rT as As,mp as xs,mg as Rs,$b as ws,mo as Rn,$c as Ds,$d as _s,$e as Fs,uT as Ms,uu as Bs,ut as Pt,$f as Os,$g as $s,$h as Us,$i as Vs,nV as js,bw as ia,nQ as wn,nC as Ls,$j as zs,h4 as Gs,nN as Ns,tk as qs,tm as Js,t3 as Ys,$k as Hs,$l as Ks,FM as Qs,FL as Ws,G0 as Zs,$m as Dn,t9 as Xs,sG as ec,$n as tc,sm as nc,sr as ac,sC as oc,sp as sc,$o as cc,si as ic,sB as lc,tf as rc,$p as dc,ts as uc,sZ as mc,ty as pc,t2 as hc,s2 as Sc,$q as fc,rk as Ic,qU as Cc,q$ as _n,rO as gc,$r as kc,$s as bc,$t as Tc,$u as yc,$v as Pc,$w as vc,$x as Ec,tC as Ac,$y as xc,$z as Rc,$A as Fn,v2 as wc,ul as Dc,ub as Mn,u9 as _c,$B as Fc,t_ as Mc,tF as Bc,uc as Oc,$C as $c,$D as Uc,tL as Vc,$E as jc,tG as Lc,tK as zc,tI as Gc,uh as Nc,$F as Bn,qt as vt,$G as qc,Em as On,cq as Jc,qP as Yc,$H as Hc}from"./zeni-epic-state-BSu6fdxh.js";import $t from"./NotFoundScreen-BDU6ccX1.js";import{a as o,R as la}from"./sentry-CNIAdl-1.js";import{n as Oe,S as Kc}from"./mui-BZ0jnpww.js";import{p as mt,_ as X,c as te,s as ee,aC as ra,al as da,c0 as Qc,c1 as Wc,z as He,c2 as Mt,c3 as Zc,c4 as Xc,af as Ye,c5 as ei,c6 as $n,c7 as Un,c8 as ti,c9 as ni,a8 as ua,ca as ai,o as rt,g as oi,cb as si,cc as ci,j as ii,V as li,cd as ri,ce as di,cf as ui,cg as mi,aZ as pi,ac as hi,ch as Si,ci as fi,cj as Ii,G as ma,w as Ci,ck as gi,aj as Bt,cl as ki,a5 as bi,cm as Ti,cn as yi}from"./index-Dme9CBSK.js";import{u as Ut}from"./useAskAiCfoHostNavButtonProps-DO-bnRp-.js";import{u as Vn,a as Pi,b as vi,d as Ei,c as Ai,e as xi,r as Ri,C as wi}from"./TransactionDetailScreen-BBWVy8TW.js";import{u as Di,a as _i,b as Fi}from"./useActualMatchingMatchDetail-ClGwke9Y.js";import{d as Mi}from"./decodeURIComponentSafe-JMSvQveN.js";import{m as Vt,a as pa,b as ha,i as Ot}from"./expenseAutomationHelper-BtpowfoM.js";import{u as Sa,a as fa,w as Bi}from"./withTransactionSidePanel-DybBA6JZ.js";import{S as Oi,a as $i,b as Ui,J as Vi}from"./ScheduleDetailsPrepaidExpensesScreen-BxMaq7Gq.js";import{s as jn,i as Ia,h as ji,f as Li,v as zi,t as Gi}from"./routePaths-TIOEKAr9.js";import{a as Et}from"./accountMappingHelper-8C9JQylV.js";import{D as Ni}from"./DrawerScreen-XY9r5sqx.js";import"./recharts-VHHravhf.js";import"./analytics-u8j262Ga.js";import"./plaid-CCMRXiQR.js";import"./dnd-Ex3ltzzE.js";import"./stripe-cKAAJElX.js";import"./lottie-C5YZIzuj.js";import"./lexical-CVwGZsIc.js";import"./pdf-q1-3GLH6.js";import"./utils-BtSqr9lx.js";import"./useInitialThreadRequest-DCdvOJx6.js";import"./stripSplatSuffix-CLHAbjpi.js";import"./pathToGoBack-BYz7DD9r.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]="738166c3-4111-4fe0-9f6e-7c7d3a912095",t._sentryDebugIdIdentifier="sentry-dbid-738166c3-4111-4fe0-9f6e-7c7d3a912095")}catch{}})();const qi=()=>{const t=Ie(),n=Be(),h=Ce(),p=B((m=>xe(m))),{useFeatureGate:S}=mt(),{isFeatureEnabled:i}=S(X.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=S(X.aiAuditScorePercentage),R=B((m=>m.expenseAutomationViewState.selectedPeriodByTenantId)),l=B((m=>Kn(m,p.tenantId))),{isAiCfoAccessEnabled:b,onAskAiCfoClick:f}=Ut({mobileExploreReferrer:"Month-End Close Overview"}),v=o.useCallback(((m,d,C=!1)=>{t(Me({tenantId:d,period:{month:m.month,year:m.year},refreshViewInBackground:C}))}),[]),E=o.useCallback((m=>{const d=h.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&te.trackMonthCloseAuditPage(m.month,m.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null),t(Rt(p.tenantId,m))}),[p.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),g=R[p.tenantId],O=o.useCallback((()=>{const m=h.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&te.trackMonthCloseAuditPage(g.month,g.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,m??null),v(g,p.tenantId,!0)}),[v,g,p.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),_=ee(h.state?.pathnameStackToGoBack,h.pathname),Y=o.useCallback((()=>{if(l.monthEndCloseChecks!=null&&g!=null){const m=l.monthEndCloseChecks.monthEndCloseCheckList.find((d=>d.progress<100));if(m!=null)return void n(`./${m.id}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview"}});n(`./month_end_insights/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview"}})}}),[l.monthEndCloseChecks,g]),{areTenantIdsInSync:w}=ra();return da({isDataReady:l.fetchState==="Completed"}),o.useEffect((()=>{g!=null&&l.fetchState!=="In-Progress"&&l.fetchState!=="Completed"&&w&&v(g,p.tenantId)}),[v,g,l.fetchState,p.tenantId,w]),o.useEffect((()=>{g!=null&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&w&&t(Io(g))}),[g,l.monthClosePerformanceTrendFetchStatus.fetchState,w]),o.useEffect((()=>{const m=setInterval((()=>{l.fetchState!=="In-Progress"&&l.fetchState==="Completed"&&O()}),3e5);return()=>clearInterval(m)}),[l.fetchState]),o.useEffect((()=>{if(l.fetchState==="Completed"&&l.monthEndCloseChecks?.auditSummary!=null){const m=h.state?.referrer;te.trackMonthCloseAuditPage(l.selectedPeriod.month,l.selectedPeriod.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,m??null)}}),[l.fetchState,l.selectedPeriod,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),k.jsx(Ji,{children:k.jsx(Qc,{monthEndCloseChecksView:l,isRealtimeInsightsFeatureEnabled:i,onMonthEndCheckClick:m=>{n(`./${m}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:E,handleReviewButtonClick:Y,onBackClick:()=>{n("../../dashboard")},onReload:O,isAiCfoAccessEnabled:b,onAskAiCfoClick:f,aiAuditScorePercentageEnabled:r})})},Ji=Oe.div`
1
+ import{j as k}from"./liveblocks-XOqCw7q2.js";import{u as Ie,h as Be,g as Ce,j as B,i as Ae,s as po,t as Hn,l as ho,n as So,o as Je,N as fo}from"./core-BVdj_noT.js";import{fJ as xe,_A as Kn,qp as Me,h9 as Rt,AK as Io,_B as Co,_C as go,_D as ko,_E as yt,_F as ct,gl as wt,_G as bn,eI as bo,g4 as To,_H as Tn,_I as it,rg as yo,vg as Po,gX as vo,gV as Eo,_J as Ao,rt as xo,rC as Ro,qA as wo,qO as Qn,gU as me,gW as Do,_K as _o,r8 as Wn,rD as Fo,qL as Mo,qG as Bo,vm as Oo,gT as Ee,_L as dt,CT as Zn,Nn as Xn,_M as ea,_N as $o,Gi as ta,_O as Uo,f0 as Vo,f2 as jo,ti as Dt,_P as yn,_Q as Lo,me as zo,_R as Go,ml as No,d7 as qo,Ea as _t,_S as Jo,_T as Yo,_U as Ho,_V as Ko,fq as Ft,t6 as Pn,_W as Qo,VS as Wo,_X as Zo,_Y as Xo,mn as es,_Z as ts,S3 as ns,mm as as,mb as os,r1 as na,rI as ut,tV as aa,uf as ss,V5 as oa,rH as vn,rK as sa,rM as cs,bF as is,nK as ls,nH as rs,rL as lt,rJ as ve,__ as ds,s1 as En,_$ as us,$0 as ms,ta as ps,tb as hs,$1 as Ss,VE as ca,_2 as fs,$2 as Is,VT as An,VU as st,$3 as xn,mC as Cs,$4 as gs,$5 as ks,$6 as bs,$7 as Ts,qY as ys,$8 as Ps,$9 as vs,$a as Es,rT as As,mp as xs,mg as Rs,$b as ws,mo as Rn,$c as Ds,$d as _s,$e as Fs,uT as Ms,uu as Bs,ut as Pt,$f as Os,$g as $s,$h as Us,$i as Vs,nV as js,bw as ia,nQ as wn,nC as Ls,$j as zs,h4 as Gs,nN as Ns,tk as qs,tm as Js,t3 as Ys,$k as Hs,$l as Ks,FM as Qs,FL as Ws,G0 as Zs,$m as Dn,t9 as Xs,sG as ec,$n as tc,sm as nc,sr as ac,sC as oc,sp as sc,$o as cc,si as ic,sB as lc,tf as rc,$p as dc,ts as uc,sZ as mc,ty as pc,t2 as hc,s2 as Sc,$q as fc,rk as Ic,qU as Cc,q$ as _n,rO as gc,$r as kc,$s as bc,$t as Tc,$u as yc,$v as Pc,$w as vc,$x as Ec,tC as Ac,$y as xc,$z as Rc,$A as Fn,v2 as wc,ul as Dc,ub as Mn,u9 as _c,$B as Fc,t_ as Mc,tF as Bc,uc as Oc,$C as $c,$D as Uc,tL as Vc,$E as jc,tG as Lc,tK as zc,tI as Gc,uh as Nc,$F as Bn,qt as vt,$G as qc,Em as On,cq as Jc,qP as Yc,$H as Hc}from"./zeni-epic-state-BSu6fdxh.js";import $t from"./NotFoundScreen-BLdHlF0f.js";import{a as o,R as la}from"./sentry-CNIAdl-1.js";import{n as Oe,S as Kc}from"./mui-BZ0jnpww.js";import{p as mt,_ as X,c as te,s as ee,aC as ra,al as da,c0 as Qc,c1 as Wc,z as He,c2 as Mt,c3 as Zc,c4 as Xc,af as Ye,c5 as ei,c6 as $n,c7 as Un,c8 as ti,c9 as ni,a8 as ua,ca as ai,o as rt,g as oi,cb as si,cc as ci,j as ii,V as li,cd as ri,ce as di,cf as ui,cg as mi,aZ as pi,ac as hi,ch as Si,ci as fi,cj as Ii,G as ma,w as Ci,ck as gi,aj as Bt,cl as ki,a5 as bi,cm as Ti,cn as yi}from"./index-B1jJZ6kq.js";import{u as Ut}from"./useAskAiCfoHostNavButtonProps-B2P8ke_p.js";import{u as Vn,a as Pi,b as vi,d as Ei,c as Ai,e as xi,r as Ri,C as wi}from"./TransactionDetailScreen-CRhyoXmE.js";import{u as Di,a as _i,b as Fi}from"./useActualMatchingMatchDetail-Y4mqKvG2.js";import{d as Mi}from"./decodeURIComponentSafe-JMSvQveN.js";import{m as Vt,a as pa,b as ha,i as Ot}from"./expenseAutomationHelper-BtpowfoM.js";import{u as Sa,a as fa,w as Bi}from"./withTransactionSidePanel-Bcsqg7yc.js";import{S as Oi,a as $i,b as Ui,J as Vi}from"./ScheduleDetailsPrepaidExpensesScreen-Dk3kI_um.js";import{s as jn,i as Ia,h as ji,f as Li,v as zi,t as Gi}from"./routePaths-Dpxra6eQ.js";import{a as Et}from"./accountMappingHelper-8C9JQylV.js";import{D as Ni}from"./DrawerScreen-Brp-giik.js";import"./recharts-VHHravhf.js";import"./analytics-u8j262Ga.js";import"./plaid-CCMRXiQR.js";import"./dnd-Ex3ltzzE.js";import"./stripe-cKAAJElX.js";import"./lottie-C5YZIzuj.js";import"./lexical-CVwGZsIc.js";import"./pdf-q1-3GLH6.js";import"./utils-BtSqr9lx.js";import"./useInitialThreadRequest-C-eszkgP.js";import"./stripSplatSuffix-CLHAbjpi.js";import"./pathToGoBack-BYz7DD9r.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]="738166c3-4111-4fe0-9f6e-7c7d3a912095",t._sentryDebugIdIdentifier="sentry-dbid-738166c3-4111-4fe0-9f6e-7c7d3a912095")}catch{}})();const qi=()=>{const t=Ie(),n=Be(),h=Ce(),p=B((m=>xe(m))),{useFeatureGate:S}=mt(),{isFeatureEnabled:i}=S(X.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=S(X.aiAuditScorePercentage),R=B((m=>m.expenseAutomationViewState.selectedPeriodByTenantId)),l=B((m=>Kn(m,p.tenantId))),{isAiCfoAccessEnabled:b,onAskAiCfoClick:f}=Ut({mobileExploreReferrer:"Month-End Close Overview"}),v=o.useCallback(((m,d,C=!1)=>{t(Me({tenantId:d,period:{month:m.month,year:m.year},refreshViewInBackground:C}))}),[]),E=o.useCallback((m=>{const d=h.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&te.trackMonthCloseAuditPage(m.month,m.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null),t(Rt(p.tenantId,m))}),[p.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),g=R[p.tenantId],O=o.useCallback((()=>{const m=h.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&te.trackMonthCloseAuditPage(g.month,g.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,m??null),v(g,p.tenantId,!0)}),[v,g,p.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),_=ee(h.state?.pathnameStackToGoBack,h.pathname),Y=o.useCallback((()=>{if(l.monthEndCloseChecks!=null&&g!=null){const m=l.monthEndCloseChecks.monthEndCloseCheckList.find((d=>d.progress<100));if(m!=null)return void n(`./${m.id}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview"}});n(`./month_end_insights/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview"}})}}),[l.monthEndCloseChecks,g]),{areTenantIdsInSync:w}=ra();return da({isDataReady:l.fetchState==="Completed"}),o.useEffect((()=>{g!=null&&l.fetchState!=="In-Progress"&&l.fetchState!=="Completed"&&w&&v(g,p.tenantId)}),[v,g,l.fetchState,p.tenantId,w]),o.useEffect((()=>{g!=null&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&w&&t(Io(g))}),[g,l.monthClosePerformanceTrendFetchStatus.fetchState,w]),o.useEffect((()=>{const m=setInterval((()=>{l.fetchState!=="In-Progress"&&l.fetchState==="Completed"&&O()}),3e5);return()=>clearInterval(m)}),[l.fetchState]),o.useEffect((()=>{if(l.fetchState==="Completed"&&l.monthEndCloseChecks?.auditSummary!=null){const m=h.state?.referrer;te.trackMonthCloseAuditPage(l.selectedPeriod.month,l.selectedPeriod.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,m??null)}}),[l.fetchState,l.selectedPeriod,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),k.jsx(Ji,{children:k.jsx(Qc,{monthEndCloseChecksView:l,isRealtimeInsightsFeatureEnabled:i,onMonthEndCheckClick:m=>{n(`./${m}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:E,handleReviewButtonClick:Y,onBackClick:()=>{n("../../dashboard")},onReload:O,isAiCfoAccessEnabled:b,onAskAiCfoClick:f,aiAuditScorePercentageEnabled:r})})},Ji=Oe.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1,2 +1,2 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-BDU6ccX1.js","assets/sentry-CNIAdl-1.js","assets/core-BVdj_noT.js","assets/zeni-epic-state-BSu6fdxh.js","assets/index-Dme9CBSK.js","assets/mui-BZ0jnpww.js","assets/analytics-u8j262Ga.js","assets/utils-BtSqr9lx.js","assets/index-BQ3cXEYt.css"])))=>i.map(i=>d[i]);
2
- import{_ as u}from"./zeni-epic-state-BSu6fdxh.js";import{j as a}from"./liveblocks-XOqCw7q2.js";import{l as c}from"./index-Dme9CBSK.js";import"./sentry-CNIAdl-1.js";import{N as e}from"./core-BVdj_noT.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new n.Error().stack;i&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[i]="664578a5-3bc1-4f45-ae26-42636c83b65d",n._sentryDebugIdIdentifier="sentry-dbid-664578a5-3bc1-4f45-ae26-42636c83b65d")}catch{}})();const E=c((()=>u((()=>import("./NotFoundScreen-BDU6ccX1.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),b=({tenantEmailDomain:n})=>a.jsx(e,{to:`/${n}/reimbursements`}),j=({tenantEmailDomain:n})=>a.jsx(e,{to:`/${n}/bills`}),m=({tenantEmailDomain:n})=>a.jsx(e,{to:`/${n}/treasury`}),l=({tenantEmailDomain:n})=>a.jsx(e,{to:`/${n}/checking`}),d=({tenantEmailDomain:n})=>a.jsx(e,{to:`/${n}/cards`}),_=({showZeniAccountRoute:n,isUserHasBillPayAccess:i,isUserHasReimbursementAccess:s,showTreasuryRoute:o,isTenantBankingOnly:f,showChargeCardRoute:r,tenantEmailDomain:t})=>{if(f===!0){if(n)return a.jsx(l,{tenantEmailDomain:t});if(o)return a.jsx(m,{tenantEmailDomain:t});if(r)return a.jsx(d,{tenantEmailDomain:t})}return n?a.jsx(l,{tenantEmailDomain:t}):o?a.jsx(m,{tenantEmailDomain:t}):r?a.jsx(d,{tenantEmailDomain:t}):i?a.jsx(j,{tenantEmailDomain:t}):s?a.jsx(b,{tenantEmailDomain:t}):a.jsx(E,{})};export{_ as F};
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/NotFoundScreen-BLdHlF0f.js","assets/sentry-CNIAdl-1.js","assets/core-BVdj_noT.js","assets/zeni-epic-state-BSu6fdxh.js","assets/index-B1jJZ6kq.js","assets/mui-BZ0jnpww.js","assets/analytics-u8j262Ga.js","assets/utils-BtSqr9lx.js","assets/index-BQ3cXEYt.css"])))=>i.map(i=>d[i]);
2
+ import{_ as u}from"./zeni-epic-state-BSu6fdxh.js";import{j as a}from"./liveblocks-XOqCw7q2.js";import{l as c}from"./index-B1jJZ6kq.js";import"./sentry-CNIAdl-1.js";import{N as e}from"./core-BVdj_noT.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},i=new n.Error().stack;i&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[i]="664578a5-3bc1-4f45-ae26-42636c83b65d",n._sentryDebugIdIdentifier="sentry-dbid-664578a5-3bc1-4f45-ae26-42636c83b65d")}catch{}})();const E=c((()=>u((()=>import("./NotFoundScreen-BLdHlF0f.js")),__vite__mapDeps([0,1,2,3,4,5,6,7,8])))),b=({tenantEmailDomain:n})=>a.jsx(e,{to:`/${n}/reimbursements`}),j=({tenantEmailDomain:n})=>a.jsx(e,{to:`/${n}/bills`}),m=({tenantEmailDomain:n})=>a.jsx(e,{to:`/${n}/treasury`}),l=({tenantEmailDomain:n})=>a.jsx(e,{to:`/${n}/checking`}),d=({tenantEmailDomain:n})=>a.jsx(e,{to:`/${n}/cards`}),_=({showZeniAccountRoute:n,isUserHasBillPayAccess:i,isUserHasReimbursementAccess:s,showTreasuryRoute:o,isTenantBankingOnly:f,showChargeCardRoute:r,tenantEmailDomain:t})=>{if(f===!0){if(n)return a.jsx(l,{tenantEmailDomain:t});if(o)return a.jsx(m,{tenantEmailDomain:t});if(r)return a.jsx(d,{tenantEmailDomain:t})}return n?a.jsx(l,{tenantEmailDomain:t}):o?a.jsx(m,{tenantEmailDomain:t}):r?a.jsx(d,{tenantEmailDomain:t}):i?a.jsx(j,{tenantEmailDomain:t}):s?a.jsx(b,{tenantEmailDomain:t}):a.jsx(E,{})};export{_ as F};
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-XOqCw7q2.js";import{a as r}from"./sentry-CNIAdl-1.js";import{d7 as d,d8 as l,X as p,a5 as m}from"./index-Dme9CBSK.js";import"./mui-BZ0jnpww.js";import c from"./NotFoundScreen-BDU6ccX1.js";import{h as b,g as u}from"./core-BVdj_noT.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]="a195f244-26f5-4ecf-9286-f20bba921bf6",e._sentryDebugIdIdentifier="sentry-dbid-a195f244-26f5-4ecf-9286-f20bba921bf6")}catch{}})();const _=()=>{const e=b(),a=u(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),f=r.useCallback((()=>{(()=>{const n=m(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=d(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:f}):s.jsx(c,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
1
+ import{j as s}from"./liveblocks-XOqCw7q2.js";import{a as r}from"./sentry-CNIAdl-1.js";import{d7 as d,d8 as l,X as p,a5 as m}from"./index-B1jJZ6kq.js";import"./mui-BZ0jnpww.js";import c from"./NotFoundScreen-BLdHlF0f.js";import{h as b,g as u}from"./core-BVdj_noT.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]="a195f244-26f5-4ecf-9286-f20bba921bf6",e._sentryDebugIdIdentifier="sentry-dbid-a195f244-26f5-4ecf-9286-f20bba921bf6")}catch{}})();const _=()=>{const e=b(),a=u(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),f=r.useCallback((()=>{(()=>{const n=m(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=d(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:f}):s.jsx(c,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
@@ -1 +1 @@
1
- import{a as i}from"./sentry-CNIAdl-1.js";import{u as l,h as f,g as m}from"./core-BVdj_noT.js";import{i8 as p,Vw as g,Vx as _}from"./zeni-epic-state-BSu6fdxh.js";import{u as b,L as h,z as y}from"./index-Dme9CBSK.js";import"./liveblocks-XOqCw7q2.js";import"./recharts-VHHravhf.js";import"./mui-BZ0jnpww.js";import"./analytics-u8j262Ga.js";import"./plaid-CCMRXiQR.js";import"./dnd-Ex3ltzzE.js";import"./stripe-cKAAJElX.js";import"./lottie-C5YZIzuj.js";import"./lexical-CVwGZsIc.js";import"./pdf-q1-3GLH6.js";import"./utils-BtSqr9lx.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]="1efe0c6f-5b25-4edc-9976-c67c4b2873c3",e._sentryDebugIdIdentifier="sentry-dbid-1efe0c6f-5b25-4edc-9976-c67c4b2873c3")}catch{}})();function R(){const e=l(),n=f(),r=m(),{setLoading:o,clearAllLoading:d}=b(),s=i.useRef(!1);return i.useLayoutEffect((()=>{o(h.CONNECTION_AUTH)}),[o]),i.useEffect((()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(r.search).get("code"),c=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&c!=null){const t=JSON.parse(c);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}d();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{R as default};
1
+ import{a as i}from"./sentry-CNIAdl-1.js";import{u as l,h as f,g as m}from"./core-BVdj_noT.js";import{i8 as p,Vw as g,Vx as _}from"./zeni-epic-state-BSu6fdxh.js";import{u as b,L as h,z as y}from"./index-B1jJZ6kq.js";import"./liveblocks-XOqCw7q2.js";import"./recharts-VHHravhf.js";import"./mui-BZ0jnpww.js";import"./analytics-u8j262Ga.js";import"./plaid-CCMRXiQR.js";import"./dnd-Ex3ltzzE.js";import"./stripe-cKAAJElX.js";import"./lottie-C5YZIzuj.js";import"./lexical-CVwGZsIc.js";import"./pdf-q1-3GLH6.js";import"./utils-BtSqr9lx.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]="1efe0c6f-5b25-4edc-9976-c67c4b2873c3",e._sentryDebugIdIdentifier="sentry-dbid-1efe0c6f-5b25-4edc-9976-c67c4b2873c3")}catch{}})();function R(){const e=l(),n=f(),r=m(),{setLoading:o,clearAllLoading:d}=b(),s=i.useRef(!1);return i.useLayoutEffect((()=>{o(h.CONNECTION_AUTH)}),[o]),i.useEffect((()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(r.search).get("code"),c=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&c!=null){const t=JSON.parse(c);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}d();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{R as default};