@zeniai/web-app-ui 5.4.16-dev → 5.4.16-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 (72) hide show
  1. package/dist/assets/{AccountMappingScreen-CDXqSiAc.js → AccountMappingScreen-Ckg0KzqS.js} +1 -1
  2. package/dist/assets/{ActualMatchingMatchDetailScreen-CLGyk8Pf.js → ActualMatchingMatchDetailScreen-CQbBAh_e.js} +1 -1
  3. package/dist/assets/{AddressRoutes-BTMFaoPH.js → AddressRoutes-CN1SRIa8.js} +1 -1
  4. package/dist/assets/{AddressScreen-CS8bv4zo.js → AddressScreen-BKq4wBPq.js} +1 -1
  5. package/dist/assets/{AiCfoScreen-CLNLnVZu.js → AiCfoScreen-D1mzCWxb.js} +1 -1
  6. package/dist/assets/{AppDrawer-B2nKx9FM.js → AppDrawer-BvhAldmq.js} +1 -1
  7. package/dist/assets/{BillPayApprovalRoutes-DZgRuPl7.js → BillPayApprovalRoutes-dmImShhx.js} +1 -1
  8. package/dist/assets/{BillPayRoutes-DswppA7i.js → BillPayRoutes-BAU2Oa47.js} +1 -1
  9. package/dist/assets/{BusinessVerificationPageScreen-ByDASFk9.js → BusinessVerificationPageScreen-BI8ZMRIa.js} +1 -1
  10. package/dist/assets/{CardsAiCfoScreen-BcEAv9Pt.js → CardsAiCfoScreen-Dqtcf4Yl.js} +1 -1
  11. package/dist/assets/{ChargeCardRoutes-DeJE6G2a.js → ChargeCardRoutes-diNtfXS5.js} +1 -1
  12. package/dist/assets/{CompanyPassportScreen-u9kNx3Tg.js → CompanyPassportScreen-B5yjsWr2.js} +1 -1
  13. package/dist/assets/{ConnectionAuthScreen-DVi6hxMj.js → ConnectionAuthScreen-DKcCUW7d.js} +1 -1
  14. package/dist/assets/{CustomerOnboardingAuthScreen-cEY6ZjCp.js → CustomerOnboardingAuthScreen-HQaBjHwu.js} +1 -1
  15. package/dist/assets/{CustomerOnboardingRoutes-i8teYQ0f.js → CustomerOnboardingRoutes-CUu4xtOP.js} +1 -1
  16. package/dist/assets/{DashboardRoutes-CVe5_3-I.js → DashboardRoutes-9cGzKtKV.js} +1 -1
  17. package/dist/assets/{DefaultTenantHome-D6T8HuT3.js → DefaultTenantHome-u5VX3H1O.js} +1 -1
  18. package/dist/assets/{DomesticWireDetailScreen-dIpkGH6g.js → DomesticWireDetailScreen-DYljhUYd.js} +1 -1
  19. package/dist/assets/{DrawerScreen-Bl0Kb-2-.js → DrawerScreen-BkGImsqk.js} +1 -1
  20. package/dist/assets/{EntityDetailRoutes-DDHIuX8U.js → EntityDetailRoutes-4n9amGPg.js} +1 -1
  21. package/dist/assets/{ExpenseAutomationRoutes-DgHZQYiA.js → ExpenseAutomationRoutes-Dy6Zi3aU.js} +1 -1
  22. package/dist/assets/{FallBackRoute-VU9noj8V.js → FallBackRoute-CWYl_a8c.js} +2 -2
  23. package/dist/assets/{FeaturePreviewScreen-e7I8ExNO.js → FeaturePreviewScreen-CF6zLPT7.js} +1 -1
  24. package/dist/assets/{HubSpotOAuthCallbackScreen-CU5AUU74.js → HubSpotOAuthCallbackScreen-Cb1PzyG4.js} +1 -1
  25. package/dist/assets/{InvoicingRoutes-BsZlsusO.js → InvoicingRoutes-DJNz4n53.js} +1 -1
  26. package/dist/assets/{MagicLinkRoutes-BhGsmEvC.js → MagicLinkRoutes-R83_jnYL.js} +1 -1
  27. package/dist/assets/{MagicLinkSignInScreen-BRRvS_-g.js → MagicLinkSignInScreen-CL3967v_.js} +1 -1
  28. package/dist/assets/{MobileAppDrawer-BUD0j7G2.js → MobileAppDrawer-Dv0pRBXr.js} +1 -1
  29. package/dist/assets/{NotFoundScreen-Da0kpRnr.js → NotFoundScreen-BBLRr8ia.js} +1 -1
  30. package/dist/assets/{NotificationRoutes-ZaAHYFIU.js → NotificationRoutes-DZigUGOn.js} +1 -1
  31. package/dist/assets/{OAuthConsentScreen-BKY_MZq1.js → OAuthConsentScreen-0rNtFd9s.js} +1 -1
  32. package/dist/assets/{PandLWithForecastRoutes-YG8pfDPq.js → PandLWithForecastRoutes-x3WVaXjR.js} +1 -1
  33. package/dist/assets/{PaymentLinkScreen-CO2Phrs3.js → PaymentLinkScreen-BSJ8UIWL.js} +1 -1
  34. package/dist/assets/{PeopleRoutes-B0Fd7My2.js → PeopleRoutes-DJxeyyvJ.js} +1 -1
  35. package/dist/assets/{PerformanceRoutes-4RVlZlPh.js → PerformanceRoutes-B0AZp5w8.js} +1 -1
  36. package/dist/assets/{QBOConnectionScreen-C4tVfsJt.js → QBOConnectionScreen-CVYLJvZi.js} +1 -1
  37. package/dist/assets/{ReimbursementApprovalRoutes-fl_RHS7J.js → ReimbursementApprovalRoutes-BlLe5n-s.js} +1 -1
  38. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-C-svNJCY.js → ReimbursementApprovalRuleDetailScreen-bR9jKYFF.js} +1 -1
  39. package/dist/assets/{ReimbursementRoutes-D_O2yTEO.js → ReimbursementRoutes-CZe9b4pH.js} +1 -1
  40. package/dist/assets/{ReportsRoutes-DvldCkWE.js → ReportsRoutes-BFeHLyyw.js} +1 -1
  41. package/dist/assets/{RewardsRoutes-DUEA8SkB.js → RewardsRoutes-BpBqq4vK.js} +1 -1
  42. package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-Cx-76x6C.js → ScheduleDetailsPrepaidExpensesScreen-CaQr8kh1.js} +1 -1
  43. package/dist/assets/{ScreenRoutes-v-i1WS06.js → ScreenRoutes-BnDWNf-5.js} +2 -2
  44. package/dist/assets/{SettingsRoutes-B8JbWE0A.js → SettingsRoutes-DvUoJwta.js} +1 -1
  45. package/dist/assets/{SetupPagesScreen-QcHSEVBO.js → SetupPagesScreen-7SLoKo_g.js} +1 -1
  46. package/dist/assets/{SignInScreen-6YsvQGsU.js → SignInScreen-DzI005KZ.js} +1 -1
  47. package/dist/assets/{SignOutScreen-50K2PKll.js → SignOutScreen-CoQyrC2i.js} +1 -1
  48. package/dist/assets/{TaskListScreen-C4glK-a5.js → TaskListScreen-B85rADS9.js} +1 -1
  49. package/dist/assets/{TaskRoutes-Bm5_wmyb.js → TaskRoutes-CY98wJmu.js} +1 -1
  50. package/dist/assets/{TransactionDetailRoutes-Dv09esw0.js → TransactionDetailRoutes-a1J32-Jp.js} +1 -1
  51. package/dist/assets/{TransactionDetailScreen-DvsztMnO.js → TransactionDetailScreen-Cv6rkIx1.js} +1 -1
  52. package/dist/assets/{TransactionListRoutes-B8IVQdNf.js → TransactionListRoutes-D59p7HSk.js} +1 -1
  53. package/dist/assets/{TreasuryRoutes-CWptww3e.js → TreasuryRoutes-Dn9wezkD.js} +1 -1
  54. package/dist/assets/{VendorsRoutes-BFk85yO0.js → VendorsRoutes-4PSeMBqD.js} +1 -1
  55. package/dist/assets/{WiseConfirmationScreen-Do34o9lu.js → WiseConfirmationScreen-Cs75mI9j.js} +1 -1
  56. package/dist/assets/{ZeniAccountRoutes-DLhkkoyT.js → ZeniAccountRoutes-CwKcxshk.js} +1 -1
  57. package/dist/assets/{ZeniAccountStatementScreen-YKTGrgZ2.js → ZeniAccountStatementScreen-Dl5ZYM_Y.js} +1 -1
  58. package/dist/assets/{analyticsHelper-Cqab08I6.js → analyticsHelper-dH62f0x-.js} +1 -1
  59. package/dist/assets/{getLocaleForTenant-DFe6xj72.js → getLocaleForTenant-Bq1shd49.js} +1 -1
  60. package/dist/assets/{index-BkGKDMtv.js → index-CJ5STb9-.js} +6 -6
  61. package/dist/assets/{routePaths-CiV55sI1.js → routePaths-BHd2HKgD.js} +1 -1
  62. package/dist/assets/{useActualMatchingMatchDetail-DY4J4jvo.js → useActualMatchingMatchDetail-D0rmHEbK.js} +1 -1
  63. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-U0l3bFxn.js → useAiCfoDashboardSuggestedQuestionsChips-DyKCidZk.js} +1 -1
  64. package/dist/assets/{useAskAiCfoHostNavButtonProps-Ds1IYXBl.js → useAskAiCfoHostNavButtonProps-DRyHY8Wp.js} +1 -1
  65. package/dist/assets/{useChargeCardPusherEvents-Ba7ulirt.js → useChargeCardPusherEvents-Cuv9kbyy.js} +1 -1
  66. package/dist/assets/{useEmailConnectResultRefresh-BMjAwZWL.js → useEmailConnectResultRefresh-DHDJsFXP.js} +1 -1
  67. package/dist/assets/{useInitialThreadRequest-E--3OsRP.js → useInitialThreadRequest-DyMJpsaC.js} +1 -1
  68. package/dist/assets/{useTaskManagerAccess-DzHDJDg5.js → useTaskManagerAccess-BrlsHMZY.js} +1 -1
  69. package/dist/assets/{useTaskManagerPusherEvents-BKgeoe5K.js → useTaskManagerPusherEvents-Bkv1JGpA.js} +1 -1
  70. package/dist/assets/{withTransactionSidePanel-D8qNv0pH.js → withTransactionSidePanel-CWGkUAhT.js} +1 -1
  71. package/dist/index.html +1 -1
  72. package/package.json +1 -1
