@zeniai/web-app-ui 5.1.84-prod → 5.1.85-dev

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 (131) hide show
  1. package/dist/assets/AddressRoutes-DpMeCgDh.js +1 -0
  2. package/dist/assets/AddressScreen-jEbIVhK3.js +9 -0
  3. package/dist/assets/{AiCfoScreen-DZZ9Es_I.js → AiCfoScreen-D2GxwJyN.js} +1 -1
  4. package/dist/assets/{BillPayApprovalRoutes-DnTpyFTu.js → BillPayApprovalRoutes-Csh9SPnU.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-DvFVSZYb.js → BillPayRoutes-Dg9I-63-.js} +12 -12
  6. package/dist/assets/{BusinessVerificationPageScreen-BnNwUvQl.js → BusinessVerificationPageScreen-BLuK4dS7.js} +2 -2
  7. package/dist/assets/{CardsAiCfoScreen-CrL4NPtU.js → CardsAiCfoScreen-D8ZPE13M.js} +1 -1
  8. package/dist/assets/{ChargeCardRoutes-COA4Ttqp.js → ChargeCardRoutes-CyGButQm.js} +11 -11
  9. package/dist/assets/{CompanyPassportScreen-jDLVUM9p.js → CompanyPassportScreen--SPdIRlf.js} +1 -1
  10. package/dist/assets/{ConnectionAuthScreen-OTfxAxPR.js → ConnectionAuthScreen-C8nHjroP.js} +1 -1
  11. package/dist/assets/CustomerOnboardingAuthScreen-C6uz2GLr.js +1 -0
  12. package/dist/assets/CustomerOnboardingRoutes-Dk5stUMd.js +30 -0
  13. package/dist/assets/{DashboardRoutes-CoUu5Cck.js → DashboardRoutes-B2SXqHam.js} +3 -3
  14. package/dist/assets/{DefaultTenantHome-DwNthuPY.js → DefaultTenantHome-DDzJzPvG.js} +1 -1
  15. package/dist/assets/DomesticWireDetailScreen-DDaUfwcf.js +18 -0
  16. package/dist/assets/DrawerScreen-DZ4DkgHO.js +1 -0
  17. package/dist/assets/EntityDetailRoutes-CFPPv2Q-.js +1 -0
  18. package/dist/assets/{ExpenseAutomationRoutes-hrRcKAyV.js → ExpenseAutomationRoutes-B0EQq9x4.js} +1 -1
  19. package/dist/assets/FeaturePreviewScreen-Dgm-EaRp.js +1 -0
  20. package/dist/assets/{HubSpotOAuthCallbackScreen-BzGwbaWe.js → HubSpotOAuthCallbackScreen-DiHy3hck.js} +1 -1
  21. package/dist/assets/MagicLinkRoutes-CPrGkntv.js +72 -0
  22. package/dist/assets/MagicLinkSignInScreen-BHI5Ju3h.js +12 -0
  23. package/dist/assets/MobileAppDrawer-ChAhLGZE.js +1 -0
  24. package/dist/assets/NotFoundScreen-By2F-w6l.js +1 -0
  25. package/dist/assets/{NotificationRoutes-B5b9qbFA.js → NotificationRoutes-0mjOYLwF.js} +1 -1
  26. package/dist/assets/OAuthConsentScreen-_yz0BOYy.js +1 -0
  27. package/dist/assets/PandLWithForecastRoutes-CSm9JBFf.js +1 -0
  28. package/dist/assets/PeopleRoutes-DF4Scn5d.js +22 -0
  29. package/dist/assets/PerformanceRoutes-C0h70RAc.js +1 -0
  30. package/dist/assets/{Preview-41ym7gHq.js → Preview-D29JeEmY.js} +1 -1
  31. package/dist/assets/{QBOConnectionScreen-C5yzBY6U.js → QBOConnectionScreen-CwZNkZEW.js} +1 -1
  32. package/dist/assets/ReferralListScreen-C3Yy7aIK.js +5 -0
  33. package/dist/assets/{ReimbursementApprovalRoutes-C_09hxGy.js → ReimbursementApprovalRoutes-DAVTSD8z.js} +1 -1
  34. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-4j6TLc0b.js → ReimbursementApprovalRuleDetailScreen-CtUn349v.js} +1 -1
  35. package/dist/assets/{ReimbursementRoutes-CZTFsgZy.js → ReimbursementRoutes-BYbEE0sN.js} +6 -6
  36. package/dist/assets/{ReportsRoutes-B23-me0V.js → ReportsRoutes-Cb8uSh4z.js} +1 -1
  37. package/dist/assets/RewardsRoutes-BqWi3Rha.js +1 -0
  38. package/dist/assets/ScreenRoutes-CFWhfVwu.js +2 -0
  39. package/dist/assets/{SettingsRoutes-D9EquIbx.js → SettingsRoutes-Dqo8Gg1_.js} +8 -8
  40. package/dist/assets/{SetupPagesScreen-BrOUPqZ2.js → SetupPagesScreen-Drdx2Cz2.js} +5 -5
  41. package/dist/assets/{SignInScreen-Cr3ZSlo_.js → SignInScreen-HaZFyYNm.js} +1 -1
  42. package/dist/assets/SignOutScreen-DGQ597Ur.js +9 -0
  43. package/dist/assets/{TaskListScreen-FN424GvS.js → TaskListScreen-B2sNWFUZ.js} +2 -2
  44. package/dist/assets/TaskRoutes-DqlemW4d.js +9 -0
  45. package/dist/assets/{TransactionDetailRoutes-D-phlSTE.js → TransactionDetailRoutes-BBXGE-Zw.js} +1 -1
  46. package/dist/assets/{TransactionDetailScreen-ChYMeeuU.js → TransactionDetailScreen-D7m7OZhn.js} +2 -2
  47. package/dist/assets/{TransactionListRoutes-HIlzTcv6.js → TransactionListRoutes-C8nLf9Ob.js} +1 -1
  48. package/dist/assets/{TreasuryRoutes-CIV1iFBt.js → TreasuryRoutes-CAqMFzPt.js} +6 -6
  49. package/dist/assets/{VendorsRoutes-CyPMxlSq.js → VendorsRoutes-kgQCFQez.js} +1 -1
  50. package/dist/assets/WiseConfirmationScreen-Dj8vTbGW.js +12 -0
  51. package/dist/assets/{ZeniAccountRoutes-C2PDa54s.js → ZeniAccountRoutes-B85icQ0n.js} +11 -11
  52. package/dist/assets/ZeniAccountStatementScreen-CPK7RprH.js +9 -0
  53. package/dist/assets/{accountMappingHelper-DQHzz13r.js → accountMappingHelper-B3v4RMhl.js} +1 -1
  54. package/dist/assets/{analytics-BqIH6fAG.js → analytics-7PXXxPIN.js} +1 -1
  55. package/dist/assets/{analyticsHelper-5XBUO62r.js → analyticsHelper-Ce6ZNBVM.js} +1 -1
  56. package/dist/assets/{core-NoaByI8l.js → core-BDPZcSG4.js} +1 -1
  57. package/dist/assets/{decodeURIComponentSafe-D4oN1pCl.js → decodeURIComponentSafe-BR3AOxh5.js} +1 -1
  58. package/dist/assets/{dnd-Du6eXVDD.js → dnd-fU8QmJ8U.js} +1 -1
  59. package/dist/assets/{empty-CEKgz2fB.js → empty-CM59KsLF.js} +1 -1
  60. package/dist/assets/{empty-BvUWprs4.js → empty-DridEUN5.js} +1 -1
  61. package/dist/assets/{emptyVideoElement-ZMsiapTn.js → emptyVideoElement--ZfOaFPu.js} +1 -1
  62. package/dist/assets/epic-D7C6_Y7q.js +2 -0
  63. package/dist/assets/getLocaleForTenant-5gC9KZpR.js +1 -0
  64. package/dist/assets/{index-BFyN1ofW.js → index-B1tuor_E.js} +15819 -15778
  65. package/dist/assets/{index-5Tu4gqxT.js → index-BAkEFBVP.js} +1 -1
  66. package/dist/assets/{index-EkvVVXEG.js → index-BEZZznbS.js} +2 -2
  67. package/dist/assets/{index-DoqO3YOT.js → index-BZG4Ai-c.js} +1 -1
  68. package/dist/assets/{index-AbnUeQou.js → index-CAEfbAkM.js} +1 -1
  69. package/dist/assets/{index-FgS5TdYq.js → index-DA1h5kq3.js} +1 -1
  70. package/dist/assets/{index-EsLbYfGC.js → index-DNm9oOTV.js} +1 -1
  71. package/dist/assets/{index-DmDBViw_.js → index-TPK5ayqQ.js} +1 -1
  72. package/dist/assets/{lexical-B2cdcYiO.js → lexical-_D-pPLdL.js} +1 -1
  73. package/dist/assets/{liveblocks-BxEyo0kz.js → liveblocks-B2nLBm11.js} +1 -1
  74. package/dist/assets/{lottie-UPit3prG.js → lottie--jYlW6ya.js} +1 -1
  75. package/dist/assets/{mui-C_Ua4fCS.js → mui-HaM5aBuG.js} +1 -1
  76. package/dist/assets/{pathToGoBack-CRRzValL.js → pathToGoBack-Bp5QCbKd.js} +1 -1
  77. package/dist/assets/{pdf-MSfEJkEc.js → pdf-CbrAe2yy.js} +3 -3
  78. package/dist/assets/{pdf-lib-B3Lczh5w.js → pdf-lib-CHfVanCJ.js} +1 -1
  79. package/dist/assets/{plaid-CIE7io0e.js → plaid-DuKDxXr2.js} +1 -1
  80. package/dist/assets/{pusher-wrSf3qW5.js → pusher-p1571_5u.js} +1 -1
  81. package/dist/assets/{react-Ccff0kAN.js → react-BvU2rtwe.js} +1 -1
  82. package/dist/assets/{react-snBQBT6B.js → react-BzGU_BeP.js} +1 -1
  83. package/dist/assets/{react-JeguhHTv.js → react-CXLD6oJa.js} +1 -1
  84. package/dist/assets/{react-C266XqEO.js → react-D7-m9gXP.js} +1 -1
  85. package/dist/assets/{react-Cq9w84Ng.js → react-DZP7sDw7.js} +1 -1
  86. package/dist/assets/{react-DcDrNSsQ.js → react-Di2JdnAu.js} +1 -1
  87. package/dist/assets/{recharts-BwTK_Eeu.js → recharts-srrgu-jp.js} +1 -1
  88. package/dist/assets/{routePaths-QihwZ0bI.js → routePaths-DbVBNvPC.js} +1 -1
  89. package/dist/assets/{sentry-C1EYnYRT.js → sentry-CLlo3TXi.js} +1 -1
  90. package/dist/assets/{url-CPuzza6x.js → url-DqIeqdCZ.js} +1 -1
  91. package/dist/assets/{url-CfxDm57W.js → url-ky0ROLAQ.js} +1 -1
  92. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-BKKT7-j8.js → useAiCfoDashboardSuggestedQuestionsChips-Dpypv2iO.js} +1 -1
  93. package/dist/assets/useAskAiCfoHostNavButtonProps-CtdOXC4O.js +1 -0
  94. package/dist/assets/useCashManagementBanner-DTfbqox_.js +1 -0
  95. package/dist/assets/{useChargeCardPusherEvents-BHOw6eR7.js → useChargeCardPusherEvents-BSAOVtAf.js} +1 -1
  96. package/dist/assets/{useDeviceId-BolNU1M2.js → useDeviceId-CQ3pf2OT.js} +1 -1
  97. package/dist/assets/useEmailConnectResultRefresh-7EeCPqR2.js +1 -0
  98. package/dist/assets/{useInitialThreadRequest-6WPL8uY4.js → useInitialThreadRequest-DaoYHqyn.js} +1 -1
  99. package/dist/assets/{utils-B0dgdNkv.js → utils-BPOASmy-.js} +1 -1
  100. package/dist/assets/{withTransactionSidePanel-DnwgB1TB.js → withTransactionSidePanel-DKz4VB48.js} +3 -3
  101. package/dist/assets/{zeni-epic-state-BI6-8w2O.js → zeni-epic-state-pQFlpfOQ.js} +6 -6
  102. package/dist/index.html +1 -1
  103. package/package.json +4 -4
  104. package/dist/assets/AddressRoutes-DLAQfWFc.js +0 -1
  105. package/dist/assets/AddressScreen-Bg3hk-yy.js +0 -9
  106. package/dist/assets/CustomerOnboardingAuthScreen-D5Aw6_G_.js +0 -1
  107. package/dist/assets/CustomerOnboardingRoutes-ClgzcIVk.js +0 -30
  108. package/dist/assets/DomesticWireDetailScreen-BZTFAdor.js +0 -18
  109. package/dist/assets/DrawerScreen-Dd4Y8UH4.js +0 -1
  110. package/dist/assets/EntityDetailRoutes-Cgy2yXfV.js +0 -1
  111. package/dist/assets/FeaturePreviewScreen-B2XpRD7k.js +0 -1
  112. package/dist/assets/MagicLinkRoutes-D3ZKOCaZ.js +0 -72
  113. package/dist/assets/MagicLinkSignInScreen-DJ7d3iOG.js +0 -12
  114. package/dist/assets/MobileAppDrawer-vzZ1rhfW.js +0 -1
  115. package/dist/assets/NotFoundScreen-0I7QDvAA.js +0 -1
  116. package/dist/assets/OAuthConsentScreen-CQjfm7q-.js +0 -1
  117. package/dist/assets/PandLWithForecastRoutes-9pKXgmoj.js +0 -1
  118. package/dist/assets/PeopleRoutes-BKFl1VKQ.js +0 -22
  119. package/dist/assets/PerformanceRoutes-rOkui2hB.js +0 -1
  120. package/dist/assets/ReferralListScreen-CSwCFzK8.js +0 -5
  121. package/dist/assets/RewardsRoutes-CmhrKVpN.js +0 -1
  122. package/dist/assets/ScreenRoutes-nmj-mhJ1.js +0 -2
  123. package/dist/assets/SignOutScreen-C4CZ4wUa.js +0 -9
  124. package/dist/assets/TaskRoutes-MZNF4Xft.js +0 -9
  125. package/dist/assets/WiseConfirmationScreen-Da_PX85y.js +0 -12
  126. package/dist/assets/ZeniAccountStatementScreen-Bx1yxBfi.js +0 -9
  127. package/dist/assets/epic-7-_paY6l.js +0 -2
  128. package/dist/assets/getLocaleForTenant-DHEVkaRb.js +0 -1
  129. package/dist/assets/useAskAiCfoHostNavButtonProps-CUwiq2yT.js +0 -1
  130. package/dist/assets/useCashManagementBanner-N8JxdG7K.js +0 -1
  131. package/dist/assets/useEmailConnectResultRefresh-DCRcKSZ_.js +0 -1
