import{B3 as WB,j3 as Z,m3 as T,s3 as f}from"./cli-0.5.4-jqt00ywx.mjs";import{Haa as A,O6 as w,P6 as JB,Saa as v,_aa as QB,x9 as _,y9 as KB}from"./cli-0.5.4-cbq01zg3.mjs";import{Zda as O,_da as BB}from"./cli-0.5.4-x1fzfxmm.mjs";import{cga as F,mga as e}from"./cli-0.5.4-yd3rd9qt.mjs";import{Gha as I,Hha as c,Oga as M,Pga as m,aha as S,bha as s,ima as a,ria as R}from"./cli-0.5.4-jmc3bzbn.mjs";import{Hma as q,Ima as t}from"./cli-0.5.4-959vxhhb.mjs";import{Zma as K}from"./cli-0.5.4-aacw1src.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 lQ,r as mQ,vB as nQ,TB as oQ,g as pQ,ZB as qQ};
