@zeniai/web-app-ui 5.2.19-qa → 5.2.20-qa

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/dist/assets/AddressRoutes-DYJsnvRP.js +1 -0
  2. package/dist/assets/AddressScreen-Gd3rLr7o.js +9 -0
  3. package/dist/assets/AiCfoScreen-GqFvcBB1.js +22 -0
  4. package/dist/assets/{BillPayApprovalRoutes-DNMaV2B3.js → BillPayApprovalRoutes-CbPB6Cz2.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-nY9e-Ucu.js → BillPayRoutes-DGiViCr3.js} +12 -12
  6. package/dist/assets/{BusinessVerificationPageScreen-D2eu1jQC.js → BusinessVerificationPageScreen-W5WuCBLZ.js} +2 -2
  7. package/dist/assets/{CardsAiCfoScreen-B5bn7At3.js → CardsAiCfoScreen-D_U3dSti.js} +1 -1
  8. package/dist/assets/{ChargeCardRoutes-DY752I-e.js → ChargeCardRoutes-B27ureXO.js} +10 -10
  9. package/dist/assets/{CompanyPassportScreen-XItKjSib.js → CompanyPassportScreen-ErXIYp45.js} +1 -1
  10. package/dist/assets/ConnectionAuthScreen-DJjWE9Ho.js +11 -0
  11. package/dist/assets/CustomerOnboardingAuthScreen-Dk9pmK5M.js +1 -0
  12. package/dist/assets/CustomerOnboardingRoutes-B98Qqcry.js +30 -0
  13. package/dist/assets/{DashboardRoutes-X4CuSvKN.js → DashboardRoutes-5YFzvPKk.js} +4 -4
  14. package/dist/assets/{DefaultTenantHome-3tZYTtZs.js → DefaultTenantHome-d6BXVPTI.js} +1 -1
  15. package/dist/assets/DomesticWireDetailScreen-JSSitzK8.js +18 -0
  16. package/dist/assets/DrawerScreen-DNRTfvlv.js +1 -0
  17. package/dist/assets/EntityDetailRoutes-BkmcXMq3.js +1 -0
  18. package/dist/assets/ExpenseAutomationRoutes-BrNpDBh0.js +25 -0
  19. package/dist/assets/FeaturePreviewScreen-C_G_t4I9.js +1 -0
  20. package/dist/assets/HubSpotOAuthCallbackScreen-B7NyqTm6.js +1 -0
  21. package/dist/assets/MagicLinkRoutes-DDsl9O0f.js +72 -0
  22. package/dist/assets/MagicLinkSignInScreen-Dry_XVDq.js +12 -0
  23. package/dist/assets/MobileAppDrawer-DHMYVxFj.js +1 -0
  24. package/dist/assets/NotFoundScreen-DsR8VsQv.js +1 -0
  25. package/dist/assets/{NotificationRoutes-CUhoGF8j.js → NotificationRoutes-oG7avNKP.js} +1 -1
  26. package/dist/assets/OAuthConsentScreen-Dh63jZlt.js +1 -0
  27. package/dist/assets/PandLWithForecastRoutes-BVXECLJI.js +1 -0
  28. package/dist/assets/PeopleRoutes-CQXZ97tH.js +22 -0
  29. package/dist/assets/PerformanceRoutes-Dioa22VE.js +1 -0
  30. package/dist/assets/{Preview-N8JE4dsu.js → Preview-K7kVfJNZ.js} +1 -1
  31. package/dist/assets/{QBOConnectionScreen-B7QYuZy-.js → QBOConnectionScreen-8ZFrKnn9.js} +1 -1
  32. package/dist/assets/ReimbursementApprovalRoutes-C8xbikTE.js +1 -0
  33. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-CPcjJ9Q0.js → ReimbursementApprovalRuleDetailScreen-DcC6kKsi.js} +1 -1
  34. package/dist/assets/{ReimbursementRoutes-D12Jt1bi.js → ReimbursementRoutes-DiSJ1F-L.js} +8 -8
  35. package/dist/assets/{ReportsRoutes-BxecWoyx.js → ReportsRoutes-BPxWGssU.js} +1 -1
  36. package/dist/assets/RewardsRoutes-DqiMNP30.js +1 -0
  37. package/dist/assets/ScreenRoutes-CBj7JgTH.js +2 -0
  38. package/dist/assets/SettingsRoutes-CXmkByZI.js +57 -0
  39. package/dist/assets/{SetupPagesScreen-CiLpjjGD.js → SetupPagesScreen-BaE6w_Lx.js} +5 -5
  40. package/dist/assets/SignInScreen-CwKX1cxj.js +1 -0
  41. package/dist/assets/SignOutScreen-B9gpIBeY.js +9 -0
  42. package/dist/assets/TaskListScreen-CM1HvPkl.js +9 -0
  43. package/dist/assets/TaskRoutes-CeoNkmPK.js +9 -0
  44. package/dist/assets/{TransactionDetailRoutes-zN1P9Vz7.js → TransactionDetailRoutes-CF2S0_wV.js} +1 -1
  45. package/dist/assets/TransactionDetailScreen-CSzx81zE.js +5 -0
  46. package/dist/assets/{TransactionListRoutes-D_krEmlB.js → TransactionListRoutes-D0BHQcx7.js} +1 -1
  47. package/dist/assets/TreasuryRoutes-BSGTUZAU.js +37 -0
  48. package/dist/assets/{VendorsRoutes-DkWJ1EKQ.js → VendorsRoutes-D82zHUvQ.js} +15 -15
  49. package/dist/assets/WiseConfirmationScreen-C8a_Kzcy.js +12 -0
  50. package/dist/assets/{ZeniAccountRoutes-VA9YYfkO.js → ZeniAccountRoutes-C5ejtB2q.js} +11 -11
  51. package/dist/assets/ZeniAccountStatementScreen-B6jIO9ea.js +9 -0
  52. package/dist/assets/{accountMappingHelper-NsHFWNkE.js → accountMappingHelper-gMZWceAt.js} +1 -1
  53. package/dist/assets/{analytics-C1xZTLEH.js → analytics-BP5D4JyB.js} +1 -1
  54. package/dist/assets/{analyticsHelper-C5WvAo12.js → analyticsHelper-Ib8eUq2U.js} +1 -1
  55. package/dist/assets/{core-u1EteL-v.js → core-BfWJ7zKT.js} +1 -1
  56. package/dist/assets/{decodeURIComponentSafe-CjfYiJlM.js → decodeURIComponentSafe-D2jiQ7Do.js} +1 -1
  57. package/dist/assets/{dnd-CIbUDnZz.js → dnd-tQgCG5z3.js} +1 -1
  58. package/dist/assets/{empty-C5PjC6g0.js → empty-0zu7mfa-.js} +1 -1
  59. package/dist/assets/{empty-Bplt_RAY.js → empty-D4KL-CgN.js} +1 -1
  60. package/dist/assets/{emptyVideoElement-CZ_82B6H.js → emptyVideoElement-D2WpBqYb.js} +1 -1
  61. package/dist/assets/epic-_aUX4Son.js +2 -0
  62. package/dist/assets/getLocaleForTenant-0y5Rz6LJ.js +1 -0
  63. package/dist/assets/{index-CQm_vnbZ.js → index-BtVRjclm.js} +1 -1
  64. package/dist/assets/{index-29ukruDR.js → index-C2k_pBZi.js} +1 -1
  65. package/dist/assets/{index-Df8xDBDT.js → index-CiS2dMrM.js} +1 -1
  66. package/dist/assets/index-Cx4f0JbF.css +1 -0
  67. package/dist/assets/{index-tOfK8iY_.js → index-D9NLhglj.js} +35734 -34803
  68. package/dist/assets/{index-DFSTqcuc.js → index-DpTDwQon.js} +1 -1
  69. package/dist/assets/{index-B35sRjQe.js → index-edb9TugW.js} +1 -1
  70. package/dist/assets/{index-D5nyNcPu.js → index-oBgu7-MV.js} +2 -2
  71. package/dist/assets/{index-pof_GVZP.js → index-zYcXrqlT.js} +1 -1
  72. package/dist/assets/{lexical-BuHlG7c0.js → lexical-Bg8ldM3i.js} +1 -1
  73. package/dist/assets/liveblocks-DJbBe3tc.js +54 -0
  74. package/dist/assets/{lottie-DvAqKpNG.js → lottie-BaCgeYyk.js} +1 -1
  75. package/dist/assets/{mui-DMXXvJHn.js → mui-ts7KHm6i.js} +1 -1
  76. package/dist/assets/{pathToGoBack-Ch1k07_O.js → pathToGoBack-DG10zCZ4.js} +1 -1
  77. package/dist/assets/{pdf-Wf7vPJje.js → pdf-C9HGpLCu.js} +4 -4
  78. package/dist/assets/{pdf-lib-Cw5xvhae.js → pdf-lib-DX6kz8a9.js} +1 -1
  79. package/dist/assets/{plaid-BGfWuOr6.js → plaid-Cv0mPYlm.js} +1 -1
  80. package/dist/assets/{pusher-D19Erbfh.js → pusher-CgG6vGRj.js} +1 -1
  81. package/dist/assets/{react-Ee9ncfbZ.js → react-Bu9a3mw7.js} +1 -1
  82. package/dist/assets/{react-C2iLidGy.js → react-CdB2kFeI.js} +1 -1
  83. package/dist/assets/{react-B7zdDwoo.js → react-Dp-aIPjg.js} +1 -1
  84. package/dist/assets/{react-C9GijZet.js → react-LH5dN4Ph.js} +1 -1
  85. package/dist/assets/{react-CYyUBnNb.js → react-r7Nkvi02.js} +1 -1
  86. package/dist/assets/{react-C3pQy8tf.js → react-tqWON72J.js} +1 -1
  87. package/dist/assets/{recharts-REl-3xYX.js → recharts-DNnhB5R_.js} +1 -1
  88. package/dist/assets/routePaths-DxGoZobb.js +1 -0
  89. package/dist/assets/{sentry-B7X8e_7J.js → sentry-C6T1HHHS.js} +1 -1
  90. package/dist/assets/{url-DyzfdPsq.js → url-CJ3E3PSB.js} +1 -1
  91. package/dist/assets/{url-CUjb-zqA.js → url-Xy6MI2YY.js} +1 -1
  92. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-Drsr1_x0.js → useAiCfoDashboardSuggestedQuestionsChips-C2dvtIj1.js} +1 -1
  93. package/dist/assets/useAskAiCfoHostNavButtonProps-D8n0-rNW.js +1 -0
  94. package/dist/assets/useCashManagementBanner-gOTcVHZg.js +1 -0
  95. package/dist/assets/{useChargeCardPusherEvents-HnTE12S3.js → useChargeCardPusherEvents-D846Tvtv.js} +1 -1
  96. package/dist/assets/{useDeviceId-CPotDJHg.js → useDeviceId-DNuYTM17.js} +1 -1
  97. package/dist/assets/{useEmailConnectResultRefresh-Csv2ipfu.js → useEmailConnectResultRefresh-a9kkk9YH.js} +1 -1
  98. package/dist/assets/{useInitialThreadRequest-B6H0CI2K.js → useInitialThreadRequest-BlvltKSe.js} +1 -1
  99. package/dist/assets/{utils-ChVfPml3.js → utils-xWcqC4Wl.js} +1 -1
  100. package/dist/assets/withTransactionSidePanel-QwShhfS-.js +21 -0
  101. package/dist/assets/{zeni-epic-state-DiB-ZYnx.js → zeni-epic-state-kow6PLud.js} +6 -6
  102. package/dist/index.html +1 -1
  103. package/package.json +7 -4
  104. package/dist/assets/AddressRoutes-4d0GG7rG.js +0 -1
  105. package/dist/assets/AddressScreen-C1-59DB9.js +0 -9
  106. package/dist/assets/AiCfoScreen-BDXW1pEG.js +0 -22
  107. package/dist/assets/ConnectionAuthScreen-tEXIUU8s.js +0 -11
  108. package/dist/assets/CustomerOnboardingAuthScreen-WJgYXVGO.js +0 -1
  109. package/dist/assets/CustomerOnboardingRoutes-DXg0Kf-I.js +0 -30
  110. package/dist/assets/DomesticWireDetailScreen-KZF7LYi4.js +0 -18
  111. package/dist/assets/DrawerScreen-C8ShIsGs.js +0 -1
  112. package/dist/assets/EntityDetailRoutes-CaaXRLoy.js +0 -1
  113. package/dist/assets/ExpenseAutomationRoutes-B9Ri_GEg.js +0 -25
  114. package/dist/assets/FeaturePreviewScreen-Df-HjHKO.js +0 -1
  115. package/dist/assets/HubSpotOAuthCallbackScreen-C_AMn_zI.js +0 -1
  116. package/dist/assets/MagicLinkRoutes-BTE6ILsC.js +0 -72
  117. package/dist/assets/MagicLinkSignInScreen-BoZkLiIF.js +0 -12
  118. package/dist/assets/MobileAppDrawer-DKR412hC.js +0 -1
  119. package/dist/assets/NotFoundScreen-DVitp65R.js +0 -1
  120. package/dist/assets/OAuthConsentScreen-CKk9r_kv.js +0 -1
  121. package/dist/assets/PandLWithForecastRoutes-DDCfsce9.js +0 -1
  122. package/dist/assets/PeopleRoutes-D8NzEF0b.js +0 -22
  123. package/dist/assets/PerformanceRoutes-D6q2fbPJ.js +0 -1
  124. package/dist/assets/ReimbursementApprovalRoutes-CuqLUiW5.js +0 -1
  125. package/dist/assets/RewardsRoutes-C4bn-KvF.js +0 -1
  126. package/dist/assets/ScreenRoutes-BNvEvG7L.js +0 -2
  127. package/dist/assets/SettingsRoutes-CN172aq_.js +0 -57
  128. package/dist/assets/SignInScreen-BQwWdLEK.js +0 -1
  129. package/dist/assets/SignOutScreen-DHYljL7t.js +0 -9
  130. package/dist/assets/TaskListScreen-B5yPteB2.js +0 -9
  131. package/dist/assets/TaskRoutes-I9rTbqEa.js +0 -9
  132. package/dist/assets/TransactionDetailScreen-oIg47Woo.js +0 -5
  133. package/dist/assets/TreasuryRoutes-B0g2RVn5.js +0 -37
  134. package/dist/assets/WiseConfirmationScreen-DQmSckNf.js +0 -12
  135. package/dist/assets/ZeniAccountStatementScreen-Cr2gc08z.js +0 -9
  136. package/dist/assets/epic-uTwIf-FI.js +0 -2
  137. package/dist/assets/getLocaleForTenant-BFNl-yVT.js +0 -1
  138. package/dist/assets/index-Czu7h9lW.css +0 -1
  139. package/dist/assets/liveblocks-B_acMj2M.js +0 -54
  140. package/dist/assets/routePaths-FKPzluZv.js +0 -1
  141. package/dist/assets/useAskAiCfoHostNavButtonProps-D-klSIXS.js +0 -1
  142. package/dist/assets/useCashManagementBanner-D-KRAuwc.js +0 -1
  143. package/dist/assets/withTransactionSidePanel-DKYByGkd.js +0 -21
