import{n as e,s as t}from"./rolldown-runtime-BG2f4sTM.js";import{$7 as n,$T as r,AL as i,B1 as a,But as o,Dvt as s,F9 as ee,I9 as te,L9 as c,M9 as l,N9 as u,Nvt as d,O5 as f,P9 as p,Sft as m,Tft as h,X1 as g,X7 as ne,Y1 as _,Z7 as v,bh as y,cE as b,cH as x,e9 as S,eE as C,ept as w,f7 as T,idt as E,jL as D,k5 as O,lE as k,n as A,odt as j,p7 as re,rdt as M,sdt as N,t as P,uH as F,vh as I,yh as L,z1 as R,zut as z}from"./app-initial-BHB6SClA.js";import{t as B}from"./app-14A_I_iz.js";async function V(){p(),Y!=null&&I.start(Y,X,!0),await H(),await o(),l(),n(),N.info(`[statsig-refresh-diagnostics] React root render requested`,{safe:{windowType:`electron`}}),$.render((0,G.jsx)(U.StrictMode,{children:(0,G.jsx)(R,{name:`App`,fallback:(0,G.jsx)(r,{}),children:(0,G.jsx)(P,{})})}))}async function H(){}var U,W,G,K,q,J,Y,X,Z,Q,$;e((()=>{if(U=t(d(),1),W=w(),b(),f(),a(),C(),c(),A(),i(),M(),y(),F(),S(),T(),ne(),u(),z(),g(),j(),h(),B(),G=s(),K=O(),q=new URL(window.location.href).searchParams,J=ee(),Y=L(D??window.location.pathname),X=window.electronBridge?.getPreloadStartedAtMs?.()??performance.timeOrigin,window.addEventListener(`pagehide`,()=>{l(),m(),I.dispose(),x(),re.dispose(),v.dispose()}),document.addEventListener(`visibilitychange`,()=>{document.visibilityState===`hidden`&&(l(),m())}),k(),document.documentElement.dataset.codexWindowType=`electron`,document.documentElement.dataset.windowType=`electron`,document.documentElement.dataset.codexOs=J,document.documentElement.dataset.codexWindowChrome=te(`electron`,J),q.get(`mcpAppSandboxDevtools`)===`1`&&(document.documentElement.dataset.mcpAppSandboxDevtools=`true`),K&&document.documentElement.classList.add(`compact-window`),_(),window.addEventListener(`error`,e=>{let t=e?.error?.stack??e?.error?.message??e?.message??`Unknown error`;E.dispatchMessage(`log-message`,{level:`error`,message:`[desktop-notifications][global-error] ${String(t)}`})}),window.addEventListener(`unhandledrejection`,e=>{let t=e.reason,n=typeof t==`object`&&t?t.stack??t.message??JSON.stringify(t):String(t);E.dispatchMessage(`log-message`,{level:`error`,message:`[desktop-notifications][unhandled-rejection] ${n}`})}),Z=document.getElementById(`root`),!Z)throw Error(`Root container not found`);Q=window,Q.__codexRoot||=(0,W.createRoot)(Z),$=Q.__codexRoot,V()}))();
//# sourceMappingURL=app-main-BP5-48gp.js.map