import{h3 as Z,k3 as T,q3 as f,z3 as WB}from"./cli-0.5.3-1vt6twff.mjs";import{Faa as A,M6 as w,N6 as JB,Qaa as v,Yaa as QB,v9 as _,w9 as KB}from"./cli-0.5.3-t65dek0m.mjs";import{Xda as O,Yda as BB}from"./cli-0.5.3-6j2jk6dt.mjs";import{aga as F,kga as e}from"./cli-0.5.3-7wdgps7z.mjs";import{$ga as s,Eha as I,Fha as c,Mga as M,Nga as m,_ga as S,gma as a,pia as R}from"./cli-0.5.3-qrvd6cmy.mjs";import{Fma as q,Gma as t}from"./cli-0.5.3-2dk1sk8w.mjs";import{Xma as K}from"./cli-0.5.3-0df3r78b.mjs";function p(B,J){return B+b(h()*(J-B+1))}var b,h,D;var G=K(()=>{b=Math.floor,h=Math.random;D=p});function u(B){var J=B.length;return J?B[D(0,J-1)]:void 0}var Y;var H=K(()=>{G();Y=u});function l(B,J){return M(J,function(X){return B[X]})}var z;var P=K(()=>{m();z=l});function i(B){return B==null?[]:z(B,I(B))}var U;var C=K(()=>{P();c();U=i});function n(B){return Y(U(B))}var k;var E=K(()=>{H();C();k=n});function o(B){var J=S(B)?Y:k;return J(B)}var kB;var r=K(()=>{H();E();s();kB=o});async function vB(){if(W===null&&!Q)Q=YB(),W=await Q,Q=null,d.cache.clear?.()}function TB(){W=null,Q=null,d.cache.clear?.(),g.cache.clear?.()}function XB(){if(W!==null)return W;let B=Z();if(B?.emailAddress)return B.emailAddress;return}async function YB(){let B=Z();if(B?.emailAddress)return B.emailAddress;return g()}var W=null,Q=null,d,g;var ZB=K(()=>{JB();t();a();WB();QB();BB();KB();e();d=q((B)=>{let J=v(),X=A(),$,N,L;if(B){if($=T()??void 0,N=f()??void 0,$&&X.claudeCodeFirstTokenDate){let x=new Date(X.claudeCodeFirstTokenDate).getTime();if(!isNaN(x))L=x}}let V=Z(),j=V?.organizationUuid,y=V?.accountUuid;return{deviceId:J,sessionId:R(),email:XB(),appVersion:"99.0.0",platform:_(),organizationUuid:j,accountUuid:y,userType:void 0,subscriptionType:$,rateLimitTier:N,firstTokenTime:L,...F(process.env.GITHUB_ACTIONS)&&{githubActionsMetadata:{actor:process.env.GITHUB_ACTOR,actorId:process.env.GITHUB_ACTOR_ID,repository:process.env.GITHUB_REPOSITORY,repositoryId:process.env.GITHUB_REPOSITORY_ID,repositoryOwner:process.env.GITHUB_REPOSITORY_OWNER,repositoryOwnerId:process.env.GITHUB_REPOSITORY_OWNER_ID}}}});g=q(async()=>{let B=await w("git config --get user.email",{shell:!0,reject:!1,cwd:O()});return B.exitCode===0&&B.stdout?B.stdout.trim():void 0})});
export{kB as jQ,r as kQ,vB as lQ,TB as mQ,g as nQ,ZB as oQ};
