@zeniai/web-app-ui 5.3.60-qa → 5.3.61-dev
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/assets/{AccountMappingScreen-DDL0Aczb.js → AccountMappingScreen-Dt4x9DJz.js} +1 -1
- package/dist/assets/{ActualMatchingMatchDetailScreen-BF0QqOvV.js → ActualMatchingMatchDetailScreen-BfyrJWDJ.js} +1 -1
- package/dist/assets/AddressRoutes-DfkTMfYF.js +1 -0
- package/dist/assets/{AddressScreen-DFtmrD7U.js → AddressScreen-DvJ6yyMx.js} +1 -1
- package/dist/assets/{AiCfoScreen-BCo_gQ1S.js → AiCfoScreen-SBmgGufP.js} +1 -1
- package/dist/assets/{AppDrawer-BFM_cX2w.js → AppDrawer-D7FI4GcX.js} +1 -1
- package/dist/assets/{BillPayApprovalRoutes-CVaNwI19.js → BillPayApprovalRoutes-BxCZdf21.js} +1 -1
- package/dist/assets/{BillPayRoutes-CNF3RPdV.js → BillPayRoutes-07S7DRSx.js} +1 -1
- package/dist/assets/{BusinessVerificationPageScreen-DGOdZpSF.js → BusinessVerificationPageScreen-B20TVwus.js} +1 -1
- package/dist/assets/{CardsAiCfoScreen-DldtBxQ_.js → CardsAiCfoScreen-DkokQGnk.js} +1 -1
- package/dist/assets/{ChargeCardRoutes-CiXY3RRi.js → ChargeCardRoutes-BO6dVldC.js} +1 -1
- package/dist/assets/{CompanyPassportScreen-yvWlb-a3.js → CompanyPassportScreen-BEG9__1k.js} +1 -1
- package/dist/assets/{ConnectionAuthScreen-U-SNJMCs.js → ConnectionAuthScreen-C_s5VCbI.js} +1 -1
- package/dist/assets/CustomerOnboardingAuthScreen-DFMNQmWy.js +1 -0
- package/dist/assets/{CustomerOnboardingRoutes-Cv97cHav.js → CustomerOnboardingRoutes-BFFEQyjG.js} +1 -1
- package/dist/assets/{DashboardRoutes-B8KMVxUd.js → DashboardRoutes-B4NxbMLL.js} +1 -1
- package/dist/assets/{DefaultTenantHome-DPfMVRsH.js → DefaultTenantHome-CMvE7WXj.js} +1 -1
- package/dist/assets/{DomesticWireDetailScreen-BmgDMFrt.js → DomesticWireDetailScreen-B2YgkOu5.js} +1 -1
- package/dist/assets/{DrawerScreen-BXnpyAh5.js → DrawerScreen-I5-Ak-b_.js} +1 -1
- package/dist/assets/{EntityDetailRoutes-wEtrNr5d.js → EntityDetailRoutes-BPqa4e5a.js} +1 -1
- package/dist/assets/{ExpenseAutomationRoutes-DylNvqtJ.js → ExpenseAutomationRoutes-BW9gVxz9.js} +1 -1
- package/dist/assets/{FeaturePreviewScreen-Cl4Z6Gbf.js → FeaturePreviewScreen-v5dVXn4p.js} +1 -1
- package/dist/assets/{HubSpotOAuthCallbackScreen-ecjnmYBQ.js → HubSpotOAuthCallbackScreen-CsqGaYGM.js} +1 -1
- package/dist/assets/{InboxNotificationsProvider-UxuF5z6s.js → InboxNotificationsProvider-B4UF_uUg.js} +1 -1
- package/dist/assets/InvoicingRoutes-CxKyyTQc.js +2 -0
- package/dist/assets/{MagicLinkRoutes-l_QpBC-t.js → MagicLinkRoutes-DDza_62u.js} +1 -1
- package/dist/assets/{MagicLinkSignInScreen-UK3TjkXM.js → MagicLinkSignInScreen-DGzxNaiE.js} +1 -1
- package/dist/assets/{MobileAppDrawer-DVlDM_SD.js → MobileAppDrawer-0TaE2Qid.js} +1 -1
- package/dist/assets/NotFoundScreen-BatgS8le.js +1 -0
- package/dist/assets/{NotificationRoutes-_Ove4RR9.js → NotificationRoutes-i3qnEWcR.js} +1 -1
- package/dist/assets/{OAuthConsentScreen-D2IPS06S.js → OAuthConsentScreen-CRExXXMv.js} +1 -1
- package/dist/assets/{PandLWithForecastRoutes-CmYUpd30.js → PandLWithForecastRoutes-DiipWbFp.js} +1 -1
- package/dist/assets/{PaymentLinkScreen-C8Dbjcao.js → PaymentLinkScreen-D0Hr5oRB.js} +1 -1
- package/dist/assets/{PeopleRoutes-CXOp-Iev.js → PeopleRoutes-CypmG1ct.js} +1 -1
- package/dist/assets/{PerformanceRoutes-DV6FEtim.js → PerformanceRoutes-eA0QwQYt.js} +1 -1
- package/dist/assets/{Preview-DgfrPJAF.js → Preview-Co3i0Xrb.js} +1 -1
- package/dist/assets/{QBOConnectionScreen-BIShDDrG.js → QBOConnectionScreen-BiN0lu_W.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRoutes-uc6i1fez.js → ReimbursementApprovalRoutes-ryr0mHPH.js} +1 -1
- package/dist/assets/{ReimbursementApprovalRuleDetailScreen-DVlg53Ne.js → ReimbursementApprovalRuleDetailScreen-CRU8C8RZ.js} +1 -1
- package/dist/assets/{ReimbursementRoutes-oLl-lj6X.js → ReimbursementRoutes-B8NK1spY.js} +1 -1
- package/dist/assets/{ReportsRoutes-DBsPdRcb.js → ReportsRoutes-DRBiAxJk.js} +1 -1
- package/dist/assets/{RewardsRoutes-B1QRSS1A.js → RewardsRoutes-DqoIHOPS.js} +1 -1
- package/dist/assets/{ScheduleDetailsPrepaidExpensesScreen-BHR4u0iT.js → ScheduleDetailsPrepaidExpensesScreen-UKD1lb2-.js} +1 -1
- package/dist/assets/{ScreenRoutes-S_qs6Ml3.js → ScreenRoutes-6zCS0eXm.js} +2 -2
- package/dist/assets/{SettingsRoutes-BtIC2MT_.js → SettingsRoutes-Bh4g9wCj.js} +1 -1
- package/dist/assets/{SetupPagesScreen-Bj4KorET.js → SetupPagesScreen-CdpIgBzw.js} +1 -1
- package/dist/assets/{SignInScreen-C1tZOgxI.js → SignInScreen-C5RNgyDG.js} +1 -1
- package/dist/assets/{SignOutScreen-C5m60sU2.js → SignOutScreen-BZdppeCA.js} +1 -1
- package/dist/assets/{TaskListScreen-D4Iho4zL.js → TaskListScreen-h6ryhshy.js} +1 -1
- package/dist/assets/{TaskRoutes-Df2WVA2J.js → TaskRoutes-BiQOVouS.js} +1 -1
- package/dist/assets/TransactionDetailRoutes-L8u6TmTF.js +1 -0
- package/dist/assets/{TransactionDetailScreen-7QFpL4Os.js → TransactionDetailScreen-KBMzz0Xq.js} +1 -1
- package/dist/assets/{TransactionListRoutes-Cc05N7SO.js → TransactionListRoutes-CKeYxgtl.js} +1 -1
- package/dist/assets/{TreasuryRoutes-wyXdfXNp.js → TreasuryRoutes-DsNk_W1Q.js} +1 -1
- package/dist/assets/{VendorsRoutes-AS-OWQI1.js → VendorsRoutes-C9tsCt7G.js} +1 -1
- package/dist/assets/{WiseConfirmationScreen-C3-YNa28.js → WiseConfirmationScreen-XbaBW0oW.js} +1 -1
- package/dist/assets/{ZeniAccountRoutes-BfugNyQM.js → ZeniAccountRoutes-Bgi1019U.js} +1 -1
- package/dist/assets/{ZeniAccountStatementScreen-CX_Zwdtn.js → ZeniAccountStatementScreen-L3XK5pKW.js} +1 -1
- package/dist/assets/{accountMappingHelper-Bd8dBAx8.js → accountMappingHelper-Ci74NLEW.js} +1 -1
- package/dist/assets/{analytics-CN354g1T.js → analytics-8lQ_GaR7.js} +1 -1
- package/dist/assets/{analyticsHelper-BF8AFXo5.js → analyticsHelper-C6SU-53H.js} +1 -1
- package/dist/assets/{core-gskLGwvQ.js → core-B-8b0iz9.js} +1 -1
- package/dist/assets/{decodeURIComponentSafe-BrjSQ2T7.js → decodeURIComponentSafe-hAviH84T.js} +1 -1
- package/dist/assets/{dnd-BpQOVH8W.js → dnd-CtOxA7uX.js} +1 -1
- package/dist/assets/{empty-BhQrXt4B.js → empty-CyiOIGJw.js} +1 -1
- package/dist/assets/{empty-FEXz4SGC.js → empty-ZUR8mjP1.js} +1 -1
- package/dist/assets/{emptyVideoElement-D7dHKwRE.js → emptyVideoElement-Dch9mr3K.js} +1 -1
- package/dist/assets/{epic-DRT8s5zn.js → epic-C_YIXfJm.js} +1 -1
- package/dist/assets/{expenseAutomationHelper-DjpsZY3T.js → expenseAutomationHelper-BzOPc0En.js} +1 -1
- package/dist/assets/{getLocaleForTenant-BQnSwWzl.js → getLocaleForTenant-D57C4sYC.js} +1 -1
- package/dist/assets/{index-BnH1nwkV.js → index-BUsi93tT.js} +2 -2
- package/dist/assets/{index-DoALHuep.js → index-Ce-G0Vp2.js} +1 -1
- package/dist/assets/{index-CES-kGHe.js → index-CgYr_9vs.js} +1 -1
- package/dist/assets/{index-BSb1Spas.js → index-CzpjeHcU.js} +1 -1
- package/dist/assets/{index-l0JDz3aN.js → index-DeS-5gfC.js} +1 -1
- package/dist/assets/{index-9iGc-VCi.js → index-DuxR1XDX.js} +10 -10
- package/dist/assets/{index-DkwmHck7.js → index-b65XjN06.js} +1 -1
- package/dist/assets/{index-DoPFANFI.js → index-haVo7C6B.js} +1 -1
- package/dist/assets/{lexical-CeoJXP_S.js → lexical-BVt4M34U.js} +1 -1
- package/dist/assets/{liveblocks-Bb2PSW9x.js → liveblocks-BjcYyeQ6.js} +1 -1
- package/dist/assets/{lottie-C6kuyXrg.js → lottie-BdAYiWcR.js} +1 -1
- package/dist/assets/{mui-B7hsDY4Q.js → mui-C33Oegsm.js} +1 -1
- package/dist/assets/{pathToGoBack-feIsVMKv.js → pathToGoBack-Bgu6njoM.js} +1 -1
- package/dist/assets/{pdf-nyOleBBB.js → pdf-BkfulyEw.js} +3 -3
- package/dist/assets/{pdf-lib-DHKxm0iN.js → pdf-lib-D8o-uP9K.js} +1 -1
- package/dist/assets/{plaid-lbMcoGfS.js → plaid-Bt28AVCt.js} +1 -1
- package/dist/assets/{pusher-9tGNqr8g.js → pusher-BWEmmbE9.js} +1 -1
- package/dist/assets/{react-CO_MezWn.js → react-B7GqIpoL.js} +1 -1
- package/dist/assets/{react-BKOV6yjY.js → react-BAH__mX9.js} +1 -1
- package/dist/assets/{react-FoyHSSWz.js → react-CIEK2Ei-.js} +1 -1
- package/dist/assets/{react-BlugNq5G.js → react-DT9gMpbF.js} +1 -1
- package/dist/assets/{react-oC35W2hT.js → react-Dqb011PB.js} +1 -1
- package/dist/assets/{react-NCf-4gX_.js → react-Ls8UDl46.js} +1 -1
- package/dist/assets/{recharts-DbIMJ9R8.js → recharts-DkYxIsLi.js} +1 -1
- package/dist/assets/{routePaths-CLHAVe0V.js → routePaths-B1syYHWh.js} +1 -1
- package/dist/assets/{sentry-BSKiJ3ep.js → sentry-DZ9rNYfw.js} +1 -1
- package/dist/assets/{stripSplatSuffix-CgrkzEUz.js → stripSplatSuffix-Te2Zqy4u.js} +1 -1
- package/dist/assets/{url-Y0CBg9uE.js → url-BjdrSaU1.js} +1 -1
- package/dist/assets/{url-Bb2AUtKQ.js → url-DY2r7CPa.js} +1 -1
- package/dist/assets/{useActualMatchingMatchDetail-CyYqijbA.js → useActualMatchingMatchDetail-DZnxtuQj.js} +1 -1
- package/dist/assets/{useAiCfoDashboardSuggestedQuestionsChips-DNGyjeFt.js → useAiCfoDashboardSuggestedQuestionsChips-SBKf0Pu3.js} +1 -1
- package/dist/assets/{useAskAiCfoHostNavButtonProps-dr1KTiaF.js → useAskAiCfoHostNavButtonProps-CvEN7QS-.js} +1 -1
- package/dist/assets/{useChargeCardPusherEvents-BG8Zkab0.js → useChargeCardPusherEvents-DmcXit2D.js} +1 -1
- package/dist/assets/{useDeviceId-3gpQ0Gy5.js → useDeviceId-gFU5q5zf.js} +1 -1
- package/dist/assets/{useEmailConnectResultRefresh-gAkg_sP_.js → useEmailConnectResultRefresh-BwFVhfcX.js} +1 -1
- package/dist/assets/{useInitialThreadRequest-BMzDNvJ9.js → useInitialThreadRequest-Chu-ipGI.js} +1 -1
- package/dist/assets/{useTaskManagerAccess-BcE_8o_a.js → useTaskManagerAccess-ECD0Ec-b.js} +1 -1
- package/dist/assets/{useTaskManagerPusherEvents-CtMYtedI.js → useTaskManagerPusherEvents-BnGLCsCG.js} +1 -1
- package/dist/assets/{utils-Bz1KP99q.js → utils-D3rZq_G4.js} +1 -1
- package/dist/assets/{withTransactionSidePanel-Ck4eAlnu.js → withTransactionSidePanel-qep2Sc8k.js} +1 -1
- package/dist/assets/{zeni-epic-state-otDwAjBf.js → zeni-epic-state-95zxmizy.js} +3 -3
- package/dist/index.html +1 -1
- package/package.json +4 -4
- package/dist/assets/AddressRoutes-85sg2BTg.js +0 -1
- package/dist/assets/CustomerOnboardingAuthScreen-CyPpyRU1.js +0 -1
- package/dist/assets/InvoicingRoutes-C1J6fKJ-.js +0 -2
- package/dist/assets/NotFoundScreen-SpQh5g9X.js +0 -1
- package/dist/assets/TransactionDetailRoutes-VO4UrCCw.js +0 -1
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
const __vite__mapDeps=(i,m=__vite__mapDeps,d=(m.f||(m.f=["assets/zeni-epic-state-
|
|
2
|
-
import{a as m,R as M,b as _5e,e as wsn,p as wse,r as Am,g as $At,d as Uje,f as Csn,s as Wje,i as vsn,w as Asn,j as Ssn,S as ksn,k as jsn,l as $sn,m as Esn,n as Isn,o as Dsn}from"./sentry-BSKiJ3ep.js";import{L as Tsn,C as Qje,_ as sh,a as Lsn,b as PN,c as Bsn,d as Xte,e as MN,u as EAt,T as Psn,f as Msn,g as Osn,h as Fsn,i as Rsn,k as IAt,l as zsn,m as Nsn,j as Zt}from"./liveblocks-Bb2PSW9x.js";import{f as DAt,r as ka,R as mA,P as Wl,O as _sn,N as TAt,u as Kp,g as d2,h as ene,i as LAt,j as qr,m as $8e,s as VZ,k as BAt,l as Vsn,n as Hsn,o as cp,p as Usn,B as Wsn}from"./core-gskLGwvQ.js";import{L as Yje,bl as Qsn,bm as Ysn,bn as ON,bo as Gsn,bp as qsn,bq as _s,br as Wt,bs as rL,bt as s3,bu as Ksn,bv as Q7,bw as Rs,bx as Zsn,by as Jsn,bz as Xsn,bA as p1,bB as np,bC as fz,bD as a8,bE as pn,bF as PAt,bG as Y1,bH as Sa,bI as tT,bJ as MAt,bK as OAt,bL as E8e,bM as sx,bN as i1,bO as s7,bP as eln,bQ as zc,bR as tln,bS as aL,bT as nln,bU as iln,bV as HZ,bW as oln,bX as rln,bY as UZ,bZ as aln,b_ as sln,b$ as s8,c0 as Gje,c1 as lln,c2 as cln,c3 as dln,c4 as uln,c5 as pln,c6 as hln,c7 as mln,c8 as l7,c9 as tne,ca as gln,cb as nne,cc as ine,cd as one,ce as I8e,cf as FN,cg as CS,ch as RN,ci as nT,cj as iT,ck as vS,cl as rne,cm as YA,cn as fln,co as qje,cp as xln,cq as yln,cr as bln,cs as wln,ct as FAt,cu as Cln,cv as vln,cw as qw,cx as Kje,cy as Aln,cz as Sln,cA as kln,cB as ak,cC as sk,cD as RAt,cE as zAt,cF as D8e,cG as jln,cH as NAt,cI as $ln,cJ as WZ,cK as _At,cL as Eln,cM as VAt,cN as Iln,cO as HO,cP as Dln,cQ as Tln,cR as Zje,cS as Lln,cT as T8e,cU as L8e,cV as Bln,cW as Pln,cX as Mln,cY as Oln,cZ as TV,c_ as oT,c$ as LV,d0 as Fln,d1 as Rln,d2 as HAt,d3 as zln,d4 as Nln,d5 as _ln,d6 as Vln,d7 as Hln,d8 as UAt,d9 as Jje,da as Uln,db as B8e,dc as Wln,dd as Qln,de as Yln,df as WAt,dg as gu,dh as Gl,di as ane,dj as Gln,dk as qln,dl as N1,dm as QAt,dn as Kln,dp as xz,dq as GA,dr as Ys,ds as Xje,dt as Zln,du as Jln,dv as Xln,dw as YAt,dx as P8e,dy as BV,dz as GAt,dA as Mg,dB as ecn,dC as tcn,dD as ncn,dE as icn,dF as ocn,dG as rcn,dH as acn,dI as scn,dJ as PV,dK as AS,dL as sne,dM as lcn,dN as ccn,dO as lk,dP as G1,dQ as qAt,dR as KAt,dS as dcn,dT as ZAt,dU as ucn,dV as pcn,dW as hcn,dX as mcn,dY as sL,dZ as M8e,d_ as O8e,d$ as gcn,e0 as F8e,e1 as JAt,e2 as XAt,e3 as eSt,e4 as tSt,e5 as nSt,e6 as iSt,e7 as fcn,_ as Md,e8 as lL,e9 as xcn,ea as e$e,eb as lne,ec as ycn,ed as bcn,ee as oSt,ef as wcn,eg as YF,eh as Mm,ei as c7,ej as rSt,ek as aSt,el as Ccn,em as sSt,en as V5e,eo as vcn,ep as nK,eq as Acn,er as Scn,es as kcn,et as jcn,eu as $cn,ev as lSt,ew as cSt,ex as Ecn,ey as Icn,ez as dSt,eA as GF,eB as qF,eC as uSt,eD as Dcn,eE as Tcn,eF as Lcn,eG as Bcn,eH as R8e,eI as pSt,eJ as hSt,eK as z8e,eL as cL,eM as cne,eN as N8e,eO as _8e,eP as V8e,eQ as H8e,eR as Pcn,eS as Mcn,eT as mSt,eU as t$e,eV as Ocn,eW as U8e,eX as Fcn,eY as Rcn,eZ as q1,e_ as zcn,e$ as dne,f0 as gSt,f1 as fSt,f2 as Ncn,f3 as W8e,f4 as Q8e,f5 as _cn,f6 as Vcn,f7 as Hcn,f8 as Ucn,f9 as Wcn,fa as Zg,fb as n$e,fc as xSt,fd as Qcn,fe as Ycn,ff as Gcn,fg as ySt,fh as bSt,fi as wSt,fj as CSt,fk as vSt,fl as ASt,fm as qcn,fn as rT,fo as Kcn,fp as Zcn,fq as Jcn,fr as Xcn,fs as SSt,ft as kSt,fu as i$e,fv as o$e,fw as edn,fx as tdn,fy as r$e,fz as a$e,fA as ndn,fB as idn,fC as H5e,fD as odn,v as rdn,fE as une,fF as xm,fG as jSt,fH as $St,fI as adn,fJ as sdn,fK as s$e,fL as ldn,fM as cdn,fN as ddn,fO as udn,fP as pdn,fQ as hdn,fR as mdn,fS as gdn,fT as fdn,fU as xdn,fV as ydn,fW as bdn,fX as wdn,fY as Cdn,fZ as vdn,f_ as Adn,f$ as Sdn,g0 as kdn,g1 as jdn,g2 as l$e,g3 as $dn,g4 as Edn,g5 as Idn,g6 as Ddn,g7 as Tdn,g8 as ESt,g9 as pne,ga as Y8e,gb as ISt,gc as Ldn,gd as Bdn,ge as Pdn,gf as DSt,gg as c$e,gh as TSt,gi as LSt,gj as Mdn,gk as BSt,gl as PSt,gm as Odn,gn as Fdn,go as U5e,gp as Rdn,gq as KF,gr as zdn,gs as Ndn,gt as _dn,gu as Vdn,gv as Hdn,gw as Udn,gx as Wdn,gy as Qdn,gz as Ydn,gA as Gdn,gB as qdn,gC as Kdn,gD as MSt,gE as Zdn,gF as Jdn,gG as Xdn,gH as d$e,gI as eun,gJ as tun,gK as nun,gL as iun,gM as oun,gN as run,gO as OSt,gP as FSt,gQ as aun,gR as RSt,gS as sun,gT as lun,gU as W5e,gV as cun,gW as dun,gX as uun,gY as pun,gZ as hun,g_ as mun,g$ as u$e,h0 as gun,h1 as fun,h2 as xun}from"./zeni-epic-state-otDwAjBf.js";import{n as a,T as zSt,G as zN,j as Do,c as Te,k as ii,C as NSt,u as yun,D as _St,S as VSt,a as bun}from"./mui-B7hsDY4Q.js";import{r as wun,m as jg}from"./analytics-CN354g1T.js";import{u as op}from"./plaid-lbMcoGfS.js";import{D as G8e,H as hne,g as Cun,O as vun,S as Aun,T as Sun,u as q8e,a as K8e,b as kun}from"./dnd-BpQOVH8W.js";import{l as Z8e}from"./stripe-cKAAJElX.js";import{L as hD}from"./lottie-C6kuyXrg.js";import{r as ld}from"./lexical-CeoJXP_S.js";import{D as Q5e,P as Y5e,_ as HSt,a as USt}from"./pdf-nyOleBBB.js";import{R as SS,G as l8,H as th,X as Jl,Y as Pl,I as Td,J as c8,K as F8,L as qA,M as ep,N as dL,O as WSt,P as jun,Q as $un,S as mne,U as Eun,V as J8e,W as Iun,Z as Dun,_ as Tun,d as Lun}from"./recharts-DbIMJ9R8.js";import{r as Bun,n as p$e}from"./utils-Bz1KP99q.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]="1106fc40-df77-48d8-a8e4-872b89b73516",e._sentryDebugIdIdentifier="sentry-dbid-1106fc40-df77-48d8-a8e4-872b89b73516")}catch{}})();(function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver((i=>{for(const r of i)if(r.type==="childList")for(const s of r.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)})).observe(document,{childList:!0,subtree:!0})}function n(i){if(i.ep)return;i.ep=!0;const r=(function(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l})(i);fetch(i.href,r)}})();var h$e,MV={},Pun=(function(){if(h$e)return MV;h$e=1;var e=DAt();return MV.createRoot=e.createRoot,MV.hydrateRoot=e.hydrateRoot,MV})(),cm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof _5e<"u"?_5e:typeof self<"u"?self:{};function yr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var m$e,g$e,f$e={exports:{}},gB={};function QSt(){return g$e||(g$e=1,f$e.exports=(function(){if(m$e)return gB;m$e=1;var e=M,n=Symbol.for("react.element"),i=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={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)&&!l.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:s.current}}return gB.Fragment=i,gB.jsx=c,gB.jsxs=c,gB})()),f$e.exports}var t=QSt();const Mun=m.createContext(null),Cse={didCatch:!1,error:null};let Oun=class extends m.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Cse}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){const{error:e}=this.state;if(e!==null){for(var n,i,r=arguments.length,s=new Array(r),l=0;l<r;l++)s[l]=arguments[l];(n=(i=this.props).onReset)===null||n===void 0||n.call(i,{args:s,reason:"imperative-api"}),this.setState(Cse)}}componentDidCatch(e,n){var i,r;(i=(r=this.props).onError)===null||i===void 0||i.call(r,e,n)}componentDidUpdate(e,n){const{didCatch:i}=this.state,{resetKeys:r}=this.props;var s,l;i&&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)&&((s=(l=this.props).onReset)===null||s===void 0||s.call(l,{next:r,prev:e.resetKeys,reason:"keys"}),this.setState(Cse))}render(){const{children:e,fallbackRender:n,FallbackComponent:i,fallback:r}=this.props,{didCatch:s,error:l}=this.state;let c=e;if(s){const d={error:l,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")c=n(d);else if(i)c=m.createElement(i,d);else{if(r===void 0)throw l;c=r}}return m.createElement(Mun.Provider,{value:{didCatch:s,error:l,resetErrorBoundary:this.resetErrorBoundary}},c)}};var x$e,vse={exports:{}},Ase,Fun=(x$e||(x$e=1,Ase=vse,(function(e,n){Ase.exports?Ase.exports=n():e.numeral=n()})(vse.exports,(function(){var e,n,i,r,s,l={},c={},d={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},u={currentLocale:d.currentLocale,zeroFormat:d.zeroFormat,nullFormat:d.nullFormat,defaultFormat:d.defaultFormat,scalePercentBy100:d.scalePercentBy100};function p(h,g){this._input=h,this._value=g}return e=function(h){var g,f,x,y;if(e.isNumeral(h))g=h.value();else if(h===0||typeof h>"u")g=0;else if(h===null||n.isNaN(h))g=null;else if(typeof h=="string")if(u.zeroFormat&&h===u.zeroFormat)g=0;else if(u.nullFormat&&h===u.nullFormat||!h.replace(/[^0-9]+/g,"").length)g=null;else{for(f in l)if((y=typeof l[f].regexps.unformat=="function"?l[f].regexps.unformat():l[f].regexps.unformat)&&h.match(y)){x=l[f].unformat;break}g=(x=x||e._.stringToNumber)(h)}else g=Number(h)||null;return new p(h,g)},e.version="2.0.6",e.isNumeral=function(h){return h instanceof p},e._=n={numberToFormat:function(h,g,f){var x,y,b,w,C,v,A,S,$=c[e.options.currentLocale],j=!1,I=!1,E="",D=1e12,B=1e9,F=1e6,R="",_=!1;if(h=h||0,b=Math.abs(h),e._.includes(g,"(")?(j=!0,g=g.replace(/[\(|\)]/g,"")):(e._.includes(g,"+")||e._.includes(g,"-"))&&(v=e._.includes(g,"+")?g.indexOf("+"):h<0?g.indexOf("-"):-1,g=g.replace(/[\+|\-]/g,"")),e._.includes(g,"a")&&(y=!!(y=g.match(/a(k|m|b|t)?/))&&y[1],e._.includes(g," a")&&(E=" "),g=g.replace(new RegExp(E+"a[kmbt]?"),""),b>=D&&!y||y==="t"?(E+=$.abbreviations.trillion,h/=D):b<D&&b>=B&&!y||y==="b"?(E+=$.abbreviations.billion,h/=B):b<B&&b>=F&&!y||y==="m"?(E+=$.abbreviations.million,h/=F):(b<F&&b>=1e3&&!y||y==="k")&&(E+=$.abbreviations.thousand,h/=1e3)),e._.includes(g,"[.]")&&(I=!0,g=g.replace("[.]",".")),w=h.toString().split(".")[0],C=g.split(".")[1],A=g.indexOf(","),x=(g.split(".")[0].split(",")[0].match(/0/g)||[]).length,C?(e._.includes(C,"[")?(C=(C=C.replace("]","")).split("["),R=e._.toFixed(h,C[0].length+C[1].length,f,C[1].length)):R=e._.toFixed(h,C.length,f),w=R.split(".")[0],R=e._.includes(R,".")?$.delimiters.decimal+R.split(".")[1]:"",I&&Number(R.slice(1))===0&&(R="")):w=e._.toFixed(h,0,f),E&&!y&&Number(w)>=1e3&&E!==$.abbreviations.trillion)switch(w=String(Number(w)/1e3),E){case $.abbreviations.thousand:E=$.abbreviations.million;break;case $.abbreviations.million:E=$.abbreviations.billion;break;case $.abbreviations.billion:E=$.abbreviations.trillion}if(e._.includes(w,"-")&&(w=w.slice(1),_=!0),w.length<x)for(var N=x-w.length;N>0;N--)w="0"+w;return A>-1&&(w=w.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+$.delimiters.thousands)),g.indexOf(".")===0&&(w=""),S=w+R+(E||""),j?S=(j&&_?"(":"")+S+(j&&_?")":""):v>=0?S=v===0?(_?"-":"+")+S:S+(_?"-":"+"):_&&(S="-"+S),S},stringToNumber:function(h){var g,f,x,y=c[u.currentLocale],b=h,w={thousand:3,million:6,billion:9,trillion:12};if(u.zeroFormat&&h===u.zeroFormat)f=0;else if(u.nullFormat&&h===u.nullFormat||!h.replace(/[^0-9]+/g,"").length)f=null;else{for(g in f=1,y.delimiters.decimal!=="."&&(h=h.replace(/\./g,"").replace(y.delimiters.decimal,".")),w)if(x=new RegExp("[^a-zA-Z]"+y.abbreviations[g]+"(?:\\)|(\\"+y.currency.symbol+")?(?:\\))?)?$"),b.match(x)){f*=Math.pow(10,w[g]);break}f*=(h.split("-").length+Math.min(h.split("(").length-1,h.split(")").length-1))%2?1:-1,h=h.replace(/[^0-9\.]+/g,""),f*=Number(h)}return f},isNaN:function(h){return typeof h=="number"&&isNaN(h)},includes:function(h,g){return h.indexOf(g)!==-1},insert:function(h,g,f){return h.slice(0,f)+g+h.slice(f)},reduce:function(h,g){if(this===null)throw new TypeError("Array.prototype.reduce called on null or undefined");if(typeof g!="function")throw new TypeError(g+" is not a function");var f,x=Object(h),y=x.length>>>0,b=0;if(arguments.length===3)f=arguments[2];else{for(;b<y&&!(b in x);)b++;if(b>=y)throw new TypeError("Reduce of empty array with no initial value");f=x[b++]}for(;b<y;b++)b in x&&(f=g(f,x[b],b,x));return f},multiplier:function(h){var g=h.toString().split(".");return g.length<2?1:Math.pow(10,g[1].length)},correctionFactor:function(){return Array.prototype.slice.call(arguments).reduce((function(h,g){var f=n.multiplier(g);return h>f?h:f}),1)},toFixed:function(h,g,f,x){var y,b,w,C,v=h.toString().split("."),A=g-(x||0);return y=v.length===2?Math.min(Math.max(v[1].length,A),g):A,w=Math.pow(10,y),C=(f(h+"e+"+y)/w).toFixed(y),x>g-y&&(b=new RegExp("\\.?0{1,"+(x-(g-y))+"}$"),C=C.replace(b,"")),C}},e.options=u,e.formats=l,e.locales=c,e.locale=function(h){return h&&(u.currentLocale=h.toLowerCase()),u.currentLocale},e.localeData=function(h){if(!h)return c[u.currentLocale];if(h=h.toLowerCase(),!c[h])throw new Error("Unknown locale : "+h);return c[h]},e.reset=function(){for(var h in d)u[h]=d[h]},e.zeroFormat=function(h){u.zeroFormat=typeof h=="string"?h:null},e.nullFormat=function(h){u.nullFormat=typeof h=="string"?h:null},e.defaultFormat=function(h){u.defaultFormat=typeof h=="string"?h:"0.0"},e.register=function(h,g,f){if(g=g.toLowerCase(),this[h+"s"][g])throw new TypeError(g+" "+h+" already registered.");return this[h+"s"][g]=f,f},e.validate=function(h,g){var f,x,y,b,w,C,v,A;if(typeof h!="string"&&(h+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",h)),(h=h.trim()).match(/^\d+$/))return!0;if(h==="")return!1;try{v=e.localeData(g)}catch{v=e.localeData(e.locale())}return y=v.currency.symbol,w=v.abbreviations,f=v.delimiters.decimal,x=v.delimiters.thousands==="."?"\\.":v.delimiters.thousands,!((A=h.match(/^[^\d]+/))!==null&&(h=h.substr(1),A[0]!==y)||(A=h.match(/[^\d]+$/))!==null&&(h=h.slice(0,-1),A[0]!==w.thousand&&A[0]!==w.million&&A[0]!==w.billion&&A[0]!==w.trillion)||(C=new RegExp(x+"{2}"),h.match(/[^\d.,]/g)||(b=h.split(f)).length>2||(b.length<2?!b[0].match(/^\d+.*\d$/)||b[0].match(C):b[0].length===1?!b[0].match(/^\d+$/)||b[0].match(C)||!b[1].match(/^\d+$/):!b[0].match(/^\d+.*\d$/)||b[0].match(C)||!b[1].match(/^\d+$/))))},e.fn=p.prototype={clone:function(){return e(this)},format:function(h,g){var f,x,y,b=this._value,w=h||u.defaultFormat;if(g=g||Math.round,b===0&&u.zeroFormat!==null)x=u.zeroFormat;else if(b===null&&u.nullFormat!==null)x=u.nullFormat;else{for(f in l)if(w.match(l[f].regexps.format)){y=l[f].format;break}x=(y=y||e._.numberToFormat)(b,w,g)}return x},value:function(){return this._value},input:function(){return this._input},set:function(h){return this._value=Number(h),this},add:function(h){var g=n.correctionFactor.call(null,this._value,h);return this._value=n.reduce([this._value,h],(function(f,x,y,b){return f+Math.round(g*x)}),0)/g,this},subtract:function(h){var g=n.correctionFactor.call(null,this._value,h);return this._value=n.reduce([h],(function(f,x,y,b){return f-Math.round(g*x)}),Math.round(this._value*g))/g,this},multiply:function(h){return this._value=n.reduce([this._value,h],(function(g,f,x,y){var b=n.correctionFactor(g,f);return Math.round(g*b)*Math.round(f*b)/Math.round(b*b)}),1),this},divide:function(h){return this._value=n.reduce([this._value,h],(function(g,f,x,y){var b=n.correctionFactor(g,f);return Math.round(g*b)/Math.round(f*b)})),this},difference:function(h){return Math.abs(e(this._value).subtract(h).value())}},e.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(h){var g=h%10;return~~(h%100/10)==1?"th":g===1?"st":g===2?"nd":g===3?"rd":"th"},currency:{symbol:"$"}}),e.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(h,g,f){var x,y=e._.includes(g," BPS")?" ":"";return h*=1e4,g=g.replace(/\s?BPS/,""),x=e._.numberToFormat(h,g,f),e._.includes(x,")")?((x=x.split("")).splice(-1,0,y+"BPS"),x=x.join("")):x=x+y+"BPS",x},unformat:function(h){return+(1e-4*e._.stringToNumber(h)).toFixed(15)}}),r={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},s="("+(s=(i={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}).suffixes.concat(r.suffixes.filter((function(h){return i.suffixes.indexOf(h)<0}))).join("|")).replace("B","B(?!PS)")+")",e.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(s)},format:function(h,g,f){var x,y,b,w=e._.includes(g,"ib")?r:i,C=e._.includes(g," b")||e._.includes(g," ib")?" ":"";for(g=g.replace(/\s?i?b/,""),x=0;x<=w.suffixes.length;x++)if(y=Math.pow(w.base,x),b=Math.pow(w.base,x+1),h===null||h===0||h>=y&&h<b){C+=w.suffixes[x],y>0&&(h/=y);break}return e._.numberToFormat(h,g,f)+C},unformat:function(h){var g,f,x=e._.stringToNumber(h);if(x){for(g=i.suffixes.length-1;g>=0;g--){if(e._.includes(h,i.suffixes[g])){f=Math.pow(i.base,g);break}if(e._.includes(h,r.suffixes[g])){f=Math.pow(r.base,g);break}}x*=f||1}return x}}),e.register("format","currency",{regexps:{format:/(\$)/},format:function(h,g,f){var x,y,b,w=e.locales[e.options.currentLocale],C={before:g.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:g.match(/([\+|\-|\)|\s|\$]*)$/)[0]};for(g=g.replace(/\s?\$\s?/,""),x=e._.numberToFormat(h,g,f),h>=0?(C.before=C.before.replace(/[\-\(]/,""),C.after=C.after.replace(/[\-\)]/,"")):h<0&&!e._.includes(C.before,"-")&&!e._.includes(C.before,"(")&&(C.before="-"+C.before),b=0;b<C.before.length;b++)switch(y=C.before[b],y){case"$":x=e._.insert(x,w.currency.symbol,b);break;case" ":x=e._.insert(x," ",b+w.currency.symbol.length-1)}for(b=C.after.length-1;b>=0;b--)switch(y=C.after[b],y){case"$":x=b===C.after.length-1?x+w.currency.symbol:e._.insert(x,w.currency.symbol,-(C.after.length-(1+b)));break;case" ":x=b===C.after.length-1?x+" ":e._.insert(x," ",-(C.after.length-(1+b)+w.currency.symbol.length-1))}return x}}),e.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(h,g,f){var x=(typeof h!="number"||e._.isNaN(h)?"0e+0":h.toExponential()).split("e");return g=g.replace(/e[\+|\-]{1}0/,""),e._.numberToFormat(Number(x[0]),g,f)+"e"+x[1]},unformat:function(h){var g=e._.includes(h,"e+")?h.split("e+"):h.split("e-"),f=Number(g[0]),x=Number(g[1]);return x=e._.includes(h,"e-")?x*=-1:x,e._.reduce([f,Math.pow(10,x)],(function(y,b,w,C){var v=e._.correctionFactor(y,b);return y*v*(b*v)/(v*v)}),1)}}),e.register("format","ordinal",{regexps:{format:/(o)/},format:function(h,g,f){var x=e.locales[e.options.currentLocale],y=e._.includes(g," o")?" ":"";return g=g.replace(/\s?o/,""),y+=x.ordinal(h),e._.numberToFormat(h,g,f)+y}}),e.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(h,g,f){var x,y=e._.includes(g," %")?" ":"";return e.options.scalePercentBy100&&(h*=100),g=g.replace(/\s?\%/,""),x=e._.numberToFormat(h,g,f),e._.includes(x,")")?((x=x.split("")).splice(-1,0,y+"%"),x=x.join("")):x=x+y+"%",x},unformat:function(h){var g=e._.stringToNumber(h);return e.options.scalePercentBy100?.01*g:g}}),e.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(h,g,f){var x=Math.floor(h/60/60),y=Math.floor((h-60*x*60)/60),b=Math.round(h-60*x*60-60*y);return x+":"+(y<10?"0"+y:y)+":"+(b<10?"0"+b:b)},unformat:function(h){var g=h.split(":"),f=0;return g.length===3?(f+=60*Number(g[0])*60,f+=60*Number(g[1]),f+=Number(g[2])):g.length===2&&(f+=60*Number(g[0]),f+=Number(g[1])),Number(f)}}),e}))),vse.exports);const Rf=yr(Fun);function L7(e,...n){const i=new URL(`https://mui.com/production-error/?code=${e}`);return n.forEach((r=>i.searchParams.append("args[]",r))),`Minified MUI error #${e}; visit ${i} for the full message.`}const v7="$$material";var Run={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 zun(e){var n=Object.create(null);return function(i){return n[i]===void 0&&(n[i]=e(i)),n[i]}}var Nun=/[A-Z]|^ms/g,_un=/_EMO_([^_]+?)_([^]*?)_EMO_/g,YSt=function(e){return e.charCodeAt(1)===45},y$e=function(e){return e!=null&&typeof e!="boolean"},Sse=zun((function(e){return YSt(e)?e:e.replace(Nun,"-$&").toLowerCase()})),b$e=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(_un,(function(i,r,s){return I9={name:r,styles:s,next:I9},r}))}return Run[e]===1||YSt(e)||typeof n!="number"||n===0?n:n+"px"};function QZ(e,n,i){if(i==null)return"";var r=i;if(r.__emotion_styles!==void 0)return r;switch(typeof i){case"boolean":return"";case"object":var s=i;if(s.anim===1)return I9={name:s.name,styles:s.styles,next:I9},s.name;var l=i;if(l.styles!==void 0){var c=l.next;if(c!==void 0)for(;c!==void 0;)I9={name:c.name,styles:c.styles,next:I9},c=c.next;return l.styles+";"}return(function(d,u,p){var h="";if(Array.isArray(p))for(var g=0;g<p.length;g++)h+=QZ(d,u,p[g])+";";else for(var f in p){var x=p[f];if(typeof x!="object"){var y=x;y$e(y)&&(h+=Sse(f)+":"+b$e(f,y)+";")}else if(Array.isArray(x)&&typeof x[0]=="string"&&u==null)for(var b=0;b<x.length;b++)y$e(x[b])&&(h+=Sse(f)+":"+b$e(f,x[b])+";");else{var w=QZ(d,u,x);switch(f){case"animation":case"animationName":h+=Sse(f)+":"+w+";";break;default:h+=f+"{"+w+"}"}}}return h})(e,n,i)}return i}var I9,w$e=/label:\s*([^\s;{]+)\s*(;|$)/g,C$e,v$e,A$e,S$e,k$e,j$e={exports:{}};function Vun(){return v$e?C$e:(v$e=1,C$e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}function Hun(){if(S$e)return A$e;S$e=1;var e=Vun();function n(){}function i(){}return i.resetWarningCache=n,A$e=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 s(){return r}r.isRequired=r;var l={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:s,element:r,elementType:r,instanceOf:s,node:r,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:i,resetWarningCache:n};return l.PropTypes=l,l}}function X8e(){return k$e||(k$e=1,j$e.exports=Hun()()),j$e.exports}const _n=yr(X8e());var Uun=(function(){function e(i){var r=this;this._insertTag=function(s){var l;l=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(s,l),r.tags.push(s)},this.isSpeedy=i.speedy===void 0||i.speedy,this.tags=[],this.ctr=0,this.nonce=i.nonce,this.key=i.key,this.container=i.container,this.prepend=i.prepend,this.insertionPoint=i.insertionPoint,this.before=null}var n=e.prototype;return n.hydrate=function(i){i.forEach(this._insertTag)},n.insert=function(i){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag((function(l){var c=document.createElement("style");return c.setAttribute("data-emotion",l.key),l.nonce!==void 0&&c.setAttribute("nonce",l.nonce),c.appendChild(document.createTextNode("")),c.setAttribute("data-s",""),c})(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var s=(function(l){if(l.sheet)return l.sheet;for(var c=0;c<document.styleSheets.length;c++)if(document.styleSheets[c].ownerNode===l)return document.styleSheets[c]})(r);try{s.insertRule(i,s.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(i));this.ctr++},n.flush=function(){this.tags.forEach((function(i){var r;return(r=i.parentNode)==null?void 0:r.removeChild(i)})),this.tags=[],this.ctr=0},e})(),D1="-ms-",$$e="-moz-",es="-webkit-",GSt="comm",ewe="rule",twe="decl",qSt="@keyframes",Wun=Math.abs,gne=String.fromCharCode,Qun=Object.assign;function KSt(e){return e.trim()}function ns(e,n,i){return e.replace(n,i)}function G5e(e,n){return e.indexOf(n)}function qu(e,n){return 0|e.charCodeAt(n)}function yz(e,n,i){return e.slice(n,i)}function c5(e){return e.length}function nwe(e){return e.length}function OV(e,n){return n.push(e),e}var fne=1,aT=1,ZSt=0,ym=0,ed=0,uL="";function xne(e,n,i,r,s,l,c){return{value:e,root:n,parent:i,type:r,props:s,children:l,line:fne,column:aT,length:c,return:""}}function fB(e,n){return Qun(xne("",null,null,"",null,null,0),e,{length:-e.length},n)}function S0(){return ed=ym<ZSt?qu(uL,ym++):0,aT++,ed===10&&(aT=1,fne++),ed}function K5(){return qu(uL,ym)}function iK(){return ym}function NN(e,n){return yz(uL,e,n)}function bz(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 JSt(e){return fne=aT=1,ZSt=c5(uL=e),ym=0,[]}function XSt(e){return uL="",e}function oK(e){return KSt(NN(ym-1,q5e(e===91?e+2:e===40?e+1:e)))}function Yun(e){for(;(ed=K5())&&ed<33;)S0();return bz(e)>2||bz(ed)>3?"":" "}function Gun(e,n){for(;--n&&S0()&&!(ed<48||ed>102||ed>57&&ed<65||ed>70&&ed<97););return NN(e,iK()+(n<6&&K5()==32&&S0()==32))}function q5e(e){for(;S0();)switch(ed){case e:return ym;case 34:case 39:e!==34&&e!==39&&q5e(ed);break;case 40:e===41&&q5e(e);break;case 92:S0()}return ym}function qun(e,n){for(;S0()&&e+ed!==57&&(e+ed!==84||K5()!==47););return"/*"+NN(n,ym-1)+"*"+gne(e===47?e:S0())}function Kun(e){for(;!bz(K5());)S0();return NN(e,ym)}function Zun(e){return XSt(rK("",null,null,null,[""],e=JSt(e),0,[0],e))}function rK(e,n,i,r,s,l,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,A="",S=s,$=l,j=r,I=A;w;)switch(y=v,v=S0()){case 40:if(y!=108&&qu(I,g-1)==58){G5e(I+=ns(oK(v),"&","&\f"),"&\f")!=-1&&(C=-1);break}case 34:case 39:case 91:I+=oK(v);break;case 9:case 10:case 13:case 32:I+=Yun(y);break;case 92:I+=Gun(iK()-1,7);continue;case 47:switch(K5()){case 42:case 47:OV(Jun(qun(S0(),iK()),n,i),u);break;default:I+="/"}break;case 123*b:d[p++]=c5(I)*C;case 125*b:case 59:case 0:switch(v){case 0:case 125:w=0;case 59+h:C==-1&&(I=ns(I,/\f/g,"")),x>0&&c5(I)-g&&OV(x>32?I$e(I+";",r,i,g-1):I$e(ns(I," ","")+";",r,i,g-2),u);break;case 59:I+=";";default:if(OV(j=E$e(I,n,i,p,h,s,d,A,S=[],$=[],g),l),v===123)if(h===0)rK(I,n,j,j,S,l,g,d,$);else switch(f===99&&qu(I,3)===110?100:f){case 100:case 108:case 109:case 115:rK(e,j,j,r&&OV(E$e(e,j,j,0,0,s,d,A,s,S=[],g),$),s,$,g,d,r?S:$);break;default:rK(I,j,j,j,[""],$,0,d,$)}}p=h=x=0,b=C=1,A=I="",g=c;break;case 58:g=1+c5(I),x=y;default:if(b<1){if(v==123)--b;else if(v==125&&b++==0&&(ed=ym>0?qu(uL,--ym):0,aT--,ed===10&&(aT=1,fne--),ed==125))continue}switch(I+=gne(v),v*b){case 38:C=h>0?1:(I+="\f",-1);break;case 44:d[p++]=(c5(I)-1)*C,C=1;break;case 64:K5()===45&&(I+=oK(S0())),f=K5(),h=g=c5(A=I+=Kun(iK())),v++;break;case 45:y===45&&c5(I)==2&&(b=0)}}return l}function E$e(e,n,i,r,s,l,c,d,u,p,h){for(var g=s-1,f=s===0?l:[""],x=nwe(f),y=0,b=0,w=0;y<r;++y)for(var C=0,v=yz(e,g+1,g=Wun(b=c[y])),A=e;C<x;++C)(A=KSt(b>0?f[C]+" "+v:ns(v,/&\f/g,f[C])))&&(u[w++]=A);return xne(e,n,i,s===0?ewe:d,u,p,h)}function Jun(e,n,i){return xne(e,n,i,GSt,gne(ed),yz(e,2,-2),0)}function I$e(e,n,i,r){return xne(e,n,i,twe,yz(e,0,r),yz(e,r+1,-1),r)}function mD(e,n){for(var i="",r=nwe(e),s=0;s<r;s++)i+=n(e[s],s,e,n)||"";return i}function Xun(e,n,i,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case twe:return e.return=e.return||e.value;case GSt:return"";case qSt:return e.return=e.value+"{"+mD(e.children,r)+"}";case ewe:e.value=e.props.join(",")}return c5(i=mD(e.children,r))?e.return=e.value+"{"+i+"}":""}function e1n(e){return function(n){n.root||(n=n.return)&&e(n)}}var t1n=function(e,n,i){for(var r=0,s=0;r=s,s=K5(),r===38&&s===12&&(n[i]=1),!bz(s);)S0();return NN(e,ym)},n1n=function(e,n){return XSt((function(i,r){var s=-1,l=44;do switch(bz(l)){case 0:l===38&&K5()===12&&(r[s]=1),i[s]+=t1n(ym-1,r,s);break;case 2:i[s]+=oK(l);break;case 4:if(l===44){i[++s]=K5()===58?"&\f":"",r[s]=i[s].length;break}default:i[s]+=gne(l)}while(l=S0());return i})(JSt(e),n))},D$e=new WeakMap,i1n=function(e){if(e.type==="rule"&&e.parent&&!(e.length<1)){for(var n=e.value,i=e.parent,r=e.column===i.column&&e.line===i.line;i.type!=="rule";)if(!(i=i.parent))return;if((e.props.length!==1||n.charCodeAt(0)===58||D$e.get(i))&&!r){D$e.set(e,!0);for(var s=[],l=n1n(n,s),c=i.props,d=0,u=0;d<l.length;d++)for(var p=0;p<c.length;p++,u++)e.props[u]=s[d]?l[d].replace(/&\f/g,c[p]):c[p]+" "+l[d]}}},o1n=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function ekt(e,n){switch((function(i,r){return 45^qu(i,0)?(((r<<2^qu(i,0))<<2^qu(i,1))<<2^qu(i,2))<<2^qu(i,3):0})(e,n)){case 5103:return es+"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 es+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return es+e+$$e+e+D1+e+e;case 6828:case 4268:return es+e+D1+e+e;case 6165:return es+e+D1+"flex-"+e+e;case 5187:return es+e+ns(e,/(\w+).+(:[^]+)/,es+"box-$1$2"+D1+"flex-$1$2")+e;case 5443:return es+e+D1+"flex-item-"+ns(e,/flex-|-self/,"")+e;case 4675:return es+e+D1+"flex-line-pack"+ns(e,/align-content|flex-|-self/,"")+e;case 5548:return es+e+D1+ns(e,"shrink","negative")+e;case 5292:return es+e+D1+ns(e,"basis","preferred-size")+e;case 6060:return es+"box-"+ns(e,"-grow","")+es+e+D1+ns(e,"grow","positive")+e;case 4554:return es+ns(e,/([^-])(transform)/g,"$1"+es+"$2")+e;case 6187:return ns(ns(ns(e,/(zoom-|grab)/,es+"$1"),/(image-set)/,es+"$1"),e,"")+e;case 5495:case 3959:return ns(e,/(image-set\([^]*)/,es+"$1$`$1");case 4968:return ns(ns(e,/(.+:)(flex-)?(.*)/,es+"box-pack:$3"+D1+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+es+e+e;case 4095:case 3583:case 4068:case 2532:return ns(e,/(.+)-inline(.+)/,es+"$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(c5(e)-1-n>6)switch(qu(e,n+1)){case 109:if(qu(e,n+4)!==45)break;case 102:return ns(e,/(.+:)(.+)-([^]+)/,"$1"+es+"$2-$3$1"+$$e+(qu(e,n+3)==108?"$3":"$2-$3"))+e;case 115:return~G5e(e,"stretch")?ekt(ns(e,"stretch","fill-available"),n)+e:e}break;case 4949:if(qu(e,n+1)!==115)break;case 6444:switch(qu(e,c5(e)-3-(~G5e(e,"!important")&&10))){case 107:return ns(e,":",":"+es)+e;case 101:return ns(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+es+(qu(e,14)===45?"inline-":"")+"box$3$1"+es+"$2$3$1"+D1+"$2box$3")+e}break;case 5936:switch(qu(e,n+11)){case 114:return es+e+D1+ns(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return es+e+D1+ns(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return es+e+D1+ns(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return es+e+D1+e+e}return e}var r1n=[function(e,n,i,r){if(e.length>-1&&!e.return)switch(e.type){case twe:e.return=ekt(e.value,e.length);break;case qSt:return mD([fB(e,{value:ns(e.value,"@","@"+es)})],r);case ewe:if(e.length)return(function(s,l){return s.map(l).join("")})(e.props,(function(s){switch((function(l,c){return(l=c.exec(l))?l[0]:l})(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return mD([fB(e,{props:[ns(s,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return mD([fB(e,{props:[ns(s,/:(plac\w+)/,":"+es+"input-$1")]}),fB(e,{props:[ns(s,/:(plac\w+)/,":-moz-$1")]}),fB(e,{props:[ns(s,/:(plac\w+)/,D1+"input-$1")]})],r)}return""}))}}],tkt=function(e){var n=e.key;if(n==="css"){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,(function(x){x.getAttribute("data-emotion").indexOf(" ")!==-1&&(document.head.appendChild(x),x.setAttribute("data-s",""))}))}var r,s=e.stylisPlugins||r1n,l={},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++)l[y[b]]=!0;c.push(x)}));var d,u,p=[i1n,o1n],h=[Xun,e1n((function(x){u.insert(x)}))],g=(function(x){var y=nwe(x);return function(b,w,C,v){for(var A="",S=0;S<y;S++)A+=x[S](b,w,C,v)||"";return A}})(p.concat(s,h));d=function(x,y,b,w){u=b,(function(C){mD(Zun(C),g)})(x?x+"{"+y.styles+"}":y.styles),w&&(f.inserted[y.name]=!0)};var f={key:n,sheet:new Uun({key:n,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:l,registered:{},insert:d};return f.sheet.hydrate(c),f};function nkt(e){const{styles:n,defaultTheme:i={}}=e,r=typeof n=="function"?s=>n((function(l){return l==null||Object.keys(l).length===0})(s)?i:s):n;return t.jsx(zN,{styles:r})}const T$e=[];function Q9(e){return T$e[0]=e,(function(n,i,r){if(n.length===1&&typeof n[0]=="object"&&n[0]!==null&&n[0].styles!==void 0)return n[0];var s=!0,l="";I9=void 0;var c=n[0];c==null||c.raw===void 0?(s=!1,l+=QZ(r,i,c)):l+=c[0];for(var d=1;d<n.length;d++)l+=QZ(r,i,n[d]),s&&(l+=c[d]);w$e.lastIndex=0;for(var u,p="";(u=w$e.exec(l))!==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)})(l)+p;return{name:h,styles:l,next:I9}})(T$e)}var L$e,B$e,P$e={exports:{}},Ls={};function a1n(){if(L$e)return Ls;L$e=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=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 i:case s: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 l:return b;default:return w}}case n:return w}}}return Ls.ContextConsumer=l,Ls.ContextProvider=c,Ls.Element=e,Ls.ForwardRef=d,Ls.Fragment=i,Ls.Lazy=g,Ls.Memo=h,Ls.Portal=n,Ls.Profiler=s,Ls.StrictMode=r,Ls.Suspense=u,Ls.SuspenseList=p,Ls.isContextConsumer=function(b){return y(b)===l},Ls.isContextProvider=function(b){return y(b)===c},Ls.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},Ls.isForwardRef=function(b){return y(b)===d},Ls.isFragment=function(b){return y(b)===i},Ls.isLazy=function(b){return y(b)===g},Ls.isMemo=function(b){return y(b)===h},Ls.isPortal=function(b){return y(b)===n},Ls.isProfiler=function(b){return y(b)===s},Ls.isStrictMode=function(b){return y(b)===r},Ls.isSuspense=function(b){return y(b)===u},Ls.isSuspenseList=function(b){return y(b)===p},Ls.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===i||b===s||b===r||b===u||b===p||typeof b=="object"&&b!==null&&(b.$$typeof===g||b.$$typeof===h||b.$$typeof===c||b.$$typeof===l||b.$$typeof===d||b.$$typeof===x||b.getModuleId!==void 0)},Ls.typeOf=y,Ls}function s1n(){return B$e||(B$e=1,P$e.exports=a1n()),P$e.exports}var ikt=s1n();function Ky(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 okt(e){if(m.isValidElement(e)||ikt.isValidElementType(e)||!Ky(e))return e;const n={};return Object.keys(e).forEach((i=>{n[i]=okt(e[i])})),n}function K1(e,n,i={clone:!0}){const r=i.clone?{...e}:e;return Ky(e)&&Ky(n)&&Object.keys(n).forEach((s=>{m.isValidElement(n[s])||ikt.isValidElementType(n[s])?r[s]=n[s]:Ky(n[s])&&Object.prototype.hasOwnProperty.call(e,s)&&Ky(e[s])?r[s]=K1(e[s],n[s],i):i.clone?r[s]=Ky(n[s])?okt(n[s]):n[s]:r[s]=n[s]})),r}function l1n(e){const{values:n={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:i="px",step:r=5,...s}=e,l=(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(l);function d(h){return`@media (min-width:${typeof n[h]=="number"?n[h]:h}${i})`}function u(h){return`@media (max-width:${(typeof n[h]=="number"?n[h]:h)-r/100}${i})`}function p(h,g){const f=c.indexOf(g);return`@media (min-width:${typeof n[h]=="number"?n[h]:h}${i}) and (max-width:${(f!==-1&&typeof n[c[f]]=="number"?n[c[f]]:g)-r/100}${i})`}return{keys:c,values:l,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:i,...s}}function M$e(e,n){if(!e.containerQueries)return n;const i=Object.keys(n).filter((r=>r.startsWith("@container"))).sort(((r,s)=>{const l=/min-width:\s*([0-9.]+)/;return+(r.match(l)?.[1]||0)-+(s.match(l)?.[1]||0)}));return i.length?i.reduce(((r,s)=>{const l=n[s];return delete r[s],r[s]=l,r}),{...n}):n}const c1n={borderRadius:4};function ZF(e,n){return n?K1(e,n,{clone:!1}):e}const yne={xs:0,sm:600,md:900,lg:1200,xl:1536},O$e={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${yne[e]}px)`},d1n={containerQueries:e=>({up:n=>{let i=typeof n=="number"?n:yne[n]||n;return typeof i=="number"&&(i=`${i}px`),e?`@container ${e} (min-width:${i})`:`@container (min-width:${i})`}})};function B7(e,n,i){const r=e.theme||{};if(Array.isArray(n)){const s=r.breakpoints||O$e;return n.reduce(((l,c,d)=>(l[s.up(s.keys[d])]=i(n[d]),l)),{})}if(typeof n=="object"){const s=r.breakpoints||O$e;return Object.keys(n).reduce(((l,c)=>{if((function(d,u){return u==="@"||u.startsWith("@")&&(d.some((p=>u.startsWith(`@${p}`)))||!!u.match(/^@\d/))})(s.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:d1n,c);d&&(l[d]=i(n[c],c))}else if(Object.keys(s.values||yne).includes(c))l[s.up(c)]=i(n[c],c);else{const d=c;l[d]=n[d]}return l}),{})}return i(n)}function F$e(e,n){return e.reduce(((i,r)=>{const s=i[r];return(!s||Object.keys(s).length===0)&&delete i[r],i}),n)}function nr(e){if(typeof e!="string")throw new Error(L7(7));return e.charAt(0).toUpperCase()+e.slice(1)}function bne(e,n,i=!0){if(!n||typeof n!="string")return null;if(e&&e.vars&&i){const r=`vars.${n}`.split(".").reduce(((s,l)=>s&&s[l]?s[l]:null),e);if(r!=null)return r}return n.split(".").reduce(((r,s)=>r&&r[s]!=null?r[s]:null),e)}function YZ(e,n,i,r=i){let s;return s=typeof e=="function"?e(i):Array.isArray(e)?e[i]||r:bne(e,i)||r,n&&(s=n(s,r,e)),s}function Pc(e){const{prop:n,cssProperty:i=e.prop,themeKey:r,transform:s}=e,l=c=>{if(c[n]==null)return null;const d=c[n],u=bne(c.theme,r)||{};return B7(c,d,(p=>{let h=YZ(u,s,p);return p===h&&typeof p=="string"&&(h=YZ(u,s,`${n}${p==="default"?"":nr(p)}`,p)),i===!1?h:{[i]:h}}))};return l.propTypes={},l.filterProps=[n],l}const u1n={m:"margin",p:"padding"},p1n={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},R$e={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},h1n=(function(e){const n={};return i=>(n[i]===void 0&&(n[i]=e(i)),n[i])})((e=>{if(e.length>2){if(!R$e[e])return[e];e=R$e[e]}const[n,i]=e.split(""),r=u1n[n],s=p1n[i]||"";return Array.isArray(s)?s.map((l=>r+l)):[r+s]})),rkt=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],akt=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];function _N(e,n,i,r){const s=bne(e,n,!0)??i;return typeof s=="number"||typeof s=="string"?l=>typeof l=="string"?l:typeof s=="string"?s.startsWith("var(")&&l===0?0:s.startsWith("var(")&&l===1?s:`calc(${l} * ${s})`:s*l:Array.isArray(s)?l=>{if(typeof l=="string")return l;const c=Math.abs(l),d=s[c];return l>=0?d:typeof d=="number"?-d:typeof d=="string"&&d.startsWith("var(")?`calc(-1 * ${d})`:`-${d}`}:typeof s=="function"?s:()=>{}}function iwe(e){return _N(e,"spacing",8)}function VN(e,n){return typeof n=="string"||n==null?n:e(n)}function m1n(e,n,i,r){if(!n.includes(i))return null;const s=(function(l,c){return d=>l.reduce(((u,p)=>(u[p]=VN(c,d),u)),{})})(h1n(i),r);return B7(e,e[i],s)}function skt(e,n){const i=iwe(e.theme);return Object.keys(e).map((r=>m1n(e,n,r,i))).reduce(ZF,{})}function sc(e){return skt(e,rkt)}function lc(e){return skt(e,akt)}function lkt(e=8,n=iwe({spacing:e})){if(e.mui)return e;const i=(...r)=>(r.length===0?[1]:r).map((s=>{const l=n(s);return typeof l=="number"?`${l}px`:l})).join(" ");return i.mui=!0,i}function wne(...e){const n=e.reduce(((r,s)=>(s.filterProps.forEach((l=>{r[l]=s})),r)),{}),i=r=>Object.keys(r).reduce(((s,l)=>n[l]?ZF(s,n[l](r)):s),{});return i.propTypes={},i.filterProps=e.reduce(((r,s)=>r.concat(s.filterProps)),[]),i}function Og(e){return typeof e!="number"?e:`${e}px solid`}function y2(e,n){return Pc({prop:e,themeKey:"borders",transform:n})}sc.propTypes={},sc.filterProps=rkt,lc.propTypes={},lc.filterProps=akt;const g1n=y2("border",Og),f1n=y2("borderTop",Og),x1n=y2("borderRight",Og),y1n=y2("borderBottom",Og),b1n=y2("borderLeft",Og),w1n=y2("borderColor"),C1n=y2("borderTopColor"),v1n=y2("borderRightColor"),A1n=y2("borderBottomColor"),S1n=y2("borderLeftColor"),k1n=y2("outline",Og),j1n=y2("outlineColor"),aK=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const n=_N(e.theme,"shape.borderRadius",4),i=r=>({borderRadius:VN(n,r)});return B7(e,e.borderRadius,i)}return null};aK.propTypes={},aK.filterProps=["borderRadius"],wne(g1n,f1n,x1n,y1n,b1n,w1n,C1n,v1n,A1n,S1n,aK,k1n,j1n);const GZ=e=>{if(e.gap!==void 0&&e.gap!==null){const n=_N(e.theme,"spacing",8),i=r=>({gap:VN(n,r)});return B7(e,e.gap,i)}return null};GZ.propTypes={},GZ.filterProps=["gap"];const qZ=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const n=_N(e.theme,"spacing",8),i=r=>({columnGap:VN(n,r)});return B7(e,e.columnGap,i)}return null};qZ.propTypes={},qZ.filterProps=["columnGap"];const KZ=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const n=_N(e.theme,"spacing",8),i=r=>({rowGap:VN(n,r)});return B7(e,e.rowGap,i)}return null};KZ.propTypes={},KZ.filterProps=["rowGap"];function gD(e,n){return n==="grey"?n:e}wne(GZ,qZ,KZ,Pc({prop:"gridColumn"}),Pc({prop:"gridRow"}),Pc({prop:"gridAutoFlow"}),Pc({prop:"gridAutoColumns"}),Pc({prop:"gridAutoRows"}),Pc({prop:"gridTemplateColumns"}),Pc({prop:"gridTemplateRows"}),Pc({prop:"gridTemplateAreas"}),Pc({prop:"gridArea"}));function p0(e){return e<=1&&e!==0?100*e+"%":e}wne(Pc({prop:"color",themeKey:"palette",transform:gD}),Pc({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:gD}),Pc({prop:"backgroundColor",themeKey:"palette",transform:gD}));const $1n=Pc({prop:"width",transform:p0}),owe=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const n=i=>{const r=e.theme?.breakpoints?.values?.[i]||yne[i];return r?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:p0(i)}};return B7(e,e.maxWidth,n)}return null};owe.filterProps=["maxWidth"];const E1n=Pc({prop:"minWidth",transform:p0}),I1n=Pc({prop:"height",transform:p0}),D1n=Pc({prop:"maxHeight",transform:p0}),T1n=Pc({prop:"minHeight",transform:p0});Pc({prop:"size",cssProperty:"width",transform:p0}),Pc({prop:"size",cssProperty:"height",transform:p0});wne($1n,owe,E1n,I1n,D1n,T1n,Pc({prop:"boxSizing"}));const Cne={border:{themeKey:"borders",transform:Og},borderTop:{themeKey:"borders",transform:Og},borderRight:{themeKey:"borders",transform:Og},borderBottom:{themeKey:"borders",transform:Og},borderLeft:{themeKey:"borders",transform:Og},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Og},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:aK},color:{themeKey:"palette",transform:gD},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:gD},backgroundColor:{themeKey:"palette",transform:gD},p:{style:lc},pt:{style:lc},pr:{style:lc},pb:{style:lc},pl:{style:lc},px:{style:lc},py:{style:lc},padding:{style:lc},paddingTop:{style:lc},paddingRight:{style:lc},paddingBottom:{style:lc},paddingLeft:{style:lc},paddingX:{style:lc},paddingY:{style:lc},paddingInline:{style:lc},paddingInlineStart:{style:lc},paddingInlineEnd:{style:lc},paddingBlock:{style:lc},paddingBlockStart:{style:lc},paddingBlockEnd:{style:lc},m:{style:sc},mt:{style:sc},mr:{style:sc},mb:{style:sc},ml:{style:sc},mx:{style:sc},my:{style:sc},margin:{style:sc},marginTop:{style:sc},marginRight:{style:sc},marginBottom:{style:sc},marginLeft:{style:sc},marginX:{style:sc},marginY:{style:sc},marginInline:{style:sc},marginInlineStart:{style:sc},marginInlineEnd:{style:sc},marginBlock:{style:sc},marginBlockStart:{style:sc},marginBlockEnd:{style:sc},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:GZ},rowGap:{style:KZ},columnGap:{style:qZ},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:p0},maxWidth:{style:owe},minWidth:{transform:p0},height:{transform:p0},maxHeight:{transform:p0},minHeight:{transform:p0},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"}},kS=(function(){function e(n,i,r,s){const l={[n]:i,theme:r},c=s[n];if(!c)return{[n]:i};const{cssProperty:d=n,themeKey:u,transform:p,style:h}=c;if(i==null)return null;if(u==="typography"&&i==="inherit")return{[n]:i};const g=bne(r,u)||{};return h?h(l):B7(l,i,(f=>{let x=YZ(g,p,f);return f===x&&typeof f=="string"&&(x=YZ(g,p,`${n}${f==="default"?"":nr(f)}`,f)),d===!1?x:{[d]:x}}))}return function n(i){const{sx:r,theme:s={},nested:l}=i||{};if(!r)return null;const c=s.unstable_sxConfig??Cne;function d(u){let p=u;if(typeof u=="function")p=u(s);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)),{})||{}})(s.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],s);if(y!=null)if(typeof y=="object")if(c[x])f=ZF(f,e(x,y,s,c));else{const b=B7({theme:s},y,(w=>({[x]:w})));(function(...w){const C=w.reduce(((A,S)=>A.concat(Object.keys(S))),[]),v=new Set(C);return w.every((A=>v.size===Object.keys(A).length))})(b,y)?f[x]=n({sx:y,theme:s,nested:!0}):f=ZF(f,b)}else f=ZF(f,e(x,y,s,c))})),!l&&s.modularCssLayers?{"@layer sx":M$e(s,F$e(g,f))}:M$e(s,F$e(g,f))}return Array.isArray(r)?r.map(d):d(r)}})();function L1n(e,n){const i=this;if(i.vars){if(!i.colorSchemes?.[e]||typeof i.getColorSchemeSelector!="function")return{};let r=i.getColorSchemeSelector(e);return r==="&"?n:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:n})}return i.palette.mode===e?n:{}}function rwe(e={},...n){const{breakpoints:i={},palette:r={},spacing:s,shape:l={},...c}=e;let d=K1({breakpoints:l1n(i),direction:"ltr",components:{},palette:{mode:"light",...r},spacing:lkt(s),shape:{...c1n,...l}},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=L1n,d=n.reduce(((u,p)=>K1(u,p)),d),d.unstable_sxConfig={...Cne,...c?.unstable_sxConfig},d.unstable_sx=function(u){return kS({sx:u,theme:this})},d}function K5e(e=null){const n=m.useContext(zSt);return!n||(function(i){return Object.keys(i).length===0})(n)?e:n}kS.filterProps=["sx"];const B1n=rwe();function ckt(e=B1n){return K5e(e)}function z$e(e){const n=Q9(e);return e!==n&&n.styles?(n.styles.match(/^@layer\s+[^{]*$/)||(n.styles=`@layer global{${n.styles}}`),n):e}function dkt({styles:e,themeId:n,defaultTheme:i={}}){const r=ckt(i),s=n&&r[n]||r;let l=typeof e=="function"?e(s):e;return s.modularCssLayers&&(l=Array.isArray(l)?l.map((c=>z$e(typeof c=="function"?c(s):c))):z$e(l)),t.jsx(nkt,{styles:l})}const N$e=e=>e,P1n=(()=>{let e=N$e;return{configure(n){e=n},generate:n=>e(n),reset(){e=N$e}}})();function ukt(e){var n,i,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(n=0;n<s;n++)e[n]&&(i=ukt(e[n]))&&(r&&(r+=" "),r+=i)}else for(i in e)e[i]&&(r&&(r+=" "),r+=i);return r}function or(){for(var e,n,i=0,r="",s=arguments.length;i<s;i++)(e=arguments[i])&&(n=ukt(e))&&(r&&(r+=" "),r+=n);return r}const M1n={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 is(e,n,i="Mui"){const r=M1n[n];return r?`${i}-${r}`:`${P1n.generate(e)}-${n}`}function Ba(e,n,i="Mui"){const r={};return n.forEach((s=>{r[s]=is(e,s,i)})),r}function pkt(e){const{variants:n,...i}=e,r={variants:n,style:Q9(i),isProcessed:!0};return r.style===i||n&&n.forEach((s=>{typeof s.style!="function"&&(s.style=Q9(s.style))})),r}const O1n=rwe();function kse(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function gA(e,n){return n&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${n}{${String(e.styles)}}`),e}function F1n(e){return e?(n,i)=>i[e]:null}function sK(e,n,i){const r=typeof n=="function"?n(e):n;if(Array.isArray(r))return r.flatMap((s=>sK(e,s,i)));if(Array.isArray(r?.variants)){let s;if(r.isProcessed)s=i?gA(r.style,i):r.style;else{const{variants:l,...c}=r;s=i?gA(Q9(c),i):c}return hkt(e,r.variants,[s],i)}return r?.isProcessed?i?gA(Q9(r.style),i):r.style:i?gA(Q9(r),i):r}function hkt(e,n,i=[],r=void 0){let s;e:for(let l=0;l<n.length;l+=1){const c=n[l];if(typeof c.props=="function"){if(s??={...e,...e.ownerState,ownerState:e.ownerState},!c.props(s))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"?(s??={...e,...e.ownerState,ownerState:e.ownerState},i.push(r?gA(Q9(c.style(s)),r):c.style(s))):i.push(r?gA(Q9(c.style),r):c.style)}return i}function R1n(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Z5e(e,n,i=!1){const r={...n};for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)){const l=s;if(l==="components"||l==="slots")r[l]={...e[l],...r[l]};else if(l==="componentsProps"||l==="slotProps"){const c=e[l],d=n[l];if(d)if(c){r[l]={...d};for(const u in c)if(Object.prototype.hasOwnProperty.call(c,u)){const p=u;r[l][p]=Z5e(c[p],d[p],i)}}else r[l]=d;else r[l]=c||{}}else l==="className"&&i&&n.className?r.className=or(e?.className,n?.className):l==="style"&&i&&n.style?r.style={...e?.style,...n?.style}:r[l]===void 0&&(r[l]=e[l])}return r}const D0=typeof window<"u"?m.useLayoutEffect:m.useEffect;function awe(e,n=0,i=1){return(function(r,s=Number.MIN_SAFE_INTEGER,l=Number.MAX_SAFE_INTEGER){return Math.max(s,Math.min(r,l))})(e,n,i)}function d8(e){if(e.type)return e;if(e.charAt(0)==="#")return d8((function(l){l=l.slice(1);const c=new RegExp(`.{1,${l.length>=6?2:1}}`,"g");let d=l.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("("),i=e.substring(0,n);if(!["rgb","rgba","hsl","hsla","color"].includes(i))throw new Error(L7(9,e));let r,s=e.substring(n+1,e.length-1);if(i==="color"){if(s=s.split(" "),r=s.shift(),s.length===4&&s[3].charAt(0)==="/"&&(s[3]=s[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(r))throw new Error(L7(10,r))}else s=s.split(",");return s=s.map((l=>parseFloat(l))),{type:i,values:s,colorSpace:r}}const UO=(e,n)=>{try{return(i=>{const r=d8(i);return r.values.slice(0,3).map(((s,l)=>r.type.includes("hsl")&&l!==0?`${s}%`:s)).join(" ")})(e)}catch{return e}};function vne(e){const{type:n,colorSpace:i}=e;let{values:r}=e;return n.includes("rgb")?r=r.map(((s,l)=>l<3?parseInt(s,10):s)):n.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=n.includes("color")?`${i} ${r.join(" ")}`:`${r.join(", ")}`,`${n}(${r})`}function mkt(e){e=d8(e);const{values:n}=e,i=n[0],r=n[1]/100,s=n[2]/100,l=r*Math.min(s,1-s),c=(p,h=(p+i/30)%12)=>s-l*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])),vne({type:d,values:u})}function J5e(e){let n=(e=d8(e)).type==="hsl"||e.type==="hsla"?d8(mkt(e)).values:e.values;return n=n.map((i=>(e.type!=="color"&&(i/=255),i<=.03928?i/12.92:((i+.055)/1.055)**2.4))),Number((.2126*n[0]+.7152*n[1]+.0722*n[2]).toFixed(3))}function ZZ(e,n){return e=d8(e),n=awe(n),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${n}`:e.values[3]=n,vne(e)}function Kw(e,n,i){try{return ZZ(e,n)}catch{return e}}function Ane(e,n){if(e=d8(e),n=awe(n),e.type.includes("hsl"))e.values[2]*=1-n;else if(e.type.includes("rgb")||e.type.includes("color"))for(let i=0;i<3;i+=1)e.values[i]*=1-n;return vne(e)}function ys(e,n,i){try{return Ane(e,n)}catch{return e}}function Sne(e,n){if(e=d8(e),n=awe(n),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*n;else if(e.type.includes("rgb"))for(let i=0;i<3;i+=1)e.values[i]+=(255-e.values[i])*n;else if(e.type.includes("color"))for(let i=0;i<3;i+=1)e.values[i]+=(1-e.values[i])*n;return vne(e)}function bs(e,n,i){try{return Sne(e,n)}catch{return e}}function FV(e,n,i){try{return(function(r,s=.15){return J5e(r)>.5?Ane(r,s):Sne(r,s)})(e,n)}catch{return e}}const gkt=m.createContext(null);function swe(){return m.useContext(gkt)}const z1n=typeof Symbol=="function"&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function N1n(e){const{children:n,theme:i}=e,r=swe(),s=m.useMemo((()=>{const l=r===null?{...i}:(function(c,d){return typeof d=="function"?d(c):{...c,...d}})(r,i);return l!=null&&(l[z1n]=r!==null),l}),[i,r]);return t.jsx(gkt.Provider,{value:s,children:n})}const fkt=m.createContext();function _1n({value:e,...n}){return t.jsx(fkt.Provider,{value:e??!0,...n})}const kne=()=>m.useContext(fkt)??!1,xkt=m.createContext(void 0);function V1n({value:e,children:n}){return t.jsx(xkt.Provider,{value:e,children:n})}function H1n({props:e,name:n}){return(function(i){const{theme:r,name:s,props:l}=i;if(!r||!r.components||!r.components[s])return l;const c=r.components[s];return c.defaultProps?Z5e(c.defaultProps,l,r.components.mergeClassNameAndStyle):c.styleOverrides||c.variants?l:Z5e(c,l,r.components.mergeClassNameAndStyle)})({props:e,name:n,theme:{components:m.useContext(xkt)}})}let _$e=0;const V$e={...wsn}.useId;function jne(e){if(V$e!==void 0){const n=V$e();return e??n}return(function(n){const[i,r]=m.useState(n),s=n||i;return m.useEffect((()=>{i==null&&(_$e+=1,r(`mui-${_$e}`))}),[i]),s})(e)}const H$e={};function U$e(e,n,i,r=!1){return m.useMemo((()=>{const s=e&&n[e]||n;if(typeof i=="function"){const l=i(s),c=e?{...n,[e]:l}:l;return r?()=>c:c}return e?{...n,[e]:i}:{...n,...i}}),[e,n,i,r])}function ykt(e){const{children:n,theme:i,themeId:r}=e,s=K5e(H$e),l=swe()||H$e,c=U$e(r,s,i),d=U$e(r,l,i,!0),u=(r?c[r]:c).direction==="rtl",p=(function(h){const g=K5e(),f=jne()||"",{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};`:"",D0((()=>{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(dkt,{styles:y}):null})(c);return t.jsx(N1n,{theme:d,children:t.jsx(zSt.Provider,{value:c,children:t.jsx(_1n,{value:u,children:t.jsxs(V1n,{value:r?c[r].components:c.components,children:[p,n]})})})})}const W$e={theme:void 0},X5e="mode",exe="color-scheme",U1n="data-color-scheme";function W1n(){}const Q1n=({key:e,storageWindow:n})=>(!n&&typeof window<"u"&&(n=window),{get(i){if(typeof window>"u")return;if(!n)return i;let r;try{r=n.localStorage.getItem(e)}catch{}return r||i},set:i=>{if(n)try{n.localStorage.setItem(e,i)}catch{}},subscribe:i=>{if(!n)return W1n;const r=s=>{const l=s.newValue;s.key===e&&i(l)};return n.addEventListener("storage",r),()=>{n.removeEventListener("storage",r)}}});function jse(){}function Q$e(e){if(typeof window<"u"&&typeof window.matchMedia=="function"&&e==="system")return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Y$e(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 Y1n(e){const{defaultMode:n="light",defaultLightColorScheme:i,defaultDarkColorScheme:r,supportedColorSchemes:s=[],modeStorageKey:l=X5e,colorSchemeStorageKey:c=exe,storageWindow:d=typeof window>"u"?void 0:window,storageManager:u=Q1n,noSsr:p=!1}=e,h=s.join(","),g=s.length>1,f=m.useMemo((()=>u?.({key:l,storageWindow:d})),[u,l,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 E=f?.get(n)||n,D=x?.get(i)||i,B=y?.get(r)||r;return{mode:E,systemMode:Q$e(E),lightColorScheme:D,darkColorScheme:B}})),[C,v]=m.useState(p||!g);m.useEffect((()=>{v(!0)}),[]);const A=(function(E){return Y$e(E,(D=>D==="light"?E.lightColorScheme:D==="dark"?E.darkColorScheme:void 0))})(b),S=m.useCallback((E=>{w((D=>{if(E===D.mode)return D;const B=E??n;return f?.set(B),{...D,mode:B,systemMode:Q$e(B)}}))}),[f,n]),$=m.useCallback((E=>{E?typeof E=="string"?E&&!h.includes(E)?console.error(`\`${E}\` does not exist in \`theme.colorSchemes\`.`):w((D=>{const B={...D};return Y$e(D,(F=>{F==="light"&&(x?.set(E),B.lightColorScheme=E),F==="dark"&&(y?.set(E),B.darkColorScheme=E)})),B})):w((D=>{const B={...D},F=E.light===null?i:E.light,R=E.dark===null?r:E.dark;return F&&(h.includes(F)?(B.lightColorScheme=F,x?.set(F)):console.error(`\`${F}\` does not exist in \`theme.colorSchemes\`.`)),R&&(h.includes(R)?(B.darkColorScheme=R,y?.set(R)):console.error(`\`${R}\` does not exist in \`theme.colorSchemes\`.`)),B})):w((D=>(x?.set(i),y?.set(r),{...D,lightColorScheme:i,darkColorScheme:r})))}),[h,x,y,i,r]),j=m.useCallback((E=>{b.mode==="system"&&w((D=>{const B=E?.matches?"dark":"light";return D.systemMode===B?D:{...D,systemMode:B}}))}),[b.mode]),I=m.useRef(j);return I.current=j,m.useEffect((()=>{if(typeof window.matchMedia!="function"||!g)return;const E=(...B)=>I.current(...B),D=window.matchMedia("(prefers-color-scheme: dark)");return D.addListener(E),E(D),()=>{D.removeListener(E)}}),[g]),m.useEffect((()=>{if(g){const E=f?.subscribe((F=>{(!F||["light","dark","system"].includes(F))&&S(F||n)}))||jse,D=x?.subscribe((F=>{(!F||h.match(F))&&$({light:F})}))||jse,B=y?.subscribe((F=>{(!F||h.match(F))&&$({dark:F})}))||jse;return()=>{E(),D(),B()}}}),[$,S,h,n,d,g,f,x,y]),{...b,mode:C?b.mode:void 0,systemMode:C?b.systemMode:void 0,colorScheme:C?A:void 0,setMode:S,setColorScheme:$}}function G1n(e=""){function n(...i){if(!i.length)return"";const r=i[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(...i.slice(1))})`}return(i,...r)=>`var(--${e?`${e}-`:""}${i}${n(...r)})`}const G$e=(e,n,i,r=[])=>{let s=e;n.forEach(((l,c)=>{c===n.length-1?Array.isArray(s)?s[Number(l)]=i:s&&typeof s=="object"&&(s[l]=i):s&&typeof s=="object"&&(s[l]||(s[l]=r.includes(l)?[]:{}),s=s[l])}))};function $se(e,n){const{prefix:i,shouldSkipGeneratingVar:r}=n||{},s={},l={},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=`--${i?`${i}-`:""}${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(s,{[h]:g}),G$e(l,d,`var(${h})`,p),G$e(c,d,`var(${h}, ${g})`,p)}}),(d=>d[0]==="vars")),{css:s,vars:l,varsWithDefaults:c}}function os(e,n,i=void 0){const r={};for(const s in e){const l=e[s];let c="",d=!0;for(let u=0;u<l.length;u+=1){const p=l[u];p&&(c+=(d===!0?"":" ")+n(p),d=!1,i&&i[p]&&(c+=" "+i[p]))}r[s]=c}return r}function Ese(e,n){return m.isValidElement(e)&&n.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}const wz={black:"#000",white:"#fff"},q1n={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"},K1n="#f3e5f5",Z1n="#ce93d8",J1n="#ba68c8",X1n="#ab47bc",epn="#9c27b0",tpn="#7b1fa2",npn="#e57373",ipn="#ef5350",opn="#f44336",q$e="#d32f2f",rpn="#c62828",apn="#ffb74d",spn="#ffa726",lpn="#ff9800",cpn="#f57c00",dpn="#e65100",upn="#e3f2fd",ppn="#90caf9",K$e="#42a5f5",hpn="#1976d2",mpn="#1565c0",gpn="#4fc3f7",fpn="#29b6f6",xpn="#03a9f4",Z$e="#0288d1",ypn="#01579b",bpn="#81c784",wpn="#66bb6a",Cpn="#4caf50",vpn="#388e3c",Apn="#2e7d32",Spn="#1b5e20";function bkt(){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:wz.white,default:wz.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 wkt=bkt();function Ckt(){return{text:{primary:wz.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:wz.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 txe=Ckt();function J$e(e,n,i,r){const s=r.light||r,l=r.dark||1.5*r;e[n]||(e.hasOwnProperty(i)?e[n]=e[i]:n==="light"?e.light=Sne(e.main,s):n==="dark"&&(e.dark=Ane(e.main,l)))}function X$e(e,n,i,r,s){const l=s.light||s,c=s.dark||1.5*s;n[i]||(n.hasOwnProperty(r)?n[i]=n[r]:i==="light"?n.light=`color-mix(in ${e}, ${n.main}, #fff ${(100*l).toFixed(0)}%)`:i==="dark"&&(n.dark=`color-mix(in ${e}, ${n.main}, #000 ${(100*c).toFixed(0)}%)`))}function lwe(e){const{mode:n="light",contrastThreshold:i=3,tonalOffset:r=.2,colorSpace:s,...l}=e,c=e.primary||(function(b="light"){return b==="dark"?{main:ppn,light:upn,dark:K$e}:{main:hpn,light:K$e,dark:mpn}})(n),d=e.secondary||(function(b="light"){return b==="dark"?{main:Z1n,light:K1n,dark:X1n}:{main:epn,light:J1n,dark:tpn}})(n),u=e.error||(function(b="light"){return b==="dark"?{main:opn,light:npn,dark:q$e}:{main:q$e,light:ipn,dark:rpn}})(n),p=e.info||(function(b="light"){return b==="dark"?{main:fpn,light:gpn,dark:Z$e}:{main:Z$e,light:xpn,dark:ypn}})(n),h=e.success||(function(b="light"){return b==="dark"?{main:wpn,light:bpn,dark:vpn}:{main:Apn,light:Cpn,dark:Spn}})(n),g=e.warning||(function(b="light"){return b==="dark"?{main:spn,light:apn,dark:cpn}:{main:"#ed6c02",light:lpn,dark:dpn}})(n);function f(b){return s?(function(C){return`oklch(from ${C} var(--__l) 0 h / var(--__a))`})(b):(function(C,v){const A=J5e(C),S=J5e(v);return(Math.max(A,S)+.05)/(Math.min(A,S)+.05)})(b,txe.text.primary)>=i?txe.text.primary:wkt.text.primary}const x=({color:b,name:w,mainShade:C=500,lightShade:v=300,darkShade:A=700})=>{if(!(b={...b}).main&&b[C]&&(b.main=b[C]),!b.hasOwnProperty("main"))throw new Error(L7(11,w?` (${w})`:"",C));if(typeof b.main!="string")throw new Error(L7(12,w?` (${w})`:"",JSON.stringify(b.main)));return s?(X$e(s,b,"light",v,r),X$e(s,b,"dark",A,r)):(J$e(b,"light",v,r),J$e(b,"dark",A,r)),b.contrastText||(b.contrastText=f(b.main)),b};let y;return n==="light"?y=bkt():n==="dark"&&(y=Ckt()),K1({common:{...wz},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:q1n,contrastThreshold:i,getContrastText:f,augmentColor:x,tonalOffset:r,...y},l)}function kpn(e){const n={};return Object.entries(e).forEach((i=>{const[r,s]=i;typeof s=="object"&&(n[r]=`${s.fontStyle?`${s.fontStyle} `:""}${s.fontVariant?`${s.fontVariant} `:""}${s.fontWeight?`${s.fontWeight} `:""}${s.fontStretch?`${s.fontStretch} `:""}${s.fontSize||""}${s.lineHeight?`/${s.lineHeight} `:""}${s.fontFamily||""}`)})),n}function jpn(e,n){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...n}}function $pn(e){return Math.round(1e5*e)/1e5}const eEe={textTransform:"uppercase"},tEe='"Roboto", "Helvetica", "Arial", sans-serif';function vkt(e,n){const{fontFamily:i=tEe,fontSize:r=14,fontWeightLight:s=300,fontWeightRegular:l=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,A,S)=>({fontFamily:i,fontWeight:w,fontSize:x(C),lineHeight:v,...i===tEe?{letterSpacing:`${$pn(A/C)}em`}:{},...S,...p}),b={h1:y(s,96,1.167,-1.5),h2:y(s,60,1.2,-.5),h3:y(l,48,1.167,0),h4:y(l,34,1.235,.25),h5:y(l,24,1.334,0),h6:y(c,20,1.6,.15),subtitle1:y(l,16,1.75,.15),subtitle2:y(c,14,1.57,.1),body1:y(l,16,1.5,.15),body2:y(l,14,1.43,.15),button:y(c,14,1.75,.4,eEe),caption:y(l,12,1.66,.4),overline:y(l,12,2.66,1,eEe),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return K1({htmlFontSize:u,pxToRem:x,fontFamily:i,fontSize:r,fontWeightLight:s,fontWeightRegular:l,fontWeightMedium:c,fontWeightBold:d,...b},g,{clone:!1})}function kl(...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 Epn=["none",kl(0,2,1,-1,0,1,1,0,0,1,3,0),kl(0,3,1,-2,0,2,2,0,0,1,5,0),kl(0,3,3,-2,0,3,4,0,0,1,8,0),kl(0,2,4,-1,0,4,5,0,0,1,10,0),kl(0,3,5,-1,0,5,8,0,0,1,14,0),kl(0,3,5,-1,0,6,10,0,0,1,18,0),kl(0,4,5,-2,0,7,10,1,0,2,16,1),kl(0,5,5,-3,0,8,10,1,0,3,14,2),kl(0,5,6,-3,0,9,12,1,0,3,16,2),kl(0,6,6,-3,0,10,14,1,0,4,18,3),kl(0,6,7,-4,0,11,15,1,0,4,20,3),kl(0,7,8,-4,0,12,17,2,0,5,22,4),kl(0,7,8,-4,0,13,19,2,0,5,24,4),kl(0,7,9,-4,0,14,21,2,0,5,26,4),kl(0,8,9,-5,0,15,22,2,0,6,28,5),kl(0,8,10,-5,0,16,24,2,0,6,30,5),kl(0,8,11,-5,0,17,26,2,0,6,32,5),kl(0,9,11,-5,0,18,28,2,0,7,34,6),kl(0,9,12,-6,0,19,29,2,0,7,36,6),kl(0,10,13,-6,0,20,31,3,0,8,38,7),kl(0,10,13,-6,0,21,33,3,0,8,40,7),kl(0,10,14,-6,0,22,35,3,0,8,42,7),kl(0,11,14,-7,0,23,36,3,0,9,44,8),kl(0,11,15,-7,0,24,38,3,0,9,46,8)],Ipn={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)"},Akt={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function nEe(e){return`${Math.round(e)}ms`}function Dpn(e){if(!e)return 0;const n=e/36;return Math.min(Math.round(10*(4+15*n**.25+n/5)),3e3)}function Tpn(e){const n={...Ipn,...e.easing},i={...Akt,...e.duration};return{getAutoHeightDuration:Dpn,create:(r=["all"],s={})=>{const{duration:l=i.standard,easing:c=n.easeInOut,delay:d=0,...u}=s;return(Array.isArray(r)?r:[r]).map((p=>`${p} ${typeof l=="string"?l:nEe(l)} ${c} ${typeof d=="string"?d:nEe(d)}`)).join(",")},...e,easing:n,duration:i}}const Lpn={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Bpn(e){return Ky(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Skt(e={}){const n={...e};return(function i(r){const s=Object.entries(r);for(let l=0;l<s.length;l++){const[c,d]=s[l];!Bpn(d)||c.startsWith("unstable_")?delete r[c]:Ky(d)&&(r[c]={...d},i(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-95zxmizy.js","assets/sentry-DZ9rNYfw.js","assets/core-B-8b0iz9.js","assets/index-BUsi93tT.js","assets/DefaultTenantHome-CMvE7WXj.js","assets/mui-C33Oegsm.js","assets/getLocaleForTenant-D57C4sYC.js","assets/analytics-8lQ_GaR7.js","assets/utils-D3rZq_G4.js","assets/AppDrawer-D7FI4GcX.js","assets/InboxNotificationsProvider-B4UF_uUg.js","assets/useTaskManagerAccess-ECD0Ec-b.js","assets/expenseAutomationHelper-BzOPc0En.js","assets/ScreenRoutes-6zCS0eXm.js","assets/analyticsHelper-C6SU-53H.js","assets/ConnectionAuthScreen-C_s5VCbI.js","assets/AccountMappingScreen-Dt4x9DJz.js","assets/MobileAppDrawer-0TaE2Qid.js","assets/QBOConnectionScreen-BiN0lu_W.js","assets/empty-CyiOIGJw.js","assets/index-CgYr_9vs.js","assets/url-BjdrSaU1.js","assets/index-CzpjeHcU.js","assets/decodeURIComponentSafe-hAviH84T.js","assets/accountMappingHelper-Ci74NLEW.js","assets/SignInScreen-C5RNgyDG.js","assets/useDeviceId-gFU5q5zf.js","assets/MagicLinkSignInScreen-DGzxNaiE.js","assets/NotFoundScreen-BatgS8le.js","assets/MagicLinkRoutes-DDza_62u.js","assets/PaymentLinkScreen-D0Hr5oRB.js","assets/WiseConfirmationScreen-XbaBW0oW.js","assets/HubSpotOAuthCallbackScreen-CsqGaYGM.js","assets/CustomerOnboardingAuthScreen-DFMNQmWy.js","assets/SignOutScreen-BZdppeCA.js","assets/OAuthConsentScreen-CRExXXMv.js"])))=>i.map(i=>d[i]);
|
|
2
|
+
import{a as m,R as M,b as _5e,e as wsn,p as wse,r as Am,g as $At,d as Uje,f as Csn,s as Wje,i as vsn,w as Asn,j as Ssn,S as ksn,k as jsn,l as $sn,m as Esn,n as Isn,o as Dsn}from"./sentry-DZ9rNYfw.js";import{L as Tsn,C as Qje,_ as sh,a as Lsn,b as PN,c as Bsn,d as Xte,e as MN,u as EAt,T as Psn,f as Msn,g as Osn,h as Fsn,i as Rsn,k as IAt,l as zsn,m as Nsn,j as Zt}from"./liveblocks-BjcYyeQ6.js";import{f as DAt,r as ka,R as mA,P as Wl,O as _sn,N as TAt,u as Kp,g as d2,h as ene,i as LAt,j as qr,m as $8e,s as VZ,k as BAt,l as Vsn,n as Hsn,o as cp,p as Usn,B as Wsn}from"./core-B-8b0iz9.js";import{L as Yje,bl as Qsn,bm as Ysn,bn as ON,bo as Gsn,bp as qsn,bq as _s,br as Wt,bs as rL,bt as s3,bu as Ksn,bv as Q7,bw as Rs,bx as Zsn,by as Jsn,bz as Xsn,bA as p1,bB as np,bC as fz,bD as a8,bE as pn,bF as PAt,bG as Y1,bH as Sa,bI as tT,bJ as MAt,bK as OAt,bL as E8e,bM as sx,bN as i1,bO as s7,bP as eln,bQ as zc,bR as tln,bS as aL,bT as nln,bU as iln,bV as HZ,bW as oln,bX as rln,bY as UZ,bZ as aln,b_ as sln,b$ as s8,c0 as Gje,c1 as lln,c2 as cln,c3 as dln,c4 as uln,c5 as pln,c6 as hln,c7 as mln,c8 as l7,c9 as tne,ca as gln,cb as nne,cc as ine,cd as one,ce as I8e,cf as FN,cg as CS,ch as RN,ci as nT,cj as iT,ck as vS,cl as rne,cm as YA,cn as fln,co as qje,cp as xln,cq as yln,cr as bln,cs as wln,ct as FAt,cu as Cln,cv as vln,cw as qw,cx as Kje,cy as Aln,cz as Sln,cA as kln,cB as ak,cC as sk,cD as RAt,cE as zAt,cF as D8e,cG as jln,cH as NAt,cI as $ln,cJ as WZ,cK as _At,cL as Eln,cM as VAt,cN as Iln,cO as HO,cP as Dln,cQ as Tln,cR as Zje,cS as Lln,cT as T8e,cU as L8e,cV as Bln,cW as Pln,cX as Mln,cY as Oln,cZ as TV,c_ as oT,c$ as LV,d0 as Fln,d1 as Rln,d2 as HAt,d3 as zln,d4 as Nln,d5 as _ln,d6 as Vln,d7 as Hln,d8 as UAt,d9 as Jje,da as Uln,db as B8e,dc as Wln,dd as Qln,de as Yln,df as WAt,dg as gu,dh as Gl,di as ane,dj as Gln,dk as qln,dl as N1,dm as QAt,dn as Kln,dp as xz,dq as GA,dr as Ys,ds as Xje,dt as Zln,du as Jln,dv as Xln,dw as YAt,dx as P8e,dy as BV,dz as GAt,dA as Mg,dB as ecn,dC as tcn,dD as ncn,dE as icn,dF as ocn,dG as rcn,dH as acn,dI as scn,dJ as PV,dK as AS,dL as sne,dM as lcn,dN as ccn,dO as lk,dP as G1,dQ as qAt,dR as KAt,dS as dcn,dT as ZAt,dU as ucn,dV as pcn,dW as hcn,dX as mcn,dY as sL,dZ as M8e,d_ as O8e,d$ as gcn,e0 as F8e,e1 as JAt,e2 as XAt,e3 as eSt,e4 as tSt,e5 as nSt,e6 as iSt,e7 as fcn,_ as Md,e8 as lL,e9 as xcn,ea as e$e,eb as lne,ec as ycn,ed as bcn,ee as oSt,ef as wcn,eg as YF,eh as Mm,ei as c7,ej as rSt,ek as aSt,el as Ccn,em as sSt,en as V5e,eo as vcn,ep as nK,eq as Acn,er as Scn,es as kcn,et as jcn,eu as $cn,ev as lSt,ew as cSt,ex as Ecn,ey as Icn,ez as dSt,eA as GF,eB as qF,eC as uSt,eD as Dcn,eE as Tcn,eF as Lcn,eG as Bcn,eH as R8e,eI as pSt,eJ as hSt,eK as z8e,eL as cL,eM as cne,eN as N8e,eO as _8e,eP as V8e,eQ as H8e,eR as Pcn,eS as Mcn,eT as mSt,eU as t$e,eV as Ocn,eW as U8e,eX as Fcn,eY as Rcn,eZ as q1,e_ as zcn,e$ as dne,f0 as gSt,f1 as fSt,f2 as Ncn,f3 as W8e,f4 as Q8e,f5 as _cn,f6 as Vcn,f7 as Hcn,f8 as Ucn,f9 as Wcn,fa as Zg,fb as n$e,fc as xSt,fd as Qcn,fe as Ycn,ff as Gcn,fg as ySt,fh as bSt,fi as wSt,fj as CSt,fk as vSt,fl as ASt,fm as qcn,fn as rT,fo as Kcn,fp as Zcn,fq as Jcn,fr as Xcn,fs as SSt,ft as kSt,fu as i$e,fv as o$e,fw as edn,fx as tdn,fy as r$e,fz as a$e,fA as ndn,fB as idn,fC as H5e,fD as odn,v as rdn,fE as une,fF as xm,fG as jSt,fH as $St,fI as adn,fJ as sdn,fK as s$e,fL as ldn,fM as cdn,fN as ddn,fO as udn,fP as pdn,fQ as hdn,fR as mdn,fS as gdn,fT as fdn,fU as xdn,fV as ydn,fW as bdn,fX as wdn,fY as Cdn,fZ as vdn,f_ as Adn,f$ as Sdn,g0 as kdn,g1 as jdn,g2 as l$e,g3 as $dn,g4 as Edn,g5 as Idn,g6 as Ddn,g7 as Tdn,g8 as ESt,g9 as pne,ga as Y8e,gb as ISt,gc as Ldn,gd as Bdn,ge as Pdn,gf as DSt,gg as c$e,gh as TSt,gi as LSt,gj as Mdn,gk as BSt,gl as PSt,gm as Odn,gn as Fdn,go as U5e,gp as Rdn,gq as KF,gr as zdn,gs as Ndn,gt as _dn,gu as Vdn,gv as Hdn,gw as Udn,gx as Wdn,gy as Qdn,gz as Ydn,gA as Gdn,gB as qdn,gC as Kdn,gD as MSt,gE as Zdn,gF as Jdn,gG as Xdn,gH as d$e,gI as eun,gJ as tun,gK as nun,gL as iun,gM as oun,gN as run,gO as OSt,gP as FSt,gQ as aun,gR as RSt,gS as sun,gT as lun,gU as W5e,gV as cun,gW as dun,gX as uun,gY as pun,gZ as hun,g_ as mun,g$ as u$e,h0 as gun,h1 as fun,h2 as xun}from"./zeni-epic-state-95zxmizy.js";import{n as a,T as zSt,G as zN,j as Do,c as Te,k as ii,C as NSt,u as yun,D as _St,S as VSt,a as bun}from"./mui-C33Oegsm.js";import{r as wun,m as jg}from"./analytics-8lQ_GaR7.js";import{u as op}from"./plaid-Bt28AVCt.js";import{D as G8e,H as hne,g as Cun,O as vun,S as Aun,T as Sun,u as q8e,a as K8e,b as kun}from"./dnd-CtOxA7uX.js";import{l as Z8e}from"./stripe-cKAAJElX.js";import{L as hD}from"./lottie-BdAYiWcR.js";import{r as ld}from"./lexical-BVt4M34U.js";import{D as Q5e,P as Y5e,_ as HSt,a as USt}from"./pdf-BkfulyEw.js";import{R as SS,G as l8,H as th,X as Jl,Y as Pl,I as Td,J as c8,K as F8,L as qA,M as ep,N as dL,O as WSt,P as jun,Q as $un,S as mne,U as Eun,V as J8e,W as Iun,Z as Dun,_ as Tun,d as Lun}from"./recharts-DkYxIsLi.js";import{r as Bun,n as p$e}from"./utils-D3rZq_G4.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]="24e31a68-209c-4eb2-b70f-f285e8aa7a81",e._sentryDebugIdIdentifier="sentry-dbid-24e31a68-209c-4eb2-b70f-f285e8aa7a81")}catch{}})();(function(){const e=document.createElement("link").relList;if(!(e&&e.supports&&e.supports("modulepreload"))){for(const i of document.querySelectorAll('link[rel="modulepreload"]'))n(i);new MutationObserver((i=>{for(const r of i)if(r.type==="childList")for(const s of r.addedNodes)s.tagName==="LINK"&&s.rel==="modulepreload"&&n(s)})).observe(document,{childList:!0,subtree:!0})}function n(i){if(i.ep)return;i.ep=!0;const r=(function(s){const l={};return s.integrity&&(l.integrity=s.integrity),s.referrerPolicy&&(l.referrerPolicy=s.referrerPolicy),s.crossOrigin==="use-credentials"?l.credentials="include":s.crossOrigin==="anonymous"?l.credentials="omit":l.credentials="same-origin",l})(i);fetch(i.href,r)}})();var h$e,MV={},Pun=(function(){if(h$e)return MV;h$e=1;var e=DAt();return MV.createRoot=e.createRoot,MV.hydrateRoot=e.hydrateRoot,MV})(),cm=typeof globalThis<"u"?globalThis:typeof window<"u"?window:typeof _5e<"u"?_5e:typeof self<"u"?self:{};function yr(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}var m$e,g$e,f$e={exports:{}},gB={};function QSt(){return g$e||(g$e=1,f$e.exports=(function(){if(m$e)return gB;m$e=1;var e=M,n=Symbol.for("react.element"),i=Symbol.for("react.fragment"),r=Object.prototype.hasOwnProperty,s=e.__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED.ReactCurrentOwner,l={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)&&!l.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:s.current}}return gB.Fragment=i,gB.jsx=c,gB.jsxs=c,gB})()),f$e.exports}var t=QSt();const Mun=m.createContext(null),Cse={didCatch:!1,error:null};let Oun=class extends m.Component{constructor(e){super(e),this.resetErrorBoundary=this.resetErrorBoundary.bind(this),this.state=Cse}static getDerivedStateFromError(e){return{didCatch:!0,error:e}}resetErrorBoundary(){const{error:e}=this.state;if(e!==null){for(var n,i,r=arguments.length,s=new Array(r),l=0;l<r;l++)s[l]=arguments[l];(n=(i=this.props).onReset)===null||n===void 0||n.call(i,{args:s,reason:"imperative-api"}),this.setState(Cse)}}componentDidCatch(e,n){var i,r;(i=(r=this.props).onError)===null||i===void 0||i.call(r,e,n)}componentDidUpdate(e,n){const{didCatch:i}=this.state,{resetKeys:r}=this.props;var s,l;i&&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)&&((s=(l=this.props).onReset)===null||s===void 0||s.call(l,{next:r,prev:e.resetKeys,reason:"keys"}),this.setState(Cse))}render(){const{children:e,fallbackRender:n,FallbackComponent:i,fallback:r}=this.props,{didCatch:s,error:l}=this.state;let c=e;if(s){const d={error:l,resetErrorBoundary:this.resetErrorBoundary};if(typeof n=="function")c=n(d);else if(i)c=m.createElement(i,d);else{if(r===void 0)throw l;c=r}}return m.createElement(Mun.Provider,{value:{didCatch:s,error:l,resetErrorBoundary:this.resetErrorBoundary}},c)}};var x$e,vse={exports:{}},Ase,Fun=(x$e||(x$e=1,Ase=vse,(function(e,n){Ase.exports?Ase.exports=n():e.numeral=n()})(vse.exports,(function(){var e,n,i,r,s,l={},c={},d={currentLocale:"en",zeroFormat:null,nullFormat:null,defaultFormat:"0,0",scalePercentBy100:!0},u={currentLocale:d.currentLocale,zeroFormat:d.zeroFormat,nullFormat:d.nullFormat,defaultFormat:d.defaultFormat,scalePercentBy100:d.scalePercentBy100};function p(h,g){this._input=h,this._value=g}return e=function(h){var g,f,x,y;if(e.isNumeral(h))g=h.value();else if(h===0||typeof h>"u")g=0;else if(h===null||n.isNaN(h))g=null;else if(typeof h=="string")if(u.zeroFormat&&h===u.zeroFormat)g=0;else if(u.nullFormat&&h===u.nullFormat||!h.replace(/[^0-9]+/g,"").length)g=null;else{for(f in l)if((y=typeof l[f].regexps.unformat=="function"?l[f].regexps.unformat():l[f].regexps.unformat)&&h.match(y)){x=l[f].unformat;break}g=(x=x||e._.stringToNumber)(h)}else g=Number(h)||null;return new p(h,g)},e.version="2.0.6",e.isNumeral=function(h){return h instanceof p},e._=n={numberToFormat:function(h,g,f){var x,y,b,w,C,v,A,S,$=c[e.options.currentLocale],j=!1,I=!1,E="",D=1e12,B=1e9,F=1e6,R="",_=!1;if(h=h||0,b=Math.abs(h),e._.includes(g,"(")?(j=!0,g=g.replace(/[\(|\)]/g,"")):(e._.includes(g,"+")||e._.includes(g,"-"))&&(v=e._.includes(g,"+")?g.indexOf("+"):h<0?g.indexOf("-"):-1,g=g.replace(/[\+|\-]/g,"")),e._.includes(g,"a")&&(y=!!(y=g.match(/a(k|m|b|t)?/))&&y[1],e._.includes(g," a")&&(E=" "),g=g.replace(new RegExp(E+"a[kmbt]?"),""),b>=D&&!y||y==="t"?(E+=$.abbreviations.trillion,h/=D):b<D&&b>=B&&!y||y==="b"?(E+=$.abbreviations.billion,h/=B):b<B&&b>=F&&!y||y==="m"?(E+=$.abbreviations.million,h/=F):(b<F&&b>=1e3&&!y||y==="k")&&(E+=$.abbreviations.thousand,h/=1e3)),e._.includes(g,"[.]")&&(I=!0,g=g.replace("[.]",".")),w=h.toString().split(".")[0],C=g.split(".")[1],A=g.indexOf(","),x=(g.split(".")[0].split(",")[0].match(/0/g)||[]).length,C?(e._.includes(C,"[")?(C=(C=C.replace("]","")).split("["),R=e._.toFixed(h,C[0].length+C[1].length,f,C[1].length)):R=e._.toFixed(h,C.length,f),w=R.split(".")[0],R=e._.includes(R,".")?$.delimiters.decimal+R.split(".")[1]:"",I&&Number(R.slice(1))===0&&(R="")):w=e._.toFixed(h,0,f),E&&!y&&Number(w)>=1e3&&E!==$.abbreviations.trillion)switch(w=String(Number(w)/1e3),E){case $.abbreviations.thousand:E=$.abbreviations.million;break;case $.abbreviations.million:E=$.abbreviations.billion;break;case $.abbreviations.billion:E=$.abbreviations.trillion}if(e._.includes(w,"-")&&(w=w.slice(1),_=!0),w.length<x)for(var N=x-w.length;N>0;N--)w="0"+w;return A>-1&&(w=w.toString().replace(/(\d)(?=(\d{3})+(?!\d))/g,"$1"+$.delimiters.thousands)),g.indexOf(".")===0&&(w=""),S=w+R+(E||""),j?S=(j&&_?"(":"")+S+(j&&_?")":""):v>=0?S=v===0?(_?"-":"+")+S:S+(_?"-":"+"):_&&(S="-"+S),S},stringToNumber:function(h){var g,f,x,y=c[u.currentLocale],b=h,w={thousand:3,million:6,billion:9,trillion:12};if(u.zeroFormat&&h===u.zeroFormat)f=0;else if(u.nullFormat&&h===u.nullFormat||!h.replace(/[^0-9]+/g,"").length)f=null;else{for(g in f=1,y.delimiters.decimal!=="."&&(h=h.replace(/\./g,"").replace(y.delimiters.decimal,".")),w)if(x=new RegExp("[^a-zA-Z]"+y.abbreviations[g]+"(?:\\)|(\\"+y.currency.symbol+")?(?:\\))?)?$"),b.match(x)){f*=Math.pow(10,w[g]);break}f*=(h.split("-").length+Math.min(h.split("(").length-1,h.split(")").length-1))%2?1:-1,h=h.replace(/[^0-9\.]+/g,""),f*=Number(h)}return f},isNaN:function(h){return typeof h=="number"&&isNaN(h)},includes:function(h,g){return h.indexOf(g)!==-1},insert:function(h,g,f){return h.slice(0,f)+g+h.slice(f)},reduce:function(h,g){if(this===null)throw new TypeError("Array.prototype.reduce called on null or undefined");if(typeof g!="function")throw new TypeError(g+" is not a function");var f,x=Object(h),y=x.length>>>0,b=0;if(arguments.length===3)f=arguments[2];else{for(;b<y&&!(b in x);)b++;if(b>=y)throw new TypeError("Reduce of empty array with no initial value");f=x[b++]}for(;b<y;b++)b in x&&(f=g(f,x[b],b,x));return f},multiplier:function(h){var g=h.toString().split(".");return g.length<2?1:Math.pow(10,g[1].length)},correctionFactor:function(){return Array.prototype.slice.call(arguments).reduce((function(h,g){var f=n.multiplier(g);return h>f?h:f}),1)},toFixed:function(h,g,f,x){var y,b,w,C,v=h.toString().split("."),A=g-(x||0);return y=v.length===2?Math.min(Math.max(v[1].length,A),g):A,w=Math.pow(10,y),C=(f(h+"e+"+y)/w).toFixed(y),x>g-y&&(b=new RegExp("\\.?0{1,"+(x-(g-y))+"}$"),C=C.replace(b,"")),C}},e.options=u,e.formats=l,e.locales=c,e.locale=function(h){return h&&(u.currentLocale=h.toLowerCase()),u.currentLocale},e.localeData=function(h){if(!h)return c[u.currentLocale];if(h=h.toLowerCase(),!c[h])throw new Error("Unknown locale : "+h);return c[h]},e.reset=function(){for(var h in d)u[h]=d[h]},e.zeroFormat=function(h){u.zeroFormat=typeof h=="string"?h:null},e.nullFormat=function(h){u.nullFormat=typeof h=="string"?h:null},e.defaultFormat=function(h){u.defaultFormat=typeof h=="string"?h:"0.0"},e.register=function(h,g,f){if(g=g.toLowerCase(),this[h+"s"][g])throw new TypeError(g+" "+h+" already registered.");return this[h+"s"][g]=f,f},e.validate=function(h,g){var f,x,y,b,w,C,v,A;if(typeof h!="string"&&(h+="",console.warn&&console.warn("Numeral.js: Value is not string. It has been co-erced to: ",h)),(h=h.trim()).match(/^\d+$/))return!0;if(h==="")return!1;try{v=e.localeData(g)}catch{v=e.localeData(e.locale())}return y=v.currency.symbol,w=v.abbreviations,f=v.delimiters.decimal,x=v.delimiters.thousands==="."?"\\.":v.delimiters.thousands,!((A=h.match(/^[^\d]+/))!==null&&(h=h.substr(1),A[0]!==y)||(A=h.match(/[^\d]+$/))!==null&&(h=h.slice(0,-1),A[0]!==w.thousand&&A[0]!==w.million&&A[0]!==w.billion&&A[0]!==w.trillion)||(C=new RegExp(x+"{2}"),h.match(/[^\d.,]/g)||(b=h.split(f)).length>2||(b.length<2?!b[0].match(/^\d+.*\d$/)||b[0].match(C):b[0].length===1?!b[0].match(/^\d+$/)||b[0].match(C)||!b[1].match(/^\d+$/):!b[0].match(/^\d+.*\d$/)||b[0].match(C)||!b[1].match(/^\d+$/))))},e.fn=p.prototype={clone:function(){return e(this)},format:function(h,g){var f,x,y,b=this._value,w=h||u.defaultFormat;if(g=g||Math.round,b===0&&u.zeroFormat!==null)x=u.zeroFormat;else if(b===null&&u.nullFormat!==null)x=u.nullFormat;else{for(f in l)if(w.match(l[f].regexps.format)){y=l[f].format;break}x=(y=y||e._.numberToFormat)(b,w,g)}return x},value:function(){return this._value},input:function(){return this._input},set:function(h){return this._value=Number(h),this},add:function(h){var g=n.correctionFactor.call(null,this._value,h);return this._value=n.reduce([this._value,h],(function(f,x,y,b){return f+Math.round(g*x)}),0)/g,this},subtract:function(h){var g=n.correctionFactor.call(null,this._value,h);return this._value=n.reduce([h],(function(f,x,y,b){return f-Math.round(g*x)}),Math.round(this._value*g))/g,this},multiply:function(h){return this._value=n.reduce([this._value,h],(function(g,f,x,y){var b=n.correctionFactor(g,f);return Math.round(g*b)*Math.round(f*b)/Math.round(b*b)}),1),this},divide:function(h){return this._value=n.reduce([this._value,h],(function(g,f,x,y){var b=n.correctionFactor(g,f);return Math.round(g*b)/Math.round(f*b)})),this},difference:function(h){return Math.abs(e(this._value).subtract(h).value())}},e.register("locale","en",{delimiters:{thousands:",",decimal:"."},abbreviations:{thousand:"k",million:"m",billion:"b",trillion:"t"},ordinal:function(h){var g=h%10;return~~(h%100/10)==1?"th":g===1?"st":g===2?"nd":g===3?"rd":"th"},currency:{symbol:"$"}}),e.register("format","bps",{regexps:{format:/(BPS)/,unformat:/(BPS)/},format:function(h,g,f){var x,y=e._.includes(g," BPS")?" ":"";return h*=1e4,g=g.replace(/\s?BPS/,""),x=e._.numberToFormat(h,g,f),e._.includes(x,")")?((x=x.split("")).splice(-1,0,y+"BPS"),x=x.join("")):x=x+y+"BPS",x},unformat:function(h){return+(1e-4*e._.stringToNumber(h)).toFixed(15)}}),r={base:1024,suffixes:["B","KiB","MiB","GiB","TiB","PiB","EiB","ZiB","YiB"]},s="("+(s=(i={base:1e3,suffixes:["B","KB","MB","GB","TB","PB","EB","ZB","YB"]}).suffixes.concat(r.suffixes.filter((function(h){return i.suffixes.indexOf(h)<0}))).join("|")).replace("B","B(?!PS)")+")",e.register("format","bytes",{regexps:{format:/([0\s]i?b)/,unformat:new RegExp(s)},format:function(h,g,f){var x,y,b,w=e._.includes(g,"ib")?r:i,C=e._.includes(g," b")||e._.includes(g," ib")?" ":"";for(g=g.replace(/\s?i?b/,""),x=0;x<=w.suffixes.length;x++)if(y=Math.pow(w.base,x),b=Math.pow(w.base,x+1),h===null||h===0||h>=y&&h<b){C+=w.suffixes[x],y>0&&(h/=y);break}return e._.numberToFormat(h,g,f)+C},unformat:function(h){var g,f,x=e._.stringToNumber(h);if(x){for(g=i.suffixes.length-1;g>=0;g--){if(e._.includes(h,i.suffixes[g])){f=Math.pow(i.base,g);break}if(e._.includes(h,r.suffixes[g])){f=Math.pow(r.base,g);break}}x*=f||1}return x}}),e.register("format","currency",{regexps:{format:/(\$)/},format:function(h,g,f){var x,y,b,w=e.locales[e.options.currentLocale],C={before:g.match(/^([\+|\-|\(|\s|\$]*)/)[0],after:g.match(/([\+|\-|\)|\s|\$]*)$/)[0]};for(g=g.replace(/\s?\$\s?/,""),x=e._.numberToFormat(h,g,f),h>=0?(C.before=C.before.replace(/[\-\(]/,""),C.after=C.after.replace(/[\-\)]/,"")):h<0&&!e._.includes(C.before,"-")&&!e._.includes(C.before,"(")&&(C.before="-"+C.before),b=0;b<C.before.length;b++)switch(y=C.before[b],y){case"$":x=e._.insert(x,w.currency.symbol,b);break;case" ":x=e._.insert(x," ",b+w.currency.symbol.length-1)}for(b=C.after.length-1;b>=0;b--)switch(y=C.after[b],y){case"$":x=b===C.after.length-1?x+w.currency.symbol:e._.insert(x,w.currency.symbol,-(C.after.length-(1+b)));break;case" ":x=b===C.after.length-1?x+" ":e._.insert(x," ",-(C.after.length-(1+b)+w.currency.symbol.length-1))}return x}}),e.register("format","exponential",{regexps:{format:/(e\+|e-)/,unformat:/(e\+|e-)/},format:function(h,g,f){var x=(typeof h!="number"||e._.isNaN(h)?"0e+0":h.toExponential()).split("e");return g=g.replace(/e[\+|\-]{1}0/,""),e._.numberToFormat(Number(x[0]),g,f)+"e"+x[1]},unformat:function(h){var g=e._.includes(h,"e+")?h.split("e+"):h.split("e-"),f=Number(g[0]),x=Number(g[1]);return x=e._.includes(h,"e-")?x*=-1:x,e._.reduce([f,Math.pow(10,x)],(function(y,b,w,C){var v=e._.correctionFactor(y,b);return y*v*(b*v)/(v*v)}),1)}}),e.register("format","ordinal",{regexps:{format:/(o)/},format:function(h,g,f){var x=e.locales[e.options.currentLocale],y=e._.includes(g," o")?" ":"";return g=g.replace(/\s?o/,""),y+=x.ordinal(h),e._.numberToFormat(h,g,f)+y}}),e.register("format","percentage",{regexps:{format:/(%)/,unformat:/(%)/},format:function(h,g,f){var x,y=e._.includes(g," %")?" ":"";return e.options.scalePercentBy100&&(h*=100),g=g.replace(/\s?\%/,""),x=e._.numberToFormat(h,g,f),e._.includes(x,")")?((x=x.split("")).splice(-1,0,y+"%"),x=x.join("")):x=x+y+"%",x},unformat:function(h){var g=e._.stringToNumber(h);return e.options.scalePercentBy100?.01*g:g}}),e.register("format","time",{regexps:{format:/(:)/,unformat:/(:)/},format:function(h,g,f){var x=Math.floor(h/60/60),y=Math.floor((h-60*x*60)/60),b=Math.round(h-60*x*60-60*y);return x+":"+(y<10?"0"+y:y)+":"+(b<10?"0"+b:b)},unformat:function(h){var g=h.split(":"),f=0;return g.length===3?(f+=60*Number(g[0])*60,f+=60*Number(g[1]),f+=Number(g[2])):g.length===2&&(f+=60*Number(g[0]),f+=Number(g[1])),Number(f)}}),e}))),vse.exports);const Rf=yr(Fun);function L7(e,...n){const i=new URL(`https://mui.com/production-error/?code=${e}`);return n.forEach((r=>i.searchParams.append("args[]",r))),`Minified MUI error #${e}; visit ${i} for the full message.`}const v7="$$material";var Run={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 zun(e){var n=Object.create(null);return function(i){return n[i]===void 0&&(n[i]=e(i)),n[i]}}var Nun=/[A-Z]|^ms/g,_un=/_EMO_([^_]+?)_([^]*?)_EMO_/g,YSt=function(e){return e.charCodeAt(1)===45},y$e=function(e){return e!=null&&typeof e!="boolean"},Sse=zun((function(e){return YSt(e)?e:e.replace(Nun,"-$&").toLowerCase()})),b$e=function(e,n){switch(e){case"animation":case"animationName":if(typeof n=="string")return n.replace(_un,(function(i,r,s){return I9={name:r,styles:s,next:I9},r}))}return Run[e]===1||YSt(e)||typeof n!="number"||n===0?n:n+"px"};function QZ(e,n,i){if(i==null)return"";var r=i;if(r.__emotion_styles!==void 0)return r;switch(typeof i){case"boolean":return"";case"object":var s=i;if(s.anim===1)return I9={name:s.name,styles:s.styles,next:I9},s.name;var l=i;if(l.styles!==void 0){var c=l.next;if(c!==void 0)for(;c!==void 0;)I9={name:c.name,styles:c.styles,next:I9},c=c.next;return l.styles+";"}return(function(d,u,p){var h="";if(Array.isArray(p))for(var g=0;g<p.length;g++)h+=QZ(d,u,p[g])+";";else for(var f in p){var x=p[f];if(typeof x!="object"){var y=x;y$e(y)&&(h+=Sse(f)+":"+b$e(f,y)+";")}else if(Array.isArray(x)&&typeof x[0]=="string"&&u==null)for(var b=0;b<x.length;b++)y$e(x[b])&&(h+=Sse(f)+":"+b$e(f,x[b])+";");else{var w=QZ(d,u,x);switch(f){case"animation":case"animationName":h+=Sse(f)+":"+w+";";break;default:h+=f+"{"+w+"}"}}}return h})(e,n,i)}return i}var I9,w$e=/label:\s*([^\s;{]+)\s*(;|$)/g,C$e,v$e,A$e,S$e,k$e,j$e={exports:{}};function Vun(){return v$e?C$e:(v$e=1,C$e="SECRET_DO_NOT_PASS_THIS_OR_YOU_WILL_BE_FIRED")}function Hun(){if(S$e)return A$e;S$e=1;var e=Vun();function n(){}function i(){}return i.resetWarningCache=n,A$e=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 s(){return r}r.isRequired=r;var l={array:r,bigint:r,bool:r,func:r,number:r,object:r,string:r,symbol:r,any:r,arrayOf:s,element:r,elementType:r,instanceOf:s,node:r,objectOf:s,oneOf:s,oneOfType:s,shape:s,exact:s,checkPropTypes:i,resetWarningCache:n};return l.PropTypes=l,l}}function X8e(){return k$e||(k$e=1,j$e.exports=Hun()()),j$e.exports}const _n=yr(X8e());var Uun=(function(){function e(i){var r=this;this._insertTag=function(s){var l;l=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(s,l),r.tags.push(s)},this.isSpeedy=i.speedy===void 0||i.speedy,this.tags=[],this.ctr=0,this.nonce=i.nonce,this.key=i.key,this.container=i.container,this.prepend=i.prepend,this.insertionPoint=i.insertionPoint,this.before=null}var n=e.prototype;return n.hydrate=function(i){i.forEach(this._insertTag)},n.insert=function(i){this.ctr%(this.isSpeedy?65e3:1)==0&&this._insertTag((function(l){var c=document.createElement("style");return c.setAttribute("data-emotion",l.key),l.nonce!==void 0&&c.setAttribute("nonce",l.nonce),c.appendChild(document.createTextNode("")),c.setAttribute("data-s",""),c})(this));var r=this.tags[this.tags.length-1];if(this.isSpeedy){var s=(function(l){if(l.sheet)return l.sheet;for(var c=0;c<document.styleSheets.length;c++)if(document.styleSheets[c].ownerNode===l)return document.styleSheets[c]})(r);try{s.insertRule(i,s.cssRules.length)}catch{}}else r.appendChild(document.createTextNode(i));this.ctr++},n.flush=function(){this.tags.forEach((function(i){var r;return(r=i.parentNode)==null?void 0:r.removeChild(i)})),this.tags=[],this.ctr=0},e})(),D1="-ms-",$$e="-moz-",es="-webkit-",GSt="comm",ewe="rule",twe="decl",qSt="@keyframes",Wun=Math.abs,gne=String.fromCharCode,Qun=Object.assign;function KSt(e){return e.trim()}function ns(e,n,i){return e.replace(n,i)}function G5e(e,n){return e.indexOf(n)}function qu(e,n){return 0|e.charCodeAt(n)}function yz(e,n,i){return e.slice(n,i)}function c5(e){return e.length}function nwe(e){return e.length}function OV(e,n){return n.push(e),e}var fne=1,aT=1,ZSt=0,ym=0,ed=0,uL="";function xne(e,n,i,r,s,l,c){return{value:e,root:n,parent:i,type:r,props:s,children:l,line:fne,column:aT,length:c,return:""}}function fB(e,n){return Qun(xne("",null,null,"",null,null,0),e,{length:-e.length},n)}function S0(){return ed=ym<ZSt?qu(uL,ym++):0,aT++,ed===10&&(aT=1,fne++),ed}function K5(){return qu(uL,ym)}function iK(){return ym}function NN(e,n){return yz(uL,e,n)}function bz(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 JSt(e){return fne=aT=1,ZSt=c5(uL=e),ym=0,[]}function XSt(e){return uL="",e}function oK(e){return KSt(NN(ym-1,q5e(e===91?e+2:e===40?e+1:e)))}function Yun(e){for(;(ed=K5())&&ed<33;)S0();return bz(e)>2||bz(ed)>3?"":" "}function Gun(e,n){for(;--n&&S0()&&!(ed<48||ed>102||ed>57&&ed<65||ed>70&&ed<97););return NN(e,iK()+(n<6&&K5()==32&&S0()==32))}function q5e(e){for(;S0();)switch(ed){case e:return ym;case 34:case 39:e!==34&&e!==39&&q5e(ed);break;case 40:e===41&&q5e(e);break;case 92:S0()}return ym}function qun(e,n){for(;S0()&&e+ed!==57&&(e+ed!==84||K5()!==47););return"/*"+NN(n,ym-1)+"*"+gne(e===47?e:S0())}function Kun(e){for(;!bz(K5());)S0();return NN(e,ym)}function Zun(e){return XSt(rK("",null,null,null,[""],e=JSt(e),0,[0],e))}function rK(e,n,i,r,s,l,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,A="",S=s,$=l,j=r,I=A;w;)switch(y=v,v=S0()){case 40:if(y!=108&&qu(I,g-1)==58){G5e(I+=ns(oK(v),"&","&\f"),"&\f")!=-1&&(C=-1);break}case 34:case 39:case 91:I+=oK(v);break;case 9:case 10:case 13:case 32:I+=Yun(y);break;case 92:I+=Gun(iK()-1,7);continue;case 47:switch(K5()){case 42:case 47:OV(Jun(qun(S0(),iK()),n,i),u);break;default:I+="/"}break;case 123*b:d[p++]=c5(I)*C;case 125*b:case 59:case 0:switch(v){case 0:case 125:w=0;case 59+h:C==-1&&(I=ns(I,/\f/g,"")),x>0&&c5(I)-g&&OV(x>32?I$e(I+";",r,i,g-1):I$e(ns(I," ","")+";",r,i,g-2),u);break;case 59:I+=";";default:if(OV(j=E$e(I,n,i,p,h,s,d,A,S=[],$=[],g),l),v===123)if(h===0)rK(I,n,j,j,S,l,g,d,$);else switch(f===99&&qu(I,3)===110?100:f){case 100:case 108:case 109:case 115:rK(e,j,j,r&&OV(E$e(e,j,j,0,0,s,d,A,s,S=[],g),$),s,$,g,d,r?S:$);break;default:rK(I,j,j,j,[""],$,0,d,$)}}p=h=x=0,b=C=1,A=I="",g=c;break;case 58:g=1+c5(I),x=y;default:if(b<1){if(v==123)--b;else if(v==125&&b++==0&&(ed=ym>0?qu(uL,--ym):0,aT--,ed===10&&(aT=1,fne--),ed==125))continue}switch(I+=gne(v),v*b){case 38:C=h>0?1:(I+="\f",-1);break;case 44:d[p++]=(c5(I)-1)*C,C=1;break;case 64:K5()===45&&(I+=oK(S0())),f=K5(),h=g=c5(A=I+=Kun(iK())),v++;break;case 45:y===45&&c5(I)==2&&(b=0)}}return l}function E$e(e,n,i,r,s,l,c,d,u,p,h){for(var g=s-1,f=s===0?l:[""],x=nwe(f),y=0,b=0,w=0;y<r;++y)for(var C=0,v=yz(e,g+1,g=Wun(b=c[y])),A=e;C<x;++C)(A=KSt(b>0?f[C]+" "+v:ns(v,/&\f/g,f[C])))&&(u[w++]=A);return xne(e,n,i,s===0?ewe:d,u,p,h)}function Jun(e,n,i){return xne(e,n,i,GSt,gne(ed),yz(e,2,-2),0)}function I$e(e,n,i,r){return xne(e,n,i,twe,yz(e,0,r),yz(e,r+1,-1),r)}function mD(e,n){for(var i="",r=nwe(e),s=0;s<r;s++)i+=n(e[s],s,e,n)||"";return i}function Xun(e,n,i,r){switch(e.type){case"@layer":if(e.children.length)break;case"@import":case twe:return e.return=e.return||e.value;case GSt:return"";case qSt:return e.return=e.value+"{"+mD(e.children,r)+"}";case ewe:e.value=e.props.join(",")}return c5(i=mD(e.children,r))?e.return=e.value+"{"+i+"}":""}function e1n(e){return function(n){n.root||(n=n.return)&&e(n)}}var t1n=function(e,n,i){for(var r=0,s=0;r=s,s=K5(),r===38&&s===12&&(n[i]=1),!bz(s);)S0();return NN(e,ym)},n1n=function(e,n){return XSt((function(i,r){var s=-1,l=44;do switch(bz(l)){case 0:l===38&&K5()===12&&(r[s]=1),i[s]+=t1n(ym-1,r,s);break;case 2:i[s]+=oK(l);break;case 4:if(l===44){i[++s]=K5()===58?"&\f":"",r[s]=i[s].length;break}default:i[s]+=gne(l)}while(l=S0());return i})(JSt(e),n))},D$e=new WeakMap,i1n=function(e){if(e.type==="rule"&&e.parent&&!(e.length<1)){for(var n=e.value,i=e.parent,r=e.column===i.column&&e.line===i.line;i.type!=="rule";)if(!(i=i.parent))return;if((e.props.length!==1||n.charCodeAt(0)===58||D$e.get(i))&&!r){D$e.set(e,!0);for(var s=[],l=n1n(n,s),c=i.props,d=0,u=0;d<l.length;d++)for(var p=0;p<c.length;p++,u++)e.props[u]=s[d]?l[d].replace(/&\f/g,c[p]):c[p]+" "+l[d]}}},o1n=function(e){if(e.type==="decl"){var n=e.value;n.charCodeAt(0)===108&&n.charCodeAt(2)===98&&(e.return="",e.value="")}};function ekt(e,n){switch((function(i,r){return 45^qu(i,0)?(((r<<2^qu(i,0))<<2^qu(i,1))<<2^qu(i,2))<<2^qu(i,3):0})(e,n)){case 5103:return es+"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 es+e+e;case 5349:case 4246:case 4810:case 6968:case 2756:return es+e+$$e+e+D1+e+e;case 6828:case 4268:return es+e+D1+e+e;case 6165:return es+e+D1+"flex-"+e+e;case 5187:return es+e+ns(e,/(\w+).+(:[^]+)/,es+"box-$1$2"+D1+"flex-$1$2")+e;case 5443:return es+e+D1+"flex-item-"+ns(e,/flex-|-self/,"")+e;case 4675:return es+e+D1+"flex-line-pack"+ns(e,/align-content|flex-|-self/,"")+e;case 5548:return es+e+D1+ns(e,"shrink","negative")+e;case 5292:return es+e+D1+ns(e,"basis","preferred-size")+e;case 6060:return es+"box-"+ns(e,"-grow","")+es+e+D1+ns(e,"grow","positive")+e;case 4554:return es+ns(e,/([^-])(transform)/g,"$1"+es+"$2")+e;case 6187:return ns(ns(ns(e,/(zoom-|grab)/,es+"$1"),/(image-set)/,es+"$1"),e,"")+e;case 5495:case 3959:return ns(e,/(image-set\([^]*)/,es+"$1$`$1");case 4968:return ns(ns(e,/(.+:)(flex-)?(.*)/,es+"box-pack:$3"+D1+"flex-pack:$3"),/s.+-b[^;]+/,"justify")+es+e+e;case 4095:case 3583:case 4068:case 2532:return ns(e,/(.+)-inline(.+)/,es+"$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(c5(e)-1-n>6)switch(qu(e,n+1)){case 109:if(qu(e,n+4)!==45)break;case 102:return ns(e,/(.+:)(.+)-([^]+)/,"$1"+es+"$2-$3$1"+$$e+(qu(e,n+3)==108?"$3":"$2-$3"))+e;case 115:return~G5e(e,"stretch")?ekt(ns(e,"stretch","fill-available"),n)+e:e}break;case 4949:if(qu(e,n+1)!==115)break;case 6444:switch(qu(e,c5(e)-3-(~G5e(e,"!important")&&10))){case 107:return ns(e,":",":"+es)+e;case 101:return ns(e,/(.+:)([^;!]+)(;|!.+)?/,"$1"+es+(qu(e,14)===45?"inline-":"")+"box$3$1"+es+"$2$3$1"+D1+"$2box$3")+e}break;case 5936:switch(qu(e,n+11)){case 114:return es+e+D1+ns(e,/[svh]\w+-[tblr]{2}/,"tb")+e;case 108:return es+e+D1+ns(e,/[svh]\w+-[tblr]{2}/,"tb-rl")+e;case 45:return es+e+D1+ns(e,/[svh]\w+-[tblr]{2}/,"lr")+e}return es+e+D1+e+e}return e}var r1n=[function(e,n,i,r){if(e.length>-1&&!e.return)switch(e.type){case twe:e.return=ekt(e.value,e.length);break;case qSt:return mD([fB(e,{value:ns(e.value,"@","@"+es)})],r);case ewe:if(e.length)return(function(s,l){return s.map(l).join("")})(e.props,(function(s){switch((function(l,c){return(l=c.exec(l))?l[0]:l})(s,/(::plac\w+|:read-\w+)/)){case":read-only":case":read-write":return mD([fB(e,{props:[ns(s,/:(read-\w+)/,":-moz-$1")]})],r);case"::placeholder":return mD([fB(e,{props:[ns(s,/:(plac\w+)/,":"+es+"input-$1")]}),fB(e,{props:[ns(s,/:(plac\w+)/,":-moz-$1")]}),fB(e,{props:[ns(s,/:(plac\w+)/,D1+"input-$1")]})],r)}return""}))}}],tkt=function(e){var n=e.key;if(n==="css"){var i=document.querySelectorAll("style[data-emotion]:not([data-s])");Array.prototype.forEach.call(i,(function(x){x.getAttribute("data-emotion").indexOf(" ")!==-1&&(document.head.appendChild(x),x.setAttribute("data-s",""))}))}var r,s=e.stylisPlugins||r1n,l={},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++)l[y[b]]=!0;c.push(x)}));var d,u,p=[i1n,o1n],h=[Xun,e1n((function(x){u.insert(x)}))],g=(function(x){var y=nwe(x);return function(b,w,C,v){for(var A="",S=0;S<y;S++)A+=x[S](b,w,C,v)||"";return A}})(p.concat(s,h));d=function(x,y,b,w){u=b,(function(C){mD(Zun(C),g)})(x?x+"{"+y.styles+"}":y.styles),w&&(f.inserted[y.name]=!0)};var f={key:n,sheet:new Uun({key:n,container:r,nonce:e.nonce,speedy:e.speedy,prepend:e.prepend,insertionPoint:e.insertionPoint}),nonce:e.nonce,inserted:l,registered:{},insert:d};return f.sheet.hydrate(c),f};function nkt(e){const{styles:n,defaultTheme:i={}}=e,r=typeof n=="function"?s=>n((function(l){return l==null||Object.keys(l).length===0})(s)?i:s):n;return t.jsx(zN,{styles:r})}const T$e=[];function Q9(e){return T$e[0]=e,(function(n,i,r){if(n.length===1&&typeof n[0]=="object"&&n[0]!==null&&n[0].styles!==void 0)return n[0];var s=!0,l="";I9=void 0;var c=n[0];c==null||c.raw===void 0?(s=!1,l+=QZ(r,i,c)):l+=c[0];for(var d=1;d<n.length;d++)l+=QZ(r,i,n[d]),s&&(l+=c[d]);w$e.lastIndex=0;for(var u,p="";(u=w$e.exec(l))!==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)})(l)+p;return{name:h,styles:l,next:I9}})(T$e)}var L$e,B$e,P$e={exports:{}},Ls={};function a1n(){if(L$e)return Ls;L$e=1;var e=Symbol.for("react.transitional.element"),n=Symbol.for("react.portal"),i=Symbol.for("react.fragment"),r=Symbol.for("react.strict_mode"),s=Symbol.for("react.profiler"),l=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 i:case s: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 l:return b;default:return w}}case n:return w}}}return Ls.ContextConsumer=l,Ls.ContextProvider=c,Ls.Element=e,Ls.ForwardRef=d,Ls.Fragment=i,Ls.Lazy=g,Ls.Memo=h,Ls.Portal=n,Ls.Profiler=s,Ls.StrictMode=r,Ls.Suspense=u,Ls.SuspenseList=p,Ls.isContextConsumer=function(b){return y(b)===l},Ls.isContextProvider=function(b){return y(b)===c},Ls.isElement=function(b){return typeof b=="object"&&b!==null&&b.$$typeof===e},Ls.isForwardRef=function(b){return y(b)===d},Ls.isFragment=function(b){return y(b)===i},Ls.isLazy=function(b){return y(b)===g},Ls.isMemo=function(b){return y(b)===h},Ls.isPortal=function(b){return y(b)===n},Ls.isProfiler=function(b){return y(b)===s},Ls.isStrictMode=function(b){return y(b)===r},Ls.isSuspense=function(b){return y(b)===u},Ls.isSuspenseList=function(b){return y(b)===p},Ls.isValidElementType=function(b){return typeof b=="string"||typeof b=="function"||b===i||b===s||b===r||b===u||b===p||typeof b=="object"&&b!==null&&(b.$$typeof===g||b.$$typeof===h||b.$$typeof===c||b.$$typeof===l||b.$$typeof===d||b.$$typeof===x||b.getModuleId!==void 0)},Ls.typeOf=y,Ls}function s1n(){return B$e||(B$e=1,P$e.exports=a1n()),P$e.exports}var ikt=s1n();function Ky(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 okt(e){if(m.isValidElement(e)||ikt.isValidElementType(e)||!Ky(e))return e;const n={};return Object.keys(e).forEach((i=>{n[i]=okt(e[i])})),n}function K1(e,n,i={clone:!0}){const r=i.clone?{...e}:e;return Ky(e)&&Ky(n)&&Object.keys(n).forEach((s=>{m.isValidElement(n[s])||ikt.isValidElementType(n[s])?r[s]=n[s]:Ky(n[s])&&Object.prototype.hasOwnProperty.call(e,s)&&Ky(e[s])?r[s]=K1(e[s],n[s],i):i.clone?r[s]=Ky(n[s])?okt(n[s]):n[s]:r[s]=n[s]})),r}function l1n(e){const{values:n={xs:0,sm:600,md:900,lg:1200,xl:1536},unit:i="px",step:r=5,...s}=e,l=(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(l);function d(h){return`@media (min-width:${typeof n[h]=="number"?n[h]:h}${i})`}function u(h){return`@media (max-width:${(typeof n[h]=="number"?n[h]:h)-r/100}${i})`}function p(h,g){const f=c.indexOf(g);return`@media (min-width:${typeof n[h]=="number"?n[h]:h}${i}) and (max-width:${(f!==-1&&typeof n[c[f]]=="number"?n[c[f]]:g)-r/100}${i})`}return{keys:c,values:l,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:i,...s}}function M$e(e,n){if(!e.containerQueries)return n;const i=Object.keys(n).filter((r=>r.startsWith("@container"))).sort(((r,s)=>{const l=/min-width:\s*([0-9.]+)/;return+(r.match(l)?.[1]||0)-+(s.match(l)?.[1]||0)}));return i.length?i.reduce(((r,s)=>{const l=n[s];return delete r[s],r[s]=l,r}),{...n}):n}const c1n={borderRadius:4};function ZF(e,n){return n?K1(e,n,{clone:!1}):e}const yne={xs:0,sm:600,md:900,lg:1200,xl:1536},O$e={keys:["xs","sm","md","lg","xl"],up:e=>`@media (min-width:${yne[e]}px)`},d1n={containerQueries:e=>({up:n=>{let i=typeof n=="number"?n:yne[n]||n;return typeof i=="number"&&(i=`${i}px`),e?`@container ${e} (min-width:${i})`:`@container (min-width:${i})`}})};function B7(e,n,i){const r=e.theme||{};if(Array.isArray(n)){const s=r.breakpoints||O$e;return n.reduce(((l,c,d)=>(l[s.up(s.keys[d])]=i(n[d]),l)),{})}if(typeof n=="object"){const s=r.breakpoints||O$e;return Object.keys(n).reduce(((l,c)=>{if((function(d,u){return u==="@"||u.startsWith("@")&&(d.some((p=>u.startsWith(`@${p}`)))||!!u.match(/^@\d/))})(s.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:d1n,c);d&&(l[d]=i(n[c],c))}else if(Object.keys(s.values||yne).includes(c))l[s.up(c)]=i(n[c],c);else{const d=c;l[d]=n[d]}return l}),{})}return i(n)}function F$e(e,n){return e.reduce(((i,r)=>{const s=i[r];return(!s||Object.keys(s).length===0)&&delete i[r],i}),n)}function nr(e){if(typeof e!="string")throw new Error(L7(7));return e.charAt(0).toUpperCase()+e.slice(1)}function bne(e,n,i=!0){if(!n||typeof n!="string")return null;if(e&&e.vars&&i){const r=`vars.${n}`.split(".").reduce(((s,l)=>s&&s[l]?s[l]:null),e);if(r!=null)return r}return n.split(".").reduce(((r,s)=>r&&r[s]!=null?r[s]:null),e)}function YZ(e,n,i,r=i){let s;return s=typeof e=="function"?e(i):Array.isArray(e)?e[i]||r:bne(e,i)||r,n&&(s=n(s,r,e)),s}function Pc(e){const{prop:n,cssProperty:i=e.prop,themeKey:r,transform:s}=e,l=c=>{if(c[n]==null)return null;const d=c[n],u=bne(c.theme,r)||{};return B7(c,d,(p=>{let h=YZ(u,s,p);return p===h&&typeof p=="string"&&(h=YZ(u,s,`${n}${p==="default"?"":nr(p)}`,p)),i===!1?h:{[i]:h}}))};return l.propTypes={},l.filterProps=[n],l}const u1n={m:"margin",p:"padding"},p1n={t:"Top",r:"Right",b:"Bottom",l:"Left",x:["Left","Right"],y:["Top","Bottom"]},R$e={marginX:"mx",marginY:"my",paddingX:"px",paddingY:"py"},h1n=(function(e){const n={};return i=>(n[i]===void 0&&(n[i]=e(i)),n[i])})((e=>{if(e.length>2){if(!R$e[e])return[e];e=R$e[e]}const[n,i]=e.split(""),r=u1n[n],s=p1n[i]||"";return Array.isArray(s)?s.map((l=>r+l)):[r+s]})),rkt=["m","mt","mr","mb","ml","mx","my","margin","marginTop","marginRight","marginBottom","marginLeft","marginX","marginY","marginInline","marginInlineStart","marginInlineEnd","marginBlock","marginBlockStart","marginBlockEnd"],akt=["p","pt","pr","pb","pl","px","py","padding","paddingTop","paddingRight","paddingBottom","paddingLeft","paddingX","paddingY","paddingInline","paddingInlineStart","paddingInlineEnd","paddingBlock","paddingBlockStart","paddingBlockEnd"];function _N(e,n,i,r){const s=bne(e,n,!0)??i;return typeof s=="number"||typeof s=="string"?l=>typeof l=="string"?l:typeof s=="string"?s.startsWith("var(")&&l===0?0:s.startsWith("var(")&&l===1?s:`calc(${l} * ${s})`:s*l:Array.isArray(s)?l=>{if(typeof l=="string")return l;const c=Math.abs(l),d=s[c];return l>=0?d:typeof d=="number"?-d:typeof d=="string"&&d.startsWith("var(")?`calc(-1 * ${d})`:`-${d}`}:typeof s=="function"?s:()=>{}}function iwe(e){return _N(e,"spacing",8)}function VN(e,n){return typeof n=="string"||n==null?n:e(n)}function m1n(e,n,i,r){if(!n.includes(i))return null;const s=(function(l,c){return d=>l.reduce(((u,p)=>(u[p]=VN(c,d),u)),{})})(h1n(i),r);return B7(e,e[i],s)}function skt(e,n){const i=iwe(e.theme);return Object.keys(e).map((r=>m1n(e,n,r,i))).reduce(ZF,{})}function sc(e){return skt(e,rkt)}function lc(e){return skt(e,akt)}function lkt(e=8,n=iwe({spacing:e})){if(e.mui)return e;const i=(...r)=>(r.length===0?[1]:r).map((s=>{const l=n(s);return typeof l=="number"?`${l}px`:l})).join(" ");return i.mui=!0,i}function wne(...e){const n=e.reduce(((r,s)=>(s.filterProps.forEach((l=>{r[l]=s})),r)),{}),i=r=>Object.keys(r).reduce(((s,l)=>n[l]?ZF(s,n[l](r)):s),{});return i.propTypes={},i.filterProps=e.reduce(((r,s)=>r.concat(s.filterProps)),[]),i}function Og(e){return typeof e!="number"?e:`${e}px solid`}function y2(e,n){return Pc({prop:e,themeKey:"borders",transform:n})}sc.propTypes={},sc.filterProps=rkt,lc.propTypes={},lc.filterProps=akt;const g1n=y2("border",Og),f1n=y2("borderTop",Og),x1n=y2("borderRight",Og),y1n=y2("borderBottom",Og),b1n=y2("borderLeft",Og),w1n=y2("borderColor"),C1n=y2("borderTopColor"),v1n=y2("borderRightColor"),A1n=y2("borderBottomColor"),S1n=y2("borderLeftColor"),k1n=y2("outline",Og),j1n=y2("outlineColor"),aK=e=>{if(e.borderRadius!==void 0&&e.borderRadius!==null){const n=_N(e.theme,"shape.borderRadius",4),i=r=>({borderRadius:VN(n,r)});return B7(e,e.borderRadius,i)}return null};aK.propTypes={},aK.filterProps=["borderRadius"],wne(g1n,f1n,x1n,y1n,b1n,w1n,C1n,v1n,A1n,S1n,aK,k1n,j1n);const GZ=e=>{if(e.gap!==void 0&&e.gap!==null){const n=_N(e.theme,"spacing",8),i=r=>({gap:VN(n,r)});return B7(e,e.gap,i)}return null};GZ.propTypes={},GZ.filterProps=["gap"];const qZ=e=>{if(e.columnGap!==void 0&&e.columnGap!==null){const n=_N(e.theme,"spacing",8),i=r=>({columnGap:VN(n,r)});return B7(e,e.columnGap,i)}return null};qZ.propTypes={},qZ.filterProps=["columnGap"];const KZ=e=>{if(e.rowGap!==void 0&&e.rowGap!==null){const n=_N(e.theme,"spacing",8),i=r=>({rowGap:VN(n,r)});return B7(e,e.rowGap,i)}return null};KZ.propTypes={},KZ.filterProps=["rowGap"];function gD(e,n){return n==="grey"?n:e}wne(GZ,qZ,KZ,Pc({prop:"gridColumn"}),Pc({prop:"gridRow"}),Pc({prop:"gridAutoFlow"}),Pc({prop:"gridAutoColumns"}),Pc({prop:"gridAutoRows"}),Pc({prop:"gridTemplateColumns"}),Pc({prop:"gridTemplateRows"}),Pc({prop:"gridTemplateAreas"}),Pc({prop:"gridArea"}));function p0(e){return e<=1&&e!==0?100*e+"%":e}wne(Pc({prop:"color",themeKey:"palette",transform:gD}),Pc({prop:"bgcolor",cssProperty:"backgroundColor",themeKey:"palette",transform:gD}),Pc({prop:"backgroundColor",themeKey:"palette",transform:gD}));const $1n=Pc({prop:"width",transform:p0}),owe=e=>{if(e.maxWidth!==void 0&&e.maxWidth!==null){const n=i=>{const r=e.theme?.breakpoints?.values?.[i]||yne[i];return r?e.theme?.breakpoints?.unit!=="px"?{maxWidth:`${r}${e.theme.breakpoints.unit}`}:{maxWidth:r}:{maxWidth:p0(i)}};return B7(e,e.maxWidth,n)}return null};owe.filterProps=["maxWidth"];const E1n=Pc({prop:"minWidth",transform:p0}),I1n=Pc({prop:"height",transform:p0}),D1n=Pc({prop:"maxHeight",transform:p0}),T1n=Pc({prop:"minHeight",transform:p0});Pc({prop:"size",cssProperty:"width",transform:p0}),Pc({prop:"size",cssProperty:"height",transform:p0});wne($1n,owe,E1n,I1n,D1n,T1n,Pc({prop:"boxSizing"}));const Cne={border:{themeKey:"borders",transform:Og},borderTop:{themeKey:"borders",transform:Og},borderRight:{themeKey:"borders",transform:Og},borderBottom:{themeKey:"borders",transform:Og},borderLeft:{themeKey:"borders",transform:Og},borderColor:{themeKey:"palette"},borderTopColor:{themeKey:"palette"},borderRightColor:{themeKey:"palette"},borderBottomColor:{themeKey:"palette"},borderLeftColor:{themeKey:"palette"},outline:{themeKey:"borders",transform:Og},outlineColor:{themeKey:"palette"},borderRadius:{themeKey:"shape.borderRadius",style:aK},color:{themeKey:"palette",transform:gD},bgcolor:{themeKey:"palette",cssProperty:"backgroundColor",transform:gD},backgroundColor:{themeKey:"palette",transform:gD},p:{style:lc},pt:{style:lc},pr:{style:lc},pb:{style:lc},pl:{style:lc},px:{style:lc},py:{style:lc},padding:{style:lc},paddingTop:{style:lc},paddingRight:{style:lc},paddingBottom:{style:lc},paddingLeft:{style:lc},paddingX:{style:lc},paddingY:{style:lc},paddingInline:{style:lc},paddingInlineStart:{style:lc},paddingInlineEnd:{style:lc},paddingBlock:{style:lc},paddingBlockStart:{style:lc},paddingBlockEnd:{style:lc},m:{style:sc},mt:{style:sc},mr:{style:sc},mb:{style:sc},ml:{style:sc},mx:{style:sc},my:{style:sc},margin:{style:sc},marginTop:{style:sc},marginRight:{style:sc},marginBottom:{style:sc},marginLeft:{style:sc},marginX:{style:sc},marginY:{style:sc},marginInline:{style:sc},marginInlineStart:{style:sc},marginInlineEnd:{style:sc},marginBlock:{style:sc},marginBlockStart:{style:sc},marginBlockEnd:{style:sc},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:GZ},rowGap:{style:KZ},columnGap:{style:qZ},gridColumn:{},gridRow:{},gridAutoFlow:{},gridAutoColumns:{},gridAutoRows:{},gridTemplateColumns:{},gridTemplateRows:{},gridTemplateAreas:{},gridArea:{},position:{},zIndex:{themeKey:"zIndex"},top:{},right:{},bottom:{},left:{},boxShadow:{themeKey:"shadows"},width:{transform:p0},maxWidth:{style:owe},minWidth:{transform:p0},height:{transform:p0},maxHeight:{transform:p0},minHeight:{transform:p0},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"}},kS=(function(){function e(n,i,r,s){const l={[n]:i,theme:r},c=s[n];if(!c)return{[n]:i};const{cssProperty:d=n,themeKey:u,transform:p,style:h}=c;if(i==null)return null;if(u==="typography"&&i==="inherit")return{[n]:i};const g=bne(r,u)||{};return h?h(l):B7(l,i,(f=>{let x=YZ(g,p,f);return f===x&&typeof f=="string"&&(x=YZ(g,p,`${n}${f==="default"?"":nr(f)}`,f)),d===!1?x:{[d]:x}}))}return function n(i){const{sx:r,theme:s={},nested:l}=i||{};if(!r)return null;const c=s.unstable_sxConfig??Cne;function d(u){let p=u;if(typeof u=="function")p=u(s);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)),{})||{}})(s.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],s);if(y!=null)if(typeof y=="object")if(c[x])f=ZF(f,e(x,y,s,c));else{const b=B7({theme:s},y,(w=>({[x]:w})));(function(...w){const C=w.reduce(((A,S)=>A.concat(Object.keys(S))),[]),v=new Set(C);return w.every((A=>v.size===Object.keys(A).length))})(b,y)?f[x]=n({sx:y,theme:s,nested:!0}):f=ZF(f,b)}else f=ZF(f,e(x,y,s,c))})),!l&&s.modularCssLayers?{"@layer sx":M$e(s,F$e(g,f))}:M$e(s,F$e(g,f))}return Array.isArray(r)?r.map(d):d(r)}})();function L1n(e,n){const i=this;if(i.vars){if(!i.colorSchemes?.[e]||typeof i.getColorSchemeSelector!="function")return{};let r=i.getColorSchemeSelector(e);return r==="&"?n:((r.includes("data-")||r.includes("."))&&(r=`*:where(${r.replace(/\s*&$/,"")}) &`),{[r]:n})}return i.palette.mode===e?n:{}}function rwe(e={},...n){const{breakpoints:i={},palette:r={},spacing:s,shape:l={},...c}=e;let d=K1({breakpoints:l1n(i),direction:"ltr",components:{},palette:{mode:"light",...r},spacing:lkt(s),shape:{...c1n,...l}},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=L1n,d=n.reduce(((u,p)=>K1(u,p)),d),d.unstable_sxConfig={...Cne,...c?.unstable_sxConfig},d.unstable_sx=function(u){return kS({sx:u,theme:this})},d}function K5e(e=null){const n=m.useContext(zSt);return!n||(function(i){return Object.keys(i).length===0})(n)?e:n}kS.filterProps=["sx"];const B1n=rwe();function ckt(e=B1n){return K5e(e)}function z$e(e){const n=Q9(e);return e!==n&&n.styles?(n.styles.match(/^@layer\s+[^{]*$/)||(n.styles=`@layer global{${n.styles}}`),n):e}function dkt({styles:e,themeId:n,defaultTheme:i={}}){const r=ckt(i),s=n&&r[n]||r;let l=typeof e=="function"?e(s):e;return s.modularCssLayers&&(l=Array.isArray(l)?l.map((c=>z$e(typeof c=="function"?c(s):c))):z$e(l)),t.jsx(nkt,{styles:l})}const N$e=e=>e,P1n=(()=>{let e=N$e;return{configure(n){e=n},generate:n=>e(n),reset(){e=N$e}}})();function ukt(e){var n,i,r="";if(typeof e=="string"||typeof e=="number")r+=e;else if(typeof e=="object")if(Array.isArray(e)){var s=e.length;for(n=0;n<s;n++)e[n]&&(i=ukt(e[n]))&&(r&&(r+=" "),r+=i)}else for(i in e)e[i]&&(r&&(r+=" "),r+=i);return r}function or(){for(var e,n,i=0,r="",s=arguments.length;i<s;i++)(e=arguments[i])&&(n=ukt(e))&&(r&&(r+=" "),r+=n);return r}const M1n={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 is(e,n,i="Mui"){const r=M1n[n];return r?`${i}-${r}`:`${P1n.generate(e)}-${n}`}function Ba(e,n,i="Mui"){const r={};return n.forEach((s=>{r[s]=is(e,s,i)})),r}function pkt(e){const{variants:n,...i}=e,r={variants:n,style:Q9(i),isProcessed:!0};return r.style===i||n&&n.forEach((s=>{typeof s.style!="function"&&(s.style=Q9(s.style))})),r}const O1n=rwe();function kse(e){return e!=="ownerState"&&e!=="theme"&&e!=="sx"&&e!=="as"}function gA(e,n){return n&&e&&typeof e=="object"&&e.styles&&!e.styles.startsWith("@layer")&&(e.styles=`@layer ${n}{${String(e.styles)}}`),e}function F1n(e){return e?(n,i)=>i[e]:null}function sK(e,n,i){const r=typeof n=="function"?n(e):n;if(Array.isArray(r))return r.flatMap((s=>sK(e,s,i)));if(Array.isArray(r?.variants)){let s;if(r.isProcessed)s=i?gA(r.style,i):r.style;else{const{variants:l,...c}=r;s=i?gA(Q9(c),i):c}return hkt(e,r.variants,[s],i)}return r?.isProcessed?i?gA(Q9(r.style),i):r.style:i?gA(Q9(r),i):r}function hkt(e,n,i=[],r=void 0){let s;e:for(let l=0;l<n.length;l+=1){const c=n[l];if(typeof c.props=="function"){if(s??={...e,...e.ownerState,ownerState:e.ownerState},!c.props(s))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"?(s??={...e,...e.ownerState,ownerState:e.ownerState},i.push(r?gA(Q9(c.style(s)),r):c.style(s))):i.push(r?gA(Q9(c.style),r):c.style)}return i}function R1n(e){return e&&e.charAt(0).toLowerCase()+e.slice(1)}function Z5e(e,n,i=!1){const r={...n};for(const s in e)if(Object.prototype.hasOwnProperty.call(e,s)){const l=s;if(l==="components"||l==="slots")r[l]={...e[l],...r[l]};else if(l==="componentsProps"||l==="slotProps"){const c=e[l],d=n[l];if(d)if(c){r[l]={...d};for(const u in c)if(Object.prototype.hasOwnProperty.call(c,u)){const p=u;r[l][p]=Z5e(c[p],d[p],i)}}else r[l]=d;else r[l]=c||{}}else l==="className"&&i&&n.className?r.className=or(e?.className,n?.className):l==="style"&&i&&n.style?r.style={...e?.style,...n?.style}:r[l]===void 0&&(r[l]=e[l])}return r}const D0=typeof window<"u"?m.useLayoutEffect:m.useEffect;function awe(e,n=0,i=1){return(function(r,s=Number.MIN_SAFE_INTEGER,l=Number.MAX_SAFE_INTEGER){return Math.max(s,Math.min(r,l))})(e,n,i)}function d8(e){if(e.type)return e;if(e.charAt(0)==="#")return d8((function(l){l=l.slice(1);const c=new RegExp(`.{1,${l.length>=6?2:1}}`,"g");let d=l.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("("),i=e.substring(0,n);if(!["rgb","rgba","hsl","hsla","color"].includes(i))throw new Error(L7(9,e));let r,s=e.substring(n+1,e.length-1);if(i==="color"){if(s=s.split(" "),r=s.shift(),s.length===4&&s[3].charAt(0)==="/"&&(s[3]=s[3].slice(1)),!["srgb","display-p3","a98-rgb","prophoto-rgb","rec-2020"].includes(r))throw new Error(L7(10,r))}else s=s.split(",");return s=s.map((l=>parseFloat(l))),{type:i,values:s,colorSpace:r}}const UO=(e,n)=>{try{return(i=>{const r=d8(i);return r.values.slice(0,3).map(((s,l)=>r.type.includes("hsl")&&l!==0?`${s}%`:s)).join(" ")})(e)}catch{return e}};function vne(e){const{type:n,colorSpace:i}=e;let{values:r}=e;return n.includes("rgb")?r=r.map(((s,l)=>l<3?parseInt(s,10):s)):n.includes("hsl")&&(r[1]=`${r[1]}%`,r[2]=`${r[2]}%`),r=n.includes("color")?`${i} ${r.join(" ")}`:`${r.join(", ")}`,`${n}(${r})`}function mkt(e){e=d8(e);const{values:n}=e,i=n[0],r=n[1]/100,s=n[2]/100,l=r*Math.min(s,1-s),c=(p,h=(p+i/30)%12)=>s-l*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])),vne({type:d,values:u})}function J5e(e){let n=(e=d8(e)).type==="hsl"||e.type==="hsla"?d8(mkt(e)).values:e.values;return n=n.map((i=>(e.type!=="color"&&(i/=255),i<=.03928?i/12.92:((i+.055)/1.055)**2.4))),Number((.2126*n[0]+.7152*n[1]+.0722*n[2]).toFixed(3))}function ZZ(e,n){return e=d8(e),n=awe(n),(e.type==="rgb"||e.type==="hsl")&&(e.type+="a"),e.type==="color"?e.values[3]=`/${n}`:e.values[3]=n,vne(e)}function Kw(e,n,i){try{return ZZ(e,n)}catch{return e}}function Ane(e,n){if(e=d8(e),n=awe(n),e.type.includes("hsl"))e.values[2]*=1-n;else if(e.type.includes("rgb")||e.type.includes("color"))for(let i=0;i<3;i+=1)e.values[i]*=1-n;return vne(e)}function ys(e,n,i){try{return Ane(e,n)}catch{return e}}function Sne(e,n){if(e=d8(e),n=awe(n),e.type.includes("hsl"))e.values[2]+=(100-e.values[2])*n;else if(e.type.includes("rgb"))for(let i=0;i<3;i+=1)e.values[i]+=(255-e.values[i])*n;else if(e.type.includes("color"))for(let i=0;i<3;i+=1)e.values[i]+=(1-e.values[i])*n;return vne(e)}function bs(e,n,i){try{return Sne(e,n)}catch{return e}}function FV(e,n,i){try{return(function(r,s=.15){return J5e(r)>.5?Ane(r,s):Sne(r,s)})(e,n)}catch{return e}}const gkt=m.createContext(null);function swe(){return m.useContext(gkt)}const z1n=typeof Symbol=="function"&&Symbol.for?Symbol.for("mui.nested"):"__THEME_NESTED__";function N1n(e){const{children:n,theme:i}=e,r=swe(),s=m.useMemo((()=>{const l=r===null?{...i}:(function(c,d){return typeof d=="function"?d(c):{...c,...d}})(r,i);return l!=null&&(l[z1n]=r!==null),l}),[i,r]);return t.jsx(gkt.Provider,{value:s,children:n})}const fkt=m.createContext();function _1n({value:e,...n}){return t.jsx(fkt.Provider,{value:e??!0,...n})}const kne=()=>m.useContext(fkt)??!1,xkt=m.createContext(void 0);function V1n({value:e,children:n}){return t.jsx(xkt.Provider,{value:e,children:n})}function H1n({props:e,name:n}){return(function(i){const{theme:r,name:s,props:l}=i;if(!r||!r.components||!r.components[s])return l;const c=r.components[s];return c.defaultProps?Z5e(c.defaultProps,l,r.components.mergeClassNameAndStyle):c.styleOverrides||c.variants?l:Z5e(c,l,r.components.mergeClassNameAndStyle)})({props:e,name:n,theme:{components:m.useContext(xkt)}})}let _$e=0;const V$e={...wsn}.useId;function jne(e){if(V$e!==void 0){const n=V$e();return e??n}return(function(n){const[i,r]=m.useState(n),s=n||i;return m.useEffect((()=>{i==null&&(_$e+=1,r(`mui-${_$e}`))}),[i]),s})(e)}const H$e={};function U$e(e,n,i,r=!1){return m.useMemo((()=>{const s=e&&n[e]||n;if(typeof i=="function"){const l=i(s),c=e?{...n,[e]:l}:l;return r?()=>c:c}return e?{...n,[e]:i}:{...n,...i}}),[e,n,i,r])}function ykt(e){const{children:n,theme:i,themeId:r}=e,s=K5e(H$e),l=swe()||H$e,c=U$e(r,s,i),d=U$e(r,l,i,!0),u=(r?c[r]:c).direction==="rtl",p=(function(h){const g=K5e(),f=jne()||"",{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};`:"",D0((()=>{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(dkt,{styles:y}):null})(c);return t.jsx(N1n,{theme:d,children:t.jsx(zSt.Provider,{value:c,children:t.jsx(_1n,{value:u,children:t.jsxs(V1n,{value:r?c[r].components:c.components,children:[p,n]})})})})}const W$e={theme:void 0},X5e="mode",exe="color-scheme",U1n="data-color-scheme";function W1n(){}const Q1n=({key:e,storageWindow:n})=>(!n&&typeof window<"u"&&(n=window),{get(i){if(typeof window>"u")return;if(!n)return i;let r;try{r=n.localStorage.getItem(e)}catch{}return r||i},set:i=>{if(n)try{n.localStorage.setItem(e,i)}catch{}},subscribe:i=>{if(!n)return W1n;const r=s=>{const l=s.newValue;s.key===e&&i(l)};return n.addEventListener("storage",r),()=>{n.removeEventListener("storage",r)}}});function jse(){}function Q$e(e){if(typeof window<"u"&&typeof window.matchMedia=="function"&&e==="system")return window.matchMedia("(prefers-color-scheme: dark)").matches?"dark":"light"}function Y$e(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 Y1n(e){const{defaultMode:n="light",defaultLightColorScheme:i,defaultDarkColorScheme:r,supportedColorSchemes:s=[],modeStorageKey:l=X5e,colorSchemeStorageKey:c=exe,storageWindow:d=typeof window>"u"?void 0:window,storageManager:u=Q1n,noSsr:p=!1}=e,h=s.join(","),g=s.length>1,f=m.useMemo((()=>u?.({key:l,storageWindow:d})),[u,l,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 E=f?.get(n)||n,D=x?.get(i)||i,B=y?.get(r)||r;return{mode:E,systemMode:Q$e(E),lightColorScheme:D,darkColorScheme:B}})),[C,v]=m.useState(p||!g);m.useEffect((()=>{v(!0)}),[]);const A=(function(E){return Y$e(E,(D=>D==="light"?E.lightColorScheme:D==="dark"?E.darkColorScheme:void 0))})(b),S=m.useCallback((E=>{w((D=>{if(E===D.mode)return D;const B=E??n;return f?.set(B),{...D,mode:B,systemMode:Q$e(B)}}))}),[f,n]),$=m.useCallback((E=>{E?typeof E=="string"?E&&!h.includes(E)?console.error(`\`${E}\` does not exist in \`theme.colorSchemes\`.`):w((D=>{const B={...D};return Y$e(D,(F=>{F==="light"&&(x?.set(E),B.lightColorScheme=E),F==="dark"&&(y?.set(E),B.darkColorScheme=E)})),B})):w((D=>{const B={...D},F=E.light===null?i:E.light,R=E.dark===null?r:E.dark;return F&&(h.includes(F)?(B.lightColorScheme=F,x?.set(F)):console.error(`\`${F}\` does not exist in \`theme.colorSchemes\`.`)),R&&(h.includes(R)?(B.darkColorScheme=R,y?.set(R)):console.error(`\`${R}\` does not exist in \`theme.colorSchemes\`.`)),B})):w((D=>(x?.set(i),y?.set(r),{...D,lightColorScheme:i,darkColorScheme:r})))}),[h,x,y,i,r]),j=m.useCallback((E=>{b.mode==="system"&&w((D=>{const B=E?.matches?"dark":"light";return D.systemMode===B?D:{...D,systemMode:B}}))}),[b.mode]),I=m.useRef(j);return I.current=j,m.useEffect((()=>{if(typeof window.matchMedia!="function"||!g)return;const E=(...B)=>I.current(...B),D=window.matchMedia("(prefers-color-scheme: dark)");return D.addListener(E),E(D),()=>{D.removeListener(E)}}),[g]),m.useEffect((()=>{if(g){const E=f?.subscribe((F=>{(!F||["light","dark","system"].includes(F))&&S(F||n)}))||jse,D=x?.subscribe((F=>{(!F||h.match(F))&&$({light:F})}))||jse,B=y?.subscribe((F=>{(!F||h.match(F))&&$({dark:F})}))||jse;return()=>{E(),D(),B()}}}),[$,S,h,n,d,g,f,x,y]),{...b,mode:C?b.mode:void 0,systemMode:C?b.systemMode:void 0,colorScheme:C?A:void 0,setMode:S,setColorScheme:$}}function G1n(e=""){function n(...i){if(!i.length)return"";const r=i[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(...i.slice(1))})`}return(i,...r)=>`var(--${e?`${e}-`:""}${i}${n(...r)})`}const G$e=(e,n,i,r=[])=>{let s=e;n.forEach(((l,c)=>{c===n.length-1?Array.isArray(s)?s[Number(l)]=i:s&&typeof s=="object"&&(s[l]=i):s&&typeof s=="object"&&(s[l]||(s[l]=r.includes(l)?[]:{}),s=s[l])}))};function $se(e,n){const{prefix:i,shouldSkipGeneratingVar:r}=n||{},s={},l={},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=`--${i?`${i}-`:""}${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(s,{[h]:g}),G$e(l,d,`var(${h})`,p),G$e(c,d,`var(${h}, ${g})`,p)}}),(d=>d[0]==="vars")),{css:s,vars:l,varsWithDefaults:c}}function os(e,n,i=void 0){const r={};for(const s in e){const l=e[s];let c="",d=!0;for(let u=0;u<l.length;u+=1){const p=l[u];p&&(c+=(d===!0?"":" ")+n(p),d=!1,i&&i[p]&&(c+=" "+i[p]))}r[s]=c}return r}function Ese(e,n){return m.isValidElement(e)&&n.indexOf(e.type.muiName??e.type?._payload?.value?.muiName)!==-1}const wz={black:"#000",white:"#fff"},q1n={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"},K1n="#f3e5f5",Z1n="#ce93d8",J1n="#ba68c8",X1n="#ab47bc",epn="#9c27b0",tpn="#7b1fa2",npn="#e57373",ipn="#ef5350",opn="#f44336",q$e="#d32f2f",rpn="#c62828",apn="#ffb74d",spn="#ffa726",lpn="#ff9800",cpn="#f57c00",dpn="#e65100",upn="#e3f2fd",ppn="#90caf9",K$e="#42a5f5",hpn="#1976d2",mpn="#1565c0",gpn="#4fc3f7",fpn="#29b6f6",xpn="#03a9f4",Z$e="#0288d1",ypn="#01579b",bpn="#81c784",wpn="#66bb6a",Cpn="#4caf50",vpn="#388e3c",Apn="#2e7d32",Spn="#1b5e20";function bkt(){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:wz.white,default:wz.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 wkt=bkt();function Ckt(){return{text:{primary:wz.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:wz.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 txe=Ckt();function J$e(e,n,i,r){const s=r.light||r,l=r.dark||1.5*r;e[n]||(e.hasOwnProperty(i)?e[n]=e[i]:n==="light"?e.light=Sne(e.main,s):n==="dark"&&(e.dark=Ane(e.main,l)))}function X$e(e,n,i,r,s){const l=s.light||s,c=s.dark||1.5*s;n[i]||(n.hasOwnProperty(r)?n[i]=n[r]:i==="light"?n.light=`color-mix(in ${e}, ${n.main}, #fff ${(100*l).toFixed(0)}%)`:i==="dark"&&(n.dark=`color-mix(in ${e}, ${n.main}, #000 ${(100*c).toFixed(0)}%)`))}function lwe(e){const{mode:n="light",contrastThreshold:i=3,tonalOffset:r=.2,colorSpace:s,...l}=e,c=e.primary||(function(b="light"){return b==="dark"?{main:ppn,light:upn,dark:K$e}:{main:hpn,light:K$e,dark:mpn}})(n),d=e.secondary||(function(b="light"){return b==="dark"?{main:Z1n,light:K1n,dark:X1n}:{main:epn,light:J1n,dark:tpn}})(n),u=e.error||(function(b="light"){return b==="dark"?{main:opn,light:npn,dark:q$e}:{main:q$e,light:ipn,dark:rpn}})(n),p=e.info||(function(b="light"){return b==="dark"?{main:fpn,light:gpn,dark:Z$e}:{main:Z$e,light:xpn,dark:ypn}})(n),h=e.success||(function(b="light"){return b==="dark"?{main:wpn,light:bpn,dark:vpn}:{main:Apn,light:Cpn,dark:Spn}})(n),g=e.warning||(function(b="light"){return b==="dark"?{main:spn,light:apn,dark:cpn}:{main:"#ed6c02",light:lpn,dark:dpn}})(n);function f(b){return s?(function(C){return`oklch(from ${C} var(--__l) 0 h / var(--__a))`})(b):(function(C,v){const A=J5e(C),S=J5e(v);return(Math.max(A,S)+.05)/(Math.min(A,S)+.05)})(b,txe.text.primary)>=i?txe.text.primary:wkt.text.primary}const x=({color:b,name:w,mainShade:C=500,lightShade:v=300,darkShade:A=700})=>{if(!(b={...b}).main&&b[C]&&(b.main=b[C]),!b.hasOwnProperty("main"))throw new Error(L7(11,w?` (${w})`:"",C));if(typeof b.main!="string")throw new Error(L7(12,w?` (${w})`:"",JSON.stringify(b.main)));return s?(X$e(s,b,"light",v,r),X$e(s,b,"dark",A,r)):(J$e(b,"light",v,r),J$e(b,"dark",A,r)),b.contrastText||(b.contrastText=f(b.main)),b};let y;return n==="light"?y=bkt():n==="dark"&&(y=Ckt()),K1({common:{...wz},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:q1n,contrastThreshold:i,getContrastText:f,augmentColor:x,tonalOffset:r,...y},l)}function kpn(e){const n={};return Object.entries(e).forEach((i=>{const[r,s]=i;typeof s=="object"&&(n[r]=`${s.fontStyle?`${s.fontStyle} `:""}${s.fontVariant?`${s.fontVariant} `:""}${s.fontWeight?`${s.fontWeight} `:""}${s.fontStretch?`${s.fontStretch} `:""}${s.fontSize||""}${s.lineHeight?`/${s.lineHeight} `:""}${s.fontFamily||""}`)})),n}function jpn(e,n){return{toolbar:{minHeight:56,[e.up("xs")]:{"@media (orientation: landscape)":{minHeight:48}},[e.up("sm")]:{minHeight:64}},...n}}function $pn(e){return Math.round(1e5*e)/1e5}const eEe={textTransform:"uppercase"},tEe='"Roboto", "Helvetica", "Arial", sans-serif';function vkt(e,n){const{fontFamily:i=tEe,fontSize:r=14,fontWeightLight:s=300,fontWeightRegular:l=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,A,S)=>({fontFamily:i,fontWeight:w,fontSize:x(C),lineHeight:v,...i===tEe?{letterSpacing:`${$pn(A/C)}em`}:{},...S,...p}),b={h1:y(s,96,1.167,-1.5),h2:y(s,60,1.2,-.5),h3:y(l,48,1.167,0),h4:y(l,34,1.235,.25),h5:y(l,24,1.334,0),h6:y(c,20,1.6,.15),subtitle1:y(l,16,1.75,.15),subtitle2:y(c,14,1.57,.1),body1:y(l,16,1.5,.15),body2:y(l,14,1.43,.15),button:y(c,14,1.75,.4,eEe),caption:y(l,12,1.66,.4),overline:y(l,12,2.66,1,eEe),inherit:{fontFamily:"inherit",fontWeight:"inherit",fontSize:"inherit",lineHeight:"inherit",letterSpacing:"inherit"}};return K1({htmlFontSize:u,pxToRem:x,fontFamily:i,fontSize:r,fontWeightLight:s,fontWeightRegular:l,fontWeightMedium:c,fontWeightBold:d,...b},g,{clone:!1})}function kl(...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 Epn=["none",kl(0,2,1,-1,0,1,1,0,0,1,3,0),kl(0,3,1,-2,0,2,2,0,0,1,5,0),kl(0,3,3,-2,0,3,4,0,0,1,8,0),kl(0,2,4,-1,0,4,5,0,0,1,10,0),kl(0,3,5,-1,0,5,8,0,0,1,14,0),kl(0,3,5,-1,0,6,10,0,0,1,18,0),kl(0,4,5,-2,0,7,10,1,0,2,16,1),kl(0,5,5,-3,0,8,10,1,0,3,14,2),kl(0,5,6,-3,0,9,12,1,0,3,16,2),kl(0,6,6,-3,0,10,14,1,0,4,18,3),kl(0,6,7,-4,0,11,15,1,0,4,20,3),kl(0,7,8,-4,0,12,17,2,0,5,22,4),kl(0,7,8,-4,0,13,19,2,0,5,24,4),kl(0,7,9,-4,0,14,21,2,0,5,26,4),kl(0,8,9,-5,0,15,22,2,0,6,28,5),kl(0,8,10,-5,0,16,24,2,0,6,30,5),kl(0,8,11,-5,0,17,26,2,0,6,32,5),kl(0,9,11,-5,0,18,28,2,0,7,34,6),kl(0,9,12,-6,0,19,29,2,0,7,36,6),kl(0,10,13,-6,0,20,31,3,0,8,38,7),kl(0,10,13,-6,0,21,33,3,0,8,40,7),kl(0,10,14,-6,0,22,35,3,0,8,42,7),kl(0,11,14,-7,0,23,36,3,0,9,44,8),kl(0,11,15,-7,0,24,38,3,0,9,46,8)],Ipn={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)"},Akt={shortest:150,shorter:200,short:250,standard:300,complex:375,enteringScreen:225,leavingScreen:195};function nEe(e){return`${Math.round(e)}ms`}function Dpn(e){if(!e)return 0;const n=e/36;return Math.min(Math.round(10*(4+15*n**.25+n/5)),3e3)}function Tpn(e){const n={...Ipn,...e.easing},i={...Akt,...e.duration};return{getAutoHeightDuration:Dpn,create:(r=["all"],s={})=>{const{duration:l=i.standard,easing:c=n.easeInOut,delay:d=0,...u}=s;return(Array.isArray(r)?r:[r]).map((p=>`${p} ${typeof l=="string"?l:nEe(l)} ${c} ${typeof d=="string"?d:nEe(d)}`)).join(",")},...e,easing:n,duration:i}}const Lpn={mobileStepper:1e3,fab:1050,speedDial:1050,appBar:1100,drawer:1200,modal:1300,snackbar:1400,tooltip:1500};function Bpn(e){return Ky(e)||typeof e>"u"||typeof e=="string"||typeof e=="boolean"||typeof e=="number"||Array.isArray(e)}function Skt(e={}){const n={...e};return(function i(r){const s=Object.entries(r);for(let l=0;l<s.length;l++){const[c,d]=s[l];!Bpn(d)||c.startsWith("unstable_")?delete r[c]:Ky(d)&&(r[c]={...d},i(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
|
|
|
@@ -10588,7 +10588,7 @@ To reactivate your account, please settle the outstanding balance. Contact suppo
|
|
|
10588
10588
|
padding-top: ${e=>Cm.ButtonContainerPaddingTop.valuePx(e.windowSize)};
|
|
10589
10589
|
`,rxi=a.div``,axi=a((e=>m.createElement("svg",{width:598,height:361,viewBox:"0 0 598 361",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},m.createElement("path",{d:"M3 42V10C3 5.58172 6.58172 2 11 2H43",stroke:"#FEFEFE",strokeWidth:3,strokeLinejoin:"round"}),m.createElement("path",{d:"M595 42V10C595 5.58172 591.418 2 587 2H555",stroke:"#FEFEFE",strokeWidth:3,strokeLinejoin:"round"}),m.createElement("path",{d:"M3 319V351C3 355.418 6.58172 359 11 359H43",stroke:"#FEFEFE",strokeWidth:3,strokeLinejoin:"round"}),m.createElement("path",{d:"M595 319V351C595 355.418 591.418 359 587 359H555",stroke:"#FEFEFE",strokeWidth:3,strokeLinejoin:"round"}),m.createElement("path",{d:"M160 164.999C160 163.344 161.05 162 162.344 162L232.656 162C233.95 162 235 163.344 235 164.999C235 166.655 233.95 167.999 232.656 167.999L162.344 167.999C161.05 167.999 160 166.655 160 164.999Z",fill:"#FEFEFE"}),m.createElement("path",{d:"M337.544 164.999C337.544 163.344 338.944 162 340.669 162L434.419 162C436.144 162 437.544 163.344 437.544 164.999C437.544 166.655 436.144 167.999 434.419 167.999L340.669 167.999C338.944 167.999 337.544 166.655 337.544 164.999Z",fill:"#FEFEFE"}),m.createElement("path",{d:"M261.544 165C261.544 163.344 262.594 162 263.888 162L309.2 162C310.494 162 311.544 163.344 311.544 165C311.544 166.656 310.494 168 309.2 168L263.888 168C262.594 168 261.544 166.656 261.544 165Z",fill:"#FEFEFE"}),m.createElement("path",{d:"M138 202C138 200.344 140.924 199 144.527 199L453.473 199C457.076 199 460 200.344 460 202C460 203.656 457.076 205 453.473 205L144.527 205C140.924 205 138 203.656 138 202Z",fill:"#FEFEFE"}),m.createElement("path",{d:"M138 276C138 274.344 140.924 273 144.527 273L453.473 273C457.076 273 460 274.344 460 276C460 277.656 457.076 279 453.473 279L144.527 279C140.924 279 138 277.656 138 276Z",fill:"#FEFEFE"}),m.createElement("path",{d:"M207 239C207 237.344 209.29 236 212.111 236L385.889 236C388.71 236 391 237.344 391 239C391 240.656 388.71 242 385.889 242L212.111 242C209.29 242 207 240.656 207 239Z",fill:"#FEFEFE"}),m.createElement("path",{d:"M3 113C234.19 51.6667 363.81 51.6667 595 113",stroke:"#FAFAFA",strokeWidth:5,strokeLinecap:"round"}))))`
|
|
10590
10590
|
transform: scale(1, 0.9);
|
|
10591
|
-
`,sxi=a(ul)``,dqe="application/pdf",Kzt=["image/jpg","image/jpeg","image/png","image/webp","image/bmp"],lxi={useWebWorker:!0,maxWidthOrHeight:1920,initialQuality:.92,maxSizeMB:2};async function cxi(e,n,i){const r=e.getViewport({scale:n}),s=document.createElement("canvas");s.width=Math.floor(r.width),s.height=Math.floor(r.height);const l=s.getContext("2d");if(l==null)throw new Error("Could not get canvas 2d context");return await e.render({canvasContext:l,viewport:r}).promise,(await(function(c,d){return new Promise(((u,p)=>{c.toBlob((h=>{h!=null?u(h):p(new Error("canvas.toBlob returned null"))}),"image/jpeg",d)}))})(s,i)).arrayBuffer()}async function dxi(e,n){const i=e instanceof File?e:new File([e],n,{type:e.type});if(e.type===dqe){const s=await(async function(l,c){const[{PDFDocument:d},u]=await Promise.all([Md((()=>import("./pdf-lib-
|
|
10591
|
+
`,sxi=a(ul)``,dqe="application/pdf",Kzt=["image/jpg","image/jpeg","image/png","image/webp","image/bmp"],lxi={useWebWorker:!0,maxWidthOrHeight:1920,initialQuality:.92,maxSizeMB:2};async function cxi(e,n,i){const r=e.getViewport({scale:n}),s=document.createElement("canvas");s.width=Math.floor(r.width),s.height=Math.floor(r.height);const l=s.getContext("2d");if(l==null)throw new Error("Could not get canvas 2d context");return await e.render({canvasContext:l,viewport:r}).promise,(await(function(c,d){return new Promise(((u,p)=>{c.toBlob((h=>{h!=null?u(h):p(new Error("canvas.toBlob returned null"))}),"image/jpeg",d)}))})(s,i)).arrayBuffer()}async function dxi(e,n){const i=e instanceof File?e:new File([e],n,{type:e.type});if(e.type===dqe){const s=await(async function(l,c){const[{PDFDocument:d},u]=await Promise.all([Md((()=>import("./pdf-lib-D8o-uP9K.js").then((b=>b.i))),__vite__mapDeps([0,1,2])),Md((()=>import("./pdf-BkfulyEw.js").then((b=>b.i))),__vite__mapDeps([0,1,2])).then((b=>b.pdfjs))]),p=await l.arrayBuffer(),h=await u.getDocument({data:new Uint8Array(p)}).promise,g=h.numPages,f=await d.create();for(let b=1;b<=g;b++){const w=await h.getPage(b),C=await cxi(w,1.5,.7),v=await f.embedJpg(new Uint8Array(C)),A=v.scale(1);f.addPage([A.width,A.height]).drawImage(v,{x:0,y:0,width:A.width,height:A.height})}const x=await f.save(),y=c.toLowerCase().endsWith(".pdf")?c:`${c}.pdf`;return new File([x],y,{type:dqe,lastModified:l.lastModified})})(i,n);return s.size<i.size?{blob:s,name:s.name}:{blob:e,name:n}}const r=await(async(s,l)=>{if(Kzt.includes(s.type)===!1)return s;const c=await Uu(s,lxi),d=c.type.split("/")[1],u=`${l.replace(/\.[^.]+$/,"")||"image"}.${d}`;return new File([c],u,{lastModified:s.lastModified,type:c.type})})(i,n);return{blob:r,name:r.name}}const uxi=({fileType:e="file",fileRef:n,name:i,value:r="",multiple:s=!1,acceptableTypes:l,onFileSizeError:c,onImageChange:d})=>t.jsx("input",{type:e,ref:n,name:i,value:r,size:1e3,"data-testid":Y("input-file-element-mobile",i),onChange:async u=>{const p=u.target.files?.[0],h=p?.size;p!=null&&h!=null?(c?.(!1),d(p),u.target.value=""):(c?.(!0),u.target.value="")},style:{display:"none"},accept:`${(l??"image/jpg, image/jpeg").toString()}`,multiple:s,capture:!0}),y_=({shouldDisplay:e,width:n=30,height:i=30,styles:r,animationInLoop:s=!1})=>{const[,l]=YCe($Ot),[c]=ra("MoneyTransferSuccess");return M.useEffect((()=>{e&&l(!0)}),[e,l]),e&&c!=null?t.jsx(Ks,{style:{width:n,height:i,...r},play:!0,animationData:c,loop:s,rendererSettings:{preserveAspectRatio:"xMidYMid slice"}}):null},Hve=e=>m.createElement("svg",{viewBox:"0 0 24 24",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},m.createElement("path",{d:"M7.5055 4L1.5 9.54354L22.5 9.5435",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}),m.createElement("path",{d:"M16.4945 19.7067L22.5 14.1632H1.5",stroke:"currentColor",strokeWidth:1.5,strokeLinecap:"round",strokeLinejoin:"round"}));USt.workerSrc=`//cdnjs.cloudflare.com/ajax/libs/pdf.js/${HSt}/pdf.worker.mjs`;const{common:uqe}=ae.getLocalizedStrings(),pqe=(e,n,i)=>e.variant==="deleted"?"deleted":e.variant==="excluded"?"excluded":n!=null&&e.statementTransactionId===n||i!=null&&e.statementTransactionId===i?"hovered":e.variant??"default",hqe=(e,n,i)=>{const r=Array.from(e.querySelectorAll("[data-statement-transaction-id]"));for(const s of r){if(s.dataset.citationVariant==="excluded")continue;const l=s.getBoundingClientRect();if(n>=l.left&&n<=l.right&&i>=l.top&&i<=l.bottom)return s.dataset.statementTransactionId}},mqe=(e,n)=>n==null?void 0:e.find((i=>i.statementTransactionId===n))?.page,pxi=(e,n,i="smooth")=>{const r=n??(d=>{let u=d.parentElement;for(;u!=null;){const{overflowY:p}=window.getComputedStyle(u);if((p==="auto"||p==="scroll")&&u.scrollHeight>u.clientHeight)return u;u=u.parentElement}return null})(e);if(r==null)return void e.scrollIntoView({behavior:i,block:"center"});const s=e.getBoundingClientRect(),l=r.getBoundingClientRect(),c=r.scrollTop+(s.top-l.top)-(r.clientHeight-s.height)/2;r.scrollTo({top:Math.max(0,c),behavior:i})};function gqe(e,n,i){const{minX:r,maxX:s,minY:l,maxY:c}=(function(d){const u=d.map((h=>h.x)),p=d.map((h=>h.y));return{maxX:Math.max(...u),maxY:Math.max(...p),minX:Math.min(...u),minY:Math.min(...p)}})(e);return{height:(c-l)/i*100,left:r/n*100,top:l/i*100,width:(s-r)/n*100}}function Hz(e){const[n,i]=m.useState(0),[r,s]=m.useState(void 0),[l,c]=m.useState(null),[d,u]=m.useState(void 0),p=ge(),h=m.useRef(null),g=m.useRef(null),f=m.useRef(void 0),x=e.highlightedCitations!=null&&e.highlightedCitations.length>0;m.useLayoutEffect((()=>{if(e.isFullScreen)return void s(void 0);const $=g.current;if($==null)return;const j=()=>{const E=Math.floor($.clientWidth);E>0&&s((D=>D===E?D:E))};j();const I=new ResizeObserver(j);return I.observe($),()=>{I.disconnect()}}),[e.isFullScreen,e.fileUrl]);const y=$=>{f.current!==$&&(f.current=$,u($),e.onCitationHover?.($))},b=$=>{x===!0&&y(hqe($.currentTarget,$.clientX,$.clientY))},w=()=>{x===!0&&y(void 0)},C=$=>{e.onCitationClick!=null&&e.onCitationClick(hqe($.currentTarget,$.clientX,$.clientY))},v=m.useCallback((()=>{if(e.highlightedCitations==null||e.highlightedCitations.length===0)return;const $=mqe(e.highlightedCitations,e.selectedStatementTransactionId);if($==null)return;const j=g.current?.querySelector(`[data-testid="pdf-page-${$}"]`);if(j!=null){const I=g.current,E=I!=null&&I.scrollHeight>I.clientHeight?I:null,D=(e.selectedStatementTransactionId!=null?j.querySelector(`[data-statement-transaction-id="${CSS.escape(String(e.selectedStatementTransactionId))}"]`):null)??j;if(((B,F)=>{const R=B.getBoundingClientRect(),_=F!=null?F.getBoundingClientRect():{top:0,left:0,bottom:window.innerHeight,right:window.innerWidth};return R.bottom>_.top&&R.top<_.bottom&&R.right>_.left&&R.left<_.right})(D,E))return;pxi(D,E)}}),[e.highlightedCitations,e.selectedStatementTransactionId]);m.useEffect((()=>{if(e.highlightedCitations==null||e.highlightedCitations.length===0||e.selectedStatementTransactionId==null)return;v();const $=requestAnimationFrame(v),j=window.setTimeout(v,150);return()=>{cancelAnimationFrame($),window.clearTimeout(j)}}),[e.highlightedCitations,e.selectedStatementTransactionId,n,v]),m.useEffect((()=>{c(null),i(0)}),[e.fileUrl]);const A=$=>{if(!e.highlightedCitations)return null;const j=e.highlightedCitations.filter((I=>I.page===$));return j.length===0?null:t.jsx(fqe,{children:j.flatMap(((I,E)=>{const D=gqe(I.polygon,I.pageWidth,I.pageHeight),B=pqe(I,e.selectedStatementTransactionId,d);return t.jsx(xqe,{"data-citation-variant":B,"data-statement-transaction-id":I.statementTransactionId,$variant:B,style:{height:`${D.height}%`,left:`${D.left}%`,top:`${D.top}%`,width:`${D.width}%`}},`${E}`)}))})},S=()=>{e.setShowFullScreenView(!0)};return t.jsxs(t.Fragment,{children:[t.jsx(ih,{fileRef:h,name:"invoice",onFileChange:$=>{if($.target.files!=null){const j=$.target.files[0];e.onUploadAttachment?.([j],[j.name])}},multiple:e.allowMultiFiles,sizeLimit:oS,onFileSizeError:$=>e.openSizeLimitPopup?.($)}),t.jsx(hxi,{maxHeight:e.maxHeight??!1,$allowTextSelection:x,"data-statement-pdf-surface":"",onClick:()=>{x||S()},onDoubleClick:()=>{x&&S()},windowSize:p,"data-testid":Y("attachment-container",e.pdfTitle),children:t.jsxs(mxi,{isFullScreen:e.isFullScreen,ref:g,children:[e.showTitlebar===!0?t.jsxs(gxi,{children:[t.jsx(fxi,{children:e.pdfTitle}),e.showTitlebarIcon===!0?t.jsxs(xxi,{className:"actionIcons",children:[e.showReplaceIcon!==!1?t.jsx(qe,{enterDelay:600,display:"flex",title:uqe.texts.replace,placement:"top-end",children:t.jsx(yxi,{"data-testid":Y("replace-attachment",e.pdfTitle),onClick:$=>{$.stopPropagation(),h.current?.click()}})}):null,p==="small"?t.jsx(wxi,{"data-testid":e.deleteAttachmentDataTestId!=null?`${e.deleteAttachmentDataTestId}-mobile`:Y("delete-attachment-mobile",e.pdfTitle),onClick:$=>{$.stopPropagation(),e.onDeleteClick?.()}}):t.jsx(qe,{enterDelay:600,display:"flex",title:uqe.delete,placement:"top",children:t.jsx(bxi,{onClick:$=>{$.stopPropagation(),e.onDeleteClick?.()},"data-testid":e.deleteAttachmentDataTestId??Y("delete-attachment",e.pdfTitle)})})]}):null]}):null,(()=>{const $=e.fileUrl.toLowerCase();return[".jpg",".jpeg",".png",".gif",".webp",".bmp"].some((j=>$.includes(j)))})()?t.jsx(kxi,{children:t.jsxs(jxi,{onMouseMove:b,onMouseLeave:w,onClick:C,children:[t.jsx($xi,{src:e.fileUrl,alt:e.pdfTitle,onLoad:$=>{const j=$.currentTarget;c({width:j.naturalWidth,height:j.naturalHeight})}},e.fileUrl),(()=>{if(!e.highlightedCitations||l==null)return null;const $=e.highlightedCitations.filter((j=>j.page===1));return $.length===0?null:t.jsx(fqe,{children:$.flatMap(((j,I)=>{const E=gqe(j.polygon,j.pageWidth,j.pageHeight),D=pqe(j,e.selectedStatementTransactionId,d);return t.jsx(xqe,{"data-citation-variant":D,"data-statement-transaction-id":j.statementTransactionId,$variant:D,style:{height:`${E.height}%`,left:`${E.left}%`,top:`${E.top}%`,width:`${E.width}%`}},`${I}`)}))})})()]})}):t.jsxs(Q5e,{file:e.fileUrl,onLoadSuccess:({numPages:$})=>i($),onLoadError:()=>i(0),loading:t.jsx(Axi,{children:t.jsx(Gn,{size:"ExtraLarge",start:!0})}),className:"pdfDoc",children:[Array.from(new Array(n),(($,j)=>t.jsx(si,{onClickAway:()=>e.onCrossClick?.(),children:t.jsxs(Cxi,{windowSize:p,isFullScreen:e.isFullScreen,children:[t.jsxs(Sxi,{"data-testid":`pdf-page-${j+1}`,isFullScreen:e.isFullScreen,onMouseMove:b,onMouseLeave:w,onClick:C,children:[t.jsx(Y5e,{pageNumber:j+1,className:"reactPdfPage",...e.isFullScreen?{scale:1.5}:r!=null?{width:r}:{scale:1},error:t.jsx("div",{}),onRenderSuccess:()=>{(e.highlightedCitations!=null?mqe(e.highlightedCitations,e.selectedStatementTransactionId):void 0)===j+1&&v()}},`page_${j+1}`),A(j+1)]}),n!=j+1?t.jsx(vxi,{}):null]})},`page_${j+1}`))),t.jsx("div",{})]},e.fileUrl)]})})]})}const hxi=a.div`
|
|
10592
10592
|
max-height: ${e=>e.maxHeight===!0?"650px":"auto"};
|
|
10593
10593
|
display: flex;
|
|
10594
10594
|
flex-direction: column;
|
|
@@ -23913,7 +23913,7 @@ to {
|
|
|
23913
23913
|
${({isMenuVisible:e})=>e===!1?Te`
|
|
23914
23914
|
display: none;
|
|
23915
23915
|
`:null};
|
|
23916
|
-
`,NAe=e=>m.createElement("svg",{width:208,height:208,viewBox:"0 0 208 208",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},m.createElement("g",{filter:"url(#filter0_f_251_38441)"},m.createElement("circle",{cx:104,cy:104,r:44,fill:"url(#paint0_linear_251_38441)"}),m.createElement("circle",{cx:104,cy:104,r:50,stroke:"url(#paint1_linear_251_38441)",strokeWidth:12})),m.createElement("g",{filter:"url(#filter1_d_251_38441)"},m.createElement("circle",{cx:104,cy:104,r:41.1429,fill:"#FAFAFA"}),m.createElement("circle",{cx:104,cy:104,r:43.1429,stroke:"url(#paint2_linear_251_38441)",strokeWidth:4})),m.createElement("g",{clipPath:"url(#clip0_251_38441)"},m.createElement("path",{d:"M120.16 102.411L96.2853 90.4684C96.0134 90.3343 95.7118 90.2718 95.409 90.2867C95.1062 90.3016 94.8122 90.3935 94.5548 90.5536C94.2974 90.7138 94.0851 90.9369 93.938 91.202C93.7908 91.467 93.7137 91.7652 93.7139 92.0684V115.931C93.7137 116.234 93.7908 116.533 93.938 116.798C94.0851 117.063 94.2974 117.286 94.5548 117.446C94.8122 117.606 95.1062 117.698 95.409 117.713C95.7118 117.728 96.0134 117.665 96.2853 117.531L120.16 105.588C120.456 105.442 120.706 105.216 120.88 104.935C121.055 104.654 121.147 104.33 121.147 104C121.147 103.669 121.055 103.345 120.88 103.065C120.706 102.784 120.456 102.558 120.16 102.411Z",fill:"black"})),m.createElement("defs",null,m.createElement("filter",{id:"filter0_f_251_38441",x:0,y:0,width:208,height:208,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),m.createElement("feGaussianBlur",{stdDeviation:24,result:"effect1_foregroundBlur_251_38441"})),m.createElement("filter",{id:"filter1_d_251_38441",x:54.8569,y:58.8571,width:98.2856,height:98.2857,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),m.createElement("feOffset",{dy:4}),m.createElement("feGaussianBlur",{stdDeviation:2}),m.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),m.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_251_38441"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_251_38441",result:"shape"})),m.createElement("linearGradient",{id:"paint0_linear_251_38441",x1:119.671,y1:119.671,x2:87.9755,y2:87.9758,gradientUnits:"userSpaceOnUse"},m.createElement("stop",{stopColor:"#7135FF"}),m.createElement("stop",{offset:.27204,stopColor:"#A050E4"}),m.createElement("stop",{offset:.364594,stopColor:"#B85ED7"}),m.createElement("stop",{offset:.546546,stopColor:"#CF6CC9"}),m.createElement("stop",{offset:.732127,stopColor:"#EE609C"}),m.createElement("stop",{offset:.85586,stopColor:"#EB61A0"}),m.createElement("stop",{offset:1,stopColor:"#EE609C"})),m.createElement("linearGradient",{id:"paint1_linear_251_38441",x1:119.671,y1:119.671,x2:87.9755,y2:87.9758,gradientUnits:"userSpaceOnUse"},m.createElement("stop",{stopColor:"#7135FF"}),m.createElement("stop",{offset:.27204,stopColor:"#A050E4"}),m.createElement("stop",{offset:.364594,stopColor:"#B85ED7"}),m.createElement("stop",{offset:.546546,stopColor:"#CF6CC9"}),m.createElement("stop",{offset:.732127,stopColor:"#EE609C"}),m.createElement("stop",{offset:.85586,stopColor:"#EB61A0"}),m.createElement("stop",{offset:1,stopColor:"#EE609C"})),m.createElement("linearGradient",{id:"paint2_linear_251_38441",x1:118.653,y1:118.653,x2:89.0159,y2:89.0164,gradientUnits:"userSpaceOnUse"},m.createElement("stop",{stopColor:"#7135FF"}),m.createElement("stop",{offset:.27204,stopColor:"#A050E4"}),m.createElement("stop",{offset:.364594,stopColor:"#B85ED7"}),m.createElement("stop",{offset:.546546,stopColor:"#CF6CC9"}),m.createElement("stop",{offset:.732127,stopColor:"#EE609C"}),m.createElement("stop",{offset:.85586,stopColor:"#EB61A0"}),m.createElement("stop",{offset:1,stopColor:"#EE609C"})),m.createElement("clipPath",{id:"clip0_251_38441"},m.createElement("rect",{width:27.4286,height:27.4286,fill:"white",transform:"translate(93.7139 90.2849)"})))),_et=m.lazy((()=>Md((()=>import("./index-
|
|
23916
|
+
`,NAe=e=>m.createElement("svg",{width:208,height:208,viewBox:"0 0 208 208",fill:"none",xmlns:"http://www.w3.org/2000/svg",...e},m.createElement("g",{filter:"url(#filter0_f_251_38441)"},m.createElement("circle",{cx:104,cy:104,r:44,fill:"url(#paint0_linear_251_38441)"}),m.createElement("circle",{cx:104,cy:104,r:50,stroke:"url(#paint1_linear_251_38441)",strokeWidth:12})),m.createElement("g",{filter:"url(#filter1_d_251_38441)"},m.createElement("circle",{cx:104,cy:104,r:41.1429,fill:"#FAFAFA"}),m.createElement("circle",{cx:104,cy:104,r:43.1429,stroke:"url(#paint2_linear_251_38441)",strokeWidth:4})),m.createElement("g",{clipPath:"url(#clip0_251_38441)"},m.createElement("path",{d:"M120.16 102.411L96.2853 90.4684C96.0134 90.3343 95.7118 90.2718 95.409 90.2867C95.1062 90.3016 94.8122 90.3935 94.5548 90.5536C94.2974 90.7138 94.0851 90.9369 93.938 91.202C93.7908 91.467 93.7137 91.7652 93.7139 92.0684V115.931C93.7137 116.234 93.7908 116.533 93.938 116.798C94.0851 117.063 94.2974 117.286 94.5548 117.446C94.8122 117.606 95.1062 117.698 95.409 117.713C95.7118 117.728 96.0134 117.665 96.2853 117.531L120.16 105.588C120.456 105.442 120.706 105.216 120.88 104.935C121.055 104.654 121.147 104.33 121.147 104C121.147 103.669 121.055 103.345 120.88 103.065C120.706 102.784 120.456 102.558 120.16 102.411Z",fill:"black"})),m.createElement("defs",null,m.createElement("filter",{id:"filter0_f_251_38441",x:0,y:0,width:208,height:208,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"BackgroundImageFix",result:"shape"}),m.createElement("feGaussianBlur",{stdDeviation:24,result:"effect1_foregroundBlur_251_38441"})),m.createElement("filter",{id:"filter1_d_251_38441",x:54.8569,y:58.8571,width:98.2856,height:98.2857,filterUnits:"userSpaceOnUse",colorInterpolationFilters:"sRGB"},m.createElement("feFlood",{floodOpacity:0,result:"BackgroundImageFix"}),m.createElement("feColorMatrix",{in:"SourceAlpha",type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 127 0",result:"hardAlpha"}),m.createElement("feOffset",{dy:4}),m.createElement("feGaussianBlur",{stdDeviation:2}),m.createElement("feComposite",{in2:"hardAlpha",operator:"out"}),m.createElement("feColorMatrix",{type:"matrix",values:"0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0.25 0"}),m.createElement("feBlend",{mode:"normal",in2:"BackgroundImageFix",result:"effect1_dropShadow_251_38441"}),m.createElement("feBlend",{mode:"normal",in:"SourceGraphic",in2:"effect1_dropShadow_251_38441",result:"shape"})),m.createElement("linearGradient",{id:"paint0_linear_251_38441",x1:119.671,y1:119.671,x2:87.9755,y2:87.9758,gradientUnits:"userSpaceOnUse"},m.createElement("stop",{stopColor:"#7135FF"}),m.createElement("stop",{offset:.27204,stopColor:"#A050E4"}),m.createElement("stop",{offset:.364594,stopColor:"#B85ED7"}),m.createElement("stop",{offset:.546546,stopColor:"#CF6CC9"}),m.createElement("stop",{offset:.732127,stopColor:"#EE609C"}),m.createElement("stop",{offset:.85586,stopColor:"#EB61A0"}),m.createElement("stop",{offset:1,stopColor:"#EE609C"})),m.createElement("linearGradient",{id:"paint1_linear_251_38441",x1:119.671,y1:119.671,x2:87.9755,y2:87.9758,gradientUnits:"userSpaceOnUse"},m.createElement("stop",{stopColor:"#7135FF"}),m.createElement("stop",{offset:.27204,stopColor:"#A050E4"}),m.createElement("stop",{offset:.364594,stopColor:"#B85ED7"}),m.createElement("stop",{offset:.546546,stopColor:"#CF6CC9"}),m.createElement("stop",{offset:.732127,stopColor:"#EE609C"}),m.createElement("stop",{offset:.85586,stopColor:"#EB61A0"}),m.createElement("stop",{offset:1,stopColor:"#EE609C"})),m.createElement("linearGradient",{id:"paint2_linear_251_38441",x1:118.653,y1:118.653,x2:89.0159,y2:89.0164,gradientUnits:"userSpaceOnUse"},m.createElement("stop",{stopColor:"#7135FF"}),m.createElement("stop",{offset:.27204,stopColor:"#A050E4"}),m.createElement("stop",{offset:.364594,stopColor:"#B85ED7"}),m.createElement("stop",{offset:.546546,stopColor:"#CF6CC9"}),m.createElement("stop",{offset:.732127,stopColor:"#EE609C"}),m.createElement("stop",{offset:.85586,stopColor:"#EB61A0"}),m.createElement("stop",{offset:1,stopColor:"#EE609C"})),m.createElement("clipPath",{id:"clip0_251_38441"},m.createElement("rect",{width:27.4286,height:27.4286,fill:"white",transform:"translate(93.7139 90.2849)"})))),_et=m.lazy((()=>Md((()=>import("./index-BUsi93tT.js")),__vite__mapDeps([3,0,1,2]))));function _Ae({src:e,autoPlay:n=!0,config:i,controls:r=!0,height:s="100%",isModalOpen:l,loop:c=!1,muted:d=!1,showPlayButton:u=!1,style:p,thumbnail:h,width:g="100%",onEnded:f,onModalClose:x,onPlay:y}){const b=ge(),[w,C]=m.useState(!1);m.useEffect((()=>{l===!0&&n?C(!0):l===!1&&C(!1)}),[l,n]);const v={};i?.youtube&&(v.youtube=i.youtube);const A=()=>{C(!1),f?.(),l!=null&&x?.()},S=()=>{C(!0),y?.()};return l!=null?l?ka.createPortal(t.jsx(zZi,{windowSize:b,role:"presentation",children:t.jsx(si,{onClickAway:()=>{C(!1),x?.()},children:t.jsx(NZi,{windowSize:b,"data-testid":"video-player-modal",children:t.jsxs(_Zi,{children:[u&&!w&&t.jsxs(t.Fragment,{children:[h!=null&&h!==""&&t.jsx(RZi,{src:h,alt:"Video thumbnail"}),t.jsx(OZi,{onClick:()=>{C(!0),y?.()},children:t.jsx(FZi,{windowSize:b})})]}),(!u||w)&&t.jsx(m.Suspense,{fallback:t.jsx("div",{style:{width:"100%",height:"100%"}}),children:t.jsx(_et,{src:e,playing:w,controls:r,muted:d,loop:c,width:"100%",height:"100%",onEnded:A,onPlay:S,config:v})})]})})})}),document.body):null:t.jsx(m.Suspense,{fallback:t.jsx("div",{style:{width:g,height:s,...p}}),children:t.jsx(_et,{src:e,playing:w,controls:r,muted:d,loop:c,width:g,height:s,style:p,light:!(!u||w)&&(h??!0),onEnded:A,onPlay:S,config:v})})}const MZi=ii`
|
|
23917
23917
|
0% {
|
|
23918
23918
|
transform: rotate(0deg);
|
|
23919
23919
|
}
|
|
@@ -76599,7 +76599,7 @@ ${Qd.beneficiaryAddress} ${X}`,d(pe),D(!0)})(i),"data-testid":Y("title-text-copy
|
|
|
76599
76599
|
height: ${o.sp3};
|
|
76600
76600
|
flex-shrink: 0;
|
|
76601
76601
|
}
|
|
76602
|
-
`,{dateFormat:{visual:{defaultInput:OLa}},common:{
|
|
76602
|
+
`,{dateFormat:{visual:{defaultInput:OLa}},common:{cancel:FLa,strings:{colon:RLa,emDash:tO,hyphen:Qfe,percentage:zLa,plus:NLa},placeholder:{datePlaceholder:_La},headers:{notes:Yfe},texts:{saveChanges:VLa,country:HLa,sendReminder:ULa,issueCreditNote:WLa,regenerate:QLa,voidInvoice:YLa,customer:GLa,total:Gfe,invoiceDate:qLa,dueDate:Tyt,amountDue:Lyt,subscription:KLa,description2:ZLa,transactionType:Byt,qty:JLa,unitAmount:XLa,amount:eBa,discount:tBa,tax:Pyt,transaction:Myt,date:Oyt,status:qfe,invoiceSummary:nBa,billingAddress:iBa,lineItems:oBa,payments2:rBa,dunning:aBa,period:sBa}},invoicingCommon:Gu,invoicingInvoiceDetail:Il}=ae.getLocalizedStrings(),lBa=new Set(["not_paid","partially_paid","payment_due","pending","posted"]),_nn={labelWidth:new z(140,190,190)},kZ={boxSizing:"border-box",width:"100%"},LF=a.div`
|
|
76603
76603
|
display: flex;
|
|
76604
76604
|
flex-direction: column;
|
|
76605
76605
|
background-color: ${e=>e.theme.colors.grey5};
|
|
@@ -76645,7 +76645,7 @@ ${Qd.beneficiaryAddress} ${X}`,d(pe),D(!0)})(i),"data-testid":Y("title-text-copy
|
|
|
76645
76645
|
height: ${o.sp4};
|
|
76646
76646
|
display: flex;
|
|
76647
76647
|
`;function fBa({attachment:e}){const[n,i]=m.useState(!1),r=e.fileId?.length===0;return t.jsxs(mBa,{"data-testid":Y("invoice-pdf-tag",e.fileName),isDisabled:r,onClick:()=>{r||i(!0)},children:[n&&e.fileDownloadUrl!=null?t.jsx(Nk,{file:e,setShowFullScreenView:i,title:e.fileName,onCrossClick:()=>i(!1)}):null,t.jsx(gBa,{children:t.jsx(MS,{contentType:e.contentType})}),t.jsx(dBa,{children:t.jsx(Se,{children:e.fileName})})]})}function xBa(e){switch(e){case"paid":return"success";case"partially_paid":case"pending":case"posted":return"info";case"payment_due":case"not_paid":return"attention";case"voided":return"warning";default:return"default"}}function uu({fieldCode:e,label:n,text:i,valueTone:r}){const s=Be(),l=ge(),c=(()=>{switch(r){case"alert":return s.colors.alert;case"muted":return s.colors.hero;case"primary":return s.colors.brandColorJadeDark;case"success":return s.colors.success;default:return}})();return t.jsx(ar,{label:{fieldCode:e,label:`${n}${RLa}`,width:_nn.labelWidth.value(l)},text:i,style:kZ,textStyles:c!=null?{color:c}:void 0,showAdditionalInfoLabel:!1})}function Fyt({address:e,title:n}){const i=e.street?.[0],r=e.street?.[1];return t.jsx(so,{title:n,plain:!0,children:t.jsxs(LF,{children:[i!=null&&i!==""?t.jsx(uu,{label:Gu.line1,text:i}):null,r!=null&&r!==""?t.jsx(uu,{label:Gu.line2,text:r}):null,e.city!=null&&e.city!==""?t.jsx(uu,{label:Gu.city,text:e.city}):null,e.state!=null&&e.state!==""?t.jsx(uu,{label:Gu.state,text:e.state}):null,e.postalCode!=null&&e.postalCode!==""?t.jsx(uu,{label:Il.zip,text:e.postalCode}):null,e.country!=null&&e.country!==""?t.jsx(uu,{label:HLa,text:e.country}):null]})})}function vjs(e){return Qi({componentName:"invoicing.invoice.detail",enabled:!e.isLoading}),e.isLoading?t.jsx(Lm,{headerMeta:[],isLoading:!0,notFound:!1,notFoundMessage:Il.invoiceNotFound,title:e.invoiceId,onBack:e.onBack}):t.jsx(yBa,{...e})}function yBa({fieldHelp:e,billingAddress:n,invoice:i,invoiceId:r,shippingAddress:s,isLoading:l,isSaving:c,isVoiding:d,onBack:u,onCustomerClick:p,onIssueCreditNote:h,onRecordPayment:g,onRegenerate:f,onSaveEdit:x,onSendReminder:y,onSubscriptionClick:b,onVoid:w}){const C=ge(),v=_nn.labelWidth.value(C),A=i?.currencyCode,S=i?.status??"",$=!(S==="voided"||S==="paid"),j=$&&(i?.amountDue?.amount??i?.total?.amount??0)>0,I=i!=null&&lBa.has(S),[E,D]=m.useState(!1),B=m.useMemo((()=>({due_date:i?.dueDate?.toDate(),notes:(i?.notes??[]).map((ne=>ne.note)).filter((ne=>ne!=null&&ne!=="")).join(`
|
|
76648
|
-
`),po_number:i?.poNumber??""})),[i]),F=Sn({defaultValues:B}),{formState:{dirtyFields:R},reset:_}=F,N=Au(R),T=F.handleSubmit((ne=>{x?.({due_date:a1(ne.due_date),notes:ne.notes,po_number:ne.po_number})})),P=m.useMemo((()=>{if(i==null)return[];const ne=[];return j&&g!=null&&ne.push({key:"record-payment",label:Gu.recordPayment,onClick:g}),$&&y!=null&&ne.push({key:"send-reminder",label:ULa,onClick:y}),$&&h!=null&&ne.push({key:"issue-credit-note",label:WLa,onClick:h}),$&&f!=null&&ne.push({key:"regenerate",label:QLa,onClick:f}),$&&w!=null&&ne.push({danger:!0,disabled:!I,key:"void",label:YLa,onClick:()=>D(!0),separatorBefore:ne.length>0}),ne}),[I,i,$,j,h,g,f,y,w]),L=i==null||P.length===0?void 0:t.jsx(a4,{borderless:!0,items:P}),V=N&&x!=null&&i!=null,H=V?{isLoading:c===!0,label:
|
|
76648
|
+
`),po_number:i?.poNumber??""})),[i]),F=Sn({defaultValues:B}),{formState:{dirtyFields:R},reset:_}=F,N=Au(R),T=F.handleSubmit((ne=>{x?.({due_date:a1(ne.due_date),notes:ne.notes,po_number:ne.po_number})})),P=m.useMemo((()=>{if(i==null)return[];const ne=[];return j&&g!=null&&ne.push({key:"record-payment",label:Gu.recordPayment,onClick:g}),$&&y!=null&&ne.push({key:"send-reminder",label:ULa,onClick:y}),$&&h!=null&&ne.push({key:"issue-credit-note",label:WLa,onClick:h}),$&&f!=null&&ne.push({key:"regenerate",label:QLa,onClick:f}),$&&w!=null&&ne.push({danger:!0,disabled:!I,key:"void",label:YLa,onClick:()=>D(!0),separatorBefore:ne.length>0}),ne}),[I,i,$,j,h,g,f,y,w]),L=i==null||P.length===0?void 0:t.jsx(a4,{borderless:!0,items:P}),V=N&&x!=null&&i!=null,H=V?{isLoading:c===!0,label:VLa,onClick:T}:void 0,Q=V?{label:FLa,onClick:()=>_(B)}:void 0,U=m.useMemo((()=>{if(i==null)return[];const ne=[{label:GLa,value:p!=null?t.jsx(P8,{dataTestId:"invoicing-invoice-customer-link",label:i.customerName??i.customerID,onOpen:()=>p(i.customerID)}):i.customerName??i.customerID},{label:Gfe,value:Kn(i.total,A)},{label:qLa,value:eo(i.date)},{label:Tyt,value:eo(i.dueDate)}];return i.status==="paid"&&i.paidAt!=null&&ne.push({label:Il.paidOn,value:eo(i.paidAt)}),i.status!=="paid"&&ne.push({label:Lyt,value:Kn(i.amountDue,A)}),i.subscriptionID!=null&&ne.push({label:KLa,value:b!=null?t.jsx(P8,{ariaLabel:Gu.openSubscriptionInNewTab,dataTestId:"invoicing-invoice-subscription-link",label:i.subscriptionName??i.subscriptionID,onOpen:()=>{i.subscriptionID!=null&&b(i.subscriptionID)}}):i.subscriptionName??i.subscriptionID}),i.netTermDays!=null&&ne.push({label:Gu.netTerms,value:i.netTermDays===0?Gu.dueOnReceipt:`${Gu.net}${i.netTermDays}`}),ne}),[A,i,p,b]),W=m.useMemo((()=>[{key:"description",label:ZLa,render:ne=>t.jsxs(t.Fragment,{children:[t.jsx(Se,{children:ne.description}),ne.entityDescription!=null&&ne.entityDescription!==ne.description?t.jsx(He,{children:ne.entityDescription}):null]})},{key:"entity_type",label:Byt,render:ne=>Ii(ne.entityType)},{align:"end",key:"quantity",label:JLa,render:ne=>Zr(ne.quantity)},{align:"end",key:"unit_amount",label:XLa,render:ne=>Kn(ne.unitAmount,A)},{align:"end",key:"amount",label:eBa,render:ne=>Kn(ne.amount,A)},{align:"end",key:"discount",label:tBa,render:ne=>(ne.discountAmount?.amount??0)>0?`${Qfe}${Kn(ne.discountAmount,A)}`:tO},{align:"end",key:"tax",label:Pyt,render:ne=>ne.taxAmount!=null?Kn(ne.taxAmount,A):tO},{align:"end",key:"tax_rate",label:Il.taxRate,render:ne=>ne.taxRate!=null?`${ne.taxRate.toFixed(2)}${zLa}`:tO},{key:"period",label:sBa,render:ne=>ne.dateFrom!=null||ne.dateTo!=null?`${eo(ne.dateFrom)}${Gu.arrowSeparator}${eo(ne.dateTo)}`:tO}]),[A]),q=m.useMemo((()=>[{key:"txn_id",label:Myt,render:ne=>ne.txnID},{key:"txn_date",label:Oyt,render:ne=>eo(ne.txnDate)},{key:"txn_status",label:qfe,render:ne=>Ii(ne.txnStatus)},{align:"end",key:"applied_amount",label:Il.amountApplied,render:ne=>Kn(ne.appliedAmount,A)}]),[A]),K=m.useMemo((()=>[{key:"cn_id",label:Gu.creditNote,render:ne=>ne.cnID},{key:"cn_status",label:qfe,render:ne=>Ii(ne.cnStatus)},{align:"end",key:"cn_total",label:Gfe,render:ne=>Kn(ne.cnTotal,A)}]),[A]),X=m.useMemo((()=>[{key:"attempt",label:Il.attempt,render:ne=>String(ne.attempt)},{key:"dunning_type",label:Byt,render:ne=>Ii(ne.dunningType)},{key:"transaction_id",label:Myt,render:ne=>ne.transactionID??tO},{key:"created_at",label:Oyt,render:ne=>eo(ne.createdAt)}]),[]),te=i!=null?{amount:Math.max(0,(i.amountPaid?.amount??0)-(i.total.amount-(i.creditsApplied?.amount??0))),currencyCode:i.total.currencyCode,currencySymbol:i.total.currencySymbol}:void 0,oe=m.useMemo((()=>(function(ne){const ie=ne?.pdfFileId,de=ne?.pdfUrl;if(ie==null||ie===""||de==null||de===""||ne==null)return;const pe=pn(new Date().toISOString()),ue=`${gS(ne)}.pdf`;return HZ({checksum:"",content_type:"application/pdf",create_time:pe.toISOString(),create_userid:"",document_side:"front",document_type:"others",extension:".pdf",file_id:String(ie),file_location:"",file_name:ue,file_size:0,file_size_unit:"bytes",image_file_ids:[],image_files:[],purpose_id:"others",signed_url:de})})(i)),[i]),J=oe!=null?HAt(oe):void 0;return t.jsxs(w1,{fieldHelp:e,children:[t.jsx(Lm,{actions:L,cancelAction:Q,isLoading:l,notFound:i==null,notFoundMessage:Il.invoiceNotFound,onBack:u,primaryAction:H,statusLabel:i!=null?Ii(i.status):void 0,statusType:xBa(i?.status),title:i!=null?gS(i):r,children:t.jsxs(En,{...F,children:[U.length>0?t.jsx(so,{title:nBa,plain:!0,children:t.jsx(LF,{children:U.map((ne=>t.jsx(uu,{label:ne.label,text:ne.value},ne.label)))})}):null,t.jsx(so,{title:Il.invoiceDocuments,children:J!=null?t.jsxs(pBa,{children:[t.jsx(fBa,{attachment:J}),t.jsx(uBa,{children:`${Il.generatedPrefix}${eo(i?.generatedAt??i?.date)}`})]}):t.jsx(cBa,{children:t.jsx(hBa,{children:Il.pdfUnavailable})})}),t.jsx(so,{title:Il.amountBreakdown,plain:!0,children:t.jsxs(LF,{children:[(i?.discounts?.length??0)>0?t.jsxs(t.Fragment,{children:[t.jsx(uu,{label:Il.subTotalBeforeCredits,text:Kn(i?.grossSubTotal??i?.subTotal,A)}),i?.discounts?.map((ne=>t.jsx(uu,{label:ne.description,text:`${Qfe}${Kn(ne.amount,A)}`,valueTone:"success"},`${ne.entityType}-${ne.entityID}-${ne.description}`)))]}):null,t.jsx(uu,{fieldCode:"sub_total",label:Gu.subTotal,text:Kn(i?.subTotal,A)}),t.jsx(uu,{fieldCode:"tax_amount",label:Pyt,text:Kn(i?.tax,A)}),t.jsx(uu,{fieldCode:"total",label:Gfe,text:Kn(i?.total,A)}),t.jsx(uu,{fieldCode:"credits_applied",label:Il.creditsApplied,text:(i?.creditsApplied?.amount??0)>0?`${Qfe}${Kn(i?.creditsApplied,A)}`:Kn(i?.creditsApplied,A),valueTone:(i?.creditsApplied?.amount??0)>0?"success":"muted"}),t.jsx(uu,{fieldCode:"amount_adjusted",label:Il.amountAdjusted,text:Kn(i?.amountAdjusted,A),valueTone:"muted"}),t.jsx(uu,{fieldCode:"amount_paid",label:Il.amountPaid,text:Kn(i?.amountPaid,A),valueTone:(i?.amountPaid?.amount??0)>0?"success":"muted"}),(te?.amount??0)>0?t.jsx(uu,{label:Il.excessPayment,text:`${NLa}${Kn(te,A)}`,valueTone:"alert"}):null,t.jsx(uu,{fieldCode:"write_off_amount",label:Il.writeOffAmount,text:Kn(i?.writeOffAmount,A),valueTone:(i?.writeOffAmount?.amount??0)>0?"alert":"muted"}),t.jsx(uu,{fieldCode:"amount_due",label:Lyt,text:Kn(i?.amountDue,A),valueTone:(i?.amountDue?.amount??0)>0?"alert":"success"})]})}),n!=null?t.jsx(Fyt,{address:n,title:iBa}):null,s!=null?t.jsx(Fyt,{address:s,title:Gu.shippingAddress}):null,t.jsx(so,{title:oBa,children:t.jsx(s1,{columns:W,emptyMessage:Gu.noLineItems,getRowKey:(ne,ie)=>ne.id??`line-${ie}`,rows:i?.lineItems??[]})}),t.jsx(so,{title:rBa,children:t.jsx(s1,{columns:q,emptyMessage:Il.noPaymentsApplied,getRowKey:(ne,ie)=>ne.txnID??`pay-${ie}`,rows:i?.linkedPayments??[]})}),i?.issuedCreditNotes!=null&&i.issuedCreditNotes.length>0?t.jsx(so,{title:Il.issuedCreditNotes,children:t.jsx(s1,{columns:K,emptyMessage:Il.noCreditNotes,getRowKey:(ne,ie)=>ne.cnID??`cn-${ie}`,rows:i.issuedCreditNotes})}):null,i?.adjustmentCreditNotes!=null&&i.adjustmentCreditNotes.length>0?t.jsx(so,{title:Il.adjustmentCreditNotes,children:i.adjustmentCreditNotes.map((ne=>t.jsx(Mn,{label:Gu.creditNote,value:ne},ne)))}):null,i?.dunningStatus!=null||i?.dunningAttempts!=null&&i.dunningAttempts.length>0?t.jsxs(so,{title:aBa,children:[i.dunningStatus!=null?t.jsx(Mn,{label:qfe,value:t.jsx(wn,{label:Ii(i.dunningStatus),type:i.dunningStatus==="stopped"?"warning":"attention"})}):null,i.nextRetryAt!=null?t.jsx(Mn,{fieldCode:"next_retry_at",label:Il.nextRetry,value:eo(i.nextRetryAt)}):null,i.dunningAttempts!=null&&i.dunningAttempts.length>0?t.jsx(s1,{columns:X,emptyMessage:Il.noDunningAttempts,getRowKey:(ne,ie)=>`attempt-${ne.attempt}-${ie}`,rows:i.dunningAttempts}):null]}):null,t.jsx(so,{title:Il.additionalDetails,plain:!0,children:t.jsxs(LF,{children:[t.jsx(hn,{label:{fieldCode:"po_number",label:Gu.poNumber,width:v},text:{type:"text",name:"po_number",placeholder:Gu.poNumber2,defaultValue:B.po_number,autoComplete:"off"},style:kZ,showAdditionalInfoLabel:!1}),t.jsx(cl,{label:{fieldCode:"due_date",label:Tyt,width:v},dateField:{name:"due_date",placeholder:_La,defaultValue:i?.dueDate,dateFormat:OLa,autoComplete:"off"},style:kZ})]})}),t.jsx(so,{title:Yfe,plain:!0,children:t.jsx(LF,{children:t.jsx(hn,{label:{fieldCode:"notes",label:Yfe,width:v},text:{name:"notes",placeholder:Yfe,defaultValue:B.notes,autoComplete:"off",type:"text",style:{boxSizing:"border-box",width:"100%"}},style:kZ})})})]})}),t.jsx(Wtn,{invoiceDate:a1(i?.date?.toDate()),invoiceNumber:i!=null?gS(i):void 0,isSubmitting:d===!0,onClose:()=>D(!1),onConfirm:ne=>{w?.(ne),D(!1)},open:E&&w!=null})]})}function Ryt(e){const n={"&":"&","'":"'",'"':""","<":"<",">":">"};return e.replace(/[&<>"']/gu,(i=>n[i]))}function Vnn(e,n){if(e==null||e.bodyToken===""||e.subjectToken==="")return;const i=Ryt(n.subject),r=Ryt(n.body.replace(/\r\n/gu,`
|
|
76649
76649
|
`).replace(/\r/gu,`
|
|
76650
76650
|
`)).replace(/\n/gu,"<br>");return e.renderedHtmlTemplate.split(e.subjectToken).join(i).split(e.bodyToken).join(r)}const{common:Kfe,invoicingCustomerDetail:rg}=ae.getLocalizedStrings();function bBa({open:e,hasPreviewFailed:n,isPreviewLoading:i,isSending:r,preview:s,onClose:l,onRetryPreview:c,onSend:d}){const[u,p]=m.useState({}),[h,g]=m.useState(!1),f={body:u.body??s?.body??"",subject:u.subject??s?.subject??""};m.useEffect((()=>{e||(p({}),g(!1))}),[e]);const x=Vnn(s,f),y=h&&f.subject.trim()==="",b=h&&f.body.trim()==="";return t.jsx(_d,{open:e,onClose:l,children:t.jsxs(wBa,{children:[t.jsxs(CBa,{children:[t.jsx(vBa,{children:rg.previewEmailHeading}),t.jsx(ABa,{children:rg.previewEmailSubtitle})]}),t.jsxs(SBa,{children:[t.jsxs(kBa,{id:"invoicing-payment-link-email-form",onSubmit:w=>{w.preventDefault(),g(!0),f.subject.trim()!==""&&f.body.trim()!==""&&d(f.subject,f.body)},children:[t.jsxs(Zfe,{children:[t.jsx(Jfe,{htmlFor:"payment-link-email-to",children:Kfe.texts.to}),t.jsx(WD,{disabled:!0,id:"payment-link-email-to",value:s?.to??""})]}),t.jsxs(Zfe,{children:[t.jsx(Jfe,{htmlFor:"payment-link-email-subject",children:Kfe.texts.subject}),t.jsx(WD,{id:"payment-link-email-subject","aria-invalid":y,"data-testid":Y("invoicing-payment-link-email-subject"),disabled:i===!0||r===!0,maxLength:998,value:f.subject,onChange:w=>p((C=>({...C,subject:w.target.value})))}),y?t.jsx(zyt,{children:rg.previewEmailSubjectRequired}):null]}),t.jsxs(Zfe,{children:[t.jsx(Jfe,{htmlFor:"payment-link-email-body",children:rg.previewEmailMessageLabel}),t.jsx(jBa,{id:"payment-link-email-body","aria-invalid":b,"data-testid":Y("invoicing-payment-link-email-body"),disabled:i===!0||r===!0,maxLength:1e4,value:f.body,onChange:w=>p((C=>({...C,body:w.target.value})))}),b?t.jsx(zyt,{children:rg.previewEmailBodyRequired}):null]})]}),t.jsxs($Ba,{children:[t.jsx(EBa,{children:rg.previewEmailHeading}),n===!0?t.jsx(r3,{role:"alert",children:rg.previewEmailFailed}):null,t.jsx(IBa,{children:x!=null?t.jsx(DBa,{"data-testid":"invoicing-payment-link-email-preview",referrerPolicy:"no-referrer",sandbox:"allow-same-origin",srcDoc:x,title:rg.previewEmailFrameTitle}):t.jsx(TBa,{children:i===!0?rg.previewEmailLoading:rg.previewEmailUnavailable})}),n===!0&&c!=null?t.jsx(ct,{dataTestId:"invoicing-payment-link-email-preview-retry",label:rg.previewEmailRetry,size:"small",variant:"outline",onClick:c}):null]})]}),t.jsxs(LBa,{children:[t.jsx(ct,{disabled:r===!0,label:Kfe.cancel,variant:"secondary",onClick:l}),t.jsx(ct,{dataTestId:"invoicing-payment-link-email-send",disabled:r===!0,form:"invoicing-payment-link-email-form",loading:r===!0,label:rg.previewEmailSend,type:"submit",variant:"primary"})]})]})})}const wBa=a.div`
|
|
76651
76651
|
box-sizing: border-box;
|
|
@@ -86064,7 +86064,7 @@ ${IO.gap.expectedStartDate(u)}.`:f.description,y=p===!0||d!=null;return t.jsx(Ei
|
|
|
86064
86064
|
color: ${O.tagWarningColorLight};
|
|
86065
86065
|
`,mps=a(wt)`
|
|
86066
86066
|
color: ${O.tagWarningColorLight};
|
|
86067
|
-
`,{expenseAutomation:{accountRecon:{statementProcessing:Zm}},common:jq}=ae.getLocalizedStrings(),gy="statement-processing-page";function gps(){const[e]=ra("AiStar");return t.jsx(e2,{$slotSize:o.sp4,children:e!=null?t.jsx(vL,{animationData:e,play:!0,loop:!0,slotSize:o.sp4}):t.jsx(Aps,{})})}function fps({isUploadComplete:e,_storyCompletedSteps:n,_storyPageCount:i,accountMapping:r,isParsedDataReady:s,statementFile:l,onCancel:c,onContinueInBackground:d,onAllStepsComplete:u,onCompletedStepsChange:p}){const h=Zm.steps.length,g=Math.max(h-1,0),f=r!=null&&r.accounts.length>0,x=r?.isConfirmLoading===!0,y=r?.isConfirmCompleted===!0,[b,w]=m.useState(n??0),[C,v]=m.useState([]),[A,S]=m.useState(!1),$=m.useCallback(((ce,re)=>{v(ce),S(re)}),[]),[j,I]=m.useState((()=>h===0?0:(n??0)/h*100)),E=l?.signedUrl?.trim()??"",[D,B]=m.useState(i),[F,R]=m.useState(i!=null),[_,N]=m.useState(null),[T,P]=m.useState(0),L=m.useRef(null),V=m.useRef(!1),H=m.useRef(null),Q=m.useRef(!1);m.useEffect((()=>{if(i!=null)return B(i),void R(!0);if(E==="")return B(void 0),void R(!1);let ce=!1;return R(!1),(async function(re){if(re==null)return;if($rn(re))return 1;if(!(function(le){return le.contentType?.toLowerCase()==="application/pdf"||le.extension?.toLowerCase()===".pdf"})(re))return;const se=re.signedUrl.trim();if(se!=="")try{const le=await fetch(se);return le.ok?(await(await Md((()=>import("./pdf-
|
|
86067
|
+
`,{expenseAutomation:{accountRecon:{statementProcessing:Zm}},common:jq}=ae.getLocalizedStrings(),gy="statement-processing-page";function gps(){const[e]=ra("AiStar");return t.jsx(e2,{$slotSize:o.sp4,children:e!=null?t.jsx(vL,{animationData:e,play:!0,loop:!0,slotSize:o.sp4}):t.jsx(Aps,{})})}function fps({isUploadComplete:e,_storyCompletedSteps:n,_storyPageCount:i,accountMapping:r,isParsedDataReady:s,statementFile:l,onCancel:c,onContinueInBackground:d,onAllStepsComplete:u,onCompletedStepsChange:p}){const h=Zm.steps.length,g=Math.max(h-1,0),f=r!=null&&r.accounts.length>0,x=r?.isConfirmLoading===!0,y=r?.isConfirmCompleted===!0,[b,w]=m.useState(n??0),[C,v]=m.useState([]),[A,S]=m.useState(!1),$=m.useCallback(((ce,re)=>{v(ce),S(re)}),[]),[j,I]=m.useState((()=>h===0?0:(n??0)/h*100)),E=l?.signedUrl?.trim()??"",[D,B]=m.useState(i),[F,R]=m.useState(i!=null),[_,N]=m.useState(null),[T,P]=m.useState(0),L=m.useRef(null),V=m.useRef(!1),H=m.useRef(null),Q=m.useRef(!1);m.useEffect((()=>{if(i!=null)return B(i),void R(!0);if(E==="")return B(void 0),void R(!1);let ce=!1;return R(!1),(async function(re){if(re==null)return;if($rn(re))return 1;if(!(function(le){return le.contentType?.toLowerCase()==="application/pdf"||le.extension?.toLowerCase()===".pdf"})(re))return;const se=re.signedUrl.trim();if(se!=="")try{const le=await fetch(se);return le.ok?(await(await Md((()=>import("./pdf-BkfulyEw.js").then((me=>me.i))),__vite__mapDeps([0,1,2])).then((me=>me.pdfjs))).getDocument({data:new Uint8Array(await le.arrayBuffer())}).promise).numPages:void 0}catch{return}})({signedUrl:E,contentType:l?.contentType,extension:l?.extension}).then((re=>{ce||(B(re),R(!0))})),()=>{ce=!0}}),[i,E,l?.contentType,l?.extension]),m.useEffect((()=>{N(null)}),[E]),m.useEffect((()=>{!F||_!=null||N((function(ce){return ce==null||ce<=0?125:ce<=2?65:ce<=4?120:ce<=8?160:ce<=12?190:200})(D))}),[F,_,D]);const U=_??125,W=s8e(h),q=1e3*U,K=Math.floor(q/Math.max(W,1));m.useEffect((()=>{if(!e)return L.current=null,V.current=!1,P(0),void N(null);if(!V.current){const se=(function(le,me,fe){const xe=s8e(fe);return me*(Math.max(0,Math.min(le,fe)-1)/xe)})(Math.max(n??0,b,1),U,h);L.current=Date.now()-1e3*se,V.current=!0}const ce=()=>{L.current!=null&&P(Math.floor((Date.now()-L.current)/1e3))};ce();const re=setInterval(ce,5e3);return()=>clearInterval(re)}),[e,U,h,n,b]);const X=_!=null?Math.max(0,_-T):0,te=_!=null?(function(ce,re,se){return re?null:ce<=0?{label:se.takingLongerThanExpected,showClock:!1}:ce<60?{label:se.timeRemainingSeconds(ce),showClock:!0}:{label:se.timeRemainingMinutes(Math.ceil(ce/60)),showClock:!0}})(X,b>=h,Zm):null;m.useEffect((()=>{p?.(b)}),[b,p]),m.useEffect((()=>{n!=null&&n>b&&w(n)}),[n,b]),m.useEffect((()=>{e&&b===0&&w(1)}),[e,b]);const oe=s===!0||f===!0&&b<g;m.useEffect((()=>{if(b===0||b>=h||s!==!0&&b>=g||f===!0&&b>=g)return;const ce=setTimeout((()=>{w((re=>re+1))}),oe?300:K);return()=>clearTimeout(ce)}),[b,s,f,g,oe,K,h]),m.useEffect((()=>{if(b!==h||u==null||f===!0)return;const ce=setTimeout(u,1e3);return()=>clearTimeout(ce)}),[b,f,u,h]);const J=f===!0&&b>=g,ne=m.useCallback((()=>{const ce=L.current??Date.now();d({completedSteps:b,startedAtMs:ce,totalDurationSeconds:U,accountMappings:J===!0?C:void 0})}),[b,J,C,d,U]);m.useEffect((()=>{if(J!==!0)return void(Q.current=!1);if(Q.current===!0)return;Q.current=!0;const ce=requestAnimationFrame((()=>{const re=H.current;re?.scrollTo({top:re.scrollHeight,behavior:"smooth"})}));return()=>cancelAnimationFrame(ce)}),[J]),m.useEffect((()=>{if(h===0)return void I(0);const ce=b/h*100;if(b===0)return void I(0);if(b>=h)return void I(100);if(s!==!0&&f!==!0&&b>=g||f===!0&&b>=g)return void I(ce);const re=(b+1)/h*100,se=oe?300:K,le=performance.now();let me=0;const fe=xe=>{const be=Math.min((xe-le)/se,1);I(ce+(re-ce)*be),be<1&&(me=requestAnimationFrame(fe))};return me=requestAnimationFrame(fe),()=>cancelAnimationFrame(me)}),[b,s,f,g,oe,K,h]);const ie=Math.min(100,Math.round(j)),de=b>=h?h-1:Math.min(b,Zm.stepSubtitles.length-1),pe=r?.accounts.length??0,ue=J===!0&&pe>0?r?.accountType==="bank"?Zm.accountMapping.headerSubtitleAccounts(pe):Zm.accountMapping.headerSubtitle(pe):Zm.stepSubtitles[de];return t.jsxs(t.Fragment,{children:[t.jsxs(xps,{ref:H,"data-testid":Y(gy,"container"),children:[t.jsxs(bps,{"data-testid":Y(gy,"header"),children:[t.jsxs(wps,{children:[t.jsxs(Cps,{children:[t.jsxs(vps,{children:[t.jsx(gps,{}),t.jsx(Sps,{children:Zm.headerTitle})]}),J===!0?t.jsxs(wwt,{"data-testid":Y(gy,"action-needed"),children:[t.jsx(Eps,{}),t.jsx(Ips,{children:Zm.actionNeeded})]}):te!=null?t.jsxs(wwt,{"data-testid":Y(gy,"time-remaining"),children:[te.showClock?t.jsx(jps,{}):null,t.jsx($ps,{children:te.label})]}):null]}),t.jsx(kps,{children:ue})]}),t.jsxs(Dps,{children:[t.jsxs(Tps,{children:[t.jsx(Lps,{children:Zm.stepProgressLabel(b,h)}),t.jsx(Bps,{children:`${ie}%`})]}),t.jsx(Pps,{children:t.jsx(Mps,{style:{width:`${j}%`}})})]})]}),t.jsx(yps,{"data-testid":Y(gy,"steps"),children:Zm.steps.map(((ce,re)=>{const se=re+1,le=re===Zm.steps.length-1,me=J===!0&&y!==!0&&le===!0,fe=f===!0&&y===!0&&le===!0&&b>=g,xe=me!==!0&&fe!==!0&&se<=b,be=fe===!0||me!==!0&&se===b+1;return t.jsxs(Ops,{"data-testid":Y(gy,`step-${se}`),children:[t.jsxs(Fps,{children:[t.jsx(zps,{$isDone:xe,$isInProgress:be,children:se}),le?null:t.jsx(Rps,{$isDone:xe})]}),t.jsx(Qps,{children:ce}),t.jsx(Yps,{children:me===!0?t.jsx(Hps,{"data-testid":Y(gy,"action-required"),children:t.jsx(Ups,{children:jq.texts.actionRequired})}):xe?t.jsx(Nps,{}):be?t.jsxs(_ps,{children:[t.jsx(Wps,{}),t.jsx(Vps,{children:jq.aiAgentsActivatingPage.ledgerSection.workingPillLabel})]}):null})]},se)}))}),J===!0&&r!=null?t.jsx(Q1s,{accounts:r.accounts,fileName:l?.fileName??"",ledgerAccounts:r.ledgerAccounts,accountType:r.accountType,initialMappings:r.initialMappings,statementOverrideWarningAccountIds:r.statementOverrideWarningAccountIds,unavailableLedgerAccountIds:r.unavailableLedgerAccountIds,onMappingsChange:$}):null]}),J===!0&&r!=null?t.jsx(Jn,{formId:gy,showCancel:!0,cancelBtn:{label:Zm.continueInBackground,onClick:ne,style:{width:"195px"}},primaryBtn:{label:jq.confirm,isDisabled:A!==!0||x===!0||y===!0,isLoading:x,onClick:()=>{y===!0||x===!0||r.onConfirmMapping(C)},style:{width:"195px"}}}):t.jsx(Jn,{formId:gy,showCancel:!0,cancelBtn:{label:jq.cancel,onClick:c,style:{width:"195px"}},primaryBtn:{label:Zm.continueInBackground,onClick:ne,variant:"secondary",style:{width:"195px"}}})]})}const xps=a.div`
|
|
86068
86068
|
flex: 1;
|
|
86069
86069
|
display: flex;
|
|
86070
86070
|
flex-direction: column;
|
|
@@ -90896,7 +90896,7 @@ ${IO.gap.expectedStartDate(u)}.`:f.description,y=p===!0||d!=null;return t.jsx(Ei
|
|
|
90896
90896
|
padding: ${o.sp3} ${o.sp0};
|
|
90897
90897
|
`,Zvt=a(ct)`
|
|
90898
90898
|
min-width: 140px;
|
|
90899
|
-
`,gz=$At(Bun()),Mbs=["sandbox","production"],Obs=["development","staging","production"],JD=()=>Mc==="DEV"||Mc==="QA"||Mc==="PUNE"||Mc==="SUNNYVALE"||Mc==="DELHI"||Mc==="MOHALI",Ije="https://zeni-webapp-qa.uc.r.appspot.com",Mc=Q7("QA",["DEV","QA","PUNE","SUNNYVALE","DELHI","MOHALI","PROD","NEXT"]),a$s=(e=>Q7(e,Mbs))((e=>{switch(e){case"DEV":case"QA":case"PUNE":case"SUNNYVALE":case"DELHI":case"MOHALI":default:return"sandbox";case"PROD":case"NEXT":return"production"}})(Mc)),Jvt=(e=>Q7(e,Obs))((e=>{switch(e){case"QA":case"PUNE":case"SUNNYVALE":case"DELHI":case"MOHALI":return"staging";case"PROD":case"NEXT":return"production";default:return"development"}})(Mc)),Fbs=(e=>{switch(e){case"QA":case"PUNE":case"SUNNYVALE":case"DELHI":case"MOHALI":return"qa";case"NEXT":return"next";case"PROD":return"production";default:return"development"}})(Mc),Dje=Mc==="DEV"||Mc==="QA"?.2:.8,Aan=Dje,nl={sentryDsn:"",sentryTraceSamplingRate:Dje,sentryProfileSamplingRate:Aan,webV2MicroServiceEndpoint:"",googleClientId:"",googleMapsAPIKey:"",microsoftClientId:"",mixpanelToken:"",pusherClientSecret:"",pusherCluster:"",currentQBOEnv:"",quickbooksKey:"",appUrl:"",currentFeatureEnv:"",featureClientSecret:"",cardVaultId:"",stripeKey:"",qboRedirectionUrl:"",mixpanelUrl:"",mixpanelHMUrl:""};let O8,BN;function Rbs(){return O8?.aiCfoMicroServiceBaseUrl!=null?`${O8.aiCfoMicroServiceBaseUrl}/1.0/exports`:void 0}function zbs(e){nl.sentryDsn=e.keys.SENTRY_DSN,nl.sentryTraceSamplingRate=e.keys.SENTRY_TRACE_SAMPLE_RATES!=null?parseInt(e.keys.SENTRY_TRACE_SAMPLE_RATES):Dje,nl.sentryProfileSamplingRate=e.keys.SENTRY_PROFILES_SAMPLE_RATES!=null?parseInt(e.keys.SENTRY_PROFILES_SAMPLE_RATES):Aan,nl.googleClientId=e.keys.GOOGLE_CLIENT_ID,nl.googleMapsAPIKey=e.keys.GOOGLE_MAP_KEY,nl.microsoftClientId=e.keys.MICROSOFT_CLIENT_ID,nl.mixpanelToken=e.keys.MIXPANEL_TOKEN,nl.pusherClientSecret=e.keys.PUSHER_CLIENT_SECRET,nl.pusherCluster=e.keys.PUSHER_CLUSTER,nl.quickbooksKey=e.keys.QUICKBOOK_TOKEN,nl.appUrl=e.keys.WEB_ENDPOINT,nl.featureClientSecret=e.keys.STATSIG_CLIENT_SECRET,nl.cardVaultId=e.keys.UNIT_VAULT_ID,nl.stripeKey=e.keys.STRIPE_KEY,nl.qboRedirectionUrl=e.keys.QBO_URL,nl.mixpanelUrl=e.keys.MIXPANEL_URL,nl.mixpanelHMUrl=e.keys.MIXPANEL_HM_URL,BN=e.externalEndPoints,O8=e.apiEndPoints,(function(n,i){const r=new Set,s=[...Object.values(n),...Object.values(i)];for(const l of s)if(typeof l=="string"&&l.length>0)try{r.add(new URL(l).origin)}catch{}for(const l of r){if(document.querySelector(`link[rel="preconnect"][href="${l}"]`)!=null)continue;const c=document.createElement("link");c.rel="preconnect",c.href=l,document.head.appendChild(c)}})(O8,BN)}let Xvt=!1;function CI(){Xvt||(jg.init("ed1936cb971f6aad4104ddbe708f812c",{api_host:BN.mixpanelBaseUrl,ignore_dnt:!0,store_google:!1,track_marketing:!1}),Xvt=!0)}const Nbs=new Set(Array.from(Bi.EVENTS_WITHOUT_SUPER_PROPERTIES));let eAt=!1,tAt=!1;function w8e(){if(eAt)return;eAt=!0,CI();const e=Bi.extractUtmParamsFromUrl();Object.keys(e).length>0&&jg.register(e),JD()&&console.log(`[UTM] first-touch bootstrap: ${JSON.stringify(e)}`)}const _bs=new Set(["dclid","fbclid","gclid","ko_click_id","li_fat_id","msclkid","sccid","ttclid","twclid","wbraid"]);function Vbs(){const e=(function(){return jg?.persistence?.props??null})();if(e==null)return;const n=Object.keys(e).filter((i=>i.startsWith("utm_")||_bs.has(i)));for(const i of n)jg.unregister(i);JD()&&n.length>0&&console.log(`[UTM] cleared from cookie: ${JSON.stringify(n)}`)}function nAt(){tAt||(tAt=!0,Vbs())}class pD{identify(n,i){if(CI(),this.#t=n,n!=null&&i!=null&&(pD.#e==null||!rdn({userId:n,traits:i},pD.#e))){const{$email:r,...s}={...i};jg.identify(n),r&&r!=null&&jg.people.set_once({$email:r}),jg.people.set(s),pD.#e={userId:n,traits:i},JD()&&console.log(`*** Called people set with userId ${n} traits ${JSON.stringify(i)} `)}}identifyUserAndCompany(n,i,r,s,l){throw Error("Use identify in the web-app!!")}track(n,i){CI();const r=Nbs.has(n);if(this.#t!=null||r){if(w8e(),this.#t!=null){const s={distinct_id:this.#t,...i};jg.track(n,s)}else jg.track(n,i);if(nAt(),JD()){const s=this.#t!=null?`*** firing ${n} with props ${JSON.stringify(i)}`:`*** firing ${n} (unidentified user, in allowlist) with props ${JSON.stringify(i)}`;console.log(s)}}else console.error("Either User is not identified :( or this event is not in allowlist, so can not fire event.")}trackWithoutUserId(n,i){CI(),w8e(),jg.track(n,i),nAt(),JD()&&console.log(`*** firing ${n} (unidentified user) with props ${JSON.stringify(i)}`)}alias(n,i){CI(),jg.alias(n,i)}reset(){CI(),jg.identify(void 0),this.#t=void 0,pD.#e=void 0}static#e;#t}const C8e=new pD,San=new Bi.Analytics(C8e);San.trackWithoutUserId=C8e.trackWithoutUserId.bind(C8e);const f0=San,Hbs="openAiCfoScope",v8e="openAiCfoScopeOnDashboard";function s$s(e){const{location:n,navigate:i,mergeState:r}=e;i({pathname:n.pathname,search:n.search,hash:n.hash},{replace:!0,state:{...n.state,[v8e]:!0,...r}})}function l$s(e){const n=une(e);if(n.createSessionAndSubmitState.fetchState==="In-Progress")return!0;const i=n.uiState?.currentChatSessionId;return i!=null&&n.responseStateByChatSessionId?.[i]?.answer?.fetchState==="In-Progress"}function Tje(e,n){const i=n!=null?e.find((d=>d.chatSession.chatSessionId===n)):void 0,r=i?.questionAnswers??[],s=r[r.length-1],l=s?.responses.answer?.content?.summarizedTitle??"";return{currentChatSession:i?.chatSession,currentQuestionAnswer:s,currentQuestionAnswerSummary:l,currentChatSessionWithMessages:i,currentSessionQuestionAnswers:r}}function kan(e,n){return(e||n?.chatSessionSummary)??null}const jan="ZENI_AI_CFO_UPLOAD_PROMO_SEEN",Zte="zeni-ai-cfo-upload-promo-storage-changed",Br=new class{_isZeniUserCache;getSignedInUser(){const e=window.localStorage.getItem(this.ZENI_SESSION_ID);if(e!=null)return this.readEncryptedJSON(this.ZENI_SIGNED_IN_USER,e)}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_SESSION_ID);return e!=null&&(this.readEncryptedJSON(this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS,e)??!1)}getShowNegativeAmountInParenthesisPDF(){const e=window.localStorage.getItem(this.ZENI_SESSION_ID);return e==null||(this.readEncryptedJSON(this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF,e)??!0)}getSignedInUserTenant(e){return this.getSignedInUserTenants()?.find((n=>n.tenantEmailDomain===e))}getSignedInUserTenantWithId(e){return this.getSignedInUserTenants()?.find((n=>n.tenantId===e))}getActiveTenantForUser(){const e=window.localStorage.getItem(this.ZENI_SESSION_ID);if(e==null)return;const n=this.readEncryptedString(this.ZENI_ACTIVE_TENANT_DOMAIN,e);return n!=null?this.getSignedInUserTenants()?.find((i=>i.tenantEmailDomain===n)):void 0}getForceRefreshedComponents(){const e=window.localStorage.getItem(this.ZENI_SESSION_ID);return e==null?[]:this.readEncryptedJSON(this.ZENI_FORCE_REFRESHED_COMPONENTS,e)??[]}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.getItem(this.ZENI_SESSION_ID)!==n&&this.clearSessionKeyedEntries(),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 i=n??window.localStorage.getItem(this.ZENI_SESSION_ID);i!=null?window.localStorage.setItem(this.ZENI_SIGNED_IN_USER_TENANTS,this.encrypt(JSON.stringify(e),i)):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(){return this.readOtpToken(this.ZENI_OTP_TOKEN)}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 i=window.localStorage.getItem(this.ZENI_TREASURY_POPUP_SEEN);let r={};if(i!=null)try{const s=JSON.parse(i);r=s!==null&&typeof s=="object"?s:{}}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 i=window.localStorage.getItem(this.ZENI_CARD_POLICY_POPUP_SEEN);let r={};if(i!=null)try{const s=JSON.parse(i);r=s!==null&&typeof s=="object"?s:{}}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 i=JSON.parse(n);return i!==null&&typeof i=="object"&&i[e]===!0}catch{return window.localStorage.removeItem(this.ZENI_AI_CFO_UPLOAD_PROMO_SEEN),window.dispatchEvent(new CustomEvent(Zte)),!1}return!1}saveAiCfoUploadPromoSeen(e,n){const i=window.localStorage.getItem(this.ZENI_AI_CFO_UPLOAD_PROMO_SEEN);let r={};if(i!=null)try{const s=JSON.parse(i);r=s!==null&&typeof s=="object"?s:{}}catch{r={}}r[e]=n,window.localStorage.setItem(this.ZENI_AI_CFO_UPLOAD_PROMO_SEEN,JSON.stringify(r)),window.dispatchEvent(new CustomEvent(Zte))}savePayNowInfoTooltip(e,n){const i=n??window.localStorage.getItem(this.ZENI_SESSION_ID);i!=null&&window.localStorage.setItem(this.ZENI_PAY_NOW_INFO_TOOLTIP,this.encrypt(JSON.stringify(e),i))}getPayNowInfoTooltip(){const e=window.localStorage.getItem(this.ZENI_SESSION_ID);if(e!=null)return this.readEncryptedJSON(this.ZENI_PAY_NOW_INFO_TOOLTIP,e)}saveZeniOtpTokenForCardHolder(e,n){const i=window.localStorage.getItem(this.ZENI_SESSION_ID);i!=null&&window.localStorage.setItem(`${this.ZENI_OTP_TOKEN}_${n}`,this.encrypt(JSON.stringify(e),i))}getZeniOtpTokenForCardHolder(e){return this.readOtpToken(`${this.ZENI_OTP_TOKEN}_${e}`)}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(){return this.readEncryptedString(this.ZENI_LAST_USED_MAGIC_LINK_TOKEN,"7f8a2b9c4d1e6f3a8b5c2d9e4f7a1b6c")??null}saveMagicLinkEmail(e){window.localStorage.setItem(this.ZENI_MAGIC_LINK_EMAIL,this.encrypt(e,"7f8a2b9c4d1e6f3a8b5c2d9e4f7a1b6c"))}getMagicLinkEmail(){return this.readEncryptedString(this.ZENI_MAGIC_LINK_EMAIL,"7f8a2b9c4d1e6f3a8b5c2d9e4f7a1b6c")??null}encrypt(e,n){return gz.AES.encrypt(e,n).toString()}decrypt(e,n){try{const i=gz.AES.decrypt(e,n).toString(gz.enc.Utf8);return i===""?void 0:i}catch{return}}readEncryptedString(e,n){const i=window.localStorage.getItem(e);if(i==null)return;const r=this.decrypt(i,n);return r==null&&window.localStorage.removeItem(e),r}readEncryptedJSON(e,n){const i=this.readEncryptedString(e,n);if(i!=null)try{const r=JSON.parse(i);return r===null?void window.localStorage.removeItem(e):r}catch{return void window.localStorage.removeItem(e)}}getSignedInUserTenants(){const e=window.localStorage.getItem(this.ZENI_SESSION_ID);if(e!=null)return this.readEncryptedJSON(this.ZENI_SIGNED_IN_USER_TENANTS,e)}readOtpToken(e){const n=window.localStorage.getItem(this.ZENI_SESSION_ID);if(n==null)return;const i=this.readEncryptedJSON(e,n);if(i!=null){if(i.expiry!=null)return{...i,expiry:pn(i.expiry.toString())};window.localStorage.removeItem(e)}}clearSessionKeyedEntries(){this.SESSION_KEYED_IDs.forEach((e=>window.localStorage.removeItem(e))),Object.keys(window.localStorage).filter((e=>e.startsWith(`${this.ZENI_OTP_TOKEN}_`))).forEach((e=>window.localStorage.removeItem(e)))}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=jan;SESSION_KEYED_IDs=[this.ZENI_SIGNED_IN_USER_TENANTS,this.ZENI_ACTIVE_TENANT_DOMAIN,this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS,this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF,this.ZENI_OTP_TOKEN,this.ZENI_FORCE_REFRESHED_COMPONENTS];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]},oL=(e,n)=>{const i=[...e??[]];return i.push(n),i},c$s=e=>{const n=[...e??[]];return{poppedPathname:n.pop(),newStack:n}},d$s=({state:e})=>Br.isSignedIn()===!0?Zt.jsx(_sn,{}):Zt.jsx(TAt,{to:"/signin/auth",replace:!0,state:{...e,message:"...",origin:window.location.pathname}}),Ubs=["aiCfoInitialQuestion","aiCfoShouldSubmit","aiCfoInitialSubmissionSource","aiCfoSuggestionIndex"];function $an(e){if(e==null)return{message:"",origin:""};const n={...e};for(const i of Ubs)delete n[i];return n}function Wbs(){const e=Kp(),n=d2(),i=ene(),{tenantEmailDomain:r}=LAt(),[s,l]=m.useState(!1),c=qr((v=>v.tenantState.fetchState==="Completed"||v.tenantState.activeTenantFetchState.fetchState==="Completed"?xm(v):void 0)),d=c?.masterTOSInfo?.isMasterTOSAccepted??!1,u=qr((v=>une(v))),p=m.useRef(null),[h,g]=m.useState(!1);m.useEffect((()=>{const v=n.state;if(v?.[v8e]!==!0)return;const A=v.aiCfoInitialQuestion;!d&&typeof A=="string"&&A.length>0&&(p.current={question:A,submissionSource:typeof v.aiCfoInitialSubmissionSource=="string"?v.aiCfoInitialSubmissionSource:void 0,suggestionIndex:typeof v.aiCfoSuggestionIndex=="number"?v.aiCfoSuggestionIndex:void 0}),g(d),l(!0),i({pathname:n.pathname,search:n.search,hash:n.hash},{replace:!0,state:{...$an(v),[v8e]:void 0}})}),[n.state,n.pathname,n.search,n.hash,d]);const f=m.useCallback((()=>{const v=p.current;if(v==null||r==null)return!1;p.current=null;const A=n.state,S=oL(A?.pathnameStackToGoBack,n.pathname);return i(`/${r}/ai-cfo/explore`,{state:{message:"",origin:"",pathnameStackToGoBack:S,referrer:A?.referrer??"Dashboard",aiCfoInitialQuestion:v.question,aiCfoShouldSubmit:!0,...v.submissionSource!=null?{aiCfoInitialSubmissionSource:v.submissionSource}:{},...v.suggestionIndex!=null?{aiCfoSuggestionIndex:v.suggestionIndex}:{}}}),!0}),[n.pathname,n.state,i,r]),x=_t(d);m.useEffect((()=>{s&&d&&x===!1&&(l(!1),f())}),[s,d,x,f]);const y=m.useCallback((()=>{if(f()||r==null)return;const v=oL(n.state?.pathnameStackToGoBack,n.pathname);i(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:v,referrer:n.state?.referrer??"Navigation"}})}),[n.pathname,n.state,i,f,r]),b=m.useCallback((()=>{l(!1),y()}),[y]),w=m.useCallback((()=>{p.current=null,l(!1)}),[]),C=m.useCallback((()=>{d||c?.userRoleId==null?(l(!1),f()):e(jSt(c.userRoleId))}),[e,d,c?.userRoleId,f]);return Zt.jsx(ean,{open:s,onClose:w,children:Zt.jsxs(Xrn,{children:[s&&!h?Zt.jsx($Ae,{analytics:f0,onLoad:v=>h?null:v.trackAICFOOnboardingScreenStateChanged("open","first_visit")}):null,Zt.jsx(Pye,{acceptMasterTOSState:u.masterTOSAcceptanceState,isTOSAccepted:h,showHeader:!1,togglePageView:h?b:void 0,onCloseClick:w,onCompleteClick:C})]})})}const A8e=m.createContext(void 0);function Lje(){const e=m.useContext(A8e);if(e===void 0)throw new Error("useAiCfoPanelOpen must be used within AiCfoPanelOpenContext.Provider");return e}const Bje=["/:tenantEmailDomain/reports/*","/:tenantEmailDomain/reports"],Pje=["/:tenantEmailDomain/forecast/*","/:tenantEmailDomain/forecast"],Ean=["/:tenantEmailDomain/dashboard/*","/:tenantEmailDomain/dashboard"],Ian=["/:tenantEmailDomain/checking/*","/:tenantEmailDomain/checking"],Dan=["/:tenantEmailDomain/treasury/*","/:tenantEmailDomain/treasury"],Tan=["/:tenantEmailDomain/cards/*","/:tenantEmailDomain/cards"],Lan=["/:tenantEmailDomain/people/*","/:tenantEmailDomain/people"],Ban=["/:tenantEmailDomain/rewards/*","/:tenantEmailDomain/rewards"],Pan=["/:tenantEmailDomain/notifications/*","/:tenantEmailDomain/notifications"];function Man(e){const n=(e??"").replace(/\/$/,"").split("/").filter(Boolean);if(n.length<2)return!1;for(let i=1;i<n.length;i+=1)if(n[i]==="transaction")return!0;return!1}const Oan=["/:tenantEmailDomain/performance/*","/:tenantEmailDomain/performance"],Fan=["/:tenantEmailDomain/bill/*","/:tenantEmailDomain/bill"],Ran=["/:tenantEmailDomain/reimbursement/*","/:tenantEmailDomain/reimbursement"],Qbs=[...Ean,...Bje,...Pje,"/: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",...Oan,...Fan,...Ran,...Ian,...Dan,...Tan,...Lan,...Ban,...Pan];function zan(){const{pathname:e}=d2(),n=e??"";return Qbs.some((i=>$8e(i,n)!=null))||Man(e)}function ou(e){const{pathname:n}=d2(),i=n??"";return e.some((r=>$8e(r,i)!=null))}const u$s=27.22,Nan=m.createContext(null),_an={APP_INITIALIZATION:"app-init",TENANT_SWITCHING:"tenant-switch",TENANT_FETCHING:"tenant-fetch",CONNECTION_AUTH:"connection-auth"};function Ybs({children:e}){const[n,i]=m.useState((()=>new Set([]))),r=n.size>0,s=m.useCallback((d=>{i((u=>{if(u.has(d))return u;const p=new Set(u);return p.add(d),p}))}),[]),l=m.useCallback((d=>{i((u=>{if(!u.has(d))return u;const p=new Set(u);return p.delete(d),p}))}),[]),c={isLoading:r,activeLoadingStates:n,setLoading:s,clearLoading:l,clearAllLoading:m.useCallback((()=>{i(new Set)}),[])};return Zt.jsx(Nan.Provider,{value:c,children:e})}function Mje(){const e=m.useContext(Nan);if(!e)throw new Error("useLoading must be used within a LoadingProvider");return e}function Gbs(e,{currentChatSessionId:n,isAiCardCreationEnabled:i,isCardPolicyEnabled:r,onAfterCardPolicySubmit:s,onAfterCardsCreationSubmit:l}){return{onCardsCreationFormChange:i?c=>{e(pdn(c))}:void 0,onCardsCreationFormSubmit:i?(c,d)=>{const u=cdn(c);u.length!==0&&(e(ddn(u)),e(udn({sourceChatSessionId:n})),n!=null&&e(s$e({chatSessionId:n,id:p$e(),kind:"creating_cards",createdAt:pn(""),sourceQuestionAnswerId:d})),l?.())}:void 0,onCardPolicyFormChange:r?c=>{e(ldn(c))}:void 0,onCardPolicyFormSubmit:r?(c,d)=>{const u=(({values:p,mode:h="strict",description:g=""})=>{const f=Nda(p),x={description:g.trim(),mode:h,name:f.trim()};if(p.policyKind==="auto"||p.policyKind==="upload"){const v=p.policiesReview.find((A=>A.isChecked))??p.policiesReview[0];return v==null?{...x,allowedEntity:{categoryCodes:[],merchantNames:[]},applyToCards:[],blockedEntity:{categoryCodes:[],merchantNames:[]},requiredReceiptThreshold:null,spendLimits:{transaction:null}}:{...x,...zda(v)}}const y=pte(p.vendorPolicy,"allow"),b=pte(p.vendorPolicy,"block"),w=hte(p.categoryPolicy,"allow"),C=hte(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:mte(p.limits,Lke),spendLimits:{transaction:mte(p.limits,Tke)}}})({values:c});e(sdn({templates:[u],sourceChatSessionId:n})),n!=null&&e(s$e({chatSessionId:n,id:p$e(),kind:"creating_policy",createdAt:pn(""),sourceQuestionAnswerId:d})),s?.()}:void 0,onCardPolicyUploadDocument:r?(c,d,u)=>{c.length!==0&&e(adn(c,d,u))}:void 0,onCardPolicyRemoveDocument:r?()=>{e($St())}:void 0}}const qbs=e=>vdn(e,!1),Kbs=e=>Cdn(e.name,!1);function Zbs(e,{allUsers:n,onCardPolicyVendorSearchTextChange:i}){const r=e.cardPolicyState,s=hdn(r),l=mdn(r),c=gdn(r),{creditAccount:d}=fdn(e,!1,!1,!1),u=d.fetchState==="Completed"&&d.limit.amount>0?d.limit.amount:void 0;return{allUsers:n,cardPolicyCategorySearchOptions:s.map(qbs),cardPolicyVendorSearchOptions:l.map(Kbs),cardPolicyIsVendorSearchLoading:c==="In-Progress",cardPolicyDocumentUploadState:wdn(r),cardPolicyUploadedFileName:bdn(r),cardPolicyFormDraft:ydn(e.createCardPolicyState),cardsCreationFormDraft:xdn(e),cardsCreationMaxLimitAmount:u,onCardPolicyVendorSearchTextChange:i}}const Jbs=e=>{const n=ae.currencyFormatter(0);return i=>{const r=Sdn(e.chargeCardState,i);if(r==null)return;const s=kdn(e.userState,r.cardHolderUserId),l=((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??""})(s?.firstName,s?.lastName,s?.email),c=r.limit?.amount,d=typeof c=="number"&&Number.isFinite(c)?n.format(c):"";return{cardName:r.cardName,ownerName:l,recommendedLimitFormatted:d,owner:s}}},Xbs=e=>n=>{const i=Adn(e.cardPolicyState,n);if(i==null)return;const r=i.cardsCount>0?i.cardsCount:i.appliedCards.length,s=i.allowedEntity.merchantNames.length+i.blockedEntity.merchantNames.length,l=i.allowedEntity.categoryCodes.length+i.blockedEntity.categoryCodes.length;return{name:i.name,description:i.description,cardsCount:r,vendorRestrictionsCount:s,categoryRestrictionsCount:l}};function e9s(){const e=Kp(),{useFeatureGate:n}=us(),{isFeatureEnabled:i}=n(Gr.isAiCardCreationEnabled),{isFeatureEnabled:r}=n(Gr.isCardPolicyEnabled),{isCardsEnabledOnCompany:s,isChargeCardEnabledOnCompany:l}=qr((p=>{const h=xm(p).company;return{isCardsEnabledOnCompany:!!h?.companyChargeCardInfo?.isChargeCardEnabled||!!h?.companyDebitCardInfo?.isDebitCardEnabled,isChargeCardEnabledOnCompany:!!h?.companyChargeCardInfo?.isChargeCardEnabled}}),VZ);m.useEffect((()=>(s&&(e(jdn()),e(l$e()),e($dn("cardHolderCandidate",!1)),e(Edn(!1,!1,!1)),l&&e(Idn())),()=>{e($St())})),[e,s,l]);const c=m.useMemo((()=>Lun((p=>{e(l$e(p))}),250)),[e]);m.useEffect((()=>()=>{c.cancel()}),[c]);const d=m.useCallback((p=>{c(p)}),[c]),u=qr((p=>Ddn(p.userState,p.userRoleState,p.userListViewState,"cardHolderCandidate").users),VZ);return{allUsers:m.useMemo((()=>u.map((p=>p.user)).filter((p=>p!=null))),[u]),isAiCardCreationEnabled:i,isCardPolicyEnabled:r,onCardPolicyVendorSearchTextChange:d}}const Van=["/:tenantEmailDomain/dashboard/accounts_payable_aging/*","/:tenantEmailDomain/dashboard/accounts_payable_aging"],Han=["/:tenantEmailDomain/dashboard/accounts_receivable_aging/*","/:tenantEmailDomain/dashboard/accounts_receivable_aging"],t9s=["/:tenantEmailDomain/dashboard/cash_in_cash_out/*","/:tenantEmailDomain/dashboard/cash_in_cash_out"],n9s=["/:tenantEmailDomain/dashboard/operating_expenses/*","/:tenantEmailDomain/dashboard/operating_expenses"],i9s=["/:tenantEmailDomain/dashboard/revenue/*","/:tenantEmailDomain/dashboard/revenue"],o9s=["/:tenantEmailDomain/dashboard/net_burn_or_income/*","/:tenantEmailDomain/dashboard/net_burn_or_income"],r9s=["/:tenantEmailDomain/dashboard/cash_position/*","/:tenantEmailDomain/dashboard/cash_position"],Uan=["/:tenantEmailDomain/dashboard/cash_balance/*","/:tenantEmailDomain/dashboard/cash_balance"],Wan=["/:tenantEmailDomain/dashboard/card_balance/*","/:tenantEmailDomain/dashboard/card_balance"],a9s=["transaction_categorization","je_schedules","reconciliation","missing_receipts","flux_analysis","month_end_insights"];function Oje(e){const n=lm(e),i=n.indexOf("review");if(i<2||n[i-1]!=="month_end_close_checks")return null;if(i===n.length-1)return"overview";const r=n[i+1];return r==null?"overview":a9s.includes(r)?r:null}const s9s=new Set(["approval-rules",...new Set(["setup","verification","promo","international-wire"])]),l9s=new Set(["setup","verification","promo","approval-rules"]);function lm(e){return e.replace(/\/$/,"").split("/").filter(Boolean)}function Fje(e){const n=lm(e),i=n[1]==="vendors"?1:-1;if(i<0||n.length<i+2)return;const r=n[i+1];if(r==="summary")return"vendors";if(r==="opex")return"opex_by_vendor";if(r==="schedules"){const s=n[i+2];return s==="prepaid_expenses"?"prepaid_expenses":s==="fixed_assets"?"fixed_assets":s==="accrued_expenses"?"accrued_expenses":void 0}return r==="filing_1099"?"form_1099":void 0}function Qan(e,n,i){const r=lm(e);return!(r.length<2||r[1]!==n)&&(r.length===2||i(r[2]))}function Yan(e,n,i){return Qan(e,n,(r=>!i.has(r)))}function Gan(e){return Yan(e,"bills",s9s)}function qan(e){return Yan(e,"reimbursements",l9s)}function Kan(e){return Qan(e,"tasks",(n=>n==="group"))}const c9s=new Set(["setup","verification","promo","transfer","check-deposit","express-pay"]),d9s=new Set(["setup","verification","promo","payment","payment-history","onboard","activate","new"]);function Rje(e){const n=lm(e);if(n[1]!=="checking")return;if(n.length<=2)return"checking";const i=n[2];return c9s.has(i)?"checking":"checking_details"}function zje(e){const n=lm(e);if(n[1]!=="cards")return;if(n.length<=2)return"cards";const i=n[2];if(i==="policy"){const r=n[3];return r==null?"card_policy":r==="new"?void 0:"card_policy_detail"}return d9s.has(i)?"cards":"cards_detail"}function Zan(e){const n=lm(e),i=n.indexOf("transaction");if(!(i<1||n.length<i+3))return"transaction_details"}function Jan(e){return lm(e)[1]==="performance"?"performance":void 0}function Xan(e){const n=lm(e);if(!(n[1]!=="bill"||n.length<3)&&n[2]!=="new")return"bills_details"}function esn(e){const n=lm(e);if(!(n[1]!=="reimbursement"||n.length<3)&&n[2]!=="new")return"reimbursement_details"}function lf(e,n){return n.some((i=>$8e(i,e)!=null))}function u9s(e){return lf(e,Bje)?"reports":lf(e,Van)?"ap_aging":lf(e,Han)?"ar_aging":Fje(e)!=null?"vendors_tab":lf(e,Pje)?"forecast":Oje(e)!=null?"month_end_close_review":lf(e,Uan)?"cash_balance":lf(e,Wan)?"card_balance":Kan(e)?"task_checklist":Zan(e)!=null?"transaction_detail":Jan(e)!=null?"performance":Xan(e)!=null?"bills_detail":esn(e)!=null?"reimbursement_detail":Gan(e)?"bills_list":qan(e)?"reimbursement_list":lf(e,t9s)?"cash_in_cash_out":lf(e,n9s)?"operating_expenses":lf(e,i9s)?"revenue":lf(e,o9s)?"net_burn_or_income":lf(e,r9s)?"cash_position":(function(n){const i=lm(n);return i.length===2&&i[1]==="dashboard"})(e)?"dashboard":Rje(e)!=null?"checking":(function(n){return lm(n)[1]==="treasury"?"treasury":void 0})(e)!=null?"treasury":zje(e)!=null?"cards":(function(n){return lm(n)[1]==="people"?"people":void 0})(e)!=null?"people":(function(n){return lm(n)[1]==="rewards"?"rewards":void 0})(e)!=null?"rewards":(function(n){return lm(n)[1]==="notifications"?"notifications":void 0})(e)!=null?"notifications":"none"}function tsn(e,n){switch(u9s(e)){case"reports":{const i=n?.selectedReportId;return i==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}})(i)}case"ap_aging":return"accounts_payable";case"ar_aging":return"accounts_receivable";case"vendors_tab":return Fje(e);case"forecast":return"forecast";case"month_end_close_review":{const i=Oje(e);return i==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"}})(i)}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 Rje(e);case"treasury":return"treasury";case"cards":return zje(e);case"people":return"people";case"rewards":return"rewards";case"notifications":return"notifications";default:return}}function nsn(){const{pathname:e}=d2(),n=e??"",i=qr((r=>r.financeStatementState?.selectedReportId));return m.useMemo((()=>tsn(n,{selectedReportId:i})),[n,i])}function Nje(){const{useFeatureGate:e}=us(),{isFeatureEnabled:n}=e(Gr.isAiCfoEnabled),i=qr((s=>xm(s))),r=Br.getSignedInUser();return r!=null&&r.userId!=null&&i!=null&&i.companyId!=null&&n}function p9s(){const{useFeatureGate:e}=us(),{isFeatureEnabled:n}=e(Gr.isAiCfoNavButtonEnabled),i=Nje();return n&&i}const isn=m.createContext(void 0),h9s=({children:e})=>{const{tenantEmailDomain:n}=LAt(),i=n!=null?Br.getSignedInUserTenant(n):void 0,r=qr((u=>xm(u))),s=pne().tenantId,l=i?.tenantId,c=r?.tenantId,d=m.useMemo((()=>l!=null&&l===c&&c===s),[l,c,s]);return Zt.jsx(isn.Provider,{value:{areTenantIdsInSync:d,tenantIdFromEmailDomain:l,currentTenantId:c,tenantIdFromConfig:s},children:e})},m9s=()=>{const e=m.useContext(isn);if(!e)throw new Error("useTenantSync must be used within a TenantSyncProvider");return e};function osn(e,n){return e!=="In-Progress"&&!(e==="Completed"&&!n)&&!(e==="Error"&&!n)}function rsn(e){const{areTenantIdsInSync:n}=m9s(),i=Nje(),r=p9s();return n&&e&&r&&i}function p$s(e){const{pageContexts:n,canFetchSuggestedQuestions:i}=e,r=Kp(),s=BAt(),l=m.useRef(null);m.useEffect((()=>{const c=l.current===!1&&i===!0;if(l.current=i,i&&n!=null&&n.length!==0)for(const d of n){const u=Y8e(s.getState(),d)?.fetchState;osn(u,c)&&r(ISt({pageContext:d}))}}),[i,r,n,s])}function asn(e){(function(n){const{pageContext:i,canFetchSuggestedQuestions:r,noCardCreated:s}=n,l=Kp(),c=BAt(),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!==s;if(u.current=s,i==null||!r)return;const g=Y8e(c.getState(),i)?.fetchState;osn(g,p||h)&&l(ISt({pageContext:i,noCardCreated:s}))}),[r,l,s,i,c])})({canFetchSuggestedQuestions:rsn(e.isDataReady),pageContext:e.pageContext,noCardCreated:e.noCardCreated})}function h$s(e){asn({pageContext:nsn(),isDataReady:e.isDataReady,noCardCreated:e.noCardCreated})}const{questionTemplates:{sampleQuestion1:g9s,sampleQuestion2:f9s,sampleQuestion3:x9s}}=ae.getLocalizedStrings().aiCfo,y9s=[g9s,f9s,x9s];function b9s(e,n=!1){asn({isDataReady:!0,pageContext:e!=null&&e!==""?e:void 0});const i=rsn(!0),r=qr((g=>e!=null&&e!==""?Y8e(g,e):void 0)),{useDynamicConfig:s}=us(),{configValue:l}=s(J7.aiCfoMessageDynamicConfig),c=m.useMemo((()=>Array.isArray(l?.default_message_list)?[...l.default_message_list]:[]),[l?.default_message_list]),d=m.useMemo((()=>c.length>0?c:[...y9s]),[c]),u=e!=null&&e!=="",p=u&&i&&(r==null||r.fetchState!=="Completed"&&r.fetchState!=="Error"),h=m.useMemo((()=>{if(!u||!i)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}),[i,d,u,p,r?.fetchState,r?.suggestedQuestions]);return{isSuggestedQuestionsLoading:!n&&p,suggestedPromptQuestions:m.useMemo((()=>n?[]:h),[n,h])}}function w9s({isFileUploadEnabled:e,tenantEmailDomain:n}){const i=m.useCallback((()=>e===!0&&n!=null&&!Br.getAiCfoUploadPromoSeen(n)),[e,n]),[r,s]=m.useState(i);return m.useEffect((()=>{s(i())}),[i]),m.useEffect((()=>{const l=()=>{s(i())};window.addEventListener(Zte,l);const c=d=>{d.key===jan&&l()};return window.addEventListener("storage",c),()=>{window.removeEventListener(Zte,l),window.removeEventListener("storage",c)}}),[i]),{isUploadPromoVisible:r,handleUploadPromoClose:m.useCallback((()=>{n!=null&&Br.saveAiCfoUploadPromoSeen(n,!0),s(!1)}),[n])}}const ssn=m.createContext(void 0),Jte=()=>m.useContext(ssn),iAt=e=>{e!=null&&(e.channels.all().forEach((n=>{e.unsubscribe(n.name)})),e.disconnect())},C9s=e=>{const n=Br.isSignedIn(),i=Br.getSignedInUser(),[r,s]=m.useState(void 0),l=m.useRef(void 0),c=m.useMemo((()=>r),[r]),d=qr((h=>xm(h))),u=d.companyId,p=d.userRoleId;return m.useEffect((()=>{let h,g=!1;if(n&&d.tenantId!=null&&i?.userId!=null&&i.zeniSessionId!=null){iAt(l.current),l.current=void 0,s(void 0);const f=i.userId,x=d.tenantId,y=i.zeniSessionId,b=async()=>{if(g)return;let C;try{C=await Mdn(nl.pusherClientSecret,{cluster:nl.pusherCluster},{userId:f,tenantId:x,sessionId:y},!0)}catch(v){return void console.warn("Failed to initialize Pusher",v)}g?C?.disconnect():(l.current=C,s(C),C!=null&&(u!=null&&XD(C,u),f!=null&&XD(C,f),p!=null&&XD(C,p)))},w=()=>{const C=pne();return C.tenantId===x&&C.userId===f&&C.sessionId===y};if(w())b();else{let C=0;h=setInterval((()=>{g||(C++,w()?(clearInterval(h),b()):C>=30&&(clearInterval(h),LSt(f,y,x),b()))}),100)}}return()=>{g=!0,h!=null&&clearInterval(h),iAt(l.current),l.current=void 0}}),[n,d.tenantId,i?.userId,i?.zeniSessionId]),Zt.jsx(ssn.Provider,{value:c,children:e.children})};function XD(e,n){const i=`private-encrypted-${n}`,r=e.channel(i);if(r?.subscribed===!0)return r;const s=e.subscribe(i);return s.bind("pusher:subscription_error",(l=>{console.warn("Pusher Channel Connection Subscription Error",l)})),s}const v9s=e=>{const n=e.indexOf(".");return n===-1?[e,""]:[e.slice(0,n),e.slice(n+1)]},lsn=e=>n=>{const i=Jte(),r=m.useRef(n.eventCallback),s=m.useRef(n.onSubscribed),l=m.useRef({}),c=m.useRef(0);m.useEffect((()=>{r.current=n.eventCallback,s.current=n.onSubscribed;const{events:u,eventCallback:p,onSubscribed:h,...g}=n;l.current=g}),[n]);const d=m.useMemo((()=>[...n.events].sort().join("|")),[n.events]);return m.useEffect((()=>{if(i!=null){const{events:u}=n,p=[];if(u.length===0)return;const h=new Set,g=()=>{if(s.current==null)return;const f=Date.now();f-c.current<5e3||(c.current=f,s.current(l.current))};return u.forEach((f=>{const[x,y]=v9s(f);if(y==="")return;const b=i.channel(x),w=v=>{r.current(y,v,l.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??i.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()))}}}),[i,d]),Zt.jsx(e,{...n})},m$s=210;function g$s(e){return e?.data.unread!=null&&e?.mode!=null}const _je=e=>d0i.includes(e),Vje=e=>ezt.includes(e),Hje=e=>u0i.includes(e),A9s={invoicing_settings_branding:"invoicing/settings/branding",invoicing_settings_dunning:"invoicing/settings/dunning",invoicing_settings_integrations:"invoicing/settings/integrations",invoicing_settings_payment_destination:"invoicing/settings/payment-destination",invoicing_settings_quickbooks:"invoicing/settings/quickbooks"},S9s=e=>{if(Hje(e)){const n=A9s[e];return n??`invoicing/${e.replace("invoicing_","")}`}return _je(e)?`settings/${e}`:e==="home"?"dashboard":e==="users_and_roles"?"people":e==="task_checklist"?"tasks":e==="company_settings"?"settings/company_details":VAe(e)?e==="command_center"?"month_end_close_checks/review":`month_end_close_checks/review/${e}`:Vje(e)?`ai-cfo/${e}`:e},k9s=["dashboard","reports","forecast","vendors","bills","bill","reimbursements","reimbursement","tasks","month_end_close_checks","transaction","performance","checking","treasury","cards","people","rewards","notifications"],f$s=e=>{if(_je(e)||Vje(e)||Hje(e))return!0;const n=S9s(e).split("/")[0];return!k9s.includes(n)},oAt=(e,n)=>e.includes(n),rAt=e=>{switch(e.split("/")[2]){case"invoicing":return(function(n){const i=n.split("/")[3];if(i==="settings")switch(n.split("/")[4]){case"payment-destination":return"invoicing_settings_payment_destination";case"branding":return"invoicing_settings_branding";case"integrations":return"invoicing_settings_integrations";case"dunning":return"invoicing_settings_dunning";case"quickbooks":return"invoicing_settings_quickbooks";default:return"invoicing_settings"}switch(i){case"customers":return"invoicing_customers";case"subscriptions":return"invoicing_subscriptions";case"invoices":return"invoicing_invoices";case"payments":return"invoicing_payments";case"credits":return"invoicing_credits";case"discounts":return"invoicing_discounts";case"dunning":return"invoicing_dunning";case"catalog":return"invoicing_catalog";case"settings":return"invoicing_settings";case"data_import":return"invoicing_data_import";case"audit_log":return"invoicing_audit_log";default:return"invoicing_overview"}})(e);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 i=["accounting","approval_rules","billing","my_bank_connections","bank_connections","business_verification","company_details","integrations","my_profile","notifications"];for(const r of i)if(oAt(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 i=n.split("/"),r=i.indexOf("review"),s=r>=0?i[r+1]:void 0;return s!=null&&VAe(s)?c0i(s):"command_center"})(e);case"ai-cfo":return(function(n){if(n!=null){for(const i of ezt)if(oAt(n,i))switch(i){case"new_chat":return"new_chat";case"explore":return"explore"}}})(e);case"treasury":return"treasury";default:return}};function j9s(e){let n=rAt(e.pathname);if(n==null){const i=[...e.state?.pathnameStackToGoBack??[]].reverse();for(let r=0;r<i.length&&n==null;++r)n=rAt(i[r])}return n??"home"}function x$s(e){return e.pathname.includes("settings")&&!e.pathname.includes("invoicing")}function y$s(e){return e.pathname.split("/")[2]==="invoicing"}function b$s(e){return e.pathname.includes("ai-cfo")}function w$s(e,n){const i=j9s(n);let r;return r=i==="home"?"dashboard":i==="users_and_roles"?"people":Hje(i)?`invoicing/${i.replace("invoicing_","")}`:_je(i)?"settings/my_profile":Vje(i)?`ai-cfo/${i}`:i==="task_checklist"?"tasks":VAe(i)?"month_end_close_checks/review":encodeURIComponent(i),`/${encodeURIComponent(e)}/${r}`}function $9s({dispatch:e,navigate:n,pathToNavigate:i,selectedTenant:r,signedInUser:s}){n(i,{replace:!0}),s!=null&&(e(BSt(r.tenantId)),e(PSt(s.userId,r.tenantId,s.zeniSessionId))),f0.trackCompanySwitch(r.companyId,r.companyName,r.userRole)}function E9s({currentTenant:e,currentChatSessionId:n,aiCfoView:i,skillsEnabled:r,onBeforeNavigate:s,onCloseSkills:l,onOpenSkills:c}){const d=Kp(),u=ene(),p=d2(),{setLoading:h}=Mje(),g=Br.getSignedInUser(),f=ON(g),{useDynamicConfig:x}=us(),{configValue:y}=x(J7.expenseAutomationEnablementZeniUsers),b=Array.isArray(y?.expenseAutomationEnabledCompanies)?y.expenseAutomationEnabledCompanies:[],[w,C]=m.useState(!1),v=qr((L=>L.tenantState)),A=qr((L=>v.fetchState==="Completed"?Odn(L):[])),S=qr((L=>e?.tenantId!=null?Fdn(L,e.tenantId):void 0)),$=m.useCallback((()=>C(!0)),[]),j=m.useCallback((()=>C(!1)),[]),I=m.useCallback((()=>{j(),s?.()}),[j,s]),E=m.useCallback((L=>{if(I(),L.type!=="skills"&&l?.(),L.type==="new_chat"){n!=null&&d(U5e());const V=oL(p.state?.pathnameStackToGoBack,p.pathname);u(`/${e.tenantEmailDomain}/ai-cfo/new_chat`,{state:{pathnameStackToGoBack:V.slice(0,-1),referrer:"Sidebar"}})}else L.type==="skills"?c?.():L.type==="explore"&&(n!=null&&d(U5e()),u(`/${e.tenantEmailDomain}/ai-cfo/explore`,{state:{pathnameStackToGoBack:p.state?.pathnameStackToGoBack}}))}),[I,n,e.tenantEmailDomain,d,p,u,l,c]),D=m.useCallback((L=>{I(),d(ESt({sessionId:L,agentId:"controller"})),u(`/${e.tenantEmailDomain}/ai-cfo/${L}`,{state:{pathnameStackToGoBack:p.state?.pathnameStackToGoBack}})}),[I,e.tenantEmailDomain,d,p,u]),B=m.useCallback((()=>n==null?"new_chat":"ai_cfo"),[n]),F=m.useCallback((()=>{I();const L=oL(p.state?.pathnameStackToGoBack,p.pathname);u("/signout",{replace:!0,state:{pathnameStackToGoBack:L,message:"logout"}})}),[I,p,u]),R=m.useCallback((()=>{I(),u(`/${e.tenantEmailDomain}/settings/my_profile`,{state:{pathnameStackToGoBack:p.state?.pathnameStackToGoBack}})}),[I,e.tenantEmailDomain,p,u]),_=m.useCallback((()=>{I(),window.open("/cockpit")}),[I]),N=m.useCallback((()=>{I(),u(`/${e.tenantEmailDomain}/notifications/tasks`,{state:{pathnameStackToGoBack:p.state?.pathnameStackToGoBack}})}),[I,e.tenantEmailDomain,p,u]),T=m.useCallback((L=>{h(_an.TENANT_SWITCHING),I();const V=L.tenantEmailDomain;$9s({dispatch:d,navigate:u,pathToNavigate:`/${encodeURIComponent(V)}/ai-cfo/explore`,selectedTenant:L,signedInUser:g})}),[I,d,g,u,h]),P=Zt.jsx(_St,{anchor:"left",open:w,onClose:j,PaperProps:{sx:{width:210,backgroundColor:"transparent",borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:Zt.jsxs(I9s,{children:[Zt.jsxs(D9s,{children:[Zt.jsx(yHt,{}),Zt.jsx(BHt,{expenseAutomationEnabledCompanies:b,isZeniUser:f,currentTenantId:e?.tenantId??"",tenants:v.fetchState==="Completed"?A:S!=null?[S]:[],onTenantSelect:T})]}),Zt.jsx(T9s,{children:Zt.jsx(CHt,{selectedMenu:B(),aiCfoView:i,isMobile:!0,skillsEnabled:r,onClick:E,updateCurrentChatSessionId:D})}),Zt.jsxs(L9s,{children:[g!=null&&Zt.jsx(E_,{signedInUser:g,currentTenant:e,isSettingsFeatureEnabled:!0,onLogOutClick:F,onMyProfileClick:R,onCockpitClick:_}),Zt.jsx(B9s,{onClick:N,children:Zt.jsx(P9s,{})})]})]})});return{isOpen:w,open:$,close:j,drawerElement:P}}const I9s=a.div`
|
|
90899
|
+
`,gz=$At(Bun()),Mbs=["sandbox","production"],Obs=["development","staging","production"],JD=()=>Mc==="DEV"||Mc==="QA"||Mc==="PUNE"||Mc==="SUNNYVALE"||Mc==="DELHI"||Mc==="MOHALI",Ije="https://zeni-webapp-dev.uc.r.appspot.com",Mc=Q7("DEV",["DEV","QA","PUNE","SUNNYVALE","DELHI","MOHALI","PROD","NEXT"]),a$s=(e=>Q7(e,Mbs))((e=>{switch(e){case"DEV":case"QA":case"PUNE":case"SUNNYVALE":case"DELHI":case"MOHALI":default:return"sandbox";case"PROD":case"NEXT":return"production"}})(Mc)),Jvt=(e=>Q7(e,Obs))((e=>{switch(e){case"QA":case"PUNE":case"SUNNYVALE":case"DELHI":case"MOHALI":return"staging";case"PROD":case"NEXT":return"production";default:return"development"}})(Mc)),Fbs=(e=>{switch(e){case"QA":case"PUNE":case"SUNNYVALE":case"DELHI":case"MOHALI":return"qa";case"NEXT":return"next";case"PROD":return"production";default:return"development"}})(Mc),Dje=Mc==="DEV"||Mc==="QA"?.2:.8,Aan=Dje,nl={sentryDsn:"",sentryTraceSamplingRate:Dje,sentryProfileSamplingRate:Aan,webV2MicroServiceEndpoint:"",googleClientId:"",googleMapsAPIKey:"",microsoftClientId:"",mixpanelToken:"",pusherClientSecret:"",pusherCluster:"",currentQBOEnv:"",quickbooksKey:"",appUrl:"",currentFeatureEnv:"",featureClientSecret:"",cardVaultId:"",stripeKey:"",qboRedirectionUrl:"",mixpanelUrl:"",mixpanelHMUrl:""};let O8,BN;function Rbs(){return O8?.aiCfoMicroServiceBaseUrl!=null?`${O8.aiCfoMicroServiceBaseUrl}/1.0/exports`:void 0}function zbs(e){nl.sentryDsn=e.keys.SENTRY_DSN,nl.sentryTraceSamplingRate=e.keys.SENTRY_TRACE_SAMPLE_RATES!=null?parseInt(e.keys.SENTRY_TRACE_SAMPLE_RATES):Dje,nl.sentryProfileSamplingRate=e.keys.SENTRY_PROFILES_SAMPLE_RATES!=null?parseInt(e.keys.SENTRY_PROFILES_SAMPLE_RATES):Aan,nl.googleClientId=e.keys.GOOGLE_CLIENT_ID,nl.googleMapsAPIKey=e.keys.GOOGLE_MAP_KEY,nl.microsoftClientId=e.keys.MICROSOFT_CLIENT_ID,nl.mixpanelToken=e.keys.MIXPANEL_TOKEN,nl.pusherClientSecret=e.keys.PUSHER_CLIENT_SECRET,nl.pusherCluster=e.keys.PUSHER_CLUSTER,nl.quickbooksKey=e.keys.QUICKBOOK_TOKEN,nl.appUrl=e.keys.WEB_ENDPOINT,nl.featureClientSecret=e.keys.STATSIG_CLIENT_SECRET,nl.cardVaultId=e.keys.UNIT_VAULT_ID,nl.stripeKey=e.keys.STRIPE_KEY,nl.qboRedirectionUrl=e.keys.QBO_URL,nl.mixpanelUrl=e.keys.MIXPANEL_URL,nl.mixpanelHMUrl=e.keys.MIXPANEL_HM_URL,BN=e.externalEndPoints,O8=e.apiEndPoints,(function(n,i){const r=new Set,s=[...Object.values(n),...Object.values(i)];for(const l of s)if(typeof l=="string"&&l.length>0)try{r.add(new URL(l).origin)}catch{}for(const l of r){if(document.querySelector(`link[rel="preconnect"][href="${l}"]`)!=null)continue;const c=document.createElement("link");c.rel="preconnect",c.href=l,document.head.appendChild(c)}})(O8,BN)}let Xvt=!1;function CI(){Xvt||(jg.init("63d3a2406505a5737a2b4debdb513f20",{api_host:BN.mixpanelBaseUrl,ignore_dnt:!0,store_google:!1,track_marketing:!1}),Xvt=!0)}const Nbs=new Set(Array.from(Bi.EVENTS_WITHOUT_SUPER_PROPERTIES));let eAt=!1,tAt=!1;function w8e(){if(eAt)return;eAt=!0,CI();const e=Bi.extractUtmParamsFromUrl();Object.keys(e).length>0&&jg.register(e),JD()&&console.log(`[UTM] first-touch bootstrap: ${JSON.stringify(e)}`)}const _bs=new Set(["dclid","fbclid","gclid","ko_click_id","li_fat_id","msclkid","sccid","ttclid","twclid","wbraid"]);function Vbs(){const e=(function(){return jg?.persistence?.props??null})();if(e==null)return;const n=Object.keys(e).filter((i=>i.startsWith("utm_")||_bs.has(i)));for(const i of n)jg.unregister(i);JD()&&n.length>0&&console.log(`[UTM] cleared from cookie: ${JSON.stringify(n)}`)}function nAt(){tAt||(tAt=!0,Vbs())}class pD{identify(n,i){if(CI(),this.#t=n,n!=null&&i!=null&&(pD.#e==null||!rdn({userId:n,traits:i},pD.#e))){const{$email:r,...s}={...i};jg.identify(n),r&&r!=null&&jg.people.set_once({$email:r}),jg.people.set(s),pD.#e={userId:n,traits:i},JD()&&console.log(`*** Called people set with userId ${n} traits ${JSON.stringify(i)} `)}}identifyUserAndCompany(n,i,r,s,l){throw Error("Use identify in the web-app!!")}track(n,i){CI();const r=Nbs.has(n);if(this.#t!=null||r){if(w8e(),this.#t!=null){const s={distinct_id:this.#t,...i};jg.track(n,s)}else jg.track(n,i);if(nAt(),JD()){const s=this.#t!=null?`*** firing ${n} with props ${JSON.stringify(i)}`:`*** firing ${n} (unidentified user, in allowlist) with props ${JSON.stringify(i)}`;console.log(s)}}else console.error("Either User is not identified :( or this event is not in allowlist, so can not fire event.")}trackWithoutUserId(n,i){CI(),w8e(),jg.track(n,i),nAt(),JD()&&console.log(`*** firing ${n} (unidentified user) with props ${JSON.stringify(i)}`)}alias(n,i){CI(),jg.alias(n,i)}reset(){CI(),jg.identify(void 0),this.#t=void 0,pD.#e=void 0}static#e;#t}const C8e=new pD,San=new Bi.Analytics(C8e);San.trackWithoutUserId=C8e.trackWithoutUserId.bind(C8e);const f0=San,Hbs="openAiCfoScope",v8e="openAiCfoScopeOnDashboard";function s$s(e){const{location:n,navigate:i,mergeState:r}=e;i({pathname:n.pathname,search:n.search,hash:n.hash},{replace:!0,state:{...n.state,[v8e]:!0,...r}})}function l$s(e){const n=une(e);if(n.createSessionAndSubmitState.fetchState==="In-Progress")return!0;const i=n.uiState?.currentChatSessionId;return i!=null&&n.responseStateByChatSessionId?.[i]?.answer?.fetchState==="In-Progress"}function Tje(e,n){const i=n!=null?e.find((d=>d.chatSession.chatSessionId===n)):void 0,r=i?.questionAnswers??[],s=r[r.length-1],l=s?.responses.answer?.content?.summarizedTitle??"";return{currentChatSession:i?.chatSession,currentQuestionAnswer:s,currentQuestionAnswerSummary:l,currentChatSessionWithMessages:i,currentSessionQuestionAnswers:r}}function kan(e,n){return(e||n?.chatSessionSummary)??null}const jan="ZENI_AI_CFO_UPLOAD_PROMO_SEEN",Zte="zeni-ai-cfo-upload-promo-storage-changed",Br=new class{_isZeniUserCache;getSignedInUser(){const e=window.localStorage.getItem(this.ZENI_SESSION_ID);if(e!=null)return this.readEncryptedJSON(this.ZENI_SIGNED_IN_USER,e)}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_SESSION_ID);return e!=null&&(this.readEncryptedJSON(this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS,e)??!1)}getShowNegativeAmountInParenthesisPDF(){const e=window.localStorage.getItem(this.ZENI_SESSION_ID);return e==null||(this.readEncryptedJSON(this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF,e)??!0)}getSignedInUserTenant(e){return this.getSignedInUserTenants()?.find((n=>n.tenantEmailDomain===e))}getSignedInUserTenantWithId(e){return this.getSignedInUserTenants()?.find((n=>n.tenantId===e))}getActiveTenantForUser(){const e=window.localStorage.getItem(this.ZENI_SESSION_ID);if(e==null)return;const n=this.readEncryptedString(this.ZENI_ACTIVE_TENANT_DOMAIN,e);return n!=null?this.getSignedInUserTenants()?.find((i=>i.tenantEmailDomain===n)):void 0}getForceRefreshedComponents(){const e=window.localStorage.getItem(this.ZENI_SESSION_ID);return e==null?[]:this.readEncryptedJSON(this.ZENI_FORCE_REFRESHED_COMPONENTS,e)??[]}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.getItem(this.ZENI_SESSION_ID)!==n&&this.clearSessionKeyedEntries(),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 i=n??window.localStorage.getItem(this.ZENI_SESSION_ID);i!=null?window.localStorage.setItem(this.ZENI_SIGNED_IN_USER_TENANTS,this.encrypt(JSON.stringify(e),i)):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(){return this.readOtpToken(this.ZENI_OTP_TOKEN)}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 i=window.localStorage.getItem(this.ZENI_TREASURY_POPUP_SEEN);let r={};if(i!=null)try{const s=JSON.parse(i);r=s!==null&&typeof s=="object"?s:{}}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 i=window.localStorage.getItem(this.ZENI_CARD_POLICY_POPUP_SEEN);let r={};if(i!=null)try{const s=JSON.parse(i);r=s!==null&&typeof s=="object"?s:{}}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 i=JSON.parse(n);return i!==null&&typeof i=="object"&&i[e]===!0}catch{return window.localStorage.removeItem(this.ZENI_AI_CFO_UPLOAD_PROMO_SEEN),window.dispatchEvent(new CustomEvent(Zte)),!1}return!1}saveAiCfoUploadPromoSeen(e,n){const i=window.localStorage.getItem(this.ZENI_AI_CFO_UPLOAD_PROMO_SEEN);let r={};if(i!=null)try{const s=JSON.parse(i);r=s!==null&&typeof s=="object"?s:{}}catch{r={}}r[e]=n,window.localStorage.setItem(this.ZENI_AI_CFO_UPLOAD_PROMO_SEEN,JSON.stringify(r)),window.dispatchEvent(new CustomEvent(Zte))}savePayNowInfoTooltip(e,n){const i=n??window.localStorage.getItem(this.ZENI_SESSION_ID);i!=null&&window.localStorage.setItem(this.ZENI_PAY_NOW_INFO_TOOLTIP,this.encrypt(JSON.stringify(e),i))}getPayNowInfoTooltip(){const e=window.localStorage.getItem(this.ZENI_SESSION_ID);if(e!=null)return this.readEncryptedJSON(this.ZENI_PAY_NOW_INFO_TOOLTIP,e)}saveZeniOtpTokenForCardHolder(e,n){const i=window.localStorage.getItem(this.ZENI_SESSION_ID);i!=null&&window.localStorage.setItem(`${this.ZENI_OTP_TOKEN}_${n}`,this.encrypt(JSON.stringify(e),i))}getZeniOtpTokenForCardHolder(e){return this.readOtpToken(`${this.ZENI_OTP_TOKEN}_${e}`)}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(){return this.readEncryptedString(this.ZENI_LAST_USED_MAGIC_LINK_TOKEN,"7f8a2b9c4d1e6f3a8b5c2d9e4f7a1b6c")??null}saveMagicLinkEmail(e){window.localStorage.setItem(this.ZENI_MAGIC_LINK_EMAIL,this.encrypt(e,"7f8a2b9c4d1e6f3a8b5c2d9e4f7a1b6c"))}getMagicLinkEmail(){return this.readEncryptedString(this.ZENI_MAGIC_LINK_EMAIL,"7f8a2b9c4d1e6f3a8b5c2d9e4f7a1b6c")??null}encrypt(e,n){return gz.AES.encrypt(e,n).toString()}decrypt(e,n){try{const i=gz.AES.decrypt(e,n).toString(gz.enc.Utf8);return i===""?void 0:i}catch{return}}readEncryptedString(e,n){const i=window.localStorage.getItem(e);if(i==null)return;const r=this.decrypt(i,n);return r==null&&window.localStorage.removeItem(e),r}readEncryptedJSON(e,n){const i=this.readEncryptedString(e,n);if(i!=null)try{const r=JSON.parse(i);return r===null?void window.localStorage.removeItem(e):r}catch{return void window.localStorage.removeItem(e)}}getSignedInUserTenants(){const e=window.localStorage.getItem(this.ZENI_SESSION_ID);if(e!=null)return this.readEncryptedJSON(this.ZENI_SIGNED_IN_USER_TENANTS,e)}readOtpToken(e){const n=window.localStorage.getItem(this.ZENI_SESSION_ID);if(n==null)return;const i=this.readEncryptedJSON(e,n);if(i!=null){if(i.expiry!=null)return{...i,expiry:pn(i.expiry.toString())};window.localStorage.removeItem(e)}}clearSessionKeyedEntries(){this.SESSION_KEYED_IDs.forEach((e=>window.localStorage.removeItem(e))),Object.keys(window.localStorage).filter((e=>e.startsWith(`${this.ZENI_OTP_TOKEN}_`))).forEach((e=>window.localStorage.removeItem(e)))}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=jan;SESSION_KEYED_IDs=[this.ZENI_SIGNED_IN_USER_TENANTS,this.ZENI_ACTIVE_TENANT_DOMAIN,this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS,this.ZENI_SHOW_NEGATIVE_AMOUNT_IN_PARENTHESIS_PDF,this.ZENI_OTP_TOKEN,this.ZENI_FORCE_REFRESHED_COMPONENTS];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]},oL=(e,n)=>{const i=[...e??[]];return i.push(n),i},c$s=e=>{const n=[...e??[]];return{poppedPathname:n.pop(),newStack:n}},d$s=({state:e})=>Br.isSignedIn()===!0?Zt.jsx(_sn,{}):Zt.jsx(TAt,{to:"/signin/auth",replace:!0,state:{...e,message:"...",origin:window.location.pathname}}),Ubs=["aiCfoInitialQuestion","aiCfoShouldSubmit","aiCfoInitialSubmissionSource","aiCfoSuggestionIndex"];function $an(e){if(e==null)return{message:"",origin:""};const n={...e};for(const i of Ubs)delete n[i];return n}function Wbs(){const e=Kp(),n=d2(),i=ene(),{tenantEmailDomain:r}=LAt(),[s,l]=m.useState(!1),c=qr((v=>v.tenantState.fetchState==="Completed"||v.tenantState.activeTenantFetchState.fetchState==="Completed"?xm(v):void 0)),d=c?.masterTOSInfo?.isMasterTOSAccepted??!1,u=qr((v=>une(v))),p=m.useRef(null),[h,g]=m.useState(!1);m.useEffect((()=>{const v=n.state;if(v?.[v8e]!==!0)return;const A=v.aiCfoInitialQuestion;!d&&typeof A=="string"&&A.length>0&&(p.current={question:A,submissionSource:typeof v.aiCfoInitialSubmissionSource=="string"?v.aiCfoInitialSubmissionSource:void 0,suggestionIndex:typeof v.aiCfoSuggestionIndex=="number"?v.aiCfoSuggestionIndex:void 0}),g(d),l(!0),i({pathname:n.pathname,search:n.search,hash:n.hash},{replace:!0,state:{...$an(v),[v8e]:void 0}})}),[n.state,n.pathname,n.search,n.hash,d]);const f=m.useCallback((()=>{const v=p.current;if(v==null||r==null)return!1;p.current=null;const A=n.state,S=oL(A?.pathnameStackToGoBack,n.pathname);return i(`/${r}/ai-cfo/explore`,{state:{message:"",origin:"",pathnameStackToGoBack:S,referrer:A?.referrer??"Dashboard",aiCfoInitialQuestion:v.question,aiCfoShouldSubmit:!0,...v.submissionSource!=null?{aiCfoInitialSubmissionSource:v.submissionSource}:{},...v.suggestionIndex!=null?{aiCfoSuggestionIndex:v.suggestionIndex}:{}}}),!0}),[n.pathname,n.state,i,r]),x=_t(d);m.useEffect((()=>{s&&d&&x===!1&&(l(!1),f())}),[s,d,x,f]);const y=m.useCallback((()=>{if(f()||r==null)return;const v=oL(n.state?.pathnameStackToGoBack,n.pathname);i(`/${r}/ai-cfo/explore`,{state:{pathnameStackToGoBack:v,referrer:n.state?.referrer??"Navigation"}})}),[n.pathname,n.state,i,f,r]),b=m.useCallback((()=>{l(!1),y()}),[y]),w=m.useCallback((()=>{p.current=null,l(!1)}),[]),C=m.useCallback((()=>{d||c?.userRoleId==null?(l(!1),f()):e(jSt(c.userRoleId))}),[e,d,c?.userRoleId,f]);return Zt.jsx(ean,{open:s,onClose:w,children:Zt.jsxs(Xrn,{children:[s&&!h?Zt.jsx($Ae,{analytics:f0,onLoad:v=>h?null:v.trackAICFOOnboardingScreenStateChanged("open","first_visit")}):null,Zt.jsx(Pye,{acceptMasterTOSState:u.masterTOSAcceptanceState,isTOSAccepted:h,showHeader:!1,togglePageView:h?b:void 0,onCloseClick:w,onCompleteClick:C})]})})}const A8e=m.createContext(void 0);function Lje(){const e=m.useContext(A8e);if(e===void 0)throw new Error("useAiCfoPanelOpen must be used within AiCfoPanelOpenContext.Provider");return e}const Bje=["/:tenantEmailDomain/reports/*","/:tenantEmailDomain/reports"],Pje=["/:tenantEmailDomain/forecast/*","/:tenantEmailDomain/forecast"],Ean=["/:tenantEmailDomain/dashboard/*","/:tenantEmailDomain/dashboard"],Ian=["/:tenantEmailDomain/checking/*","/:tenantEmailDomain/checking"],Dan=["/:tenantEmailDomain/treasury/*","/:tenantEmailDomain/treasury"],Tan=["/:tenantEmailDomain/cards/*","/:tenantEmailDomain/cards"],Lan=["/:tenantEmailDomain/people/*","/:tenantEmailDomain/people"],Ban=["/:tenantEmailDomain/rewards/*","/:tenantEmailDomain/rewards"],Pan=["/:tenantEmailDomain/notifications/*","/:tenantEmailDomain/notifications"];function Man(e){const n=(e??"").replace(/\/$/,"").split("/").filter(Boolean);if(n.length<2)return!1;for(let i=1;i<n.length;i+=1)if(n[i]==="transaction")return!0;return!1}const Oan=["/:tenantEmailDomain/performance/*","/:tenantEmailDomain/performance"],Fan=["/:tenantEmailDomain/bill/*","/:tenantEmailDomain/bill"],Ran=["/:tenantEmailDomain/reimbursement/*","/:tenantEmailDomain/reimbursement"],Qbs=[...Ean,...Bje,...Pje,"/: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",...Oan,...Fan,...Ran,...Ian,...Dan,...Tan,...Lan,...Ban,...Pan];function zan(){const{pathname:e}=d2(),n=e??"";return Qbs.some((i=>$8e(i,n)!=null))||Man(e)}function ou(e){const{pathname:n}=d2(),i=n??"";return e.some((r=>$8e(r,i)!=null))}const u$s=27.22,Nan=m.createContext(null),_an={APP_INITIALIZATION:"app-init",TENANT_SWITCHING:"tenant-switch",TENANT_FETCHING:"tenant-fetch",CONNECTION_AUTH:"connection-auth"};function Ybs({children:e}){const[n,i]=m.useState((()=>new Set([]))),r=n.size>0,s=m.useCallback((d=>{i((u=>{if(u.has(d))return u;const p=new Set(u);return p.add(d),p}))}),[]),l=m.useCallback((d=>{i((u=>{if(!u.has(d))return u;const p=new Set(u);return p.delete(d),p}))}),[]),c={isLoading:r,activeLoadingStates:n,setLoading:s,clearLoading:l,clearAllLoading:m.useCallback((()=>{i(new Set)}),[])};return Zt.jsx(Nan.Provider,{value:c,children:e})}function Mje(){const e=m.useContext(Nan);if(!e)throw new Error("useLoading must be used within a LoadingProvider");return e}function Gbs(e,{currentChatSessionId:n,isAiCardCreationEnabled:i,isCardPolicyEnabled:r,onAfterCardPolicySubmit:s,onAfterCardsCreationSubmit:l}){return{onCardsCreationFormChange:i?c=>{e(pdn(c))}:void 0,onCardsCreationFormSubmit:i?(c,d)=>{const u=cdn(c);u.length!==0&&(e(ddn(u)),e(udn({sourceChatSessionId:n})),n!=null&&e(s$e({chatSessionId:n,id:p$e(),kind:"creating_cards",createdAt:pn(""),sourceQuestionAnswerId:d})),l?.())}:void 0,onCardPolicyFormChange:r?c=>{e(ldn(c))}:void 0,onCardPolicyFormSubmit:r?(c,d)=>{const u=(({values:p,mode:h="strict",description:g=""})=>{const f=Nda(p),x={description:g.trim(),mode:h,name:f.trim()};if(p.policyKind==="auto"||p.policyKind==="upload"){const v=p.policiesReview.find((A=>A.isChecked))??p.policiesReview[0];return v==null?{...x,allowedEntity:{categoryCodes:[],merchantNames:[]},applyToCards:[],blockedEntity:{categoryCodes:[],merchantNames:[]},requiredReceiptThreshold:null,spendLimits:{transaction:null}}:{...x,...zda(v)}}const y=pte(p.vendorPolicy,"allow"),b=pte(p.vendorPolicy,"block"),w=hte(p.categoryPolicy,"allow"),C=hte(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:mte(p.limits,Lke),spendLimits:{transaction:mte(p.limits,Tke)}}})({values:c});e(sdn({templates:[u],sourceChatSessionId:n})),n!=null&&e(s$e({chatSessionId:n,id:p$e(),kind:"creating_policy",createdAt:pn(""),sourceQuestionAnswerId:d})),s?.()}:void 0,onCardPolicyUploadDocument:r?(c,d,u)=>{c.length!==0&&e(adn(c,d,u))}:void 0,onCardPolicyRemoveDocument:r?()=>{e($St())}:void 0}}const qbs=e=>vdn(e,!1),Kbs=e=>Cdn(e.name,!1);function Zbs(e,{allUsers:n,onCardPolicyVendorSearchTextChange:i}){const r=e.cardPolicyState,s=hdn(r),l=mdn(r),c=gdn(r),{creditAccount:d}=fdn(e,!1,!1,!1),u=d.fetchState==="Completed"&&d.limit.amount>0?d.limit.amount:void 0;return{allUsers:n,cardPolicyCategorySearchOptions:s.map(qbs),cardPolicyVendorSearchOptions:l.map(Kbs),cardPolicyIsVendorSearchLoading:c==="In-Progress",cardPolicyDocumentUploadState:wdn(r),cardPolicyUploadedFileName:bdn(r),cardPolicyFormDraft:ydn(e.createCardPolicyState),cardsCreationFormDraft:xdn(e),cardsCreationMaxLimitAmount:u,onCardPolicyVendorSearchTextChange:i}}const Jbs=e=>{const n=ae.currencyFormatter(0);return i=>{const r=Sdn(e.chargeCardState,i);if(r==null)return;const s=kdn(e.userState,r.cardHolderUserId),l=((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??""})(s?.firstName,s?.lastName,s?.email),c=r.limit?.amount,d=typeof c=="number"&&Number.isFinite(c)?n.format(c):"";return{cardName:r.cardName,ownerName:l,recommendedLimitFormatted:d,owner:s}}},Xbs=e=>n=>{const i=Adn(e.cardPolicyState,n);if(i==null)return;const r=i.cardsCount>0?i.cardsCount:i.appliedCards.length,s=i.allowedEntity.merchantNames.length+i.blockedEntity.merchantNames.length,l=i.allowedEntity.categoryCodes.length+i.blockedEntity.categoryCodes.length;return{name:i.name,description:i.description,cardsCount:r,vendorRestrictionsCount:s,categoryRestrictionsCount:l}};function e9s(){const e=Kp(),{useFeatureGate:n}=us(),{isFeatureEnabled:i}=n(Gr.isAiCardCreationEnabled),{isFeatureEnabled:r}=n(Gr.isCardPolicyEnabled),{isCardsEnabledOnCompany:s,isChargeCardEnabledOnCompany:l}=qr((p=>{const h=xm(p).company;return{isCardsEnabledOnCompany:!!h?.companyChargeCardInfo?.isChargeCardEnabled||!!h?.companyDebitCardInfo?.isDebitCardEnabled,isChargeCardEnabledOnCompany:!!h?.companyChargeCardInfo?.isChargeCardEnabled}}),VZ);m.useEffect((()=>(s&&(e(jdn()),e(l$e()),e($dn("cardHolderCandidate",!1)),e(Edn(!1,!1,!1)),l&&e(Idn())),()=>{e($St())})),[e,s,l]);const c=m.useMemo((()=>Lun((p=>{e(l$e(p))}),250)),[e]);m.useEffect((()=>()=>{c.cancel()}),[c]);const d=m.useCallback((p=>{c(p)}),[c]),u=qr((p=>Ddn(p.userState,p.userRoleState,p.userListViewState,"cardHolderCandidate").users),VZ);return{allUsers:m.useMemo((()=>u.map((p=>p.user)).filter((p=>p!=null))),[u]),isAiCardCreationEnabled:i,isCardPolicyEnabled:r,onCardPolicyVendorSearchTextChange:d}}const Van=["/:tenantEmailDomain/dashboard/accounts_payable_aging/*","/:tenantEmailDomain/dashboard/accounts_payable_aging"],Han=["/:tenantEmailDomain/dashboard/accounts_receivable_aging/*","/:tenantEmailDomain/dashboard/accounts_receivable_aging"],t9s=["/:tenantEmailDomain/dashboard/cash_in_cash_out/*","/:tenantEmailDomain/dashboard/cash_in_cash_out"],n9s=["/:tenantEmailDomain/dashboard/operating_expenses/*","/:tenantEmailDomain/dashboard/operating_expenses"],i9s=["/:tenantEmailDomain/dashboard/revenue/*","/:tenantEmailDomain/dashboard/revenue"],o9s=["/:tenantEmailDomain/dashboard/net_burn_or_income/*","/:tenantEmailDomain/dashboard/net_burn_or_income"],r9s=["/:tenantEmailDomain/dashboard/cash_position/*","/:tenantEmailDomain/dashboard/cash_position"],Uan=["/:tenantEmailDomain/dashboard/cash_balance/*","/:tenantEmailDomain/dashboard/cash_balance"],Wan=["/:tenantEmailDomain/dashboard/card_balance/*","/:tenantEmailDomain/dashboard/card_balance"],a9s=["transaction_categorization","je_schedules","reconciliation","missing_receipts","flux_analysis","month_end_insights"];function Oje(e){const n=lm(e),i=n.indexOf("review");if(i<2||n[i-1]!=="month_end_close_checks")return null;if(i===n.length-1)return"overview";const r=n[i+1];return r==null?"overview":a9s.includes(r)?r:null}const s9s=new Set(["approval-rules",...new Set(["setup","verification","promo","international-wire"])]),l9s=new Set(["setup","verification","promo","approval-rules"]);function lm(e){return e.replace(/\/$/,"").split("/").filter(Boolean)}function Fje(e){const n=lm(e),i=n[1]==="vendors"?1:-1;if(i<0||n.length<i+2)return;const r=n[i+1];if(r==="summary")return"vendors";if(r==="opex")return"opex_by_vendor";if(r==="schedules"){const s=n[i+2];return s==="prepaid_expenses"?"prepaid_expenses":s==="fixed_assets"?"fixed_assets":s==="accrued_expenses"?"accrued_expenses":void 0}return r==="filing_1099"?"form_1099":void 0}function Qan(e,n,i){const r=lm(e);return!(r.length<2||r[1]!==n)&&(r.length===2||i(r[2]))}function Yan(e,n,i){return Qan(e,n,(r=>!i.has(r)))}function Gan(e){return Yan(e,"bills",s9s)}function qan(e){return Yan(e,"reimbursements",l9s)}function Kan(e){return Qan(e,"tasks",(n=>n==="group"))}const c9s=new Set(["setup","verification","promo","transfer","check-deposit","express-pay"]),d9s=new Set(["setup","verification","promo","payment","payment-history","onboard","activate","new"]);function Rje(e){const n=lm(e);if(n[1]!=="checking")return;if(n.length<=2)return"checking";const i=n[2];return c9s.has(i)?"checking":"checking_details"}function zje(e){const n=lm(e);if(n[1]!=="cards")return;if(n.length<=2)return"cards";const i=n[2];if(i==="policy"){const r=n[3];return r==null?"card_policy":r==="new"?void 0:"card_policy_detail"}return d9s.has(i)?"cards":"cards_detail"}function Zan(e){const n=lm(e),i=n.indexOf("transaction");if(!(i<1||n.length<i+3))return"transaction_details"}function Jan(e){return lm(e)[1]==="performance"?"performance":void 0}function Xan(e){const n=lm(e);if(!(n[1]!=="bill"||n.length<3)&&n[2]!=="new")return"bills_details"}function esn(e){const n=lm(e);if(!(n[1]!=="reimbursement"||n.length<3)&&n[2]!=="new")return"reimbursement_details"}function lf(e,n){return n.some((i=>$8e(i,e)!=null))}function u9s(e){return lf(e,Bje)?"reports":lf(e,Van)?"ap_aging":lf(e,Han)?"ar_aging":Fje(e)!=null?"vendors_tab":lf(e,Pje)?"forecast":Oje(e)!=null?"month_end_close_review":lf(e,Uan)?"cash_balance":lf(e,Wan)?"card_balance":Kan(e)?"task_checklist":Zan(e)!=null?"transaction_detail":Jan(e)!=null?"performance":Xan(e)!=null?"bills_detail":esn(e)!=null?"reimbursement_detail":Gan(e)?"bills_list":qan(e)?"reimbursement_list":lf(e,t9s)?"cash_in_cash_out":lf(e,n9s)?"operating_expenses":lf(e,i9s)?"revenue":lf(e,o9s)?"net_burn_or_income":lf(e,r9s)?"cash_position":(function(n){const i=lm(n);return i.length===2&&i[1]==="dashboard"})(e)?"dashboard":Rje(e)!=null?"checking":(function(n){return lm(n)[1]==="treasury"?"treasury":void 0})(e)!=null?"treasury":zje(e)!=null?"cards":(function(n){return lm(n)[1]==="people"?"people":void 0})(e)!=null?"people":(function(n){return lm(n)[1]==="rewards"?"rewards":void 0})(e)!=null?"rewards":(function(n){return lm(n)[1]==="notifications"?"notifications":void 0})(e)!=null?"notifications":"none"}function tsn(e,n){switch(u9s(e)){case"reports":{const i=n?.selectedReportId;return i==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}})(i)}case"ap_aging":return"accounts_payable";case"ar_aging":return"accounts_receivable";case"vendors_tab":return Fje(e);case"forecast":return"forecast";case"month_end_close_review":{const i=Oje(e);return i==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"}})(i)}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 Rje(e);case"treasury":return"treasury";case"cards":return zje(e);case"people":return"people";case"rewards":return"rewards";case"notifications":return"notifications";default:return}}function nsn(){const{pathname:e}=d2(),n=e??"",i=qr((r=>r.financeStatementState?.selectedReportId));return m.useMemo((()=>tsn(n,{selectedReportId:i})),[n,i])}function Nje(){const{useFeatureGate:e}=us(),{isFeatureEnabled:n}=e(Gr.isAiCfoEnabled),i=qr((s=>xm(s))),r=Br.getSignedInUser();return r!=null&&r.userId!=null&&i!=null&&i.companyId!=null&&n}function p9s(){const{useFeatureGate:e}=us(),{isFeatureEnabled:n}=e(Gr.isAiCfoNavButtonEnabled),i=Nje();return n&&i}const isn=m.createContext(void 0),h9s=({children:e})=>{const{tenantEmailDomain:n}=LAt(),i=n!=null?Br.getSignedInUserTenant(n):void 0,r=qr((u=>xm(u))),s=pne().tenantId,l=i?.tenantId,c=r?.tenantId,d=m.useMemo((()=>l!=null&&l===c&&c===s),[l,c,s]);return Zt.jsx(isn.Provider,{value:{areTenantIdsInSync:d,tenantIdFromEmailDomain:l,currentTenantId:c,tenantIdFromConfig:s},children:e})},m9s=()=>{const e=m.useContext(isn);if(!e)throw new Error("useTenantSync must be used within a TenantSyncProvider");return e};function osn(e,n){return e!=="In-Progress"&&!(e==="Completed"&&!n)&&!(e==="Error"&&!n)}function rsn(e){const{areTenantIdsInSync:n}=m9s(),i=Nje(),r=p9s();return n&&e&&r&&i}function p$s(e){const{pageContexts:n,canFetchSuggestedQuestions:i}=e,r=Kp(),s=BAt(),l=m.useRef(null);m.useEffect((()=>{const c=l.current===!1&&i===!0;if(l.current=i,i&&n!=null&&n.length!==0)for(const d of n){const u=Y8e(s.getState(),d)?.fetchState;osn(u,c)&&r(ISt({pageContext:d}))}}),[i,r,n,s])}function asn(e){(function(n){const{pageContext:i,canFetchSuggestedQuestions:r,noCardCreated:s}=n,l=Kp(),c=BAt(),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!==s;if(u.current=s,i==null||!r)return;const g=Y8e(c.getState(),i)?.fetchState;osn(g,p||h)&&l(ISt({pageContext:i,noCardCreated:s}))}),[r,l,s,i,c])})({canFetchSuggestedQuestions:rsn(e.isDataReady),pageContext:e.pageContext,noCardCreated:e.noCardCreated})}function h$s(e){asn({pageContext:nsn(),isDataReady:e.isDataReady,noCardCreated:e.noCardCreated})}const{questionTemplates:{sampleQuestion1:g9s,sampleQuestion2:f9s,sampleQuestion3:x9s}}=ae.getLocalizedStrings().aiCfo,y9s=[g9s,f9s,x9s];function b9s(e,n=!1){asn({isDataReady:!0,pageContext:e!=null&&e!==""?e:void 0});const i=rsn(!0),r=qr((g=>e!=null&&e!==""?Y8e(g,e):void 0)),{useDynamicConfig:s}=us(),{configValue:l}=s(J7.aiCfoMessageDynamicConfig),c=m.useMemo((()=>Array.isArray(l?.default_message_list)?[...l.default_message_list]:[]),[l?.default_message_list]),d=m.useMemo((()=>c.length>0?c:[...y9s]),[c]),u=e!=null&&e!=="",p=u&&i&&(r==null||r.fetchState!=="Completed"&&r.fetchState!=="Error"),h=m.useMemo((()=>{if(!u||!i)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}),[i,d,u,p,r?.fetchState,r?.suggestedQuestions]);return{isSuggestedQuestionsLoading:!n&&p,suggestedPromptQuestions:m.useMemo((()=>n?[]:h),[n,h])}}function w9s({isFileUploadEnabled:e,tenantEmailDomain:n}){const i=m.useCallback((()=>e===!0&&n!=null&&!Br.getAiCfoUploadPromoSeen(n)),[e,n]),[r,s]=m.useState(i);return m.useEffect((()=>{s(i())}),[i]),m.useEffect((()=>{const l=()=>{s(i())};window.addEventListener(Zte,l);const c=d=>{d.key===jan&&l()};return window.addEventListener("storage",c),()=>{window.removeEventListener(Zte,l),window.removeEventListener("storage",c)}}),[i]),{isUploadPromoVisible:r,handleUploadPromoClose:m.useCallback((()=>{n!=null&&Br.saveAiCfoUploadPromoSeen(n,!0),s(!1)}),[n])}}const ssn=m.createContext(void 0),Jte=()=>m.useContext(ssn),iAt=e=>{e!=null&&(e.channels.all().forEach((n=>{e.unsubscribe(n.name)})),e.disconnect())},C9s=e=>{const n=Br.isSignedIn(),i=Br.getSignedInUser(),[r,s]=m.useState(void 0),l=m.useRef(void 0),c=m.useMemo((()=>r),[r]),d=qr((h=>xm(h))),u=d.companyId,p=d.userRoleId;return m.useEffect((()=>{let h,g=!1;if(n&&d.tenantId!=null&&i?.userId!=null&&i.zeniSessionId!=null){iAt(l.current),l.current=void 0,s(void 0);const f=i.userId,x=d.tenantId,y=i.zeniSessionId,b=async()=>{if(g)return;let C;try{C=await Mdn(nl.pusherClientSecret,{cluster:nl.pusherCluster},{userId:f,tenantId:x,sessionId:y},!0)}catch(v){return void console.warn("Failed to initialize Pusher",v)}g?C?.disconnect():(l.current=C,s(C),C!=null&&(u!=null&&XD(C,u),f!=null&&XD(C,f),p!=null&&XD(C,p)))},w=()=>{const C=pne();return C.tenantId===x&&C.userId===f&&C.sessionId===y};if(w())b();else{let C=0;h=setInterval((()=>{g||(C++,w()?(clearInterval(h),b()):C>=30&&(clearInterval(h),LSt(f,y,x),b()))}),100)}}return()=>{g=!0,h!=null&&clearInterval(h),iAt(l.current),l.current=void 0}}),[n,d.tenantId,i?.userId,i?.zeniSessionId]),Zt.jsx(ssn.Provider,{value:c,children:e.children})};function XD(e,n){const i=`private-encrypted-${n}`,r=e.channel(i);if(r?.subscribed===!0)return r;const s=e.subscribe(i);return s.bind("pusher:subscription_error",(l=>{console.warn("Pusher Channel Connection Subscription Error",l)})),s}const v9s=e=>{const n=e.indexOf(".");return n===-1?[e,""]:[e.slice(0,n),e.slice(n+1)]},lsn=e=>n=>{const i=Jte(),r=m.useRef(n.eventCallback),s=m.useRef(n.onSubscribed),l=m.useRef({}),c=m.useRef(0);m.useEffect((()=>{r.current=n.eventCallback,s.current=n.onSubscribed;const{events:u,eventCallback:p,onSubscribed:h,...g}=n;l.current=g}),[n]);const d=m.useMemo((()=>[...n.events].sort().join("|")),[n.events]);return m.useEffect((()=>{if(i!=null){const{events:u}=n,p=[];if(u.length===0)return;const h=new Set,g=()=>{if(s.current==null)return;const f=Date.now();f-c.current<5e3||(c.current=f,s.current(l.current))};return u.forEach((f=>{const[x,y]=v9s(f);if(y==="")return;const b=i.channel(x),w=v=>{r.current(y,v,l.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??i.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()))}}}),[i,d]),Zt.jsx(e,{...n})},m$s=210;function g$s(e){return e?.data.unread!=null&&e?.mode!=null}const _je=e=>d0i.includes(e),Vje=e=>ezt.includes(e),Hje=e=>u0i.includes(e),A9s={invoicing_settings_branding:"invoicing/settings/branding",invoicing_settings_dunning:"invoicing/settings/dunning",invoicing_settings_integrations:"invoicing/settings/integrations",invoicing_settings_payment_destination:"invoicing/settings/payment-destination",invoicing_settings_quickbooks:"invoicing/settings/quickbooks"},S9s=e=>{if(Hje(e)){const n=A9s[e];return n??`invoicing/${e.replace("invoicing_","")}`}return _je(e)?`settings/${e}`:e==="home"?"dashboard":e==="users_and_roles"?"people":e==="task_checklist"?"tasks":e==="company_settings"?"settings/company_details":VAe(e)?e==="command_center"?"month_end_close_checks/review":`month_end_close_checks/review/${e}`:Vje(e)?`ai-cfo/${e}`:e},k9s=["dashboard","reports","forecast","vendors","bills","bill","reimbursements","reimbursement","tasks","month_end_close_checks","transaction","performance","checking","treasury","cards","people","rewards","notifications"],f$s=e=>{if(_je(e)||Vje(e)||Hje(e))return!0;const n=S9s(e).split("/")[0];return!k9s.includes(n)},oAt=(e,n)=>e.includes(n),rAt=e=>{switch(e.split("/")[2]){case"invoicing":return(function(n){const i=n.split("/")[3];if(i==="settings")switch(n.split("/")[4]){case"payment-destination":return"invoicing_settings_payment_destination";case"branding":return"invoicing_settings_branding";case"integrations":return"invoicing_settings_integrations";case"dunning":return"invoicing_settings_dunning";case"quickbooks":return"invoicing_settings_quickbooks";default:return"invoicing_settings"}switch(i){case"customers":return"invoicing_customers";case"subscriptions":return"invoicing_subscriptions";case"invoices":return"invoicing_invoices";case"payments":return"invoicing_payments";case"credits":return"invoicing_credits";case"discounts":return"invoicing_discounts";case"dunning":return"invoicing_dunning";case"catalog":return"invoicing_catalog";case"settings":return"invoicing_settings";case"data_import":return"invoicing_data_import";case"audit_log":return"invoicing_audit_log";default:return"invoicing_overview"}})(e);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 i=["accounting","approval_rules","billing","my_bank_connections","bank_connections","business_verification","company_details","integrations","my_profile","notifications"];for(const r of i)if(oAt(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 i=n.split("/"),r=i.indexOf("review"),s=r>=0?i[r+1]:void 0;return s!=null&&VAe(s)?c0i(s):"command_center"})(e);case"ai-cfo":return(function(n){if(n!=null){for(const i of ezt)if(oAt(n,i))switch(i){case"new_chat":return"new_chat";case"explore":return"explore"}}})(e);case"treasury":return"treasury";default:return}};function j9s(e){let n=rAt(e.pathname);if(n==null){const i=[...e.state?.pathnameStackToGoBack??[]].reverse();for(let r=0;r<i.length&&n==null;++r)n=rAt(i[r])}return n??"home"}function x$s(e){return e.pathname.includes("settings")&&!e.pathname.includes("invoicing")}function y$s(e){return e.pathname.split("/")[2]==="invoicing"}function b$s(e){return e.pathname.includes("ai-cfo")}function w$s(e,n){const i=j9s(n);let r;return r=i==="home"?"dashboard":i==="users_and_roles"?"people":Hje(i)?`invoicing/${i.replace("invoicing_","")}`:_je(i)?"settings/my_profile":Vje(i)?`ai-cfo/${i}`:i==="task_checklist"?"tasks":VAe(i)?"month_end_close_checks/review":encodeURIComponent(i),`/${encodeURIComponent(e)}/${r}`}function $9s({dispatch:e,navigate:n,pathToNavigate:i,selectedTenant:r,signedInUser:s}){n(i,{replace:!0}),s!=null&&(e(BSt(r.tenantId)),e(PSt(s.userId,r.tenantId,s.zeniSessionId))),f0.trackCompanySwitch(r.companyId,r.companyName,r.userRole)}function E9s({currentTenant:e,currentChatSessionId:n,aiCfoView:i,skillsEnabled:r,onBeforeNavigate:s,onCloseSkills:l,onOpenSkills:c}){const d=Kp(),u=ene(),p=d2(),{setLoading:h}=Mje(),g=Br.getSignedInUser(),f=ON(g),{useDynamicConfig:x}=us(),{configValue:y}=x(J7.expenseAutomationEnablementZeniUsers),b=Array.isArray(y?.expenseAutomationEnabledCompanies)?y.expenseAutomationEnabledCompanies:[],[w,C]=m.useState(!1),v=qr((L=>L.tenantState)),A=qr((L=>v.fetchState==="Completed"?Odn(L):[])),S=qr((L=>e?.tenantId!=null?Fdn(L,e.tenantId):void 0)),$=m.useCallback((()=>C(!0)),[]),j=m.useCallback((()=>C(!1)),[]),I=m.useCallback((()=>{j(),s?.()}),[j,s]),E=m.useCallback((L=>{if(I(),L.type!=="skills"&&l?.(),L.type==="new_chat"){n!=null&&d(U5e());const V=oL(p.state?.pathnameStackToGoBack,p.pathname);u(`/${e.tenantEmailDomain}/ai-cfo/new_chat`,{state:{pathnameStackToGoBack:V.slice(0,-1),referrer:"Sidebar"}})}else L.type==="skills"?c?.():L.type==="explore"&&(n!=null&&d(U5e()),u(`/${e.tenantEmailDomain}/ai-cfo/explore`,{state:{pathnameStackToGoBack:p.state?.pathnameStackToGoBack}}))}),[I,n,e.tenantEmailDomain,d,p,u,l,c]),D=m.useCallback((L=>{I(),d(ESt({sessionId:L,agentId:"controller"})),u(`/${e.tenantEmailDomain}/ai-cfo/${L}`,{state:{pathnameStackToGoBack:p.state?.pathnameStackToGoBack}})}),[I,e.tenantEmailDomain,d,p,u]),B=m.useCallback((()=>n==null?"new_chat":"ai_cfo"),[n]),F=m.useCallback((()=>{I();const L=oL(p.state?.pathnameStackToGoBack,p.pathname);u("/signout",{replace:!0,state:{pathnameStackToGoBack:L,message:"logout"}})}),[I,p,u]),R=m.useCallback((()=>{I(),u(`/${e.tenantEmailDomain}/settings/my_profile`,{state:{pathnameStackToGoBack:p.state?.pathnameStackToGoBack}})}),[I,e.tenantEmailDomain,p,u]),_=m.useCallback((()=>{I(),window.open("/cockpit")}),[I]),N=m.useCallback((()=>{I(),u(`/${e.tenantEmailDomain}/notifications/tasks`,{state:{pathnameStackToGoBack:p.state?.pathnameStackToGoBack}})}),[I,e.tenantEmailDomain,p,u]),T=m.useCallback((L=>{h(_an.TENANT_SWITCHING),I();const V=L.tenantEmailDomain;$9s({dispatch:d,navigate:u,pathToNavigate:`/${encodeURIComponent(V)}/ai-cfo/explore`,selectedTenant:L,signedInUser:g})}),[I,d,g,u,h]),P=Zt.jsx(_St,{anchor:"left",open:w,onClose:j,PaperProps:{sx:{width:210,backgroundColor:"transparent",borderRight:"none",backgroundImage:"none"}},ModalProps:{keepMounted:!0},children:Zt.jsxs(I9s,{children:[Zt.jsxs(D9s,{children:[Zt.jsx(yHt,{}),Zt.jsx(BHt,{expenseAutomationEnabledCompanies:b,isZeniUser:f,currentTenantId:e?.tenantId??"",tenants:v.fetchState==="Completed"?A:S!=null?[S]:[],onTenantSelect:T})]}),Zt.jsx(T9s,{children:Zt.jsx(CHt,{selectedMenu:B(),aiCfoView:i,isMobile:!0,skillsEnabled:r,onClick:E,updateCurrentChatSessionId:D})}),Zt.jsxs(L9s,{children:[g!=null&&Zt.jsx(E_,{signedInUser:g,currentTenant:e,isSettingsFeatureEnabled:!0,onLogOutClick:F,onMyProfileClick:R,onCockpitClick:_}),Zt.jsx(B9s,{onClick:N,children:Zt.jsx(P9s,{})})]})]})});return{isOpen:w,open:$,close:j,drawerElement:P}}const I9s=a.div`
|
|
90900
90900
|
display: flex;
|
|
90901
90901
|
flex: 1 1 auto;
|
|
90902
90902
|
flex-direction: column;
|
|
@@ -90984,7 +90984,7 @@ ${IO.gap.expectedStartDate(u)}.`:f.description,y=p===!0||d!=null;return t.jsx(Ei
|
|
|
90984
90984
|
display: flex;
|
|
90985
90985
|
min-height: 100%;
|
|
90986
90986
|
flex-direction: column;
|
|
90987
|
-
`,q9s=()=>{const[e,n]=m.useState((()=>Br.getSignedInUser())),i=Kp(),[r,s]=m.useState(!1),[l,c]=m.useState(!1),d=qr((g=>MSt(g).fetchState)),u=qr((g=>xm(g)));m.useEffect((()=>{const g=e!=null&&e.authProvider==="email"&&(!e?.firstName||!e?.lastName||!e.phoneNumber);s(g)}),[e]);const p=m.useCallback((()=>{const g=Br.getSignedInUser();n((f=>JSON.stringify(f)!==JSON.stringify(g)?g:f))}),[]);m.useEffect((()=>(window.addEventListener("completeProfileDone",p),()=>{window.removeEventListener("completeProfileDone",p)})),[]),m.useEffect((()=>{u?.companyId!=null&&d==="Not-Started"&&i(eun(u.companyId))}),[d,u.companyId,i]);const h=m.useMemo((()=>!!e?.firstName&&!e?.phoneNumber),[e]);return Zt.jsxs(m.Fragment,{children:[l&&Zt.jsx(EAe,{showConfetti:!0}),e?.userEmail!=null&&e.authProvider==="email"?Zt.jsx(Y9s,{userEmail:e.userEmail,isCompleteProfileOpen:r,closeDrawerHandler:()=>{s(!1),c(!0)},hasUserEnteredBasicDetails:h}):null]})},sAt="init-enter",K9s=m.memo((function({location:e,visitedUrl:n}){const{pathname:i}=e;return m.useLayoutEffect((()=>{const r=n.get(i||sAt);Z9s(r!==void 0?r:0)})),null}),((e,n)=>{const{location:i,visitedUrl:r}=e,{location:s}=n,l=i.pathname||sAt,c=J9s();return r.set(l,c),!((s.pathname!==i.pathname||s.search!==i.search)&&s.hash==="")})),Z9s=(e=0)=>window.requestAnimationFrame((()=>{window.scrollTo(0,e)})),J9s=()=>{let e=0;return document!=null&&document.documentElement!==null&&(e=document.documentElement.scrollTop),window.pageYOffset||e},Bm=e=>m.lazy((async()=>{const n=e.toString(),i=Br.getForceRefreshedComponents(),r=new Set(i),s=Br.isSignedIn(),l=r.has(n);try{const c=await e();return r.delete(n),s&&Br.saveForceRefreshedComponents(Array.from(r)),c}catch(c){throw l||(r.add(n),s&&Br.saveForceRefreshedComponents(Array.from(r)),location.reload()),c}})),C$s=(e,n,i)=>{const r=M8e(e),s=ane(e),l=O8e(i,e);return(n||i||s||r||l)&&B8e(e.company)},psn=globalThis.window?.location.href.startsWith("https://delhi-dot-zeni"),hsn=globalThis.window?.location.href.startsWith("https://pune-dot-zeni"),msn=globalThis.window?.location.href.startsWith("https://sunnyvale-dot-zeni"),gsn=globalThis.window?.location.href.startsWith("https://dev.app.zeni.ai");function Tc(...e){const n=Mc==="DEV"||Mc==="QA";if(psn||hsn||msn||gsn)return void console.log(...e);const i=globalThis.window!==void 0&&(globalThis.window.location.hostname==="localhost"||globalThis.window.location.hostname==="127.0.0.1")&&globalThis.window.location.port==="3000";n&&i&&console.log(...e)}function eT(...e){const n=Mc==="DEV"||Mc==="QA";if(psn||hsn||msn||gsn)return void console.warn(...e);const i=globalThis.window!==void 0&&(globalThis.window.location.hostname==="localhost"||globalThis.window.location.hostname==="127.0.0.1")&&globalThis.window.location.port==="3000";n&&i&&console.warn(...e)}let NE=null,VO=!1;const Lc=Mc==="PROD"?"https://api.zeni.ai":Mc==="DEV"?"https://dev.api.zeni.ai":"https://qa.api.zeni.ai";function lAt(e){const n=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["months"]})),i=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["quarters"]})),r=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["years"]})),s=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["months"]})),l=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:`${Lc}/accounting/2.0/reports/profit_and_loss?query=${n}`,priority:"HIGH",reason:"Reports - Profit & Loss by Months (first load)",apiType:"reports"},{url:`${Lc}/accounting/2.0/reports/profit_and_loss?query=${i}`,priority:"HIGH",reason:"Reports - Profit & Loss by Quarters (first load)",apiType:"reports"},{url:`${Lc}/accounting/2.0/reports/profit_and_loss?query=${r}`,priority:"HIGH",reason:"Reports - Profit & Loss by Years (first load)",apiType:"reports"},{url:`${Lc}/accounting/2.0/reports/balance_sheet?query=${s}`,priority:"HIGH",reason:"Reports - Balance Sheet by Months (first load)",apiType:"reports"},{url:`${Lc}/accounting/2.0/reports/balance_sheet?query=${l}`,priority:"HIGH",reason:"Reports - Balance Sheet by Quarters (first load)",apiType:"reports"},{url:`${Lc}/accounting/2.0/reports/balance_sheet?query=${c}`,priority:"HIGH",reason:"Reports - Balance Sheet by Years (first load)",apiType:"reports"},{url:`${Lc}/accounting/2.0/reports/cash_flow?query=${d}`,priority:"HIGH",reason:"Reports - Cash Flow by Months (first load)",apiType:"reports"},{url:`${Lc}/accounting/2.0/reports/cash_flow?query=${u}`,priority:"HIGH",reason:"Reports - Cash Flow by Quarters (first load)",apiType:"reports"},{url:`${Lc}/accounting/2.0/reports/cash_flow?query=${p}`,priority:"HIGH",reason:"Reports - Cash Flow by Years (first load)",apiType:"reports"}]}const X9s={dashboard:function(e){return[...lAt()]},reports:lAt,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})),i=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:`${Lc}/accounting/2.0/reports/profit_and_loss?query=${n}`,priority:"HIGH",reason:"Forecast - Profit & Loss by Months (first load)",apiType:"forecast"},{url:`${Lc}/accounting/2.0/reports/profit_and_loss?query=${i}`,priority:"HIGH",reason:"Forecast - Profit & Loss by Quarters (first load)",apiType:"forecast"},{url:`${Lc}/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:`${Lc}/banking/1.0/deposit-accounts?query=${n}`,priority:"HIGH",reason:"Checking - Deposit Accounts (first load)",apiType:"checking"},{url:`${Lc}/pay/1.0/payment-accounts`,priority:"HIGH",reason:"Checking - Payment Accounts (first load)",apiType:"checking"},{url:`${Lc}/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:`${Lc}/tenant/1.0/company-refer-reward-plan?query=${n}`,priority:"HIGH",reason:"Rewards Page - Rewards Plan (first load)",apiType:"rewards"},{url:`${Lc}/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:i}=e,r=encodeURIComponent(JSON.stringify({view:"passport"}));return[{url:`${Lc}/tenant/1.0/user-roles`,priority:"HIGH",reason:"People Page - User Roles (first load)",apiType:"people"},{url:`${Lc}/tenant/1.0/users?query=${n}`,priority:"HIGH",reason:"People Page - Users (first load)",apiType:"people"},{url:`${Lc}/accounting/1.0/classes`,priority:"HIGH",reason:"People Page - Classes (first load)",apiType:"people"},{url:`${Lc}/tenant/1.0/companies/${i}?query=${r}`,priority:"HIGH",reason:"People Page - Company Passport (first load)",apiType:"people"}]}};function cAt(e){const{currentPage:n,isRewardsFeatureEnabled:i,isPeopleTabVisible:r,isReportsPageVisible:s,isPageIndependent:l=!1}=e,c=(0,X9s[l?"dashboard":n])(e),d=c.filter((u=>i===!1&&u.reason.includes("Rewards")?(Tc(`[Prefetch Manager - Service Worker] ⚠️ Skipping rewards URL (feature disabled): ${u.url}`),!1):r===!1&&u.reason.includes("People")?(Tc(`[Prefetch Manager - Service Worker] ⚠️ Skipping people URL (feature disabled): ${u.url}`),!1):s!==!1||!u.reason.includes("Reports")||(Tc(`[Prefetch Manager - Service Worker] ⚠️ Skipping reports URL (feature disabled): ${u.url}`),!1)));return Tc(`[Prefetch Manager - Service Worker] 📋 Prefetch list: ${c.length} total, ${d.length} after filtering`),d}async function dAt(e,n=0,i){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?(Tc("[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),s=navigator.serviceWorker.controller||r.active;if(!s)return void eT("[Prefetch Manager - Service Worker] No active Service Worker available");const l=(function(u){const p={HIGH:0,MEDIUM:1,LOW:2};return u.sort(((h,g)=>p[h.priority]-p[g.priority]))})(e);Tc("[Prefetch Manager - Service Worker] 📋 Sending prefetch list to SW:",{total:l.length,high:l.filter((u=>u.priority==="HIGH")).length,medium:l.filter((u=>u.priority==="MEDIUM")).length,low:l.filter((u=>u.priority==="LOW")).length,batchSize:n>0?n:"disabled",expirationTime:i??"20 minutes",viaController:!!navigator.serviceWorker.controller}),l.forEach(((u,p)=>{Tc(`[Prefetch Manager - Service Worker] ${p+1}. [${u.priority}] ${u.reason} - ${u.url}`),Tc(` URL: ${u.url}`)}));const c=pne(),d={"zeni-session-id":c.sessionId,"zeni-user-id":c.userId,"zeni-tenant-id":c.tenantId};s.postMessage({type:"PREFETCH_URLS",payload:{urls:l.map((u=>({url:u.url,priority:u.priority,apiType:u.apiType}))),authHeaders:d,batchSize:n,expirationTime:i}}),Tc("[Prefetch Manager - Service Worker] ✅ Prefetch request sent to Service Worker")}catch(r){eT("[Prefetch Manager - Service Worker] Failed to send prefetch request:",r instanceof Error?r.message:"Unknown error")}else eT("[Prefetch Manager - Service Worker] Service Worker not supported in this browser")}function e8s({children:e,currentPage:n,tenantId:i,batchCalls:r=0,expirationTime:s,delay:l=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=d2(),A=Br.getSignedInUser(),{useFeatureGate:S}=us(),{isFeatureEnabled:$}=S(Gr.isReferralFeatureEnabled),j=Dn(),I=l7(j?.loggedInUserRole??[]),E=qr((_=>xm(_))),{isFeatureEnabled:D}=S(Gr.isDebitCardFeatureEnabled),B=O8e(D,E),F=M8e(E),R=B===!1&&F===!1;return m.useEffect((()=>{if(!c||x||!A||!i)return;const _=cAt({currentPage:n,userId:A.userId,tenantId:i,sessionId:A.zeniSessionId??"",features:u,forecastId:p,isRewardsFeatureEnabled:$,isPeopleTabVisible:I,isReportsPageVisible:R,companyId:E?.companyId??"",isPageIndependent:g}),N=g?"dashboard":n;if(_.length===0)return void Tc(`[Prefetch Provider - ${N}${g?" (base)":""}] No URLs to prefetch`);Tc(`[Prefetch Provider - ${N}${g?" (base)":""}] 📦 Generated ${_.length} URLs to prefetch`);const T=setTimeout((()=>{dAt(_,r,s).catch((P=>{eT(`[Prefetch Provider - ${N}${g?" (base)":""}] Prefetch failed:`,P)})),y(!0)}),l);return()=>clearTimeout(T)}),[c,x,A,i,n,u,p,$,I,R,E?.companyId,g,r,s,l,v.pathname]),m.useEffect((()=>{y(!1)}),[i,v.pathname]),m.useEffect((()=>{g||(y(!1),w(!1))}),[v.pathname,g]),m.useEffect((()=>{if(C.current&&(C.current(),C.current=null),!(c&&d&&A&&i)||b)return;Tc(`[Prefetch Provider - Idle] 👀 Setting up idle prefetch detection (timeout: ${h}ms)`);const _=(function(N){const{timeout:T=2e3,onIdle:P}=N;Tc(`[Idle Detection - Service Worker] 👀 Starting Idle Detection - Service Worker (timeout: ${T}ms)`);const L=()=>{VO&&(Tc("[Idle Detection - Service Worker] 🏃 User became active again"),VO=!1),NE&&clearTimeout(NE),NE=setTimeout((()=>{VO||(Tc("[Idle Detection - Service Worker] ⏱️ Browser is now IDLE"),VO=!0,P())}),T)},V=["mousedown","mousemove","keypress","scroll","touchstart","click"];return V.forEach((H=>{document.addEventListener(H,L,!0)})),L(),()=>{Tc("[Idle Detection - Service Worker] 🛑 Stopping Idle Detection - Service Worker"),NE&&(clearTimeout(NE),NE=null),V.forEach((H=>{document.removeEventListener(H,L,!0)})),VO=!1}})({timeout:h,onIdle:()=>{if(b)return;Tc("[Prefetch Provider - Idle] ⏱️ Browser is idle, fetching prefetch list with isIdleCallEnabled=true");const N=cAt({currentPage:n,userId:A.userId,tenantId:i,sessionId:A.zeniSessionId??"",features:u,forecastId:p,isRewardsFeatureEnabled:$,isPeopleTabVisible:I,isReportsPageVisible:R,companyId:E.companyId,isPageIndependent:g,isIdleCallEnabled:!0}),T=g?"dashboard":n;N.length!==0?(Tc(`[Prefetch Provider - Idle - ${T}${g?" (base)":""}] 📦 Generated ${N.length} URLs to prefetch on idle`),dAt(N,r,s).catch((P=>{eT(`[Prefetch Provider - Idle - ${T}${g?" (base)":""}] Idle prefetch failed:`,P)})),w(!0)):Tc(`[Prefetch Provider - Idle - ${T}${g?" (base)":""}] No URLs to prefetch on idle`)}});return C.current=_,()=>{C.current&&(C.current(),C.current=null)}}),[c,d,h,A,i,b,n,u,p,$,I,R,E.companyId,g,r,s]),m.useEffect((()=>{w(!1)}),[i]),m.useEffect((()=>{(function(){const _=performance.getEntriesByType("navigation");if(_.length>0)return _[0].type==="reload";const N=performance.navigation;return!(!N||typeof N.type!="number")&&N.type===1})()&&f&&(Tc("[Prefetch Provider] 🔄 Page refresh detected - will bypass cache for fresh data"),(async function(){if("serviceWorker"in navigator)try{const _=await navigator.serviceWorker.ready,N=navigator.serviceWorker.controller||_.active;if(!N)return;Tc("[Prefetch Provider] 🔄 Page refresh detected, notifying service worker to bypass cache"),N.postMessage({type:"PAGE_REFRESH",payload:{timestamp:Date.now()}})}catch(_){eT("[Prefetch Provider] Failed to notify service worker of refresh:",_)}})())}),[]),Zt.jsx(Zt.Fragment,{children:e})}function t8s({children:e,isPageIndependent:n=!1,batchCalls:i=0,enableIdlePrefetch:r=!1,expirationTime:s,idleTimeout:l=2e3,isRefreshTriggerEnabled:c=!1}){const d=d2(),u=qr((y=>xm(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}=us(),{isFeatureEnabled:x}=f(Gr.isServiceWorkerPrefetchingEnabled);return g&&p?Zt.jsx(e8s,{currentPage:p,tenantId:g,delay:5e3,enabled:x,batchCalls:i,enableIdlePrefetch:r,expirationTime:s,idleTimeout:l,isRefreshTriggerEnabled:c,isPageIndependent:n,children:e}):Zt.jsx(Zt.Fragment,{children:e})}function n8s(e,n){const i=Bi.extractUtmParamsFromUrl(n),r=new URLSearchParams(i).toString();if(!r)return e;const s=e.includes("?")?"&":"?";return`${e}${s}${r}`}const i8s=Bm((()=>Md((()=>import("./DefaultTenantHome-DPfMVRsH.js")),__vite__mapDeps([4,1,2,0,5,6,7,8])))),o8s=Bm((()=>Md((()=>import("./AppDrawer-BFM_cX2w.js")),__vite__mapDeps([9,1,2,0,5,10,11,12,7,8])))),uAt=Bm((()=>Md((()=>import("./ScreenRoutes-S_qs6Ml3.js").then((e=>e.S))),__vite__mapDeps([13,0,1,2,5,14,6])))),r8s=Bm((()=>Md((()=>import("./ConnectionAuthScreen-U-SNJMCs.js")),__vite__mapDeps([15,1,2,0,5,16,17,10,11,18,8,19,20,21,22,23,24,6,7])))),a8s=Bm((()=>Md((()=>import("./SignInScreen-C1tZOgxI.js")),__vite__mapDeps([25,1,2,0,5,26,14,6,7,8])))),s8s=Bm((()=>Md((()=>import("./MagicLinkSignInScreen-UK3TjkXM.js")),__vite__mapDeps([27,1,2,0,5,26,14,6,7,8])))),pAt=Bm((()=>Md((()=>import("./NotFoundScreen-SpQh5g9X.js")),__vite__mapDeps([28,1,2,0,5,7,8])))),l8s=Bm((()=>Md((()=>import("./MagicLinkRoutes-l_QpBC-t.js")),__vite__mapDeps([29,1,2,0,5,28,7,8])))),c8s=Bm((()=>Md((()=>import("./PaymentLinkScreen-C8Dbjcao.js")),__vite__mapDeps([30,1,2,0,5,7,8])))),d8s=Bm((()=>Md((()=>import("./WiseConfirmationScreen-C3-YNa28.js")),__vite__mapDeps([31,1,2,0,5,7,8])))),u8s=Bm((()=>Md((()=>import("./HubSpotOAuthCallbackScreen-ecjnmYBQ.js")),__vite__mapDeps([32,1,2,0,5,7,8])))),p8s=Bm((()=>Md((()=>import("./CustomerOnboardingAuthScreen-CyPpyRU1.js")),__vite__mapDeps([33,1,2,0,18,8,19,20,21,22,5,23,7])))),h8s=Bm((()=>Md((()=>import("./SignOutScreen-C5m60sU2.js")),__vite__mapDeps([34,1,2,0,5,7,8])))),m8s=Bm((()=>Md((()=>import("./OAuthConsentScreen-D2IPS06S.js")),__vite__mapDeps([35,1,2,0,5,7,8])))),g8s=()=>{const e=d2(),n=new URLSearchParams(e.search),i=n.get("question"),r=i?.replace(/^["']|["']$/g,"")??null,s=n.get("should_submit")==="true",l=n8s("/",n);return Zt.jsx(TAt,{to:l,replace:!0,state:{origin:"/aicfo",message:"",queryParams:{aiCfoQuestion:r,aiCfoShouldSubmit:s?"true":"false"}}})};function f8s(){const{isOpen:e}=Mk(),n=Egi(),{isAiCfoOpen:i,setIsAiCfoOpen:r}=Lje(),s=m.useRef(!1),l=m.useRef(i),c=m.useRef(!1);return m.useLayoutEffect((()=>{const d=i&&!l.current;l.current=i,d&&e&&(r(!1),n(),c.current=!0)}),[i,e,r,n]),m.useEffect((()=>{e&&!s.current&&(c.current=!1,i&&r(!1)),s.current=e}),[e,i,r]),m.useEffect((()=>{!e&&c.current&&(c.current=!1,r(!0))}),[e,r]),null}const x8s=({tenantEmailDomain:e,setTenantEmailDomain:n})=>{const i=Br.isSignedIn(),r=qr((T=>xm(T))),s=Br.getSignedInUser(),l=i&&ON(s),c=qr((T=>tun(T))).tenantsBaseInOrder.map((T=>({companyId:T.companyId,tenantId:T.tenantId,companyName:T.companyName}))),d={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:r.tenantId??""},u=Kp(),p=ou(["/:tenantEmailDomain/dashboard/*","/:tenantEmailDomain/dashboard"]),h=zan(),g=Nje(),[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}=us(),{isFeatureEnabled:v}=C(Gr.isAiCfoFileUploadEnabled),{isFeatureEnabled:A}=C(Gr.isBillPayCommentingEnabled),{isFeatureEnabled:S}=C(Gr.isReimbursementCommentingEnabled),{isFeatureEnabled:$}=C(Gr.isExpenseAutomationEnabled),{isFeatureEnabled:j}=C(Gr.isExpenseAutomationEnabledV2),{isFeatureEnabled:I}=C(Gr.isTreasuryCommentingEnabled),{isFeatureEnabled:E}=C(Gr.isCheckingCommentingEnabled),{isFeatureEnabled:D}=C(Gr.isTransactionCommentingEnabled),{isFeatureEnabled:B}=C(Gr.isCardsCommentingEnabled),F=A||S||l&&$||!l&&j||I||E||D||B;m.useEffect((()=>{!h&&f&&x(!1)}),[h,f]),m.useEffect((()=>{h||u(nun())}),[u,h]);const R=d2().pathname.includes("/collect-payment/"),_=Zt.jsx(y8s,{setTenantEmailDomain:n,isOnDashboard:p,userHasZeniAiCfoAccess:g,isAiCfoFileUploadEnabled:v});if(R)return Zt.jsx(jGe,{children:Zt.jsx(l5t,{children:Zt.jsx(A8e.Provider,{value:w,children:_})})});const N=Zt.jsxs(A8e.Provider,{value:w,children:[Zt.jsx(f8s,{}),Zt.jsxs(C8s,{children:[Zt.jsx(o8s,{tenantEmailDomain:e}),Zt.jsx(b8s,{children:_})]})]});return Zt.jsx(jGe,{children:r.tenantId!=null?Zt.jsx(Y4a,{roomId:`dashboard_${r.companyId}`,authParams:d,users:[],companies:c,authUrlEndPoint:`${O8.tenantMicroServiceBaseUrl}/1.0/commenting/auth`,fetchZeniUsers:!0,commentingUsersUrlEndPoint:`${O8.tenantMicroServiceBaseUrl}/1.0/users/commenting-users`,isZeniUser:l,autoConnect:l||D||B,loggedInUser:s,withRoomProvider:!0,withThreadsProvider:F,threadsIndexStrategy:"roomThreads",filter:{application:"dashboard",companyId:r.companyId},children:N},r.tenantId):Zt.jsx(l5t,{children:N})})},y8s=({setTenantEmailDomain:e,isOnDashboard:n,userHasZeniAiCfoAccess:i,isAiCfoFileUploadEnabled:r})=>{const s=qr((x=>x.tenantState.loggedInUser)),{useDynamicConfig:l}=us(),{configValue:c}=l(J7.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}=Mje(),{isAiCfoOpen:g,setIsAiCfoOpen:f}=Lje();return m.useEffect((()=>{h(_an.APP_INITIALIZATION)}),[h]),Zt.jsx(m.Suspense,{fallback:null,children:Zt.jsx(t8s,{isPageIndependent:!0,batchCalls:d,isRefreshTriggerEnabled:!1,enableIdlePrefetch:!1,idleTimeout:u,expirationTime:p,children:Zt.jsxs(Hsn,{children:[Zt.jsx(cp,{path:"/magic_links/*",element:Zt.jsx(l8s,{})}),Zt.jsx(cp,{path:"/collect-payment/:namespace/:token",element:Zt.jsx(c8s,{})}),Zt.jsx(cp,{path:"/wise/callback/link-account/*",element:Zt.jsx(d8s,{})}),Zt.jsx(cp,{path:"/page-not-found",element:Zt.jsx(pAt,{})}),Zt.jsx(cp,{path:"/",element:Zt.jsx(i8s,{})}),Zt.jsx(cp,{path:"/aicfo",element:Zt.jsx(g8s,{})}),Zt.jsx(cp,{path:"/onboarding/auth",element:Zt.jsx(p8s,{})}),Zt.jsx(cp,{path:"/:tenantEmailDomain/*",element:Zt.jsx(A8s,{children:Zt.jsxs(h9s,{children:[Zt.jsxs(S8s,{children:[s!=null?Zt.jsx(q9s,{}):null,n?Zt.jsx(uAt,{setTenantEmailDomain:e}):Zt.jsx(z5e,{children:Zt.jsx(uAt,{setTenantEmailDomain:e})})]}),i?Zt.jsxs(Zt.Fragment,{children:[Zt.jsx(Wbs,{}),Zt.jsx(k8s,{isOpen:g,children:Zt.jsx(z9s,{isOpen:g,onClose:()=>f(!1),isFileUploadEnabled:r})})]}):null]})})}),Zt.jsx(cp,{path:"/signin/auth",element:Zt.jsx(z5e,{children:Zt.jsx(a8s,{setTenantEmailDomain:e})})}),Zt.jsx(cp,{path:"/signin/magic-link",element:Zt.jsx(z5e,{children:Zt.jsx(s8s,{})})}),Zt.jsx(cp,{path:"/signout",element:Zt.jsx(h8s,{})}),Zt.jsx(cp,{path:"/connection/auth",element:Zt.jsx(r8s,{})}),Zt.jsx(cp,{path:"/oauth/hubspot/callback",element:Zt.jsx(u8s,{})}),Zt.jsx(cp,{path:"/oauth/authorize",element:Zt.jsx(m8s,{})}),Zt.jsx(cp,{path:"*",element:Zt.jsx(pAt,{})})]})})})},b8s=({children:e})=>{const{isOpen:n,width:i}=Mk();return Zt.jsx(v8s,{commentsDrawerWidth:n?i:0,children:e})},w8s=di("div")`
|
|
90987
|
+
`,q9s=()=>{const[e,n]=m.useState((()=>Br.getSignedInUser())),i=Kp(),[r,s]=m.useState(!1),[l,c]=m.useState(!1),d=qr((g=>MSt(g).fetchState)),u=qr((g=>xm(g)));m.useEffect((()=>{const g=e!=null&&e.authProvider==="email"&&(!e?.firstName||!e?.lastName||!e.phoneNumber);s(g)}),[e]);const p=m.useCallback((()=>{const g=Br.getSignedInUser();n((f=>JSON.stringify(f)!==JSON.stringify(g)?g:f))}),[]);m.useEffect((()=>(window.addEventListener("completeProfileDone",p),()=>{window.removeEventListener("completeProfileDone",p)})),[]),m.useEffect((()=>{u?.companyId!=null&&d==="Not-Started"&&i(eun(u.companyId))}),[d,u.companyId,i]);const h=m.useMemo((()=>!!e?.firstName&&!e?.phoneNumber),[e]);return Zt.jsxs(m.Fragment,{children:[l&&Zt.jsx(EAe,{showConfetti:!0}),e?.userEmail!=null&&e.authProvider==="email"?Zt.jsx(Y9s,{userEmail:e.userEmail,isCompleteProfileOpen:r,closeDrawerHandler:()=>{s(!1),c(!0)},hasUserEnteredBasicDetails:h}):null]})},sAt="init-enter",K9s=m.memo((function({location:e,visitedUrl:n}){const{pathname:i}=e;return m.useLayoutEffect((()=>{const r=n.get(i||sAt);Z9s(r!==void 0?r:0)})),null}),((e,n)=>{const{location:i,visitedUrl:r}=e,{location:s}=n,l=i.pathname||sAt,c=J9s();return r.set(l,c),!((s.pathname!==i.pathname||s.search!==i.search)&&s.hash==="")})),Z9s=(e=0)=>window.requestAnimationFrame((()=>{window.scrollTo(0,e)})),J9s=()=>{let e=0;return document!=null&&document.documentElement!==null&&(e=document.documentElement.scrollTop),window.pageYOffset||e},Bm=e=>m.lazy((async()=>{const n=e.toString(),i=Br.getForceRefreshedComponents(),r=new Set(i),s=Br.isSignedIn(),l=r.has(n);try{const c=await e();return r.delete(n),s&&Br.saveForceRefreshedComponents(Array.from(r)),c}catch(c){throw l||(r.add(n),s&&Br.saveForceRefreshedComponents(Array.from(r)),location.reload()),c}})),C$s=(e,n,i)=>{const r=M8e(e),s=ane(e),l=O8e(i,e);return(n||i||s||r||l)&&B8e(e.company)},psn=globalThis.window?.location.href.startsWith("https://delhi-dot-zeni"),hsn=globalThis.window?.location.href.startsWith("https://pune-dot-zeni"),msn=globalThis.window?.location.href.startsWith("https://sunnyvale-dot-zeni"),gsn=globalThis.window?.location.href.startsWith("https://dev.app.zeni.ai");function Tc(...e){const n=Mc==="DEV"||Mc==="QA";if(psn||hsn||msn||gsn)return void console.log(...e);const i=globalThis.window!==void 0&&(globalThis.window.location.hostname==="localhost"||globalThis.window.location.hostname==="127.0.0.1")&&globalThis.window.location.port==="3000";n&&i&&console.log(...e)}function eT(...e){const n=Mc==="DEV"||Mc==="QA";if(psn||hsn||msn||gsn)return void console.warn(...e);const i=globalThis.window!==void 0&&(globalThis.window.location.hostname==="localhost"||globalThis.window.location.hostname==="127.0.0.1")&&globalThis.window.location.port==="3000";n&&i&&console.warn(...e)}let NE=null,VO=!1;const Lc=Mc==="PROD"?"https://api.zeni.ai":Mc==="DEV"?"https://dev.api.zeni.ai":"https://qa.api.zeni.ai";function lAt(e){const n=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["months"]})),i=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["quarters"]})),r=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["years"]})),s=encodeURIComponent(JSON.stringify({is_full_response:!0,time_series_groups:["months"]})),l=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:`${Lc}/accounting/2.0/reports/profit_and_loss?query=${n}`,priority:"HIGH",reason:"Reports - Profit & Loss by Months (first load)",apiType:"reports"},{url:`${Lc}/accounting/2.0/reports/profit_and_loss?query=${i}`,priority:"HIGH",reason:"Reports - Profit & Loss by Quarters (first load)",apiType:"reports"},{url:`${Lc}/accounting/2.0/reports/profit_and_loss?query=${r}`,priority:"HIGH",reason:"Reports - Profit & Loss by Years (first load)",apiType:"reports"},{url:`${Lc}/accounting/2.0/reports/balance_sheet?query=${s}`,priority:"HIGH",reason:"Reports - Balance Sheet by Months (first load)",apiType:"reports"},{url:`${Lc}/accounting/2.0/reports/balance_sheet?query=${l}`,priority:"HIGH",reason:"Reports - Balance Sheet by Quarters (first load)",apiType:"reports"},{url:`${Lc}/accounting/2.0/reports/balance_sheet?query=${c}`,priority:"HIGH",reason:"Reports - Balance Sheet by Years (first load)",apiType:"reports"},{url:`${Lc}/accounting/2.0/reports/cash_flow?query=${d}`,priority:"HIGH",reason:"Reports - Cash Flow by Months (first load)",apiType:"reports"},{url:`${Lc}/accounting/2.0/reports/cash_flow?query=${u}`,priority:"HIGH",reason:"Reports - Cash Flow by Quarters (first load)",apiType:"reports"},{url:`${Lc}/accounting/2.0/reports/cash_flow?query=${p}`,priority:"HIGH",reason:"Reports - Cash Flow by Years (first load)",apiType:"reports"}]}const X9s={dashboard:function(e){return[...lAt()]},reports:lAt,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})),i=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:`${Lc}/accounting/2.0/reports/profit_and_loss?query=${n}`,priority:"HIGH",reason:"Forecast - Profit & Loss by Months (first load)",apiType:"forecast"},{url:`${Lc}/accounting/2.0/reports/profit_and_loss?query=${i}`,priority:"HIGH",reason:"Forecast - Profit & Loss by Quarters (first load)",apiType:"forecast"},{url:`${Lc}/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:`${Lc}/banking/1.0/deposit-accounts?query=${n}`,priority:"HIGH",reason:"Checking - Deposit Accounts (first load)",apiType:"checking"},{url:`${Lc}/pay/1.0/payment-accounts`,priority:"HIGH",reason:"Checking - Payment Accounts (first load)",apiType:"checking"},{url:`${Lc}/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:`${Lc}/tenant/1.0/company-refer-reward-plan?query=${n}`,priority:"HIGH",reason:"Rewards Page - Rewards Plan (first load)",apiType:"rewards"},{url:`${Lc}/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:i}=e,r=encodeURIComponent(JSON.stringify({view:"passport"}));return[{url:`${Lc}/tenant/1.0/user-roles`,priority:"HIGH",reason:"People Page - User Roles (first load)",apiType:"people"},{url:`${Lc}/tenant/1.0/users?query=${n}`,priority:"HIGH",reason:"People Page - Users (first load)",apiType:"people"},{url:`${Lc}/accounting/1.0/classes`,priority:"HIGH",reason:"People Page - Classes (first load)",apiType:"people"},{url:`${Lc}/tenant/1.0/companies/${i}?query=${r}`,priority:"HIGH",reason:"People Page - Company Passport (first load)",apiType:"people"}]}};function cAt(e){const{currentPage:n,isRewardsFeatureEnabled:i,isPeopleTabVisible:r,isReportsPageVisible:s,isPageIndependent:l=!1}=e,c=(0,X9s[l?"dashboard":n])(e),d=c.filter((u=>i===!1&&u.reason.includes("Rewards")?(Tc(`[Prefetch Manager - Service Worker] ⚠️ Skipping rewards URL (feature disabled): ${u.url}`),!1):r===!1&&u.reason.includes("People")?(Tc(`[Prefetch Manager - Service Worker] ⚠️ Skipping people URL (feature disabled): ${u.url}`),!1):s!==!1||!u.reason.includes("Reports")||(Tc(`[Prefetch Manager - Service Worker] ⚠️ Skipping reports URL (feature disabled): ${u.url}`),!1)));return Tc(`[Prefetch Manager - Service Worker] 📋 Prefetch list: ${c.length} total, ${d.length} after filtering`),d}async function dAt(e,n=0,i){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?(Tc("[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),s=navigator.serviceWorker.controller||r.active;if(!s)return void eT("[Prefetch Manager - Service Worker] No active Service Worker available");const l=(function(u){const p={HIGH:0,MEDIUM:1,LOW:2};return u.sort(((h,g)=>p[h.priority]-p[g.priority]))})(e);Tc("[Prefetch Manager - Service Worker] 📋 Sending prefetch list to SW:",{total:l.length,high:l.filter((u=>u.priority==="HIGH")).length,medium:l.filter((u=>u.priority==="MEDIUM")).length,low:l.filter((u=>u.priority==="LOW")).length,batchSize:n>0?n:"disabled",expirationTime:i??"20 minutes",viaController:!!navigator.serviceWorker.controller}),l.forEach(((u,p)=>{Tc(`[Prefetch Manager - Service Worker] ${p+1}. [${u.priority}] ${u.reason} - ${u.url}`),Tc(` URL: ${u.url}`)}));const c=pne(),d={"zeni-session-id":c.sessionId,"zeni-user-id":c.userId,"zeni-tenant-id":c.tenantId};s.postMessage({type:"PREFETCH_URLS",payload:{urls:l.map((u=>({url:u.url,priority:u.priority,apiType:u.apiType}))),authHeaders:d,batchSize:n,expirationTime:i}}),Tc("[Prefetch Manager - Service Worker] ✅ Prefetch request sent to Service Worker")}catch(r){eT("[Prefetch Manager - Service Worker] Failed to send prefetch request:",r instanceof Error?r.message:"Unknown error")}else eT("[Prefetch Manager - Service Worker] Service Worker not supported in this browser")}function e8s({children:e,currentPage:n,tenantId:i,batchCalls:r=0,expirationTime:s,delay:l=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=d2(),A=Br.getSignedInUser(),{useFeatureGate:S}=us(),{isFeatureEnabled:$}=S(Gr.isReferralFeatureEnabled),j=Dn(),I=l7(j?.loggedInUserRole??[]),E=qr((_=>xm(_))),{isFeatureEnabled:D}=S(Gr.isDebitCardFeatureEnabled),B=O8e(D,E),F=M8e(E),R=B===!1&&F===!1;return m.useEffect((()=>{if(!c||x||!A||!i)return;const _=cAt({currentPage:n,userId:A.userId,tenantId:i,sessionId:A.zeniSessionId??"",features:u,forecastId:p,isRewardsFeatureEnabled:$,isPeopleTabVisible:I,isReportsPageVisible:R,companyId:E?.companyId??"",isPageIndependent:g}),N=g?"dashboard":n;if(_.length===0)return void Tc(`[Prefetch Provider - ${N}${g?" (base)":""}] No URLs to prefetch`);Tc(`[Prefetch Provider - ${N}${g?" (base)":""}] 📦 Generated ${_.length} URLs to prefetch`);const T=setTimeout((()=>{dAt(_,r,s).catch((P=>{eT(`[Prefetch Provider - ${N}${g?" (base)":""}] Prefetch failed:`,P)})),y(!0)}),l);return()=>clearTimeout(T)}),[c,x,A,i,n,u,p,$,I,R,E?.companyId,g,r,s,l,v.pathname]),m.useEffect((()=>{y(!1)}),[i,v.pathname]),m.useEffect((()=>{g||(y(!1),w(!1))}),[v.pathname,g]),m.useEffect((()=>{if(C.current&&(C.current(),C.current=null),!(c&&d&&A&&i)||b)return;Tc(`[Prefetch Provider - Idle] 👀 Setting up idle prefetch detection (timeout: ${h}ms)`);const _=(function(N){const{timeout:T=2e3,onIdle:P}=N;Tc(`[Idle Detection - Service Worker] 👀 Starting Idle Detection - Service Worker (timeout: ${T}ms)`);const L=()=>{VO&&(Tc("[Idle Detection - Service Worker] 🏃 User became active again"),VO=!1),NE&&clearTimeout(NE),NE=setTimeout((()=>{VO||(Tc("[Idle Detection - Service Worker] ⏱️ Browser is now IDLE"),VO=!0,P())}),T)},V=["mousedown","mousemove","keypress","scroll","touchstart","click"];return V.forEach((H=>{document.addEventListener(H,L,!0)})),L(),()=>{Tc("[Idle Detection - Service Worker] 🛑 Stopping Idle Detection - Service Worker"),NE&&(clearTimeout(NE),NE=null),V.forEach((H=>{document.removeEventListener(H,L,!0)})),VO=!1}})({timeout:h,onIdle:()=>{if(b)return;Tc("[Prefetch Provider - Idle] ⏱️ Browser is idle, fetching prefetch list with isIdleCallEnabled=true");const N=cAt({currentPage:n,userId:A.userId,tenantId:i,sessionId:A.zeniSessionId??"",features:u,forecastId:p,isRewardsFeatureEnabled:$,isPeopleTabVisible:I,isReportsPageVisible:R,companyId:E.companyId,isPageIndependent:g,isIdleCallEnabled:!0}),T=g?"dashboard":n;N.length!==0?(Tc(`[Prefetch Provider - Idle - ${T}${g?" (base)":""}] 📦 Generated ${N.length} URLs to prefetch on idle`),dAt(N,r,s).catch((P=>{eT(`[Prefetch Provider - Idle - ${T}${g?" (base)":""}] Idle prefetch failed:`,P)})),w(!0)):Tc(`[Prefetch Provider - Idle - ${T}${g?" (base)":""}] No URLs to prefetch on idle`)}});return C.current=_,()=>{C.current&&(C.current(),C.current=null)}}),[c,d,h,A,i,b,n,u,p,$,I,R,E.companyId,g,r,s]),m.useEffect((()=>{w(!1)}),[i]),m.useEffect((()=>{(function(){const _=performance.getEntriesByType("navigation");if(_.length>0)return _[0].type==="reload";const N=performance.navigation;return!(!N||typeof N.type!="number")&&N.type===1})()&&f&&(Tc("[Prefetch Provider] 🔄 Page refresh detected - will bypass cache for fresh data"),(async function(){if("serviceWorker"in navigator)try{const _=await navigator.serviceWorker.ready,N=navigator.serviceWorker.controller||_.active;if(!N)return;Tc("[Prefetch Provider] 🔄 Page refresh detected, notifying service worker to bypass cache"),N.postMessage({type:"PAGE_REFRESH",payload:{timestamp:Date.now()}})}catch(_){eT("[Prefetch Provider] Failed to notify service worker of refresh:",_)}})())}),[]),Zt.jsx(Zt.Fragment,{children:e})}function t8s({children:e,isPageIndependent:n=!1,batchCalls:i=0,enableIdlePrefetch:r=!1,expirationTime:s,idleTimeout:l=2e3,isRefreshTriggerEnabled:c=!1}){const d=d2(),u=qr((y=>xm(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}=us(),{isFeatureEnabled:x}=f(Gr.isServiceWorkerPrefetchingEnabled);return g&&p?Zt.jsx(e8s,{currentPage:p,tenantId:g,delay:5e3,enabled:x,batchCalls:i,enableIdlePrefetch:r,expirationTime:s,idleTimeout:l,isRefreshTriggerEnabled:c,isPageIndependent:n,children:e}):Zt.jsx(Zt.Fragment,{children:e})}function n8s(e,n){const i=Bi.extractUtmParamsFromUrl(n),r=new URLSearchParams(i).toString();if(!r)return e;const s=e.includes("?")?"&":"?";return`${e}${s}${r}`}const i8s=Bm((()=>Md((()=>import("./DefaultTenantHome-CMvE7WXj.js")),__vite__mapDeps([4,1,2,0,5,6,7,8])))),o8s=Bm((()=>Md((()=>import("./AppDrawer-D7FI4GcX.js")),__vite__mapDeps([9,1,2,0,5,10,11,12,7,8])))),uAt=Bm((()=>Md((()=>import("./ScreenRoutes-6zCS0eXm.js").then((e=>e.S))),__vite__mapDeps([13,0,1,2,5,14,6])))),r8s=Bm((()=>Md((()=>import("./ConnectionAuthScreen-C_s5VCbI.js")),__vite__mapDeps([15,1,2,0,5,16,17,10,11,18,8,19,20,21,22,23,24,6,7])))),a8s=Bm((()=>Md((()=>import("./SignInScreen-C5RNgyDG.js")),__vite__mapDeps([25,1,2,0,5,26,14,6,7,8])))),s8s=Bm((()=>Md((()=>import("./MagicLinkSignInScreen-DGzxNaiE.js")),__vite__mapDeps([27,1,2,0,5,26,14,6,7,8])))),pAt=Bm((()=>Md((()=>import("./NotFoundScreen-BatgS8le.js")),__vite__mapDeps([28,1,2,0,5,7,8])))),l8s=Bm((()=>Md((()=>import("./MagicLinkRoutes-DDza_62u.js")),__vite__mapDeps([29,1,2,0,5,28,7,8])))),c8s=Bm((()=>Md((()=>import("./PaymentLinkScreen-D0Hr5oRB.js")),__vite__mapDeps([30,1,2,0,5,7,8])))),d8s=Bm((()=>Md((()=>import("./WiseConfirmationScreen-XbaBW0oW.js")),__vite__mapDeps([31,1,2,0,5,7,8])))),u8s=Bm((()=>Md((()=>import("./HubSpotOAuthCallbackScreen-CsqGaYGM.js")),__vite__mapDeps([32,1,2,0,5,7,8])))),p8s=Bm((()=>Md((()=>import("./CustomerOnboardingAuthScreen-DFMNQmWy.js")),__vite__mapDeps([33,1,2,0,18,8,19,20,21,22,5,23,7])))),h8s=Bm((()=>Md((()=>import("./SignOutScreen-BZdppeCA.js")),__vite__mapDeps([34,1,2,0,5,7,8])))),m8s=Bm((()=>Md((()=>import("./OAuthConsentScreen-CRExXXMv.js")),__vite__mapDeps([35,1,2,0,5,7,8])))),g8s=()=>{const e=d2(),n=new URLSearchParams(e.search),i=n.get("question"),r=i?.replace(/^["']|["']$/g,"")??null,s=n.get("should_submit")==="true",l=n8s("/",n);return Zt.jsx(TAt,{to:l,replace:!0,state:{origin:"/aicfo",message:"",queryParams:{aiCfoQuestion:r,aiCfoShouldSubmit:s?"true":"false"}}})};function f8s(){const{isOpen:e}=Mk(),n=Egi(),{isAiCfoOpen:i,setIsAiCfoOpen:r}=Lje(),s=m.useRef(!1),l=m.useRef(i),c=m.useRef(!1);return m.useLayoutEffect((()=>{const d=i&&!l.current;l.current=i,d&&e&&(r(!1),n(),c.current=!0)}),[i,e,r,n]),m.useEffect((()=>{e&&!s.current&&(c.current=!1,i&&r(!1)),s.current=e}),[e,i,r]),m.useEffect((()=>{!e&&c.current&&(c.current=!1,r(!0))}),[e,r]),null}const x8s=({tenantEmailDomain:e,setTenantEmailDomain:n})=>{const i=Br.isSignedIn(),r=qr((T=>xm(T))),s=Br.getSignedInUser(),l=i&&ON(s),c=qr((T=>tun(T))).tenantsBaseInOrder.map((T=>({companyId:T.companyId,tenantId:T.tenantId,companyName:T.companyName}))),d={userId:s?.userId??"",sessionId:s?.zeniSessionId??"",tenantId:r.tenantId??""},u=Kp(),p=ou(["/:tenantEmailDomain/dashboard/*","/:tenantEmailDomain/dashboard"]),h=zan(),g=Nje(),[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}=us(),{isFeatureEnabled:v}=C(Gr.isAiCfoFileUploadEnabled),{isFeatureEnabled:A}=C(Gr.isBillPayCommentingEnabled),{isFeatureEnabled:S}=C(Gr.isReimbursementCommentingEnabled),{isFeatureEnabled:$}=C(Gr.isExpenseAutomationEnabled),{isFeatureEnabled:j}=C(Gr.isExpenseAutomationEnabledV2),{isFeatureEnabled:I}=C(Gr.isTreasuryCommentingEnabled),{isFeatureEnabled:E}=C(Gr.isCheckingCommentingEnabled),{isFeatureEnabled:D}=C(Gr.isTransactionCommentingEnabled),{isFeatureEnabled:B}=C(Gr.isCardsCommentingEnabled),F=A||S||l&&$||!l&&j||I||E||D||B;m.useEffect((()=>{!h&&f&&x(!1)}),[h,f]),m.useEffect((()=>{h||u(nun())}),[u,h]);const R=d2().pathname.includes("/collect-payment/"),_=Zt.jsx(y8s,{setTenantEmailDomain:n,isOnDashboard:p,userHasZeniAiCfoAccess:g,isAiCfoFileUploadEnabled:v});if(R)return Zt.jsx(jGe,{children:Zt.jsx(l5t,{children:Zt.jsx(A8e.Provider,{value:w,children:_})})});const N=Zt.jsxs(A8e.Provider,{value:w,children:[Zt.jsx(f8s,{}),Zt.jsxs(C8s,{children:[Zt.jsx(o8s,{tenantEmailDomain:e}),Zt.jsx(b8s,{children:_})]})]});return Zt.jsx(jGe,{children:r.tenantId!=null?Zt.jsx(Y4a,{roomId:`dashboard_${r.companyId}`,authParams:d,users:[],companies:c,authUrlEndPoint:`${O8.tenantMicroServiceBaseUrl}/1.0/commenting/auth`,fetchZeniUsers:!0,commentingUsersUrlEndPoint:`${O8.tenantMicroServiceBaseUrl}/1.0/users/commenting-users`,isZeniUser:l,autoConnect:l||D||B,loggedInUser:s,withRoomProvider:!0,withThreadsProvider:F,threadsIndexStrategy:"roomThreads",filter:{application:"dashboard",companyId:r.companyId},children:N},r.tenantId):Zt.jsx(l5t,{children:N})})},y8s=({setTenantEmailDomain:e,isOnDashboard:n,userHasZeniAiCfoAccess:i,isAiCfoFileUploadEnabled:r})=>{const s=qr((x=>x.tenantState.loggedInUser)),{useDynamicConfig:l}=us(),{configValue:c}=l(J7.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}=Mje(),{isAiCfoOpen:g,setIsAiCfoOpen:f}=Lje();return m.useEffect((()=>{h(_an.APP_INITIALIZATION)}),[h]),Zt.jsx(m.Suspense,{fallback:null,children:Zt.jsx(t8s,{isPageIndependent:!0,batchCalls:d,isRefreshTriggerEnabled:!1,enableIdlePrefetch:!1,idleTimeout:u,expirationTime:p,children:Zt.jsxs(Hsn,{children:[Zt.jsx(cp,{path:"/magic_links/*",element:Zt.jsx(l8s,{})}),Zt.jsx(cp,{path:"/collect-payment/:namespace/:token",element:Zt.jsx(c8s,{})}),Zt.jsx(cp,{path:"/wise/callback/link-account/*",element:Zt.jsx(d8s,{})}),Zt.jsx(cp,{path:"/page-not-found",element:Zt.jsx(pAt,{})}),Zt.jsx(cp,{path:"/",element:Zt.jsx(i8s,{})}),Zt.jsx(cp,{path:"/aicfo",element:Zt.jsx(g8s,{})}),Zt.jsx(cp,{path:"/onboarding/auth",element:Zt.jsx(p8s,{})}),Zt.jsx(cp,{path:"/:tenantEmailDomain/*",element:Zt.jsx(A8s,{children:Zt.jsxs(h9s,{children:[Zt.jsxs(S8s,{children:[s!=null?Zt.jsx(q9s,{}):null,n?Zt.jsx(uAt,{setTenantEmailDomain:e}):Zt.jsx(z5e,{children:Zt.jsx(uAt,{setTenantEmailDomain:e})})]}),i?Zt.jsxs(Zt.Fragment,{children:[Zt.jsx(Wbs,{}),Zt.jsx(k8s,{isOpen:g,children:Zt.jsx(z9s,{isOpen:g,onClose:()=>f(!1),isFileUploadEnabled:r})})]}):null]})})}),Zt.jsx(cp,{path:"/signin/auth",element:Zt.jsx(z5e,{children:Zt.jsx(a8s,{setTenantEmailDomain:e})})}),Zt.jsx(cp,{path:"/signin/magic-link",element:Zt.jsx(z5e,{children:Zt.jsx(s8s,{})})}),Zt.jsx(cp,{path:"/signout",element:Zt.jsx(h8s,{})}),Zt.jsx(cp,{path:"/connection/auth",element:Zt.jsx(r8s,{})}),Zt.jsx(cp,{path:"/oauth/hubspot/callback",element:Zt.jsx(u8s,{})}),Zt.jsx(cp,{path:"/oauth/authorize",element:Zt.jsx(m8s,{})}),Zt.jsx(cp,{path:"*",element:Zt.jsx(pAt,{})})]})})})},b8s=({children:e})=>{const{isOpen:n,width:i}=Mk();return Zt.jsx(v8s,{commentsDrawerWidth:n?i:0,children:e})},w8s=di("div")`
|
|
90988
90988
|
display:flex;
|
|
90989
90989
|
`,C8s=di("div")`
|
|
90990
90990
|
display: flex;
|
|
@@ -91106,4 +91106,4 @@ ${IO.gap.expectedStartDate(u)}.`:f.description,y=p===!0||d!=null;return t.jsx(Ei
|
|
|
91106
91106
|
}
|
|
91107
91107
|
`,U8s=({fetchState:e,style:n})=>e==="In-Progress"||e==="Not-Started"?Zt.jsxs(z8s,{style:n,children:[Zt.jsxs(N8s,{children:[Zt.jsx(eK,{children:Zt.jsx(lg,{width:96,height:20})}),Zt.jsxs(eK,{children:[Zt.jsx(lg,{width:55,height:12}),Zt.jsx(lg,{width:78,height:16}),Zt.jsx(lg,{width:46,height:16})]}),Zt.jsxs(eK,{children:[Zt.jsx(lg,{width:55,height:12}),Zt.jsx(lg,{width:110,height:16}),Zt.jsx(lg,{width:84,height:16})]}),Zt.jsxs(eK,{children:[Zt.jsx(lg,{width:55,height:12}),Zt.jsx(lg,{width:84,height:16}),Zt.jsx(lg,{width:64,height:16})]})]}),Zt.jsxs(_8s,{children:[Zt.jsxs(V8s,{children:[Zt.jsx(lg,{width:106,height:27}),Zt.jsx(lg,{width:111,height:32})]}),Zt.jsx(H8s,{children:Zt.jsx(R8s,{width:96,height:96})})]})]}):null;function W8s({minDisplayTime:e=0}){const{isLoading:n}=Mje(),[i,r]=m.useState(!1),s=m.useRef(),l=m.useRef(null);return m.useLayoutEffect((()=>{if(s.current&&clearTimeout(s.current),Br.isSignedIn()===!1&&document.querySelector("#app-shell-loader")?.remove(),n)i||(r(!0),l.current=Date.now());else if(!n&&i){document.querySelector("#app-shell-loader")?.remove();const c=l.current;if(c!=null){const d=Date.now()-c,u=Math.max(0,e-d);s.current=setTimeout((()=>{r(!1),l.current=null}),u)}else r(!1)}}),[n,i,e]),m.useEffect((()=>()=>{s.current&&clearTimeout(s.current)}),[]),!n&&i||!i?null:Zt.jsx(U8s,{fetchState:"In-Progress"})}const Q8s=()=>{const[e,n]=m.useState((()=>Br.getSignedInUser()));return m.useEffect((()=>{const i=()=>{n(Br.getSignedInUser())};return window.addEventListener("completeProfileDone",i),()=>{window.removeEventListener("completeProfileDone",i)}}),[]),e},gAt="missing-receipts-batch-completed";let k8e=null,j8e=!1;function A$s(e,n){if(!n)return k8e=null,void(j8e=!1);k8e=e,j8e=!0}const Y8s=()=>{const e=Kp(),{useFeatureGate:n}=us(),{isFeatureEnabled:i}=n(Gr.isReconV3Enabled),r=qr((l=>OSt(l)?.reconciliation?.accountReconciliationsByAccountID)),s=m.useRef({});m.useEffect((()=>{i===!0&&r!=null&&Object.entries(r).forEach((([l,c])=>{const d=c.statementParseStatus.fetchState,u=s.current[l]??"Not-Started";c.statementProcessingDismissedToBackground!==!0||(function(p){return j8e&&k8e===p})(l)||u!=="In-Progress"||d!=="Completed"||e(TSt({messageSection:"statement_parsing_complete",messageText:"success",type:"info",showStatusIcon:!0,variables:[{variableName:"_account_name_",variableValue:vus(c)},{variableName:"_transaction_count_",variableValue:String(Aus(c))}]})),s.current[l]=d}))}),[r,e,i])},fAt="reconciliation-status-updated",xAt="statement-status-updated",yAt="combined-statement-group-updated";function G8s(e){return e.combinedStatementGroupId??e.parsedStatementData?.statementUpload?.statementMeta?.combinedStatementGroupId??e.parsedStatementData?.statementUpload?.combinedStatementDetails?.combinedStatementGroupId??""}function q8s(e,n,i,r,s,l){const c=i.account_id;if(c==null||c==="")return;const d=i.new_statement_data_status?.code;if(d==="deleting"||(e(FSt(n,c,!0,!0)),r!==!0))return;const u=i.statement_upload_id,p=u!=null&&u!=="",h=d==="parsed_awaiting_mapping"&&s===!0&&p===!0,g=d==="processed"&&p===!0&&(s!==!0||(function(f,x,y){return f!=null&&Object.values(f.accountReconciliationsByAccountID).some((b=>{const w=b.confirmedCombinedStatementUploads;if((w?.length??0)===0)return!1;const C=y!=null&&y!==""&&w?.some((A=>A.statementUploadId===y))===!0,v=w?.some((A=>A.accountId===x))===!0;return C===!0||v===!0}))})(l,c,u)!==!0);h!==!0&&g!==!0||e(aun({accountId:c,selectedPeriod:n,statementUploadId:u})),d!=="validation_failed"&&d!=="parsing_failed"&&d!=="processing_failed"||e(RSt({accountId:c,selectedPeriod:n,statementProcessingFailed:!0}))}function K8s(e,n,i,r,s,l){if(r!==!0||s!==!0)return;const c=i.group_status;if(c!=="processed"&&c!=="processing_failed")return;const d=(function(u,p){const h=p.combined_statement_group_id?.trim();if(u==null||h==null||h==="")return;const g=p.statement_upload_id?.trim()??"",f=Object.entries(u.accountReconciliationsByAccountID),x=(y,b)=>{const w=(function(C,v){return v!==""?v:C.confirmedCombinedStatementUploads?.find((A=>A.isCombinedStatementAnchor===!0))?.statementUploadId??C.confirmedCombinedStatementUploads?.[0]?.statementUploadId??C.accountReconEntity.statementMetaData?.statementUploadId??C.parsedStatementData?.statementUpload?.statementMeta?.statementUploadId??""})(b,g);if(w!=="")return{accountId:y,combinedStatementGroupId:h,statementUploadId:w}};for(const[y,b]of f){if(G8s(b)!==h)continue;const w=x(y,b);if(w!=null)return w}for(const[y,b]of f){const w=(b.confirmedCombinedStatementUploads?.length??0)>0,C=b.localData?.statementAccountScope==="multi_account";if(w!==!0&&C!==!0)continue;const v=x(y,b);if(v!=null)return v}})(l,i);d!=null&&(e(FSt(n,d.accountId,!0,!0)),e(c!=="processing_failed"?sun({accountId:d.accountId,selectedPeriod:n,statementUploadId:d.statementUploadId,combinedStatementGroupId:d.combinedStatementGroupId}):RSt({accountId:d.accountId,selectedPeriod:n,statementProcessingFailed:!0})))}function Z8s(){let e=mAt();return e===null&&(e=(function(){console.warn(`initializing epic state with url ${JSON.stringify(O8)}`);const n=Br.getSignedInUser(),i=n!=null?(function(){const l=window.location.pathname.split("/").filter(Boolean)[0],c=["signin","signout"];if(l!=null&&!c.includes(l)){const u=Br.getSignedInUserTenant(l);if(u?.tenantId!=null)return u.tenantId}return Br.getActiveTenantForUser()?.tenantId})():void 0,r=dun(O8,n?.userId,n?.zeniSessionId,i,JD(),ews);W5e();const s=pne();return s.userId!=null&&f0.identify(s.userId,{tenant_id:s.tenantId}),r})(),xsn=e,W5e().then((()=>{const n=mAt();n!=null&&(Gv.reset(),O8s(n))})).catch((n=>{console.error("Failed to load feature epics:",n),Ssn(n,{tags:{critical:"true",module:"epicManager"}}),alert(`The application failed to load required modules. Some features may not work correctly.
|
|
91108
91108
|
|
|
91109
|
-
Please refresh the page to try again.`)}))),e}ae.updateAppLocaleID("en");const tK=new lun,bAt=()=>{const e=Kp(),n=Br.getSignedInUser(),i=qr((B=>xm(B))),[r,s]=m.useState(null),l=(function(B){const{useDynamicConfig:F}=us(),{configValue:R,isDynamicConfigLoading:_}=F(XCe.sessionAutoLogoutConfig),N=R!=null&&Object.keys(R).length>0;if(_||B==null||!N)return oY;const T=Mmt(R.users_disabled_for_auto_logout),P=Mmt(R.users_enabled_for_auto_logout),L=R.is_inactivity_based_logout_feature_enabled===!0,V=T.includes(B),H=!V&&P.includes(B);return{heartbeatIntervalMinutes:p2e(R.heartbeat_interval_minutes,oY.heartbeatIntervalMinutes),idleTimeoutMinutes:p2e(R.idle_timeout_minutes,oY.idleTimeoutMinutes),isAutoLogoutEnabled:!V&&(H||L),warningDurationSeconds:p2e(R.warning_duration_seconds,oY.warningDurationSeconds)}})(n?.userId),c=m.useCallback(((B="manual")=>{B==="auto-logout"?(function(F){try{sessionStorage.setItem(DAe,"auto-logout"),sessionStorage.setItem(TAe,String(F.idleTimeoutMinutes)),sessionStorage.setItem(LAe,String(Date.now())),$R=void 0}catch{}})({idleTimeoutMinutes:l.idleTimeoutMinutes}):(J_t(),$R=void 0),s(null),tK.stop(),e(uun()),e(pun(!1)),Br.clearAll(),window.location.replace("/signin/auth")}),[e,s,l.idleTimeoutMinutes]);m.useEffect((()=>{if(n?.zeniSessionId!=null)return tK.start({idleTimeoutMinutes:l.idleTimeoutMinutes,warningDurationSeconds:l.warningDurationSeconds,heartbeatIntervalMinutes:l.heartbeatIntervalMinutes,isAutoLogoutEnabled:l.isAutoLogoutEnabled},{onHeartbeat:()=>e(hun()),onWarningStart:B=>{f0.trackSessionTimeoutPopupShown(B),s(B)},onWarningTick:s,onAutoLogout:()=>{f0.trackSessionTimeoutAutoLogout(),c("auto-logout")},onSessionExtended:()=>s(null)}),()=>tK.stop()}),[n?.zeniSessionId,l.isAutoLogoutEnabled,l.idleTimeoutMinutes,l.warningDurationSeconds,l.heartbeatIntervalMinutes,e,c,s]);const d=qr((B=>mun(B,i.companyId))),u=ou(["/:tenantEmailDomain/dashboard/*","/:tenantEmailDomain/dashboard"]),p=i?.excludedResources?.fetchState==="Completed"?i.excludedResources.resources:[];m.useEffect((()=>()=>{e(u$e())}),[]);const h=qr((B=>gun(B)));(()=>{const B=Jte(),F=Kp(),{useFeatureGate:R}=us(),{isFeatureEnabled:_}=R(Gr.isMissingReceiptsBulkUploadEnabled);m.useEffect((()=>{if(_!==!0||B==null)return;const N=Br.getSignedInUser()?.userId;if(N==null)return;const T=XD(B,N),P=L=>{F(run({batchId:L.batch_id,progress:L.progress,status:L.status.toLowerCase()}))};return T.bind(gAt,P),()=>{T.unbind(gAt,P)}}),[B,F,_])})(),(()=>{const B=Jte(),F=Kp(),{useFeatureGate:R}=us(),{isFeatureEnabled:_}=R(Gr.isReconV3Enabled),{isFeatureEnabled:N}=R(Gr.isReconciliationCombinedStatementEnabled),T=qr((W=>xm(W)?.companyId)),P=qr((W=>OSt(W))),L=P?.selectedPeriod,V=P?.reconciliation,H=L?.month,Q=L?.year,U=m.useRef(V);U.current=V,m.useEffect((()=>{if(B==null||T==null||H==null||Q==null)return;const W={month:H,year:Q},q=XD(B,T),K=te=>{q8s(F,W,te??{},_===!0,N===!0,U.current)},X=te=>{K8s(F,W,te??{},_===!0,N===!0,U.current)};return q.bind(fAt,K),q.bind(xAt,K),q.bind(yAt,X),()=>{q.unbind(fAt,K),q.unbind(xAt,K),q.unbind(yAt,X)}}),[B,F,_,N,T,H,Q])})(),Y8s();const g=i?.externalConnections?.accounting[0]?.connectionName,f=m.useMemo((()=>fun(i.userRole)),[i.userRole]),x={events:i.userRoleId!=null?[`private-encrypted-${i.userRoleId}.toast-message-user-notification`]:[],eventCallback:(B,F)=>{var R;R=F,R?.data!=null&&e(xun(F))}},y=m.useMemo((()=>Br.getSignedInUser()),[]),b=m.useMemo((()=>({userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:i.tenantId??""})),[y,i.tenantId]),{useFeatureGate:w}=us(),{isFeatureEnabled:C}=w(Gr.isApAgingFeatureEnabled),{isFeatureEnabled:v}=w(Gr.isArAgingFeatureEnabled),{isFeatureEnabled:A}=w(Gr.isInvoicingFeatureEnabled),S=pya(),$=i?.userRole!=null&&_s(i.userRole),j=p.find((B=>B.resource==="/reports/top_expenses"))==null,I=m.useMemo((()=>({canSeeApAging:C,canSeeArAging:v,canSeeInvoicing:A||Mc==="DEV",canSeeMonthEndClose:S&&!$,canSeeReports:i?.userRole!=null&&WAt(i.userRole),canSeeTopExpenses:j})),[C,v,A,S,$,i?.userRole,j]),E=m.useCallback((B=>M8s(B,{access:I,tenantEmailDomain:i?.tenantEmailDomain??""})),[I,i?.tenantEmailDomain]),D=m.useMemo((()=>({analytics:f0,sentry:ksn,authParams:b,resolveDeepLink:E})),[b,E]);return Zt.jsxs(HGn,{globalInfo:{loggedInUser:n,loggedInUserRole:i?.userRole,excludedResources:p,loggedInUserRoleMap:f,currentTenant:i,connectionName:g,controllersList:d},children:[Zt.jsx(MGn,{toolkit:D,children:Zt.jsxs(WYn,{endPoint:{url:Ije},children:[Zt.jsx(Our,{showSnackbar:h.isSnackbarOpen,snackbar:{message:h.message,messageType:h.messageType,onRemoveSnackbar:()=>{e(u$e())},showStatusIcon:h.showStatusIcon},isOnDashboard:u}),Zt.jsx(j8s,{...x})]})}),r!=null&&n!=null?Zt.jsx(Abs,{secondsRemaining:r,onContinueSession:()=>{f0.trackSessionTimeoutClicked("continue",r),tK.continueSession()},onSignOut:()=>{f0.trackSessionTimeoutClicked("sign_out",r),c()}}):null]})},J8s=()=>{const e=Br.isSignedIn(),n=qr((c=>xm(c))).companyId,i=qr((c=>cun(c.companyState,n)?.company.featuresActivationInfo.connectedAccountProvider)),r=Q8s(),s=m.useMemo((()=>({companyId:n,connectedAccountProvider:i,userId:r?.userId})),[n,i,r?.userId]),l=m.useMemo((()=>({currentFeatureEnv:Jvt,featureClientSecret:nl.featureClientSecret,providerEndPoint:BN.statsigBaseUrl})),[Jvt,nl.featureClientSecret,BN.statsigBaseUrl]);return n?Zt.jsx(vJn,{isUserSignedIn:e,featureGateCustomFields:s,zeniFeatureConfig:l,children:Zt.jsx(bAt,{})}):Zt.jsx(bAt,{})},X8s=Asn((function(){const e=m.useMemo((()=>Z8s()),[]),[n,i]=m.useState(!1),[r,s]=m.useState(!1);m.useEffect((()=>{W5e().then((()=>i(!0))).catch((()=>{}))}),[]);const l=m.useCallback((c=>{c.data?.type==="UPDATE_READY"?s(!0):c.data?.type==="HIDE_UPDATE_POPUP"&&s(!1)}),[]);return m.useEffect((()=>("serviceWorker"in navigator&&(navigator.serviceWorker.addEventListener("message",l),navigator.serviceWorker.addEventListener("controllerchange",(()=>{s(!1)}))),()=>{navigator.serviceWorker.removeEventListener("message",l)})),[l]),Zt.jsx($8s,{children:Zt.jsx(Usn,{store:e,children:Zt.jsx(F8s,{value:n,children:Zt.jsxs(Ybs,{children:[Zt.jsx(W8s,{}),Zt.jsx(tSn,{children:Zt.jsx(C9s,{children:Zt.jsxs(BGn,{children:[r?Zt.jsx(I0i,{onPrimaryClick:()=>{s(!1),window.location.reload()}}):null,Zt.jsx(J8s,{})]})})})]})})})})}));function ews(){console.warn("Session invalidated - forcing logout"),window.location.href="/signout"}const tws=!!(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}$/)),wAt=`/service-worker.js?v=${Date.now()}&env=QA&endpoint=${encodeURIComponent("https://zeni-webapp-qa.uc.r.appspot.com")}`;function CAt(e,n){navigator.serviceWorker.register(e).then((i=>{i.onupdatefound=()=>{const r=i.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"}),i.waiting?.postMessage({type:"SKIP_WAITING"})):console.log("Content is cached for offline use."))})},i.waiting&&i.waiting.postMessage({type:"SKIP_WAITING"}),navigator.serviceWorker.addEventListener("controllerchange",(()=>{console.log("New service worker activated."),i.active?.postMessage({type:"CLIENTS_CLAIM"})}))})).catch((i=>{console.error("Error during service worker registration:",i)}))}const vAt="zeni-chunk-reload-at",nws=["Failed to fetch dynamically imported module","error loading dynamically imported module","Importing a module script failed"];function AAt(e){try{const n=Number(sessionStorage.getItem(vAt))||0;if(Date.now()-n<6e4)return!1;sessionStorage.setItem(vAt,String(Date.now()))}catch{return!1}return console.warn("[chunk-load] Stale chunk detected — hard-reloading:",e),window.location.reload(),!0}let N5e=!1,SAt=null;const kAt="//js.hs-scripts.com/5991084.js",jAt="hs-script-loader",iws=Br.getSignedInUser(),ows=iws?.zeniSessionId;var Ev;window.addEventListener("vite:preloadError",(e=>{const n=e;AAt(n.payload)&&n.preventDefault()})),window.addEventListener("unhandledrejection",(e=>{(function(n){const i=String(n?.message??n??"");return nws.some((r=>i.includes(r)))})(e.reason)&&AAt(e.reason)})),(async function(){try{const i=await(async function(){const s={environment:Mc},l=encodeURIComponent(JSON.stringify(s));try{const c=await fetch(`${Ije}/api/keys?query=${l}`);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=i,n="ZENI-WEB-APP-"+Mc,gz.AES.decrypt(e,n).toString(gz.enc.Utf8));zbs(JSON.parse(r)),Pun.createRoot(document.getElementById("root")).render(Zt.jsx(M.StrictMode,{children:Zt.jsx(Wsn,{children:Zt.jsx(X8s,{})})})),(function(){const s=()=>{const l=nl.sentryDsn?.trim();if(!l)return;const c=nl.sentryProfileSamplingRate>0,d=Mc==="PROD";jsn({dsn:l,environment:Fbs,tracesSampleRate:nl.sentryTraceSamplingRate,profilesSampleRate:c?nl.sentryProfileSamplingRate:0,integrations:[$sn(),...c?[Esn()]:[],...d?[Isn({maskAllText:!0,blockAllMedia:!0})]:[]],replaysSessionSampleRate:0,replaysOnErrorSampleRate:d?1:0,beforeSendTransaction:u=>(u.breadcrumbs&&(u.breadcrumbs=u.breadcrumbs.filter((p=>p.category!=="console"||!((p.message??"").toLowerCase().includes("called people set")||Array.isArray(p.data?.arguments)&&p.data.arguments.some((h=>typeof h=="string"&&h.toLowerCase().includes("called people set")))||(Array.isArray(p.data?.arguments)&&(p.data.arguments=p.data.arguments.map((h=>{if(typeof h=="string"&&h.includes("user_roles"))try{const g=h.match(/\{.*\}/s);if(g!==null){const f=JSON.parse(g[0]);if(f.user_roles!=null)return delete f.user_roles,h.replace(g[0],JSON.stringify(f))}}catch{}return h}))),0))))),u)}),Dsn("session-id",ows)};"requestIdleCallback"in window?requestIdleCallback(s):setTimeout(s,0)})()}catch(i){console.error("Error initializing app:",i)}var e,n})(),typeof window>"u"?Promise.resolve(!1):SAt!==null||(SAt=new Promise((e=>{if(N5e)return void e(!0);const n=()=>{N5e?e(!0):(N5e=!0,new Promise(((r,s)=>{if(document.getElementById(jAt))return void r();const l=document.createElement("script");l.id=jAt,l.src=kAt,l.async=!0,l.onload=()=>r(),l.onerror=()=>s(new Error(`Failed to load HubSpot script: ${kAt}`)),document.body.appendChild(l)})).then((()=>{e(!0)})).catch((r=>{console.error("Error loading third-party scripts:",r),e(!0)})))},i=()=>{var r,s;r=()=>{setTimeout(n,7e3)},s=3e3,"requestIdleCallback"in window?window.requestIdleCallback(r,{timeout:s}):setTimeout(r,50)};document.readyState==="complete"?i():window.addEventListener("load",i,{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;tws?(e=wAt,fetch(e,{headers:{"Service-Worker":"script"}}).then((n=>{const i=n.headers.get("content-type");n.status===404||i!=null&&!i.includes("javascript")?navigator.serviceWorker.ready.then((r=>{r.unregister().then((()=>window.location.reload()))})):CAt(e)})).catch((()=>{console.log("No internet connection found. App is running in offline mode.")}))):CAt(wAt)}))}})(),(Ev=console.log)&&Ev instanceof Function&&Md((async()=>{const{onCLS:e,onINP:n,onFCP:i,onLCP:r,onTTFB:s}=await import("./web-vitals-BX1IdLuJ.js");return{onCLS:e,onINP:n,onFCP:i,onLCP:r,onTTFB:s}}),[]).then((({onCLS:e,onINP:n,onFCP:i,onLCP:r,onTTFB:s})=>{e(Ev),n(Ev),i(Ev),r(Ev),s(Ev)}));export{FCs as $,S9s as A,Vje as B,$9s as C,w$s as D,Be as E,di as F,ae as G,o as H,VAe as I,Bm as J,Dn as K,_an as L,tSs as M,gCs as N,ENt as O,d$s as P,pya as Q,c0i as R,Gr as S,Mc as T,O8s as U,Bi as V,OCs as W,neo as X,mAt as Y,uCs as Z,nl as _,Lje as a,kSs as a$,Gn as a0,bws as a1,ge as a2,KAs as a3,fbi as a4,c$s as a5,ZAs as a6,JAs as a7,U9s as a8,$Ae as a9,Ei as aA,dAs as aB,cAs as aC,rDo as aD,RCs as aE,IAs as aF,EAs as aG,$x as aH,sZt as aI,DAs as aJ,Cws as aK,Jte as aL,v9s as aM,jSs as aN,$Ss as aO,dCs as aP,aSs as aQ,hAs as aR,fAs as aS,QSe as aT,cSs as aU,lSs as aV,gAs as aW,mAs as aX,cCs as aY,tzt as aZ,Ujs as a_,R8s as aa,$Xo as ab,z as ac,XAs as ad,_js as ae,O8 as af,O as ag,wws as ah,MAs as ai,bCs as aj,LAs as ak,MCs as al,a$s as am,NCs as an,u9s as ao,rsn as ap,p$s as aq,m9s as ar,p9s as as,h$s as at,$Cs as au,Gp as av,Ije as aw,rAt as ax,Uks as ay,iks as az,n8s as b,Vvs as b$,vSs as b0,SSs as b1,ASs as b2,aAs as b3,$As as b4,Pi as b5,MGn as b6,BAs as b7,qko as b8,zCs as b9,Tws as bA,Wks as bB,pAs as bC,Bws as bD,Pws as bE,Lws as bF,JD as bG,sSs as bH,jvs as bI,Evs as bJ,$vs as bK,Avs as bL,vvs as bM,Ivs as bN,eSs as bO,Svs as bP,kvs as bQ,Tvs as bR,zs as bS,ISs as bT,nSs as bU,zvs as bV,Fvs as bW,e$s as bX,kAs as bY,Gjs as bZ,Hvs as b_,$Mi as ba,aio as bb,oSs as bc,iSs as bd,rSs as be,fCs as bf,In as bg,La as bh,nsn as bi,J7 as bj,l$s as bk,M9s as bl,jCs as bm,ECs as bn,TSs as bo,Tje as bp,Hbs as bq,pCs as br,TVi as bs,FOt as bt,_Cs as bu,b9s as bv,Nvs as bw,Dws as bx,Mws as by,Fve as bz,Q8s as c,vAs as c$,tAs as c0,eAs as c1,rAs as c2,oAs as c3,Lvs as c4,Bvs as c5,TAs as c6,PAs as c7,Pvs as c8,Mvs as c9,Kks as cA,Njs as cB,tjs as cC,Mjs as cD,sjs as cE,ut as cF,ejs as cG,qi as cH,Ejs as cI,njs as cJ,ajs as cK,Ijs as cL,yjs as cM,bjs as cN,wjs as cO,xjs as cP,Cjs as cQ,fjs as cR,U8s as cS,zws as cT,sAs as cU,lAs as cV,Qks as cW,Rvs as cX,o$s as cY,qjs as cZ,bAs as c_,Ovs as ca,iAs as cb,nAs as cc,Ojs as cd,Pjs as ce,ijs as cf,ujs as cg,ojs as ch,qks as ci,Jks as cj,Djs as ck,ljs as cl,Sjs as cm,kjs as cn,Ajs as co,Xks as cp,rjs as cq,zjs as cr,Fjs as cs,Rjs as ct,Tjs as cu,cjs as cv,Bjs as cw,Ljs as cx,djs as cy,vjs as cz,Nje as d,r$s as d$,wAs as d0,Aws as d1,xAs as d2,yAs as d3,EAe as d4,AAs as d5,jAs as d6,S2s as d7,O3s as d8,u5e as d9,LSs as dA,FSs as dB,qSs as dC,Fws as dD,Rws as dE,ZSs as dF,YSs as dG,QSs as dH,PSs as dI,GSs as dJ,ESs as dK,W4a as dL,Nks as dM,Hks as dN,Gks as dO,Yks as dP,Wjs as dQ,vus as dR,$ws as dS,Yjs as dT,Qjs as dU,A$s as dV,sio as dW,uAs as dX,Egi as dY,Mk as dZ,rin as d_,t$s as da,n$s as db,i$s as dc,Xjs as dd,xCs as de,fJt as df,USs as dg,HSs as dh,_Ss as di,WSs as dj,VSs as dk,Kjs as dl,NSs as dm,zSs as dn,KSs as dp,BSs as dq,OSs as dr,Ows as ds,CAs as dt,cr as du,sXr as dv,MSs as dw,asn as dx,DSs as dy,RSs as dz,v$s as e,H9o as e0,Hjs as e1,_vs as e2,Fks as e3,nks as e4,tks as e5,eks as e6,e9s as e7,_z as e8,w9s as e9,E9s as ea,$an as eb,O9s as ec,Pye as ed,ean as ee,Xrn as ef,jws as eg,Zbs as eh,Xbs as ei,Jbs as ej,Rbs as ek,Gbs as el,kan as em,u$s as en,C$s as f,Sws as g,kws as h,g$s as i,_t as j,f0 as k,b$s as l,k as m,y$s as n,us as o,oL as p,x$s as q,j9s as r,vNi as s,Gv as t,Mje as u,m$s as v,lsn as w,s$s as x,f$s as y,Br as z};
|
|
91109
|
+
Please refresh the page to try again.`)}))),e}ae.updateAppLocaleID("en");const tK=new lun,bAt=()=>{const e=Kp(),n=Br.getSignedInUser(),i=qr((B=>xm(B))),[r,s]=m.useState(null),l=(function(B){const{useDynamicConfig:F}=us(),{configValue:R,isDynamicConfigLoading:_}=F(XCe.sessionAutoLogoutConfig),N=R!=null&&Object.keys(R).length>0;if(_||B==null||!N)return oY;const T=Mmt(R.users_disabled_for_auto_logout),P=Mmt(R.users_enabled_for_auto_logout),L=R.is_inactivity_based_logout_feature_enabled===!0,V=T.includes(B),H=!V&&P.includes(B);return{heartbeatIntervalMinutes:p2e(R.heartbeat_interval_minutes,oY.heartbeatIntervalMinutes),idleTimeoutMinutes:p2e(R.idle_timeout_minutes,oY.idleTimeoutMinutes),isAutoLogoutEnabled:!V&&(H||L),warningDurationSeconds:p2e(R.warning_duration_seconds,oY.warningDurationSeconds)}})(n?.userId),c=m.useCallback(((B="manual")=>{B==="auto-logout"?(function(F){try{sessionStorage.setItem(DAe,"auto-logout"),sessionStorage.setItem(TAe,String(F.idleTimeoutMinutes)),sessionStorage.setItem(LAe,String(Date.now())),$R=void 0}catch{}})({idleTimeoutMinutes:l.idleTimeoutMinutes}):(J_t(),$R=void 0),s(null),tK.stop(),e(uun()),e(pun(!1)),Br.clearAll(),window.location.replace("/signin/auth")}),[e,s,l.idleTimeoutMinutes]);m.useEffect((()=>{if(n?.zeniSessionId!=null)return tK.start({idleTimeoutMinutes:l.idleTimeoutMinutes,warningDurationSeconds:l.warningDurationSeconds,heartbeatIntervalMinutes:l.heartbeatIntervalMinutes,isAutoLogoutEnabled:l.isAutoLogoutEnabled},{onHeartbeat:()=>e(hun()),onWarningStart:B=>{f0.trackSessionTimeoutPopupShown(B),s(B)},onWarningTick:s,onAutoLogout:()=>{f0.trackSessionTimeoutAutoLogout(),c("auto-logout")},onSessionExtended:()=>s(null)}),()=>tK.stop()}),[n?.zeniSessionId,l.isAutoLogoutEnabled,l.idleTimeoutMinutes,l.warningDurationSeconds,l.heartbeatIntervalMinutes,e,c,s]);const d=qr((B=>mun(B,i.companyId))),u=ou(["/:tenantEmailDomain/dashboard/*","/:tenantEmailDomain/dashboard"]),p=i?.excludedResources?.fetchState==="Completed"?i.excludedResources.resources:[];m.useEffect((()=>()=>{e(u$e())}),[]);const h=qr((B=>gun(B)));(()=>{const B=Jte(),F=Kp(),{useFeatureGate:R}=us(),{isFeatureEnabled:_}=R(Gr.isMissingReceiptsBulkUploadEnabled);m.useEffect((()=>{if(_!==!0||B==null)return;const N=Br.getSignedInUser()?.userId;if(N==null)return;const T=XD(B,N),P=L=>{F(run({batchId:L.batch_id,progress:L.progress,status:L.status.toLowerCase()}))};return T.bind(gAt,P),()=>{T.unbind(gAt,P)}}),[B,F,_])})(),(()=>{const B=Jte(),F=Kp(),{useFeatureGate:R}=us(),{isFeatureEnabled:_}=R(Gr.isReconV3Enabled),{isFeatureEnabled:N}=R(Gr.isReconciliationCombinedStatementEnabled),T=qr((W=>xm(W)?.companyId)),P=qr((W=>OSt(W))),L=P?.selectedPeriod,V=P?.reconciliation,H=L?.month,Q=L?.year,U=m.useRef(V);U.current=V,m.useEffect((()=>{if(B==null||T==null||H==null||Q==null)return;const W={month:H,year:Q},q=XD(B,T),K=te=>{q8s(F,W,te??{},_===!0,N===!0,U.current)},X=te=>{K8s(F,W,te??{},_===!0,N===!0,U.current)};return q.bind(fAt,K),q.bind(xAt,K),q.bind(yAt,X),()=>{q.unbind(fAt,K),q.unbind(xAt,K),q.unbind(yAt,X)}}),[B,F,_,N,T,H,Q])})(),Y8s();const g=i?.externalConnections?.accounting[0]?.connectionName,f=m.useMemo((()=>fun(i.userRole)),[i.userRole]),x={events:i.userRoleId!=null?[`private-encrypted-${i.userRoleId}.toast-message-user-notification`]:[],eventCallback:(B,F)=>{var R;R=F,R?.data!=null&&e(xun(F))}},y=m.useMemo((()=>Br.getSignedInUser()),[]),b=m.useMemo((()=>({userId:y?.userId??"",sessionId:y?.zeniSessionId??"",tenantId:i.tenantId??""})),[y,i.tenantId]),{useFeatureGate:w}=us(),{isFeatureEnabled:C}=w(Gr.isApAgingFeatureEnabled),{isFeatureEnabled:v}=w(Gr.isArAgingFeatureEnabled),{isFeatureEnabled:A}=w(Gr.isInvoicingFeatureEnabled),S=pya(),$=i?.userRole!=null&&_s(i.userRole),j=p.find((B=>B.resource==="/reports/top_expenses"))==null,I=m.useMemo((()=>({canSeeApAging:C,canSeeArAging:v,canSeeInvoicing:A||Mc==="DEV",canSeeMonthEndClose:S&&!$,canSeeReports:i?.userRole!=null&&WAt(i.userRole),canSeeTopExpenses:j})),[C,v,A,S,$,i?.userRole,j]),E=m.useCallback((B=>M8s(B,{access:I,tenantEmailDomain:i?.tenantEmailDomain??""})),[I,i?.tenantEmailDomain]),D=m.useMemo((()=>({analytics:f0,sentry:ksn,authParams:b,resolveDeepLink:E})),[b,E]);return Zt.jsxs(HGn,{globalInfo:{loggedInUser:n,loggedInUserRole:i?.userRole,excludedResources:p,loggedInUserRoleMap:f,currentTenant:i,connectionName:g,controllersList:d},children:[Zt.jsx(MGn,{toolkit:D,children:Zt.jsxs(WYn,{endPoint:{url:Ije},children:[Zt.jsx(Our,{showSnackbar:h.isSnackbarOpen,snackbar:{message:h.message,messageType:h.messageType,onRemoveSnackbar:()=>{e(u$e())},showStatusIcon:h.showStatusIcon},isOnDashboard:u}),Zt.jsx(j8s,{...x})]})}),r!=null&&n!=null?Zt.jsx(Abs,{secondsRemaining:r,onContinueSession:()=>{f0.trackSessionTimeoutClicked("continue",r),tK.continueSession()},onSignOut:()=>{f0.trackSessionTimeoutClicked("sign_out",r),c()}}):null]})},J8s=()=>{const e=Br.isSignedIn(),n=qr((c=>xm(c))).companyId,i=qr((c=>cun(c.companyState,n)?.company.featuresActivationInfo.connectedAccountProvider)),r=Q8s(),s=m.useMemo((()=>({companyId:n,connectedAccountProvider:i,userId:r?.userId})),[n,i,r?.userId]),l=m.useMemo((()=>({currentFeatureEnv:Jvt,featureClientSecret:nl.featureClientSecret,providerEndPoint:BN.statsigBaseUrl})),[Jvt,nl.featureClientSecret,BN.statsigBaseUrl]);return n?Zt.jsx(vJn,{isUserSignedIn:e,featureGateCustomFields:s,zeniFeatureConfig:l,children:Zt.jsx(bAt,{})}):Zt.jsx(bAt,{})},X8s=Asn((function(){const e=m.useMemo((()=>Z8s()),[]),[n,i]=m.useState(!1),[r,s]=m.useState(!1);m.useEffect((()=>{W5e().then((()=>i(!0))).catch((()=>{}))}),[]);const l=m.useCallback((c=>{c.data?.type==="UPDATE_READY"?s(!0):c.data?.type==="HIDE_UPDATE_POPUP"&&s(!1)}),[]);return m.useEffect((()=>("serviceWorker"in navigator&&(navigator.serviceWorker.addEventListener("message",l),navigator.serviceWorker.addEventListener("controllerchange",(()=>{s(!1)}))),()=>{navigator.serviceWorker.removeEventListener("message",l)})),[l]),Zt.jsx($8s,{children:Zt.jsx(Usn,{store:e,children:Zt.jsx(F8s,{value:n,children:Zt.jsxs(Ybs,{children:[Zt.jsx(W8s,{}),Zt.jsx(tSn,{children:Zt.jsx(C9s,{children:Zt.jsxs(BGn,{children:[r?Zt.jsx(I0i,{onPrimaryClick:()=>{s(!1),window.location.reload()}}):null,Zt.jsx(J8s,{})]})})})]})})})})}));function ews(){console.warn("Session invalidated - forcing logout"),window.location.href="/signout"}const tws=!!(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}$/)),wAt=`/service-worker.js?v=${Date.now()}&env=DEV&endpoint=${encodeURIComponent("https://zeni-webapp-dev.uc.r.appspot.com")}`;function CAt(e,n){navigator.serviceWorker.register(e).then((i=>{i.onupdatefound=()=>{const r=i.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"}),i.waiting?.postMessage({type:"SKIP_WAITING"})):console.log("Content is cached for offline use."))})},i.waiting&&i.waiting.postMessage({type:"SKIP_WAITING"}),navigator.serviceWorker.addEventListener("controllerchange",(()=>{console.log("New service worker activated."),i.active?.postMessage({type:"CLIENTS_CLAIM"})}))})).catch((i=>{console.error("Error during service worker registration:",i)}))}const vAt="zeni-chunk-reload-at",nws=["Failed to fetch dynamically imported module","error loading dynamically imported module","Importing a module script failed"];function AAt(e){try{const n=Number(sessionStorage.getItem(vAt))||0;if(Date.now()-n<6e4)return!1;sessionStorage.setItem(vAt,String(Date.now()))}catch{return!1}return console.warn("[chunk-load] Stale chunk detected — hard-reloading:",e),window.location.reload(),!0}let N5e=!1,SAt=null;const kAt="//js.hs-scripts.com/5991084.js",jAt="hs-script-loader",iws=Br.getSignedInUser(),ows=iws?.zeniSessionId;var Ev;window.addEventListener("vite:preloadError",(e=>{const n=e;AAt(n.payload)&&n.preventDefault()})),window.addEventListener("unhandledrejection",(e=>{(function(n){const i=String(n?.message??n??"");return nws.some((r=>i.includes(r)))})(e.reason)&&AAt(e.reason)})),(async function(){try{const i=await(async function(){const s={environment:Mc},l=encodeURIComponent(JSON.stringify(s));try{const c=await fetch(`${Ije}/api/keys?query=${l}`);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=i,n="ZENI-WEB-APP-"+Mc,gz.AES.decrypt(e,n).toString(gz.enc.Utf8));zbs(JSON.parse(r)),Pun.createRoot(document.getElementById("root")).render(Zt.jsx(M.StrictMode,{children:Zt.jsx(Wsn,{children:Zt.jsx(X8s,{})})})),(function(){const s=()=>{const l=nl.sentryDsn?.trim();if(!l)return;const c=nl.sentryProfileSamplingRate>0,d=Mc==="PROD";jsn({dsn:l,environment:Fbs,tracesSampleRate:nl.sentryTraceSamplingRate,profilesSampleRate:c?nl.sentryProfileSamplingRate:0,integrations:[$sn(),...c?[Esn()]:[],...d?[Isn({maskAllText:!0,blockAllMedia:!0})]:[]],replaysSessionSampleRate:0,replaysOnErrorSampleRate:d?1:0,beforeSendTransaction:u=>(u.breadcrumbs&&(u.breadcrumbs=u.breadcrumbs.filter((p=>p.category!=="console"||!((p.message??"").toLowerCase().includes("called people set")||Array.isArray(p.data?.arguments)&&p.data.arguments.some((h=>typeof h=="string"&&h.toLowerCase().includes("called people set")))||(Array.isArray(p.data?.arguments)&&(p.data.arguments=p.data.arguments.map((h=>{if(typeof h=="string"&&h.includes("user_roles"))try{const g=h.match(/\{.*\}/s);if(g!==null){const f=JSON.parse(g[0]);if(f.user_roles!=null)return delete f.user_roles,h.replace(g[0],JSON.stringify(f))}}catch{}return h}))),0))))),u)}),Dsn("session-id",ows)};"requestIdleCallback"in window?requestIdleCallback(s):setTimeout(s,0)})()}catch(i){console.error("Error initializing app:",i)}var e,n})(),typeof window>"u"?Promise.resolve(!1):SAt!==null||(SAt=new Promise((e=>{if(N5e)return void e(!0);const n=()=>{N5e?e(!0):(N5e=!0,new Promise(((r,s)=>{if(document.getElementById(jAt))return void r();const l=document.createElement("script");l.id=jAt,l.src=kAt,l.async=!0,l.onload=()=>r(),l.onerror=()=>s(new Error(`Failed to load HubSpot script: ${kAt}`)),document.body.appendChild(l)})).then((()=>{e(!0)})).catch((r=>{console.error("Error loading third-party scripts:",r),e(!0)})))},i=()=>{var r,s;r=()=>{setTimeout(n,7e3)},s=3e3,"requestIdleCallback"in window?window.requestIdleCallback(r,{timeout:s}):setTimeout(r,50)};document.readyState==="complete"?i():window.addEventListener("load",i,{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;tws?(e=wAt,fetch(e,{headers:{"Service-Worker":"script"}}).then((n=>{const i=n.headers.get("content-type");n.status===404||i!=null&&!i.includes("javascript")?navigator.serviceWorker.ready.then((r=>{r.unregister().then((()=>window.location.reload()))})):CAt(e)})).catch((()=>{console.log("No internet connection found. App is running in offline mode.")}))):CAt(wAt)}))}})(),(Ev=console.log)&&Ev instanceof Function&&Md((async()=>{const{onCLS:e,onINP:n,onFCP:i,onLCP:r,onTTFB:s}=await import("./web-vitals-BX1IdLuJ.js");return{onCLS:e,onINP:n,onFCP:i,onLCP:r,onTTFB:s}}),[]).then((({onCLS:e,onINP:n,onFCP:i,onLCP:r,onTTFB:s})=>{e(Ev),n(Ev),i(Ev),r(Ev),s(Ev)}));export{FCs as $,S9s as A,Vje as B,$9s as C,w$s as D,Be as E,di as F,ae as G,o as H,VAe as I,Bm as J,Dn as K,_an as L,tSs as M,gCs as N,ENt as O,d$s as P,pya as Q,c0i as R,Gr as S,Mc as T,O8s as U,Bi as V,OCs as W,neo as X,mAt as Y,uCs as Z,nl as _,Lje as a,kSs as a$,Gn as a0,bws as a1,ge as a2,KAs as a3,fbi as a4,c$s as a5,ZAs as a6,JAs as a7,U9s as a8,$Ae as a9,Ei as aA,dAs as aB,cAs as aC,rDo as aD,RCs as aE,IAs as aF,EAs as aG,$x as aH,sZt as aI,DAs as aJ,Cws as aK,Jte as aL,v9s as aM,jSs as aN,$Ss as aO,dCs as aP,aSs as aQ,hAs as aR,fAs as aS,QSe as aT,cSs as aU,lSs as aV,gAs as aW,mAs as aX,cCs as aY,tzt as aZ,Ujs as a_,R8s as aa,$Xo as ab,z as ac,XAs as ad,_js as ae,O8 as af,O as ag,wws as ah,MAs as ai,bCs as aj,LAs as ak,MCs as al,a$s as am,NCs as an,u9s as ao,rsn as ap,p$s as aq,m9s as ar,p9s as as,h$s as at,$Cs as au,Gp as av,Ije as aw,rAt as ax,Uks as ay,iks as az,n8s as b,Vvs as b$,vSs as b0,SSs as b1,ASs as b2,aAs as b3,$As as b4,Pi as b5,MGn as b6,BAs as b7,qko as b8,zCs as b9,Tws as bA,Wks as bB,pAs as bC,Bws as bD,Pws as bE,Lws as bF,JD as bG,sSs as bH,jvs as bI,Evs as bJ,$vs as bK,Avs as bL,vvs as bM,Ivs as bN,eSs as bO,Svs as bP,kvs as bQ,Tvs as bR,zs as bS,ISs as bT,nSs as bU,zvs as bV,Fvs as bW,e$s as bX,kAs as bY,Gjs as bZ,Hvs as b_,$Mi as ba,aio as bb,oSs as bc,iSs as bd,rSs as be,fCs as bf,In as bg,La as bh,nsn as bi,J7 as bj,l$s as bk,M9s as bl,jCs as bm,ECs as bn,TSs as bo,Tje as bp,Hbs as bq,pCs as br,TVi as bs,FOt as bt,_Cs as bu,b9s as bv,Nvs as bw,Dws as bx,Mws as by,Fve as bz,Q8s as c,vAs as c$,tAs as c0,eAs as c1,rAs as c2,oAs as c3,Lvs as c4,Bvs as c5,TAs as c6,PAs as c7,Pvs as c8,Mvs as c9,Kks as cA,Njs as cB,tjs as cC,Mjs as cD,sjs as cE,ut as cF,ejs as cG,qi as cH,Ejs as cI,njs as cJ,ajs as cK,Ijs as cL,yjs as cM,bjs as cN,wjs as cO,xjs as cP,Cjs as cQ,fjs as cR,U8s as cS,zws as cT,sAs as cU,lAs as cV,Qks as cW,Rvs as cX,o$s as cY,qjs as cZ,bAs as c_,Ovs as ca,iAs as cb,nAs as cc,Ojs as cd,Pjs as ce,ijs as cf,ujs as cg,ojs as ch,qks as ci,Jks as cj,Djs as ck,ljs as cl,Sjs as cm,kjs as cn,Ajs as co,Xks as cp,rjs as cq,zjs as cr,Fjs as cs,Rjs as ct,Tjs as cu,cjs as cv,Bjs as cw,Ljs as cx,djs as cy,vjs as cz,Nje as d,r$s as d$,wAs as d0,Aws as d1,xAs as d2,yAs as d3,EAe as d4,AAs as d5,jAs as d6,S2s as d7,O3s as d8,u5e as d9,LSs as dA,FSs as dB,qSs as dC,Fws as dD,Rws as dE,ZSs as dF,YSs as dG,QSs as dH,PSs as dI,GSs as dJ,ESs as dK,W4a as dL,Nks as dM,Hks as dN,Gks as dO,Yks as dP,Wjs as dQ,vus as dR,$ws as dS,Yjs as dT,Qjs as dU,A$s as dV,sio as dW,uAs as dX,Egi as dY,Mk as dZ,rin as d_,t$s as da,n$s as db,i$s as dc,Xjs as dd,xCs as de,fJt as df,USs as dg,HSs as dh,_Ss as di,WSs as dj,VSs as dk,Kjs as dl,NSs as dm,zSs as dn,KSs as dp,BSs as dq,OSs as dr,Ows as ds,CAs as dt,cr as du,sXr as dv,MSs as dw,asn as dx,DSs as dy,RSs as dz,v$s as e,H9o as e0,Hjs as e1,_vs as e2,Fks as e3,nks as e4,tks as e5,eks as e6,e9s as e7,_z as e8,w9s as e9,E9s as ea,$an as eb,O9s as ec,Pye as ed,ean as ee,Xrn as ef,jws as eg,Zbs as eh,Xbs as ei,Jbs as ej,Rbs as ek,Gbs as el,kan as em,u$s as en,C$s as f,Sws as g,kws as h,g$s as i,_t as j,f0 as k,b$s as l,k as m,y$s as n,us as o,oL as p,x$s as q,j9s as r,vNi as s,Gv as t,Mje as u,m$s as v,lsn as w,s$s as x,f$s as y,Br as z};
|