@@ -1 +1 @@
1
- import{j as l}from"./liveblocks-CueKZN6-.js";import{a as g}from"./sentry-uvO3Tp8f.js";import{h as w,u as x,g as E,i as T,j as b,l as k}from"./core-BQjZS2e8.js";import{z as h,aZ as F,a9 as P,e as j,U as V,D as O,a8 as L,bf as A,af as U,bg as M,v as B}from"./index-BkGKDMtv.js";import{fI as C,gL as _,C8 as G,gG as R,c7 as Y,YE as z,bm as Z,vc as H,v0 as K,mK as $,oj as S,YF as q,bE as J,cv as v,ou as Q,oE as W}from"./zeni-epic-state-DNah8dni.js";import"./mui-CQYR1UI4.js";import{d as X}from"./routePaths-CiV55sI1.js";import{M as ee}from"./MobileAppDrawer-BUD0j7G2.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]="e875bbbc-0feb-4082-ac6f-85fb4bc9f051",a._sentryDebugIdIdentifier="sentry-dbid-e875bbbc-0feb-4082-ac6f-85fb4bc9f051")}catch{}})();const te=k((function(a){const n=R(a),i=h.getSignedInUser(),p=C(a),c=p.tenantId,u={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},y=Y(p?.userRole??[])&&n.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=z(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:Z(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(Q({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:D}=r,N={companyInfo:{...t,website:m!=""&&m!=null?v(m):void 0,meetingLink:f!=""&&f!=null?v(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?J(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:D.selectedOptions.map((I=>parseInt(I))),fileId:r.fileIds[0]}};a(S({companyDetails:N}))},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(q(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($({files:e}))},onDeleteFile:e=>{a(K(e))},onEditFileName:(e,t)=>{a(H(e,t.split(".")[0]))}}}))(A);function le(){const a=w(),n=x(),i=E(),{tenantEmailDomain:p}=T(),[c,u]=g.useState(!1),[y,e]=g.useState(!1),t=b((s=>s.companyViewState.passportView.fetchState)),o=b((s=>s.companyConfigState.fetchState)),r=b((s=>C(s))),d=r.companyId??h.getSignedInUserTenant(p)?.companyId;if(h.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect((()=>{c||t!=="Not-Started"||d==null||(u(!0),n(_(d)))}),[c,t,d,n]),g.useEffect((()=>{o==="Not-Started"&&n(G())}),[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:j,onLoad:s=>s.trackPageLoaded(V.Event.companyPassport,O(i)?"Settings":"Company Passport")}),O(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:O(i),onClickMenuIcon:()=>{m(!0)}})]})}export{le as C};
1
+ import{j as l}from"./liveblocks-CueKZN6-.js";import{a as g}from"./sentry-uvO3Tp8f.js";import{h as w,u as x,g as E,i as T,j as b,l as k}from"./core-BQjZS2e8.js";import{z as h,aZ as F,a9 as P,e as j,U as V,D as O,a8 as L,bf as A,af as U,bg as M,v as B}from"./index-CJ5STb9-.js";import{fI as C,gL as _,C8 as G,gG as R,c7 as Y,YE as z,bm as Z,vc as H,v0 as K,mK as $,oj as S,YF as q,bE as J,cv as v,ou as Q,oE as W}from"./zeni-epic-state-DNah8dni.js";import"./mui-CQYR1UI4.js";import{d as X}from"./routePaths-BHd2HKgD.js";import{M as ee}from"./MobileAppDrawer-Dv0pRBXr.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]="e875bbbc-0feb-4082-ac6f-85fb4bc9f051",a._sentryDebugIdIdentifier="sentry-dbid-e875bbbc-0feb-4082-ac6f-85fb4bc9f051")}catch{}})();const te=k((function(a){const n=R(a),i=h.getSignedInUser(),p=C(a),c=p.tenantId,u={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},y=Y(p?.userRole??[])&&n.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=z(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:Z(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(Q({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:D}=r,N={companyInfo:{...t,website:m!=""&&m!=null?v(m):void 0,meetingLink:f!=""&&f!=null?v(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?J(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:D.selectedOptions.map((I=>parseInt(I))),fileId:r.fileIds[0]}};a(S({companyDetails:N}))},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(q(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($({files:e}))},onDeleteFile:e=>{a(K(e))},onEditFileName:(e,t)=>{a(H(e,t.split(".")[0]))}}}))(A);function le(){const a=w(),n=x(),i=E(),{tenantEmailDomain:p}=T(),[c,u]=g.useState(!1),[y,e]=g.useState(!1),t=b((s=>s.companyViewState.passportView.fetchState)),o=b((s=>s.companyConfigState.fetchState)),r=b((s=>C(s))),d=r.companyId??h.getSignedInUserTenant(p)?.companyId;if(h.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect((()=>{c||t!=="Not-Started"||d==null||(u(!0),n(_(d)))}),[c,t,d,n]),g.useEffect((()=>{o==="Not-Started"&&n(G())}),[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:j,onLoad:s=>s.trackPageLoaded(V.Event.companyPassport,O(i)?"Settings":"Company Passport")}),O(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:O(i),onClickMenuIcon:()=>{m(!0)}})]})}export{le as C};
@@ -1,4 +1,4 @@
1
- import{j as I}from"./liveblocks-CueKZN6-.js";import{a as o}from"./sentry-uvO3Tp8f.js";import{u as F,h as L,g as H,j as C,N as w}from"./core-BQjZS2e8.js";import{UN as q,fI as z,go as G,hd as V,gP as A,gn as Q,gl as B,V6 as J,gk as O}from"./zeni-epic-state-DNah8dni.js";import{u as K,z as E,c as T,G as M,R as W}from"./index-BkGKDMtv.js";import{n as X}from"./mui-CQYR1UI4.js";import{P as h,a as _}from"./AccountMappingScreen-CDXqSiAc.js";import{t as Y}from"./getLocaleForTenant-DFe6xj72.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-C4tVfsJt.js";import"./recharts-DNLEWX3j.js";import"./analytics-Dt3suRsK.js";import"./plaid-Db_iti-b.js";import"./dnd-DccPQo-x.js";import"./stripe-cKAAJElX.js";import"./lottie-D6SetWLo.js";import"./lexical-DQq5IX8L.js";import"./pdf-CqrelrTK.js";import"./utils-BUB23Z37.js";import"./MobileAppDrawer-BUD0j7G2.js";import"./InboxNotificationsProvider-BGgv9Z5e.js";import"./useTaskManagerAccess-DzHDJDg5.js";import"./accountMappingHelper-DrXX0Mo9.js";import"./empty-CmsHIcyu.js";import"./pdf-lib-CkerEMYe.js";import"./index-hbfcGbz2.js";import"./url-CR4W537l.js";import"./index-But8NFor.js";import"./decodeURIComponentSafe-CIIlt5ol.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]="3896c829-54d6-4583-9ede-fc4aa93b4aca",t._sentryDebugIdIdentifier="sentry-dbid-3896c829-54d6-4583-9ede-fc4aa93b4aca")}catch{}})();const te=X.div`
1
+ import{j as I}from"./liveblocks-CueKZN6-.js";import{a as o}from"./sentry-uvO3Tp8f.js";import{u as F,h as L,g as H,j as C,N as w}from"./core-BQjZS2e8.js";import{UN as q,fI as z,go as G,hd as V,gP as A,gn as Q,gl as B,V6 as J,gk as O}from"./zeni-epic-state-DNah8dni.js";import{u as K,z as E,c as T,G as M,R as W}from"./index-CJ5STb9-.js";import{n as X}from"./mui-CQYR1UI4.js";import{P as h,a as _}from"./AccountMappingScreen-Ckg0KzqS.js";import{t as Y}from"./getLocaleForTenant-Bq1shd49.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-CVYLJvZi.js";import"./recharts-DNLEWX3j.js";import"./analytics-Dt3suRsK.js";import"./plaid-Db_iti-b.js";import"./dnd-DccPQo-x.js";import"./stripe-cKAAJElX.js";import"./lottie-D6SetWLo.js";import"./lexical-DQq5IX8L.js";import"./pdf-CqrelrTK.js";import"./utils-BUB23Z37.js";import"./MobileAppDrawer-Dv0pRBXr.js";import"./InboxNotificationsProvider-BGgv9Z5e.js";import"./useTaskManagerAccess-BrlsHMZY.js";import"./accountMappingHelper-DrXX0Mo9.js";import"./empty-CmsHIcyu.js";import"./pdf-lib-CkerEMYe.js";import"./index-hbfcGbz2.js";import"./url-CR4W537l.js";import"./index-But8NFor.js";import"./decodeURIComponentSafe-CIIlt5ol.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]="3896c829-54d6-4583-9ede-fc4aa93b4aca",t._sentryDebugIdIdentifier="sentry-dbid-3896c829-54d6-4583-9ede-fc4aa93b4aca")}catch{}})();const te=X.div`
2
2
  display: flex;
3
3
  flex: 1 1 auto;
4
4
  flex-direction: row;
