@zeniai/web-app-ui 5.4.18-dev → 5.4.18-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-4Zeu95kU.js → AccountMappingScreen-C1mI6FhI.js} +1 -1
  2. package/dist/assets/{ActualMatchingMatchDetailScreen-B6pl-MVl.js → ActualMatchingMatchDetailScreen-447MeFRj.js} +1 -1
  3. package/dist/assets/{AddressRoutes-zjWkB0xf.js → AddressRoutes-DEt8pBse.js} +1 -1
  4. package/dist/assets/{AddressScreen-Czlolp2X.js → AddressScreen-xJe-BUcq.js} +1 -1
  5. package/dist/assets/{AiCfoScreen-BhfmD__h.js → AiCfoScreen-BlVb80p-.js} +1 -1
  6. package/dist/assets/{AppDrawer-B7GEeTxi.js → AppDrawer-CccwR_1X.js} +1 -1
  7. package/dist/assets/{BillPayApprovalRoutes-B4dh4WxY.js → BillPayApprovalRoutes-CRcK-ghX.js} +1 -1
  8. package/dist/assets/{BillPayRoutes-DZx-x_-P.js → BillPayRoutes-C5bJ-Ydp.js} +1 -1
  9. package/dist/assets/{BusinessVerificationPageScreen-je1np7-9.js → BusinessVerificationPageScreen-l4hZrFSW.js} +1 -1
  10. package/dist/assets/{CardsAiCfoScreen-abedaxWu.js → CardsAiCfoScreen-I8vZAgcM.js} +1 -1
  11. package/dist/assets/{ChargeCardRoutes-Db9V9An_.js → ChargeCardRoutes-6PoTVCBp.js} +1 -1
  12. package/dist/assets/{CompanyPassportScreen-Db20J8Yl.js → CompanyPassportScreen-bYWzgq92.js} +1 -1
  13. package/dist/assets/{ConnectionAuthScreen-BmJpUHtJ.js → ConnectionAuthScreen-Bc0bdA8g.js} +1 -1
  14. package/dist/assets/{CustomerOnboardingAuthScreen-Deo-LVYJ.js → CustomerOnboardingAuthScreen-BPJoOlEP.js} +1 -1
  15. package/dist/assets/{CustomerOnboardingRoutes-De4sHn4O.js → CustomerOnboardingRoutes-BibF5HDF.js} +1 -1
  16. package/dist/assets/{DashboardRoutes-CCGs4e1_.js → DashboardRoutes-DQ0XZ18a.js} +1 -1
  17. package/dist/assets/{DefaultTenantHome-BN__AQ5l.js → DefaultTenantHome-C285BI3q.js} +1 -1
  18. package/dist/assets/{DomesticWireDetailScreen-6W-Er5_q.js → DomesticWireDetailScreen-wA009aP8.js} +1 -1
  19. package/dist/assets/{DrawerScreen-DUhkZI2Z.js → DrawerScreen-DWyOpsL-.js} +1 -1
  20. package/dist/assets/{EntityDetailRoutes-BrJAd36h.js → EntityDetailRoutes-BHa_BFuf.js} +1 -1
  21. package/dist/assets/{ExpenseAutomationRoutes-DcjeaHHd.js → ExpenseAutomationRoutes-VmcQKEm0.js} +1 -1
  22. package/dist/assets/{FallBackRoute-orqRsHMl.js → FallBackRoute-CNIZrbgT.js} +2 -2
  23. package/dist/assets/{FeaturePreviewScreen-Dcu53_tf.js → FeaturePreviewScreen-kqfOCE7B.js} +1 -1
  24. package/dist/assets/{HubSpotOAuthCallbackScreen-ClZsPGpZ.js → HubSpotOAuthCallbackScreen-Dkd5R4Ez.js} +1 -1
  25. package/dist/assets/{InvoicingRoutes-BTvzZ8JV.js → InvoicingRoutes-GvDq092q.js} +1 -1
  26. package/dist/assets/{MagicLinkRoutes-V1DxaNiW.js → MagicLinkRoutes-BXTLhc2H.js} +1 -1
  27. package/dist/assets/{MagicLinkSignInScreen-DnCx8Y6G.js → MagicLinkSignInScreen-D8ETsYEy.js} +1 -1
  28. package/dist/assets/{MobileAppDrawer-Bql3K6nh.js → MobileAppDrawer-BLB42Sqj.js} +1 -1
  29. package/dist/assets/{NotFoundScreen-CTik05r2.js → NotFoundScreen-CkbqMgGf.js} +1 -1
  30. package/dist/assets/{NotificationRoutes-wSm6mA8N.js → NotificationRoutes-BaJBiFUm.js} +1 -1
  31. package/dist/assets/{OAuthConsentScreen-BELrcqAy.js → OAuthConsentScreen-Bv0KWQUL.js} +1 -1
  32. package/dist/assets/{PandLWithForecastRoutes-Dpao8SIb.js → PandLWithForecastRoutes-BSSYGmP3.js} +1 -1
  33. package/dist/assets/{PaymentLinkScreen-vbM_NtP3.js → PaymentLinkScreen-DgO8So9o.js} +1 -1
  34. package/dist/assets/{PeopleRoutes-CJeBX2Ca.js → PeopleRoutes-DmSlJQMt.js} +1 -1
  35. package/dist/assets/{PerformanceRoutes-W4NxEUmH.js → PerformanceRoutes-DxEXbNyB.js} +1 -1
  36. package/dist/assets/{QBOConnectionScreen-BEn_CddB.js → QBOConnectionScreen-CmO2Xstu.js} +1 -1
  37. package/dist/assets/{ReimbursementApprovalRoutes-CSZJghRB.js → ReimbursementApprovalRoutes-JJBD0eaW.js} +1 -1
  38. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-kqCAU4nf.js → ReimbursementApprovalRuleDetailScreen-DzH249hg.js} +1 -1
  39. package/dist/assets/{ReimbursementRoutes-BUZKWvJ7.js → ReimbursementRoutes-Q4fU9Mae.js} +1 -1
  40. package/dist/assets/{ReportsRoutes-BUZ4r7hx.js → ReportsRoutes-WEPMG0Rg.js} +1 -1
  41. package/dist/assets/{RewardsRoutes-DuYZ4TXP.js → RewardsRoutes-BlNDw5yu.js} +1 -1
  42. package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-DN2DZsFw.js → ScheduleDetailsPrepaidExpensesScreen-CU1XLAAM.js} +1 -1
  43. package/dist/assets/{ScreenRoutes-CxP9HSCe.js → ScreenRoutes-qYSXLfX4.js} +2 -2
  44. package/dist/assets/{SettingsRoutes-CCWla9X1.js → SettingsRoutes-DyzUa1Sw.js} +1 -1
  45. package/dist/assets/{SetupPagesScreen-C5PRNruc.js → SetupPagesScreen-U6sa8lUC.js} +1 -1
  46. package/dist/assets/{SignInScreen-BScZ138a.js → SignInScreen-Cd7wqB4D.js} +1 -1
  47. package/dist/assets/{SignOutScreen-Bk-Y8Sbv.js → SignOutScreen-C1ZT_zLl.js} +1 -1
  48. package/dist/assets/{TaskListScreen-C7smUYFP.js → TaskListScreen-CuUJPMlJ.js} +1 -1
  49. package/dist/assets/{TaskRoutes-DPcu4NRR.js → TaskRoutes-DLg5TYuo.js} +1 -1
  50. package/dist/assets/{TransactionDetailRoutes-yEwix446.js → TransactionDetailRoutes-cCcvjic8.js} +1 -1
  51. package/dist/assets/{TransactionDetailScreen-CHzsnTr9.js → TransactionDetailScreen-tgGXyDPF.js} +1 -1
  52. package/dist/assets/{TransactionListRoutes-ChJOrV96.js → TransactionListRoutes-CQa6--Ev.js} +1 -1
  53. package/dist/assets/{TreasuryRoutes-C24SAGLB.js → TreasuryRoutes-_PhXEmag.js} +1 -1
  54. package/dist/assets/{VendorsRoutes-CVu8jS5h.js → VendorsRoutes-CmjdKNhT.js} +1 -1
  55. package/dist/assets/{WiseConfirmationScreen-Dt6hB5m-.js → WiseConfirmationScreen-DEg3EFIb.js} +1 -1
  56. package/dist/assets/{ZeniAccountRoutes-D3ONSR9y.js → ZeniAccountRoutes-DDQJM_hy.js} +1 -1
  57. package/dist/assets/{ZeniAccountStatementScreen-CmfHt6Wr.js → ZeniAccountStatementScreen-B7PCif1X.js} +1 -1
  58. package/dist/assets/{analyticsHelper-DkNc3mKz.js → analyticsHelper-D6_ANm__.js} +1 -1
  59. package/dist/assets/{getLocaleForTenant-DTPcYF0O.js → getLocaleForTenant-2khEt-Ua.js} +1 -1
  60. package/dist/assets/{index-ClwW47Zs.js → index-DdfNajYr.js} +6 -6
  61. package/dist/assets/{routePaths-D0jOibXk.js → routePaths-Bt11blZQ.js} +1 -1
  62. package/dist/assets/{useActualMatchingMatchDetail-nJ3hpXEY.js → useActualMatchingMatchDetail-Cvov37bY.js} +1 -1
  63. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-usJW6KKQ.js → useAiCfoDashboardSuggestedQuestionsChips-1xqNBc2H.js} +1 -1
  64. package/dist/assets/{useAskAiCfoHostNavButtonProps-CWWQxV2L.js → useAskAiCfoHostNavButtonProps-Dbd_alyv.js} +1 -1
  65. package/dist/assets/{useChargeCardPusherEvents-DPfHk-vM.js → useChargeCardPusherEvents-eplpnku9.js} +1 -1
  66. package/dist/assets/{useEmailConnectResultRefresh-B6j7j1rG.js → useEmailConnectResultRefresh-CIWk93Du.js} +1 -1
  67. package/dist/assets/{useInitialThreadRequest-DmfmyzKI.js → useInitialThreadRequest-SDz0QMSn.js} +1 -1
  68. package/dist/assets/{useTaskManagerAccess-DrmpkeUw.js → useTaskManagerAccess-Byl1eBb6.js} +1 -1
  69. package/dist/assets/{useTaskManagerPusherEvents-CHhZ2DRZ.js → useTaskManagerPusherEvents-B9IdLCbV.js} +1 -1
  70. package/dist/assets/{withTransactionSidePanel-CKC1_4cy.js → withTransactionSidePanel-CTsbYdVH.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-CuUK5O_2.js";import{a as g}from"./sentry-D0lP5-8e.js";import{h as w,u as x,g as E,i as T,j as O,l as k}from"./core-BBlQ3ArL.js";import{z as h,aZ as F,a9 as P,d as j,U as V,C as b,a8 as L,bf as A,af as U,bg as M,q as B}from"./index-ClwW47Zs.js";import{fI as N,gL as _,C8 as G,gG as R,c7 as Y,YE as z,bm as Z,vc as q,v0 as H,mK as K,oj as S,YF as $,bE as J,cv as C,ou as Q,oE as W}from"./zeni-epic-state-aUBx6G2Q.js";import"./mui--aGBnNu2.js";import{d as X}from"./routePaths-D0jOibXk.js";import{M as ee}from"./MobileAppDrawer-Bql3K6nh.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]="b276b329-7121-4398-aa59-2d41ddfdf7b0",a._sentryDebugIdIdentifier="sentry-dbid-b276b329-7121-4398-aa59-2d41ddfdf7b0")}catch{}})();const te=k((function(a){const n=R(a),i=h.getSignedInUser(),p=N(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:v}=r,D={companyInfo:{...t,website:m!=""&&m!=null?C(m):void 0,meetingLink:f!=""&&f!=null?C(f):void 0,industry:t.industry.selectedOption,companyIndustryType:t.companyIndustryType?.selectedOption??void 0,companySubIndustry:t.companySubIndustry?.selectedOption??void 0,businessModel:t.businessModel.selectedOption??"",companySourceOfFunds:t.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:t.companySourceOfFundsDescription??void 0,countriesOfOperations:t.countriesOfOperations?.selectedOptions?.map((I=>I.length===2?I:M(I)))??[],transactionVolume:t.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:t.transactionVolumeDescription??void 0,regulatedStatus:t.regulatedStatus??void 0,regulatedStatusDescription:t.regulatedStatusDescription??void 0,usNexus:t.usNexus??void 0,usNexusTypes:t.usNexusTypes?.selectedOptions??[],purposeOfAccount:t.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:t.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?J(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:v.selectedOptions.map((I=>parseInt(I))),fileId:r.fileIds[0]}};a(S({companyDetails:D}))},onPrimaryContactDetailsUpdated:e=>{a(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{a(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:void 0}]}))},onNewCompanyOfficerRemoved:e=>{a($(e))},onCompanyOfficerUpdated:e=>{a(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:e.userId}]}))},updateFilesEntity:e=>{a(K({files:e}))},onDeleteFile:e=>{a(H(e))},onEditFileName:(e,t)=>{a(q(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=O((s=>s.companyViewState.passportView.fetchState)),o=O((s=>s.companyConfigState.fetchState)),r=O((s=>N(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,b(i)?"Settings":"Company Passport")}),b(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:b(i),onClickMenuIcon:()=>{m(!0)}})]})}export{le as C};
