import{HQ as N,IQ as p,JQ as F,LQ as U,MQ as A}from"./cli-0.5.12-z100r543.mjs";import{e4 as L,f4 as P,i4 as O,k4 as V,u4 as x,w4 as H,x4 as k}from"./cli-0.5.12-8v5w8znc.mjs";import{H$ as X,Maa as Z,N$ as Y,W$ as K,eba as M,f9 as I,h9 as D}from"./cli-0.5.12-g4wb8mj2.mjs";import{Mga as $,Wga as b}from"./cli-0.5.12-60w1a0bs.mjs";import{aoa as G}from"./cli-0.5.12-xzeb7mtb.mjs";function R(q){if(!q||!process.env.ANTHROPIC_UNIX_SOCKET)return q||{};let{ANTHROPIC_UNIX_SOCKET:z,ANTHROPIC_BASE_URL:B,ANTHROPIC_API_KEY:Q,ANTHROPIC_AUTH_TOKEN:T,CLAUDE_CODE_OAUTH_TOKEN:f,...m}=q;return m}function _(q){if(!q)return{};if(!$(process.env.CLAUDE_CODE_PROVIDER_MANAGED_BY_HOST))return q;let z={};for(let[B,Q]of Object.entries(q))if(!F(B))z[B]=Q;return z}function h(q){if(!q||!W)return q||{};let z={};for(let[B,Q]of Object.entries(q))if(!W.has(B))z[B]=Q;return z}function J(q){return h(_(R(q)))}function r(){if(W===void 0)W=process.env.CLAUDE_CODE_ENTRYPOINT==="claude-desktop"?new Set(Object.keys(process.env)):null;Object.assign(process.env,J(Z().env));for(let z of w){if(z==="policySettings")continue;if(!I(z))continue;Object.assign(process.env,J(X(z)?.env))}N(),Object.assign(process.env,J(X("policySettings")?.env));let q=J(Y()?.env);for(let[z,B]of Object.entries(q))if(U.has(z.toUpperCase()))process.env[z]=B}function g(){Object.assign(process.env,J(Z().env)),Object.assign(process.env,J(Y()?.env)),L(),O(),H(),x()}var W,w;var j=G(()=>{p();P();M();b();A();V();k();D();K();w=["userSettings","flagSettings","policySettings"]});
export{r as gd,g as hd,j as id};