@@ -1 +1 @@
1
- import{j as i}from"./liveblocks-CueKZN6-.js";import{z as m}from"./index-BkGKDMtv.js";import{g as n}from"./QBOConnectionScreen-C4tVfsJt.js";import"./sentry-uvO3Tp8f.js";import{g as p,N as a}from"./core-BQjZS2e8.js";import"./zeni-epic-state-DNah8dni.js";import"./recharts-DNLEWX3j.js";import"./mui-CQYR1UI4.js";import"./analytics-Dt3suRsK.js";import"./plaid-Db_iti-b.js";import"./dnd-DccPQo-x.js";import"./stripe-cKAAJElX.js";import"./lottie-D6SetWLo.js";import"./lexical-DQq5IX8L.js";import"./pdf-CqrelrTK.js";import"./utils-BUB23Z37.js";import"./empty-CmsHIcyu.js";import"./pdf-lib-CkerEMYe.js";import"./index-hbfcGbz2.js";import"./url-CR4W537l.js";import"./index-But8NFor.js";import"./decodeURIComponentSafe-CIIlt5ol.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]="ebd28598-e6ad-49c0-9fdb-a537e411a6fc",t._sentryDebugIdIdentifier="sentry-dbid-ebd28598-e6ad-49c0-9fdb-a537e411a6fc")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=n(t.search),s=m.getSignedInUser()?.userId??"";if(f(o,r,e,s)===!0){const d=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(a,{to:d})}return i.jsx(a,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
1
+ import{j as i}from"./liveblocks-CueKZN6-.js";import{z as m}from"./index-CJ5STb9-.js";import{g as n}from"./QBOConnectionScreen-CVYLJvZi.js";import"./sentry-uvO3Tp8f.js";import{g as p,N as a}from"./core-BQjZS2e8.js";import"./zeni-epic-state-DNah8dni.js";import"./recharts-DNLEWX3j.js";import"./mui-CQYR1UI4.js";import"./analytics-Dt3suRsK.js";import"./plaid-Db_iti-b.js";import"./dnd-DccPQo-x.js";import"./stripe-cKAAJElX.js";import"./lottie-D6SetWLo.js";import"./lexical-DQq5IX8L.js";import"./pdf-CqrelrTK.js";import"./utils-BUB23Z37.js";import"./empty-CmsHIcyu.js";import"./pdf-lib-CkerEMYe.js";import"./index-hbfcGbz2.js";import"./url-CR4W537l.js";import"./index-But8NFor.js";import"./decodeURIComponentSafe-CIIlt5ol.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]="ebd28598-e6ad-49c0-9fdb-a537e411a6fc",t._sentryDebugIdIdentifier="sentry-dbid-ebd28598-e6ad-49c0-9fdb-a537e411a6fc")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=n(t.search),s=m.getSignedInUser()?.userId??"";if(f(o,r,e,s)===!0){const d=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(a,{to:d})}return i.jsx(a,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-CueKZN6-.js";import{t as wn,A as $e}from"./AddressScreen-CS8bv4zo.js";import An from"./NotFoundScreen-Da0kpRnr.js";import{a as d,x as Me}from"./sentry-uvO3Tp8f.js";import{h as _e,g as Te,u as se,i as xe,j as E,N as Q,q as Pn,l as cn,n as Dn,o as Y}from"./core-BQjZS2e8.js";import{fI as X,eq as Ee,ep as we,bp as jn,V2 as Fn,bR as Bn,q3 as Vn,BU as Un,BX as Rn,a1Y as Ln,a1Z as Nn,lF as Oe,lI as dn,a1h as Gn,d$ as $n,c7 as fe,Cm as Ae,C7 as Mn,a1_ as me,Cn as un,Tc as Qn,mS as ln,d2 as pn,Yd as Kn,Ye as zn,uV as qn,Vm as he,i4 as Yn,Vl as be,i1 as Hn,GT as Zn,uZ as Jn,hV as Wn,hY as Qe,a1$ as mn,a1b as Xn,MJ as et,a1c as nt,MN as tt,B_ as at,Ya as ot,Yb as st,lD as rt,lG as it,Cz as ct,C9 as gn,Cl as dt,bE as Ke,cv as ut,Cy as ze,vc as lt,v0 as pt,mK as mt,gJ as gt,gI as ft,gH as yt,a20 as Ct,C1 as ht,CA as bt,CD as St,CG as It,CM as kt,d3 as Ot}from"./zeni-epic-state-DNah8dni.js";import{z,p as Pe,b as J,f as vt,v as q,a9 as re,e as g,dm as _t,az as fn,a2 as Tt,k as yn,V as Cn,s as W,_ as ge,U as ve,dn as xt,R as qe,I as Ye,af as Et,bg as He,dp as wt,dq as At}from"./index-BkGKDMtv.js";import{n as De}from"./mui-CQYR1UI4.js";import{g as Pt,h as Dt,q as ie}from"./QBOConnectionScreen-C4tVfsJt.js";import{u as jt,a as Ft}from"./useEmailConnectResultRefresh-BMjAwZWL.js";import{u as Bt}from"./useChargeCardPusherEvents-Ba7ulirt.js";import"./recharts-DNLEWX3j.js";import"./analytics-Dt3suRsK.js";import"./plaid-Db_iti-b.js";import"./dnd-DccPQo-x.js";import"./stripe-cKAAJElX.js";import"./lottie-D6SetWLo.js";import"./lexical-DQq5IX8L.js";import"./pdf-CqrelrTK.js";import"./utils-BUB23Z37.js";import"./empty-CmsHIcyu.js";import"./pdf-lib-CkerEMYe.js";import"./index-hbfcGbz2.js";import"./url-CR4W537l.js";import"./index-But8NFor.js";import"./decodeURIComponentSafe-CIIlt5ol.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]="d2ab4910-bb01-4188-95c4-fec66393833a",e._sentryDebugIdIdentifier="sentry-dbid-d2ab4910-bb01-4188-95c4-fec66393833a")}catch{}})();const Ze=e=>{switch(e){case"Complete":return"yes";case"Pending Review":case"Incomplete":return"partially";default:return"no"}},Vt=()=>{const e=_e(),l=Te(),i=se(),[o,p]=d.useState(!1),[u,c]=d.useState(!1),{tenantEmailDomain:v}=xe(),n=z.getSignedInUser(),{useFeatureGate:t}=Pe(),{isFeatureEnabled:h}=t(J.isApAgingFeatureEnabled),{isFeatureEnabled:a}=t(J.isArAgingFeatureEnabled),{isFeatureEnabled:A}=t(J.isReferralFeatureEnabled),{isFeatureEnabled:w}=t(J.isDebitCardFeatureEnabled),k=vt(),O=E((S=>X(S))),P=E((S=>S.onboardingCustomerViewState.fetchState)),_=O.excludedResources,B=O.companyId??z.getSignedInUserTenant(v)?.companyId;if(n==null)throw Error("Can't access onboarding flow without signing in...");const m=Ee(w,O),b=we(O),D=[],U=_?.resources?.find((S=>S.resource==="/reports/top_expenses"))==null,C=_?.resources?.find((S=>S.resource==="/reports/task_card"))==null,r=O?.userRole!=null&&jn(O?.userRole),T=_?.resources?.find((S=>S.resource==="/bills"))==null&&!r,x=_?.resources?.find((S=>S.resource==="/reimbursements"))==null;U===!1&&D.push("top_expenses"),C===!1&&D.push("task_card"),T===!1&&D.push("bill_pay_card","bill_pay_promo_card"),x===!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 H=Fn(S,V);return Bn(H.reportsInOrder.map(($=>({fetchState:$.fetchState,error:$.error})))).fetchState}));d.useEffect((()=>{P!=="Completed"||o||m||b||(p(!0),i(Vn(n.userId,B,O.tenantId,!0,!1,D)))}),[o,P,m,b,n,O.tenantId,i]);const j=d.useRef(!1),N=d.useCallback((()=>{const S={pathnameStackToGoBack:q(l.state?.pathnameStackToGoBack,l.pathname),message:"activation"};e(m?"../../checking":b?"../../cards":"../../dashboard",{state:S})}),[e,l,m,b]),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=O.company?.companyOnboardingInfo?.onboardingInfo,ee={timeSinceQuoteSign:L?.onboardingTimeSinceQuoteSigned??"",timeSinceQuoteSignInMinutes:L?.onboardingToQuoteSignMinutes??0,isKybDone:Ze(L?.businessVerified?.status),isKycDone:Ze(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"],Je=(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}))},We=(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-CueKZN6-.js";import{t as wn,A as $e}from"./AddressScreen-BKq4wBPq.js";import An from"./NotFoundScreen-BBLRr8ia.js";import{a as d,x as Me}from"./sentry-uvO3Tp8f.js";import{h as _e,g as Te,u as se,i as xe,j as E,N as Q,q as Pn,l as cn,n as Dn,o as Y}from"./core-BQjZS2e8.js";import{fI as X,eq as Ee,ep as we,bp as jn,V2 as Fn,bR as Bn,q3 as Vn,BU as Un,BX as Rn,a1Y as Ln,a1Z as Nn,lF as Oe,lI as dn,a1h as Gn,d$ as $n,c7 as fe,Cm as Ae,C7 as Mn,a1_ as me,Cn as un,Tc as Qn,mS as ln,d2 as pn,Yd as Kn,Ye as zn,uV as qn,Vm as he,i4 as Yn,Vl as be,i1 as Hn,GT as Zn,uZ as Jn,hV as Wn,hY as Qe,a1$ as mn,a1b as Xn,MJ as et,a1c as nt,MN as tt,B_ as at,Ya as ot,Yb as st,lD as rt,lG as it,Cz as ct,C9 as gn,Cl as dt,bE as Ke,cv as ut,Cy as ze,vc as lt,v0 as pt,mK as mt,gJ as gt,gI as ft,gH as yt,a20 as Ct,C1 as ht,CA as bt,CD as St,CG as It,CM as kt,d3 as Ot}from"./zeni-epic-state-DNah8dni.js";import{z,p as Pe,b as J,f as vt,v as q,a9 as re,e as g,dm as _t,az as fn,a2 as Tt,k as yn,V as Cn,s as W,_ as ge,U as ve,dn as xt,R as qe,I as Ye,af as Et,bg as He,dp as wt,dq as At}from"./index-CJ5STb9-.js";import{n as De}from"./mui-CQYR1UI4.js";import{g as Pt,h as Dt,q as ie}from"./QBOConnectionScreen-CVYLJvZi.js";import{u as jt,a as Ft}from"./useEmailConnectResultRefresh-DHDJsFXP.js";import{u as Bt}from"./useChargeCardPusherEvents-Cuv9kbyy.js";import"./recharts-DNLEWX3j.js";import"./analytics-Dt3suRsK.js";import"./plaid-Db_iti-b.js";import"./dnd-DccPQo-x.js";import"./stripe-cKAAJElX.js";import"./lottie-D6SetWLo.js";import"./lexical-DQq5IX8L.js";import"./pdf-CqrelrTK.js";import"./utils-BUB23Z37.js";import"./empty-CmsHIcyu.js";import"./pdf-lib-CkerEMYe.js";import"./index-hbfcGbz2.js";import"./url-CR4W537l.js";import"./index-But8NFor.js";import"./decodeURIComponentSafe-CIIlt5ol.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]="d2ab4910-bb01-4188-95c4-fec66393833a",e._sentryDebugIdIdentifier="sentry-dbid-d2ab4910-bb01-4188-95c4-fec66393833a")}catch{}})();const Ze=e=>{switch(e){case"Complete":return"yes";case"Pending Review":case"Incomplete":return"partially";default:return"no"}},Vt=()=>{const e=_e(),l=Te(),i=se(),[o,p]=d.useState(!1),[u,c]=d.useState(!1),{tenantEmailDomain:v}=xe(),n=z.getSignedInUser(),{useFeatureGate:t}=Pe(),{isFeatureEnabled:h}=t(J.isApAgingFeatureEnabled),{isFeatureEnabled:a}=t(J.isArAgingFeatureEnabled),{isFeatureEnabled:A}=t(J.isReferralFeatureEnabled),{isFeatureEnabled:w}=t(J.isDebitCardFeatureEnabled),k=vt(),O=E((S=>X(S))),P=E((S=>S.onboardingCustomerViewState.fetchState)),_=O.excludedResources,B=O.companyId??z.getSignedInUserTenant(v)?.companyId;if(n==null)throw Error("Can't access onboarding flow without signing in...");const m=Ee(w,O),b=we(O),D=[],U=_?.resources?.find((S=>S.resource==="/reports/top_expenses"))==null,C=_?.resources?.find((S=>S.resource==="/reports/task_card"))==null,r=O?.userRole!=null&&jn(O?.userRole),T=_?.resources?.find((S=>S.resource==="/bills"))==null&&!r,x=_?.resources?.find((S=>S.resource==="/reimbursements"))==null;U===!1&&D.push("top_expenses"),C===!1&&D.push("task_card"),T===!1&&D.push("bill_pay_card","bill_pay_promo_card"),x===!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 H=Fn(S,V);return Bn(H.reportsInOrder.map(($=>({fetchState:$.fetchState,error:$.error})))).fetchState}));d.useEffect((()=>{P!=="Completed"||o||m||b||(p(!0),i(Vn(n.userId,B,O.tenantId,!0,!1,D)))}),[o,P,m,b,n,O.tenantId,i]);const j=d.useRef(!1),N=d.useCallback((()=>{const S={pathnameStackToGoBack:q(l.state?.pathnameStackToGoBack,l.pathname),message:"activation"};e(m?"../../checking":b?"../../cards":"../../dashboard",{state:S})}),[e,l,m,b]),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=O.company?.companyOnboardingInfo?.onboardingInfo,ee={timeSinceQuoteSign:L?.onboardingTimeSinceQuoteSigned??"",timeSinceQuoteSignInMinutes:L?.onboardingToQuoteSignMinutes??0,isKybDone:Ze(L?.businessVerified?.status),isKycDone:Ze(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"],Je=(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}))},We=(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 d}from"./liveblocks-CueKZN6-.js";import{i as Q,j as S,g as J,u as K,h as ee,l as se,k as fa,n as _t,o as F,N as On}from"./core-BQjZS2e8.js";import{fI as L,Vt as at,bE as q,bv as xe,Vu as Tn,kl as wn,Vv as Zt,Vw as xn,ko as kt,Vx as Je,Vy as Pn,kt as Fn,Vz as Xt,VA as Rn,kx as yt,VB as et,VC as Bn,VD as jn,VE as Mn,lz as Vn,VF as Ln,bm as nt,VG as ha,VH as he,bc as ga,lN as Ca,lw as ba,VI as ge,VJ as oe,fH as Sa,gd as Un,gt as At,VK as Yn,VL as Gn,VM as _a,l$ as Et,VN as Le,d0 as Ue,EH as Nn,VO as De,EA as Ye,EB as Ge,E_ as Pe,EU as Ce,EF as Ne,VP as Wn,d$ as We,VQ as zn,VR as qn,VS as ka,m4 as It,EI as Kn,VT as Oe,VU as $n,ei as ot,AH as ya,VV as Qn,VW as Aa,VX as Hn,VY as Zn,VZ as Xn,V_ as Dt,V$ as Ot,ur as Fe,ma as Re,q7 as Tt,EL as Jn,W0 as le,F8 as wt,AO as eo,AV as to,W1 as ao,W2 as no,EC as Jt,W3 as oo,AK as Te,AF as va,W4 as ea,W5 as so,W6 as xt,W7 as Pt,CR as Ea,W8 as ro,W9 as Ia,Wa as io,Wb as co,Wc as lo,Wd as Ft,q5 as Rt,EK as uo,We as de,D4 as mo,Db as po,Wf as fo,Wg as ho,EE as ta,Wh as go,CP as Da,Wi as aa,Wj as Co,bp as Oa,Fd as Ta,Wk as bo,Wl as wa,Wm as So,Wn as _o,Wo as ko,Wp as Bt,q6 as jt,EJ as yo,Wq as ue,F5 as Ao,F7 as vo,Wr as Eo,Ws as Io,ED as na,Wt as Do,Fb as xa,Wu as oa,Wv as Oo,Ww as To,Wx as Pa,q9 as Fa,Cc as wo,ed as xo,q3 as Po,V2 as Fo,qj as Ro,Wy as Bo,Wz as jo,WA as Mo,b5 as Mt,qd as Vo,ip as Lo,gL as Uo,qc as Yo,lp as Go,qa as No,q8 as Wo,eq as zo,ep as qo}from"./zeni-epic-state-DNah8dni.js";import{z as U,aj as re,v as R,e as O,G as H,ak as Ko,al as ze,a9 as qe,am as Ra,U as W,an as $o,ao as Ba,ap as Qo,aq as Ho,j as ja,a2 as Ma,a as Va,ar as Zo,as as Xo,at as Jo,p as be,au as La,J as me,av as Ua,aw as Ya,ax as Ga,ay as es,az as Ke,b as M,V as $e,aA as ts,L as as,aB as ns,f as os,s as ss,a5 as rs,aC as is,aD as cs,aE as ls,aF as ds,aG as we}from"./index-BkGKDMtv.js";import{u as us,n as Vt}from"./mui-CQYR1UI4.js";import{a as C}from"./sentry-uvO3Tp8f.js";import{w as Na}from"./withTransactionSidePanel-D8qNv0pH.js";import{t as Wa,a as Be,e as Se,b as Lt,c as Ut,v as ms}from"./routePaths-CiV55sI1.js";import{u as ie}from"./useAskAiCfoHostNavButtonProps-Ds1IYXBl.js";import Ve from"./NotFoundScreen-Da0kpRnr.js";import{t as st}from"./reportTimeframe-BsDWtESB.js";import{u as Yt}from"./useInitialThreadRequest-E--3OsRP.js";import{t as za}from"./analyticsHelper-Cqab08I6.js";import{C as ps}from"./CompanyPassportScreen-u9kNx3Tg.js";import{u as fs}from"./useAiCfoDashboardSuggestedQuestionsChips-U0l3bFxn.js";import{F as hs}from"./FeaturePreviewScreen-e7I8ExNO.js";import"./recharts-DNLEWX3j.js";import"./analytics-Dt3suRsK.js";import"./plaid-Db_iti-b.js";import"./dnd-DccPQo-x.js";import"./stripe-cKAAJElX.js";import"./lottie-D6SetWLo.js";import"./lexical-DQq5IX8L.js";import"./pdf-CqrelrTK.js";import"./utils-BUB23Z37.js";import"./TransactionDetailScreen-DvsztMnO.js";import"./decodeURIComponentSafe-CIIlt5ol.js";import"./expenseAutomationHelper-CTi3ttti.js";import"./stripSplatSuffix-C6Dmp1Fj.js";import"./MobileAppDrawer-BUD0j7G2.js";import"./InboxNotificationsProvider-BGgv9Z5e.js";import"./useTaskManagerAccess-DzHDJDg5.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]="327cf87f-3abd-433b-9699-49020b4084f2",e._sentryDebugIdIdentifier="sentry-dbid-327cf87f-3abd-433b-9699-49020b4084f2")}catch{}})();const gs=Na((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=Q(),s=U.getSignedInUser(),i=S((D=>D.tenantState.currentTenantId)),c=S((D=>L(D))),{tenantEmailDomain:m}=Q(),u=J(),p=c?.companyName??"",h={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},l=C.useMemo((()=>({authParams:h,companyName:p,downloadEndPoint:`${re}/agingDetailedReport`,timezone:at()})),[]),f=C.useMemo((()=>r!=null?q(r):xe()),[r]),b=K(),g=ee(),k=S((D=>Tn(D,f,o))),E=C.useCallback((()=>{o!=null&&k.fetchState!=="In-Progress"&&k.fetchState!=="Completed"&&b(wn(o,f))}),[f]),A=C.useCallback((()=>{g("../../",{relative:"path"})}),[]),_=C.useCallback(((D,w)=>{b(Zt({sortKey:D,sortOrder:w}))}),[]),x=C.useCallback((D=>{b(Zt({downloadState:D}))}),[]),Y=C.useCallback((D=>{if(e)e(D.transactionId,D.transactionType);else if(m!=null){const w=Wa({id:D.transactionId,type:D.transactionType},m);g(w);const y=R(u.state?.pathnameStackToGoBack,u.pathname);g(w,{state:{pathnameStackToGoBack:y}})}}),[m,e]),I=C.useCallback((()=>{k.vendor!=null&&O.trackApAgingDetail("AP Aging",f.format(H.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),k.vendor.id,k.vendor.name)}),[k.vendor,f]);return C.useEffect((()=>{E()}),[]),C.useEffect((()=>{k.fetchState==="Completed"&&I()}),[I,k.fetchState]),d.jsx(Ko,{apAgingDetail:k,downloadParams:l,reportDate:f,analytics:O,onTransactionClick:Y,onReload:E,onBackClick:A,onColumnSortConfigChanged:_,updateDownloadStateHandler:x,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),Cs=()=>{const e=K(),a=ee(),t=S((_=>xn(_))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ie({mobileExploreReferrer:"AP Aging"});ze({isDataReady:t.fetchState==="Completed"});const r=U.getSignedInUser(),s=S((_=>_.tenantState.currentTenantId)),i=S((_=>L(_))),c=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},u=C.useMemo((()=>({authParams:m,companyName:c,downloadEndPoint:`${re}/agingReport`,timezone:at()})),[]),p=t.apAgingUIState.selectedDate??xe(),h=C.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(kt(p))}),[]);C.useEffect((()=>{h()}),[]);const l=C.useCallback((()=>{a("../",{relative:"path"})}),[]),f=C.useCallback((_=>{e(Je({searchString:_}))}),[]),b=C.useCallback(((_,x)=>{e(Je({sortKey:x,sortOrder:_}))}),[]),g=C.useCallback((_=>{a(`./${_}/${p.format(H.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[p]),k=C.useCallback((_=>{e(Je({downloadState:_}))}),[]),E=C.useCallback(((_,x)=>{}),[]),A=C.useCallback(((_,x)=>{e(Je({selectedDate:_,agingDateSelectionType:x})),e(kt(_))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(qe,{analytics:O,onLoad:_=>_.trackPageLoaded(W.Event.agingReport,"AP Aging")}):null,d.jsx(Ra,{uiState:t.apAgingUIState,report:t,downloadParams:u,analytics:O,onReloadReport:h,onBackClick:l,onSearchTextChange:f,onSortOrderChange:b,onEntityNameClick:g,updateDownloadStateHandler:k,onSelectedDateChanged:A,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},bs=Na((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=Q(),s=U.getSignedInUser(),i=S((I=>L(I))),{tenantEmailDomain:c}=Q(),m=J(),u=i.companyName,p={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},h=C.useMemo((()=>({authParams:p,companyName:u,downloadEndPoint:`${re}/agingDetailedReport`,timezone:at()})),[]),l=C.useMemo((()=>r!=null?q(r):xe()),[r]),f=K(),b=ee(),g=S((I=>Pn(I,l,o))),k=C.useCallback((()=>{o!=null&&g.fetchState!=="In-Progress"&&g.fetchState!=="Completed"&&f(Fn(o,l))}),[l]),E=C.useCallback((()=>{b("../../",{relative:"path"})}),[]),A=C.useCallback(((I,D)=>{f(Xt({sortKey:I,sortOrder:D}))}),[]),_=C.useCallback((I=>{f(Xt({downloadState:I}))}),[]),x=C.useCallback((I=>{if(e)e(I.transactionId,I.transactionType);else if(c!=null){const D=Wa({id:I.transactionId,type:I.transactionType},c);b(D);const w=R(m.state?.pathnameStackToGoBack,m.pathname);b(D,{state:{pathnameStackToGoBack:w}})}}),[c,e]),Y=C.useCallback((()=>{g.customer!=null&&O.trackArAgingDetail("AR Aging",l.format(H.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),g.customer.id,g.customer.name)}),[g.customer,l]);return C.useEffect((()=>{k()}),[]),C.useEffect((()=>{g.fetchState==="Completed"&&Y()}),[g.fetchState,Y]),d.jsx($o,{arAgingDetail:g,downloadParams:h,reportDate:l,analytics:O,onTransactionClick:x,onReload:k,onBackClick:E,onColumnSortConfigChanged:A,updateDownloadStateHandler:_,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),Ss=()=>{const e=K(),a=ee(),t=S((A=>Rn(A))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ie({mobileExploreReferrer:"AR Aging"});ze({isDataReady:t.fetchState==="Completed"});const r=U.getSignedInUser(),s=S((A=>L(A))),i=s.companyName,c={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=C.useMemo((()=>({authParams:c,companyName:i,downloadEndPoint:`${re}/agingReport`,timezone:at()})),[]),u=t.arAgingUIState.selectedDate??xe(),p=C.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(yt(u))}),[]);C.useEffect((()=>{p()}),[]);const h=C.useCallback((()=>{a("../",{relative:"path"})}),[]),l=C.useCallback((A=>{e(et({searchString:A}))}),[]),f=C.useCallback(((A,_)=>{e(et({sortKey:_,sortOrder:A}))}),[]),b=C.useCallback((A=>{a(`./${A}/${u.format(H.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[u]),g=C.useCallback((A=>{e(et({downloadState:A}))}),[]),k=C.useCallback(((A,_)=>{e(et({selectedDate:A,agingDateSelectionType:_})),e(yt(A))}),[]),E=C.useCallback(((A,_)=>{e(Bn({nodeId:A,isCollapsed:_}))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(qe,{analytics:O,onLoad:A=>A.trackPageLoaded(W.Event.agingReport,"AR Aging")}):null,d.jsx(Ra,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:O,onReloadReport:p,onBackClick:h,onSearchTextChange:l,onSortOrderChange:f,onEntityNameClick:b,updateDownloadStateHandler:g,onSelectedDateChanged:k,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},qa=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function Ka(e,a){const t=Mn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=Be(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=R(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(Vn(n,o))}}}const _s=se((function(e){const a=jn(e).accountsInOrder.map(((t,n)=>qa(t,n)));return{sectionTitle:H.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,fetchState:e.cashBalanceState.fetchState,analytics:O}}),Ka)(Ba),ks=se((function(e){const a=Ln(e).accountsInOrder.map(((o,r)=>qa(o,r))),t=U.getSignedInUser(),n=nt(t);return{sectionTitle:H.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:O}}),Ka)(Ba);function ys(){const e=ee(),a=J(),{tenantEmailDomain:t}=Q(),n=S((o=>L(o).company?.companyInfo.firstMonthOfFY??1));return S((o=>o.cashBalanceState.fetchState))==="Error"?d.jsx(Ve,{}):d.jsx(_s,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,firstMonthOfFY:n})}function As(){const e=ee(),a=J(),{tenantEmailDomain:t}=Q(),n=S((o=>L(o).company?.companyInfo.firstMonthOfFY??1));return S((o=>o.cardBalanceState.fetchState))==="Error"?d.jsx(Ve,{}):d.jsx(ks,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,firstMonthOfFY:n})}const vs=Vt.div`
1
+ import{j as d}from"./liveblocks-CueKZN6-.js";import{i as Q,j as S,g as J,u as K,h as ee,l as se,k as fa,n as _t,o as F,N as On}from"./core-BQjZS2e8.js";import{fI as L,Vt as at,bE as q,bv as xe,Vu as Tn,kl as wn,Vv as Zt,Vw as xn,ko as kt,Vx as Je,Vy as Pn,kt as Fn,Vz as Xt,VA as Rn,kx as yt,VB as et,VC as Bn,VD as jn,VE as Mn,lz as Vn,VF as Ln,bm as nt,VG as ha,VH as he,bc as ga,lN as Ca,lw as ba,VI as ge,VJ as oe,fH as Sa,gd as Un,gt as At,VK as Yn,VL as Gn,VM as _a,l$ as Et,VN as Le,d0 as Ue,EH as Nn,VO as De,EA as Ye,EB as Ge,E_ as Pe,EU as Ce,EF as Ne,VP as Wn,d$ as We,VQ as zn,VR as qn,VS as ka,m4 as It,EI as Kn,VT as Oe,VU as $n,ei as ot,AH as ya,VV as Qn,VW as Aa,VX as Hn,VY as Zn,VZ as Xn,V_ as Dt,V$ as Ot,ur as Fe,ma as Re,q7 as Tt,EL as Jn,W0 as le,F8 as wt,AO as eo,AV as to,W1 as ao,W2 as no,EC as Jt,W3 as oo,AK as Te,AF as va,W4 as ea,W5 as so,W6 as xt,W7 as Pt,CR as Ea,W8 as ro,W9 as Ia,Wa as io,Wb as co,Wc as lo,Wd as Ft,q5 as Rt,EK as uo,We as de,D4 as mo,Db as po,Wf as fo,Wg as ho,EE as ta,Wh as go,CP as Da,Wi as aa,Wj as Co,bp as Oa,Fd as Ta,Wk as bo,Wl as wa,Wm as So,Wn as _o,Wo as ko,Wp as Bt,q6 as jt,EJ as yo,Wq as ue,F5 as Ao,F7 as vo,Wr as Eo,Ws as Io,ED as na,Wt as Do,Fb as xa,Wu as oa,Wv as Oo,Ww as To,Wx as Pa,q9 as Fa,Cc as wo,ed as xo,q3 as Po,V2 as Fo,qj as Ro,Wy as Bo,Wz as jo,WA as Mo,b5 as Mt,qd as Vo,ip as Lo,gL as Uo,qc as Yo,lp as Go,qa as No,q8 as Wo,eq as zo,ep as qo}from"./zeni-epic-state-DNah8dni.js";import{z as U,aj as re,v as R,e as O,G as H,ak as Ko,al as ze,a9 as qe,am as Ra,U as W,an as $o,ao as Ba,ap as Qo,aq as Ho,j as ja,a2 as Ma,a as Va,ar as Zo,as as Xo,at as Jo,p as be,au as La,J as me,av as Ua,aw as Ya,ax as Ga,ay as es,az as Ke,b as M,V as $e,aA as ts,L as as,aB as ns,f as os,s as ss,a5 as rs,aC as is,aD as cs,aE as ls,aF as ds,aG as we}from"./index-CJ5STb9-.js";import{u as us,n as Vt}from"./mui-CQYR1UI4.js";import{a as C}from"./sentry-uvO3Tp8f.js";import{w as Na}from"./withTransactionSidePanel-CWGkUAhT.js";import{t as Wa,a as Be,e as Se,b as Lt,c as Ut,v as ms}from"./routePaths-BHd2HKgD.js";import{u as ie}from"./useAskAiCfoHostNavButtonProps-DRyHY8Wp.js";import Ve from"./NotFoundScreen-BBLRr8ia.js";import{t as st}from"./reportTimeframe-BsDWtESB.js";import{u as Yt}from"./useInitialThreadRequest-DyMJpsaC.js";import{t as za}from"./analyticsHelper-dH62f0x-.js";import{C as ps}from"./CompanyPassportScreen-B5yjsWr2.js";import{u as fs}from"./useAiCfoDashboardSuggestedQuestionsChips-DyKCidZk.js";import{F as hs}from"./FeaturePreviewScreen-CF6zLPT7.js";import"./recharts-DNLEWX3j.js";import"./analytics-Dt3suRsK.js";import"./plaid-Db_iti-b.js";import"./dnd-DccPQo-x.js";import"./stripe-cKAAJElX.js";import"./lottie-D6SetWLo.js";import"./lexical-DQq5IX8L.js";import"./pdf-CqrelrTK.js";import"./utils-BUB23Z37.js";import"./TransactionDetailScreen-Cv6rkIx1.js";import"./decodeURIComponentSafe-CIIlt5ol.js";import"./expenseAutomationHelper-CTi3ttti.js";import"./stripSplatSuffix-C6Dmp1Fj.js";import"./MobileAppDrawer-Dv0pRBXr.js";import"./InboxNotificationsProvider-BGgv9Z5e.js";import"./useTaskManagerAccess-BrlsHMZY.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]="327cf87f-3abd-433b-9699-49020b4084f2",e._sentryDebugIdIdentifier="sentry-dbid-327cf87f-3abd-433b-9699-49020b4084f2")}catch{}})();const gs=Na((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=Q(),s=U.getSignedInUser(),i=S((D=>D.tenantState.currentTenantId)),c=S((D=>L(D))),{tenantEmailDomain:m}=Q(),u=J(),p=c?.companyName??"",h={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},l=C.useMemo((()=>({authParams:h,companyName:p,downloadEndPoint:`${re}/agingDetailedReport`,timezone:at()})),[]),f=C.useMemo((()=>r!=null?q(r):xe()),[r]),b=K(),g=ee(),k=S((D=>Tn(D,f,o))),E=C.useCallback((()=>{o!=null&&k.fetchState!=="In-Progress"&&k.fetchState!=="Completed"&&b(wn(o,f))}),[f]),A=C.useCallback((()=>{g("../../",{relative:"path"})}),[]),_=C.useCallback(((D,w)=>{b(Zt({sortKey:D,sortOrder:w}))}),[]),x=C.useCallback((D=>{b(Zt({downloadState:D}))}),[]),Y=C.useCallback((D=>{if(e)e(D.transactionId,D.transactionType);else if(m!=null){const w=Wa({id:D.transactionId,type:D.transactionType},m);g(w);const y=R(u.state?.pathnameStackToGoBack,u.pathname);g(w,{state:{pathnameStackToGoBack:y}})}}),[m,e]),I=C.useCallback((()=>{k.vendor!=null&&O.trackApAgingDetail("AP Aging",f.format(H.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),k.vendor.id,k.vendor.name)}),[k.vendor,f]);return C.useEffect((()=>{E()}),[]),C.useEffect((()=>{k.fetchState==="Completed"&&I()}),[I,k.fetchState]),d.jsx(Ko,{apAgingDetail:k,downloadParams:l,reportDate:f,analytics:O,onTransactionClick:Y,onReload:E,onBackClick:A,onColumnSortConfigChanged:_,updateDownloadStateHandler:x,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),Cs=()=>{const e=K(),a=ee(),t=S((_=>xn(_))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ie({mobileExploreReferrer:"AP Aging"});ze({isDataReady:t.fetchState==="Completed"});const r=U.getSignedInUser(),s=S((_=>_.tenantState.currentTenantId)),i=S((_=>L(_))),c=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},u=C.useMemo((()=>({authParams:m,companyName:c,downloadEndPoint:`${re}/agingReport`,timezone:at()})),[]),p=t.apAgingUIState.selectedDate??xe(),h=C.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(kt(p))}),[]);C.useEffect((()=>{h()}),[]);const l=C.useCallback((()=>{a("../",{relative:"path"})}),[]),f=C.useCallback((_=>{e(Je({searchString:_}))}),[]),b=C.useCallback(((_,x)=>{e(Je({sortKey:x,sortOrder:_}))}),[]),g=C.useCallback((_=>{a(`./${_}/${p.format(H.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[p]),k=C.useCallback((_=>{e(Je({downloadState:_}))}),[]),E=C.useCallback(((_,x)=>{}),[]),A=C.useCallback(((_,x)=>{e(Je({selectedDate:_,agingDateSelectionType:x})),e(kt(_))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(qe,{analytics:O,onLoad:_=>_.trackPageLoaded(W.Event.agingReport,"AP Aging")}):null,d.jsx(Ra,{uiState:t.apAgingUIState,report:t,downloadParams:u,analytics:O,onReloadReport:h,onBackClick:l,onSearchTextChange:f,onSortOrderChange:b,onEntityNameClick:g,updateDownloadStateHandler:k,onSelectedDateChanged:A,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},bs=Na((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=Q(),s=U.getSignedInUser(),i=S((I=>L(I))),{tenantEmailDomain:c}=Q(),m=J(),u=i.companyName,p={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},h=C.useMemo((()=>({authParams:p,companyName:u,downloadEndPoint:`${re}/agingDetailedReport`,timezone:at()})),[]),l=C.useMemo((()=>r!=null?q(r):xe()),[r]),f=K(),b=ee(),g=S((I=>Pn(I,l,o))),k=C.useCallback((()=>{o!=null&&g.fetchState!=="In-Progress"&&g.fetchState!=="Completed"&&f(Fn(o,l))}),[l]),E=C.useCallback((()=>{b("../../",{relative:"path"})}),[]),A=C.useCallback(((I,D)=>{f(Xt({sortKey:I,sortOrder:D}))}),[]),_=C.useCallback((I=>{f(Xt({downloadState:I}))}),[]),x=C.useCallback((I=>{if(e)e(I.transactionId,I.transactionType);else if(c!=null){const D=Wa({id:I.transactionId,type:I.transactionType},c);b(D);const w=R(m.state?.pathnameStackToGoBack,m.pathname);b(D,{state:{pathnameStackToGoBack:w}})}}),[c,e]),Y=C.useCallback((()=>{g.customer!=null&&O.trackArAgingDetail("AR Aging",l.format(H.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),g.customer.id,g.customer.name)}),[g.customer,l]);return C.useEffect((()=>{k()}),[]),C.useEffect((()=>{g.fetchState==="Completed"&&Y()}),[g.fetchState,Y]),d.jsx($o,{arAgingDetail:g,downloadParams:h,reportDate:l,analytics:O,onTransactionClick:x,onReload:k,onBackClick:E,onColumnSortConfigChanged:A,updateDownloadStateHandler:_,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),Ss=()=>{const e=K(),a=ee(),t=S((A=>Rn(A))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=ie({mobileExploreReferrer:"AR Aging"});ze({isDataReady:t.fetchState==="Completed"});const r=U.getSignedInUser(),s=S((A=>L(A))),i=s.companyName,c={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=C.useMemo((()=>({authParams:c,companyName:i,downloadEndPoint:`${re}/agingReport`,timezone:at()})),[]),u=t.arAgingUIState.selectedDate??xe(),p=C.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(yt(u))}),[]);C.useEffect((()=>{p()}),[]);const h=C.useCallback((()=>{a("../",{relative:"path"})}),[]),l=C.useCallback((A=>{e(et({searchString:A}))}),[]),f=C.useCallback(((A,_)=>{e(et({sortKey:_,sortOrder:A}))}),[]),b=C.useCallback((A=>{a(`./${A}/${u.format(H.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[u]),g=C.useCallback((A=>{e(et({downloadState:A}))}),[]),k=C.useCallback(((A,_)=>{e(et({selectedDate:A,agingDateSelectionType:_})),e(yt(A))}),[]),E=C.useCallback(((A,_)=>{e(Bn({nodeId:A,isCollapsed:_}))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(qe,{analytics:O,onLoad:A=>A.trackPageLoaded(W.Event.agingReport,"AR Aging")}):null,d.jsx(Ra,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:O,onReloadReport:p,onBackClick:h,onSearchTextChange:l,onSortOrderChange:f,onEntityNameClick:b,updateDownloadStateHandler:g,onSelectedDateChanged:k,onNodeCollapseToggled:E,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},qa=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function Ka(e,a){const t=Mn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=Be(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=R(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(Vn(n,o))}}}const _s=se((function(e){const a=jn(e).accountsInOrder.map(((t,n)=>qa(t,n)));return{sectionTitle:H.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,fetchState:e.cashBalanceState.fetchState,analytics:O}}),Ka)(Ba),ks=se((function(e){const a=Ln(e).accountsInOrder.map(((o,r)=>qa(o,r))),t=U.getSignedInUser(),n=nt(t);return{sectionTitle:H.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:O}}),Ka)(Ba);function ys(){const e=ee(),a=J(),{tenantEmailDomain:t}=Q(),n=S((o=>L(o).company?.companyInfo.firstMonthOfFY??1));return S((o=>o.cashBalanceState.fetchState))==="Error"?d.jsx(Ve,{}):d.jsx(_s,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,firstMonthOfFY:n})}function As(){const e=ee(),a=J(),{tenantEmailDomain:t}=Q(),n=S((o=>L(o).company?.companyInfo.firstMonthOfFY??1));return S((o=>o.cardBalanceState.fetchState))==="Error"?d.jsx(Ve,{}):d.jsx(ks,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,firstMonthOfFY:n})}const vs=Vt.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-CueKZN6-.js";import{a as u}from"./sentry-uvO3Tp8f.js";import{u as y,j as b,l as U,g as w,N as A}from"./core-BQjZS2e8.js";import{UN as N,fI as _,go as k,UO as R,hd as z,UP as L}from"./zeni-epic-state-DNah8dni.js";import{u as O,z as f,c as T,t as I,G as j,g as $}from"./index-BkGKDMtv.js";import"./mui-CQYR1UI4.js";import{t as P}from"./getLocaleForTenant-DFe6xj72.js";import"./recharts-DNLEWX3j.js";import"./analytics-Dt3suRsK.js";import"./plaid-Db_iti-b.js";import"./dnd-DccPQo-x.js";import"./stripe-cKAAJElX.js";import"./lottie-D6SetWLo.js";import"./lexical-DQq5IX8L.js";import"./pdf-CqrelrTK.js";import"./utils-BUB23Z37.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]="006a52c8-d404-4a63-a3ef-26b29a14f620",t._sentryDebugIdIdentifier="sentry-dbid-006a52c8-d404-4a63-a3ef-26b29a14f620")}catch{}})();const G=U((function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:L(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}=O(),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"&&!R(i))&&t(z(e.userId)))}),[n,a,i,d,t]),u.useEffect((()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())}),[m.tenantsCoreDetailsInOrder,n]),u.useEffect((()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(j.updateAppLocaleID(P(c)),o())}),[n,a,c]),v.jsx(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-CueKZN6-.js";import{a as u}from"./sentry-uvO3Tp8f.js";import{u as y,j as b,l as U,g as w,N as A}from"./core-BQjZS2e8.js";import{UN as N,fI as _,go as k,UO as R,hd as z,UP as L}from"./zeni-epic-state-DNah8dni.js";import{u as O,z as f,c as T,t as I,G as j,g as $}from"./index-CJ5STb9-.js";import"./mui-CQYR1UI4.js";import{t as P}from"./getLocaleForTenant-Bq1shd49.js";import"./recharts-DNLEWX3j.js";import"./analytics-Dt3suRsK.js";import"./plaid-Db_iti-b.js";import"./dnd-DccPQo-x.js";import"./stripe-cKAAJElX.js";import"./lottie-D6SetWLo.js";import"./lexical-DQq5IX8L.js";import"./pdf-CqrelrTK.js";import"./utils-BUB23Z37.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]="006a52c8-d404-4a63-a3ef-26b29a14f620",t._sentryDebugIdIdentifier="sentry-dbid-006a52c8-d404-4a63-a3ef-26b29a14f620")}catch{}})();const G=U((function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:L(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}=O(),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"&&!R(i))&&t(z(e.userId)))}),[n,a,i,d,t]),u.useEffect((()=>{f.isSignedIn()&&n==="Completed"&&m.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(m.tenantsCoreDetailsInOrder),o())}),[m.tenantsCoreDetailsInOrder,n]),u.useEffect((()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(j.updateAppLocaleID(P(c)),o())}),[n,a,c]),v.jsx(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-CueKZN6-.js";import{h as w,g as C,j as f,l as E,i as P}from"./core-BQjZS2e8.js";import{Xc as k,Xj as Z,gJ as z,gI as J,gH as L,k_ as Y,VJ as q,v3 as K,fI as B,WL as D,kY as T,Xd as v,Xu as F,kW as G,lh as j}from"./zeni-epic-state-DNah8dni.js";import{cV as M,a2 as R,p as N,z as U,a5 as p,b as S,a8 as X,cW as Q,R as _,cX as ee,v as te}from"./index-BkGKDMtv.js";import{u as H,n as O}from"./mui-CQYR1UI4.js";import"./sentry-uvO3Tp8f.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]="ceb05938-c306-4b58-a4d8-e4e064d7bc60",e._sentryDebugIdIdentifier="sentry-dbid-ceb05938-c306-4b58-a4d8-e4e064d7bc60")}catch{}})();const ae=E(null,(function(e,t){return{onSaveVendor:a=>{e(Y(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(q("common")),a!=null&&e(K(a))},onGetOtp:a=>{e(L(a,"BillPayVendor"))},onResendOtp:a=>{e(J(a,"BillPayVendor"))},onVerifyOtp:(a,n)=>{e(z(a,n,"BillPayVendor"))},onVerifyOtpSuccess:(a,n,o)=>{e(Z(a,n,o))}}}))(M);function W({vendorId:e,billId:t,isExpressPayPage:a}){const n=w(),o=C(),s=f((d=>k(d,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-CueKZN6-.js";import{h as w,g as C,j as f,l as E,i as P}from"./core-BQjZS2e8.js";import{Xc as k,Xj as Z,gJ as z,gI as J,gH as L,k_ as Y,VJ as q,v3 as K,fI as B,WL as D,kY as T,Xd as v,Xu as F,kW as G,lh as j}from"./zeni-epic-state-DNah8dni.js";import{cV as M,a2 as R,p as N,z as U,a5 as p,b as S,a8 as X,cW as Q,R as _,cX as ee,v as te}from"./index-CJ5STb9-.js";import{u as H,n as O}from"./mui-CQYR1UI4.js";import"./sentry-uvO3Tp8f.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]="ceb05938-c306-4b58-a4d8-e4e064d7bc60",e._sentryDebugIdIdentifier="sentry-dbid-ceb05938-c306-4b58-a4d8-e4e064d7bc60")}catch{}})();const ae=E(null,(function(e,t){return{onSaveVendor:a=>{e(Y(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(q("common")),a!=null&&e(K(a))},onGetOtp:a=>{e(L(a,"BillPayVendor"))},onResendOtp:a=>{e(J(a,"BillPayVendor"))},onVerifyOtp:(a,n)=>{e(z(a,n,"BillPayVendor"))},onVerifyOtpSuccess:(a,n,o)=>{e(Z(a,n,o))}}}))(M);function W({vendorId:e,billId:t,isExpressPayPage:a}){const n=w(),o=C(),s=f((d=>k(d,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-CueKZN6-.js";import{a2 as i,ac as l}from"./index-BkGKDMtv.js";import{u as f,D as p}from"./mui-CQYR1UI4.js";import"./sentry-uvO3Tp8f.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-CueKZN6-.js";import{a2 as i,ac as l}from"./index-CJ5STb9-.js";import{u as f,D as p}from"./mui-CQYR1UI4.js";import"./sentry-uvO3Tp8f.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-CueKZN6-.js";import{a as d}from"./sentry-uvO3Tp8f.js";import{h as B,u as G,g as q,i as F,j as l,N,l as V,n as _,o as O}from"./core-BQjZS2e8.js";import{a1j as z,fI as H,a03 as M,na as R,T4 as b,a1l as W,VH as Y,ma as $,T5 as S,a07 as J,a08 as K,VI as L,VJ as Q}from"./zeni-epic-state-DNah8dni.js";import{dt as U,e as X,a5 as Z,v as tt}from"./index-BkGKDMtv.js";import"./mui-CQYR1UI4.js";import{d as I}from"./decodeURIComponentSafe-CIIlt5ol.js";import{w as et}from"./withTransactionSidePanel-D8qNv0pH.js";import{e as at,t as nt}from"./routePaths-CiV55sI1.js";import"./recharts-DNLEWX3j.js";import"./analytics-Dt3suRsK.js";import"./plaid-Db_iti-b.js";import"./dnd-DccPQo-x.js";import"./stripe-cKAAJElX.js";import"./lottie-D6SetWLo.js";import"./lexical-DQq5IX8L.js";import"./pdf-CqrelrTK.js";import"./utils-BUB23Z37.js";import"./useAskAiCfoHostNavButtonProps-Ds1IYXBl.js";import"./TransactionDetailScreen-DvsztMnO.js";import"./useInitialThreadRequest-E--3OsRP.js";import"./expenseAutomationHelper-CTi3ttti.js";import"./stripSplatSuffix-C6Dmp1Fj.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]="13f7fd21-7ab3-42f5-8839-e76a71fb6e4d",a._sentryDebugIdIdentifier="sentry-dbid-13f7fd21-7ab3-42f5-8839-e76a71fb6e4d")}catch{}})();const ot=V((function(a,t){const e=t.entity,o=W(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:Y(a,"common")},trendWithTransactionsReport:o,analytics:X,isAccountingClassesEnabled:$(a)}}),(function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,c=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:c}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(L({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(Q("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(J()),a(K()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??k();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(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(b(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(U),it=et((function({entityType:a,...t}){const e=B(),o=G(),c=q(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:j,entityNameEncoded:x}=F(),r=I(j??""),f=I(x??""),p=rt(r,f),v=[r,f].filter((n=>n!=null)),i={name:f,id:r,type:a,zeniId:r,qboId:r},g=l((n=>z(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),w=l((n=>H(n).company?.companyInfo.firstMonthOfFY??1)),u=l((n=>M(n.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&p===!0&&(T(!0),o(R(i)))}),[m,p,i]);const E=l((n=>n.trendState.fetchState)),P=u?.selectedPeriod?.timePeriod??g,A=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(u?.selectedPeriod?.timePeriod,g);return d.useEffect((()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(b(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[m,h,E]),p?s.jsx(ot,{firstMonthOfFY:w,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:A,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(N,{to:k(v.length)})})),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,k=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function wt({entityType:a}){return s.jsx(_,{children:s.jsx(O,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{wt as EntityDetailRoutes,wt as default};
1
+ import{j as s}from"./liveblocks-CueKZN6-.js";import{a as d}from"./sentry-uvO3Tp8f.js";import{h as B,u as G,g as q,i as F,j as l,N,l as V,n as _,o as O}from"./core-BQjZS2e8.js";import{a1j as z,fI as H,a03 as M,na as R,T4 as b,a1l as W,VH as Y,ma as $,T5 as S,a07 as J,a08 as K,VI as L,VJ as Q}from"./zeni-epic-state-DNah8dni.js";import{dt as U,e as X,a5 as Z,v as tt}from"./index-CJ5STb9-.js";import"./mui-CQYR1UI4.js";import{d as I}from"./decodeURIComponentSafe-CIIlt5ol.js";import{w as et}from"./withTransactionSidePanel-CWGkUAhT.js";import{e as at,t as nt}from"./routePaths-BHd2HKgD.js";import"./recharts-DNLEWX3j.js";import"./analytics-Dt3suRsK.js";import"./plaid-Db_iti-b.js";import"./dnd-DccPQo-x.js";import"./stripe-cKAAJElX.js";import"./lottie-D6SetWLo.js";import"./lexical-DQq5IX8L.js";import"./pdf-CqrelrTK.js";import"./utils-BUB23Z37.js";import"./useAskAiCfoHostNavButtonProps-DRyHY8Wp.js";import"./TransactionDetailScreen-Cv6rkIx1.js";import"./useInitialThreadRequest-DyMJpsaC.js";import"./expenseAutomationHelper-CTi3ttti.js";import"./stripSplatSuffix-C6Dmp1Fj.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]="13f7fd21-7ab3-42f5-8839-e76a71fb6e4d",a._sentryDebugIdIdentifier="sentry-dbid-13f7fd21-7ab3-42f5-8839-e76a71fb6e4d")}catch{}})();const ot=V((function(a,t){const e=t.entity,o=W(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:Y(a,"common")},trendWithTransactionsReport:o,analytics:X,isAccountingClassesEnabled:$(a)}}),(function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,c=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:c}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(L({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(Q("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(J()),a(K()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??k();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(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(b(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(U),it=et((function({entityType:a,...t}){const e=B(),o=G(),c=q(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:j,entityNameEncoded:x}=F(),r=I(j??""),f=I(x??""),p=rt(r,f),v=[r,f].filter((n=>n!=null)),i={name:f,id:r,type:a,zeniId:r,qboId:r},g=l((n=>z(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),w=l((n=>H(n).company?.companyInfo.firstMonthOfFY??1)),u=l((n=>M(n.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&p===!0&&(T(!0),o(R(i)))}),[m,p,i]);const E=l((n=>n.trendState.fetchState)),P=u?.selectedPeriod?.timePeriod??g,A=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(u?.selectedPeriod?.timePeriod,g);return d.useEffect((()=>{m===!0&&h===!1&&E==="Completed"&&(D(!0),P!=null&&o(b(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[m,h,E]),p?s.jsx(ot,{firstMonthOfFY:w,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:A,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(N,{to:k(v.length)})})),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,k=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function wt({entityType:a}){return s.jsx(_,{children:s.jsx(O,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{wt as EntityDetailRoutes,wt as default};
@@ -1,4 +1,4 @@
1
- import{j as k}from"./liveblocks-CueKZN6-.js";import{u as Ie,h as Me,g as ge,j as M,i as Ae,s as po,t as Hn,l as ho,n as So,o as Je,N as fo}from"./core-BQjZS2e8.js";import{fI as xe,_p as Kn,qe as Be,h8 as Rt,AA as Io,_q as go,_r as Co,_s as ko,_t as yt,_u as ct,gk as wt,_v as bn,eH as bo,g3 as To,_w as Tn,_x as it,r5 as yo,v6 as Po,gW as vo,gU as Eo,_y as Ao,ri as xo,rr as Ro,qp as wo,qD as Wn,gT as me,gV as Do,_z as _o,qZ as Zn,rs as Fo,qA as Bo,qv as Mo,vc as Oo,gS as Ee,_A as dt,CJ as Qn,Nd as Xn,_B as ea,_C as Uo,G8 as ta,_D as $o,e$ as Vo,f1 as jo,t7 as Dt,_E as yn,_F as zo,md as Lo,_G as Go,mk as No,d5 as qo,E0 as _t,_H as Jo,_I as Yo,_J as Ho,_K as Ko,fp as Ft,sX as Pn,_L as Wo,VH as Zo,_M as Qo,_N as Xo,mm as es,_O as ts,RV as ns,ml as as,ma as os,qS as na,rx as ut,tK as aa,u4 as ss,UW as oa,rw as vn,rz as sa,rB as cs,bE as is,nJ as ls,nG as rs,rA as lt,ry as ve,_P as ds,rS as En,_Q as us,_R as ms,s$ as ps,t0 as hs,_S as Ss,Vt as ca,ZT as fs,_T as Is,VI as An,VJ as st,_U as xn,mB as gs,_V as Cs,_W as ks,_X as bs,_Y as Ts,qN as ys,_Z as Ps,__ as vs,_$ as Es,rI as As,mo as xs,mf as Rs,$0 as ws,mn as Rn,$1 as Ds,$2 as _s,$3 as Fs,uJ as Bs,uk as Ms,uj as Pt,$4 as Os,$5 as Us,$6 as $s,$7 as Vs,nU as js,bv as ia,nP as wn,nB as zs,$8 as Ls,h3 as Gs,nM as Ns,t9 as qs,tb as Js,sU as Ys,$9 as Hs,$a as Ks,FC as Ws,FB as Zs,FS as Qs,$b as Dn,s_ as Xs,sv as ec,$c as tc,sb as nc,sg as ac,sr as oc,se as sc,$d as cc,s7 as ic,sq as lc,t4 as rc,$e as dc,th as uc,sO as mc,tn as pc,sT as hc,rT as Sc,$f as fc,r9 as Ic,qJ as gc,qQ as _n,rD as Cc,$g as kc,$h as bc,$i as Tc,$j as yc,$k as Pc,$l as vc,$m as Ec,tr as Ac,$n as xc,$o as Rc,$p as Fn,uU as wc,ub as Dc,u0 as Bn,t_ as _c,$q as Fc,tP as Bc,tu as Mc,u1 as Oc,$r as Uc,$s as $c,tA as Vc,$t as jc,tv as zc,tz as Lc,tx as Gc,u7 as Nc,$u as Mn,qi as vt,$v as qc,Ec as On,cp as Jc,qE as Yc,$w as Hc}from"./zeni-epic-state-DNah8dni.js";import Ut from"./NotFoundScreen-Da0kpRnr.js";import{a as o,R as la}from"./sentry-uvO3Tp8f.js";import{n as Oe,S as Kc}from"./mui-CQYR1UI4.js";import{p as mt,b as X,e as te,v as ee,aC as ra,al as da,c0 as Wc,c1 as Zc,z as He,c2 as Bt,c3 as Qc,c4 as Xc,af as Ye,c5 as ei,c6 as Un,c7 as $n,c8 as ti,c9 as ni,a8 as ua,ca as ai,s as rt,j as oi,cb as si,cc as ci,k 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 gi,ck as Ci,aj as Mt,cl as ki,a5 as bi,cm as Ti,cn as yi}from"./index-BkGKDMtv.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-Ds1IYXBl.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-DvsztMnO.js";import{u as Di,a as _i,b as Fi}from"./useActualMatchingMatchDetail-DY4J4jvo.js";import{d as Bi}from"./decodeURIComponentSafe-CIIlt5ol.js";import{m as Vt,a as pa,b as ha,i as Ot}from"./expenseAutomationHelper-CTi3ttti.js";import{u as Sa,a as fa,w as Mi}from"./withTransactionSidePanel-D8qNv0pH.js";import{S as Oi,a as Ui,b as $i,J as Vi}from"./ScheduleDetailsPrepaidExpensesScreen-Cx-76x6C.js";import{s as jn,i as Ia,h as ji,f as zi,v as Li,t as Gi}from"./routePaths-CiV55sI1.js";import{a as Et}from"./accountMappingHelper-DrXX0Mo9.js";import{D as Ni}from"./DrawerScreen-Bl0Kb-2-.js";import"./recharts-DNLEWX3j.js";import"./analytics-Dt3suRsK.js";import"./plaid-Db_iti-b.js";import"./dnd-DccPQo-x.js";import"./stripe-cKAAJElX.js";import"./lottie-D6SetWLo.js";import"./lexical-DQq5IX8L.js";import"./pdf-CqrelrTK.js";import"./utils-BUB23Z37.js";import"./useInitialThreadRequest-E--3OsRP.js";import"./stripSplatSuffix-C6Dmp1Fj.js";import"./pathToGoBack-nfdDmjjO.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]="d82f56d8-203b-4018-bf8f-7c30f888b1b1",t._sentryDebugIdIdentifier="sentry-dbid-d82f56d8-203b-4018-bf8f-7c30f888b1b1")}catch{}})();const qi=()=>{const t=Ie(),n=Me(),h=ge(),p=M((m=>xe(m))),{useFeatureGate:S}=mt(),{isFeatureEnabled:i}=S(X.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=S(X.aiAuditScorePercentage),R=M((m=>m.expenseAutomationViewState.selectedPeriodByTenantId)),l=M((m=>Kn(m,p.tenantId))),{isAiCfoAccessEnabled:b,onAskAiCfoClick:f}=$t({mobileExploreReferrer:"Month-End Close Overview"}),v=o.useCallback(((m,d,g=!1)=>{t(Be({tenantId:d,period:{month:m.month,year:m.year},refreshViewInBackground:g}))}),[]),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]),C=R[p.tenantId],O=o.useCallback((()=>{const m=h.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&te.trackMonthCloseAuditPage(C.month,C.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,m??null),v(C,p.tenantId,!0)}),[v,C,p.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),_=ee(h.state?.pathnameStackToGoBack,h.pathname),Y=o.useCallback((()=>{if(l.monthEndCloseChecks!=null&&C!=null){const m=l.monthEndCloseChecks.monthEndCloseCheckList.find((d=>d.progress<100));if(m!=null)return void n(`./${m.id}/${C.month}-${C.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview"}});n(`./month_end_insights/${C.month}-${C.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview"}})}}),[l.monthEndCloseChecks,C]),{areTenantIdsInSync:w}=ra();return da({isDataReady:l.fetchState==="Completed"}),o.useEffect((()=>{C!=null&&l.fetchState!=="In-Progress"&&l.fetchState!=="Completed"&&w&&v(C,p.tenantId)}),[v,C,l.fetchState,p.tenantId,w]),o.useEffect((()=>{C!=null&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&w&&t(Io(C))}),[C,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(Wc,{monthEndCloseChecksView:l,isRealtimeInsightsFeatureEnabled:i,onMonthEndCheckClick:m=>{n(`./${m}/${C.month}-${C.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-CueKZN6-.js";import{u as Ie,h as Me,g as ge,j as M,i as Ae,s as po,t as Hn,l as ho,n as So,o as Je,N as fo}from"./core-BQjZS2e8.js";import{fI as xe,_p as Kn,qe as Be,h8 as Rt,AA as Io,_q as go,_r as Co,_s as ko,_t as yt,_u as ct,gk as wt,_v as bn,eH as bo,g3 as To,_w as Tn,_x as it,r5 as yo,v6 as Po,gW as vo,gU as Eo,_y as Ao,ri as xo,rr as Ro,qp as wo,qD as Wn,gT as me,gV as Do,_z as _o,qZ as Zn,rs as Fo,qA as Bo,qv as Mo,vc as Oo,gS as Ee,_A as dt,CJ as Qn,Nd as Xn,_B as ea,_C as Uo,G8 as ta,_D as $o,e$ as Vo,f1 as jo,t7 as Dt,_E as yn,_F as zo,md as Lo,_G as Go,mk as No,d5 as qo,E0 as _t,_H as Jo,_I as Yo,_J as Ho,_K as Ko,fp as Ft,sX as Pn,_L as Wo,VH as Zo,_M as Qo,_N as Xo,mm as es,_O as ts,RV as ns,ml as as,ma as os,qS as na,rx as ut,tK as aa,u4 as ss,UW as oa,rw as vn,rz as sa,rB as cs,bE as is,nJ as ls,nG as rs,rA as lt,ry as ve,_P as ds,rS as En,_Q as us,_R as ms,s$ as ps,t0 as hs,_S as Ss,Vt as ca,ZT as fs,_T as Is,VI as An,VJ as st,_U as xn,mB as gs,_V as Cs,_W as ks,_X as bs,_Y as Ts,qN as ys,_Z as Ps,__ as vs,_$ as Es,rI as As,mo as xs,mf as Rs,$0 as ws,mn as Rn,$1 as Ds,$2 as _s,$3 as Fs,uJ as Bs,uk as Ms,uj as Pt,$4 as Os,$5 as Us,$6 as $s,$7 as Vs,nU as js,bv as ia,nP as wn,nB as zs,$8 as Ls,h3 as Gs,nM as Ns,t9 as qs,tb as Js,sU as Ys,$9 as Hs,$a as Ks,FC as Ws,FB as Zs,FS as Qs,$b as Dn,s_ as Xs,sv as ec,$c as tc,sb as nc,sg as ac,sr as oc,se as sc,$d as cc,s7 as ic,sq as lc,t4 as rc,$e as dc,th as uc,sO as mc,tn as pc,sT as hc,rT as Sc,$f as fc,r9 as Ic,qJ as gc,qQ as _n,rD as Cc,$g as kc,$h as bc,$i as Tc,$j as yc,$k as Pc,$l as vc,$m as Ec,tr as Ac,$n as xc,$o as Rc,$p as Fn,uU as wc,ub as Dc,u0 as Bn,t_ as _c,$q as Fc,tP as Bc,tu as Mc,u1 as Oc,$r as Uc,$s as $c,tA as Vc,$t as jc,tv as zc,tz as Lc,tx as Gc,u7 as Nc,$u as Mn,qi as vt,$v as qc,Ec as On,cp as Jc,qE as Yc,$w as Hc}from"./zeni-epic-state-DNah8dni.js";import Ut from"./NotFoundScreen-BBLRr8ia.js";import{a as o,R as la}from"./sentry-uvO3Tp8f.js";import{n as Oe,S as Kc}from"./mui-CQYR1UI4.js";import{p as mt,b as X,e as te,v as ee,aC as ra,al as da,c0 as Wc,c1 as Zc,z as He,c2 as Bt,c3 as Qc,c4 as Xc,af as Ye,c5 as ei,c6 as Un,c7 as $n,c8 as ti,c9 as ni,a8 as ua,ca as ai,s as rt,j as oi,cb as si,cc as ci,k 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 gi,ck as Ci,aj as Mt,cl as ki,a5 as bi,cm as Ti,cn as yi}from"./index-CJ5STb9-.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-DRyHY8Wp.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-Cv6rkIx1.js";import{u as Di,a as _i,b as Fi}from"./useActualMatchingMatchDetail-D0rmHEbK.js";import{d as Bi}from"./decodeURIComponentSafe-CIIlt5ol.js";import{m as Vt,a as pa,b as ha,i as Ot}from"./expenseAutomationHelper-CTi3ttti.js";import{u as Sa,a as fa,w as Mi}from"./withTransactionSidePanel-CWGkUAhT.js";import{S as Oi,a as Ui,b as $i,J as Vi}from"./ScheduleDetailsPrepaidExpensesScreen-CaQr8kh1.js";import{s as jn,i as Ia,h as ji,f as zi,v as Li,t as Gi}from"./routePaths-BHd2HKgD.js";import{a as Et}from"./accountMappingHelper-DrXX0Mo9.js";import{D as Ni}from"./DrawerScreen-BkGImsqk.js";import"./recharts-DNLEWX3j.js";import"./analytics-Dt3suRsK.js";import"./plaid-Db_iti-b.js";import"./dnd-DccPQo-x.js";import"./stripe-cKAAJElX.js";import"./lottie-D6SetWLo.js";import"./lexical-DQq5IX8L.js";import"./pdf-CqrelrTK.js";import"./utils-BUB23Z37.js";import"./useInitialThreadRequest-DyMJpsaC.js";import"./stripSplatSuffix-C6Dmp1Fj.js";import"./pathToGoBack-nfdDmjjO.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]="d82f56d8-203b-4018-bf8f-7c30f888b1b1",t._sentryDebugIdIdentifier="sentry-dbid-d82f56d8-203b-4018-bf8f-7c30f888b1b1")}catch{}})();const qi=()=>{const t=Ie(),n=Me(),h=ge(),p=M((m=>xe(m))),{useFeatureGate:S}=mt(),{isFeatureEnabled:i}=S(X.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=S(X.aiAuditScorePercentage),R=M((m=>m.expenseAutomationViewState.selectedPeriodByTenantId)),l=M((m=>Kn(m,p.tenantId))),{isAiCfoAccessEnabled:b,onAskAiCfoClick:f}=$t({mobileExploreReferrer:"Month-End Close Overview"}),v=o.useCallback(((m,d,g=!1)=>{t(Be({tenantId:d,period:{month:m.month,year:m.year},refreshViewInBackground:g}))}),[]),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]),C=R[p.tenantId],O=o.useCallback((()=>{const m=h.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&te.trackMonthCloseAuditPage(C.month,C.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,m??null),v(C,p.tenantId,!0)}),[v,C,p.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),_=ee(h.state?.pathnameStackToGoBack,h.pathname),Y=o.useCallback((()=>{if(l.monthEndCloseChecks!=null&&C!=null){const m=l.monthEndCloseChecks.monthEndCloseCheckList.find((d=>d.progress<100));if(m!=null)return void n(`./${m.id}/${C.month}-${C.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview"}});n(`./month_end_insights/${C.month}-${C.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview"}})}}),[l.monthEndCloseChecks,C]),{areTenantIdsInSync:w}=ra();return da({isDataReady:l.fetchState==="Completed"}),o.useEffect((()=>{C!=null&&l.fetchState!=="In-Progress"&&l.fetchState!=="Completed"&&w&&v(C,p.tenantId)}),[v,C,l.fetchState,p.tenantId,w]),o.useEffect((()=>{C!=null&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&w&&t(Io(C))}),[C,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(Wc,{monthEndCloseChecksView:l,isRealtimeInsightsFeatureEnabled:i,onMonthEndCheckClick:m=>{n(`./${m}/${C.month}-${C.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-Da0kpRnr.js","assets/sentry-uvO3Tp8f.js","assets/core-BQjZS2e8.js","assets/zeni-epic-state-DNah8dni.js","assets/index-BkGKDMtv.js","assets/mui-CQYR1UI4.js","assets/analytics-Dt3suRsK.js","assets/utils-BUB23Z37.js","assets/index-BQ3cXEYt.css"])))=>i.map(i=>d[i]);
2
- import{_ as u}from"./zeni-epic-state-DNah8dni.js";import{j as a}from"./liveblocks-CueKZN6-.js";import{l as c}from"./index-BkGKDMtv.js";import"./sentry-uvO3Tp8f.js";import{N as e}from"./core-BQjZS2e8.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-Da0kpRnr.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-BBLRr8ia.js","assets/sentry-uvO3Tp8f.js","assets/core-BQjZS2e8.js","assets/zeni-epic-state-DNah8dni.js","assets/index-CJ5STb9-.js","assets/mui-CQYR1UI4.js","assets/analytics-Dt3suRsK.js","assets/utils-BUB23Z37.js","assets/index-BQ3cXEYt.css"])))=>i.map(i=>d[i]);
2
+ import{_ as u}from"./zeni-epic-state-DNah8dni.js";import{j as a}from"./liveblocks-CueKZN6-.js";import{l as c}from"./index-CJ5STb9-.js";import"./sentry-uvO3Tp8f.js";import{N as e}from"./core-BQjZS2e8.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-BBLRr8ia.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-CueKZN6-.js";import{a as r}from"./sentry-uvO3Tp8f.js";import{d7 as l,d8 as p,E as f,a5 as m}from"./index-BkGKDMtv.js";import"./mui-CQYR1UI4.js";import c from"./NotFoundScreen-Da0kpRnr.js";import{h as u,g as b}from"./core-BQjZS2e8.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]="29a2d667-058f-4840-9eae-30d46e50e9b4",e._sentryDebugIdIdentifier="sentry-dbid-29a2d667-058f-4840-9eae-30d46e50e9b4")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),d=r.useCallback((()=>{(()=>{const n=m(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=l(a.pathname);return o!=null?s.jsx(p,{menuItem:f(o),onDemoClick:t,onGoBack:d}):s.jsx(c,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
1
+ import{j as s}from"./liveblocks-CueKZN6-.js";import{a as r}from"./sentry-uvO3Tp8f.js";import{d7 as l,d8 as p,E as f,a5 as m}from"./index-CJ5STb9-.js";import"./mui-CQYR1UI4.js";import c from"./NotFoundScreen-BBLRr8ia.js";import{h as u,g as b}from"./core-BQjZS2e8.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]="29a2d667-058f-4840-9eae-30d46e50e9b4",e._sentryDebugIdIdentifier="sentry-dbid-29a2d667-058f-4840-9eae-30d46e50e9b4")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),d=r.useCallback((()=>{(()=>{const n=m(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=l(a.pathname);return o!=null?s.jsx(p,{menuItem:f(o),onDemoClick:t,onGoBack:d}):s.jsx(c,{})},k=(e=2)=>{let a="../";for(let t=0;t<e;t++)a=`${a}../`;return a};export{_ as F};
@@ -1 +1 @@
1
- import{a as i}from"./sentry-uvO3Tp8f.js";import{u as f,h as l,g as m}from"./core-BQjZS2e8.js";import{i7 as p,Vl as g,Vm as _}from"./zeni-epic-state-DNah8dni.js";import{u as b,c as h,z as y}from"./index-BkGKDMtv.js";import"./liveblocks-CueKZN6-.js";import"./recharts-DNLEWX3j.js";import"./mui-CQYR1UI4.js";import"./analytics-Dt3suRsK.js";import"./plaid-Db_iti-b.js";import"./dnd-DccPQo-x.js";import"./stripe-cKAAJElX.js";import"./lottie-D6SetWLo.js";import"./lexical-DQq5IX8L.js";import"./pdf-CqrelrTK.js";import"./utils-BUB23Z37.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]="a4d054a2-b7ab-40f6-920e-2844cfdead4f",e._sentryDebugIdIdentifier="sentry-dbid-a4d054a2-b7ab-40f6-920e-2844cfdead4f")}catch{}})();function V(){const e=f(),n=l(),r=m(),{setLoading:o,clearAllLoading:c}=b(),a=i.useRef(!1);return i.useLayoutEffect((()=>{o(h.CONNECTION_AUTH)}),[o]),i.useEffect((()=>{if(a.current)return;a.current=!0;const s=new URLSearchParams(r.search).get("code"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),s!=null&&d!=null){const t=JSON.parse(d);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:s,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}c();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{V as default};
1
+ import{a as i}from"./sentry-uvO3Tp8f.js";import{u as f,h as l,g as m}from"./core-BQjZS2e8.js";import{i7 as p,Vl as g,Vm as _}from"./zeni-epic-state-DNah8dni.js";import{u as b,c as h,z as y}from"./index-CJ5STb9-.js";import"./liveblocks-CueKZN6-.js";import"./recharts-DNLEWX3j.js";import"./mui-CQYR1UI4.js";import"./analytics-Dt3suRsK.js";import"./plaid-Db_iti-b.js";import"./dnd-DccPQo-x.js";import"./stripe-cKAAJElX.js";import"./lottie-D6SetWLo.js";import"./lexical-DQq5IX8L.js";import"./pdf-CqrelrTK.js";import"./utils-BUB23Z37.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]="a4d054a2-b7ab-40f6-920e-2844cfdead4f",e._sentryDebugIdIdentifier="sentry-dbid-a4d054a2-b7ab-40f6-920e-2844cfdead4f")}catch{}})();function V(){const e=f(),n=l(),r=m(),{setLoading:o,clearAllLoading:c}=b(),a=i.useRef(!1);return i.useLayoutEffect((()=>{o(h.CONNECTION_AUTH)}),[o]),i.useEffect((()=>{if(a.current)return;a.current=!0;const s=new URLSearchParams(r.search).get("code"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),s!=null&&d!=null){const t=JSON.parse(d);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:s,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}c();const u=y.getActiveTenantForUser();n(u?.tenantEmailDomain!=null?`/${u.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{V as default};