@zeniai/web-app-ui 5.3.47-dev → 5.3.47-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 (70) hide show
  1. package/dist/assets/{AccountMappingScreen-Euit4Ttk.js → AccountMappingScreen-BPRZHuGA.js} +1 -1
  2. package/dist/assets/{ActualMatchingMatchDetailScreen-BBYzjOqh.js → ActualMatchingMatchDetailScreen-CoU3K4PM.js} +1 -1
  3. package/dist/assets/{AddressRoutes-PvYGzHCA.js → AddressRoutes-3x6JmFfR.js} +1 -1
  4. package/dist/assets/{AddressScreen-DsGvV3N8.js → AddressScreen-DhOzuvLT.js} +1 -1
  5. package/dist/assets/{AiCfoScreen-DAEPn0_B.js → AiCfoScreen-Blx6lCnY.js} +1 -1
  6. package/dist/assets/{AppDrawer-D4O6tn5i.js → AppDrawer-C7L5LQYC.js} +1 -1
  7. package/dist/assets/{BillPayApprovalRoutes-BY4P9AKu.js → BillPayApprovalRoutes-Bu8vaB46.js} +1 -1
  8. package/dist/assets/{BillPayRoutes-CWc4tAqm.js → BillPayRoutes-T-Lct0sH.js} +1 -1
  9. package/dist/assets/{BusinessVerificationPageScreen-CSruI1nV.js → BusinessVerificationPageScreen-CPnmoF6z.js} +1 -1
  10. package/dist/assets/{CardsAiCfoScreen-COoYscKz.js → CardsAiCfoScreen-CIq15Z-M.js} +1 -1
  11. package/dist/assets/{ChargeCardRoutes-BU6-pfJv.js → ChargeCardRoutes-BKDstMtL.js} +1 -1
  12. package/dist/assets/{CompanyPassportScreen-BxoatMVb.js → CompanyPassportScreen-D3aXSi-v.js} +1 -1
  13. package/dist/assets/{ConnectionAuthScreen-zbcvhPbz.js → ConnectionAuthScreen-1A7_ld_X.js} +1 -1
  14. package/dist/assets/{CustomerOnboardingAuthScreen-8IwDeKdF.js → CustomerOnboardingAuthScreen-7T0XvKs6.js} +1 -1
  15. package/dist/assets/{CustomerOnboardingRoutes-DV3rYEiJ.js → CustomerOnboardingRoutes-BivxymAu.js} +1 -1
  16. package/dist/assets/{DashboardRoutes-D5hdkebN.js → DashboardRoutes-CZNxS99K.js} +1 -1
  17. package/dist/assets/{DefaultTenantHome-DCPi_wXC.js → DefaultTenantHome-BWCll08J.js} +1 -1
  18. package/dist/assets/{DomesticWireDetailScreen-DgE28aJN.js → DomesticWireDetailScreen-DGMYJzFE.js} +1 -1
  19. package/dist/assets/{DrawerScreen-BihZ_PpN.js → DrawerScreen-0c_ealW2.js} +1 -1
  20. package/dist/assets/{EntityDetailRoutes-BqX-J3vM.js → EntityDetailRoutes-Db8C6L2J.js} +1 -1
  21. package/dist/assets/{ExpenseAutomationRoutes-DK-U-YTd.js → ExpenseAutomationRoutes-Cjko15u2.js} +1 -1
  22. package/dist/assets/{FeaturePreviewScreen-5SleVFKv.js → FeaturePreviewScreen-B5Hq_fA2.js} +1 -1
  23. package/dist/assets/{HubSpotOAuthCallbackScreen-2RxbRDTZ.js → HubSpotOAuthCallbackScreen-B6Nn-XMl.js} +1 -1
  24. package/dist/assets/{InvoicingRoutes-D0S6fDxY.js → InvoicingRoutes-0xj-PlaS.js} +1 -1
  25. package/dist/assets/{MagicLinkRoutes-C22EnpRm.js → MagicLinkRoutes-B9y3UF8M.js} +1 -1
  26. package/dist/assets/{MagicLinkSignInScreen-BVf-rLEH.js → MagicLinkSignInScreen-vHrJm7dw.js} +1 -1
  27. package/dist/assets/{MobileAppDrawer-0YtWXA3B.js → MobileAppDrawer-CjKRvtSN.js} +1 -1
  28. package/dist/assets/{NotFoundScreen-BkYIKPgh.js → NotFoundScreen-MJal1hew.js} +1 -1
  29. package/dist/assets/{NotificationRoutes-CZQRvVbE.js → NotificationRoutes-CT24D8Uv.js} +1 -1
  30. package/dist/assets/{OAuthConsentScreen-Q7ZDvc1F.js → OAuthConsentScreen-CFMLbvn8.js} +1 -1
  31. package/dist/assets/{PandLWithForecastRoutes-BzO_OgSq.js → PandLWithForecastRoutes-ByUQV7tm.js} +1 -1
  32. package/dist/assets/{PaymentLinkScreen-B8bPleIr.js → PaymentLinkScreen-B2QO2fQL.js} +1 -1
  33. package/dist/assets/{PeopleRoutes-D_nqmuPM.js → PeopleRoutes-DOJEhG7S.js} +1 -1
  34. package/dist/assets/{PerformanceRoutes-BW6dixVF.js → PerformanceRoutes-CdWAF5sI.js} +1 -1
  35. package/dist/assets/{QBOConnectionScreen-CWU6DFJl.js → QBOConnectionScreen-CvbLmaBz.js} +1 -1
  36. package/dist/assets/{ReimbursementApprovalRoutes-DAusugdf.js → ReimbursementApprovalRoutes-CEEFZS8r.js} +1 -1
  37. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-phJuB98f.js → ReimbursementApprovalRuleDetailScreen-5MNnVAqy.js} +1 -1
  38. package/dist/assets/{ReimbursementRoutes-BdJ3oqBf.js → ReimbursementRoutes-G7JKpwJT.js} +1 -1
  39. package/dist/assets/{ReportsRoutes-CDSCG28G.js → ReportsRoutes-Bgz_pVpt.js} +1 -1
  40. package/dist/assets/{RewardsRoutes-CHkOPz1g.js → RewardsRoutes-Bcb3M70b.js} +1 -1
  41. package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-DnVEpQsK.js → ScheduleDetailsPrepaidExpensesScreen-luC81eat.js} +1 -1
  42. package/dist/assets/{ScreenRoutes-BYAPWka6.js → ScreenRoutes-DA06Fnfd.js} +2 -2
  43. package/dist/assets/{SettingsRoutes-BGCz0_nd.js → SettingsRoutes-BrsZS6Xg.js} +1 -1
  44. package/dist/assets/{SetupPagesScreen-DzNRL7Y-.js → SetupPagesScreen-DL_o3Z3i.js} +1 -1
  45. package/dist/assets/{SignInScreen-BREpWd6T.js → SignInScreen-NP6vHITl.js} +1 -1
  46. package/dist/assets/{SignOutScreen-BNCpbut8.js → SignOutScreen-D28SfRtf.js} +1 -1
  47. package/dist/assets/{TaskListScreen-Br-mxkKM.js → TaskListScreen-W52vNP7m.js} +1 -1
  48. package/dist/assets/{TaskRoutes-CDuiJExM.js → TaskRoutes-DLlKeXMA.js} +1 -1
  49. package/dist/assets/{TransactionDetailRoutes-CYb-4jKQ.js → TransactionDetailRoutes-BszvDFhJ.js} +1 -1
  50. package/dist/assets/{TransactionDetailScreen-Bp7IFDK0.js → TransactionDetailScreen-CcO0FUjf.js} +1 -1
  51. package/dist/assets/{TransactionListRoutes-B6NIJUWk.js → TransactionListRoutes-C1dcOuNI.js} +1 -1
  52. package/dist/assets/{TreasuryRoutes-BvvMozYl.js → TreasuryRoutes-D_yTnBTc.js} +1 -1
  53. package/dist/assets/{VendorsRoutes-DsJ_lcDO.js → VendorsRoutes-BVvoooN6.js} +1 -1
  54. package/dist/assets/{WiseConfirmationScreen-Bg5_g49N.js → WiseConfirmationScreen-l0eeo939.js} +1 -1
  55. package/dist/assets/{ZeniAccountRoutes-C3fDjuMG.js → ZeniAccountRoutes-DImTioOs.js} +1 -1
  56. package/dist/assets/{ZeniAccountStatementScreen-CbdRQI0p.js → ZeniAccountStatementScreen-wUD7vElb.js} +1 -1
  57. package/dist/assets/{analyticsHelper-CwB3kQvw.js → analyticsHelper-H1Xp9Uyk.js} +1 -1
  58. package/dist/assets/{getLocaleForTenant-DH5Avx3x.js → getLocaleForTenant-xZFgPOZu.js} +1 -1
  59. package/dist/assets/{index-6nH5LMe4.js → index-CrBk11WI.js} +5 -5
  60. package/dist/assets/{routePaths-uBvxqlLY.js → routePaths-CeCPwkIf.js} +1 -1
  61. package/dist/assets/{useActualMatchingMatchDetail-OCZsPxr6.js → useActualMatchingMatchDetail-CAkhwxRr.js} +1 -1
  62. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-D8KJqvT7.js → useAiCfoDashboardSuggestedQuestionsChips-CSs_vZyp.js} +1 -1
  63. package/dist/assets/{useAskAiCfoHostNavButtonProps-BsP5fVhq.js → useAskAiCfoHostNavButtonProps-BamKKcjy.js} +1 -1
  64. package/dist/assets/{useChargeCardPusherEvents-BnH8_thb.js → useChargeCardPusherEvents--oeBBRmO.js} +1 -1
  65. package/dist/assets/{useEmailConnectResultRefresh-Ba8t-BuL.js → useEmailConnectResultRefresh-C-cGd7Tb.js} +1 -1
  66. package/dist/assets/{useInitialThreadRequest-7Q8HJAH2.js → useInitialThreadRequest-Bwvu8W79.js} +1 -1
  67. package/dist/assets/{useTaskManagerAccess-BG0Fkj9k.js → useTaskManagerAccess-CdPkYUw1.js} +1 -1
  68. package/dist/assets/{withTransactionSidePanel-DK-Ex27L.js → withTransactionSidePanel-Co9xwJi4.js} +1 -1
  69. package/dist/index.html +1 -1
  70. package/package.json +1 -1
