@zeniai/web-app-ui 5.1.63-dev → 5.1.63-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 (64) hide show
  1. package/dist/assets/{AddressRoutes-DiGYiZdH.js → AddressRoutes-DgZlzwKj.js} +1 -1
  2. package/dist/assets/{AddressScreen-GAHyIX-c.js → AddressScreen-DZz6iLRi.js} +1 -1
  3. package/dist/assets/{AiCfoScreen-D2sAwMZS.js → AiCfoScreen-BJy_pYhd.js} +1 -1
  4. package/dist/assets/{BillPayApprovalRoutes-BglCJxi-.js → BillPayApprovalRoutes-DJjLicyn.js} +1 -1
  5. package/dist/assets/{BillPayRoutes-7zp9D6x8.js → BillPayRoutes-DAczZIUA.js} +1 -1
  6. package/dist/assets/{BusinessVerificationPageScreen-DMq3tKTs.js → BusinessVerificationPageScreen-CbhS3pML.js} +1 -1
  7. package/dist/assets/{CardsAiCfoScreen--ED2OEzt.js → CardsAiCfoScreen-D3HVbkzL.js} +1 -1
  8. package/dist/assets/{ChargeCardRoutes-CMdGvjPJ.js → ChargeCardRoutes-lmFHLgNx.js} +1 -1
  9. package/dist/assets/{CompanyPassportScreen-DMJdNz2u.js → CompanyPassportScreen-BUt2L6sz.js} +1 -1
  10. package/dist/assets/{ConnectionAuthScreen-CC4jwpJn.js → ConnectionAuthScreen-BT3IRUL8.js} +1 -1
  11. package/dist/assets/{CustomerOnboardingAuthScreen-Bqsz81r8.js → CustomerOnboardingAuthScreen-BAn5X2Wb.js} +1 -1
  12. package/dist/assets/{CustomerOnboardingRoutes-DfaM8hGj.js → CustomerOnboardingRoutes-Dzhhfcds.js} +1 -1
  13. package/dist/assets/{DashboardRoutes-BCVeePc3.js → DashboardRoutes-CDKfXwLt.js} +1 -1
  14. package/dist/assets/{DefaultTenantHome-BKFAUyCt.js → DefaultTenantHome-CXh59aBD.js} +1 -1
  15. package/dist/assets/{DomesticWireDetailScreen-WRSPX-4X.js → DomesticWireDetailScreen-iXO5zWUm.js} +1 -1
  16. package/dist/assets/{DrawerScreen-DaMuYUCn.js → DrawerScreen-B_vR9_qC.js} +1 -1
  17. package/dist/assets/{EntityDetailRoutes-Bcvb-t4n.js → EntityDetailRoutes-BcZQKkh1.js} +1 -1
  18. package/dist/assets/{ExpenseAutomationRoutes-BMNILnav.js → ExpenseAutomationRoutes-CWOOkRUe.js} +1 -1
  19. package/dist/assets/{FeaturePreviewScreen-D4Ah53J7.js → FeaturePreviewScreen-BQvRhW1f.js} +1 -1
  20. package/dist/assets/{HubSpotOAuthCallbackScreen-DRjMsB35.js → HubSpotOAuthCallbackScreen-DeESKpku.js} +1 -1
  21. package/dist/assets/{MagicLinkRoutes-Dtjlc8Bf.js → MagicLinkRoutes-6x7Us6_Q.js} +1 -1
  22. package/dist/assets/{MagicLinkSignInScreen-D1bS19KK.js → MagicLinkSignInScreen-BsUi7-40.js} +1 -1
  23. package/dist/assets/{MobileAppDrawer-PDN1hPUR.js → MobileAppDrawer-CHF9nCsW.js} +1 -1
  24. package/dist/assets/{NotFoundScreen-CKyavEYX.js → NotFoundScreen-D0AQGcoe.js} +1 -1
  25. package/dist/assets/{NotificationRoutes-BP3RNHOU.js → NotificationRoutes-BPu1VkFm.js} +1 -1
  26. package/dist/assets/{OAuthConsentScreen-CWy6K8Uy.js → OAuthConsentScreen-DkCTDJwq.js} +1 -1
  27. package/dist/assets/{PandLWithForecastRoutes-BCTBlqwg.js → PandLWithForecastRoutes-BEFahy-o.js} +1 -1
  28. package/dist/assets/{PeopleRoutes-84yTwmWw.js → PeopleRoutes-sN-axVAc.js} +1 -1
  29. package/dist/assets/{PerformanceRoutes-BQUXWKZE.js → PerformanceRoutes-DXXEZbBB.js} +1 -1
  30. package/dist/assets/{QBOConnectionScreen-BDzJBSaJ.js → QBOConnectionScreen-_B3wLRiT.js} +1 -1
  31. package/dist/assets/{ReferralListScreen-CXBkdn17.js → ReferralListScreen-CzPMgGBj.js} +1 -1
  32. package/dist/assets/{ReimbursementApprovalRoutes-DFKDTo2d.js → ReimbursementApprovalRoutes-DCrHBh1u.js} +1 -1
  33. package/dist/assets/{ReimbursementApprovalRuleDetailScreen-77M2HLZ2.js → ReimbursementApprovalRuleDetailScreen-SmUpbSJe.js} +1 -1
  34. package/dist/assets/{ReimbursementRoutes-YhP6hHRt.js → ReimbursementRoutes-xFL2a98D.js} +1 -1
  35. package/dist/assets/{ReportsRoutes-wzqHii7q.js → ReportsRoutes-BCmFjTfI.js} +1 -1
  36. package/dist/assets/{RewardsRoutes-DfmbXNc8.js → RewardsRoutes-OtuIPjdr.js} +1 -1
  37. package/dist/assets/{ScreenRoutes-DvRF1Ugr.js → ScreenRoutes-CEUjM6GK.js} +2 -2
  38. package/dist/assets/{SettingsRoutes-xpOSQOkw.js → SettingsRoutes-BtEyetWY.js} +1 -1
  39. package/dist/assets/{SetupPagesScreen-CrjLDbOm.js → SetupPagesScreen-CCip2k58.js} +1 -1
  40. package/dist/assets/{SignInScreen-Ck9zXfCr.js → SignInScreen-jXShH9LP.js} +1 -1
  41. package/dist/assets/{SignOutScreen-DSoi64zr.js → SignOutScreen-CnWA4YZp.js} +1 -1
  42. package/dist/assets/{TaskListScreen-Cs7VLiUm.js → TaskListScreen-qq0yWrR-.js} +1 -1
  43. package/dist/assets/{TaskRoutes-dkq9ikjL.js → TaskRoutes-B3fEaAUN.js} +1 -1
  44. package/dist/assets/{TransactionDetailRoutes-2AtDo3dT.js → TransactionDetailRoutes-DWDGqu2s.js} +1 -1
  45. package/dist/assets/{TransactionDetailScreen-CWpk0UU1.js → TransactionDetailScreen-DW8t3EC2.js} +1 -1
  46. package/dist/assets/{TransactionListRoutes-lHRZBvxi.js → TransactionListRoutes-DHSwzqfn.js} +1 -1
  47. package/dist/assets/{TreasuryRoutes-C4iGPRK3.js → TreasuryRoutes-Cxtbe06-.js} +1 -1
  48. package/dist/assets/{VendorsRoutes-7KkgbfcW.js → VendorsRoutes-MlvyyMTe.js} +1 -1
  49. package/dist/assets/{WiseConfirmationScreen-DshLBzeW.js → WiseConfirmationScreen-D-axhjl6.js} +1 -1
  50. package/dist/assets/{ZeniAccountRoutes-pWTshbAJ.js → ZeniAccountRoutes-BG6yVxGl.js} +1 -1
  51. package/dist/assets/{ZeniAccountStatementScreen-DEwEWZ2Q.js → ZeniAccountStatementScreen-D1CXmWJM.js} +1 -1
  52. package/dist/assets/{analyticsHelper-d524teZu.js → analyticsHelper-bAQTI-GF.js} +1 -1
  53. package/dist/assets/{getLocaleForTenant-DTwWZ3TG.js → getLocaleForTenant-DrFh6zlq.js} +1 -1
  54. package/dist/assets/{index-CwcEF-q7.js → index-CVpYlrKc.js} +5 -5
  55. package/dist/assets/{routePaths-CjJlLbxf.js → routePaths-DdjVf9j1.js} +1 -1
  56. package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-BQUVbUQb.js → useAiCfoDashboardSuggestedQuestionsChips-CA141hZU.js} +1 -1
  57. package/dist/assets/{useAskAiCfoHostNavButtonProps-XSnEPSCB.js → useAskAiCfoHostNavButtonProps-w5iOFbal.js} +1 -1
  58. package/dist/assets/{useCashManagementBanner-Cqvytrqk.js → useCashManagementBanner-Drz7Ezu4.js} +1 -1
  59. package/dist/assets/{useChargeCardPusherEvents-DWEn28bl.js → useChargeCardPusherEvents-FFGUOH8U.js} +1 -1
  60. package/dist/assets/{useEmailConnectResultRefresh-iMxOBvVh.js → useEmailConnectResultRefresh-DsiaZGrG.js} +1 -1
  61. package/dist/assets/{useInitialThreadRequest-BsceBU6n.js → useInitialThreadRequest-B3tsIQAR.js} +1 -1
  62. package/dist/assets/{withTransactionSidePanel-BzY2xiGY.js → withTransactionSidePanel-Dy09Dwri.js} +1 -1
  63. package/dist/index.html +1 -1
  64. package/package.json +1 -1
@@ -1,5 +1,5 @@
1
- const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/zeni-epic-state-DuQa9FMz.js","assets/sentry-CuaXjR5n.js","assets/core-Bv1T7LZC.js","assets/index-Bf0yAk1h.js","assets/DefaultTenantHome-BKFAUyCt.js","assets/mui-VYhJrGDQ.js","assets/getLocaleForTenant-DTwWZ3TG.js","assets/analytics-Bqx0zRxd.js","assets/utils-DPYDOv00.js","assets/ScreenRoutes-DvRF1Ugr.js","assets/analyticsHelper-d524teZu.js","assets/ConnectionAuthScreen-CC4jwpJn.js","assets/QBOConnectionScreen-BDzJBSaJ.js","assets/empty-BGU_c4p_.js","assets/index-B-VkC3pW.js","assets/url-DXrWvdUh.js","assets/index-Bgxmla6x.js","assets/decodeURIComponentSafe-CgJ-EbJc.js","assets/SignInScreen-Ck9zXfCr.js","assets/useDeviceId-BVyTAih4.js","assets/MagicLinkSignInScreen-D1bS19KK.js","assets/NotFoundScreen-CKyavEYX.js","assets/MagicLinkRoutes-Dtjlc8Bf.js","assets/WiseConfirmationScreen-DshLBzeW.js","assets/HubSpotOAuthCallbackScreen-DRjMsB35.js","assets/CustomerOnboardingAuthScreen-Bqsz81r8.js","assets/SignOutScreen-DSoi64zr.js","assets/OAuthConsentScreen-CWy6K8Uy.js"])))=>i.map(i=>d[i]);
2
- import{a as m,b as T,c as fae,R as F$t,p as DY,r as Ap,g as cit,e as Lge,f as O$t,s as Tge,i as R$t,w as N$t,j as _$t,S as V$t,k as H$t,l as U$t,m as W$t,n as Q$t,o as G$t}from"./sentry-CuaXjR5n.js";import{L as Y$t,C as Dge,_ as $p,a as DT,b as q$t,c as HH,d as PT,u as dit,T as K$t,e as Z$t,f as J$t,g as X$t,h as uit,i as ejt,k as tjt,j as Bt,l as njt}from"./liveblocks-DC3GaKoW.js";import{f as pit,r as zr,R as ny,P as Bl,O as ojt,N as hit,u as tu,g as fh,h as BT,i as mit,j as Qo,m as $1e,s as xae,k as git,l as UE,n as ijt,o as rjt,p as Su,q as ajt,B as ljt}from"./core-Bv1T7LZC.js";import{L as Pge,bl as sjt,bm as cjt,bn as Q6,bo as Gt,bp as nA,bq as djt,br as ujt,bs as dl,bt as L2,bu as pjt,bv as i4,bw as ll,bx as hjt,by as mjt,bz as gjt,bA as AL,bB as W5,bC as _3,bD as UH,bE as hn,bF as fit,bG as h1,bH as fjt,bI as dk,bJ as xit,bK as yit,bL as j1e,bM as xh,bN as V3,bO as Cd,bP as j5,bQ as xjt,bR as bs,bS as yjt,bT as oA,bU as bjt,bV as wjt,bW as yae,bX as Cjt,bY as Jy,bZ as Bge,b_ as vjt,b$ as Sjt,c0 as kjt,c1 as Ajt,c2 as $jt,c3 as jjt,c4 as Ejt,c5 as Ijt,c6,c7 as WH,c8 as Ljt,c9 as QH,ca as GH,cb as YH,cc as E1e,cd as qH,ce as uk,cf as pk,cg as KH,ch as Tjt,ci as Djt,cj as Mge,ck as Pjt,cl as Bjt,cm as Mjt,cn as bit,co as I1e,cp as zjt,cq as r9,cr as zge,cs as Fjt,ct as Ojt,cu as Rjt,cv as Eb,cw as Ib,cx as wit,cy as Cit,cz as L1e,cA as Njt,cB as vit,cC as _jt,cD as lN,cE as Sit,cF as Vjt,cG as kit,cH as Hjt,cI as WE,cJ as Fge,cK as Ujt,cL as Ait,cM as $it,cN as jit,cO as Wjt,cP as Oge,cQ as Qjt,cR as Gjt,cS as Eit,cT as Yjt,cU as Rge,cV as Rc,cW as Fl,cX as qjt,cY as hk,cZ as s1,c_ as Iit,c$ as Kjt,d0 as $L,d1 as Ty,d2 as Ra,d3 as Zjt,d4 as Jjt,d5 as Xjt,d6 as eEt,d7 as uP,d8 as y0,d9 as tEt,da as nEt,db as oEt,dc as iEt,dd as pP,de as Xy,df as ZH,dg as rEt,dh as aEt,di as Lb,dj as m1,dk as Lit,dl as Tit,dm as lEt,dn as sEt,dp as cEt,dq as iA,dr as dEt,ds as q1,dt as eb,du as T1e,dv as Dit,dw as Pit,dx as Bit,dy as Mit,dz as zit,dA as Fit,dB as uEt,dC as Nge,dD as pEt,_ as Dd,dE as D1e,dF as Oit,dG as hEt,dH as _ge,dI as Tp,dJ as E5,dK as mEt,dL as gEt,dM as Rit,dN as bae,dO as VO,dP as fEt,dQ as xEt,dR as yEt,dS as bEt,dT as wEt,dU as CEt,dV as vEt,dW as SEt,dX as kEt,dY as AEt,dZ as AI,d_ as $I,d$ as Nit,e0 as ah,e1 as $Et,e2 as P1e,e3 as B1e,e4 as rA,e5 as M1e,e6 as z1e,e7 as F1e,e8 as O1e,e9 as _it,ea as R1e,eb as jEt,ec as EEt,ed as Vit,ee as Vge,ef as IEt,eg as N1e,eh as LEt,ei as TEt,ej as Hit,ek as DEt,el as PEt,em as BEt,en as Uit,eo as MEt,ep as Wit,eq as Qit,er as zEt,es as FEt,et as OEt,eu as REt,ev as NEt,ew as _Et,ex as VEt,ey as HEt,ez as Git,eA as UEt,eB as Hge,eC as JH,eD as WEt,eE as QEt,eF as GEt,eG as YEt,eH as qEt,eI as KEt,eJ as ZEt,eK as JEt,eL as Uge,eM as Yit,eN as qit,eO as Kit,eP as Zit,eQ as Jit,eR as Xit,eS as XEt,eT as eIt,eU as tIt,v as nIt,eV as MT,eW as du,eX as ert,eY as trt,eZ as oIt,e_ as iIt,e$ as Wge,f0 as rIt,f1 as aIt,f2 as lIt,f3 as sIt,f4 as cIt,f5 as dIt,f6 as uIt,f7 as pIt,f8 as hIt,f9 as mIt,fa as gIt,fb as fIt,fc as xIt,fd as yIt,fe as bIt,ff as wIt,fg as CIt,fh as vIt,fi as SIt,fj as Qge,fk as kIt,fl as AIt,fm as $It,fn as jIt,fo as EIt,fp as _1e,fq as zT,fr as V1e,fs as nrt,ft as IIt,fu as LIt,fv as TIt,fw as ort,fx as Gge,fy as DIt,fz as irt,fA as PIt,fB as rrt,fC as BIt,fD as art,fE as MIt,fF as lrt,fG as zIt,fH as FIt,fI as OIt,fJ as RIt,fK as NIt,fL as Yge,fM as srt,fN as Tw,fO as qge,fP as _It,fQ as Kge,fR as VIt,fS as HIt,fT as crt,fU as drt,fV as UIt,fW as WIt,fX as QIt,fY as GIt,fZ as YIt,f_ as qIt,f$ as sN,g0 as H1e,g1 as urt,g2 as KIt,g3 as jI,g4 as ZIt,g5 as JIt,g6 as XIt,g7 as eLt,g8 as tLt,g9 as nLt,ga as oLt,gb as iLt,gc as rLt,gd as aLt,ge as prt,gf as lLt,gg as sLt,gh as cLt,gi as Zge,gj as dLt,gk as uLt,gl as pLt,gm as hLt,gn as mLt,go as wae,gp as gLt,gq as fLt,gr as xLt,gs as yLt,gt as bLt,gu as wLt,gv as CLt,gw as vLt,gx as Jge,gy as SLt,gz as kLt}from"./zeni-epic-state-DuQa9FMz.js";import{n as l,T as hrt,G as FT,j as ei,c as Ie,k as Rn,C as mrt,u as U1e,a as Cae,A as ALt,b as $Lt,I as jLt,d as ELt,D as cN,S as grt}from"./mui-VYhJrGDQ.js";import{r as ILt,m as l0}from"./analytics-Bqx0zRxd.js";import{u as $h}from"./plaid-BlhDSPsk.js";import{D as W1e,H as XH,g as LLt,O as TLt,S as DLt,T as PLt,u as Q1e,a as G1e,b as BLt}from"./dnd-CrtLd1r-.js";import{l as MLt}from"./stripe-DMRn4zHo.js";import{L as jS}from"./lottie-BAdftm7g.js";import{r as Vs}from"./lexical-DtmspfR6.js";import{D as vae,P as Sae,_ as frt,a as xrt}from"./pdf-DyfSqkK5.js";import{R as mk,G as A6,H as fp,X as is,Y as _l,I as Wc,J as zLt,K as $6,L as Tb,M as jh,N as aA,O as yrt,P as FLt,Q as OLt,S as eU,U as ES,V as RLt,W as Y1e,Z as NLt,_ as _Lt,$ as VLt,d as HLt}from"./recharts-D979ncoh.js";import{r as ULt,n as Xge}from"./utils-DPYDOv00.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]="ec3f76a7-ff49-4737-9e57-57f55f3d06a5",e._sentryDebugIdIdentifier="sentry-dbid-ec3f76a7-ff49-4737-9e57-57f55f3d06a5")}catch{}})();(function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const a of r.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0})}function n(o){if(o.ep)return;o.ep=!0;const r=function(a){const s={};return a.integrity&&(s.integrity=a.integrity),a.referrerPolicy&&(s.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?s.credentials="include":a.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}(o);fetch(o.href,r)}})();var e3e,hP={},WLt=function(){if(e3e)return hP;e3e=1;var e=pit();return hP.createRoot=e.createRoot,hP.hydrateRoot=e.hydrateRoot,hP}(),ap=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof fae<"u"?fae:typeof self<"u"?self:{};function Ri(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var t3e,n3e,o3e={exports:{}},a$={};function brt(){return n3e||(n3e=1,o3e.exports=function(){if(t3e)return a$;t3e=1;var e=T,n=Symbol.for("react.element"),o=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function c(d,u,p){var h,g={},f=null,x=null;for(h in p!==void 0&&(f=""+p),u.key!==void 0&&(f=""+u.key),u.ref!==void 0&&(x=u.ref),u)r.call(u,h)&&!s.hasOwnProperty(h)&&(g[h]=u[h]);if(d&&d.defaultProps)for(h in u=d.defaultProps)g[h]===void 0&&(g[h]=u[h]);return{$$typeof:n,type:d,key:f,ref:x,props:g,_owner:a.current}}return a$.Fragment=o,a$.jsx=c,a$.jsxs=c,a$}()),o3e.exports}var t=brt();const QLt=m.createContext(null),PY={didCatch:!1,error:null};let GLt=class extends m.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=PY}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){const{error:e}=this.state;if(e!==null){for(var n,o,r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];(n=(o=this.props).onReset)===null||n===void 0||n.call(o,{args:a,reason:"imperative-api"}),this.setState(PY)}}componentDidCatch(e,n){var o,r;(o=(r=this.props).onError)===null||o===void 0||o.call(r,e,n)}componentDidUpdate(e,n){const{didCatch:o}=this.state,{resetKeys:r}=this.props;var a,s;o&&n.error!==null&&function(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return c.length!==d.length||c.some((u,p)=>!Object.is(u,d[p]))}(e.resetKeys,r)&&((a=(s=this.props).onReset)===null||a===void 0||a.call(s,{next:r,prev:e.resetKeys,reason:"keys"}),this.setState(PY))}render(){const{children:e,fallbackRender:n,FallbackComponent:o,fallback:r}=this.props,{didCatch:a,error:s}=this.state;let c=e;if(a){const d={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")c=n(d);else if(o)c=m.createElement(o,d);else{if(r===void 0)throw s;c=r}}return m.createElement(QLt.Provider,{value:{didCatch:a,error:s,resetErrorBoundary:this.resetErrorBoundary}},c)}};var i3e,BY={exports:{}},r3e,a3e,MY,YLt=(i3e||(i3e=1,a3e=BY.exports,MY=function(){var e,n,o,r,a,s,c={},d={},u={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},p={currentLocale:u.currentLocale,zeroFormat:u.zeroFormat,nullFormat:u.nullFormat,defaultFormat:u.defaultFormat,scalePercentBy100:u.scalePercentBy100};function h(g,f){this._input=g,this._value=f}return e=function(g){var f,x,y,b;if(e.isNumeral(g))f=g.value();else if(g===0||typeof g>"u")f=0;else if(g===null||n.isNaN(g))f=null;else if(typeof g=="string")if(p.zeroFormat&&g===p.zeroFormat)f=0;else if(p.nullFormat&&g===p.nullFormat||!g.replace(/[^0-9]+/g,"").length)f=null;else{for(x in c)if((b=typeof c[x].regexps.unformat=="function"?c[x].regexps.unformat():c[x].regexps.unformat)&&g.match(b)){y=c[x].unformat;break}f=(y=y||e._.stringToNumber)(g)}else f=Number(g)||null;return new h(g,f)},e.version="2.0.6",e.isNumeral=function(g){return g instanceof h},e._=n={numberToFormat:function(g,f,x){var y,b,w,C,v,S,A,j,$=d[e.options.currentLocale],E=!1,L=!1,I="",B=1e12,D=1e9,z=1e6,U="",R=!1;if(g=g||0,w=Math.abs(g),e._.includes(f,"(")?(E=!0,f=f.replace(/[\(|\)]/g,"")):(e._.includes(f,"+")||e._.includes(f,"-"))&&(S=e._.includes(f,"+")?f.indexOf("+"):g<0?f.indexOf("-"):-1,f=f.replace(/[\+|\-]/g,"")),e._.includes(f,"a")&&(b=!!(b=f.match(/a(k|m|b|t)?/))&&b[1],e._.includes(f," a")&&(I=" "),f=f.replace(new RegExp(I+"a[kmbt]?"),""),w>=B&&!b||b==="t"?(I+=$.abbreviations.trillion,g/=B):w<B&&w>=D&&!b||b==="b"?(I+=$.abbreviations.billion,g/=D):w<D&&w>=z&&!b||b==="m"?(I+=$.abbreviations.million,g/=z):(w<z&&w>=1e3&&!b||b==="k")&&(I+=$.abbreviations.thousand,g/=1e3)),e._.includes(f,"[.]")&&(L=!0,f=f.replace("[.]",".")),C=g.toString().split(".")[0],v=f.split(".")[1],A=f.indexOf(","),y=(f.split(".")[0].split(",")[0].match(/0/g)||[]).length,v?(e._.includes(v,"[")?(v=(v=v.replace("]","")).split("["),U=e._.toFixed(g,v[0].length+v[1].length,x,v[1].length)):U=e._.toFixed(g,v.length,x),C=U.split(".")[0],U=e._.includes(U,".")?$.delimiters.decimal+U.split(".")[1]:"",L&&Number(U.slice(1))===0&&(U="")):C=e._.toFixed(g,0,x),I&&!b&&Number(C)>=1e3&&I!==$.abbreviations.trillion)switch(C=String(Number(C)/1e3),I){case $.abbreviations.thousand:I=$.abbreviations.million;break;case $.abbreviations.million:I=$.abbreviations.billion;break;case $.abbreviations.billion:I=$.abbreviations.trillion}if(e._.includes(C,"-")&&(C=C.slice(1),R=!0),C.length<y)for(var O=y-C.length;O>0;O--)C="0"+C;return A>-1&&(C=C.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+$.delimiters.thousands)),f.indexOf(".")===0&&(C=""),j=C+U+(I||""),E?j=(E&&R?"(":"")+j+(E&&R?")":""):S>=0?j=S===0?(R?"-":"+")+j:j+(R?"-":"+"):R&&(j="-"+j),j},stringToNumber:function(g){var f,x,y,b=d[p.currentLocale],w=g,C={thousand:3,million:6,billion:9,trillion:12};if(p.zeroFormat&&g===p.zeroFormat)x=0;else if(p.nullFormat&&g===p.nullFormat||!g.replace(/[^0-9]+/g,"").length)x=null;else{for(f in x=1,b.delimiters.decimal!=="."&&(g=g.replace(/\./g,"").replace(b.delimiters.decimal,".")),C)if(y=new RegExp("[^a-zA-Z]"+b.abbreviations[f]+"(?:\\)|(\\"+b.currency.symbol+")?(?:\\))?)?$"),w.match(y)){x*=Math.pow(10,C[f]);break}x*=(g.split("-").length+Math.min(g.split("(").length-1,g.split(")").length-1))%2?1:-1,g=g.replace(/[^0-9\.]+/g,""),x*=Number(g)}return x},isNaN:function(g){return typeof g=="number"&&isNaN(g)},includes:function(g,f){return g.indexOf(f)!==-1},insert:function(g,f,x){return g.slice(0,x)+f+g.slice(x)},reduce:function(g,f){if(this===null)throw new TypeError("Array.prototype.reduce called on null or undefined");if(typeof f!="function")throw new TypeError(f+" is not a function");var x,y=Object(g),b=y.length>>>0,w=0;if(arguments.length===3)x=arguments[2];else{for(;w<b&&!(w in y);)w++;if(w>=b)throw new TypeError("Reduce of empty array with no initial value");x=y[w++]}for(;w<b;w++)w in y&&(x=f(x,y[w],w,y));return x},multiplier:function(g){var f=g.toString().split(".");return f.length<2?1:Math.pow(10,f[1].length)},correctionFactor:function(){return Array.prototype.slice.call(arguments).reduce(function(g,f){var x=n.multiplier(f);return g>x?g:x},1)},toFixed:function(g,f,x,y){var b,w,C,v,S=g.toString().split("."),A=f-(y||0);return b=S.length===2?Math.min(Math.max(S[1].length,A),f):A,C=Math.pow(10,b),v=(x(g+"e+"+b)/C).toFixed(b),y>f-b&&(w=new RegExp("\\.?0{1,"+(y-(f-b))+"}$"),v=v.replace(w,"")),v}},e.options=p,e.formats=c,e.locales=d,e.locale=function(g){return g&&(p.currentLocale=g.toLowerCase()),p.currentLocale},e.localeData=function(g){if(!g)return d[p.currentLocale];if(g=g.toLowerCase(),!d[g])throw new Error("Unknown locale : "+g);return d[g]},e.reset=function(){for(var g in u)p[g]=u[g]},e.zeroFormat=function(g){p.zeroFormat=typeof g=="string"?g:null},e.nullFormat=function(g){p.nullFormat=typeof g=="string"?g:null},e.defaultFormat=function(g){p.defaultFormat=typeof g=="string"?g:"0.0"},e.register=function(g,f,x){if(f=f.toLowerCase(),this[g+"s"][f])throw new TypeError(f+" "+g+" already registered.");return this[g+"s"][f]=x,x},e.validate=function(g,f){var x,y,b,w,C,v,S,A;if(typeof g!="string"&&(g+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",g)),(g=g.trim()).match(/^\d+$/))return!0;if(g==="")return!1;try{S=e.localeData(f)}catch{S=e.localeData(e.locale())}return b=S.currency.symbol,C=S.abbreviations,x=S.delimiters.decimal,y=S.delimiters.thousands==="."?"\\.":S.delimiters.thousands,!((A=g.match(/^[^\d]+/))!==null&&(g=g.substr(1),A[0]!==b)||(A=g.match(/[^\d]+$/))!==null&&(g=g.slice(0,-1),A[0]!==C.thousand&&A[0]!==C.million&&A[0]!==C.billion&&A[0]!==C.trillion)||(v=new RegExp(y+"{2}"),g.match(/[^\d.,]/g)||(w=g.split(x)).length>2||(w.length<2?!w[0].match(/^\d+.*\d$/)||w[0].match(v):w[0].length===1?!w[0].match(/^\d+$/)||w[0].match(v)||!w[1].match(/^\d+$/):!w[0].match(/^\d+.*\d$/)||w[0].match(v)||!w[1].match(/^\d+$/))))},e.fn=h.prototype={clone:function(){return e(this)},format:function(g,f){var x,y,b,w=this._value,C=g||p.defaultFormat;if(f=f||Math.round,w===0&&p.zeroFormat!==null)y=p.zeroFormat;else if(w===null&&p.nullFormat!==null)y=p.nullFormat;else{for(x in c)if(C.match(c[x].regexps.format)){b=c[x].format;break}y=(b=b||e._.numberToFormat)(w,C,f)}return y},value:function(){return this._value},input:function(){return this._input},set:function(g){return this._value=Number(g),this},add:function(g){var f=n.correctionFactor.call(null,this._value,g);return this._value=n.reduce([this._value,g],function(x,y,b,w){return x+Math.round(f*y)},0)/f,this},subtract:function(g){var f=n.correctionFactor.call(null,this._value,g);return this._value=n.reduce([g],function(x,y,b,w){return x-Math.round(f*y)},Math.round(this._value*f))/f,this},multiply:function(g){return this._value=n.reduce([this._value,g],function(f,x,y,b){var w=n.correctionFactor(f,x);return Math.round(f*w)*Math.round(x*w)/Math.round(w*w)},1),this},divide:function(g){return this._value=n.reduce([this._value,g],function(f,x,y,b){var w=n.correctionFactor(f,x);return Math.round(f*w)/Math.round(x*w)}),this},difference:function(g){return Math.abs(e(this._value).subtract(g).value())}},e.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(g){var f=g%10;return~~(g%100/10)==1?"th":f===1?"st":f===2?"nd":f===3?"rd":"th"},currency:{symbol:"$"}}),e.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(g,f,x){var y,b=e._.includes(f," BPS")?" ":"";return g*=1e4,f=f.replace(/\s?BPS/,""),y=e._.numberToFormat(g,f,x),e._.includes(y,")")?((y=y.split("")).splice(-1,0,b+"BPS"),y=y.join("")):y=y+b+"BPS",y},unformat:function(g){return+(1e-4*e._.stringToNumber(g)).toFixed(15)}}),r={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},a=(o={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}).suffixes.concat(r.suffixes.filter(function(g){return o.suffixes.indexOf(g)<0})),s="("+(s=a.join("|")).replace("B","B(?!PS)")+")",e.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(s)},format:function(g,f,x){var y,b,w,C=e._.includes(f,"ib")?r:o,v=e._.includes(f," b")||e._.includes(f," ib")?" ":"";for(f=f.replace(/\s?i?b/,""),y=0;y<=C.suffixes.length;y++)if(b=Math.pow(C.base,y),w=Math.pow(C.base,y+1),g===null||g===0||g>=b&&g<w){v+=C.suffixes[y],b>0&&(g/=b);break}return e._.numberToFormat(g,f,x)+v},unformat:function(g){var f,x,y=e._.stringToNumber(g);if(y){for(f=o.suffixes.length-1;f>=0;f--){if(e._.includes(g,o.suffixes[f])){x=Math.pow(o.base,f);break}if(e._.includes(g,r.suffixes[f])){x=Math.pow(r.base,f);break}}y*=x||1}return y}}),e.register("format","currency",{regexps:{format:/(\$)/},format:function(g,f,x){var y,b,w,C=e.locales[e.options.currentLocale],v={before:f.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:f.match(/([\+|\-|\)|\s|\$]*)$/)[0]};for(f=f.replace(/\s?\$\s?/,""),y=e._.numberToFormat(g,f,x),g>=0?(v.before=v.before.replace(/[\-\(]/,""),v.after=v.after.replace(/[\-\)]/,"")):g<0&&!e._.includes(v.before,"-")&&!e._.includes(v.before,"(")&&(v.before="-"+v.before),w=0;w<v.before.length;w++)switch(b=v.before[w],b){case"$":y=e._.insert(y,C.currency.symbol,w);break;case" ":y=e._.insert(y," ",w+C.currency.symbol.length-1)}for(w=v.after.length-1;w>=0;w--)switch(b=v.after[w],b){case"$":y=w===v.after.length-1?y+C.currency.symbol:e._.insert(y,C.currency.symbol,-(v.after.length-(1+w)));break;case" ":y=w===v.after.length-1?y+" ":e._.insert(y," ",-(v.after.length-(1+w)+C.currency.symbol.length-1))}return y}}),e.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(g,f,x){var y=(typeof g!="number"||e._.isNaN(g)?"0e+0":g.toExponential()).split("e");return f=f.replace(/e[\+|\-]{1}0/,""),e._.numberToFormat(Number(y[0]),f,x)+"e"+y[1]},unformat:function(g){var f=e._.includes(g,"e+")?g.split("e+"):g.split("e-"),x=Number(f[0]),y=Number(f[1]);return y=e._.includes(g,"e-")?y*=-1:y,e._.reduce([x,Math.pow(10,y)],function(b,w,C,v){var S=e._.correctionFactor(b,w);return b*S*(w*S)/(S*S)},1)}}),e.register("format","ordinal",{regexps:{format:/(o)/},format:function(g,f,x){var y=e.locales[e.options.currentLocale],b=e._.includes(f," o")?" ":"";return f=f.replace(/\s?o/,""),b+=y.ordinal(g),e._.numberToFormat(g,f,x)+b}}),e.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(g,f,x){var y,b=e._.includes(f," %")?" ":"";return e.options.scalePercentBy100&&(g*=100),f=f.replace(/\s?\%/,""),y=e._.numberToFormat(g,f,x),e._.includes(y,")")?((y=y.split("")).splice(-1,0,b+"%"),y=y.join("")):y=y+b+"%",y},unformat:function(g){var f=e._.stringToNumber(g);return e.options.scalePercentBy100?.01*f:f}}),e.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(g,f,x){var y=Math.floor(g/60/60),b=Math.floor((g-60*y*60)/60),w=Math.round(g-60*y*60-60*b);return y+":"+(b<10?"0"+b:b)+":"+(w<10?"0"+w:w)},unformat:function(g){var f=g.split(":"),x=0;return f.length===3?(x+=60*Number(f[0])*60,x+=60*Number(f[1]),x+=Number(f[2])):f.length===2&&(x+=60*Number(f[0]),x+=Number(f[1])),Number(x)}}),e},(r3e=BY).exports?r3e.exports=MY():a3e.numeral=MY()),BY.exports);const M5=Ri(YLt);function Q5(e,...n){const o=new URL(`https://mui.com/production-error/?code=${e}`);return n.forEach(r=>o.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${o} for the full message.`}const z5="$$material";var qLt={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function KLt(e){var n=Object.create(null);return function(o){return n[o]===void 0&&(n[o]=e(o)),n[o]}}var ZLt=/[A-Z]|^ms/g,JLt=/_EMO_([^_]+?)_([^]*?)_EMO_/g,wrt=function(e){return e.charCodeAt(1)===45},l3e=function(e){return e!=null&&typeof e!="boolean"},zY=KLt(function(e){return wrt(e)?e:e.replace(ZLt,"-$&").toLowerCase()}),s3e=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(JLt,function(o,r,a){return U7={name:r,styles:a,next:U7},r})}return qLt[e]===1||wrt(e)||typeof n!="number"||n===0?n:n+"px"};function dN(e,n,o){if(o==null)return"";var r=o;if(r.__emotion_styles!==void 0)return r;switch(typeof o){case"boolean":return"";case"object":var a=o;if(a.anim===1)return U7={name:a.name,styles:a.styles,next:U7},a.name;var s=o;if(s.styles!==void 0){var c=s.next;if(c!==void 0)for(;c!==void 0;)U7={name:c.name,styles:c.styles,next:U7},c=c.next;return s.styles+";"}return function(d,u,p){var h="";if(Array.isArray(p))for(var g=0;g<p.length;g++)h+=dN(d,u,p[g])+";";else for(var f in p){var x=p[f];if(typeof x!="object"){var y=x;l3e(y)&&(h+=zY(f)+":"+s3e(f,y)+";")}else if(Array.isArray(x)&&typeof x[0]=="string"&&u==null)for(var b=0;b<x.length;b++)l3e(x[b])&&(h+=zY(f)+":"+s3e(f,x[b])+";");else{var w=dN(d,u,x);switch(f){case"animation":case"animationName":h+=zY(f)+":"+w+";";break;default:h+=f+"{"+w+"}"}}}return h}(e,n,o)}return o}var U7,c3e=/label:\s*([^\s;{]+)\s*(;|$)/g,d3e,u3e,p3e,h3e,m3e,g3e={exports:{}};function XLt(){return u3e?d3e:(u3e=1,d3e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}function eTt(){if(h3e)return p3e;h3e=1;var e=XLt();function n(){}function o(){}return o.resetWarningCache=n,p3e=function(){function r(c,d,u,p,h,g){if(g!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}function a(){return r}r.isRequired=r;var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:o,resetWarningCache:n};return s.PropTypes=s,s}}function q1e(){return m3e||(m3e=1,g3e.exports=eTt()()),g3e.exports}const kn=Ri(q1e());var tTt=function(){function e(o){var r=this;this._insertTag=function(a){var s;s=r.tags.length===0?r.insertionPoint?r.insertionPoint.nextSibling:r.prepend?r.container.firstChild:r.before:r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(a,s),r.tags.push(a)},this.isSpeedy=o.speedy===void 0||o.speedy,this.tags=[],this.ctr=0,this.nonce=o.nonce,this.key=o.key,this.container=o.container,this.prepend=o.prepend,this.insertionPoint=o.insertionPoint,this.before=null}var n=e.prototype;return n.hydrate=function(o){o.forEach(this._insertTag)},n.insert=function(o){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(s){var c=document.createElement("style");return c.setAttribute("data-emotion",s.key),s.nonce!==void 0&&c.setAttribute("nonce",s.nonce),c.appendChild(document.createTextNode("")),c.setAttribute("data-s",""),c}(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var a=function(s){if(s.sheet)return s.sheet;for(var c=0;c<document.styleSheets.length;c++)if(document.styleSheets[c].ownerNode===s)return document.styleSheets[c]}(r);try{a.insertRule(o,a.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(o));this.ctr++},n.flush=function(){this.tags.forEach(function(o){var r;return(r=o.parentNode)==null?void 0:r.removeChild(o)}),this.tags=[],this.ctr=0},e}(),n1="-ms-",f3e="-moz-",Xr="-webkit-",Crt="comm",K1e="rule",Z1e="decl",vrt="@keyframes",nTt=Math.abs,tU=String.fromCharCode,oTt=Object.assign;function Srt(e){return e.trim()}function ea(e,n,o){return e.replace(n,o)}function kae(e,n){return e.indexOf(n)}function md(e,n){return 0|e.charCodeAt(n)}function jL(e,n,o){return e.slice(n,o)}function Xg(e){return e.length}function J1e(e){return e.length}function mP(e,n){return n.push(e),e}var nU=1,gk=1,krt=0,xp=0,Fs=0,lA="";function oU(e,n,o,r,a,s,c){return{value:e,root:n,parent:o,type:r,props:a,children:s,line:nU,column:gk,length:c,return:""}}function l$(e,n){return oTt(oU("",null,null,"",null,null,0),e,{length:-e.length},n)}function uh(){return Fs=xp<krt?md(lA,xp++):0,gk++,Fs===10&&(gk=1,nU++),Fs}function L3(){return md(lA,xp)}function HO(){return xp}function OT(e,n){return jL(lA,e,n)}function EL(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Art(e){return nU=gk=1,krt=Xg(lA=e),xp=0,[]}function $rt(e){return lA="",e}function UO(e){return Srt(OT(xp-1,Aae(e===91?e+2:e===40?e+1:e)))}function iTt(e){for(;(Fs=L3())&&Fs<33;)uh();return EL(e)>2||EL(Fs)>3?"":" "}function rTt(e,n){for(;--n&&uh()&&!(Fs<48||Fs>102||Fs>57&&Fs<65||Fs>70&&Fs<97););return OT(e,HO()+(n<6&&L3()==32&&uh()==32))}function Aae(e){for(;uh();)switch(Fs){case e:return xp;case 34:case 39:e!==34&&e!==39&&Aae(Fs);break;case 40:e===41&&Aae(e);break;case 92:uh()}return xp}function aTt(e,n){for(;uh()&&e+Fs!==57&&(e+Fs!==84||L3()!==47););return"/*"+OT(n,xp-1)+"*"+tU(e===47?e:uh())}function lTt(e){for(;!EL(L3());)uh();return OT(e,xp)}function sTt(e){return $rt(WO("",null,null,null,[""],e=Art(e),0,[0],e))}function WO(e,n,o,r,a,s,c,d,u){for(var p=0,h=0,g=c,f=0,x=0,y=0,b=1,w=1,C=1,v=0,S="",A=a,j=s,$=r,E=S;w;)switch(y=v,v=uh()){case 40:if(y!=108&&md(E,g-1)==58){kae(E+=ea(UO(v),"&","&\f"),"&\f")!=-1&&(C=-1);break}case 34:case 39:case 91:E+=UO(v);break;case 9:case 10:case 13:case 32:E+=iTt(y);break;case 92:E+=rTt(HO()-1,7);continue;case 47:switch(L3()){case 42:case 47:mP(cTt(aTt(uh(),HO()),n,o),u);break;default:E+="/"}break;case 123*b:d[p++]=Xg(E)*C;case 125*b:case 59:case 0:switch(v){case 0:case 125:w=0;case 59+h:C==-1&&(E=ea(E,/\f/g,"")),x>0&&Xg(E)-g&&mP(x>32?y3e(E+";",r,o,g-1):y3e(ea(E," ","")+";",r,o,g-2),u);break;case 59:E+=";";default:if(mP($=x3e(E,n,o,p,h,a,d,S,A=[],j=[],g),s),v===123)if(h===0)WO(E,n,$,$,A,s,g,d,j);else switch(f===99&&md(E,3)===110?100:f){case 100:case 108:case 109:case 115:WO(e,$,$,r&&mP(x3e(e,$,$,0,0,a,d,S,a,A=[],g),j),a,j,g,d,r?A:j);break;default:WO(E,$,$,$,[""],j,0,d,j)}}p=h=x=0,b=C=1,S=E="",g=c;break;case 58:g=1+Xg(E),x=y;default:if(b<1){if(v==123)--b;else if(v==125&&b++==0&&(Fs=xp>0?md(lA,--xp):0,gk--,Fs===10&&(gk=1,nU--),Fs==125))continue}switch(E+=tU(v),v*b){case 38:C=h>0?1:(E+="\f",-1);break;case 44:d[p++]=(Xg(E)-1)*C,C=1;break;case 64:L3()===45&&(E+=UO(uh())),f=L3(),h=g=Xg(S=E+=lTt(HO())),v++;break;case 45:y===45&&Xg(E)==2&&(b=0)}}return s}function x3e(e,n,o,r,a,s,c,d,u,p,h){for(var g=a-1,f=a===0?s:[""],x=J1e(f),y=0,b=0,w=0;y<r;++y)for(var C=0,v=jL(e,g+1,g=nTt(b=c[y])),S=e;C<x;++C)(S=Srt(b>0?f[C]+" "+v:ea(v,/&\f/g,f[C])))&&(u[w++]=S);return oU(e,n,o,a===0?K1e:d,u,p,h)}function cTt(e,n,o){return oU(e,n,o,Crt,tU(Fs),jL(e,2,-2),0)}function y3e(e,n,o,r){return oU(e,n,o,Z1e,jL(e,0,r),jL(e,r+1,-1),r)}function IS(e,n){for(var o="",r=J1e(e),a=0;a<r;a++)o+=n(e[a],a,e,n)||"";return o}function dTt(e,n,o,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case Z1e:return e.return=e.return||e.value;case Crt:return"";case vrt:return e.return=e.value+"{"+IS(e.children,r)+"}";case K1e:e.value=e.props.join(",")}return Xg(o=IS(e.children,r))?e.return=e.value+"{"+o+"}":""}function uTt(e){return function(n){n.root||(n=n.return)&&e(n)}}var pTt=function(e,n,o){for(var r=0,a=0;r=a,a=L3(),r===38&&a===12&&(n[o]=1),!EL(a);)uh();return OT(e,xp)},hTt=function(e,n){return $rt(function(o,r){var a=-1,s=44;do switch(EL(s)){case 0:s===38&&L3()===12&&(r[a]=1),o[a]+=pTt(xp-1,r,a);break;case 2:o[a]+=UO(s);break;case 4:if(s===44){o[++a]=L3()===58?"&\f":"",r[a]=o[a].length;break}default:o[a]+=tU(s)}while(s=uh());return o}(Art(e),n))},b3e=new WeakMap,mTt=function(e){if(e.type==="rule"&&e.parent&&!(e.length<1)){for(var n=e.value,o=e.parent,r=e.column===o.column&&e.line===o.line;o.type!=="rule";)if(!(o=o.parent))return;if((e.props.length!==1||n.charCodeAt(0)===58||b3e.get(o))&&!r){b3e.set(e,!0);for(var a=[],s=hTt(n,a),c=o.props,d=0,u=0;d<s.length;d++)for(var p=0;p<c.length;p++,u++)e.props[u]=a[d]?s[d].replace(/&\f/g,c[p]):c[p]+" "+s[d]}}},gTt=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function jrt(e,n){switch(function(o,r){return 45^md(o,0)?(((r<<2^md(o,0))<<2^md(o,1))<<2^md(o,2))<<2^md(o,3):0}(e,n)){case 5103:return Xr+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Xr+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Xr+e+f3e+e+n1+e+e;case 6828:case 4268:return Xr+e+n1+e+e;case 6165:return Xr+e+n1+"flex-"+e+e;case 5187:return Xr+e+ea(e,/(\w+).+(:[^]+)/,Xr+"box-$1$2"+n1+"flex-$1$2")+e;case 5443:return Xr+e+n1+"flex-item-"+ea(e,/flex-|-self/,"")+e;case 4675:return Xr+e+n1+"flex-line-pack"+ea(e,/align-content|flex-|-self/,"")+e;case 5548:return Xr+e+n1+ea(e,"shrink","negative")+e;case 5292:return Xr+e+n1+ea(e,"basis","preferred-size")+e;case 6060:return Xr+"box-"+ea(e,"-grow","")+Xr+e+n1+ea(e,"grow","positive")+e;case 4554:return Xr+ea(e,/([^-])(transform)/g,"$1"+Xr+"$2")+e;case 6187:return ea(ea(ea(e,/(zoom-|grab)/,Xr+"$1"),/(image-set)/,Xr+"$1"),e,"")+e;case 5495:case 3959:return ea(e,/(image-set\([^]*)/,Xr+"$1$`$1");case 4968:return ea(ea(e,/(.+:)(flex-)?(.*)/,Xr+"box-pack:$3"+n1+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Xr+e+e;case 4095:case 3583:case 4068:case 2532:return ea(e,/(.+)-inline(.+)/,Xr+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Xg(e)-1-n>6)switch(md(e,n+1)){case 109:if(md(e,n+4)!==45)break;case 102:return ea(e,/(.+:)(.+)-([^]+)/,"$1"+Xr+"$2-$3$1"+f3e+(md(e,n+3)==108?"$3":"$2-$3"))+e;case 115:return~kae(e,"stretch")?jrt(ea(e,"stretch","fill-available"),n)+e:e}break;case 4949:if(md(e,n+1)!==115)break;case 6444:switch(md(e,Xg(e)-3-(~kae(e,"!important")&&10))){case 107:return ea(e,":",":"+Xr)+e;case 101:return ea(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Xr+(md(e,14)===45?"inline-":"")+"box$3$1"+Xr+"$2$3$1"+n1+"$2box$3")+e}break;case 5936:switch(md(e,n+11)){case 114:return Xr+e+n1+ea(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Xr+e+n1+ea(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Xr+e+n1+ea(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Xr+e+n1+e+e}return e}var fTt=[function(e,n,o,r){if(e.length>-1&&!e.return)switch(e.type){case Z1e:e.return=jrt(e.value,e.length);break;case vrt:return IS([l$(e,{value:ea(e.value,"@","@"+Xr)})],r);case K1e:if(e.length)return function(a,s){return a.map(s).join("")}(e.props,function(a){switch(function(s,c){return(s=c.exec(s))?s[0]:s}(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return IS([l$(e,{props:[ea(a,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return IS([l$(e,{props:[ea(a,/:(plac\w+)/,":"+Xr+"input-$1")]}),l$(e,{props:[ea(a,/:(plac\w+)/,":-moz-$1")]}),l$(e,{props:[ea(a,/:(plac\w+)/,n1+"input-$1")]})],r)}return""})}}],Ert=function(e){var n=e.key;if(n==="css"){var o=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(o,function(x){x.getAttribute("data-emotion").indexOf(" ")!==-1&&(document.head.appendChild(x),x.setAttribute("data-s",""))})}var r,a=e.stylisPlugins||fTt,s={},c=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(x){for(var y=x.getAttribute("data-emotion").split(" "),b=1;b<y.length;b++)s[y[b]]=!0;c.push(x)});var d,u,p=[mTt,gTt],h=[dTt,uTt(function(x){u.insert(x)})],g=function(x){var y=J1e(x);return function(b,w,C,v){for(var S="",A=0;A<y;A++)S+=x[A](b,w,C,v)||"";return S}}(p.concat(a,h));d=function(x,y,b,w){u=b,function(C){IS(sTt(C),g)}(x?x+"{"+y.styles+"}":y.styles),w&&(f.inserted[y.name]=!0)};var f={key:n,sheet:new tTt({key:n,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:d};return f.sheet.hydrate(c),f};function Irt(e){const{styles:n,defaultTheme:o={}}=e,r=typeof n=="function"?a=>n(function(s){return s==null||Object.keys(s).length===0}(a)?o:a):n;return t.jsx(FT,{styles:r})}const w3e=[];function d6(e){return w3e[0]=e,function(n,o,r){if(n.length===1&&typeof n[0]=="object"&&n[0]!==null&&n[0].styles!==void 0)return n[0];var a=!0,s="";U7=void 0;var c=n[0];c==null||c.raw===void 0?(a=!1,s+=dN(r,o,c)):s+=c[0];for(var d=1;d<n.length;d++)s+=dN(r,o,n[d]),a&&(s+=c[d]);c3e.lastIndex=0;for(var u,p="";(u=c3e.exec(s))!==null;)p+="-"+u[1];var h=function(g){for(var f,x=0,y=0,b=g.length;b>=4;++y,b-=4)f=1540483477*(65535&(f=255&g.charCodeAt(y)|(255&g.charCodeAt(++y))<<8|(255&g.charCodeAt(++y))<<16|(255&g.charCodeAt(++y))<<24))+(59797*(f>>>16)<<16),x=1540483477*(65535&(f^=f>>>24))+(59797*(f>>>16)<<16)^1540483477*(65535&x)+(59797*(x>>>16)<<16);switch(b){case 3:x^=(255&g.charCodeAt(y+2))<<16;case 2:x^=(255&g.charCodeAt(y+1))<<8;case 1:x=1540483477*(65535&(x^=255&g.charCodeAt(y)))+(59797*(x>>>16)<<16)}return(((x=1540483477*(65535&(x^=x>>>13))+(59797*(x>>>16)<<16))^x>>>15)>>>0).toString(36)}(s)+p;return{name:h,styles:s,next:U7}}(w3e)}var C3e,v3e,S3e={exports:{}},ja={};function xTt(){if(C3e)return ja;C3e=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),f=Symbol.for("react.view_transition"),x=Symbol.for("react.client.reference");function y(b){if(typeof b=="object"&&b!==null){var w=b.$$typeof;switch(w){case e:switch(b=b.type){case o:case a:case r:case u:case p:case f:return b;default:switch(b=b&&b.$$typeof){case c:case d:case g:case h:case s:return b;default:return w}}case n:return w}}}return ja.ContextConsumer=s,ja.ContextProvider=c,ja.Element=e,ja.ForwardRef=d,ja.Fragment=o,ja.Lazy=g,ja.Memo=h,ja.Portal=n,ja.Profiler=a,ja.StrictMode=r,ja.Suspense=u,ja.SuspenseList=p,ja.isContextConsumer=function(b){return y(b)===s},ja.isContextProvider=function(b){return y(b)===c},ja.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},ja.isForwardRef=function(b){return y(b)===d},ja.isFragment=function(b){return y(b)===o},ja.isLazy=function(b){return y(b)===g},ja.isMemo=function(b){return y(b)===h},ja.isPortal=function(b){return y(b)===n},ja.isProfiler=function(b){return y(b)===a},ja.isStrictMode=function(b){return y(b)===r},ja.isSuspense=function(b){return y(b)===u},ja.isSuspenseList=function(b){return y(b)===p},ja.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===o||b===a||b===r||b===u||b===p||typeof b=="object"&&b!==null&&(b.$$typeof===g||b.$$typeof===h||b.$$typeof===c||b.$$typeof===s||b.$$typeof===d||b.$$typeof===x||b.getModuleId!==void 0)},ja.typeOf=y,ja}function yTt(){return v3e||(v3e=1,S3e.exports=xTt()),S3e.exports}var Lrt=yTt();function f5(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return!(n!==null&&n!==Object.prototype&&Object.getPrototypeOf(n)!==null||Symbol.toStringTag in e||Symbol.iterator in e)}function Trt(e){if(m.isValidElement(e)||Lrt.isValidElementType(e)||!f5(e))return e;const n={};return Object.keys(e).forEach(o=>{n[o]=Trt(e[o])}),n}function g1(e,n,o={clone:!0}){const r=o.clone?{...e}:e;return f5(e)&&f5(n)&&Object.keys(n).forEach(a=>{m.isValidElement(n[a])||Lrt.isValidElementType(n[a])?r[a]=n[a]:f5(n[a])&&Object.prototype.hasOwnProperty.call(e,a)&&f5(e[a])?r[a]=g1(e[a],n[a],o):o.clone?r[a]=f5(n[a])?Trt(n[a]):n[a]:r[a]=n[a]}),r}function bTt(e){const{values:n={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:o="px",step:r=5,...a}=e,s=(h=>{const g=Object.keys(h).map(f=>({key:f,val:h[f]}))||[];return g.sort((f,x)=>f.val-x.val),g.reduce((f,x)=>({...f,[x.key]:x.val}),{})})(n),c=Object.keys(s);function d(h){return`@media (min-width:${typeof n[h]=="number"?n[h]:h}${o})`}function u(h){return`@media (max-width:${(typeof n[h]=="number"?n[h]:h)-r/100}${o})`}function p(h,g){const f=c.indexOf(g);return`@media (min-width:${typeof n[h]=="number"?n[h]:h}${o}) and (max-width:${(f!==-1&&typeof n[c[f]]=="number"?n[c[f]]:g)-r/100}${o})`}return{keys:c,values:s,up:d,down:u,between:p,only:function(h){return c.indexOf(h)+1<c.length?p(h,c[c.indexOf(h)+1]):d(h)},not:function(h){const g=c.indexOf(h);return g===0?d(c[1]):g===c.length-1?u(c[g]):p(h,c[c.indexOf(h)+1]).replace("@media","@media not all and")},unit:o,...a}}function k3e(e,n){if(!e.containerQueries)return n;const o=Object.keys(n).filter(r=>r.startsWith("@container")).sort((r,a)=>{const s=/min-width:\s*([0-9.]+)/;return+(r.match(s)?.[1]||0)-+(a.match(s)?.[1]||0)});return o.length?o.reduce((r,a)=>{const s=n[a];return delete r[a],r[a]=s,r},{...n}):n}const wTt={borderRadius:4};function EI(e,n){return n?g1(e,n,{clone:!1}):e}const iU={xs:0,sm:600,md:900,lg:1200,xl:1536},A3e={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${iU[e]}px)`},CTt={containerQueries:e=>({up:n=>{let o=typeof n=="number"?n:iU[n]||n;return typeof o=="number"&&(o=`${o}px`),e?`@container ${e} (min-width:${o})`:`@container (min-width:${o})`}})};function G5(e,n,o){const r=e.theme||{};if(Array.isArray(n)){const a=r.breakpoints||A3e;return n.reduce((s,c,d)=>(s[a.up(a.keys[d])]=o(n[d]),s),{})}if(typeof n=="object"){const a=r.breakpoints||A3e;return Object.keys(n).reduce((s,c)=>{if(function(d,u){return u==="@"||u.startsWith("@")&&(d.some(p=>u.startsWith(`@${p}`))||!!u.match(/^@\d/))}(a.keys,c)){const d=function(u,p){const h=p.match(/^@([^/]+)?\/?(.+)?$/);if(!h)return null;const[,g,f]=h,x=Number.isNaN(+g)?g||0:+g;return u.containerQueries(f).up(x)}(r.containerQueries?r:CTt,c);d&&(s[d]=o(n[c],c))}else if(Object.keys(a.values||iU).includes(c))s[a.up(c)]=o(n[c],c);else{const d=c;s[d]=n[d]}return s},{})}return o(n)}function $3e(e,n){return e.reduce((o,r)=>{const a=o[r];return(!a||Object.keys(a).length===0)&&delete o[r],o},n)}function ki(e){if(typeof e!="string")throw new Error(Q5(7));return e.charAt(0).toUpperCase()+e.slice(1)}function rU(e,n,o=!0){if(!n||typeof n!="string")return null;if(e&&e.vars&&o){const r=`vars.${n}`.split(".").reduce((a,s)=>a&&a[s]?a[s]:null,e);if(r!=null)return r}return n.split(".").reduce((r,a)=>r&&r[a]!=null?r[a]:null,e)}function uN(e,n,o,r=o){let a;return a=typeof e=="function"?e(o):Array.isArray(e)?e[o]||r:rU(e,o)||r,n&&(a=n(a,r,e)),a}function ms(e){const{prop:n,cssProperty:o=e.prop,themeKey:r,transform:a}=e,s=c=>{if(c[n]==null)return null;const d=c[n],u=rU(c.theme,r)||{};return G5(c,d,p=>{let h=uN(u,a,p);return p===h&&typeof p=="string"&&(h=uN(u,a,`${n}${p==="default"?"":ki(p)}`,p)),o===!1?h:{[o]:h}})};return s.propTypes={},s.filterProps=[n],s}const vTt={m:"margin",p:"padding"},STt={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},j3e={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},kTt=function(e){const n={};return o=>(n[o]===void 0&&(n[o]=e(o)),n[o])}(e=>{if(e.length>2){if(!j3e[e])return[e];e=j3e[e]}const[n,o]=e.split(""),r=vTt[n],a=STt[o]||"";return Array.isArray(a)?a.map(s=>r+s):[r+a]}),Drt=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Prt=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];function RT(e,n,o,r){const a=rU(e,n,!0)??o;return typeof a=="number"||typeof a=="string"?s=>typeof s=="string"?s:typeof a=="string"?a.startsWith("var(")&&s===0?0:a.startsWith("var(")&&s===1?a:`calc(${s} * ${a})`:a*s:Array.isArray(a)?s=>{if(typeof s=="string")return s;const c=Math.abs(s),d=a[c];return s>=0?d:typeof d=="number"?-d:typeof d=="string"&&d.startsWith("var(")?`calc(-1 * ${d})`:`-${d}`}:typeof a=="function"?a:()=>{}}function X1e(e){return RT(e,"spacing",8)}function NT(e,n){return typeof n=="string"||n==null?n:e(n)}function ATt(e,n,o,r){if(!n.includes(o))return null;const a=function(s,c){return d=>s.reduce((u,p)=>(u[p]=NT(c,d),u),{})}(kTt(o),r);return G5(e,e[o],a)}function Brt(e,n){const o=X1e(e.theme);return Object.keys(e).map(r=>ATt(e,n,r,o)).reduce(EI,{})}function Ql(e){return Brt(e,Drt)}function Gl(e){return Brt(e,Prt)}function Mrt(e=8,n=X1e({spacing:e})){if(e.mui)return e;const o=(...r)=>(r.length===0?[1]:r).map(a=>{const s=n(a);return typeof s=="number"?`${s}px`:s}).join(" ");return o.mui=!0,o}function aU(...e){const n=e.reduce((r,a)=>(a.filterProps.forEach(s=>{r[s]=a}),r),{}),o=r=>Object.keys(r).reduce((a,s)=>n[s]?EI(a,n[s](r)):a,{});return o.propTypes={},o.filterProps=e.reduce((r,a)=>r.concat(a.filterProps),[]),o}function b0(e){return typeof e!="number"?e:`${e}px solid`}function Y0(e,n){return ms({prop:e,themeKey:"borders",transform:n})}Ql.propTypes={},Ql.filterProps=Drt,Gl.propTypes={},Gl.filterProps=Prt;const $Tt=Y0("border",b0),jTt=Y0("borderTop",b0),ETt=Y0("borderRight",b0),ITt=Y0("borderBottom",b0),LTt=Y0("borderLeft",b0),TTt=Y0("borderColor"),DTt=Y0("borderTopColor"),PTt=Y0("borderRightColor"),BTt=Y0("borderBottomColor"),MTt=Y0("borderLeftColor"),zTt=Y0("outline",b0),FTt=Y0("outlineColor"),QO=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const n=RT(e.theme,"shape.borderRadius",4),o=r=>({borderRadius:NT(n,r)});return G5(e,e.borderRadius,o)}return null};QO.propTypes={},QO.filterProps=["borderRadius"],aU($Tt,jTt,ETt,ITt,LTt,TTt,DTt,PTt,BTt,MTt,QO,zTt,FTt);const pN=e=>{if(e.gap!==void 0&&e.gap!==null){const n=RT(e.theme,"spacing",8),o=r=>({gap:NT(n,r)});return G5(e,e.gap,o)}return null};pN.propTypes={},pN.filterProps=["gap"];const hN=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const n=RT(e.theme,"spacing",8),o=r=>({columnGap:NT(n,r)});return G5(e,e.columnGap,o)}return null};hN.propTypes={},hN.filterProps=["columnGap"];const mN=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const n=RT(e.theme,"spacing",8),o=r=>({rowGap:NT(n,r)});return G5(e,e.rowGap,o)}return null};mN.propTypes={},mN.filterProps=["rowGap"];function LS(e,n){return n==="grey"?n:e}aU(pN,hN,mN,ms({prop:"gridColumn"}),ms({prop:"gridRow"}),ms({prop:"gridAutoFlow"}),ms({prop:"gridAutoColumns"}),ms({prop:"gridAutoRows"}),ms({prop:"gridTemplateColumns"}),ms({prop:"gridTemplateRows"}),ms({prop:"gridTemplateAreas"}),ms({prop:"gridArea"}));function oh(e){return e<=1&&e!==0?100*e+"%":e}aU(ms({prop:"color",themeKey:"palette",transform:LS}),ms({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:LS}),ms({prop:"backgroundColor",themeKey:"palette",transform:LS}));const OTt=ms({prop:"width",transform:oh}),eue=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const n=o=>{const r=e.theme?.breakpoints?.values?.[o]||iU[o];return r?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:oh(o)}};return G5(e,e.maxWidth,n)}return null};eue.filterProps=["maxWidth"];const RTt=ms({prop:"minWidth",transform:oh}),NTt=ms({prop:"height",transform:oh}),_Tt=ms({prop:"maxHeight",transform:oh}),VTt=ms({prop:"minHeight",transform:oh});ms({prop:"size",cssProperty:"width",transform:oh}),ms({prop:"size",cssProperty:"height",transform:oh});aU(OTt,eue,RTt,NTt,_Tt,VTt,ms({prop:"boxSizing"}));const lU={border:{themeKey:"borders",transform:b0},borderTop:{themeKey:"borders",transform:b0},borderRight:{themeKey:"borders",transform:b0},borderBottom:{themeKey:"borders",transform:b0},borderLeft:{themeKey:"borders",transform:b0},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:b0},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:QO},color:{themeKey:"palette",transform:LS},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:LS},backgroundColor:{themeKey:"palette",transform:LS},p:{style:Gl},pt:{style:Gl},pr:{style:Gl},pb:{style:Gl},pl:{style:Gl},px:{style:Gl},py:{style:Gl},padding:{style:Gl},paddingTop:{style:Gl},paddingRight:{style:Gl},paddingBottom:{style:Gl},paddingLeft:{style:Gl},paddingX:{style:Gl},paddingY:{style:Gl},paddingInline:{style:Gl},paddingInlineStart:{style:Gl},paddingInlineEnd:{style:Gl},paddingBlock:{style:Gl},paddingBlockStart:{style:Gl},paddingBlockEnd:{style:Gl},m:{style:Ql},mt:{style:Ql},mr:{style:Ql},mb:{style:Ql},ml:{style:Ql},mx:{style:Ql},my:{style:Ql},margin:{style:Ql},marginTop:{style:Ql},marginRight:{style:Ql},marginBottom:{style:Ql},marginLeft:{style:Ql},marginX:{style:Ql},marginY:{style:Ql},marginInline:{style:Ql},marginInlineStart:{style:Ql},marginInlineEnd:{style:Ql},marginBlock:{style:Ql},marginBlockStart:{style:Ql},marginBlockEnd:{style:Ql},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:pN},rowGap:{style:mN},columnGap:{style:hN},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:oh},maxWidth:{style:eue},minWidth:{transform:oh},height:{transform:oh},maxHeight:{transform:oh},minHeight:{transform:oh},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},tb=function(){function e(n,o,r,a){const s={[n]:o,theme:r},c=a[n];if(!c)return{[n]:o};const{cssProperty:d=n,themeKey:u,transform:p,style:h}=c;if(o==null)return null;if(u==="typography"&&o==="inherit")return{[n]:o};const g=rU(r,u)||{};return h?h(s):G5(s,o,f=>{let x=uN(g,p,f);return f===x&&typeof f=="string"&&(x=uN(g,p,`${n}${f==="default"?"":ki(f)}`,f)),d===!1?x:{[d]:x}})}return function n(o){const{sx:r,theme:a={},nested:s}=o||{};if(!r)return null;const c=a.unstable_sxConfig??lU;function d(u){let p=u;if(typeof u=="function")p=u(a);else if(typeof u!="object")return u;if(!p)return null;const h=function(x={}){return x.keys?.reduce((y,b)=>(y[x.up(b)]={},y),{})||{}}(a.breakpoints),g=Object.keys(h);let f=h;return Object.keys(p).forEach(x=>{const y=function(b,w){return typeof b=="function"?b(w):b}(p[x],a);if(y!=null)if(typeof y=="object")if(c[x])f=EI(f,e(x,y,a,c));else{const b=G5({theme:a},y,w=>({[x]:w}));(function(...w){const C=w.reduce((S,A)=>S.concat(Object.keys(A)),[]),v=new Set(C);return w.every(S=>v.size===Object.keys(S).length)})(b,y)?f[x]=n({sx:y,theme:a,nested:!0}):f=EI(f,b)}else f=EI(f,e(x,y,a,c))}),!s&&a.modularCssLayers?{"@layer sx":k3e(a,$3e(g,f))}:k3e(a,$3e(g,f))}return Array.isArray(r)?r.map(d):d(r)}}();function HTt(e,n){const o=this;if(o.vars){if(!o.colorSchemes?.[e]||typeof o.getColorSchemeSelector!="function")return{};let r=o.getColorSchemeSelector(e);return r==="&"?n:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:n})}return o.palette.mode===e?n:{}}function tue(e={},...n){const{breakpoints:o={},palette:r={},spacing:a,shape:s={},...c}=e;let d=g1({breakpoints:bTt(o),direction:"ltr",components:{},palette:{mode:"light",...r},spacing:Mrt(a),shape:{...wTt,...s}},c);return d=function(u){const p=(x,y)=>x.replace("@media",y?`@container ${y}`:"@container");function h(x,y){x.up=(...b)=>p(u.breakpoints.up(...b),y),x.down=(...b)=>p(u.breakpoints.down(...b),y),x.between=(...b)=>p(u.breakpoints.between(...b),y),x.only=(...b)=>p(u.breakpoints.only(...b),y),x.not=(...b)=>{const w=p(u.breakpoints.not(...b),y);return w.includes("not all and")?w.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):w}}const g={},f=x=>(h(g,x),g);return h(f),{...u,containerQueries:f}}(d),d.applyStyles=HTt,d=n.reduce((u,p)=>g1(u,p),d),d.unstable_sxConfig={...lU,...c?.unstable_sxConfig},d.unstable_sx=function(u){return tb({sx:u,theme:this})},d}function $ae(e=null){const n=m.useContext(hrt);return!n||function(o){return Object.keys(o).length===0}(n)?e:n}tb.filterProps=["sx"];const UTt=tue();function zrt(e=UTt){return $ae(e)}function E3e(e){const n=d6(e);return e!==n&&n.styles?(n.styles.match(/^@layer\s+[^{]*$/)||(n.styles=`@layer global{${n.styles}}`),n):e}function Frt({styles:e,themeId:n,defaultTheme:o={}}){const r=zrt(o),a=n&&r[n]||r;let s=typeof e=="function"?e(a):e;return a.modularCssLayers&&(s=Array.isArray(s)?s.map(c=>E3e(typeof c=="function"?c(a):c)):E3e(s)),t.jsx(Irt,{styles:s})}const I3e=e=>e,WTt=(()=>{let e=I3e;return{configure(n){e=n},generate:n=>e(n),reset(){e=I3e}}})();function Ort(e){var n,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(n=0;n<a;n++)e[n]&&(o=Ort(e[n]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function Ii(){for(var e,n,o=0,r="",a=arguments.length;o<a;o++)(e=arguments[o])&&(n=Ort(e))&&(r&&(r+=" "),r+=n);return r}const QTt={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function oa(e,n,o="Mui"){const r=QTt[n];return r?`${o}-${r}`:`${WTt.generate(e)}-${n}`}function Fr(e,n,o="Mui"){const r={};return n.forEach(a=>{r[a]=oa(e,a,o)}),r}function Rrt(e){const{variants:n,...o}=e,r={variants:n,style:d6(o),isProcessed:!0};return r.style===o||n&&n.forEach(a=>{typeof a.style!="function"&&(a.style=d6(a.style))}),r}const GTt=tue();function FY(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function oy(e,n){return n&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${n}{${String(e.styles)}}`),e}function YTt(e){return e?(n,o)=>o[e]:null}function GO(e,n,o){const r=typeof n=="function"?n(e):n;if(Array.isArray(r))return r.flatMap(a=>GO(e,a,o));if(Array.isArray(r?.variants)){let a;if(r.isProcessed)a=o?oy(r.style,o):r.style;else{const{variants:s,...c}=r;a=o?oy(d6(c),o):c}return Nrt(e,r.variants,[a],o)}return r?.isProcessed?o?oy(d6(r.style),o):r.style:o?oy(d6(r),o):r}function Nrt(e,n,o=[],r=void 0){let a;e:for(let s=0;s<n.length;s+=1){const c=n[s];if(typeof c.props=="function"){if(a??={...e,...e.ownerState,ownerState:e.ownerState},!c.props(a))continue}else for(const d in c.props)if(e[d]!==c.props[d]&&e.ownerState?.[d]!==c.props[d])continue e;typeof c.style=="function"?(a??={...e,...e.ownerState,ownerState:e.ownerState},o.push(r?oy(d6(c.style(a)),r):c.style(a))):o.push(r?oy(d6(c.style),r):c.style)}return o}function qTt(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function jae(e,n,o=!1){const r={...n};for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)){const s=a;if(s==="components"||s==="slots")r[s]={...e[s],...r[s]};else if(s==="componentsProps"||s==="slotProps"){const c=e[s],d=n[s];if(d)if(c){r[s]={...d};for(const u in c)if(Object.prototype.hasOwnProperty.call(c,u)){const p=u;r[s][p]=jae(c[p],d[p],o)}}else r[s]=d;else r[s]=c||{}}else s==="className"&&o&&n.className?r.className=Ii(e?.className,n?.className):s==="style"&&o&&n.style?r.style={...e?.style,...n?.style}:r[s]===void 0&&(r[s]=e[s])}return r}const yh=typeof window<"u"?m.useLayoutEffect:m.useEffect;function nue(e,n=0,o=1){return function(r,a=Number.MIN_SAFE_INTEGER,s=Number.MAX_SAFE_INTEGER){return Math.max(a,Math.min(r,s))}(e,n,o)}function j6(e){if(e.type)return e;if(e.charAt(0)==="#")return j6(function(s){s=s.slice(1);const c=new RegExp(`.{1,${s.length>=6?2:1}}`,"g");let d=s.match(c);return d&&d[0].length===1&&(d=d.map(u=>u+u)),d?`rgb${d.length===4?"a":""}(${d.map((u,p)=>p<3?parseInt(u,16):Math.round(parseInt(u,16)/255*1e3)/1e3).join(", ")})`:""}(e));const n=e.indexOf("("),o=e.substring(0,n);if(!["rgb","rgba","hsl","hsla","color"].includes(o))throw new Error(Q5(9,e));let r,a=e.substring(n+1,e.length-1);if(o==="color"){if(a=a.split(" "),r=a.shift(),a.length===4&&a[3].charAt(0)==="/"&&(a[3]=a[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(r))throw new Error(Q5(10,r))}else a=a.split(",");return a=a.map(s=>parseFloat(s)),{type:o,values:a,colorSpace:r}}const QE=(e,n)=>{try{return(o=>{const r=j6(o);return r.values.slice(0,3).map((a,s)=>r.type.includes("hsl")&&s!==0?`${a}%`:a).join(" ")})(e)}catch{return e}};function sU(e){const{type:n,colorSpace:o}=e;let{values:r}=e;return n.includes("rgb")?r=r.map((a,s)=>s<3?parseInt(a,10):a):n.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=n.includes("color")?`${o} ${r.join(" ")}`:`${r.join(", ")}`,`${n}(${r})`}function _rt(e){e=j6(e);const{values:n}=e,o=n[0],r=n[1]/100,a=n[2]/100,s=r*Math.min(a,1-a),c=(p,h=(p+o/30)%12)=>a-s*Math.max(Math.min(h-3,9-h,1),-1);let d="rgb";const u=[Math.round(255*c(0)),Math.round(255*c(8)),Math.round(255*c(4))];return e.type==="hsla"&&(d+="a",u.push(n[3])),sU({type:d,values:u})}function Eae(e){let n=(e=j6(e)).type==="hsl"||e.type==="hsla"?j6(_rt(e)).values:e.values;return n=n.map(o=>(e.type!=="color"&&(o/=255),o<=.03928?o/12.92:((o+.055)/1.055)**2.4)),Number((.2126*n[0]+.7152*n[1]+.0722*n[2]).toFixed(3))}function gN(e,n){return e=j6(e),n=nue(n),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${n}`:e.values[3]=n,sU(e)}function a9(e,n,o){try{return gN(e,n)}catch{return e}}function cU(e,n){if(e=j6(e),n=nue(n),e.type.includes("hsl"))e.values[2]*=1-n;else if(e.type.includes("rgb")||e.type.includes("color"))for(let o=0;o<3;o+=1)e.values[o]*=1-n;return sU(e)}function ha(e,n,o){try{return cU(e,n)}catch{return e}}function dU(e,n){if(e=j6(e),n=nue(n),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*n;else if(e.type.includes("rgb"))for(let o=0;o<3;o+=1)e.values[o]+=(255-e.values[o])*n;else if(e.type.includes("color"))for(let o=0;o<3;o+=1)e.values[o]+=(1-e.values[o])*n;return sU(e)}function ma(e,n,o){try{return dU(e,n)}catch{return e}}function gP(e,n,o){try{return function(r,a=.15){return Eae(r)>.5?cU(r,a):dU(r,a)}(e,n)}catch{return e}}const Vrt=m.createContext(null);function oue(){return m.useContext(Vrt)}const KTt=typeof Symbol=="function"&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function ZTt(e){const{children:n,theme:o}=e,r=oue(),a=m.useMemo(()=>{const s=r===null?{...o}:function(c,d){return typeof d=="function"?d(c):{...c,...d}}(r,o);return s!=null&&(s[KTt]=r!==null),s},[o,r]);return t.jsx(Vrt.Provider,{value:a,children:n})}const Hrt=m.createContext();function JTt({value:e,...n}){return t.jsx(Hrt.Provider,{value:e??!0,...n})}const uU=()=>m.useContext(Hrt)??!1,Urt=m.createContext(void 0);function XTt({value:e,children:n}){return t.jsx(Urt.Provider,{value:e,children:n})}function eDt({props:e,name:n}){return function(o){const{theme:r,name:a,props:s}=o;if(!r||!r.components||!r.components[a])return s;const c=r.components[a];return c.defaultProps?jae(c.defaultProps,s,r.components.mergeClassNameAndStyle):c.styleOverrides||c.variants?s:jae(c,s,r.components.mergeClassNameAndStyle)}({props:e,name:n,theme:{components:m.useContext(Urt)}})}let L3e=0;const T3e={...F$t}.useId;function pU(e){if(T3e!==void 0){const n=T3e();return e??n}return function(n){const[o,r]=m.useState(n),a=n||o;return m.useEffect(()=>{o==null&&(L3e+=1,r(`mui-${L3e}`))},[o]),a}(e)}const D3e={};function P3e(e,n,o,r=!1){return m.useMemo(()=>{const a=e&&n[e]||n;if(typeof o=="function"){const s=o(a),c=e?{...n,[e]:s}:s;return r?()=>c:c}return e?{...n,[e]:o}:{...n,...o}},[e,n,o,r])}function Wrt(e){const{children:n,theme:o,themeId:r}=e,a=$ae(D3e),s=oue()||D3e,c=P3e(r,a,o),d=P3e(r,s,o,!0),u=(r?c[r]:c).direction==="rtl",p=function(h){const g=$ae(),f=pU()||"",{modularCssLayers:x}=h;let y="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return y=x&&g===null?typeof x=="string"?x.replace(/mui(?!\.)/g,y):`@layer ${y};`:"",yh(()=>{const b=document.querySelector("head");if(!b)return;const w=b.firstChild;if(y){if(w&&w.hasAttribute?.("data-mui-layer-order")&&w.getAttribute("data-mui-layer-order")===f)return;const C=document.createElement("style");C.setAttribute("data-mui-layer-order",f),C.textContent=y,b.prepend(C)}else b.querySelector(`style[data-mui-layer-order="${f}"]`)?.remove()},[y,f]),y?t.jsx(Frt,{styles:y}):null}(c);return t.jsx(ZTt,{theme:d,children:t.jsx(hrt.Provider,{value:c,children:t.jsx(JTt,{value:u,children:t.jsxs(XTt,{value:r?c[r].components:c.components,children:[p,n]})})})})}const B3e={theme:void 0},Iae="mode",Lae="color-scheme",tDt="data-color-scheme";function nDt(){}const oDt=({key:e,storageWindow:n})=>(!n&&typeof window<"u"&&(n=window),{get(o){if(typeof window>"u")return;if(!n)return o;let r;try{r=n.localStorage.getItem(e)}catch{}return r||o},set:o=>{if(n)try{n.localStorage.setItem(e,o)}catch{}},subscribe:o=>{if(!n)return nDt;const r=a=>{const s=a.newValue;a.key===e&&o(s)};return n.addEventListener("storage",r),()=>{n.removeEventListener("storage",r)}}});function OY(){}function M3e(e){if(typeof window<"u"&&typeof window.matchMedia=="function"&&e==="system")return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function z3e(e,n){return e.mode==="light"||e.mode==="system"&&e.systemMode==="light"?n("light"):e.mode==="dark"||e.mode==="system"&&e.systemMode==="dark"?n("dark"):void 0}function iDt(e){const{defaultMode:n="light",defaultLightColorScheme:o,defaultDarkColorScheme:r,supportedColorSchemes:a=[],modeStorageKey:s=Iae,colorSchemeStorageKey:c=Lae,storageWindow:d=typeof window>"u"?void 0:window,storageManager:u=oDt,noSsr:p=!1}=e,h=a.join(","),g=a.length>1,f=m.useMemo(()=>u?.({key:s,storageWindow:d}),[u,s,d]),x=m.useMemo(()=>u?.({key:`${c}-light`,storageWindow:d}),[u,c,d]),y=m.useMemo(()=>u?.({key:`${c}-dark`,storageWindow:d}),[u,c,d]),[b,w]=m.useState(()=>{const L=f?.get(n)||n,I=x?.get(o)||o,B=y?.get(r)||r;return{mode:L,systemMode:M3e(L),lightColorScheme:I,darkColorScheme:B}}),[C,v]=m.useState(p||!g);m.useEffect(()=>{v(!0)},[]);const S=function(L){return z3e(L,I=>I==="light"?L.lightColorScheme:I==="dark"?L.darkColorScheme:void 0)}(b),A=m.useCallback(L=>{w(I=>{if(L===I.mode)return I;const B=L??n;return f?.set(B),{...I,mode:B,systemMode:M3e(B)}})},[f,n]),j=m.useCallback(L=>{L?typeof L=="string"?L&&!h.includes(L)?console.error(`\`${L}\` does not exist in \`theme.colorSchemes\`.`):w(I=>{const B={...I};return z3e(I,D=>{D==="light"&&(x?.set(L),B.lightColorScheme=L),D==="dark"&&(y?.set(L),B.darkColorScheme=L)}),B}):w(I=>{const B={...I},D=L.light===null?o:L.light,z=L.dark===null?r:L.dark;return D&&(h.includes(D)?(B.lightColorScheme=D,x?.set(D)):console.error(`\`${D}\` does not exist in \`theme.colorSchemes\`.`)),z&&(h.includes(z)?(B.darkColorScheme=z,y?.set(z)):console.error(`\`${z}\` does not exist in \`theme.colorSchemes\`.`)),B}):w(I=>(x?.set(o),y?.set(r),{...I,lightColorScheme:o,darkColorScheme:r}))},[h,x,y,o,r]),$=m.useCallback(L=>{b.mode==="system"&&w(I=>{const B=L?.matches?"dark":"light";return I.systemMode===B?I:{...I,systemMode:B}})},[b.mode]),E=m.useRef($);return E.current=$,m.useEffect(()=>{if(typeof window.matchMedia!="function"||!g)return;const L=(...B)=>E.current(...B),I=window.matchMedia("(prefers-color-scheme: dark)");return I.addListener(L),L(I),()=>{I.removeListener(L)}},[g]),m.useEffect(()=>{if(g){const L=f?.subscribe(D=>{(!D||["light","dark","system"].includes(D))&&A(D||n)})||OY,I=x?.subscribe(D=>{(!D||h.match(D))&&j({light:D})})||OY,B=y?.subscribe(D=>{(!D||h.match(D))&&j({dark:D})})||OY;return()=>{L(),I(),B()}}},[j,A,h,n,d,g,f,x,y]),{...b,mode:C?b.mode:void 0,systemMode:C?b.systemMode:void 0,colorScheme:C?S:void 0,setMode:A,setColorScheme:j}}function rDt(e=""){function n(...o){if(!o.length)return"";const r=o[0];return typeof r!="string"||r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, ${r}`:`, var(--${e?`${e}-`:""}${r}${n(...o.slice(1))})`}return(o,...r)=>`var(--${e?`${e}-`:""}${o}${n(...r)})`}const F3e=(e,n,o,r=[])=>{let a=e;n.forEach((s,c)=>{c===n.length-1?Array.isArray(a)?a[Number(s)]=o:a&&typeof a=="object"&&(a[s]=o):a&&typeof a=="object"&&(a[s]||(a[s]=r.includes(s)?[]:{}),a=a[s])})};function RY(e,n){const{prefix:o,shouldSkipGeneratingVar:r}=n||{},a={},s={},c={};return((d,u,p)=>{(function h(g,f=[],x=[]){Object.entries(g).forEach(([y,b])=>{(!p||p&&!p([...f,y]))&&b!=null&&(typeof b=="object"&&Object.keys(b).length>0?h(b,[...f,y],Array.isArray(b)?[...x,y]:x):u([...f,y],b,x))})})(d)})(e,(d,u,p)=>{if(!(typeof u!="string"&&typeof u!="number"||r&&r(d,u))){const h=`--${o?`${o}-`:""}${d.join("-")}`,g=((f,x)=>typeof x=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(y=>f.includes(y))||f[f.length-1].toLowerCase().includes("opacity")?x:`${x}px`:x)(d,u);Object.assign(a,{[h]:g}),F3e(s,d,`var(${h})`,p),F3e(c,d,`var(${h}, ${g})`,p)}},d=>d[0]==="vars"),{css:a,vars:s,varsWithDefaults:c}}function ia(e,n,o=void 0){const r={};for(const a in e){const s=e[a];let c="",d=!0;for(let u=0;u<s.length;u+=1){const p=s[u];p&&(c+=(d===!0?"":" ")+n(p),d=!1,o&&o[p]&&(c+=" "+o[p]))}r[a]=c}return r}function NY(e,n){return m.isValidElement(e)&&n.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}const IL={black:"#000",white:"#fff"},aDt={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},lDt="#f3e5f5",sDt="#ce93d8",cDt="#ba68c8",dDt="#ab47bc",uDt="#9c27b0",pDt="#7b1fa2",hDt="#e57373",mDt="#ef5350",gDt="#f44336",O3e="#d32f2f",fDt="#c62828",xDt="#ffb74d",yDt="#ffa726",bDt="#ff9800",wDt="#f57c00",CDt="#e65100",vDt="#e3f2fd",SDt="#90caf9",R3e="#42a5f5",kDt="#1976d2",ADt="#1565c0",$Dt="#4fc3f7",jDt="#29b6f6",EDt="#03a9f4",N3e="#0288d1",IDt="#01579b",LDt="#81c784",TDt="#66bb6a",DDt="#4caf50",PDt="#388e3c",BDt="#2e7d32",MDt="#1b5e20";function Qrt(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:IL.white,default:IL.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Grt=Qrt();function Yrt(){return{text:{primary:IL.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:IL.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const Tae=Yrt();function _3e(e,n,o,r){const a=r.light||r,s=r.dark||1.5*r;e[n]||(e.hasOwnProperty(o)?e[n]=e[o]:n==="light"?e.light=dU(e.main,a):n==="dark"&&(e.dark=cU(e.main,s)))}function V3e(e,n,o,r,a){const s=a.light||a,c=a.dark||1.5*a;n[o]||(n.hasOwnProperty(r)?n[o]=n[r]:o==="light"?n.light=`color-mix(in ${e}, ${n.main}, #fff ${(100*s).toFixed(0)}%)`:o==="dark"&&(n.dark=`color-mix(in ${e}, ${n.main}, #000 ${(100*c).toFixed(0)}%)`))}function iue(e){const{mode:n="light",contrastThreshold:o=3,tonalOffset:r=.2,colorSpace:a,...s}=e,c=e.primary||function(b="light"){return b==="dark"?{main:SDt,light:vDt,dark:R3e}:{main:kDt,light:R3e,dark:ADt}}(n),d=e.secondary||function(b="light"){return b==="dark"?{main:sDt,light:lDt,dark:dDt}:{main:uDt,light:cDt,dark:pDt}}(n),u=e.error||function(b="light"){return b==="dark"?{main:gDt,light:hDt,dark:O3e}:{main:O3e,light:mDt,dark:fDt}}(n),p=e.info||function(b="light"){return b==="dark"?{main:jDt,light:$Dt,dark:N3e}:{main:N3e,light:EDt,dark:IDt}}(n),h=e.success||function(b="light"){return b==="dark"?{main:TDt,light:LDt,dark:PDt}:{main:BDt,light:DDt,dark:MDt}}(n),g=e.warning||function(b="light"){return b==="dark"?{main:yDt,light:xDt,dark:wDt}:{main:"#ed6c02",light:bDt,dark:CDt}}(n);function f(b){return a?function(C){return`oklch(from ${C} var(--__l) 0 h / var(--__a))`}(b):function(C,v){const S=Eae(C),A=Eae(v);return(Math.max(S,A)+.05)/(Math.min(S,A)+.05)}(b,Tae.text.primary)>=o?Tae.text.primary:Grt.text.primary}const x=({color:b,name:w,mainShade:C=500,lightShade:v=300,darkShade:S=700})=>{if(!(b={...b}).main&&b[C]&&(b.main=b[C]),!b.hasOwnProperty("main"))throw new Error(Q5(11,w?` (${w})`:"",C));if(typeof b.main!="string")throw new Error(Q5(12,w?` (${w})`:"",JSON.stringify(b.main)));return a?(V3e(a,b,"light",v,r),V3e(a,b,"dark",S,r)):(_3e(b,"light",v,r),_3e(b,"dark",S,r)),b.contrastText||(b.contrastText=f(b.main)),b};let y;return n==="light"?y=Qrt():n==="dark"&&(y=Yrt()),g1({common:{...IL},mode:n,primary:x({color:c,name:"primary"}),secondary:x({color:d,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:x({color:u,name:"error"}),warning:x({color:g,name:"warning"}),info:x({color:p,name:"info"}),success:x({color:h,name:"success"}),grey:aDt,contrastThreshold:o,getContrastText:f,augmentColor:x,tonalOffset:r,...y},s)}function zDt(e){const n={};return Object.entries(e).forEach(o=>{const[r,a]=o;typeof a=="object"&&(n[r]=`${a.fontStyle?`${a.fontStyle} `:""}${a.fontVariant?`${a.fontVariant} `:""}${a.fontWeight?`${a.fontWeight} `:""}${a.fontStretch?`${a.fontStretch} `:""}${a.fontSize||""}${a.lineHeight?`/${a.lineHeight} `:""}${a.fontFamily||""}`)}),n}function FDt(e,n){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...n}}function ODt(e){return Math.round(1e5*e)/1e5}const H3e={textTransform:"uppercase"},U3e='"Roboto", "Helvetica", "Arial", sans-serif';function qrt(e,n){const{fontFamily:o=U3e,fontSize:r=14,fontWeightLight:a=300,fontWeightRegular:s=400,fontWeightMedium:c=500,fontWeightBold:d=700,htmlFontSize:u=16,allVariants:p,pxToRem:h,...g}=typeof n=="function"?n(e):n,f=r/14,x=h||(w=>w/u*f+"rem"),y=(w,C,v,S,A)=>({fontFamily:o,fontWeight:w,fontSize:x(C),lineHeight:v,...o===U3e?{letterSpacing:`${ODt(S/C)}em`}:{},...A,...p}),b={h1:y(a,96,1.167,-1.5),h2:y(a,60,1.2,-.5),h3:y(s,48,1.167,0),h4:y(s,34,1.235,.25),h5:y(s,24,1.334,0),h6:y(c,20,1.6,.15),subtitle1:y(s,16,1.75,.15),subtitle2:y(c,14,1.57,.1),body1:y(s,16,1.5,.15),body2:y(s,14,1.43,.15),button:y(c,14,1.75,.4,H3e),caption:y(s,12,1.66,.4),overline:y(s,12,2.66,1,H3e),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return g1({htmlFontSize:u,pxToRem:x,fontFamily:o,fontSize:r,fontWeightLight:a,fontWeightRegular:s,fontWeightMedium:c,fontWeightBold:d,...b},g,{clone:!1})}function wl(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}const RDt=["none",wl(0,2,1,-1,0,1,1,0,0,1,3,0),wl(0,3,1,-2,0,2,2,0,0,1,5,0),wl(0,3,3,-2,0,3,4,0,0,1,8,0),wl(0,2,4,-1,0,4,5,0,0,1,10,0),wl(0,3,5,-1,0,5,8,0,0,1,14,0),wl(0,3,5,-1,0,6,10,0,0,1,18,0),wl(0,4,5,-2,0,7,10,1,0,2,16,1),wl(0,5,5,-3,0,8,10,1,0,3,14,2),wl(0,5,6,-3,0,9,12,1,0,3,16,2),wl(0,6,6,-3,0,10,14,1,0,4,18,3),wl(0,6,7,-4,0,11,15,1,0,4,20,3),wl(0,7,8,-4,0,12,17,2,0,5,22,4),wl(0,7,8,-4,0,13,19,2,0,5,24,4),wl(0,7,9,-4,0,14,21,2,0,5,26,4),wl(0,8,9,-5,0,15,22,2,0,6,28,5),wl(0,8,10,-5,0,16,24,2,0,6,30,5),wl(0,8,11,-5,0,17,26,2,0,6,32,5),wl(0,9,11,-5,0,18,28,2,0,7,34,6),wl(0,9,12,-6,0,19,29,2,0,7,36,6),wl(0,10,13,-6,0,20,31,3,0,8,38,7),wl(0,10,13,-6,0,21,33,3,0,8,40,7),wl(0,10,14,-6,0,22,35,3,0,8,42,7),wl(0,11,14,-7,0,23,36,3,0,9,44,8),wl(0,11,15,-7,0,24,38,3,0,9,46,8)],NDt={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Krt={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function W3e(e){return`${Math.round(e)}ms`}function _Dt(e){if(!e)return 0;const n=e/36;return Math.min(Math.round(10*(4+15*n**.25+n/5)),3e3)}function VDt(e){const n={...NDt,...e.easing},o={...Krt,...e.duration};return{getAutoHeightDuration:_Dt,create:(r=["all"],a={})=>{const{duration:s=o.standard,easing:c=n.easeInOut,delay:d=0,...u}=a;return(Array.isArray(r)?r:[r]).map(p=>`${p} ${typeof s=="string"?s:W3e(s)} ${c} ${typeof d=="string"?d:W3e(d)}`).join(",")},...e,easing:n,duration:o}}const HDt={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function UDt(e){return f5(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Zrt(e={}){const n={...e};return function o(r){const a=Object.entries(r);for(let s=0;s<a.length;s++){const[c,d]=a[s];!UDt(d)||c.startsWith("unstable_")?delete r[c]:f5(d)&&(r[c]={...d},o(r[c]))}}(n),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
1
+ const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/zeni-epic-state-DuQa9FMz.js","assets/sentry-CuaXjR5n.js","assets/core-Bv1T7LZC.js","assets/index-Bf0yAk1h.js","assets/DefaultTenantHome-CXh59aBD.js","assets/mui-VYhJrGDQ.js","assets/getLocaleForTenant-DrFh6zlq.js","assets/analytics-Bqx0zRxd.js","assets/utils-DPYDOv00.js","assets/ScreenRoutes-CEUjM6GK.js","assets/analyticsHelper-bAQTI-GF.js","assets/ConnectionAuthScreen-BT3IRUL8.js","assets/QBOConnectionScreen-_B3wLRiT.js","assets/empty-BGU_c4p_.js","assets/index-B-VkC3pW.js","assets/url-DXrWvdUh.js","assets/index-Bgxmla6x.js","assets/decodeURIComponentSafe-CgJ-EbJc.js","assets/SignInScreen-jXShH9LP.js","assets/useDeviceId-BVyTAih4.js","assets/MagicLinkSignInScreen-BsUi7-40.js","assets/NotFoundScreen-D0AQGcoe.js","assets/MagicLinkRoutes-6x7Us6_Q.js","assets/WiseConfirmationScreen-D-axhjl6.js","assets/HubSpotOAuthCallbackScreen-DeESKpku.js","assets/CustomerOnboardingAuthScreen-BAn5X2Wb.js","assets/SignOutScreen-CnWA4YZp.js","assets/OAuthConsentScreen-DkCTDJwq.js"])))=>i.map(i=>d[i]);
2
+ import{a as m,b as T,c as fae,R as F$t,p as DY,r as Ap,g as cit,e as Lge,f as O$t,s as Tge,i as R$t,w as N$t,j as _$t,S as V$t,k as H$t,l as U$t,m as W$t,n as Q$t,o as G$t}from"./sentry-CuaXjR5n.js";import{L as Y$t,C as Dge,_ as $p,a as DT,b as q$t,c as HH,d as PT,u as dit,T as K$t,e as Z$t,f as J$t,g as X$t,h as uit,i as ejt,k as tjt,j as Bt,l as njt}from"./liveblocks-DC3GaKoW.js";import{f as pit,r as zr,R as ny,P as Bl,O as ojt,N as hit,u as tu,g as fh,h as BT,i as mit,j as Qo,m as $1e,s as xae,k as git,l as UE,n as ijt,o as rjt,p as Su,q as ajt,B as ljt}from"./core-Bv1T7LZC.js";import{L as Pge,bl as sjt,bm as cjt,bn as Q6,bo as Gt,bp as nA,bq as djt,br as ujt,bs as dl,bt as L2,bu as pjt,bv as i4,bw as ll,bx as hjt,by as mjt,bz as gjt,bA as AL,bB as W5,bC as _3,bD as UH,bE as hn,bF as fit,bG as h1,bH as fjt,bI as dk,bJ as xit,bK as yit,bL as j1e,bM as xh,bN as V3,bO as Cd,bP as j5,bQ as xjt,bR as bs,bS as yjt,bT as oA,bU as bjt,bV as wjt,bW as yae,bX as Cjt,bY as Jy,bZ as Bge,b_ as vjt,b$ as Sjt,c0 as kjt,c1 as Ajt,c2 as $jt,c3 as jjt,c4 as Ejt,c5 as Ijt,c6,c7 as WH,c8 as Ljt,c9 as QH,ca as GH,cb as YH,cc as E1e,cd as qH,ce as uk,cf as pk,cg as KH,ch as Tjt,ci as Djt,cj as Mge,ck as Pjt,cl as Bjt,cm as Mjt,cn as bit,co as I1e,cp as zjt,cq as r9,cr as zge,cs as Fjt,ct as Ojt,cu as Rjt,cv as Eb,cw as Ib,cx as wit,cy as Cit,cz as L1e,cA as Njt,cB as vit,cC as _jt,cD as lN,cE as Sit,cF as Vjt,cG as kit,cH as Hjt,cI as WE,cJ as Fge,cK as Ujt,cL as Ait,cM as $it,cN as jit,cO as Wjt,cP as Oge,cQ as Qjt,cR as Gjt,cS as Eit,cT as Yjt,cU as Rge,cV as Rc,cW as Fl,cX as qjt,cY as hk,cZ as s1,c_ as Iit,c$ as Kjt,d0 as $L,d1 as Ty,d2 as Ra,d3 as Zjt,d4 as Jjt,d5 as Xjt,d6 as eEt,d7 as uP,d8 as y0,d9 as tEt,da as nEt,db as oEt,dc as iEt,dd as pP,de as Xy,df as ZH,dg as rEt,dh as aEt,di as Lb,dj as m1,dk as Lit,dl as Tit,dm as lEt,dn as sEt,dp as cEt,dq as iA,dr as dEt,ds as q1,dt as eb,du as T1e,dv as Dit,dw as Pit,dx as Bit,dy as Mit,dz as zit,dA as Fit,dB as uEt,dC as Nge,dD as pEt,_ as Dd,dE as D1e,dF as Oit,dG as hEt,dH as _ge,dI as Tp,dJ as E5,dK as mEt,dL as gEt,dM as Rit,dN as bae,dO as VO,dP as fEt,dQ as xEt,dR as yEt,dS as bEt,dT as wEt,dU as CEt,dV as vEt,dW as SEt,dX as kEt,dY as AEt,dZ as AI,d_ as $I,d$ as Nit,e0 as ah,e1 as $Et,e2 as P1e,e3 as B1e,e4 as rA,e5 as M1e,e6 as z1e,e7 as F1e,e8 as O1e,e9 as _it,ea as R1e,eb as jEt,ec as EEt,ed as Vit,ee as Vge,ef as IEt,eg as N1e,eh as LEt,ei as TEt,ej as Hit,ek as DEt,el as PEt,em as BEt,en as Uit,eo as MEt,ep as Wit,eq as Qit,er as zEt,es as FEt,et as OEt,eu as REt,ev as NEt,ew as _Et,ex as VEt,ey as HEt,ez as Git,eA as UEt,eB as Hge,eC as JH,eD as WEt,eE as QEt,eF as GEt,eG as YEt,eH as qEt,eI as KEt,eJ as ZEt,eK as JEt,eL as Uge,eM as Yit,eN as qit,eO as Kit,eP as Zit,eQ as Jit,eR as Xit,eS as XEt,eT as eIt,eU as tIt,v as nIt,eV as MT,eW as du,eX as ert,eY as trt,eZ as oIt,e_ as iIt,e$ as Wge,f0 as rIt,f1 as aIt,f2 as lIt,f3 as sIt,f4 as cIt,f5 as dIt,f6 as uIt,f7 as pIt,f8 as hIt,f9 as mIt,fa as gIt,fb as fIt,fc as xIt,fd as yIt,fe as bIt,ff as wIt,fg as CIt,fh as vIt,fi as SIt,fj as Qge,fk as kIt,fl as AIt,fm as $It,fn as jIt,fo as EIt,fp as _1e,fq as zT,fr as V1e,fs as nrt,ft as IIt,fu as LIt,fv as TIt,fw as ort,fx as Gge,fy as DIt,fz as irt,fA as PIt,fB as rrt,fC as BIt,fD as art,fE as MIt,fF as lrt,fG as zIt,fH as FIt,fI as OIt,fJ as RIt,fK as NIt,fL as Yge,fM as srt,fN as Tw,fO as qge,fP as _It,fQ as Kge,fR as VIt,fS as HIt,fT as crt,fU as drt,fV as UIt,fW as WIt,fX as QIt,fY as GIt,fZ as YIt,f_ as qIt,f$ as sN,g0 as H1e,g1 as urt,g2 as KIt,g3 as jI,g4 as ZIt,g5 as JIt,g6 as XIt,g7 as eLt,g8 as tLt,g9 as nLt,ga as oLt,gb as iLt,gc as rLt,gd as aLt,ge as prt,gf as lLt,gg as sLt,gh as cLt,gi as Zge,gj as dLt,gk as uLt,gl as pLt,gm as hLt,gn as mLt,go as wae,gp as gLt,gq as fLt,gr as xLt,gs as yLt,gt as bLt,gu as wLt,gv as CLt,gw as vLt,gx as Jge,gy as SLt,gz as kLt}from"./zeni-epic-state-DuQa9FMz.js";import{n as l,T as hrt,G as FT,j as ei,c as Ie,k as Rn,C as mrt,u as U1e,a as Cae,A as ALt,b as $Lt,I as jLt,d as ELt,D as cN,S as grt}from"./mui-VYhJrGDQ.js";import{r as ILt,m as l0}from"./analytics-Bqx0zRxd.js";import{u as $h}from"./plaid-BlhDSPsk.js";import{D as W1e,H as XH,g as LLt,O as TLt,S as DLt,T as PLt,u as Q1e,a as G1e,b as BLt}from"./dnd-CrtLd1r-.js";import{l as MLt}from"./stripe-DMRn4zHo.js";import{L as jS}from"./lottie-BAdftm7g.js";import{r as Vs}from"./lexical-DtmspfR6.js";import{D as vae,P as Sae,_ as frt,a as xrt}from"./pdf-DyfSqkK5.js";import{R as mk,G as A6,H as fp,X as is,Y as _l,I as Wc,J as zLt,K as $6,L as Tb,M as jh,N as aA,O as yrt,P as FLt,Q as OLt,S as eU,U as ES,V as RLt,W as Y1e,Z as NLt,_ as _Lt,$ as VLt,d as HLt}from"./recharts-D979ncoh.js";import{r as ULt,n as Xge}from"./utils-DPYDOv00.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]="1f7f4eb2-6cbd-44d7-8e94-a6f3aa458878",e._sentryDebugIdIdentifier="sentry-dbid-1f7f4eb2-6cbd-44d7-8e94-a6f3aa458878")}catch{}})();(function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const o of document.querySelectorAll('link[rel="modulepreload"]'))n(o);new MutationObserver(o=>{for(const r of o)if(r.type==="childList")for(const a of r.addedNodes)a.tagName==="LINK"&&a.rel==="modulepreload"&&n(a)}).observe(document,{childList:!0,subtree:!0})}function n(o){if(o.ep)return;o.ep=!0;const r=function(a){const s={};return a.integrity&&(s.integrity=a.integrity),a.referrerPolicy&&(s.referrerPolicy=a.referrerPolicy),a.crossOrigin==="use-credentials"?s.credentials="include":a.crossOrigin==="anonymous"?s.credentials="omit":s.credentials="same-origin",s}(o);fetch(o.href,r)}})();var e3e,hP={},WLt=function(){if(e3e)return hP;e3e=1;var e=pit();return hP.createRoot=e.createRoot,hP.hydrateRoot=e.hydrateRoot,hP}(),ap=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof fae<"u"?fae:typeof self<"u"?self:{};function Ri(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var t3e,n3e,o3e={exports:{}},a$={};function brt(){return n3e||(n3e=1,o3e.exports=function(){if(t3e)return a$;t3e=1;var e=T,n=Symbol.for("react.element"),o=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,a=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,s={key:!0,ref:!0,__self:!0,__source:!0};function c(d,u,p){var h,g={},f=null,x=null;for(h in p!==void 0&&(f=""+p),u.key!==void 0&&(f=""+u.key),u.ref!==void 0&&(x=u.ref),u)r.call(u,h)&&!s.hasOwnProperty(h)&&(g[h]=u[h]);if(d&&d.defaultProps)for(h in u=d.defaultProps)g[h]===void 0&&(g[h]=u[h]);return{$$typeof:n,type:d,key:f,ref:x,props:g,_owner:a.current}}return a$.Fragment=o,a$.jsx=c,a$.jsxs=c,a$}()),o3e.exports}var t=brt();const QLt=m.createContext(null),PY={didCatch:!1,error:null};let GLt=class extends m.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=PY}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){const{error:e}=this.state;if(e!==null){for(var n,o,r=arguments.length,a=new Array(r),s=0;s<r;s++)a[s]=arguments[s];(n=(o=this.props).onReset)===null||n===void 0||n.call(o,{args:a,reason:"imperative-api"}),this.setState(PY)}}componentDidCatch(e,n){var o,r;(o=(r=this.props).onError)===null||o===void 0||o.call(r,e,n)}componentDidUpdate(e,n){const{didCatch:o}=this.state,{resetKeys:r}=this.props;var a,s;o&&n.error!==null&&function(){let c=arguments.length>0&&arguments[0]!==void 0?arguments[0]:[],d=arguments.length>1&&arguments[1]!==void 0?arguments[1]:[];return c.length!==d.length||c.some((u,p)=>!Object.is(u,d[p]))}(e.resetKeys,r)&&((a=(s=this.props).onReset)===null||a===void 0||a.call(s,{next:r,prev:e.resetKeys,reason:"keys"}),this.setState(PY))}render(){const{children:e,fallbackRender:n,FallbackComponent:o,fallback:r}=this.props,{didCatch:a,error:s}=this.state;let c=e;if(a){const d={error:s,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")c=n(d);else if(o)c=m.createElement(o,d);else{if(r===void 0)throw s;c=r}}return m.createElement(QLt.Provider,{value:{didCatch:a,error:s,resetErrorBoundary:this.resetErrorBoundary}},c)}};var i3e,BY={exports:{}},r3e,a3e,MY,YLt=(i3e||(i3e=1,a3e=BY.exports,MY=function(){var e,n,o,r,a,s,c={},d={},u={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},p={currentLocale:u.currentLocale,zeroFormat:u.zeroFormat,nullFormat:u.nullFormat,defaultFormat:u.defaultFormat,scalePercentBy100:u.scalePercentBy100};function h(g,f){this._input=g,this._value=f}return e=function(g){var f,x,y,b;if(e.isNumeral(g))f=g.value();else if(g===0||typeof g>"u")f=0;else if(g===null||n.isNaN(g))f=null;else if(typeof g=="string")if(p.zeroFormat&&g===p.zeroFormat)f=0;else if(p.nullFormat&&g===p.nullFormat||!g.replace(/[^0-9]+/g,"").length)f=null;else{for(x in c)if((b=typeof c[x].regexps.unformat=="function"?c[x].regexps.unformat():c[x].regexps.unformat)&&g.match(b)){y=c[x].unformat;break}f=(y=y||e._.stringToNumber)(g)}else f=Number(g)||null;return new h(g,f)},e.version="2.0.6",e.isNumeral=function(g){return g instanceof h},e._=n={numberToFormat:function(g,f,x){var y,b,w,C,v,S,A,j,$=d[e.options.currentLocale],E=!1,L=!1,I="",B=1e12,D=1e9,z=1e6,U="",R=!1;if(g=g||0,w=Math.abs(g),e._.includes(f,"(")?(E=!0,f=f.replace(/[\(|\)]/g,"")):(e._.includes(f,"+")||e._.includes(f,"-"))&&(S=e._.includes(f,"+")?f.indexOf("+"):g<0?f.indexOf("-"):-1,f=f.replace(/[\+|\-]/g,"")),e._.includes(f,"a")&&(b=!!(b=f.match(/a(k|m|b|t)?/))&&b[1],e._.includes(f," a")&&(I=" "),f=f.replace(new RegExp(I+"a[kmbt]?"),""),w>=B&&!b||b==="t"?(I+=$.abbreviations.trillion,g/=B):w<B&&w>=D&&!b||b==="b"?(I+=$.abbreviations.billion,g/=D):w<D&&w>=z&&!b||b==="m"?(I+=$.abbreviations.million,g/=z):(w<z&&w>=1e3&&!b||b==="k")&&(I+=$.abbreviations.thousand,g/=1e3)),e._.includes(f,"[.]")&&(L=!0,f=f.replace("[.]",".")),C=g.toString().split(".")[0],v=f.split(".")[1],A=f.indexOf(","),y=(f.split(".")[0].split(",")[0].match(/0/g)||[]).length,v?(e._.includes(v,"[")?(v=(v=v.replace("]","")).split("["),U=e._.toFixed(g,v[0].length+v[1].length,x,v[1].length)):U=e._.toFixed(g,v.length,x),C=U.split(".")[0],U=e._.includes(U,".")?$.delimiters.decimal+U.split(".")[1]:"",L&&Number(U.slice(1))===0&&(U="")):C=e._.toFixed(g,0,x),I&&!b&&Number(C)>=1e3&&I!==$.abbreviations.trillion)switch(C=String(Number(C)/1e3),I){case $.abbreviations.thousand:I=$.abbreviations.million;break;case $.abbreviations.million:I=$.abbreviations.billion;break;case $.abbreviations.billion:I=$.abbreviations.trillion}if(e._.includes(C,"-")&&(C=C.slice(1),R=!0),C.length<y)for(var O=y-C.length;O>0;O--)C="0"+C;return A>-1&&(C=C.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+$.delimiters.thousands)),f.indexOf(".")===0&&(C=""),j=C+U+(I||""),E?j=(E&&R?"(":"")+j+(E&&R?")":""):S>=0?j=S===0?(R?"-":"+")+j:j+(R?"-":"+"):R&&(j="-"+j),j},stringToNumber:function(g){var f,x,y,b=d[p.currentLocale],w=g,C={thousand:3,million:6,billion:9,trillion:12};if(p.zeroFormat&&g===p.zeroFormat)x=0;else if(p.nullFormat&&g===p.nullFormat||!g.replace(/[^0-9]+/g,"").length)x=null;else{for(f in x=1,b.delimiters.decimal!=="."&&(g=g.replace(/\./g,"").replace(b.delimiters.decimal,".")),C)if(y=new RegExp("[^a-zA-Z]"+b.abbreviations[f]+"(?:\\)|(\\"+b.currency.symbol+")?(?:\\))?)?$"),w.match(y)){x*=Math.pow(10,C[f]);break}x*=(g.split("-").length+Math.min(g.split("(").length-1,g.split(")").length-1))%2?1:-1,g=g.replace(/[^0-9\.]+/g,""),x*=Number(g)}return x},isNaN:function(g){return typeof g=="number"&&isNaN(g)},includes:function(g,f){return g.indexOf(f)!==-1},insert:function(g,f,x){return g.slice(0,x)+f+g.slice(x)},reduce:function(g,f){if(this===null)throw new TypeError("Array.prototype.reduce called on null or undefined");if(typeof f!="function")throw new TypeError(f+" is not a function");var x,y=Object(g),b=y.length>>>0,w=0;if(arguments.length===3)x=arguments[2];else{for(;w<b&&!(w in y);)w++;if(w>=b)throw new TypeError("Reduce of empty array with no initial value");x=y[w++]}for(;w<b;w++)w in y&&(x=f(x,y[w],w,y));return x},multiplier:function(g){var f=g.toString().split(".");return f.length<2?1:Math.pow(10,f[1].length)},correctionFactor:function(){return Array.prototype.slice.call(arguments).reduce(function(g,f){var x=n.multiplier(f);return g>x?g:x},1)},toFixed:function(g,f,x,y){var b,w,C,v,S=g.toString().split("."),A=f-(y||0);return b=S.length===2?Math.min(Math.max(S[1].length,A),f):A,C=Math.pow(10,b),v=(x(g+"e+"+b)/C).toFixed(b),y>f-b&&(w=new RegExp("\\.?0{1,"+(y-(f-b))+"}$"),v=v.replace(w,"")),v}},e.options=p,e.formats=c,e.locales=d,e.locale=function(g){return g&&(p.currentLocale=g.toLowerCase()),p.currentLocale},e.localeData=function(g){if(!g)return d[p.currentLocale];if(g=g.toLowerCase(),!d[g])throw new Error("Unknown locale : "+g);return d[g]},e.reset=function(){for(var g in u)p[g]=u[g]},e.zeroFormat=function(g){p.zeroFormat=typeof g=="string"?g:null},e.nullFormat=function(g){p.nullFormat=typeof g=="string"?g:null},e.defaultFormat=function(g){p.defaultFormat=typeof g=="string"?g:"0.0"},e.register=function(g,f,x){if(f=f.toLowerCase(),this[g+"s"][f])throw new TypeError(f+" "+g+" already registered.");return this[g+"s"][f]=x,x},e.validate=function(g,f){var x,y,b,w,C,v,S,A;if(typeof g!="string"&&(g+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",g)),(g=g.trim()).match(/^\d+$/))return!0;if(g==="")return!1;try{S=e.localeData(f)}catch{S=e.localeData(e.locale())}return b=S.currency.symbol,C=S.abbreviations,x=S.delimiters.decimal,y=S.delimiters.thousands==="."?"\\.":S.delimiters.thousands,!((A=g.match(/^[^\d]+/))!==null&&(g=g.substr(1),A[0]!==b)||(A=g.match(/[^\d]+$/))!==null&&(g=g.slice(0,-1),A[0]!==C.thousand&&A[0]!==C.million&&A[0]!==C.billion&&A[0]!==C.trillion)||(v=new RegExp(y+"{2}"),g.match(/[^\d.,]/g)||(w=g.split(x)).length>2||(w.length<2?!w[0].match(/^\d+.*\d$/)||w[0].match(v):w[0].length===1?!w[0].match(/^\d+$/)||w[0].match(v)||!w[1].match(/^\d+$/):!w[0].match(/^\d+.*\d$/)||w[0].match(v)||!w[1].match(/^\d+$/))))},e.fn=h.prototype={clone:function(){return e(this)},format:function(g,f){var x,y,b,w=this._value,C=g||p.defaultFormat;if(f=f||Math.round,w===0&&p.zeroFormat!==null)y=p.zeroFormat;else if(w===null&&p.nullFormat!==null)y=p.nullFormat;else{for(x in c)if(C.match(c[x].regexps.format)){b=c[x].format;break}y=(b=b||e._.numberToFormat)(w,C,f)}return y},value:function(){return this._value},input:function(){return this._input},set:function(g){return this._value=Number(g),this},add:function(g){var f=n.correctionFactor.call(null,this._value,g);return this._value=n.reduce([this._value,g],function(x,y,b,w){return x+Math.round(f*y)},0)/f,this},subtract:function(g){var f=n.correctionFactor.call(null,this._value,g);return this._value=n.reduce([g],function(x,y,b,w){return x-Math.round(f*y)},Math.round(this._value*f))/f,this},multiply:function(g){return this._value=n.reduce([this._value,g],function(f,x,y,b){var w=n.correctionFactor(f,x);return Math.round(f*w)*Math.round(x*w)/Math.round(w*w)},1),this},divide:function(g){return this._value=n.reduce([this._value,g],function(f,x,y,b){var w=n.correctionFactor(f,x);return Math.round(f*w)/Math.round(x*w)}),this},difference:function(g){return Math.abs(e(this._value).subtract(g).value())}},e.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(g){var f=g%10;return~~(g%100/10)==1?"th":f===1?"st":f===2?"nd":f===3?"rd":"th"},currency:{symbol:"$"}}),e.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(g,f,x){var y,b=e._.includes(f," BPS")?" ":"";return g*=1e4,f=f.replace(/\s?BPS/,""),y=e._.numberToFormat(g,f,x),e._.includes(y,")")?((y=y.split("")).splice(-1,0,b+"BPS"),y=y.join("")):y=y+b+"BPS",y},unformat:function(g){return+(1e-4*e._.stringToNumber(g)).toFixed(15)}}),r={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},a=(o={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}).suffixes.concat(r.suffixes.filter(function(g){return o.suffixes.indexOf(g)<0})),s="("+(s=a.join("|")).replace("B","B(?!PS)")+")",e.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(s)},format:function(g,f,x){var y,b,w,C=e._.includes(f,"ib")?r:o,v=e._.includes(f," b")||e._.includes(f," ib")?" ":"";for(f=f.replace(/\s?i?b/,""),y=0;y<=C.suffixes.length;y++)if(b=Math.pow(C.base,y),w=Math.pow(C.base,y+1),g===null||g===0||g>=b&&g<w){v+=C.suffixes[y],b>0&&(g/=b);break}return e._.numberToFormat(g,f,x)+v},unformat:function(g){var f,x,y=e._.stringToNumber(g);if(y){for(f=o.suffixes.length-1;f>=0;f--){if(e._.includes(g,o.suffixes[f])){x=Math.pow(o.base,f);break}if(e._.includes(g,r.suffixes[f])){x=Math.pow(r.base,f);break}}y*=x||1}return y}}),e.register("format","currency",{regexps:{format:/(\$)/},format:function(g,f,x){var y,b,w,C=e.locales[e.options.currentLocale],v={before:f.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:f.match(/([\+|\-|\)|\s|\$]*)$/)[0]};for(f=f.replace(/\s?\$\s?/,""),y=e._.numberToFormat(g,f,x),g>=0?(v.before=v.before.replace(/[\-\(]/,""),v.after=v.after.replace(/[\-\)]/,"")):g<0&&!e._.includes(v.before,"-")&&!e._.includes(v.before,"(")&&(v.before="-"+v.before),w=0;w<v.before.length;w++)switch(b=v.before[w],b){case"$":y=e._.insert(y,C.currency.symbol,w);break;case" ":y=e._.insert(y," ",w+C.currency.symbol.length-1)}for(w=v.after.length-1;w>=0;w--)switch(b=v.after[w],b){case"$":y=w===v.after.length-1?y+C.currency.symbol:e._.insert(y,C.currency.symbol,-(v.after.length-(1+w)));break;case" ":y=w===v.after.length-1?y+" ":e._.insert(y," ",-(v.after.length-(1+w)+C.currency.symbol.length-1))}return y}}),e.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(g,f,x){var y=(typeof g!="number"||e._.isNaN(g)?"0e+0":g.toExponential()).split("e");return f=f.replace(/e[\+|\-]{1}0/,""),e._.numberToFormat(Number(y[0]),f,x)+"e"+y[1]},unformat:function(g){var f=e._.includes(g,"e+")?g.split("e+"):g.split("e-"),x=Number(f[0]),y=Number(f[1]);return y=e._.includes(g,"e-")?y*=-1:y,e._.reduce([x,Math.pow(10,y)],function(b,w,C,v){var S=e._.correctionFactor(b,w);return b*S*(w*S)/(S*S)},1)}}),e.register("format","ordinal",{regexps:{format:/(o)/},format:function(g,f,x){var y=e.locales[e.options.currentLocale],b=e._.includes(f," o")?" ":"";return f=f.replace(/\s?o/,""),b+=y.ordinal(g),e._.numberToFormat(g,f,x)+b}}),e.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(g,f,x){var y,b=e._.includes(f," %")?" ":"";return e.options.scalePercentBy100&&(g*=100),f=f.replace(/\s?\%/,""),y=e._.numberToFormat(g,f,x),e._.includes(y,")")?((y=y.split("")).splice(-1,0,b+"%"),y=y.join("")):y=y+b+"%",y},unformat:function(g){var f=e._.stringToNumber(g);return e.options.scalePercentBy100?.01*f:f}}),e.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(g,f,x){var y=Math.floor(g/60/60),b=Math.floor((g-60*y*60)/60),w=Math.round(g-60*y*60-60*b);return y+":"+(b<10?"0"+b:b)+":"+(w<10?"0"+w:w)},unformat:function(g){var f=g.split(":"),x=0;return f.length===3?(x+=60*Number(f[0])*60,x+=60*Number(f[1]),x+=Number(f[2])):f.length===2&&(x+=60*Number(f[0]),x+=Number(f[1])),Number(x)}}),e},(r3e=BY).exports?r3e.exports=MY():a3e.numeral=MY()),BY.exports);const M5=Ri(YLt);function Q5(e,...n){const o=new URL(`https://mui.com/production-error/?code=${e}`);return n.forEach(r=>o.searchParams.append("args[]",r)),`Minified MUI error #${e}; visit ${o} for the full message.`}const z5="$$material";var qLt={animationIterationCount:1,aspectRatio:1,borderImageOutset:1,borderImageSlice:1,borderImageWidth:1,boxFlex:1,boxFlexGroup:1,boxOrdinalGroup:1,columnCount:1,columns:1,flex:1,flexGrow:1,flexPositive:1,flexShrink:1,flexNegative:1,flexOrder:1,gridRow:1,gridRowEnd:1,gridRowSpan:1,gridRowStart:1,gridColumn:1,gridColumnEnd:1,gridColumnSpan:1,gridColumnStart:1,msGridRow:1,msGridRowSpan:1,msGridColumn:1,msGridColumnSpan:1,fontWeight:1,lineHeight:1,opacity:1,order:1,orphans:1,scale:1,tabSize:1,widows:1,zIndex:1,zoom:1,WebkitLineClamp:1,fillOpacity:1,floodOpacity:1,stopOpacity:1,strokeDasharray:1,strokeDashoffset:1,strokeMiterlimit:1,strokeOpacity:1,strokeWidth:1};function KLt(e){var n=Object.create(null);return function(o){return n[o]===void 0&&(n[o]=e(o)),n[o]}}var ZLt=/[A-Z]|^ms/g,JLt=/_EMO_([^_]+?)_([^]*?)_EMO_/g,wrt=function(e){return e.charCodeAt(1)===45},l3e=function(e){return e!=null&&typeof e!="boolean"},zY=KLt(function(e){return wrt(e)?e:e.replace(ZLt,"-$&").toLowerCase()}),s3e=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(JLt,function(o,r,a){return U7={name:r,styles:a,next:U7},r})}return qLt[e]===1||wrt(e)||typeof n!="number"||n===0?n:n+"px"};function dN(e,n,o){if(o==null)return"";var r=o;if(r.__emotion_styles!==void 0)return r;switch(typeof o){case"boolean":return"";case"object":var a=o;if(a.anim===1)return U7={name:a.name,styles:a.styles,next:U7},a.name;var s=o;if(s.styles!==void 0){var c=s.next;if(c!==void 0)for(;c!==void 0;)U7={name:c.name,styles:c.styles,next:U7},c=c.next;return s.styles+";"}return function(d,u,p){var h="";if(Array.isArray(p))for(var g=0;g<p.length;g++)h+=dN(d,u,p[g])+";";else for(var f in p){var x=p[f];if(typeof x!="object"){var y=x;l3e(y)&&(h+=zY(f)+":"+s3e(f,y)+";")}else if(Array.isArray(x)&&typeof x[0]=="string"&&u==null)for(var b=0;b<x.length;b++)l3e(x[b])&&(h+=zY(f)+":"+s3e(f,x[b])+";");else{var w=dN(d,u,x);switch(f){case"animation":case"animationName":h+=zY(f)+":"+w+";";break;default:h+=f+"{"+w+"}"}}}return h}(e,n,o)}return o}var U7,c3e=/label:\s*([^\s;{]+)\s*(;|$)/g,d3e,u3e,p3e,h3e,m3e,g3e={exports:{}};function XLt(){return u3e?d3e:(u3e=1,d3e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}function eTt(){if(h3e)return p3e;h3e=1;var e=XLt();function n(){}function o(){}return o.resetWarningCache=n,p3e=function(){function r(c,d,u,p,h,g){if(g!==e){var f=new Error("Calling PropTypes validators directly is not supported by the `prop-types` package. Use PropTypes.checkPropTypes() to call them. Read more at http://fb.me/use-check-prop-types");throw f.name="Invariant Violation",f}}function a(){return r}r.isRequired=r;var s={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:a,element:r,elementType:r,instanceOf:a,node:r,objectOf:a,oneOf:a,oneOfType:a,shape:a,exact:a,checkPropTypes:o,resetWarningCache:n};return s.PropTypes=s,s}}function q1e(){return m3e||(m3e=1,g3e.exports=eTt()()),g3e.exports}const kn=Ri(q1e());var tTt=function(){function e(o){var r=this;this._insertTag=function(a){var s;s=r.tags.length===0?r.insertionPoint?r.insertionPoint.nextSibling:r.prepend?r.container.firstChild:r.before:r.tags[r.tags.length-1].nextSibling,r.container.insertBefore(a,s),r.tags.push(a)},this.isSpeedy=o.speedy===void 0||o.speedy,this.tags=[],this.ctr=0,this.nonce=o.nonce,this.key=o.key,this.container=o.container,this.prepend=o.prepend,this.insertionPoint=o.insertionPoint,this.before=null}var n=e.prototype;return n.hydrate=function(o){o.forEach(this._insertTag)},n.insert=function(o){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag(function(s){var c=document.createElement("style");return c.setAttribute("data-emotion",s.key),s.nonce!==void 0&&c.setAttribute("nonce",s.nonce),c.appendChild(document.createTextNode("")),c.setAttribute("data-s",""),c}(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var a=function(s){if(s.sheet)return s.sheet;for(var c=0;c<document.styleSheets.length;c++)if(document.styleSheets[c].ownerNode===s)return document.styleSheets[c]}(r);try{a.insertRule(o,a.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(o));this.ctr++},n.flush=function(){this.tags.forEach(function(o){var r;return(r=o.parentNode)==null?void 0:r.removeChild(o)}),this.tags=[],this.ctr=0},e}(),n1="-ms-",f3e="-moz-",Xr="-webkit-",Crt="comm",K1e="rule",Z1e="decl",vrt="@keyframes",nTt=Math.abs,tU=String.fromCharCode,oTt=Object.assign;function Srt(e){return e.trim()}function ea(e,n,o){return e.replace(n,o)}function kae(e,n){return e.indexOf(n)}function md(e,n){return 0|e.charCodeAt(n)}function jL(e,n,o){return e.slice(n,o)}function Xg(e){return e.length}function J1e(e){return e.length}function mP(e,n){return n.push(e),e}var nU=1,gk=1,krt=0,xp=0,Fs=0,lA="";function oU(e,n,o,r,a,s,c){return{value:e,root:n,parent:o,type:r,props:a,children:s,line:nU,column:gk,length:c,return:""}}function l$(e,n){return oTt(oU("",null,null,"",null,null,0),e,{length:-e.length},n)}function uh(){return Fs=xp<krt?md(lA,xp++):0,gk++,Fs===10&&(gk=1,nU++),Fs}function L3(){return md(lA,xp)}function HO(){return xp}function OT(e,n){return jL(lA,e,n)}function EL(e){switch(e){case 0:case 9:case 10:case 13:case 32:return 5;case 33:case 43:case 44:case 47:case 62:case 64:case 126:case 59:case 123:case 125:return 4;case 58:return 3;case 34:case 39:case 40:case 91:return 2;case 41:case 93:return 1}return 0}function Art(e){return nU=gk=1,krt=Xg(lA=e),xp=0,[]}function $rt(e){return lA="",e}function UO(e){return Srt(OT(xp-1,Aae(e===91?e+2:e===40?e+1:e)))}function iTt(e){for(;(Fs=L3())&&Fs<33;)uh();return EL(e)>2||EL(Fs)>3?"":" "}function rTt(e,n){for(;--n&&uh()&&!(Fs<48||Fs>102||Fs>57&&Fs<65||Fs>70&&Fs<97););return OT(e,HO()+(n<6&&L3()==32&&uh()==32))}function Aae(e){for(;uh();)switch(Fs){case e:return xp;case 34:case 39:e!==34&&e!==39&&Aae(Fs);break;case 40:e===41&&Aae(e);break;case 92:uh()}return xp}function aTt(e,n){for(;uh()&&e+Fs!==57&&(e+Fs!==84||L3()!==47););return"/*"+OT(n,xp-1)+"*"+tU(e===47?e:uh())}function lTt(e){for(;!EL(L3());)uh();return OT(e,xp)}function sTt(e){return $rt(WO("",null,null,null,[""],e=Art(e),0,[0],e))}function WO(e,n,o,r,a,s,c,d,u){for(var p=0,h=0,g=c,f=0,x=0,y=0,b=1,w=1,C=1,v=0,S="",A=a,j=s,$=r,E=S;w;)switch(y=v,v=uh()){case 40:if(y!=108&&md(E,g-1)==58){kae(E+=ea(UO(v),"&","&\f"),"&\f")!=-1&&(C=-1);break}case 34:case 39:case 91:E+=UO(v);break;case 9:case 10:case 13:case 32:E+=iTt(y);break;case 92:E+=rTt(HO()-1,7);continue;case 47:switch(L3()){case 42:case 47:mP(cTt(aTt(uh(),HO()),n,o),u);break;default:E+="/"}break;case 123*b:d[p++]=Xg(E)*C;case 125*b:case 59:case 0:switch(v){case 0:case 125:w=0;case 59+h:C==-1&&(E=ea(E,/\f/g,"")),x>0&&Xg(E)-g&&mP(x>32?y3e(E+";",r,o,g-1):y3e(ea(E," ","")+";",r,o,g-2),u);break;case 59:E+=";";default:if(mP($=x3e(E,n,o,p,h,a,d,S,A=[],j=[],g),s),v===123)if(h===0)WO(E,n,$,$,A,s,g,d,j);else switch(f===99&&md(E,3)===110?100:f){case 100:case 108:case 109:case 115:WO(e,$,$,r&&mP(x3e(e,$,$,0,0,a,d,S,a,A=[],g),j),a,j,g,d,r?A:j);break;default:WO(E,$,$,$,[""],j,0,d,j)}}p=h=x=0,b=C=1,S=E="",g=c;break;case 58:g=1+Xg(E),x=y;default:if(b<1){if(v==123)--b;else if(v==125&&b++==0&&(Fs=xp>0?md(lA,--xp):0,gk--,Fs===10&&(gk=1,nU--),Fs==125))continue}switch(E+=tU(v),v*b){case 38:C=h>0?1:(E+="\f",-1);break;case 44:d[p++]=(Xg(E)-1)*C,C=1;break;case 64:L3()===45&&(E+=UO(uh())),f=L3(),h=g=Xg(S=E+=lTt(HO())),v++;break;case 45:y===45&&Xg(E)==2&&(b=0)}}return s}function x3e(e,n,o,r,a,s,c,d,u,p,h){for(var g=a-1,f=a===0?s:[""],x=J1e(f),y=0,b=0,w=0;y<r;++y)for(var C=0,v=jL(e,g+1,g=nTt(b=c[y])),S=e;C<x;++C)(S=Srt(b>0?f[C]+" "+v:ea(v,/&\f/g,f[C])))&&(u[w++]=S);return oU(e,n,o,a===0?K1e:d,u,p,h)}function cTt(e,n,o){return oU(e,n,o,Crt,tU(Fs),jL(e,2,-2),0)}function y3e(e,n,o,r){return oU(e,n,o,Z1e,jL(e,0,r),jL(e,r+1,-1),r)}function IS(e,n){for(var o="",r=J1e(e),a=0;a<r;a++)o+=n(e[a],a,e,n)||"";return o}function dTt(e,n,o,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case Z1e:return e.return=e.return||e.value;case Crt:return"";case vrt:return e.return=e.value+"{"+IS(e.children,r)+"}";case K1e:e.value=e.props.join(",")}return Xg(o=IS(e.children,r))?e.return=e.value+"{"+o+"}":""}function uTt(e){return function(n){n.root||(n=n.return)&&e(n)}}var pTt=function(e,n,o){for(var r=0,a=0;r=a,a=L3(),r===38&&a===12&&(n[o]=1),!EL(a);)uh();return OT(e,xp)},hTt=function(e,n){return $rt(function(o,r){var a=-1,s=44;do switch(EL(s)){case 0:s===38&&L3()===12&&(r[a]=1),o[a]+=pTt(xp-1,r,a);break;case 2:o[a]+=UO(s);break;case 4:if(s===44){o[++a]=L3()===58?"&\f":"",r[a]=o[a].length;break}default:o[a]+=tU(s)}while(s=uh());return o}(Art(e),n))},b3e=new WeakMap,mTt=function(e){if(e.type==="rule"&&e.parent&&!(e.length<1)){for(var n=e.value,o=e.parent,r=e.column===o.column&&e.line===o.line;o.type!=="rule";)if(!(o=o.parent))return;if((e.props.length!==1||n.charCodeAt(0)===58||b3e.get(o))&&!r){b3e.set(e,!0);for(var a=[],s=hTt(n,a),c=o.props,d=0,u=0;d<s.length;d++)for(var p=0;p<c.length;p++,u++)e.props[u]=a[d]?s[d].replace(/&\f/g,c[p]):c[p]+" "+s[d]}}},gTt=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function jrt(e,n){switch(function(o,r){return 45^md(o,0)?(((r<<2^md(o,0))<<2^md(o,1))<<2^md(o,2))<<2^md(o,3):0}(e,n)){case 5103:return Xr+"print-"+e+e;case 5737:case 4201:case 3177:case 3433:case 1641:case 4457:case 2921:case 5572:case 6356:case 5844:case 3191:case 6645:case 3005:case 6391:case 5879:case 5623:case 6135:case 4599:case 4855:case 4215:case 6389:case 5109:case 5365:case 5621:case 3829:return Xr+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return Xr+e+f3e+e+n1+e+e;case 6828:case 4268:return Xr+e+n1+e+e;case 6165:return Xr+e+n1+"flex-"+e+e;case 5187:return Xr+e+ea(e,/(\w+).+(:[^]+)/,Xr+"box-$1$2"+n1+"flex-$1$2")+e;case 5443:return Xr+e+n1+"flex-item-"+ea(e,/flex-|-self/,"")+e;case 4675:return Xr+e+n1+"flex-line-pack"+ea(e,/align-content|flex-|-self/,"")+e;case 5548:return Xr+e+n1+ea(e,"shrink","negative")+e;case 5292:return Xr+e+n1+ea(e,"basis","preferred-size")+e;case 6060:return Xr+"box-"+ea(e,"-grow","")+Xr+e+n1+ea(e,"grow","positive")+e;case 4554:return Xr+ea(e,/([^-])(transform)/g,"$1"+Xr+"$2")+e;case 6187:return ea(ea(ea(e,/(zoom-|grab)/,Xr+"$1"),/(image-set)/,Xr+"$1"),e,"")+e;case 5495:case 3959:return ea(e,/(image-set\([^]*)/,Xr+"$1$`$1");case 4968:return ea(ea(e,/(.+:)(flex-)?(.*)/,Xr+"box-pack:$3"+n1+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+Xr+e+e;case 4095:case 3583:case 4068:case 2532:return ea(e,/(.+)-inline(.+)/,Xr+"$1$2")+e;case 8116:case 7059:case 5753:case 5535:case 5445:case 5701:case 4933:case 4677:case 5533:case 5789:case 5021:case 4765:if(Xg(e)-1-n>6)switch(md(e,n+1)){case 109:if(md(e,n+4)!==45)break;case 102:return ea(e,/(.+:)(.+)-([^]+)/,"$1"+Xr+"$2-$3$1"+f3e+(md(e,n+3)==108?"$3":"$2-$3"))+e;case 115:return~kae(e,"stretch")?jrt(ea(e,"stretch","fill-available"),n)+e:e}break;case 4949:if(md(e,n+1)!==115)break;case 6444:switch(md(e,Xg(e)-3-(~kae(e,"!important")&&10))){case 107:return ea(e,":",":"+Xr)+e;case 101:return ea(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+Xr+(md(e,14)===45?"inline-":"")+"box$3$1"+Xr+"$2$3$1"+n1+"$2box$3")+e}break;case 5936:switch(md(e,n+11)){case 114:return Xr+e+n1+ea(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return Xr+e+n1+ea(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return Xr+e+n1+ea(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return Xr+e+n1+e+e}return e}var fTt=[function(e,n,o,r){if(e.length>-1&&!e.return)switch(e.type){case Z1e:e.return=jrt(e.value,e.length);break;case vrt:return IS([l$(e,{value:ea(e.value,"@","@"+Xr)})],r);case K1e:if(e.length)return function(a,s){return a.map(s).join("")}(e.props,function(a){switch(function(s,c){return(s=c.exec(s))?s[0]:s}(a,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return IS([l$(e,{props:[ea(a,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return IS([l$(e,{props:[ea(a,/:(plac\w+)/,":"+Xr+"input-$1")]}),l$(e,{props:[ea(a,/:(plac\w+)/,":-moz-$1")]}),l$(e,{props:[ea(a,/:(plac\w+)/,n1+"input-$1")]})],r)}return""})}}],Ert=function(e){var n=e.key;if(n==="css"){var o=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(o,function(x){x.getAttribute("data-emotion").indexOf(" ")!==-1&&(document.head.appendChild(x),x.setAttribute("data-s",""))})}var r,a=e.stylisPlugins||fTt,s={},c=[];r=e.container||document.head,Array.prototype.forEach.call(document.querySelectorAll('style[data-emotion^="'+n+' "]'),function(x){for(var y=x.getAttribute("data-emotion").split(" "),b=1;b<y.length;b++)s[y[b]]=!0;c.push(x)});var d,u,p=[mTt,gTt],h=[dTt,uTt(function(x){u.insert(x)})],g=function(x){var y=J1e(x);return function(b,w,C,v){for(var S="",A=0;A<y;A++)S+=x[A](b,w,C,v)||"";return S}}(p.concat(a,h));d=function(x,y,b,w){u=b,function(C){IS(sTt(C),g)}(x?x+"{"+y.styles+"}":y.styles),w&&(f.inserted[y.name]=!0)};var f={key:n,sheet:new tTt({key:n,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:s,registered:{},insert:d};return f.sheet.hydrate(c),f};function Irt(e){const{styles:n,defaultTheme:o={}}=e,r=typeof n=="function"?a=>n(function(s){return s==null||Object.keys(s).length===0}(a)?o:a):n;return t.jsx(FT,{styles:r})}const w3e=[];function d6(e){return w3e[0]=e,function(n,o,r){if(n.length===1&&typeof n[0]=="object"&&n[0]!==null&&n[0].styles!==void 0)return n[0];var a=!0,s="";U7=void 0;var c=n[0];c==null||c.raw===void 0?(a=!1,s+=dN(r,o,c)):s+=c[0];for(var d=1;d<n.length;d++)s+=dN(r,o,n[d]),a&&(s+=c[d]);c3e.lastIndex=0;for(var u,p="";(u=c3e.exec(s))!==null;)p+="-"+u[1];var h=function(g){for(var f,x=0,y=0,b=g.length;b>=4;++y,b-=4)f=1540483477*(65535&(f=255&g.charCodeAt(y)|(255&g.charCodeAt(++y))<<8|(255&g.charCodeAt(++y))<<16|(255&g.charCodeAt(++y))<<24))+(59797*(f>>>16)<<16),x=1540483477*(65535&(f^=f>>>24))+(59797*(f>>>16)<<16)^1540483477*(65535&x)+(59797*(x>>>16)<<16);switch(b){case 3:x^=(255&g.charCodeAt(y+2))<<16;case 2:x^=(255&g.charCodeAt(y+1))<<8;case 1:x=1540483477*(65535&(x^=255&g.charCodeAt(y)))+(59797*(x>>>16)<<16)}return(((x=1540483477*(65535&(x^=x>>>13))+(59797*(x>>>16)<<16))^x>>>15)>>>0).toString(36)}(s)+p;return{name:h,styles:s,next:U7}}(w3e)}var C3e,v3e,S3e={exports:{}},ja={};function xTt(){if(C3e)return ja;C3e=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),o=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),a=Symbol.for("react.profiler"),s=Symbol.for("react.consumer"),c=Symbol.for("react.context"),d=Symbol.for("react.forward_ref"),u=Symbol.for("react.suspense"),p=Symbol.for("react.suspense_list"),h=Symbol.for("react.memo"),g=Symbol.for("react.lazy"),f=Symbol.for("react.view_transition"),x=Symbol.for("react.client.reference");function y(b){if(typeof b=="object"&&b!==null){var w=b.$$typeof;switch(w){case e:switch(b=b.type){case o:case a:case r:case u:case p:case f:return b;default:switch(b=b&&b.$$typeof){case c:case d:case g:case h:case s:return b;default:return w}}case n:return w}}}return ja.ContextConsumer=s,ja.ContextProvider=c,ja.Element=e,ja.ForwardRef=d,ja.Fragment=o,ja.Lazy=g,ja.Memo=h,ja.Portal=n,ja.Profiler=a,ja.StrictMode=r,ja.Suspense=u,ja.SuspenseList=p,ja.isContextConsumer=function(b){return y(b)===s},ja.isContextProvider=function(b){return y(b)===c},ja.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},ja.isForwardRef=function(b){return y(b)===d},ja.isFragment=function(b){return y(b)===o},ja.isLazy=function(b){return y(b)===g},ja.isMemo=function(b){return y(b)===h},ja.isPortal=function(b){return y(b)===n},ja.isProfiler=function(b){return y(b)===a},ja.isStrictMode=function(b){return y(b)===r},ja.isSuspense=function(b){return y(b)===u},ja.isSuspenseList=function(b){return y(b)===p},ja.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===o||b===a||b===r||b===u||b===p||typeof b=="object"&&b!==null&&(b.$$typeof===g||b.$$typeof===h||b.$$typeof===c||b.$$typeof===s||b.$$typeof===d||b.$$typeof===x||b.getModuleId!==void 0)},ja.typeOf=y,ja}function yTt(){return v3e||(v3e=1,S3e.exports=xTt()),S3e.exports}var Lrt=yTt();function f5(e){if(typeof e!="object"||e===null)return!1;const n=Object.getPrototypeOf(e);return!(n!==null&&n!==Object.prototype&&Object.getPrototypeOf(n)!==null||Symbol.toStringTag in e||Symbol.iterator in e)}function Trt(e){if(m.isValidElement(e)||Lrt.isValidElementType(e)||!f5(e))return e;const n={};return Object.keys(e).forEach(o=>{n[o]=Trt(e[o])}),n}function g1(e,n,o={clone:!0}){const r=o.clone?{...e}:e;return f5(e)&&f5(n)&&Object.keys(n).forEach(a=>{m.isValidElement(n[a])||Lrt.isValidElementType(n[a])?r[a]=n[a]:f5(n[a])&&Object.prototype.hasOwnProperty.call(e,a)&&f5(e[a])?r[a]=g1(e[a],n[a],o):o.clone?r[a]=f5(n[a])?Trt(n[a]):n[a]:r[a]=n[a]}),r}function bTt(e){const{values:n={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:o="px",step:r=5,...a}=e,s=(h=>{const g=Object.keys(h).map(f=>({key:f,val:h[f]}))||[];return g.sort((f,x)=>f.val-x.val),g.reduce((f,x)=>({...f,[x.key]:x.val}),{})})(n),c=Object.keys(s);function d(h){return`@media (min-width:${typeof n[h]=="number"?n[h]:h}${o})`}function u(h){return`@media (max-width:${(typeof n[h]=="number"?n[h]:h)-r/100}${o})`}function p(h,g){const f=c.indexOf(g);return`@media (min-width:${typeof n[h]=="number"?n[h]:h}${o}) and (max-width:${(f!==-1&&typeof n[c[f]]=="number"?n[c[f]]:g)-r/100}${o})`}return{keys:c,values:s,up:d,down:u,between:p,only:function(h){return c.indexOf(h)+1<c.length?p(h,c[c.indexOf(h)+1]):d(h)},not:function(h){const g=c.indexOf(h);return g===0?d(c[1]):g===c.length-1?u(c[g]):p(h,c[c.indexOf(h)+1]).replace("@media","@media not all and")},unit:o,...a}}function k3e(e,n){if(!e.containerQueries)return n;const o=Object.keys(n).filter(r=>r.startsWith("@container")).sort((r,a)=>{const s=/min-width:\s*([0-9.]+)/;return+(r.match(s)?.[1]||0)-+(a.match(s)?.[1]||0)});return o.length?o.reduce((r,a)=>{const s=n[a];return delete r[a],r[a]=s,r},{...n}):n}const wTt={borderRadius:4};function EI(e,n){return n?g1(e,n,{clone:!1}):e}const iU={xs:0,sm:600,md:900,lg:1200,xl:1536},A3e={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${iU[e]}px)`},CTt={containerQueries:e=>({up:n=>{let o=typeof n=="number"?n:iU[n]||n;return typeof o=="number"&&(o=`${o}px`),e?`@container ${e} (min-width:${o})`:`@container (min-width:${o})`}})};function G5(e,n,o){const r=e.theme||{};if(Array.isArray(n)){const a=r.breakpoints||A3e;return n.reduce((s,c,d)=>(s[a.up(a.keys[d])]=o(n[d]),s),{})}if(typeof n=="object"){const a=r.breakpoints||A3e;return Object.keys(n).reduce((s,c)=>{if(function(d,u){return u==="@"||u.startsWith("@")&&(d.some(p=>u.startsWith(`@${p}`))||!!u.match(/^@\d/))}(a.keys,c)){const d=function(u,p){const h=p.match(/^@([^/]+)?\/?(.+)?$/);if(!h)return null;const[,g,f]=h,x=Number.isNaN(+g)?g||0:+g;return u.containerQueries(f).up(x)}(r.containerQueries?r:CTt,c);d&&(s[d]=o(n[c],c))}else if(Object.keys(a.values||iU).includes(c))s[a.up(c)]=o(n[c],c);else{const d=c;s[d]=n[d]}return s},{})}return o(n)}function $3e(e,n){return e.reduce((o,r)=>{const a=o[r];return(!a||Object.keys(a).length===0)&&delete o[r],o},n)}function ki(e){if(typeof e!="string")throw new Error(Q5(7));return e.charAt(0).toUpperCase()+e.slice(1)}function rU(e,n,o=!0){if(!n||typeof n!="string")return null;if(e&&e.vars&&o){const r=`vars.${n}`.split(".").reduce((a,s)=>a&&a[s]?a[s]:null,e);if(r!=null)return r}return n.split(".").reduce((r,a)=>r&&r[a]!=null?r[a]:null,e)}function uN(e,n,o,r=o){let a;return a=typeof e=="function"?e(o):Array.isArray(e)?e[o]||r:rU(e,o)||r,n&&(a=n(a,r,e)),a}function ms(e){const{prop:n,cssProperty:o=e.prop,themeKey:r,transform:a}=e,s=c=>{if(c[n]==null)return null;const d=c[n],u=rU(c.theme,r)||{};return G5(c,d,p=>{let h=uN(u,a,p);return p===h&&typeof p=="string"&&(h=uN(u,a,`${n}${p==="default"?"":ki(p)}`,p)),o===!1?h:{[o]:h}})};return s.propTypes={},s.filterProps=[n],s}const vTt={m:"margin",p:"padding"},STt={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},j3e={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},kTt=function(e){const n={};return o=>(n[o]===void 0&&(n[o]=e(o)),n[o])}(e=>{if(e.length>2){if(!j3e[e])return[e];e=j3e[e]}const[n,o]=e.split(""),r=vTt[n],a=STt[o]||"";return Array.isArray(a)?a.map(s=>r+s):[r+a]}),Drt=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],Prt=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];function RT(e,n,o,r){const a=rU(e,n,!0)??o;return typeof a=="number"||typeof a=="string"?s=>typeof s=="string"?s:typeof a=="string"?a.startsWith("var(")&&s===0?0:a.startsWith("var(")&&s===1?a:`calc(${s} * ${a})`:a*s:Array.isArray(a)?s=>{if(typeof s=="string")return s;const c=Math.abs(s),d=a[c];return s>=0?d:typeof d=="number"?-d:typeof d=="string"&&d.startsWith("var(")?`calc(-1 * ${d})`:`-${d}`}:typeof a=="function"?a:()=>{}}function X1e(e){return RT(e,"spacing",8)}function NT(e,n){return typeof n=="string"||n==null?n:e(n)}function ATt(e,n,o,r){if(!n.includes(o))return null;const a=function(s,c){return d=>s.reduce((u,p)=>(u[p]=NT(c,d),u),{})}(kTt(o),r);return G5(e,e[o],a)}function Brt(e,n){const o=X1e(e.theme);return Object.keys(e).map(r=>ATt(e,n,r,o)).reduce(EI,{})}function Ql(e){return Brt(e,Drt)}function Gl(e){return Brt(e,Prt)}function Mrt(e=8,n=X1e({spacing:e})){if(e.mui)return e;const o=(...r)=>(r.length===0?[1]:r).map(a=>{const s=n(a);return typeof s=="number"?`${s}px`:s}).join(" ");return o.mui=!0,o}function aU(...e){const n=e.reduce((r,a)=>(a.filterProps.forEach(s=>{r[s]=a}),r),{}),o=r=>Object.keys(r).reduce((a,s)=>n[s]?EI(a,n[s](r)):a,{});return o.propTypes={},o.filterProps=e.reduce((r,a)=>r.concat(a.filterProps),[]),o}function b0(e){return typeof e!="number"?e:`${e}px solid`}function Y0(e,n){return ms({prop:e,themeKey:"borders",transform:n})}Ql.propTypes={},Ql.filterProps=Drt,Gl.propTypes={},Gl.filterProps=Prt;const $Tt=Y0("border",b0),jTt=Y0("borderTop",b0),ETt=Y0("borderRight",b0),ITt=Y0("borderBottom",b0),LTt=Y0("borderLeft",b0),TTt=Y0("borderColor"),DTt=Y0("borderTopColor"),PTt=Y0("borderRightColor"),BTt=Y0("borderBottomColor"),MTt=Y0("borderLeftColor"),zTt=Y0("outline",b0),FTt=Y0("outlineColor"),QO=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const n=RT(e.theme,"shape.borderRadius",4),o=r=>({borderRadius:NT(n,r)});return G5(e,e.borderRadius,o)}return null};QO.propTypes={},QO.filterProps=["borderRadius"],aU($Tt,jTt,ETt,ITt,LTt,TTt,DTt,PTt,BTt,MTt,QO,zTt,FTt);const pN=e=>{if(e.gap!==void 0&&e.gap!==null){const n=RT(e.theme,"spacing",8),o=r=>({gap:NT(n,r)});return G5(e,e.gap,o)}return null};pN.propTypes={},pN.filterProps=["gap"];const hN=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const n=RT(e.theme,"spacing",8),o=r=>({columnGap:NT(n,r)});return G5(e,e.columnGap,o)}return null};hN.propTypes={},hN.filterProps=["columnGap"];const mN=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const n=RT(e.theme,"spacing",8),o=r=>({rowGap:NT(n,r)});return G5(e,e.rowGap,o)}return null};mN.propTypes={},mN.filterProps=["rowGap"];function LS(e,n){return n==="grey"?n:e}aU(pN,hN,mN,ms({prop:"gridColumn"}),ms({prop:"gridRow"}),ms({prop:"gridAutoFlow"}),ms({prop:"gridAutoColumns"}),ms({prop:"gridAutoRows"}),ms({prop:"gridTemplateColumns"}),ms({prop:"gridTemplateRows"}),ms({prop:"gridTemplateAreas"}),ms({prop:"gridArea"}));function oh(e){return e<=1&&e!==0?100*e+"%":e}aU(ms({prop:"color",themeKey:"palette",transform:LS}),ms({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:LS}),ms({prop:"backgroundColor",themeKey:"palette",transform:LS}));const OTt=ms({prop:"width",transform:oh}),eue=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const n=o=>{const r=e.theme?.breakpoints?.values?.[o]||iU[o];return r?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:oh(o)}};return G5(e,e.maxWidth,n)}return null};eue.filterProps=["maxWidth"];const RTt=ms({prop:"minWidth",transform:oh}),NTt=ms({prop:"height",transform:oh}),_Tt=ms({prop:"maxHeight",transform:oh}),VTt=ms({prop:"minHeight",transform:oh});ms({prop:"size",cssProperty:"width",transform:oh}),ms({prop:"size",cssProperty:"height",transform:oh});aU(OTt,eue,RTt,NTt,_Tt,VTt,ms({prop:"boxSizing"}));const lU={border:{themeKey:"borders",transform:b0},borderTop:{themeKey:"borders",transform:b0},borderRight:{themeKey:"borders",transform:b0},borderBottom:{themeKey:"borders",transform:b0},borderLeft:{themeKey:"borders",transform:b0},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:b0},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:QO},color:{themeKey:"palette",transform:LS},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:LS},backgroundColor:{themeKey:"palette",transform:LS},p:{style:Gl},pt:{style:Gl},pr:{style:Gl},pb:{style:Gl},pl:{style:Gl},px:{style:Gl},py:{style:Gl},padding:{style:Gl},paddingTop:{style:Gl},paddingRight:{style:Gl},paddingBottom:{style:Gl},paddingLeft:{style:Gl},paddingX:{style:Gl},paddingY:{style:Gl},paddingInline:{style:Gl},paddingInlineStart:{style:Gl},paddingInlineEnd:{style:Gl},paddingBlock:{style:Gl},paddingBlockStart:{style:Gl},paddingBlockEnd:{style:Gl},m:{style:Ql},mt:{style:Ql},mr:{style:Ql},mb:{style:Ql},ml:{style:Ql},mx:{style:Ql},my:{style:Ql},margin:{style:Ql},marginTop:{style:Ql},marginRight:{style:Ql},marginBottom:{style:Ql},marginLeft:{style:Ql},marginX:{style:Ql},marginY:{style:Ql},marginInline:{style:Ql},marginInlineStart:{style:Ql},marginInlineEnd:{style:Ql},marginBlock:{style:Ql},marginBlockStart:{style:Ql},marginBlockEnd:{style:Ql},displayPrint:{cssProperty:!1,transform:e=>({"@media print":{display:e}})},display:{},overflow:{},textOverflow:{},visibility:{},whiteSpace:{},flexBasis:{},flexDirection:{},flexWrap:{},justifyContent:{},alignItems:{},alignContent:{},order:{},flex:{},flexGrow:{},flexShrink:{},alignSelf:{},justifyItems:{},justifySelf:{},gap:{style:pN},rowGap:{style:mN},columnGap:{style:hN},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:oh},maxWidth:{style:eue},minWidth:{transform:oh},height:{transform:oh},maxHeight:{transform:oh},minHeight:{transform:oh},boxSizing:{},font:{themeKey:"font"},fontFamily:{themeKey:"typography"},fontSize:{themeKey:"typography"},fontStyle:{themeKey:"typography"},fontWeight:{themeKey:"typography"},letterSpacing:{},textTransform:{},lineHeight:{},textAlign:{},typography:{cssProperty:!1,themeKey:"typography"}},tb=function(){function e(n,o,r,a){const s={[n]:o,theme:r},c=a[n];if(!c)return{[n]:o};const{cssProperty:d=n,themeKey:u,transform:p,style:h}=c;if(o==null)return null;if(u==="typography"&&o==="inherit")return{[n]:o};const g=rU(r,u)||{};return h?h(s):G5(s,o,f=>{let x=uN(g,p,f);return f===x&&typeof f=="string"&&(x=uN(g,p,`${n}${f==="default"?"":ki(f)}`,f)),d===!1?x:{[d]:x}})}return function n(o){const{sx:r,theme:a={},nested:s}=o||{};if(!r)return null;const c=a.unstable_sxConfig??lU;function d(u){let p=u;if(typeof u=="function")p=u(a);else if(typeof u!="object")return u;if(!p)return null;const h=function(x={}){return x.keys?.reduce((y,b)=>(y[x.up(b)]={},y),{})||{}}(a.breakpoints),g=Object.keys(h);let f=h;return Object.keys(p).forEach(x=>{const y=function(b,w){return typeof b=="function"?b(w):b}(p[x],a);if(y!=null)if(typeof y=="object")if(c[x])f=EI(f,e(x,y,a,c));else{const b=G5({theme:a},y,w=>({[x]:w}));(function(...w){const C=w.reduce((S,A)=>S.concat(Object.keys(A)),[]),v=new Set(C);return w.every(S=>v.size===Object.keys(S).length)})(b,y)?f[x]=n({sx:y,theme:a,nested:!0}):f=EI(f,b)}else f=EI(f,e(x,y,a,c))}),!s&&a.modularCssLayers?{"@layer sx":k3e(a,$3e(g,f))}:k3e(a,$3e(g,f))}return Array.isArray(r)?r.map(d):d(r)}}();function HTt(e,n){const o=this;if(o.vars){if(!o.colorSchemes?.[e]||typeof o.getColorSchemeSelector!="function")return{};let r=o.getColorSchemeSelector(e);return r==="&"?n:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:n})}return o.palette.mode===e?n:{}}function tue(e={},...n){const{breakpoints:o={},palette:r={},spacing:a,shape:s={},...c}=e;let d=g1({breakpoints:bTt(o),direction:"ltr",components:{},palette:{mode:"light",...r},spacing:Mrt(a),shape:{...wTt,...s}},c);return d=function(u){const p=(x,y)=>x.replace("@media",y?`@container ${y}`:"@container");function h(x,y){x.up=(...b)=>p(u.breakpoints.up(...b),y),x.down=(...b)=>p(u.breakpoints.down(...b),y),x.between=(...b)=>p(u.breakpoints.between(...b),y),x.only=(...b)=>p(u.breakpoints.only(...b),y),x.not=(...b)=>{const w=p(u.breakpoints.not(...b),y);return w.includes("not all and")?w.replace("not all and ","").replace("min-width:","width<").replace("max-width:","width>").replace("and","or"):w}}const g={},f=x=>(h(g,x),g);return h(f),{...u,containerQueries:f}}(d),d.applyStyles=HTt,d=n.reduce((u,p)=>g1(u,p),d),d.unstable_sxConfig={...lU,...c?.unstable_sxConfig},d.unstable_sx=function(u){return tb({sx:u,theme:this})},d}function $ae(e=null){const n=m.useContext(hrt);return!n||function(o){return Object.keys(o).length===0}(n)?e:n}tb.filterProps=["sx"];const UTt=tue();function zrt(e=UTt){return $ae(e)}function E3e(e){const n=d6(e);return e!==n&&n.styles?(n.styles.match(/^@layer\s+[^{]*$/)||(n.styles=`@layer global{${n.styles}}`),n):e}function Frt({styles:e,themeId:n,defaultTheme:o={}}){const r=zrt(o),a=n&&r[n]||r;let s=typeof e=="function"?e(a):e;return a.modularCssLayers&&(s=Array.isArray(s)?s.map(c=>E3e(typeof c=="function"?c(a):c)):E3e(s)),t.jsx(Irt,{styles:s})}const I3e=e=>e,WTt=(()=>{let e=I3e;return{configure(n){e=n},generate:n=>e(n),reset(){e=I3e}}})();function Ort(e){var n,o,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var a=e.length;for(n=0;n<a;n++)e[n]&&(o=Ort(e[n]))&&(r&&(r+=" "),r+=o)}else for(o in e)e[o]&&(r&&(r+=" "),r+=o);return r}function Ii(){for(var e,n,o=0,r="",a=arguments.length;o<a;o++)(e=arguments[o])&&(n=Ort(e))&&(r&&(r+=" "),r+=n);return r}const QTt={active:"active",checked:"checked",completed:"completed",disabled:"disabled",error:"error",expanded:"expanded",focused:"focused",focusVisible:"focusVisible",open:"open",readOnly:"readOnly",required:"required",selected:"selected"};function oa(e,n,o="Mui"){const r=QTt[n];return r?`${o}-${r}`:`${WTt.generate(e)}-${n}`}function Fr(e,n,o="Mui"){const r={};return n.forEach(a=>{r[a]=oa(e,a,o)}),r}function Rrt(e){const{variants:n,...o}=e,r={variants:n,style:d6(o),isProcessed:!0};return r.style===o||n&&n.forEach(a=>{typeof a.style!="function"&&(a.style=d6(a.style))}),r}const GTt=tue();function FY(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function oy(e,n){return n&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${n}{${String(e.styles)}}`),e}function YTt(e){return e?(n,o)=>o[e]:null}function GO(e,n,o){const r=typeof n=="function"?n(e):n;if(Array.isArray(r))return r.flatMap(a=>GO(e,a,o));if(Array.isArray(r?.variants)){let a;if(r.isProcessed)a=o?oy(r.style,o):r.style;else{const{variants:s,...c}=r;a=o?oy(d6(c),o):c}return Nrt(e,r.variants,[a],o)}return r?.isProcessed?o?oy(d6(r.style),o):r.style:o?oy(d6(r),o):r}function Nrt(e,n,o=[],r=void 0){let a;e:for(let s=0;s<n.length;s+=1){const c=n[s];if(typeof c.props=="function"){if(a??={...e,...e.ownerState,ownerState:e.ownerState},!c.props(a))continue}else for(const d in c.props)if(e[d]!==c.props[d]&&e.ownerState?.[d]!==c.props[d])continue e;typeof c.style=="function"?(a??={...e,...e.ownerState,ownerState:e.ownerState},o.push(r?oy(d6(c.style(a)),r):c.style(a))):o.push(r?oy(d6(c.style),r):c.style)}return o}function qTt(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function jae(e,n,o=!1){const r={...n};for(const a in e)if(Object.prototype.hasOwnProperty.call(e,a)){const s=a;if(s==="components"||s==="slots")r[s]={...e[s],...r[s]};else if(s==="componentsProps"||s==="slotProps"){const c=e[s],d=n[s];if(d)if(c){r[s]={...d};for(const u in c)if(Object.prototype.hasOwnProperty.call(c,u)){const p=u;r[s][p]=jae(c[p],d[p],o)}}else r[s]=d;else r[s]=c||{}}else s==="className"&&o&&n.className?r.className=Ii(e?.className,n?.className):s==="style"&&o&&n.style?r.style={...e?.style,...n?.style}:r[s]===void 0&&(r[s]=e[s])}return r}const yh=typeof window<"u"?m.useLayoutEffect:m.useEffect;function nue(e,n=0,o=1){return function(r,a=Number.MIN_SAFE_INTEGER,s=Number.MAX_SAFE_INTEGER){return Math.max(a,Math.min(r,s))}(e,n,o)}function j6(e){if(e.type)return e;if(e.charAt(0)==="#")return j6(function(s){s=s.slice(1);const c=new RegExp(`.{1,${s.length>=6?2:1}}`,"g");let d=s.match(c);return d&&d[0].length===1&&(d=d.map(u=>u+u)),d?`rgb${d.length===4?"a":""}(${d.map((u,p)=>p<3?parseInt(u,16):Math.round(parseInt(u,16)/255*1e3)/1e3).join(", ")})`:""}(e));const n=e.indexOf("("),o=e.substring(0,n);if(!["rgb","rgba","hsl","hsla","color"].includes(o))throw new Error(Q5(9,e));let r,a=e.substring(n+1,e.length-1);if(o==="color"){if(a=a.split(" "),r=a.shift(),a.length===4&&a[3].charAt(0)==="/"&&(a[3]=a[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(r))throw new Error(Q5(10,r))}else a=a.split(",");return a=a.map(s=>parseFloat(s)),{type:o,values:a,colorSpace:r}}const QE=(e,n)=>{try{return(o=>{const r=j6(o);return r.values.slice(0,3).map((a,s)=>r.type.includes("hsl")&&s!==0?`${a}%`:a).join(" ")})(e)}catch{return e}};function sU(e){const{type:n,colorSpace:o}=e;let{values:r}=e;return n.includes("rgb")?r=r.map((a,s)=>s<3?parseInt(a,10):a):n.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=n.includes("color")?`${o} ${r.join(" ")}`:`${r.join(", ")}`,`${n}(${r})`}function _rt(e){e=j6(e);const{values:n}=e,o=n[0],r=n[1]/100,a=n[2]/100,s=r*Math.min(a,1-a),c=(p,h=(p+o/30)%12)=>a-s*Math.max(Math.min(h-3,9-h,1),-1);let d="rgb";const u=[Math.round(255*c(0)),Math.round(255*c(8)),Math.round(255*c(4))];return e.type==="hsla"&&(d+="a",u.push(n[3])),sU({type:d,values:u})}function Eae(e){let n=(e=j6(e)).type==="hsl"||e.type==="hsla"?j6(_rt(e)).values:e.values;return n=n.map(o=>(e.type!=="color"&&(o/=255),o<=.03928?o/12.92:((o+.055)/1.055)**2.4)),Number((.2126*n[0]+.7152*n[1]+.0722*n[2]).toFixed(3))}function gN(e,n){return e=j6(e),n=nue(n),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${n}`:e.values[3]=n,sU(e)}function a9(e,n,o){try{return gN(e,n)}catch{return e}}function cU(e,n){if(e=j6(e),n=nue(n),e.type.includes("hsl"))e.values[2]*=1-n;else if(e.type.includes("rgb")||e.type.includes("color"))for(let o=0;o<3;o+=1)e.values[o]*=1-n;return sU(e)}function ha(e,n,o){try{return cU(e,n)}catch{return e}}function dU(e,n){if(e=j6(e),n=nue(n),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*n;else if(e.type.includes("rgb"))for(let o=0;o<3;o+=1)e.values[o]+=(255-e.values[o])*n;else if(e.type.includes("color"))for(let o=0;o<3;o+=1)e.values[o]+=(1-e.values[o])*n;return sU(e)}function ma(e,n,o){try{return dU(e,n)}catch{return e}}function gP(e,n,o){try{return function(r,a=.15){return Eae(r)>.5?cU(r,a):dU(r,a)}(e,n)}catch{return e}}const Vrt=m.createContext(null);function oue(){return m.useContext(Vrt)}const KTt=typeof Symbol=="function"&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function ZTt(e){const{children:n,theme:o}=e,r=oue(),a=m.useMemo(()=>{const s=r===null?{...o}:function(c,d){return typeof d=="function"?d(c):{...c,...d}}(r,o);return s!=null&&(s[KTt]=r!==null),s},[o,r]);return t.jsx(Vrt.Provider,{value:a,children:n})}const Hrt=m.createContext();function JTt({value:e,...n}){return t.jsx(Hrt.Provider,{value:e??!0,...n})}const uU=()=>m.useContext(Hrt)??!1,Urt=m.createContext(void 0);function XTt({value:e,children:n}){return t.jsx(Urt.Provider,{value:e,children:n})}function eDt({props:e,name:n}){return function(o){const{theme:r,name:a,props:s}=o;if(!r||!r.components||!r.components[a])return s;const c=r.components[a];return c.defaultProps?jae(c.defaultProps,s,r.components.mergeClassNameAndStyle):c.styleOverrides||c.variants?s:jae(c,s,r.components.mergeClassNameAndStyle)}({props:e,name:n,theme:{components:m.useContext(Urt)}})}let L3e=0;const T3e={...F$t}.useId;function pU(e){if(T3e!==void 0){const n=T3e();return e??n}return function(n){const[o,r]=m.useState(n),a=n||o;return m.useEffect(()=>{o==null&&(L3e+=1,r(`mui-${L3e}`))},[o]),a}(e)}const D3e={};function P3e(e,n,o,r=!1){return m.useMemo(()=>{const a=e&&n[e]||n;if(typeof o=="function"){const s=o(a),c=e?{...n,[e]:s}:s;return r?()=>c:c}return e?{...n,[e]:o}:{...n,...o}},[e,n,o,r])}function Wrt(e){const{children:n,theme:o,themeId:r}=e,a=$ae(D3e),s=oue()||D3e,c=P3e(r,a,o),d=P3e(r,s,o,!0),u=(r?c[r]:c).direction==="rtl",p=function(h){const g=$ae(),f=pU()||"",{modularCssLayers:x}=h;let y="mui.global, mui.components, mui.theme, mui.custom, mui.sx";return y=x&&g===null?typeof x=="string"?x.replace(/mui(?!\.)/g,y):`@layer ${y};`:"",yh(()=>{const b=document.querySelector("head");if(!b)return;const w=b.firstChild;if(y){if(w&&w.hasAttribute?.("data-mui-layer-order")&&w.getAttribute("data-mui-layer-order")===f)return;const C=document.createElement("style");C.setAttribute("data-mui-layer-order",f),C.textContent=y,b.prepend(C)}else b.querySelector(`style[data-mui-layer-order="${f}"]`)?.remove()},[y,f]),y?t.jsx(Frt,{styles:y}):null}(c);return t.jsx(ZTt,{theme:d,children:t.jsx(hrt.Provider,{value:c,children:t.jsx(JTt,{value:u,children:t.jsxs(XTt,{value:r?c[r].components:c.components,children:[p,n]})})})})}const B3e={theme:void 0},Iae="mode",Lae="color-scheme",tDt="data-color-scheme";function nDt(){}const oDt=({key:e,storageWindow:n})=>(!n&&typeof window<"u"&&(n=window),{get(o){if(typeof window>"u")return;if(!n)return o;let r;try{r=n.localStorage.getItem(e)}catch{}return r||o},set:o=>{if(n)try{n.localStorage.setItem(e,o)}catch{}},subscribe:o=>{if(!n)return nDt;const r=a=>{const s=a.newValue;a.key===e&&o(s)};return n.addEventListener("storage",r),()=>{n.removeEventListener("storage",r)}}});function OY(){}function M3e(e){if(typeof window<"u"&&typeof window.matchMedia=="function"&&e==="system")return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function z3e(e,n){return e.mode==="light"||e.mode==="system"&&e.systemMode==="light"?n("light"):e.mode==="dark"||e.mode==="system"&&e.systemMode==="dark"?n("dark"):void 0}function iDt(e){const{defaultMode:n="light",defaultLightColorScheme:o,defaultDarkColorScheme:r,supportedColorSchemes:a=[],modeStorageKey:s=Iae,colorSchemeStorageKey:c=Lae,storageWindow:d=typeof window>"u"?void 0:window,storageManager:u=oDt,noSsr:p=!1}=e,h=a.join(","),g=a.length>1,f=m.useMemo(()=>u?.({key:s,storageWindow:d}),[u,s,d]),x=m.useMemo(()=>u?.({key:`${c}-light`,storageWindow:d}),[u,c,d]),y=m.useMemo(()=>u?.({key:`${c}-dark`,storageWindow:d}),[u,c,d]),[b,w]=m.useState(()=>{const L=f?.get(n)||n,I=x?.get(o)||o,B=y?.get(r)||r;return{mode:L,systemMode:M3e(L),lightColorScheme:I,darkColorScheme:B}}),[C,v]=m.useState(p||!g);m.useEffect(()=>{v(!0)},[]);const S=function(L){return z3e(L,I=>I==="light"?L.lightColorScheme:I==="dark"?L.darkColorScheme:void 0)}(b),A=m.useCallback(L=>{w(I=>{if(L===I.mode)return I;const B=L??n;return f?.set(B),{...I,mode:B,systemMode:M3e(B)}})},[f,n]),j=m.useCallback(L=>{L?typeof L=="string"?L&&!h.includes(L)?console.error(`\`${L}\` does not exist in \`theme.colorSchemes\`.`):w(I=>{const B={...I};return z3e(I,D=>{D==="light"&&(x?.set(L),B.lightColorScheme=L),D==="dark"&&(y?.set(L),B.darkColorScheme=L)}),B}):w(I=>{const B={...I},D=L.light===null?o:L.light,z=L.dark===null?r:L.dark;return D&&(h.includes(D)?(B.lightColorScheme=D,x?.set(D)):console.error(`\`${D}\` does not exist in \`theme.colorSchemes\`.`)),z&&(h.includes(z)?(B.darkColorScheme=z,y?.set(z)):console.error(`\`${z}\` does not exist in \`theme.colorSchemes\`.`)),B}):w(I=>(x?.set(o),y?.set(r),{...I,lightColorScheme:o,darkColorScheme:r}))},[h,x,y,o,r]),$=m.useCallback(L=>{b.mode==="system"&&w(I=>{const B=L?.matches?"dark":"light";return I.systemMode===B?I:{...I,systemMode:B}})},[b.mode]),E=m.useRef($);return E.current=$,m.useEffect(()=>{if(typeof window.matchMedia!="function"||!g)return;const L=(...B)=>E.current(...B),I=window.matchMedia("(prefers-color-scheme: dark)");return I.addListener(L),L(I),()=>{I.removeListener(L)}},[g]),m.useEffect(()=>{if(g){const L=f?.subscribe(D=>{(!D||["light","dark","system"].includes(D))&&A(D||n)})||OY,I=x?.subscribe(D=>{(!D||h.match(D))&&j({light:D})})||OY,B=y?.subscribe(D=>{(!D||h.match(D))&&j({dark:D})})||OY;return()=>{L(),I(),B()}}},[j,A,h,n,d,g,f,x,y]),{...b,mode:C?b.mode:void 0,systemMode:C?b.systemMode:void 0,colorScheme:C?S:void 0,setMode:A,setColorScheme:j}}function rDt(e=""){function n(...o){if(!o.length)return"";const r=o[0];return typeof r!="string"||r.match(/(#|\(|\)|(-?(\d*\.)?\d+)(px|em|%|ex|ch|rem|vw|vh|vmin|vmax|cm|mm|in|pt|pc))|^(-?(\d*\.)?\d+)$|(\d+ \d+ \d+)/)?`, ${r}`:`, var(--${e?`${e}-`:""}${r}${n(...o.slice(1))})`}return(o,...r)=>`var(--${e?`${e}-`:""}${o}${n(...r)})`}const F3e=(e,n,o,r=[])=>{let a=e;n.forEach((s,c)=>{c===n.length-1?Array.isArray(a)?a[Number(s)]=o:a&&typeof a=="object"&&(a[s]=o):a&&typeof a=="object"&&(a[s]||(a[s]=r.includes(s)?[]:{}),a=a[s])})};function RY(e,n){const{prefix:o,shouldSkipGeneratingVar:r}=n||{},a={},s={},c={};return((d,u,p)=>{(function h(g,f=[],x=[]){Object.entries(g).forEach(([y,b])=>{(!p||p&&!p([...f,y]))&&b!=null&&(typeof b=="object"&&Object.keys(b).length>0?h(b,[...f,y],Array.isArray(b)?[...x,y]:x):u([...f,y],b,x))})})(d)})(e,(d,u,p)=>{if(!(typeof u!="string"&&typeof u!="number"||r&&r(d,u))){const h=`--${o?`${o}-`:""}${d.join("-")}`,g=((f,x)=>typeof x=="number"?["lineHeight","fontWeight","opacity","zIndex"].some(y=>f.includes(y))||f[f.length-1].toLowerCase().includes("opacity")?x:`${x}px`:x)(d,u);Object.assign(a,{[h]:g}),F3e(s,d,`var(${h})`,p),F3e(c,d,`var(${h}, ${g})`,p)}},d=>d[0]==="vars"),{css:a,vars:s,varsWithDefaults:c}}function ia(e,n,o=void 0){const r={};for(const a in e){const s=e[a];let c="",d=!0;for(let u=0;u<s.length;u+=1){const p=s[u];p&&(c+=(d===!0?"":" ")+n(p),d=!1,o&&o[p]&&(c+=" "+o[p]))}r[a]=c}return r}function NY(e,n){return m.isValidElement(e)&&n.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}const IL={black:"#000",white:"#fff"},aDt={50:"#fafafa",100:"#f5f5f5",200:"#eeeeee",300:"#e0e0e0",400:"#bdbdbd",500:"#9e9e9e",600:"#757575",700:"#616161",800:"#424242",900:"#212121",A100:"#f5f5f5",A200:"#eeeeee",A400:"#bdbdbd",A700:"#616161"},lDt="#f3e5f5",sDt="#ce93d8",cDt="#ba68c8",dDt="#ab47bc",uDt="#9c27b0",pDt="#7b1fa2",hDt="#e57373",mDt="#ef5350",gDt="#f44336",O3e="#d32f2f",fDt="#c62828",xDt="#ffb74d",yDt="#ffa726",bDt="#ff9800",wDt="#f57c00",CDt="#e65100",vDt="#e3f2fd",SDt="#90caf9",R3e="#42a5f5",kDt="#1976d2",ADt="#1565c0",$Dt="#4fc3f7",jDt="#29b6f6",EDt="#03a9f4",N3e="#0288d1",IDt="#01579b",LDt="#81c784",TDt="#66bb6a",DDt="#4caf50",PDt="#388e3c",BDt="#2e7d32",MDt="#1b5e20";function Qrt(){return{text:{primary:"rgba(0, 0, 0, 0.87)",secondary:"rgba(0, 0, 0, 0.6)",disabled:"rgba(0, 0, 0, 0.38)"},divider:"rgba(0, 0, 0, 0.12)",background:{paper:IL.white,default:IL.white},action:{active:"rgba(0, 0, 0, 0.54)",hover:"rgba(0, 0, 0, 0.04)",hoverOpacity:.04,selected:"rgba(0, 0, 0, 0.08)",selectedOpacity:.08,disabled:"rgba(0, 0, 0, 0.26)",disabledBackground:"rgba(0, 0, 0, 0.12)",disabledOpacity:.38,focus:"rgba(0, 0, 0, 0.12)",focusOpacity:.12,activatedOpacity:.12}}}const Grt=Qrt();function Yrt(){return{text:{primary:IL.white,secondary:"rgba(255, 255, 255, 0.7)",disabled:"rgba(255, 255, 255, 0.5)",icon:"rgba(255, 255, 255, 0.5)"},divider:"rgba(255, 255, 255, 0.12)",background:{paper:"#121212",default:"#121212"},action:{active:IL.white,hover:"rgba(255, 255, 255, 0.08)",hoverOpacity:.08,selected:"rgba(255, 255, 255, 0.16)",selectedOpacity:.16,disabled:"rgba(255, 255, 255, 0.3)",disabledBackground:"rgba(255, 255, 255, 0.12)",disabledOpacity:.38,focus:"rgba(255, 255, 255, 0.12)",focusOpacity:.12,activatedOpacity:.24}}}const Tae=Yrt();function _3e(e,n,o,r){const a=r.light||r,s=r.dark||1.5*r;e[n]||(e.hasOwnProperty(o)?e[n]=e[o]:n==="light"?e.light=dU(e.main,a):n==="dark"&&(e.dark=cU(e.main,s)))}function V3e(e,n,o,r,a){const s=a.light||a,c=a.dark||1.5*a;n[o]||(n.hasOwnProperty(r)?n[o]=n[r]:o==="light"?n.light=`color-mix(in ${e}, ${n.main}, #fff ${(100*s).toFixed(0)}%)`:o==="dark"&&(n.dark=`color-mix(in ${e}, ${n.main}, #000 ${(100*c).toFixed(0)}%)`))}function iue(e){const{mode:n="light",contrastThreshold:o=3,tonalOffset:r=.2,colorSpace:a,...s}=e,c=e.primary||function(b="light"){return b==="dark"?{main:SDt,light:vDt,dark:R3e}:{main:kDt,light:R3e,dark:ADt}}(n),d=e.secondary||function(b="light"){return b==="dark"?{main:sDt,light:lDt,dark:dDt}:{main:uDt,light:cDt,dark:pDt}}(n),u=e.error||function(b="light"){return b==="dark"?{main:gDt,light:hDt,dark:O3e}:{main:O3e,light:mDt,dark:fDt}}(n),p=e.info||function(b="light"){return b==="dark"?{main:jDt,light:$Dt,dark:N3e}:{main:N3e,light:EDt,dark:IDt}}(n),h=e.success||function(b="light"){return b==="dark"?{main:TDt,light:LDt,dark:PDt}:{main:BDt,light:DDt,dark:MDt}}(n),g=e.warning||function(b="light"){return b==="dark"?{main:yDt,light:xDt,dark:wDt}:{main:"#ed6c02",light:bDt,dark:CDt}}(n);function f(b){return a?function(C){return`oklch(from ${C} var(--__l) 0 h / var(--__a))`}(b):function(C,v){const S=Eae(C),A=Eae(v);return(Math.max(S,A)+.05)/(Math.min(S,A)+.05)}(b,Tae.text.primary)>=o?Tae.text.primary:Grt.text.primary}const x=({color:b,name:w,mainShade:C=500,lightShade:v=300,darkShade:S=700})=>{if(!(b={...b}).main&&b[C]&&(b.main=b[C]),!b.hasOwnProperty("main"))throw new Error(Q5(11,w?` (${w})`:"",C));if(typeof b.main!="string")throw new Error(Q5(12,w?` (${w})`:"",JSON.stringify(b.main)));return a?(V3e(a,b,"light",v,r),V3e(a,b,"dark",S,r)):(_3e(b,"light",v,r),_3e(b,"dark",S,r)),b.contrastText||(b.contrastText=f(b.main)),b};let y;return n==="light"?y=Qrt():n==="dark"&&(y=Yrt()),g1({common:{...IL},mode:n,primary:x({color:c,name:"primary"}),secondary:x({color:d,name:"secondary",mainShade:"A400",lightShade:"A200",darkShade:"A700"}),error:x({color:u,name:"error"}),warning:x({color:g,name:"warning"}),info:x({color:p,name:"info"}),success:x({color:h,name:"success"}),grey:aDt,contrastThreshold:o,getContrastText:f,augmentColor:x,tonalOffset:r,...y},s)}function zDt(e){const n={};return Object.entries(e).forEach(o=>{const[r,a]=o;typeof a=="object"&&(n[r]=`${a.fontStyle?`${a.fontStyle} `:""}${a.fontVariant?`${a.fontVariant} `:""}${a.fontWeight?`${a.fontWeight} `:""}${a.fontStretch?`${a.fontStretch} `:""}${a.fontSize||""}${a.lineHeight?`/${a.lineHeight} `:""}${a.fontFamily||""}`)}),n}function FDt(e,n){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...n}}function ODt(e){return Math.round(1e5*e)/1e5}const H3e={textTransform:"uppercase"},U3e='"Roboto", "Helvetica", "Arial", sans-serif';function qrt(e,n){const{fontFamily:o=U3e,fontSize:r=14,fontWeightLight:a=300,fontWeightRegular:s=400,fontWeightMedium:c=500,fontWeightBold:d=700,htmlFontSize:u=16,allVariants:p,pxToRem:h,...g}=typeof n=="function"?n(e):n,f=r/14,x=h||(w=>w/u*f+"rem"),y=(w,C,v,S,A)=>({fontFamily:o,fontWeight:w,fontSize:x(C),lineHeight:v,...o===U3e?{letterSpacing:`${ODt(S/C)}em`}:{},...A,...p}),b={h1:y(a,96,1.167,-1.5),h2:y(a,60,1.2,-.5),h3:y(s,48,1.167,0),h4:y(s,34,1.235,.25),h5:y(s,24,1.334,0),h6:y(c,20,1.6,.15),subtitle1:y(s,16,1.75,.15),subtitle2:y(c,14,1.57,.1),body1:y(s,16,1.5,.15),body2:y(s,14,1.43,.15),button:y(c,14,1.75,.4,H3e),caption:y(s,12,1.66,.4),overline:y(s,12,2.66,1,H3e),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return g1({htmlFontSize:u,pxToRem:x,fontFamily:o,fontSize:r,fontWeightLight:a,fontWeightRegular:s,fontWeightMedium:c,fontWeightBold:d,...b},g,{clone:!1})}function wl(...e){return[`${e[0]}px ${e[1]}px ${e[2]}px ${e[3]}px rgba(0,0,0,0.2)`,`${e[4]}px ${e[5]}px ${e[6]}px ${e[7]}px rgba(0,0,0,0.14)`,`${e[8]}px ${e[9]}px ${e[10]}px ${e[11]}px rgba(0,0,0,0.12)`].join(",")}const RDt=["none",wl(0,2,1,-1,0,1,1,0,0,1,3,0),wl(0,3,1,-2,0,2,2,0,0,1,5,0),wl(0,3,3,-2,0,3,4,0,0,1,8,0),wl(0,2,4,-1,0,4,5,0,0,1,10,0),wl(0,3,5,-1,0,5,8,0,0,1,14,0),wl(0,3,5,-1,0,6,10,0,0,1,18,0),wl(0,4,5,-2,0,7,10,1,0,2,16,1),wl(0,5,5,-3,0,8,10,1,0,3,14,2),wl(0,5,6,-3,0,9,12,1,0,3,16,2),wl(0,6,6,-3,0,10,14,1,0,4,18,3),wl(0,6,7,-4,0,11,15,1,0,4,20,3),wl(0,7,8,-4,0,12,17,2,0,5,22,4),wl(0,7,8,-4,0,13,19,2,0,5,24,4),wl(0,7,9,-4,0,14,21,2,0,5,26,4),wl(0,8,9,-5,0,15,22,2,0,6,28,5),wl(0,8,10,-5,0,16,24,2,0,6,30,5),wl(0,8,11,-5,0,17,26,2,0,6,32,5),wl(0,9,11,-5,0,18,28,2,0,7,34,6),wl(0,9,12,-6,0,19,29,2,0,7,36,6),wl(0,10,13,-6,0,20,31,3,0,8,38,7),wl(0,10,13,-6,0,21,33,3,0,8,40,7),wl(0,10,14,-6,0,22,35,3,0,8,42,7),wl(0,11,14,-7,0,23,36,3,0,9,44,8),wl(0,11,15,-7,0,24,38,3,0,9,46,8)],NDt={easeInOut:"cubic-bezier(0.4, 0, 0.2, 1)",easeOut:"cubic-bezier(0.0, 0, 0.2, 1)",easeIn:"cubic-bezier(0.4, 0, 1, 1)",sharp:"cubic-bezier(0.4, 0, 0.6, 1)"},Krt={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function W3e(e){return`${Math.round(e)}ms`}function _Dt(e){if(!e)return 0;const n=e/36;return Math.min(Math.round(10*(4+15*n**.25+n/5)),3e3)}function VDt(e){const n={...NDt,...e.easing},o={...Krt,...e.duration};return{getAutoHeightDuration:_Dt,create:(r=["all"],a={})=>{const{duration:s=o.standard,easing:c=n.easeInOut,delay:d=0,...u}=a;return(Array.isArray(r)?r:[r]).map(p=>`${p} ${typeof s=="string"?s:W3e(s)} ${c} ${typeof d=="string"?d:W3e(d)}`).join(",")},...e,easing:n,duration:o}}const HDt={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function UDt(e){return f5(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Zrt(e={}){const n={...e};return function o(r){const a=Object.entries(r);for(let s=0;s<a.length;s++){const[c,d]=a[s];!UDt(d)||c.startsWith("unstable_")?delete r[c]:f5(d)&&(r[c]={...d},o(r[c]))}}(n),`import { unstable_createBreakpoints as createBreakpoints, createTransitions } from '@mui/material/styles';
3
3
 
4
4
  const theme = ${JSON.stringify(n,null,2)};
5
5
 
@@ -80889,7 +80889,7 @@ ${Wa.beneficiaryAddress} ${X}`,d(ye),I(!0)})(o),"data-testid":Y("title-text-copy
80889
80889
  padding: ${i.sp3} ${i.sp0};
80890
80890
  `,Pot=l(Lt)`
80891
80891
  min-width: 140px;
80892
- `,SL=cit(ULt()),TQr=["sandbox","production"],DQr=["development","staging","production"],sk=()=>Oc==="DEV"||Oc==="QA"||Oc==="PUNE"||Oc==="SUNNYVALE"||Oc==="DELHI"||Oc==="MOHALI",rge="https://zeni-webapp-dev.uc.r.appspot.com",Oc=i4("DEV",["DEV","QA","PUNE","SUNNYVALE","DELHI","MOHALI","PROD","NEXT"]),bJr=(e=>i4(e,TQr))((e=>{switch(e){case"DEV":case"QA":case"PUNE":case"SUNNYVALE":case"DELHI":case"MOHALI":default:return"sandbox";case"PROD":case"NEXT":return"production"}})(Oc)),Bot=(e=>i4(e,DQr))((e=>{switch(e){case"QA":case"PUNE":case"SUNNYVALE":case"DELHI":case"MOHALI":return"staging";case"PROD":case"NEXT":return"production";default:return"development"}})(Oc)),age=Oc==="DEV"||Oc==="QA"?.2:.8,OAt=age,Ga={sentryDsn:"",sentryTraceSamplingRate:age,sentryProfileSamplingRate:OAt,webV2MicroServiceEndpoint:"",googleClientId:"",googleMapsAPIKey:"",microsoftClientId:"",mixpanelToken:"",pusherClientSecret:"",pusherCluster:"",currentQBOEnv:"",quickbooksKey:"",appUrl:"",currentFeatureEnv:"",featureClientSecret:"",cardVaultId:"",stripeKey:"",qboRedirectionUrl:"",mixpanelUrl:"",mixpanelHMUrl:""};let tA,LT;function PQr(e){Ga.sentryDsn=e.keys.SENTRY_DSN,Ga.sentryTraceSamplingRate=e.keys.SENTRY_TRACE_SAMPLE_RATES!=null?parseInt(e.keys.SENTRY_TRACE_SAMPLE_RATES):age,Ga.sentryProfileSamplingRate=e.keys.SENTRY_PROFILES_SAMPLE_RATES!=null?parseInt(e.keys.SENTRY_PROFILES_SAMPLE_RATES):OAt,Ga.googleClientId=e.keys.GOOGLE_CLIENT_ID,Ga.googleMapsAPIKey=e.keys.GOOGLE_MAP_KEY,Ga.microsoftClientId=e.keys.MICROSOFT_CLIENT_ID,Ga.mixpanelToken=e.keys.MIXPANEL_TOKEN,Ga.pusherClientSecret=e.keys.PUSHER_CLIENT_SECRET,Ga.pusherCluster=e.keys.PUSHER_CLUSTER,Ga.quickbooksKey=e.keys.QUICKBOOK_TOKEN,Ga.appUrl=e.keys.WEB_ENDPOINT,Ga.featureClientSecret=e.keys.STATSIG_CLIENT_SECRET,Ga.cardVaultId=e.keys.UNIT_VAULT_ID,Ga.stripeKey=e.keys.STRIPE_KEY,Ga.qboRedirectionUrl=e.keys.QBO_URL,Ga.mixpanelUrl=e.keys.MIXPANEL_URL,Ga.mixpanelHMUrl=e.keys.MIXPANEL_HM_URL,LT=e.externalEndPoints,tA=e.apiEndPoints,function(n,o){const r=new Set,a=[...Object.values(n),...Object.values(o)];for(const s of a)if(typeof s=="string"&&s.length>0)try{r.add(new URL(s).origin)}catch{}for(const s of r){if(document.querySelector(`link[rel="preconnect"][href="${s}"]`)!=null)continue;const c=document.createElement("link");c.rel="preconnect",c.href=s,document.head.appendChild(c)}}(tA,LT)}let Mot=!1;function qv(){Mot||(l0.init("63d3a2406505a5737a2b4debdb513f20",{api_host:LT.mixpanelBaseUrl,ignore_dnt:!0,store_google:!1,track_marketing:!1}),Mot=!0)}const BQr=new Set(Array.from(go.EVENTS_WITHOUT_SUPER_PROPERTIES));let zot=!1,Fot=!1;function C1e(){if(zot)return;zot=!0,qv();const e=go.extractUtmParamsFromUrl();Object.keys(e).length>0&&l0.register(e),sk()&&console.log(`[UTM] first-touch bootstrap: ${JSON.stringify(e)}`)}const MQr=new Set(["dclid","fbclid","gclid","ko_click_id","li_fat_id","msclkid","sccid","ttclid","twclid","wbraid"]);function zQr(){const e=function(){return l0?.persistence?.props??null}();if(e==null)return;const n=Object.keys(e).filter(o=>o.startsWith("utm_")||MQr.has(o));for(const o of n)l0.unregister(o);sk()&&n.length>0&&console.log(`[UTM] cleared from cookie: ${JSON.stringify(n)}`)}function Oot(){Fot||(Fot=!0,zQr())}class $S{identify(n,o){if(qv(),this.#t=n,n!=null&&o!=null&&($S.#e==null||!nIt({userId:n,traits:o},$S.#e))){const{$email:r,...a}={...o};l0.identify(n),r&&r!=null&&l0.people.set_once({$email:r}),l0.people.set(a),$S.#e={userId:n,traits:o},sk()&&console.log(`*** Called people set with userId ${n} traits ${JSON.stringify(o)} `)}}identifyUserAndCompany(n,o,r,a,s){throw Error("Use identify in the web-app!!")}track(n,o){qv();const r=BQr.has(n);if(this.#t!=null||r){if(C1e(),this.#t!=null){const a={distinct_id:this.#t,...o};l0.track(n,a)}else l0.track(n,o);if(Oot(),sk()){const a=this.#t!=null?`*** firing ${n} with props ${JSON.stringify(o)}`:`*** firing ${n} (unidentified user, in allowlist) with props ${JSON.stringify(o)}`;console.log(a)}}else console.error("Either User is not identified :( or this event is not in allowlist, so can not fire event.")}trackWithoutUserId(n,o){qv(),C1e(),l0.track(n,o),Oot(),sk()&&console.log(`*** firing ${n} (unidentified user) with props ${JSON.stringify(o)}`)}alias(n,o){qv(),l0.alias(n,o)}reset(){qv(),l0.identify(void 0),this.#t=void 0,$S.#e=void 0}static#e;#t}const v1e=new $S,RAt=new go.Analytics(v1e);RAt.trackWithoutUserId=v1e.trackWithoutUserId.bind(v1e);const Ad=RAt,FQr="openAiCfoScope",S1e="openAiCfoScopeOnDashboard";function OQr(e){const{location:n,navigate:o,mergeState:r}=e;o({pathname:n.pathname,search:n.search,hash:n.hash},{replace:!0,state:{...n.state,[S1e]:!0,...r}})}function wJr(e){const n=MT(e);if(n.createSessionAndSubmitState.fetchState==="In-Progress")return!0;const o=n.uiState?.currentChatSessionId;return o!=null&&n.responseStateByChatSessionId?.[o]?.answer?.fetchState==="In-Progress"}function lge(e,n){const o=n!=null?e.find(d=>d.chatSession.chatSessionId===n):void 0,r=o?.questionAnswers??[],a=r[r.length-1],s=a?.responses.answer?.content?.summarizedTitle??"";return{currentChatSession:o?.chatSession,currentQuestionAnswer:a,currentQuestionAnswerSummary:s,currentChatSessionWithMessages:o,currentSessionQuestionAnswers:r}}function NAt(e,n){return(e||n?.chatSessionSummary)??null}const _At="ZENI_AI_CFO_UPLOAD_PROMO_SEEN",_H="zeni-ai-cfo-upload-promo-storage-changed",Oi=new class{_isZeniUserCache;getSignedInUser(){const e=window.localStorage.getItem(this.ZENI_SESSION_ID),n=window.localStorage.getItem(this.ZENI_SIGNED_IN_USER);return n!=null&&e!=null?JSON.parse(this.decrypt(n,e)):void 0}isZeniUser(){const e=window.localStorage.getItem(this.ZENI_SIGNED_IN_USER);if(this._isZeniUserCache!=null&&this._isZeniUserCache.encryptedUser===e)return this._isZeniUserCache.result;const n=this.getSignedInUser()?.userEmail?.toLowerCase().endsWith("@zeni.ai")===!0;return this._isZeniUserCache={encryptedUser:e,result:n},n}getShowNegativeAmountInParenthesis(){const e=window.localStorage.getItem(this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS),n=window.localStorage.getItem(this.ZENI_SESSION_ID);return e!=null&&n!=null?JSON.parse(this.decrypt(e,n)):!1}getShowNegativeAmountInParenthesisPDF(){const e=window.localStorage.getItem(this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF),n=window.localStorage.getItem(this.ZENI_SESSION_ID);return e!=null&&n!=null?JSON.parse(this.decrypt(e,n)):!0}getSignedInUserTenant(e){const n=window.localStorage.getItem(this.ZENI_SIGNED_IN_USER_TENANTS),o=window.localStorage.getItem(this.ZENI_SESSION_ID);if(n!=null&&o!=null)return JSON.parse(this.decrypt(n,o)).find(r=>r.tenantEmailDomain===e)}getSignedInUserTenantWithId(e){const n=window.localStorage.getItem(this.ZENI_SIGNED_IN_USER_TENANTS),o=window.localStorage.getItem(this.ZENI_SESSION_ID);if(n!=null&&o!=null)return JSON.parse(this.decrypt(n,o)).find(r=>r.tenantId===e)}getActiveTenantForUser(){const e=window.localStorage.getItem(this.ZENI_SESSION_ID),n=window.localStorage.getItem(this.ZENI_ACTIVE_TENANT_DOMAIN);if(!(n==null||e==null)){const o=this.decrypt(n,e),r=window.localStorage.getItem(this.ZENI_SIGNED_IN_USER_TENANTS);if(r!=null)return JSON.parse(this.decrypt(r,e)).find(a=>a.tenantEmailDomain===o)}}getForceRefreshedComponents(){const e=window.localStorage.getItem(this.ZENI_SESSION_ID),n=window.localStorage.getItem(this.ZENI_FORCE_REFRESHED_COMPONENTS);if(n&&e!=null){const o=this.decrypt(n,e);return o?JSON.parse(o):[]}return[]}saveForceRefreshedComponents(e){const n=window.localStorage.getItem(this.ZENI_SESSION_ID);n!=null?window.localStorage.setItem(this.ZENI_FORCE_REFRESHED_COMPONENTS,this.encrypt(JSON.stringify(e),n)):console.warn("Can't update the force refreshed components when the user is logged out!")}saveActiveTenantDomainForUser(e){const n=window.localStorage.getItem(this.ZENI_SESSION_ID);n!=null?window.localStorage.setItem(this.ZENI_ACTIVE_TENANT_DOMAIN,this.encrypt(e,n)):console.warn("Can't update the active tenant domain when the user is logged out!")}saveSignedInUserWithSession(e,n){if(e==null||n==null)throw new Error("Can't accept nil for user or session Id");window.localStorage.setItem(this.ZENI_SESSION_ID,n),window.localStorage.setItem(this.ZENI_SIGNED_IN_USER,this.encrypt(JSON.stringify(e),n))}saveSignedInUserTenants(e,n){const o=n??window.localStorage.getItem(this.ZENI_SESSION_ID);o!=null?window.localStorage.setItem(this.ZENI_SIGNED_IN_USER_TENANTS,this.encrypt(JSON.stringify(e),o)):console.warn("Can't update the setting when the user is logged out!")}saveShowNegativeAmountInParenthesis(e){const n=window.localStorage.getItem(this.ZENI_SESSION_ID);if(n==null)throw new Error("Can't update the setting when the user is logged out!");window.localStorage.setItem(this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS,this.encrypt(JSON.stringify(e),n))}saveShowNegativeAmountInParenthesisPDF(e){const n=window.localStorage.getItem(this.ZENI_SESSION_ID);if(n==null)throw new Error("Can't update the setting when the user is logged out!");window.localStorage.setItem(this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF,this.encrypt(JSON.stringify(e),n))}isSignedIn(){return[this.ZENI_SESSION_ID,this.ZENI_SIGNED_IN_USER].map(e=>window.localStorage.getItem(e)!=null).reduce((e,n)=>e&&n)}clearAll(){const e=new Set([this.ZENI_MAGIC_LINK_EMAIL,this.ZENI_LAST_USED_MAGIC_LINK_TOKEN,this.ZENI_THEME]);this.ALL_IDs.filter(n=>!e.has(n)).forEach(n=>window.localStorage.removeItem(n)),Object.keys(window.localStorage).filter(n=>new RegExp(`^${this.ZENI_OTP_TOKEN}_card`).test(n)).forEach(n=>window.localStorage.removeItem(n)),Object.keys(window.localStorage).filter(n=>new RegExp(`^${this.ZENI_MAGIC_LINK_TRIGGERED}_`).test(n)).forEach(n=>window.localStorage.removeItem(n))}setTheme(e){window.localStorage.setItem(this.ZENI_THEME,e)}getTheme(){const e=window.localStorage.getItem(this.ZENI_THEME);if(e==="light"||e==="dark")return e;e!=null&&window.localStorage.removeItem(this.ZENI_THEME)}saveZeniOtpToken(e){const n=window.localStorage.getItem(this.ZENI_SESSION_ID);n!=null&&window.localStorage.setItem(this.ZENI_OTP_TOKEN,this.encrypt(JSON.stringify(e),n))}getZeniOtpToken(){const e=window.localStorage.getItem(this.ZENI_OTP_TOKEN),n=window.localStorage.getItem(this.ZENI_SESSION_ID);if(e!=null&&n!=null){let o=JSON.parse(this.decrypt(e,n));return o={...o,expiry:hn(o.expiry.toString())},o}}getTreasuryPopupSeen(e){const n=window.localStorage.getItem(this.ZENI_TREASURY_POPUP_SEEN);if(n!=null)try{return JSON.parse(n)[e]===!0}catch{return window.localStorage.removeItem(this.ZENI_TREASURY_POPUP_SEEN),!1}return!1}saveTreasuryPopupSeen(e,n){const o=window.localStorage.getItem(this.ZENI_TREASURY_POPUP_SEEN);let r={};if(o!=null)try{const a=JSON.parse(o);r=a!==null&&typeof a=="object"?a:{}}catch{r={}}r[e]=n,window.localStorage.setItem(this.ZENI_TREASURY_POPUP_SEEN,JSON.stringify(r))}getCardPolicyPopupSeen(e){const n=window.localStorage.getItem(this.ZENI_CARD_POLICY_POPUP_SEEN);if(n!=null)try{return JSON.parse(n)[e]===!0}catch{return window.localStorage.removeItem(this.ZENI_CARD_POLICY_POPUP_SEEN),!1}return!1}saveCardPolicyPopupSeen(e,n){const o=window.localStorage.getItem(this.ZENI_CARD_POLICY_POPUP_SEEN);let r={};if(o!=null)try{const a=JSON.parse(o);r=a!==null&&typeof a=="object"?a:{}}catch{r={}}r[e]=n,window.localStorage.setItem(this.ZENI_CARD_POLICY_POPUP_SEEN,JSON.stringify(r))}getAiCfoUploadPromoSeen(e){const n=window.localStorage.getItem(this.ZENI_AI_CFO_UPLOAD_PROMO_SEEN);if(n!=null)try{const o=JSON.parse(n);return o!==null&&typeof o=="object"&&o[e]===!0}catch{return window.localStorage.removeItem(this.ZENI_AI_CFO_UPLOAD_PROMO_SEEN),window.dispatchEvent(new CustomEvent(_H)),!1}return!1}saveAiCfoUploadPromoSeen(e,n){const o=window.localStorage.getItem(this.ZENI_AI_CFO_UPLOAD_PROMO_SEEN);let r={};if(o!=null)try{const a=JSON.parse(o);r=a!==null&&typeof a=="object"?a:{}}catch{r={}}r[e]=n,window.localStorage.setItem(this.ZENI_AI_CFO_UPLOAD_PROMO_SEEN,JSON.stringify(r)),window.dispatchEvent(new CustomEvent(_H))}savePayNowInfoTooltip(e,n){const o=n??window.localStorage.getItem(this.ZENI_SESSION_ID);o!=null&&window.localStorage.setItem(this.ZENI_PAY_NOW_INFO_TOOLTIP,this.encrypt(JSON.stringify(e),o))}getPayNowInfoTooltip(){const e=window.localStorage.getItem(this.ZENI_PAY_NOW_INFO_TOOLTIP),n=window.localStorage.getItem(this.ZENI_SESSION_ID);if(e!=null&&n!=null)try{const o=this.decrypt(e,n);return o===""||o==null?void 0:JSON.parse(o)}catch{return}}saveZeniOtpTokenForCardHolder(e,n){const o=window.localStorage.getItem(this.ZENI_SESSION_ID);o!=null&&window.localStorage.setItem(`${this.ZENI_OTP_TOKEN}_${n}`,this.encrypt(JSON.stringify(e),o))}getZeniOtpTokenForCardHolder(e){const n=window.localStorage.getItem(`${this.ZENI_OTP_TOKEN}_${e}`),o=window.localStorage.getItem(this.ZENI_SESSION_ID);if(n!=null&&o!=null)try{const r=this.decrypt(n,o);if(r===""||r==null)return;let a=JSON.parse(r);return a={...a,expiry:hn(a.expiry.toString())},a}catch{return}}saveMagicLinkCodeVerifier(e){window.localStorage.setItem(this.ZENI_CODE_VERIFIER,e)}getMagicLinkCodeVerifier(){return window.localStorage.getItem(this.ZENI_CODE_VERIFIER)}saveMagicLinkTriggered(e){window.localStorage.setItem(`${this.ZENI_MAGIC_LINK_TRIGGERED}_${e}`,"true")}isMagicLinkTriggered(e){const n=window.localStorage.getItem(`${this.ZENI_MAGIC_LINK_TRIGGERED}_${e}`);return n!=null&&n==="true"}saveLastUsedMagicLinkToken(e){window.localStorage.setItem(this.ZENI_LAST_USED_MAGIC_LINK_TOKEN,this.encrypt(e,"7f8a2b9c4d1e6f3a8b5c2d9e4f7a1b6c"))}getLastUsedMagicLinkToken(){const e=window.localStorage.getItem(this.ZENI_LAST_USED_MAGIC_LINK_TOKEN),n="7f8a2b9c4d1e6f3a8b5c2d9e4f7a1b6c";if(e!=null)try{return this.decrypt(e,n)}catch{return window.localStorage.removeItem(this.ZENI_LAST_USED_MAGIC_LINK_TOKEN),null}return null}saveMagicLinkEmail(e){window.localStorage.setItem(this.ZENI_MAGIC_LINK_EMAIL,this.encrypt(e,"7f8a2b9c4d1e6f3a8b5c2d9e4f7a1b6c"))}getMagicLinkEmail(){const e=window.localStorage.getItem(this.ZENI_MAGIC_LINK_EMAIL);return e!=null?this.decrypt(e,"7f8a2b9c4d1e6f3a8b5c2d9e4f7a1b6c"):null}encrypt(e,n){return SL.AES.encrypt(e,n).toString()}decrypt(e,n){return SL.AES.decrypt(e,n).toString(SL.enc.Utf8)}ZENI_SESSION_ID="ZENI_SESSION_ID";ZENI_SIGNED_IN_USER="ZENI_SIGNED_IN_USER";ZENI_SIGNED_IN_USER_TENANTS="ZENI_SIGNED_IN_USER_TENANTS";ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS="ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS";ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF="ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF";ZENI_ACTIVE_TENANT_DOMAIN="ZENI_ACTIVE_TENANT_DOMAIN";ZENI_THEME="ZENI_THEME";ZENI_OTP_TOKEN="ZENI_OTP_TOKEN";ZENI_PAY_NOW_INFO_TOOLTIP="ZENI_PAY_NOW_INFO_TOOLTIP";ZENI_FORCE_REFRESHED_COMPONENTS="ZENI_FORCE_REFRESHED_COMPONENTS";ZENI_CODE_VERIFIER="ZENI_CODE_VERIFIER";ZENI_MAGIC_LINK_TRIGGERED="ZENI_MAGIC_LINK_TRIGGERED";ZENI_LAST_USED_MAGIC_LINK_TOKEN="ZENI_LAST_USED_MAGIC_LINK_TOKEN";ZENI_MAGIC_LINK_EMAIL="ZENI_MAGIC_LINK_EMAIL";ZENI_TREASURY_POPUP_SEEN="ZENI_TREASURY_POPUP_SEEN";ZENI_CARD_POLICY_POPUP_SEEN="ZENI_CARD_POLICY_POPUP_SEEN";ZENI_AI_CFO_UPLOAD_PROMO_SEEN=_At;ALL_IDs=[this.ZENI_SESSION_ID,this.ZENI_SIGNED_IN_USER,this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS,this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF,this.ZENI_SIGNED_IN_USER_TENANTS,this.ZENI_ACTIVE_TENANT_DOMAIN,this.ZENI_THEME,this.ZENI_OTP_TOKEN,this.ZENI_FORCE_REFRESHED_COMPONENTS,this.ZENI_PAY_NOW_INFO_TOOLTIP,this.ZENI_TREASURY_POPUP_SEEN,this.ZENI_CARD_POLICY_POPUP_SEEN,this.ZENI_AI_CFO_UPLOAD_PROMO_SEEN,this.ZENI_CODE_VERIFIER,this.ZENI_MAGIC_LINK_TRIGGERED,this.ZENI_LAST_USED_MAGIC_LINK_TOKEN,this.ZENI_MAGIC_LINK_EMAIL]},A3=(e,n)=>{const o=[...e??[]];return o.push(n),o},CJr=e=>{const n=[...e??[]];return{poppedPathname:n.pop(),newStack:n}},vJr=({state:e})=>Oi.isSignedIn()===!0?Bt.jsx(ojt,{}):Bt.jsx(hit,{to:"/signin/auth",replace:!0,state:{...e,message:"...",origin:window.location.pathname}});function RQr(){const e=tu(),n=fh(),o=BT(),{tenantEmailDomain:r}=mit(),[a,s]=m.useState(!1),c=Qo(x=>x.tenantState.fetchState==="Completed"||x.tenantState.activeTenantFetchState.fetchState==="Completed"?du(x):void 0),d=c?.masterTOSInfo?.isMasterTOSAccepted??!1,u=Qo(x=>MT(x));m.useEffect(()=>{const x=n.state;x?.[S1e]===!0&&(s(!0),o({pathname:n.pathname,search:n.search,hash:n.hash},{replace:!0,state:{...x,[S1e]:void 0}}))},[n.state,n.pathname,n.search,n.hash,o]);const p=m.useCallback(()=>{if(r==null)return;const x=A3(n.state?.pathnameStackToGoBack,n.pathname);o(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:x,referrer:n.state?.referrer??"Navigation"}})},[n.pathname,n.state,o,r]),h=m.useCallback(()=>{s(!1),p()},[p]),g=m.useCallback(()=>{s(!1)},[]),f=m.useCallback(()=>{d||c?.userRoleId==null?s(!1):e(ert(c.userRoleId))},[e,d,c?.userRoleId]);return Bt.jsx(dAt,{open:a,onClose:g,children:Bt.jsxs(cAt,{children:[a&&!d?Bt.jsx(l0e,{analytics:Ad,onLoad:x=>d?null:x.trackAICFOOnboardingScreenStateChanged("open","first_visit")}):null,Bt.jsx(lse,{acceptMasterTOSState:u.masterTOSAcceptanceState,isTOSAccepted:d,showHeader:!1,togglePageView:d?h:void 0,onCloseClick:g,onCompleteClick:f})]})})}const k1e=m.createContext(void 0);function kY(){const e=m.useContext(k1e);if(e===void 0)throw new Error("useAiCfoPanelOpen must be used within AiCfoPanelOpenContext.Provider");return e}const sge=["/:tenantEmailDomain/reports/*","/:tenantEmailDomain/reports"],cge=["/:tenantEmailDomain/forecast/*","/:tenantEmailDomain/forecast"],VAt=["/:tenantEmailDomain/dashboard/*","/:tenantEmailDomain/dashboard"],HAt=["/:tenantEmailDomain/checking/*","/:tenantEmailDomain/checking"],UAt=["/:tenantEmailDomain/treasury/*","/:tenantEmailDomain/treasury"],WAt=["/:tenantEmailDomain/cards/*","/:tenantEmailDomain/cards"],QAt=["/:tenantEmailDomain/people/*","/:tenantEmailDomain/people"],GAt=["/:tenantEmailDomain/rewards/*","/:tenantEmailDomain/rewards"],YAt=["/:tenantEmailDomain/notifications/*","/:tenantEmailDomain/notifications"];function qAt(e){const n=(e??"").replace(/\/$/,"").split("/").filter(Boolean);if(n.length<2)return!1;for(let o=1;o<n.length;o+=1)if(n[o]==="transaction")return!0;return!1}const KAt=["/:tenantEmailDomain/performance/*","/:tenantEmailDomain/performance"],ZAt=["/:tenantEmailDomain/bill/*","/:tenantEmailDomain/bill"],JAt=["/:tenantEmailDomain/reimbursement/*","/:tenantEmailDomain/reimbursement"],NQr=[...VAt,...sge,...cge,"/:tenantEmailDomain/vendors/*","/:tenantEmailDomain/vendors","/:tenantEmailDomain/month_end_close_checks/*","/:tenantEmailDomain/month_end_close_checks","/:tenantEmailDomain/tasks/*","/:tenantEmailDomain/tasks","/:tenantEmailDomain/bills/*","/:tenantEmailDomain/bills","/:tenantEmailDomain/reimbursements/*","/:tenantEmailDomain/reimbursements",...KAt,...ZAt,...JAt,...HAt,...UAt,...WAt,...QAt,...GAt,...YAt];function XAt(){const{pathname:e}=fh(),n=e??"";return NQr.some(o=>$1e(o,n)!=null)||qAt(e)}function Tc(e){const{pathname:n}=fh(),o=n??"";return e.some(r=>$1e(r,o)!=null)}const e$t=m.createContext(null),dge={APP_INITIALIZATION:"app-init",TENANT_SWITCHING:"tenant-switch",TENANT_FETCHING:"tenant-fetch",CONNECTION_AUTH:"connection-auth"};function _Qr({children:e}){const[n,o]=m.useState(()=>new Set([])),r=n.size>0,a=m.useCallback(d=>{o(u=>{if(u.has(d))return u;const p=new Set(u);return p.add(d),p})},[]),s=m.useCallback(d=>{o(u=>{if(!u.has(d))return u;const p=new Set(u);return p.delete(d),p})},[]),c={isLoading:r,activeLoadingStates:n,setLoading:a,clearLoading:s,clearAllLoading:m.useCallback(()=>{o(new Set)},[])};return Bt.jsx(e$t.Provider,{value:c,children:e})}function AY(){const e=m.useContext(e$t);if(!e)throw new Error("useLoading must be used within a LoadingProvider");return e}function VQr(e,{currentChatSessionId:n,isAiCardCreationEnabled:o,isCardPolicyEnabled:r,onAfterCardPolicySubmit:a,onAfterCardsCreationSubmit:s}){return{onCardsCreationFormChange:o?c=>{e(cIt(c))}:void 0,onCardsCreationFormSubmit:o?(c,d)=>{const u=aIt(c);u.length!==0&&(e(lIt(u)),e(sIt({sourceChatSessionId:n})),n!=null&&e(Wge({chatSessionId:n,id:Xge(),kind:"creating_cards",createdAt:hn(""),sourceQuestionAnswerId:d})),s?.())}:void 0,onCardPolicyFormChange:r?c=>{e(rIt(c))}:void 0,onCardPolicyFormSubmit:r?(c,d)=>{const u=(({values:p,mode:h="strict",description:g=""})=>{const f=ypr(p),x={description:g.trim(),mode:h,name:f.trim()};if(p.policyKind==="auto"||p.policyKind==="upload"){const v=p.policiesReview.find(S=>S.isChecked)??p.policiesReview[0];return v==null?{...x,allowedEntity:{categoryCodes:[],merchantNames:[]},applyToCards:[],blockedEntity:{categoryCodes:[],merchantNames:[]},requiredReceiptThreshold:null,spendLimits:{transaction:null}}:{...x,...xpr(v)}}const y=fH(p.vendorPolicy,"allow"),b=fH(p.vendorPolicy,"block"),w=xH(p.categoryPolicy,"allow"),C=xH(p.categoryPolicy,"block");return{...x,allowedEntity:{categoryCodes:w,merchantNames:y},applyToCards:p.cardSelections.filter(v=>v.isChecked).map(v=>v.id),blockedEntity:{categoryCodes:C,merchantNames:b},requiredReceiptThreshold:yH(p.limits,L2e),spendLimits:{transaction:yH(p.limits,I2e)}}})({values:c});e(iIt({templates:[u],sourceChatSessionId:n})),n!=null&&e(Wge({chatSessionId:n,id:Xge(),kind:"creating_policy",createdAt:hn(""),sourceQuestionAnswerId:d})),a?.()}:void 0,onCardPolicyUploadDocument:r?(c,d,u)=>{c.length!==0&&e(oIt(c,d,u))}:void 0,onCardPolicyRemoveDocument:r?()=>{e(trt())}:void 0}}const HQr=e=>bIt(e,!1),UQr=e=>yIt(e.name,!1);function WQr(e,{allUsers:n,onCardPolicyVendorSearchTextChange:o}){const r=e.cardPolicyState,a=dIt(r),s=uIt(r),c=pIt(r),{creditAccount:d}=hIt(e,!1,!1,!1),u=d.fetchState==="Completed"&&d.limit.amount>0?d.limit.amount:void 0;return{allUsers:n,cardPolicyCategorySearchOptions:a.map(HQr),cardPolicyVendorSearchOptions:s.map(UQr),cardPolicyIsVendorSearchLoading:c==="In-Progress",cardPolicyDocumentUploadState:xIt(r),cardPolicyUploadedFileName:fIt(r),cardPolicyFormDraft:gIt(e.createCardPolicyState),cardsCreationFormDraft:mIt(e),cardsCreationMaxLimitAmount:u,onCardPolicyVendorSearchTextChange:o}}const QQr=["aiCfoInitialQuestion","aiCfoShouldSubmit","aiCfoInitialSubmissionSource","aiCfoSuggestionIndex"];function GQr(e){if(e==null)return{message:"",origin:""};const n={...e};for(const o of QQr)delete n[o];return n}const YQr=e=>{const n=Z.currencyFormatter(0);return o=>{const r=CIt(e.chargeCardState,o);if(r==null)return;const a=vIt(e.userState,r.cardHolderUserId),s=((u,p,h)=>{const g=u!=null&&u.length>0,f=p!=null&&p.length>0;return g&&f?`${u} ${p}`:g?u:f?p:h??""})(a?.firstName,a?.lastName,a?.email),c=r.limit?.amount,d=typeof c=="number"&&Number.isFinite(c)?n.format(c):"";return{cardName:r.cardName,ownerName:s,recommendedLimitFormatted:d,owner:a}}},qQr=e=>n=>{const o=wIt(e.cardPolicyState,n);if(o==null)return;const r=o.cardsCount>0?o.cardsCount:o.appliedCards.length,a=o.allowedEntity.merchantNames.length+o.blockedEntity.merchantNames.length,s=o.allowedEntity.categoryCodes.length+o.blockedEntity.categoryCodes.length;return{name:o.name,description:o.description,cardsCount:r,vendorRestrictionsCount:a,categoryRestrictionsCount:s}};function KQr(){const e=tu(),{useFeatureGate:n}=wa(),{isFeatureEnabled:o}=n(vi.isAiCardCreationEnabled),{isFeatureEnabled:r}=n(vi.isCardPolicyEnabled);m.useEffect(()=>(e(SIt()),e(Qge()),e(kIt("cardHolderCandidate",!1)),e(AIt(!1,!1,!1)),e($It()),()=>{e(trt())}),[e]);const a=m.useMemo(()=>HLt(d=>{e(Qge(d))},250),[e]);m.useEffect(()=>()=>{a.cancel()},[a]);const s=m.useCallback(d=>{a(d)},[a]),c=Qo(d=>jIt(d.userState,d.userRoleState,d.userListViewState,"cardHolderCandidate").users,xae);return{allUsers:m.useMemo(()=>c.map(d=>d.user).filter(d=>d!=null),[c]),isAiCardCreationEnabled:o,isCardPolicyEnabled:r,onCardPolicyVendorSearchTextChange:s}}const t$t=["/:tenantEmailDomain/dashboard/accounts_payable_aging/*","/:tenantEmailDomain/dashboard/accounts_payable_aging"],n$t=["/:tenantEmailDomain/dashboard/accounts_receivable_aging/*","/:tenantEmailDomain/dashboard/accounts_receivable_aging"],ZQr=["/:tenantEmailDomain/dashboard/cash_in_cash_out/*","/:tenantEmailDomain/dashboard/cash_in_cash_out"],JQr=["/:tenantEmailDomain/dashboard/operating_expenses/*","/:tenantEmailDomain/dashboard/operating_expenses"],XQr=["/:tenantEmailDomain/dashboard/revenue/*","/:tenantEmailDomain/dashboard/revenue"],eGr=["/:tenantEmailDomain/dashboard/net_burn_or_income/*","/:tenantEmailDomain/dashboard/net_burn_or_income"],tGr=["/:tenantEmailDomain/dashboard/cash_position/*","/:tenantEmailDomain/dashboard/cash_position"],o$t=["/:tenantEmailDomain/dashboard/cash_balance/*","/:tenantEmailDomain/dashboard/cash_balance"],i$t=["/:tenantEmailDomain/dashboard/card_balance/*","/:tenantEmailDomain/dashboard/card_balance"],nGr=["transaction_categorization","je_schedules","reconciliation","missing_receipts","flux_analysis","month_end_insights"];function uge(e){const n=rp(e),o=n.indexOf("review");if(o<2||n[o-1]!=="month_end_close_checks")return null;if(o===n.length-1)return"overview";const r=n[o+1];return r==null?"overview":nGr.includes(r)?r:null}const oGr=new Set(["approval-rules",...new Set(["setup","verification","promo","international-wire"])]),iGr=new Set(["setup","verification","promo","approval-rules"]);function rp(e){return e.replace(/\/$/,"").split("/").filter(Boolean)}function pge(e){const n=rp(e),o=n[1]==="vendors"?1:-1;if(o<0||n.length<o+2)return;const r=n[o+1];if(r==="summary")return"vendors";if(r==="opex")return"opex_by_vendor";if(r==="schedules"){const a=n[o+2];return a==="prepaid_expenses"?"prepaid_expenses":a==="fixed_assets"?"fixed_assets":a==="accrued_expenses"?"accrued_expenses":void 0}return r==="filing_1099"?"form_1099":void 0}function r$t(e,n,o){const r=rp(e);return!(r.length<2||r[1]!==n)&&(r.length===2||o(r[2]))}function a$t(e,n,o){return r$t(e,n,r=>!o.has(r))}function l$t(e){return a$t(e,"bills",oGr)}function s$t(e){return a$t(e,"reimbursements",iGr)}function c$t(e){return r$t(e,"tasks",n=>n==="group")}const rGr=new Set(["setup","verification","promo","transfer","check-deposit","express-pay"]),aGr=new Set(["setup","verification","promo","payment","payment-history","onboard","activate","new"]);function hge(e){const n=rp(e);if(n[1]!=="checking")return;if(n.length<=2)return"checking";const o=n[2];return rGr.has(o)?"checking":"checking_details"}function mge(e){const n=rp(e);if(n[1]!=="cards")return;if(n.length<=2)return"cards";const o=n[2];if(o==="policy"){const r=n[3];return r==null?"card_policy":r==="new"?void 0:"card_policy_detail"}return aGr.has(o)?"cards":"cards_detail"}function d$t(e){const n=rp(e),o=n.indexOf("transaction");if(!(o<1||n.length<o+3))return"transaction_details"}function u$t(e){return rp(e)[1]==="performance"?"performance":void 0}function p$t(e){const n=rp(e);if(!(n[1]!=="bill"||n.length<3)&&n[2]!=="new")return"bills_details"}function h$t(e){const n=rp(e);if(!(n[1]!=="reimbursement"||n.length<3)&&n[2]!=="new")return"reimbursement_details"}function Tm(e,n){return n.some(o=>$1e(o,e)!=null)}function lGr(e){return Tm(e,sge)?"reports":Tm(e,t$t)?"ap_aging":Tm(e,n$t)?"ar_aging":pge(e)!=null?"vendors_tab":Tm(e,cge)?"forecast":uge(e)!=null?"month_end_close_review":Tm(e,o$t)?"cash_balance":Tm(e,i$t)?"card_balance":c$t(e)?"task_checklist":d$t(e)!=null?"transaction_detail":u$t(e)!=null?"performance":p$t(e)!=null?"bills_detail":h$t(e)!=null?"reimbursement_detail":l$t(e)?"bills_list":s$t(e)?"reimbursement_list":Tm(e,ZQr)?"cash_in_cash_out":Tm(e,JQr)?"operating_expenses":Tm(e,XQr)?"revenue":Tm(e,eGr)?"net_burn_or_income":Tm(e,tGr)?"cash_position":function(n){const o=rp(n);return o.length===2&&o[1]==="dashboard"}(e)?"dashboard":hge(e)!=null?"checking":function(n){return rp(n)[1]==="treasury"?"treasury":void 0}(e)!=null?"treasury":mge(e)!=null?"cards":function(n){return rp(n)[1]==="people"?"people":void 0}(e)!=null?"people":function(n){return rp(n)[1]==="rewards"?"rewards":void 0}(e)!=null?"rewards":function(n){return rp(n)[1]==="notifications"?"notifications":void 0}(e)!=null?"notifications":"none"}function m$t(e,n){switch(lGr(e)){case"reports":{const o=n?.selectedReportId;return o==null?void 0:function(r){switch(r){case"balance_sheet":return"balance_sheet";case"profit_and_loss":case"profit_and_loss_by_classes":return"profit_loss";case"cash_flow":return"cash_flow";case"vendor":case"vendors_tab":return"vendors";case"accounts_payable_aging":return"accounts_payable";case"accounts_receivable_aging":return"accounts_receivable";case"transaction_detail":return"transaction_details";case"transaction_list_of_account":case"transaction_list_of_account_by_class":case"transaction_list_missing_receipt":return"transactions";default:return}}(o)}case"ap_aging":return"accounts_payable";case"ar_aging":return"accounts_receivable";case"vendors_tab":return pge(e);case"forecast":return"forecast";case"month_end_close_review":{const o=uge(e);return o==null?void 0:function(r){switch(r){case"overview":return"command_centre";case"transaction_categorization":return"transactions";case"je_schedules":return"je_schedules";case"reconciliation":return"reconciliation";case"missing_receipts":return"receipts";case"flux_analysis":return"flux_analysis";case"month_end_insights":return"mei"}}(o)}case"cash_balance":return"cash_balance";case"card_balance":return"card_balance";case"task_checklist":return"task_checklist";case"transaction_detail":return"transaction_details";case"performance":return"performance";case"bills_detail":return"bills_details";case"reimbursement_detail":return"reimbursement_details";case"bills_list":return"bills_list";case"reimbursement_list":return"reimbursement_list";case"cash_in_cash_out":return"cash_in_cash_out";case"operating_expenses":return"operating_expenses";case"revenue":return"revenue";case"net_burn_or_income":return"net_burn_or_income";case"cash_position":return"cash_position";case"dashboard":return"dashboard";case"checking":return hge(e);case"treasury":return"treasury";case"cards":return mge(e);case"people":return"people";case"rewards":return"rewards";case"notifications":return"notifications";default:return}}function g$t(){const{pathname:e}=fh(),n=e??"",o=Qo(r=>r.financeStatementState?.selectedReportId);return m.useMemo(()=>m$t(n,{selectedReportId:o}),[n,o])}function $Y(){const{useFeatureGate:e}=wa(),{isFeatureEnabled:n}=e(vi.isAiCfoEnabled),o=Qo(a=>du(a)),r=Oi.getSignedInUser();return r!=null&&r.userId!=null&&o!=null&&o.companyId!=null&&n}function sGr(){const{useFeatureGate:e}=wa(),{isFeatureEnabled:n}=e(vi.isAiCfoNavButtonEnabled),o=$Y();return n&&o}const f$t=m.createContext(void 0),cGr=({children:e})=>{const{tenantEmailDomain:n}=mit(),o=n!=null?Oi.getSignedInUserTenant(n):void 0,r=Qo(u=>du(u)),a=zT().tenantId,s=o?.tenantId,c=r?.tenantId,d=m.useMemo(()=>s!=null&&s===c&&c===a,[s,c,a]);return Bt.jsx(f$t.Provider,{value:{areTenantIdsInSync:d,tenantIdFromEmailDomain:s,currentTenantId:c,tenantIdFromConfig:a},children:e})},dGr=()=>{const e=m.useContext(f$t);if(!e)throw new Error("useTenantSync must be used within a TenantSyncProvider");return e};function x$t(e,n){return e!=="In-Progress"&&!(e==="Completed"&&!n)&&!(e==="Error"&&!n)}function y$t(e){const{areTenantIdsInSync:n}=dGr(),o=$Y(),r=sGr();return n&&e&&r&&o}function SJr(e){const{pageContexts:n,canFetchSuggestedQuestions:o}=e,r=tu(),a=git(),s=m.useRef(null);m.useEffect(()=>{const c=s.current===!1&&o===!0;if(s.current=o,o&&n!=null&&n.length!==0)for(const d of n){const u=V1e(a.getState(),d)?.fetchState;x$t(u,c)&&r(nrt({pageContext:d}))}},[o,r,n,a])}function b$t(e){(function(n){const{pageContext:o,canFetchSuggestedQuestions:r,noCardCreated:a}=n,s=tu(),c=git(),d=m.useRef(null),u=m.useRef(void 0);m.useEffect(()=>{const p=d.current===!1&&r===!0;d.current=r;const h=u.current!==void 0&&u.current!==a;if(u.current=a,o==null||!r)return;const g=V1e(c.getState(),o)?.fetchState;x$t(g,p||h)&&s(nrt({pageContext:o,noCardCreated:a}))},[r,s,a,o,c])})({canFetchSuggestedQuestions:y$t(e.isDataReady),pageContext:e.pageContext,noCardCreated:e.noCardCreated})}function kJr(e){b$t({pageContext:g$t(),isDataReady:e.isDataReady,noCardCreated:e.noCardCreated})}const{questionTemplates:{sampleQuestion1:uGr,sampleQuestion2:pGr,sampleQuestion3:hGr}}=Z.getLocalizedStrings().aiCfo,mGr=[uGr,pGr,hGr];function gGr(e,n=!1){b$t({isDataReady:!0,pageContext:e!=null&&e!==""?e:void 0});const o=y$t(!0),r=Qo(g=>e!=null&&e!==""?V1e(g,e):void 0),{useDynamicConfig:a}=wa(),{configValue:s}=a(of.aiCfoMessageDynamicConfig),c=m.useMemo(()=>Array.isArray(s?.default_message_list)?[...s.default_message_list]:[],[s?.default_message_list]),d=m.useMemo(()=>c.length>0?c:[...mGr],[c]),u=e!=null&&e!=="",p=u&&o&&(r==null||r.fetchState!=="Completed"&&r.fetchState!=="Error"),h=m.useMemo(()=>{if(!u||!o)return d;if(p)return[];if(r?.fetchState==="Error")return d;const g=(r?.suggestedQuestions??[]).map(f=>f.trim()).filter(f=>f.length>0);return g.length===0?d:g},[o,d,u,p,r?.fetchState,r?.suggestedQuestions]);return{isSuggestedQuestionsLoading:!n&&p,suggestedPromptQuestions:m.useMemo(()=>n?[]:h,[n,h])}}function fGr({isFileUploadEnabled:e,tenantEmailDomain:n}){const o=m.useCallback(()=>e===!0&&n!=null&&!Oi.getAiCfoUploadPromoSeen(n),[e,n]),[r,a]=m.useState(o);return m.useEffect(()=>{a(o())},[o]),m.useEffect(()=>{const s=()=>{a(o())};window.addEventListener(_H,s);const c=d=>{d.key===_At&&s()};return window.addEventListener("storage",c),()=>{window.removeEventListener(_H,s),window.removeEventListener("storage",c)}},[o]),{isUploadPromoVisible:r,handleUploadPromoClose:m.useCallback(()=>{n!=null&&Oi.saveAiCfoUploadPromoSeen(n,!0),a(!1)},[n])}}const w$t=m.createContext(void 0),gge=()=>m.useContext(w$t),xGr=e=>{const n=Oi.isSignedIn(),o=Oi.getSignedInUser(),[r,a]=m.useState(void 0),s=m.useMemo(()=>r,[r]),c=Qo(p=>du(p)),d=c.companyId,u=c.userRoleId;return m.useEffect(()=>{let p,h=!1;if(n&&c.tenantId!=null&&o?.userId!=null&&o.zeniSessionId!=null){r!=null&&(r.channels.all().forEach(w=>{r.unsubscribe(w.name)}),r.disconnect()),a(void 0);const g=o.userId,f=c.tenantId,x=o.zeniSessionId,y=async()=>{if(h)return;let w;try{w=await PIt(Ga.pusherClientSecret,{cluster:Ga.pusherCluster},{userId:g,tenantId:f,sessionId:x},!0)}catch(C){return void console.warn("Failed to initialize Pusher",C)}h?w?.disconnect():(a(w),w!=null&&(d!=null&&kL(w,d),g!=null&&kL(w,g),u!=null&&kL(w,u)))},b=()=>{const w=zT();return w.tenantId===f&&w.userId===g&&w.sessionId===x};if(b())y();else{let w=0;p=setInterval(()=>{h||(w++,b()?(clearInterval(p),y()):w>=30&&(clearInterval(p),irt(g,x,f),y()))},100)}}return()=>{h=!0,p!=null&&clearInterval(p),r?.channels.all().forEach(g=>r?.unsubscribe(g.name)),r?.disconnect()}},[n,c.tenantId,o?.userId,o?.zeniSessionId]),Bt.jsx(w$t.Provider,{value:s,children:e.children})};function kL(e,n){const o=`private-encrypted-${n}`,r=e.channel(o);if(r?.subscribed===!0)return r;const a=e.subscribe(o);return a.bind("pusher:subscription_error",s=>{console.warn("Pusher Channel Connection Subscription Error",s)}),a}const yGr=e=>{const n=e.indexOf(".");return n===-1?[e,""]:[e.slice(0,n),e.slice(n+1)]},fge=e=>n=>{const o=gge(),r=m.useRef(n.eventCallback),a=m.useRef(n.onSubscribed),s=m.useRef({}),c=m.useRef(0);m.useEffect(()=>{r.current=n.eventCallback,a.current=n.onSubscribed;const{events:u,eventCallback:p,onSubscribed:h,...g}=n;s.current=g},[n]);const d=m.useMemo(()=>[...n.events].sort().join("|"),[n.events]);return m.useEffect(()=>{if(o!=null){const{events:u}=n,p=[];if(u.length===0)return;const h=new Set,g=()=>{if(a.current==null)return;const f=Date.now();f-c.current<5e3||(c.current=f,a.current(s.current))};return u.forEach(f=>{const[x,y]=yGr(f);if(y==="")return;const b=o.channel(x),w=v=>{r.current(y,v,s.current)};let C;if(b?.subscribed===!0)C=b,C.bind(y,w),h.has(x)||(h.add(x),g()),p.push(()=>{b.unbind(y,w)});else{if(C=b??o.subscribe(x),C.bind(y,w),!h.has(x)){h.add(x);const v=()=>{g()};C.bind("pusher:subscription_succeeded",v),p.push(()=>{C.unbind("pusher:subscription_succeeded",v)})}p.push(()=>{C.unbind(y,w)})}}),()=>{p.forEach(f=>f())}}},[o,d]),Bt.jsx(e,{...n})},bGr=({children:e})=>{const n=Cae("(prefers-color-scheme: dark)"),[o,r]=T.useState({dark:n});m.useEffect(()=>{const d=Oi.getTheme()==null?n:Oi.getTheme()==="dark";o.dark!==d&&r({dark:d})},[o,n]);const a=o.dark?fN({palette:{mode:"dark"},...qTe},KTe,Sro,Aro):fN({palette:{mode:"light"},...qTe},KTe,vro,kro),s=typeof window<"u"?window.__NONCE__:void 0,c=s!=null&&s.length>0?s:void 0;return Bt.jsx(G_n,{dark:o.dark,webAppTheme:a,toggle:()=>{const d=!o.dark;Oi.setTheme(d?"dark":"light"),r({...o,dark:d})},nonce:c,children:e})},C$t=m.createContext(!1),wGr=C$t.Provider;function CGr(){return m.useContext(C$t)}const vGr=()=>Qo(e=>du(e)).tenantId==null?{inboxNotifications:[],isLoading:!1,isFetchingMore:!1,hasFetchedAll:!0,fetchMore:()=>null}:(()=>{const{inboxNotifications:e,isLoading:n,isFetchingMore:o,hasFetchedAll:r,fetchMore:a}=njt();return{inboxNotifications:e,isLoading:n,isFetchingMore:o,hasFetchedAll:r,fetchMore:a}})();function SGr({isTreasuryPromoVideoRemindMeLaterClicked:e,isTreasuryPromoVideoPlayed:n,loginCounterForTreasuryPromoVideo:o,isTreasuryVideoClosed:r=!1}){return!r&&!n&&(!e||o>0&&o%5==0)}const A1e=e=>VEn.includes(e),aN=e=>Pgt.includes(e),Rot=e=>A1e(e)?`settings/${e}`:e==="home"?"dashboard":e==="users_and_roles"?"people":e==="task_checklist"?"tasks":e==="company_settings"?"settings/company_details":eV(e)?e==="command_center"?"month_end_close_checks/review":`month_end_close_checks/review/${e}`:aN(e)?`ai-cfo/${e}`:e,kGr=["dashboard","reports","forecast","vendors","bills","bill","reimbursements","reimbursement","tasks","month_end_close_checks","transaction","performance","checking","treasury","cards","people","rewards","notifications"],Not=(e,n)=>e.includes(n),VH=e=>{switch(e.split("/")[2]){case"cards":return"cards";case"rewards":case"dashboard":case"transactions":case"transaction":case"notifications":return"home";case"checking":return"checking";case"bills":case"bill":return"bills";case"reimbursements":case"reimbursement":return"reimbursements";case"vendors":return"vendors";case"forecast":return"forecast";case"reports":return"reports";case"tasks":case"task":return"task_checklist";case"people":return"users_and_roles";case"settings":return function(n){if(n==null)return;const o=["accounting","approval_rules","billing","my_bank_connections","bank_connections","business_verification","company_details","integrations","my_profile","notifications"];for(const r of o)if(Not(n,r))switch(r){case"accounting":return"accounting";case"approval_rules":return"approval_rules";case"billing":return"billing";case"my_bank_connections":return"my_bank_connections";case"bank_connections":return"bank_connections";case"business_verification":return"business_verification";case"company_details":return"company_details";case"integrations":return"integrations";case"my_profile":return"my_profile";case"notifications":return"notifications"}}(e);case"performance":return"performance";case"month_end_close_checks":return function(n){if(!n.includes("month_end_close_checks/review"))return"command_center";const o=n.split("/"),r=o.indexOf("review"),a=r>=0?o[r+1]:void 0;return a!=null&&eV(a)?Dgt(a):"command_center"}(e);case"ai-cfo":return function(n){if(n!=null){for(const o of Pgt)if(Not(n,o))switch(o){case"new_chat":return"new_chat";case"explore":return"explore"}}}(e);case"treasury":return"treasury";default:return}};function _ot(e){let n=VH(e.pathname);if(n==null){const o=[...e.state?.pathnameStackToGoBack??[]].reverse();for(let r=0;r<o.length&&n==null;++r)n=VH(o[r])}return n??"home"}function AGr(e){return e.pathname.includes("settings")}function $Gr(e){return e.pathname.includes("ai-cfo")}const jGr=()=>{const e=EGr();return UE("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*")!=null||e},EGr=()=>fh().state?.message==="expenseAutomation";function IGr(e){return(e??[]).reduce((n,o)=>{const r=o.yield;return Math.max(n,r)},0)}const LGr=(e,n,o)=>{const r=rrt(e),a=BIt(e),s=art(o,e);return n||o||a||r||s},$v="AppDrawer",o2={root:`${$v}-root`,drawer:`${$v}-drawer`,appBar:`${$v}-appBar`,menuButton:`${$v}-menuButton`,appBarZenilogo:`${$v}-appBarZenilogo`,drawerZenilogo:`${$v}-drawerZenilogo`},TT=210,TGr=On("div",{slot:"Root"})(({theme:e})=>({[`&.${o2.root}`]:{display:"flex"},[`& .${o2.drawer}`]:{[e.breakpoints.up("md")]:{width:TT,flexShrink:0,backgroundColor:e.colors.background}},[`& .${o2.appBar}`]:{color:e.colors.primary,backgroundColor:e.colors.background,boxShadow:"none"},"& .MuiToolbar-root":{backgroundColor:e.colors.background},[`& .${o2.menuButton}`]:{marginRight:e.spacing(2),[e.breakpoints.up("md")]:{display:"none"}},[`& .${o2.appBarZenilogo}`]:{fill:e.colors.primary,cursor:"pointer",width:"100%",marginLeft:e.spacing(-6)},[`& .${o2.drawerZenilogo}`]:{margin:`${e.spacing(3)} ${e.spacing(3)} ${e.spacing(0)}`,fill:e.colors.primary,cursor:"pointer"}})),DGr=fge(function({tenantEmailDomain:e}){const{isAiCfoOpen:n,setIsAiCfoOpen:o}=kY(),[r,a]=T.useState(!1),[s,c]=m.useState(!1),d=fh(),u=BT(),p=zT(),h=_he(),g=tu(),[f,x]=m.useState(!1),y=Me(),{useFeatureGate:b}=wa(),{isFeatureEnabled:w}=b(vi.isDebitCardFeatureEnabled),{isFeatureEnabled:C}=b(vi.isExpenseAutomationEnabled),{isFeatureEnabled:v}=b(vi.isExpenseAutomationEnabledV2),[S,A]=m.useState(()=>Oi.getSignedInUser());m.useEffect(()=>{const en=()=>{const lo=Oi.getSignedInUser();A(lo)};return window.addEventListener("completeProfileDone",en),()=>{window.removeEventListener("completeProfileDone",en)}},[]);const j=Qo(en=>du(en)),$=j.masterTOSInfo?.isMasterTOSAccepted??!1,{setLoading:E}=AY(),L=$Y(),I=Q6(S),B=g3r(),D=CGr(),[z,U]=m.useState(void 0),{isFeatureEnabled:R}=b(vi.isDepositAccountsFeatureEnabled),{isFeatureEnabled:O}=b(vi.isChargeCardFeatureEnabled),N=LGr(j,O,w),{isFeatureEnabled:F}=b(vi.isSettingsFeatureEnabled),{isFeatureEnabled:H}=b(vi.isReferralFeatureEnabled),{isFeatureEnabled:_}=b(vi.isTreasuryEnabled),{isFeatureEnabled:Q}=b(vi.isTaskManagerCustomerUserAccessEnabled),V=I||!I&&Q,G=Qo(en=>zIt(en));m.useEffect(()=>{const en=()=>{x(window.scrollY>10)};return window.addEventListener("scroll",en),()=>{window.removeEventListener("scroll",en)}},[]);const K=Qo(en=>FIt(en)),q=Qo(en=>en.expenseAutomationViewState.selectedPeriodByTenantId),X=Qo(en=>OIt(en)),{monthEndCloseChecksView:ne}=X,te=UE("/signout")!==null,oe=UE("/:tenantEmailDomain/dashboard")!==null,ie=UE("/:tenantEmailDomain/reports")!==null,ae=UE("/:tenantEmailDomain/onboarding/*")!==null,se=jGr();m.useEffect(()=>{D&&H&&!ae&&K.fetchState==="Not-Started"&&g(RIt(!0))},[D,H,K.fetchState,ae]),m.useEffect(()=>{if(se){const en=d.state?.origin;if(en!=null){const lo=NIt(en);lo!=null&&g(Yge(lo))}}},[se,d.state]);const ye=te||ae,de=Qo(en=>en.tenantState),he=Qo(en=>de.fetchState==="Completed"?srt(en):[]),{isFeatureEnabled:re}=b(vi.isApAgingFeatureEnabled),{isFeatureEnabled:ce}=b(vi.isArAgingFeatureEnabled),{isFeatureEnabled:pe}=b(vi.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:me}=b(vi.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:fe}=b(vi.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:we}=b(vi.isDashboardSidebarNewYearAnimationEnabled),xe=Qo(en=>Tw(en).totalUnreadCount),Ce=Qo(en=>Tw(en).notificationDetailsByTab.tasks.uiState.unreadCount),ve=Qo(en=>Tw(en).notificationDetailsByTab.comments.uiState.unreadCount),De=Qo(en=>Tw(en).reducedFetchCountState),Be=Qo(en=>Tw(en).notificationDetailsByTab.tasks.fetchCountState),Pe=Qo(en=>MT(en)),[je,Ve]=m.useState(void 0),Te=Pe.uiState.currentChatSessionId,Se=je!=null?Pe.deleteChatSessionStateByChatSessionId[je]?.fetchState:void 0,$e=zt(Se),{inboxNotifications:Ee,isLoading:ze,isFetchingMore:Re,hasFetchedAll:Ge,fetchMore:Ye}=vGr(),_e=Qo(en=>Tw(en).notificationDetailsByTab.comments.fetchCountState);m.useEffect(()=>{const en=setTimeout(()=>Ye?.(),0);return()=>clearTimeout(en)}),m.useEffect(()=>{if(je!=null)return $e==="In-Progress"&&Se==="Completed"?(g(qge({chatSessionId:je})),Ve(void 0),void u(`/${e}/ai-cfo/explore`,{state:{...d.state,referrer:"Sidebar"}})):void(Se==="Error"&&(g(qge({chatSessionId:je})),Ve(void 0)))},[g,d.state,u,Se,je,$e,e]),m.useEffect(()=>{if(ze===!1&&Re===!1&&Ge===!0&&j?.companyId!=null&&Ee!=null){const en=`dashboard_${j.companyId}`;U(Ee.filter(lo=>lo.roomId===en&&lo.readAt==null).length)}},[ze,Re,Ge,j?.companyId,Ee]),m.useEffect(()=>{D&&I&&!ae&&Be.fetchState==="Not-Started"&&p.tenantId!=null&&g(_It("task_manager","dashboard"))},[D,p.tenantId]),m.useEffect(()=>{ae||_e.fetchState!=="Not-Started"||g(Kge({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),m.useEffect(()=>{if(z!=null){const{fetchState:en}=_e;en!=="In-Progress"&&en!=="Completed"||(en==="In-Progress"&&g(Kge({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),g(lrt({unreadCount:z},"comments")))}},[z,_e.fetchState]);const et={fetchStatus:De,count:xe},tt=[];re===!1&&tt.push("accounts_payable_aging"),ce===!1&&tt.push("accounts_receivable_aging"),R===!1&&tt.push("zeni_accounts_promo_card"),H===!1&&tt.push("rewards_card"),B===!1&&tt.push("expense_automation_card");const jt=gn(),yt=Qo(en=>VIt(en,tt,S,v,C,_).fetchState),it=Qo(en=>HIt(en).fetchState),vt=e!=null?Oi.getSignedInUserTenant(e):null,Yt=Qo(en=>vt?.tenantId!=null?crt(en,vt.tenantId):void 0),dn=oe&&(yt==="Completed"||yt==="Error")||ie&&(it==="Completed"||it==="Error")||!oe&&!ie?void 0:"disabled",qe=m.useMemo(()=>drt(j.userRole),[j.userRole]),Mt=jit(qe),rn=en=>{a(en)},xt=j.company!=null&&UIt(j.company),pt=_&&xt,on=Eit(jt?.loggedInUserRoleMap),un=j.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,Ut=Qo(en=>en.treasurySetupViewState.treasuryFundsDetails),mn=Qo(en=>en.dashboardState.isTreasuryVideoClosed),tn=j.isTreasuryPromoVideoRemindMeLaterClicked,ut=j.isTreasuryPromoVideoPlayed,fn=j.loginCounterForTreasuryPromoVideo,Tn=m.useMemo(()=>SGr({isTreasuryPromoVideoRemindMeLaterClicked:tn,isTreasuryPromoVideoPlayed:ut,loginCounterForTreasuryPromoVideo:fn,isTreasuryVideoClosed:mn}),[j.isTreasuryPromoVideoRemindMeLaterClicked,j.isTreasuryPromoVideoPlayed,j.loginCounterForTreasuryPromoVideo,mn]),Mn=VH(d.pathname)==="home"&&Tn,jo=m.useCallback(()=>pt&&on&&Ut?.fetchStatus.fetchState==="Completed"&&!Oi.getTreasuryPopupSeen(e??"")&&j.isTreasuryPromoVideoPlayed!==!0&&un===!1&&VH(d.pathname)!=="treasury"&&Mn!==!0,[pt,on,un,d.pathname,e,Ut?.fetchStatus,j.isTreasuryPromoVideoPlayed,Tn,Mn]),[wo,co]=m.useState(jo);m.useEffect(()=>{D&&pt&&Ut?.fetchStatus.fetchState==="Not-Started"&&g(WIt())},[D,pt,Ut?.fetchStatus.fetchState]),m.useEffect(()=>{co(jo())},[jo]);const An=IGr(Ut.fundsDetails),Un=j?.rewardsLastViewedTime==null,yn=S?.userEmail!=null&&G.fetchState==="Completed"&&QIt(G.notificationSettings,S.userEmail,w,j),ro=m.useCallback(en=>{const lo=d.state?.referrer;if(ne.monthEndCloseChecks?.auditSummary!=null&&Ad.trackMonthCloseAuditPage(en.month,en.year,ne.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",ne.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,lo??null),g(GIt(j.tenantId,en)),q[j.tenantId]!=null){const Eo=A3(d.state?.pathnameStackToGoBack,d.pathname);u(`/${e}/month_end_close_checks/review/${X.currentSelectedView}/${en.month}-${en.year}`,{state:{pathnameStackToGoBack:Eo,referrer:X.currentSelectedView}})}g(Yge(X.currentSelectedView)),X.reconciliation.selectedAccountId!=null&&g(YIt({selectedAccountId:void 0}))},[X.reconciliation.selectedAccountId,X.currentSelectedView,j.tenantId,ne.monthEndCloseChecks?.auditSummary,ne.monthEndCloseChecks?.reportEmailSentDate,q,e,d.state,d.pathname]),ao=m.useMemo(()=>({zIndex:s||wo?12:k[2]}),[s,wo]),Do=L&&$Gr(d),Ko=Bt.jsx(Xgo,{signedInUser:S,currentTenantId:de.currentTenantId??"",tenants:de.fetchState==="Completed"?he:Yt!=null?[Yt]:[],rewardsConfiguration:{isRewardsTabVisible:H,isRewardsAnimated:Un,rewardsPlan:K.rewardsPlan},selectedMenu:n===!0?Dgt("ai_cfo"):_ot(d),isTenantDropdownDisabled:dn,isSettings:AGr(d),isSettingsFeatureEnabled:F,currentTenant:j,isVendorsTabVisible:Mt,isZeniAccountEnabled:R,isChargeCardEnabled:N,isTreasuryEnabled:pt,isTreasuryPopupVisible:wo,treasuryYieldPercentage:An,isNotificationsTabVisible:yn,notificationCountDetails:et,isExpenseAutomationEnabledForUser:B,isAiCfoAccessEnabled:L,onNotificationIconClick:()=>{rn(!1);const en=I?Ce===0&&ve>0?"notifications/comments":"notifications/tasks":"notifications/comments",lo=A3(d.state?.pathnameStackToGoBack,d.pathname);u(`${e}/${en}`,{state:{pathnameStackToGoBack:lo}})},onZeniLogoClick:()=>{h.toggle()},handleTenantSelect:en=>{E(dge.TENANT_SWITCHING),rn(!1);const lo=en.tenantEmailDomain,Eo=_ot(d),Pi=Eo;let yo="";const di=eV(Pi);Eo==="home"?yo+="dashboard":Eo==="users_and_roles"?yo+="people":A1e(Eo)?yo+="settings/my_profile":aN(Eo)?yo+=`ai-cfo/${Eo}`:yo+=Pi==="task_checklist"?"tasks":di?"month_end_close_checks/review":encodeURIComponent(Eo);const Po=`/${encodeURIComponent(lo)}/${yo}`;u(Po,{replace:!0}),S!=null&&(g(H1e(en.tenantId)),g(urt(S.userId,en.tenantId,S.zeniSessionId)));const Zi=en;Ad.trackCompanySwitch(Zi.companyId,Zi.companyName,Zi.userRole)},handleMenuChange:(en,lo)=>{if(S!=null&&Ad.trackSidePanelClicked(en.type,en.group),rn(!1),e==null)return;if(n&&(Po=>{if(A1e(Po)||aN(Po))return!0;const Zi=Rot(Po).split("/")[0];return!kGr.includes(Zi)})(en.type)&&o(!1),en.type==="ai_cfo"){if(Ad.trackAICFOChatScreenStateChanged("viewed","left_menu",Te??null,null),!$)return void OQr({location:d,navigate:u,mergeState:{referrer:"Sidebar"}});const Po=A3(d.state?.pathnameStackToGoBack,d.pathname);return void u(`/${e}/ai-cfo/explore`,{state:{pathnameStackToGoBack:Po,referrer:"Sidebar"}})}const Eo=A3(d.state?.pathnameStackToGoBack,d.pathname),Pi=en.type,yo=eV(Pi)&&Pi!=="command_center";if(Pi!=="command_center"&&!yo||q[j.tenantId]==null||Ad.trackMonthEndCloseClicked(q[j.tenantId].month,q[j.tenantId].year,"Sidebar"),yo&&q[j.tenantId]!=null){const Po=q[j.tenantId];return void u(`/${e}/month_end_close_checks/review/${en.type}/${Po.month}-${Po.year}`,{state:{pathnameStackToGoBack:Eo,message:lo,referrer:"Sidebar"}})}const di=Rot(en.type);aN(en.type)?(Te!=null&&g(sN()),u(`/${e}/ai-cfo/${en.type}`,{state:{pathnameStackToGoBack:Eo.slice(0,-1),message:lo,referrer:"Sidebar"}})):u(`../${e}/${di}`,{state:{pathnameStackToGoBack:Eo,message:lo,referrer:"Sidebar"}})},onDeleteChatSession:en=>{g(qIt(en)),Te===en&&Ve(en)},handleLogOutClick:()=>{rn(!1);const en=A3(d.state?.pathnameStackToGoBack,d.pathname);u("/signout",{replace:!0,state:{pathnameStackToGoBack:en,message:"logout"}})},handleMyProfileClick:()=>{u(`${e}/settings/my_profile`)},handleReferralsClick:()=>{u(`${e}/rewards`)},handleBackClick:()=>{u(`${e}/dashboard`)},handleCockpitClick:()=>{window.open("/cockpit")},handlePopupClose:()=>{Oi.saveTreasuryPopupSeen(e??"",!0),co(!1)},monthEndCloseChecksView:ne,onPeriodChange:ro,onCalendarOpen:c,aiCfoView:Pe,isAiCfo:Do,isOnDashboard:oe,isTaskManagerAccessEnabled:V,updateCurrentChatSessionId:en=>{g(_1e({sessionId:en,agentId:"controller"})),u(`../${e}/ai-cfo/${en}`,{state:{...d.state}})},halloweenAnimationEnabled:pe,thanksGivingAnimationEnabled:me,christmasAnimationEnabled:fe,newYearAnimationEnabled:we}),Wi=Bt.jsx(ALt,{position:"fixed",className:o2.appBar,style:{borderBottom:f?`1px solid ${y.colors.grey2}`:""},children:Bt.jsxs($Lt,{style:{minHeight:jgt},children:[Bt.jsx(jLt,{color:"inherit","aria-label":"open drawer",edge:"start",onClick:()=>rn(!0),className:o2.menuButton,size:"large",children:Bt.jsx(PGr,{})}),Bt.jsx(BGr,{className:o2.appBarZenilogo,onClick:()=>{h.toggle()}})]})}),Go=Cae(en=>en.breakpoints.up("md")),_r=Cae(en=>en.breakpoints.down("md"));return e==null?null:Bt.jsxs(TGr,{className:o2.root,children:[Bt.jsx(ELt,{}),ye===!1?Bt.jsxs(Bt.Fragment,{children:[Go||!oe?null:Wi,Bt.jsxs("nav",{className:o2.drawer,children:[Go?null:Bt.jsx(cN,{container:window.document.body,variant:"temporary",open:r,onClose:()=>rn(!1),PaperProps:{sx:{width:TT,zIndex:k[2],borderRight:"none",backgroundImage:"none",backgroundColor:y.colors.background}},ModalProps:{keepMounted:!0},children:Ko}),_r?null:Bt.jsx(cN,{PaperProps:{sx:{width:TT,borderRight:"none",backgroundImage:"none",backgroundColor:y.colors.background,...ao}},variant:"permanent",open:!0,children:Ko})]})]}):null]})});function Vot(e){return e?.data.unread!=null&&e?.mode!=null}const PGr=On(e=>m.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},m.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.604839 4.51889C0.333157 4.57797 0.0879194 4.8318 0.0182541 5.12602C-0.00534674 5.22569 -0.00534674 5.4412 0.0182541 5.54086C0.0523791 5.685 0.117181 5.80198 0.22956 5.92229C0.346814 6.04782 0.459133 6.11627 0.600351 6.14826C0.726193 6.17676 23.2738 6.17676 23.3997 6.14826C23.5409 6.11627 23.6532 6.04782 23.7704 5.92229C23.9348 5.74632 24 5.57908 24 5.33344C24 5.1793 23.9797 5.08352 23.9199 4.95575C23.8455 4.79698 23.6879 4.63709 23.5343 4.56468C23.3857 4.49468 24.2116 4.49926 11.9899 4.50058C2.66632 4.50157 0.669677 4.50479 0.604839 4.51889ZM0.669895 11.1732C0.365117 11.2113 0.0889356 11.4752 0.0182179 11.7958C-0.00468131 11.8996 -0.00469357 12.0996 0.0181935 12.2034C0.0806855 12.4867 0.305734 12.7294 0.581516 12.8108C0.65573 12.8327 1.1761 12.8337 12 12.8337C22.8591 12.8337 23.3441 12.8327 23.4192 12.8106C23.6933 12.7297 23.9196 12.4855 23.9818 12.2034C24.0047 12.0996 24.0047 11.8997 23.9818 11.7959C23.9201 11.516 23.7014 11.2776 23.425 11.1888C23.3558 11.1665 22.8817 11.1655 12.0544 11.164C5.84032 11.1631 0.717278 11.1672 0.669895 11.1732ZM0.594774 17.8516C0.458952 17.8831 0.344939 17.9535 0.22956 18.077C0.0652015 18.253 0 18.4202 0 18.6659C0 18.82 0.0203225 18.9158 0.0801289 19.0435C0.154452 19.2023 0.312097 19.3622 0.465726 19.4346C0.614214 19.5046 -0.209758 19.4999 12 19.4999C21.8294 19.4999 23.3082 19.4975 23.3881 19.4811C23.6596 19.4256 23.9122 19.1669 23.9817 18.8733C24.0053 18.7736 24.0053 18.5581 23.9817 18.4584C23.9476 18.3143 23.8828 18.1973 23.7704 18.077C23.6532 17.9515 23.5409 17.883 23.3997 17.851C23.2779 17.8235 0.713601 17.824 0.594774 17.8516Z",fill:"currentColor"})))`
80892
+ `,SL=cit(ULt()),TQr=["sandbox","production"],DQr=["development","staging","production"],sk=()=>Oc==="DEV"||Oc==="QA"||Oc==="PUNE"||Oc==="SUNNYVALE"||Oc==="DELHI"||Oc==="MOHALI",rge="https://zeni-webapp-qa.uc.r.appspot.com",Oc=i4("QA",["DEV","QA","PUNE","SUNNYVALE","DELHI","MOHALI","PROD","NEXT"]),bJr=(e=>i4(e,TQr))((e=>{switch(e){case"DEV":case"QA":case"PUNE":case"SUNNYVALE":case"DELHI":case"MOHALI":default:return"sandbox";case"PROD":case"NEXT":return"production"}})(Oc)),Bot=(e=>i4(e,DQr))((e=>{switch(e){case"QA":case"PUNE":case"SUNNYVALE":case"DELHI":case"MOHALI":return"staging";case"PROD":case"NEXT":return"production";default:return"development"}})(Oc)),age=Oc==="DEV"||Oc==="QA"?.2:.8,OAt=age,Ga={sentryDsn:"",sentryTraceSamplingRate:age,sentryProfileSamplingRate:OAt,webV2MicroServiceEndpoint:"",googleClientId:"",googleMapsAPIKey:"",microsoftClientId:"",mixpanelToken:"",pusherClientSecret:"",pusherCluster:"",currentQBOEnv:"",quickbooksKey:"",appUrl:"",currentFeatureEnv:"",featureClientSecret:"",cardVaultId:"",stripeKey:"",qboRedirectionUrl:"",mixpanelUrl:"",mixpanelHMUrl:""};let tA,LT;function PQr(e){Ga.sentryDsn=e.keys.SENTRY_DSN,Ga.sentryTraceSamplingRate=e.keys.SENTRY_TRACE_SAMPLE_RATES!=null?parseInt(e.keys.SENTRY_TRACE_SAMPLE_RATES):age,Ga.sentryProfileSamplingRate=e.keys.SENTRY_PROFILES_SAMPLE_RATES!=null?parseInt(e.keys.SENTRY_PROFILES_SAMPLE_RATES):OAt,Ga.googleClientId=e.keys.GOOGLE_CLIENT_ID,Ga.googleMapsAPIKey=e.keys.GOOGLE_MAP_KEY,Ga.microsoftClientId=e.keys.MICROSOFT_CLIENT_ID,Ga.mixpanelToken=e.keys.MIXPANEL_TOKEN,Ga.pusherClientSecret=e.keys.PUSHER_CLIENT_SECRET,Ga.pusherCluster=e.keys.PUSHER_CLUSTER,Ga.quickbooksKey=e.keys.QUICKBOOK_TOKEN,Ga.appUrl=e.keys.WEB_ENDPOINT,Ga.featureClientSecret=e.keys.STATSIG_CLIENT_SECRET,Ga.cardVaultId=e.keys.UNIT_VAULT_ID,Ga.stripeKey=e.keys.STRIPE_KEY,Ga.qboRedirectionUrl=e.keys.QBO_URL,Ga.mixpanelUrl=e.keys.MIXPANEL_URL,Ga.mixpanelHMUrl=e.keys.MIXPANEL_HM_URL,LT=e.externalEndPoints,tA=e.apiEndPoints,function(n,o){const r=new Set,a=[...Object.values(n),...Object.values(o)];for(const s of a)if(typeof s=="string"&&s.length>0)try{r.add(new URL(s).origin)}catch{}for(const s of r){if(document.querySelector(`link[rel="preconnect"][href="${s}"]`)!=null)continue;const c=document.createElement("link");c.rel="preconnect",c.href=s,document.head.appendChild(c)}}(tA,LT)}let Mot=!1;function qv(){Mot||(l0.init("ed1936cb971f6aad4104ddbe708f812c",{api_host:LT.mixpanelBaseUrl,ignore_dnt:!0,store_google:!1,track_marketing:!1}),Mot=!0)}const BQr=new Set(Array.from(go.EVENTS_WITHOUT_SUPER_PROPERTIES));let zot=!1,Fot=!1;function C1e(){if(zot)return;zot=!0,qv();const e=go.extractUtmParamsFromUrl();Object.keys(e).length>0&&l0.register(e),sk()&&console.log(`[UTM] first-touch bootstrap: ${JSON.stringify(e)}`)}const MQr=new Set(["dclid","fbclid","gclid","ko_click_id","li_fat_id","msclkid","sccid","ttclid","twclid","wbraid"]);function zQr(){const e=function(){return l0?.persistence?.props??null}();if(e==null)return;const n=Object.keys(e).filter(o=>o.startsWith("utm_")||MQr.has(o));for(const o of n)l0.unregister(o);sk()&&n.length>0&&console.log(`[UTM] cleared from cookie: ${JSON.stringify(n)}`)}function Oot(){Fot||(Fot=!0,zQr())}class $S{identify(n,o){if(qv(),this.#t=n,n!=null&&o!=null&&($S.#e==null||!nIt({userId:n,traits:o},$S.#e))){const{$email:r,...a}={...o};l0.identify(n),r&&r!=null&&l0.people.set_once({$email:r}),l0.people.set(a),$S.#e={userId:n,traits:o},sk()&&console.log(`*** Called people set with userId ${n} traits ${JSON.stringify(o)} `)}}identifyUserAndCompany(n,o,r,a,s){throw Error("Use identify in the web-app!!")}track(n,o){qv();const r=BQr.has(n);if(this.#t!=null||r){if(C1e(),this.#t!=null){const a={distinct_id:this.#t,...o};l0.track(n,a)}else l0.track(n,o);if(Oot(),sk()){const a=this.#t!=null?`*** firing ${n} with props ${JSON.stringify(o)}`:`*** firing ${n} (unidentified user, in allowlist) with props ${JSON.stringify(o)}`;console.log(a)}}else console.error("Either User is not identified :( or this event is not in allowlist, so can not fire event.")}trackWithoutUserId(n,o){qv(),C1e(),l0.track(n,o),Oot(),sk()&&console.log(`*** firing ${n} (unidentified user) with props ${JSON.stringify(o)}`)}alias(n,o){qv(),l0.alias(n,o)}reset(){qv(),l0.identify(void 0),this.#t=void 0,$S.#e=void 0}static#e;#t}const v1e=new $S,RAt=new go.Analytics(v1e);RAt.trackWithoutUserId=v1e.trackWithoutUserId.bind(v1e);const Ad=RAt,FQr="openAiCfoScope",S1e="openAiCfoScopeOnDashboard";function OQr(e){const{location:n,navigate:o,mergeState:r}=e;o({pathname:n.pathname,search:n.search,hash:n.hash},{replace:!0,state:{...n.state,[S1e]:!0,...r}})}function wJr(e){const n=MT(e);if(n.createSessionAndSubmitState.fetchState==="In-Progress")return!0;const o=n.uiState?.currentChatSessionId;return o!=null&&n.responseStateByChatSessionId?.[o]?.answer?.fetchState==="In-Progress"}function lge(e,n){const o=n!=null?e.find(d=>d.chatSession.chatSessionId===n):void 0,r=o?.questionAnswers??[],a=r[r.length-1],s=a?.responses.answer?.content?.summarizedTitle??"";return{currentChatSession:o?.chatSession,currentQuestionAnswer:a,currentQuestionAnswerSummary:s,currentChatSessionWithMessages:o,currentSessionQuestionAnswers:r}}function NAt(e,n){return(e||n?.chatSessionSummary)??null}const _At="ZENI_AI_CFO_UPLOAD_PROMO_SEEN",_H="zeni-ai-cfo-upload-promo-storage-changed",Oi=new class{_isZeniUserCache;getSignedInUser(){const e=window.localStorage.getItem(this.ZENI_SESSION_ID),n=window.localStorage.getItem(this.ZENI_SIGNED_IN_USER);return n!=null&&e!=null?JSON.parse(this.decrypt(n,e)):void 0}isZeniUser(){const e=window.localStorage.getItem(this.ZENI_SIGNED_IN_USER);if(this._isZeniUserCache!=null&&this._isZeniUserCache.encryptedUser===e)return this._isZeniUserCache.result;const n=this.getSignedInUser()?.userEmail?.toLowerCase().endsWith("@zeni.ai")===!0;return this._isZeniUserCache={encryptedUser:e,result:n},n}getShowNegativeAmountInParenthesis(){const e=window.localStorage.getItem(this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS),n=window.localStorage.getItem(this.ZENI_SESSION_ID);return e!=null&&n!=null?JSON.parse(this.decrypt(e,n)):!1}getShowNegativeAmountInParenthesisPDF(){const e=window.localStorage.getItem(this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF),n=window.localStorage.getItem(this.ZENI_SESSION_ID);return e!=null&&n!=null?JSON.parse(this.decrypt(e,n)):!0}getSignedInUserTenant(e){const n=window.localStorage.getItem(this.ZENI_SIGNED_IN_USER_TENANTS),o=window.localStorage.getItem(this.ZENI_SESSION_ID);if(n!=null&&o!=null)return JSON.parse(this.decrypt(n,o)).find(r=>r.tenantEmailDomain===e)}getSignedInUserTenantWithId(e){const n=window.localStorage.getItem(this.ZENI_SIGNED_IN_USER_TENANTS),o=window.localStorage.getItem(this.ZENI_SESSION_ID);if(n!=null&&o!=null)return JSON.parse(this.decrypt(n,o)).find(r=>r.tenantId===e)}getActiveTenantForUser(){const e=window.localStorage.getItem(this.ZENI_SESSION_ID),n=window.localStorage.getItem(this.ZENI_ACTIVE_TENANT_DOMAIN);if(!(n==null||e==null)){const o=this.decrypt(n,e),r=window.localStorage.getItem(this.ZENI_SIGNED_IN_USER_TENANTS);if(r!=null)return JSON.parse(this.decrypt(r,e)).find(a=>a.tenantEmailDomain===o)}}getForceRefreshedComponents(){const e=window.localStorage.getItem(this.ZENI_SESSION_ID),n=window.localStorage.getItem(this.ZENI_FORCE_REFRESHED_COMPONENTS);if(n&&e!=null){const o=this.decrypt(n,e);return o?JSON.parse(o):[]}return[]}saveForceRefreshedComponents(e){const n=window.localStorage.getItem(this.ZENI_SESSION_ID);n!=null?window.localStorage.setItem(this.ZENI_FORCE_REFRESHED_COMPONENTS,this.encrypt(JSON.stringify(e),n)):console.warn("Can't update the force refreshed components when the user is logged out!")}saveActiveTenantDomainForUser(e){const n=window.localStorage.getItem(this.ZENI_SESSION_ID);n!=null?window.localStorage.setItem(this.ZENI_ACTIVE_TENANT_DOMAIN,this.encrypt(e,n)):console.warn("Can't update the active tenant domain when the user is logged out!")}saveSignedInUserWithSession(e,n){if(e==null||n==null)throw new Error("Can't accept nil for user or session Id");window.localStorage.setItem(this.ZENI_SESSION_ID,n),window.localStorage.setItem(this.ZENI_SIGNED_IN_USER,this.encrypt(JSON.stringify(e),n))}saveSignedInUserTenants(e,n){const o=n??window.localStorage.getItem(this.ZENI_SESSION_ID);o!=null?window.localStorage.setItem(this.ZENI_SIGNED_IN_USER_TENANTS,this.encrypt(JSON.stringify(e),o)):console.warn("Can't update the setting when the user is logged out!")}saveShowNegativeAmountInParenthesis(e){const n=window.localStorage.getItem(this.ZENI_SESSION_ID);if(n==null)throw new Error("Can't update the setting when the user is logged out!");window.localStorage.setItem(this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS,this.encrypt(JSON.stringify(e),n))}saveShowNegativeAmountInParenthesisPDF(e){const n=window.localStorage.getItem(this.ZENI_SESSION_ID);if(n==null)throw new Error("Can't update the setting when the user is logged out!");window.localStorage.setItem(this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF,this.encrypt(JSON.stringify(e),n))}isSignedIn(){return[this.ZENI_SESSION_ID,this.ZENI_SIGNED_IN_USER].map(e=>window.localStorage.getItem(e)!=null).reduce((e,n)=>e&&n)}clearAll(){const e=new Set([this.ZENI_MAGIC_LINK_EMAIL,this.ZENI_LAST_USED_MAGIC_LINK_TOKEN,this.ZENI_THEME]);this.ALL_IDs.filter(n=>!e.has(n)).forEach(n=>window.localStorage.removeItem(n)),Object.keys(window.localStorage).filter(n=>new RegExp(`^${this.ZENI_OTP_TOKEN}_card`).test(n)).forEach(n=>window.localStorage.removeItem(n)),Object.keys(window.localStorage).filter(n=>new RegExp(`^${this.ZENI_MAGIC_LINK_TRIGGERED}_`).test(n)).forEach(n=>window.localStorage.removeItem(n))}setTheme(e){window.localStorage.setItem(this.ZENI_THEME,e)}getTheme(){const e=window.localStorage.getItem(this.ZENI_THEME);if(e==="light"||e==="dark")return e;e!=null&&window.localStorage.removeItem(this.ZENI_THEME)}saveZeniOtpToken(e){const n=window.localStorage.getItem(this.ZENI_SESSION_ID);n!=null&&window.localStorage.setItem(this.ZENI_OTP_TOKEN,this.encrypt(JSON.stringify(e),n))}getZeniOtpToken(){const e=window.localStorage.getItem(this.ZENI_OTP_TOKEN),n=window.localStorage.getItem(this.ZENI_SESSION_ID);if(e!=null&&n!=null){let o=JSON.parse(this.decrypt(e,n));return o={...o,expiry:hn(o.expiry.toString())},o}}getTreasuryPopupSeen(e){const n=window.localStorage.getItem(this.ZENI_TREASURY_POPUP_SEEN);if(n!=null)try{return JSON.parse(n)[e]===!0}catch{return window.localStorage.removeItem(this.ZENI_TREASURY_POPUP_SEEN),!1}return!1}saveTreasuryPopupSeen(e,n){const o=window.localStorage.getItem(this.ZENI_TREASURY_POPUP_SEEN);let r={};if(o!=null)try{const a=JSON.parse(o);r=a!==null&&typeof a=="object"?a:{}}catch{r={}}r[e]=n,window.localStorage.setItem(this.ZENI_TREASURY_POPUP_SEEN,JSON.stringify(r))}getCardPolicyPopupSeen(e){const n=window.localStorage.getItem(this.ZENI_CARD_POLICY_POPUP_SEEN);if(n!=null)try{return JSON.parse(n)[e]===!0}catch{return window.localStorage.removeItem(this.ZENI_CARD_POLICY_POPUP_SEEN),!1}return!1}saveCardPolicyPopupSeen(e,n){const o=window.localStorage.getItem(this.ZENI_CARD_POLICY_POPUP_SEEN);let r={};if(o!=null)try{const a=JSON.parse(o);r=a!==null&&typeof a=="object"?a:{}}catch{r={}}r[e]=n,window.localStorage.setItem(this.ZENI_CARD_POLICY_POPUP_SEEN,JSON.stringify(r))}getAiCfoUploadPromoSeen(e){const n=window.localStorage.getItem(this.ZENI_AI_CFO_UPLOAD_PROMO_SEEN);if(n!=null)try{const o=JSON.parse(n);return o!==null&&typeof o=="object"&&o[e]===!0}catch{return window.localStorage.removeItem(this.ZENI_AI_CFO_UPLOAD_PROMO_SEEN),window.dispatchEvent(new CustomEvent(_H)),!1}return!1}saveAiCfoUploadPromoSeen(e,n){const o=window.localStorage.getItem(this.ZENI_AI_CFO_UPLOAD_PROMO_SEEN);let r={};if(o!=null)try{const a=JSON.parse(o);r=a!==null&&typeof a=="object"?a:{}}catch{r={}}r[e]=n,window.localStorage.setItem(this.ZENI_AI_CFO_UPLOAD_PROMO_SEEN,JSON.stringify(r)),window.dispatchEvent(new CustomEvent(_H))}savePayNowInfoTooltip(e,n){const o=n??window.localStorage.getItem(this.ZENI_SESSION_ID);o!=null&&window.localStorage.setItem(this.ZENI_PAY_NOW_INFO_TOOLTIP,this.encrypt(JSON.stringify(e),o))}getPayNowInfoTooltip(){const e=window.localStorage.getItem(this.ZENI_PAY_NOW_INFO_TOOLTIP),n=window.localStorage.getItem(this.ZENI_SESSION_ID);if(e!=null&&n!=null)try{const o=this.decrypt(e,n);return o===""||o==null?void 0:JSON.parse(o)}catch{return}}saveZeniOtpTokenForCardHolder(e,n){const o=window.localStorage.getItem(this.ZENI_SESSION_ID);o!=null&&window.localStorage.setItem(`${this.ZENI_OTP_TOKEN}_${n}`,this.encrypt(JSON.stringify(e),o))}getZeniOtpTokenForCardHolder(e){const n=window.localStorage.getItem(`${this.ZENI_OTP_TOKEN}_${e}`),o=window.localStorage.getItem(this.ZENI_SESSION_ID);if(n!=null&&o!=null)try{const r=this.decrypt(n,o);if(r===""||r==null)return;let a=JSON.parse(r);return a={...a,expiry:hn(a.expiry.toString())},a}catch{return}}saveMagicLinkCodeVerifier(e){window.localStorage.setItem(this.ZENI_CODE_VERIFIER,e)}getMagicLinkCodeVerifier(){return window.localStorage.getItem(this.ZENI_CODE_VERIFIER)}saveMagicLinkTriggered(e){window.localStorage.setItem(`${this.ZENI_MAGIC_LINK_TRIGGERED}_${e}`,"true")}isMagicLinkTriggered(e){const n=window.localStorage.getItem(`${this.ZENI_MAGIC_LINK_TRIGGERED}_${e}`);return n!=null&&n==="true"}saveLastUsedMagicLinkToken(e){window.localStorage.setItem(this.ZENI_LAST_USED_MAGIC_LINK_TOKEN,this.encrypt(e,"7f8a2b9c4d1e6f3a8b5c2d9e4f7a1b6c"))}getLastUsedMagicLinkToken(){const e=window.localStorage.getItem(this.ZENI_LAST_USED_MAGIC_LINK_TOKEN),n="7f8a2b9c4d1e6f3a8b5c2d9e4f7a1b6c";if(e!=null)try{return this.decrypt(e,n)}catch{return window.localStorage.removeItem(this.ZENI_LAST_USED_MAGIC_LINK_TOKEN),null}return null}saveMagicLinkEmail(e){window.localStorage.setItem(this.ZENI_MAGIC_LINK_EMAIL,this.encrypt(e,"7f8a2b9c4d1e6f3a8b5c2d9e4f7a1b6c"))}getMagicLinkEmail(){const e=window.localStorage.getItem(this.ZENI_MAGIC_LINK_EMAIL);return e!=null?this.decrypt(e,"7f8a2b9c4d1e6f3a8b5c2d9e4f7a1b6c"):null}encrypt(e,n){return SL.AES.encrypt(e,n).toString()}decrypt(e,n){return SL.AES.decrypt(e,n).toString(SL.enc.Utf8)}ZENI_SESSION_ID="ZENI_SESSION_ID";ZENI_SIGNED_IN_USER="ZENI_SIGNED_IN_USER";ZENI_SIGNED_IN_USER_TENANTS="ZENI_SIGNED_IN_USER_TENANTS";ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS="ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS";ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF="ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF";ZENI_ACTIVE_TENANT_DOMAIN="ZENI_ACTIVE_TENANT_DOMAIN";ZENI_THEME="ZENI_THEME";ZENI_OTP_TOKEN="ZENI_OTP_TOKEN";ZENI_PAY_NOW_INFO_TOOLTIP="ZENI_PAY_NOW_INFO_TOOLTIP";ZENI_FORCE_REFRESHED_COMPONENTS="ZENI_FORCE_REFRESHED_COMPONENTS";ZENI_CODE_VERIFIER="ZENI_CODE_VERIFIER";ZENI_MAGIC_LINK_TRIGGERED="ZENI_MAGIC_LINK_TRIGGERED";ZENI_LAST_USED_MAGIC_LINK_TOKEN="ZENI_LAST_USED_MAGIC_LINK_TOKEN";ZENI_MAGIC_LINK_EMAIL="ZENI_MAGIC_LINK_EMAIL";ZENI_TREASURY_POPUP_SEEN="ZENI_TREASURY_POPUP_SEEN";ZENI_CARD_POLICY_POPUP_SEEN="ZENI_CARD_POLICY_POPUP_SEEN";ZENI_AI_CFO_UPLOAD_PROMO_SEEN=_At;ALL_IDs=[this.ZENI_SESSION_ID,this.ZENI_SIGNED_IN_USER,this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS,this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF,this.ZENI_SIGNED_IN_USER_TENANTS,this.ZENI_ACTIVE_TENANT_DOMAIN,this.ZENI_THEME,this.ZENI_OTP_TOKEN,this.ZENI_FORCE_REFRESHED_COMPONENTS,this.ZENI_PAY_NOW_INFO_TOOLTIP,this.ZENI_TREASURY_POPUP_SEEN,this.ZENI_CARD_POLICY_POPUP_SEEN,this.ZENI_AI_CFO_UPLOAD_PROMO_SEEN,this.ZENI_CODE_VERIFIER,this.ZENI_MAGIC_LINK_TRIGGERED,this.ZENI_LAST_USED_MAGIC_LINK_TOKEN,this.ZENI_MAGIC_LINK_EMAIL]},A3=(e,n)=>{const o=[...e??[]];return o.push(n),o},CJr=e=>{const n=[...e??[]];return{poppedPathname:n.pop(),newStack:n}},vJr=({state:e})=>Oi.isSignedIn()===!0?Bt.jsx(ojt,{}):Bt.jsx(hit,{to:"/signin/auth",replace:!0,state:{...e,message:"...",origin:window.location.pathname}});function RQr(){const e=tu(),n=fh(),o=BT(),{tenantEmailDomain:r}=mit(),[a,s]=m.useState(!1),c=Qo(x=>x.tenantState.fetchState==="Completed"||x.tenantState.activeTenantFetchState.fetchState==="Completed"?du(x):void 0),d=c?.masterTOSInfo?.isMasterTOSAccepted??!1,u=Qo(x=>MT(x));m.useEffect(()=>{const x=n.state;x?.[S1e]===!0&&(s(!0),o({pathname:n.pathname,search:n.search,hash:n.hash},{replace:!0,state:{...x,[S1e]:void 0}}))},[n.state,n.pathname,n.search,n.hash,o]);const p=m.useCallback(()=>{if(r==null)return;const x=A3(n.state?.pathnameStackToGoBack,n.pathname);o(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:x,referrer:n.state?.referrer??"Navigation"}})},[n.pathname,n.state,o,r]),h=m.useCallback(()=>{s(!1),p()},[p]),g=m.useCallback(()=>{s(!1)},[]),f=m.useCallback(()=>{d||c?.userRoleId==null?s(!1):e(ert(c.userRoleId))},[e,d,c?.userRoleId]);return Bt.jsx(dAt,{open:a,onClose:g,children:Bt.jsxs(cAt,{children:[a&&!d?Bt.jsx(l0e,{analytics:Ad,onLoad:x=>d?null:x.trackAICFOOnboardingScreenStateChanged("open","first_visit")}):null,Bt.jsx(lse,{acceptMasterTOSState:u.masterTOSAcceptanceState,isTOSAccepted:d,showHeader:!1,togglePageView:d?h:void 0,onCloseClick:g,onCompleteClick:f})]})})}const k1e=m.createContext(void 0);function kY(){const e=m.useContext(k1e);if(e===void 0)throw new Error("useAiCfoPanelOpen must be used within AiCfoPanelOpenContext.Provider");return e}const sge=["/:tenantEmailDomain/reports/*","/:tenantEmailDomain/reports"],cge=["/:tenantEmailDomain/forecast/*","/:tenantEmailDomain/forecast"],VAt=["/:tenantEmailDomain/dashboard/*","/:tenantEmailDomain/dashboard"],HAt=["/:tenantEmailDomain/checking/*","/:tenantEmailDomain/checking"],UAt=["/:tenantEmailDomain/treasury/*","/:tenantEmailDomain/treasury"],WAt=["/:tenantEmailDomain/cards/*","/:tenantEmailDomain/cards"],QAt=["/:tenantEmailDomain/people/*","/:tenantEmailDomain/people"],GAt=["/:tenantEmailDomain/rewards/*","/:tenantEmailDomain/rewards"],YAt=["/:tenantEmailDomain/notifications/*","/:tenantEmailDomain/notifications"];function qAt(e){const n=(e??"").replace(/\/$/,"").split("/").filter(Boolean);if(n.length<2)return!1;for(let o=1;o<n.length;o+=1)if(n[o]==="transaction")return!0;return!1}const KAt=["/:tenantEmailDomain/performance/*","/:tenantEmailDomain/performance"],ZAt=["/:tenantEmailDomain/bill/*","/:tenantEmailDomain/bill"],JAt=["/:tenantEmailDomain/reimbursement/*","/:tenantEmailDomain/reimbursement"],NQr=[...VAt,...sge,...cge,"/:tenantEmailDomain/vendors/*","/:tenantEmailDomain/vendors","/:tenantEmailDomain/month_end_close_checks/*","/:tenantEmailDomain/month_end_close_checks","/:tenantEmailDomain/tasks/*","/:tenantEmailDomain/tasks","/:tenantEmailDomain/bills/*","/:tenantEmailDomain/bills","/:tenantEmailDomain/reimbursements/*","/:tenantEmailDomain/reimbursements",...KAt,...ZAt,...JAt,...HAt,...UAt,...WAt,...QAt,...GAt,...YAt];function XAt(){const{pathname:e}=fh(),n=e??"";return NQr.some(o=>$1e(o,n)!=null)||qAt(e)}function Tc(e){const{pathname:n}=fh(),o=n??"";return e.some(r=>$1e(r,o)!=null)}const e$t=m.createContext(null),dge={APP_INITIALIZATION:"app-init",TENANT_SWITCHING:"tenant-switch",TENANT_FETCHING:"tenant-fetch",CONNECTION_AUTH:"connection-auth"};function _Qr({children:e}){const[n,o]=m.useState(()=>new Set([])),r=n.size>0,a=m.useCallback(d=>{o(u=>{if(u.has(d))return u;const p=new Set(u);return p.add(d),p})},[]),s=m.useCallback(d=>{o(u=>{if(!u.has(d))return u;const p=new Set(u);return p.delete(d),p})},[]),c={isLoading:r,activeLoadingStates:n,setLoading:a,clearLoading:s,clearAllLoading:m.useCallback(()=>{o(new Set)},[])};return Bt.jsx(e$t.Provider,{value:c,children:e})}function AY(){const e=m.useContext(e$t);if(!e)throw new Error("useLoading must be used within a LoadingProvider");return e}function VQr(e,{currentChatSessionId:n,isAiCardCreationEnabled:o,isCardPolicyEnabled:r,onAfterCardPolicySubmit:a,onAfterCardsCreationSubmit:s}){return{onCardsCreationFormChange:o?c=>{e(cIt(c))}:void 0,onCardsCreationFormSubmit:o?(c,d)=>{const u=aIt(c);u.length!==0&&(e(lIt(u)),e(sIt({sourceChatSessionId:n})),n!=null&&e(Wge({chatSessionId:n,id:Xge(),kind:"creating_cards",createdAt:hn(""),sourceQuestionAnswerId:d})),s?.())}:void 0,onCardPolicyFormChange:r?c=>{e(rIt(c))}:void 0,onCardPolicyFormSubmit:r?(c,d)=>{const u=(({values:p,mode:h="strict",description:g=""})=>{const f=ypr(p),x={description:g.trim(),mode:h,name:f.trim()};if(p.policyKind==="auto"||p.policyKind==="upload"){const v=p.policiesReview.find(S=>S.isChecked)??p.policiesReview[0];return v==null?{...x,allowedEntity:{categoryCodes:[],merchantNames:[]},applyToCards:[],blockedEntity:{categoryCodes:[],merchantNames:[]},requiredReceiptThreshold:null,spendLimits:{transaction:null}}:{...x,...xpr(v)}}const y=fH(p.vendorPolicy,"allow"),b=fH(p.vendorPolicy,"block"),w=xH(p.categoryPolicy,"allow"),C=xH(p.categoryPolicy,"block");return{...x,allowedEntity:{categoryCodes:w,merchantNames:y},applyToCards:p.cardSelections.filter(v=>v.isChecked).map(v=>v.id),blockedEntity:{categoryCodes:C,merchantNames:b},requiredReceiptThreshold:yH(p.limits,L2e),spendLimits:{transaction:yH(p.limits,I2e)}}})({values:c});e(iIt({templates:[u],sourceChatSessionId:n})),n!=null&&e(Wge({chatSessionId:n,id:Xge(),kind:"creating_policy",createdAt:hn(""),sourceQuestionAnswerId:d})),a?.()}:void 0,onCardPolicyUploadDocument:r?(c,d,u)=>{c.length!==0&&e(oIt(c,d,u))}:void 0,onCardPolicyRemoveDocument:r?()=>{e(trt())}:void 0}}const HQr=e=>bIt(e,!1),UQr=e=>yIt(e.name,!1);function WQr(e,{allUsers:n,onCardPolicyVendorSearchTextChange:o}){const r=e.cardPolicyState,a=dIt(r),s=uIt(r),c=pIt(r),{creditAccount:d}=hIt(e,!1,!1,!1),u=d.fetchState==="Completed"&&d.limit.amount>0?d.limit.amount:void 0;return{allUsers:n,cardPolicyCategorySearchOptions:a.map(HQr),cardPolicyVendorSearchOptions:s.map(UQr),cardPolicyIsVendorSearchLoading:c==="In-Progress",cardPolicyDocumentUploadState:xIt(r),cardPolicyUploadedFileName:fIt(r),cardPolicyFormDraft:gIt(e.createCardPolicyState),cardsCreationFormDraft:mIt(e),cardsCreationMaxLimitAmount:u,onCardPolicyVendorSearchTextChange:o}}const QQr=["aiCfoInitialQuestion","aiCfoShouldSubmit","aiCfoInitialSubmissionSource","aiCfoSuggestionIndex"];function GQr(e){if(e==null)return{message:"",origin:""};const n={...e};for(const o of QQr)delete n[o];return n}const YQr=e=>{const n=Z.currencyFormatter(0);return o=>{const r=CIt(e.chargeCardState,o);if(r==null)return;const a=vIt(e.userState,r.cardHolderUserId),s=((u,p,h)=>{const g=u!=null&&u.length>0,f=p!=null&&p.length>0;return g&&f?`${u} ${p}`:g?u:f?p:h??""})(a?.firstName,a?.lastName,a?.email),c=r.limit?.amount,d=typeof c=="number"&&Number.isFinite(c)?n.format(c):"";return{cardName:r.cardName,ownerName:s,recommendedLimitFormatted:d,owner:a}}},qQr=e=>n=>{const o=wIt(e.cardPolicyState,n);if(o==null)return;const r=o.cardsCount>0?o.cardsCount:o.appliedCards.length,a=o.allowedEntity.merchantNames.length+o.blockedEntity.merchantNames.length,s=o.allowedEntity.categoryCodes.length+o.blockedEntity.categoryCodes.length;return{name:o.name,description:o.description,cardsCount:r,vendorRestrictionsCount:a,categoryRestrictionsCount:s}};function KQr(){const e=tu(),{useFeatureGate:n}=wa(),{isFeatureEnabled:o}=n(vi.isAiCardCreationEnabled),{isFeatureEnabled:r}=n(vi.isCardPolicyEnabled);m.useEffect(()=>(e(SIt()),e(Qge()),e(kIt("cardHolderCandidate",!1)),e(AIt(!1,!1,!1)),e($It()),()=>{e(trt())}),[e]);const a=m.useMemo(()=>HLt(d=>{e(Qge(d))},250),[e]);m.useEffect(()=>()=>{a.cancel()},[a]);const s=m.useCallback(d=>{a(d)},[a]),c=Qo(d=>jIt(d.userState,d.userRoleState,d.userListViewState,"cardHolderCandidate").users,xae);return{allUsers:m.useMemo(()=>c.map(d=>d.user).filter(d=>d!=null),[c]),isAiCardCreationEnabled:o,isCardPolicyEnabled:r,onCardPolicyVendorSearchTextChange:s}}const t$t=["/:tenantEmailDomain/dashboard/accounts_payable_aging/*","/:tenantEmailDomain/dashboard/accounts_payable_aging"],n$t=["/:tenantEmailDomain/dashboard/accounts_receivable_aging/*","/:tenantEmailDomain/dashboard/accounts_receivable_aging"],ZQr=["/:tenantEmailDomain/dashboard/cash_in_cash_out/*","/:tenantEmailDomain/dashboard/cash_in_cash_out"],JQr=["/:tenantEmailDomain/dashboard/operating_expenses/*","/:tenantEmailDomain/dashboard/operating_expenses"],XQr=["/:tenantEmailDomain/dashboard/revenue/*","/:tenantEmailDomain/dashboard/revenue"],eGr=["/:tenantEmailDomain/dashboard/net_burn_or_income/*","/:tenantEmailDomain/dashboard/net_burn_or_income"],tGr=["/:tenantEmailDomain/dashboard/cash_position/*","/:tenantEmailDomain/dashboard/cash_position"],o$t=["/:tenantEmailDomain/dashboard/cash_balance/*","/:tenantEmailDomain/dashboard/cash_balance"],i$t=["/:tenantEmailDomain/dashboard/card_balance/*","/:tenantEmailDomain/dashboard/card_balance"],nGr=["transaction_categorization","je_schedules","reconciliation","missing_receipts","flux_analysis","month_end_insights"];function uge(e){const n=rp(e),o=n.indexOf("review");if(o<2||n[o-1]!=="month_end_close_checks")return null;if(o===n.length-1)return"overview";const r=n[o+1];return r==null?"overview":nGr.includes(r)?r:null}const oGr=new Set(["approval-rules",...new Set(["setup","verification","promo","international-wire"])]),iGr=new Set(["setup","verification","promo","approval-rules"]);function rp(e){return e.replace(/\/$/,"").split("/").filter(Boolean)}function pge(e){const n=rp(e),o=n[1]==="vendors"?1:-1;if(o<0||n.length<o+2)return;const r=n[o+1];if(r==="summary")return"vendors";if(r==="opex")return"opex_by_vendor";if(r==="schedules"){const a=n[o+2];return a==="prepaid_expenses"?"prepaid_expenses":a==="fixed_assets"?"fixed_assets":a==="accrued_expenses"?"accrued_expenses":void 0}return r==="filing_1099"?"form_1099":void 0}function r$t(e,n,o){const r=rp(e);return!(r.length<2||r[1]!==n)&&(r.length===2||o(r[2]))}function a$t(e,n,o){return r$t(e,n,r=>!o.has(r))}function l$t(e){return a$t(e,"bills",oGr)}function s$t(e){return a$t(e,"reimbursements",iGr)}function c$t(e){return r$t(e,"tasks",n=>n==="group")}const rGr=new Set(["setup","verification","promo","transfer","check-deposit","express-pay"]),aGr=new Set(["setup","verification","promo","payment","payment-history","onboard","activate","new"]);function hge(e){const n=rp(e);if(n[1]!=="checking")return;if(n.length<=2)return"checking";const o=n[2];return rGr.has(o)?"checking":"checking_details"}function mge(e){const n=rp(e);if(n[1]!=="cards")return;if(n.length<=2)return"cards";const o=n[2];if(o==="policy"){const r=n[3];return r==null?"card_policy":r==="new"?void 0:"card_policy_detail"}return aGr.has(o)?"cards":"cards_detail"}function d$t(e){const n=rp(e),o=n.indexOf("transaction");if(!(o<1||n.length<o+3))return"transaction_details"}function u$t(e){return rp(e)[1]==="performance"?"performance":void 0}function p$t(e){const n=rp(e);if(!(n[1]!=="bill"||n.length<3)&&n[2]!=="new")return"bills_details"}function h$t(e){const n=rp(e);if(!(n[1]!=="reimbursement"||n.length<3)&&n[2]!=="new")return"reimbursement_details"}function Tm(e,n){return n.some(o=>$1e(o,e)!=null)}function lGr(e){return Tm(e,sge)?"reports":Tm(e,t$t)?"ap_aging":Tm(e,n$t)?"ar_aging":pge(e)!=null?"vendors_tab":Tm(e,cge)?"forecast":uge(e)!=null?"month_end_close_review":Tm(e,o$t)?"cash_balance":Tm(e,i$t)?"card_balance":c$t(e)?"task_checklist":d$t(e)!=null?"transaction_detail":u$t(e)!=null?"performance":p$t(e)!=null?"bills_detail":h$t(e)!=null?"reimbursement_detail":l$t(e)?"bills_list":s$t(e)?"reimbursement_list":Tm(e,ZQr)?"cash_in_cash_out":Tm(e,JQr)?"operating_expenses":Tm(e,XQr)?"revenue":Tm(e,eGr)?"net_burn_or_income":Tm(e,tGr)?"cash_position":function(n){const o=rp(n);return o.length===2&&o[1]==="dashboard"}(e)?"dashboard":hge(e)!=null?"checking":function(n){return rp(n)[1]==="treasury"?"treasury":void 0}(e)!=null?"treasury":mge(e)!=null?"cards":function(n){return rp(n)[1]==="people"?"people":void 0}(e)!=null?"people":function(n){return rp(n)[1]==="rewards"?"rewards":void 0}(e)!=null?"rewards":function(n){return rp(n)[1]==="notifications"?"notifications":void 0}(e)!=null?"notifications":"none"}function m$t(e,n){switch(lGr(e)){case"reports":{const o=n?.selectedReportId;return o==null?void 0:function(r){switch(r){case"balance_sheet":return"balance_sheet";case"profit_and_loss":case"profit_and_loss_by_classes":return"profit_loss";case"cash_flow":return"cash_flow";case"vendor":case"vendors_tab":return"vendors";case"accounts_payable_aging":return"accounts_payable";case"accounts_receivable_aging":return"accounts_receivable";case"transaction_detail":return"transaction_details";case"transaction_list_of_account":case"transaction_list_of_account_by_class":case"transaction_list_missing_receipt":return"transactions";default:return}}(o)}case"ap_aging":return"accounts_payable";case"ar_aging":return"accounts_receivable";case"vendors_tab":return pge(e);case"forecast":return"forecast";case"month_end_close_review":{const o=uge(e);return o==null?void 0:function(r){switch(r){case"overview":return"command_centre";case"transaction_categorization":return"transactions";case"je_schedules":return"je_schedules";case"reconciliation":return"reconciliation";case"missing_receipts":return"receipts";case"flux_analysis":return"flux_analysis";case"month_end_insights":return"mei"}}(o)}case"cash_balance":return"cash_balance";case"card_balance":return"card_balance";case"task_checklist":return"task_checklist";case"transaction_detail":return"transaction_details";case"performance":return"performance";case"bills_detail":return"bills_details";case"reimbursement_detail":return"reimbursement_details";case"bills_list":return"bills_list";case"reimbursement_list":return"reimbursement_list";case"cash_in_cash_out":return"cash_in_cash_out";case"operating_expenses":return"operating_expenses";case"revenue":return"revenue";case"net_burn_or_income":return"net_burn_or_income";case"cash_position":return"cash_position";case"dashboard":return"dashboard";case"checking":return hge(e);case"treasury":return"treasury";case"cards":return mge(e);case"people":return"people";case"rewards":return"rewards";case"notifications":return"notifications";default:return}}function g$t(){const{pathname:e}=fh(),n=e??"",o=Qo(r=>r.financeStatementState?.selectedReportId);return m.useMemo(()=>m$t(n,{selectedReportId:o}),[n,o])}function $Y(){const{useFeatureGate:e}=wa(),{isFeatureEnabled:n}=e(vi.isAiCfoEnabled),o=Qo(a=>du(a)),r=Oi.getSignedInUser();return r!=null&&r.userId!=null&&o!=null&&o.companyId!=null&&n}function sGr(){const{useFeatureGate:e}=wa(),{isFeatureEnabled:n}=e(vi.isAiCfoNavButtonEnabled),o=$Y();return n&&o}const f$t=m.createContext(void 0),cGr=({children:e})=>{const{tenantEmailDomain:n}=mit(),o=n!=null?Oi.getSignedInUserTenant(n):void 0,r=Qo(u=>du(u)),a=zT().tenantId,s=o?.tenantId,c=r?.tenantId,d=m.useMemo(()=>s!=null&&s===c&&c===a,[s,c,a]);return Bt.jsx(f$t.Provider,{value:{areTenantIdsInSync:d,tenantIdFromEmailDomain:s,currentTenantId:c,tenantIdFromConfig:a},children:e})},dGr=()=>{const e=m.useContext(f$t);if(!e)throw new Error("useTenantSync must be used within a TenantSyncProvider");return e};function x$t(e,n){return e!=="In-Progress"&&!(e==="Completed"&&!n)&&!(e==="Error"&&!n)}function y$t(e){const{areTenantIdsInSync:n}=dGr(),o=$Y(),r=sGr();return n&&e&&r&&o}function SJr(e){const{pageContexts:n,canFetchSuggestedQuestions:o}=e,r=tu(),a=git(),s=m.useRef(null);m.useEffect(()=>{const c=s.current===!1&&o===!0;if(s.current=o,o&&n!=null&&n.length!==0)for(const d of n){const u=V1e(a.getState(),d)?.fetchState;x$t(u,c)&&r(nrt({pageContext:d}))}},[o,r,n,a])}function b$t(e){(function(n){const{pageContext:o,canFetchSuggestedQuestions:r,noCardCreated:a}=n,s=tu(),c=git(),d=m.useRef(null),u=m.useRef(void 0);m.useEffect(()=>{const p=d.current===!1&&r===!0;d.current=r;const h=u.current!==void 0&&u.current!==a;if(u.current=a,o==null||!r)return;const g=V1e(c.getState(),o)?.fetchState;x$t(g,p||h)&&s(nrt({pageContext:o,noCardCreated:a}))},[r,s,a,o,c])})({canFetchSuggestedQuestions:y$t(e.isDataReady),pageContext:e.pageContext,noCardCreated:e.noCardCreated})}function kJr(e){b$t({pageContext:g$t(),isDataReady:e.isDataReady,noCardCreated:e.noCardCreated})}const{questionTemplates:{sampleQuestion1:uGr,sampleQuestion2:pGr,sampleQuestion3:hGr}}=Z.getLocalizedStrings().aiCfo,mGr=[uGr,pGr,hGr];function gGr(e,n=!1){b$t({isDataReady:!0,pageContext:e!=null&&e!==""?e:void 0});const o=y$t(!0),r=Qo(g=>e!=null&&e!==""?V1e(g,e):void 0),{useDynamicConfig:a}=wa(),{configValue:s}=a(of.aiCfoMessageDynamicConfig),c=m.useMemo(()=>Array.isArray(s?.default_message_list)?[...s.default_message_list]:[],[s?.default_message_list]),d=m.useMemo(()=>c.length>0?c:[...mGr],[c]),u=e!=null&&e!=="",p=u&&o&&(r==null||r.fetchState!=="Completed"&&r.fetchState!=="Error"),h=m.useMemo(()=>{if(!u||!o)return d;if(p)return[];if(r?.fetchState==="Error")return d;const g=(r?.suggestedQuestions??[]).map(f=>f.trim()).filter(f=>f.length>0);return g.length===0?d:g},[o,d,u,p,r?.fetchState,r?.suggestedQuestions]);return{isSuggestedQuestionsLoading:!n&&p,suggestedPromptQuestions:m.useMemo(()=>n?[]:h,[n,h])}}function fGr({isFileUploadEnabled:e,tenantEmailDomain:n}){const o=m.useCallback(()=>e===!0&&n!=null&&!Oi.getAiCfoUploadPromoSeen(n),[e,n]),[r,a]=m.useState(o);return m.useEffect(()=>{a(o())},[o]),m.useEffect(()=>{const s=()=>{a(o())};window.addEventListener(_H,s);const c=d=>{d.key===_At&&s()};return window.addEventListener("storage",c),()=>{window.removeEventListener(_H,s),window.removeEventListener("storage",c)}},[o]),{isUploadPromoVisible:r,handleUploadPromoClose:m.useCallback(()=>{n!=null&&Oi.saveAiCfoUploadPromoSeen(n,!0),a(!1)},[n])}}const w$t=m.createContext(void 0),gge=()=>m.useContext(w$t),xGr=e=>{const n=Oi.isSignedIn(),o=Oi.getSignedInUser(),[r,a]=m.useState(void 0),s=m.useMemo(()=>r,[r]),c=Qo(p=>du(p)),d=c.companyId,u=c.userRoleId;return m.useEffect(()=>{let p,h=!1;if(n&&c.tenantId!=null&&o?.userId!=null&&o.zeniSessionId!=null){r!=null&&(r.channels.all().forEach(w=>{r.unsubscribe(w.name)}),r.disconnect()),a(void 0);const g=o.userId,f=c.tenantId,x=o.zeniSessionId,y=async()=>{if(h)return;let w;try{w=await PIt(Ga.pusherClientSecret,{cluster:Ga.pusherCluster},{userId:g,tenantId:f,sessionId:x},!0)}catch(C){return void console.warn("Failed to initialize Pusher",C)}h?w?.disconnect():(a(w),w!=null&&(d!=null&&kL(w,d),g!=null&&kL(w,g),u!=null&&kL(w,u)))},b=()=>{const w=zT();return w.tenantId===f&&w.userId===g&&w.sessionId===x};if(b())y();else{let w=0;p=setInterval(()=>{h||(w++,b()?(clearInterval(p),y()):w>=30&&(clearInterval(p),irt(g,x,f),y()))},100)}}return()=>{h=!0,p!=null&&clearInterval(p),r?.channels.all().forEach(g=>r?.unsubscribe(g.name)),r?.disconnect()}},[n,c.tenantId,o?.userId,o?.zeniSessionId]),Bt.jsx(w$t.Provider,{value:s,children:e.children})};function kL(e,n){const o=`private-encrypted-${n}`,r=e.channel(o);if(r?.subscribed===!0)return r;const a=e.subscribe(o);return a.bind("pusher:subscription_error",s=>{console.warn("Pusher Channel Connection Subscription Error",s)}),a}const yGr=e=>{const n=e.indexOf(".");return n===-1?[e,""]:[e.slice(0,n),e.slice(n+1)]},fge=e=>n=>{const o=gge(),r=m.useRef(n.eventCallback),a=m.useRef(n.onSubscribed),s=m.useRef({}),c=m.useRef(0);m.useEffect(()=>{r.current=n.eventCallback,a.current=n.onSubscribed;const{events:u,eventCallback:p,onSubscribed:h,...g}=n;s.current=g},[n]);const d=m.useMemo(()=>[...n.events].sort().join("|"),[n.events]);return m.useEffect(()=>{if(o!=null){const{events:u}=n,p=[];if(u.length===0)return;const h=new Set,g=()=>{if(a.current==null)return;const f=Date.now();f-c.current<5e3||(c.current=f,a.current(s.current))};return u.forEach(f=>{const[x,y]=yGr(f);if(y==="")return;const b=o.channel(x),w=v=>{r.current(y,v,s.current)};let C;if(b?.subscribed===!0)C=b,C.bind(y,w),h.has(x)||(h.add(x),g()),p.push(()=>{b.unbind(y,w)});else{if(C=b??o.subscribe(x),C.bind(y,w),!h.has(x)){h.add(x);const v=()=>{g()};C.bind("pusher:subscription_succeeded",v),p.push(()=>{C.unbind("pusher:subscription_succeeded",v)})}p.push(()=>{C.unbind(y,w)})}}),()=>{p.forEach(f=>f())}}},[o,d]),Bt.jsx(e,{...n})},bGr=({children:e})=>{const n=Cae("(prefers-color-scheme: dark)"),[o,r]=T.useState({dark:n});m.useEffect(()=>{const d=Oi.getTheme()==null?n:Oi.getTheme()==="dark";o.dark!==d&&r({dark:d})},[o,n]);const a=o.dark?fN({palette:{mode:"dark"},...qTe},KTe,Sro,Aro):fN({palette:{mode:"light"},...qTe},KTe,vro,kro),s=typeof window<"u"?window.__NONCE__:void 0,c=s!=null&&s.length>0?s:void 0;return Bt.jsx(G_n,{dark:o.dark,webAppTheme:a,toggle:()=>{const d=!o.dark;Oi.setTheme(d?"dark":"light"),r({...o,dark:d})},nonce:c,children:e})},C$t=m.createContext(!1),wGr=C$t.Provider;function CGr(){return m.useContext(C$t)}const vGr=()=>Qo(e=>du(e)).tenantId==null?{inboxNotifications:[],isLoading:!1,isFetchingMore:!1,hasFetchedAll:!0,fetchMore:()=>null}:(()=>{const{inboxNotifications:e,isLoading:n,isFetchingMore:o,hasFetchedAll:r,fetchMore:a}=njt();return{inboxNotifications:e,isLoading:n,isFetchingMore:o,hasFetchedAll:r,fetchMore:a}})();function SGr({isTreasuryPromoVideoRemindMeLaterClicked:e,isTreasuryPromoVideoPlayed:n,loginCounterForTreasuryPromoVideo:o,isTreasuryVideoClosed:r=!1}){return!r&&!n&&(!e||o>0&&o%5==0)}const A1e=e=>VEn.includes(e),aN=e=>Pgt.includes(e),Rot=e=>A1e(e)?`settings/${e}`:e==="home"?"dashboard":e==="users_and_roles"?"people":e==="task_checklist"?"tasks":e==="company_settings"?"settings/company_details":eV(e)?e==="command_center"?"month_end_close_checks/review":`month_end_close_checks/review/${e}`:aN(e)?`ai-cfo/${e}`:e,kGr=["dashboard","reports","forecast","vendors","bills","bill","reimbursements","reimbursement","tasks","month_end_close_checks","transaction","performance","checking","treasury","cards","people","rewards","notifications"],Not=(e,n)=>e.includes(n),VH=e=>{switch(e.split("/")[2]){case"cards":return"cards";case"rewards":case"dashboard":case"transactions":case"transaction":case"notifications":return"home";case"checking":return"checking";case"bills":case"bill":return"bills";case"reimbursements":case"reimbursement":return"reimbursements";case"vendors":return"vendors";case"forecast":return"forecast";case"reports":return"reports";case"tasks":case"task":return"task_checklist";case"people":return"users_and_roles";case"settings":return function(n){if(n==null)return;const o=["accounting","approval_rules","billing","my_bank_connections","bank_connections","business_verification","company_details","integrations","my_profile","notifications"];for(const r of o)if(Not(n,r))switch(r){case"accounting":return"accounting";case"approval_rules":return"approval_rules";case"billing":return"billing";case"my_bank_connections":return"my_bank_connections";case"bank_connections":return"bank_connections";case"business_verification":return"business_verification";case"company_details":return"company_details";case"integrations":return"integrations";case"my_profile":return"my_profile";case"notifications":return"notifications"}}(e);case"performance":return"performance";case"month_end_close_checks":return function(n){if(!n.includes("month_end_close_checks/review"))return"command_center";const o=n.split("/"),r=o.indexOf("review"),a=r>=0?o[r+1]:void 0;return a!=null&&eV(a)?Dgt(a):"command_center"}(e);case"ai-cfo":return function(n){if(n!=null){for(const o of Pgt)if(Not(n,o))switch(o){case"new_chat":return"new_chat";case"explore":return"explore"}}}(e);case"treasury":return"treasury";default:return}};function _ot(e){let n=VH(e.pathname);if(n==null){const o=[...e.state?.pathnameStackToGoBack??[]].reverse();for(let r=0;r<o.length&&n==null;++r)n=VH(o[r])}return n??"home"}function AGr(e){return e.pathname.includes("settings")}function $Gr(e){return e.pathname.includes("ai-cfo")}const jGr=()=>{const e=EGr();return UE("/:tenantEmailDomain/month_end_close_checks/review/:selectedTab/:selectedPeriod/*")!=null||e},EGr=()=>fh().state?.message==="expenseAutomation";function IGr(e){return(e??[]).reduce((n,o)=>{const r=o.yield;return Math.max(n,r)},0)}const LGr=(e,n,o)=>{const r=rrt(e),a=BIt(e),s=art(o,e);return n||o||a||r||s},$v="AppDrawer",o2={root:`${$v}-root`,drawer:`${$v}-drawer`,appBar:`${$v}-appBar`,menuButton:`${$v}-menuButton`,appBarZenilogo:`${$v}-appBarZenilogo`,drawerZenilogo:`${$v}-drawerZenilogo`},TT=210,TGr=On("div",{slot:"Root"})(({theme:e})=>({[`&.${o2.root}`]:{display:"flex"},[`& .${o2.drawer}`]:{[e.breakpoints.up("md")]:{width:TT,flexShrink:0,backgroundColor:e.colors.background}},[`& .${o2.appBar}`]:{color:e.colors.primary,backgroundColor:e.colors.background,boxShadow:"none"},"& .MuiToolbar-root":{backgroundColor:e.colors.background},[`& .${o2.menuButton}`]:{marginRight:e.spacing(2),[e.breakpoints.up("md")]:{display:"none"}},[`& .${o2.appBarZenilogo}`]:{fill:e.colors.primary,cursor:"pointer",width:"100%",marginLeft:e.spacing(-6)},[`& .${o2.drawerZenilogo}`]:{margin:`${e.spacing(3)} ${e.spacing(3)} ${e.spacing(0)}`,fill:e.colors.primary,cursor:"pointer"}})),DGr=fge(function({tenantEmailDomain:e}){const{isAiCfoOpen:n,setIsAiCfoOpen:o}=kY(),[r,a]=T.useState(!1),[s,c]=m.useState(!1),d=fh(),u=BT(),p=zT(),h=_he(),g=tu(),[f,x]=m.useState(!1),y=Me(),{useFeatureGate:b}=wa(),{isFeatureEnabled:w}=b(vi.isDebitCardFeatureEnabled),{isFeatureEnabled:C}=b(vi.isExpenseAutomationEnabled),{isFeatureEnabled:v}=b(vi.isExpenseAutomationEnabledV2),[S,A]=m.useState(()=>Oi.getSignedInUser());m.useEffect(()=>{const en=()=>{const lo=Oi.getSignedInUser();A(lo)};return window.addEventListener("completeProfileDone",en),()=>{window.removeEventListener("completeProfileDone",en)}},[]);const j=Qo(en=>du(en)),$=j.masterTOSInfo?.isMasterTOSAccepted??!1,{setLoading:E}=AY(),L=$Y(),I=Q6(S),B=g3r(),D=CGr(),[z,U]=m.useState(void 0),{isFeatureEnabled:R}=b(vi.isDepositAccountsFeatureEnabled),{isFeatureEnabled:O}=b(vi.isChargeCardFeatureEnabled),N=LGr(j,O,w),{isFeatureEnabled:F}=b(vi.isSettingsFeatureEnabled),{isFeatureEnabled:H}=b(vi.isReferralFeatureEnabled),{isFeatureEnabled:_}=b(vi.isTreasuryEnabled),{isFeatureEnabled:Q}=b(vi.isTaskManagerCustomerUserAccessEnabled),V=I||!I&&Q,G=Qo(en=>zIt(en));m.useEffect(()=>{const en=()=>{x(window.scrollY>10)};return window.addEventListener("scroll",en),()=>{window.removeEventListener("scroll",en)}},[]);const K=Qo(en=>FIt(en)),q=Qo(en=>en.expenseAutomationViewState.selectedPeriodByTenantId),X=Qo(en=>OIt(en)),{monthEndCloseChecksView:ne}=X,te=UE("/signout")!==null,oe=UE("/:tenantEmailDomain/dashboard")!==null,ie=UE("/:tenantEmailDomain/reports")!==null,ae=UE("/:tenantEmailDomain/onboarding/*")!==null,se=jGr();m.useEffect(()=>{D&&H&&!ae&&K.fetchState==="Not-Started"&&g(RIt(!0))},[D,H,K.fetchState,ae]),m.useEffect(()=>{if(se){const en=d.state?.origin;if(en!=null){const lo=NIt(en);lo!=null&&g(Yge(lo))}}},[se,d.state]);const ye=te||ae,de=Qo(en=>en.tenantState),he=Qo(en=>de.fetchState==="Completed"?srt(en):[]),{isFeatureEnabled:re}=b(vi.isApAgingFeatureEnabled),{isFeatureEnabled:ce}=b(vi.isArAgingFeatureEnabled),{isFeatureEnabled:pe}=b(vi.isDashboardSidebarHalloweenAnimationEnabled),{isFeatureEnabled:me}=b(vi.isDashboardSidebarThanksGivingAnimationEnabled),{isFeatureEnabled:fe}=b(vi.isDashboardSidebarChristmasAnimationEnabled),{isFeatureEnabled:we}=b(vi.isDashboardSidebarNewYearAnimationEnabled),xe=Qo(en=>Tw(en).totalUnreadCount),Ce=Qo(en=>Tw(en).notificationDetailsByTab.tasks.uiState.unreadCount),ve=Qo(en=>Tw(en).notificationDetailsByTab.comments.uiState.unreadCount),De=Qo(en=>Tw(en).reducedFetchCountState),Be=Qo(en=>Tw(en).notificationDetailsByTab.tasks.fetchCountState),Pe=Qo(en=>MT(en)),[je,Ve]=m.useState(void 0),Te=Pe.uiState.currentChatSessionId,Se=je!=null?Pe.deleteChatSessionStateByChatSessionId[je]?.fetchState:void 0,$e=zt(Se),{inboxNotifications:Ee,isLoading:ze,isFetchingMore:Re,hasFetchedAll:Ge,fetchMore:Ye}=vGr(),_e=Qo(en=>Tw(en).notificationDetailsByTab.comments.fetchCountState);m.useEffect(()=>{const en=setTimeout(()=>Ye?.(),0);return()=>clearTimeout(en)}),m.useEffect(()=>{if(je!=null)return $e==="In-Progress"&&Se==="Completed"?(g(qge({chatSessionId:je})),Ve(void 0),void u(`/${e}/ai-cfo/explore`,{state:{...d.state,referrer:"Sidebar"}})):void(Se==="Error"&&(g(qge({chatSessionId:je})),Ve(void 0)))},[g,d.state,u,Se,je,$e,e]),m.useEffect(()=>{if(ze===!1&&Re===!1&&Ge===!0&&j?.companyId!=null&&Ee!=null){const en=`dashboard_${j.companyId}`;U(Ee.filter(lo=>lo.roomId===en&&lo.readAt==null).length)}},[ze,Re,Ge,j?.companyId,Ee]),m.useEffect(()=>{D&&I&&!ae&&Be.fetchState==="Not-Started"&&p.tenantId!=null&&g(_It("task_manager","dashboard"))},[D,p.tenantId]),m.useEffect(()=>{ae||_e.fetchState!=="Not-Started"||g(Kge({fetchCountState:{fetchState:"In-Progress",error:void 0}},"comments"))},[]),m.useEffect(()=>{if(z!=null){const{fetchState:en}=_e;en!=="In-Progress"&&en!=="Completed"||(en==="In-Progress"&&g(Kge({fetchCountState:{fetchState:"Completed",error:void 0}},"comments")),g(lrt({unreadCount:z},"comments")))}},[z,_e.fetchState]);const et={fetchStatus:De,count:xe},tt=[];re===!1&&tt.push("accounts_payable_aging"),ce===!1&&tt.push("accounts_receivable_aging"),R===!1&&tt.push("zeni_accounts_promo_card"),H===!1&&tt.push("rewards_card"),B===!1&&tt.push("expense_automation_card");const jt=gn(),yt=Qo(en=>VIt(en,tt,S,v,C,_).fetchState),it=Qo(en=>HIt(en).fetchState),vt=e!=null?Oi.getSignedInUserTenant(e):null,Yt=Qo(en=>vt?.tenantId!=null?crt(en,vt.tenantId):void 0),dn=oe&&(yt==="Completed"||yt==="Error")||ie&&(it==="Completed"||it==="Error")||!oe&&!ie?void 0:"disabled",qe=m.useMemo(()=>drt(j.userRole),[j.userRole]),Mt=jit(qe),rn=en=>{a(en)},xt=j.company!=null&&UIt(j.company),pt=_&&xt,on=Eit(jt?.loggedInUserRoleMap),un=j.companyTreasuryInfo?.info?.isTreasuryTOSAccepted,Ut=Qo(en=>en.treasurySetupViewState.treasuryFundsDetails),mn=Qo(en=>en.dashboardState.isTreasuryVideoClosed),tn=j.isTreasuryPromoVideoRemindMeLaterClicked,ut=j.isTreasuryPromoVideoPlayed,fn=j.loginCounterForTreasuryPromoVideo,Tn=m.useMemo(()=>SGr({isTreasuryPromoVideoRemindMeLaterClicked:tn,isTreasuryPromoVideoPlayed:ut,loginCounterForTreasuryPromoVideo:fn,isTreasuryVideoClosed:mn}),[j.isTreasuryPromoVideoRemindMeLaterClicked,j.isTreasuryPromoVideoPlayed,j.loginCounterForTreasuryPromoVideo,mn]),Mn=VH(d.pathname)==="home"&&Tn,jo=m.useCallback(()=>pt&&on&&Ut?.fetchStatus.fetchState==="Completed"&&!Oi.getTreasuryPopupSeen(e??"")&&j.isTreasuryPromoVideoPlayed!==!0&&un===!1&&VH(d.pathname)!=="treasury"&&Mn!==!0,[pt,on,un,d.pathname,e,Ut?.fetchStatus,j.isTreasuryPromoVideoPlayed,Tn,Mn]),[wo,co]=m.useState(jo);m.useEffect(()=>{D&&pt&&Ut?.fetchStatus.fetchState==="Not-Started"&&g(WIt())},[D,pt,Ut?.fetchStatus.fetchState]),m.useEffect(()=>{co(jo())},[jo]);const An=IGr(Ut.fundsDetails),Un=j?.rewardsLastViewedTime==null,yn=S?.userEmail!=null&&G.fetchState==="Completed"&&QIt(G.notificationSettings,S.userEmail,w,j),ro=m.useCallback(en=>{const lo=d.state?.referrer;if(ne.monthEndCloseChecks?.auditSummary!=null&&Ad.trackMonthCloseAuditPage(en.month,en.year,ne.monthEndCloseChecks.reportEmailSentDate!=null?"closed":"in-review",ne.monthEndCloseChecks.auditSummary.auditScorePercentage,!1,lo??null),g(GIt(j.tenantId,en)),q[j.tenantId]!=null){const Eo=A3(d.state?.pathnameStackToGoBack,d.pathname);u(`/${e}/month_end_close_checks/review/${X.currentSelectedView}/${en.month}-${en.year}`,{state:{pathnameStackToGoBack:Eo,referrer:X.currentSelectedView}})}g(Yge(X.currentSelectedView)),X.reconciliation.selectedAccountId!=null&&g(YIt({selectedAccountId:void 0}))},[X.reconciliation.selectedAccountId,X.currentSelectedView,j.tenantId,ne.monthEndCloseChecks?.auditSummary,ne.monthEndCloseChecks?.reportEmailSentDate,q,e,d.state,d.pathname]),ao=m.useMemo(()=>({zIndex:s||wo?12:k[2]}),[s,wo]),Do=L&&$Gr(d),Ko=Bt.jsx(Xgo,{signedInUser:S,currentTenantId:de.currentTenantId??"",tenants:de.fetchState==="Completed"?he:Yt!=null?[Yt]:[],rewardsConfiguration:{isRewardsTabVisible:H,isRewardsAnimated:Un,rewardsPlan:K.rewardsPlan},selectedMenu:n===!0?Dgt("ai_cfo"):_ot(d),isTenantDropdownDisabled:dn,isSettings:AGr(d),isSettingsFeatureEnabled:F,currentTenant:j,isVendorsTabVisible:Mt,isZeniAccountEnabled:R,isChargeCardEnabled:N,isTreasuryEnabled:pt,isTreasuryPopupVisible:wo,treasuryYieldPercentage:An,isNotificationsTabVisible:yn,notificationCountDetails:et,isExpenseAutomationEnabledForUser:B,isAiCfoAccessEnabled:L,onNotificationIconClick:()=>{rn(!1);const en=I?Ce===0&&ve>0?"notifications/comments":"notifications/tasks":"notifications/comments",lo=A3(d.state?.pathnameStackToGoBack,d.pathname);u(`${e}/${en}`,{state:{pathnameStackToGoBack:lo}})},onZeniLogoClick:()=>{h.toggle()},handleTenantSelect:en=>{E(dge.TENANT_SWITCHING),rn(!1);const lo=en.tenantEmailDomain,Eo=_ot(d),Pi=Eo;let yo="";const di=eV(Pi);Eo==="home"?yo+="dashboard":Eo==="users_and_roles"?yo+="people":A1e(Eo)?yo+="settings/my_profile":aN(Eo)?yo+=`ai-cfo/${Eo}`:yo+=Pi==="task_checklist"?"tasks":di?"month_end_close_checks/review":encodeURIComponent(Eo);const Po=`/${encodeURIComponent(lo)}/${yo}`;u(Po,{replace:!0}),S!=null&&(g(H1e(en.tenantId)),g(urt(S.userId,en.tenantId,S.zeniSessionId)));const Zi=en;Ad.trackCompanySwitch(Zi.companyId,Zi.companyName,Zi.userRole)},handleMenuChange:(en,lo)=>{if(S!=null&&Ad.trackSidePanelClicked(en.type,en.group),rn(!1),e==null)return;if(n&&(Po=>{if(A1e(Po)||aN(Po))return!0;const Zi=Rot(Po).split("/")[0];return!kGr.includes(Zi)})(en.type)&&o(!1),en.type==="ai_cfo"){if(Ad.trackAICFOChatScreenStateChanged("viewed","left_menu",Te??null,null),!$)return void OQr({location:d,navigate:u,mergeState:{referrer:"Sidebar"}});const Po=A3(d.state?.pathnameStackToGoBack,d.pathname);return void u(`/${e}/ai-cfo/explore`,{state:{pathnameStackToGoBack:Po,referrer:"Sidebar"}})}const Eo=A3(d.state?.pathnameStackToGoBack,d.pathname),Pi=en.type,yo=eV(Pi)&&Pi!=="command_center";if(Pi!=="command_center"&&!yo||q[j.tenantId]==null||Ad.trackMonthEndCloseClicked(q[j.tenantId].month,q[j.tenantId].year,"Sidebar"),yo&&q[j.tenantId]!=null){const Po=q[j.tenantId];return void u(`/${e}/month_end_close_checks/review/${en.type}/${Po.month}-${Po.year}`,{state:{pathnameStackToGoBack:Eo,message:lo,referrer:"Sidebar"}})}const di=Rot(en.type);aN(en.type)?(Te!=null&&g(sN()),u(`/${e}/ai-cfo/${en.type}`,{state:{pathnameStackToGoBack:Eo.slice(0,-1),message:lo,referrer:"Sidebar"}})):u(`../${e}/${di}`,{state:{pathnameStackToGoBack:Eo,message:lo,referrer:"Sidebar"}})},onDeleteChatSession:en=>{g(qIt(en)),Te===en&&Ve(en)},handleLogOutClick:()=>{rn(!1);const en=A3(d.state?.pathnameStackToGoBack,d.pathname);u("/signout",{replace:!0,state:{pathnameStackToGoBack:en,message:"logout"}})},handleMyProfileClick:()=>{u(`${e}/settings/my_profile`)},handleReferralsClick:()=>{u(`${e}/rewards`)},handleBackClick:()=>{u(`${e}/dashboard`)},handleCockpitClick:()=>{window.open("/cockpit")},handlePopupClose:()=>{Oi.saveTreasuryPopupSeen(e??"",!0),co(!1)},monthEndCloseChecksView:ne,onPeriodChange:ro,onCalendarOpen:c,aiCfoView:Pe,isAiCfo:Do,isOnDashboard:oe,isTaskManagerAccessEnabled:V,updateCurrentChatSessionId:en=>{g(_1e({sessionId:en,agentId:"controller"})),u(`../${e}/ai-cfo/${en}`,{state:{...d.state}})},halloweenAnimationEnabled:pe,thanksGivingAnimationEnabled:me,christmasAnimationEnabled:fe,newYearAnimationEnabled:we}),Wi=Bt.jsx(ALt,{position:"fixed",className:o2.appBar,style:{borderBottom:f?`1px solid ${y.colors.grey2}`:""},children:Bt.jsxs($Lt,{style:{minHeight:jgt},children:[Bt.jsx(jLt,{color:"inherit","aria-label":"open drawer",edge:"start",onClick:()=>rn(!0),className:o2.menuButton,size:"large",children:Bt.jsx(PGr,{})}),Bt.jsx(BGr,{className:o2.appBarZenilogo,onClick:()=>{h.toggle()}})]})}),Go=Cae(en=>en.breakpoints.up("md")),_r=Cae(en=>en.breakpoints.down("md"));return e==null?null:Bt.jsxs(TGr,{className:o2.root,children:[Bt.jsx(ELt,{}),ye===!1?Bt.jsxs(Bt.Fragment,{children:[Go||!oe?null:Wi,Bt.jsxs("nav",{className:o2.drawer,children:[Go?null:Bt.jsx(cN,{container:window.document.body,variant:"temporary",open:r,onClose:()=>rn(!1),PaperProps:{sx:{width:TT,zIndex:k[2],borderRight:"none",backgroundImage:"none",backgroundColor:y.colors.background}},ModalProps:{keepMounted:!0},children:Ko}),_r?null:Bt.jsx(cN,{PaperProps:{sx:{width:TT,borderRight:"none",backgroundImage:"none",backgroundColor:y.colors.background,...ao}},variant:"permanent",open:!0,children:Ko})]})]}):null]})});function Vot(e){return e?.data.unread!=null&&e?.mode!=null}const PGr=On(e=>m.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",...e},m.createElement("path",{fillRule:"evenodd",clipRule:"evenodd",d:"M0.604839 4.51889C0.333157 4.57797 0.0879194 4.8318 0.0182541 5.12602C-0.00534674 5.22569 -0.00534674 5.4412 0.0182541 5.54086C0.0523791 5.685 0.117181 5.80198 0.22956 5.92229C0.346814 6.04782 0.459133 6.11627 0.600351 6.14826C0.726193 6.17676 23.2738 6.17676 23.3997 6.14826C23.5409 6.11627 23.6532 6.04782 23.7704 5.92229C23.9348 5.74632 24 5.57908 24 5.33344C24 5.1793 23.9797 5.08352 23.9199 4.95575C23.8455 4.79698 23.6879 4.63709 23.5343 4.56468C23.3857 4.49468 24.2116 4.49926 11.9899 4.50058C2.66632 4.50157 0.669677 4.50479 0.604839 4.51889ZM0.669895 11.1732C0.365117 11.2113 0.0889356 11.4752 0.0182179 11.7958C-0.00468131 11.8996 -0.00469357 12.0996 0.0181935 12.2034C0.0806855 12.4867 0.305734 12.7294 0.581516 12.8108C0.65573 12.8327 1.1761 12.8337 12 12.8337C22.8591 12.8337 23.3441 12.8327 23.4192 12.8106C23.6933 12.7297 23.9196 12.4855 23.9818 12.2034C24.0047 12.0996 24.0047 11.8997 23.9818 11.7959C23.9201 11.516 23.7014 11.2776 23.425 11.1888C23.3558 11.1665 22.8817 11.1655 12.0544 11.164C5.84032 11.1631 0.717278 11.1672 0.669895 11.1732ZM0.594774 17.8516C0.458952 17.8831 0.344939 17.9535 0.22956 18.077C0.0652015 18.253 0 18.4202 0 18.6659C0 18.82 0.0203225 18.9158 0.0801289 19.0435C0.154452 19.2023 0.312097 19.3622 0.465726 19.4346C0.614214 19.5046 -0.209758 19.4999 12 19.4999C21.8294 19.4999 23.3082 19.4975 23.3881 19.4811C23.6596 19.4256 23.9122 19.1669 23.9817 18.8733C24.0053 18.7736 24.0053 18.5581 23.9817 18.4584C23.9476 18.3143 23.8828 18.1973 23.7704 18.077C23.6532 17.9515 23.5409 17.883 23.3997 17.851C23.2779 17.8235 0.713601 17.824 0.594774 17.8516Z",fill:"currentColor"})))`
80893
80893
  height: 20px;
80894
80894
  width: 20px;
80895
80895
  color: ${e=>e.theme.colors.primary};
@@ -80986,7 +80986,7 @@ ${Wa.beneficiaryAddress} ${X}`,d(ye),I(!0)})(o),"data-testid":Y("title-text-copy
80986
80986
  display: flex;
80987
80987
  min-height: 100%;
80988
80988
  flex-direction: column;
80989
- `,oYr=()=>{const[e,n]=m.useState(()=>Oi.getSignedInUser()),o=tu(),[r,a]=m.useState(!1),[s,c]=m.useState(!1),d=Qo(g=>prt(g).fetchState),u=Qo(g=>du(g));m.useEffect(()=>{const g=e!=null&&e.authProvider==="email"&&(!e?.firstName||!e?.lastName||!e.phoneNumber);a(g)},[e]);const p=m.useCallback(()=>{const g=Oi.getSignedInUser();n(f=>JSON.stringify(f)!==JSON.stringify(g)?g:f)},[]);m.useEffect(()=>(window.addEventListener("completeProfileDone",p),()=>{window.removeEventListener("completeProfileDone",p)}),[]),m.useEffect(()=>{d!=="In-Progress"&&d!=="Completed"&&o(dLt(u.companyId))},[d,u.companyId,o]);const h=m.useMemo(()=>!!e?.firstName&&!e?.phoneNumber,[e]);return Bt.jsxs(m.Fragment,{children:[s&&Bt.jsx(s0e,{showConfetti:!0}),e?.userEmail!=null&&e.authProvider==="email"?Bt.jsx(tYr,{userEmail:e.userEmail,isCompleteProfileOpen:r,closeDrawerHandler:()=>{a(!1),c(!0)},hasUserEnteredBasicDetails:h}):null]})},Hot="init-enter",iYr=m.memo(function({location:e,visitedUrl:n}){const{pathname:o}=e;return m.useLayoutEffect(()=>{const r=n.get(o||Hot);rYr(r!==void 0?r:0)}),null},(e,n)=>{const{location:o,visitedUrl:r}=e,{location:a}=n,s=o.pathname||Hot,c=aYr();return r.set(s,c),!((a.pathname!==o.pathname||a.search!==o.search)&&a.hash==="")}),rYr=(e=0)=>window.requestAnimationFrame(()=>{window.scrollTo(0,e)}),aYr=()=>{let e=0;return document!=null&&document.documentElement!==null&&(e=document.documentElement.scrollTop),window.pageYOffset||e},Bh=e=>m.lazy(async()=>{const n=e.toString(),o=Oi.getForceRefreshedComponents(),r=new Set(o),a=Oi.isSignedIn(),s=r.has(n);try{const c=await e();return r.delete(n),a&&Oi.saveForceRefreshedComponents(Array.from(r)),c}catch(c){throw s||(r.add(n),a&&Oi.saveForceRefreshedComponents(Array.from(r)),location.reload()),c}}),A$t=globalThis.window?.location.href.startsWith("https://delhi-dot-zeni"),$$t=globalThis.window?.location.href.startsWith("https://pune-dot-zeni"),j$t=globalThis.window?.location.href.startsWith("https://sunnyvale-dot-zeni"),E$t=globalThis.window?.location.href.startsWith("https://dev.app.zeni.ai");function ps(...e){const n=Oc==="DEV"||Oc==="QA";if(A$t||$$t||j$t||E$t)return void console.log(...e);const o=globalThis.window!==void 0&&(globalThis.window.location.hostname==="localhost"||globalThis.window.location.hostname==="127.0.0.1")&&globalThis.window.location.port==="3000";n&&o&&console.log(...e)}function ck(...e){const n=Oc==="DEV"||Oc==="QA";if(A$t||$$t||j$t||E$t)return void console.warn(...e);const o=globalThis.window!==void 0&&(globalThis.window.location.hostname==="localhost"||globalThis.window.location.hostname==="127.0.0.1")&&globalThis.window.location.port==="3000";n&&o&&console.warn(...e)}let jv=null,HE=!1;const hs=Oc==="PROD"?"https://api.zeni.ai":Oc==="DEV"?"https://dev.api.zeni.ai":"https://qa.api.zeni.ai";function Uot(e){const n=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["months"]})),o=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["quarters"]})),r=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["years"]})),a=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["months"]})),s=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["quarters"]})),c=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["years"]})),d=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["months"]})),u=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["quarters"]})),p=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["years"]}));return[{url:`${hs}/accounting/2.0/reports/profit_and_loss?query=${n}`,priority:"HIGH",reason:"Reports - Profit & Loss by Months (first load)",apiType:"reports"},{url:`${hs}/accounting/2.0/reports/profit_and_loss?query=${o}`,priority:"HIGH",reason:"Reports - Profit & Loss by Quarters (first load)",apiType:"reports"},{url:`${hs}/accounting/2.0/reports/profit_and_loss?query=${r}`,priority:"HIGH",reason:"Reports - Profit & Loss by Years (first load)",apiType:"reports"},{url:`${hs}/accounting/2.0/reports/balance_sheet?query=${a}`,priority:"HIGH",reason:"Reports - Balance Sheet by Months (first load)",apiType:"reports"},{url:`${hs}/accounting/2.0/reports/balance_sheet?query=${s}`,priority:"HIGH",reason:"Reports - Balance Sheet by Quarters (first load)",apiType:"reports"},{url:`${hs}/accounting/2.0/reports/balance_sheet?query=${c}`,priority:"HIGH",reason:"Reports - Balance Sheet by Years (first load)",apiType:"reports"},{url:`${hs}/accounting/2.0/reports/cash_flow?query=${d}`,priority:"HIGH",reason:"Reports - Cash Flow by Months (first load)",apiType:"reports"},{url:`${hs}/accounting/2.0/reports/cash_flow?query=${u}`,priority:"HIGH",reason:"Reports - Cash Flow by Quarters (first load)",apiType:"reports"},{url:`${hs}/accounting/2.0/reports/cash_flow?query=${p}`,priority:"HIGH",reason:"Reports - Cash Flow by Years (first load)",apiType:"reports"}]}const lYr={dashboard:function(e){return[...Uot()]},reports:Uot,aging:function(e){return[]},transactions:function(e){return[]},forecast:function(e){const n=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["months"],forecast_id:e.forecastId,is_forecast_vs_actual:!0})),o=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["quarters"],forecast_id:e.forecastId,is_forecast_vs_actual:!0})),r=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["years"],forecast_id:e.forecastId,is_forecast_vs_actual:!0}));return[{url:`${hs}/accounting/2.0/reports/profit_and_loss?query=${n}`,priority:"HIGH",reason:"Forecast - Profit & Loss by Months (first load)",apiType:"forecast"},{url:`${hs}/accounting/2.0/reports/profit_and_loss?query=${o}`,priority:"HIGH",reason:"Forecast - Profit & Loss by Quarters (first load)",apiType:"forecast"},{url:`${hs}/accounting/2.0/reports/profit_and_loss?query=${r}`,priority:"HIGH",reason:"Forecast - Profit & Loss by Years (first load)",apiType:"forecast"}]},checking:function(e){const n=encodeURIComponent(JSON.stringify({is_include_deposit_accounts_summary:!0}));return[{url:`${hs}/banking/1.0/deposit-accounts?query=${n}`,priority:"HIGH",reason:"Checking - Deposit Accounts (first load)",apiType:"checking"},{url:`${hs}/pay/1.0/payment-accounts`,priority:"HIGH",reason:"Checking - Payment Accounts (first load)",apiType:"checking"},{url:`${hs}/banking/1.0/baas/config`,priority:"HIGH",reason:"Checking - BAAS Config (first load)",apiType:"checking"}]},rewards:function(e){const n=encodeURIComponent(JSON.stringify({is_primary_refer_reward_plan:!0}));return[{url:`${hs}/tenant/1.0/company-refer-reward-plan?query=${n}`,priority:"HIGH",reason:"Rewards Page - Rewards Plan (first load)",apiType:"rewards"},{url:`${hs}/tenant/1.0/company-referrals`,priority:"HIGH",reason:"Rewards Page - Referrals (first load)",apiType:"rewards"}]},people:function(e){const n=encodeURIComponent(JSON.stringify({is_manager_candidate:!0})),{companyId:o}=e,r=encodeURIComponent(JSON.stringify({view:"passport"}));return[{url:`${hs}/tenant/1.0/user-roles`,priority:"HIGH",reason:"People Page - User Roles (first load)",apiType:"people"},{url:`${hs}/tenant/1.0/users?query=${n}`,priority:"HIGH",reason:"People Page - Users (first load)",apiType:"people"},{url:`${hs}/accounting/1.0/classes`,priority:"HIGH",reason:"People Page - Classes (first load)",apiType:"people"},{url:`${hs}/tenant/1.0/companies/${o}?query=${r}`,priority:"HIGH",reason:"People Page - Company Passport (first load)",apiType:"people"}]}};function Wot(e){const{currentPage:n,isRewardsFeatureEnabled:o,isPeopleTabVisible:r,isReportsPageVisible:a,isPageIndependent:s=!1}=e,c=(0,lYr[s?"dashboard":n])(e),d=c.filter(u=>o===!1&&u.reason.includes("Rewards")?(ps(`[Prefetch Manager - Service Worker] ⚠️ Skipping rewards URL (feature disabled): ${u.url}`),!1):r===!1&&u.reason.includes("People")?(ps(`[Prefetch Manager - Service Worker] ⚠️ Skipping people URL (feature disabled): ${u.url}`),!1):a!==!1||!u.reason.includes("Reports")||(ps(`[Prefetch Manager - Service Worker] ⚠️ Skipping reports URL (feature disabled): ${u.url}`),!1));return ps(`[Prefetch Manager - Service Worker] 📋 Prefetch list: ${c.length} total, ${d.length} after filtering`),d}async function Qot(e,n=0,o){if("serviceWorker"in navigator)try{const r=await async function(u=1e4){if(!("serviceWorker"in navigator))throw new Error("Service Worker not supported");if(navigator.serviceWorker.controller)return navigator.serviceWorker.ready;const p=await navigator.serviceWorker.ready;return navigator.serviceWorker.controller!=null?p:new Promise((h,g)=>{const f=Date.now();let x=100;const y=()=>navigator.serviceWorker.controller?(C(),void h(p)):Date.now()-f>=u?(C(),void(p.active?(ps("[Prefetch Manager - Service Worker] ⚠️ No controller but SW is active, proceeding anyway"),h(p)):g(new Error("Service Worker controller timeout")))):(x=Math.min(1.5*x,1e3),void(b=setTimeout(y,x)));let b;const w=()=>{navigator.serviceWorker.controller&&(C(),h(p))},C=()=>{clearTimeout(b),navigator.serviceWorker.removeEventListener("controllerchange",w)};navigator.serviceWorker.addEventListener("controllerchange",w),b=setTimeout(y,x)})}(1e4),a=navigator.serviceWorker.controller||r.active;if(!a)return void ck("[Prefetch Manager - Service Worker] No active Service Worker available");const s=function(u){const p={HIGH:0,MEDIUM:1,LOW:2};return u.sort((h,g)=>p[h.priority]-p[g.priority])}(e);ps("[Prefetch Manager - Service Worker] 📋 Sending prefetch list to SW:",{total:s.length,high:s.filter(u=>u.priority==="HIGH").length,medium:s.filter(u=>u.priority==="MEDIUM").length,low:s.filter(u=>u.priority==="LOW").length,batchSize:n>0?n:"disabled",expirationTime:o??"20 minutes",viaController:!!navigator.serviceWorker.controller}),s.forEach((u,p)=>{ps(`[Prefetch Manager - Service Worker] ${p+1}. [${u.priority}] ${u.reason} - ${u.url}`),ps(` URL: ${u.url}`)});const c=zT(),d={"zeni-session-id":c.sessionId,"zeni-user-id":c.userId,"zeni-tenant-id":c.tenantId};a.postMessage({type:"PREFETCH_URLS",payload:{urls:s.map(u=>({url:u.url,priority:u.priority,apiType:u.apiType})),authHeaders:d,batchSize:n,expirationTime:o}}),ps("[Prefetch Manager - Service Worker] ✅ Prefetch request sent to Service Worker")}catch(r){ck("[Prefetch Manager - Service Worker] Failed to send prefetch request:",r instanceof Error?r.message:"Unknown error")}else ck("[Prefetch Manager - Service Worker] Service Worker not supported in this browser")}function sYr({children:e,currentPage:n,tenantId:o,batchCalls:r=0,expirationTime:a,delay:s=1e3,enabled:c=!0,enableIdlePrefetch:d=!1,features:u,forecastId:p,idleTimeout:h=2e3,isPageIndependent:g=!1,isRefreshTriggerEnabled:f=!1}){const[x,y]=m.useState(!1),[b,w]=m.useState(!1),C=m.useRef(null),v=fh(),S=Oi.getSignedInUser(),{useFeatureGate:A}=wa(),{isFeatureEnabled:j}=A(vi.isReferralFeatureEnabled),$=gn(),E=c6($?.loggedInUserRole??[]),L=Qo(U=>du(U)),{isFeatureEnabled:I}=A(vi.isDebitCardFeatureEnabled),B=art(I,L),D=rrt(L),z=B===!1&&D===!1;return m.useEffect(()=>{if(!c||x||!S||!o)return;const U=Wot({currentPage:n,userId:S.userId,tenantId:o,sessionId:S.zeniSessionId??"",features:u,forecastId:p,isRewardsFeatureEnabled:j,isPeopleTabVisible:E,isReportsPageVisible:z,companyId:L?.companyId??"",isPageIndependent:g}),R=g?"dashboard":n;if(U.length===0)return void ps(`[Prefetch Provider - ${R}${g?" (base)":""}] No URLs to prefetch`);ps(`[Prefetch Provider - ${R}${g?" (base)":""}] 📦 Generated ${U.length} URLs to prefetch`);const O=setTimeout(()=>{Qot(U,r,a).catch(N=>{ck(`[Prefetch Provider - ${R}${g?" (base)":""}] Prefetch failed:`,N)}),y(!0)},s);return()=>clearTimeout(O)},[c,x,S,o,n,u,p,j,E,z,L?.companyId,g,r,a,s,v.pathname]),m.useEffect(()=>{y(!1)},[o,v.pathname]),m.useEffect(()=>{g||(y(!1),w(!1))},[v.pathname,g]),m.useEffect(()=>{if(C.current&&(C.current(),C.current=null),!(c&&d&&S&&o)||b)return;ps(`[Prefetch Provider - Idle] 👀 Setting up idle prefetch detection (timeout: ${h}ms)`);const U=function(R){const{timeout:O=2e3,onIdle:N}=R;ps(`[Idle Detection - Service Worker] 👀 Starting Idle Detection - Service Worker (timeout: ${O}ms)`);const F=()=>{HE&&(ps("[Idle Detection - Service Worker] 🏃 User became active again"),HE=!1),jv&&clearTimeout(jv),jv=setTimeout(()=>{HE||(ps("[Idle Detection - Service Worker] ⏱️ Browser is now IDLE"),HE=!0,N())},O)},H=["mousedown","mousemove","keypress","scroll","touchstart","click"];return H.forEach(_=>{document.addEventListener(_,F,!0)}),F(),()=>{ps("[Idle Detection - Service Worker] 🛑 Stopping Idle Detection - Service Worker"),jv&&(clearTimeout(jv),jv=null),H.forEach(_=>{document.removeEventListener(_,F,!0)}),HE=!1}}({timeout:h,onIdle:()=>{if(b)return;ps("[Prefetch Provider - Idle] ⏱️ Browser is idle, fetching prefetch list with isIdleCallEnabled=true");const R=Wot({currentPage:n,userId:S.userId,tenantId:o,sessionId:S.zeniSessionId??"",features:u,forecastId:p,isRewardsFeatureEnabled:j,isPeopleTabVisible:E,isReportsPageVisible:z,companyId:L.companyId,isPageIndependent:g,isIdleCallEnabled:!0}),O=g?"dashboard":n;R.length!==0?(ps(`[Prefetch Provider - Idle - ${O}${g?" (base)":""}] 📦 Generated ${R.length} URLs to prefetch on idle`),Qot(R,r,a).catch(N=>{ck(`[Prefetch Provider - Idle - ${O}${g?" (base)":""}] Idle prefetch failed:`,N)}),w(!0)):ps(`[Prefetch Provider - Idle - ${O}${g?" (base)":""}] No URLs to prefetch on idle`)}});return C.current=U,()=>{C.current&&(C.current(),C.current=null)}},[c,d,h,S,o,b,n,u,p,j,E,z,L.companyId,g,r,a]),m.useEffect(()=>{w(!1)},[o]),m.useEffect(()=>{(function(){const U=performance.getEntriesByType("navigation");if(U.length>0)return U[0].type==="reload";const R=performance.navigation;return!(!R||typeof R.type!="number")&&R.type===1})()&&f&&(ps("[Prefetch Provider] 🔄 Page refresh detected - will bypass cache for fresh data"),async function(){if("serviceWorker"in navigator)try{const U=await navigator.serviceWorker.ready,R=navigator.serviceWorker.controller||U.active;if(!R)return;ps("[Prefetch Provider] 🔄 Page refresh detected, notifying service worker to bypass cache"),R.postMessage({type:"PAGE_REFRESH",payload:{timestamp:Date.now()}})}catch(U){ck("[Prefetch Provider] Failed to notify service worker of refresh:",U)}}())},[]),Bt.jsx(Bt.Fragment,{children:e})}function cYr({children:e,isPageIndependent:n=!1,batchCalls:o=0,enableIdlePrefetch:r=!1,expirationTime:a,idleTimeout:s=2e3,isRefreshTriggerEnabled:c=!1}){const d=fh(),u=Qo(y=>du(y)),p=(h=d.pathname).includes("/dashboard")?"dashboard":h.includes("/reports")||h.includes("/financials")?"reports":h.includes("/aging")?"aging":h.includes("/transactions")?"transactions":h.includes("/forecast")?"forecast":h.includes("/checking")||h.includes("/bank-accounts")?"checking":h.includes("/rewards")?"rewards":null;var h;const g=u.tenantId,{useFeatureGate:f}=wa(),{isFeatureEnabled:x}=f(vi.isServiceWorkerPrefetchingEnabled);return g&&p?Bt.jsx(sYr,{currentPage:p,tenantId:g,delay:5e3,enabled:x,batchCalls:o,enableIdlePrefetch:r,expirationTime:a,idleTimeout:s,isRefreshTriggerEnabled:c,isPageIndependent:n,children:e}):Bt.jsx(Bt.Fragment,{children:e})}function dYr(e,n){const o=go.extractUtmParamsFromUrl(n),r=new URLSearchParams(o).toString();if(!r)return e;const a=e.includes("?")?"&":"?";return`${e}${a}${r}`}const uYr=Bh(()=>Dd(()=>import("./DefaultTenantHome-BKFAUyCt.js"),__vite__mapDeps([4,1,2,0,5,6,7,8]))),Got=Bh(()=>Dd(()=>Promise.resolve().then(()=>MGr),void 0)),Yot=Bh(()=>Dd(()=>import("./ScreenRoutes-DvRF1Ugr.js"),__vite__mapDeps([9,0,1,2,5,10,6,7,8]))),pYr=Bh(()=>Dd(()=>import("./ConnectionAuthScreen-CC4jwpJn.js"),__vite__mapDeps([11,1,2,0,5,6,12,8,13,14,15,16,17,7]))),hYr=Bh(()=>Dd(()=>import("./SignInScreen-Ck9zXfCr.js"),__vite__mapDeps([18,1,2,0,5,19,10,6,7,8]))),mYr=Bh(()=>Dd(()=>import("./MagicLinkSignInScreen-D1bS19KK.js"),__vite__mapDeps([20,1,2,0,5,19,10,6,7,8]))),qot=Bh(()=>Dd(()=>import("./NotFoundScreen-CKyavEYX.js"),__vite__mapDeps([21,1,2,0,5,7,8]))),gYr=Bh(()=>Dd(()=>import("./MagicLinkRoutes-Dtjlc8Bf.js"),__vite__mapDeps([22,1,2,0,5,21,7,8]))),fYr=Bh(()=>Dd(()=>import("./WiseConfirmationScreen-DshLBzeW.js"),__vite__mapDeps([23,1,2,0,5,7,8]))),xYr=Bh(()=>Dd(()=>import("./HubSpotOAuthCallbackScreen-DRjMsB35.js"),__vite__mapDeps([24,1,2,0,5,7,8]))),yYr=Bh(()=>Dd(()=>import("./CustomerOnboardingAuthScreen-Bqsz81r8.js"),__vite__mapDeps([25,1,2,0,12,8,13,14,15,16,5,17,7]))),bYr=Bh(()=>Dd(()=>import("./SignOutScreen-DSoi64zr.js"),__vite__mapDeps([26,1,2,0,5,7,8]))),wYr=Bh(()=>Dd(()=>import("./OAuthConsentScreen-CWy6K8Uy.js"),__vite__mapDeps([27,1,2,0,5,7,8]))),CYr=()=>{const e=fh(),n=new URLSearchParams(e.search),o=n.get("question"),r=o?.replace(/^["']|["']$/g,"")??null,a=n.get("should_submit")==="true",s=dYr("/",n);return Bt.jsx(hit,{to:s,replace:!0,state:{origin:"/aicfo",message:"",queryParams:{aiCfoQuestion:r,aiCfoShouldSubmit:a?"true":"false"}}})};function Kot(){const{isOpen:e}=ow(),n=sLn(),{isAiCfoOpen:o,setIsAiCfoOpen:r}=kY(),a=m.useRef(!1),s=m.useRef(o),c=m.useRef(!1);return m.useLayoutEffect(()=>{const d=o&&!s.current;s.current=o,d&&e&&(r(!1),n(),c.current=!0)},[o,e,r,n]),m.useEffect(()=>{e&&!a.current&&(c.current=!1,o&&r(!1)),a.current=e},[e,o,r]),m.useEffect(()=>{!e&&c.current&&(c.current=!1,r(!0))},[e,r]),null}const vYr=({tenantEmailDomain:e,setTenantEmailDomain:n})=>{const o=Oi.isSignedIn(),r=Qo(z=>du(z)),a=Oi.getSignedInUser(),s=o&&Q6(a),c=Qo(z=>uLt(z)).tenantsBaseInOrder.map(z=>({companyId:z.companyId,tenantId:z.tenantId,companyName:z.companyName})),d={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:r.tenantId??""},u=tu(),p=Tc(["/:tenantEmailDomain/dashboard/*","/:tenantEmailDomain/dashboard"]),h=XAt(),g=$Y(),[f,x]=m.useState(!1),[y,b]=m.useState(null),w=m.useMemo(()=>({isAiCfoOpen:f,setIsAiCfoOpen:x,aiCfoSidePanelQuestionToSubmit:y,setAiCfoSidePanelQuestionToSubmit:b}),[f,y,x,b]),{useFeatureGate:C}=wa(),{isFeatureEnabled:v}=C(vi.isAiCfoFileUploadEnabled),{isFeatureEnabled:S}=C(vi.isBillPayCommentingEnabled),{isFeatureEnabled:A}=C(vi.isReimbursementCommentingEnabled),{isFeatureEnabled:j}=C(vi.isExpenseAutomationEnabled),{isFeatureEnabled:$}=C(vi.isExpenseAutomationEnabledV2),{isFeatureEnabled:E}=C(vi.isTreasuryCommentingEnabled),{isFeatureEnabled:L}=C(vi.isCheckingCommentingEnabled),{isFeatureEnabled:I}=C(vi.isTransactionCommentingEnabled),{isFeatureEnabled:B}=C(vi.isCardsCommentingEnabled),D=S||A||s&&j||!s&&$||E||L||I||B;return m.useEffect(()=>{!h&&f&&x(!1)},[h,f]),m.useEffect(()=>{h||u(pLt())},[u,h]),Bt.jsx(lLn,{children:r.tenantId!=null?Bt.jsx(b3r,{roomId:`dashboard_${r.companyId}`,authParams:d,users:[],companies:c,authUrlEndPoint:`${tA.tenantMicroServiceBaseUrl}/1.0/commenting/auth`,fetchZeniUsers:!0,commentingUsersUrlEndPoint:`${tA.tenantMicroServiceBaseUrl}/1.0/users/commenting-users`,isZeniUser:s,autoConnect:s||I||B,loggedInUser:a,withRoomProvider:!0,withThreadsProvider:D,threadsIndexStrategy:"roomThreads",filter:{application:"dashboard",companyId:r.companyId},children:Bt.jsxs(k1e.Provider,{value:w,children:[Bt.jsx(Kot,{}),Bt.jsxs(Xot,{children:[Bt.jsx(Got,{tenantEmailDomain:e}),Bt.jsx(Jot,{children:Bt.jsx(Zot,{setTenantEmailDomain:n,isOnDashboard:p,userHasZeniAiCfoAccess:g,isAiCfoFileUploadEnabled:v})})]})]})}):Bt.jsx(C3r,{children:Bt.jsxs(k1e.Provider,{value:w,children:[Bt.jsx(Kot,{}),Bt.jsxs(Xot,{children:[Bt.jsx(Got,{tenantEmailDomain:e}),Bt.jsx(Jot,{children:Bt.jsx(Zot,{setTenantEmailDomain:n,isOnDashboard:p,userHasZeniAiCfoAccess:g,isAiCfoFileUploadEnabled:v})})]})]})})})},Zot=({setTenantEmailDomain:e,isOnDashboard:n,userHasZeniAiCfoAccess:o,isAiCfoFileUploadEnabled:r})=>{const a=Qo(x=>x.tenantState.loggedInUser),{useDynamicConfig:s}=wa(),{configValue:c}=s(of.webappPrefetchConfig),d=typeof c.SERVICE_WORKER_BATCH_CALLS=="number"?c.SERVICE_WORKER_BATCH_CALLS:15,u=typeof c.SERVICE_WORKER_IDLE_TIMEOUT=="number"?c.SERVICE_WORKER_IDLE_TIMEOUT:3e3,p=typeof c.EXPIRATION_TIME=="number"&&c.EXPIRATION_TIME>0?c.EXPIRATION_TIME:12e5,{clearLoading:h}=AY(),{isAiCfoOpen:g,setIsAiCfoOpen:f}=kY();return m.useEffect(()=>{h(dge.APP_INITIALIZATION)},[h]),Bt.jsx(m.Suspense,{fallback:null,children:Bt.jsx(cYr,{isPageIndependent:!0,batchCalls:d,isRefreshTriggerEnabled:!1,enableIdlePrefetch:!1,idleTimeout:u,expirationTime:p,children:Bt.jsxs(rjt,{children:[Bt.jsx(Su,{path:"/magic_links/*",element:Bt.jsx(gYr,{})}),Bt.jsx(Su,{path:"/wise/callback/link-account/*",element:Bt.jsx(fYr,{})}),Bt.jsx(Su,{path:"/page-not-found",element:Bt.jsx(qot,{})}),Bt.jsx(Su,{path:"/",element:Bt.jsx(uYr,{})}),Bt.jsx(Su,{path:"/aicfo",element:Bt.jsx(CYr,{})}),Bt.jsx(Su,{path:"/onboarding/auth",element:Bt.jsx(yYr,{})}),Bt.jsx(Su,{path:"/:tenantEmailDomain/*",element:Bt.jsx(AYr,{children:Bt.jsxs(cGr,{children:[Bt.jsxs($Yr,{children:[a!=null?Bt.jsx(oYr,{}):null,n?Bt.jsx(Yot,{setTenantEmailDomain:e}):Bt.jsx(mae,{children:Bt.jsx(Yot,{setTenantEmailDomain:e})})]}),o?Bt.jsxs(Bt.Fragment,{children:[Bt.jsx(RQr,{}),Bt.jsx(jYr,{isOpen:g,children:Bt.jsx(GGr,{isOpen:g,onClose:()=>f(!1),isFileUploadEnabled:r})})]}):null]})})}),Bt.jsx(Su,{path:"/signin/auth",element:Bt.jsx(mae,{children:Bt.jsx(hYr,{setTenantEmailDomain:e})})}),Bt.jsx(Su,{path:"/signin/magic-link",element:Bt.jsx(mae,{children:Bt.jsx(mYr,{})})}),Bt.jsx(Su,{path:"/signout",element:Bt.jsx(bYr,{})}),Bt.jsx(Su,{path:"/connection/auth",element:Bt.jsx(pYr,{})}),Bt.jsx(Su,{path:"/oauth/hubspot/callback",element:Bt.jsx(xYr,{})}),Bt.jsx(Su,{path:"/oauth/authorize",element:Bt.jsx(wYr,{})}),Bt.jsx(Su,{path:"*",element:Bt.jsx(qot,{})})]})})})},Jot=({children:e})=>{const{isOpen:n,width:o}=ow();return Bt.jsx(kYr,{commentsDrawerWidth:n?o:0,children:e})},SYr=On("div")`
80989
+ `,oYr=()=>{const[e,n]=m.useState(()=>Oi.getSignedInUser()),o=tu(),[r,a]=m.useState(!1),[s,c]=m.useState(!1),d=Qo(g=>prt(g).fetchState),u=Qo(g=>du(g));m.useEffect(()=>{const g=e!=null&&e.authProvider==="email"&&(!e?.firstName||!e?.lastName||!e.phoneNumber);a(g)},[e]);const p=m.useCallback(()=>{const g=Oi.getSignedInUser();n(f=>JSON.stringify(f)!==JSON.stringify(g)?g:f)},[]);m.useEffect(()=>(window.addEventListener("completeProfileDone",p),()=>{window.removeEventListener("completeProfileDone",p)}),[]),m.useEffect(()=>{d!=="In-Progress"&&d!=="Completed"&&o(dLt(u.companyId))},[d,u.companyId,o]);const h=m.useMemo(()=>!!e?.firstName&&!e?.phoneNumber,[e]);return Bt.jsxs(m.Fragment,{children:[s&&Bt.jsx(s0e,{showConfetti:!0}),e?.userEmail!=null&&e.authProvider==="email"?Bt.jsx(tYr,{userEmail:e.userEmail,isCompleteProfileOpen:r,closeDrawerHandler:()=>{a(!1),c(!0)},hasUserEnteredBasicDetails:h}):null]})},Hot="init-enter",iYr=m.memo(function({location:e,visitedUrl:n}){const{pathname:o}=e;return m.useLayoutEffect(()=>{const r=n.get(o||Hot);rYr(r!==void 0?r:0)}),null},(e,n)=>{const{location:o,visitedUrl:r}=e,{location:a}=n,s=o.pathname||Hot,c=aYr();return r.set(s,c),!((a.pathname!==o.pathname||a.search!==o.search)&&a.hash==="")}),rYr=(e=0)=>window.requestAnimationFrame(()=>{window.scrollTo(0,e)}),aYr=()=>{let e=0;return document!=null&&document.documentElement!==null&&(e=document.documentElement.scrollTop),window.pageYOffset||e},Bh=e=>m.lazy(async()=>{const n=e.toString(),o=Oi.getForceRefreshedComponents(),r=new Set(o),a=Oi.isSignedIn(),s=r.has(n);try{const c=await e();return r.delete(n),a&&Oi.saveForceRefreshedComponents(Array.from(r)),c}catch(c){throw s||(r.add(n),a&&Oi.saveForceRefreshedComponents(Array.from(r)),location.reload()),c}}),A$t=globalThis.window?.location.href.startsWith("https://delhi-dot-zeni"),$$t=globalThis.window?.location.href.startsWith("https://pune-dot-zeni"),j$t=globalThis.window?.location.href.startsWith("https://sunnyvale-dot-zeni"),E$t=globalThis.window?.location.href.startsWith("https://dev.app.zeni.ai");function ps(...e){const n=Oc==="DEV"||Oc==="QA";if(A$t||$$t||j$t||E$t)return void console.log(...e);const o=globalThis.window!==void 0&&(globalThis.window.location.hostname==="localhost"||globalThis.window.location.hostname==="127.0.0.1")&&globalThis.window.location.port==="3000";n&&o&&console.log(...e)}function ck(...e){const n=Oc==="DEV"||Oc==="QA";if(A$t||$$t||j$t||E$t)return void console.warn(...e);const o=globalThis.window!==void 0&&(globalThis.window.location.hostname==="localhost"||globalThis.window.location.hostname==="127.0.0.1")&&globalThis.window.location.port==="3000";n&&o&&console.warn(...e)}let jv=null,HE=!1;const hs=Oc==="PROD"?"https://api.zeni.ai":Oc==="DEV"?"https://dev.api.zeni.ai":"https://qa.api.zeni.ai";function Uot(e){const n=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["months"]})),o=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["quarters"]})),r=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["years"]})),a=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["months"]})),s=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["quarters"]})),c=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["years"]})),d=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["months"]})),u=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["quarters"]})),p=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["years"]}));return[{url:`${hs}/accounting/2.0/reports/profit_and_loss?query=${n}`,priority:"HIGH",reason:"Reports - Profit & Loss by Months (first load)",apiType:"reports"},{url:`${hs}/accounting/2.0/reports/profit_and_loss?query=${o}`,priority:"HIGH",reason:"Reports - Profit & Loss by Quarters (first load)",apiType:"reports"},{url:`${hs}/accounting/2.0/reports/profit_and_loss?query=${r}`,priority:"HIGH",reason:"Reports - Profit & Loss by Years (first load)",apiType:"reports"},{url:`${hs}/accounting/2.0/reports/balance_sheet?query=${a}`,priority:"HIGH",reason:"Reports - Balance Sheet by Months (first load)",apiType:"reports"},{url:`${hs}/accounting/2.0/reports/balance_sheet?query=${s}`,priority:"HIGH",reason:"Reports - Balance Sheet by Quarters (first load)",apiType:"reports"},{url:`${hs}/accounting/2.0/reports/balance_sheet?query=${c}`,priority:"HIGH",reason:"Reports - Balance Sheet by Years (first load)",apiType:"reports"},{url:`${hs}/accounting/2.0/reports/cash_flow?query=${d}`,priority:"HIGH",reason:"Reports - Cash Flow by Months (first load)",apiType:"reports"},{url:`${hs}/accounting/2.0/reports/cash_flow?query=${u}`,priority:"HIGH",reason:"Reports - Cash Flow by Quarters (first load)",apiType:"reports"},{url:`${hs}/accounting/2.0/reports/cash_flow?query=${p}`,priority:"HIGH",reason:"Reports - Cash Flow by Years (first load)",apiType:"reports"}]}const lYr={dashboard:function(e){return[...Uot()]},reports:Uot,aging:function(e){return[]},transactions:function(e){return[]},forecast:function(e){const n=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["months"],forecast_id:e.forecastId,is_forecast_vs_actual:!0})),o=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["quarters"],forecast_id:e.forecastId,is_forecast_vs_actual:!0})),r=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["years"],forecast_id:e.forecastId,is_forecast_vs_actual:!0}));return[{url:`${hs}/accounting/2.0/reports/profit_and_loss?query=${n}`,priority:"HIGH",reason:"Forecast - Profit & Loss by Months (first load)",apiType:"forecast"},{url:`${hs}/accounting/2.0/reports/profit_and_loss?query=${o}`,priority:"HIGH",reason:"Forecast - Profit & Loss by Quarters (first load)",apiType:"forecast"},{url:`${hs}/accounting/2.0/reports/profit_and_loss?query=${r}`,priority:"HIGH",reason:"Forecast - Profit & Loss by Years (first load)",apiType:"forecast"}]},checking:function(e){const n=encodeURIComponent(JSON.stringify({is_include_deposit_accounts_summary:!0}));return[{url:`${hs}/banking/1.0/deposit-accounts?query=${n}`,priority:"HIGH",reason:"Checking - Deposit Accounts (first load)",apiType:"checking"},{url:`${hs}/pay/1.0/payment-accounts`,priority:"HIGH",reason:"Checking - Payment Accounts (first load)",apiType:"checking"},{url:`${hs}/banking/1.0/baas/config`,priority:"HIGH",reason:"Checking - BAAS Config (first load)",apiType:"checking"}]},rewards:function(e){const n=encodeURIComponent(JSON.stringify({is_primary_refer_reward_plan:!0}));return[{url:`${hs}/tenant/1.0/company-refer-reward-plan?query=${n}`,priority:"HIGH",reason:"Rewards Page - Rewards Plan (first load)",apiType:"rewards"},{url:`${hs}/tenant/1.0/company-referrals`,priority:"HIGH",reason:"Rewards Page - Referrals (first load)",apiType:"rewards"}]},people:function(e){const n=encodeURIComponent(JSON.stringify({is_manager_candidate:!0})),{companyId:o}=e,r=encodeURIComponent(JSON.stringify({view:"passport"}));return[{url:`${hs}/tenant/1.0/user-roles`,priority:"HIGH",reason:"People Page - User Roles (first load)",apiType:"people"},{url:`${hs}/tenant/1.0/users?query=${n}`,priority:"HIGH",reason:"People Page - Users (first load)",apiType:"people"},{url:`${hs}/accounting/1.0/classes`,priority:"HIGH",reason:"People Page - Classes (first load)",apiType:"people"},{url:`${hs}/tenant/1.0/companies/${o}?query=${r}`,priority:"HIGH",reason:"People Page - Company Passport (first load)",apiType:"people"}]}};function Wot(e){const{currentPage:n,isRewardsFeatureEnabled:o,isPeopleTabVisible:r,isReportsPageVisible:a,isPageIndependent:s=!1}=e,c=(0,lYr[s?"dashboard":n])(e),d=c.filter(u=>o===!1&&u.reason.includes("Rewards")?(ps(`[Prefetch Manager - Service Worker] ⚠️ Skipping rewards URL (feature disabled): ${u.url}`),!1):r===!1&&u.reason.includes("People")?(ps(`[Prefetch Manager - Service Worker] ⚠️ Skipping people URL (feature disabled): ${u.url}`),!1):a!==!1||!u.reason.includes("Reports")||(ps(`[Prefetch Manager - Service Worker] ⚠️ Skipping reports URL (feature disabled): ${u.url}`),!1));return ps(`[Prefetch Manager - Service Worker] 📋 Prefetch list: ${c.length} total, ${d.length} after filtering`),d}async function Qot(e,n=0,o){if("serviceWorker"in navigator)try{const r=await async function(u=1e4){if(!("serviceWorker"in navigator))throw new Error("Service Worker not supported");if(navigator.serviceWorker.controller)return navigator.serviceWorker.ready;const p=await navigator.serviceWorker.ready;return navigator.serviceWorker.controller!=null?p:new Promise((h,g)=>{const f=Date.now();let x=100;const y=()=>navigator.serviceWorker.controller?(C(),void h(p)):Date.now()-f>=u?(C(),void(p.active?(ps("[Prefetch Manager - Service Worker] ⚠️ No controller but SW is active, proceeding anyway"),h(p)):g(new Error("Service Worker controller timeout")))):(x=Math.min(1.5*x,1e3),void(b=setTimeout(y,x)));let b;const w=()=>{navigator.serviceWorker.controller&&(C(),h(p))},C=()=>{clearTimeout(b),navigator.serviceWorker.removeEventListener("controllerchange",w)};navigator.serviceWorker.addEventListener("controllerchange",w),b=setTimeout(y,x)})}(1e4),a=navigator.serviceWorker.controller||r.active;if(!a)return void ck("[Prefetch Manager - Service Worker] No active Service Worker available");const s=function(u){const p={HIGH:0,MEDIUM:1,LOW:2};return u.sort((h,g)=>p[h.priority]-p[g.priority])}(e);ps("[Prefetch Manager - Service Worker] 📋 Sending prefetch list to SW:",{total:s.length,high:s.filter(u=>u.priority==="HIGH").length,medium:s.filter(u=>u.priority==="MEDIUM").length,low:s.filter(u=>u.priority==="LOW").length,batchSize:n>0?n:"disabled",expirationTime:o??"20 minutes",viaController:!!navigator.serviceWorker.controller}),s.forEach((u,p)=>{ps(`[Prefetch Manager - Service Worker] ${p+1}. [${u.priority}] ${u.reason} - ${u.url}`),ps(` URL: ${u.url}`)});const c=zT(),d={"zeni-session-id":c.sessionId,"zeni-user-id":c.userId,"zeni-tenant-id":c.tenantId};a.postMessage({type:"PREFETCH_URLS",payload:{urls:s.map(u=>({url:u.url,priority:u.priority,apiType:u.apiType})),authHeaders:d,batchSize:n,expirationTime:o}}),ps("[Prefetch Manager - Service Worker] ✅ Prefetch request sent to Service Worker")}catch(r){ck("[Prefetch Manager - Service Worker] Failed to send prefetch request:",r instanceof Error?r.message:"Unknown error")}else ck("[Prefetch Manager - Service Worker] Service Worker not supported in this browser")}function sYr({children:e,currentPage:n,tenantId:o,batchCalls:r=0,expirationTime:a,delay:s=1e3,enabled:c=!0,enableIdlePrefetch:d=!1,features:u,forecastId:p,idleTimeout:h=2e3,isPageIndependent:g=!1,isRefreshTriggerEnabled:f=!1}){const[x,y]=m.useState(!1),[b,w]=m.useState(!1),C=m.useRef(null),v=fh(),S=Oi.getSignedInUser(),{useFeatureGate:A}=wa(),{isFeatureEnabled:j}=A(vi.isReferralFeatureEnabled),$=gn(),E=c6($?.loggedInUserRole??[]),L=Qo(U=>du(U)),{isFeatureEnabled:I}=A(vi.isDebitCardFeatureEnabled),B=art(I,L),D=rrt(L),z=B===!1&&D===!1;return m.useEffect(()=>{if(!c||x||!S||!o)return;const U=Wot({currentPage:n,userId:S.userId,tenantId:o,sessionId:S.zeniSessionId??"",features:u,forecastId:p,isRewardsFeatureEnabled:j,isPeopleTabVisible:E,isReportsPageVisible:z,companyId:L?.companyId??"",isPageIndependent:g}),R=g?"dashboard":n;if(U.length===0)return void ps(`[Prefetch Provider - ${R}${g?" (base)":""}] No URLs to prefetch`);ps(`[Prefetch Provider - ${R}${g?" (base)":""}] 📦 Generated ${U.length} URLs to prefetch`);const O=setTimeout(()=>{Qot(U,r,a).catch(N=>{ck(`[Prefetch Provider - ${R}${g?" (base)":""}] Prefetch failed:`,N)}),y(!0)},s);return()=>clearTimeout(O)},[c,x,S,o,n,u,p,j,E,z,L?.companyId,g,r,a,s,v.pathname]),m.useEffect(()=>{y(!1)},[o,v.pathname]),m.useEffect(()=>{g||(y(!1),w(!1))},[v.pathname,g]),m.useEffect(()=>{if(C.current&&(C.current(),C.current=null),!(c&&d&&S&&o)||b)return;ps(`[Prefetch Provider - Idle] 👀 Setting up idle prefetch detection (timeout: ${h}ms)`);const U=function(R){const{timeout:O=2e3,onIdle:N}=R;ps(`[Idle Detection - Service Worker] 👀 Starting Idle Detection - Service Worker (timeout: ${O}ms)`);const F=()=>{HE&&(ps("[Idle Detection - Service Worker] 🏃 User became active again"),HE=!1),jv&&clearTimeout(jv),jv=setTimeout(()=>{HE||(ps("[Idle Detection - Service Worker] ⏱️ Browser is now IDLE"),HE=!0,N())},O)},H=["mousedown","mousemove","keypress","scroll","touchstart","click"];return H.forEach(_=>{document.addEventListener(_,F,!0)}),F(),()=>{ps("[Idle Detection - Service Worker] 🛑 Stopping Idle Detection - Service Worker"),jv&&(clearTimeout(jv),jv=null),H.forEach(_=>{document.removeEventListener(_,F,!0)}),HE=!1}}({timeout:h,onIdle:()=>{if(b)return;ps("[Prefetch Provider - Idle] ⏱️ Browser is idle, fetching prefetch list with isIdleCallEnabled=true");const R=Wot({currentPage:n,userId:S.userId,tenantId:o,sessionId:S.zeniSessionId??"",features:u,forecastId:p,isRewardsFeatureEnabled:j,isPeopleTabVisible:E,isReportsPageVisible:z,companyId:L.companyId,isPageIndependent:g,isIdleCallEnabled:!0}),O=g?"dashboard":n;R.length!==0?(ps(`[Prefetch Provider - Idle - ${O}${g?" (base)":""}] 📦 Generated ${R.length} URLs to prefetch on idle`),Qot(R,r,a).catch(N=>{ck(`[Prefetch Provider - Idle - ${O}${g?" (base)":""}] Idle prefetch failed:`,N)}),w(!0)):ps(`[Prefetch Provider - Idle - ${O}${g?" (base)":""}] No URLs to prefetch on idle`)}});return C.current=U,()=>{C.current&&(C.current(),C.current=null)}},[c,d,h,S,o,b,n,u,p,j,E,z,L.companyId,g,r,a]),m.useEffect(()=>{w(!1)},[o]),m.useEffect(()=>{(function(){const U=performance.getEntriesByType("navigation");if(U.length>0)return U[0].type==="reload";const R=performance.navigation;return!(!R||typeof R.type!="number")&&R.type===1})()&&f&&(ps("[Prefetch Provider] 🔄 Page refresh detected - will bypass cache for fresh data"),async function(){if("serviceWorker"in navigator)try{const U=await navigator.serviceWorker.ready,R=navigator.serviceWorker.controller||U.active;if(!R)return;ps("[Prefetch Provider] 🔄 Page refresh detected, notifying service worker to bypass cache"),R.postMessage({type:"PAGE_REFRESH",payload:{timestamp:Date.now()}})}catch(U){ck("[Prefetch Provider] Failed to notify service worker of refresh:",U)}}())},[]),Bt.jsx(Bt.Fragment,{children:e})}function cYr({children:e,isPageIndependent:n=!1,batchCalls:o=0,enableIdlePrefetch:r=!1,expirationTime:a,idleTimeout:s=2e3,isRefreshTriggerEnabled:c=!1}){const d=fh(),u=Qo(y=>du(y)),p=(h=d.pathname).includes("/dashboard")?"dashboard":h.includes("/reports")||h.includes("/financials")?"reports":h.includes("/aging")?"aging":h.includes("/transactions")?"transactions":h.includes("/forecast")?"forecast":h.includes("/checking")||h.includes("/bank-accounts")?"checking":h.includes("/rewards")?"rewards":null;var h;const g=u.tenantId,{useFeatureGate:f}=wa(),{isFeatureEnabled:x}=f(vi.isServiceWorkerPrefetchingEnabled);return g&&p?Bt.jsx(sYr,{currentPage:p,tenantId:g,delay:5e3,enabled:x,batchCalls:o,enableIdlePrefetch:r,expirationTime:a,idleTimeout:s,isRefreshTriggerEnabled:c,isPageIndependent:n,children:e}):Bt.jsx(Bt.Fragment,{children:e})}function dYr(e,n){const o=go.extractUtmParamsFromUrl(n),r=new URLSearchParams(o).toString();if(!r)return e;const a=e.includes("?")?"&":"?";return`${e}${a}${r}`}const uYr=Bh(()=>Dd(()=>import("./DefaultTenantHome-CXh59aBD.js"),__vite__mapDeps([4,1,2,0,5,6,7,8]))),Got=Bh(()=>Dd(()=>Promise.resolve().then(()=>MGr),void 0)),Yot=Bh(()=>Dd(()=>import("./ScreenRoutes-CEUjM6GK.js"),__vite__mapDeps([9,0,1,2,5,10,6,7,8]))),pYr=Bh(()=>Dd(()=>import("./ConnectionAuthScreen-BT3IRUL8.js"),__vite__mapDeps([11,1,2,0,5,6,12,8,13,14,15,16,17,7]))),hYr=Bh(()=>Dd(()=>import("./SignInScreen-jXShH9LP.js"),__vite__mapDeps([18,1,2,0,5,19,10,6,7,8]))),mYr=Bh(()=>Dd(()=>import("./MagicLinkSignInScreen-BsUi7-40.js"),__vite__mapDeps([20,1,2,0,5,19,10,6,7,8]))),qot=Bh(()=>Dd(()=>import("./NotFoundScreen-D0AQGcoe.js"),__vite__mapDeps([21,1,2,0,5,7,8]))),gYr=Bh(()=>Dd(()=>import("./MagicLinkRoutes-6x7Us6_Q.js"),__vite__mapDeps([22,1,2,0,5,21,7,8]))),fYr=Bh(()=>Dd(()=>import("./WiseConfirmationScreen-D-axhjl6.js"),__vite__mapDeps([23,1,2,0,5,7,8]))),xYr=Bh(()=>Dd(()=>import("./HubSpotOAuthCallbackScreen-DeESKpku.js"),__vite__mapDeps([24,1,2,0,5,7,8]))),yYr=Bh(()=>Dd(()=>import("./CustomerOnboardingAuthScreen-BAn5X2Wb.js"),__vite__mapDeps([25,1,2,0,12,8,13,14,15,16,5,17,7]))),bYr=Bh(()=>Dd(()=>import("./SignOutScreen-CnWA4YZp.js"),__vite__mapDeps([26,1,2,0,5,7,8]))),wYr=Bh(()=>Dd(()=>import("./OAuthConsentScreen-DkCTDJwq.js"),__vite__mapDeps([27,1,2,0,5,7,8]))),CYr=()=>{const e=fh(),n=new URLSearchParams(e.search),o=n.get("question"),r=o?.replace(/^["']|["']$/g,"")??null,a=n.get("should_submit")==="true",s=dYr("/",n);return Bt.jsx(hit,{to:s,replace:!0,state:{origin:"/aicfo",message:"",queryParams:{aiCfoQuestion:r,aiCfoShouldSubmit:a?"true":"false"}}})};function Kot(){const{isOpen:e}=ow(),n=sLn(),{isAiCfoOpen:o,setIsAiCfoOpen:r}=kY(),a=m.useRef(!1),s=m.useRef(o),c=m.useRef(!1);return m.useLayoutEffect(()=>{const d=o&&!s.current;s.current=o,d&&e&&(r(!1),n(),c.current=!0)},[o,e,r,n]),m.useEffect(()=>{e&&!a.current&&(c.current=!1,o&&r(!1)),a.current=e},[e,o,r]),m.useEffect(()=>{!e&&c.current&&(c.current=!1,r(!0))},[e,r]),null}const vYr=({tenantEmailDomain:e,setTenantEmailDomain:n})=>{const o=Oi.isSignedIn(),r=Qo(z=>du(z)),a=Oi.getSignedInUser(),s=o&&Q6(a),c=Qo(z=>uLt(z)).tenantsBaseInOrder.map(z=>({companyId:z.companyId,tenantId:z.tenantId,companyName:z.companyName})),d={userId:a?.userId??"",sessionId:a?.zeniSessionId??"",tenantId:r.tenantId??""},u=tu(),p=Tc(["/:tenantEmailDomain/dashboard/*","/:tenantEmailDomain/dashboard"]),h=XAt(),g=$Y(),[f,x]=m.useState(!1),[y,b]=m.useState(null),w=m.useMemo(()=>({isAiCfoOpen:f,setIsAiCfoOpen:x,aiCfoSidePanelQuestionToSubmit:y,setAiCfoSidePanelQuestionToSubmit:b}),[f,y,x,b]),{useFeatureGate:C}=wa(),{isFeatureEnabled:v}=C(vi.isAiCfoFileUploadEnabled),{isFeatureEnabled:S}=C(vi.isBillPayCommentingEnabled),{isFeatureEnabled:A}=C(vi.isReimbursementCommentingEnabled),{isFeatureEnabled:j}=C(vi.isExpenseAutomationEnabled),{isFeatureEnabled:$}=C(vi.isExpenseAutomationEnabledV2),{isFeatureEnabled:E}=C(vi.isTreasuryCommentingEnabled),{isFeatureEnabled:L}=C(vi.isCheckingCommentingEnabled),{isFeatureEnabled:I}=C(vi.isTransactionCommentingEnabled),{isFeatureEnabled:B}=C(vi.isCardsCommentingEnabled),D=S||A||s&&j||!s&&$||E||L||I||B;return m.useEffect(()=>{!h&&f&&x(!1)},[h,f]),m.useEffect(()=>{h||u(pLt())},[u,h]),Bt.jsx(lLn,{children:r.tenantId!=null?Bt.jsx(b3r,{roomId:`dashboard_${r.companyId}`,authParams:d,users:[],companies:c,authUrlEndPoint:`${tA.tenantMicroServiceBaseUrl}/1.0/commenting/auth`,fetchZeniUsers:!0,commentingUsersUrlEndPoint:`${tA.tenantMicroServiceBaseUrl}/1.0/users/commenting-users`,isZeniUser:s,autoConnect:s||I||B,loggedInUser:a,withRoomProvider:!0,withThreadsProvider:D,threadsIndexStrategy:"roomThreads",filter:{application:"dashboard",companyId:r.companyId},children:Bt.jsxs(k1e.Provider,{value:w,children:[Bt.jsx(Kot,{}),Bt.jsxs(Xot,{children:[Bt.jsx(Got,{tenantEmailDomain:e}),Bt.jsx(Jot,{children:Bt.jsx(Zot,{setTenantEmailDomain:n,isOnDashboard:p,userHasZeniAiCfoAccess:g,isAiCfoFileUploadEnabled:v})})]})]})}):Bt.jsx(C3r,{children:Bt.jsxs(k1e.Provider,{value:w,children:[Bt.jsx(Kot,{}),Bt.jsxs(Xot,{children:[Bt.jsx(Got,{tenantEmailDomain:e}),Bt.jsx(Jot,{children:Bt.jsx(Zot,{setTenantEmailDomain:n,isOnDashboard:p,userHasZeniAiCfoAccess:g,isAiCfoFileUploadEnabled:v})})]})]})})})},Zot=({setTenantEmailDomain:e,isOnDashboard:n,userHasZeniAiCfoAccess:o,isAiCfoFileUploadEnabled:r})=>{const a=Qo(x=>x.tenantState.loggedInUser),{useDynamicConfig:s}=wa(),{configValue:c}=s(of.webappPrefetchConfig),d=typeof c.SERVICE_WORKER_BATCH_CALLS=="number"?c.SERVICE_WORKER_BATCH_CALLS:15,u=typeof c.SERVICE_WORKER_IDLE_TIMEOUT=="number"?c.SERVICE_WORKER_IDLE_TIMEOUT:3e3,p=typeof c.EXPIRATION_TIME=="number"&&c.EXPIRATION_TIME>0?c.EXPIRATION_TIME:12e5,{clearLoading:h}=AY(),{isAiCfoOpen:g,setIsAiCfoOpen:f}=kY();return m.useEffect(()=>{h(dge.APP_INITIALIZATION)},[h]),Bt.jsx(m.Suspense,{fallback:null,children:Bt.jsx(cYr,{isPageIndependent:!0,batchCalls:d,isRefreshTriggerEnabled:!1,enableIdlePrefetch:!1,idleTimeout:u,expirationTime:p,children:Bt.jsxs(rjt,{children:[Bt.jsx(Su,{path:"/magic_links/*",element:Bt.jsx(gYr,{})}),Bt.jsx(Su,{path:"/wise/callback/link-account/*",element:Bt.jsx(fYr,{})}),Bt.jsx(Su,{path:"/page-not-found",element:Bt.jsx(qot,{})}),Bt.jsx(Su,{path:"/",element:Bt.jsx(uYr,{})}),Bt.jsx(Su,{path:"/aicfo",element:Bt.jsx(CYr,{})}),Bt.jsx(Su,{path:"/onboarding/auth",element:Bt.jsx(yYr,{})}),Bt.jsx(Su,{path:"/:tenantEmailDomain/*",element:Bt.jsx(AYr,{children:Bt.jsxs(cGr,{children:[Bt.jsxs($Yr,{children:[a!=null?Bt.jsx(oYr,{}):null,n?Bt.jsx(Yot,{setTenantEmailDomain:e}):Bt.jsx(mae,{children:Bt.jsx(Yot,{setTenantEmailDomain:e})})]}),o?Bt.jsxs(Bt.Fragment,{children:[Bt.jsx(RQr,{}),Bt.jsx(jYr,{isOpen:g,children:Bt.jsx(GGr,{isOpen:g,onClose:()=>f(!1),isFileUploadEnabled:r})})]}):null]})})}),Bt.jsx(Su,{path:"/signin/auth",element:Bt.jsx(mae,{children:Bt.jsx(hYr,{setTenantEmailDomain:e})})}),Bt.jsx(Su,{path:"/signin/magic-link",element:Bt.jsx(mae,{children:Bt.jsx(mYr,{})})}),Bt.jsx(Su,{path:"/signout",element:Bt.jsx(bYr,{})}),Bt.jsx(Su,{path:"/connection/auth",element:Bt.jsx(pYr,{})}),Bt.jsx(Su,{path:"/oauth/hubspot/callback",element:Bt.jsx(xYr,{})}),Bt.jsx(Su,{path:"/oauth/authorize",element:Bt.jsx(wYr,{})}),Bt.jsx(Su,{path:"*",element:Bt.jsx(qot,{})})]})})})},Jot=({children:e})=>{const{isOpen:n,width:o}=ow();return Bt.jsx(kYr,{commentsDrawerWidth:n?o:0,children:e})},SYr=On("div")`
80990
80990
  display:flex;
80991
80991
  `,Xot=On("div")`
80992
80992
  display: flex;
@@ -81108,4 +81108,4 @@ ${Wa.beneficiaryAddress} ${X}`,d(ye),I(!0)})(o),"data-testid":Y("title-text-copy
81108
81108
  }
81109
81109
  `,MYr=({fetchState:e,style:n})=>e==="In-Progress"||e==="Not-Started"?Bt.jsxs(LYr,{style:n,children:[Bt.jsxs(TYr,{children:[Bt.jsx(NO,{children:Bt.jsx(Jh,{width:96,height:20})}),Bt.jsxs(NO,{children:[Bt.jsx(Jh,{width:55,height:12}),Bt.jsx(Jh,{width:78,height:16}),Bt.jsx(Jh,{width:46,height:16})]}),Bt.jsxs(NO,{children:[Bt.jsx(Jh,{width:55,height:12}),Bt.jsx(Jh,{width:110,height:16}),Bt.jsx(Jh,{width:84,height:16})]}),Bt.jsxs(NO,{children:[Bt.jsx(Jh,{width:55,height:12}),Bt.jsx(Jh,{width:84,height:16}),Bt.jsx(Jh,{width:64,height:16})]})]}),Bt.jsxs(DYr,{children:[Bt.jsxs(PYr,{children:[Bt.jsx(Jh,{width:106,height:27}),Bt.jsx(Jh,{width:111,height:32})]}),Bt.jsx(BYr,{children:Bt.jsx(IYr,{width:96,height:96})})]})]}):null;function zYr({minDisplayTime:e=0}){const{isLoading:n}=AY(),[o,r]=m.useState(!1),a=m.useRef(),s=m.useRef(null);return m.useLayoutEffect(()=>{if(a.current&&clearTimeout(a.current),Oi.isSignedIn()===!1&&document.querySelector("#app-shell-loader")?.remove(),n)o||(r(!0),s.current=Date.now());else if(!n&&o){document.querySelector("#app-shell-loader")?.remove();const c=s.current;if(c!=null){const d=Date.now()-c,u=Math.max(0,e-d);a.current=setTimeout(()=>{r(!1),s.current=null},u)}else r(!1)}},[n,o,e]),m.useEffect(()=>()=>{a.current&&clearTimeout(a.current)},[]),!n&&o||!o?null:Bt.jsx(MYr,{fetchState:"In-Progress"})}const eit="missing-receipts-batch-completed",O8=new class{state={activeTenantFetchFired:new Set,activeTenantFetchInProgress:!1,allTenantsFetchFired:!1,allTenantsFetchInProgress:!1,connectionsFetchFired:new Set,excludedResourcesFetchFired:new Set};reset(){this.state={activeTenantFetchFired:new Set,activeTenantFetchInProgress:!1,allTenantsFetchFired:!1,allTenantsFetchInProgress:!1,connectionsFetchFired:new Set,excludedResourcesFetchFired:new Set}}shouldFetchActiveTenant(e){return!this.state.activeTenantFetchInProgress&&!this.state.activeTenantFetchFired.has(e)}markActiveTenantFetchStarted(e){this.state.activeTenantFetchInProgress=!0,this.state.activeTenantFetchFired.add(e)}markActiveTenantFetchCompleted(e){this.state.activeTenantFetchInProgress=!1}markActiveTenantFetchFailed(e){this.state.activeTenantFetchInProgress=!1}shouldFetchAllTenants(){return!this.state.allTenantsFetchInProgress&&!this.state.allTenantsFetchFired}markAllTenantsFetchStarted(){this.state.allTenantsFetchInProgress=!0,this.state.allTenantsFetchFired=!0}markAllTenantsFetchCompleted(){this.state.allTenantsFetchInProgress=!1}markAllTenantsFetchFailed(){this.state.allTenantsFetchInProgress=!1,this.state.allTenantsFetchFired=!1}shouldFetchExcludedResources(e){return!this.state.excludedResourcesFetchFired.has(e)}markExcludedResourcesFetchStarted(e){this.state.excludedResourcesFetchFired.add(e)}shouldFetchConnections(e){return!this.state.connectionsFetchFired.has(e)}markConnectionsFetchStarted(e){this.state.connectionsFetchFired.add(e)}clearTenant(e){this.state.activeTenantFetchFired.delete(e),this.state.connectionsFetchFired.delete(e),this.state.excludedResourcesFetchFired.delete(e)}clearAllFiredStates(){this.state.activeTenantFetchFired.clear(),this.state.connectionsFetchFired.clear(),this.state.excludedResourcesFetchFired.clear(),this.state.allTenantsFetchInProgress||(this.state.allTenantsFetchFired=!1)}getState(){return{...this.state,activeTenantFetchFired:Array.from(this.state.activeTenantFetchFired)}}};Z.updateAppLocaleID("en");let Kv=null;function FYr(){return Kv===null&&(Kv=function(){console.warn(`initializing epic state with url ${JSON.stringify(tA)}`);const e=Oi.getSignedInUser(),n=e!=null?function(){const a=window.location.pathname.split("/").filter(Boolean)[0],s=["signin","signout"];if(a!=null&&!s.includes(a)){const d=Oi.getSignedInUserTenant(a);if(d?.tenantId!=null)return d.tenantId}return Oi.getActiveTenantForUser()?.tenantId}():void 0,o=fLt(tA,e?.userId,e?.zeniSessionId,n,sk(),_Yr);wae();const r=zT();return r.userId!=null&&Ad.identify(r.userId,{tenant_id:r.tenantId}),o}(),wae().then(()=>{Kv!=null&&(O8.reset(),NYr(Kv))}).catch(e=>{console.error("Failed to load feature epics:",e),_$t(e,{tags:{critical:"true",module:"epicManager"}}),alert(`The application failed to load required modules. Some features may not work correctly.
81110
81110
 
81111
- Please refresh the page to try again.`)})),Kv}function $Jr(){return Kv}const _O=new mLt,tit=()=>{const e=tu(),n=Oi.getSignedInUser(),o=Qo(w=>du(w)),[r,a]=m.useState(null),s=function(w){const{useDynamicConfig:C}=wa(),{configValue:v,isDynamicConfigLoading:S}=C(Wpe.sessionAutoLogoutConfig),A=v!=null&&Object.keys(v).length>0;if(S||w==null||!A)return cF;const j=_Qe(v.users_disabled_for_auto_logout),$=_Qe(v.users_enabled_for_auto_logout),E=v.is_inactivity_based_logout_feature_enabled===!0,L=j.includes(w),I=!L&&$.includes(w);return{heartbeatIntervalMinutes:L?0:Voe(v.heartbeat_interval_minutes,cF.heartbeatIntervalMinutes),idleTimeoutMinutes:Voe(v.idle_timeout_minutes,cF.idleTimeoutMinutes),isAutoLogoutEnabled:!L&&(I||E),warningDurationSeconds:Voe(v.warning_duration_seconds,cF.warningDurationSeconds)}}(n?.userId),c=m.useCallback((w="manual")=>{w==="auto-logout"?function(C){try{sessionStorage.setItem(d0e,"auto-logout"),sessionStorage.setItem(u0e,String(C.idleTimeoutMinutes)),sessionStorage.setItem(p0e,String(Date.now())),nL=void 0}catch{}}({idleTimeoutMinutes:s.idleTimeoutMinutes}):(g5t(),nL=void 0),a(null),_O.stop(),e(bLt()),e(wLt(!1)),Oi.clearAll(),window.location.href="/signin/auth"},[e,a,s.idleTimeoutMinutes]);m.useEffect(()=>{if(n?.zeniSessionId!=null)return _O.start({idleTimeoutMinutes:s.idleTimeoutMinutes,warningDurationSeconds:s.warningDurationSeconds,heartbeatIntervalMinutes:s.heartbeatIntervalMinutes,isAutoLogoutEnabled:s.isAutoLogoutEnabled},{onHeartbeat:()=>e(CLt()),onWarningStart:w=>{Ad.trackSessionTimeoutPopupShown(w),a(w)},onWarningTick:a,onAutoLogout:()=>{Ad.trackSessionTimeoutAutoLogout(),c("auto-logout")},onSessionExtended:()=>a(null)}),()=>_O.stop()},[n?.zeniSessionId,s.isAutoLogoutEnabled,s.idleTimeoutMinutes,s.warningDurationSeconds,s.heartbeatIntervalMinutes,e,c,a]);const d=Qo(w=>vLt(w,o.companyId)),u=Tc(["/:tenantEmailDomain/dashboard/*","/:tenantEmailDomain/dashboard"]),p=o?.excludedResources?.fetchState==="Completed"?o.excludedResources.resources:[];m.useEffect(()=>()=>{e(Jge())},[]);const h=Qo(w=>SLt(w));(()=>{const w=gge(),C=tu(),{useFeatureGate:v}=wa(),{isFeatureEnabled:S}=v(vi.isMissingReceiptsBulkUploadEnabled);m.useEffect(()=>{if(S!==!0||w==null)return;const A=Oi.getSignedInUser()?.userId;if(A==null)return;const j=kL(w,A),$=E=>{C(hLt({batchId:E.batch_id,progress:E.progress,status:E.status.toLowerCase()}))};return j.bind(eit,$),()=>{j.unbind(eit,$)}},[w,C,S])})();const g=o?.externalConnections?.accounting[0]?.connectionName,f=m.useMemo(()=>drt(o.userRole),[o.userRole]),x={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.toast-message-user-notification`]:[],eventCallback:(w,C)=>{var v;v=C,v?.data!=null&&e(kLt(C))}},y=m.useMemo(()=>Oi.getSignedInUser(),[]),b=m.useMemo(()=>({userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:o.tenantId??""}),[y,o.tenantId]);return Bt.jsxs(K4n,{globalInfo:{loggedInUser:n,loggedInUserRole:o?.userRole,excludedResources:p,loggedInUserRoleMap:f,currentTenant:o,connectionName:g,controllersList:d},children:[Bt.jsx(V4n,{toolkit:{analytics:Ad,sentry:V$t,authParams:b},children:Bt.jsxs(l4n,{endPoint:{url:rge},children:[Bt.jsx(l4i,{showSnackbar:h.isSnackbarOpen,snackbar:{message:h.message,messageType:h.messageType,onRemoveSnackbar:()=>{e(Jge())},showStatusIcon:h.showStatusIcon},isOnDashboard:u}),Bt.jsx(EYr,{...x})]})}),r!=null&&n!=null?Bt.jsx(bQr,{secondsRemaining:r,onContinueSession:()=>{Ad.trackSessionTimeoutClicked("continue",r),_O.continueSession()},onSignOut:()=>{Ad.trackSessionTimeoutClicked("sign_out",r),c()}}):null]})},OYr=()=>{const e=Oi.isSignedIn(),n=Qo(s=>du(s)).companyId,o=Qo(s=>gLt(s.companyState,n)?.company.featuresActivationInfo.connectedAccountProvider),r=m.useMemo(()=>({companyId:n,connectedAccountProvider:o}),[n,o]),a=m.useMemo(()=>({currentFeatureEnv:Bot,featureClientSecret:Ga.featureClientSecret,providerEndPoint:LT.statsigBaseUrl}),[Bot,Ga.featureClientSecret,LT.statsigBaseUrl]);return n?Bt.jsx(C9n,{isUserSignedIn:e,featureGateCustomFields:r,zeniFeatureConfig:a,children:Bt.jsx(tit,{})}):Bt.jsx(tit,{})},RYr=N$t(function(){const e=m.useMemo(()=>FYr(),[]),[n,o]=m.useState(!1),[r,a]=m.useState(!1);m.useEffect(()=>{wae().then(()=>o(!0)).catch(()=>{})},[]);const s=m.useCallback(c=>{c.data?.type==="UPDATE_READY"?a(!0):c.data?.type==="HIDE_UPDATE_POPUP"&&a(!1)},[]);return m.useEffect(()=>("serviceWorker"in navigator&&(navigator.serviceWorker.addEventListener("message",s),navigator.serviceWorker.addEventListener("controllerchange",()=>{a(!1)})),()=>{navigator.serviceWorker.removeEventListener("message",s)}),[s]),Bt.jsx(bGr,{children:Bt.jsx(ajt,{store:e,children:Bt.jsx(wGr,{value:n,children:Bt.jsxs(_Qr,{children:[Bt.jsx(zYr,{}),Bt.jsx(pJt,{children:Bt.jsx(xGr,{children:Bt.jsxs(N4n,{children:[r?Bt.jsx(pIn,{onPrimaryClick:()=>{a(!1),window.location.reload()}}):null,Bt.jsx(OYr,{})]})})})]})})})})});function NYr(e){const n=e.getState(),o=n.tenantState.loggedInUser,r=o?.zeniSessionId!=null?o:Oi.getSignedInUser();if(r?.userId==null||r?.zeniSessionId==null)return;let a=window.location.pathname.split("/").filter(Boolean)[0];const s=du(n);let c;if(!a||["signin","signout"].includes(a))if(s?.tenantEmailDomain!=null&&s?.tenantId!=null)a=s.tenantEmailDomain,c=s.tenantId;else{const d=Oi.getActiveTenantForUser();if(d?.tenantEmailDomain==null||d?.tenantId==null)return;a=d.tenantEmailDomain,c=d.tenantId}else c=Oi.getSignedInUserTenant(a)?.tenantId;c!=null&&(irt(r.userId,r.zeniSessionId,c),e.dispatch(H1e(c)),a!=null&&Oi.saveActiveTenantDomainForUser(a),O8.shouldFetchActiveTenant(c)&&(O8.markActiveTenantFetchStarted(c),e.dispatch(urt(r.userId,c,r.zeniSessionId))),O8.shouldFetchExcludedResources(c)&&(O8.markExcludedResourcesFetchStarted(c),e.dispatch(xLt(r.userId,c))),O8.shouldFetchConnections(c)&&(O8.markConnectionsFetchStarted(c),e.dispatch(yLt(r.userId,c))))}function _Yr(){console.warn("Session invalidated - forcing logout"),window.location.href="/signout"}const VYr=!!(window.location.hostname==="localhost"||window.location.hostname==="[::1]"||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)),nit=`/service-worker.js?v=${Date.now()}&env=DEV&endpoint=${encodeURIComponent("https://zeni-webapp-dev.uc.r.appspot.com")}`;function oit(e,n){navigator.serviceWorker.register(e).then(o=>{o.onupdatefound=()=>{const r=o.installing;r!=null&&(r.onstatechange=()=>{r.state==="installed"&&(navigator.serviceWorker.controller?(console.log("New content available; will be used when all tabs are closed."),navigator.serviceWorker.controller?.postMessage({type:"UPDATE_READY"}),o.waiting?.postMessage({type:"SKIP_WAITING"})):console.log("Content is cached for offline use."))})},o.waiting&&o.waiting.postMessage({type:"SKIP_WAITING"}),navigator.serviceWorker.addEventListener("controllerchange",()=>{console.log("New service worker activated."),o.active?.postMessage({type:"CLIENTS_CLAIM"})})}).catch(o=>{console.error("Error during service worker registration:",o)})}const iit="zeni-chunk-reload-at",HYr=["Failed to fetch dynamically imported module","error loading dynamically imported module","Importing a module script failed"];function rit(e){try{const n=Number(sessionStorage.getItem(iit))||0;if(Date.now()-n<6e4)return!1;sessionStorage.setItem(iit,String(Date.now()))}catch{return!1}return console.warn("[chunk-load] Stale chunk detected — hard-reloading:",e),window.location.reload(),!0}let gae=!1,ait=null;const lit="//js.hs-scripts.com/5991084.js",sit="hs-script-loader",UYr=Oi.getSignedInUser(),WYr=UYr?.zeniSessionId;var b8;window.addEventListener("vite:preloadError",e=>{const n=e;rit(n.payload)&&n.preventDefault()}),window.addEventListener("unhandledrejection",e=>{(function(n){const o=String(n?.message??n??"");return HYr.some(r=>o.includes(r))})(e.reason)&&rit(e.reason)}),async function(){try{const o=await async function(){const a={environment:Oc},s=encodeURIComponent(JSON.stringify(a));try{const c=await fetch(`${rge}/api/keys?query=${s}`);if(!c.ok)throw new Error(`HTTP error! status: ${c.status}`);return await c.json()}catch(c){return console.error("Error fetching details:",c),null}}(),r=(e=o,n="ZENI-WEB-APP-"+Oc,SL.AES.decrypt(e,n).toString(SL.enc.Utf8));PQr(JSON.parse(r)),WLt.createRoot(document.getElementById("root")).render(Bt.jsx(T.StrictMode,{children:Bt.jsx(ljt,{children:Bt.jsx(RYr,{})})})),function(){const a=()=>{const s=Ga.sentryDsn?.trim();if(!s)return;const c=Ga.sentryProfileSamplingRate>0;H$t({dsn:s,tracesSampleRate:Ga.sentryTraceSamplingRate,profilesSampleRate:c?Ga.sentryProfileSamplingRate:0,integrations:[U$t(),...c?[W$t()]:[],Q$t({maskAllText:!0,blockAllMedia:!0})],replaysSessionSampleRate:0,replaysOnErrorSampleRate:1,beforeSendTransaction:d=>(d.breadcrumbs&&(d.breadcrumbs=d.breadcrumbs.filter(u=>u.category!=="console"||!((u.message??"").toLowerCase().includes("called people set")||Array.isArray(u.data?.arguments)&&u.data.arguments.some(p=>typeof p=="string"&&p.toLowerCase().includes("called people set"))||(Array.isArray(u.data?.arguments)&&(u.data.arguments=u.data.arguments.map(p=>{if(typeof p=="string"&&p.includes("user_roles"))try{const h=p.match(/\{.*\}/s);if(h!==null){const g=JSON.parse(h[0]);if(g.user_roles!=null)return delete g.user_roles,p.replace(h[0],JSON.stringify(g))}}catch{}return p})),0)))),d)}),G$t("session-id",WYr)};"requestIdleCallback"in window?requestIdleCallback(a):setTimeout(a,0)}()}catch(o){console.error("Error initializing app:",o)}var e,n}(),typeof window>"u"?Promise.resolve(!1):ait!==null||(ait=new Promise(e=>{if(gae)return void e(!0);const n=()=>{gae?e(!0):(gae=!0,new Promise((r,a)=>{if(document.getElementById(sit))return void r();const s=document.createElement("script");s.id=sit,s.src=lit,s.async=!0,s.onload=()=>r(),s.onerror=()=>a(new Error(`Failed to load HubSpot script: ${lit}`)),document.body.appendChild(s)}).then(()=>{e(!0)}).catch(r=>{console.error("Error loading third-party scripts:",r),e(!0)}))},o=()=>{var r,a;r=()=>{setTimeout(n,7e3)},a=3e3,"requestIdleCallback"in window?window.requestIdleCallback(r,{timeout:a}):setTimeout(r,50)};document.readyState==="complete"?o():window.addEventListener("load",o,{once:!0})})),function(){if("serviceWorker"in navigator){if(new URL("https://dev.app.zeni.ai",window.location.href).origin!==window.location.origin)return;window.addEventListener("load",()=>{var e;VYr?(e=nit,fetch(e,{headers:{"Service-Worker":"script"}}).then(n=>{const o=n.headers.get("content-type");n.status===404||o!=null&&!o.includes("javascript")?navigator.serviceWorker.ready.then(r=>{r.unregister().then(()=>window.location.reload())}):oit(e)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})):oit(nit)})}}(),(b8=console.log)&&b8 instanceof Function&&Dd(async()=>{const{getCLS:e,getFID:n,getFCP:o,getLCP:r,getTTFB:a}=await import("./web-vitals-D_vxw1oG.js");return{getCLS:e,getFID:n,getFCP:o,getLCP:r,getTTFB:a}},[]).then(({getCLS:e,getFID:n,getFCP:o,getLCP:r,getTTFB:a})=>{e(b8),n(b8),o(b8),r(b8),a(b8)});export{kqr as $,P as A,JGr as B,UKr as C,Sn as D,aqr as E,bJr as F,Oqr as G,Mqr as H,gn as I,lGr as J,y$t as K,dge as L,SJr as M,Pqr as N,kY as O,vJr as P,dpi as Q,lqr as R,IYr as S,dGr as T,vi as U,sGr as V,wa as W,kJr as X,OQr as Y,ue as Z,Bqr as _,Z as a,Eqr as a$,Tqr as a0,lp as a1,rge as a2,VH as a3,XZr as a4,Dgt as a5,GZr as a6,fge as a7,Vot as a8,LGr as a9,Mgt as aA,fZr as aB,yZr as aC,xZr as aD,wZr as aE,CZr as aF,Sqr as aG,eZr as aH,SKr as aI,$Kr as aJ,Gme as aK,oZr as aL,nZr as aM,AKr as aN,kKr as aO,vqr as aP,of as aQ,zKr as aR,jGr as aS,VKr as aT,rMo as aU,Fqr as aV,Eto as aW,G3o as aX,JKr as aY,ZKr as aZ,XKr as a_,vGr as aa,$Gr as ab,IGr as ac,Xgo as ad,_ot as ae,AGr as af,A1e as ag,aN as ah,eV as ai,Rot as aj,Vo as ak,wKr as al,bKr as am,POo as an,zqr as ao,AMi as ap,RKr as aq,zt as ar,FKr as as,TT as at,tA as au,sf as av,OKr as aw,gge as ax,yGr as ay,bZr as az,dYr as b,Cqr as b$,wn as b0,Lr as b1,g$t as b2,wJr as b3,HGr as b4,Lqr as b5,Dqr as b6,SGr as b7,lge as b8,FQr as b9,Uqr as bA,Wqr as bB,KKr as bC,Kqr as bD,La as bE,SZr as bF,aKr as bG,iKr as bH,pJr as bI,BKr as bJ,aJr as bK,dKr as bL,cKr as bM,pKr as bN,uKr as bO,fKr as bP,gKr as bQ,_Kr as bR,Zqr as bS,Jqr as bT,NKr as bU,HKr as bV,tKr as bW,nKr as bX,oKr as bY,mKr as bZ,hKr as b_,Aqr as ba,hlo as bb,Vmt as bc,Rqr as bd,ZZr as be,qZr as bf,gGr as bg,lKr as bh,pqr as bi,xqr as bj,vhe as bk,hqr as bl,eJr as bm,vKr as bn,gqr as bo,fqr as bp,mqr as bq,sk as br,tZr as bs,Qqr as bt,Yqr as bu,Gqr as bv,Hqr as bw,Vqr as bx,qqr as by,qKr as bz,$Y as c,CKr as c$,xKr as c0,yKr as c1,tJr as c2,rKr as c3,xJr as c4,fJr as c5,QHr as c6,lJr as c7,IKr as c8,DKr as c9,IZr as cA,yqr as cB,TKr as cC,Vi as cD,Nnr as cE,EZr as cF,b$t as cG,kZr as cH,TZr as cI,AZr as cJ,LZr as cK,VZr as cL,bqr as cM,wqr as cN,UZr as cO,k as cP,NZr as cQ,RZr as cR,jZr as cS,_Zr as cT,vZr as cU,YZr as cV,JZr as cW,oJr as cX,nJr as cY,rJr as cZ,uqr as c_,LKr as ca,cqr as cb,jKr as cc,EKr as cd,s0e as ce,PKr as cf,MKr as cg,vzr as ch,LOr as ci,Fre as cj,hJr as ck,mJr as cl,gJr as cm,uJr as cn,Iqr as co,nCt as cp,FZr as cq,zZr as cr,BZr as cs,OZr as ct,MZr as cu,sJr as cv,PZr as cw,DZr as cx,HZr as cy,$Zr as cz,Ad as d,iJr as d0,sKr as d1,sLn as d2,ow as d3,yJr as d4,FIo as d5,KZr as d6,QZr as d7,Xqr as d8,WZr as d9,KQr as da,fGr as db,zGr as dc,GQr as dd,UGr as de,lse as df,dAt as dg,cAt as dh,dqr as di,WQr as dj,qQr as dk,YQr as dl,VQr as dm,NAt as dn,AJr as dp,NYr as e,go as f,$Jr as g,Ga as h,WKr as i,zOn as j,QKr as k,Bh as l,Me as m,A3 as n,i as o,CJr as p,GKr as q,_he as r,g3r as s,O8 as t,AY as u,CGr as v,l0e as w,M as x,YKr as y,Oi as z};
81111
+ Please refresh the page to try again.`)})),Kv}function $Jr(){return Kv}const _O=new mLt,tit=()=>{const e=tu(),n=Oi.getSignedInUser(),o=Qo(w=>du(w)),[r,a]=m.useState(null),s=function(w){const{useDynamicConfig:C}=wa(),{configValue:v,isDynamicConfigLoading:S}=C(Wpe.sessionAutoLogoutConfig),A=v!=null&&Object.keys(v).length>0;if(S||w==null||!A)return cF;const j=_Qe(v.users_disabled_for_auto_logout),$=_Qe(v.users_enabled_for_auto_logout),E=v.is_inactivity_based_logout_feature_enabled===!0,L=j.includes(w),I=!L&&$.includes(w);return{heartbeatIntervalMinutes:L?0:Voe(v.heartbeat_interval_minutes,cF.heartbeatIntervalMinutes),idleTimeoutMinutes:Voe(v.idle_timeout_minutes,cF.idleTimeoutMinutes),isAutoLogoutEnabled:!L&&(I||E),warningDurationSeconds:Voe(v.warning_duration_seconds,cF.warningDurationSeconds)}}(n?.userId),c=m.useCallback((w="manual")=>{w==="auto-logout"?function(C){try{sessionStorage.setItem(d0e,"auto-logout"),sessionStorage.setItem(u0e,String(C.idleTimeoutMinutes)),sessionStorage.setItem(p0e,String(Date.now())),nL=void 0}catch{}}({idleTimeoutMinutes:s.idleTimeoutMinutes}):(g5t(),nL=void 0),a(null),_O.stop(),e(bLt()),e(wLt(!1)),Oi.clearAll(),window.location.href="/signin/auth"},[e,a,s.idleTimeoutMinutes]);m.useEffect(()=>{if(n?.zeniSessionId!=null)return _O.start({idleTimeoutMinutes:s.idleTimeoutMinutes,warningDurationSeconds:s.warningDurationSeconds,heartbeatIntervalMinutes:s.heartbeatIntervalMinutes,isAutoLogoutEnabled:s.isAutoLogoutEnabled},{onHeartbeat:()=>e(CLt()),onWarningStart:w=>{Ad.trackSessionTimeoutPopupShown(w),a(w)},onWarningTick:a,onAutoLogout:()=>{Ad.trackSessionTimeoutAutoLogout(),c("auto-logout")},onSessionExtended:()=>a(null)}),()=>_O.stop()},[n?.zeniSessionId,s.isAutoLogoutEnabled,s.idleTimeoutMinutes,s.warningDurationSeconds,s.heartbeatIntervalMinutes,e,c,a]);const d=Qo(w=>vLt(w,o.companyId)),u=Tc(["/:tenantEmailDomain/dashboard/*","/:tenantEmailDomain/dashboard"]),p=o?.excludedResources?.fetchState==="Completed"?o.excludedResources.resources:[];m.useEffect(()=>()=>{e(Jge())},[]);const h=Qo(w=>SLt(w));(()=>{const w=gge(),C=tu(),{useFeatureGate:v}=wa(),{isFeatureEnabled:S}=v(vi.isMissingReceiptsBulkUploadEnabled);m.useEffect(()=>{if(S!==!0||w==null)return;const A=Oi.getSignedInUser()?.userId;if(A==null)return;const j=kL(w,A),$=E=>{C(hLt({batchId:E.batch_id,progress:E.progress,status:E.status.toLowerCase()}))};return j.bind(eit,$),()=>{j.unbind(eit,$)}},[w,C,S])})();const g=o?.externalConnections?.accounting[0]?.connectionName,f=m.useMemo(()=>drt(o.userRole),[o.userRole]),x={events:o.userRoleId!=null?[`private-encrypted-${o.userRoleId}.toast-message-user-notification`]:[],eventCallback:(w,C)=>{var v;v=C,v?.data!=null&&e(kLt(C))}},y=m.useMemo(()=>Oi.getSignedInUser(),[]),b=m.useMemo(()=>({userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:o.tenantId??""}),[y,o.tenantId]);return Bt.jsxs(K4n,{globalInfo:{loggedInUser:n,loggedInUserRole:o?.userRole,excludedResources:p,loggedInUserRoleMap:f,currentTenant:o,connectionName:g,controllersList:d},children:[Bt.jsx(V4n,{toolkit:{analytics:Ad,sentry:V$t,authParams:b},children:Bt.jsxs(l4n,{endPoint:{url:rge},children:[Bt.jsx(l4i,{showSnackbar:h.isSnackbarOpen,snackbar:{message:h.message,messageType:h.messageType,onRemoveSnackbar:()=>{e(Jge())},showStatusIcon:h.showStatusIcon},isOnDashboard:u}),Bt.jsx(EYr,{...x})]})}),r!=null&&n!=null?Bt.jsx(bQr,{secondsRemaining:r,onContinueSession:()=>{Ad.trackSessionTimeoutClicked("continue",r),_O.continueSession()},onSignOut:()=>{Ad.trackSessionTimeoutClicked("sign_out",r),c()}}):null]})},OYr=()=>{const e=Oi.isSignedIn(),n=Qo(s=>du(s)).companyId,o=Qo(s=>gLt(s.companyState,n)?.company.featuresActivationInfo.connectedAccountProvider),r=m.useMemo(()=>({companyId:n,connectedAccountProvider:o}),[n,o]),a=m.useMemo(()=>({currentFeatureEnv:Bot,featureClientSecret:Ga.featureClientSecret,providerEndPoint:LT.statsigBaseUrl}),[Bot,Ga.featureClientSecret,LT.statsigBaseUrl]);return n?Bt.jsx(C9n,{isUserSignedIn:e,featureGateCustomFields:r,zeniFeatureConfig:a,children:Bt.jsx(tit,{})}):Bt.jsx(tit,{})},RYr=N$t(function(){const e=m.useMemo(()=>FYr(),[]),[n,o]=m.useState(!1),[r,a]=m.useState(!1);m.useEffect(()=>{wae().then(()=>o(!0)).catch(()=>{})},[]);const s=m.useCallback(c=>{c.data?.type==="UPDATE_READY"?a(!0):c.data?.type==="HIDE_UPDATE_POPUP"&&a(!1)},[]);return m.useEffect(()=>("serviceWorker"in navigator&&(navigator.serviceWorker.addEventListener("message",s),navigator.serviceWorker.addEventListener("controllerchange",()=>{a(!1)})),()=>{navigator.serviceWorker.removeEventListener("message",s)}),[s]),Bt.jsx(bGr,{children:Bt.jsx(ajt,{store:e,children:Bt.jsx(wGr,{value:n,children:Bt.jsxs(_Qr,{children:[Bt.jsx(zYr,{}),Bt.jsx(pJt,{children:Bt.jsx(xGr,{children:Bt.jsxs(N4n,{children:[r?Bt.jsx(pIn,{onPrimaryClick:()=>{a(!1),window.location.reload()}}):null,Bt.jsx(OYr,{})]})})})]})})})})});function NYr(e){const n=e.getState(),o=n.tenantState.loggedInUser,r=o?.zeniSessionId!=null?o:Oi.getSignedInUser();if(r?.userId==null||r?.zeniSessionId==null)return;let a=window.location.pathname.split("/").filter(Boolean)[0];const s=du(n);let c;if(!a||["signin","signout"].includes(a))if(s?.tenantEmailDomain!=null&&s?.tenantId!=null)a=s.tenantEmailDomain,c=s.tenantId;else{const d=Oi.getActiveTenantForUser();if(d?.tenantEmailDomain==null||d?.tenantId==null)return;a=d.tenantEmailDomain,c=d.tenantId}else c=Oi.getSignedInUserTenant(a)?.tenantId;c!=null&&(irt(r.userId,r.zeniSessionId,c),e.dispatch(H1e(c)),a!=null&&Oi.saveActiveTenantDomainForUser(a),O8.shouldFetchActiveTenant(c)&&(O8.markActiveTenantFetchStarted(c),e.dispatch(urt(r.userId,c,r.zeniSessionId))),O8.shouldFetchExcludedResources(c)&&(O8.markExcludedResourcesFetchStarted(c),e.dispatch(xLt(r.userId,c))),O8.shouldFetchConnections(c)&&(O8.markConnectionsFetchStarted(c),e.dispatch(yLt(r.userId,c))))}function _Yr(){console.warn("Session invalidated - forcing logout"),window.location.href="/signout"}const VYr=!!(window.location.hostname==="localhost"||window.location.hostname==="[::1]"||window.location.hostname.match(/^127(?:\.(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)){3}$/)),nit=`/service-worker.js?v=${Date.now()}&env=QA&endpoint=${encodeURIComponent("https://zeni-webapp-qa.uc.r.appspot.com")}`;function oit(e,n){navigator.serviceWorker.register(e).then(o=>{o.onupdatefound=()=>{const r=o.installing;r!=null&&(r.onstatechange=()=>{r.state==="installed"&&(navigator.serviceWorker.controller?(console.log("New content available; will be used when all tabs are closed."),navigator.serviceWorker.controller?.postMessage({type:"UPDATE_READY"}),o.waiting?.postMessage({type:"SKIP_WAITING"})):console.log("Content is cached for offline use."))})},o.waiting&&o.waiting.postMessage({type:"SKIP_WAITING"}),navigator.serviceWorker.addEventListener("controllerchange",()=>{console.log("New service worker activated."),o.active?.postMessage({type:"CLIENTS_CLAIM"})})}).catch(o=>{console.error("Error during service worker registration:",o)})}const iit="zeni-chunk-reload-at",HYr=["Failed to fetch dynamically imported module","error loading dynamically imported module","Importing a module script failed"];function rit(e){try{const n=Number(sessionStorage.getItem(iit))||0;if(Date.now()-n<6e4)return!1;sessionStorage.setItem(iit,String(Date.now()))}catch{return!1}return console.warn("[chunk-load] Stale chunk detected — hard-reloading:",e),window.location.reload(),!0}let gae=!1,ait=null;const lit="//js.hs-scripts.com/5991084.js",sit="hs-script-loader",UYr=Oi.getSignedInUser(),WYr=UYr?.zeniSessionId;var b8;window.addEventListener("vite:preloadError",e=>{const n=e;rit(n.payload)&&n.preventDefault()}),window.addEventListener("unhandledrejection",e=>{(function(n){const o=String(n?.message??n??"");return HYr.some(r=>o.includes(r))})(e.reason)&&rit(e.reason)}),async function(){try{const o=await async function(){const a={environment:Oc},s=encodeURIComponent(JSON.stringify(a));try{const c=await fetch(`${rge}/api/keys?query=${s}`);if(!c.ok)throw new Error(`HTTP error! status: ${c.status}`);return await c.json()}catch(c){return console.error("Error fetching details:",c),null}}(),r=(e=o,n="ZENI-WEB-APP-"+Oc,SL.AES.decrypt(e,n).toString(SL.enc.Utf8));PQr(JSON.parse(r)),WLt.createRoot(document.getElementById("root")).render(Bt.jsx(T.StrictMode,{children:Bt.jsx(ljt,{children:Bt.jsx(RYr,{})})})),function(){const a=()=>{const s=Ga.sentryDsn?.trim();if(!s)return;const c=Ga.sentryProfileSamplingRate>0;H$t({dsn:s,tracesSampleRate:Ga.sentryTraceSamplingRate,profilesSampleRate:c?Ga.sentryProfileSamplingRate:0,integrations:[U$t(),...c?[W$t()]:[],Q$t({maskAllText:!0,blockAllMedia:!0})],replaysSessionSampleRate:0,replaysOnErrorSampleRate:1,beforeSendTransaction:d=>(d.breadcrumbs&&(d.breadcrumbs=d.breadcrumbs.filter(u=>u.category!=="console"||!((u.message??"").toLowerCase().includes("called people set")||Array.isArray(u.data?.arguments)&&u.data.arguments.some(p=>typeof p=="string"&&p.toLowerCase().includes("called people set"))||(Array.isArray(u.data?.arguments)&&(u.data.arguments=u.data.arguments.map(p=>{if(typeof p=="string"&&p.includes("user_roles"))try{const h=p.match(/\{.*\}/s);if(h!==null){const g=JSON.parse(h[0]);if(g.user_roles!=null)return delete g.user_roles,p.replace(h[0],JSON.stringify(g))}}catch{}return p})),0)))),d)}),G$t("session-id",WYr)};"requestIdleCallback"in window?requestIdleCallback(a):setTimeout(a,0)}()}catch(o){console.error("Error initializing app:",o)}var e,n}(),typeof window>"u"?Promise.resolve(!1):ait!==null||(ait=new Promise(e=>{if(gae)return void e(!0);const n=()=>{gae?e(!0):(gae=!0,new Promise((r,a)=>{if(document.getElementById(sit))return void r();const s=document.createElement("script");s.id=sit,s.src=lit,s.async=!0,s.onload=()=>r(),s.onerror=()=>a(new Error(`Failed to load HubSpot script: ${lit}`)),document.body.appendChild(s)}).then(()=>{e(!0)}).catch(r=>{console.error("Error loading third-party scripts:",r),e(!0)}))},o=()=>{var r,a;r=()=>{setTimeout(n,7e3)},a=3e3,"requestIdleCallback"in window?window.requestIdleCallback(r,{timeout:a}):setTimeout(r,50)};document.readyState==="complete"?o():window.addEventListener("load",o,{once:!0})})),function(){if("serviceWorker"in navigator){if(new URL("https://qa.app.zeni.ai",window.location.href).origin!==window.location.origin)return;window.addEventListener("load",()=>{var e;VYr?(e=nit,fetch(e,{headers:{"Service-Worker":"script"}}).then(n=>{const o=n.headers.get("content-type");n.status===404||o!=null&&!o.includes("javascript")?navigator.serviceWorker.ready.then(r=>{r.unregister().then(()=>window.location.reload())}):oit(e)}).catch(()=>{console.log("No internet connection found. App is running in offline mode.")})):oit(nit)})}}(),(b8=console.log)&&b8 instanceof Function&&Dd(async()=>{const{getCLS:e,getFID:n,getFCP:o,getLCP:r,getTTFB:a}=await import("./web-vitals-D_vxw1oG.js");return{getCLS:e,getFID:n,getFCP:o,getLCP:r,getTTFB:a}},[]).then(({getCLS:e,getFID:n,getFCP:o,getLCP:r,getTTFB:a})=>{e(b8),n(b8),o(b8),r(b8),a(b8)});export{kqr as $,P as A,JGr as B,UKr as C,Sn as D,aqr as E,bJr as F,Oqr as G,Mqr as H,gn as I,lGr as J,y$t as K,dge as L,SJr as M,Pqr as N,kY as O,vJr as P,dpi as Q,lqr as R,IYr as S,dGr as T,vi as U,sGr as V,wa as W,kJr as X,OQr as Y,ue as Z,Bqr as _,Z as a,Eqr as a$,Tqr as a0,lp as a1,rge as a2,VH as a3,XZr as a4,Dgt as a5,GZr as a6,fge as a7,Vot as a8,LGr as a9,Mgt as aA,fZr as aB,yZr as aC,xZr as aD,wZr as aE,CZr as aF,Sqr as aG,eZr as aH,SKr as aI,$Kr as aJ,Gme as aK,oZr as aL,nZr as aM,AKr as aN,kKr as aO,vqr as aP,of as aQ,zKr as aR,jGr as aS,VKr as aT,rMo as aU,Fqr as aV,Eto as aW,G3o as aX,JKr as aY,ZKr as aZ,XKr as a_,vGr as aa,$Gr as ab,IGr as ac,Xgo as ad,_ot as ae,AGr as af,A1e as ag,aN as ah,eV as ai,Rot as aj,Vo as ak,wKr as al,bKr as am,POo as an,zqr as ao,AMi as ap,RKr as aq,zt as ar,FKr as as,TT as at,tA as au,sf as av,OKr as aw,gge as ax,yGr as ay,bZr as az,dYr as b,Cqr as b$,wn as b0,Lr as b1,g$t as b2,wJr as b3,HGr as b4,Lqr as b5,Dqr as b6,SGr as b7,lge as b8,FQr as b9,Uqr as bA,Wqr as bB,KKr as bC,Kqr as bD,La as bE,SZr as bF,aKr as bG,iKr as bH,pJr as bI,BKr as bJ,aJr as bK,dKr as bL,cKr as bM,pKr as bN,uKr as bO,fKr as bP,gKr as bQ,_Kr as bR,Zqr as bS,Jqr as bT,NKr as bU,HKr as bV,tKr as bW,nKr as bX,oKr as bY,mKr as bZ,hKr as b_,Aqr as ba,hlo as bb,Vmt as bc,Rqr as bd,ZZr as be,qZr as bf,gGr as bg,lKr as bh,pqr as bi,xqr as bj,vhe as bk,hqr as bl,eJr as bm,vKr as bn,gqr as bo,fqr as bp,mqr as bq,sk as br,tZr as bs,Qqr as bt,Yqr as bu,Gqr as bv,Hqr as bw,Vqr as bx,qqr as by,qKr as bz,$Y as c,CKr as c$,xKr as c0,yKr as c1,tJr as c2,rKr as c3,xJr as c4,fJr as c5,QHr as c6,lJr as c7,IKr as c8,DKr as c9,IZr as cA,yqr as cB,TKr as cC,Vi as cD,Nnr as cE,EZr as cF,b$t as cG,kZr as cH,TZr as cI,AZr as cJ,LZr as cK,VZr as cL,bqr as cM,wqr as cN,UZr as cO,k as cP,NZr as cQ,RZr as cR,jZr as cS,_Zr as cT,vZr as cU,YZr as cV,JZr as cW,oJr as cX,nJr as cY,rJr as cZ,uqr as c_,LKr as ca,cqr as cb,jKr as cc,EKr as cd,s0e as ce,PKr as cf,MKr as cg,vzr as ch,LOr as ci,Fre as cj,hJr as ck,mJr as cl,gJr as cm,uJr as cn,Iqr as co,nCt as cp,FZr as cq,zZr as cr,BZr as cs,OZr as ct,MZr as cu,sJr as cv,PZr as cw,DZr as cx,HZr as cy,$Zr as cz,Ad as d,iJr as d0,sKr as d1,sLn as d2,ow as d3,yJr as d4,FIo as d5,KZr as d6,QZr as d7,Xqr as d8,WZr as d9,KQr as da,fGr as db,zGr as dc,GQr as dd,UGr as de,lse as df,dAt as dg,cAt as dh,dqr as di,WQr as dj,qQr as dk,YQr as dl,VQr as dm,NAt as dn,AJr as dp,NYr as e,go as f,$Jr as g,Ga as h,WKr as i,zOn as j,QKr as k,Bh as l,Me as m,A3 as n,i as o,CJr as p,GKr as q,_he as r,g3r as s,O8 as t,AY as u,CGr as v,l0e as w,M as x,YKr as y,Oi as z};