1
+ import{j as l}from"./liveblocks-CuUK5O_2.js";import{a as g}from"./sentry-D0lP5-8e.js";import{h as w,u as x,g as E,i as T,j as O,l as k}from"./core-BBlQ3ArL.js";import{z as h,aZ as F,a9 as P,d as j,U as V,C as b,a8 as L,bf as A,af as U,bg as M,q as B}from"./index-DdfNajYr.js";import{fI as N,gL as _,C8 as G,gG as R,c7 as Y,YE as z,bm as Z,vc as q,v0 as H,mK as K,oj as S,YF as $,bE as J,cv as C,ou as Q,oE as W}from"./zeni-epic-state-aUBx6G2Q.js";import"./mui--aGBnNu2.js";import{d as X}from"./routePaths-Bt11blZQ.js";import{M as ee}from"./MobileAppDrawer-BLB42Sqj.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]="b276b329-7121-4398-aa59-2d41ddfdf7b0",a._sentryDebugIdIdentifier="sentry-dbid-b276b329-7121-4398-aa59-2d41ddfdf7b0")}catch{}})();const te=k((function(a){const n=R(a),i=h.getSignedInUser(),p=N(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:v}=r,D={companyInfo:{...t,website:m!=""&&m!=null?C(m):void 0,meetingLink:f!=""&&f!=null?C(f):void 0,industry:t.industry.selectedOption,companyIndustryType:t.companyIndustryType?.selectedOption??void 0,companySubIndustry:t.companySubIndustry?.selectedOption??void 0,businessModel:t.businessModel.selectedOption??"",companySourceOfFunds:t.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:t.companySourceOfFundsDescription??void 0,countriesOfOperations:t.countriesOfOperations?.selectedOptions?.map((I=>I.length===2?I:M(I)))??[],transactionVolume:t.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:t.transactionVolumeDescription??void 0,regulatedStatus:t.regulatedStatus??void 0,regulatedStatusDescription:t.regulatedStatusDescription??void 0,usNexus:t.usNexus??void 0,usNexusTypes:t.usNexusTypes?.selectedOptions??[],purposeOfAccount:t.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:t.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?J(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:v.selectedOptions.map((I=>parseInt(I))),fileId:r.fileIds[0]}};a(S({companyDetails:D}))},onPrimaryContactDetailsUpdated:e=>{a(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{a(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:void 0}]}))},onNewCompanyOfficerRemoved:e=>{a($(e))},onCompanyOfficerUpdated:e=>{a(S({officers:[{officerType:e.officerType,email:e.email.trim(),phone:e.phone,firstName:e.name.firstName,lastName:e.name.lastName,userId:e.userId}]}))},updateFilesEntity:e=>{a(K({files:e}))},onDeleteFile:e=>{a(H(e))},onEditFileName:(e,t)=>{a(q(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=O((s=>s.companyViewState.passportView.fetchState)),o=O((s=>s.companyConfigState.fetchState)),r=O((s=>N(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,b(i)?"Settings":"Company Passport")}),b(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:b(i),onClickMenuIcon:()=>{m(!0)}})]})}export{le as C};
@@ -1,4 +1,4 @@
1
- import{j as I}from"./liveblocks-CuUK5O_2.js";import{a as o}from"./sentry-D0lP5-8e.js";import{u as F,h as L,g as H,j as C,N as w}from"./core-BBlQ3ArL.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-aUBx6G2Q.js";import{u as K,z as E,b as D,G as M,R as W}from"./index-ClwW47Zs.js";import{n as X}from"./mui--aGBnNu2.js";import{P as b,a as T}from"./AccountMappingScreen-4Zeu95kU.js";import{t as Y}from"./getLocaleForTenant-DTPcYF0O.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-BEn_CddB.js";import"./recharts-CkREU3LH.js";import"./analytics-D051O7ML.js";import"./plaid-7P9b69CP.js";import"./dnd-CU3yeazS.js";import"./stripe-cKAAJElX.js";import"./lottie-Du4lbH8J.js";import"./lexical-DVH-xgq1.js";import"./pdf-CrvsvvW3.js";import"./utils-Ctp9Zfhk.js";import"./MobileAppDrawer-Bql3K6nh.js";import"./InboxNotificationsProvider-DiTDJFwP.js";import"./useTaskManagerAccess-DrmpkeUw.js";import"./accountMappingHelper-CHQgwqfy.js";import"./empty-BiAWzWBi.js";import"./pdf-lib-Cvsvldn7.js";import"./index--CQENyaz.js";import"./url-nN4BnP9N.js";import"./index-ae04Qn4V.js";import"./decodeURIComponentSafe-YbpxzvKa.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]="89febcc8-aff1-4c6b-a25a-5a2b69ec4896",t._sentryDebugIdIdentifier="sentry-dbid-89febcc8-aff1-4c6b-a25a-5a2b69ec4896")}catch{}})();const te=X.div`
1
+ import{j as I}from"./liveblocks-CuUK5O_2.js";import{a as o}from"./sentry-D0lP5-8e.js";import{u as F,h as L,g as H,j as C,N as w}from"./core-BBlQ3ArL.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-aUBx6G2Q.js";import{u as K,z as E,b as D,G as M,R as W}from"./index-DdfNajYr.js";import{n as X}from"./mui--aGBnNu2.js";import{P as b,a as T}from"./AccountMappingScreen-C1mI6FhI.js";import{t as Y}from"./getLocaleForTenant-2khEt-Ua.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-CmO2Xstu.js";import"./recharts-CkREU3LH.js";import"./analytics-D051O7ML.js";import"./plaid-7P9b69CP.js";import"./dnd-CU3yeazS.js";import"./stripe-cKAAJElX.js";import"./lottie-Du4lbH8J.js";import"./lexical-DVH-xgq1.js";import"./pdf-CrvsvvW3.js";import"./utils-Ctp9Zfhk.js";import"./MobileAppDrawer-BLB42Sqj.js";import"./InboxNotificationsProvider-DiTDJFwP.js";import"./useTaskManagerAccess-Byl1eBb6.js";import"./accountMappingHelper-CHQgwqfy.js";import"./empty-BiAWzWBi.js";import"./pdf-lib-Cvsvldn7.js";import"./index--CQENyaz.js";import"./url-nN4BnP9N.js";import"./index-ae04Qn4V.js";import"./decodeURIComponentSafe-YbpxzvKa.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]="89febcc8-aff1-4c6b-a25a-5a2b69ec4896",t._sentryDebugIdIdentifier="sentry-dbid-89febcc8-aff1-4c6b-a25a-5a2b69ec4896")}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-CuUK5O_2.js";import{z as m}from"./index-ClwW47Zs.js";import{g as n}from"./QBOConnectionScreen-BEn_CddB.js";import"./sentry-D0lP5-8e.js";import{g as p,N as a}from"./core-BBlQ3ArL.js";import"./zeni-epic-state-aUBx6G2Q.js";import"./recharts-CkREU3LH.js";import"./mui--aGBnNu2.js";import"./analytics-D051O7ML.js";import"./plaid-7P9b69CP.js";import"./dnd-CU3yeazS.js";import"./stripe-cKAAJElX.js";import"./lottie-Du4lbH8J.js";import"./lexical-DVH-xgq1.js";import"./pdf-CrvsvvW3.js";import"./utils-Ctp9Zfhk.js";import"./empty-BiAWzWBi.js";import"./pdf-lib-Cvsvldn7.js";import"./index--CQENyaz.js";import"./url-nN4BnP9N.js";import"./index-ae04Qn4V.js";import"./decodeURIComponentSafe-YbpxzvKa.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-CuUK5O_2.js";import{z as m}from"./index-DdfNajYr.js";import{g as n}from"./QBOConnectionScreen-CmO2Xstu.js";import"./sentry-D0lP5-8e.js";import{g as p,N as a}from"./core-BBlQ3ArL.js";import"./zeni-epic-state-aUBx6G2Q.js";import"./recharts-CkREU3LH.js";import"./mui--aGBnNu2.js";import"./analytics-D051O7ML.js";import"./plaid-7P9b69CP.js";import"./dnd-CU3yeazS.js";import"./stripe-cKAAJElX.js";import"./lottie-Du4lbH8J.js";import"./lexical-DVH-xgq1.js";import"./pdf-CrvsvvW3.js";import"./utils-Ctp9Zfhk.js";import"./empty-BiAWzWBi.js";import"./pdf-lib-Cvsvldn7.js";import"./index--CQENyaz.js";import"./url-nN4BnP9N.js";import"./index-ae04Qn4V.js";import"./decodeURIComponentSafe-YbpxzvKa.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-CuUK5O_2.js";import{t as wn,A as $e}from"./AddressScreen-Czlolp2X.js";import An from"./NotFoundScreen-CTik05r2.js";import{a as d,x as Me}from"./sentry-D0lP5-8e.js";import{h as _e,g as xe,u as se,i as Te,j as E,N as Q,q as Pn,l as cn,n as Dn,o as H}from"./core-BBlQ3ArL.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 Ce,i4 as Hn,Vl as be,i1 as Yn,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 ht,C1 as Ct,CA as bt,CD as St,CG as It,CM as kt,d3 as Ot}from"./zeni-epic-state-aUBx6G2Q.js";import{z,p as Pe,N as J,x as vt,q,a9 as re,d as g,dm as _t,az as fn,a2 as xt,h as yn,V as hn,m as W,_ as ge,U as ve,dn as Tt,R as qe,H as He,af as Et,bg as Ye,dp as wt,dq as At}from"./index-ClwW47Zs.js";import{n as De}from"./mui--aGBnNu2.js";import{g as Pt,h as Dt,q as ie}from"./QBOConnectionScreen-BEn_CddB.js";import{u as jt,a as Ft}from"./useEmailConnectResultRefresh-B6j7j1rG.js";import{u as Bt}from"./useChargeCardPusherEvents-DPfHk-vM.js";import"./recharts-CkREU3LH.js";import"./analytics-D051O7ML.js";import"./plaid-7P9b69CP.js";import"./dnd-CU3yeazS.js";import"./stripe-cKAAJElX.js";import"./lottie-Du4lbH8J.js";import"./lexical-DVH-xgq1.js";import"./pdf-CrvsvvW3.js";import"./utils-Ctp9Zfhk.js";import"./empty-BiAWzWBi.js";import"./pdf-lib-Cvsvldn7.js";import"./index--CQENyaz.js";import"./url-nN4BnP9N.js";import"./index-ae04Qn4V.js";import"./decodeURIComponentSafe-YbpxzvKa.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]="5f13d2bb-3599-40f7-ac41-84a5a728184c",e._sentryDebugIdIdentifier="sentry-dbid-5f13d2bb-3599-40f7-ac41-84a5a728184c")}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=xe(),i=se(),[o,p]=d.useState(!1),[u,c]=d.useState(!1),{tenantEmailDomain:v}=Te(),n=z.getSignedInUser(),{useFeatureGate:t}=Pe(),{isFeatureEnabled:C}=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,h=_?.resources?.find((S=>S.resource==="/reports/task_card"))==null,r=O?.userRole!=null&&jn(O?.userRole),x=_?.resources?.find((S=>S.resource==="/bills"))==null&&!r,T=_?.resources?.find((S=>S.resource==="/reimbursements"))==null;U===!1&&D.push("top_expenses"),h===!1&&D.push("task_card"),x===!1&&D.push("bill_pay_card","bill_pay_promo_card"),T===!1&&D.push("reimbursement_card","reimbursement_promo_card"),D.push("zeni_accounts_promo_card","treasury_promo_card"),A===!1&&D.push("rewards_card");const f=E((S=>{const V=[];C===!1&&V.push("accounts_payable_aging"),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 Y=Fn(S,V);return Bn(Y.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-CuUK5O_2.js";import{t as wn,A as $e}from"./AddressScreen-xJe-BUcq.js";import An from"./NotFoundScreen-CkbqMgGf.js";import{a as d,x as Me}from"./sentry-D0lP5-8e.js";import{h as _e,g as xe,u as se,i as Te,j as E,N as Q,q as Pn,l as cn,n as Dn,o as H}from"./core-BBlQ3ArL.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 Ce,i4 as Hn,Vl as be,i1 as Yn,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 ht,C1 as Ct,CA as bt,CD as St,CG as It,CM as kt,d3 as Ot}from"./zeni-epic-state-aUBx6G2Q.js";import{z,p as Pe,N as J,x as vt,q,a9 as re,d as g,dm as _t,az as fn,a2 as xt,h as yn,V as hn,m as W,_ as ge,U as ve,dn as Tt,R as qe,H as He,af as Et,bg as Ye,dp as wt,dq as At}from"./index-DdfNajYr.js";import{n as De}from"./mui--aGBnNu2.js";import{g as Pt,h as Dt,q as ie}from"./QBOConnectionScreen-CmO2Xstu.js";import{u as jt,a as Ft}from"./useEmailConnectResultRefresh-CIWk93Du.js";import{u as Bt}from"./useChargeCardPusherEvents-eplpnku9.js";import"./recharts-CkREU3LH.js";import"./analytics-D051O7ML.js";import"./plaid-7P9b69CP.js";import"./dnd-CU3yeazS.js";import"./stripe-cKAAJElX.js";import"./lottie-Du4lbH8J.js";import"./lexical-DVH-xgq1.js";import"./pdf-CrvsvvW3.js";import"./utils-Ctp9Zfhk.js";import"./empty-BiAWzWBi.js";import"./pdf-lib-Cvsvldn7.js";import"./index--CQENyaz.js";import"./url-nN4BnP9N.js";import"./index-ae04Qn4V.js";import"./decodeURIComponentSafe-YbpxzvKa.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]="5f13d2bb-3599-40f7-ac41-84a5a728184c",e._sentryDebugIdIdentifier="sentry-dbid-5f13d2bb-3599-40f7-ac41-84a5a728184c")}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=xe(),i=se(),[o,p]=d.useState(!1),[u,c]=d.useState(!1),{tenantEmailDomain:v}=Te(),n=z.getSignedInUser(),{useFeatureGate:t}=Pe(),{isFeatureEnabled:C}=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,h=_?.resources?.find((S=>S.resource==="/reports/task_card"))==null,r=O?.userRole!=null&&jn(O?.userRole),x=_?.resources?.find((S=>S.resource==="/bills"))==null&&!r,T=_?.resources?.find((S=>S.resource==="/reimbursements"))==null;U===!1&&D.push("top_expenses"),h===!1&&D.push("task_card"),x===!1&&D.push("bill_pay_card","bill_pay_promo_card"),T===!1&&D.push("reimbursement_card","reimbursement_promo_card"),D.push("zeni_accounts_promo_card","treasury_promo_card"),A===!1&&D.push("rewards_card");const f=E((S=>{const V=[];C===!1&&V.push("accounts_payable_aging"),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 Y=Fn(S,V);return Bn(Y.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-CuUK5O_2.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-BBlQ3ArL.js";import{fI as L,Vt as at,bE as q,bv as we,Vu as Tn,kl as xn,Vv as Zt,Vw as wn,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 It,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 vt,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 xt,AO as eo,AV as to,W1 as ao,W2 as no,EC as Jt,W3 as oo,AK as Te,AF as Ea,W4 as ea,W5 as so,W6 as wt,W7 as Pt,CR as Ia,W8 as ro,W9 as va,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 xa,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 Eo,Wr as Io,Ws as vo,ED as na,Wt as Do,Fb as wa,Wu as oa,Wv as Oo,Ww as To,Wx as Pa,q9 as Fa,Cc as xo,ed as wo,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-aUBx6G2Q.js";import{z as U,aj as re,q as R,d 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,g as ja,a2 as Ma,a as Va,ar as Zo,as as Xo,at as Jo,p as be,au as La,I as me,av as Ua,aw as Ya,ax as Ga,ay as es,az as Ke,N as M,V as $e,aA as ts,L as as,aB as ns,x as os,m as ss,a5 as rs,aC as is,aD as cs,aE as ls,aF as ds,aG as xe}from"./index-ClwW47Zs.js";import{u as us,n as Vt}from"./mui--aGBnNu2.js";import{a as C}from"./sentry-D0lP5-8e.js";import{w as Na}from"./withTransactionSidePanel-CKC1_4cy.js";import{t as Wa,a as Be,e as Se,b as Lt,c as Ut,v as ms}from"./routePaths-D0jOibXk.js";import{u as ie}from"./useAskAiCfoHostNavButtonProps-CWWQxV2L.js";import Ve from"./NotFoundScreen-CTik05r2.js";import{t as st}from"./reportTimeframe-ChAOzqo_.js";import{u as Yt}from"./useInitialThreadRequest-DmfmyzKI.js";import{t as za}from"./analyticsHelper-DkNc3mKz.js";import{C as ps}from"./CompanyPassportScreen-Db20J8Yl.js";import{u as fs}from"./useAiCfoDashboardSuggestedQuestionsChips-usJW6KKQ.js";import{F as hs}from"./FeaturePreviewScreen-Dcu53_tf.js";import"./recharts-CkREU3LH.js";import"./analytics-D051O7ML.js";import"./plaid-7P9b69CP.js";import"./dnd-CU3yeazS.js";import"./stripe-cKAAJElX.js";import"./lottie-Du4lbH8J.js";import"./lexical-DVH-xgq1.js";import"./pdf-CrvsvvW3.js";import"./utils-Ctp9Zfhk.js";import"./TransactionDetailScreen-CHzsnTr9.js";import"./decodeURIComponentSafe-YbpxzvKa.js";import"./expenseAutomationHelper-SA0jUIyg.js";import"./stripSplatSuffix-CFosfir7.js";import"./MobileAppDrawer-Bql3K6nh.js";import"./InboxNotificationsProvider-DiTDJFwP.js";import"./useTaskManagerAccess-DrmpkeUw.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]="4ff2b574-0013-426e-bede-6d4423a4e8c5",e._sentryDebugIdIdentifier="sentry-dbid-4ff2b574-0013-426e-bede-6d4423a4e8c5")}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):we()),[r]),b=K(),g=ee(),k=S((D=>Tn(D,f,o))),I=C.useCallback((()=>{o!=null&&k.fetchState!=="In-Progress"&&k.fetchState!=="Completed"&&b(xn(o,f))}),[f]),A=C.useCallback((()=>{g("../../",{relative:"path"})}),[]),_=C.useCallback(((D,x)=>{b(Zt({sortKey:D,sortOrder:x}))}),[]),w=C.useCallback((D=>{b(Zt({downloadState:D}))}),[]),Y=C.useCallback((D=>{if(e)e(D.transactionId,D.transactionType);else if(m!=null){const x=Wa({id:D.transactionId,type:D.transactionType},m);g(x);const y=R(u.state?.pathnameStackToGoBack,u.pathname);g(x,{state:{pathnameStackToGoBack:y}})}}),[m,e]),v=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((()=>{I()}),[]),C.useEffect((()=>{k.fetchState==="Completed"&&v()}),[v,k.fetchState]),d.jsx(Ko,{apAgingDetail:k,downloadParams:l,reportDate:f,analytics:O,onTransactionClick:Y,onReload:I,onBackClick:A,onColumnSortConfigChanged:_,updateDownloadStateHandler:w,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),Cs=()=>{const e=K(),a=ee(),t=S((_=>wn(_))),{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??we(),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(((_,w)=>{e(Je({sortKey:w,sortOrder:_}))}),[]),g=C.useCallback((_=>{a(`./${_}/${p.format(H.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[p]),k=C.useCallback((_=>{e(Je({downloadState:_}))}),[]),I=C.useCallback(((_,w)=>{}),[]),A=C.useCallback(((_,w)=>{e(Je({selectedDate:_,agingDateSelectionType:w})),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:I,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((v=>L(v))),{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):we()),[r]),f=K(),b=ee(),g=S((v=>Pn(v,l,o))),k=C.useCallback((()=>{o!=null&&g.fetchState!=="In-Progress"&&g.fetchState!=="Completed"&&f(Fn(o,l))}),[l]),I=C.useCallback((()=>{b("../../",{relative:"path"})}),[]),A=C.useCallback(((v,D)=>{f(Xt({sortKey:v,sortOrder:D}))}),[]),_=C.useCallback((v=>{f(Xt({downloadState:v}))}),[]),w=C.useCallback((v=>{if(e)e(v.transactionId,v.transactionType);else if(c!=null){const D=Wa({id:v.transactionId,type:v.transactionType},c);b(D);const x=R(m.state?.pathnameStackToGoBack,m.pathname);b(D,{state:{pathnameStackToGoBack:x}})}}),[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:w,onReload:k,onBackClick:I,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??we(),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))}),[]),I=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:I,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 Es=Vt.div`
1
+ import{j as d}from"./liveblocks-CuUK5O_2.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-BBlQ3ArL.js";import{fI as L,Vt as at,bE as q,bv as we,Vu as Tn,kl as xn,Vv as Zt,Vw as wn,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 It,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 vt,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 xt,AO as eo,AV as to,W1 as ao,W2 as no,EC as Jt,W3 as oo,AK as Te,AF as Ea,W4 as ea,W5 as so,W6 as wt,W7 as Pt,CR as Ia,W8 as ro,W9 as va,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 xa,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 Eo,Wr as Io,Ws as vo,ED as na,Wt as Do,Fb as wa,Wu as oa,Wv as Oo,Ww as To,Wx as Pa,q9 as Fa,Cc as xo,ed as wo,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-aUBx6G2Q.js";import{z as U,aj as re,q as R,d 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,g as ja,a2 as Ma,a as Va,ar as Zo,as as Xo,at as Jo,p as be,au as La,I as me,av as Ua,aw as Ya,ax as Ga,ay as es,az as Ke,N as M,V as $e,aA as ts,L as as,aB as ns,x as os,m as ss,a5 as rs,aC as is,aD as cs,aE as ls,aF as ds,aG as xe}from"./index-DdfNajYr.js";import{u as us,n as Vt}from"./mui--aGBnNu2.js";import{a as C}from"./sentry-D0lP5-8e.js";import{w as Na}from"./withTransactionSidePanel-CTsbYdVH.js";import{t as Wa,a as Be,e as Se,b as Lt,c as Ut,v as ms}from"./routePaths-Bt11blZQ.js";import{u as ie}from"./useAskAiCfoHostNavButtonProps-Dbd_alyv.js";import Ve from"./NotFoundScreen-CkbqMgGf.js";import{t as st}from"./reportTimeframe-ChAOzqo_.js";import{u as Yt}from"./useInitialThreadRequest-SDz0QMSn.js";import{t as za}from"./analyticsHelper-D6_ANm__.js";import{C as ps}from"./CompanyPassportScreen-bYWzgq92.js";import{u as fs}from"./useAiCfoDashboardSuggestedQuestionsChips-1xqNBc2H.js";import{F as hs}from"./FeaturePreviewScreen-kqfOCE7B.js";import"./recharts-CkREU3LH.js";import"./analytics-D051O7ML.js";import"./plaid-7P9b69CP.js";import"./dnd-CU3yeazS.js";import"./stripe-cKAAJElX.js";import"./lottie-Du4lbH8J.js";import"./lexical-DVH-xgq1.js";import"./pdf-CrvsvvW3.js";import"./utils-Ctp9Zfhk.js";import"./TransactionDetailScreen-tgGXyDPF.js";import"./decodeURIComponentSafe-YbpxzvKa.js";import"./expenseAutomationHelper-SA0jUIyg.js";import"./stripSplatSuffix-CFosfir7.js";import"./MobileAppDrawer-BLB42Sqj.js";import"./InboxNotificationsProvider-DiTDJFwP.js";import"./useTaskManagerAccess-Byl1eBb6.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]="4ff2b574-0013-426e-bede-6d4423a4e8c5",e._sentryDebugIdIdentifier="sentry-dbid-4ff2b574-0013-426e-bede-6d4423a4e8c5")}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):we()),[r]),b=K(),g=ee(),k=S((D=>Tn(D,f,o))),I=C.useCallback((()=>{o!=null&&k.fetchState!=="In-Progress"&&k.fetchState!=="Completed"&&b(xn(o,f))}),[f]),A=C.useCallback((()=>{g("../../",{relative:"path"})}),[]),_=C.useCallback(((D,x)=>{b(Zt({sortKey:D,sortOrder:x}))}),[]),w=C.useCallback((D=>{b(Zt({downloadState:D}))}),[]),Y=C.useCallback((D=>{if(e)e(D.transactionId,D.transactionType);else if(m!=null){const x=Wa({id:D.transactionId,type:D.transactionType},m);g(x);const y=R(u.state?.pathnameStackToGoBack,u.pathname);g(x,{state:{pathnameStackToGoBack:y}})}}),[m,e]),v=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((()=>{I()}),[]),C.useEffect((()=>{k.fetchState==="Completed"&&v()}),[v,k.fetchState]),d.jsx(Ko,{apAgingDetail:k,downloadParams:l,reportDate:f,analytics:O,onTransactionClick:Y,onReload:I,onBackClick:A,onColumnSortConfigChanged:_,updateDownloadStateHandler:w,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),Cs=()=>{const e=K(),a=ee(),t=S((_=>wn(_))),{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??we(),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(((_,w)=>{e(Je({sortKey:w,sortOrder:_}))}),[]),g=C.useCallback((_=>{a(`./${_}/${p.format(H.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[p]),k=C.useCallback((_=>{e(Je({downloadState:_}))}),[]),I=C.useCallback(((_,w)=>{}),[]),A=C.useCallback(((_,w)=>{e(Je({selectedDate:_,agingDateSelectionType:w})),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:I,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((v=>L(v))),{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):we()),[r]),f=K(),b=ee(),g=S((v=>Pn(v,l,o))),k=C.useCallback((()=>{o!=null&&g.fetchState!=="In-Progress"&&g.fetchState!=="Completed"&&f(Fn(o,l))}),[l]),I=C.useCallback((()=>{b("../../",{relative:"path"})}),[]),A=C.useCallback(((v,D)=>{f(Xt({sortKey:v,sortOrder:D}))}),[]),_=C.useCallback((v=>{f(Xt({downloadState:v}))}),[]),w=C.useCallback((v=>{if(e)e(v.transactionId,v.transactionType);else if(c!=null){const D=Wa({id:v.transactionId,type:v.transactionType},c);b(D);const x=R(m.state?.pathnameStackToGoBack,m.pathname);b(D,{state:{pathnameStackToGoBack:x}})}}),[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:w,onReload:k,onBackClick:I,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??we(),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))}),[]),I=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:I,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 Es=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-CuUK5O_2.js";import{a as u}from"./sentry-D0lP5-8e.js";import{u as y,j as b,l as U,g as w,N as A}from"./core-BBlQ3ArL.js";import{UN as N,fI as _,go as k,UO as R,hd as z,UP as L}from"./zeni-epic-state-aUBx6G2Q.js";import{u as O,z as f,b as T,t as I,G as j,e as $}from"./index-ClwW47Zs.js";import"./mui--aGBnNu2.js";import{t as P}from"./getLocaleForTenant-DTPcYF0O.js";import"./recharts-CkREU3LH.js";import"./analytics-D051O7ML.js";import"./plaid-7P9b69CP.js";import"./dnd-CU3yeazS.js";import"./stripe-cKAAJElX.js";import"./lottie-Du4lbH8J.js";import"./lexical-DVH-xgq1.js";import"./pdf-CrvsvvW3.js";import"./utils-Ctp9Zfhk.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]="d3d23b52-3c48-4dd8-b932-353552b08ea8",t._sentryDebugIdIdentifier="sentry-dbid-d3d23b52-3c48-4dd8-b932-353552b08ea8")}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-CuUK5O_2.js";import{a as u}from"./sentry-D0lP5-8e.js";import{u as y,j as b,l as U,g as w,N as A}from"./core-BBlQ3ArL.js";import{UN as N,fI as _,go as k,UO as R,hd as z,UP as L}from"./zeni-epic-state-aUBx6G2Q.js";import{u as O,z as f,b as T,t as I,G as j,e as $}from"./index-DdfNajYr.js";import"./mui--aGBnNu2.js";import{t as P}from"./getLocaleForTenant-2khEt-Ua.js";import"./recharts-CkREU3LH.js";import"./analytics-D051O7ML.js";import"./plaid-7P9b69CP.js";import"./dnd-CU3yeazS.js";import"./stripe-cKAAJElX.js";import"./lottie-Du4lbH8J.js";import"./lexical-DVH-xgq1.js";import"./pdf-CrvsvvW3.js";import"./utils-Ctp9Zfhk.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]="d3d23b52-3c48-4dd8-b932-353552b08ea8",t._sentryDebugIdIdentifier="sentry-dbid-d3d23b52-3c48-4dd8-b932-353552b08ea8")}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-CuUK5O_2.js";import{h as w,g as C,j as h,l as E,i as P}from"./core-BBlQ3ArL.js";import{Xc as k,Xj as Z,gJ as z,gI as J,gH as q,k_ as L,VJ as Y,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-aUBx6G2Q.js";import{cV as M,a2 as R,p as N,z as U,a5 as p,N as S,a8 as X,cW as Q,R as _,cX as ee,q as te}from"./index-ClwW47Zs.js";import{u as H,n as O}from"./mui--aGBnNu2.js";import"./sentry-D0lP5-8e.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]="4c5df0f2-4e4c-45b6-830d-ce5096192eb7",e._sentryDebugIdIdentifier="sentry-dbid-4c5df0f2-4e4c-45b6-830d-ce5096192eb7")}catch{}})();const ne=E(null,(function(e,t){return{onSaveVendor:n=>{e(L(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(Y("common")),n!=null&&e(K(n))},onGetOtp:n=>{e(q(n,"BillPayVendor"))},onResendOtp:n=>{e(J(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(z(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(Z(n,a,o))}}}))(M);function W({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h((d=>k(d,e)));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=O.div`
1
+ import{j as l}from"./liveblocks-CuUK5O_2.js";import{h as w,g as C,j as h,l as E,i as P}from"./core-BBlQ3ArL.js";import{Xc as k,Xj as Z,gJ as z,gI as J,gH as q,k_ as L,VJ as Y,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-aUBx6G2Q.js";import{cV as M,a2 as R,p as N,z as U,a5 as p,N as S,a8 as X,cW as Q,R as _,cX as ee,q as te}from"./index-DdfNajYr.js";import{u as H,n as O}from"./mui--aGBnNu2.js";import"./sentry-D0lP5-8e.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]="4c5df0f2-4e4c-45b6-830d-ce5096192eb7",e._sentryDebugIdIdentifier="sentry-dbid-4c5df0f2-4e4c-45b6-830d-ce5096192eb7")}catch{}})();const ne=E(null,(function(e,t){return{onSaveVendor:n=>{e(L(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(Y("common")),n!=null&&e(K(n))},onGetOtp:n=>{e(q(n,"BillPayVendor"))},onResendOtp:n=>{e(J(n,"BillPayVendor"))},onVerifyOtp:(n,a)=>{e(z(n,a,"BillPayVendor"))},onVerifyOtpSuccess:(n,a,o)=>{e(Z(n,a,o))}}}))(M);function W({vendorId:e,billId:t,isExpressPayPage:n}){const a=w(),o=C(),s=h((d=>k(d,e)));return l.jsx(ne,{location:o,navigate:a,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:n??!1})}const ae=O.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as c}from"./liveblocks-CuUK5O_2.js";import{a2 as i,ac as l}from"./index-ClwW47Zs.js";import{u as f,D as p}from"./mui--aGBnNu2.js";import"./sentry-D0lP5-8e.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-CuUK5O_2.js";import{a2 as i,ac as l}from"./index-DdfNajYr.js";import{u as f,D as p}from"./mui--aGBnNu2.js";import"./sentry-D0lP5-8e.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-CuUK5O_2.js";import{a as d}from"./sentry-D0lP5-8e.js";import{h as q,u as A,g as G,i as F,j as l,N,l as V,n as _,o as O}from"./core-BBlQ3ArL.js";import{a1j as z,fI as H,a03 as M,na as R,T4 as I,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-aUBx6G2Q.js";import{dt as U,d as X,a5 as Z,q as tt}from"./index-ClwW47Zs.js";import"./mui--aGBnNu2.js";import{d as b}from"./decodeURIComponentSafe-YbpxzvKa.js";import{w as et}from"./withTransactionSidePanel-CKC1_4cy.js";import{e as at,t as nt}from"./routePaths-D0jOibXk.js";import"./recharts-CkREU3LH.js";import"./analytics-D051O7ML.js";import"./plaid-7P9b69CP.js";import"./dnd-CU3yeazS.js";import"./stripe-cKAAJElX.js";import"./lottie-Du4lbH8J.js";import"./lexical-DVH-xgq1.js";import"./pdf-CrvsvvW3.js";import"./utils-Ctp9Zfhk.js";import"./useAskAiCfoHostNavButtonProps-CWWQxV2L.js";import"./TransactionDetailScreen-CHzsnTr9.js";import"./useInitialThreadRequest-DmfmyzKI.js";import"./expenseAutomationHelper-SA0jUIyg.js";import"./stripSplatSuffix-CFosfir7.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]="fd64d06c-1fd8-49b4-a700-e7acb576b07e",a._sentryDebugIdIdentifier="sentry-dbid-fd64d06c-1fd8-49b4-a700-e7acb576b07e")}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(I(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=q(),o=A(),c=G(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:j,entityNameEncoded:x}=F(),r=b(j??""),p=b(x??""),f=rt(r,p),v=[r,p].filter((n=>n!=null)),i={name:p,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&&f===!0&&(T(!0),o(R(i)))}),[m,f,i]);const E=l((n=>n.trendState.fetchState)),P=u?.selectedPeriod?.timePeriod??g,B=(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(I(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[m,h,E]),f?s.jsx(ot,{firstMonthOfFY:w,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:B,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-CuUK5O_2.js";import{a as d}from"./sentry-D0lP5-8e.js";import{h as q,u as A,g as G,i as F,j as l,N,l as V,n as _,o as O}from"./core-BBlQ3ArL.js";import{a1j as z,fI as H,a03 as M,na as R,T4 as I,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-aUBx6G2Q.js";import{dt as U,d as X,a5 as Z,q as tt}from"./index-DdfNajYr.js";import"./mui--aGBnNu2.js";import{d as b}from"./decodeURIComponentSafe-YbpxzvKa.js";import{w as et}from"./withTransactionSidePanel-CTsbYdVH.js";import{e as at,t as nt}from"./routePaths-Bt11blZQ.js";import"./recharts-CkREU3LH.js";import"./analytics-D051O7ML.js";import"./plaid-7P9b69CP.js";import"./dnd-CU3yeazS.js";import"./stripe-cKAAJElX.js";import"./lottie-Du4lbH8J.js";import"./lexical-DVH-xgq1.js";import"./pdf-CrvsvvW3.js";import"./utils-Ctp9Zfhk.js";import"./useAskAiCfoHostNavButtonProps-Dbd_alyv.js";import"./TransactionDetailScreen-tgGXyDPF.js";import"./useInitialThreadRequest-SDz0QMSn.js";import"./expenseAutomationHelper-SA0jUIyg.js";import"./stripSplatSuffix-CFosfir7.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]="fd64d06c-1fd8-49b4-a700-e7acb576b07e",a._sentryDebugIdIdentifier="sentry-dbid-fd64d06c-1fd8-49b4-a700-e7acb576b07e")}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(I(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=q(),o=A(),c=G(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:j,entityNameEncoded:x}=F(),r=b(j??""),p=b(x??""),f=rt(r,p),v=[r,p].filter((n=>n!=null)),i={name:p,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&&f===!0&&(T(!0),o(R(i)))}),[m,f,i]);const E=l((n=>n.trendState.fetchState)),P=u?.selectedPeriod?.timePeriod??g,B=(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(I(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:P})))}),[m,h,E]),f?s.jsx(ot,{firstMonthOfFY:w,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:B,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-CuUK5O_2.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-BBlQ3ArL.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-aUBx6G2Q.js";import Ut from"./NotFoundScreen-CTik05r2.js";import{a as o,R as la}from"./sentry-D0lP5-8e.js";import{n as Oe,S as Kc}from"./mui--aGBnNu2.js";import{p as mt,N as X,d as te,q 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,m as rt,g as oi,cb as si,cc as ci,h 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-ClwW47Zs.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-CWWQxV2L.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-CHzsnTr9.js";import{u as Di,a as _i,b as Fi}from"./useActualMatchingMatchDetail-nJ3hpXEY.js";import{d as Bi}from"./decodeURIComponentSafe-YbpxzvKa.js";import{m as Vt,a as pa,b as ha,i as Ot}from"./expenseAutomationHelper-SA0jUIyg.js";import{u as Sa,a as fa,w as Mi}from"./withTransactionSidePanel-CKC1_4cy.js";import{S as Oi,a as Ui,b as $i,J as Vi}from"./ScheduleDetailsPrepaidExpensesScreen-DN2DZsFw.js";import{s as jn,i as Ia,h as ji,f as zi,v as Li,t as Gi}from"./routePaths-D0jOibXk.js";import{a as Et}from"./accountMappingHelper-CHQgwqfy.js";import{D as Ni}from"./DrawerScreen-DUhkZI2Z.js";import"./recharts-CkREU3LH.js";import"./analytics-D051O7ML.js";import"./plaid-7P9b69CP.js";import"./dnd-CU3yeazS.js";import"./stripe-cKAAJElX.js";import"./lottie-Du4lbH8J.js";import"./lexical-DVH-xgq1.js";import"./pdf-CrvsvvW3.js";import"./utils-Ctp9Zfhk.js";import"./useInitialThreadRequest-DmfmyzKI.js";import"./stripSplatSuffix-CFosfir7.js";import"./pathToGoBack-DOePc_e5.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]="1fbbbfdf-cd22-4be0-9661-d02058bcfb4e",t._sentryDebugIdIdentifier="sentry-dbid-1fbbbfdf-cd22-4be0-9661-d02058bcfb4e")}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-CuUK5O_2.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-BBlQ3ArL.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-aUBx6G2Q.js";import Ut from"./NotFoundScreen-CkbqMgGf.js";import{a as o,R as la}from"./sentry-D0lP5-8e.js";import{n as Oe,S as Kc}from"./mui--aGBnNu2.js";import{p as mt,N as X,d as te,q 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,m as rt,g as oi,cb as si,cc as ci,h 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-DdfNajYr.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-Dbd_alyv.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-tgGXyDPF.js";import{u as Di,a as _i,b as Fi}from"./useActualMatchingMatchDetail-Cvov37bY.js";import{d as Bi}from"./decodeURIComponentSafe-YbpxzvKa.js";import{m as Vt,a as pa,b as ha,i as Ot}from"./expenseAutomationHelper-SA0jUIyg.js";import{u as Sa,a as fa,w as Mi}from"./withTransactionSidePanel-CTsbYdVH.js";import{S as Oi,a as Ui,b as $i,J as Vi}from"./ScheduleDetailsPrepaidExpensesScreen-CU1XLAAM.js";import{s as jn,i as Ia,h as ji,f as zi,v as Li,t as Gi}from"./routePaths-Bt11blZQ.js";import{a as Et}from"./accountMappingHelper-CHQgwqfy.js";import{D as Ni}from"./DrawerScreen-DWyOpsL-.js";import"./recharts-CkREU3LH.js";import"./analytics-D051O7ML.js";import"./plaid-7P9b69CP.js";import"./dnd-CU3yeazS.js";import"./stripe-cKAAJElX.js";import"./lottie-Du4lbH8J.js";import"./lexical-DVH-xgq1.js";import"./pdf-CrvsvvW3.js";import"./utils-Ctp9Zfhk.js";import"./useInitialThreadRequest-SDz0QMSn.js";import"./stripSplatSuffix-CFosfir7.js";import"./pathToGoBack-DOePc_e5.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]="1fbbbfdf-cd22-4be0-9661-d02058bcfb4e",t._sentryDebugIdIdentifier="sentry-dbid-1fbbbfdf-cd22-4be0-9661-d02058bcfb4e")}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-CTik05r2.js","assets/sentry-D0lP5-8e.js","assets/core-BBlQ3ArL.js","assets/zeni-epic-state-aUBx6G2Q.js","assets/index-ClwW47Zs.js","assets/mui--aGBnNu2.js","assets/analytics-D051O7ML.js","assets/utils-Ctp9Zfhk.js","assets/index-BQ3cXEYt.css"])))=>i.map(i=>d[i]);
2
- import{_ as u}from"./zeni-epic-state-aUBx6G2Q.js";import{j as a}from"./liveblocks-CuUK5O_2.js";import{l as c}from"./index-ClwW47Zs.js";import"./sentry-D0lP5-8e.js";import{N as e}from"./core-BBlQ3ArL.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-CTik05r2.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-CkbqMgGf.js","assets/sentry-D0lP5-8e.js","assets/core-BBlQ3ArL.js","assets/zeni-epic-state-aUBx6G2Q.js","assets/index-DdfNajYr.js","assets/mui--aGBnNu2.js","assets/analytics-D051O7ML.js","assets/utils-Ctp9Zfhk.js","assets/index-BQ3cXEYt.css"])))=>i.map(i=>d[i]);
2
+ import{_ as u}from"./zeni-epic-state-aUBx6G2Q.js";import{j as a}from"./liveblocks-CuUK5O_2.js";import{l as c}from"./index-DdfNajYr.js";import"./sentry-D0lP5-8e.js";import{N as e}from"./core-BBlQ3ArL.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-CkbqMgGf.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-CuUK5O_2.js";import{a as r}from"./sentry-D0lP5-8e.js";import{d7 as f,d8 as c,D as l,a5 as p}from"./index-ClwW47Zs.js";import"./mui--aGBnNu2.js";import b from"./NotFoundScreen-CTik05r2.js";import{h as m,g as u}from"./core-BBlQ3ArL.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]="aa33f082-c2de-4fb2-9467-b46db35cbe5a",e._sentryDebugIdIdentifier="sentry-dbid-aa33f082-c2de-4fb2-9467-b46db35cbe5a")}catch{}})();const _=()=>{const e=m(),a=u(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),d=r.useCallback((()=>{(()=>{const n=p(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=f(a.pathname);return o!=null?s.jsx(c,{menuItem:l(o),onDemoClick:t,onGoBack:d}):s.jsx(b,{})},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-CuUK5O_2.js";import{a as r}from"./sentry-D0lP5-8e.js";import{d7 as f,d8 as c,D as l,a5 as p}from"./index-DdfNajYr.js";import"./mui--aGBnNu2.js";import b from"./NotFoundScreen-CkbqMgGf.js";import{h as m,g as u}from"./core-BBlQ3ArL.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]="aa33f082-c2de-4fb2-9467-b46db35cbe5a",e._sentryDebugIdIdentifier="sentry-dbid-aa33f082-c2de-4fb2-9467-b46db35cbe5a")}catch{}})();const _=()=>{const e=m(),a=u(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),d=r.useCallback((()=>{(()=>{const n=p(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=f(a.pathname);return o!=null?s.jsx(c,{menuItem:l(o),onDemoClick:t,onGoBack:d}):s.jsx(b,{})},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-D0lP5-8e.js";import{u as l,h as d,g as m}from"./core-BBlQ3ArL.js";import{i7 as p,Vl as g,Vm as _}from"./zeni-epic-state-aUBx6G2Q.js";import{u as b,b as h,z as y}from"./index-ClwW47Zs.js";import"./liveblocks-CuUK5O_2.js";import"./recharts-CkREU3LH.js";import"./mui--aGBnNu2.js";import"./analytics-D051O7ML.js";import"./plaid-7P9b69CP.js";import"./dnd-CU3yeazS.js";import"./stripe-cKAAJElX.js";import"./lottie-Du4lbH8J.js";import"./lexical-DVH-xgq1.js";import"./pdf-CrvsvvW3.js";import"./utils-Ctp9Zfhk.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]="ff0b4c8f-9028-4f03-a66c-0f2308a0a694",e._sentryDebugIdIdentifier="sentry-dbid-ff0b4c8f-9028-4f03-a66c-0f2308a0a694")}catch{}})();function V(){const e=l(),n=d(),r=m(),{setLoading:o,clearAllLoading:u}=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"),f=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),s!=null&&f!=null){const t=JSON.parse(f);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}))}u();const c=y.getActiveTenantForUser();n(c?.tenantEmailDomain!=null?`/${c.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{V as default};
1
+ import{a as i}from"./sentry-D0lP5-8e.js";import{u as l,h as d,g as m}from"./core-BBlQ3ArL.js";import{i7 as p,Vl as g,Vm as _}from"./zeni-epic-state-aUBx6G2Q.js";import{u as b,b as h,z as y}from"./index-DdfNajYr.js";import"./liveblocks-CuUK5O_2.js";import"./recharts-CkREU3LH.js";import"./mui--aGBnNu2.js";import"./analytics-D051O7ML.js";import"./plaid-7P9b69CP.js";import"./dnd-CU3yeazS.js";import"./stripe-cKAAJElX.js";import"./lottie-Du4lbH8J.js";import"./lexical-DVH-xgq1.js";import"./pdf-CrvsvvW3.js";import"./utils-Ctp9Zfhk.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]="ff0b4c8f-9028-4f03-a66c-0f2308a0a694",e._sentryDebugIdIdentifier="sentry-dbid-ff0b4c8f-9028-4f03-a66c-0f2308a0a694")}catch{}})();function V(){const e=l(),n=d(),r=m(),{setLoading:o,clearAllLoading:u}=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"),f=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),s!=null&&f!=null){const t=JSON.parse(f);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}))}u();const c=y.getActiveTenantForUser();n(c?.tenantEmailDomain!=null?`/${c.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{V as default};