MCPcopy Index your code
hub / github.com/ChinaSiro/claude-code-sourcemap / lq1

Function lq1

package/cli.js:128–128  ·  view source on GitHub ↗
(q,K)

Source from the content-addressed store, hash-verified

126${K}`,Zy5,Gy5,Ty5=(q,K,_)=>{let z=_===""?"":`with ${_.trim()}() `,Y=fy5.bind(null,z,K.toString());Object.defineProperty(Y,"name",Gy5),Object.defineProperty(q,"toString",{...Zy5,value:Y})};var sy7=y(()=>{Zy5=Object.getOwnPropertyDescriptor(Function.prototype,"toString"),Gy5=Object.getOwnPropertyDescriptor(Function.prototype.toString,"name")});var Y$8,ty7=(q,K={})=>{if(typeof q!=="function")throw TypeError("Expected a function");let _,z=0,Y=q.displayName||q.name||"<anonymous>",$=function(...A){if(Y$8.set($,++z),z===1)_=q.apply(this,A),q=null;else if(K.throw===!0)throw Error(`Function \`${Y}\` can only be called once`);return _};return yq1($,q),Y$8.set($,z),$},ey7;var qE7=y(()=>{sy7();Y$8=new WeakMap;ty7.callCount=(q)=>{if(!Y$8.has(q))throw Error(`The given function \`${q.name}\` is not wrapped by the \`onetime\` package`);return Y$8.get(q)};ey7=ty7});var KE7=()=>{let q=Eq1-_E7+1;return Array.from({length:q},vy5)},vy5=(q,K)=>({name:`SIGRT${K+1}`,number:_E7+K,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}),_E7=34,Eq1=64;var zE7;var YE7=y(()=>{zE7=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]});import{constants as ky5}from"node:os";var Lq1=()=>{let q=KE7();return[...zE7,...q].map(Vy5)},Vy5=({name:q,number:K,description:_,action:z,forced:Y=!1,standard:$})=>{let{signals:{[q]:A}}=ky5,O=A!==void 0;return{name:q,number:O?A:K,description:_,supported:O,action:z,forced:Y,standard:$}};var $E7=y(()=>{YE7()});import{constants as Ny5}from"node:os";var yy5=()=>{let q=Lq1();return Object.fromEntries(q.map(Ey5))},Ey5=({name:q,number:K,description:_,supported:z,action:Y,forced:$,standard:A})=>[q,{name:q,number:K,description:_,supported:z,action:Y,forced:$,standard:A}],AE7,Ly5=()=>{let q=Lq1(),K=Eq1+1,_=Array.from({length:K},(z,Y)=>Ry5(Y,q));return Object.assign({},..._)},Ry5=(q,K)=>{let _=hy5(q,K);if(_===void 0)return{};let{name:z,description:Y,supported:$,action:A,forced:O,standard:w}=_;return{[q]:{name:z,number:q,description:Y,supported:$,action:A,forced:O,standard:w}}},hy5=(q,K)=>{let _=K.find(({name:z})=>Ny5.signals[z]===q);if(_!==void 0)return _;return K.find((z)=>z.number===q)},RR$;var OE7=y(()=>{$E7();AE7=yy5(),RR$=Ly5()});import Sy5 from"node:process";var Cy5=({timedOut:q,timeout:K,errorCode:_,signal:z,signalDescription:Y,exitCode:$,isCanceled:A})=>{if(q)return`timed out after ${K} milliseconds`;if(A)return"was canceled";if(_!==void 0)return`failed with ${_}`;if(z!==void 0)return`was killed with ${z} (${Y})`;if($!==void 0)return`failed with exit code ${$}`;return"failed"},Qm6=({stdout:q,stderr:K,all:_,error:z,signal:Y,exitCode:$,command:A,escapedCommand:O,timedOut:w,isCanceled:j,killed:H,parsed:{options:{timeout:J,cwd:M=Sy5.cwd()}}})=>{$=$===null?void 0:$,Y=Y===null?void 0:Y;let X=Y===void 0?void 0:AE7[Y].description,P=z&&z.code,D=`Command ${Cy5({timedOut:w,timeout:J,errorCode:P,signal:Y,signalDescription:X,exitCode:$,isCanceled:j})}: ${A}`,f=Object.prototype.toString.call(z)==="[object Error]",G=f?`${D}
127${z.message}`:D,Z=[G,K,q].filter(Boolean).join(`
128`);if(f)z.originalMessage=z.message,z.message=Z;else z=Error(Z);if(z.shortMessage=G,z.command=A,z.escapedCommand=O,z.exitCode=$,z.signal=Y,z.signalDescription=X,z.stdout=q,z.stderr=K,z.cwd=M,_!==void 0)z.all=_;if("bufferedData"in z)delete z.bufferedData;return z.failed=!0,z.timedOut=Boolean(w),z.isCanceled=j,z.killed=H&&!w,z};var wE7=y(()=>{OE7()});var $$8,by5=(q)=>$$8.some((K)=>q[K]!==void 0),jE7=(q)=>{if(!q)return;let{stdio:K}=q;if(K===void 0)return $$8.map((z)=>q[z]);if(by5(q))throw Error(`It's not possible to provide \`stdio\` in combination with one of ${$$8.map((z)=>`\`${z}\``).join(", ")}`);if(typeof K==="string")return K;if(!Array.isArray(K))throw TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof K}\``);let _=Math.max(K.length,$$8.length);return Array.from({length:_},(z,Y)=>K[Y])};var HE7=y(()=>{$$8=["stdin","stdout","stderr"]});var q_6;var JE7=y(()=>{q_6=[];q_6.push("SIGHUP","SIGINT","SIGTERM");if(process.platform!=="win32")q_6.push("SIGALRM","SIGABRT","SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT");if(process.platform==="linux")q_6.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT")});class ME7{emitted={afterExit:!1,exit:!1};listeners={afterExit:[],exit:[]};count=0;id=Math.random();constructor(){if(hq1[Rq1])return hq1[Rq1];xy5(hq1,Rq1,{value:this,writable:!1,enumerable:!1,configurable:!1})}on(q,K){this.listeners[q].push(K)}removeListener(q,K){let _=this.listeners[q],z=_.indexOf(K);if(z===-1)return;if(z===0&&_.length===1)_.length=0;else _.splice(z,1)}emit(q,K,_){if(this.emitted[q])return!1;this.emitted[q]=!0;let z=!1;for(let Y of this.listeners[q])z=Y(K,_)===!0||z;if(q==="exit")z=this.emit("afterExit",K,_)||z;return z}}class Cq1{}var A$8=(q)=>!!q&&typeof q==="object"&&typeof q.removeListener==="function"&&typeof q.emit==="function"&&typeof q.reallyExit==="function"&&typeof q.listeners==="function"&&typeof q.kill==="function"&&typeof q.pid==="number"&&typeof q.on==="function",Rq1,hq1,xy5,Iy5=(q)=>{return{onExit(K,_){return q.onExit(K,_)},load(){return q.load()},unload(){return q.unload()}}},XE7,PE7,Sq1,Le,mR$,pR$;var dm6=y(()=>{JE7();Rq1=Symbol.for("signal-exit emitter"),hq1=globalThis,xy5=Object.defineProperty.bind(Object);XE7=class XE7 extends Cq1{onExit(){return()=>{}}load(){}unload(){}};PE7=class PE7 extends Cq1{#q=Sq1.platform==="win32"?"SIGINT":"SIGHUP";#K=new ME7;#_;#Y;#z;#O={};#$=!1;constructor(q){super();this.#_=q,this.#O={};for(let K of q_6)this.#O[K]=()=>{let _=this.#_.listeners(K),{count:z}=this.#K,Y=q;if(typeof Y.__signal_exit_emitter__==="object"&&typeof Y.__signal_exit_emitter__.count==="number")z+=Y.__signal_exit_emitter__.count;if(_.length===z){this.unload();let $=this.#K.emit("exit",null,K),A=K==="SIGHUP"?this.#q:K;if(!$)q.kill(q.pid,A)}};this.#z=q.reallyExit,this.#Y=q.emit}onExit(q,K){if(!A$8(this.#_))return()=>{};if(this.#$===!1)this.load();let _=K?.alwaysLast?"afterExit":"exit";return this.#K.on(_,q),()=>{if(this.#K.removeListener(_,q),this.#K.listeners.exit.length===0&&this.#K.listeners.afterExit.length===0)this.unload()}}load(){if(this.#$)return;this.#$=!0,this.#K.count+=1;for(let q of q_6)try{let K=this.#O[q];if(K)this.#_.on(q,K)}catch(K){}this.#_.emit=(q,...K)=>{return this.#H(q,...K)},this.#_.reallyExit=(q)=>{return this.#w(q)}}unload(){if(!this.#$)return;this.#$=!1,q_6.forEach((q)=>{let K=this.#O[q];if(!K)throw Error("Listener not defined for signal: "+q);try{this.#_.removeListener(q,K)}catch(_){}}),this.#_.emit=this.#Y,this.#_.reallyExit=this.#z,this.#K.count-=1}#w(q){if(!A$8(this.#_))return 0;return this.#_.exitCode=q||0,this.#K.emit("exit",this.#_.exitCode,null),this.#z.call(this.#_,this.#_.exitCode)}#H(q,...K){let _=this.#Y;if(q==="exit"&&A$8(this.#_)){if(typeof K[0]==="number")this.#_.exitCode=K[0];let z=_.call(this.#_,q,...K);return this.#K.emit("exit",this.#_.exitCode,null),z}else return _.call(this.#_,q,...K)}};Sq1=globalThis.process,{onExit:Le,load:mR$,unload:pR$}=Iy5(A$8(Sq1)?new PE7(Sq1):new XE7)});import uy5 from"node:os";var my5=5000,WE7=(q,K="SIGTERM",_={})=>{let z=q(K);return py5(q,K,_,z),z},py5=(q,K,_,z)=>{if(!By5(K,_,z))return;let Y=Fy5(_),$=setTimeout(()=>{q("SIGKILL")},Y);if($.unref)$.unref()},By5=(q,{forceKillAfterTimeout:K},_)=>gy5(q)&&K!==!1&&_,gy5=(q)=>q===uy5.constants.signals.SIGTERM||typeof q==="string"&&q.toUpperCase()==="SIGTERM",Fy5=({forceKillAfterTimeout:q=!0})=>{if(q===!0)return my5;if(!Number.isFinite(q)||q<0)throw TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${q}\` (${typeof q})`);return q},DE7=(q,K)=>{if(q.kill())K.isCanceled=!0},Uy5=(q,K,_)=>{q.kill(K),_(Object.assign(Error("Timed out"),{timedOut:!0,signal:K}))},fE7=(q,{timeout:K,killSignal:_="SIGTERM"},z)=>{if(K===0||K===void 0)return z;let Y,$=new Promise((O,w)=>{Y=setTimeout(()=>{Uy5(q,_,w)},K)}),A=z.finally(()=>{clearTimeout(Y)});return Promise.race([$,A])},ZE7=({timeout:q})=>{if(q!==void 0&&(!Number.isFinite(q)||q<0))throw TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${q}\` (${typeof q})`)},GE7=async(q,{cleanup:K,detached:_},z)=>{if(!K||_)return z;let Y=Le(()=>{q.kill()});return z.finally(()=>{Y()})};var TE7=y(()=>{dm6()});function O$8(q){return q!==null&&typeof q==="object"&&typeof q.pipe==="function"}function bq1(q){return O$8(q)&&q.writable!==!1&&typeof q._write==="function"&&typeof q._writableState==="object"}import{createWriteStream as Qy5}from"node:fs";import{ChildProcess as dy5}from"node:child_process";var cy5=(q)=>q instanceof dy5&&typeof q.then==="function",xq1=(q,K,_)=>{if(typeof _==="string")return q[K].pipe(Qy5(_)),q;if(bq1(_))return q[K].pipe(_),q;if(!cy5(_))throw TypeError("The second argument must be a string, a stream or an Execa child process.");if(!bq1(_.stdin))throw TypeError("The target child process's stdin must be available.");return q[K].pipe(_.stdin),_},vE7=(q)=>{if(q.stdout!==null)q.pipeStdout=xq1.bind(void 0,q,"stdout");if(q.stderr!==null)q.pipeStderr=xq1.bind(void 0,q,"stderr");if(q.all!==void 0)q.pipeAll=xq1.bind(void 0,q,"all")};var kE7=()=>{};var cm6=async(q,{init:K,convertChunk:_,getSize:z,truncateChunk:Y,addChunk:$,getFinalChunk:A,finalize:O},{maxBuffer:w=Number.POSITIVE_INFINITY}={})=>{if(!ny5(q))throw Error("The first argument must be a Readable, a ReadableStream, or an async iterable.");let j=K();j.length=0;try{for await(let H of q){let J=iy5(H),M=_[J](H,j);yE7({convertedChunk:M,state:j,getSize:z,truncateChunk:Y,addChunk:$,maxBuffer:w})}return ly5({state:j,convertChunk:_,getSize:z,truncateChunk:Y,addChunk:$,getFinalChunk:A,maxBuffer:w}),O(j)}catch(H){throw H.bufferedData=O(j),H}},ly5=({state:q,getSize:K,truncateChunk:_,addChunk:z,getFinalChunk:Y,maxBuffer:$})=>{let A=Y(q);if(A!==void 0)yE7({convertedChunk:A,state:q,getSize:K,truncateChunk:_,addChunk:z,maxBuffer:$})},yE7=({convertedChunk:q,state:K,getSize:_,truncateChunk:z,addChunk:Y,maxBuffer:$})=>{let A=_(q),O=K.length+A;if(O<=$){VE7(q,K,Y,O);return}let w=z(q,$-K.length);if(w!==void 0)VE7(w,K,Y,$);throw new Iq1},VE7=(q,K,_,z)=>{K.contents=_(q,K,z),K.length=z},ny5=(q)=>typeof q==="object"&&q!==null&&typeof q[Symbol.asyncIterator]==="function",iy5=(q)=>{let K=typeof q;if(K==="string")return"string";if(K!=="object"||q===null)return"others";if(globalThis.Buffer?.isBuffer(q))return"buffer";let _=NE7.call(q);if(_==="[object ArrayBuffer]")return"arrayBuffer";if(_==="[object DataView]")return"dataView";if(Number.isInteger(q.byteLength)&&Number.isInteger(q.byteOffset)&&NE7.call(q.buffer)==="[object ArrayBuffer]")return"typedArray";return"others"},NE7,Iq1;var lm6=y(()=>{({toString:NE7}=Object.prototype);Iq1=class Iq1 extends Error{name="MaxBufferError";constructor(){super("maxBuffer exceeded")}}});var uq1=(q)=>q,mq1=()=>{return},pq1=({contents:q})=>q,w$8=(q)=>{throw Error(`Streams in object mode are not supported: ${String(q)}`)},j$8=(q)=>q.length;var EE7=y(()=>{lm6()});async function Bq1(q,K){return cm6(q,_E5,K)}var ry5=()=>({contents:new ArrayBuffer(0)}),oy5=(q)=>ay5.encode(q),ay5,LE7=(q)=>new Uint8Array(q),RE7=(q)=>new Uint8Array(q.buffer,q.byteOffset,q.byteLength),sy5=(q,K)=>q.slice(0,K),ty5=(q,{contents:K,length:_},z)=>{let Y=CE7()?qE5(K,z):ey5(K,z);return new Uint8Array(Y).set(q,_),Y},ey5=(q,K)=>{if(K<=q.byteLength)return q;let _=new ArrayBuffer(SE7(K));return new Uint8Array(_).set(new Uint8Array(q),0),_},qE5=(q,K)=>{if(K<=q.maxByteLength)return q.resize(K),q;let _=new ArrayBuffer(K,{maxByteLength:SE7(K)});return new Uint8Array(_).set(new Uint8Array(q),0),_},SE7=(q)=>hE7**Math.ceil(Math.log(q)/Math.log(hE7)),hE7=2,KE5=({contents:q,length:K})=>CE7()?q:q.slice(0,K),CE7=()=>("resize"in ArrayBuffer.prototype),_E5;var gq1=y(()=>{lm6();ay5=new TextEncoder,_E5={init:ry5,convertChunk:{string:oy5,buffer:LE7,arrayBuffer:LE7,dataView:RE7,typedArray:RE7,others:w$8},getSize:j$8,truncateChunk:sy5,addChunk:ty5,getFinalChunk:mq1,finalize:KE5}});async function H$8(q,K){if(!("Buffer"in globalThis))throw Error("getStreamAsBuffer() is only supported in Node.js");try{return bE7(await Bq1(q,K))}catch(_){if(_.bufferedData!==void 0)_.bufferedData=bE7(_.bufferedData);throw _}}var bE7=(q)=>globalThis.Buffer.from(q);var xE7=y(()=>{gq1()});async function Fq1(q,K){return cm6(q,OE5,K)}var zE5=()=>({contents:"",textDecoder:new TextDecoder}),J$8=(q,{textDecoder:K})=>K.decode(q,{stream:!0}),YE5=(q,{contents:K})=>K+q,$E5=(q,K)=>q.slice(0,K),AE5=({textDecoder:q})=>{let K=q.decode();return K===""?void 0:K},OE5;var IE7=y(()=>{lm6();OE5={init:zE5,convertChunk:{string:uq1,buffer:J$8,arrayBuffer:J$8,dataView:J$8,typedArray:J$8,others:w$8},getSize:j$8,truncateChunk:$E5,addChunk:YE5,getFinalChunk:AE5,finalize:pq1}});var uE7=y(()=>{EE7();gq1();xE7();IE7();lm6()});var pE7=m((Xh$,mE7)=>{var{PassThrough:wE5}=U6("stream");mE7.exports=function(){var q=[],K=new wE5({objectMode:!0});return K.setMaxListeners(0),K.add=_,K.isEmpty=z,K.on("unpipe",Y),Array.prototype.slice.call(arguments).forEach(_),K;function _($){if(Array.isArray($))return $.forEach(_),this;return q.push($),$.once("end",Y.bind(null,$)),$.once("error",K.emit.bind(K,"error")),$.pipe(K,{end:!1}),this}function z(){return q.length==0}function Y($){if(q=q.filter(function(A){return A!==$}),!q.length&&K.readable)K.end()}}});import{createReadStream as jE5,readFileSync as HE5}from"node:fs";import{setTimeout as JE5}from"node:timers/promises";var BE7,gE7=(q)=>{if(q!==void 0)throw TypeError("The `input` and `inputFile` options cannot be both set.")},ME5=({input:q,inputFile:K})=>{if(typeof K!=="string")return q;return gE7(q),HE5(K)},FE7=(q)=>{let K=ME5(q);if(O$8(K))throw TypeError("The `input` option cannot be a stream in sync mode");return K},XE5=({input:q,inputFile:K})=>{if(typeof K!=="string")return q;return gE7(q),jE5(K)},UE7=(q,K)=>{let _=XE5(K);if(_===void 0)return;if(O$8(_))_.pipe(q.stdin);else q.stdin.end(_)},QE7=(q,{all:K})=>{if(!K||!q.stdout&&!q.stderr)return;let _=BE7.default();if(q.stdout)_.add(q.stdout);if(q.stderr)_.add(q.stderr);return _},Uq1=async(q,K)=>{if(!q||K===void 0)return;await JE5(0),q.destroy();try{return await K}catch(_){return _.bufferedData}},Qq1=(q,{encoding:K,buffer:_,maxBuffer:z})=>{if(!q||!_)return;if(K==="utf8"||K==="utf-8")return Fq1(q,{maxBuffer:z});if(K===null||K==="buffer")return H$8(q,{maxBuffer:z});return PE5(q,z,K)},PE5=async(q,K,_)=>{return(await H$8(q,{maxBuffer:K})).toString(_)},dE7=async({stdout:q,stderr:K,all:_},{encoding:z,buffer:Y,maxBuffer:$},A)=>{let O=Qq1(q,{encoding:z,buffer:Y,maxBuffer:$}),w=Qq1(K,{encoding:z,buffer:Y,maxBuffer:$}),j=Qq1(_,{encoding:z,buffer:Y,maxBuffer:$*2});try{return await Promise.all([A,O,w,j])}catch(H){return Promise.all([{error:H,signal:H.signal,timedOut:H.timedOut},Uq1(q,O),Uq1(K,w),Uq1(_,j)])}};var cE7=y(()=>{uE7();BE7=O6(pE7(),1)});var WE5,DE5,dq1=(q,K)=>{for(let[_,z]of DE5){let Y=typeof K==="function"?(...$)=>Reflect.apply(z.value,K(),$):z.value.bind(K);Reflect.defineProperty(q,_,{...z,value:Y})}},lE7=(q)=>new Promise((K,_)=>{if(q.on("exit",(z,Y)=>{K({exitCode:z,signal:Y})}),q.on("error",(z)=>{_(z)}),q.stdin)q.stdin.on("error",(z)=>{_(z)})});var nE7=y(()=>{WE5=(async()=>{})().constructor.prototype,DE5=["then","catch","finally"].map((q)=>[q,Reflect.getOwnPropertyDescriptor(WE5,q)])});import{Buffer as fE5}from"node:buffer";import{ChildProcess as ZE5}from"node:child_process";var oE7=(q,K=[])=>{if(!Array.isArray(K))return[q];return[q,...K]},GE5,TE5=(q)=>{if(typeof q!=="string"||GE5.test(q))return q;return`"${q.replaceAll('"',"\\\"")}"`},cq1=(q,K)=>oE7(q,K).join(" "),lq1=(q,K)=>oE7(q,K).map((_)=>TE5(_)).join(" "),vE5,iE7=(q)=>{let K=typeof q;if(K==="string")return q;if(K==="number")return String(q);if(K==="object"&&q!==null&&!(q instanceof ZE5)&&"stdout"in q){let _=typeof q.stdout;if(_==="string")return q.stdout;if(fE5.isBuffer(q.stdout))return q.stdout.toString();throw TypeError(`Unexpected "${_}" stdout in template expression`)}throw TypeError(`Unexpected "${K}" in template expression`)},rE7=(q,K,_)=>_||q.length===0||K.length===0?[...q,...K]:[...q.slice(0,-1),`${q.at(-1)}${K[0]}`,...K.slice(1)],kE5=({templates:q,expressions:K,tokens:_,index:z,template:Y})=>{let $=Y??q.raw[z],A=$.split(vE5).filter(Boolean),O=rE7(_,A,$.startsWith(" "));if(z===K.length)return O;let w=K[z],j=Array.isArray(w)?w.map((H)=>iE7(H)):[iE7(w)];return rE7(O,j,$.endsWith(" "))},nq1=(q,K)=>{let _=[];for(let[z,Y]of q.entries())_=kE5({templates:q,expressions:K,tokens:_,index:z,template:Y});return _};var aE7=y(()=>{GE5=/^[\w.-]+$/,vE5=/ +/g});import{debuglog as VE5}from"node:util";import NE5 from"node:process";var sE7,M$8=(q,K)=>String(q).padStart(K,"0"),yE5=()=>{let q=new Date;return`${M$8(q.getHours(),2)}:${M$8(q.getMinutes(),2)}:${M$8(q.getSeconds(),2)}.${M$8(q.getMilliseconds(),3)}`},iq1=(q,{verbose:K})=>{if(!K)return;NE5.stderr.write(`[${yE5()}] ${q}
129`)};var tE7=y(()=>{sE7=VE5("execa").enabled});import{Buffer as EE5}from"node:buffer";import LE5 from"node:path";import rq1 from"node:child_process";import X$8 from"node:process";function m_(q,K,_){let z=KL7(q,K,_),Y=cq1(q,K),$=lq1(q,K);iq1($,z.options),ZE7(z.options);let A;try{A=rq1.spawn(z.file,z.args,z.options)}catch(X){let P=new rq1.ChildProcess,W=Promise.reject(Qm6({error:X,stdout:"",stderr:"",all:"",command:Y,escapedCommand:$,parsed:z,timedOut:!1,isCanceled:!1,killed:!1}));return dq1(P,W),P}let O=lE7(A),w=fE7(A,z.options,O),j=GE7(A,z.options,w),H={isCanceled:!1};A.kill=WE7.bind(null,A.kill.bind(A)),A.cancel=DE7.bind(null,A,H);let M=ey7(async()=>{let[{error:X,exitCode:P,signal:W,timedOut:D},f,G,Z]=await dE7(A,z.options,j),T=nm6(z.options,f),v=nm6(z.options,G),V=nm6(z.options,Z);if(X||P!==0||W!==null){let E=Qm6({error:X,exitCode:P,signal:W,stdout:T,stderr:v,all:V,command:Y,escapedCommand:$,parsed:z,timedOut:D,isCanceled:H.isCanceled||(z.options.signal?z.options.signal.aborted:!1),killed:A.killed});if(!z.options.reject)return E;throw E}return{command:Y,escapedCommand:$,exitCode:0,stdout:T,stderr:v,all:V,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return UE7(A,z.options),A.all=QE7(A,z.options),vE7(A),dq1(A,M),A}function K_6(q,K,_){let z=KL7(q,K,_),Y=cq1(q,K),$=lq1(q,K);iq1($,z.options);let A=FE7(z.options),O;try{O=rq1.spawnSync(z.file,z.args,{...z.options,input:A})}catch(H){throw Qm6({error:H,stdout:"",stderr:"",all:"",command:Y,escapedCommand:$,parsed:z,timedOut:!1,isCanceled:!1,killed:!1})}let w=nm6(z.options,O.stdout,O.error),j=nm6(z.options,O.stderr,O.error);if(O.error||O.status!==0||O.signal!==null){let H=Qm6({stdout:w,stderr:j,error:O.error,signal:O.signal,exitCode:O.status,command:Y,escapedCommand:$,parsed:z,timedOut:O.error&&O.error.code==="ETIMEDOUT",isCanceled:!1,killed:O.signal!==null});if(!z.options.reject)return H;throw H}return{command:Y,escapedCommand:$,exitCode:0,stdout:w,stderr:j,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}}function _L7(q){function K(_,...z){if(!Array.isArray(_))return _L7({...q,..._});let[Y,...$]=nq1(_,z);return m_(Y,$,eE7(q))}return K.sync=(_,...z)=>{if(!Array.isArray(_))throw TypeError("Please use $(options).sync`command` instead of $.sync(options)`command`.");let[Y,...$]=nq1(_,z);return K_6(Y,$,eE7(q))},K}var qL7,RE5=1e8,hE5=({env:q,extendEnv:K,preferLocal:_,localDir:z,execPath:Y})=>{let $=K?{...X$8.env,...q}:q;if(_)return oy7({env:$,cwd:z,execPath:Y});return $},KL7=(q,K,_={})=>{let z=qL7.default._parse(q,K,_);if(q=z.command,K=z.args,_=z.options,_={maxBuffer:RE5,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:_.cwd||X$8.cwd(),execPath:X$8.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,verbose:sE7,..._},_.env=hE5(_),_.stdio=jE7(_),X$8.platform==="win32"&&LE5.basename(q,".exe")==="cmd")K.unshift("/q");return{file:q,args:K,options:_,parsed:z}},nm6=(q,K,_)=>{if(typeof K!=="string"&&!EE5.isBuffer(K))return _===void 0?void 0:"";if(q.stripFinalNewline)return Nq1(K);return K},SE5=({input:q,inputFile:K,stdio:_})=>q===void 0&&K===void 0&&_===void 0?{stdin:"inherit"}:{},eE7=(q={})=>({preferLocal:!0,...SE5(q),...q}),dh$;var Df=y(()=>{ay7();qE7();wE7();HE7();TE7();kE7();cE7();nE7();aE7();tE7();qL7=O6(Vq1(),1);dh$=_L7()});var CZ="command-name",wP="command-message",P$8="command-args",zL7="bash-input",YL7="bash-stdout",$L7="bash-stderr",bZ="local-command-stdout",__6="local-command-stderr",im6="local-command-caveat",AL7,Al="tick",XA="task-notification",jP="task-id",gT="tool-use-id",Re="task-type",FT="output-file",wj="status",gw="summary",oq1="worktree",aq1="worktreePath",sq1="worktreeBranch",z_6="remote-review",tq1="remote-review-progress",dJ="teammate-message",RW6="channel",W$8="fork-boilerplate",OL7="Your directive: ",D$8,f$8;var RY=y(()=>{AL7=["bash-input","bash-stdout","bash-stderr","local-command-stdout","local-command-stderr","local-command-caveat"],D$8=["help","-h","--help"],f$8=["list","show","display","current","view","get","check","describe","print","version","about","status","?"]});function hW6(q){return q.sort((K,_)=>{let z=_.modified.getTime()-K.modified.getTime();if(z!==0)return z;return _.created.getTime()-K.created.getTime()})}import wH from"node:path";import wL7 from"node:os";import eq1 from"node:process";function K41(q,{suffix:K="nodejs"}={}){if(typeof q!=="string")throw TypeError(`Expected a string, got ${typeof q}`);if(K)q+=`-${K}`;if(eq1.platform==="darwin")return CE5(q);if(eq1.platform==="win32")return bE5(q);return xE5(q)}var he,q41,SW6,CE5=(q)=>{let K=wH.join(he,"Library");return{data:wH.join(K,"Application Support",q),config:wH.join(K,"Preferences",q),cache:wH.join(K,"Caches",q),log:wH.join(K,"Logs",q),temp:wH.join(q41,q)}},bE5=(q)=>{let K=SW6.APPDATA||wH.join(he,"AppData","Roaming"),_=SW6.LOCALAPPDATA||wH.join(he,"AppData","Local");return{data:wH.join(_,q,"Data"),config:wH.join(K,q,"Config"),cache:wH.join(_,q,"Cache"),log:wH.join(_,q,"Log"),temp:wH.join(q41,q)}},xE5=(q)=>{let K=wH.basename(he);return{data:wH.join(SW6.XDG_DATA_HOME||wH.join(he,".local","share"),q),config:wH.join(SW6.XDG_CONFIG_HOME||wH.join(he,".config"),q),cache:wH.join(SW6.XDG_CACHE_HOME||wH.join(he,".cache"),q),log:wH.join(SW6.XDG_STATE_HOME||wH.join(he,".local","state"),q),temp:wH.join(q41,K,q)}};var jL7=y(()=>{he=wL7.homedir(),q41=wL7.tmpdir(),{env:SW6}=eq1});function Y_6(q){let K=0;for(let _=0;_<q.length;_++)K=(K<<5)-K+q.charCodeAt(_)|0;return K}function HL7(q){if(typeof Bun<"u")return Bun.hash(q).toString();return U6("crypto").createHash("sha256").update(q).digest("hex")}function JL7(q,K){if(typeof Bun<"u")return Bun.hash(K,Bun.hash(q)).toString();return U6("crypto").createHash("sha256").update(q).update("\x00").update(K).digest("hex")}import{join as Z$8}from"path";function XL7(q){let K=q.replace(/[^a-zA-Z0-9]/g,"-");if(K.length<=ML7)return K;return`${K.slice(0,ML7)}-${Math.abs(Y_6(q)).toString(36)}`}function T$8(q){return XL7(q)}var G$8,ML7=200,$_6;var v$8=y(()=>{jL7();e7();G$8=K41("claude-cli");$_6={baseLogs:()=>Z$8(G$8.cache,T$8(X8().cwd())),errors:()=>Z$8(G$8.cache,T$8(X8().cwd()),"errors"),messages:()=>Z$8(G$8.cache,T$8(X8().cwd()),"messages"),mcpLogs:(q)=>Z$8(G$8.cache,T$8(X8().cwd()),`mcp-logs-${XL7(q)}`)}});function k$8(q){return q.replace(PL7,"").trim()||q}function CW6(q){return q.replace(PL7,"").trim()}function WL7(q){return q.replace(IE5,"").trim()}var PL7,IE5;var bW6=y(()=>{PL7=/<([a-z][\w-]*)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g;IE5=/<(ide_opened_file|ide_selection)(?:\s[^>]*)?>[\s\S]*?<\/\1>\n?/g});function DL7(){if(process.env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC)return"essential-traffic";if(process.env.DISABLE_TELEMETRY)return"no-telemetry";return"default"}function iA(){return DL7()==="essential-traffic"}function _41(){return DL7()!=="default"}function fL7(){if(process.env.CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC)return"CLAUDE_CODE_DISABLE_NONESSENTIAL_TRAFFIC";return null}function Se(q,K){let _=q.firstPrompt?.startsWith(`<${Al}>`),z=q.firstPrompt?CW6(q.firstPrompt):"",Y=z&&!_,$=q.agentName||q.customTitle||q.summary||(Y?z:void 0)||K||(_?"Autonomous session":void 0)||(q.sessionId?q.sessionId.slice(0,8):"")||"";return k$8($).trim()}function ZL7(q){return q.toISOString().replace(/[:.]/g,"-")}function mE5(q){if(V$8.length>=uE5)V$8.shift();V$8.push(q)}function GL7(q){if(tx!==null)return;if(tx=q,xW6.length>0){let K=[...xW6];xW6.length=0;for(let _ of K)switch(_.type){case"error":tx.logError(_.error);break;case"mcpError":tx.logMCPError(_.serverName,_.error);break;case"mcpDebug":tx.logMCPDebug(_.serverName,_.message);break}}}function H6(q){let K=x1(q);try{if(i6(process.env.CLAUDE_CODE_USE_BEDROCK)||i6(process.env.CLAUDE_CODE_USE_VERTEX)||i6(process.env.CLAUDE_CODE_USE_FOUNDRY)||process.env.DISABLE_ERROR_REPORTING||iA())return;let z={error:K.stack||K.message,timestamp:new Date().toISOString()};if(mE5(z),tx===null){xW6.push({type:"error",error:K});return}tx.logError(K)}catch{}}function A_6(){return[...V$8]}function Qz(q,K){try{if(tx===null){xW6.push({type:"mcpError",serverName:q,error:K});return}tx.logMCPError(q,K)}catch{}}function C8(q,K){try{if(tx===null){xW6.push({type:"mcpDebug",serverName:q,message:K});return}tx.logMCPDebug(q,K)}catch{}}function N$8(q,K){if(!K||!K.startsWith("repl_main_thread"))return;let{messages:_,...z}=q;Ei8(z),Ri8(null)}var uE5=100,V$8,xW6,tx=null,DS$;var E8=y(()=>{F4();v8();RY();v$8();bW6();m8();y8();l8();V$8=[];xW6=[];DS$=_1(()=>{return process.argv.includes("--hard-fail")})});function TB(q){let K=[],_=!1;async function z(){if(_)return;if(K.length===0)return;_=!0;while(K.length>0){let{args:Y,resolve:$,reject:A,context:O}=K.shift();try{let w=await q.apply(O,Y);$(w)}catch(w){A(w)}}if(_=!1,K.length>0)z()}return function(...Y){return new Promise(($,A)=>{K.push({args:Y,resolve:$,reject:A,context:this}),z()})}}function pE5(q,K,_){if(_!==void 0&&!cp(q[K],_)||_===void 0&&!(K in q))it(q,K,_)}var rm6;var z41=y(()=>{nx6();wX6();rm6=pE5});function BE5(q){return function(K,_,z){var Y=-1,$=Object(K),A=z(K),O=A.length;while(O--){var w=A[q?O:++Y];if(_($[w],w,$)===!1)break}return K}}var TL7;var vL7=y(()=>{TL7=BE5});var gE5,y$8;var Y41=y(()=>{vL7();gE5=TL7(),y$8=gE5});function FE5(q){return zP(q)&&op(q)}var kL7;var VL7=y(()=>{kX6();np();kL7=FE5});function nE5(q){if(!zP(q)||oy(q)!=UE5)return!1;var K=qP6(q);if(K===null)return!0;var _=cE5.call(K,"constructor")&&K.constructor;return typeof _=="function"&&_ instanceof _&&NL7.call(_)==lE5}var UE5="[object Object]",QE5,dE5,NL7,cE5,lE5,IW6;var E$8=y(()=>{u36();K98();np();QE5=Function.prototype,dE5=Object.prototype,NL7=QE5.toString,cE5=dE5.hasOwnProperty,lE5=NL7.call(Object);IW6=nE5});function iE5(q,K){if(K==="constructor"&&typeof q[K]==="function")return;if(K=="__proto__")return;return q[K]}var om6;var $41=y(()=>{om6=iE5});function rE5(q){return qh(q,YB(q))}var yL7;var EL7=y(()=>{w96();eX6();yL7=rE5});function oE5(q,K,_,z,Y,$,A){var O=om6(q,_),w=om6(K,_),j=A.get(w);if(j){rm6(q,_,j);return}var H=$?$(O,w,_+"",q,K,A):void 0,J=H===void 0;if(J){var M=MA(w),X=!M&&ip(w),P=!M&&!X&&TX6(w);if(H=w,M||X||P)if(MA(O))H=O;else if(kL7(O))H=q98(O);else if(X)J=!1,H=rx6(w,!0);else if(P)J=!1,H=$98(w,!0);else H=[];else if(IW6(w)||Dc(w)){if(H=O,Dc(O))H=yL7(O);else if(!JA(O)||HX6(O))H=A98(w)}else J=!1}if(J)A.set(w,H),Y(H,w,z,$,A),A.delete(w);rm6(q,_,H)}var LL7;var RL7=y(()=>{z41();Oo8();Ho8();wo8();Jo8();kb6();yT();VL7();Vb6();J58();NT();E$8();b58();$41();EL7();LL7=oE5});function hL7(q,K,_,z,Y){if(q===K)return;y$8(K,function($,A){if(Y||(Y=new lp),JA($))LL7(q,K,A,_,hL7,z,Y);else{var O=z?z(om6(q,A),$,A+"",q,K,Y):void 0;if(O===void 0)O=$;rm6(q,A,O)}},YB)}var SL7;var CL7=y(()=>{vb6();z41();Y41();RL7();NT();eX6();$41();SL7=hL7});function aE5(q,K,_){switch(_.length){case 0:return q.call(K);case 1:return q.call(K,_[0]);case 2:return q.call(K,_[0],_[1]);case 3:return q.call(K,_[0],_[1],_[2])}return q.apply(K,_)}var bL7;var xL7=y(()=>{bL7=aE5});function sE5(q,K,_){return K=IL7(K===void 0?q.length-1:K,0),function(){var z=arguments,Y=-1,$=IL7(z.length-K,0),A=Array($);while(++Y<$)A[Y]=z[K+Y];Y=-1;var O=Array(K+1);while(++Y<K)O[Y]=z[Y];return O[K]=_(A),bL7(q,this,O)}}var IL7,L$8;var A41=y(()=>{xL7();IL7=Math.max;L$8=sE5});function tE5(q){return function(){return q}}var uL7;var mL7=y(()=>{uL7=tE5});var eE5,pL7;var BL7=y(()=>{mL7();Ao8();l58();eE5=!tX6?EX6:function(q,K){return tX6(q,"toString",{configurable:!0,enumerable:!1,value:uL7(K),writable:!0})},pL7=eE5});function zL5(q){var K=0,_=0;return function(){var z=_L5(),Y=KL5-(z-_);if(_=z,Y>0){if(++K>=qL5)return arguments[0]}else K=0;return q.apply(void 0,arguments)}}var qL5=800,KL5=16,_L5,gL7;var FL7=y(()=>{_L5=Date.now;gL7=zL5});var YL5,R$8;var O41=y(()=>{BL7();FL7();YL5=gL7(pL7),R$8=YL5});function $L5(q,K){return R$8(L$8(q,K,EX6),q+"")}var UL7;var QL7=y(()=>{l58();A41();O41();UL7=$L5});function AL5(q,K,_){if(!JA(_))return!1;var z=typeof K;if(z=="number"?op(_)&&Lt(K,_.length):z=="string"&&(K in _))return cp(_[K],q);return!1}var dL7;var cL7=y(()=>{wX6();kX6();Nb6();NT();dL7=AL5});function OL5(q){return UL7(function(K,_){var z=-1,Y=_.length,$=Y>1?_[Y-1]:void 0,A=Y>2?_[2]:void 0;if($=q.length>3&&typeof $=="function"?(Y--,$):void 0,A&&dL7(_[0],_[1],A))$=Y<3?void 0:$,Y=1;K=Object(K);while(++z<Y){var O=_[z];if(O)q(K,O,z,$)}return K})}var lL7;var nL7=y(()=>{QL7();cL7();lL7=OL5});var wL5,Ol;var iL7=y(()=>{CL7();nL7();wL5=lL7(function(q,K,_,z){SL7(q,K,_,z)}),Ol=wL5});function am6(q){let{buffer:K,bytesRead:_}=X8().readSync(q,{length:4096});if(_===0)return"utf8";if(_>=2){if(K[0]===255&&K[1]===254)return"utf16le"}if(_>=3&&K[0]===239&&K[1]===187&&K[2]===191)return"utf8";return"utf8"}function w41(q){let K=0,_=0;for(let z=0;z<q.length;z++)if(q[z]===`
130`)if(z>0&&q[z-1]==="\r")K++;else _++;return K>_?"CRLF":"LF"}function vB(q){let K=X8(),{resolvedPath:_,isSymlink:z}=F$(K,q);if(z)N(`Reading through symlink: ${q} -> ${_}`);let Y=am6(_),$=K.readFileSync(_,{encoding:Y}),A=w41($.slice(0,4096));return{content:$.replaceAll(`\r
131`,`

Callers 2

m_Function · 0.85
K_6Function · 0.85

Calls 3

oE7Function · 0.85
TE5Function · 0.85
joinMethod · 0.45

Tested by

no test coverage detected