@@ -1,4 +1,4 @@
1
- import{j as h}from"./liveblocks-BxEyo0kz.js";import oa from"./NotFoundScreen-0I7QDvAA.js";import{a as o,b as Nt}from"./sentry-C1EYnYRT.js";import{n as Ue,S as sa}from"./mui-C_Ua4fCS.js";import{u as pe,h as Yt,g as Ke,j as x,n as ca,i as xt,o as ia,p as Ge}from"./core-NoaByI8l.js";import{eX as Re,S$ as la,oj as ke,fY as ra,s4 as da,oB as Kt,oW as Zt,T0 as Ht,p4 as ua,T1 as Qt,ou as ma,rC as pa,fJ as Ie,T2 as De,ub as Wt,Eu as Xt,T3 as en,T4 as ha,ra as Ze,Oh as Pt,Oj as ga,kA as Ca,Ok as Sa,kH as fa,c_ as Ia,vo as He,oH as tn,p9 as Fe,oz as de,T5 as ka,N9 as Rt,N8 as we,T6 as Dt,kY as Ea,T7 as Ta,T8 as ya,T9 as ba,Ta as va,oO as Aa,pc as xe,Tb as wa,Tc as xa,Td as Pa,pj as Ra,kL as Da,kC as Fa,Te as Ua,kK as Ft,Or as Ba,Tf as Oa,Tg as Va,r6 as _a,qK as za,pa as me,qJ as Je,Th as Ma,Ti as ja,Tj as La,mf as $a,bo as qa,ma as Ut,lY as Ga,Tk as Ja,fz as Bt,gx as Na,m7 as Ya,xh as Ka,Tl as Za,pK as Ha,pF as Qa,pJ as Wa,pu as Xa,Tm as eo,fM as nn,oZ as to,oK as no,fZ as Ot,pe as ao,Tn as oo,To as so,pb as an,Tp as co,Tq as io,Tr as lo,Ts as ro,Tt as Vt,ri as uo,qB as mo,N7 as po,Tu as ho,Tv as go,kJ as Co,Tw as So,Ja as fo,kI as Io,kx as ko,fL as Eo,q7 as on,qt as To,p8 as _t,pd as yo,bE as bo,m4 as vo,m1 as Ao,Tx as wo,pt as zt,qp as Mt,qn as xo,Ty as Po,qc as Ro,pU as Do,qq as Fo,Tz as Uo,TA as Bo,pY as Oo,TB as Vo,pP as _o,pX as zo,pV as Mo,qw as jo}from"./zeni-epic-state-BI6-8w2O.js";import{Q as sn,e as X,f as q,v as ae,Y as cn,$ as ln,cZ as Lo,z as Be,c_ as $o,at as Pe,c$ as qo,aY as jt,y as rn,d0 as Go,aq as Ne,a as Jo,a8 as No,d1 as Yo,a3 as Ko,d2 as Zo,X as Ho,d3 as Qo,d4 as Wo,A as Xo,I as es,aR as ts,d5 as ns,d6 as as,bd as os,D as ss,aU as cs}from"./index-BFyN1ofW.js";import{u as dn}from"./useAskAiCfoHostNavButtonProps-CUwiq2yT.js";import{f as Lt,a as is,b as ls,g as rs,C as ds}from"./TransactionDetailScreen-ChYMeeuU.js";import{w as us}from"./withTransactionSidePanel-DnwgB1TB.js";import{h as ms,v as ps}from"./routePaths-QihwZ0bI.js";import{g as Ye}from"./accountMappingHelper-DQHzz13r.js";import{D as hs}from"./DrawerScreen-Dd4Y8UH4.js";import"./recharts-BwTK_Eeu.js";import"./analytics-BqIH6fAG.js";import"./plaid-CIE7io0e.js";import"./dnd-Du6eXVDD.js";import"./stripe-DMRn4zHo.js";import"./lottie-UPit3prG.js";import"./lexical-B2cdcYiO.js";import"./pdf-MSfEJkEc.js";import"./utils-B0dgdNkv.js";import"./decodeURIComponentSafe-D4oN1pCl.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="6cf552b2-699c-4d76-91e8-0fc8cff21146",t._sentryDebugIdIdentifier="sentry-dbid-6cf552b2-699c-4d76-91e8-0fc8cff21146")}catch{}})();const gs=()=>{const t=pe(),l=Yt(),B=Ke(),f=x(d=>Re(d)),{useFeatureGate:b}=sn(),{isFeatureEnabled:S}=b(X.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=b(X.aiAuditScorePercentage),I=x(d=>d.expenseAutomationViewState.selectedPeriodByTenantId),s=x(d=>la(d,f.tenantId)),{isAiCfoAccessEnabled:p,onAskAiCfoClick:u}=dn({mobileExploreReferrer:"Month-End Close Overview"}),E=o.useCallback((d,G,ee=!1)=>{t(ke({tenantId:G,period:{month:d.month,year:d.year},refreshViewInBackground:ee}))},[]),v=o.useCallback(d=>{const G=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&q.trackMonthCloseAuditPage(d.month,d.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,G??null),t(ra(f.tenantId,d))},[f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),g=I[f.tenantId],m=o.useCallback(()=>{const d=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&q.trackMonthCloseAuditPage(g.month,g.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),E(g,f.tenantId,!0)},[E,g,f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),P=ae(B.state?.pathnameStackToGoBack,B.pathname),k=o.useCallback(()=>{if(s.monthEndCloseChecks!=null&&g!=null){const d=s.monthEndCloseChecks.monthEndCloseCheckList.find(G=>G.progress<100);if(d!=null)return void l(`./${d.id}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview"}});l(`./month_end_insights/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview"}})}},[s.monthEndCloseChecks,g]),{areTenantIdsInSync:T}=cn();return ln({isDataReady:s.fetchState==="Completed"}),o.useEffect(()=>{g!=null&&s.fetchState!=="In-Progress"&&s.fetchState!=="Completed"&&T&&E(g,f.tenantId)},[E,g,s.fetchState,f.tenantId,T]),o.useEffect(()=>{g!=null&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&T&&t(da(g))},[g,s.monthClosePerformanceTrendFetchStatus.fetchState,T]),o.useEffect(()=>{const d=setInterval(()=>{s.fetchState!=="In-Progress"&&s.fetchState==="Completed"&&m()},3e5);return()=>clearInterval(d)},[s.fetchState]),o.useEffect(()=>{if(s.fetchState==="Completed"&&s.monthEndCloseChecks?.auditSummary!=null){const d=B.state?.referrer;q.trackMonthCloseAuditPage(s.selectedPeriod.month,s.selectedPeriod.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null)}},[s.fetchState,s.selectedPeriod,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),h.jsx(Cs,{children:h.jsx(Lo,{monthEndCloseChecksView:s,isRealtimeInsightsFeatureEnabled:S,onMonthEndCheckClick:d=>{l(`./${d}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:v,handleReviewButtonClick:k,onBackClick:()=>{l("../../dashboard")},onReload:m,isAiCfoAccessEnabled:p,onAskAiCfoClick:u,aiAuditScorePercentageEnabled:r})})},Cs=Ue.div`
1
+ import{j as h}from"./liveblocks-B2nLBm11.js";import oa from"./NotFoundScreen-By2F-w6l.js";import{a as o,b as Nt}from"./sentry-CLlo3TXi.js";import{n as Ue,S as sa}from"./mui-HaM5aBuG.js";import{u as pe,h as Yt,g as Ke,j as x,n as ca,i as xt,o as ia,p as Ge}from"./core-BDPZcSG4.js";import{eX as Re,S$ as la,oj as ke,fY as ra,s4 as da,oB as Kt,oW as Zt,T0 as Ht,p4 as ua,T1 as Qt,ou as ma,rC as pa,fJ as Ie,T2 as De,ub as Wt,Eu as Xt,T3 as en,T4 as ha,ra as Ze,Oh as Pt,Oj as ga,kA as Ca,Ok as Sa,kH as fa,c_ as Ia,vo as He,oH as tn,p9 as Fe,oz as de,T5 as ka,N9 as Rt,N8 as we,T6 as Dt,kY as Ea,T7 as Ta,T8 as ya,T9 as ba,Ta as va,oO as Aa,pc as xe,Tb as wa,Tc as xa,Td as Pa,pj as Ra,kL as Da,kC as Fa,Te as Ua,kK as Ft,Or as Ba,Tf as Oa,Tg as Va,r6 as _a,qK as za,pa as me,qJ as Je,Th as Ma,Ti as ja,Tj as La,mf as $a,bo as qa,ma as Ut,lY as Ga,Tk as Ja,fz as Bt,gx as Na,m7 as Ya,xh as Ka,Tl as Za,pK as Ha,pF as Qa,pJ as Wa,pu as Xa,Tm as eo,fM as nn,oZ as to,oK as no,fZ as Ot,pe as ao,Tn as oo,To as so,pb as an,Tp as co,Tq as io,Tr as lo,Ts as ro,Tt as Vt,ri as uo,qB as mo,N7 as po,Tu as ho,Tv as go,kJ as Co,Tw as So,Ja as fo,kI as Io,kx as ko,fL as Eo,q7 as on,qt as To,p8 as _t,pd as yo,bE as bo,m4 as vo,m1 as Ao,Tx as wo,pt as zt,qp as Mt,qn as xo,Ty as Po,qc as Ro,pU as Do,qq as Fo,Tz as Uo,TA as Bo,pY as Oo,TB as Vo,pP as _o,pX as zo,pV as Mo,qw as jo}from"./zeni-epic-state-pQFlpfOQ.js";import{V as sn,Q as X,d as q,r as ae,Y as cn,$ as ln,cZ as Lo,z as Be,c_ as $o,at as Pe,c$ as qo,aY as jt,B as rn,d0 as Go,aq as Ne,a as Jo,a8 as No,d1 as Yo,a3 as Ko,d2 as Zo,X as Ho,d3 as Qo,d4 as Wo,T as Xo,k as es,aR as ts,d5 as ns,d6 as as,bd as os,x as ss,aU as cs}from"./index-B1tuor_E.js";import{u as dn}from"./useAskAiCfoHostNavButtonProps-CtdOXC4O.js";import{f as Lt,a as is,b as ls,g as rs,C as ds}from"./TransactionDetailScreen-D7m7OZhn.js";import{w as us}from"./withTransactionSidePanel-DKz4VB48.js";import{h as ms,v as ps}from"./routePaths-DbVBNvPC.js";import{g as Ye}from"./accountMappingHelper-B3v4RMhl.js";import{D as hs}from"./DrawerScreen-DZ4DkgHO.js";import"./recharts-srrgu-jp.js";import"./analytics-7PXXxPIN.js";import"./plaid-DuKDxXr2.js";import"./dnd-fU8QmJ8U.js";import"./stripe-DMRn4zHo.js";import"./lottie--jYlW6ya.js";import"./lexical-_D-pPLdL.js";import"./pdf-CbrAe2yy.js";import"./utils-BPOASmy-.js";import"./decodeURIComponentSafe-BR3AOxh5.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="81f02270-e5fb-41a0-ab09-cd3f9585dcbb",t._sentryDebugIdIdentifier="sentry-dbid-81f02270-e5fb-41a0-ab09-cd3f9585dcbb")}catch{}})();const gs=()=>{const t=pe(),l=Yt(),B=Ke(),f=x(d=>Re(d)),{useFeatureGate:b}=sn(),{isFeatureEnabled:S}=b(X.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:r}=b(X.aiAuditScorePercentage),I=x(d=>d.expenseAutomationViewState.selectedPeriodByTenantId),s=x(d=>la(d,f.tenantId)),{isAiCfoAccessEnabled:p,onAskAiCfoClick:u}=dn({mobileExploreReferrer:"Month-End Close Overview"}),E=o.useCallback((d,G,ee=!1)=>{t(ke({tenantId:G,period:{month:d.month,year:d.year},refreshViewInBackground:ee}))},[]),v=o.useCallback(d=>{const G=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&q.trackMonthCloseAuditPage(d.month,d.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,G??null),t(ra(f.tenantId,d))},[f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),g=I[f.tenantId],m=o.useCallback(()=>{const d=B.state?.referrer;s.monthEndCloseChecks?.auditSummary!=null&&q.trackMonthCloseAuditPage(g.month,g.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,d??null),E(g,f.tenantId,!0)},[E,g,f.tenantId,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),P=ae(B.state?.pathnameStackToGoBack,B.pathname),k=o.useCallback(()=>{if(s.monthEndCloseChecks!=null&&g!=null){const d=s.monthEndCloseChecks.monthEndCloseCheckList.find(G=>G.progress<100);if(d!=null)return void l(`./${d.id}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview"}});l(`./month_end_insights/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview"}})}},[s.monthEndCloseChecks,g]),{areTenantIdsInSync:T}=cn();return ln({isDataReady:s.fetchState==="Completed"}),o.useEffect(()=>{g!=null&&s.fetchState!=="In-Progress"&&s.fetchState!=="Completed"&&T&&E(g,f.tenantId)},[E,g,s.fetchState,f.tenantId,T]),o.useEffect(()=>{g!=null&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&s.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&T&&t(da(g))},[g,s.monthClosePerformanceTrendFetchStatus.fetchState,T]),o.useEffect(()=>{const d=setInterval(()=>{s.fetchState!=="In-Progress"&&s.fetchState==="Completed"&&m()},3e5);return()=>clearInterval(d)},[s.fetchState]),o.useEffect(()=>{if(s.fetchState==="Completed"&&s.monthEndCloseChecks?.auditSummary!=null){const d=B.state?.referrer;q.trackMonthCloseAuditPage(s.selectedPeriod.month,s.selectedPeriod.year,s.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",s.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,d??null)}},[s.fetchState,s.selectedPeriod,s.monthEndCloseChecks?.auditSummary,s.monthEndCloseChecks?.reportEmailSentDate]),h.jsx(Cs,{children:h.jsx(Lo,{monthEndCloseChecksView:s,isRealtimeInsightsFeatureEnabled:S,onMonthEndCheckClick:d=>{l(`./${d}/${g.month}-${g.year}`,{state:{pathnameStackToGoBack:P,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:v,handleReviewButtonClick:k,onBackClick:()=>{l("../../dashboard")},onReload:m,isAiCfoAccessEnabled:p,onAskAiCfoClick:u,aiAuditScorePercentageEnabled:r})})},Cs=Ue.div`
2
2
  display: flex;
3
3
  height: 100vh;
4
4
  width: 100%;
@@ -0,0 +1 @@
1
+ import{j as s}from"./liveblocks-B2nLBm11.js";import{a as r}from"./sentry-CLlo3TXi.js";import{a4 as c,a5 as l,a6 as p,q as d}from"./index-B1tuor_E.js";import"./mui-HaM5aBuG.js";import m from"./NotFoundScreen-By2F-w6l.js";import{h as u,g as b}from"./core-BDPZcSG4.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]="8281e6e9-f891-4867-bff4-cc53ea2eb482",e._sentryDebugIdIdentifier="sentry-dbid-8281e6e9-f891-4867-bff4-cc53ea2eb482")}catch{}})();const _=()=>{const e=u(),a=b(),t=r.useCallback(()=>{window.open("https://www.zeni.ai/demo/request","_blank")},[]),f=r.useCallback(()=>{(()=>{const n=d(a.state?.pathnameStackToGoBack),i=n.poppedPathname??k();e(i,{state:{pathnameStackToGoBack:n.newStack}})})()},[]),o=c(a.pathname);return o!=null?s.jsx(l,{menuItem:p(o),onDemoClick:t,onGoBack:f}):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 r}from"./sentry-C1EYnYRT.js";import{u as l,h as m,g as p}from"./core-NoaByI8l.js";import{ht as f,Mf as g,Mg as _}from"./zeni-epic-state-BI6-8w2O.js";import{u as b,L as h,z as y}from"./index-BFyN1ofW.js";import"./liveblocks-BxEyo0kz.js";import"./recharts-BwTK_Eeu.js";import"./mui-C_Ua4fCS.js";import"./analytics-BqIH6fAG.js";import"./plaid-CIE7io0e.js";import"./dnd-Du6eXVDD.js";import"./stripe-DMRn4zHo.js";import"./lottie-UPit3prG.js";import"./lexical-B2cdcYiO.js";import"./pdf-MSfEJkEc.js";import"./utils-B0dgdNkv.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]="ca071d2d-875c-46d5-a900-da06571bb95a",e._sentryDebugIdIdentifier="sentry-dbid-ca071d2d-875c-46d5-a900-da06571bb95a")}catch{}})();function R(){const e=l(),n=m(),o=p(),{setLoading:i,clearAllLoading:u}=b(),a=r.useRef(!1);return r.useLayoutEffect(()=>{i(h.CONNECTION_AUTH)},[i]),r.useEffect(()=>{if(a.current)return;a.current=!0;const s=new URLSearchParams(o.search).get("code"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),s!=null&&d!=null){const t=JSON.parse(d);e(f(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:s,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}u();const c=y.getActiveTenantForUser();n(c?.tenantEmailDomain!=null?`/${c.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})},[]),null}export{R as default};
1
+ import{a as r}from"./sentry-CLlo3TXi.js";import{u as l,h as m,g as p}from"./core-BDPZcSG4.js";import{ht as f,Mf as g,Mg as _}from"./zeni-epic-state-pQFlpfOQ.js";import{u as b,L as h,z as y}from"./index-B1tuor_E.js";import"./liveblocks-B2nLBm11.js";import"./recharts-srrgu-jp.js";import"./mui-HaM5aBuG.js";import"./analytics-7PXXxPIN.js";import"./plaid-DuKDxXr2.js";import"./dnd-fU8QmJ8U.js";import"./stripe-DMRn4zHo.js";import"./lottie--jYlW6ya.js";import"./lexical-_D-pPLdL.js";import"./pdf-CbrAe2yy.js";import"./utils-BPOASmy-.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]="ca071d2d-875c-46d5-a900-da06571bb95a",e._sentryDebugIdIdentifier="sentry-dbid-ca071d2d-875c-46d5-a900-da06571bb95a")}catch{}})();function R(){const e=l(),n=m(),o=p(),{setLoading:i,clearAllLoading:u}=b(),a=r.useRef(!1);return r.useLayoutEffect(()=>{i(h.CONNECTION_AUTH)},[i]),r.useEffect(()=>{if(a.current)return;a.current=!0;const s=new URLSearchParams(o.search).get("code"),d=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),s!=null&&d!=null){const t=JSON.parse(d);e(f(t.tenant_id,t.connection_id,g("revenue"),_("hubspot"),{authorization_code:s,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}u();const c=y.getActiveTenantForUser();n(c?.tenantEmailDomain!=null?`/${c.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})},[]),null}export{R as default};
@@ -0,0 +1,72 @@
1
+ import{j as a}from"./liveblocks-B2nLBm11.js";import{i as S,n as x,h as C,g as y,u as ee,t as ae,j as E,N as te,o as ne,p}from"./core-BDPZcSG4.js";import{M8 as k,M9 as v,Ma as M,Bc as B,A_ as T,Mb as A,Mc as oe,Md as se,B2 as ie,fA as $,B9 as le,B6 as de}from"./zeni-epic-state-pQFlpfOQ.js";import{K as g,o as d,p as re,d as j,m as G,G as ce,q as me,F as pe,r as _,V as ue,Q as he,N as xe,T as ge,y as fe,s as we,B as be,v as Se,_ as ye,S as ke,w as ve,x as je,A as $e}from"./index-B1tuor_E.js";import{n as m}from"./mui-HaM5aBuG.js";import f from"./NotFoundScreen-By2F-w6l.js";import{a as I}from"./sentry-CLlo3TXi.js";import"./recharts-srrgu-jp.js";import"./analytics-7PXXxPIN.js";import"./plaid-DuKDxXr2.js";import"./dnd-fU8QmJ8U.js";import"./stripe-DMRn4zHo.js";import"./lottie--jYlW6ya.js";import"./lexical-_D-pPLdL.js";import"./pdf-CbrAe2yy.js";import"./utils-BPOASmy-.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]="a81535a7-0d58-4add-91c7-6e3a7578ef62",e._sentryDebugIdIdentifier="sentry-dbid-a81535a7-0d58-4add-91c7-6e3a7578ef62")}catch{}})();const Ie=m.div`
2
+ display: flex;
3
+ height: 100%;
4
+ width: 100%;
5
+ flex: 1 1 auto;
6
+ flex-direction: column;
7
+ align-items: center;
8
+ background-color: ${e=>e.theme.colors.grey4};
9
+ box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
10
+ `,Ce=x(function(e){const t=k(e),n=v(e),{companyName:o}=t;return{companyName:o,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:t}},function(e,t){const{vendorId:n,billId:o}=t;return{onFetchBankName:s=>{e(T(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(B(s,"standard",n,o))},onACHDetailsUpdated:s=>{const{bankAccountSection:l}=s;e(M({data:l}))}}})(re);function F(){const e=g(),{vendorId:t,billId:n}=S();return t==null||n==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(Ie,{windowSize:e,children:a.jsx(Ce,{vendorId:t,billId:n})})})}const Be=m.div`
11
+ display: flex;
12
+ height: 100vh;
13
+ width: 100%;
14
+ flex: 1 1 auto;
15
+ flex-direction: column;
16
+ align-items: center;
17
+ background-color: ${e=>e.theme.colors.grey4};
18
+ box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
19
+ `,Ae=x(function(e,t){const{isSubPage:n}=t;return{addressToEdit:A(e),googleAPIKey:G.googleMapsAPIKey,isSubPage:n}},function(e,t){const{navigate:n,location:o}=t,s=()=>{const l=me(o.state?.pathnameStackToGoBack),i=l.poppedPathname??Pe();n(i,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const i=ze(l);e(oe({addressToCreate:i})),s()},onCancel:()=>{s()}}})(ce);function De({isSubPage:e}){const t=C(),n=y(),o=g();return a.jsx(a.Fragment,{children:a.jsx(Be,{windowSize:o,children:a.jsx(Ae,{location:n,navigate:t,isSubPage:e===!0,googleAPIKey:G.googleMapsAPIKey})})})}const Pe=(e=2)=>{let t="../";for(let n=0;n<e;n++)t=`${t}../`;return t},ze=e=>({street:[e.street.addressString,e.suite,e.secondaryInfo],city:e.city,state:e.state,country:e.country.selectedOption??"",countryCode:e.countryCode,postalCode:e.postalCode,latitude:e.street.addressValue?.locationLat,longitude:e.street.addressValue?.locationLng}),Ne=m.div`
20
+ display: flex;
21
+ height: 100%;
22
+ width: 100%;
23
+ flex: 1 1 auto;
24
+ flex-direction: column;
25
+ align-items: center;
26
+ background-color: ${e=>e.theme.colors.grey4};
27
+ box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
28
+ `,Le=x(function(e){const t=k(e),n=v(e),o=A(e),{companyName:s}=t;return{companyName:s,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}},function(e,t){const{navigate:n,location:o,vendorId:s,billId:l}=t;return{onFetchBankName:i=>{e(T(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(i,"us-domestic",s,l))},onWireDetailsUpdated:i=>{const{bankAccountSection:r}=i;e(M({data:r}))},onAddressClick:()=>{const i=o.pathname.replace("us-domestic","address"),r=_(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:r}})}}})(pe);function Ee(){const e=C(),t=y(),n=g(),{vendorId:o,billId:s}=S();return o==null||s==null?a.jsx(f,{}):a.jsx(a.Fragment,{children:a.jsx(Ne,{windowSize:n,children:a.jsx(Le,{location:t,navigate:e,vendorId:o,billId:s})})})}const Fe=m.div`
29
+ display: flex;
30
+ height: 100%;
31
+ width: 100%;
32
+ flex: 1 1 auto;
33
+ flex-direction: column;
34
+ align-items: center;
35
+ background-color: ${e=>e.theme.colors.grey4};
36
+ box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
37
+ `,Me=x(function(e){const t=k(e),n=v(e),o=A(e),{companyName:s}=t;return{companyName:s,isDisabled:t.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:t}},function(e,t){const{navigate:n,location:o,vendorId:s,billId:l}=t;return{onFetchBankNameBySwift:i=>{e(ie(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(i,"international",s,l,t.isLocalCurrencyEnabled))},onBankDetailsUpdated:i=>{const{internationalWireSwiftAccountSection:r}=i;e(se({data:r}))},onAddressClick:()=>{const i=o.pathname.replace("international","address"),r=_(o.state?.pathnameStackToGoBack,o.pathname);n(i,{state:{pathnameStackToGoBack:r}})}}})(xe);function Te(){const e=C(),t=y(),n=g(),{vendorId:o,billId:s}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:i}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||s==null?a.jsx(f,{}):a.jsx(Fe,{windowSize:n,children:a.jsx(Me,{location:t,navigate:e,vendorId:o,billId:s,isLocalCurrencyEnabled:i})})}const Ge={containerWidth:new je(100,58)},_e=m(ke)`
38
+ width: ${d.sp4};
39
+ height: ${d.sp4};
40
+ margin-bottom: ${d.sp3};
41
+ margin-top: ${d.sp3};
42
+ margin-left: ${d.sp8};
43
+ cursor: pointer;
44
+ position: absolute;
45
+ color: ${e=>e.theme.colors.brandColorJade};
46
+ `,He=m.div`
47
+ display: flex;
48
+ height: 100vh;
49
+ flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
50
+ width: 100vw;
51
+ overflow-y: scroll;
52
+ background-color: ${e=>e.theme.colors.grey4};
53
+ `,Ke=m.div`
54
+ display: flex;
55
+ flex-direction: ${e=>e.windowSize==="small"?"column":"row"};
56
+ flex-direction: column;
57
+ width: ${e=>`${Ge.containerWidth.value(e.windowSize)}%`};
58
+ ${e=>e.windowSize!=="small"?"overflow: auto;":""}
59
+ box-shadow: ${e=>`0px 2px ${d.sp1} ${e.theme.colors.dropShadowNormal}`};
60
+ padding-top: ${e=>e.windowSize!=="small"?d.sp2:"0px"};
61
+ `,Ve=m.div`
62
+ display: flex;
63
+ flex-direction: column;
64
+ align-items: center;
65
+ justify-content: center;
66
+ padding: ${e=>e.windowSize==="small"?d.sp3:`62px ${d.sp6} ${d.sp9} ${d.sp8}`};
67
+ height: ${e=>e.windowSize==="small"?"490px":"auto"};
68
+ overflow: ${e=>e.windowSize==="small"?"unset":"hidden"};
69
+ width: ${e=>e.windowSize=="small"?"auto":"42%"};
70
+ background-color: ${e=>e.windowSize==="small"?e.theme.colors.grey4:e.theme.colors.background};
71
+ margin-top: ${e=>e.windowSize==="small"?e.isAddressPage?"0px":"186px":"unset"};
72
+ `,We=x(function(e,t){return{file:t.file,type:t.type}})(ve);function h({appContent:e}){const t=ee(),n=y(),{tenantEmailDomain:o,vendorId:s,billId:l}=S(),[i]=ae(),r=i.get("token"),H=n.pathname.includes("address"),w=g(),K=ge(),D=fe(),b=we(),V=()=>{K.toggle()},W=E(u=>k(u)),U=E(u=>v(u)),{authParams:O,fetchState:c,billAttachment:Q,billFetchState:P,companyName:q,currencySymbol:J,amount:R}=W,{tenantId:z,userId:N,sessionId:L}=O,{fetchState:X,internationalBankAccountCreateStatus:Y}=U;return I.useEffect(()=>{$()},[]),I.useEffect(()=>{b&&c==="Not-Started"&&s!=null&&o!=null&&r!=null&&t(le(s,o,r))},[b,c,s,o,r,t]),I.useEffect(()=>{b&&c==="Completed"&&($(N,L,z),l!=null&&t(de(l)))},[c,b,N,L,z,l,t]),c==="Error"?a.jsx(f,{}):X==="Completed"||Y.fetchState==="Completed"?($(),a.jsx(te,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?a.jsx(be,{fetchState:c,style:{height:"100vh",backgroundColor:D.colors.grey5,boxShadow:`0px 2px ${d.sp1} ${D.colors.dropShadowNormal}`}}):a.jsxs(a.Fragment,{children:[c==="Completed"&&P==="Completed"&&a.jsx(Se,{analytics:j,onLoad:u=>(Z=>Z.trackBillPayMagicLinkPageLoad(o??"",s??"",q,l??"",Ue(n.pathname),J,R))(u)}),a.jsxs(He,{windowSize:w,children:[w!=="small"?a.jsx(_e,{onClick:V}):null,a.jsx(Ve,{windowSize:w,isAddressPage:H,children:P==="In-Progress"?a.jsx(ye,{size:"ExtraLarge",start:!0}):a.jsx(We,{file:Q,type:"bill"})}),a.jsx(Ke,{windowSize:w,children:e})]})]})}const Ue=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function Oe(){return a.jsx($e,{})}function ra(){return a.jsxs(ne,{children:[a.jsx(p,{path:"bank/account/save/success",element:a.jsx(Oe,{})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:a.jsx(h,{appContent:a.jsx(F,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:a.jsx(h,{appContent:a.jsx(De,{isSubPage:!0})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:a.jsx(h,{appContent:a.jsx(Ee,{})})}),a.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:a.jsx(h,{appContent:a.jsx(Te,{})})}),a.jsx(p,{path:"*",element:a.jsx(f,{})})]})}export{ra as default};
@@ -0,0 +1,12 @@
1
+ import{j as u}from"./liveblocks-B2nLBm11.js";import{a as f}from"./sentry-CLlo3TXi.js";import{u as M,g as _,h as O,t as w,j as l,N as C}from"./core-BDPZcSG4.js";import{z as r,y as V,a as A,e as P,d as N,f as W,C as $,_ as R,h as X}from"./index-B1tuor_E.js";import{eX as Y,LV as q,M3 as B,LW as G,fA as H,g0 as J,L$ as K,go as Q,cY as Z,M4 as ee,M5 as te}from"./zeni-epic-state-pQFlpfOQ.js";import{n as ne}from"./mui-HaM5aBuG.js";import{u as se}from"./useDeviceId-CQ3pf2OT.js";import{f as ie}from"./analyticsHelper-Ce6ZNBVM.js";import{t as ae}from"./getLocaleForTenant-5gC9KZpR.js";import"./recharts-srrgu-jp.js";import"./analytics-7PXXxPIN.js";import"./plaid-DuKDxXr2.js";import"./dnd-fU8QmJ8U.js";import"./stripe-DMRn4zHo.js";import"./lottie--jYlW6ya.js";import"./lexical-_D-pPLdL.js";import"./pdf-CbrAe2yy.js";import"./utils-BPOASmy-.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]="b56c5e79-3d2f-4238-b650-1f636d031cdf",t._sentryDebugIdIdentifier="sentry-dbid-b56c5e79-3d2f-4238-b650-1f636d031cdf")}catch{}})();const T=(t,i)=>t!=null&&t.length>0&&i==="magic_links";function Te(){const t=M(),i=_(),m=O(),[y]=w(),n=y.get("token"),p=y.get("stytch_token_type"),g=r.getMagicLinkCodeVerifier(),a=se(),{otpChallenge:d,twoFAPhoneNumber:x,magicLinkEmail:c,verifyDeviceFetchState:z,resendVerifyDeviceOTPFetchState:D}=l(e=>e.tenantState),S=l(e=>e.tenantState.fetchState),k=l(e=>e.tenantState.activeTenantFetchState.fetchState),h=l(e=>e.tenantState.signInState),I=l(e=>e.tenantState.magicLinkSignInFetchState.fetchState),s=l(e=>e.tenantState.loggedInUser),o=l(e=>Y(e)),b=l(e=>q(e)),E=r.getSignedInUser(),v=V().mode;f.useEffect(()=>{s?.zeniSessionId==null&&n!=null&&T(n,p)&&a!=null&&g!=null&&(r.saveMagicLinkTriggered(n),t(B(n,a,g)))},[n,p,t,a,g,s?.zeniSessionId]),f.useEffect(()=>{h!=="In-Progress"||S!=="Completed"&&k!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(G(b.tenantsInOrder),s.zeniSessionId),H(s.userId,s.zeniSessionId,o.tenantId),t(J(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(K("Completed")),A.updateAppLocaleID(ae(o)),ie(s,o,v,void 0,b.tenantsInOrder),Q().then(()=>{const e=X();e!=null&&P(e)}),setTimeout(()=>{N.trackLogin(W.Event.loginSuccess,"email",Z(o.productSettings))},2e3))},[h,S,k,s,o,b,v,i.state,t]);const U=f.useCallback(()=>{m("/signin/auth")},[m]),j=f.useCallback(()=>{a!=null&&d!=null&&c!=null&&t(ee(a,c,d))},[a,d,t,c]),F=f.useCallback(e=>{a!=null&&n!=null&&c!=null&&d!=null&&t(te(e,a,c,d))},[a,n,t,c,d]);if(I==="Completed"&&d!=null)return u.jsx($,{phoneNumber:x,verifyOtpFetchState:z.fetchState,resendVerifyDeviceOTPFetchState:D,onResendOtp:j,onVerifyOtp:F,onCancelVerifyDevice:U});if(h==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||E!=null){const e=i.state?.origin??"/";return u.jsx(C,{to:e,state:{...i.state,origin:""}})}if(!T(n,p)||g==null||I==="Error"){const e=i.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(C,{to:e,state:{...i.state,origin:"",magicLinkAlreadyUsed:L,magicLinkExpired:!L&&(r.isMagicLinkTriggered(n??"")||I==="Error"&&s?.zeniSessionId==null)}})}return u.jsx(oe,{"data-testid":"smooth-loader",children:u.jsx(R,{size:"ExtraLarge",start:!0})})}const oe=ne.div`
2
+ position: fixed;
3
+ top: 0;
4
+ left: 0;
5
+ right: 0;
6
+ bottom: 0;
7
+ display: flex;
8
+ align-items: center;
9
+ justify-content: center;
10
+ z-index: 9999;
11
+ background-color: ${t=>t.theme.colors.background};
12
+ `;export{Te as default};
@@ -0,0 +1 @@
1
+ import{j as N}from"./liveblocks-B2nLBm11.js";import{a as c}from"./sentry-CLlo3TXi.js";import{u as fe,j as n,i as Ye,g as Qe,h as We,l as P}from"./core-BDPZcSG4.js";import{eX as me,fF as Xe,fG as pe,fr as qe,bn as Ke,eW as Je,fH as ea,fI as aa,fK as ta,fN as na,fO as g,fQ as sa,fR as de,fU as oa,fS as ia,fT as ra,fV as da,cN as la,fX as ca,cT as ua,fq as fa,g0 as ma,g1 as pa,f$ as ba}from"./zeni-epic-state-pQFlpfOQ.js";import{a8 as ha,a9 as Sa,T as ga,V as Ea,z as k,s as ka,u as Ca,Q as r,i as ya,O as Ia,aa as Ta,k as _a,c as wa,ab as Aa,a4 as Fa,ac as Da,ad as va,ae as le,af as ce,L as $a,ag as Ga,ah as ue,d as R,a0 as Ma,r as _,ai as x,aj as Pa}from"./index-B1tuor_E.js";import{D as Ra}from"./mui-HaM5aBuG.js";(function(){try{var f=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new f.Error().stack;d&&(f._sentryDebugIds=f._sentryDebugIds||{},f._sentryDebugIds[d]="99785a15-0a37-496b-95eb-578250470642",f._sentryDebugIdIdentifier="sentry-dbid-99785a15-0a37-496b-95eb-578250470642")}catch{}})();const xa=ha(({isAppContentDrawerOpen:f,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=Ye(),a=Qe(),C=ga(),o=We(),V=qe(),m=fe(),{useFeatureGate:i}=Ea(),B=k.getSignedInUser(),U=Ke(B),s=n(e=>me(e)),be=s.masterTOSInfo?.isMasterTOSAccepted??!1,O=n(e=>Je(e)),j=O.uiState.currentChatSessionId,y=ka(),{setLoading:he}=Ca(),[w,L]=c.useState(void 0),A=P("/:tenantEmailDomain/dashboard")!==null,z=P("/:tenantEmailDomain/reports")!==null,I=P("/:tenantEmailDomain/onboarding/*")!==null,Se=!!s.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:ge}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:Z}=i(r.isDebitCardFeatureEnabled),Ee=ya(s,ge,Z),{isFeatureEnabled:ke}=i(r.isSettingsFeatureEnabled),H=n(e=>ea(e)),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),F=n(e=>aa(e));c.useEffect(()=>{y&&T&&!I&&F.fetchState==="Not-Started"&&m(ta(!0))},[y,T,F.fetchState,I]);const h=k.getSignedInUser(),D=n(e=>e.tenantState),Ce=n(e=>D.fetchState==="Completed"?na(e):[]),E=n(e=>e.expenseAutomationViewState.selectedPeriodByTenantId),{isFeatureEnabled:ye}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:Ie}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:Te}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:_e}=i(r.isExpenseAutomationEnabledV2),Y=Ia(),{isFeatureEnabled:we}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:Ae}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:De}=i(r.isDashboardSidebarNewYearAnimationEnabled),v=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:ve}=i(r.isTaskManagerCustomerUserAccessEnabled),$e=U||!U&&ve,Ge=n(e=>g(e).totalUnreadCount),Me=n(e=>g(e).reducedFetchCountState),Q=n(e=>g(e).notificationDetailsByTab.tasks.uiState.unreadCount),W=n(e=>g(e).notificationDetailsByTab.comments.uiState.unreadCount),Pe=n(e=>g(e).notificationDetailsByTab.tasks.fetchCountState),$=n(e=>g(e).notificationDetailsByTab.comments.fetchCountState),{inboxNotifications:X,isLoading:q,isFetchingMore:K,hasFetchedAll:J,fetchMore:Re}=Ta();c.useEffect(()=>{const e=setTimeout(()=>Re?.(),0);return()=>clearTimeout(e)}),c.useEffect(()=>{if(q===!1&&K===!1&&J===!0)if(s?.companyId!=null&&X!=null){const e=`dashboard_${s.companyId}`;L(X.filter(u=>u.roomId===e&&u.readAt==null).length)}else L(0)},[q,K,J]),c.useEffect(()=>{y&&!I&&Pe.fetchState==="Not-Started"&&V.tenantId!=null&&m(sa("task_manager","dashboard"))},[y,V.tenantId]),c.useEffect(()=>{I||$.fetchState!=="Not-Started"||m(de({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),c.useEffect(()=>{w!=null&&$.fetchState==="In-Progress"&&(m(de({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),m(pe({unreadCount:w},"comments")))},[w,$.fetchState]);const xe={fetchStatus:Me,count:Ge},ee=t!=null?k.getSignedInUserTenant(t):null,ae=n(e=>ee?.tenantId!=null?oa(e,ee.tenantId):void 0),S=[];ye===!1&&S.push("accounts_payable_aging"),Ie===!1&&S.push("accounts_receivable_aging"),S.push("zeni_accounts_promo_card","treasury_promo_card"),T===!1&&S.push("rewards_card"),Y===!1&&S.push("expense_automation_card");const Ne=_a(),te=n(e=>ia(e,S,h,_e,Te).fetchState),ne=n(e=>ra(e).fetchState),Ve=A&&(te==="Completed"||te==="Error")||z&&(ne==="Completed"||ne==="Error")||!A&&!z?void 0:"disabled",Be=c.useMemo(()=>da(s.userRole),[s.userRole]),Ue=la(Be),Oe=s?.rewardsLastViewedTime==null,je=h?.userEmail!=null&&H.fetchState==="Completed"&&ca(H.notificationSettings,h.userEmail,Z,s),se=wa(),Le=se&&Aa(a),oe=ua(Ne?.loggedInUserRoleMap),ie=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,G=c.useCallback(()=>v&&oe&&!k.getTreasuryPopupSeen(t??"")&&ie===!1&&Fa(a.pathname)!=="treasury",[v,oe,ie,a.pathname,t]),[ze,re]=c.useState(G);c.useEffect(()=>{re(G())},[G]);const Ze=n(e=>e.treasurySetupViewState.treasuryFundsDetails).fundsDetails,He=Da(Ze);return N.jsx(Ra,{container:window.document.body,variant:"temporary",open:f,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:N.jsx(va,{signedInUser:B,currentTenantId:D.currentTenantId??"",tenants:D.fetchState==="Completed"?Ce:ae!=null?[ae]:[],currentTenant:s,isTenantDropdownDisabled:Ve,isSettings:ce(a),isSettingsFeatureEnabled:ke,isVendorsTabVisible:Ue,isZeniAccountEnabled:Se,isChargeCardEnabled:Ee,isTreasuryEnabled:v,treasuryYieldPercentage:He,isTreasuryPopupVisible:ze,isNotificationsTabVisible:je,notificationCountDetails:xe,isExpenseAutomationEnabledForUser:Y,selectedMenu:le(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Oe,rewardsPlan:F.rewardsPlan},isAiCfoAccessEnabled:se,onNotificationIconClick:()=>{d(!1);let e=Q===0&&W>0?"notifications/comments":"notifications/tasks";ce(a)&&(e=Q===0&&W>0?"../../notifications/comments":"../../notifications/tasks");const u=_(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:u}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=_(a.state?.pathnameStackToGoBack,a.pathname);o("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},handleMenuChange:e=>{if(d(!1),t==null)return;if(e.type==="ai_cfo"){if(R.trackAICFOChatScreenStateChanged("viewed","left_menu",j??null,null),!be)return void Ma({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const b=_(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:b,referrer:"Sidebar"}})}const u=_(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,p=x(l)&&l!=="command_center";if(x(e.type)&&E[s.tenantId]!=null&&R.trackMonthEndCloseClicked(E[s.tenantId].month,E[s.tenantId].year,"Sidebar"),p&&E[s.tenantId]!=null){const b=E[s.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${b.month}-${b.year}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})}const M=Pa(e.type);ue(e.type)?(j!=null&&m(ba()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:u.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${M}`,{state:{pathnameStackToGoBack:u,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${t}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${t}/rewards`)},handleBackClick:()=>{o(`/${t}/dashboard`)},handleTenantSelect:e=>{he($a.TENANT_SWITCHING),d(!1);const u=e.tenantEmailDomain,l=le(a);let p=`/${encodeURIComponent(u)}/`;const M=x(l);l==="home"?p+="dashboard":l==="users_and_roles"?p+="people":Ga(l)?p+="settings/my_profile":ue(l)?p+=`ai-cfo/${l}`:p+=l==="task_checklist"?"tasks":M?"month_end_close_checks/review":encodeURIComponent(l),o(p,{replace:!0}),h!=null&&(m(ma(e.tenantId)),m(pa(h.userId,e.tenantId,h.zeniSessionId)));const b=e;R.trackCompanySwitch(b.companyId,b.companyName,b.userRole)},handlePopupClose:()=>{k.saveTreasuryPopupSeen(t??"",!0),re(!1)},onZeniLogoClick:()=>{C.toggle()},isAiCfo:Le,aiCfoView:O,isOnDashboard:A,updateCurrentChatSessionId:e=>{m(fa({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:we,isTaskManagerAccessEnabled:$e,thanksGivingAnimationEnabled:Ae,christmasAnimationEnabled:Fe,newYearAnimationEnabled:De})})}),La=f=>{const d=fe(),t=n(C=>me(C)),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(C,o)=>{Sa(o)&&Xe(o.mode)==="dashboard"&&d(pe({unreadCount:o.data.unread},"tasks"))}};return N.jsx(xa,{...f,...a})};export{La as M};
@@ -0,0 +1 @@
1
+ import{j as e}from"./liveblocks-B2nLBm11.js";import{h as r,n}from"./core-BDPZcSG4.js";import{M as i}from"./index-B1tuor_E.js";import"./mui-HaM5aBuG.js";import"./sentry-CLlo3TXi.js";import"./zeni-epic-state-pQFlpfOQ.js";import"./recharts-srrgu-jp.js";import"./analytics-7PXXxPIN.js";import"./plaid-DuKDxXr2.js";import"./dnd-fU8QmJ8U.js";import"./stripe-DMRn4zHo.js";import"./lottie--jYlW6ya.js";import"./lexical-_D-pPLdL.js";import"./pdf-CbrAe2yy.js";import"./utils-BPOASmy-.js";(function(){try{var o=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},t=new o.Error().stack;t&&(o._sentryDebugIds=o._sentryDebugIds||{},o._sentryDebugIds[t]="59e35ec1-38d4-48f4-8af2-c43da8d96945",o._sentryDebugIdIdentifier="sentry-dbid-59e35ec1-38d4-48f4-8af2-c43da8d96945")}catch{}})();const a=n(null,function(o,t){return{onGoBack:()=>{t.navigate(-1)},onGoHome:()=>{t.navigate("/")}}})(i);function _(){const o=r();return e.jsx(a,{navigate:o})}export{_ as default};
@@ -1 +1 @@
1
- import{l as ct,a as dt,m as mt,j as E}from"./liveblocks-BxEyo0kz.js";import lt from"./NotFoundScreen-0I7QDvAA.js";import{a as k}from"./sentry-C1EYnYRT.js";import{h as ft,g as ut,i as ht,u as pt,j as S,n as kt,o as gt,p as L}from"./core-NoaByI8l.js";import{cu as St,fH as Q,eX as q,fV as bt,fO as b,SW as Z,fR as m,fG as y,so as M,xU as It,SX as Ct,fF as Tt,fX as yt,st as _t,SY as F,bo as $,fz as w,sx as O,SZ as At,cG as Et,cz as Nt}from"./zeni-epic-state-BI6-8w2O.js";import{Y as xt,z as Bt,Q as wt,e as Rt,$ as Gt,cW as Ut,v as N,a8 as vt,cX as Dt,a9 as Pt,s as Ft}from"./index-BFyN1ofW.js";import"./mui-C_Ua4fCS.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-CUwiq2yT.js";import"./recharts-BwTK_Eeu.js";import"./analytics-BqIH6fAG.js";import"./plaid-CIE7io0e.js";import"./dnd-Du6eXVDD.js";import"./stripe-DMRn4zHo.js";import"./lottie-UPit3prG.js";import"./lexical-B2cdcYiO.js";import"./pdf-MSfEJkEc.js";import"./utils-B0dgdNkv.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="cbd1beba-9657-4d06-afd8-0eef1bd22d92",t._sentryDebugIdIdentifier="sentry-dbid-cbd1beba-9657-4d06-afd8-0eef1bd22d92")}catch{}})();const Mt=(t,l)=>new Promise((n,u)=>{const g=t.map(i=>new Promise(s=>{l(i),s()}));Promise.all(g).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),jt=kt(function(t,l){const n=Q(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=q(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:x,fetchMoreCommentsNotifications:R}=l;return{onNotificationClick:(a,o,d,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}d==="unread"&&t(O("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,d)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){d==="unread"&&(x(a),t(F([a],$())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!Et(g)&&(r="not-found"),c[1].startsWith("bill")&&!Nt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(m(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(Z(a,o));const d=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(d,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(At(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const d=[];o==="all"?d.push("read","unread"):o!=="mentions"&&d.push(o),t(M("task_manager","dashboard",d))}else R?.()},onUpdateNotificationStatus:(a,o,d,c)=>{a==="tasks"?t(O("task_manager",d,c)):(t(m({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{d==="read"&&(x(r),t(F([r],$())))})).then(()=>{t(m({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(m({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(m({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(m({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,x).then(()=>{t(F(s,$())),t(m({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(m({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=Ft(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(vt(Dt)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=xt(),i=St(u??""),s=pt(),h=Bt.getSignedInUser(),[x,R]=k.useState(!1),a=S(e=>Q(e)),o=S(e=>q(e)),{useFeatureGate:d}=wt(),{isFeatureEnabled:c}=d(Rt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=$t({mobileExploreReferrer:"Notifications"});Gt({isDataReady:!0});const J=bt(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),V=S(e=>b(e).currentTab),G=S(e=>b(e).currentSubTab),K=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),U=S(e=>b(e).notificationDetailsByTab.comments.fetchState),tt=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),et=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),at=Ut().allUsers,{inboxNotifications:B,isLoading:_,hasFetchedAll:C,isFetchingMore:v,fetchMore:ot}=ct(),{threads:W,isLoading:z,fetchMore:X,isFetchingMore:Y,hasFetchedAll:H}=dt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(V!==i&&i!=null&&s(Z(i)),i==null){const e=`../${V}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{K.fetchState==="Not-Started"&&s(m({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(_===!1&&C===!0&&o?.companyId!=null&&B!=null){const e=`dashboard_${o.companyId}`,p=B.filter(T=>T.roomId===e&&T.readAt==null).length;s(m({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}},[_,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>ot?.(),0);return()=>clearTimeout(e)});const D=_||v===!0||C!==!0||_||v===!0||C!==!0;k.useEffect(()=>{D&&U!=="In-Progress"?s(m({fetchState:"In-Progress",error:void 0},"comments")):D||U!=="In-Progress"||s(m({fetchState:"Completed",error:void 0},"comments"))},[D,U]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&x===!1&&(R(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(_===!1&&z===!1&&B!=null&&W!=null){const e=`dashboard_${o.companyId}`,p=B.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),A=p.map(f=>f.id),it=p.map(f=>{const P=W.find(rt=>rt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(Y||H===!0||X==null||X(),null)}).filter(f=>f!=null);s(m({allNotificationsIds:A},"comments")),s(y({totalCount:A.length,unreadCount:T.length},"comments")),s(Ct(it))}},[_,v,Y,C,H,z,B?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Pt(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const A=[];G==="all"?A.push("read","unread"):G!=="mentions"&&A.push(G),s(M("task_manager",T,A,!0))}}}},nt=mt();return E.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:J,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return E.jsxs(gt,{children:[E.jsx(L,{path:"/:selectedTab",element:E.jsx(Vt,{})}),E.jsx(L,{path:"*",element:E.jsx(lt,{})})]})}export{ne as default};
1
+ import{l as ct,a as mt,m as dt,j as E}from"./liveblocks-B2nLBm11.js";import lt from"./NotFoundScreen-By2F-w6l.js";import{a as k}from"./sentry-CLlo3TXi.js";import{h as ft,g as ut,i as ht,u as pt,j as S,n as kt,o as gt,p as O}from"./core-BDPZcSG4.js";import{cu as St,fH as Y,eX as H,fV as bt,fO as b,SW as Z,fR as d,fG as y,so as M,xU as It,SX as Ct,fF as Tt,fX as yt,st as _t,SY as F,bo as $,fz as w,sx as Q,SZ as At,cG as Et,cz as Nt}from"./zeni-epic-state-pQFlpfOQ.js";import{Y as xt,z as Bt,V as wt,Q as Rt,$ as Gt,cW as Ut,r as N,a8 as Dt,cX as vt,a9 as Pt,q as Ft}from"./index-B1tuor_E.js";import"./mui-HaM5aBuG.js";import{u as $t}from"./useAskAiCfoHostNavButtonProps-CtdOXC4O.js";import"./recharts-srrgu-jp.js";import"./analytics-7PXXxPIN.js";import"./plaid-DuKDxXr2.js";import"./dnd-fU8QmJ8U.js";import"./stripe-DMRn4zHo.js";import"./lottie--jYlW6ya.js";import"./lexical-_D-pPLdL.js";import"./pdf-CbrAe2yy.js";import"./utils-BPOASmy-.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},l=new t.Error().stack;l&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[l]="df86a155-e453-47dd-aff4-60670b02b372",t._sentryDebugIdIdentifier="sentry-dbid-df86a155-e453-47dd-aff4-60670b02b372")}catch{}})();const Mt=(t,l)=>new Promise((n,u)=>{const g=t.map(i=>new Promise(s=>{l(i),s()}));Promise.all(g).then(()=>{setTimeout(()=>{n()},2e3)}).catch(i=>{u(i)})}),jt=kt(function(t,l){const n=Y(t),{signedInUser:u,isDebitCardFeatureEnabled:g}=l,i=b(t),s=H(t),{currentTab:h}=i;return{notificationView:i,isNotificationSettingsVisible:u.userEmail!=null&&yt(n.notificationSettings,u.userEmail,g,s),isDisabled:i.notificationDetailsByTab[h].fetchState==="In-Progress"?"disabled":void 0}},function(t,l){const{location:n,tenantEmailDomain:u,loggedInUserRoleMap:g,externalNotificationsUnreadCount:i,allUnreadCommentsNotificationIds:s,navigate:h,markInboxNotificationAsRead:x,fetchMoreCommentsNotifications:R}=l;return{onNotificationClick:(a,o,m,c)=>{if(c==="task_deleted"){const r=`/${u}/tasks`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}else{const r=`/${u}/tasks/${o}`,I=N(n.state?.pathnameStackToGoBack,n.pathname);h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}m==="unread"&&t(Q("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(x(a),t(F([a],$())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!Et(g)&&(r="not-found"),c[1].startsWith("bill")&&!Nt(g)&&(r="not-found"),h(r,{state:{pathnameStackToGoBack:I,message:"triggerBackClick"}})}},onUpdateNotificationViewUIState:(a,o)=>{t(y(a,o))},onUpdateNotificationTabState:(a,o)=>{t(d(a,o))},onUpdateNotificationViewCurrentTabAndSubTab:(a,o)=>{t(Z(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(At(a))},onFetchMoreNotifications:(a,o)=>{if(a==="tasks"){const m=[];o==="all"?m.push("read","unread"):o!=="mentions"&&m.push(o),t(M("task_manager","dashboard",m))}else R?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(Q("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map(r=>{m==="read"&&(x(r),t(F([r],$())))})).then(()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))},r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}).catch(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(_t("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,x).then(()=>{t(F(s,$())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}).catch(o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(w({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))}))},onBackClick:()=>{const a=Ft(n.state?.pathnameStackToGoBack),o=a.poppedPathname??"../../dashboard";h(o,{state:{pathnameStackToGoBack:a.newStack}})},onSettingsClick:()=>{const a=N(n.state?.pathnameStackToGoBack,n.pathname);h("../../settings/notifications",{state:{pathnameStackToGoBack:a}})}}})(Dt(vt)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=xt(),i=St(u??""),s=pt(),h=Bt.getSignedInUser(),[x,R]=k.useState(!1),a=S(e=>Y(e)),o=S(e=>H(e)),{useFeatureGate:m}=wt(),{isFeatureEnabled:c}=m(Rt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=$t({mobileExploreReferrer:"Notifications"});Gt({isDataReady:!0});const J=bt(o.userRole);if(o==null||n==null||o.companyId==null)throw Error("Can't access notifications page without current tenant...");if(h==null)throw Error("Can't access notifications page without signed in...");const j=S(e=>b(e).notificationDetailsByTab.tasks.fetchState),V=S(e=>b(e).currentTab),G=S(e=>b(e).currentSubTab),K=S(e=>b(e).notificationDetailsByTab.comments.fetchCountState),U=S(e=>b(e).notificationDetailsByTab.comments.fetchState),tt=S(e=>b(e).notificationDetailsByTab.comments.uiState.unreadCount),et=S(e=>b(e).allExternalNotifications).filter(e=>e.inboxNotification.readAt==null).map(e=>e.inboxNotification.id),at=Ut().allUsers,{inboxNotifications:B,isLoading:_,hasFetchedAll:C,isFetchingMore:D,fetchMore:ot}=ct(),{threads:W,isLoading:z,fetchMore:X,isFetchingMore:L,hasFetchedAll:q}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect(()=>{if(V!==i&&i!=null&&s(Z(i)),i==null){const e=`../${V}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}},[i]),k.useEffect(()=>{K.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),k.useEffect(()=>{if(_===!1&&C===!0&&o?.companyId!=null&&B!=null){const e=`dashboard_${o.companyId}`,p=B.filter(T=>T.roomId===e&&T.readAt==null).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}},[_,C]),k.useEffect(()=>{j!=="In-Progress"&&g&&s(M("task_manager","dashboard",["read","unread"]))},[g]),k.useEffect(()=>{const e=setTimeout(()=>ot?.(),0);return()=>clearTimeout(e)});const v=_||D===!0||C!==!0||_||D===!0||C!==!0;k.useEffect(()=>{v&&U!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):v||U!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))},[v,U]),k.useEffect(()=>{s(y({hasMore:C!==!0},"comments"))},[C]),k.useEffect(()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&x===!1&&(R(!0),s(It()))},[a.fetchState]),k.useEffect(()=>{if(_===!1&&z===!1&&B!=null&&W!=null){const e=`dashboard_${o.companyId}`,p=B.filter(f=>f.roomId===e).filter(f=>f.kind==="thread"),T=p.filter(f=>f.readAt==null),A=p.map(f=>f.id),it=p.map(f=>{const P=W.find(rt=>rt.id===f.threadId);return P!=null?{inboxNotification:{...f,threadId:P.id},thread:P}:(L||q===!0||X==null||X(),null)}).filter(f=>f!=null);s(d({allNotificationsIds:A},"comments")),s(y({totalCount:A.length,unreadCount:T.length},"comments")),s(Ct(it))}},[_,D,L,C,q,z,B?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Pt(p)){const T=Tt(p.mode);if(T==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const A=[];G==="all"?A.push("read","unread"):G!=="mentions"&&A.push(G),s(M("task_manager",T,A,!0))}}}},nt=dt();return E.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:J,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return E.jsxs(gt,{children:[E.jsx(O,{path:"/:selectedTab",element:E.jsx(Vt,{})}),E.jsx(O,{path:"*",element:E.jsx(lt,{})})]})}export{ne as default};
@@ -0,0 +1 @@
1
+ import{j as m}from"./liveblocks-B2nLBm11.js";import{a as r}from"./sentry-CLlo3TXi.js";import{u as T,g as j,j as o,N as A}from"./core-BDPZcSG4.js";import{Mi as C,eX as P,fN as x,Mj as z,Mk as D,Ml as L,Mm as N,o9 as R,Lf as k}from"./zeni-epic-state-pQFlpfOQ.js";import{z as h,H as I}from"./index-B1tuor_E.js";import"./mui-HaM5aBuG.js";import"./recharts-srrgu-jp.js";import"./analytics-7PXXxPIN.js";import"./plaid-DuKDxXr2.js";import"./dnd-fU8QmJ8U.js";import"./stripe-DMRn4zHo.js";import"./lottie--jYlW6ya.js";import"./lexical-_D-pPLdL.js";import"./pdf-CbrAe2yy.js";import"./utils-BPOASmy-.js";(function(){try{var n=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new n.Error().stack;s&&(n._sentryDebugIds=n._sentryDebugIds||{},n._sentryDebugIds[s]="99dcbb24-fc6a-4ad8-94ff-5cb9e21b9d8c",n._sentryDebugIdIdentifier="sentry-dbid-99dcbb24-fc6a-4ad8-94ff-5cb9e21b9d8c")}catch{}})();function ee(){const n=T(),s=j(),{params:t,error:i}=r.useMemo(()=>C(s.search),[s.search]),b=r.useMemo(()=>new URLSearchParams(s.search).get("client_name")??t?.clientId??"Unknown Application",[s.search,t]),f=h.isSignedIn(),a=h.getSignedInUser(),p=o(e=>P(e)),l=o(e=>x(e)),d=o(e=>e.tenantState.fetchState),w=o(z),y=o(D),c=o(L),[v,S]=r.useState(null),[E,_]=r.useState(null);r.useEffect(()=>{document.querySelector("#app-shell-loader")?.remove()},[]),r.useEffect(()=>()=>{n(N())},[n,s.search]),r.useEffect(()=>{i!=null&&console.warn("[OAuthConsent] invalid params:",i)},[i]);const g=r.useRef(!1);r.useEffect(()=>{f&&a!=null&&!g.current&&(d!=="Not-Started"&&d!=="Error"||(g.current=!0,n(R(a.userId,a.zeniSessionId??void 0))))},[f,a,d,n]),r.useEffect(()=>{c!=null&&c!==""&&(window.location.href=c)},[c]);const M=r.useMemo(()=>{if(p?.tenantId!=null)return p.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some(U=>U.tenantId===e)?e:l.length===1?l[0].tenantId:null},[p?.tenantId,l]),u=v??M;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):f?m.jsx(I,{variant:"signed_in",clientName:b,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:S,approveError:E??y,isApproving:w==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&a!=null&&u!=null&&n(k(a.userId,a.zeniSessionId??void 0,u,t.clientId,t.redirectUri,t.codeChallenge,t.codeChallengeMethod,t.state,t.responseType))},onDeny:()=>{if(t!=null)try{const e=new URL(t.redirectUri);e.searchParams.set("error","access_denied"),e.searchParams.set("error_description","The user denied the request"),e.searchParams.set("state",t.state),window.location.href=e.toString()}catch{_("Unable to deny: redirect_uri is not a valid URL. Close this window or contact support.")}}}):m.jsx(A,{to:"/signin/auth",state:{origin:s.pathname+s.search},replace:!0})}export{ee as default};
@@ -0,0 +1 @@
1
+ import{j as n}from"./liveblocks-B2nLBm11.js";import{h as z,u as Q,g as H,i as K,j as d,n as X,o as Z,p as I}from"./core-BDPZcSG4.js";import{eX as v,sc as M,rM as J,MP as O,rH as S,bs as ee,bn as ae,bY as te,rI as se,MQ as oe,MC as C,dK as re,vR as ne,MR as ie,wc as ce,fE as le,fC as de}from"./zeni-epic-state-pQFlpfOQ.js";import{z as me,Y as fe,$ as pe,k as ue,V as U,Q as $,v as he,d as w,ao as ge,r as Fe}from"./index-B1tuor_E.js";import"./mui-HaM5aBuG.js";import be from"./NotFoundScreen-By2F-w6l.js";import{F as Ie}from"./FeaturePreviewScreen-Dgm-EaRp.js";import{a as g}from"./sentry-CLlo3TXi.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-CtdOXC4O.js";import{u as Se}from"./useInitialThreadRequest-DaoYHqyn.js";import{t as Te}from"./routePaths-DbVBNvPC.js";import{M as ye}from"./MobileAppDrawer-ChAhLGZE.js";import"./recharts-srrgu-jp.js";import"./analytics-7PXXxPIN.js";import"./plaid-DuKDxXr2.js";import"./dnd-fU8QmJ8U.js";import"./stripe-DMRn4zHo.js";import"./lottie--jYlW6ya.js";import"./lexical-_D-pPLdL.js";import"./pdf-CbrAe2yy.js";import"./utils-BPOASmy-.js";(function(){try{var s=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},e=new s.Error().stack;e&&(s._sentryDebugIds=s._sentryDebugIds||{},s._sentryDebugIds[e]="15da770d-2e40-4329-8fc5-dfe0db042a11",s._sentryDebugIdIdentifier="sentry-dbid-15da770d-2e40-4329-8fc5-dfe0db042a11")}catch{}})();const T=(s,e,a,o)=>{if(s!=e){const r=o??"";s!=null&&s.length>0?a(`../${e}${r}`,{replace:!0}):a(`${e}${r}`,{replace:!0})}},ke=X(function(s){const e=oe(s),a={},o=e.pandLReportWithForecast.uiState.nodeCollapseState;return Object.keys(o).forEach(r=>{a[r]=o[r]===!1}),{selectedTimeframe:e.selectedTimeframe,isForecastVsActualOn:e.isForecastVsActualOn,compareMode:e.compareMode,forecastList:e.forecastList,selectedForecast:e.selectedForecast,pandLreport:e.pandLReportWithForecast,scrollPosition:e.pandLReportWithForecast.uiState.scrollPosition,nodeOpenStatus:a,type:"name+balances_forecast",analytics:w}},function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(O(a,o)),e.isPandLReportFetched(a)||s(S(a)),T(e.forecastIdFromUrlPath,a,e.navigate)},onTimeframeChanged:a=>{s(ce(a))},onForecastVsActualsCompareToggle:a=>{s(ie(a)),s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:{scrollLeft:0,scrollTop:0}}))},onCompareModeChanged:a=>{s(ne(e.firstMonthOfFY,a,0,[]))},onAccountBalanceClick:e.hasTransactionAccess!==!0?void 0:(a,o)=>{let r,i;const p=a.accountName===""?a.accountDescription:a.accountName;if(o.balanceTimeFrame==="month"||o.balanceTimeFrame==="quarter"?(r=o.balanceTimeFrame,i=re(o)):o.balanceTimeFrame==="year"?(r="quarter",i={startDate:o.endDate.startOf("quarter"),endDate:o.endDate}):console.error(`timeframe ${o.balanceTimeFrame} is not supported`),i!=null&&r!=null){const m=Te(e.tenantEmailDomain,a.accountId,a.accountType,p,r,i),u=Fe(e.location.state?.pathnameStackToGoBack,e.location.pathname);e.navigate(m,{state:{pathnameStackToGoBack:u,referrer:"Forecast"}})}},onNodeCollapseToggled:(a,o)=>{s(C({forecastId:e.forecastIdFromUrlPath,nodeCollapseState:{nodeId:a,isCollapsed:o===!1}}))},onTableScroll:a=>{s(C({forecastId:e.forecastIdFromUrlPath,scrollPosition:a}))},onBackClick:()=>{e.navigate("../../")}}})(ge);function P(){const s=z(),e=Q(),a=H(),{forecastId:o,tenantEmailDomain:r}=K(),[i,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),y=d(t=>v(t)),B=y.company?.companyInfo.firstMonthOfFY??1,c=d(t=>M(t.forecastState,t.forecastListState)),l=d(t=>t.forecastListState.fetchState==="Completed"),k=d(t=>t.profitAndLossState),A=d(t=>t.reportUIOptionsState.selectedForecast),x=t=>k.pandLByForecastID[t]!=null&&se(t,k).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();pe({isDataReady:l});const{isAiCfoAccessEnabled:N,onAskAiCfoClick:W}=Ce({mobileExploreReferrer:"Forecast"});g.useEffect(()=>{if(!i&&F)p(!0),l||e(J());else if(l&&!m){u(!0);const t=((f,L,R)=>L!=null?f.forecasts.findIndex(b=>b.id===L):R!=null?f.forecasts.findIndex(b=>b.id===R):f.forecasts.length>0?0:-1)(c,o,A?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=A?.index?(e(O(c.forecasts[t].id,t)),T(o,c.forecasts[t].id,s,a.search)):o==null&&t!==-1&&T(void 0,c.forecasts[t].id,s,a.search),t!==-1&&!x(c.forecasts[t].id)&&F&&e(S(c.forecasts[t].id))}},[i,p,e,l,c,m,u,M,S,F]);const D=ue(),Y=D?.loggedInUserRole!=null&&ee(D.loggedInUserRole),{useFeatureGate:_}=U(),{isFeatureEnabled:E}=_($.isReportsCommentingEnabled),q=Se(E?y?.companyId:void 0,{clearParams:l&&m}),[G,V]=g.useState(!1),j=t=>{V(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:w,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:G,handleDrawerToggle:j}),n.jsx(ke,{firstMonthOfFY:B,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:x,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:Y,isAiCfoAccessEnabled:N,onAskAiCfoClick:W,isReportsCommentingEnabled:E,isZeniUser:ae(h),initialOpenThreadRequest:q,onClickMenuIcon:()=>{j(!0)}})]})}function Ve(){const s=d(i=>v(i)),{useFeatureGate:e}=U(),{isFeatureEnabled:a}=e($.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(Z,{children:[n.jsx(I,{path:"/",element:n.jsx(P,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(P,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{Ve as PandLWithForecastRoutes,Ve as default};
@@ -0,0 +1,22 @@
1
+ import{j as s}from"./liveblocks-B2nLBm11.js";import{ML as te,eX as q,kx as z,fE as Q,fC as ne,Kd as X,Mp as oe,uO as ke,MM as N,uD as Ie,uY as Ee,uS as ie,uH as re,uW as Pe,uT as je,MN as le,wD as Le,fo as ve,ge as Te,MO as $,uL as ce,uK as de,u$ as Ae,c6 as Oe}from"./zeni-epic-state-pQFlpfOQ.js";import{K as pe,V as J,Q as M,z as G,i as ue,D as me,ak as ge,al as Fe,x as fe,o as O,E as he,a as Ce,am as Re,Y as Ve,$ as Ze,v as Be,d as ye,f as Ue,r as $e,an as Me,k as Ke}from"./index-B1tuor_E.js";import{D as be,n as H,S as Se}from"./mui-HaM5aBuG.js";import ae from"./NotFoundScreen-By2F-w6l.js";import{a as r}from"./sentry-CLlo3TXi.js";import{u as ee,i as _e,j as m,h as ze,g as Ge,n as He,o as se,p as U}from"./core-BDPZcSG4.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-CtdOXC4O.js";import{M as Ye}from"./MobileAppDrawer-ChAhLGZE.js";import"./recharts-srrgu-jp.js";import"./analytics-7PXXxPIN.js";import"./plaid-DuKDxXr2.js";import"./dnd-fU8QmJ8U.js";import"./stripe-DMRn4zHo.js";import"./lottie--jYlW6ya.js";import"./lexical-_D-pPLdL.js";import"./pdf-CbrAe2yy.js";import"./utils-BPOASmy-.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]="e72bddc0-04ce-4a7d-9eb8-7e54df460601",a._sentryDebugIdIdentifier="sentry-dbid-e72bddc0-04ce-4a7d-9eb8-7e54df460601")}catch{}})();const Ne={overlayWidth:new fe(100,100,48)},K=Ce.getLocalizedStrings().peoplePage.invitePage,qe=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isEditPeopleDrawerOpen:o,closeDrawerHandler:y})=>{const f=pe(),u=ee(),[F,R]=r.useState(!1),[k,b]=r.useState(!1),{userId:S}=_e(),c=m(e=>te(e)),d=m(e=>q(e)),I=m(e=>z(e)),{useFeatureGate:D}=J(),{isFeatureEnabled:x}=D(M.isDebitCardFeatureEnabled),E=Q(x,d),L=ne(d),v=X(d),V=oe(d),Z=!!d.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,w=!E&&I&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(G.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const h=()=>{u(N()),y()},T=()=>{F===!0?b(!0):h()},B=l.companyView?.controllers?.map(e=>e.user),p=!!d.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:P}=D(M.isChargeCardFeatureEnabled),j=ue(d,P,x),A=d.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",C={peopleDetails:c,classList:n.classes,managersList:t.users,controllersList:B,mode:g,isZeniTenant:v,isAccountingClassesEnabled:I,isReimbursementDisabled:Z===!1,isZeniAccountsDisabled:p===!1,isChargeCardDisabled:j===!1,isTreasuryDisabled:A===!1,isLiteRoleDisabled:V===!1,isBankingOnlyTenant:E,isCardsOnlyTenant:L,onResetClick:h,onDeleteUser:e=>{u(re(e.userId,e.userRole.userRoleId))},onPeopleLocalDataUpdated:e=>{u(ie({peopleLocalData:e})),R(!0)},onSaveClick:()=>{u(g==="zeni_only"?Ie(a):Ee(v))},onCloseClick:T,isLoading:w||c.person==null},i={onOkClick:()=>{b(!1),h()},onCancelClick:()=>{b(!1)}};return r.useEffect(()=>{w===!1&&S!=null&&u(ke(S))},[w,S]),r.useEffect(()=>{c.updatePersonState.fetchState==="Completed"&&h()},[c.updatePersonState.fetchState]),s.jsx(be,{anchor:"right",open:o,PaperProps:{style:{width:Ne.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:T,children:s.jsxs(Qe,{onClick:e=>e.stopPropagation(),children:[k===!0?s.jsx(ge,{titleComponent:s.jsx(we,{children:K.discardTitle}),descriptionComponent:s.jsx(De,{children:K.discardDescription}),primaryButtonText:K.discard,secondaryButtonText:K.no,action:i,isEditPopup:!0}):null,s.jsx(Fe,{...C})]})})},Qe=H(Se)`
2
+ display: flex;
3
+ min-height: 100%;
4
+ flex-direction: column;
5
+ `,we=H(he.H6Regular)`
6
+ margin-top: ${O.sp7};
7
+ padding-left: ${O.sp8};
8
+ padding-right: ${O.sp8};
9
+ color: ${a=>a.theme.colors.primary};
10
+ word-break: break-word;
11
+ `,De=H(he.LargeRegularSp)`
12
+ color: ${a=>a.theme.colors.hero};
13
+ padding-left: ${O.sp8};
14
+ padding-right: ${O.sp8};
15
+ margin-bottom: 30px;
16
+ margin-top: ${O.sp4};
17
+ white-space: pre-line;
18
+ `,Xe={overlayWidth:new fe(100,100,48)},_=Ce.getLocalizedStrings().peoplePage.invitePage,Je=({companyId:a,managersListView:t,companyPassportView:l,classListView:n,mode:g,isInvitePeopleDrawerOpen:o,closeDrawerHandler:y})=>{const f=pe(),u=ee(),[F,R]=r.useState(!1),[k,b]=r.useState(!1),S=m(i=>te(i)),c=m(i=>q(i)),d=m(i=>z(i)),{useFeatureGate:I}=J(),{isFeatureEnabled:D}=I(M.isDebitCardFeatureEnabled),x=Q(D,c),E=ne(c),L=X(c),v=oe(c),V=!!c.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,Z=!x&&d&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||l.fetchState!=="Completed"||a==null;if(G.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const w=()=>{y(),u(N())},h=()=>{F===!0?b(!0):w()},T={onOkClick:()=>{b(!1),w()},onCancelClick:()=>{b(!1)}},B=l.companyView?.controllers.map(i=>i.user),p=!!c.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:P}=I(M.isChargeCardFeatureEnabled),j=ue(c,P,D),A=c.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",C={classList:n.classes,managersList:t.users,controllersList:B,mode:g,isZeniTenant:L,onPeopleLocalDataUpdated:i=>{u(ie({peopleLocalData:i})),R(!0)},onResetClick:w,onSaveClick:()=>{u(g==="zeni_only"?Pe(a):je())},onCloseClick:h,peopleDetails:S,isAccountingClassesEnabled:d,isReimbursementDisabled:V===!1,isLiteRoleDisabled:v===!1,isZeniAccountsDisabled:p===!1,isChargeCardDisabled:j===!1,isTreasuryDisabled:A===!1,isBankingOnlyTenant:x,isCardsOnlyTenant:E,isLoading:Z};return r.useEffect(()=>{S.invitePersonState.fetchState==="Completed"&&(y(),u(N()))},[S.invitePersonState.fetchState]),s.jsx(be,{anchor:"right",open:o,PaperProps:{style:{width:Xe.overlayWidth.valuePercentage(f),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:me.overlayDark,cursor:"pointer"}}},onClose:h,children:s.jsxs(ea,{onClick:i=>i.stopPropagation(),children:[k===!0?s.jsx(ge,{titleComponent:s.jsx(we,{children:_.discardTitle}),descriptionComponent:s.jsx(De,{children:_.discardDescription}),primaryButtonText:_.discard,secondaryButtonText:_.no,action:T}):null,s.jsx(Re,{...C})]})})},ea=H(Se)`
19
+ display: flex;
20
+ min-height: 100%;
21
+ flex-direction: column;
22
+ `,aa=He(function(a,t){const l=le(a),n=G.getSignedInUser();return{data:l,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:z(a),analytics:ye}},function(a,t){const{navigate:l,companyId:n,shouldFetchClasses:g}=t;return{personAction:{onPersonDelete:(o,y)=>{a(re(o,y))},onResendInvite:o=>{a(Ae(o))},onReloadPeople:()=>{a(ce()),a(de(n,g))},onBackClick:()=>{l("../../")},onModeChange:o=>{a($({mode:o,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:o=>{a($({searchText:o}))}}}})(Me);function Y({isInvitePeopleDrawerOpen:a,isEditPeopleDrawerOpen:t}){const l=ze(),n=ee(),g=Ge(),{areTenantIdsInSync:o}=Ve(),y=G.getSignedInUser(),f=m(e=>q(e)),{useFeatureGate:u}=J(),{isFeatureEnabled:F}=u(M.isDebitCardFeatureEnabled),R=m(e=>z(e)),k=!Q(F,f)&&R,b=X(f),S=f?.tenantId,{tenantEmailDomain:c}=f,[d,I]=r.useState(!1),[D,x]=r.useState(!1),[E,L]=r.useState(!1),[v,V]=r.useState("off"),[Z,w]=r.useState(!1),h=e=>{w(e)},{isAiCfoAccessEnabled:T,onAskAiCfoClick:B}=We({mobileExploreReferrer:"People"}),p=m(e=>le(e));Ze({isDataReady:p.fetchState==="Completed"});const P=m(e=>Le(e.classState,e.classListState)),j=m(e=>ve(e.userState,e.userRoleState,e.userListViewState,"manager")),A=m(e=>Te(e)),C=f?.companyId;r.useEffect(()=>{d&&v===p.uiState.mode||!o||(n($({searchText:"",sortKey:"name",sortOrder:"ascending"})),V(p.uiState.mode),I(!0),n(ce()))},[d,y,S,n,p.uiState.mode,o]),r.useEffect(()=>{C!=null&&o&&n(de(C,k))},[C,k,o]),r.useEffect(()=>{x(a!=null&&a===!0),L(t!=null&&t===!0&&t)},[a,t]),r.useEffect(()=>{n($({searchText:"",sortKey:"name",sortOrder:"ascending"}))},[]);const i=()=>{x(!1),L(!1),l("../")};return s.jsxs(s.Fragment,{children:[p.fetchState==="Completed"?s.jsx(Be,{analytics:ye,onLoad:e=>e.trackPageLoaded(Ue.Event.members)}):null,D===!0?s.jsx(Je,{closeDrawerHandler:i,isInvitePeopleDrawerOpen:D,managersListView:j,companyPassportView:A,classListView:P,companyId:C,mode:p.uiState.mode}):null,E===!0?s.jsx(qe,{closeDrawerHandler:i,isEditPeopleDrawerOpen:E,managersListView:j,companyPassportView:A,classListView:P,companyId:C,mode:p.uiState.mode}):null,s.jsx(Ye,{isAppContentDrawerOpen:Z,handleDrawerToggle:h}),s.jsx(aa,{navigate:l,signedInUser:y,isZeni:f.isZeni,isZeniTenant:b,peopleUIState:p.uiState,companyId:C,shouldFetchClasses:k,classList:P,managersView:j,peopleView:p,onInvitePeopleClick:()=>{l("./new")},onColumnSortConfigChanged:(e,W)=>{n($({sortKey:e,sortOrder:W}))},onRowClick:e=>{const W=`/${c}/people/${encodeURIComponent(e)}/edit`,xe=$e(g.state?.pathnameStackToGoBack,g.pathname);l(W,{state:{pathnameStackToGoBack:xe}})},onClickMenuIcon:()=>{h(!0)},isAiCfoAccessEnabled:T,onAskAiCfoClick:B})]})}function Sa(){const a=Ke();return Oe(a?.loggedInUserRole??[])?s.jsxs(se,{children:[s.jsx(U,{path:"/",element:s.jsx(Y,{})}),s.jsx(U,{path:"new",element:s.jsx(Y,{isInvitePeopleDrawerOpen:!0})}),s.jsx(U,{path:":userId/edit",element:s.jsx(Y,{isEditPeopleDrawerOpen:!0})}),s.jsx(U,{path:"*",element:s.jsx(ae,{})})]}):s.jsx(se,{children:s.jsx(U,{path:"*",element:s.jsx(ae,{})})})}export{Sa as default};
@@ -0,0 +1 @@
1
+ import{j as s}from"./liveblocks-B2nLBm11.js";import E from"./NotFoundScreen-By2F-w6l.js";import{a as r}from"./sentry-CLlo3TXi.js";import{h as _,g as v,j as p,i as M,u as U,N as z,n as P,o as O,p as h}from"./core-BDPZcSG4.js";import{eX as B,S_ as b,bq as F,bn as N,ie as V,fz as $}from"./zeni-epic-state-pQFlpfOQ.js";import{T as q,z as I,$ as X,cY as Y}from"./index-B1tuor_E.js";import"./mui-HaM5aBuG.js";import{u as G}from"./useAskAiCfoHostNavButtonProps-CtdOXC4O.js";import{M as H}from"./MobileAppDrawer-ChAhLGZE.js";import"./recharts-srrgu-jp.js";import"./analytics-7PXXxPIN.js";import"./plaid-DuKDxXr2.js";import"./dnd-fU8QmJ8U.js";import"./stripe-DMRn4zHo.js";import"./lottie--jYlW6ya.js";import"./lexical-_D-pPLdL.js";import"./pdf-CbrAe2yy.js";import"./utils-BPOASmy-.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]="b80a0df7-e0a0-4dae-a2ed-67770246cc70",e._sentryDebugIdIdentifier="sentry-dbid-b80a0df7-e0a0-4dae-a2ed-67770246cc70")}catch{}})();const J=P(function(e){const t=I.getSignedInUser(),c=e.tenantState.currentTenantId,o={userId:t?.userId??"",sessionId:t?.zeniSessionId??"",tenantId:c??""},{aggregatedReportViewState:n}=b(e);return{authParams:o,isDisabled:!1,loggedInUser:t,aggregatedReport:n}},function(e,t){return{onBackClick:()=>{t.navigate("../../")},onClickMenuIcon:()=>{t.handleDrawerToggle(!0)}}})(Y),K=()=>{const e=_(),t=v(),c=q(),o=p(a=>B(a)),{aggregatedReportViewState:n}=p(a=>b(a)),{tenantEmailDomain:f}=M(),u=U(),l=I.getSignedInUser();if(l==null)throw new Error("Can't access this page without signing in...");const m=r.useRef(!1),[S,w]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),y=C||k||x,d=r.useCallback((a,i,A)=>{u(V({fromMonth:a,toMonth:i,cacheOverride:A}))},[]);r.useEffect(()=>{n?.fetchState==="Completed"&&m.current&&(u($({messageSection:"data_refresh_update",messageText:"success",type:"success",showStatusIcon:!0})),m.current=!1)},[n?.fetchState]);const D=r.useCallback((a,i)=>{n!=null&&n?.fetchState==="In-Progress"||d(a,i,!0),m.current=!0},[n?.fetchState,d]),j=r.useCallback((a,i)=>{d(a,i,!1)},[d]),g=a=>{w(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:T}=G({mobileExploreReferrer:"Performance"});return X({isDataReady:n?.fetchState==="Completed"}),y?s.jsxs(s.Fragment,{children:[s.jsx(H,{isAppContentDrawerOpen:S,handleDrawerToggle:g}),s.jsx(J,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:f,onReload:D,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:T})]}):s.jsx(z,{to:`/${f}/dashboard`,replace:!0})};function ge(){return s.jsxs(O,{children:[s.jsx(h,{path:"*",element:s.jsx(K,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
@@ -1 +1 @@
1
- import{a as h,b as t}from"./sentry-C1EYnYRT.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new r.Error().stack;a&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[a]="a301a95b-8420-43bd-aa56-5738077199ba",r._sentryDebugIdIdentifier="sentry-dbid-a301a95b-8420-43bd-aa56-5738077199ba")}catch{}})();const c="64px",b={};var k=({src:r,light:a,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:u})=>{const[p,i]=h.useState(null);h.useEffect(()=>{r&&a&&n&&v({src:r,light:a,oEmbedUrl:n})},[r,a,n]);const v=async({src:e,light:d,oEmbedUrl:I})=>{if(t.isValidElement(d))return;if(typeof d=="string")return void i(d);if(b[e])return void i(b[e]);i(null);const E=await fetch(I.replace("{url}",e)),g=await E.json();if(g.thumbnail_url){const f=g.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(f),b[e]=f}},o=t.isValidElement(a),y={display:"flex",alignItems:"center",justifyContent:"center"},s={preview:{width:"100%",height:"100%",backgroundImage:p&&!o?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:o?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=t.createElement("div",{style:s.shadow,className:"react-player__shadow"},t.createElement("div",{style:s.playIcon,className:"react-player__play-icon"}));return t.createElement("div",{style:s.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...u?{"aria-label":u}:{}},o?a:null,w||_)};export{k as default};
1
+ import{a as h,b as t}from"./sentry-CLlo3TXi.js";(function(){try{var r=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new r.Error().stack;a&&(r._sentryDebugIds=r._sentryDebugIds||{},r._sentryDebugIds[a]="a301a95b-8420-43bd-aa56-5738077199ba",r._sentryDebugIdIdentifier="sentry-dbid-a301a95b-8420-43bd-aa56-5738077199ba")}catch{}})();const c="64px",b={};var k=({src:r,light:a,oEmbedUrl:n,onClickPreview:l,playIcon:w,previewTabIndex:m,previewAriaLabel:u})=>{const[p,i]=h.useState(null);h.useEffect(()=>{r&&a&&n&&v({src:r,light:a,oEmbedUrl:n})},[r,a,n]);const v=async({src:e,light:d,oEmbedUrl:I})=>{if(t.isValidElement(d))return;if(typeof d=="string")return void i(d);if(b[e])return void i(b[e]);i(null);const E=await fetch(I.replace("{url}",e)),g=await E.json();if(g.thumbnail_url){const f=g.thumbnail_url.replace("height=100","height=480").replace("-d_295x166","-d_640");i(f),b[e]=f}},o=t.isValidElement(a),y={display:"flex",alignItems:"center",justifyContent:"center"},s={preview:{width:"100%",height:"100%",backgroundImage:p&&!o?`url(${p})`:void 0,backgroundSize:"cover",backgroundPosition:"center",cursor:"pointer",...y},shadow:{background:"radial-gradient(rgb(0, 0, 0, 0.3), rgba(0, 0, 0, 0) 60%)",borderRadius:c,width:c,height:c,position:o?"absolute":void 0,...y},playIcon:{borderStyle:"solid",borderWidth:"16px 0 16px 26px",borderColor:"transparent transparent transparent white",marginLeft:"7px"}},_=t.createElement("div",{style:s.shadow,className:"react-player__shadow"},t.createElement("div",{style:s.playIcon,className:"react-player__play-icon"}));return t.createElement("div",{style:s.preview,className:"react-player__preview",tabIndex:m,onClick:e=>{l?.(e)},onKeyDown:e=>{e.key!=="Enter"&&e.key!==" "||l==null||l(e)},...u?{"aria-label":u}:{}},o?a:null,w||_)};export{k as default};
@@ -1,4 +1,4 @@
1
- import{j as Ol}from"./liveblocks-BxEyo0kz.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-C1EYnYRT.js";import{L as dt,bY as Tc,eX as Ac,LV as Rc,Mn as kl,c6 as Tl,g0 as Al,g1 as Rl}from"./zeni-epic-state-BI6-8w2O.js";import{a as lt,b as Il,c as Pl,d as Nl,e as an,f as Ll,g as $l,h as Ml,i as Vt,j as Ic,k as oe,l as je,m as Cl,o as Yt,p as ue,q as Dl}from"./utils-B0dgdNkv.js";import{r as un}from"./empty-CEKgz2fB.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-B3Lczh5w.js";import{r as Gl}from"./index-AbnUeQou.js";import{r as zl}from"./index-EsLbYfGC.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-NoaByI8l.js";import{u as Kl,z as Pc,L as Wl,M as Jl,N as Xl,n as Ql,f as tf}from"./index-BFyN1ofW.js";import"./mui-C_Ua4fCS.js";import{d as Pe}from"./decodeURIComponentSafe-D4oN1pCl.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new t.Error().stack;f&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[f]="ff56c92d-bee1-483e-ba3a-a0bd87642a63",t._sentryDebugIdIdentifier="sentry-dbid-ff56c92d-bee1-483e-ba3a-a0bd87642a63")}catch{}})();var _n,Sn={exports:{}},On,jn,xn,kn,Tn,An,Rn,In,Pn,Ne,Nn,Ln,$n,Mn,Cn,Dn,Fn,Bn,Un,qn,Gn,Le,zn,Zn,Hn,Vn,Yn,Kn,Wn,$e,Jn,Xn,Qn,to,eo,ro,no,Me={exports:{}},Ce={exports:{}},De={};function Nc(){if(On)return De;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function f(r,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},f(r,e)}function m(r){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var a,p=s(r);if(e){var h=s(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return function(d,b){if(b&&(t(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}(d)}(this,a)}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(r)}On=1;var l,o,n={};function i(r,e,a){a||(a=Error);var p=function(h){(function(c,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(y&&y.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),y&&f(c,y)})(g,h);var d,b=m(g);function g(c,y,v){var S;return function(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")}(this,g),S=b.call(this,function(w,_,M){return typeof e=="string"?e:e(w,_,M)}(c,y,v)),S.code=r,S}return d=g,Object.defineProperty(d,"prototype",{writable:!1}),d}(a);n[r]=p}function u(r,e){if(Array.isArray(r)){var a=r.length;return r=r.map(function(p){return String(p)}),a>2?"one of ".concat(e," ").concat(r.slice(0,a-1).join(", "),", or ")+r[a-1]:a===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}return i("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),i("ERR_INVALID_ARG_TYPE",function(r,e,a){var p,h,d;if(l===void 0&&(l=ie()),l(typeof r=="string","'name' must be a string"),typeof e=="string"&&(h="not ",e.substr(0,h.length)===h)?(p="must not be",e=e.replace(/^not /,"")):p="must be",function(g,c,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-c.length,y)===c}(r," argument"))d="The ".concat(r," ").concat(p," ").concat(u(e,"type"));else{var b=function(g,c,y){return typeof y!="number"&&(y=0),!(y+c.length>g.length)&&g.indexOf(c,y)!==-1}(r,".")?"property":"argument";d='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(u(e,"type"))}return d+=". Received type ".concat(t(a))},TypeError),i("ERR_INVALID_ARG_VALUE",function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";o===void 0&&(o=lt());var p=o.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)},TypeError),i("ERR_INVALID_RETURN_VALUE",function(r,e,a){var p;return p=a&&a.constructor&&a.constructor.name?"instance of ".concat(a.constructor.name):"type ".concat(t(a)),"Expected ".concat(r,' to be returned from the "').concat(e,'"')+" function but got ".concat(p,".")},TypeError),i("ERR_MISSING_ARGS",function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];l===void 0&&(l=ie()),l(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map(function(d){return'"'.concat(d,'"')}),h){case 1:p+="".concat(e[0]," argument");break;case 2:p+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:p+=e.slice(0,h-1).join(", "),p+=", and ".concat(e[h-1]," arguments")}return"".concat(p," must be specified")},TypeError),De.codes=n,De}function ef(){if(xn)return jn;function t(k,E){var j=Object.keys(k);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(k);E&&(x=x.filter(function(O){return Object.getOwnPropertyDescriptor(k,O).enumerable})),j.push.apply(j,x)}return j}function f(k){for(var E=1;E<arguments.length;E++){var j=arguments[E]!=null?arguments[E]:{};E%2?t(Object(j),!0).forEach(function(x){m(k,x,j[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(j)):t(Object(j)).forEach(function(x){Object.defineProperty(k,x,Object.getOwnPropertyDescriptor(j,x))})}return k}function m(k,E,j){return(E=l(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function s(k,E,j){return E&&function(x,O){for(var $=0;$<O.length;$++){var N=O[$];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,l(N.key),N)}}(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function l(k){var E=function(j,x){if(p(j)!=="object"||j===null)return j;var O=j[Symbol.toPrimitive];if(O!==void 0){var $=O.call(j,x);if(p($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(j)}(k,"string");return p(E)==="symbol"?E:String(E)}function o(k,E){if(E&&(p(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(k)}function n(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function i(k){var E=typeof Map=="function"?new Map:void 0;return i=function(j){if(j===null||(x=j,Function.toString.call(x).indexOf("[native code]")===-1))return j;var x;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(j))return E.get(j);E.set(j,O)}function O(){return u(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},i(k)}function u(k,E,j){return u=r()?Reflect.construct.bind():function(x,O,$){var N=[null];N.push.apply(N,O);var P=new(Function.bind.apply(x,N));return $&&e(P,$.prototype),P},u.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function e(k,E){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,x){return j.__proto__=x,j},e(k,E)}function a(k){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},a(k)}function p(k){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},p(k)}xn=1;var h=lt().inspect,d=Nc().codes.ERR_INVALID_ARG_TYPE;function b(k,E,j){return(j===void 0||j>k.length)&&(j=k.length),k.substring(j-E.length,j)===E}var g="",c="",y="",v="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(k){var E=Object.keys(k),j=Object.create(Object.getPrototypeOf(k));return E.forEach(function(x){j[x]=k[x]}),Object.defineProperty(j,"message",{value:k.message}),j}function _(k){return h(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(k,E,j){var x="",O="",$=0,N="",P=!1,G=_(k),A=G.split(`
1
+ import{j as Ol}from"./liveblocks-B2nLBm11.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-CLlo3TXi.js";import{L as dt,bY as Tc,eX as Ac,LV as Rc,Mn as kl,c6 as Tl,g0 as Al,g1 as Rl}from"./zeni-epic-state-pQFlpfOQ.js";import{a as lt,b as Il,c as Pl,d as Nl,e as an,f as Ll,g as $l,h as Ml,i as Vt,j as Ic,k as oe,l as je,m as Cl,o as Yt,p as ue,q as Dl}from"./utils-BPOASmy-.js";import{r as un}from"./empty-CM59KsLF.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-CHfVanCJ.js";import{r as Gl}from"./index-CAEfbAkM.js";import{r as zl}from"./index-DNm9oOTV.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-BDPZcSG4.js";import{u as Kl,z as Pc,L as Wl,I as Jl,J as Xl,m as Ql,d as tf}from"./index-B1tuor_E.js";import"./mui-HaM5aBuG.js";import{d as Pe}from"./decodeURIComponentSafe-BR3AOxh5.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},f=new t.Error().stack;f&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[f]="d27987e9-a093-4f51-a63a-4a1cde18da6e",t._sentryDebugIdIdentifier="sentry-dbid-d27987e9-a093-4f51-a63a-4a1cde18da6e")}catch{}})();var _n,Sn={exports:{}},On,jn,xn,kn,Tn,An,Rn,In,Pn,Ne,Nn,Ln,$n,Mn,Cn,Dn,Fn,Bn,Un,qn,Gn,Le,zn,Zn,Hn,Vn,Yn,Kn,Wn,$e,Jn,Xn,Qn,to,eo,ro,no,Me={exports:{}},Ce={exports:{}},De={};function Nc(){if(On)return De;function t(r){return t=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(e){return typeof e}:function(e){return e&&typeof Symbol=="function"&&e.constructor===Symbol&&e!==Symbol.prototype?"symbol":typeof e},t(r)}function f(r,e){return f=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(a,p){return a.__proto__=p,a},f(r,e)}function m(r){var e=function(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}();return function(){var a,p=s(r);if(e){var h=s(this).constructor;a=Reflect.construct(p,arguments,h)}else a=p.apply(this,arguments);return function(d,b){if(b&&(t(b)==="object"||typeof b=="function"))return b;if(b!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return function(g){if(g===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return g}(d)}(this,a)}}function s(r){return s=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(e){return e.__proto__||Object.getPrototypeOf(e)},s(r)}On=1;var l,o,n={};function i(r,e,a){a||(a=Error);var p=function(h){(function(c,y){if(typeof y!="function"&&y!==null)throw new TypeError("Super expression must either be null or a function");c.prototype=Object.create(y&&y.prototype,{constructor:{value:c,writable:!0,configurable:!0}}),Object.defineProperty(c,"prototype",{writable:!1}),y&&f(c,y)})(g,h);var d,b=m(g);function g(c,y,v){var S;return function(w,_){if(!(w instanceof _))throw new TypeError("Cannot call a class as a function")}(this,g),S=b.call(this,function(w,_,M){return typeof e=="string"?e:e(w,_,M)}(c,y,v)),S.code=r,S}return d=g,Object.defineProperty(d,"prototype",{writable:!1}),d}(a);n[r]=p}function u(r,e){if(Array.isArray(r)){var a=r.length;return r=r.map(function(p){return String(p)}),a>2?"one of ".concat(e," ").concat(r.slice(0,a-1).join(", "),", or ")+r[a-1]:a===2?"one of ".concat(e," ").concat(r[0]," or ").concat(r[1]):"of ".concat(e," ").concat(r[0])}return"of ".concat(e," ").concat(String(r))}return i("ERR_AMBIGUOUS_ARGUMENT",'The "%s" argument is ambiguous. %s',TypeError),i("ERR_INVALID_ARG_TYPE",function(r,e,a){var p,h,d;if(l===void 0&&(l=ie()),l(typeof r=="string","'name' must be a string"),typeof e=="string"&&(h="not ",e.substr(0,h.length)===h)?(p="must not be",e=e.replace(/^not /,"")):p="must be",function(g,c,y){return(y===void 0||y>g.length)&&(y=g.length),g.substring(y-c.length,y)===c}(r," argument"))d="The ".concat(r," ").concat(p," ").concat(u(e,"type"));else{var b=function(g,c,y){return typeof y!="number"&&(y=0),!(y+c.length>g.length)&&g.indexOf(c,y)!==-1}(r,".")?"property":"argument";d='The "'.concat(r,'" ').concat(b," ").concat(p," ").concat(u(e,"type"))}return d+=". Received type ".concat(t(a))},TypeError),i("ERR_INVALID_ARG_VALUE",function(r,e){var a=arguments.length>2&&arguments[2]!==void 0?arguments[2]:"is invalid";o===void 0&&(o=lt());var p=o.inspect(e);return p.length>128&&(p="".concat(p.slice(0,128),"...")),"The argument '".concat(r,"' ").concat(a,". Received ").concat(p)},TypeError),i("ERR_INVALID_RETURN_VALUE",function(r,e,a){var p;return p=a&&a.constructor&&a.constructor.name?"instance of ".concat(a.constructor.name):"type ".concat(t(a)),"Expected ".concat(r,' to be returned from the "').concat(e,'"')+" function but got ".concat(p,".")},TypeError),i("ERR_MISSING_ARGS",function(){for(var r=arguments.length,e=new Array(r),a=0;a<r;a++)e[a]=arguments[a];l===void 0&&(l=ie()),l(e.length>0,"At least one arg needs to be specified");var p="The ",h=e.length;switch(e=e.map(function(d){return'"'.concat(d,'"')}),h){case 1:p+="".concat(e[0]," argument");break;case 2:p+="".concat(e[0]," and ").concat(e[1]," arguments");break;default:p+=e.slice(0,h-1).join(", "),p+=", and ".concat(e[h-1]," arguments")}return"".concat(p," must be specified")},TypeError),De.codes=n,De}function ef(){if(xn)return jn;function t(k,E){var j=Object.keys(k);if(Object.getOwnPropertySymbols){var x=Object.getOwnPropertySymbols(k);E&&(x=x.filter(function(O){return Object.getOwnPropertyDescriptor(k,O).enumerable})),j.push.apply(j,x)}return j}function f(k){for(var E=1;E<arguments.length;E++){var j=arguments[E]!=null?arguments[E]:{};E%2?t(Object(j),!0).forEach(function(x){m(k,x,j[x])}):Object.getOwnPropertyDescriptors?Object.defineProperties(k,Object.getOwnPropertyDescriptors(j)):t(Object(j)).forEach(function(x){Object.defineProperty(k,x,Object.getOwnPropertyDescriptor(j,x))})}return k}function m(k,E,j){return(E=l(E))in k?Object.defineProperty(k,E,{value:j,enumerable:!0,configurable:!0,writable:!0}):k[E]=j,k}function s(k,E,j){return E&&function(x,O){for(var $=0;$<O.length;$++){var N=O[$];N.enumerable=N.enumerable||!1,N.configurable=!0,"value"in N&&(N.writable=!0),Object.defineProperty(x,l(N.key),N)}}(k.prototype,E),Object.defineProperty(k,"prototype",{writable:!1}),k}function l(k){var E=function(j,x){if(p(j)!=="object"||j===null)return j;var O=j[Symbol.toPrimitive];if(O!==void 0){var $=O.call(j,x);if(p($)!=="object")return $;throw new TypeError("@@toPrimitive must return a primitive value.")}return String(j)}(k,"string");return p(E)==="symbol"?E:String(E)}function o(k,E){if(E&&(p(E)==="object"||typeof E=="function"))return E;if(E!==void 0)throw new TypeError("Derived constructors may only return object or undefined");return n(k)}function n(k){if(k===void 0)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return k}function i(k){var E=typeof Map=="function"?new Map:void 0;return i=function(j){if(j===null||(x=j,Function.toString.call(x).indexOf("[native code]")===-1))return j;var x;if(typeof j!="function")throw new TypeError("Super expression must either be null or a function");if(E!==void 0){if(E.has(j))return E.get(j);E.set(j,O)}function O(){return u(j,arguments,a(this).constructor)}return O.prototype=Object.create(j.prototype,{constructor:{value:O,enumerable:!1,writable:!0,configurable:!0}}),e(O,j)},i(k)}function u(k,E,j){return u=r()?Reflect.construct.bind():function(x,O,$){var N=[null];N.push.apply(N,O);var P=new(Function.bind.apply(x,N));return $&&e(P,$.prototype),P},u.apply(null,arguments)}function r(){if(typeof Reflect>"u"||!Reflect.construct||Reflect.construct.sham)return!1;if(typeof Proxy=="function")return!0;try{return Boolean.prototype.valueOf.call(Reflect.construct(Boolean,[],function(){})),!0}catch{return!1}}function e(k,E){return e=Object.setPrototypeOf?Object.setPrototypeOf.bind():function(j,x){return j.__proto__=x,j},e(k,E)}function a(k){return a=Object.setPrototypeOf?Object.getPrototypeOf.bind():function(E){return E.__proto__||Object.getPrototypeOf(E)},a(k)}function p(k){return p=typeof Symbol=="function"&&typeof Symbol.iterator=="symbol"?function(E){return typeof E}:function(E){return E&&typeof Symbol=="function"&&E.constructor===Symbol&&E!==Symbol.prototype?"symbol":typeof E},p(k)}xn=1;var h=lt().inspect,d=Nc().codes.ERR_INVALID_ARG_TYPE;function b(k,E,j){return(j===void 0||j>k.length)&&(j=k.length),k.substring(j-E.length,j)===E}var g="",c="",y="",v="",S={deepStrictEqual:"Expected values to be strictly deep-equal:",strictEqual:"Expected values to be strictly equal:",strictEqualObject:'Expected "actual" to be reference-equal to "expected":',deepEqual:"Expected values to be loosely deep-equal:",equal:"Expected values to be loosely equal:",notDeepStrictEqual:'Expected "actual" not to be strictly deep-equal to:',notStrictEqual:'Expected "actual" to be strictly unequal to:',notStrictEqualObject:'Expected "actual" not to be reference-equal to "expected":',notDeepEqual:'Expected "actual" not to be loosely deep-equal to:',notEqual:'Expected "actual" to be loosely unequal to:',notIdentical:"Values identical but not reference-equal:"};function w(k){var E=Object.keys(k),j=Object.create(Object.getPrototypeOf(k));return E.forEach(function(x){j[x]=k[x]}),Object.defineProperty(j,"message",{value:k.message}),j}function _(k){return h(k,{compact:!1,customInspect:!1,depth:1e3,maxArrayLength:1/0,showHidden:!1,breakLength:1/0,showProxy:!1,sorted:!0,getters:!0})}function M(k,E,j){var x="",O="",$=0,N="",P=!1,G=_(k),A=G.split(`
2
2
  `),I=_(E).split(`
3
3
  `),R=0,B="";if(j==="strictEqual"&&p(k)==="object"&&p(E)==="object"&&k!==null&&E!==null&&(j="strictEqualObject"),A.length===1&&I.length===1&&A[0]!==I[0]){var V=A[0].length+I[0].length;if(V<=10){if(!(p(k)==="object"&&k!==null||p(E)==="object"&&E!==null||k===0&&E===0))return"".concat(S[j],`
4
4
 
@@ -0,0 +1,5 @@
1
+ import{j as s}from"./liveblocks-B2nLBm11.js";import{a as o}from"./sentry-CLlo3TXi.js";import{j as f,h as L,u as V,g as F,n as N}from"./core-BDPZcSG4.js";import{y as W,K as _,z as P,bf as $,x as K,Y as M,$ as U,v as z,d as l,f as X,a8 as Y,bg as q}from"./index-B1tuor_E.js";import{fI as G,eX as J,Pm as R,Pn as Q,vH as Z,vx as g,fK as ee,bS as ae,vC as re,Po as ne}from"./zeni-epic-state-pQFlpfOQ.js";import{D as te,e as se,n as oe,S as ie}from"./mui-HaM5aBuG.js";import{u as le}from"./useAskAiCfoHostNavButtonProps-CtdOXC4O.js";import{M as ce}from"./MobileAppDrawer-ChAhLGZE.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]="c61048ca-6456-42d2-9b4c-bd88c7580a25",e._sentryDebugIdIdentifier="sentry-dbid-c61048ca-6456-42d2-9b4c-bd88c7580a25")}catch{}})();const de={overlayWidth:new K(100,100,30)},fe=({isReferralDrawerOpen:e,closeDrawerHandler:a})=>{const r=W(),n=_();if(P.getSignedInUser()==null)throw Error("Can't access How Referral works without signing in...");const i=()=>{a(!0)},u=f(c=>G(c));return s.jsx(te,{anchor:"right",open:e,PaperProps:{style:{width:de.overlayWidth.valuePercentage(n),boxShadow:"none"}},slotProps:{backdrop:{style:{opacity:.75,backgroundColor:r.colors.black,cursor:"pointer"}}},onClose:()=>i(),children:s.jsx(se,{in:e,direction:"left",children:s.jsx(ue,{onClick:c=>c.stopPropagation(),children:s.jsx($,{onDismissClick:i,rewardsPlan:u.rewardsPlan})})})})},ue=oe(ie)`
2
+ display: flex;
3
+ min-height: 100%;
4
+ flex-direction: column;
5
+ `,I="refer-and-earn-status-update",we=N(function(e){const a=R(e),r=e.referralViewState.rewardsPlanFetchState,n=ae([a,r]);return{inviteList:a.invitations,uiState:a.uiState,pendingBonus:a.pendingBonus,earnedBonus:a.earnedBonus,pendingReferrals:a.pendingReferrals,fetchState:n.fetchState,rewardsPlan:a.rewardsPlan}},function(e,a){const{navigate:r}=a;return{onColumnSortConfigChanged:(n,i)=>{e(ne({sortOrder:i,sortkey:n}))},onInviteClick:()=>{l.trackRewardsPageClicked("invite via email"),r("../refer")},onHowItWorksClick:()=>{l.trackRewardsPageClicked("know more"),r("../how-it-works")},onResendInviteClick:n=>{l.trackRewardsPageClicked("resend invite"),e(re(n))},onBackClick:()=>{r("../",{relative:"path"})},onReloadInvitees:()=>{e(g(!0))},onCopyReferralLink:()=>{l.trackRewardsPageClicked("copy referral link")},onClickRefer:()=>{l.trackRewardsPageClicked("refer")},onEventReceived:n=>{n===I&&e(g(!0,!0))}}})(Y(q));function ye({isReferralDrawerOpen:e}){const a=L(),r=V(),n=F(),[i,u]=o.useState(!1),[c,x]=o.useState(!1),[D,E]=o.useState(!1),[k,C]=o.useState(!1),w=P.getSignedInUser(),h=f(t=>J(t)),v=f(t=>R(t)),m=v.fetchState,p=f(t=>t.referralViewState.rewardsPlanFetchState),b=Q([v,p]),{areTenantIdsInSync:d}=M();o.useEffect(()=>{h?.rewardsLastViewedTime==null&&D===!1&&(r(Z()),E(!0))},[]),o.useEffect(()=>{!i&&m==="Not-Started"&&d&&(u(!0),r(g(!0)))},[m,r,d]),o.useEffect(()=>{!c&&p.fetchState==="Not-Started"&&d&&(x(!0),r(ee(!0)))},[p,r,d]),o.useEffect(()=>{C(e!=null&&e===!0)},[e]);const[j,A]=o.useState(!1),y=t=>{A(t)},{isAiCfoAccessEnabled:B,onAskAiCfoClick:O}=le({mobileExploreReferrer:"Rewards"});U({isDataReady:b===!0});const T={events:w?.userId!=null?[`private-encrypted-${w.userId}.${I}`]:[],eventCallback:(t,S,H)=>{H.onEventReceived(t)}};return s.jsxs(s.Fragment,{children:[b===!0?s.jsx(z,{analytics:l,onLoad:t=>(S=>{w!=null&&S.trackPageLoaded(X.Event.rewardsPageViewed)})(t)}):null,s.jsx(ce,{isAppContentDrawerOpen:j,handleDrawerToggle:y}),k===!0?s.jsx(fe,{closeDrawerHandler:()=>{C(!1),a("..")},isReferralDrawerOpen:k}):null,s.jsx(we,{location:n,navigate:a,currentTenant:h,onClickMenuIcon:()=>{y(!0)},isAiCfoAccessEnabled:B,onAskAiCfoClick:O,...T})]})}export{ye as R};
@@ -1 +1 @@
1
- import{j as r}from"./liveblocks-BxEyo0kz.js";import F from"./NotFoundScreen-0I7QDvAA.js";import{a as p}from"./sentry-C1EYnYRT.js";import{h as A,g as x,u as C,j as u,N as D,n as k,o as O,p as b}from"./core-NoaByI8l.js";import{eX as I,Qg as g,Qw as S,FC as V,EL as U,FB as d,Fs as B,QJ as L,FE as W}from"./zeni-epic-state-BI6-8w2O.js";import{z as N,a8 as $,b_ as Q,af as T,bD as z,b$ as J}from"./index-BFyN1ofW.js";import"./mui-C_Ua4fCS.js";import{u as K,R as E}from"./ReimbursementApprovalRuleDetailScreen-4j6TLc0b.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="6aa0be7e-cb53-494f-8da1-1ec8b926266e",e._sentryDebugIdIdentifier="sentry-dbid-6aa0be7e-cb53-494f-8da1-1ec8b926266e")}catch{}})();const y="reimbursement-approval-rule-update",X=k(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(y)&&e(L(!1))},onBackClick:()=>{T(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!1))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))}}})($(Q)),q=({isLoading:e})=>{const o=A(),s=x(),n=C(),[t,i]=p.useState(!1),[m,w]=p.useState(!1),f=u(a=>a.remiSetupApproverViewState.fetchState),l=u(a=>I(a)),c=u(a=>g(a)),v=u(a=>S(a).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{v?.updateStatus.fetchState==="Completed"&&n(V())},[v]),p.useEffect(()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!1)))},[t,f,e,n]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(w(!0),n(d())),o("./new"))},[m,c,n]);const R={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${y}`]:[],eventCallback:(a,_,h)=>{a.endsWith(y)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(X,{currentTenant:l,location:s,navigate:o,...R})},j="reimbursement-approval-rule-update",G=k(function(e){const o=g(e),s=S(e).remiSetupApproverViewUpdateData,n={};for(const i of Object.values(e.vendorState.vendorByID))i?.id!=null&&(n[i.id]=i.name);const t={};for(const i of Object.values(e.classState.classesByKey))i?.classId!=null&&(t[i.classId]=i.className);return{approvalView:o,remiSetupApproverViewUpdateData:s,vendorNamesById:n,departmentNamesById:t}},function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e(L(!1))},onBackClick:()=>{T(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!0))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))},onReorderRules:t=>{e(W(t,!0))}}})($(J)),H=()=>{const e=u(n=>I(n)),{isApprovalRulesV3Enabled:o,isLoading:s}=z(e?.tenantId);return o?r.jsx(M,{isLoading:s}):r.jsx(q,{isLoading:s})},M=({isLoading:e})=>{const o=A(),s=x(),n=C(),[t,i]=p.useState(!1),[m,w]=p.useState(!1),f=u(a=>a.remiSetupApproverViewState.fetchState),l=u(a=>I(a)),c=u(a=>g(a));K();const v=u(a=>S(a).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{v?.updateStatus.fetchState==="Completed"&&n(V())},[v]),p.useEffect(()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!0)))},[t,f,e,n]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(w(!0),n(d())),o("./new"))},[m,c,n]);const R={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${j}`]:[],eventCallback:(a,_,h)=>{a.endsWith(j)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(G,{currentTenant:l,location:s,navigate:o,isLoading:e,...R})};function oe(){return r.jsxs(O,{children:[r.jsx(b,{path:"/",element:r.jsx(H,{})}),r.jsx(b,{path:"/new",element:r.jsx(E,{})}),r.jsx(b,{path:"/:approvalRuleId/edit",element:r.jsx(E,{})}),r.jsx(b,{path:"*",element:r.jsx(F,{})})]})}export{oe as R};
1
+ import{j as r}from"./liveblocks-B2nLBm11.js";import F from"./NotFoundScreen-By2F-w6l.js";import{a as p}from"./sentry-CLlo3TXi.js";import{h as A,g as x,u as C,j as u,N as D,n as k,o as O,p as b}from"./core-BDPZcSG4.js";import{eX as I,Qg as g,Qw as S,FC as V,EL as U,FB as d,Fs as B,QJ as L,FE as W}from"./zeni-epic-state-pQFlpfOQ.js";import{z as N,a8 as $,b_ as Q,af as T,bD as z,b$ as J}from"./index-B1tuor_E.js";import"./mui-HaM5aBuG.js";import{u as K,R as E}from"./ReimbursementApprovalRuleDetailScreen-CtUn349v.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},o=new e.Error().stack;o&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[o]="6aa0be7e-cb53-494f-8da1-1ec8b926266e",e._sentryDebugIdIdentifier="sentry-dbid-6aa0be7e-cb53-494f-8da1-1ec8b926266e")}catch{}})();const y="reimbursement-approval-rule-update",X=k(function(e){return{approvalView:g(e),remiSetupApproverViewUpdateData:S(e).remiSetupApproverViewUpdateData}},function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(y)&&e(L(!1))},onBackClick:()=>{T(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!1))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))}}})($(Q)),q=({isLoading:e})=>{const o=A(),s=x(),n=C(),[t,i]=p.useState(!1),[m,w]=p.useState(!1),f=u(a=>a.remiSetupApproverViewState.fetchState),l=u(a=>I(a)),c=u(a=>g(a)),v=u(a=>S(a).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{v?.updateStatus.fetchState==="Completed"&&n(V())},[v]),p.useEffect(()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!1)))},[t,f,e,n]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(w(!0),n(d())),o("./new"))},[m,c,n]);const R={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${y}`]:[],eventCallback:(a,_,h)=>{a.endsWith(y)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(X,{currentTenant:l,location:s,navigate:o,...R})},j="reimbursement-approval-rule-update",G=k(function(e){const o=g(e),s=S(e).remiSetupApproverViewUpdateData,n={};for(const i of Object.values(e.vendorState.vendorByID))i?.id!=null&&(n[i.id]=i.name);const t={};for(const i of Object.values(e.classState.classesByKey))i?.classId!=null&&(t[i.classId]=i.className);return{approvalView:o,remiSetupApproverViewUpdateData:s,vendorNamesById:n,departmentNamesById:t}},function(e,o){const{navigate:s,location:n}=o;return{onApprovalRulesEventReceived:t=>{t.endsWith(j)&&e(L(!1))},onBackClick:()=>{T(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e(B(t,!0))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))},onReorderRules:t=>{e(W(t,!0))}}})($(J)),H=()=>{const e=u(n=>I(n)),{isApprovalRulesV3Enabled:o,isLoading:s}=z(e?.tenantId);return o?r.jsx(M,{isLoading:s}):r.jsx(q,{isLoading:s})},M=({isLoading:e})=>{const o=A(),s=x(),n=C(),[t,i]=p.useState(!1),[m,w]=p.useState(!1),f=u(a=>a.remiSetupApproverViewState.fetchState),l=u(a=>I(a)),c=u(a=>g(a));K();const v=u(a=>S(a).remiSetupApproverViewUpdateData);if(p.useEffect(()=>{v?.updateStatus.fetchState==="Completed"&&n(V())},[v]),p.useEffect(()=>{t||f!=="Not-Started"||e||(i(!0),n(U(!0,!1,!1,!0)))},[t,f,e,n]),N.getSignedInUser()==null)throw Error("Can't access reimbursement approval without signing in...");p.useEffect(()=>{c.allApprovalRules.length===0&&c.fetchState==="Completed"&&(m||(w(!0),n(d())),o("./new"))},[m,c,n]);const R={events:l.companyId!=null?[`private-encrypted-${l.companyId}.${j}`]:[],eventCallback:(a,_,h)=>{a.endsWith(j)&&h.onApprovalRulesEventReceived(a)}};return l?.companyReimbursementInfo?.info?.isReimbursementTOSAccepted===!1?r.jsx(D,{to:"../../promo"}):r.jsx(G,{currentTenant:l,location:s,navigate:o,isLoading:e,...R})};function oe(){return r.jsxs(O,{children:[r.jsx(b,{path:"/",element:r.jsx(H,{})}),r.jsx(b,{path:"/new",element:r.jsx(E,{})}),r.jsx(b,{path:"/:approvalRuleId/edit",element:r.jsx(E,{})}),r.jsx(b,{path:"*",element:r.jsx(F,{})})]})}export{oe as R};
@@ -1 +1 @@
1
- import{j as h}from"./liveblocks-BxEyo0kz.js";import{a as f}from"./sentry-C1EYnYRT.js";import{u as T,j as g,h as _,g as O,i as k,n as F}from"./core-NoaByI8l.js";import{kZ as L,Qw as E,Qg as x,Fv as V,FH as B,FC as A,FD as w,Qx as j,eX as z,FB as H}from"./zeni-epic-state-BI6-8w2O.js";import{z as N,m as P,y as Q,bQ as K,af as $,bD as W,bR as X}from"./index-BFyN1ofW.js";import"./mui-C_Ua4fCS.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="4aef5546-a00e-4e64-b31c-e1fd05dd3775",e._sentryDebugIdIdentifier="sentry-dbid-4aef5546-a00e-4e64-b31c-e1fd05dd3775")}catch{}})();function Z(){const e=T(),s=f.useRef(!1),t=g(o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started"),p=g(o=>o.vendorListState.allVendorIdsBillsTab.length>0);f.useEffect(()=>{s.current||p||t==="Completed"||t==="In-Progress"||(s.current=!0,e(L({})))},[p,t,e])}const G=F(function(e,s){const t=E(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=p==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return s.approvalRuleId&&(l=t.allApprovalRules.findIndex(r=>r.approvalRuleId===s.approvalRuleId)===0),{localData:t,hideUpperBoundField:o,isLowerBoundDisabled:l,approvalUpdateActionType:p}},function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=$(s.location);return{onApprovalRuleDataUpdated:a=>{const u=v=>{const S=[];return v.forEach(d=>{const R=d.actors.selectedUsers.map(m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1})),I=d.actors.selectedNonUsers.map(m=>{const y=(b=m.value,j(b)==null);var b;return{type:y?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!y}}),c=R.concat(I);S.push({action:d.stepType.selectedOption,actors:c,operator:c.length>1?d.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),S},n={amount:{type:"amount",comparator:"range",min:{amount:a.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:a.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(r==="approval_create"){const v={criteria:n,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(w(v))}else{const v={approvalRuleId:l,criteria:n,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(w(v))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!1))},onSaveRuleSuccess:()=>{t("../")}}})(K);function J(){const e=_(),s=T(),t=O(),{approvalRuleId:p}=k(),o=N.getSignedInUser(),l=P(),r=g(n=>E(n)),i=g(n=>x(n)),[a,u]=f.useState(!1);if(f.useEffect(()=>{a||(u(!0),s(V(!0)))}),f.useEffect(()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")},[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx(Q,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):h.jsx(G,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t})}function pe(e){return j(e)==null}const M=F(function(e,s){const t=E(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=[],l={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(o.push(r.id),l[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:o,vendorNamesById:l,editingRuleId:p==="approval_update"?s.approvalRuleId:void 0,allApprovalRulesWithUser:x(e).allApprovalRules}},function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=$(s.location);return{onApprovalRuleDataUpdated:a=>{const u=c=>{const m=[];return c.forEach(y=>{const b=y.actorKind?.selectedOption,C=y.selectedRole?.selectedOption;let D=[];b==="role"&&C!=null?D=[{type:"attribute",subType:C,userId:void 0,idType:void 0,isImplicitActor:!1}]:b==="specific_person"&&(D=(y.persons?.selectedUsers??[]).map(q=>({type:"user",subType:void 0,userId:q.userId,idType:"user",isImplicitActor:!1})));const U=y.action??"require_approval";m.push({action:U,actors:D,operator:D.length>1?U==="require_approval"?"or":"and":"is"})}),m},n=a.amountCriteria,v=a.vendorCriteria,S=a.departmentCriteria,d={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;d.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:n.min,max:c==="greater_than"?void 0:n.max}}const R=v?.selection.selectedOptions??[];R.length>0&&(d.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:R});const I=S?.selection.selectedOptions??[];if(I.length>0&&(d.department={type:"department",operator:S?.operator.selectedOption??"is",departmentIds:I}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,isFallback:a.isFallback,criteria:d,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(w(c))}else{const c={approvalRuleId:l,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,isFallback:a.isFallback,criteria:d,steps:u(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(w(c))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(H(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}})(X);function ne(){const e=g(t=>z(t)),{isApprovalRulesV3Enabled:s}=W(e?.tenantId);return s?h.jsx(Y,{}):h.jsx(J,{})}function Y(){const e=_(),s=T(),t=O(),{approvalRuleId:p}=k(),o=N.getSignedInUser(),l=P(),r=g(n=>E(n)),i=g(n=>x(n)),[a,u]=f.useState(!1);if(Z(),f.useEffect(()=>{a||(u(!0),s(V(!0)))}),f.useEffect(()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")},[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx(Q,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):h.jsx(M,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t},p??"new")}export{ne as R,pe as i,Z as u};
1
+ import{j as h}from"./liveblocks-B2nLBm11.js";import{a as f}from"./sentry-CLlo3TXi.js";import{u as T,j as g,h as _,g as O,i as k,n as F}from"./core-BDPZcSG4.js";import{kZ as L,Qw as E,Qg as x,Fv as V,FH as B,FC as A,FD as w,Qx as j,eX as z,FB as H}from"./zeni-epic-state-pQFlpfOQ.js";import{z as N,y as P,B as Q,bQ as K,af as $,bD as W,bR as X}from"./index-B1tuor_E.js";import"./mui-HaM5aBuG.js";(function(){try{var e=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new e.Error().stack;s&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[s]="1aaa4517-934e-44d8-a276-db94385f84ea",e._sentryDebugIdIdentifier="sentry-dbid-1aaa4517-934e-44d8-a276-db94385f84ea")}catch{}})();function Z(){const e=T(),s=f.useRef(!1),t=g(o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started"),p=g(o=>o.vendorListState.allVendorIdsBillsTab.length>0);f.useEffect(()=>{s.current||p||t==="Completed"||t==="In-Progress"||(s.current=!0,e(L({})))},[p,t,e])}const G=F(function(e,s){const t=E(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=p==="approval_create"&&t.allApprovalRules.length!==0;let l=t.allApprovalRules.length===0;return s.approvalRuleId&&(l=t.allApprovalRules.findIndex(r=>r.approvalRuleId===s.approvalRuleId)===0),{localData:t,hideUpperBoundField:o,isLowerBoundDisabled:l,approvalUpdateActionType:p}},function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=$(s.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const S=[];return v.forEach(u=>{const R=u.actors.selectedUsers.map(m=>({type:"user",subType:void 0,userId:m.userId,idType:"user",isImplicitActor:!1})),I=u.actors.selectedNonUsers.map(m=>{const y=(b=m.value,j(b)==null);var b;return{type:y?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!y}}),c=R.concat(I);S.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})}),S},n={amount:{type:"amount",comparator:"range",min:{amount:a.lowerBound,currencyCode:"USD",currencySymbol:"$"},max:{amount:a.upperBound,currencyCode:"USD",currencySymbol:"$"}}};if(r==="approval_create"){const v={criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(w(v))}else{const v={approvalRuleId:l,criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(w(v))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!1))},onSaveRuleSuccess:()=>{t("../")}}})(K);function J(){const e=_(),s=T(),t=O(),{approvalRuleId:p}=k(),o=N.getSignedInUser(),l=P(),r=g(n=>E(n)),i=g(n=>x(n)),[a,d]=f.useState(!1);if(f.useEffect(()=>{a||(d(!0),s(V(!0)))}),f.useEffect(()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")},[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx(Q,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):h.jsx(G,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t})}function pe(e){return j(e)==null}const M=F(function(e,s){const t=E(e),p=t.remiSetupApproverViewUpdateData?.type??"approval_create",o=[],l={};for(const r of Object.values(e.vendorState.vendorByID))r?.id!=null&&(o.push(r.id),l[r.id]=r.name);return{localData:t,approvalUpdateActionType:p,allVendorIds:o,vendorNamesById:l,editingRuleId:p==="approval_update"?s.approvalRuleId:void 0,allApprovalRulesWithUser:x(e).allApprovalRules}},function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=$(s.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const m=[];return c.forEach(y=>{const b=y.actorKind?.selectedOption,C=y.selectedRole?.selectedOption;let D=[];b==="role"&&C!=null?D=[{type:"attribute",subType:C,userId:void 0,idType:void 0,isImplicitActor:!1}]:b==="specific_person"&&(D=(y.persons?.selectedUsers??[]).map(q=>({type:"user",subType:void 0,userId:q.userId,idType:"user",isImplicitActor:!1})));const U=y.action??"require_approval";m.push({action:U,actors:D,operator:D.length>1?U==="require_approval"?"or":"and":"is"})}),m},n=a.amountCriteria,v=a.vendorCriteria,S=a.departmentCriteria,u={};if(n!=null&&n.comparator.selectedOption!=null){const c=n.comparator.selectedOption;u.amount={type:"amount",comparator:c,min:c==="less_than"?void 0:n.min,max:c==="greater_than"?void 0:n.max}}const R=v?.selection.selectedOptions??[];R.length>0&&(u.vendor={type:"vendor",operator:v?.operator.selectedOption??"is",vendorIds:R});const I=S?.selection.selectedOptions??[];if(I.length>0&&(u.department={type:"department",operator:S?.operator.selectedOption??"is",departmentIds:I}),r==="approval_create"){const c={name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,isFallback:a.isFallback,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(w(c))}else{const c={approvalRuleId:l,name:a.name,description:a.description,separationOfDuties:a.separationOfDuties,isFallback:a.isFallback,criteria:u,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(w(c))}},onResetClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onBackClick:()=>{e(A()),r==="approval_update"||i?t("../"):o.allApprovalRules.length===0&&o.fetchState==="Completed"?t("../../setup"):t("../")},onSaveRuleClick:()=>{e(B(!0))},onSaveRuleSuccess:()=>{t("../")},onEditExistingRule:a=>{e(H(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}})(X);function ne(){const e=g(t=>z(t)),{isApprovalRulesV3Enabled:s}=W(e?.tenantId);return s?h.jsx(Y,{}):h.jsx(J,{})}function Y(){const e=_(),s=T(),t=O(),{approvalRuleId:p}=k(),o=N.getSignedInUser(),l=P(),r=g(n=>E(n)),i=g(n=>x(n)),[a,d]=f.useState(!1);if(Z(),f.useEffect(()=>{a||(d(!0),s(V(!0)))}),f.useEffect(()=>{i.fetchState==="Not-Started"&&e(p!=null?"../../":"../")},[i,p]),o==null)throw Error("Can't access address page without signing in...");return r.approversDetailsFetchStatus.fetchState=="Not-Started"||r.approversDetailsFetchStatus.fetchState==="In-Progress"?h.jsx(Q,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):h.jsx(M,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t},p??"new")}export{ne as R,pe as i,Z as u};