@@ -0,0 +1 @@
1
+ import{j as s}from"./liveblocks-DJbBe3tc.js";import{a as d}from"./sentry-C6T1HHHS.js";import{h as A,u as B,g as G,i as N,j as l,N as q,n as F,o as _,p as $}from"./core-BfWJ7zKT.js";import{OP as z,e$ as K,Ob as L,lL as M,KI as k,OU as R,NG as W,kL as Y,KJ as S,Og as H,Oh as J,NI as U,NH as V}from"./zeni-epic-state-kow6PLud.js";import{aX as X,f as Q,s as Z,v as tt}from"./index-D9NLhglj.js";import"./mui-ts7KHm6i.js";import{d as I}from"./decodeURIComponentSafe-D2jiQ7Do.js";import{w as et}from"./withTransactionSidePanel-QwShhfS-.js";import{f as at,c as nt}from"./routePaths-DxGoZobb.js";import"./recharts-DNnhB5R_.js";import"./analytics-BP5D4JyB.js";import"./plaid-Cv0mPYlm.js";import"./dnd-tQgCG5z3.js";import"./stripe-cKAAJElX.js";import"./lottie-BaCgeYyk.js";import"./lexical-Bg8ldM3i.js";import"./pdf-C9HGpLCu.js";import"./utils-xWcqC4Wl.js";import"./useAskAiCfoHostNavButtonProps-D8n0-rNW.js";import"./TransactionDetailScreen-CSzx81zE.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]="bc465697-4385-4c38-94d5-278f2486a3fb",a._sentryDebugIdIdentifier="sentry-dbid-bc465697-4385-4c38-94d5-278f2486a3fb")}catch{}})();const ot=F((function(a,t){const e=t.entity,o=R(a,t.entity,"EntityDetail");return{selectedEntity:e,autoCompleteData:{autoCompleteText:e.name,entityAutoCompleteView:W(a,"common")},trendWithTransactionsReport:o,analytics:Q,isAccountingClassesEnabled:Y(a)}}),(function(a,t){return{onTransactionItemClick:e=>{if(t.openTransactionPanel)return void t.openTransactionPanel(e.id,e.type);const o=`${nt(e,t.tenantEmailDomain)}`,c=tt(t.location.state?.pathnameStackToGoBack,t.location.pathname);t.navigate(o,{state:{pathnameStackToGoBack:c}})},autoCompleteActions:{onAutoCompleteInputChange:e=>{e.trim().length>=2?a(U({searchString:e,searchOrigin:"common"})):e.trim().length===0&&a(V("common"))},onAutoCompleteEntity:e=>{const o=at(e,t.tenantEmailDomain);a(H()),a(J()),t.resetTrendIsFetchedStates(),t.navigate(o,{replace:!0,state:{pathnameStackToGoBack:t.location.state?.pathnameStackToGoBack}})},onCancelAutoComplete:()=>{const e=Z(t.location.state?.pathnameStackToGoBack),o=e.poppedPathname??b();t.navigate(o,{state:{pathnameStackToGoBack:e.newStack}})}},onTrendSelectedPeriodChange:e=>{if(t.closeSidePanel?.(),e==null)t.defaultTransactionTimePeriod!=null&&a(S(t.entity,"EntityDetail",{timeframe:"quarter",timePeriod:t.defaultTransactionTimePeriod}));else{const o=e.currentTimePeriod==null?e.addTimePeriod:{startDate:e.addTimePeriod.startDate,endDate:e.currentTimePeriod.endDate};a(k(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:e.addTimePeriod})),a(S(t.entity,"EntityDetail",{timeframe:e.timeframe,timePeriod:o}))}}}}))(X),it=et((function({entityType:a,...t}){const e=A(),o=B(),c=G(),[m,h]=d.useState(!1),[T,g]=d.useState(!1),{tenantEmailDomain:C,entityIdEncoded:w,entityNameEncoded:x}=N(),r=I(w??""),p=I(x??""),f=rt(r,p),O=[r,p].filter((n=>n!=null)),i={name:p,id:r,type:a,zeniId:r,qboId:r},D=l((n=>z(n.customerIncomeState,n.vendorExpenseState,n.trendState,i,"quarter"))),j=l((n=>K(n).company?.companyInfo.firstMonthOfFY??1)),u=l((n=>L(n.trendWithTransactionsState,i,"EntityDetail")));d.useEffect((()=>{m===!1&&f===!0&&(h(!0),o(M(i)))}),[m,f,i]);const P=l((n=>n.trendState.fetchState)),E=u?.selectedPeriod?.timePeriod??D,v=(function(n,y){return n!=null&&y!=null?{startDate:n.startDate,endDate:y?.endDate}:y})(u?.selectedPeriod?.timePeriod,D);return d.useEffect((()=>{m===!0&&T===!1&&P==="Completed"&&(g(!0),E!=null&&o(k(i,"EntityDetail",{timeframe:u?.selectedPeriod?.timeframe??"quarter",timePeriod:E})))}),[m,T,P]),f?s.jsx(ot,{firstMonthOfFY:j,tenantEmailDomain:C,location:c,navigate:e,entity:i,defaultTransactionTimePeriod:v,resetTrendIsFetchedStates:()=>{h(!1),g(!1)},...t}):s.jsx(q,{to:b(O.length)})})),rt=(a,t)=>t!=null&&t.length>0&&a!=null&&a.length>0,b=(a=2)=>{let t="../";for(let e=0;e<a;e++)t=`${t}../`;return t};function wt({entityType:a}){return s.jsx(_,{children:s.jsx($,{path:"/:entityIdEncoded/:entityNameEncoded/*",element:s.jsx(it,{entityType:a})})})}export{wt as EntityDetailRoutes,wt as default};
@@ -0,0 +1,25 @@
1
+ import{j as S}from"./liveblocks-DJbBe3tc.js";import ia from"./NotFoundScreen-DsR8VsQv.js";import{a,b as tn}from"./sentry-C6T1HHHS.js";import{n as Le,S as la}from"./mui-ts7KHm6i.js";import{u as Se,h as nn,g as tt,j as R,n as ra,i as Vt,o as da,p as Ke}from"./core-BfWJ7zKT.js";import{e$ as Oe,Ty as ua,ox as ve,g0 as ma,st as pa,Tz as We,fD as nt,TA as Ot,el as ha,fm as ga,TB as _t,TC as Be,pd as Ca,TD as Sa,pq as Ia,oO as an,gt as ue,gv as fa,TE as ka,p7 as on,pt as Ea,TF as sn,oI as ba,r$ as Ta,fN as ye,TG as _e,uz as cn,EV as ln,TH as rn,TI as ya,rz as at,OQ as zt,OS as va,kO as Aa,OT as Pa,kV as wa,c$ as Ra,vP as ot,oU as dn,py as ze,TJ as xa,NI as Mt,NH as Fe,TK as Lt,la as Da,TL as Ua,TM as Fa,TN as Ba,TO as Va,o$ as Oa,pB as Ve,TP as _a,TQ as za,TR as Ma,pI as La,kZ as ja,kQ as $a,TS as qa,kY as jt,P1 as Ga,TT as Na,TU as Ja,rv as Ya,r7 as Qa,pz as Ce,r6 as Ze,TV as Ha,TW as Ka,TX as Wa,mt as Za,bo as Xa,mo as $t,ma as eo,TY as to,gG as no,ml as ao,xI as oo,TZ as so,q7 as co,q2 as io,q6 as lo,pT as ro,T_ as uo,fQ as un,ph as mo,oX as po,g1 as qt,pD as ho,T$ as go,U0 as Co,pA as mn,U1 as So,U2 as Io,U3 as fo,U4 as ko,U5 as Gt,rH as Eo,q_ as bo,NG as To,U6 as yo,U7 as vo,kX as Ao,U8 as Po,JJ as wo,kW as Ro,kL as xo,fP as Do,qw as pn,qS as Uo,px as Nt,pC as Fo,bE as Bo,mi as Vo,mf as Oo,U9 as _o,pS as Jt,qO as Yt,qM as zo,Ua as Mo,qB as Lo,qh as jo,qP as $o,Ub as qo,Uc as Go,ql as No,Ud as Jo,qc as Yo,qk as Qo,qi as Ho,qV as Ko}from"./zeni-epic-state-kow6PLud.js";import{w as Me,i as Q,f as J,v as ie,X as hn,a0 as gn,cZ as Wo,z as je,c_ as Zo,c$ as Xo,d0 as es,au as Ae,d1 as ts,d2 as Qt,aZ as Ht,B as Cn,d3 as ns,ar as Xe,a as as,a9 as os,d4 as ss,a4 as cs,d5 as is,W as ls,d6 as rs,d7 as ds,x as us,D as ms,aS as ps,d8 as hs,d9 as gs,be as Cs,F as Ss,aV as Is}from"./index-D9NLhglj.js";import{u as Sn}from"./useAskAiCfoHostNavButtonProps-D8n0-rNW.js";import{f as Kt,a as fs,b as ks,g as Es,C as bs}from"./TransactionDetailScreen-CSzx81zE.js";import{w as Ts}from"./withTransactionSidePanel-QwShhfS-.js";import{h as ys,v as vs}from"./routePaths-DxGoZobb.js";import{g as et}from"./accountMappingHelper-gMZWceAt.js";import{D as As}from"./DrawerScreen-DNRTfvlv.js";import"./recharts-DNnhB5R_.js";import"./analytics-BP5D4JyB.js";import"./plaid-Cv0mPYlm.js";import"./dnd-tQgCG5z3.js";import"./stripe-cKAAJElX.js";import"./lottie-BaCgeYyk.js";import"./lexical-Bg8ldM3i.js";import"./pdf-C9HGpLCu.js";import"./utils-xWcqC4Wl.js";import"./decodeURIComponentSafe-D2jiQ7Do.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},s=new t.Error().stack;s&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[s]="d8703adb-9e59-4864-be37-8204e36956b7",t._sentryDebugIdIdentifier="sentry-dbid-d8703adb-9e59-4864-be37-8204e36956b7")}catch{}})();const Ps=()=>{const t=Se(),s=nn(),P=tt(),E=R((u=>Oe(u))),{useFeatureGate:T}=Me(),{isFeatureEnabled:i}=T(Q.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:m}=T(Q.aiAuditScorePercentage),I=R((u=>u.expenseAutomationViewState.selectedPeriodByTenantId)),c=R((u=>ua(u,E.tenantId))),{isAiCfoAccessEnabled:C,onAskAiCfoClick:h}=Sn({mobileExploreReferrer:"Month-End Close Overview"}),w=a.useCallback(((u,M,ae=!1)=>{t(ve({tenantId:M,period:{month:u.month,year:u.year},refreshViewInBackground:ae}))}),[]),v=a.useCallback((u=>{const M=P.state?.referrer;c.monthEndCloseChecks?.auditSummary!=null&&J.trackMonthCloseAuditPage(u.month,u.year,c.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",c.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,M??null),t(ma(E.tenantId,u))}),[E.tenantId,c.monthEndCloseChecks?.auditSummary,c.monthEndCloseChecks?.reportEmailSentDate]),r=I[E.tenantId],p=a.useCallback((()=>{const u=P.state?.referrer;c.monthEndCloseChecks?.auditSummary!=null&&J.trackMonthCloseAuditPage(r.month,r.year,c.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",c.monthEndCloseChecks.auditSummary.auditScorePercentage,!0,u??null),w(r,E.tenantId,!0)}),[w,r,E.tenantId,c.monthEndCloseChecks?.auditSummary,c.monthEndCloseChecks?.reportEmailSentDate]),V=ie(P.state?.pathnameStackToGoBack,P.pathname),x=a.useCallback((()=>{if(c.monthEndCloseChecks!=null&&r!=null){const u=c.monthEndCloseChecks.monthEndCloseCheckList.find((M=>M.progress<100));if(u!=null)return void s(`./${u.id}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:V,message:"comingFromOverview"}});s(`./month_end_insights/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:V,message:"comingFromOverview"}})}}),[c.monthEndCloseChecks,r]),{areTenantIdsInSync:f}=hn();return gn({isDataReady:c.fetchState==="Completed"}),a.useEffect((()=>{r!=null&&c.fetchState!=="In-Progress"&&c.fetchState!=="Completed"&&f&&w(r,E.tenantId)}),[w,r,c.fetchState,E.tenantId,f]),a.useEffect((()=>{r!=null&&c.monthClosePerformanceTrendFetchStatus.fetchState!=="In-Progress"&&c.monthClosePerformanceTrendFetchStatus.fetchState!=="Completed"&&f&&t(pa(r))}),[r,c.monthClosePerformanceTrendFetchStatus.fetchState,f]),a.useEffect((()=>{const u=setInterval((()=>{c.fetchState!=="In-Progress"&&c.fetchState==="Completed"&&p()}),3e5);return()=>clearInterval(u)}),[c.fetchState]),a.useEffect((()=>{if(c.fetchState==="Completed"&&c.monthEndCloseChecks?.auditSummary!=null){const u=P.state?.referrer;J.trackMonthCloseAuditPage(c.selectedPeriod.month,c.selectedPeriod.year,c.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",c.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,u??null)}}),[c.fetchState,c.selectedPeriod,c.monthEndCloseChecks?.auditSummary,c.monthEndCloseChecks?.reportEmailSentDate]),S.jsx(ws,{children:S.jsx(Wo,{monthEndCloseChecksView:c,isRealtimeInsightsFeatureEnabled:i,onMonthEndCheckClick:u=>{s(`./${u}/${r.month}-${r.year}`,{state:{pathnameStackToGoBack:V,message:"comingFromOverview",referrer:"Expense Automation - Overview"}})},onPeriodChange:v,handleReviewButtonClick:x,onBackClick:()=>{s("../../dashboard")},onReload:p,isAiCfoAccessEnabled:C,onAskAiCfoClick:h,aiAuditScorePercentageEnabled:m})})},ws=Le.div`
2
+ display: flex;
3
+ height: 100vh;
4
+ width: 100%;
5
+ flex: 1 1 auto;
6
+ flex-direction: column;
7
+ background-color: ${t=>t.theme.colors.grey4};
8
+ `,Rs=tn.memo((({reconciliation:t,selectedDrawerAccountId:s,onClose:P,onFetchLinkTokenClick:E,onEstablishConnectionClick:T})=>{const i=Se(),{useFeatureGate:m}=Me(),{isFeatureEnabled:I}=m(Q.isReconV3Enabled),c=je.getSignedInUser(),C=R((k=>Oe(k))),h=t.excludedAccountIDs,w=a.useMemo((()=>({userId:c?.userId??"",sessionId:c?.zeniSessionId??"",tenantId:C?.tenantId??""})),[c?.userId,c?.zeniSessionId,C?.tenantId]),{accountReconciliationsByAccountID:v,monthYearPeriod:r,statementUploadChosen:p}=t,V=v[s],x=a.useRef(!1),f=a.useCallback((k=>{x.current=k,Qt(s,k)}),[s]),u=a.useCallback((k=>{i(We({accountId:s,selectedPeriod:r,dismissedToBackground:!0,backgroundCompletedSteps:k.completedSteps,startedAtMs:k.startedAtMs,totalDurationSeconds:k.totalDurationSeconds})),V!=null&&requestAnimationFrame((()=>{x.current||i(nt({messageSection:"statement_parsing_in_progress",messageText:"success",type:"info",showStatusIcon:!0,variables:[{variableName:"_account_name_",variableValue:Zo(V)}]}))}))}),[i,r,V,s]),M=a.useCallback((()=>{i(We({accountId:s,selectedPeriod:r,dismissedToBackground:!1}))}),[i,s,r]),ae=a.useCallback((k=>{i(Ot({accountId:s,selectedPeriod:r,backgroundCompletedSteps:k}))}),[i,r,s]),j=a.useCallback((()=>{i(Ot({accountId:s,selectedPeriod:r,backgroundCompletedSteps:0})),i(We({accountId:s,selectedPeriod:r,dismissedToBackground:!1}))}),[i,r,s]);a.useEffect((()=>()=>{Qt(null,!1)}),[]);const O=V?.parsedStatementData?.statementUpload?.statementMeta?.statementUploadId??V?.accountReconEntity.statementMetaData?.statementUploadId,e=V?.statementDateConflict?.previousReconciliationInfo?.reconciledByUserId,n=R((k=>e!=null&&e!==""?ha(ga(k.userState,e)):"")),l=a.useCallback((()=>{i(_t({accountId:s,selectedPeriod:r}))}),[i,s,r]),d=a.useCallback((()=>{i(_t({accountId:s,selectedPeriod:r})),i(Be({statementUploadChosen:!0}))}),[i,s,r]),b=(k,pe)=>{i(Ta(k,pe.split(".")[0]))},g=k=>{O!=null&&i(ba({accountId:s,selectedPeriod:r,fileId:k,statementUploadId:O}))},y=()=>{i(Be({statementUploadChosen:!1}))},D=k=>{i(Ea({accountId:s,selectedPeriod:r,payload:k}))},U=a.useCallback(((k,pe,$e)=>{i(Ca({accountId:k,selectedPeriod:pe,statementUploadId:$e}))}),[i]),F=a.useCallback((k=>{i(Sa({accountId:s,selectedPeriod:r,statementUpdateLocalData:k}))}),[i,s,r]),L=a.useCallback((()=>{O!=null&&i(Ia({accountId:s,selectedPeriod:r,statementUploadId:O}))}),[i,s,r,O]),ee=a.useCallback((()=>{i(Be({statementUploadChosen:!0}))}),[i]),Z=k=>{i(sn({accountId:s,selectedPeriod:r,localData:{accountSource:k}}))},me=a.useCallback((()=>{i(an({accountId:s}))}),[i,s]),Ie=a.useCallback((k=>{i(ue(r,k)),P()}),[i,r,P]),G=a.useCallback((()=>{i(fa({accountId:s,selectedPeriod:r,statementProcessingFailed:!1})),i(ka({accountId:s,selectedPeriod:r}))}),[i,s,r]),Pe=a.useCallback((()=>{i(on({accountId:s}))}),[i,s]),le=h.includes(s)?t.excludedAccountReconciliationByAccountID[s]:void 0;if(le!=null)return S.jsx(Wt,{children:S.jsx(Zt,{$isV3:I===!0,children:S.jsx(Xo,{excludedAccountReconciliation:le,includeAccountFetch:t.includeAccountFetchState,isReconV3Enabled:I,onDismissClick:P,onIncludeIntoReconciliation:Pe})})});if(V!=null){const k=I===!0?S.jsx(es,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:V,monthYearPeriod:r,onDismissClick:P,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:E,onEstablishConnectionClick:T,onEditFileName:b,onDeleteFile:g,onSelectSourceType:Z,filesEndPoint:Ae.fileMicroServiceBaseUrl,authParams:w,openFilePicker:p,onStatementUploadSuccess:D,onUploadWindowOpenedOnce:y,onExcludeFromReconciliation:me,onRetryParsing:U,onReviewClicked:Ie,statementProcessingFailed:V.statementProcessingFailed,statementProcessingDismissedToBackground:V.statementProcessingDismissedToBackground,onDismissStatementProcessingFailed:G,onContinueInBackground:u,onClearStatementProcessingDismissedToBackground:M,onResetStatementProcessingProgress:j,onStatementProcessingProgressChange:ae,onStatementFlowVisibilityChange:f,onReuploadStatement:ee,onStatementFormDataChange:F,onStatementConfirmSave:L,reconciledByName:n,onDismissDateConflict:l,onReuploadAfterDateConflict:d,isReconV3Enabled:I}):S.jsx(ts,{excludeAccountFetch:t.excludeAccountFetchState,accountReconciliation:V,monthYearPeriod:r,onDismissClick:P,plaidConnectionDetails:t.plaidConnectionDetails,onFetchLinkTokenClick:E,onEstablishConnectionClick:T,onEditFileName:b,onDeleteFile:g,onSelectSourceType:Z,filesEndPoint:Ae.fileMicroServiceBaseUrl,authParams:w,openFilePicker:p,onStatementUploadSuccess:D,onUploadWindowOpenedOnce:y,onExcludeFromReconciliation:me});return S.jsx(Wt,{children:S.jsx(Zt,{$isV3:I===!0,children:k})})}return null})),Wt=Le.div`
9
+ display: flex;
10
+ flex-direction: column;
11
+ height: 100%;
12
+ `,Zt=Le.div`
13
+ flex: 1;
14
+ min-height: 0;
15
+ display: flex;
16
+ flex-direction: column;
17
+ box-sizing: border-box;
18
+ min-width: 0;
19
+ overflow-x: hidden;
20
+ overflow-y: ${t=>t.$isV3===!0?"hidden":"auto"};
21
+ `;function xs({companyId:t,closeCustomerRequestDrawer:s,addCustomerRequest:P,resetCustomerRequest:E}){const T=je.getSignedInUser();if(T==null)throw Error("Can't access Customer Request page without signing in...");const i=R((m=>ya(m,t,T)));return a.useEffect((()=>{E()}),[]),S.jsx(S.Fragment,{children:i.fetchState==="In-Progress"||i.companyMonthEndReportTemplatesData.fetchState==="In-Progress"?S.jsx(Cn,{fetchState:"In-Progress"}):S.jsx(ns,{onCloseClick:s,addCustomerRequest:P,snippets:i.companyMonthEndReportTemplatesData,bulletPoints:i.zeniRequestsData??[]})})}const Ds=t=>t.sections.generalExpense.vendors.length+t.sections.reimbursement.vendors.length,{common:{strings:{hyphen:Us,comma:Xt,space:Fs}},dateFormat:In}=as.getLocalizedStrings(),en=Ko,Bs=ra((function(t,s){const{uncategorizedAccounts:P,vendorSearchAutoCompleteData:E,monthEndInsightsCustomerRequestData:T,monthEndInsightsPreviewMode:i,companyId:m,isMissingReceiptsBulkUploadEnabled:I,isTransactionActivityEnabled:c}=s,C=je.getSignedInUser(),h=t.tenantState.currentTenantId,w={userId:C?.userId??"",sessionId:C?.zeniSessionId??"",tenantId:h??""},v=ye(t),{selectedTransactionCategorizationTab:r}=v;return{expenseAutomationViewSelector:v,bulkUploadSelector:I===!0?v.missingReceipts.bulkUpload:void 0,vendorSearchAutoCompleteData:E,authParams:w,receiptUploadEndpoint:`${Ae.accountMicroServiceBaseUrl}`,transactionAttachmentsEndpoint:`${cs}/transaction_attachments`,bulkUploadEndpoint:I===!0?`${Ae.communicationAgentMicroServiceBaseUrl}/1.0/receipts/bulk-upload`:void 0,isDisabled:!1,currentTab:r,monthEndInsightsCustomerRequestData:T,monthEndInsightsPreviewMode:i,allThreadsSectionOpen:!1,enableMonthEndInsightsZeniGPTFeature:!1,loggedInUser:C,uncategorizedAccounts:P,companyId:m,isTransactionActivityEnabled:c}}),(function(t,s){const{themeState:P,isAccountingClassesEnabled:E,isCOTEnabled:T,isUncategorizedExpenseCategoryEnabled:i,isMissingReceiptsBulkUploadEnabled:m,location:I,vendorSearchAutoCompleteData:c,expenseAutomationViewSelector:C,currentTenant:h,uncategorizedAccounts:w,navigate:v,onClickCustomerRequest:r,handleEditClick:p,setActivityLogTransactionId:V}=s,{selectedPeriod:x,currentSelectedView:f,reconciliation:{selectedAccountId:u}}=C,{accountSettingsView:M}=C.jeSchedules,ae=dn(x),j=ze(ae.start),O=ze(ae.end);return{onZeniLogoClick:()=>{P.toggle()},onUploadReceiptAttachment:e=>{J.trackMissingReceiptAttached(x.month,x.year),t(bo(e))},onUploadTransactionReceipt:(e,n,l,d,b,g)=>{t(Gt(e,n,{fetchState:"In-Progress"}));const y=()=>t(Gt(e,n,{fetchState:"Error"}));is(`${Ae.accountMicroServiceBaseUrl}/1.0/transactions/${n}/attachments`,g,n,l,d,b).then((D=>{D!=null?t(Eo(e,D)):y()})).catch(y)},onMissingReceiptsRowClick:(e,n)=>{if(s.openTransactionPanel)return void s.openTransactionPanel(e,n);const l=ie(I.state?.pathnameStackToGoBack,I.pathname);v(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:l,message:"expenseAutomation",origin:"missing_receipts"}})},onUploadReceiptComplete:(e,n)=>{t(ko(e,n)),h!=null&&t(ve({tenantId:h.tenantId,period:n,refreshViewInBackground:!0}))},onUploadReceiptFetchStatus:(e,n,l,d)=>{t(fo(e,{fetchState:n,error:l})),l!=null&&t(nt({messageSection:"missing_receipts_attachment",messageText:"failed",type:"error",showStatusIcon:!0,variables:[{variableName:"__message__",variableValue:d!=null?Fs+Us+d+Xt:Xt}]}))},onUpdateJESchedulesUIState:e=>{t(Io(e))},onUpdateMissingReceiptsUIState:e=>{t(So(e))},onFetchMissingReceiptsList:()=>{O!=null&&j!=null&&t(mn({start:j,end:O},{amount:75,currencyCode:"USD",currencySymbol:"$"},!0,!1))},...m===!0?{onBulkUploadFiles:e=>{t(Ho(e))},onBulkUploadProgress:e=>{t(Qo(e))},onBulkUploadSuccess:e=>{t(Yo({batchId:e}))},onBulkUploadUploadedFileCount:e=>{t(Jo(e))},onConfirmBulkUploadMatch:(e,n,l,d,b)=>{t(No(e,n,l,d,b))},onBulkUploadConfirmMatchAcknowledged:()=>{t(Go())},onSetBulkUploadResultsTab:e=>{t(qo(e))},onSetBulkUploadCompletedSubTab:e=>{t($o(e))},onSetBulkUploadSortConfig:(e,n)=>{t(Yt({sortKey:e,sortOrder:n}))},onClearBulkUpload:()=>{t(jo())},onSearchTransactionsForManualMatch:(e,n)=>{t(en(e,n??void 0))},onLoadMoreManualSearch:()=>{const{manualSearch:e}=C.missingReceipts.bulkUpload;e.nextPageToken!=null&&e.searchQuery!==""&&t(en(e.searchQuery,e.nextPageToken))},onFetchCompletedTransactions:(e,n)=>{t(Lo(e,n))},onClearBulkUploadBatchDetailsForScopeChange:()=>{t(Mo())},onFetchBulkUploadBatches:e=>{t(pn(e))},onFetchMoreBatchDetails:()=>{t(zo())},onResetBulkUploadSort:()=>{t(Yt({sortKey:void 0,sortOrder:void 0}))}}:{},onClearMissingReceiptsTabNavigation:()=>{t(Co())},onSearchTextChanged:e=>{const n=C.currentSelectedView,l=C.selectedTransactionCategorizationTab;n==="transaction_categorization"&&(t(Ze({selectedTab:l,uiState:{searchString:e}})),O!=null&&j!=null&&t(Ce(l,{start:j,end:O},!0,!1,e,void 0,!1,!0)))},onFiltersChange:e=>{const n=C.selectedTransactionCategorizationTab;t(go({filters:e,selectedTab:n}))},onRefresh:()=>{s.trackExpenseAutomationTabAnalytics(!0),t(ho(i))},onClose:()=>{f==="reconciliation"&&u!=null&&t(qt({selectedAccountId:void 0})),v("../")},onBack:()=>{f==="reconciliation"&&u!=null&&t(qt({selectedAccountId:void 0}))},onSaveReconciliation:e=>{t(po(e))},onSaveReconciliationReview:e=>{t(mo(e))},onUpdateStep:e=>{const{selectedPeriod:n}=C,l=ie(I.state?.pathnameStackToGoBack,I.pathname);v(`../${e}/${n.month}-${n.year}`,{state:{pathnameStackToGoBack:l,referrer:C.currentSelectedView}}),t(un(e))},handleLogOutClick:()=>{const e=ie(I.state?.pathnameStackToGoBack,I.pathname);v("/signout",{replace:!0,state:{pathnameStackToGoBack:e,message:"logout"}})},onJeAccountSettingsChange:e=>{const{vendorsAccountSection:n}=e,{prepaidExpensesAccount:l,fixedAssetsAccount:d,accruedExpensesAccount:b}=n,g=et(M.prepaidExpensesAccountList,l.selectedOptions),y=et(M.fixedAssetsAccountList,d.selectedOptions),D=et(M.accruedExpensesAccountList,b.selectedOptions),U={selectedPrepaidExpensesAccountIds:g.map((F=>F.accountId)),selectedFixedAssetsAccountIds:y.map((F=>F.accountId)),selectedAccruedExpensesAccountIds:D.map((F=>F.accountId))};t(uo({data:U}))},onSaveJeAccountSettingsClick:()=>{t(ro())},onJESchedulesFormDataChange(e,n){const{jeScheduleID:l,accumulatedDepreciationCategory:d,scheduleClass:b,scheduleExpenseCategory:g,vendor:y}=n,{allAccountList:D,allClassList:U,allDepreciationAccountList:F}=C.jeSchedules,L=c.entityAutoCompleteView.vendor.length>0?c.entityAutoCompleteView.vendor.find((G=>G.id===y?.selectedOption)):void 0,ee={id:L?.zeniId??y?.selectedOption??"",name:L?.name??y?.defaultOptions.find((G=>G.value===y?.selectedOption))?.label??"",logo:L?.logo},Z=g?.selectedOption!=null?D.find((G=>G.qboId===g.selectedOption)):void 0,me=b?.selectedOption!=null?U.find((G=>G.classId===b.selectedOption)):void 0,Ie=d?.selectedOption!=null?F.find((G=>G.qboId===d.selectedOption)):void 0;t(lo({scheduledJournalEntryID:e,localData:{jeScheduleID:l,scheduledJournalEntryID:e,updatedCategoryId:Z?.accountId,updatedClassId:me?.classId,updatedAccumulatedDepreciationCategoryID:Ie?.accountId,updatedVendor:{id:ee.id,name:ee.name}}}))},ignoreRecommendedJeSchedule(e,n){t(io(e,n))},vendorSearchAutoCompleteActions:{onAutoCompleteInputChange:(e,n)=>{e.trim().length>=2?t(Mt({searchString:e,entityType:n,searchOrigin:"common"})):e.trim().length===0&&t(Fe("common"))},onCancelAutoComplete:()=>{t(Fe("common"))}},onPostJESchedule(e,n){t(co({scheduledJournalEntryID:e,jeScheduleTransactionKey:n}))},clearJeScheduleLocalData(){t(so())},handleJeScheduleClick:(e,n,l)=>{t(oo({selectedJEScheduleKey:n}));const d=ie(I.state?.pathnameStackToGoBack,I.pathname);v(`../../vendors/schedules/${l}/details/${e}`,{state:{pathnameStackToGoBack:d,message:"expenseAutomation",origin:"je_schedules"}})},improveMonthEndInsightsUsingZeniGPTClick:e=>{h!=null&&t(ao(e,h.companyId,h.tenantId))},onClickCustomerRequest:r,setActivityLogTransactionId:V,onCloseAllThreadsSection:()=>{},onCloseFileAttachmentSnackBar:()=>{t(no())},onOpenFileAttachmentSnackBar:()=>{t(nt({messageSection:"cockpit_month_end_email_attachment_upload",messageText:"failed",type:"error",showStatusIcon:!0}))},onRemoveFileAttachment:e=>{t(to(e))},onUpdateFileAttachment:e=>{t(eo({files:e}))},previewMonthEndReport:(e,n,l,d)=>{h!=null&&t($t(e,h.companyId,n,!0,l,d,h.tenantId))},saveMonthEndReport:(e,n,l,d)=>{h!=null&&t($t(e,h.companyId,n,!1,l,d,h.tenantId))},onEditMonthEndInsightsClick:p,sendMonthEndReport:e=>{const n=I.state?.referrer,{selectedPeriod:l,auditSummary:d}=C;h!=null&&d?.auditScorePercentage!=null&&(t(Za(h.companyId,e,h.tenantId)),J.trackInsightsEmailPage(l.month,l.year,!1,"draft",d.auditScorePercentage,Xa().format(In.analytics.MMMDDCommaYYYYformat),n??null))},onTransactionCategorizationRowClick:(e,n)=>{if(s.openTransactionPanel)return void s.openTransactionPanel(e,n);const l=ie(I.state?.pathnameStackToGoBack,I.pathname);v(`../../transaction/${n}/${e}`,{state:{pathnameStackToGoBack:l,message:"expenseAutomation",origin:"transaction_categorization"}})},setLocalDataForCategoryAndClass:(e,n,l,d,b,g,y,D,U,F,L,ee,Z)=>{t(Wa(e,n,l,d,w,b,g,y,D,U,F,L,ee,Z))},onCancelAutoComplete:()=>{t(Fe("common"))},updateExpenseAutomationReconListScrollPosition:e=>{t(Lt({scrollPosition:e}))},onUpdateTab:e=>{s.closeSidePanel?.(),O!=null&&j!=null&&(t(Ce(e,{start:j,end:O},!1,!1)),t(Ka(e)))},onUpdateTransactionCategorizationCompletedSubTab:e=>{s.closeSidePanel?.(),O!=null&&j!=null&&(t(Ha(e)),t(Ce("autoCategorized",{start:j,end:O},!1,!1)))},onUpdateTransactionCategorizationUIState:(e,n)=>{t(Ze({selectedTab:e,uiState:n})),O!=null&&j!=null&&t(Ce(e,{start:j,end:O},!1,!1,n.searchString,null,!0))},onUpdateScrollYOffSetTransactionCategorizationUIState:(e,n)=>{t(Ze({selectedTab:e,uiState:n}))},onFetchTransactionCategorizationList:(e,n,l,d,b,g,y)=>{O!=null&&j!=null&&t(Ce(e,{start:j,end:O},!0,l,n,d,b,g,y))},resetTransactionCategorizationLocalData:(e,n,l,d,b,g,y,D)=>{t(Qa(e,n,l,d,D??null,b,g,!1,y))},updateSelectedVendorForTransaction:(e,n,l,d,b)=>{t(jt({selectedTab:e,transactionId:n,lineId:l,selectedTransaction:d,uncategorizedAccounts:w,updatedVendor:b,isAccountingClassesEnabled:E}))},onSaveUpdateTransactionCategorization:(e,n,l)=>{const d=I.state?.referrer;e==="autoCategorized"?J.trackTransactionsAutoCategorisedPage(x.month,x.year,C.transactionView.totalCountByTab.autoCategorized,n.length,!1,d??null):J.trackTransactionsReviewPage(x.month,x.year,C.transactionView.totalCountByTab.review,n.length,!1,d??null),t(Ya(e,n,l,i))},onUpdateSelectedCheckboxTransactionIds:(e,n)=>{t(Ja({selectedTab:e,transactionIds:n}))},onFetchRecommendationsForEntityCategorizationWithCustomer:(e,n,l,d,b,g,y)=>{const{transactionId:D,transaction:U,lineIds:F}=n;g!=null&&t(Ga({transactionId:D,customerUpdates:g})),t(Na({selectedTab:d,transactionId:D.id,lineId:F[0],selectedTransaction:U,uncategorizedAccounts:w,updatedCustomer:g,selectedEntity:b,isAccountingClassesEnabled:E,isUncategorizedExpenseCategoryEnabled:y})),b!=null&&t(ot({entity:b,amount:e,transactionDetails:n,flowType:"categorization",selectedTab:d,isFetchCOT:T,isUncategorizedExpenseCategoryEnabled:y}))},onFetchRecommendationsForEntityCategorization:(e,n,l,d,b,g,y)=>{const{transactionId:D,transaction:U,lineIds:F}=n;g!=null&&(t(ja({transactionId:D,vendorUpdates:{name:g.name,id:g.id?g.id:void 0}})),t($a({vendorId:g.id?g.id:void 0,localData:{vendorName:g.name,vendorId:g.id?g.id:void 0}}))),g?.id?(t(jt({selectedTab:d,transactionId:D.id,lineId:F[0],selectedTransaction:U,uncategorizedAccounts:w,updatedVendor:g,selectedEntity:b,isAccountingClassesEnabled:E,isUncategorizedExpenseCategoryEnabled:y})),b!=null&&t(ot({entity:b,amount:e,transactionDetails:n,flowType:"categorization",selectedTab:d,isFetchCOT:T,isUncategorizedExpenseCategoryEnabled:y}))):t(qa({selectedTab:d,transactionId:D.id,lineId:F[0]}))},fetchFluxViewOnScroll:(e,n)=>{t(Ve(e,!0,!1,n,!1,!0))},onFetchFluxViewList:()=>{t(Ve(x,!0,!1,null,!1,!1))},markAsReview:(e,n,l,d)=>{J.trackFluxAnalysisReviewed(l.month,l.year,d??!1,e),t(La(n,e,l,d??!1))},onUpdateFluxAnalysisUIState:e=>{t(Ma(e))},updateOperatingExpensesIdsForReview:e=>{t(za({operatingExpenseIds:e,selectedPeriod:x}))},redirectToVendorDetailPage:e=>{if(s.tenantEmailDomain!=null){const n=vs(e.id,e.qboId,s.tenantEmailDomain),l=ie(s.location.state?.pathnameStackToGoBack,s.location.pathname);s.navigate(n,{state:{pathnameStackToGoBack:l,message:"expenseAutomation",referrer:"Vendor List",origin:"flux_analysis"}})}},updateSectionIdsForReview:e=>{t(_a({sectionId:e,selectedPeriod:x}))},onFetchReimbursementView:(e,n,l)=>{t(Ve(e,!0,!1,n,!0,l))},onReviewClicked:e=>{t(ue(x,e))},setOpenDrawerClicked:e=>{t(_e({selectedDrawerAccountId:e}))},onFetchLinkTokenClick:(e,n)=>{t(cn("expense_automation_reconcile",e,n))},onEstablishConnectionClick:(e,n)=>{const l=h?.companyId;l!=null&&(t(ln(e,l,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",n)),t(rn({accountId:n,connectionInProgress:!0})))},onAddStatementClick:e=>{t(_e({selectedDrawerAccountId:e})),t(sn({accountId:e,selectedPeriod:x,localData:{accountSource:"bank_statement"}})),t(Be({statementUploadChosen:!0}))},onReloadReconciliationListPage:()=>{t(ue(x,void 0,!0,!1))},onUpdateReconcileTabLocalData:e=>{t(Oa({selectedTransactionIds:e}))},onReconTabColumnSortConfigChanged:(e,n)=>{t(Va({sortKey:e,sortOrder:n}))},onReconReviewTabColumnSortConfigChanged:(e,n)=>{t(Ba({sortKey:e,sortOrder:n}))},onReconTabUpdate:e=>{s.closeSidePanel?.(),t(Fa({selectedTab:e}))},updateReconReviewTabLocalData:(e,n,l)=>{const d=e.vendor?.id;l&&d!=null&&t(Da(d)),t(Ua({data:e,transactionId:n}))},onReconMatchedTransactionClick:e=>{if(s.openTransactionPanel)return void s.openTransactionPanel(e,at("bill"));const n=ie(I.state?.pathnameStackToGoBack,I.pathname);v(`../../transaction/bill/${e}`,{state:{pathnameStackToGoBack:n,message:"expenseAutomation",origin:"reconciliation"}})},onReloadPage:()=>{window.location.reload()},onBackClick:()=>{v(-1)},onReconListPageScroll:e=>{t(Lt({scrollPosition:e}))},onVendorAutoCompleteInputChange:e=>{e.trim().length>=2?t(Mt({searchString:e,searchOrigin:"common"})):e.trim().length===0&&t(Fe("common"))},onReconNodeCollapseToggled:(e,n)=>{t(xa({nodeId:e,collapsed:n}))},updateSectionCollapseStatus:()=>{},onExcludeAccountFromReconciliation:e=>{t(an({accountId:e}))},onIncludeAccountIntoReconciliation:e=>{t(on({accountId:e}))}}}),((t,s,P)=>{const{isMissingReceiptsBulkUploadEnabled:E,...T}=P;return(function(i,m,I){return{...i,...m,...I,onUploadTransactionReceipt:(c,C,h,w,v)=>{m.onUploadTransactionReceipt(c,C,h,w,v,i.authParams)}}})(t,s,T)}))(os(ss)),Vs=Ts((function(t){const s=t.displayName??t.name??"Component",P=tn.memo(t),E=T=>{const i=Se(),m=(function(){const f=Se(),u=R((M=>ye(M).reconciliation.selectedDrawerAccountId));return{isOpen:u!=null,selectedAccountId:u,openPanel:a.useCallback((M=>{f(_e({selectedDrawerAccountId:M}))}),[f]),closePanel:a.useCallback((()=>{f(_e({selectedDrawerAccountId:void 0}))}),[f])}})(),I=R((f=>ye(f).reconciliation)),c=R((f=>Oe(f))),C=a.useCallback(((f,u)=>{i(cn("expense_automation_reconcile",f,u))}),[i]),h=a.useCallback(((f,u)=>{const M=c?.companyId;M!=null&&(i(ln(f,M,"expense_automation_reconcile",void 0,"link_account_no_microdeposit",u)),i(rn({accountId:u,connectionInProgress:!0})))}),[i,c?.companyId]),w=a.useMemo((()=>{if(m.isOpen&&m.selectedAccountId!=null)return S.jsx(Rs,{reconciliation:I,selectedDrawerAccountId:m.selectedAccountId,onClose:m.closePanel,onFetchLinkTokenClick:C,onEstablishConnectionClick:h})}),[m.isOpen,m.selectedAccountId,m.closePanel,I,C,h]),v=a.useMemo((()=>({reconPanelContent:w,reconSidePanelIsOpen:m.isOpen,closeReconSidePanel:m.closePanel})),[w,m.isOpen,m.closePanel]),{useFeatureGate:r}=Me(),{isFeatureEnabled:p}=r(Q.isReconV3Enabled),V=a.useContext(Ht),x=a.useMemo((()=>m.isOpen?p===!0?{selectedItemId:m.selectedAccountId}:{closePanel:m.closePanel,selectedItemId:m.selectedAccountId}:V),[m.isOpen,m.closePanel,m.selectedAccountId,V,p]);return S.jsx(Ht.Provider,{value:x,children:S.jsx(P,{...T,...v})})};return E.displayName=`withReconSidePanel(${s})`,E})((({closeSidePanel:t,openTransactionPanel:s,panelContent:P,sidePanelIsFullView:E,sidePanelIsOpen:T,reconPanelContent:i,reconSidePanelIsOpen:m,closeReconSidePanel:I})=>{const{isAiCfoOpen:c,setIsAiCfoOpen:C}=ls(),h=rs(),{isOpen:w}=ds(),v=nn(),r=tt(),p=Se(),{isAiCfoAccessEnabled:V,onAskAiCfoClick:x}=Sn({mobileExploreReferrer:"Transaction categorization"}),f=a.useCallback((()=>{T===!0&&E!==!0&&t?.()}),[t,T,E]),{areTenantIdsInSync:u}=hn(),M=(()=>{const o=R((Y=>ye(Y))),A=tt(),{currentSelectedViewFetchState:N,currentSelectedView:q,selectedPeriod:B}=o,te=Xe(q),K=Xe(N.fetchState),X=a.useCallback((Y=>{const ne=A.state?.referrer;q==="transaction_categorization"&&(o.selectedTransactionCategorizationTab==="review"?J.trackTransactionsReviewPage(B.month,B.year,o.transactionView.totalCountByTab.review,0,Y,ne??null):J.trackTransactionsAutoCategorisedPage(B.month,B.year,o.transactionView.totalCountByTab.autoCategorized,0,Y,ne??null)),q==="missing_receipts"&&J.trackMissingReceiptsPage(B.month,B.year,Y,o.missingReceipts.transactions.length,ne??null),q==="je_schedules"&&J.trackMonthCloseScheduleListPage(B.month,B.year,Y,o.jeSchedules.draftSchedules.length,o.jeSchedules.resolveSchedules.length,ne??null),q==="flux_analysis"&&J.trackFluxAnalysisPage(B.month,B.year,Y,Ds(o.fluxAnalysis),ne??null),q==="month_end_insights"&&o.auditSummary?.auditScorePercentage!=null&&J.trackInsightsEmailPage(B.month,B.year,Y,"draft",o.auditSummary.auditScorePercentage,null,ne??null)}),[B,o]);return a.useEffect((()=>{K===N.fetchState&&q===te||N.fetchState!=="Completed"||X(!1)}),[q,N.fetchState,te]),X})(),ae=us(),[j,O]=a.useState(!1),e=R((o=>zt(o))),n=R((o=>Oe(o))),[l,d]=a.useState(!1),[b,g]=a.useState(!1),[y,D]=a.useState([]),[U,F]=a.useState(null),L=a.useCallback((()=>{F(null)}),[]),ee=U?.contentType==="activity"?U.detail.transactionId:void 0,Z=a.useCallback((o=>{o!=null?(c&&C(!1),h(),f(),F({contentType:"activity",detail:{transactionId:o}})):F((A=>A?.contentType==="activity"?null:A))}),[f,c,h,C]),me=a.useCallback((o=>{c&&C(!1),h(),f(),F({contentType:"transfer",detail:o})}),[f,c,h,C]),Ie=a.useCallback((()=>{h(),L(),f(),x()}),[f,L,x,h]),G=a.useRef(c);a.useEffect((()=>{c===!0&&G.current===!1&&(h(),L(),f()),G.current=c}),[f,L,c,h]);const Pe=a.useRef(w);a.useEffect((()=>{w===!0&&Pe.current===!1&&(c&&C(!1),L(),T===!0&&E!==!0&&t?.()),Pe.current=w}),[L,t,w,c,C,E,T]);const le=T===!0&&E!==!0,k=a.useRef(le);a.useEffect((()=>{le&&!k.current&&(c&&C(!1),h(),L()),k.current=le}),[L,c,le,h,C]);const[pe,$e]=a.useState(!1),st=a.useRef(!1),{selectedTab:ct}=Vt(),{tenantEmailDomain:fn}=Vt(),[qe,it]=a.useState(r.state?.message==="comingFromTransactionDetail"),lt=r.state?.message==="comingFromOverview",kn=ms(),Ge=je.getSignedInUser(),{useDynamicConfig:En,useFeatureGate:oe}=Me(),{configValue:bn}=En(ps.enableUncategorizedExpenseCategory),se=bn?.uncategorized_expense_category_enabled===!0,{isFeatureEnabled:rt}=oe(Q.isRealtimeInsightsFeatureEnabled),{isFeatureEnabled:fe}=oe(Q.isMissingReceiptsBulkUploadEnabled),{isFeatureEnabled:Ne}=oe(Q.isTransactionActivityEnabled),{isFeatureEnabled:dt}=oe(Q.isCreateTransferEntryFromExpenseEnabled),{isFeatureEnabled:Tn}=oe(Q.isExpenseAutomationCommentingEnabled),{isFeatureEnabled:yn}=oe(Q.isProjectsTransactionsEnabled),{isFeatureEnabled:vn}=oe(Q.isReconV3Enabled),{isFeatureEnabled:An}=oe(Q.isJEScheduleCOTEnabled),Pn=a.useCallback((o=>{const A=at(o.view==="reconciliation"?"bill":"expense");s?.(o.entityId,A)}),[s]),wn=R((o=>To(o,"common"))),$=R((o=>ye(o))),{categoryOptions:Rn,paymentAccountNames:xn}=R((o=>yo(o.accountState))),Dn=R((o=>vo(o.classState))),{monthEndCloseChecksView:H,currentSelectedView:_,selectedPeriod:z,selectedTransactionCategorizationTab:Je,currentSelectedViewBackgroundRefreshFetchState:Un,currentSelectedViewFetchState:he,jeSchedules:Ye,reconciliation:ut}=$;fs(_==="transaction_categorization");const Fn=$.transactionView.saveStatus.fetchState,mt=$.transactionView.transactions,pt=a.useRef(mt);pt.current=mt;const ht=R((o=>o.expenseAutomationTransactionsViewState?.transactionCategorizationView)),gt=R((o=>o.expenseAutomationTransactionsViewState?.selectedTransactionCategorizationTab)),Ct=a.useRef(ht);Ct.current=ht;const St=a.useRef(gt);St.current=gt;const ce=ks(Fn,(()=>{const o=[],A=St.current,N=Ct.current,q=N!=null&&A!=null?N[A]:void 0;if(q?.transactionReviewLocalDataById!=null)for(const te of Object.values(q.transactionReviewLocalDataById)){const K=te?.transactionReviewLocalData?.lineItemById;if(K!=null)for(const X of Object.values(K)){const Y=X?.account;Y?.accountId!=null&&o.push(Y.accountId)}}const B=pt.current;for(const te of B)for(const K of te.lines??[])"account"in K&&K.account?.accountId!=null&&o.push(K.account.accountId);return o}));a.useEffect((()=>{_==="transaction_categorization"&&T!==!0||Z(void 0)}),[_,Z,T]),a.useEffect((()=>{m===!0&&I?.()}),[_,ut.selectedAccountId]);const Bn=$.transactionView.selectedTransactionCategorizationCompletedSubTab,we=`${Je}|${Bn}`,Re=a.useRef(null),It=a.useRef(null);a.useEffect((()=>{Re.current!==null?Re.current!==we&&(Re.current=we,_==="transaction_categorization"&&L()):Re.current=we}),[L,_,we]);const Vn=R((o=>ee==null?void 0:Ao(o.transactionState,ee))),re=Vn?.qboId,ft=R((o=>re==null?void 0:Po(o,re)));a.useEffect((()=>{re!=null&&p(wo(re))}),[p,re]);const{createTransferEntryStatus:kt,creditCardTransferAccountsList:Et,transferAccounts:bt}=$.transactionView,Tt=a.useCallback((o=>Es(p,o)),[p]),yt=a.useMemo((()=>_!=="transaction_categorization"||U==null?null:U.contentType==="activity"?Ne===!0?S.jsx(hs,{activityLogView:ft,qboId:re,onClose:()=>F(null),selectedTransactionId:U.detail.transactionId,isQuickViewCardStyle:!0},String(U.detail.transactionId)):null:U.contentType==="transfer"?S.jsx(gs,{createTransferEntryStatus:kt,transaction:U.detail,transferAccounts:U.detail.transactionType==="credit_card_payment"?Et:bt,onClose:()=>F(null),onCreateTransfer:Tt,isQuickViewCardStyle:!0},String(U.detail.transactionId)):null),[_,U,Ne,ft,re,kt,Et,bt,Tt]),On=yt!=null,{selectedAccountId:ke}=ut,vt=Xe(Ye.accountSettingsView.saveState.fetchState),_n=R((o=>Ro(o.accountState,o.accountListState,"accountList"))),zn=R((o=>xo(o))),Ee=ct!=null?Do(ct):_,Mn=R((o=>o.entityAutoCompleteState.autoCompleteText.common));if(gn({isDataReady:he.fetchState==="Completed"}),Ge==null)throw Error("Can't access expense automation screen without signing in...");const At=dn(z),be=ze(At.start),Te=ze(At.end);if(be==null||Te==null)throw Error(`Invalid start - ${be} and end - ${Te} period from given ${z}`);const Ln=a.useCallback((()=>{d(!1)}),[]),jn=a.useCallback((()=>{g(!0)}),[]),$n=a.useCallback((o=>{D(o),g(!1)}),[]),qn=a.useCallback((()=>{D([])}),[]),xe=$.missingReceipts.bulkUpload.phase,Pt=$.missingReceipts.bulkUpload.currentBatchId;a.useEffect((()=>{fe===!0&&_==="missing_receipts"&&xe==="matching"&&Pt!=null&&p(pn({cacheOverride:!0}))}),[fe,_,xe,Pt,p]);const wt=Ge?.userId,Gn=z.month,Nn=z.year,Rt=n?.tenantId;a.useEffect((()=>{_==="missing_receipts"&&fe!==!1&&xe==="idle"&&wt!=null&&Rt!=null&&p(Uo())}),[_,fe,xe,wt,Rt,Gn,Nn,p]),a.useEffect((()=>{e.newVendorState?.vendorDetailLocalData?.vendorName!=null?O(!0):O(!1)}),[e.newVendorState?.vendorDetailLocalData?.vendorName]),a.useEffect((()=>{Ee!=null&&_!==Ee&&p(un(Ee))}),[Ee]),a.useEffect((()=>{pe===!1&&he.fetchState==="Completed"&&u&&($e(!0),p(Nt(!1,!1,se)))}),[pe,he,u,se]),a.useEffect((()=>{const o={month:z.month,year:z.year},A=It.current;It.current=o,A===null||A.month===o.month&&A.year===o.year||!lt&&u&&(p(Nt(!1,!1,se)),p(ue(z,ke,!1,!1)))}),[z.month,z.year,u,se]);const xt=a.useCallback(((o=!1,A=!1)=>{const N={start:be,end:Te};switch(_){case"transaction_categorization":p(Ce(Je,N,o,!qe,void 0,void 0,A,void 0,se)),it(!1);break;case"flux_analysis":p(Ve(z,o,A,null));break;case"month_end_insights":if(A===!1){const q=new Date(z.year,z.month,0),B=Bo(q.toDateString()).format(In.analytics.YYYYDashMMDashDDFormat);p(Vo(!0,n.companyId,n.tenantId,B)),p(Oo(n.companyId,n.tenantId))}break;case"je_schedules":p(Fo(N,A));break;case"missing_receipts":p(mn(N,{amount:75,currencyCode:"USD",currencySymbol:"$"},o,A));break;default:p(ue(z,ke,o,A))}}),[_,be,Te,n.companyId,n.tenantId,Je,z,ke,qe,it,se]);a.useEffect((()=>{_===Ee&&he.fetchState==="Not-Started"&&u&&xt(!0)}),[he,be,Te,n.companyId,n.tenantId,u]),a.useEffect((()=>{lt||qe||st.current||Un.fetchState==="In-Progress"||he.fetchState!=="Completed"||(st.current=!0,xt(!0,!0))}),[]),a.useEffect((()=>{H.fetchState!=="In-Progress"&&H.fetchState!=="Completed"&&H.fetchState!=="Error"&&n?.tenantId!=null&&p(ve({tenantId:n.tenantId,period:z,refreshViewInBackground:!1}))}),[H.fetchState,n?.tenantId]),a.useEffect((()=>{$.monthEndInsights?.previewMonthEndReportStatus?.fetchState==="Completed"?d(!0):d(!1)}),[$.monthEndInsights?.previewMonthEndReportStatus?.fetchState]),a.useEffect((()=>{$.monthEndInsights?.sendMonthEndReportStatus?.fetchState==="Completed"&&u&&(p(ve({tenantId:n.tenantId,period:z,refreshViewInBackground:!0})),p(_o({companyId:n.companyId})),v("../"))}),[$.monthEndInsights?.sendMonthEndReportStatus?.fetchState,n.tenantId,z,n.companyId,u]),a.useEffect((()=>{const o=setInterval((()=>{H.fetchState!=="In-Progress"&&H.fetchState==="Completed"&&p(ve({tenantId:n.tenantId,period:z,refreshViewInBackground:!0}))}),3e5);return()=>clearInterval(o)}),[H.fetchState,n.tenantId,z,p]),a.useEffect((()=>{const o=setInterval((()=>{_==="reconciliation"&&ke==null&&$.reconciliation.fetchStatus.fetchState==="Completed"&&$.reconciliation.refreshStatus.fetchState!=="In-Progress"&&p(ue(z,void 0,!0,!0))}),3e5);return()=>clearInterval(o)}),[_,p,$.reconciliation.fetchStatus.fetchState,$.reconciliation.refreshStatus.fetchState,ue,ke,z]);const Jn=Kt();a.useEffect((()=>{const o=(H.monthEndCloseChecks?.monthEndCloseCheckList.find((A=>A.id==="month_end_insights"))?.isDisabled??!1)&&!rt;_!=="month_end_insights"||!o&&H.monthEndCloseChecks?.reportEmailSentDate==null||v("../")}),[_,H.monthEndCloseChecks]);const Yn=m===!0?i:P,Qn=m===!0||T===!0,Hn=m===!0?I:t;a.useEffect((()=>{vt==="In-Progress"&&Ye.accountSettingsView.saveState.fetchState==="Completed"&&p(Jt())}),[vt,Ye.accountSettingsView.saveState.fetchState,Jt]);const{transactionId:Dt,onSaveVendor:Kn,onSaveSuccess:Wn,onCancel:Zn,vendorViewDetails:Xn}=(({expenseAutomationViewSelector:o,closeDrawerHandler:A,currentSelectedView:N,isUncategorizedExpenseCategoryEnabled:q})=>{const B=Se();let te,K,X;const Y=Kt(),ne=o.transactionView;let Ut=()=>{};const{transactions:ea,selectedTransactionId:ge,selectedTransactionLineId:De,transactionLocalData:ta}=ne;if(N==="transaction_categorization"){const Qe=ta.find((de=>de.transactionId===ge)),W=ea.find((de=>de.id===ge)),Ft=De!=null?Qe?.transactionReviewLocalData?.lineItemById[De]:void 0,Bt=Ft?.account;K=Ft?.class?.classId,te=["Uncategorized Income","Uncategorized Expense"].includes(Bt?.accountName??"")?void 0:Bt?.accountId;const aa=ys(ge,W?.typeOfTransaction);W!=null&&aa&&(X={id:ge,type:at(W.typeOfTransaction)}),Ut=()=>{if(ge!=null&&De!=null&&W!=null){const de=ne.transactionLocalData.find((Ue=>Ue.transactionId===ge))?.transactionReviewLocalData;if(de!=null&&W.lines!=null&&W.lines.length>0){const Ue=de.lineItemById[De];let He=de.selectedEntity;if(Ra(W)||(He=Ue.selectedEntityLine),He!=null){const oa=He,sa={transactionId:{id:W.id,type:W.type},transaction:W,lineIds:W.lines.map((ca=>ca.id))??[]};B(ot({entity:oa,amount:Ue.amount.amount,transactionDetails:sa,flowType:"categorization",selectedTab:o.selectedTransactionCategorizationTab,isFetchCOT:Y,isUncategorizedExpenseCategoryEnabled:q}))}}}}}const na=R((Qe=>zt(Qe,void 0,te,K)));return{transactionId:X,onSaveVendor:()=>{B(wa(X,void 0,!1,!0))},onSaveSuccess:Ut,onCancel:()=>{X!=null&&B(va({transactionId:X})),B(Aa()),B(Pa()),A()},vendorViewDetails:na}})({expenseAutomationViewSelector:$,closeDrawerHandler:()=>{O(!1)},currentSelectedView:_,isUncategorizedExpenseCategoryEnabled:se});return kn?.loggedInUserRoleMap==null?H.fetchState==="Error"?S.jsx(Cs,{onGoHome:()=>v("../",{replace:!0}),onReload:()=>window.location.reload()}):S.jsx(Cn,{fetchState:"In-Progress"}):S.jsxs(S.Fragment,{children:[S.jsx(As,{isOpen:b,drawerLeftMargin:new Ss(0,0,300,650),onClose:()=>{g(!1)},children:S.jsx(Os,{onClick:o=>o.stopPropagation(),children:S.jsx(xs,{companyId:n.companyId,closeCustomerRequestDrawer:()=>g(!1),addCustomerRequest:$n,resetCustomerRequest:qn})})}),Dt!=null&&j&&S.jsx(bs,{isOpen:j,transactionId:Dt,onSaveVendor:Kn,onSaveSuccess:Wn,onCancel:Zn,vendorViewDetails:Xn}),S.jsx(Bs,{events:[],eventCallback:(o,A,N)=>{},navigate:v,location:r,themeState:ae,categoryOptions:Rn,classesForFilters:Dn,accountsForFilters:xn,vendorSearchAutoCompleteData:{autoCompleteText:Mn,entityAutoCompleteView:wn},expenseAutomationViewSelector:$,isMissingReceiptsBulkUploadEnabled:fe,monthEndInsightsPreviewMode:l,monthEndInsightsCustomerRequestData:y,isRealtimeInsightsFeatureEnabled:rt,isCreateTransferEntryFromExpenseEnabled:dt,isUncategorizedExpenseCategoryEnabled:se,isAccountingClassesEnabled:zn,isProjectsTransactionsEnabled:yn,isCOTEnabled:Jn,isJEScheduleCOTEnabled:An,currentTenant:n,companyId:n.companyId,signedInUser:Ge,isTransactionActivityEnabled:Ne,isRightPanelOpen:On,rightSidePanel:yt,onOpenTransferRightPanel:dt===!0?me:void 0,uncategorizedAccounts:_n,onClickCustomerRequest:jn,handleEditClick:Ln,tenantEmailDomain:fn,trackExpenseAutomationTabAnalytics:M,setActivityLogTransactionId:Z,closeSidePanel:Hn,openTransactionPanel:s,sidePanelIsOpen:Qn,sidePanelIsFullView:m!==!0&&E,panelContent:Yn,isAiCfoAccessEnabled:V,onAskAiCfoClick:Ie,isExpenseAutomationCommentingEnabled:Tn,isReconV3Enabled:vn,onExpenseAutomationCommentingThreadClick:Pn,sidePanelListPercent:m===!0?66:void 0}),ce.showPopup&&ce.popupType!=null&&S.jsx(Is,{popupType:ce.popupType,currencySymbol:ce.currencySymbol,accountId:ce.popupAccountId??"",accountName:ce.popupAccountName??"",onSubmit:ce.handleSubmit,onDismiss:ce.handleDismiss})]})}))),Os=Le(la)`
22
+ display: flex;
23
+ min-height: 100%;
24
+ flex-direction: column;
25
+ `;function cc(){return S.jsxs(da,{children:[S.jsx(Ke,{path:"*",element:S.jsx(Ps,{})}),S.jsx(Ke,{path:"/:selectedTab/:selectedPeriod/*",element:S.jsx(Vs,{})}),S.jsx(Ke,{path:"*",element:S.jsx(ia,{})})]})}export{cc as default};
@@ -0,0 +1 @@
1
+ import{j as s}from"./liveblocks-DJbBe3tc.js";import{a as r}from"./sentry-C6T1HHHS.js";import{a5 as i,a6 as l,a7 as p,s as d}from"./index-D9NLhglj.js";import"./mui-ts7KHm6i.js";import m from"./NotFoundScreen-DsR8VsQv.js";import{h as u,g as b}from"./core-BfWJ7zKT.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]="6a5c7a1c-cf7f-40e6-99b9-63f1853bff19",e._sentryDebugIdIdentifier="sentry-dbid-6a5c7a1c-cf7f-40e6-99b9-63f1853bff19")}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),c=n.poppedPathname??k();e(c,{state:{pathnameStackToGoBack:n.newStack}})})()}),[]),o=i(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};
@@ -0,0 +1 @@
1
+ import{a as r}from"./sentry-C6T1HHHS.js";import{u as f,h as l,g as m}from"./core-BfWJ7zKT.js";import{hC as p,MO as g,MP as b}from"./zeni-epic-state-kow6PLud.js";import{u as _,L as h,z as y}from"./index-D9NLhglj.js";import"./liveblocks-DJbBe3tc.js";import"./recharts-DNnhB5R_.js";import"./mui-ts7KHm6i.js";import"./analytics-BP5D4JyB.js";import"./plaid-Cv0mPYlm.js";import"./dnd-tQgCG5z3.js";import"./stripe-cKAAJElX.js";import"./lottie-BaCgeYyk.js";import"./lexical-Bg8ldM3i.js";import"./pdf-C9HGpLCu.js";import"./utils-xWcqC4Wl.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]="01741b05-80b9-4544-88f8-dc62844efb5f",e._sentryDebugIdIdentifier="sentry-dbid-01741b05-80b9-4544-88f8-dc62844efb5f")}catch{}})();function P(){const e=f(),n=l(),o=m(),{setLoading:i,clearAllLoading:d}=_(),s=r.useRef(!1);return r.useLayoutEffect((()=>{i(h.CONNECTION_AUTH)}),[i]),r.useEffect((()=>{if(s.current)return;s.current=!0;const a=new URLSearchParams(o.search).get("code"),u=sessionStorage.getItem("hubspot_oauth_pending");if(sessionStorage.removeItem("hubspot_oauth_pending"),a!=null&&u!=null){const t=JSON.parse(u);e(p(t.tenant_id,t.connection_id,g("revenue"),b("hubspot"),{authorization_code:a,client_id:t.client_id,client_secret:t.client_secret,redirect_uri:t.redirect_uri}))}d();const c=y.getActiveTenantForUser();n(c?.tenantEmailDomain!=null?`/${c.tenantEmailDomain}/settings/integrations`:"/",{replace:!0})}),[]),null}export{P as default};
@@ -0,0 +1,72 @@
1
+ import{j as t}from"./liveblocks-DJbBe3tc.js";import{i as S,n as x,h as C,g as y,u as ee,t as te,j as N,N as ae,o as ne,p}from"./core-BfWJ7zKT.js";import{MH as k,MI as v,MJ as F,BD as B,Bp as T,MK as D,ML as oe,MM as ie,Bt as se,fE as $,BA as le,Bx as re}from"./zeni-epic-state-kow6PLud.js";import{J as g,o as r,q as de,f as j,m as G,r as ce,s as me,U as pe,v as H,w as ue,i as he,G as xe,x as ge,E as fe,y as be,B as we,A as Se,n as ye,C as ke,O as ve,F as je,Y as $e}from"./index-D9NLhglj.js";import{n as m}from"./mui-ts7KHm6i.js";import f from"./NotFoundScreen-DsR8VsQv.js";import{a as I}from"./sentry-C6T1HHHS.js";import"./recharts-DNnhB5R_.js";import"./analytics-BP5D4JyB.js";import"./plaid-Cv0mPYlm.js";import"./dnd-tQgCG5z3.js";import"./stripe-cKAAJElX.js";import"./lottie-BaCgeYyk.js";import"./lexical-Bg8ldM3i.js";import"./pdf-C9HGpLCu.js";import"./utils-xWcqC4Wl.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]="278ff846-12b1-4ab5-a1cb-b8609bcaed90",e._sentryDebugIdIdentifier="sentry-dbid-278ff846-12b1-4ab5-a1cb-b8609bcaed90")}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 ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
10
+ `,Ce=x((function(e){const a=k(e),n=v(e),{companyName:o}=a;return{companyName:o,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,magicLinkViewState:a}}),(function(e,a){const{vendorId:n,billId:o}=a;return{onFetchBankName:i=>{e(T(i))},onSaveHandler:i=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(o),e(B(i,"standard",n,o))},onACHDetailsUpdated:i=>{const{bankAccountSection:l}=i;e(F({data:l}))}}}))(de);function M(){const e=g(),{vendorId:a,billId:n}=S();return a==null||n==null?t.jsx(f,{}):t.jsx(t.Fragment,{children:t.jsx(Ie,{windowSize:e,children:t.jsx(Ce,{vendorId:a,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 ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
19
+ `,De=x((function(e,a){const{isSubPage:n}=a;return{addressToEdit:D(e),googleAPIKey:G.googleMapsAPIKey,isSubPage:n}}),(function(e,a){const{navigate:n,location:o}=a,i=()=>{const l=me(o.state?.pathnameStackToGoBack),s=l.poppedPathname??Pe();n(s,{state:{pathnameStackToGoBack:l.newStack}})};return{onSubmitHandler:l=>{const s=ze(l);e(oe({addressToCreate:s})),i()},onCancel:()=>{i()}}}))(ce);function Ae({isSubPage:e}){const a=C(),n=y(),o=g();return t.jsx(t.Fragment,{children:t.jsx(Be,{windowSize:o,children:t.jsx(De,{location:n,navigate:a,isSubPage:e===!0,googleAPIKey:G.googleMapsAPIKey})})})}const Pe=(e=2)=>{let a="../";for(let n=0;n<e;n++)a=`${a}../`;return a},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}),Le=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 ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
28
+ `,Ee=x((function(e){const a=k(e),n=v(e),o=D(e),{companyName:i}=a;return{companyName:i,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}}),(function(e,a){const{navigate:n,location:o,vendorId:i,billId:l}=a;return{onFetchBankName:s=>{e(T(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(s,"us-domestic",i,l))},onWireDetailsUpdated:s=>{const{bankAccountSection:d}=s;e(F({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("us-domestic","address"),d=H(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}}))(pe);function Ne(){const e=C(),a=y(),n=g(),{vendorId:o,billId:i}=S();return o==null||i==null?t.jsx(f,{}):t.jsx(t.Fragment,{children:t.jsx(Le,{windowSize:n,children:t.jsx(Ee,{location:a,navigate:e,vendorId:o,billId:i})})})}const Me=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 ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
37
+ `,Fe=x((function(e){const a=k(e),n=v(e),o=D(e),{companyName:i}=a;return{companyName:i,isDisabled:a.fetchState!=="Completed"?"disabled":void 0,magicLinkBankAccountDetails:n,mailingAddressDetails:o,magicLinkViewState:a}}),(function(e,a){const{navigate:n,location:o,vendorId:i,billId:l}=a;return{onFetchBankNameBySwift:s=>{e(se(s))},onSaveHandler:s=>{j.trackBillPayMagicLinkSubmitBankAccountDetails(l),e(B(s,"international",i,l,a.isLocalCurrencyEnabled))},onBankDetailsUpdated:s=>{const{internationalWireSwiftAccountSection:d}=s;e(ie({data:d}))},onAddressClick:()=>{const s=o.pathname.replace("international","address"),d=H(o.state?.pathnameStackToGoBack,o.pathname);n(s,{state:{pathnameStackToGoBack:d}})}}}))(xe);function Te(){const e=C(),a=y(),n=g(),{vendorId:o,billId:i}=S(),{useFeatureGate:l}=ue(),{isFeatureEnabled:s}=l(he.isBillPayLocalCurrencyFeatureEnabled);return o==null||i==null?t.jsx(f,{}):t.jsx(Me,{windowSize:n,children:t.jsx(Fe,{location:a,navigate:e,vendorId:o,billId:i,isLocalCurrencyEnabled:s})})}const Ge={containerWidth:new je(100,58)},He=m(ke)`
38
+ width: ${r.sp4};
39
+ height: ${r.sp4};
40
+ margin-bottom: ${r.sp3};
41
+ margin-top: ${r.sp3};
42
+ margin-left: ${r.sp8};
43
+ cursor: pointer;
44
+ position: absolute;
45
+ color: ${e=>e.theme.colors.brandColorJade};
46
+ `,Ke=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
+ `,Ve=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 ${r.sp1} ${e.theme.colors.dropShadowNormal}`};
60
+ padding-top: ${e=>e.windowSize!=="small"?r.sp2:"0px"};
61
+ `,_e=m.div`
62
+ display: flex;
63
+ flex-direction: column;
64
+ align-items: center;
65
+ justify-content: center;
66
+ padding: ${e=>e.windowSize==="small"?r.sp3:`62px ${r.sp6} ${r.sp9} ${r.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
+ `,Ue=x((function(e,a){return{file:a.file,type:a.type}}))(ve);function h({appContent:e}){const a=ee(),n=y(),{tenantEmailDomain:o,vendorId:i,billId:l}=S(),[s]=te(),d=s.get("token"),K=n.pathname.includes("address"),b=g(),V=ge(),A=fe(),w=be(),_=()=>{V.toggle()},U=N((u=>k(u))),W=N((u=>v(u))),{authParams:J,fetchState:c,billAttachment:O,billFetchState:P,companyName:Y,currencySymbol:q,amount:Q}=U,{tenantId:z,userId:L,sessionId:E}=J,{fetchState:R,internationalBankAccountCreateStatus:X}=W;return I.useEffect((()=>{$()}),[]),I.useEffect((()=>{w&&c==="Not-Started"&&i!=null&&o!=null&&d!=null&&a(le(i,o,d))}),[w,c,i,o,d,a]),I.useEffect((()=>{w&&c==="Completed"&&($(L,E,z),l!=null&&a(re(l)))}),[c,w,L,E,z,l,a]),c==="Error"?t.jsx(f,{}):R==="Completed"||X.fetchState==="Completed"?($(),t.jsx(ae,{to:"../../../../../../../bank/account/save/success",replace:!0,relative:"path"})):c==="In-Progress"?t.jsx(we,{fetchState:c,style:{height:"100vh",backgroundColor:A.colors.grey5,boxShadow:`0px 2px ${r.sp1} ${A.colors.dropShadowNormal}`}}):t.jsxs(t.Fragment,{children:[c==="Completed"&&P==="Completed"&&t.jsx(Se,{analytics:j,onLoad:u=>(Z=>Z.trackBillPayMagicLinkPageLoad(o??"",i??"",Y,l??"",We(n.pathname),q,Q))(u)}),t.jsxs(Ke,{windowSize:b,children:[b!=="small"?t.jsx(He,{onClick:_}):null,t.jsx(_e,{windowSize:b,isAddressPage:K,children:P==="In-Progress"?t.jsx(ye,{size:"ExtraLarge",start:!0}):t.jsx(Ue,{file:O,type:"bill"})}),t.jsx(Ve,{windowSize:b,children:e})]})]})}const We=e=>`${e.split("/").at(-2)}_${e.split("/").at(-1)}`;function Je(){return t.jsx($e,{})}function dt(){return t.jsxs(ne,{children:[t.jsx(p,{path:"bank/account/save/success",element:t.jsx(Je,{})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/standard",element:t.jsx(h,{appContent:t.jsx(M,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/ach/same-day",element:t.jsx(h,{appContent:t.jsx(M,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/address",element:t.jsx(h,{appContent:t.jsx(Ae,{isSubPage:!0})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/us-domestic",element:t.jsx(h,{appContent:t.jsx(Ne,{})})}),t.jsx(p,{path:":tenantEmailDomain/vendor/:vendorId/bill/:billId/wire/international",element:t.jsx(h,{appContent:t.jsx(Te,{})})}),t.jsx(p,{path:"*",element:t.jsx(f,{})})]})}export{dt as default};
@@ -0,0 +1,12 @@
1
+ import{j as u}from"./liveblocks-DJbBe3tc.js";import{a as g}from"./sentry-C6T1HHHS.js";import{u as F,g as _,h as O,t as w,j as l,N as E}from"./core-BfWJ7zKT.js";import{z as r,E as P,a as V,g as A,f as N,h as $,S as R,n as W,j as q}from"./index-D9NLhglj.js";import{e$ as B,Ms as G,MC as H,Mt as J,fE as K,g4 as Q,My as X,gx as Y,c_ as Z,MD as ee,ME as te}from"./zeni-epic-state-kow6PLud.js";import{n as ne}from"./mui-ts7KHm6i.js";import{u as se}from"./useDeviceId-DNuYTM17.js";import{f as ae}from"./analyticsHelper-Ib8eUq2U.js";import{t as ie}from"./getLocaleForTenant-0y5Rz6LJ.js";import"./recharts-DNnhB5R_.js";import"./analytics-BP5D4JyB.js";import"./plaid-Cv0mPYlm.js";import"./dnd-tQgCG5z3.js";import"./stripe-cKAAJElX.js";import"./lottie-BaCgeYyk.js";import"./lexical-Bg8ldM3i.js";import"./pdf-C9HGpLCu.js";import"./utils-xWcqC4Wl.js";(function(){try{var t=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},a=new t.Error().stack;a&&(t._sentryDebugIds=t._sentryDebugIds||{},t._sentryDebugIds[a]="c2fd6b98-d82a-474c-931a-ea4dd904e2e6",t._sentryDebugIdIdentifier="sentry-dbid-c2fd6b98-d82a-474c-931a-ea4dd904e2e6")}catch{}})();const x=(t,a)=>t!=null&&t.length>0&&a==="magic_links";function xe(){const t=F(),a=_(),m=O(),[k]=w(),n=k.get("token"),p=k.get("stytch_token_type"),f=r.getMagicLinkCodeVerifier(),i=se(),{otpChallenge:d,twoFAPhoneNumber:C,magicLinkEmail:c,verifyDeviceFetchState:D,resendVerifyDeviceOTPFetchState:M}=l((e=>e.tenantState)),S=l((e=>e.tenantState.fetchState)),b=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=>B(e))),y=l((e=>G(e))),T=r.getSignedInUser(),v=P().mode;g.useEffect((()=>{s?.zeniSessionId==null&&n!=null&&x(n,p)&&i!=null&&f!=null&&(r.saveMagicLinkTriggered(n),t(H(n,i,f)))}),[n,p,t,i,f,s?.zeniSessionId]),g.useEffect((()=>{h!=="In-Progress"||S!=="Completed"&&b!=="Completed"||s?.zeniSessionId==null||o==null||(n!=null&&r.saveLastUsedMagicLinkToken(n),r.saveSignedInUserWithSession(s,s.zeniSessionId),r.saveSignedInUserTenants(J(y.tenantsInOrder),s.zeniSessionId),K(s.userId,s.zeniSessionId,o.tenantId),t(Q(o.tenantId)),r.saveActiveTenantDomainForUser(o.tenantEmailDomain),t(X("Completed")),V.updateAppLocaleID(ie(o)),ae(s,o,v,void 0,y.tenantsInOrder),Y().then((()=>{const e=q();e!=null&&A(e)})),setTimeout((()=>{N.trackLogin($.Event.loginSuccess,"email",Z(o.productSettings))}),2e3))}),[h,S,b,s,o,y,v,a.state,t]);const z=g.useCallback((()=>{m("/signin/auth")}),[m]),j=g.useCallback((()=>{i!=null&&d!=null&&c!=null&&t(ee(i,c,d))}),[i,d,t,c]),U=g.useCallback((e=>{i!=null&&n!=null&&c!=null&&d!=null&&t(te(e,i,c,d))}),[i,n,t,c,d]);if(I==="Completed"&&d!=null)return u.jsx(R,{phoneNumber:C,verifyOtpFetchState:D.fetchState,resendVerifyDeviceOTPFetchState:M,onResendOtp:j,onVerifyOtp:U,onCancelVerifyDevice:z});if(h==="In-Progress"&&S==="Completed"&&s?.zeniSessionId!=null&&o!=null||T!=null){const e=a.state?.origin??"/";return u.jsx(E,{to:e,state:{...a.state,origin:""}})}if(!x(n,p)||f==null||I==="Error"){const e=a.state?.origin??"/",L=n!=null&&r.getLastUsedMagicLinkToken()===n;return u.jsx(E,{to:e,state:{...a.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(W,{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{xe as default};
@@ -0,0 +1 @@
1
+ import{j as B}from"./liveblocks-DJbBe3tc.js";import{a as u}from"./sentry-C6T1HHHS.js";import{u as pe,j as n,i as We,g as He,h as Qe,l as P}from"./core-BfWJ7zKT.js";import{e$ as he,fJ as Je,fK as be,fv as Ke,bn as Xe,e_ as qe,fL as ea,fM as aa,fO as ta,fR as na,fS as E,fU as sa,fV as le,fY as oa,fW as ia,fX as ra,fZ as da,cQ as ca,f$ as la,cW as ua,fu as fa,g4 as ma,g5 as pa,g3 as ha}from"./zeni-epic-state-kow6PLud.js";import{a9 as ba,aa as Sa,x as ga,w as Ea,z as C,y as ka,u as Ca,i as r,d as ya,Q as Ia,ab as Ta,D as _a,c as wa,ac as Aa,a5 as Da,ad as Fa,ae as va,af as ue,ag as fe,L as $a,ah as xa,ai as me,f as R,a1 as Ma,v as w,aj as V,ak as Ga}from"./index-D9NLhglj.js";import{D as Pa}from"./mui-ts7KHm6i.js";(function(){try{var m=typeof window<"u"?window:typeof global<"u"?global:typeof globalThis<"u"?globalThis:typeof self<"u"?self:{},d=new m.Error().stack;d&&(m._sentryDebugIds=m._sentryDebugIds||{},m._sentryDebugIds[d]="11618c80-871e-4189-931c-cd2af39af133",m._sentryDebugIdIdentifier="sentry-dbid-11618c80-871e-4189-931c-cd2af39af133")}catch{}})();const Ra=ba((({isAppContentDrawerOpen:m,handleDrawerToggle:d})=>{const{tenantEmailDomain:t}=We(),a=He(),y=ga(),o=Qe(),N=Ke(),c=pe(),{useFeatureGate:i}=Ea(),U=C.getSignedInUser(),O=Xe(U),s=n((e=>he(e))),Se=s.masterTOSInfo?.isMasterTOSAccepted??!1,L=n((e=>qe(e))),j=L.uiState.currentChatSessionId,I=ka(),{setLoading:ge}=Ca(),[A,Z]=u.useState(void 0),D=P("/:tenantEmailDomain/dashboard")!==null,z=P("/:tenantEmailDomain/reports")!==null,b=P("/:tenantEmailDomain/onboarding/*")!==null,Ee=!!s.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:ke}=i(r.isChargeCardFeatureEnabled),{isFeatureEnabled:Y}=i(r.isDebitCardFeatureEnabled),Ce=ya(s,ke,Y),{isFeatureEnabled:ye}=i(r.isSettingsFeatureEnabled),W=n((e=>ea(e))),{isFeatureEnabled:T}=i(r.isReferralFeatureEnabled),F=n((e=>aa(e)));u.useEffect((()=>{I&&T&&!b&&F.fetchState==="Not-Started"&&c(ta(!0))}),[I,T,F.fetchState,b]);const S=C.getSignedInUser(),v=n((e=>e.tenantState)),Ie=n((e=>v.fetchState==="Completed"?na(e):[])),k=n((e=>e.expenseAutomationViewState.selectedPeriodByTenantId)),{isFeatureEnabled:Te}=i(r.isApAgingFeatureEnabled),{isFeatureEnabled:_e}=i(r.isArAgingFeatureEnabled),{isFeatureEnabled:we}=i(r.isExpenseAutomationEnabled),{isFeatureEnabled:Ae}=i(r.isExpenseAutomationEnabledV2),H=Ia(),{isFeatureEnabled:De}=i(r.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:Fe}=i(r.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:ve}=i(r.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:$e}=i(r.isDashboardSidebarNewYearAnimationEnabled),$=s.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",{isFeatureEnabled:xe}=i(r.isTaskManagerCustomerUserAccessEnabled),x=O||!O&&xe,Me=n((e=>E(e).totalUnreadCount)),Ge=n((e=>E(e).reducedFetchCountState)),Q=n((e=>E(e).notificationDetailsByTab.tasks.uiState.unreadCount)),J=n((e=>E(e).notificationDetailsByTab.comments.uiState.unreadCount)),K=n((e=>E(e).notificationDetailsByTab.tasks.fetchCountState)),_=n((e=>E(e).notificationDetailsByTab.comments.fetchCountState)),{inboxNotifications:X,isLoading:q,isFetchingMore:ee,hasFetchedAll:ae,fetchMore:Pe}=Ta();u.useEffect((()=>{const e=setTimeout((()=>Pe?.()),0);return()=>clearTimeout(e)})),u.useEffect((()=>{if(q===!1&&ee===!1&&ae===!0)if(s?.companyId!=null&&X!=null){const e=`dashboard_${s.companyId}`;Z(X.filter((f=>f.roomId===e&&f.readAt==null)).length)}else Z(0)}),[q,ee,ae]),u.useEffect((()=>{I&&x&&!b&&K.fetchState==="Not-Started"&&N.tenantId!=null&&c(sa("task_manager","dashboard"))}),[I,x,b,K.fetchState,N.tenantId,c]),u.useEffect((()=>{b||_.fetchState!=="Not-Started"||c(le({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[b,_.fetchState,c]),u.useEffect((()=>{A!=null&&_.fetchState==="In-Progress"&&(c(le({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),c(be({unreadCount:A},"comments")))}),[A,_.fetchState]);const Re={fetchStatus:Ge,count:Me},te=t!=null?C.getSignedInUserTenant(t):null,ne=n((e=>te?.tenantId!=null?oa(e,te.tenantId):void 0)),g=[];Te===!1&&g.push("accounts_payable_aging"),_e===!1&&g.push("accounts_receivable_aging"),g.push("zeni_accounts_promo_card","treasury_promo_card"),T===!1&&g.push("rewards_card"),H===!1&&g.push("expense_automation_card");const Ve=_a(),se=n((e=>ia(e,g,S,Ae,we).fetchState)),oe=n((e=>ra(e).fetchState)),Be=D&&(se==="Completed"||se==="Error")||z&&(oe==="Completed"||oe==="Error")||!D&&!z?void 0:"disabled",Ne=u.useMemo((()=>da(s.userRole)),[s.userRole]),Ue=ca(Ne),Oe=s?.rewardsLastViewedTime==null,Le=S?.userEmail!=null&&W.fetchState==="Completed"&&la(W.notificationSettings,S.userEmail,Y,s),ie=wa(),je=ie&&Aa(a),re=ua(Ve?.loggedInUserRoleMap),de=s.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,M=u.useCallback((()=>$&&re&&!C.getTreasuryPopupSeen(t??"")&&de===!1&&Da(a.pathname)!=="treasury"),[$,re,de,a.pathname,t]),[Ze,ce]=u.useState(M);u.useEffect((()=>{ce(M())}),[M]);const ze=n((e=>e.treasurySetupViewState.treasuryFundsDetails)).fundsDetails,Ye=Fa(ze);return B.jsx(Pa,{container:window.document.body,variant:"temporary",open:m,onClose:()=>d(!1),PaperProps:{sx:{width:240,zIndex:8,borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:B.jsx(va,{signedInUser:U,currentTenantId:v.currentTenantId??"",tenants:v.fetchState==="Completed"?Ie:ne!=null?[ne]:[],currentTenant:s,isTenantDropdownDisabled:Be,isSettings:fe(a),isSettingsFeatureEnabled:ye,isVendorsTabVisible:Ue,isZeniAccountEnabled:Ee,isChargeCardEnabled:Ce,isTreasuryEnabled:$,treasuryYieldPercentage:Ye,isTreasuryPopupVisible:Ze,isNotificationsTabVisible:Le,notificationCountDetails:Re,isExpenseAutomationEnabledForUser:H,selectedMenu:ue(a),rewardsConfiguration:{isRewardsTabVisible:T,isRewardsAnimated:Oe,rewardsPlan:F.rewardsPlan},isAiCfoAccessEnabled:ie,onNotificationIconClick:()=>{d(!1);let e=Q===0&&J>0?"notifications/comments":"notifications/tasks";fe(a)&&(e=Q===0&&J>0?"../../notifications/comments":"../../notifications/tasks");const f=w(a.state?.pathnameStackToGoBack,a.pathname);o(e,{state:{pathnameStackToGoBack:f}})},handleCockpitClick:()=>{window.open("/cockpit")},handleLogOutClick:()=>{d(!1);const e=w(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),!Se)return void Ma({location:a,navigate:o,mergeState:{referrer:"Sidebar"}});const h=w(a.state?.pathnameStackToGoBack,a.pathname);return void o(`/${t}/ai-cfo/explore`,{state:{pathnameStackToGoBack:h,referrer:"Sidebar"}})}const f=w(a.state?.pathnameStackToGoBack,a.pathname),l=e.type,p=V(l)&&l!=="command_center";if(V(e.type)&&k[s.tenantId]!=null&&R.trackMonthEndCloseClicked(k[s.tenantId].month,k[s.tenantId].year,"Sidebar"),p&&k[s.tenantId]!=null){const h=k[s.tenantId];return void o(`/${t}/month_end_close_checks/review/${e.type}/${h.month}-${h.year}`,{state:{pathnameStackToGoBack:f,referrer:"Sidebar"}})}const G=Ga(e.type);me(e.type)?(j!=null&&c(ha()),o(`/${t}/ai-cfo/${e.type}`,{state:{pathnameStackToGoBack:f.slice(0,-1),referrer:"Sidebar"}})):o(`/${t}/${G}`,{state:{pathnameStackToGoBack:f,referrer:"Sidebar"}})},handleMyProfileClick:()=>{d(!1),o(`/${t}/settings/my_profile`)},handleReferralsClick:()=>{d(!1),o(`/${t}/rewards`)},handleBackClick:()=>{o(`/${t}/dashboard`)},handleTenantSelect:e=>{ge($a.TENANT_SWITCHING),d(!1);const f=e.tenantEmailDomain,l=ue(a);let p=`/${encodeURIComponent(f)}/`;const G=V(l);l==="home"?p+="dashboard":l==="users_and_roles"?p+="people":xa(l)?p+="settings/my_profile":me(l)?p+=`ai-cfo/${l}`:p+=l==="task_checklist"?"tasks":G?"month_end_close_checks/review":encodeURIComponent(l),o(p,{replace:!0}),S!=null&&(c(ma(e.tenantId)),c(pa(S.userId,e.tenantId,S.zeniSessionId)));const h=e;R.trackCompanySwitch(h.companyId,h.companyName,h.userRole)},handlePopupClose:()=>{C.saveTreasuryPopupSeen(t??"",!0),ce(!1)},onZeniLogoClick:()=>{y.toggle()},isAiCfo:je,aiCfoView:L,isOnDashboard:D,updateCurrentChatSessionId:e=>{c(fa({sessionId:e,agentId:"controller"})),o(`/${t}/ai-cfo/${e}`,{state:{...a.state}})},halloweenAnimationEnabled:De,isTaskManagerAccessEnabled:x,thanksGivingAnimationEnabled:Fe,christmasAnimationEnabled:ve,newYearAnimationEnabled:$e})})})),ja=m=>{const d=pe(),t=n((y=>he(y))),a={events:t.userRoleId!=null?[`private-encrypted-${t.userRoleId}.dashboard-user-notification`]:[],eventCallback:(y,o)=>{Sa(o)&&Je(o.mode)==="dashboard"&&d(be({unreadCount:o.data.unread},"tasks"))}};return B.jsx(Ra,{...m,...a})};export{ja as M};
@@ -0,0 +1 @@
1
+ import{j as t}from"./liveblocks-DJbBe3tc.js";import{h as r,n}from"./core-BfWJ7zKT.js";import{N as i}from"./index-D9NLhglj.js";import"./mui-ts7KHm6i.js";import"./sentry-C6T1HHHS.js";import"./zeni-epic-state-kow6PLud.js";import"./recharts-DNnhB5R_.js";import"./analytics-BP5D4JyB.js";import"./plaid-Cv0mPYlm.js";import"./dnd-tQgCG5z3.js";import"./stripe-cKAAJElX.js";import"./lottie-BaCgeYyk.js";import"./lexical-Bg8ldM3i.js";import"./pdf-C9HGpLCu.js";import"./utils-xWcqC4Wl.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]="0d8bbeee-ef94-478e-b36a-0f30a9be8cda",e._sentryDebugIdIdentifier="sentry-dbid-0d8bbeee-ef94-478e-b36a-0f30a9be8cda")}catch{}})();const a=n(null,(function(e,o){return{onGoBack:()=>{o.navigate(-1)},onGoHome:()=>{o.navigate("/")}}}))(i);function _(){const e=r();return t.jsx(a,{navigate:e})}export{_ as default};
@@ -1 +1 @@
1
- import{l as ct,a as mt,m as dt,j as E}from"./liveblocks-B_acMj2M.js";import lt from"./NotFoundScreen-DVitp65R.js";import{a as k}from"./sentry-B7X8e_7J.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 Q}from"./core-u1EteL-v.js";import{cw as St,fJ as q,eZ as H,fX as bt,fQ as b,Td as K,fT as d,fI as y,sI as M,ye as It,Te as Tt,fH as Ct,fZ as yt,sN as _t,Tf as $,bo as F,fB as x,sR as X,Tg as At,cI as Et,cB as Nt}from"./zeni-epic-state-DiB-ZYnx.js";import{_ as Bt,z as wt,A as xt,d as Rt,a0 as Dt,cW as vt,r as N,a9 as Pt,cX as Ut,aa as Gt,p as $t}from"./index-tOfK8iY_.js";import"./mui-DMXXvJHn.js";import{u as Ft}from"./useAskAiCfoHostNavButtonProps-D-klSIXS.js";import"./recharts-REl-3xYX.js";import"./analytics-C1xZTLEH.js";import"./plaid-BGfWuOr6.js";import"./dnd-CIbUDnZz.js";import"./stripe-cKAAJElX.js";import"./lottie-DvAqKpNG.js";import"./lexical-BuHlG7c0.js";import"./pdf-Wf7vPJje.js";import"./utils-ChVfPml3.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]="80f898f0-483d-459f-85c4-9603c3bf602a",t._sentryDebugIdIdentifier="sentry-dbid-80f898f0-483d-459f-85c4-9603c3bf602a")}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=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:B,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(X("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(B(a),t($([a],F())));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(K(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(X("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map((r=>{m==="read"&&(B(r),t($([r],F())))}))).then((()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}),(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})).catch((r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(x({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,B).then((()=>{t($(s,F())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))})).catch((o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(x({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onBackClick:()=>{const a=$t(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}})}}}))(Pt(Ut)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=Bt(),i=St(u??""),s=pt(),h=wt.getSignedInUser(),[B,R]=k.useState(!1),a=S((e=>q(e))),o=S((e=>H(e))),{useFeatureGate:m}=xt(),{isFeatureEnabled:c}=m(Rt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=Ft({mobileExploreReferrer:"Notifications"});Dt({isDataReady:!0});const O=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)),D=S((e=>b(e).currentSubTab)),Y=S((e=>b(e).notificationDetailsByTab.comments.fetchCountState)),v=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=vt().allUsers,{inboxNotifications:w,isLoading:_,hasFetchedAll:T,isFetchingMore:P,fetchMore:ot}=ct(),{threads:W,isLoading:L,fetchMore:Z,isFetchingMore:z,hasFetchedAll:J}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect((()=>{if(V!==i&&i!=null&&s(K(i)),i==null){const e=`../${V}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}}),[i]),k.useEffect((()=>{Y.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),k.useEffect((()=>{if(_===!1&&T===!0&&o?.companyId!=null&&w!=null){const e=`dashboard_${o.companyId}`,p=w.filter((C=>C.roomId===e&&C.readAt==null)).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}}),[_,T]),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 U=_||P===!0||T!==!0||_||P===!0||T!==!0;k.useEffect((()=>{U&&v!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):U||v!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))}),[U,v]),k.useEffect((()=>{s(y({hasMore:T!==!0},"comments"))}),[T]),k.useEffect((()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&B===!1&&(R(!0),s(It()))}),[a.fetchState]),k.useEffect((()=>{if(_===!1&&L===!1&&w!=null&&W!=null){const e=`dashboard_${o.companyId}`,p=w.filter((f=>f.roomId===e)).filter((f=>f.kind==="thread")),C=p.filter((f=>f.readAt==null)),A=p.map((f=>f.id)),it=p.map((f=>{const G=W.find((rt=>rt.id===f.threadId));return G!=null?{inboxNotification:{...f,threadId:G.id},thread:G}:(z||J===!0||Z==null||Z(),null)})).filter((f=>f!=null));s(d({allNotificationsIds:A},"comments")),s(y({totalCount:A.length,unreadCount:C.length},"comments")),s(Tt(it))}}),[_,P,z,T,J,L,w?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Gt(p)){const C=Ct(p.mode);if(C==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const A=[];D==="all"?A.push("read","unread"):D!=="mentions"&&A.push(D),s(M("task_manager",C,A,!0))}}}},nt=dt();return E.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:O,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(Q,{path:"/:selectedTab",element:E.jsx(Vt,{})}),E.jsx(Q,{path:"*",element:E.jsx(lt,{})})]})}export{ne as default};
1
+ import{m as ct,a as mt,n as dt,j as A}from"./liveblocks-DJbBe3tc.js";import lt from"./NotFoundScreen-DsR8VsQv.js";import{a as k}from"./sentry-C6T1HHHS.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 X}from"./core-BfWJ7zKT.js";import{cx as St,fL as z,e$ as H,fZ as bt,fS as b,Tt as O,fV as d,fK as y,sN as M,yj as It,Tu as Tt,fJ as Ct,f$ as yt,sS as Et,Tv as $,bo as F,fD as B,sW as Z,Tw as _t,cJ as At,cC as Nt}from"./zeni-epic-state-kow6PLud.js";import{X as wt,z as xt,w as Bt,i as vt,a0 as Dt,cW as Rt,v as N,a9 as Pt,cX as Ut,aa as Gt,s as $t}from"./index-D9NLhglj.js";import"./mui-ts7KHm6i.js";import{u as Ft}from"./useAskAiCfoHostNavButtonProps-D8n0-rNW.js";import"./recharts-DNnhB5R_.js";import"./analytics-BP5D4JyB.js";import"./plaid-Cv0mPYlm.js";import"./dnd-tQgCG5z3.js";import"./stripe-cKAAJElX.js";import"./lottie-BaCgeYyk.js";import"./lexical-Bg8ldM3i.js";import"./pdf-C9HGpLCu.js";import"./utils-xWcqC4Wl.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]="0e937f34-1960-41e5-a3f5-df65747eaf0d",t._sentryDebugIdIdentifier="sentry-dbid-0e937f34-1960-41e5-a3f5-df65747eaf0d")}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=z(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:w,fetchMoreCommentsNotifications:v}=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(Z("task_manager","read",[a],!1))},onCommentNotificationClick:(a,o,m)=>{const c=o.toString().split(`/${u}/`);if(c[1]!=null){m==="unread"&&(w(a),t($([a],F())));let r=`/${u}/${c[1]}`;const I=N(n.state?.pathnameStackToGoBack,n.pathname);c[1].startsWith("reimbursement")&&!At(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(O(a,o));const m=`../${a}`,c=N(n.state?.pathnameStackToGoBack,n.pathname);h(m,{state:{pathnameStackToGoBack:c}})},onUpdateNotificationViewSubTab:a=>{t(_t(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 v?.()},onUpdateNotificationStatus:(a,o,m,c)=>{a==="tasks"?t(Z("task_manager",m,c)):(t(d({markAsReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Promise.all(c.map((r=>{m==="read"&&(w(r),t($([r],F())))}))).then((()=>{t(d({markAsReadState:{fetchState:"Completed",error:void 0},selectedNotificationIds:[]},"comments")),t(y({unreadCount:i-c.length>0?i-c.length:0},"comments")),t(B({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))}),(r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(B({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})).catch((r=>{t(d({markAsReadState:{fetchState:"Error",error:r}},"comments")),t(B({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onMarkAllNotificationsAsRead:a=>{a==="tasks"?t(Et("task_manager","read")):(t(d({markAsAllReadState:{fetchState:"In-Progress",error:void 0}},"comments")),Mt(s,w).then((()=>{t($(s,F())),t(d({markAsAllReadState:{fetchState:"Completed",error:void 0}},"comments")),t(y({unreadCount:0},"comments")),t(B({messageSection:"notification_mark_as_read",messageText:"success",type:"success",showStatusIcon:!0}))})).catch((o=>{t(d({markAsAllReadState:{fetchState:"Error",error:o}},"comments")),t(B({messageSection:"notification_mark_as_read",messageText:"failed",type:"error",showStatusIcon:!0}))})))},onBackClick:()=>{const a=$t(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}})}}}))(Pt(Ut)),Vt=()=>{const t=ft(),l=ut(),{tenantEmailDomain:n,selectedTab:u}=ht(),{areTenantIdsInSync:g}=wt(),i=St(u??""),s=pt(),h=xt.getSignedInUser(),[w,v]=k.useState(!1),a=S((e=>z(e))),o=S((e=>H(e))),{useFeatureGate:m}=Bt(),{isFeatureEnabled:c}=m(vt.isDebitCardFeatureEnabled),{isAiCfoAccessEnabled:r,onAskAiCfoClick:I}=Ft({mobileExploreReferrer:"Notifications"});Dt({isDataReady:!0});const Q=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)),D=S((e=>b(e).currentSubTab)),Y=S((e=>b(e).notificationDetailsByTab.comments.fetchCountState)),R=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=Rt().allUsers,{inboxNotifications:x,isLoading:E,hasFetchedAll:T,isFetchingMore:P,fetchMore:ot}=ct(),{threads:W,isLoading:L,fetchMore:J,isFetchingMore:q,hasFetchedAll:K}=mt({query:{metadata:{companyId:o.companyId,application:"dashboard"}}});k.useEffect((()=>{if(V!==i&&i!=null&&s(O(i)),i==null){const e=`../${V}`,p=N(l.state?.pathnameStackToGoBack,l.pathname);t(e,{state:{pathnameStackToGoBack:p}})}}),[i]),k.useEffect((()=>{Y.fetchState==="Not-Started"&&s(d({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))}),[]),k.useEffect((()=>{if(E===!1&&T===!0&&o?.companyId!=null&&x!=null){const e=`dashboard_${o.companyId}`,p=x.filter((C=>C.roomId===e&&C.readAt==null)).length;s(d({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),s(y({unreadCount:p},"comments"))}}),[E,T]),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 U=E||P===!0||T!==!0||E||P===!0||T!==!0;k.useEffect((()=>{U&&R!=="In-Progress"?s(d({fetchState:"In-Progress",error:void 0},"comments")):U||R!=="In-Progress"||s(d({fetchState:"Completed",error:void 0},"comments"))}),[U,R]),k.useEffect((()=>{s(y({hasMore:T!==!0},"comments"))}),[T]),k.useEffect((()=>{a.fetchState!=="In-Progress"&&a.fetchState!=="Completed"&&w===!1&&(v(!0),s(It()))}),[a.fetchState]),k.useEffect((()=>{if(E===!1&&L===!1&&x!=null&&W!=null){const e=`dashboard_${o.companyId}`,p=x.filter((f=>f.roomId===e)).filter((f=>f.kind==="thread")),C=p.filter((f=>f.readAt==null)),_=p.map((f=>f.id)),it=p.map((f=>{const G=W.find((rt=>rt.id===f.threadId));return G!=null?{inboxNotification:{...f,threadId:G.id},thread:G}:(q||K===!0||J==null||J(),null)})).filter((f=>f!=null));s(d({allNotificationsIds:_},"comments")),s(y({totalCount:_.length,unreadCount:C.length},"comments")),s(Tt(it))}}),[E,P,q,T,K,L,x?.length]);const st={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.dashboard-user-notification`]:[],eventCallback:(e,p)=>{if(Gt(p)){const C=Ct(p.mode);if(C==="dashboard"&&s(y({unreadCount:p.data.unread},"tasks")),j!=="In-Progress"){const _=[];D==="all"?_.push("read","unread"):D!=="mentions"&&_.push(D),s(M("task_manager",C,_,!0))}}}},nt=dt();return A.jsx(jt,{tenantEmailDomain:n,loggedInUserRoleMap:Q,signedInUser:h,externalNotificationsUnreadCount:tt,location:l,navigate:t,isDebitCardFeatureEnabled:c,users:at,markInboxNotificationAsRead:nt,allUnreadCommentsNotificationIds:et,isAiCfoAccessEnabled:r,onAskAiCfoClick:I,...st})};function ne(){return A.jsxs(gt,{children:[A.jsx(X,{path:"/:selectedTab",element:A.jsx(Vt,{})}),A.jsx(X,{path:"*",element:A.jsx(lt,{})})]})}export{ne as default};
@@ -0,0 +1 @@
1
+ import{j as m}from"./liveblocks-DJbBe3tc.js";import{a as r}from"./sentry-C6T1HHHS.js";import{u as T,g as A,j as o,N as R}from"./core-BfWJ7zKT.js";import{MR as j,e$ as C,fR as P,MS as x,MT as z,MU as D,MV as L,on as k,LO as N}from"./zeni-epic-state-kow6PLud.js";import{z as h,_ as I}from"./index-D9NLhglj.js";import"./mui-ts7KHm6i.js";import"./recharts-DNnhB5R_.js";import"./analytics-BP5D4JyB.js";import"./plaid-Cv0mPYlm.js";import"./dnd-tQgCG5z3.js";import"./stripe-cKAAJElX.js";import"./lottie-BaCgeYyk.js";import"./lexical-Bg8ldM3i.js";import"./pdf-C9HGpLCu.js";import"./utils-xWcqC4Wl.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]="68c09476-3bc6-4ff1-ba49-f9ffdc6e10ba",n._sentryDebugIdIdentifier="sentry-dbid-68c09476-3bc6-4ff1-ba49-f9ffdc6e10ba")}catch{}})();function ee(){const n=T(),s=A(),{params:t,error:i}=r.useMemo((()=>j(s.search)),[s.search]),w=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=>C(e))),l=o((e=>P(e))),d=o((e=>e.tenantState.fetchState)),b=o(x),y=o(z),c=o(D),[S,v]=r.useState(null),[E,_]=r.useState(null);r.useEffect((()=>{document.querySelector("#app-shell-loader")?.remove()}),[]),r.useEffect((()=>()=>{n(L())}),[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(k(a.userId,a.zeniSessionId??void 0))))}),[f,a,d,n]),r.useEffect((()=>{c!=null&&c!==""&&(window.location.href=c)}),[c]);const U=r.useMemo((()=>{if(p?.tenantId!=null)return p.tenantId;const e=h.getActiveTenantForUser()?.tenantId;return e!=null&&l.some((M=>M.tenantId===e))?e:l.length===1?l[0].tenantId:null}),[p?.tenantId,l]),u=S??U;return i!=null?m.jsx(I,{variant:"invalid_params",paramsError:i}):f?m.jsx(I,{variant:"signed_in",clientName:w,userEmail:a?.userEmail,isInitializing:d!=="Completed",tenants:l,selectedTenantId:u,onSelectTenant:v,approveError:E??y,isApproving:b==="In-Progress",showAllowButton:u!=null,onApprove:()=>{t!=null&&a!=null&&u!=null&&n(N(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(R,{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-DJbBe3tc.js";import{h as z,u as Z,g as X,i as H,j as d,n as J,o as K,p as I}from"./core-BfWJ7zKT.js";import{e$ as U,sB as R,s9 as Q,Nm as v,s4 as S,bs as ee,bn as ae,bZ as te,s5 as se,Nn as oe,N9 as C,dL as re,wg as ne,No as ie,wD as ce,fI as le,fG as de}from"./zeni-epic-state-kow6PLud.js";import{z as me,X as fe,a0 as pe,D as ue,w,i as N,A as he,f as M,ap as ge,v as Fe}from"./index-D9NLhglj.js";import"./mui-ts7KHm6i.js";import be from"./NotFoundScreen-DsR8VsQv.js";import{F as Ie}from"./FeaturePreviewScreen-C_G_t4I9.js";import{a as g}from"./sentry-C6T1HHHS.js";import{u as Ce}from"./useAskAiCfoHostNavButtonProps-D8n0-rNW.js";import{u as Se}from"./useInitialThreadRequest-BlvltKSe.js";import{t as Te}from"./routePaths-DxGoZobb.js";import{M as ye}from"./MobileAppDrawer-DHMYVxFj.js";import"./recharts-DNnhB5R_.js";import"./analytics-BP5D4JyB.js";import"./plaid-Cv0mPYlm.js";import"./dnd-tQgCG5z3.js";import"./stripe-cKAAJElX.js";import"./lottie-BaCgeYyk.js";import"./lexical-Bg8ldM3i.js";import"./pdf-C9HGpLCu.js";import"./utils-xWcqC4Wl.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]="8edbf5e1-fdb7-44d5-b092-59e7223ae318",s._sentryDebugIdIdentifier="sentry-dbid-8edbf5e1-fdb7-44d5-b092-59e7223ae318")}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})}},Ae=J((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:M}}),(function(s,e){return{onForecastSelectionChanged:(a,o)=>{s(v(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 O(){const s=z(),e=Z(),a=X(),{forecastId:o,tenantEmailDomain:r}=H(),[i,p]=g.useState(!1),[m,u]=g.useState(!1),h=me.getSignedInUser(),y=d((t=>U(t))),$=y.company?.companyInfo.firstMonthOfFY??1,c=d((t=>R(t.forecastState,t.forecastListState))),l=d((t=>t.forecastListState.fetchState==="Completed")),A=d((t=>t.profitAndLossState)),D=d((t=>t.reportUIOptionsState.selectedForecast)),k=t=>A.pandLByForecastID[t]!=null&&se(t,A).reducedAllFetchState.fetchState==="Completed",{areTenantIdsInSync:F}=fe();pe({isDataReady:l});const{isAiCfoAccessEnabled:B,onAskAiCfoClick:q}=Ce({mobileExploreReferrer:"Forecast"});g.useEffect((()=>{if(!i&&F)p(!0),l||e(Q());else if(l&&!m){u(!0);const t=((f,E,P)=>E!=null?f.forecasts.findIndex((b=>b.id===E)):P!=null?f.forecasts.findIndex((b=>b.id===P)):f.forecasts.length>0?0:-1)(c,o,D?.id);t===-1&&o!=null?s("page-not-found",{replace:!0}):t!==-1&&t!=D?.index?(e(v(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&&!k(c.forecasts[t].id)&&F&&e(S(c.forecasts[t].id))}}),[i,p,e,l,c,m,u,R,S,F]);const x=ue(),G=x?.loggedInUserRole!=null&&ee(x.loggedInUserRole),{useFeatureGate:_}=w(),{isFeatureEnabled:L}=_(N.isReportsCommentingEnabled),W=Se(L?y?.companyId:void 0,{clearParams:l&&m}),[Y,V]=g.useState(!1),j=t=>{V(t)};return n.jsxs(n.Fragment,{children:[l?n.jsx(he,{analytics:M,onLoad:t=>(f=>f.trackForecast())(t)}):null,n.jsx(ye,{isAppContentDrawerOpen:Y,handleDrawerToggle:j}),n.jsx(Ae,{firstMonthOfFY:$,tenantEmailDomain:r,forecastIdFromUrlPath:o,navigate:s,location:a,isPandLReportFetched:k,meetingUrl:te(`https://meetings.hubspot.com/svitlana-grankovska?firstname=${h?.firstName}&lastname=${h?.lastName}&email=${h?.userEmail}`),hasTransactionAccess:G,isAiCfoAccessEnabled:B,onAskAiCfoClick:q,isReportsCommentingEnabled:L,isZeniUser:ae(h),initialOpenThreadRequest:W,onClickMenuIcon:()=>{j(!0)}})]})}function Ve(){const s=d((i=>U(i))),{useFeatureGate:e}=w(),{isFeatureEnabled:a}=e(N.isDebitCardFeatureEnabled),o=le(a,s),r=de(s);return o===!0||r===!0?n.jsx(Ie,{}):n.jsxs(K,{children:[n.jsx(I,{path:"/",element:n.jsx(O,{})}),n.jsx(I,{path:"/:forecastId",element:n.jsx(O,{})}),n.jsx(I,{path:"/:forecastId/*",element:n.jsx(be,{})})]})}export{Ve as PandLWithForecastRoutes,Ve as default};
@@ -0,0 +1,22 @@
1
+ import{j as a}from"./liveblocks-DJbBe3tc.js";import{Ni as oe,e$ as J,kL as G,fI as Y,fG as ie,KM as ee,MY as re,vd as ke,Nj as Q,v2 as ve,vn as Ee,vh as le,v6 as de,vl as Pe,vi as je,Nk as ce,x2 as Le,fs as Te,gk as Ae,Nl as H,va as pe,v9 as ue,vq as Fe,c7 as Re}from"./zeni-epic-state-kow6PLud.js";import{J as me,w as ae,i as _,z as K,d as ge,e as fe,H as he,al as Ce,am as Oe,F as ye,o as O,I as be,a as M,an as Ve,X as Ze,a0 as Be,A as Ue,f as Se,h as $e,v as ze,ao as He,D as _e}from"./index-D9NLhglj.js";import{D as we,n as N,S as xe}from"./mui-ts7KHm6i.js";import te from"./NotFoundScreen-DsR8VsQv.js";import{a as d}from"./sentry-C6T1HHHS.js";import{u as se,i as Ge,j as g,h as Ke,g as Me,n as Ne,o as ne,p as z}from"./core-BfWJ7zKT.js";import{u as We}from"./useAskAiCfoHostNavButtonProps-D8n0-rNW.js";import{M as qe}from"./MobileAppDrawer-DHMYVxFj.js";import"./recharts-DNnhB5R_.js";import"./analytics-BP5D4JyB.js";import"./plaid-Cv0mPYlm.js";import"./dnd-tQgCG5z3.js";import"./stripe-cKAAJElX.js";import"./lottie-BaCgeYyk.js";import"./lexical-Bg8ldM3i.js";import"./pdf-C9HGpLCu.js";import"./utils-xWcqC4Wl.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]="74b4e53f-1cd0-4586-8fa8-6b569921f82a",e._sentryDebugIdIdentifier="sentry-dbid-74b4e53f-1cd0-4586-8fa8-6b569921f82a")}catch{}})();const Xe={overlayWidth:new ye(100,100,48)},W=M.getLocalizedStrings().peoplePage.invitePage,Qe=M.getLocalizedStrings().common,Je=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:f,isEditPeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=me(),m=se(),[V,Z]=d.useState(!1),[k,S]=d.useState(!1),{userId:w}=Ge(),r=g((l=>oe(l))),p=g((l=>J(l))),v=g((l=>G(l))),{useFeatureGate:D}=ae(),{isFeatureEnabled:I}=D(_.isDebitCardFeatureEnabled),E=Y(I,p),L=ie(p),T=ee(p),B=re(p),U=!!p.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,x=!E&&v&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const C=()=>{m(Q()),b()},A=()=>{V===!0?S(!0):C()},$=c.companyView?.controllers?.map((l=>l.user)),u=!!p.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:P}=D(_.isChargeCardFeatureEnabled),j=ge(p,P,I),{isCardsHidden:F}=fe(p?.tenantId),y=!j||F,R=p.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={peopleDetails:r,classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:T,isAccountingClassesEnabled:v,isReimbursementDisabled:U===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:R===!1,isLiteRoleDisabled:B===!1,isBankingOnlyTenant:E,isCardsOnlyTenant:L,onResetClick:C,onDeleteUser:l=>{m(de(l.userId,l.userRole.userRoleId))},onPeopleLocalDataUpdated:l=>{m(le({peopleLocalData:l})),Z(!0)},onSaveClick:()=>{m(f==="zeni_only"?ve(e):Ee(T))},onCloseClick:A,isLoading:x||r.person==null},o={onOkClick:()=>{S(!1),C()},onCancelClick:()=>{S(!1)}};return d.useEffect((()=>{x===!1&&w!=null&&m(ke(w))}),[x,w]),d.useEffect((()=>{r.updatePersonState.fetchState==="Completed"&&C()}),[r.updatePersonState.fetchState]),a.jsx(we,{anchor:"right",open:i,PaperProps:{style:{width:Xe.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:he.overlayDark,cursor:"pointer"}}},onClose:A,children:a.jsxs(Ye,{onClick:l=>l.stopPropagation(),children:[k===!0?a.jsx(Ce,{titleComponent:a.jsx(De,{children:W.discardTitle}),descriptionComponent:a.jsx(Ie,{children:W.discardDescription}),primaryButtonText:W.discard,secondaryButtonText:Qe.no,action:o,isEditPopup:!0}):null,a.jsx(Oe,{...s})]})})},Ye=N(xe)`
2
+ display: flex;
3
+ min-height: 100%;
4
+ flex-direction: column;
5
+ `,De=N(be.H6Regular)`
6
+ margin-top: ${O.sp7};
7
+ padding-left: ${O.sp8};
8
+ padding-right: ${O.sp8};
9
+ color: ${e=>e.theme.colors.primary};
10
+ word-break: break-word;
11
+ `,Ie=N(be.LargeRegularSp)`
12
+ color: ${e=>e.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
+ `,ea={overlayWidth:new ye(100,100,48)},q=M.getLocalizedStrings().peoplePage.invitePage,aa=M.getLocalizedStrings().common,sa=({companyId:e,managersListView:t,companyPassportView:c,classListView:n,mode:f,isInvitePeopleDrawerOpen:i,closeDrawerHandler:b})=>{const h=me(),m=se(),[V,Z]=d.useState(!1),[k,S]=d.useState(!1),w=g((o=>oe(o))),r=g((o=>J(o))),p=g((o=>G(o))),{useFeatureGate:v}=ae(),{isFeatureEnabled:D}=v(_.isDebitCardFeatureEnabled),I=Y(D,r),E=ie(r),L=ee(r),T=re(r),B=!!r.company?.featuresActivationInfo?.isReimbursementFeatureEnabled,U=!I&&p&&n.fetchState!=="Completed"||t.fetchState!=="Completed"||c.fetchState!=="Completed"||e==null;if(K.getSignedInUser()==null)throw Error("Can't access invite people page without signing in...");const x=()=>{b(),m(Q())},C=()=>{V===!0?S(!0):x()},A={onOkClick:()=>{S(!1),x()},onCancelClick:()=>{S(!1)}},$=c.companyView?.controllers.map((o=>o.user)),u=!!r.company?.companyZeniAccountInfo?.isZeniAccountEnabled,{isFeatureEnabled:P}=v(_.isChargeCardFeatureEnabled),j=ge(r,P,D),{isCardsHidden:F}=fe(r?.tenantId),y=!j||F,R=r.companyTreasuryInfo?.info?.businessVerificationStatus?.code==="verified",s={classList:n.classes,managersList:t.users,controllersList:$,mode:f,isZeniTenant:L,onPeopleLocalDataUpdated:o=>{m(le({peopleLocalData:o})),Z(!0)},onResetClick:x,onSaveClick:()=>{m(f==="zeni_only"?Pe(e):je())},onCloseClick:C,peopleDetails:w,isAccountingClassesEnabled:p,isReimbursementDisabled:B===!1,isLiteRoleDisabled:T===!1,isZeniAccountsDisabled:u===!1,isChargeCardDisabled:y,isTreasuryDisabled:R===!1,isBankingOnlyTenant:I,isCardsOnlyTenant:E,isLoading:U};return d.useEffect((()=>{w.invitePersonState.fetchState==="Completed"&&(b(),m(Q()))}),[w.invitePersonState.fetchState]),a.jsx(we,{anchor:"right",open:i,PaperProps:{style:{width:ea.overlayWidth.valuePercentage(h),boxShadow:"none"}},slotProps:{backdrop:{style:{backgroundColor:he.overlayDark,cursor:"pointer"}}},onClose:C,children:a.jsxs(ta,{onClick:o=>o.stopPropagation(),children:[k===!0?a.jsx(Ce,{titleComponent:a.jsx(De,{children:q.discardTitle}),descriptionComponent:a.jsx(Ie,{children:q.discardDescription}),primaryButtonText:q.discard,secondaryButtonText:aa.no,action:A}):null,a.jsx(Ve,{...s})]})})},ta=N(xe)`
19
+ display: flex;
20
+ min-height: 100%;
21
+ flex-direction: column;
22
+ `,na=Ne((function(e,t){const c=ce(e),n=K.getSignedInUser();return{data:c,loggedinUserId:n?.userId??"",isZeniTenant:t.isZeniTenant===!0,shouldFetchClasses:t.shouldFetchClasses,isZeniAdminUser:n?.userEmailDomain==="zeni.ai"&&t.isZeni===!0,isAccountingClassesEnabled:G(e),analytics:Se}}),(function(e,t){const{navigate:c,companyId:n,shouldFetchClasses:f}=t;return{personAction:{onPersonDelete:(i,b)=>{e(de(i,b))},onResendInvite:i=>{e(Fe(i))},onReloadPeople:()=>{e(pe()),e(ue(n,f))},onBackClick:()=>{c("../../")},onModeChange:i=>{e(H({mode:i,searchText:"",sortKey:"name",sortOrder:"ascending"}))},onSearchTextChanged:i=>{e(H({searchText:i}))}}}}))(He);function X({isInvitePeopleDrawerOpen:e,isEditPeopleDrawerOpen:t}){const c=Ke(),n=se(),f=Me(),{areTenantIdsInSync:i}=Ze(),b=K.getSignedInUser(),h=g((s=>J(s))),{useFeatureGate:m}=ae(),{isFeatureEnabled:V}=m(_.isDebitCardFeatureEnabled),Z=g((s=>G(s))),k=!Y(V,h)&&Z,S=ee(h),w=h?.tenantId,{tenantEmailDomain:r}=h,[p,v]=d.useState(!1),[D,I]=d.useState(!1),[E,L]=d.useState(!1),[T,B]=d.useState("off"),[U,x]=d.useState(!1),C=s=>{x(s)},{isAiCfoAccessEnabled:A,onAskAiCfoClick:$}=We({mobileExploreReferrer:"People"}),u=g((s=>ce(s)));Be({isDataReady:u.fetchState==="Completed"});const P=g((s=>Le(s.classState,s.classListState))),j=g((s=>Te(s.userState,s.userRoleState,s.userListViewState,"manager"))),F=g((s=>Ae(s))),y=h?.companyId;d.useEffect((()=>{p&&T===u.uiState.mode||!i||(n(H({searchText:"",sortKey:"name",sortOrder:"ascending"})),B(u.uiState.mode),v(!0),n(pe()))}),[p,b,w,n,u.uiState.mode,i]),d.useEffect((()=>{y!=null&&i&&n(ue(y,k))}),[y,k,i]),d.useEffect((()=>{I(e!=null&&e===!0),L(t!=null&&t===!0&&t)}),[e,t]),d.useEffect((()=>{n(H({searchText:"",sortKey:"name",sortOrder:"ascending"}))}),[]);const R=()=>{I(!1),L(!1),c("../")};return a.jsxs(a.Fragment,{children:[u.fetchState==="Completed"?a.jsx(Ue,{analytics:Se,onLoad:s=>s.trackPageLoaded($e.Event.members)}):null,D===!0?a.jsx(sa,{closeDrawerHandler:R,isInvitePeopleDrawerOpen:D,managersListView:j,companyPassportView:F,classListView:P,companyId:y,mode:u.uiState.mode}):null,E===!0?a.jsx(Je,{closeDrawerHandler:R,isEditPeopleDrawerOpen:E,managersListView:j,companyPassportView:F,classListView:P,companyId:y,mode:u.uiState.mode}):null,a.jsx(qe,{isAppContentDrawerOpen:U,handleDrawerToggle:C}),a.jsx(na,{navigate:c,signedInUser:b,isZeni:h.isZeni,isZeniTenant:S,peopleUIState:u.uiState,companyId:y,shouldFetchClasses:k,classList:P,managersView:j,peopleView:u,onInvitePeopleClick:()=>{c("./new")},onColumnSortConfigChanged:(s,o)=>{n(H({sortKey:s,sortOrder:o}))},onRowClick:s=>{const o=`/${r}/people/${encodeURIComponent(s)}/edit`,l=ze(f.state?.pathnameStackToGoBack,f.pathname);c(o,{state:{pathnameStackToGoBack:l}})},onClickMenuIcon:()=>{C(!0)},isAiCfoAccessEnabled:A,onAskAiCfoClick:$})]})}function Da(){const e=_e();return Re(e?.loggedInUserRole??[])?a.jsxs(ne,{children:[a.jsx(z,{path:"/",element:a.jsx(X,{})}),a.jsx(z,{path:"new",element:a.jsx(X,{isInvitePeopleDrawerOpen:!0})}),a.jsx(z,{path:":userId/edit",element:a.jsx(X,{isEditPeopleDrawerOpen:!0})}),a.jsx(z,{path:"*",element:a.jsx(te,{})})]}):a.jsx(ne,{children:a.jsx(z,{path:"*",element:a.jsx(te,{})})})}export{Da as default};
@@ -0,0 +1 @@
1
+ import{j as s}from"./liveblocks-DJbBe3tc.js";import E from"./NotFoundScreen-DsR8VsQv.js";import{a as r}from"./sentry-C6T1HHHS.js";import{h as _,g as v,j as p,i as M,u as U,N as P,n as z,o as O,p as h}from"./core-BfWJ7zKT.js";import{e$ as B,Tx as b,bq as F,bn as N,ip as V,fD as $}from"./zeni-epic-state-kow6PLud.js";import{x as q,z as I,a0 as Y,cY as G}from"./index-D9NLhglj.js";import"./mui-ts7KHm6i.js";import{u as H}from"./useAskAiCfoHostNavButtonProps-D8n0-rNW.js";import{M as J}from"./MobileAppDrawer-DHMYVxFj.js";import"./recharts-DNnhB5R_.js";import"./analytics-BP5D4JyB.js";import"./plaid-Cv0mPYlm.js";import"./dnd-tQgCG5z3.js";import"./stripe-cKAAJElX.js";import"./lottie-BaCgeYyk.js";import"./lexical-Bg8ldM3i.js";import"./pdf-C9HGpLCu.js";import"./utils-xWcqC4Wl.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]="edeb52c7-cc81-4a77-9823-ccd3f9e9600e",e._sentryDebugIdIdentifier="sentry-dbid-edeb52c7-cc81-4a77-9823-ccd3f9e9600e")}catch{}})();const K=z((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)}}}))(G),L=()=>{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),[w,S]=r.useState(!1),C=F(o?.userRole??[]),k=o?.userRole?.includes("bookkeeping_admin")??!1,x=N(l),D=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 y=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=>{S(a)},{isAiCfoAccessEnabled:R,onAskAiCfoClick:T}=H({mobileExploreReferrer:"Performance"});return Y({isDataReady:n?.fetchState==="Completed"}),D?s.jsxs(s.Fragment,{children:[s.jsx(J,{isAppContentDrawerOpen:w,handleDrawerToggle:g}),s.jsx(K,{navigate:e,location:t,themeState:c,currentTenant:o,signedInUser:l,tenantEmailDomain:f,onReload:y,onTimeRangeSelect:j,handleDrawerToggle:g,isAiCfoAccessEnabled:R,onAskAiCfoClick:T})]}):s.jsx(P,{to:`/${f}/dashboard`,replace:!0})};function ge(){return s.jsxs(O,{children:[s.jsx(h,{path:"*",element:s.jsx(L,{})}),s.jsx(h,{path:"*",element:s.jsx(E,{})})]})}export{ge as default};
@@ -1 +1 @@
1
- import{a as h,b as t}from"./sentry-B7X8e_7J.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-C6T1HHHS.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-B_acMj2M.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-B7X8e_7J.js";import{L as dt,bZ as Tc,eZ as Ac,Mf as Rc,MJ as kl,c7 as Tl,g2 as Al,g3 as Rl}from"./zeni-epic-state-DiB-ZYnx.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-ChVfPml3.js";import{r as un}from"./empty-Bplt_RAY.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-Cw5xvhae.js";import{r as Gl}from"./index-Df8xDBDT.js";import{r as zl}from"./index-DFSTqcuc.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-u1EteL-v.js";import{u as Kl,z as Pc,L as Wl,N as Jl,Q as Xl,k as Ql,f as tf}from"./index-tOfK8iY_.js";import"./mui-DMXXvJHn.js";import{d as Pe}from"./decodeURIComponentSafe-CjfYiJlM.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]="235f1eef-55f4-4e21-9a94-c1b331a3b572",t._sentryDebugIdIdentifier="sentry-dbid-235f1eef-55f4-4e21-9a94-c1b331a3b572")}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-DJbBe3tc.js";import{p as Q,e as xc,d as kc,g as jl,a as xl}from"./sentry-C6T1HHHS.js";import{L as dt,bZ as Tc,e$ as Ac,Ms as Rc,MW as kl,c7 as Tl,g4 as Al,g5 as Rl}from"./zeni-epic-state-kow6PLud.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-xWcqC4Wl.js";import{r as un}from"./empty-D4KL-CgN.js";import{r as Fl,a as Bl,b as Ul,c as ql}from"./pdf-lib-DX6kz8a9.js";import{r as Gl}from"./index-CiS2dMrM.js";import{r as zl}from"./index-DpTDwQon.js";import{h as Zl,g as Hl,u as Vl,j as En,n as Yl}from"./core-BfWJ7zKT.js";import{u as Kl,z as Pc,L as Wl,K as Jl,M as Xl,m as Ql,f as tf}from"./index-D9NLhglj.js";import"./mui-ts7KHm6i.js";import{d as Pe}from"./decodeURIComponentSafe-D2jiQ7Do.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]="7cb0661d-8a36-4027-ab4f-d11a714ae111",t._sentryDebugIdIdentifier="sentry-dbid-7cb0661d-8a36-4027-ab4f-d11a714ae111")}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 @@
1
+ import{j as r}from"./liveblocks-DJbBe3tc.js";import O from"./NotFoundScreen-DsR8VsQv.js";import{a as p}from"./sentry-C6T1HHHS.js";import{h as x,g as C,u as E,j as u,N as D,n as k,o as W,p as b}from"./core-BfWJ7zKT.js";import{e$ as I,QP as g,R3 as S,G1 as V,Fa as U,G0 as d,FT as $,Rg as B,G3 as G}from"./zeni-epic-state-kow6PLud.js";import{z as N,a9 as T,bZ as F,ag as L,bC as z,b_ as K}from"./index-D9NLhglj.js";import"./mui-ts7KHm6i.js";import{u as P,R as A}from"./ReimbursementApprovalRuleDetailScreen-DcC6kKsi.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]="601edc68-8abf-4e3b-b94e-c3885e72f348",e._sentryDebugIdIdentifier="sentry-dbid-601edc68-8abf-4e3b-b94e-c3885e72f348")}catch{}})();const y="reimbursement-approval-rule-update",Q=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(B(!1))},onBackClick:()=>{L(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e($(t,!1))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))}}}))(T(F)),Z=({isLoading:e})=>{const o=x(),s=C(),n=E(),[t,i]=p.useState(!1),[m,R]=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||(R(!0),n(d())),o("./new"))}),[m,c,n]);const w={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(Q,{currentTenant:l,location:s,navigate:o,...w})},j="reimbursement-approval-rule-update",q=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(B(!1))},onBackClick:()=>{L(n)?s("../../"):s("../../../reimbursements/setup")},onDeleteRuleClick:t=>{e($(t,!0))},onEditRuleClick:t=>{t!=null?(e(d(t)),s(`./${t}/edit`)):(e(d()),s("./new"))},onReorderRules:t=>{e(G(t,!0))}}}))(T(K)),H=()=>{const e=u((n=>I(n))),{isApprovalRulesV3Enabled:o,isLoading:s}=z(e?.tenantId);return o?r.jsx(J,{isLoading:s}):r.jsx(Z,{isLoading:s})},J=({isLoading:e})=>{const o=x(),s=C(),n=E(),[t,i]=p.useState(!1),[m,R]=p.useState(!1),f=u((a=>a.remiSetupApproverViewState.fetchState)),l=u((a=>I(a))),c=u((a=>g(a)));P();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||(R(!0),n(d())),o("./new"))}),[m,c,n]);const w={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(q,{currentTenant:l,location:s,navigate:o,isLoading:e,...w})};function oe(){return r.jsxs(W,{children:[r.jsx(b,{path:"/",element:r.jsx(H,{})}),r.jsx(b,{path:"/new",element:r.jsx(A,{})}),r.jsx(b,{path:"/:approvalRuleId/edit",element:r.jsx(A,{})}),r.jsx(b,{path:"*",element:r.jsx(O,{})})]})}export{oe as R};
@@ -1 +1 @@
1
- import{j as b}from"./liveblocks-B_acMj2M.js";import{a as f}from"./sentry-B7X8e_7J.js";import{u as T,j as g,h as _,g as O,i as k,n as F}from"./core-u1EteL-v.js";import{l6 as L,QP as w,Qz as C,FR as V,G1 as B,FY as A,FZ as E,QQ as j,eZ as z,FX as Z}from"./zeni-epic-state-DiB-ZYnx.js";import{z as P,y as N,B as Q,bP as G,ag as $,bC as K,bQ as W}from"./index-tOfK8iY_.js";import"./mui-DMXXvJHn.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]="b299935a-0703-4363-9cbb-f2e8cbadb5ff",e._sentryDebugIdIdentifier="sentry-dbid-b299935a-0703-4363-9cbb-f2e8cbadb5ff")}catch{}})();function X(){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 Y=F((function(e,s){const t=w(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 h=[];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=(S=m.value,j(S)==null);var S;return{type:y?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!y}})),c=R.concat(I);h.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),h},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(E(v))}else{const v={approvalRuleId:l,criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(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("../")}}}))(G);function H(){const e=_(),s=T(),t=O(),{approvalRuleId:p}=k(),o=P.getSignedInUser(),l=N(),r=g((n=>w(n))),i=g((n=>C(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"?b.jsx(Q,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):b.jsx(Y,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t})}function pe(e){return j(e)==null}const J=F((function(e,s){const t=w(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:C(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 S=y.actorKind?.selectedOption,U=y.selectedRole?.selectedOption;let D=[];S==="role"&&U!=null?D=[{type:"attribute",subType:U,userId:void 0,idType:void 0,isImplicitActor:!1}]:S==="specific_person"&&(D=(y.persons?.selectedUsers??[]).map((q=>({type:"user",subType:void 0,userId:q.userId,idType:"user",isImplicitActor:!1}))));const x=y.action??"require_approval";m.push({action:x,actors:D,operator:D.length>1?x==="require_approval"?"or":"and":"is"})})),m},n=a.amountCriteria,v=a.vendorCriteria,h=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=h?.selection.selectedOptions??[];if(I.length>0&&(u.department={type:"department",operator:h?.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(E(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(E(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(Z(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(W);function ne(){const e=g((t=>z(t))),{isApprovalRulesV3Enabled:s}=K(e?.tenantId);return s?b.jsx(M,{}):b.jsx(H,{})}function M(){const e=_(),s=T(),t=O(),{approvalRuleId:p}=k(),o=P.getSignedInUser(),l=N(),r=g((n=>w(n))),i=g((n=>C(n))),[a,d]=f.useState(!1);if(X(),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"?b.jsx(Q,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):b.jsx(J,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t},p??"new")}export{ne as R,pe as i,X as u};
1
+ import{j as b}from"./liveblocks-DJbBe3tc.js";import{a as f}from"./sentry-C6T1HHHS.js";import{u as T,j as y,h as _,g as O,i as k,n as V}from"./core-BfWJ7zKT.js";import{lb as L,R3 as w,QP as C,FW as F,G6 as B,G1 as A,G2 as E,R4 as j,e$ as Q,G0 as W}from"./zeni-epic-state-kow6PLud.js";import{z as P,E as N,B as $,bP as z,ag as G,bC as K,bQ as H}from"./index-D9NLhglj.js";import"./mui-ts7KHm6i.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]="2d89a4f2-a62f-4bfb-90bb-30844fbe56fc",e._sentryDebugIdIdentifier="sentry-dbid-2d89a4f2-a62f-4bfb-90bb-30844fbe56fc")}catch{}})();function J(){const e=T(),s=f.useRef(!1),t=y((o=>o.vendorListState.fetchStateBillsTab.fetchState??"Not-Started")),p=y((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 M=V((function(e,s){const t=w(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=G(s.location);return{onApprovalRuleDataUpdated:a=>{const d=v=>{const h=[];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 g=(S=m.value,j(S)==null);var S;return{type:g?"attribute":"role",subType:m.value,userId:void 0,idType:void 0,isImplicitActor:!g}})),c=R.concat(I);h.push({action:u.stepType.selectedOption,actors:c,operator:c.length>1?u.stepType.selectedOption==="require_approval"?"or":"and":"is"})})),h},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(E(v))}else{const v={approvalRuleId:l,criteria:n,steps:d(a.steps),isApplicableOnPendingApprovalEntity:a.applyToExistingReimbursements.includes("applyToExistingReimbursements")};e(E(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("../")}}}))(z);function X(){const e=_(),s=T(),t=O(),{approvalRuleId:p}=k(),o=P.getSignedInUser(),l=N(),r=y((n=>w(n))),i=y((n=>C(n))),[a,d]=f.useState(!1);if(f.useEffect((()=>{a||(d(!0),s(F(!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"?b.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):b.jsx(M,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t})}function pe(e){return j(e)==null}const Y=V((function(e,s){const t=w(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:C(e).allApprovalRules}}),(function(e,s){const{navigate:t,approvalUpdateDataView:p,approverViewData:o,approvalRuleId:l}=s,r=p.remiSetupApproverViewUpdateData?.type,i=G(s.location);return{onApprovalRuleDataUpdated:a=>{const d=c=>{const m=[];return c.forEach((g=>{const S=g.actorKind?.selectedOption,U=g.selectedRole?.selectedOption;let D=[];S==="role"&&U!=null?D=[{type:"attribute",subType:U,userId:void 0,idType:void 0,isImplicitActor:!1}]:S==="specific_person"&&(D=(g.persons?.selectedUsers??[]).map((q=>({type:"user",subType:void 0,userId:q.userId,idType:"user",isImplicitActor:!1}))));const x=g.action??"require_approval";m.push({action:x,actors:D,operator:D.length>1?x==="require_approval"?"or":"and":"is"})})),m},n=a.amountCriteria,v=a.vendorCriteria,h=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=h?.selection.selectedOptions??[];if(I.length>0&&(u.department={type:"department",operator:h?.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(E(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(E(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(W(a)),t(r==="approval_update"?`../../${a}/edit`:`../${a}/edit`)}}}))(H);function ne(){const e=y((t=>Q(t))),{isApprovalRulesV3Enabled:s}=K(e?.tenantId);return s?b.jsx(Z,{}):b.jsx(X,{})}function Z(){const e=_(),s=T(),t=O(),{approvalRuleId:p}=k(),o=P.getSignedInUser(),l=N(),r=y((n=>w(n))),i=y((n=>C(n))),[a,d]=f.useState(!1);if(J(),f.useEffect((()=>{a||(d(!0),s(F(!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"?b.jsx($,{fetchState:r.approversDetailsFetchStatus.fetchState,style:{backgroundColor:l.colors.grey5}}):b.jsx(Y,{navigate:e,approvalUpdateDataView:r,approvalRuleId:p,approverViewData:i,location:t},p??"new")}export{ne as R,pe as i,J as u};