module.exports=[750227,(e,t,n)=>{t.exports=e.x("node:path",()=>require("node:path"))},902157,(e,t,n)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},874533,(e,t,n)=>{t.exports=e.x("node:child_process",()=>require("node:child_process"))},603484,e=>{"use strict";var t=e.i(902157),n=e.i(874533),r=e.i(750227);function o(e=process.platform){return"win32"===e}function s(e){let t=e.replace(/\r\n|\r|\n/g," ");if(!t.length)return'""';let n=t.replace(/"/g,'""');return/[\s"&<>|^()]/.test(n)?`"${n}"`:n}let i=["CLAUDECODE","CLAUDE_CODE_ENTRYPOINT","CLAUDE_CODE_SESSION","CLAUDE_CODE_PARENT_SESSION"];async function l(e,t={}){let n=t.cwd??process.cwd(),s=t.env??process.env,i=t.platform??process.platform;if(e.includes("/")||e.includes("\\")){let t=r.default.isAbsolute(e)?e:r.default.resolve(n,e);return await u(t,i)?t:null}let a=s.PATH??s.Path??"",c=o(i)?";":":",f=a.split(c).filter(Boolean),p=o(i)?(s.PATHEXT??".EXE;.CMD;.BAT;.COM").split(";").filter(Boolean):[""],d=o(i)&&r.default.extname(e).length>0;for(let t of f)for(let n of o(i)?d?[r.default.join(t,e)]:p.map(n=>r.default.join(t,`${e}${n}`)):[r.default.join(t,e)])if(await u(n,i))return n;return null}let a=e=>(0,n.execSync)(e,{encoding:"utf-8",timeout:5e3});async function c(e,t,n={}){let i=n.env??process.env,a=n.platform??process.platform;var u=await l(e,n)??e,f=t,p=i,d=a;if(!o(d))return{command:u,args:f};let m=r.default.extname(u).toLowerCase();return".cmd"===m||".bat"===m||".com"===m?{command:p.ComSpec||"cmd.exe",args:["/d","/s","/c",[s(u),...f.map(s)].join(" ")]}:{command:u,args:f}}async function u(e,n=process.platform){try{return await t.promises.access(e,o(n)?t.constants.F_OK:t.constants.X_OK),!0}catch{return!1}}e.s(["ensurePathInEnv",0,function(e,t=process.platform){let n=o(t)?"Path":"PATH";return(e.PATH??e.Path??"").length>0?e:{...e,[n]:function(e=process.platform){return o(e)?"C:\\Windows\\System32;C:\\Windows;C:\\Windows\\System32\\Wbem":"/usr/local/bin:/opt/homebrew/bin:/usr/local/sbin:/usr/bin:/bin:/usr/sbin:/sbin"}(t)}},"resolveCommandPathSync",0,function(e,t=process.platform,s=a){if(r.default.extname(e)||e.includes("/")||e.includes("\\"))return e;if(!o(t)){try{let t=(0,n.execFileSync)("which",[e],{encoding:"utf-8",timeout:5e3}).trim();if(t)return t}catch{}return e}try{let t=s(`where ${e}`).trim().split("\n").map(e=>e.trim()).filter(Boolean),n=t.find(e=>/\.(cmd|bat|exe)$/i.test(e));if(n)return n;if(t.length>0)return t[0]}catch{}return e},"resolveSpawnTarget",0,c,"stripClaudeNestingEnv",0,function(e){let t={...e};for(let e of i)delete t[e];return t}])}];

//# sourceMappingURL=%5Broot-of-the-server%5D__0mw.9lg._.js.map