@@ -1 +1 @@
1
- import{j as m}from"./liveblocks-UOzcPsHa.js";import{a as g}from"./sentry-DHDsO12F.js";import{h as w,u as T,g as x,i as k,j as O,l as E}from"./core-B5mDy9pu.js";import{z as D,br as F,a8 as P,j,S as V,n as C,bs as A,ae as L,aG as U,p as B}from"./index-6nH5LMe4.js";import{fF as b,gI as M,Bw as _,gD as z,c8 as G,Y2 as R,bn as Y,uT as H,uH as Z,mz as $,o8 as S,Y3 as q,bE as J,cE as N,oj as K,ot as Q}from"./zeni-epic-state-7eY0g-Bc.js";import"./mui-Do6nLzGb.js";import{d as W}from"./routePaths-uBvxqlLY.js";import{M as X}from"./MobileAppDrawer-0YtWXA3B.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="ecde6560-97cb-4d6c-9923-dedc9e847859",t._sentryDebugIdIdentifier="sentry-dbid-ecde6560-97cb-4d6c-9923-dedc9e847859")}catch{}})();const ee=E((function(t){const a=z(t),i=D.getSignedInUser(),p=b(t),c=p.tenantId,l={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=G(p?.userRole??[])&&a.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=R(t.companyConfigState),n=t.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:a.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:a,allIndustries:e.companyIndustries??[],allNationalityCountries:n,isDisabled:f,authParams:l,filesEndPoint:`${L.fileMicroServiceBaseUrl}`,isZeniUser:Y(i)}}),(function(t,a){const{companyId:i,currentTenant:p,navigate:c,location:l}=a,{tenantEmailDomain:f}=p;return{onScheduleClick:e=>{let n=e.href;n.includes("http")||(n="https://".concat(n)),window.open(n,"_blank")},onSaveAll:()=>{t(Q())},onAddressClick:e=>{const n=W(f,e),o=B(l.state?.pathnameStackToGoBack,l.pathname);c(n,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{t(K({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:n,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=n,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:h}=r,v={companyInfo:{...n,website:u!=""&&u!=null?N(u):void 0,meetingLink:y!=""&&y!=null?N(y):void 0,industry:n.industry.selectedOption,companyIndustryType:n.companyIndustryType?.selectedOption??void 0,companySubIndustry:n.companySubIndustry?.selectedOption??void 0,businessModel:n.businessModel.selectedOption??"",companySourceOfFunds:n.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:n.companySourceOfFundsDescription??void 0,countriesOfOperations:n.countriesOfOperations?.selectedOptions?.map((I=>I.length===2?I:U(I)))??[],transactionVolume:n.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:n.transactionVolumeDescription??void 0,regulatedStatus:n.regulatedStatus??void 0,regulatedStatusDescription:n.regulatedStatusDescription??void 0,usNexus:n.usNexus??void 0,usNexusTypes:n.usNexusTypes?.selectedOptions??[],purposeOfAccount:n.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:n.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?J(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:h.selectedOptions.map((I=>parseInt(I))),fileId:r.fileIds[0]}};t(S({companyDetails:v}))},onPrimaryContactDetailsUpdated:e=>{t(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{t(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=>{t(q(e))},onCompanyOfficerUpdated:e=>{t(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=>{t($({files:e}))},onDeleteFile:e=>{t(Z(e))},onEditFileName:(e,n)=>{t(H(e,n.split(".")[0]))}}}))(A);function de(){const t=w(),a=T(),i=x(),{tenantEmailDomain:p}=k(),[c,l]=g.useState(!1),[f,e]=g.useState(!1),n=O((s=>s.companyViewState.passportView.fetchState)),o=O((s=>s.companyConfigState.fetchState)),r=O((s=>b(s))),d=r.companyId??D.getSignedInUserTenant(p)?.companyId;if(D.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect((()=>{c||n!=="Not-Started"||d==null||(l(!0),a(M(d)))}),[c,n,d,a]),g.useEffect((()=>{o==="Not-Started"&&a(_())}),[o,a]);const u=s=>{e(s)},y=n==="Not-Started"||n==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&n==="Error"?m.jsx(F,{onGoHome:()=>t("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(P,{analytics:j,onLoad:s=>s.trackPageLoaded(V.Event.companyPassport,C(i)?"Settings":"Company Passport")}),C(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:t,location:i,isLoading:y,currentTenant:r,isSettings:C(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
1
+ import{j as m}from"./liveblocks-UOzcPsHa.js";import{a as g}from"./sentry-DHDsO12F.js";import{h as w,u as T,g as x,i as k,j as O,l as E}from"./core-B5mDy9pu.js";import{z as D,br as F,a8 as P,j,S as V,n as C,bs as A,ae as L,aG as U,p as B}from"./index-CrBk11WI.js";import{fF as b,gI as M,Bw as _,gD as z,c8 as G,Y2 as R,bn as Y,uT as H,uH as Z,mz as $,o8 as S,Y3 as q,bE as J,cE as N,oj as K,ot as Q}from"./zeni-epic-state-7eY0g-Bc.js";import"./mui-Do6nLzGb.js";import{d as W}from"./routePaths-CeCPwkIf.js";import{M as X}from"./MobileAppDrawer-CjKRvtSN.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="ecde6560-97cb-4d6c-9923-dedc9e847859",t._sentryDebugIdIdentifier="sentry-dbid-ecde6560-97cb-4d6c-9923-dedc9e847859")}catch{}})();const ee=E((function(t){const a=z(t),i=D.getSignedInUser(),p=b(t),c=p.tenantId,l={userId:i?.userId??"",sessionId:i?.zeniSessionId??"",tenantId:c??""},f=G(p?.userRole??[])&&a.localData.updateStatus.fetchState!=="In-Progress"?void 0:"readonly",e=R(t.companyConfigState),n=t.countryListState?.byCountryListCode?.nationalityCountryList?.countries??[];return{isCompanyVerified:a.companyView?.company?.company?.companyBillPayInfo?.companyVerificationStatus?.code==="verified",companyPassportView:a,allIndustries:e.companyIndustries??[],allNationalityCountries:n,isDisabled:f,authParams:l,filesEndPoint:`${L.fileMicroServiceBaseUrl}`,isZeniUser:Y(i)}}),(function(t,a){const{companyId:i,currentTenant:p,navigate:c,location:l}=a,{tenantEmailDomain:f}=p;return{onScheduleClick:e=>{let n=e.href;n.includes("http")||(n="https://".concat(n)),window.open(n,"_blank")},onSaveAll:()=>{t(Q())},onAddressClick:e=>{const n=W(f,e),o=B(l.state?.pathnameStackToGoBack,l.pathname);c(n,{state:{pathnameStackToGoBack:o}})},onResetClick:()=>{t(K({companyId:i}))},onBackClick:()=>{c("../")},onCompanyDetailsChanged:e=>{const{companyInfo:n,incInfo:o,taxDetails:r,zeniFinanceTeam:d}=e,{website:u}=n,{meetingLink:y}=d,{incDate:s}=o,{taxesFiledYears:h}=r,v={companyInfo:{...n,website:u!=""&&u!=null?N(u):void 0,meetingLink:y!=""&&y!=null?N(y):void 0,industry:n.industry.selectedOption,companyIndustryType:n.companyIndustryType?.selectedOption??void 0,companySubIndustry:n.companySubIndustry?.selectedOption??void 0,businessModel:n.businessModel.selectedOption??"",companySourceOfFunds:n.companySourceOfFunds?.selectedOption,companySourceOfFundsDescription:n.companySourceOfFundsDescription??void 0,countriesOfOperations:n.countriesOfOperations?.selectedOptions?.map((I=>I.length===2?I:U(I)))??[],transactionVolume:n.transactionVolume?.selectedOption??void 0,transactionVolumeDescription:n.transactionVolumeDescription??void 0,regulatedStatus:n.regulatedStatus??void 0,regulatedStatusDescription:n.regulatedStatusDescription??void 0,usNexus:n.usNexus??void 0,usNexusTypes:n.usNexusTypes?.selectedOptions??[],purposeOfAccount:n.purposeOfAccount?.selectedOption??void 0,purposeOfAccountDescription:n.purposeOfAccountDescription??void 0},incInfo:{typeOfInc:o.typeOfInc.selectedOption??"",stateOfInc:o.stateOfInc.selectedOption??"",incDate:s!=null?J(s?.toString()):s,fileId:o.fileIds[0]},taxDetails:{taxIdOrEIN:r.taxIdOrEIN,sicCode:r.sicCode,naicsCode:r.naicsCode,dunsNumber:r.dunsNumber,taxesFiledYears:h.selectedOptions.map((I=>parseInt(I))),fileId:r.fileIds[0]}};t(S({companyDetails:v}))},onPrimaryContactDetailsUpdated:e=>{t(S({primaryContact:{userId:e.userId,email:e.email.trim(),firstName:e.name.firstName,lastName:e.name.lastName}}))},onNewCompanyOfficerAdded:e=>{t(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=>{t(q(e))},onCompanyOfficerUpdated:e=>{t(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=>{t($({files:e}))},onDeleteFile:e=>{t(Z(e))},onEditFileName:(e,n)=>{t(H(e,n.split(".")[0]))}}}))(A);function de(){const t=w(),a=T(),i=x(),{tenantEmailDomain:p}=k(),[c,l]=g.useState(!1),[f,e]=g.useState(!1),n=O((s=>s.companyViewState.passportView.fetchState)),o=O((s=>s.companyConfigState.fetchState)),r=O((s=>b(s))),d=r.companyId??D.getSignedInUserTenant(p)?.companyId;if(D.getSignedInUser()==null)throw Error("Can't access company details page without signing in...");g.useEffect((()=>{c||n!=="Not-Started"||d==null||(l(!0),a(M(d)))}),[c,n,d,a]),g.useEffect((()=>{o==="Not-Started"&&a(_())}),[o,a]);const u=s=>{e(s)},y=n==="Not-Started"||n==="In-Progress"||o==="Not-Started"||o==="In-Progress";return d!=null&&n==="Error"?m.jsx(F,{onGoHome:()=>t("../",{replace:!0}),onReload:()=>window.location.reload()}):m.jsxs(m.Fragment,{children:[m.jsx(P,{analytics:j,onLoad:s=>s.trackPageLoaded(V.Event.companyPassport,C(i)?"Settings":"Company Passport")}),C(i)?m.jsx(X,{isAppContentDrawerOpen:f,handleDrawerToggle:u}):null,m.jsx(ee,{companyId:d,navigate:t,location:i,isLoading:y,currentTenant:r,isSettings:C(i),onClickMenuIcon:()=>{u(!0)}})]})}export{de as C};
@@ -1,4 +1,4 @@
1
- import{j as I}from"./liveblocks-UOzcPsHa.js";import{a as o}from"./sentry-DHDsO12F.js";import{u as H,h as P,g as R,j as C,N as w}from"./core-B5mDy9pu.js";import{TJ as q,fF as z,gl as G,pS as J,gM as A,gk as M,gi as Q,U7 as V,gh as O}from"./zeni-epic-state-7eY0g-Bc.js";import{u as B,z as E,L as D,G as K,H as W}from"./index-6nH5LMe4.js";import{n as X}from"./mui-Do6nLzGb.js";import{P as b,a as _}from"./AccountMappingScreen-Euit4Ttk.js";import{t as Y}from"./getLocaleForTenant-DH5Avx3x.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-CWU6DFJl.js";import"./recharts-uFX1dZS-.js";import"./analytics-D6GpUSOP.js";import"./plaid-0g_vwjSd.js";import"./dnd-CGWe1ZMP.js";import"./stripe-cKAAJElX.js";import"./lottie-C5eNvt0I.js";import"./lexical-DW4lC8Zx.js";import"./pdf-DjwvAC2g.js";import"./utils-BsODCDYR.js";import"./MobileAppDrawer-0YtWXA3B.js";import"./InboxNotificationsProvider-BmF5-_KA.js";import"./useTaskManagerAccess-BG0Fkj9k.js";import"./accountMappingHelper-DqBiQF6x.js";import"./empty-Dj4ZMRNZ.js";import"./pdf-lib-CZXOqgb4.js";import"./index-k1-Pd2Ki.js";import"./url-BxiN6LKq.js";import"./index-6yt3BfRL.js";import"./decodeURIComponentSafe-DANuhXnG.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]="c6bf3300-3d69-4bea-8a7b-ec8fb6fd63cc",t._sentryDebugIdIdentifier="sentry-dbid-c6bf3300-3d69-4bea-8a7b-ec8fb6fd63cc")}catch{}})();const te=X.div`
1
+ import{j as I}from"./liveblocks-UOzcPsHa.js";import{a as o}from"./sentry-DHDsO12F.js";import{u as H,h as P,g as R,j as C,N as w}from"./core-B5mDy9pu.js";import{TJ as q,fF as z,gl as G,pS as J,gM as A,gk as M,gi as Q,U7 as V,gh as O}from"./zeni-epic-state-7eY0g-Bc.js";import{u as B,z as E,L as D,G as K,H as W}from"./index-CrBk11WI.js";import{n as X}from"./mui-Do6nLzGb.js";import{P as b,a as _}from"./AccountMappingScreen-BPRZHuGA.js";import{t as Y}from"./getLocaleForTenant-xZFgPOZu.js";import{g as Z,Q as ee}from"./QBOConnectionScreen-CvbLmaBz.js";import"./recharts-uFX1dZS-.js";import"./analytics-D6GpUSOP.js";import"./plaid-0g_vwjSd.js";import"./dnd-CGWe1ZMP.js";import"./stripe-cKAAJElX.js";import"./lottie-C5eNvt0I.js";import"./lexical-DW4lC8Zx.js";import"./pdf-DjwvAC2g.js";import"./utils-BsODCDYR.js";import"./MobileAppDrawer-CjKRvtSN.js";import"./InboxNotificationsProvider-BmF5-_KA.js";import"./useTaskManagerAccess-CdPkYUw1.js";import"./accountMappingHelper-DqBiQF6x.js";import"./empty-Dj4ZMRNZ.js";import"./pdf-lib-CZXOqgb4.js";import"./index-k1-Pd2Ki.js";import"./url-BxiN6LKq.js";import"./index-6yt3BfRL.js";import"./decodeURIComponentSafe-DANuhXnG.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]="c6bf3300-3d69-4bea-8a7b-ec8fb6fd63cc",t._sentryDebugIdIdentifier="sentry-dbid-c6bf3300-3d69-4bea-8a7b-ec8fb6fd63cc")}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-UOzcPsHa.js";import{z as m}from"./index-6nH5LMe4.js";import{g as n}from"./QBOConnectionScreen-CWU6DFJl.js";import"./sentry-DHDsO12F.js";import{g as p,N as a}from"./core-B5mDy9pu.js";import"./zeni-epic-state-7eY0g-Bc.js";import"./recharts-uFX1dZS-.js";import"./mui-Do6nLzGb.js";import"./analytics-D6GpUSOP.js";import"./plaid-0g_vwjSd.js";import"./dnd-CGWe1ZMP.js";import"./stripe-cKAAJElX.js";import"./lottie-C5eNvt0I.js";import"./lexical-DW4lC8Zx.js";import"./pdf-DjwvAC2g.js";import"./utils-BsODCDYR.js";import"./empty-Dj4ZMRNZ.js";import"./pdf-lib-CZXOqgb4.js";import"./index-k1-Pd2Ki.js";import"./url-BxiN6LKq.js";import"./index-6yt3BfRL.js";import"./decodeURIComponentSafe-DANuhXnG.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="a1205b81-d106-415b-bd92-85aeae53ace3",t._sentryDebugIdIdentifier="sentry-dbid-a1205b81-d106-415b-bd92-85aeae53ace3")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=n(t.search),s=m.getSignedInUser()?.userId??"";if(f(o,r,e,s)===!0){const d=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(a,{to:d})}return i.jsx(a,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
1
+ import{j as i}from"./liveblocks-UOzcPsHa.js";import{z as m}from"./index-CrBk11WI.js";import{g as n}from"./QBOConnectionScreen-CvbLmaBz.js";import"./sentry-DHDsO12F.js";import{g as p,N as a}from"./core-B5mDy9pu.js";import"./zeni-epic-state-7eY0g-Bc.js";import"./recharts-uFX1dZS-.js";import"./mui-Do6nLzGb.js";import"./analytics-D6GpUSOP.js";import"./plaid-0g_vwjSd.js";import"./dnd-CGWe1ZMP.js";import"./stripe-cKAAJElX.js";import"./lottie-C5eNvt0I.js";import"./lexical-DW4lC8Zx.js";import"./pdf-DjwvAC2g.js";import"./utils-BsODCDYR.js";import"./empty-Dj4ZMRNZ.js";import"./pdf-lib-CZXOqgb4.js";import"./index-k1-Pd2Ki.js";import"./url-BxiN6LKq.js";import"./index-6yt3BfRL.js";import"./decodeURIComponentSafe-DANuhXnG.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new t.Error().stack;o&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[o]="a1205b81-d106-415b-bd92-85aeae53ace3",t._sentryDebugIdIdentifier="sentry-dbid-a1205b81-d106-415b-bd92-85aeae53ace3")}catch{}})();const U=()=>{const t=p(),{code:o,realmId:r,state:e}=n(t.search),s=m.getSignedInUser()?.userId??"";if(f(o,r,e,s)===!0){const d=`../../${e}/onboarding?code=${o}&realmId=${r}&state=auth_flow`;return i.jsx(a,{to:d})}return i.jsx(a,{to:"../../"})},f=(t,o,r,e)=>t!=""&&o!=""&&r!=""&&e!=null&&e!="";export{U as default,f as hasValidParams};
@@ -1,4 +1,4 @@
1
- import{j as s}from"./liveblocks-UOzcPsHa.js";import{t as wn,A as $e}from"./AddressScreen-DsGvV3N8.js";import An from"./NotFoundScreen-BkYIKPgh.js";import{a as d,t as Me}from"./sentry-DHDsO12F.js";import{h as _e,g as Ee,u as se,i as xe,j as T,N as Q,q as Pn,l as cn,n as Dn,o as H}from"./core-B5mDy9pu.js";import{fF as Y,d_ as Te,dZ as we,bq as Bn,T_ as jn,bR as Fn,pQ as Vn,Bg as Un,Bj as Ln,Vl as Rn,Vm as Nn,lu as Oe,lx as dn,UB as Gn,b$ as $n,c8 as fe,BK as Ae,Bv as Mn,Vn as me,BL as un,S8 as Qn,mH as ln,di as pn,Vo as Kn,Vp as zn,uA as qn,Uo as Ce,hV as Hn,Un as be,hS as Zn,G8 as Jn,uE as Wn,hK as Xn,hN as Qe,Vq as mn,Vr as Yn,LV as et,Vs as nt,LZ as tt,Bm as at,Vt as ot,Vu as st,ls as rt,lv as it,BX as ct,Bx as gn,BJ as dt,bE as Ke,cE as ut,BW as ze,uT as lt,uH as pt,mz as mt,gG as gt,gF as ft,gE as yt,Vv as ht,Bp as Ct,BY as bt,B$ as St,C2 as It,C8 as kt,dj as Ot}from"./zeni-epic-state-7eY0g-Bc.js";import{z,N as Pe,c as W,q as vt,p as q,a8 as re,j as g,aE as _t,ai as fn,a1 as Et,M as yn,U as hn,h as X,Z as ge,S as ve,aF as xt,H as qe,v as He,ae as Tt,aG as Ze,aH as wt,aI as At}from"./index-6nH5LMe4.js";import{n as De}from"./mui-Do6nLzGb.js";import{g as Pt,h as Dt,q as ie}from"./QBOConnectionScreen-CWU6DFJl.js";import{u as Bt,a as jt}from"./useEmailConnectResultRefresh-Ba8t-BuL.js";import{u as Ft}from"./useChargeCardPusherEvents-BnH8_thb.js";import"./recharts-uFX1dZS-.js";import"./analytics-D6GpUSOP.js";import"./plaid-0g_vwjSd.js";import"./dnd-CGWe1ZMP.js";import"./stripe-cKAAJElX.js";import"./lottie-C5eNvt0I.js";import"./lexical-DW4lC8Zx.js";import"./pdf-DjwvAC2g.js";import"./utils-BsODCDYR.js";import"./empty-Dj4ZMRNZ.js";import"./pdf-lib-CZXOqgb4.js";import"./index-k1-Pd2Ki.js";import"./url-BxiN6LKq.js";import"./index-6yt3BfRL.js";import"./decodeURIComponentSafe-DANuhXnG.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]="6bc0045b-fd5c-4076-afff-8dff924d1555",e._sentryDebugIdIdentifier="sentry-dbid-6bc0045b-fd5c-4076-afff-8dff924d1555")}catch{}})();const Je=e=>{switch(e){case"Complete":return"yes";case"Pending Review":case"Incomplete":return"partially";default:return"no"}},Vt=()=>{const e=_e(),l=Ee(),i=se(),[a,p]=d.useState(!1),[u,c]=d.useState(!1),{tenantEmailDomain:v}=xe(),n=z.getSignedInUser(),{useFeatureGate:t}=Pe(),{isFeatureEnabled:C}=t(W.isApAgingFeatureEnabled),{isFeatureEnabled:o}=t(W.isArAgingFeatureEnabled),{isFeatureEnabled:A}=t(W.isReferralFeatureEnabled),{isFeatureEnabled:w}=t(W.isDebitCardFeatureEnabled),k=vt(),O=T((S=>Y(S))),P=T((S=>S.onboardingCustomerViewState.fetchState)),_=O.excludedResources,F=O.companyId??z.getSignedInUserTenant(v)?.companyId;if(n==null)throw Error("Can't access onboarding flow without signing in...");const m=Te(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&&Bn(O?.userRole),E=_?.resources?.find((S=>S.resource==="/bills"))==null&&!r,x=_?.resources?.find((S=>S.resource==="/reimbursements"))==null;U===!1&&D.push("top_expenses"),h===!1&&D.push("task_card"),E===!1&&D.push("bill_pay_card","bill_pay_promo_card"),x===!1&&D.push("reimbursement_card","reimbursement_promo_card"),D.push("zeni_accounts_promo_card","treasury_promo_card"),A===!1&&D.push("rewards_card");const f=T((S=>{const V=[];C===!1&&V.push("accounts_payable_aging"),o===!1&&V.push("accounts_receivable_aging"),V.push("zeni_accounts_promo_card","treasury_promo_card"),A===!1&&V.push("rewards_card"),k===!1&&V.push("expense_automation_card");const Z=jn(S,V);return Fn(Z.reportsInOrder.map(($=>({fetchState:$.fetchState,error:$.error})))).fetchState}));d.useEffect((()=>{P!=="Completed"||a||m||b||(p(!0),i(Vn(n.userId,F,O.tenantId,!0,!1,D)))}),[a,P,m,b,n,O.tenantId,i]);const B=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((()=>{B.current||(B.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 R=O.company?.companyOnboardingInfo?.onboardingInfo,ee={timeSinceQuoteSign:R?.onboardingTimeSinceQuoteSigned??"",timeSinceQuoteSignInMinutes:R?.onboardingToQuoteSignMinutes??0,isKybDone:Je(R?.businessVerified?.status),isKycDone:Je(R?.identityVerified?.status),paymentType:"",paymentSource:"",qboConnectionSource:R?.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"],We=(e,l)=>{const i=new Map(e.map((a=>[a.key,a])));return l.map((a=>{return p=i.get(a)?.status,p==="starting"||p==="building"?p:"idle";var p}))},Xe=(e,l)=>{if(e.length===0)return!1;const i=new Map(e.map((a=>[a.key,a])));return l.every((a=>i.get(a)?.status==="ready"))},Ye=De.div`
1
+ import{j as s}from"./liveblocks-UOzcPsHa.js";import{t as wn,A as $e}from"./AddressScreen-DhOzuvLT.js";import An from"./NotFoundScreen-MJal1hew.js";import{a as d,t as Me}from"./sentry-DHDsO12F.js";import{h as _e,g as Ee,u as se,i as xe,j as T,N as Q,q as Pn,l as cn,n as Dn,o as H}from"./core-B5mDy9pu.js";import{fF as Y,d_ as Te,dZ as we,bq as Bn,T_ as jn,bR as Fn,pQ as Vn,Bg as Un,Bj as Ln,Vl as Rn,Vm as Nn,lu as Oe,lx as dn,UB as Gn,b$ as $n,c8 as fe,BK as Ae,Bv as Mn,Vn as me,BL as un,S8 as Qn,mH as ln,di as pn,Vo as Kn,Vp as zn,uA as qn,Uo as Ce,hV as Hn,Un as be,hS as Zn,G8 as Jn,uE as Wn,hK as Xn,hN as Qe,Vq as mn,Vr as Yn,LV as et,Vs as nt,LZ as tt,Bm as at,Vt as ot,Vu as st,ls as rt,lv as it,BX as ct,Bx as gn,BJ as dt,bE as Ke,cE as ut,BW as ze,uT as lt,uH as pt,mz as mt,gG as gt,gF as ft,gE as yt,Vv as ht,Bp as Ct,BY as bt,B$ as St,C2 as It,C8 as kt,dj as Ot}from"./zeni-epic-state-7eY0g-Bc.js";import{z,N as Pe,c as W,q as vt,p as q,a8 as re,j as g,aE as _t,ai as fn,a1 as Et,M as yn,U as hn,h as X,Z as ge,S as ve,aF as xt,H as qe,v as He,ae as Tt,aG as Ze,aH as wt,aI as At}from"./index-CrBk11WI.js";import{n as De}from"./mui-Do6nLzGb.js";import{g as Pt,h as Dt,q as ie}from"./QBOConnectionScreen-CvbLmaBz.js";import{u as Bt,a as jt}from"./useEmailConnectResultRefresh-C-cGd7Tb.js";import{u as Ft}from"./useChargeCardPusherEvents--oeBBRmO.js";import"./recharts-uFX1dZS-.js";import"./analytics-D6GpUSOP.js";import"./plaid-0g_vwjSd.js";import"./dnd-CGWe1ZMP.js";import"./stripe-cKAAJElX.js";import"./lottie-C5eNvt0I.js";import"./lexical-DW4lC8Zx.js";import"./pdf-DjwvAC2g.js";import"./utils-BsODCDYR.js";import"./empty-Dj4ZMRNZ.js";import"./pdf-lib-CZXOqgb4.js";import"./index-k1-Pd2Ki.js";import"./url-BxiN6LKq.js";import"./index-6yt3BfRL.js";import"./decodeURIComponentSafe-DANuhXnG.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]="6bc0045b-fd5c-4076-afff-8dff924d1555",e._sentryDebugIdIdentifier="sentry-dbid-6bc0045b-fd5c-4076-afff-8dff924d1555")}catch{}})();const Je=e=>{switch(e){case"Complete":return"yes";case"Pending Review":case"Incomplete":return"partially";default:return"no"}},Vt=()=>{const e=_e(),l=Ee(),i=se(),[a,p]=d.useState(!1),[u,c]=d.useState(!1),{tenantEmailDomain:v}=xe(),n=z.getSignedInUser(),{useFeatureGate:t}=Pe(),{isFeatureEnabled:C}=t(W.isApAgingFeatureEnabled),{isFeatureEnabled:o}=t(W.isArAgingFeatureEnabled),{isFeatureEnabled:A}=t(W.isReferralFeatureEnabled),{isFeatureEnabled:w}=t(W.isDebitCardFeatureEnabled),k=vt(),O=T((S=>Y(S))),P=T((S=>S.onboardingCustomerViewState.fetchState)),_=O.excludedResources,F=O.companyId??z.getSignedInUserTenant(v)?.companyId;if(n==null)throw Error("Can't access onboarding flow without signing in...");const m=Te(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&&Bn(O?.userRole),E=_?.resources?.find((S=>S.resource==="/bills"))==null&&!r,x=_?.resources?.find((S=>S.resource==="/reimbursements"))==null;U===!1&&D.push("top_expenses"),h===!1&&D.push("task_card"),E===!1&&D.push("bill_pay_card","bill_pay_promo_card"),x===!1&&D.push("reimbursement_card","reimbursement_promo_card"),D.push("zeni_accounts_promo_card","treasury_promo_card"),A===!1&&D.push("rewards_card");const f=T((S=>{const V=[];C===!1&&V.push("accounts_payable_aging"),o===!1&&V.push("accounts_receivable_aging"),V.push("zeni_accounts_promo_card","treasury_promo_card"),A===!1&&V.push("rewards_card"),k===!1&&V.push("expense_automation_card");const Z=jn(S,V);return Fn(Z.reportsInOrder.map(($=>({fetchState:$.fetchState,error:$.error})))).fetchState}));d.useEffect((()=>{P!=="Completed"||a||m||b||(p(!0),i(Vn(n.userId,F,O.tenantId,!0,!1,D)))}),[a,P,m,b,n,O.tenantId,i]);const B=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((()=>{B.current||(B.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 R=O.company?.companyOnboardingInfo?.onboardingInfo,ee={timeSinceQuoteSign:R?.onboardingTimeSinceQuoteSigned??"",timeSinceQuoteSignInMinutes:R?.onboardingToQuoteSignMinutes??0,isKybDone:Je(R?.businessVerified?.status),isKycDone:Je(R?.identityVerified?.status),paymentType:"",paymentSource:"",qboConnectionSource:R?.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"],We=(e,l)=>{const i=new Map(e.map((a=>[a.key,a])));return l.map((a=>{return p=i.get(a)?.status,p==="starting"||p==="building"?p:"idle";var p}))},Xe=(e,l)=>{if(e.length===0)return!1;const i=new Map(e.map((a=>[a.key,a])));return l.every((a=>i.get(a)?.status==="ready"))},Ye=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-UOzcPsHa.js";import{i as q,j as _,g as Z,u as z,h as J,l as ne,k as oa,n as ft,o as F,N as yn}from"./core-B5mDy9pu.js";import{fF as L,VH as Ze,bE as sa,br as Ee,X2 as An,ka as vn,X3 as Xt,X4 as In,kd as gt,X5 as Qe,X6 as En,ki as Tn,X7 as Yt,X8 as xn,km as bt,X9 as He,Xa as Dn,Xb as wn,V$ as Pn,lo as On,Xc as Fn,bn as Je,Xd as ra,WF as ue,bc as ia,lC as ca,ll as la,WH as me,WG as ae,fE as da,ga as jn,gq as Ct,Xe as Rn,Xf as Bn,Xg as ua,Xh as Oe,DR as Me,DS as Ue,Ee as Te,E8 as pe,DW as Le,Xi as Mn,b$ as Ve,Xj as Un,Xk as Ln,Xl as ma,Xm as Fe,Xn as Vn,ei as et,A2 as pa,Xo as Xn,Xp as ha,Xq as Yn,Xr as Gn,Xs as Nn,Xt as St,UD as kt,u6 as xe,l$ as De,Eo as yt,A9 as $n,Ag as zn,Xu as Kn,Xv as qn,DT as Gt,Xw as Qn,A5 as ve,A0 as fa,Xx as be,Xy as Nt,Xz as Hn,XA as At,UC as vt,Cd as ga,XB as Wn,XC as ba,XD as Zn,XE as Jn,XF as eo,XG as It,Cs as to,Cz as ao,XH as no,XI as oo,DV as $t,XJ as so,Cb as Ca,XK as Ce,XL as zt,XM as ro,bq as _a,Et as Sa,XN as io,XO as ka,XP as co,XQ as lo,XR as uo,XS as Et,El as mo,En as po,XT as ho,XU as fo,DU as Kt,XV as go,Er as ya,XW as _e,XX as qt,XY as bo,XZ as Co,X_ as Aa,lQ as va,pX as Ia,lV as Ea,pV as Ta,pU as xa,pT as Da,BA as _o,dc as So,pQ as ko,T_ as yo,q5 as Ao,X$ as vo,Y0 as Io,Y1 as Eo,b5 as Tt,p$ as To,ic as xo,gI as Do,p_ as wo,le as Po,pY as Oo,pW as Fo,d_ as jo,dZ as Ro}from"./zeni-epic-state-7eY0g-Bc.js";import{z as V,av as oe,p as j,j as T,G as Q,bb as Bo,as as Xe,a8 as Ye,bc as wa,S as N,bd as Mo,be as Pa,E as Uo,bf as Lo,bg as Vo,a as Oa,a1 as Fa,e as ja,ar as Xo,bh as Yo,ao as Go,N as we,bi as Ra,x as ce,bj as Ba,bk as Ma,au as Ua,bl as No,ai as Ge,U as Ne,c as X,bm as $o,q as zo,h as Ko,a4 as qo,aq as Qo,bn as Ho,bo as Wo,bp as Zo,bq as Ie}from"./index-6nH5LMe4.js";import{n as xt}from"./mui-Do6nLzGb.js";import{a as b}from"./sentry-DHDsO12F.js";import{w as La}from"./withTransactionSidePanel-DK-Ex27L.js";import{c as Va,t as Pe,f as he,b as Dt,a as wt,v as Jo}from"./routePaths-uBvxqlLY.js";import{u as se}from"./useAskAiCfoHostNavButtonProps-BsP5fVhq.js";import Be from"./NotFoundScreen-BkYIKPgh.js";import{u as Pt}from"./useInitialThreadRequest-7Q8HJAH2.js";import{t as Xa}from"./analyticsHelper-CwB3kQvw.js";import{C as es}from"./CompanyPassportScreen-BxoatMVb.js";import{u as ts}from"./useAiCfoDashboardSuggestedQuestionsChips-D8KJqvT7.js";import{F as as}from"./FeaturePreviewScreen-5SleVFKv.js";import"./recharts-uFX1dZS-.js";import"./analytics-D6GpUSOP.js";import"./plaid-0g_vwjSd.js";import"./dnd-CGWe1ZMP.js";import"./stripe-cKAAJElX.js";import"./lottie-C5eNvt0I.js";import"./lexical-DW4lC8Zx.js";import"./pdf-DjwvAC2g.js";import"./utils-BsODCDYR.js";import"./TransactionDetailScreen-Bp7IFDK0.js";import"./decodeURIComponentSafe-DANuhXnG.js";import"./expenseAutomationHelper-DBDpSggk.js";import"./stripSplatSuffix-CQQXAy0N.js";import"./MobileAppDrawer-0YtWXA3B.js";import"./InboxNotificationsProvider-BmF5-_KA.js";import"./useTaskManagerAccess-BG0Fkj9k.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]="7167053a-ef5f-44b9-b986-ca78fcdff90a",e._sentryDebugIdIdentifier="sentry-dbid-7167053a-ef5f-44b9-b986-ca78fcdff90a")}catch{}})();const ns=La((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=q(),s=V.getSignedInUser(),i=_((E=>E.tenantState.currentTenantId)),l=_((E=>L(E))),{tenantEmailDomain:m}=q(),p=Z(),h=l?.companyName??"",f={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=b.useMemo((()=>({authParams:f,companyName:h,downloadEndPoint:`${oe}/agingDetailedReport`,timezone:Ze()})),[]),u=b.useMemo((()=>r!=null?sa(r):Ee()),[r]),C=z(),g=J(),k=_((E=>An(E,u,o))),I=b.useCallback((()=>{o!=null&&k.fetchState!=="In-Progress"&&k.fetchState!=="Completed"&&C(vn(o,u))}),[u]),A=b.useCallback((()=>{g("../../",{relative:"path"})}),[]),S=b.useCallback(((E,B)=>{C(Xt({sortKey:E,sortOrder:B}))}),[]),x=b.useCallback((E=>{C(Xt({downloadState:E}))}),[]),P=b.useCallback((E=>{if(e)e(E.transactionId,E.transactionType);else if(m!=null){const B=Va({id:E.transactionId,type:E.transactionType},m);g(B);const y=j(p.state?.pathnameStackToGoBack,p.pathname);g(B,{state:{pathnameStackToGoBack:y}})}}),[m,e]),D=b.useCallback((()=>{k.vendor!=null&&T.trackApAgingDetail("AP Aging",u.format(Q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),k.vendor.id,k.vendor.name)}),[k.vendor,u]);return b.useEffect((()=>{I()}),[]),b.useEffect((()=>{k.fetchState==="Completed"&&D()}),[D,k.fetchState]),d.jsx(Bo,{apAgingDetail:k,downloadParams:c,reportDate:u,analytics:T,onTransactionClick:P,onReload:I,onBackClick:A,onColumnSortConfigChanged:S,updateDownloadStateHandler:x,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),os=()=>{const e=z(),a=J(),t=_((S=>In(S))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AP Aging"});Xe({isDataReady:t.fetchState==="Completed"});const r=V.getSignedInUser(),s=_((S=>S.tenantState.currentTenantId)),i=_((S=>L(S))),l=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},p=b.useMemo((()=>({authParams:m,companyName:l,downloadEndPoint:`${oe}/agingReport`,timezone:Ze()})),[]),h=t.apAgingUIState.selectedDate??Ee(),f=b.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(gt(h))}),[]);b.useEffect((()=>{f()}),[]);const c=b.useCallback((()=>{a("../",{relative:"path"})}),[]),u=b.useCallback((S=>{e(Qe({searchString:S}))}),[]),C=b.useCallback(((S,x)=>{e(Qe({sortKey:x,sortOrder:S}))}),[]),g=b.useCallback((S=>{a(`./${S}/${h.format(Q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[h]),k=b.useCallback((S=>{e(Qe({downloadState:S}))}),[]),I=b.useCallback(((S,x)=>{}),[]),A=b.useCallback(((S,x)=>{e(Qe({selectedDate:S,agingDateSelectionType:x})),e(gt(S))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ye,{analytics:T,onLoad:S=>S.trackPageLoaded(N.Event.agingReport,"AP Aging")}):null,d.jsx(wa,{uiState:t.apAgingUIState,report:t,downloadParams:p,analytics:T,onReloadReport:f,onBackClick:c,onSearchTextChange:u,onSortOrderChange:C,onEntityNameClick:g,updateDownloadStateHandler:k,onSelectedDateChanged:A,onNodeCollapseToggled:I,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},ss=La((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=q(),s=V.getSignedInUser(),i=_((D=>L(D))),{tenantEmailDomain:l}=q(),m=Z(),p=i.companyName,h={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},f=b.useMemo((()=>({authParams:h,companyName:p,downloadEndPoint:`${oe}/agingDetailedReport`,timezone:Ze()})),[]),c=b.useMemo((()=>r!=null?sa(r):Ee()),[r]),u=z(),C=J(),g=_((D=>En(D,c,o))),k=b.useCallback((()=>{o!=null&&g.fetchState!=="In-Progress"&&g.fetchState!=="Completed"&&u(Tn(o,c))}),[c]),I=b.useCallback((()=>{C("../../",{relative:"path"})}),[]),A=b.useCallback(((D,E)=>{u(Yt({sortKey:D,sortOrder:E}))}),[]),S=b.useCallback((D=>{u(Yt({downloadState:D}))}),[]),x=b.useCallback((D=>{if(e)e(D.transactionId,D.transactionType);else if(l!=null){const E=Va({id:D.transactionId,type:D.transactionType},l);C(E);const B=j(m.state?.pathnameStackToGoBack,m.pathname);C(E,{state:{pathnameStackToGoBack:B}})}}),[l,e]),P=b.useCallback((()=>{g.customer!=null&&T.trackArAgingDetail("AR Aging",c.format(Q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),g.customer.id,g.customer.name)}),[g.customer,c]);return b.useEffect((()=>{k()}),[]),b.useEffect((()=>{g.fetchState==="Completed"&&P()}),[g.fetchState,P]),d.jsx(Mo,{arAgingDetail:g,downloadParams:f,reportDate:c,analytics:T,onTransactionClick:x,onReload:k,onBackClick:I,onColumnSortConfigChanged:A,updateDownloadStateHandler:S,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),rs=()=>{const e=z(),a=J(),t=_((A=>xn(A))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AR Aging"});Xe({isDataReady:t.fetchState==="Completed"});const r=V.getSignedInUser(),s=_((A=>L(A))),i=s.companyName,l={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=b.useMemo((()=>({authParams:l,companyName:i,downloadEndPoint:`${oe}/agingReport`,timezone:Ze()})),[]),p=t.arAgingUIState.selectedDate??Ee(),h=b.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(bt(p))}),[]);b.useEffect((()=>{h()}),[]);const f=b.useCallback((()=>{a("../",{relative:"path"})}),[]),c=b.useCallback((A=>{e(He({searchString:A}))}),[]),u=b.useCallback(((A,S)=>{e(He({sortKey:S,sortOrder:A}))}),[]),C=b.useCallback((A=>{a(`./${A}/${p.format(Q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[p]),g=b.useCallback((A=>{e(He({downloadState:A}))}),[]),k=b.useCallback(((A,S)=>{e(He({selectedDate:A,agingDateSelectionType:S})),e(bt(A))}),[]),I=b.useCallback(((A,S)=>{e(Dn({nodeId:A,isCollapsed:S}))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ye,{analytics:T,onLoad:A=>A.trackPageLoaded(N.Event.agingReport,"AR Aging")}):null,d.jsx(wa,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:T,onReloadReport:h,onBackClick:f,onSearchTextChange:c,onSortOrderChange:u,onEntityNameClick:C,updateDownloadStateHandler:g,onSelectedDateChanged:k,onNodeCollapseToggled:I,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Ya=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function Ga(e,a){const t=Pn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=Pe(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=j(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(On(n,o))}}}const is=ne((function(e){const a=wn(e).accountsInOrder.map(((t,n)=>Ya(t,n)));return{sectionTitle:Q.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,fetchState:e.cashBalanceState.fetchState,analytics:T}}),Ga)(Pa),cs=ne((function(e){const a=Fn(e).accountsInOrder.map(((o,r)=>Ya(o,r))),t=V.getSignedInUser(),n=Je(t);return{sectionTitle:Q.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:T}}),Ga)(Pa);function ls(){const e=J(),a=Z(),{tenantEmailDomain:t}=q(),n=_((o=>L(o).company?.companyInfo.firstMonthOfFY??1));return _((o=>o.cashBalanceState.fetchState))==="Error"?d.jsx(Be,{}):d.jsx(is,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,firstMonthOfFY:n})}function ds(){const e=J(),a=Z(),{tenantEmailDomain:t}=q(),n=_((o=>L(o).company?.companyInfo.firstMonthOfFY??1));return _((o=>o.cardBalanceState.fetchState))==="Error"?d.jsx(Be,{}):d.jsx(cs,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,firstMonthOfFY:n})}const us=xt.div`
1
+ import{j as d}from"./liveblocks-UOzcPsHa.js";import{i as q,j as _,g as Z,u as z,h as J,l as ne,k as oa,n as ft,o as F,N as yn}from"./core-B5mDy9pu.js";import{fF as L,VH as Ze,bE as sa,br as Ee,X2 as An,ka as vn,X3 as Xt,X4 as In,kd as gt,X5 as Qe,X6 as En,ki as Tn,X7 as Yt,X8 as xn,km as bt,X9 as He,Xa as Dn,Xb as wn,V$ as Pn,lo as On,Xc as Fn,bn as Je,Xd as ra,WF as ue,bc as ia,lC as ca,ll as la,WH as me,WG as ae,fE as da,ga as jn,gq as Ct,Xe as Rn,Xf as Bn,Xg as ua,Xh as Oe,DR as Me,DS as Ue,Ee as Te,E8 as pe,DW as Le,Xi as Mn,b$ as Ve,Xj as Un,Xk as Ln,Xl as ma,Xm as Fe,Xn as Vn,ei as et,A2 as pa,Xo as Xn,Xp as ha,Xq as Yn,Xr as Gn,Xs as Nn,Xt as St,UD as kt,u6 as xe,l$ as De,Eo as yt,A9 as $n,Ag as zn,Xu as Kn,Xv as qn,DT as Gt,Xw as Qn,A5 as ve,A0 as fa,Xx as be,Xy as Nt,Xz as Hn,XA as At,UC as vt,Cd as ga,XB as Wn,XC as ba,XD as Zn,XE as Jn,XF as eo,XG as It,Cs as to,Cz as ao,XH as no,XI as oo,DV as $t,XJ as so,Cb as Ca,XK as Ce,XL as zt,XM as ro,bq as _a,Et as Sa,XN as io,XO as ka,XP as co,XQ as lo,XR as uo,XS as Et,El as mo,En as po,XT as ho,XU as fo,DU as Kt,XV as go,Er as ya,XW as _e,XX as qt,XY as bo,XZ as Co,X_ as Aa,lQ as va,pX as Ia,lV as Ea,pV as Ta,pU as xa,pT as Da,BA as _o,dc as So,pQ as ko,T_ as yo,q5 as Ao,X$ as vo,Y0 as Io,Y1 as Eo,b5 as Tt,p$ as To,ic as xo,gI as Do,p_ as wo,le as Po,pY as Oo,pW as Fo,d_ as jo,dZ as Ro}from"./zeni-epic-state-7eY0g-Bc.js";import{z as V,av as oe,p as j,j as T,G as Q,bb as Bo,as as Xe,a8 as Ye,bc as wa,S as N,bd as Mo,be as Pa,E as Uo,bf as Lo,bg as Vo,a as Oa,a1 as Fa,e as ja,ar as Xo,bh as Yo,ao as Go,N as we,bi as Ra,x as ce,bj as Ba,bk as Ma,au as Ua,bl as No,ai as Ge,U as Ne,c as X,bm as $o,q as zo,h as Ko,a4 as qo,aq as Qo,bn as Ho,bo as Wo,bp as Zo,bq as Ie}from"./index-CrBk11WI.js";import{n as xt}from"./mui-Do6nLzGb.js";import{a as b}from"./sentry-DHDsO12F.js";import{w as La}from"./withTransactionSidePanel-Co9xwJi4.js";import{c as Va,t as Pe,f as he,b as Dt,a as wt,v as Jo}from"./routePaths-CeCPwkIf.js";import{u as se}from"./useAskAiCfoHostNavButtonProps-BamKKcjy.js";import Be from"./NotFoundScreen-MJal1hew.js";import{u as Pt}from"./useInitialThreadRequest-Bwvu8W79.js";import{t as Xa}from"./analyticsHelper-H1Xp9Uyk.js";import{C as es}from"./CompanyPassportScreen-D3aXSi-v.js";import{u as ts}from"./useAiCfoDashboardSuggestedQuestionsChips-CSs_vZyp.js";import{F as as}from"./FeaturePreviewScreen-B5Hq_fA2.js";import"./recharts-uFX1dZS-.js";import"./analytics-D6GpUSOP.js";import"./plaid-0g_vwjSd.js";import"./dnd-CGWe1ZMP.js";import"./stripe-cKAAJElX.js";import"./lottie-C5eNvt0I.js";import"./lexical-DW4lC8Zx.js";import"./pdf-DjwvAC2g.js";import"./utils-BsODCDYR.js";import"./TransactionDetailScreen-CcO0FUjf.js";import"./decodeURIComponentSafe-DANuhXnG.js";import"./expenseAutomationHelper-DBDpSggk.js";import"./stripSplatSuffix-CQQXAy0N.js";import"./MobileAppDrawer-CjKRvtSN.js";import"./InboxNotificationsProvider-BmF5-_KA.js";import"./useTaskManagerAccess-CdPkYUw1.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]="7167053a-ef5f-44b9-b986-ca78fcdff90a",e._sentryDebugIdIdentifier="sentry-dbid-7167053a-ef5f-44b9-b986-ca78fcdff90a")}catch{}})();const ns=La((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{vendorId:o,reportDate:r}=q(),s=V.getSignedInUser(),i=_((E=>E.tenantState.currentTenantId)),l=_((E=>L(E))),{tenantEmailDomain:m}=q(),p=Z(),h=l?.companyName??"",f={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i??""},c=b.useMemo((()=>({authParams:f,companyName:h,downloadEndPoint:`${oe}/agingDetailedReport`,timezone:Ze()})),[]),u=b.useMemo((()=>r!=null?sa(r):Ee()),[r]),C=z(),g=J(),k=_((E=>An(E,u,o))),I=b.useCallback((()=>{o!=null&&k.fetchState!=="In-Progress"&&k.fetchState!=="Completed"&&C(vn(o,u))}),[u]),A=b.useCallback((()=>{g("../../",{relative:"path"})}),[]),S=b.useCallback(((E,B)=>{C(Xt({sortKey:E,sortOrder:B}))}),[]),x=b.useCallback((E=>{C(Xt({downloadState:E}))}),[]),P=b.useCallback((E=>{if(e)e(E.transactionId,E.transactionType);else if(m!=null){const B=Va({id:E.transactionId,type:E.transactionType},m);g(B);const y=j(p.state?.pathnameStackToGoBack,p.pathname);g(B,{state:{pathnameStackToGoBack:y}})}}),[m,e]),D=b.useCallback((()=>{k.vendor!=null&&T.trackApAgingDetail("AP Aging",u.format(Q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),k.vendor.id,k.vendor.name)}),[k.vendor,u]);return b.useEffect((()=>{I()}),[]),b.useEffect((()=>{k.fetchState==="Completed"&&D()}),[D,k.fetchState]),d.jsx(Bo,{apAgingDetail:k,downloadParams:c,reportDate:u,analytics:T,onTransactionClick:P,onReload:I,onBackClick:A,onColumnSortConfigChanged:S,updateDownloadStateHandler:x,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),os=()=>{const e=z(),a=J(),t=_((S=>In(S))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AP Aging"});Xe({isDataReady:t.fetchState==="Completed"});const r=V.getSignedInUser(),s=_((S=>S.tenantState.currentTenantId)),i=_((S=>L(S))),l=i?.companyName??"",m={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s??""},p=b.useMemo((()=>({authParams:m,companyName:l,downloadEndPoint:`${oe}/agingReport`,timezone:Ze()})),[]),h=t.apAgingUIState.selectedDate??Ee(),f=b.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(gt(h))}),[]);b.useEffect((()=>{f()}),[]);const c=b.useCallback((()=>{a("../",{relative:"path"})}),[]),u=b.useCallback((S=>{e(Qe({searchString:S}))}),[]),C=b.useCallback(((S,x)=>{e(Qe({sortKey:x,sortOrder:S}))}),[]),g=b.useCallback((S=>{a(`./${S}/${h.format(Q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[h]),k=b.useCallback((S=>{e(Qe({downloadState:S}))}),[]),I=b.useCallback(((S,x)=>{}),[]),A=b.useCallback(((S,x)=>{e(Qe({selectedDate:S,agingDateSelectionType:x})),e(gt(S))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ye,{analytics:T,onLoad:S=>S.trackPageLoaded(N.Event.agingReport,"AP Aging")}):null,d.jsx(wa,{uiState:t.apAgingUIState,report:t,downloadParams:p,analytics:T,onReloadReport:f,onBackClick:c,onSearchTextChange:u,onSortOrderChange:C,onEntityNameClick:g,updateDownloadStateHandler:k,onSelectedDateChanged:A,onNodeCollapseToggled:I,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},ss=La((function({openTransactionPanel:e,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n}){const{customerId:o,reportDate:r}=q(),s=V.getSignedInUser(),i=_((D=>L(D))),{tenantEmailDomain:l}=q(),m=Z(),p=i.companyName,h={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:i.tenantId},f=b.useMemo((()=>({authParams:h,companyName:p,downloadEndPoint:`${oe}/agingDetailedReport`,timezone:Ze()})),[]),c=b.useMemo((()=>r!=null?sa(r):Ee()),[r]),u=z(),C=J(),g=_((D=>En(D,c,o))),k=b.useCallback((()=>{o!=null&&g.fetchState!=="In-Progress"&&g.fetchState!=="Completed"&&u(Tn(o,c))}),[c]),I=b.useCallback((()=>{C("../../",{relative:"path"})}),[]),A=b.useCallback(((D,E)=>{u(Yt({sortKey:D,sortOrder:E}))}),[]),S=b.useCallback((D=>{u(Yt({downloadState:D}))}),[]),x=b.useCallback((D=>{if(e)e(D.transactionId,D.transactionType);else if(l!=null){const E=Va({id:D.transactionId,type:D.transactionType},l);C(E);const B=j(m.state?.pathnameStackToGoBack,m.pathname);C(E,{state:{pathnameStackToGoBack:B}})}}),[l,e]),P=b.useCallback((()=>{g.customer!=null&&T.trackArAgingDetail("AR Aging",c.format(Q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat),g.customer.id,g.customer.name)}),[g.customer,c]);return b.useEffect((()=>{k()}),[]),b.useEffect((()=>{g.fetchState==="Completed"&&P()}),[g.fetchState,P]),d.jsx(Mo,{arAgingDetail:g,downloadParams:f,reportDate:c,analytics:T,onTransactionClick:x,onReload:k,onBackClick:I,onColumnSortConfigChanged:A,updateDownloadStateHandler:S,panelContent:a,sidePanelIsOpen:t,sidePanelIsFullView:n})})),rs=()=>{const e=z(),a=J(),t=_((A=>xn(A))),{isAiCfoAccessEnabled:n,onAskAiCfoClick:o}=se({mobileExploreReferrer:"AR Aging"});Xe({isDataReady:t.fetchState==="Completed"});const r=V.getSignedInUser(),s=_((A=>L(A))),i=s.companyName,l={userId:r?.userId??"",sessionId:r?.zeniSessionId??"",tenantId:s.tenantId},m=b.useMemo((()=>({authParams:l,companyName:i,downloadEndPoint:`${oe}/agingReport`,timezone:Ze()})),[]),p=t.arAgingUIState.selectedDate??Ee(),h=b.useCallback((()=>{t.fetchState!=="In-Progress"&&t.fetchState!=="Completed"&&e(bt(p))}),[]);b.useEffect((()=>{h()}),[]);const f=b.useCallback((()=>{a("../",{relative:"path"})}),[]),c=b.useCallback((A=>{e(He({searchString:A}))}),[]),u=b.useCallback(((A,S)=>{e(He({sortKey:S,sortOrder:A}))}),[]),C=b.useCallback((A=>{a(`./${A}/${p.format(Q.getLocalizedStrings().dateFormat.analytics.YYYYDashMMDashDDFormat)}`)}),[p]),g=b.useCallback((A=>{e(He({downloadState:A}))}),[]),k=b.useCallback(((A,S)=>{e(He({selectedDate:A,agingDateSelectionType:S})),e(bt(A))}),[]),I=b.useCallback(((A,S)=>{e(Dn({nodeId:A,isCollapsed:S}))}),[]);return d.jsxs(d.Fragment,{children:[t.fetchState==="Completed"?d.jsx(Ye,{analytics:T,onLoad:A=>A.trackPageLoaded(N.Event.agingReport,"AR Aging")}):null,d.jsx(wa,{uiState:t.arAgingUIState,report:t,downloadParams:m,analytics:T,onReloadReport:h,onBackClick:f,onSearchTextChange:c,onSortOrderChange:u,onEntityNameClick:C,updateDownloadStateHandler:g,onSelectedDateChanged:k,onNodeCollapseToggled:I,isAiCfoAccessEnabled:n,onAskAiCfoClick:o})]})},Ya=(e,a)=>({key:a,title:e.accountName,amount:e.balance?.available,logoUri:e.logo?.toString(),source:e});function Ga(e,a){const t=Pn(a.firstMonthOfFY);return{onItemClick:(n,o)=>{const r=o.accountName===""?o.accountDescription:o.accountName,s=Pe(a.tenantEmailDomain,o.accountId,o.accountType,r,"quarter",t,!1),i=j(a.location.state?.pathnameStackToGoBack,a.location.pathname);a.navigate(s,{state:{pathnameStackToGoBack:i,referrer:a.referrerType}})},onSetAccountsStatementDate:(n,o)=>{e(On(n,o))}}}const is=ne((function(e){const a=wn(e).accountsInOrder.map(((t,n)=>Ya(t,n)));return{sectionTitle:Q.getLocalizedStrings().balanceCard.cashBalanceSectionTitle,transactionArray:a,fetchState:e.cashBalanceState.fetchState,analytics:T}}),Ga)(Pa),cs=ne((function(e){const a=Fn(e).accountsInOrder.map(((o,r)=>Ya(o,r))),t=V.getSignedInUser(),n=Je(t);return{sectionTitle:Q.getLocalizedStrings().balanceCard.cardBalanceSectionTitle,transactionArray:a,isZeniUser:n,fetchState:e.cardBalanceState.fetchState,analytics:T}}),Ga)(Pa);function ls(){const e=J(),a=Z(),{tenantEmailDomain:t}=q(),n=_((o=>L(o).company?.companyInfo.firstMonthOfFY??1));return _((o=>o.cashBalanceState.fetchState))==="Error"?d.jsx(Be,{}):d.jsx(is,{tenantEmailDomain:t,location:a,referrerType:"Cash Balance",navigate:e,firstMonthOfFY:n})}function ds(){const e=J(),a=Z(),{tenantEmailDomain:t}=q(),n=_((o=>L(o).company?.companyInfo.firstMonthOfFY??1));return _((o=>o.cardBalanceState.fetchState))==="Error"?d.jsx(Be,{}):d.jsx(cs,{tenantEmailDomain:t,location:a,referrerType:"Card Balance",navigate:e,firstMonthOfFY:n})}const us=xt.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-UOzcPsHa.js";import{a as u}from"./sentry-DHDsO12F.js";import{u as y,j as p,l as w,g as A,N as L}from"./core-B5mDy9pu.js";import{TJ as N,fF as _,gl as U,TK as k,pS as R,TL as z}from"./zeni-epic-state-7eY0g-Bc.js";import{u as j,z as f,L as C,t as I,G as O,b as $}from"./index-6nH5LMe4.js";import"./mui-Do6nLzGb.js";import{t as P}from"./getLocaleForTenant-DH5Avx3x.js";import"./recharts-uFX1dZS-.js";import"./analytics-D6GpUSOP.js";import"./plaid-0g_vwjSd.js";import"./dnd-CGWe1ZMP.js";import"./stripe-cKAAJElX.js";import"./lottie-C5eNvt0I.js";import"./lexical-DW4lC8Zx.js";import"./pdf-DjwvAC2g.js";import"./utils-BsODCDYR.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]="93b3b57e-ba53-412d-b9e0-47eb1fb35df7",t._sentryDebugIdIdentifier="sentry-dbid-93b3b57e-ba53-412d-b9e0-47eb1fb35df7")}catch{}})();const G=w((function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}}))((function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=A(),m=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let b="";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 T=E(r.pathname);if(T!=null)c=`../${o.tenantEmailDomain}/${T}`,b="comingFromV2UrlPath",T==="ai-cfo/explore"&&(d=m.get("question")?.replace(/^["']|["']$/g,"")??null,e=m.get("should_submit")==="true");else if(i!=null)if(n.reduce(((l,x)=>l||i.split("/").find((D=>D===x))!=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}`,b="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 F=$(c,m);return v.jsx(L,{to:F,replace:!0,state:{...r.state,origin:"",message:b,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}}));function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=j(),h=u.useRef(!1),r=u.useRef(!1),m=u.useRef(null),b=p((e=>N(e))),n=p((e=>e.tenantState.fetchState)),i=p((e=>e.tenantState.error)),a=p((e=>e.tenantState.activeTenantFetchState.fetchState)),c=p((e=>_(e))),d=f.getSignedInUser();return u.useLayoutEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId??null;m.current!==e&&(m.current=e,h.current=!1,r.current=!1,s(C.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(C.TENANT_FETCHING),t(U(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"&&!k(i))&&t(R(e.userId)))}),[n,a,i,d,t]),u.useEffect((()=>{f.isSignedIn()&&n==="Completed"&&b.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(b.tenantsCoreDetailsInOrder),o())}),[b.tenantsCoreDetailsInOrder,n]),u.useEffect((()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(O.updateAppLocaleID(P(c)),o())}),[n,a,c]),v.jsx(G,{})}const Q=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],q={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of Q)if(t.toLocaleLowerCase().includes(s))return q[s]}export{oe as default};
1
+ import{j as v}from"./liveblocks-UOzcPsHa.js";import{a as u}from"./sentry-DHDsO12F.js";import{u as y,j as p,l as w,g as A,N as L}from"./core-B5mDy9pu.js";import{TJ as N,fF as _,gl as U,TK as k,pS as R,TL as z}from"./zeni-epic-state-7eY0g-Bc.js";import{u as j,z as f,L as C,t as I,G as O,b as $}from"./index-CrBk11WI.js";import"./mui-Do6nLzGb.js";import{t as P}from"./getLocaleForTenant-xZFgPOZu.js";import"./recharts-uFX1dZS-.js";import"./analytics-D6GpUSOP.js";import"./plaid-0g_vwjSd.js";import"./dnd-CGWe1ZMP.js";import"./stripe-cKAAJElX.js";import"./lottie-C5eNvt0I.js";import"./lexical-DW4lC8Zx.js";import"./pdf-DjwvAC2g.js";import"./utils-BsODCDYR.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]="93b3b57e-ba53-412d-b9e0-47eb1fb35df7",t._sentryDebugIdIdentifier="sentry-dbid-93b3b57e-ba53-412d-b9e0-47eb1fb35df7")}catch{}})();const G=w((function(t){return{fetchState:t.tenantState.fetchState,activeTenantFetchState:t.tenantState.activeTenantFetchState.fetchState,currentTenant:_(t),tenantsInOrder:z(t).tenantsInOrder}}))((function({fetchState:t,activeTenantFetchState:s,currentTenant:o,tenantsInOrder:h}){const r=A(),m=new URLSearchParams(r.search);if(o==null||t!=="Completed"&&s!=="Completed")return null;{let b="";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 T=E(r.pathname);if(T!=null)c=`../${o.tenantEmailDomain}/${T}`,b="comingFromV2UrlPath",T==="ai-cfo/explore"&&(d=m.get("question")?.replace(/^["']|["']$/g,"")??null,e=m.get("should_submit")==="true");else if(i!=null)if(n.reduce(((l,x)=>l||i.split("/").find((D=>D===x))!=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}`,b="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 F=$(c,m);return v.jsx(L,{to:F,replace:!0,state:{...r.state,origin:"",message:b,aiCfoInitialQuestion:d,aiCfoShouldSubmit:e,aiCfoRef:g,aiCfoEmailRefId:S}})}}));function oe(){const t=y(),{setLoading:s,clearAllLoading:o}=j(),h=u.useRef(!1),r=u.useRef(!1),m=u.useRef(null),b=p((e=>N(e))),n=p((e=>e.tenantState.fetchState)),i=p((e=>e.tenantState.error)),a=p((e=>e.tenantState.activeTenantFetchState.fetchState)),c=p((e=>_(e))),d=f.getSignedInUser();return u.useLayoutEffect((()=>{const e=f.getActiveTenantForUser()?.tenantId??null;m.current!==e&&(m.current=e,h.current=!1,r.current=!1,s(C.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(C.TENANT_FETCHING),t(U(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"&&!k(i))&&t(R(e.userId)))}),[n,a,i,d,t]),u.useEffect((()=>{f.isSignedIn()&&n==="Completed"&&b.tenantsCoreDetailsInOrder.length>0&&(f.saveSignedInUserTenants(b.tenantsCoreDetailsInOrder),o())}),[b.tenantsCoreDetailsInOrder,n]),u.useEffect((()=>{!f.isSignedIn()||n!=="Completed"&&a!=="Completed"||c==null||(O.updateAppLocaleID(P(c)),o())}),[n,a,c]),v.jsx(G,{})}const Q=["dashboard/cash-balance","dashboard/card-balance","dashboard/operating-expenses","dashboard/revenue","dashboard/burn-rate","dashboard/cash-position","dashboard/top-expenses","dashboard/cash-in-cash-out","dashboard","reports","forecast","uncategorized-expense","uncategorized-income","missing-receipts","bills","cards/activate","cards","reimbursements","wise","checking","aicfo"],q={"dashboard/cash-balance":"dashboard/cash_balance","dashboard/card-balance":"dashboard/card_balance","dashboard/operating-expenses":"dashboard/operating_expenses","dashboard/revenue":"dashboard/revenue","dashboard/burn-rate":"dashboard/net_burn_or_income","dashboard/cash-position":"dashboard/cash_position","dashboard/top-expenses":"dashboard/top_expenses","dashboard/cash-in-cash-out":"dashboard/cash_in_cash_out",dashboard:"dashboard",reports:"reports",forecast:"forecast","uncategorized-expense":"transactions/uncategorized-expense","uncategorized-income":"transactions/uncategorized-income","missing-receipts":"transactions/missing-receipts",bills:"bills",reimbursements:"reimbursements","cards/activate":"cards/activate",cards:"cards",wise:"bills/wise/callback/link-account",checking:"checking",aicfo:"ai-cfo/explore"};function E(t){for(const s of Q)if(t.toLocaleLowerCase().includes(s))return q[s]}export{oe as default};
@@ -1,4 +1,4 @@
1
- import{j as l}from"./liveblocks-UOzcPsHa.js";import{h as w,g as C,j as h,l as E,i as V}from"./core-B5mDy9pu.js";import{YH as k,YO as _,gG as W,gF as K,gE as L,kP as M,WG as q,uK as J,fF as B,Ye as D,kN as F,YI as S,YR as G,kL as T,l6 as j}from"./zeni-epic-state-7eY0g-Bc.js";import{bM as Q,a1 as N,N as R,z as O,E as U,a4 as b,c as v,a7 as H,bN as X,H as Y,bO as ee,p as te}from"./index-6nH5LMe4.js";import{n as Z}from"./mui-Do6nLzGb.js";import"./sentry-DHDsO12F.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]="aa3e6d38-a4d4-4493-80f3-0e7691066cd6",e._sentryDebugIdIdentifier="sentry-dbid-aa3e6d38-a4d4-4493-80f3-0e7691066cd6")}catch{}})();const ae=E(null,(function(e,t){return{onSaveVendor:a=>{e(M(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(q("common")),a!=null&&e(J(a))},onGetOtp:a=>{e(L(a,"BillPayVendor"))},onResendOtp:a=>{e(K(a,"BillPayVendor"))},onVerifyOtp:(a,n)=>{e(W(a,n,"BillPayVendor"))},onVerifyOtpSuccess:(a,n,o)=>{e(_(a,n,o))}}}))(Q);function z({vendorId:e,billId:t,isExpressPayPage:a}){const n=w(),o=C(),s=h((r=>k(r,e)));return l.jsx(ae,{location:o,navigate:n,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:a??!1})}const ne=Z.div`
1
+ import{j as l}from"./liveblocks-UOzcPsHa.js";import{h as w,g as C,j as h,l as E,i as V}from"./core-B5mDy9pu.js";import{YH as k,YO as _,gG as W,gF as K,gE as L,kP as M,WG as q,uK as J,fF as B,Ye as D,kN as F,YI as S,YR as G,kL as T,l6 as j}from"./zeni-epic-state-7eY0g-Bc.js";import{bM as Q,a1 as N,N as R,z as O,E as U,a4 as b,c as v,a7 as H,bN as X,H as Y,bO as ee,p as te}from"./index-CrBk11WI.js";import{n as Z}from"./mui-Do6nLzGb.js";import"./sentry-DHDsO12F.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]="aa3e6d38-a4d4-4493-80f3-0e7691066cd6",e._sentryDebugIdIdentifier="sentry-dbid-aa3e6d38-a4d4-4493-80f3-0e7691066cd6")}catch{}})();const ae=E(null,(function(e,t){return{onSaveVendor:a=>{e(M(t.vendorId!==void 0?t.vendorId:void 0,t.billId,void 0,t.isExpressPayPage)),e(q("common")),a!=null&&e(J(a))},onGetOtp:a=>{e(L(a,"BillPayVendor"))},onResendOtp:a=>{e(K(a,"BillPayVendor"))},onVerifyOtp:(a,n)=>{e(W(a,n,"BillPayVendor"))},onVerifyOtpSuccess:(a,n,o)=>{e(_(a,n,o))}}}))(Q);function z({vendorId:e,billId:t,isExpressPayPage:a}){const n=w(),o=C(),s=h((r=>k(r,e)));return l.jsx(ae,{location:o,navigate:n,vendorId:e,billId:t,vendorViewDetails:s,isExpressPayPage:a??!1})}const ne=Z.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as i}from"./liveblocks-UOzcPsHa.js";import{a1 as c,ab as l,E as f}from"./index-6nH5LMe4.js";import{D as p}from"./mui-Do6nLzGb.js";import"./sentry-DHDsO12F.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="c06e3c71-2cdd-4b4c-9d6d-3f270023e5b2",e._sentryDebugIdIdentifier="sentry-dbid-c06e3c71-2cdd-4b4c-9d6d-3f270023e5b2")}catch{}})();const b={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:d}=e,n=c(),s=o?.valuePx(n)??b.drawerLeftMargin.valuePx(n),a=f();return i.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.8,cursor:"pointer"}}},onClose:d,children:t})}export{h as D};
1
+ import{j as i}from"./liveblocks-UOzcPsHa.js";import{a1 as c,ab as l,E as f}from"./index-CrBk11WI.js";import{D as p}from"./mui-Do6nLzGb.js";import"./sentry-DHDsO12F.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},r=new e.Error().stack;r&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[r]="c06e3c71-2cdd-4b4c-9d6d-3f270023e5b2",e._sentryDebugIdIdentifier="sentry-dbid-c06e3c71-2cdd-4b4c-9d6d-3f270023e5b2")}catch{}})();const b={drawerLeftMargin:new l(0,0,240)};function h(e){const{isOpen:r,drawerLeftMargin:o,children:t,onClose:d}=e,n=c(),s=o?.valuePx(n)??b.drawerLeftMargin.valuePx(n),a=f();return i.jsx(p,{anchor:"right",open:r,PaperProps:{style:{width:`calc(100% - ${s})`}},slotProps:{backdrop:{style:{backgroundColor:a.colors.black,opacity:.8,cursor:"pointer"}}},onClose:d,children:t})}export{h as D};
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-UOzcPsHa.js";import{a as d}from"./sentry-DHDsO12F.js";import{h as B,u as F,g as G,i as A,j as l,N as q,l as $,n as N,o as _}from"./core-B5mDy9pu.js";import{WK as O,fF as H,W0 as M,m$ as R,S1 as k,WP as Y,WF as z,l$ as K,S2 as S,W5 as V,W6 as J,WH as L,WG as Q}from"./zeni-epic-state-7eY0g-Bc.js";import{b8 as U,j as X,a4 as Z,p as tt}from"./index-6nH5LMe4.js";import"./mui-Do6nLzGb.js";import{d as b}from"./decodeURIComponentSafe-DANuhXnG.js";import{w as et}from"./withTransactionSidePanel-DK-Ex27L.js";import{f as at,c as nt}from"./routePaths-uBvxqlLY.js";import"./recharts-uFX1dZS-.js";import"./analytics-D6GpUSOP.js";import"./plaid-0g_vwjSd.js";import"./dnd-CGWe1ZMP.js";import"./stripe-cKAAJElX.js";import"./lottie-C5eNvt0I.js";import"./lexical-DW4lC8Zx.js";import"./pdf-DjwvAC2g.js";import"./utils-BsODCDYR.js";import"./useAskAiCfoHostNavButtonProps-BsP5fVhq.js";import"./TransactionDetailScreen-Bp7IFDK0.js";import"./useInitialThreadRequest-7Q8HJAH2.js";import"./expenseAutomationHelper-DBDpSggk.js";import"./stripSplatSuffix-CQQXAy0N.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]="11f1af5d-9526-4fb9-9d3e-7799b2b3153d",a._sentryDebugIdIdentifier="sentry-dbid-11f1af5d-9526-4fb9-9d3e-7799b2b3153d")}catch{}})();const ot=$((function(a,t){const e=t.entity,o=Y(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:z(a,"common")},trendWithTransactionsReport:o,analytics:X,isAccountingClassesEnabled:K(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(V()),a(J()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??I();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(k(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(U),it=et((function({entityType:a,...t}){const e=B(),o=F(),c=G(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:W,entityNameEncoded:w}=A(),r=b(W??""),p=b(w??""),f=rt(r,p),x=[r,p].filter((n=>n!=null)),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=l((n=>O(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),j=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 P=l((n=>n.trendState.fetchState)),E=u?.selectedPeriod?.timePeriod??g,v=(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&&P==="Completed"&&(D(!0),E!=null&&o(k(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:E})))}),[m,h,P]),f?s.jsx(ot,{firstMonthOfFY:j,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:v,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(q,{to:I(x.length)})})),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,I=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function jt({entityType:a}){return s.jsx(N,{children:s.jsx(_,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{jt as EntityDetailRoutes,jt as default};
1
+ import{j as s}from"./liveblocks-UOzcPsHa.js";import{a as d}from"./sentry-DHDsO12F.js";import{h as B,u as F,g as G,i as A,j as l,N as q,l as $,n as N,o as _}from"./core-B5mDy9pu.js";import{WK as O,fF as H,W0 as M,m$ as R,S1 as k,WP as Y,WF as z,l$ as K,S2 as S,W5 as V,W6 as J,WH as L,WG as Q}from"./zeni-epic-state-7eY0g-Bc.js";import{b8 as U,j as X,a4 as Z,p as tt}from"./index-CrBk11WI.js";import"./mui-Do6nLzGb.js";import{d as b}from"./decodeURIComponentSafe-DANuhXnG.js";import{w as et}from"./withTransactionSidePanel-Co9xwJi4.js";import{f as at,c as nt}from"./routePaths-CeCPwkIf.js";import"./recharts-uFX1dZS-.js";import"./analytics-D6GpUSOP.js";import"./plaid-0g_vwjSd.js";import"./dnd-CGWe1ZMP.js";import"./stripe-cKAAJElX.js";import"./lottie-C5eNvt0I.js";import"./lexical-DW4lC8Zx.js";import"./pdf-DjwvAC2g.js";import"./utils-BsODCDYR.js";import"./useAskAiCfoHostNavButtonProps-BamKKcjy.js";import"./TransactionDetailScreen-CcO0FUjf.js";import"./useInitialThreadRequest-Bwvu8W79.js";import"./expenseAutomationHelper-DBDpSggk.js";import"./stripSplatSuffix-CQQXAy0N.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]="11f1af5d-9526-4fb9-9d3e-7799b2b3153d",a._sentryDebugIdIdentifier="sentry-dbid-11f1af5d-9526-4fb9-9d3e-7799b2b3153d")}catch{}})();const ot=$((function(a,t){const e=t.entity,o=Y(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:z(a,"common")},trendWithTransactionsReport:o,analytics:X,isAccountingClassesEnabled:K(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(V()),a(J()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??I();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(k(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(U),it=et((function({entityType:a,...t}){const e=B(),o=F(),c=G(),[m,T]=d.useState(!1),[h,D]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:W,entityNameEncoded:w}=A(),r=b(W??""),p=b(w??""),f=rt(r,p),x=[r,p].filter((n=>n!=null)),i={name:p,id:r,type:a,zeniId:r,qboId:r},g=l((n=>O(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),j=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 P=l((n=>n.trendState.fetchState)),E=u?.selectedPeriod?.timePeriod??g,v=(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&&P==="Completed"&&(D(!0),E!=null&&o(k(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:E})))}),[m,h,P]),f?s.jsx(ot,{firstMonthOfFY:j,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:v,resetTrendIsFetchedStates:()=>{T(!1),D(!1)},...t}):s.jsx(q,{to:I(x.length)})})),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,I=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function jt({entityType:a}){return s.jsx(N,{children:s.jsx(_,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{jt as EntityDetailRoutes,jt as default};
@@ -1,4 +1,4 @@
1
- import{j as f}from"./liveblocks-UOzcPsHa.js";import{u as he,h as nt,g as be,j as F,i as Ue,t as qn,l as Jn,n as Wn,o as He,N as Yn}from"./core-B5mDy9pu.js";import{fF as ke,a0S as Hn,q0 as _e,U0 as Kn,zX as Zn,a0T as Qn,a0U as Xn,a0V as es,a0W as gt,a0X as Ze,gh as bt,a0Y as oa,eW as ts,g0 as as,a0Z as ca,a0_ as Qe,qT as ns,uN as ss,gS as os,gQ as cs,a0$ as is,r4 as ls,rd as rs,qb as ds,qp as xa,gP as re,gR as us,a10 as ms,qL as wa,re as ps,qm as hs,qh as Ss,uT as gs,gO as Me,a11 as tt,C5 as Ra,Mm as Da,a12 as Fa,Fo as _a,a13 as Cs,eZ as fs,e$ as Is,sP as Tt,WL as ia,WN as ks,m2 as bs,WO as Ts,m9 as Ps,dl as ys,Do as Pt,a14 as vs,a15 as Es,fm as yt,sD as la,WF as As,a16 as xs,a17 as ws,mb as Rs,a18 as Ds,R2 as Fs,ma as _s,l$ as Ms,qE as Ma,rj as at,tp as Oa,tL as Os,TS as Ua,ri as ra,rl as Ba,rn as Us,bE as Bs,ny as Vs,nv as js,rm as Xe,rk as pe,a19 as zs,rE as da,a1a as Ls,a1b as $s,sH as Gs,sI as Ns,WB as qs,VH as Js,a0k as Ws,a1c as Ys,WH as ua,WG as Ke,a1d as ma,mq as Hs,a1e as Ks,a1f as Zs,a1g as Qs,a1h as Xs,qz as eo,a1i as to,a1j as ao,a1k as no,ru as so,md as oo,m4 as co,a1l as io,mc as pa,WY as lo,a1m as ro,a1n as uo,uo as mo,t$ as po,t_ as Ct,a1o as ho,a1p as So,a1q as go,a1r as Co,nJ as fo,br as Io,nE as ha,nq as ko,a1s as bo,g$ as To,nB as Po,sR as yo,sT as vo,sA as Eo,VK as Ao,VL as xo,ES as wo,ER as Ro,F6 as Do,a1t as Sa,sG as Fo,a1u as _o,rU as Mo,r_ as Oo,s9 as Uo,rX as Bo,a1v as Vo,s8 as jo,sM as zo,a1w as Lo,sZ as $o,su as Go,t2 as No,sz as qo,rF as Jo,a1x as Wo,qX as Yo,qv as Ho,qC as ga,rp as Ko,a1y as Zo,a1z as Qo,a1A as Xo,a1B as ec,a1C as tc,a1D as ac,t6 as nc,a1E as sc,a1F as oc,a1G as Ca,uz as cc,tS as ic,tH as fa,tF as lc,a1H as rc,tu as dc,t9 as uc,tI as mc,a1I as pc,a1J as hc,tf as Sc,a1K as gc,ta as Cc,te as fc,tc as Ic,tO as kc}from"./zeni-epic-state-7eY0g-Bc.js";import Va from"./NotFoundScreen-BkYIKPgh.js";import{a as s,R as ja}from"./sentry-DHDsO12F.js";import{n as Te,S as bc}from"./mui-Do6nLzGb.js";import{N as Be,c as H,j as Q,p as te,aq as za,as as La,dQ as Tc,dR as Pc,z as st,dS as yc,dT as vc,dU as Ec,ae as Oe,dV as Ac,dW as Ia,ba as ka,dX as xc,a7 as $a,dY as wc,h as et,a as Rc,dZ as Dc,d_ as Fc,M as _c,U as Mc,d$ as Oc,e0 as Uc,e1 as Bc,b4 as Vc,br as jc,ab as zc,b5 as Lc,b6 as $c,G as Gc,w as Nc,e2 as qc,av as ba,e3 as Jc}from"./index-6nH5LMe4.js";import{u as Ga}from"./useAskAiCfoHostNavButtonProps-BsP5fVhq.js";import{g as Ta,b as Wc,c as Yc,h as Hc,a as Kc,i as Zc,r as Qc,C as Xc}from"./TransactionDetailScreen-Bp7IFDK0.js";import{u as ei}from"./useActualMatchingMatchDetail-OCZsPxr6.js";import{d as ti}from"./decodeURIComponentSafe-DANuhXnG.js";import{m as Na,a as qa}from"./expenseAutomationHelper-DBDpSggk.js";import{u as Ja,a as Wa,w as ai}from"./withTransactionSidePanel-DK-Ex27L.js";import{b as ni,S as si,a as oi,J as ci}from"./ScheduleDetailsPrepaidExpensesScreen-DnVEpQsK.js";import{s as Pa,i as Ya,h as ii,v as li,c as ri}from"./routePaths-uBvxqlLY.js";import{a as ft}from"./accountMappingHelper-DqBiQF6x.js";import{D as di}from"./DrawerScreen-BihZ_PpN.js";import"./recharts-uFX1dZS-.js";import"./analytics-D6GpUSOP.js";import"./plaid-0g_vwjSd.js";import"./dnd-CGWe1ZMP.js";import"./stripe-cKAAJElX.js";import"./lottie-C5eNvt0I.js";import"./lexical-DW4lC8Zx.js";import"./pdf-DjwvAC2g.js";import"./utils-BsODCDYR.js";import"./useInitialThreadRequest-7Q8HJAH2.js";import"./stripSplatSuffix-CQQXAy0N.js";import"./pathToGoBack-DP_bGWF-.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]="f337eab2-8151-42e7-b967-fbe098858f94",t._sentryDebugIdIdentifier="sentry-dbid-f337eab2-8151-42e7-b967-fbe098858f94")}catch{}})();const ui=()=>{const t=he(),n=nt(),S=be(),g=F((h=>ke(h))),{useFeatureGate:d}=Be(),{isFeatureEnabled:i}=d(H.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=d(H.aiAuditScorePercentage),A=F((h=>h.expenseAutomationViewState.selectedPeriodByTenantId)),l=F((h=>Hn(h,g.tenantId))),{isAiCfoAccessEnabled:b,onAskAiCfoClick:R}=Ga({mobileExploreReferrer:"Month-End Close Overview"}),k=s.useCallback(((h,T,z=!1)=>{t(_e({tenantId:T,period:{month:h.month,year:h.year},refreshViewInBackground:z}))}),[]),C=s.useCallback((h=>{const T=S.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&Q.trackMonthCloseAuditPage(h.month,h.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,T??null),t(Kn(g.tenantId,h))}),[g.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),I=A[g.tenantId],m=s.useCallback((()=>{const h=S.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&Q.trackMonthCloseAuditPage(I.month,I.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,h??null),k(I,g.tenantId,!0)}),[k,I,g.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),_=te(S.state?.pathnameStackToGoBack,S.pathname),x=s.useCallback((()=>{if(l.monthEndCloseChecks!=null&&I!=null){const h=l.monthEndCloseChecks.monthEndCloseCheckList.find((T=>T.progress<100));if(h!=null)return void n(`./${h.id}/${I.month}-${I.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview"}});n(`./month_end_insights/${I.month}-${I.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview"}})}}),[l.monthEndCloseChecks,I]),{areTenantIdsInSync:p}=za();return La({isDataReady:l.fetchState==="Completed"}),s.useEffect((()=>{I!=null&&l.fetchState!=="In-Progress"&&l.fetchState!=="Completed"&&p&&k(I,g.tenantId)}),[k,I,l.fetchState,g.tenantId,p]),s.useEffect((()=>{I!=null&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&p&&t(Zn(I))}),[I,l.monthClosePerformanceTrendFetchStatus.fetchState,p]),s.useEffect((()=>{const h=setInterval((()=>{l.fetchState!=="In-Progress"&&l.fetchState==="Completed"&&m()}),3e5);return()=>clearInterval(h)}),[l.fetchState]),s.useEffect((()=>{if(l.fetchState==="Completed"&&l.monthEndCloseChecks?.auditSummary!=null){const h=S.state?.referrer;Q.trackMonthCloseAuditPage(l.selectedPeriod.month,l.selectedPeriod.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,h??null)}}),[l.fetchState,l.selectedPeriod,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),f.jsx(mi,{children:f.jsx(Tc,{monthEndCloseChecksView:l,isRealtimeInsightsFeatureEnabled:i,onMonthEndCheckClick:h=>{n(`./${h}/${I.month}-${I.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:C,handleReviewButtonClick:x,onBackClick:()=>{n("../../dashboard")},onReload:m,isAiCfoAccessEnabled:b,onAskAiCfoClick:R,aiAuditScorePercentageEnabled:r})})},mi=Te.div`
1
+ import{j as f}from"./liveblocks-UOzcPsHa.js";import{u as he,h as nt,g as be,j as F,i as Ue,t as qn,l as Jn,n as Wn,o as He,N as Yn}from"./core-B5mDy9pu.js";import{fF as ke,a0S as Hn,q0 as _e,U0 as Kn,zX as Zn,a0T as Qn,a0U as Xn,a0V as es,a0W as gt,a0X as Ze,gh as bt,a0Y as oa,eW as ts,g0 as as,a0Z as ca,a0_ as Qe,qT as ns,uN as ss,gS as os,gQ as cs,a0$ as is,r4 as ls,rd as rs,qb as ds,qp as xa,gP as re,gR as us,a10 as ms,qL as wa,re as ps,qm as hs,qh as Ss,uT as gs,gO as Me,a11 as tt,C5 as Ra,Mm as Da,a12 as Fa,Fo as _a,a13 as Cs,eZ as fs,e$ as Is,sP as Tt,WL as ia,WN as ks,m2 as bs,WO as Ts,m9 as Ps,dl as ys,Do as Pt,a14 as vs,a15 as Es,fm as yt,sD as la,WF as As,a16 as xs,a17 as ws,mb as Rs,a18 as Ds,R2 as Fs,ma as _s,l$ as Ms,qE as Ma,rj as at,tp as Oa,tL as Os,TS as Ua,ri as ra,rl as Ba,rn as Us,bE as Bs,ny as Vs,nv as js,rm as Xe,rk as pe,a19 as zs,rE as da,a1a as Ls,a1b as $s,sH as Gs,sI as Ns,WB as qs,VH as Js,a0k as Ws,a1c as Ys,WH as ua,WG as Ke,a1d as ma,mq as Hs,a1e as Ks,a1f as Zs,a1g as Qs,a1h as Xs,qz as eo,a1i as to,a1j as ao,a1k as no,ru as so,md as oo,m4 as co,a1l as io,mc as pa,WY as lo,a1m as ro,a1n as uo,uo as mo,t$ as po,t_ as Ct,a1o as ho,a1p as So,a1q as go,a1r as Co,nJ as fo,br as Io,nE as ha,nq as ko,a1s as bo,g$ as To,nB as Po,sR as yo,sT as vo,sA as Eo,VK as Ao,VL as xo,ES as wo,ER as Ro,F6 as Do,a1t as Sa,sG as Fo,a1u as _o,rU as Mo,r_ as Oo,s9 as Uo,rX as Bo,a1v as Vo,s8 as jo,sM as zo,a1w as Lo,sZ as $o,su as Go,t2 as No,sz as qo,rF as Jo,a1x as Wo,qX as Yo,qv as Ho,qC as ga,rp as Ko,a1y as Zo,a1z as Qo,a1A as Xo,a1B as ec,a1C as tc,a1D as ac,t6 as nc,a1E as sc,a1F as oc,a1G as Ca,uz as cc,tS as ic,tH as fa,tF as lc,a1H as rc,tu as dc,t9 as uc,tI as mc,a1I as pc,a1J as hc,tf as Sc,a1K as gc,ta as Cc,te as fc,tc as Ic,tO as kc}from"./zeni-epic-state-7eY0g-Bc.js";import Va from"./NotFoundScreen-MJal1hew.js";import{a as s,R as ja}from"./sentry-DHDsO12F.js";import{n as Te,S as bc}from"./mui-Do6nLzGb.js";import{N as Be,c as H,j as Q,p as te,aq as za,as as La,dQ as Tc,dR as Pc,z as st,dS as yc,dT as vc,dU as Ec,ae as Oe,dV as Ac,dW as Ia,ba as ka,dX as xc,a7 as $a,dY as wc,h as et,a as Rc,dZ as Dc,d_ as Fc,M as _c,U as Mc,d$ as Oc,e0 as Uc,e1 as Bc,b4 as Vc,br as jc,ab as zc,b5 as Lc,b6 as $c,G as Gc,w as Nc,e2 as qc,av as ba,e3 as Jc}from"./index-CrBk11WI.js";import{u as Ga}from"./useAskAiCfoHostNavButtonProps-BamKKcjy.js";import{g as Ta,b as Wc,c as Yc,h as Hc,a as Kc,i as Zc,r as Qc,C as Xc}from"./TransactionDetailScreen-CcO0FUjf.js";import{u as ei}from"./useActualMatchingMatchDetail-CAkhwxRr.js";import{d as ti}from"./decodeURIComponentSafe-DANuhXnG.js";import{m as Na,a as qa}from"./expenseAutomationHelper-DBDpSggk.js";import{u as Ja,a as Wa,w as ai}from"./withTransactionSidePanel-Co9xwJi4.js";import{b as ni,S as si,a as oi,J as ci}from"./ScheduleDetailsPrepaidExpensesScreen-luC81eat.js";import{s as Pa,i as Ya,h as ii,v as li,c as ri}from"./routePaths-CeCPwkIf.js";import{a as ft}from"./accountMappingHelper-DqBiQF6x.js";import{D as di}from"./DrawerScreen-0c_ealW2.js";import"./recharts-uFX1dZS-.js";import"./analytics-D6GpUSOP.js";import"./plaid-0g_vwjSd.js";import"./dnd-CGWe1ZMP.js";import"./stripe-cKAAJElX.js";import"./lottie-C5eNvt0I.js";import"./lexical-DW4lC8Zx.js";import"./pdf-DjwvAC2g.js";import"./utils-BsODCDYR.js";import"./useInitialThreadRequest-Bwvu8W79.js";import"./stripSplatSuffix-CQQXAy0N.js";import"./pathToGoBack-DP_bGWF-.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]="f337eab2-8151-42e7-b967-fbe098858f94",t._sentryDebugIdIdentifier="sentry-dbid-f337eab2-8151-42e7-b967-fbe098858f94")}catch{}})();const ui=()=>{const t=he(),n=nt(),S=be(),g=F((h=>ke(h))),{useFeatureGate:d}=Be(),{isFeatureEnabled:i}=d(H.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=d(H.aiAuditScorePercentage),A=F((h=>h.expenseAutomationViewState.selectedPeriodByTenantId)),l=F((h=>Hn(h,g.tenantId))),{isAiCfoAccessEnabled:b,onAskAiCfoClick:R}=Ga({mobileExploreReferrer:"Month-End Close Overview"}),k=s.useCallback(((h,T,z=!1)=>{t(_e({tenantId:T,period:{month:h.month,year:h.year},refreshViewInBackground:z}))}),[]),C=s.useCallback((h=>{const T=S.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&Q.trackMonthCloseAuditPage(h.month,h.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,T??null),t(Kn(g.tenantId,h))}),[g.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),I=A[g.tenantId],m=s.useCallback((()=>{const h=S.state?.referrer;l.monthEndCloseChecks?.auditSummary!=null&&Q.trackMonthCloseAuditPage(I.month,I.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,h??null),k(I,g.tenantId,!0)}),[k,I,g.tenantId,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),_=te(S.state?.pathnameStackToGoBack,S.pathname),x=s.useCallback((()=>{if(l.monthEndCloseChecks!=null&&I!=null){const h=l.monthEndCloseChecks.monthEndCloseCheckList.find((T=>T.progress<100));if(h!=null)return void n(`./${h.id}/${I.month}-${I.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview"}});n(`./month_end_insights/${I.month}-${I.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview"}})}}),[l.monthEndCloseChecks,I]),{areTenantIdsInSync:p}=za();return La({isDataReady:l.fetchState==="Completed"}),s.useEffect((()=>{I!=null&&l.fetchState!=="In-Progress"&&l.fetchState!=="Completed"&&p&&k(I,g.tenantId)}),[k,I,l.fetchState,g.tenantId,p]),s.useEffect((()=>{I!=null&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&l.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&p&&t(Zn(I))}),[I,l.monthClosePerformanceTrendFetchStatus.fetchState,p]),s.useEffect((()=>{const h=setInterval((()=>{l.fetchState!=="In-Progress"&&l.fetchState==="Completed"&&m()}),3e5);return()=>clearInterval(h)}),[l.fetchState]),s.useEffect((()=>{if(l.fetchState==="Completed"&&l.monthEndCloseChecks?.auditSummary!=null){const h=S.state?.referrer;Q.trackMonthCloseAuditPage(l.selectedPeriod.month,l.selectedPeriod.year,l.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",l.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,h??null)}}),[l.fetchState,l.selectedPeriod,l.monthEndCloseChecks?.auditSummary,l.monthEndCloseChecks?.reportEmailSentDate]),f.jsx(mi,{children:f.jsx(Tc,{monthEndCloseChecksView:l,isRealtimeInsightsFeatureEnabled:i,onMonthEndCheckClick:h=>{n(`./${h}/${I.month}-${I.year}`,{state:{pathnameStackToGoBack:_,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:C,handleReviewButtonClick:x,onBackClick:()=>{n("../../dashboard")},onReload:m,isAiCfoAccessEnabled:b,onAskAiCfoClick:R,aiAuditScorePercentageEnabled:r})})},mi=Te.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -1 +1 @@
1
- import{j as s}from"./liveblocks-UOzcPsHa.js";import{a as r}from"./sentry-DHDsO12F.js";import{aw as f,ax as l,o as p,a4 as b}from"./index-6nH5LMe4.js";import"./mui-Do6nLzGb.js";import m from"./NotFoundScreen-BkYIKPgh.js";import{h as c,g as u}from"./core-B5mDy9pu.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]="a4845c9e-9816-4d47-ad6f-7bb2b55829fb",e._sentryDebugIdIdentifier="sentry-dbid-a4845c9e-9816-4d47-ad6f-7bb2b55829fb")}catch{}})();const _=()=>{const e=c(),a=u(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),d=r.useCallback((()=>{(()=>{const n=b(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=f(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:d}):s.jsx(m,{})},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-UOzcPsHa.js";import{a as r}from"./sentry-DHDsO12F.js";import{aw as f,ax as l,o as p,a4 as b}from"./index-CrBk11WI.js";import"./mui-Do6nLzGb.js";import m from"./NotFoundScreen-MJal1hew.js";import{h as c,g as u}from"./core-B5mDy9pu.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]="a4845c9e-9816-4d47-ad6f-7bb2b55829fb",e._sentryDebugIdIdentifier="sentry-dbid-a4845c9e-9816-4d47-ad6f-7bb2b55829fb")}catch{}})();const _=()=>{const e=c(),a=u(),t=r.useCallback((()=>{window.open("https://www.zeni.ai/demo/request","_blank")}),[]),d=r.useCallback((()=>{(()=>{const n=b(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=f(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:d}):s.jsx(m,{})},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 o}from"./sentry-DHDsO12F.js";import{u as l,h as f,g as m}from"./core-B5mDy9pu.js";import{hY as p,Un as g,Uo as _}from"./zeni-epic-state-7eY0g-Bc.js";import{u as b,L as h,z as y}from"./index-6nH5LMe4.js";import"./liveblocks-UOzcPsHa.js";import"./recharts-uFX1dZS-.js";import"./mui-Do6nLzGb.js";import"./analytics-D6GpUSOP.js";import"./plaid-0g_vwjSd.js";import"./dnd-CGWe1ZMP.js";import"./stripe-cKAAJElX.js";import"./lottie-C5eNvt0I.js";import"./lexical-DW4lC8Zx.js";import"./pdf-DjwvAC2g.js";import"./utils-BsODCDYR.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]="82557390-56bd-46f8-81c9-de5dca58baf7",e._sentryDebugIdIdentifier="sentry-dbid-82557390-56bd-46f8-81c9-de5dca58baf7")}catch{}})();function j(){const e=l(),n=f(),r=m(),{setLoading:i,clearAllLoading:u}=b(),s=o.useRef(!1);return o.useLayoutEffect((()=>{i(h.CONNECTION_AUTH)}),[i]),o.useEffect((()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(r.search).get("code"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&d!=null){const t=JSON.parse(d);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}u();const c=y.getActiveTenantForUser();n(c?.tenantEmailDomain!=null?`/${c.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{j as default};
1
+ import{a as o}from"./sentry-DHDsO12F.js";import{u as l,h as f,g as m}from"./core-B5mDy9pu.js";import{hY as p,Un as g,Uo as _}from"./zeni-epic-state-7eY0g-Bc.js";import{u as b,L as h,z as y}from"./index-CrBk11WI.js";import"./liveblocks-UOzcPsHa.js";import"./recharts-uFX1dZS-.js";import"./mui-Do6nLzGb.js";import"./analytics-D6GpUSOP.js";import"./plaid-0g_vwjSd.js";import"./dnd-CGWe1ZMP.js";import"./stripe-cKAAJElX.js";import"./lottie-C5eNvt0I.js";import"./lexical-DW4lC8Zx.js";import"./pdf-DjwvAC2g.js";import"./utils-BsODCDYR.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]="82557390-56bd-46f8-81c9-de5dca58baf7",e._sentryDebugIdIdentifier="sentry-dbid-82557390-56bd-46f8-81c9-de5dca58baf7")}catch{}})();function j(){const e=l(),n=f(),r=m(),{setLoading:i,clearAllLoading:u}=b(),s=o.useRef(!1);return o.useLayoutEffect((()=>{i(h.CONNECTION_AUTH)}),[i]),o.useEffect((()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(r.search).get("code"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&d!=null){const t=JSON.parse(d);e(p(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}u();const c=y.getActiveTenantForUser();n(c?.tenantEmailDomain!=null?`/${c.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{j as default};