embedoc 0.14.8 → 0.14.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cli-contract.yaml
CHANGED
package/dist/embedoc.bundle.mjs
CHANGED
|
@@ -26,7 +26,7 @@ Expecting one of '${n.join("', '")}'`);return this._lifeCycleHooks[e]?this._life
|
|
|
26
26
|
`),this.outputHelp({error:!0}));let n=t||{},r=n.exitCode||1,s=n.code||"commander.error";this._exit(r,s,e)}_parseOptionsEnv(){this.options.forEach(e=>{if(e.envVar&&e.envVar in K.env){let t=e.attributeName();(this.getOptionValue(t)===void 0||["default","config","env"].includes(this.getOptionValueSource(t)))&&(e.required||e.optional?this.emit(`optionEnv:${e.name()}`,K.env[e.envVar]):this.emit(`optionEnv:${e.name()}`))}})}_parseOptionsImplied(){let e=new Bd(this.options),t=n=>this.getOptionValue(n)!==void 0&&!["default","implied"].includes(this.getOptionValueSource(n));this.options.filter(n=>n.implied!==void 0&&t(n.attributeName())&&e.valueFromOption(this.getOptionValue(n.attributeName()),n)).forEach(n=>{Object.keys(n.implied).filter(r=>!t(r)).forEach(r=>{this.setOptionValueWithSource(r,n.implied[r],"implied")})})}missingArgument(e){let t=`error: missing required argument '${e}'`;this.error(t,{code:"commander.missingArgument"})}optionMissingArgument(e){let t=`error: option '${e.flags}' argument missing`;this.error(t,{code:"commander.optionMissingArgument"})}missingMandatoryOptionValue(e){let t=`error: required option '${e.flags}' not specified`;this.error(t,{code:"commander.missingMandatoryOptionValue"})}_conflictingOption(e,t){let n=o=>{let a=o.attributeName(),l=this.getOptionValue(a),c=this.options.find(h=>h.negate&&a===h.attributeName()),f=this.options.find(h=>!h.negate&&a===h.attributeName());return c&&(c.presetArg===void 0&&l===!1||c.presetArg!==void 0&&l===c.presetArg)?c:f||o},r=o=>{let a=n(o),l=a.attributeName();return this.getOptionValueSource(l)==="env"?`environment variable '${a.envVar}'`:`option '${a.flags}'`},s=`error: ${r(e)} cannot be used with ${r(t)}`;this.error(s,{code:"commander.conflictingOption"})}unknownOption(e){if(this._allowUnknownOption)return;let t="";if(e.startsWith("--")&&this._showSuggestionAfterError){let r=[],s=this;do{let o=s.createHelp().visibleOptions(s).filter(a=>a.long).map(a=>a.long);r=r.concat(o),s=s.parent}while(s&&!s._enablePositionalOptions);t=Ul(e,r)}let n=`error: unknown option '${e}'${t}`;this.error(n,{code:"commander.unknownOption"})}_excessArguments(e){if(this._allowExcessArguments)return;let t=this.registeredArguments.length,n=t===1?"":"s",s=`error: too many arguments${this.parent?` for '${this.name()}'`:""}. Expected ${t} argument${n} but got ${e.length}.`;this.error(s,{code:"commander.excessArguments"})}unknownCommand(){let e=this.args[0],t="";if(this._showSuggestionAfterError){let r=[];this.createHelp().visibleCommands(this).forEach(s=>{r.push(s.name()),s.alias()&&r.push(s.alias())}),t=Ul(e,r)}let n=`error: unknown command '${e}'${t}`;this.error(n,{code:"commander.unknownCommand"})}version(e,t,n){if(e===void 0)return this._version;this._version=e,t=t||"-V, --version",n=n||"output the version number";let r=this.createOption(t,n);return this._versionOptionName=r.attributeName(),this._registerOption(r),this.on("option:"+r.name(),()=>{this._outputConfiguration.writeOut(`${e}
|
|
27
27
|
`),this._exit(0,"commander.version",e)}),this}description(e,t){return e===void 0&&t===void 0?this._description:(this._description=e,t&&(this._argsDescription=t),this)}summary(e){return e===void 0?this._summary:(this._summary=e,this)}alias(e){if(e===void 0)return this._aliases[0];let t=this;if(this.commands.length!==0&&this.commands[this.commands.length-1]._executableHandler&&(t=this.commands[this.commands.length-1]),e===t._name)throw new Error("Command alias can't be the same as its name");let n=this.parent?._findCommand(e);if(n){let r=[n.name()].concat(n.aliases()).join("|");throw new Error(`cannot add alias '${e}' to command '${this.name()}' as already have command '${r}'`)}return t._aliases.push(e),this}aliases(e){return e===void 0?this._aliases:(e.forEach(t=>this.alias(t)),this)}usage(e){if(e===void 0){if(this._usage)return this._usage;let t=this.registeredArguments.map(n=>Nd(n));return[].concat(this.options.length||this._helpOption!==null?"[options]":[],this.commands.length?"[command]":[],this.registeredArguments.length?t:[]).join(" ")}return this._usage=e,this}name(e){return e===void 0?this._name:(this._name=e,this)}nameFromFilename(e){return this._name=ct.basename(e,ct.extname(e)),this}executableDir(e){return e===void 0?this._executableDir:(this._executableDir=e,this)}helpInformation(e){let t=this.createHelp(),n=this._getOutputContext(e);t.prepareContext({error:n.error,helpWidth:n.helpWidth,outputHasColors:n.hasColors});let r=t.formatHelp(this,t);return n.hasColors?r:this._outputConfiguration.stripColor(r)}_getOutputContext(e){e=e||{};let t=!!e.error,n,r,s;return t?(n=a=>this._outputConfiguration.writeErr(a),r=this._outputConfiguration.getErrHasColors(),s=this._outputConfiguration.getErrHelpWidth()):(n=a=>this._outputConfiguration.writeOut(a),r=this._outputConfiguration.getOutHasColors(),s=this._outputConfiguration.getOutHelpWidth()),{error:t,write:a=>(r||(a=this._outputConfiguration.stripColor(a)),n(a)),hasColors:r,helpWidth:s}}outputHelp(e){let t;typeof e=="function"&&(t=e,e=void 0);let n=this._getOutputContext(e),r={error:n.error,write:n.write,command:this};this._getCommandAndAncestors().reverse().forEach(o=>o.emit("beforeAllHelp",r)),this.emit("beforeHelp",r);let s=this.helpInformation({error:n.error});if(t&&(s=t(s),typeof s!="string"&&!Buffer.isBuffer(s)))throw new Error("outputHelp callback must return a string or a Buffer");n.write(s),this._getHelpOption()?.long&&this.emit(this._getHelpOption().long),this.emit("afterHelp",r),this._getCommandAndAncestors().forEach(o=>o.emit("afterAllHelp",r))}helpOption(e,t){return typeof e=="boolean"?(e?this._helpOption=this._helpOption??void 0:this._helpOption=null,this):(e=e??"-h, --help",t=t??"display help for command",this._helpOption=this.createOption(e,t),this)}_getHelpOption(){return this._helpOption===void 0&&this.helpOption(void 0,void 0),this._helpOption}addHelpOption(e){return this._helpOption=e,this}help(e){this.outputHelp(e);let t=Number(K.exitCode??0);t===0&&e&&typeof e!="function"&&e.error&&(t=1),this._exit(t,"commander.help","(outputHelp)")}addHelpText(e,t){let n=["beforeAll","before","after","afterAll"];if(!n.includes(e))throw new Error(`Unexpected value for position to addHelpText.
|
|
28
28
|
Expecting one of '${n.join("', '")}'`);let r=`${e}Help`;return this.on(r,s=>{let o;typeof t=="function"?o=t({error:s.error,command:s.command}):o=t,o&&s.write(`${o}
|
|
29
|
-
`)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(r=>t.is(r))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function zl(i){return i.map(e=>{if(!e.startsWith("--inspect"))return e;let t,n="127.0.0.1",r="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?t=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=s[1],/^\d+$/.test(s[3])?r=s[3]:n=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=s[1],n=s[3],r=s[4]),t&&r!=="0"?`${t}=${n}:${parseInt(r)+1}`:e})}function Bs(){if(K.env.NO_COLOR||K.env.FORCE_COLOR==="0"||K.env.FORCE_COLOR==="false")return!1;if(K.env.FORCE_COLOR||K.env.CLICOLOR_FORCE!==void 0)return!0}qs.Command=Fs;qs.useColor=Bs});var Kl=W(qe=>{var{Argument:$l}=xi(),{Command:Hs}=Gl(),{CommanderError:qd,InvalidArgumentError:Yl}=yn(),{Help:Hd}=Rs(),{Option:Jl}=Ts();qe.program=new Hs;qe.createCommand=i=>new Hs(i);qe.createOption=(i,e)=>new Jl(i,e);qe.createArgument=(i,e)=>new $l(i,e);qe.Command=Hs;qe.Option=Jl;qe.Argument=$l;qe.Help=Hd;qe.CommanderError=qd;qe.InvalidArgumentError=Yl;qe.InvalidOptionArgumentError=Yl});var $s,ac,Yd,lc=ue(()=>{$s=(i,e,t)=>{let n=i instanceof RegExp?ac(i,t):i,r=e instanceof RegExp?ac(e,t):e,s=n!==null&&r!=null&&Yd(n,r,t);return s&&{start:s[0],end:s[1],pre:t.slice(0,s[0]),body:t.slice(s[0]+n.length,s[1]),post:t.slice(s[1]+r.length)}},ac=(i,e)=>{let t=e.match(i);return t?t[0]:null},Yd=(i,e,t)=>{let n,r,s,o,a,l=t.indexOf(i),c=t.indexOf(e,l+1),f=l;if(l>=0&&c>0){if(i===e)return[l,c];for(n=[],s=t.length;f>=0&&!a;){if(f===l)n.push(f),l=t.indexOf(i,f+1);else if(n.length===1){let h=n.pop();h!==void 0&&(a=[h,c])}else r=n.pop(),r!==void 0&&r<s&&(s=r,o=c),c=t.indexOf(e,f+1);f=l<c&&l>=0?l:c}n.length&&o!==void 0&&(a=[s,o])}return a}});function Ys(i){return isNaN(i)?i.charCodeAt(0):parseInt(i,10)}function ap(i){return i.replace(ep,cc).replace(tp,uc).replace(np,Ks).replace(ip,hc).replace(rp,fc)}function lp(i){return i.replace(Jd,"\\").replace(Kd,"{").replace(Qd,"}").replace(Xd,",").replace(Zd,".")}function dc(i){if(!i)return[""];let e=[],t=$s("{","}",i);if(!t)return i.split(",");let{pre:n,body:r,post:s}=t,o=n.split(",");o[o.length-1]+="{"+r+"}";let a=dc(s);return s.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),e.push.apply(e,o),e}function pc(i,e={}){if(!i)return[];let{max:t=sp,maxLength:n=op}=e;return i.slice(0,2)==="{}"&&(i="\\{\\}"+i.slice(2)),Js(ap(i),t,n,!0).map(lp)}function cp(i){return"{"+i+"}"}function up(i){return/^-?0\d/.test(i)}function hp(i,e){return i<=e}function fp(i,e){return i>=e}function wn(i,e,t,n,r,s){let o=[],a=0;for(let l=0;l<i.length;l++)for(let c=0;c<t.length;c++){if(o.length>=n)return o;let f=i[l]+e+t[c];if(!(s&&!f)){if(a+f.length>r)return o;o.push(f),a+=f.length}}return o}function dp(i,e,t,n){let r=i.split(/\.\./),s=[];if(r[0]===void 0||r[1]===void 0)return s;let o=Ys(r[0]),a=Ys(r[1]),l=Math.max(r[0].length,r[1].length),c=r.length===3&&r[2]!==void 0?Math.max(Math.abs(Ys(r[2])),1):1,f=hp;a<o&&(c*=-1,f=fp);let p=r.some(up),m=0;for(let _=o;f(_,a)&&s.length<t;_+=c){let g;if(e)g=String.fromCharCode(_),g==="\\"&&(g="");else if(g=String(_),p){let C=l-g.length;if(C>0){let b=new Array(C+1).join("0");_<0?g="-"+b+g.slice(1):g=b+g}}if(m+g.length>n)break;s.push(g),m+=g.length}return s}function Js(i,e,t,n){let r=[""],s=!1,o=!0;for(;;){let a=$s("{","}",i);if(!a)return wn(r,i,[""],e,t,s);let l=a.pre;if(/\$$/.test(l)){if(r=wn(r,l+"{"+a.body+"}",[""],e,t,s&&!a.post.length),o=!1,!a.post.length)break;i=a.post;continue}let c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(a.body),f=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(a.body),h=c||f,p=a.body.indexOf(",")>=0;if(!h&&!p){if(a.post.match(/,(?!,).*\}/)){i=a.pre+"{"+a.body+Ks+a.post,n=!0;continue}return wn(r,l+"{"+a.body+"}"+a.post,[""],e,t,s)}o&&(s=n&&!h,o=!1);let m;if(h)m=dp(a.body,f,e,t);else{let _=dc(a.body);if(_.length===1&&_[0]!==void 0&&(_=Js(_[0],e,t,!1).map(cp),_.length===1)){if(r=wn(r,l+_[0],[""],e,t,s&&!a.post.length),!a.post.length)break;i=a.post;continue}let g=s&&!a.post.length&&!l;for(let b=0;g&&b<r.length;b++)r[b]&&(g=!1);m=[];let C=0;e:for(let b=0;b<_.length;b++){let x=Js(_[b],e,t,!1);for(let P=0;P<x.length;P++){let D=x[P];if(!(g&&!D)){if(m.length>=e||C+D.length>t)break e;m.push(D),C+=D.length}}}}if(r=wn(r,l,m,e,t,s&&!a.post.length),!a.post.length)break;i=a.post}return r}var cc,uc,Ks,hc,fc,Jd,Kd,Qd,Xd,Zd,ep,tp,np,ip,rp,sp,op,mc=ue(()=>{lc();cc="\0SLASH"+Math.random()+"\0",uc="\0OPEN"+Math.random()+"\0",Ks="\0CLOSE"+Math.random()+"\0",hc="\0COMMA"+Math.random()+"\0",fc="\0PERIOD"+Math.random()+"\0",Jd=new RegExp(cc,"g"),Kd=new RegExp(uc,"g"),Qd=new RegExp(Ks,"g"),Xd=new RegExp(hc,"g"),Zd=new RegExp(fc,"g"),ep=/\\\\/g,tp=/\\{/g,np=/\\}/g,ip=/\\,/g,rp=/\\\./g,sp=1e5,op=4e6});var vn,gc=ue(()=>{vn=i=>{if(typeof i!="string")throw new TypeError("invalid pattern");if(i.length>65536)throw new TypeError("pattern is too long")}});var pp,Sn,mp,_c,yc,bc=ue(()=>{pp={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},Sn=i=>i.replace(/[[\]\\-]/g,"\\$&"),mp=i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),_c=i=>i.join(""),yc=(i,e)=>{let t=e;if(i.charAt(t)!=="[")throw new Error("not in a brace expression");let n=[],r=[],s=t+1,o=!1,a=!1,l=!1,c=!1,f=t,h="";e:for(;s<i.length;){let g=i.charAt(s);if((g==="!"||g==="^")&&s===t+1){c=!0,s++;continue}if(g==="]"&&o&&!l){f=s+1;break}if(o=!0,g==="\\"&&!l){l=!0,s++;continue}if(g==="["&&!l){for(let[C,[b,x,P]]of Object.entries(pp))if(i.startsWith(C,s)){if(h)return["$.",!1,i.length-t,!0];s+=C.length,P?r.push(b):n.push(b),a=a||x;continue e}}if(l=!1,h){g>h?n.push(Sn(h)+"-"+Sn(g)):g===h&&n.push(Sn(g)),h="",s++;continue}if(i.startsWith("-]",s+1)){n.push(Sn(g+"-")),s+=2;continue}if(i.startsWith("-",s+1)){h=g,s+=2;continue}n.push(Sn(g)),s++}if(f<s)return["",!1,0,!1];if(!n.length&&!r.length)return["$.",!1,i.length-t,!0];if(r.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!c){let g=n[0].length===2?n[0].slice(-1):n[0];return[mp(g),!1,f-t,!1]}let p="["+(c?"^":"")+_c(n)+"]",m="["+(c?"":"^")+_c(r)+"]";return[n.length&&r.length?"("+p+"|"+m+")":n.length?p:m,a,f-t,!0]}});var He,Ii=ue(()=>{He=(i,{windowsPathsNoEscape:e=!1,magicalBraces:t=!0}={})=>t?e?i.replace(/\[([^/\\])\]/g,"$1"):i.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):e?i.replace(/\[([^/\\{}])\]/g,"$1"):i.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1")});var Re,gp,Qs,wc,_p,yp,bp,vc,wp,Li,vp,Sp,xp,Ep,Xs,Sc,xc,Cp,Pt,Zs=ue(()=>{bc();Ii();gp=new Set(["!","?","+","*","@"]),Qs=i=>gp.has(i),wc=i=>Qs(i.type),_p=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),yp=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),bp=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),vc=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),wp="(?!(?:^|/)\\.\\.?(?:$|/))",Li="(?!\\.)",vp=new Set(["[","."]),Sp=new Set(["..","."]),xp=new Set("().*{}+?[]^$\\!"),Ep=i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Xs="[^/]",Sc=Xs+"*?",xc=Xs+"+?",Cp=0,Pt=class{type;#e;#i;#r=!1;#t=[];#o;#x;#y;#h=!1;#a;#f;#u=!1;id=++Cp;get depth(){return(this.#o?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#e.id,parent:this.#o?.id,depth:this.depth,partsLength:this.#t.length,parts:this.#t}}constructor(e,t,n={}){this.type=e,e&&(this.#i=!0),this.#o=t,this.#e=this.#o?this.#o.#e:this,this.#a=this.#e===this?n:this.#e.#a,this.#y=this.#e===this?[]:this.#e.#y,e==="!"&&!this.#e.#h&&this.#y.push(this),this.#x=this.#o?this.#o.#t.length:0}get hasMagic(){if(this.#i!==void 0)return this.#i;for(let e of this.#t)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#i=!0;return this.#i}toString(){return this.#f!==void 0?this.#f:this.type?this.#f=this.type+"("+this.#t.map(e=>String(e)).join("|")+")":this.#f=this.#t.map(e=>String(e)).join("")}#c(){if(this!==this.#e)throw new Error("should only call on root");if(this.#h)return this;this.toString(),this.#h=!0;let e;for(;e=this.#y.pop();){if(e.type!=="!")continue;let t=e,n=t.#o;for(;n;){for(let r=t.#x+1;!n.type&&r<n.#t.length;r++)for(let s of e.#t){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(n.#t[r])}t=n,n=t.#o}}return this}push(...e){for(let t of e)if(t!==""){if(typeof t!="string"&&!(t instanceof Re&&t.#o===this))throw new Error("invalid part: "+t);this.#t.push(t)}}toJSON(){let e=this.type===null?this.#t.slice().map(t=>typeof t=="string"?t:t.toJSON()):[this.type,...this.#t.map(t=>t.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#h&&this.#o?.type==="!")&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#o?.isStart())return!1;if(this.#x===0)return!0;let e=this.#o;for(let t=0;t<this.#x;t++){let n=e.#t[t];if(!(n instanceof Re&&n.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#o?.type==="!")return!0;if(!this.#o?.isEnd())return!1;if(!this.type)return this.#o?.isEnd();let e=this.#o?this.#o.#t.length:0;return this.#x===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let t=new Re(this.type,e);for(let n of this.#t)t.copyIn(n);return t}static#s(e,t,n,r,s){let o=r.maxExtglobRecursion??2,a=!1,l=!1,c=-1,f=!1;if(t.type===null){let g=n,C="";for(;g<e.length;){let b=e.charAt(g++);if(a||b==="\\"){a=!a,C+=b;continue}if(l){g===c+1?(b==="^"||b==="!")&&(f=!0):b==="]"&&!(g===c+2&&f)&&(l=!1),C+=b;continue}else if(b==="["){l=!0,c=g,f=!1,C+=b;continue}if(!r.noext&&Qs(b)&&e.charAt(g)==="("&&s<=o){t.push(C),C="";let P=new Re(b,t);g=Re.#s(e,P,g,r,s+1),t.push(P);continue}C+=b}return t.push(C),g}let h=n+1,p=new Re(null,t),m=[],_="";for(;h<e.length;){let g=e.charAt(h++);if(a||g==="\\"){a=!a,_+=g;continue}if(l){h===c+1?(g==="^"||g==="!")&&(f=!0):g==="]"&&!(h===c+2&&f)&&(l=!1),_+=g;continue}else if(g==="["){l=!0,c=h,f=!1,_+=g;continue}if(!r.noext&&Qs(g)&&e.charAt(h)==="("&&(s<=o||t&&t.#p(g))){let b=t&&t.#p(g)?0:1;p.push(_),_="";let x=new Re(g,p);p.push(x),h=Re.#s(e,x,h,r,s+b);continue}if(g==="|"){p.push(_),_="",m.push(p),p=new Re(null,t);continue}if(g===")")return _===""&&t.#t.length===0&&(t.#u=!0),p.push(_),_="",t.push(...m,p),h;_+=g}return t.type=null,t.#i=void 0,t.#t=[e.substring(n-1)],h}#b(e){return this.#v(e,yp)}#v(e,t=_p){if(!e||typeof e!="object"||e.type!==null||e.#t.length!==1||this.type===null)return!1;let n=e.#t[0];return!n||typeof n!="object"||n.type===null?!1:this.#p(n.type,t)}#p(e,t=bp){return!!t.get(this.type)?.includes(e)}#m(e,t){let n=e.#t[0],r=new Re(null,n,this.options);r.#t.push(""),n.push(r),this.#k(e,t)}#k(e,t){let n=e.#t[0];this.#t.splice(t,1,...n.#t);for(let r of n.#t)typeof r=="object"&&(r.#o=this);this.#f=void 0}#g(e){return!!vc.get(this.type)?.has(e)}#S(e){if(!e||typeof e!="object"||e.type!==null||e.#t.length!==1||this.type===null||this.#t.length!==1)return!1;let t=e.#t[0];return!t||typeof t!="object"||t.type===null?!1:this.#g(t.type)}#E(e){let t=vc.get(this.type),n=e.#t[0],r=t?.get(n.type);if(!r)return!1;this.#t=n.#t;for(let s of this.#t)typeof s=="object"&&(s.#o=this);this.type=r,this.#f=void 0,this.#u=!1}static fromGlob(e,t={}){let n=new Re(null,void 0,t);return Re.#s(e,n,0,t,0),n}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,n,r,s]=this.toRegExpSource();if(!(r||this.#i||this.#a.nocase&&!this.#a.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;let a=(this.#a.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${t}$`,a),{_src:t,_glob:e})}get options(){return this.#a}toRegExpSource(e){let t=e??!!this.#a.dot;if(this.#e===this&&(this.#d(),this.#c()),!wc(this)){let l=this.isStart()&&this.isEnd()&&!this.#t.some(m=>typeof m!="string"),c=this.#t.map(m=>{let[_,g,C,b]=typeof m=="string"?Re.#w(m,this.#i,l):m.toRegExpSource(e);return this.#i=this.#i||C,this.#r=this.#r||b,_}).join(""),f="";if(this.isStart()&&typeof this.#t[0]=="string"&&!(this.#t.length===1&&Sp.has(this.#t[0]))){let _=vp,g=t&&_.has(c.charAt(0))||c.startsWith("\\.")&&_.has(c.charAt(2))||c.startsWith("\\.\\.")&&_.has(c.charAt(4)),C=!t&&!e&&_.has(c.charAt(0));f=g?wp:C?Li:""}let h="";return this.isEnd()&&this.#e.#h&&this.#o?.type==="!"&&(h="(?:$|\\/)"),[f+c+h,He(c),this.#i=!!this.#i,this.#r]}let n=this.type==="*"||this.type==="+",r=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#_(t);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let l=this.toString(),c=this;return c.#t=[l],c.type=null,c.#i=void 0,[l,He(this.toString()),!1,!1]}let o=!n||e||t||!Li?"":this.#_(!0);o===s&&(o=""),o&&(s=`(?:${s})(?:${o})*?`);let a="";if(this.type==="!"&&this.#u)a=(this.isStart()&&!t?Li:"")+xc;else{let l=this.type==="!"?"))"+(this.isStart()&&!t&&!e?Li:"")+Sc+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;a=r+s+l}return[a,He(s),this.#i=!!this.#i,this.#r]}#d(){if(wc(this)){let e=0,t=!1;do{t=!0;for(let n=0;n<this.#t.length;n++){let r=this.#t[n];typeof r=="object"&&(r.#d(),this.#v(r)?(t=!1,this.#k(r,n)):this.#b(r)?(t=!1,this.#m(r,n)):this.#S(r)&&(t=!1,this.#E(r)))}}while(!t&&++e<10)}else for(let e of this.#t)typeof e=="object"&&e.#d();this.#f=void 0}#_(e){return this.#t.map(t=>{if(typeof t=="string")throw new Error("string type in extglob ast??");let[n,r,s,o]=t.toRegExpSource(e);return this.#r=this.#r||o,n}).filter(t=>!(this.isStart()&&this.isEnd())||!!t).join("|")}static#w(e,t,n=!1){let r=!1,s="",o=!1,a=!1;for(let l=0;l<e.length;l++){let c=e.charAt(l);if(r){r=!1,s+=(xp.has(c)?"\\":"")+c;continue}if(c==="*"){if(a)continue;a=!0,s+=n&&/^[*]+$/.test(e)?xc:Sc,t=!0;continue}else a=!1;if(c==="\\"){l===e.length-1?s+="\\\\":r=!0;continue}if(c==="["){let[f,h,p,m]=yc(e,l);if(p){s+=f,o=o||h,l+=p-1,t=t||m;continue}}if(c==="?"){s+=Xs,t=!0;continue}s+=Ep(c)}return[s,He(e),!!t,o]}};Re=Pt});var Rt,eo=ue(()=>{Rt=(i,{windowsPathsNoEscape:e=!1,magicalBraces:t=!1}={})=>t?e?i.replace(/[?*()[\]{}]/g,"[$&]"):i.replace(/[?*()[\]\\{}]/g,"\\$&"):e?i.replace(/[?*()[\]]/g,"[$&]"):i.replace(/[?*()[\]\\]/g,"\\$&")});var Ce,kp,Ap,Op,Pp,Rp,Ip,Lp,Dp,Tp,Np,Mp,Fp,Bp,qp,Hp,Wp,jp,Vp,kc,Ac,Oc,Ec,Up,re,zp,Gp,$p,Yp,Jp,We,Kp,Pc,Qp,Xp,Cc,Zp,De,St=ue(()=>{mc();gc();Zs();eo();Ii();Zs();eo();Ii();Ce=(i,e,t={})=>(vn(e),!t.nocomment&&e.charAt(0)==="#"?!1:new De(e,t).match(i)),kp=/^\*+([^+@!?*[(]*)$/,Ap=i=>e=>!e.startsWith(".")&&e.endsWith(i),Op=i=>e=>e.endsWith(i),Pp=i=>(i=i.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(i)),Rp=i=>(i=i.toLowerCase(),e=>e.toLowerCase().endsWith(i)),Ip=/^\*+\.\*+$/,Lp=i=>!i.startsWith(".")&&i.includes("."),Dp=i=>i!=="."&&i!==".."&&i.includes("."),Tp=/^\.\*+$/,Np=i=>i!=="."&&i!==".."&&i.startsWith("."),Mp=/^\*+$/,Fp=i=>i.length!==0&&!i.startsWith("."),Bp=i=>i.length!==0&&i!=="."&&i!=="..",qp=/^\?+([^+@!?*[(]*)?$/,Hp=([i,e=""])=>{let t=kc([i]);return e?(e=e.toLowerCase(),n=>t(n)&&n.toLowerCase().endsWith(e)):t},Wp=([i,e=""])=>{let t=Ac([i]);return e?(e=e.toLowerCase(),n=>t(n)&&n.toLowerCase().endsWith(e)):t},jp=([i,e=""])=>{let t=Ac([i]);return e?n=>t(n)&&n.endsWith(e):t},Vp=([i,e=""])=>{let t=kc([i]);return e?n=>t(n)&&n.endsWith(e):t},kc=([i])=>{let e=i.length;return t=>t.length===e&&!t.startsWith(".")},Ac=([i])=>{let e=i.length;return t=>t.length===e&&t!=="."&&t!==".."},Oc=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Ec={win32:{sep:"\\"},posix:{sep:"/"}},Up=Oc==="win32"?Ec.win32.sep:Ec.posix.sep;Ce.sep=Up;re=Symbol("globstar **");Ce.GLOBSTAR=re;zp="[^/]",Gp=zp+"*?",$p="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Yp="(?:(?!(?:\\/|^)\\.).)*?",Jp=(i,e={})=>t=>Ce(t,i,e);Ce.filter=Jp;We=(i,e={})=>Object.assign({},i,e),Kp=i=>{if(!i||typeof i!="object"||!Object.keys(i).length)return Ce;let e=Ce;return Object.assign((n,r,s={})=>e(n,r,We(i,s)),{Minimatch:class extends e.Minimatch{constructor(r,s={}){super(r,We(i,s))}static defaults(r){return e.defaults(We(i,r)).Minimatch}},AST:class extends e.AST{constructor(r,s,o={}){super(r,s,We(i,o))}static fromGlob(r,s={}){return e.AST.fromGlob(r,We(i,s))}},unescape:(n,r={})=>e.unescape(n,We(i,r)),escape:(n,r={})=>e.escape(n,We(i,r)),filter:(n,r={})=>e.filter(n,We(i,r)),defaults:n=>e.defaults(We(i,n)),makeRe:(n,r={})=>e.makeRe(n,We(i,r)),braceExpand:(n,r={})=>e.braceExpand(n,We(i,r)),match:(n,r,s={})=>e.match(n,r,We(i,s)),sep:e.sep,GLOBSTAR:re})};Ce.defaults=Kp;Pc=(i,e={})=>(vn(i),e.nobrace||!/\{(?:(?!\{).)*\}/.test(i)?[i]:pc(i,{max:e.braceExpandMax}));Ce.braceExpand=Pc;Qp=(i,e={})=>new De(i,e).makeRe();Ce.makeRe=Qp;Xp=(i,e,t={})=>{let n=new De(e,t);return i=i.filter(r=>n.match(r)),n.options.nonull&&!i.length&&i.push(e),i};Ce.match=Xp;Cc=/[?*]|[+@!]\(.*?\)|\[|\]/,Zp=i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),De=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,t={}){vn(e),t=t||{},this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion??200,this.pattern=e,this.platform=t.platform||Oc,this.isWindows=this.platform==="win32";let n="allowWindowsEscape";this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t[n]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot!==void 0?t.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let r=this.globParts.map((s,o,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=s[0]===""&&s[1]===""&&(s[2]==="?"||!Cc.test(s[2]))&&!Cc.test(s[3]),c=/^[a-z]:/i.test(s[0]);if(l)return[...s.slice(0,4),...s.slice(4).map(f=>this.parse(f))];if(c)return[s[0],...s.slice(1).map(f=>this.parse(f))]}return s.map(l=>this.parse(l))});if(this.debug(this.pattern,r),this.set=r.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let o=this.set[s];o[0]===""&&o[1]===""&&this.globParts[s][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let n of e)for(let r=0;r<n.length;r++)n[r]==="**"&&(n[r]="*");let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):t>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(t=>{let n=-1;for(;(n=t.indexOf("**",n+1))!==-1;){let r=n;for(;t[r+1]==="**";)r++;r!==n&&t.splice(n,r-n)}return t})}levelOneOptimize(e){return e.map(t=>(t=t.reduce((n,r)=>{let s=n[n.length-1];return r==="**"&&s==="**"?n:r===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(n.pop(),n):(n.push(r),n)},[]),t.length===0?[""]:t))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let r=1;r<e.length-1;r++){let s=e[r];r===1&&s===""&&e[0]===""||(s==="."||s==="")&&(t=!0,e.splice(r,1),r--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(t=!0,e.pop())}let n=0;for(;(n=e.indexOf("..",n+1))!==-1;){let r=e[n-1];r&&r!=="."&&r!==".."&&r!=="**"&&!(this.isWindows&&/^[a-z]:$/i.test(r))&&(t=!0,e.splice(n-1,2),n-=2)}}while(t);return e.length===0?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let n of e){let r=-1;for(;(r=n.indexOf("**",r+1))!==-1;){let o=r;for(;n[o+1]==="**";)o++;o>r&&n.splice(r+1,o-r);let a=n[r+1],l=n[r+2],c=n[r+3];if(a!==".."||!l||l==="."||l===".."||!c||c==="."||c==="..")continue;t=!0,n.splice(r,1);let f=n.slice(0);f[r]="**",e.push(f),r--}if(!this.preserveMultipleSlashes){for(let o=1;o<n.length-1;o++){let a=n[o];o===1&&a===""&&n[0]===""||(a==="."||a==="")&&(t=!0,n.splice(o,1),o--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(t=!0,n.pop())}let s=0;for(;(s=n.indexOf("..",s+1))!==-1;){let o=n[s-1];if(o&&o!=="."&&o!==".."&&o!=="**"){t=!0;let l=s===1&&n[s+1]==="**"?["."]:[];n.splice(s-1,2,...l),n.length===0&&n.push(""),s-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let n=t+1;n<e.length;n++){let r=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(r){e[t]=[],e[n]=r;break}}return e.filter(t=>t.length)}partsMatch(e,t,n=!1){let r=0,s=0,o=[],a="";for(;r<e.length&&s<t.length;)if(e[r]===t[s])o.push(a==="b"?t[s]:e[r]),r++,s++;else if(n&&e[r]==="**"&&t[s]===e[r+1])o.push(e[r]),r++;else if(n&&t[s]==="**"&&e[r]===t[s+1])o.push(t[s]),s++;else if(e[r]==="*"&&t[s]&&(this.options.dot||!t[s].startsWith("."))&&t[s]!=="**"){if(a==="b")return!1;a="a",o.push(e[r]),r++,s++}else if(t[s]==="*"&&e[r]&&(this.options.dot||!e[r].startsWith("."))&&e[r]!=="**"){if(a==="a")return!1;a="b",o.push(t[s]),r++,s++}else return!1;return e.length===t.length&&o}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,n=0;for(let r=0;r<e.length&&e.charAt(r)==="!";r++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t,n=!1){let r=0,s=0;if(this.isWindows){let a=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),l=!a&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),c=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),f=!c&&t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]=="string"&&/^[a-z]:$/i.test(t[3]),h=l?3:a?0:void 0,p=f?3:c?0:void 0;if(typeof h=="number"&&typeof p=="number"){let[m,_]=[e[h],t[p]];m.toLowerCase()===_.toLowerCase()&&(t[p]=m,s=p,r=h)}}let{optimizationLevel:o=1}=this.options;return o>=2&&(e=this.levelTwoFileOptimize(e)),t.includes(re)?this.#e(e,t,n,r,s):this.#r(e,t,n,r,s)}#e(e,t,n,r,s){let o=t.indexOf(re,s),a=t.lastIndexOf(re),[l,c,f]=n?[t.slice(s,o),t.slice(o+1),[]]:[t.slice(s,o),t.slice(o+1,a),t.slice(a+1)];if(l.length){let x=e.slice(r,r+l.length);if(!this.#r(x,l,n,0,0))return!1;r+=l.length,s+=l.length}let h=0;if(f.length){if(f.length+r>e.length)return!1;let x=e.length-f.length;if(this.#r(e,f,n,x,0))h=f.length;else{if(e[e.length-1]!==""||r+f.length===e.length||(x--,!this.#r(e,f,n,x,0)))return!1;h=f.length+1}}if(!c.length){let x=!!h;for(let P=r;P<e.length-h;P++){let D=String(e[P]);if(x=!0,D==="."||D===".."||!this.options.dot&&D.startsWith("."))return!1}return n||x}let p=[[[],0]],m=p[0],_=0,g=[0];for(let x of c)x===re?(g.push(_),m=[[],0],p.push(m)):(m[0].push(x),_++);let C=p.length-1,b=e.length-h;for(let x of p)x[1]=b-(g[C--]+x[0].length);return!!this.#i(e,p,r,0,n,0,!!h)}#i(e,t,n,r,s,o,a){let l=t[r];if(!l){for(let h=n;h<e.length;h++){a=!0;let p=e[h];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1}return a}let[c,f]=l;for(;n<=f;){if(this.#r(e.slice(0,n+c.length),c,s,n,0)&&o<this.maxGlobstarRecursion){let m=this.#i(e,t,n+c.length,r+1,s,o+1,a);if(m!==!1)return m}let p=e[n];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1;n++}return s||null}#r(e,t,n,r,s){let o,a,l,c;for(o=r,a=s,c=e.length,l=t.length;o<c&&a<l;o++,a++){this.debug("matchOne loop");let f=t[a],h=e[o];if(this.debug(t,f,h),f===!1||f===re)return!1;let p;if(typeof f=="string"?(p=h===f,this.debug("string match",f,h,p)):(p=f.test(h),this.debug("pattern match",f,h,p)),!p)return!1}if(o===c&&a===l)return!0;if(o===c)return n;if(a===l)return o===c-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return Pc(this.pattern,this.options)}parse(e){vn(e);let t=this.options;if(e==="**")return re;if(e==="")return"";let n,r=null;(n=e.match(Mp))?r=t.dot?Bp:Fp:(n=e.match(kp))?r=(t.nocase?t.dot?Rp:Pp:t.dot?Op:Ap)(n[1]):(n=e.match(qp))?r=(t.nocase?t.dot?Wp:Hp:t.dot?jp:Vp)(n):(n=e.match(Ip))?r=t.dot?Dp:Lp:(n=e.match(Tp))&&(r=Np);let s=Pt.fromGlob(e,this.options).toMMPattern();return r&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:r}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,n=t.noglobstar?Gp:t.dot?$p:Yp,r=new Set(t.nocase?["i"]:[]),s=e.map(l=>{let c=l.map(h=>{if(h instanceof RegExp)for(let p of h.flags.split(""))r.add(p);return typeof h=="string"?Zp(h):h===re?re:h._src});c.forEach((h,p)=>{let m=c[p+1],_=c[p-1];h!==re||_===re||(_===void 0?m!==void 0&&m!==re?c[p+1]="(?:\\/|"+n+"\\/)?"+m:c[p]=n:m===void 0?c[p-1]=_+"(?:\\/|\\/"+n+")?":m!==re&&(c[p-1]=_+"(?:\\/|\\/"+n+"\\/)"+m,c[p+1]=re))});let f=c.filter(h=>h!==re);if(this.partial&&f.length>=1){let h=[];for(let p=1;p<=f.length;p++)h.push(f.slice(0,p).join("/"));return"(?:"+h.join("|")+")"}return f.join("/")}).join("|"),[o,a]=e.length>1?["(?:",")"]:["",""];s="^"+o+s+a+"$",this.partial&&(s="^(?:\\/|"+o+s.slice(1,-1)+a+")$"),this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...r].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;let n=this.options;this.isWindows&&(e=e.split("\\").join("/"));let r=this.slashSplit(e);this.debug(this.pattern,"split",r);let s=this.set;this.debug(this.pattern,"set",s);let o=r[r.length-1];if(!o)for(let a=r.length-2;!o&&a>=0;a--)o=r[a];for(let a of s){let l=r;if(n.matchBase&&a.length===1&&(l=[o]),this.matchOne(l,a,t))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return Ce.defaults(e).Minimatch}};Ce.AST=Pt;Ce.Minimatch=De;Ce.escape=Rt;Ce.unescape=He});import{tracingChannel as em,channel as tm}from"node:diagnostics_channel";var me,xn,nm,to,Ic,Rc,im,rm,xt,Lc,Di,sm,Cn,Tc=ue(()=>{me=tm("lru-cache:metrics"),xn=em("lru-cache"),nm=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,to=()=>me.hasSubscribers||xn.hasSubscribers,Ic=new Set,Rc=typeof process=="object"&&process?process:{},im=(i,e,t,n)=>{typeof Rc.emitWarning=="function"?Rc.emitWarning(i,e,t,n):console.error(`[${t}] ${e}: ${i}`)},rm=i=>!Ic.has(i),xt=i=>!!i&&i===Math.floor(i)&&i>0&&isFinite(i),Lc=i=>xt(i)?i<=Math.pow(2,8)?Uint8Array:i<=Math.pow(2,16)?Uint16Array:i<=Math.pow(2,32)?Uint32Array:i<=Number.MAX_SAFE_INTEGER?Di:null:null,Di=class extends Array{constructor(i){super(i),this.fill(0)}},sm=class En{heap;length;static#e=!1;static create(e){let t=Lc(e);if(!t)return[];En.#e=!0;let n=new En(e,t);return En.#e=!1,n}constructor(e,t){if(!En.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Cn=class Dc{#e;#i;#r;#t;#o;#x;#y;#h;get perf(){return this.#h}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#a;#f;#u;#c;#s;#b;#v;#p;#m;#k;#g;#S;#E;#d;#_;#w;#O;#n;#I;static unsafeExposeInternals(e){return{starts:e.#E,ttls:e.#d,autopurgeTimers:e.#_,sizes:e.#S,keyMap:e.#u,keyList:e.#c,valList:e.#s,next:e.#b,prev:e.#v,get head(){return e.#p},get tail(){return e.#m},free:e.#k,isBackgroundFetch:t=>e.#l(t),backgroundFetch:(t,n,r,s)=>e.#F(t,n,r,s),moveToTail:t=>e.#Y(t),indexes:t=>e.#P(t),rindexes:t=>e.#R(t),isStale:t=>e.#C(t)}}get max(){return this.#e}get maxSize(){return this.#i}get calculatedSize(){return this.#f}get size(){return this.#a}get fetchMethod(){return this.#x}get memoMethod(){return this.#y}get dispose(){return this.#r}get onInsert(){return this.#t}get disposeAfter(){return this.#o}constructor(e){let{max:t=0,ttl:n,ttlResolution:r=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:l,dispose:c,onInsert:f,disposeAfter:h,noDisposeOnSet:p,noUpdateTTL:m,maxSize:_=0,maxEntrySize:g=0,sizeCalculation:C,fetchMethod:b,memoMethod:x,noDeleteOnFetchRejection:P,noDeleteOnStaleGet:D,allowStaleOnFetchRejection:F,allowStaleOnFetchAbort:B,ignoreFetchAbort:Y,backgroundFetchSize:_e=1,perf:oe}=e;if(this.backgroundFetchSize=_e,oe!==void 0&&typeof oe?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#h=oe??nm,t!==0&&!xt(t))throw new TypeError("max option must be a nonnegative integer");let Z=t?Lc(t):Array;if(!Z)throw new Error("invalid max value: "+t);if(this.#e=t,this.#i=_,this.maxEntrySize=g||this.#i,this.sizeCalculation=C,this.sizeCalculation){if(!this.#i&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(x!==void 0&&typeof x!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#y=x,b!==void 0&&typeof b!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#x=b,this.#O=!!b,this.#u=new Map,this.#c=Array.from({length:t}).fill(void 0),this.#s=Array.from({length:t}).fill(void 0),this.#b=new Z(t),this.#v=new Z(t),this.#p=0,this.#m=0,this.#k=sm.create(t),this.#a=0,this.#f=0,typeof c=="function"&&(this.#r=c),typeof f=="function"&&(this.#t=f),typeof h=="function"?(this.#o=h,this.#g=[]):(this.#o=void 0,this.#g=void 0),this.#w=!!this.#r,this.#I=!!this.#t,this.#n=!!this.#o,this.noDisposeOnSet=!!p,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!P,this.allowStaleOnFetchRejection=!!F,this.allowStaleOnFetchAbort=!!B,this.ignoreFetchAbort=!!Y,this.maxEntrySize!==0){if(this.#i!==0&&!xt(this.#i))throw new TypeError("maxSize must be a positive integer if specified");if(!xt(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#U()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!D,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=xt(r)||r===0?r:1,this.ttlAutopurge=!!s,this.ttl=n||0,this.ttl){if(!xt(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#L()}if(this.#e===0&&this.ttl===0&&this.#i===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#i){let pe="LRU_CACHE_UNBOUNDED";rm(pe)&&(Ic.add(pe),im("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",pe,Dc))}}getRemainingTTL(e){return this.#u.has(e)?1/0:0}#L(){let e=new Di(this.#e),t=new Di(this.#e);this.#d=e,this.#E=t;let n=this.ttlAutopurge?Array.from({length:this.#e}):void 0;this.#_=n,this.#q=(a,l,c=this.#h.now())=>{t[a]=l!==0?c:0,e[a]=l,r(a,l)},this.#A=a=>{t[a]=e[a]!==0?this.#h.now():0,r(a,e[a])};let r=this.ttlAutopurge?(a,l)=>{if(n?.[a]&&(clearTimeout(n[a]),n[a]=void 0),l&&l!==0&&n){let c=setTimeout(()=>{this.#C(a)&&this.#B(this.#c[a],"expire")},l+1);c.unref&&c.unref(),n[a]=c}}:()=>{};this.#D=(a,l)=>{if(e[l]){let c=e[l],f=t[l];if(!c||!f)return;a.ttl=c,a.start=f,a.now=s||o();let h=a.now-f;a.remainingTTL=c-h}};let s=0,o=()=>{let a=this.#h.now();if(this.ttlResolution>0){s=a;let l=setTimeout(()=>s=0,this.ttlResolution);l.unref&&l.unref()}return a};this.getRemainingTTL=a=>{let l=this.#u.get(a);if(l===void 0)return 0;let c=e[l],f=t[l];if(!c||!f)return 1/0;let h=(s||o())-f;return c-h},this.#C=a=>{let l=t[a],c=e[a];return!!c&&!!l&&(s||o())-l>c}}#A=()=>{};#D=()=>{};#q=()=>{};#C=()=>!1;#U(){let e=new Di(this.#e);this.#f=0,this.#S=e,this.#N=t=>{this.#f-=e[t],e[t]=0},this.#H=(t,n,r,s)=>{if(!xt(r)){if(this.#l(n))return this.backgroundFetchSize;if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(r=s(n,t),!xt(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.")}return r},this.#T=(t,n,r)=>{if(e[t]=n,this.#i){let s=this.#i-e[t];for(;this.#f>s;)this.#V(!0)}this.#f+=e[t],r&&(r.entrySize=n,r.totalCalculatedSize=this.#f)}}#N=e=>{};#T=(e,t,n)=>{};#H=(e,t,n,r)=>{if(n||r)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#P({allowStale:e=this.allowStale}={}){if(this.#a)for(let t=this.#m;this.#W(t)&&((e||!this.#C(t))&&(yield t),t!==this.#p);)t=this.#v[t]}*#R({allowStale:e=this.allowStale}={}){if(this.#a)for(let t=this.#p;this.#W(t)&&((e||!this.#C(t))&&(yield t),t!==this.#m);)t=this.#b[t]}#W(e){return e!==void 0&&this.#u.get(this.#c[e])===e}*entries(){for(let e of this.#P())this.#s[e]!==void 0&&this.#c[e]!==void 0&&!this.#l(this.#s[e])&&(yield[this.#c[e],this.#s[e]])}*rentries(){for(let e of this.#R())this.#s[e]!==void 0&&this.#c[e]!==void 0&&!this.#l(this.#s[e])&&(yield[this.#c[e],this.#s[e]])}*keys(){for(let e of this.#P()){let t=this.#c[e];t!==void 0&&!this.#l(this.#s[e])&&(yield t)}}*rkeys(){for(let e of this.#R()){let t=this.#c[e];t!==void 0&&!this.#l(this.#s[e])&&(yield t)}}*values(){for(let e of this.#P())this.#s[e]!==void 0&&!this.#l(this.#s[e])&&(yield this.#s[e])}*rvalues(){for(let e of this.#R())this.#s[e]!==void 0&&!this.#l(this.#s[e])&&(yield this.#s[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let n of this.#P()){let r=this.#s[n],s=this.#l(r)?r.__staleWhileFetching:r;if(s!==void 0&&e(s,this.#c[n],this))return this.#$(this.#c[n],t)}}forEach(e,t=this){for(let n of this.#P()){let r=this.#s[n],s=this.#l(r)?r.__staleWhileFetching:r;s!==void 0&&e.call(t,s,this.#c[n],this)}}rforEach(e,t=this){for(let n of this.#R()){let r=this.#s[n],s=this.#l(r)?r.__staleWhileFetching:r;s!==void 0&&e.call(t,s,this.#c[n],this)}}purgeStale(){let e=!1;for(let t of this.#R({allowStale:!0}))this.#C(t)&&(this.#B(this.#c[t],"expire"),e=!0);return e}info(e){let t=this.#u.get(e);if(t===void 0)return;let n=this.#s[t],r=this.#l(n)?n.__staleWhileFetching:n;if(r===void 0)return;let s={value:r};if(this.#d&&this.#E){let o=this.#d[t],a=this.#E[t];if(o&&a){let l=o-(this.#h.now()-a);s.ttl=l,s.start=Date.now()}}return this.#S&&(s.size=this.#S[t]),s}dump(){let e=[];for(let t of this.#P({allowStale:!0})){let n=this.#c[t],r=this.#s[t],s=this.#l(r)?r.__staleWhileFetching:r;if(s===void 0||n===void 0)continue;let o={value:s};if(this.#d&&this.#E){o.ttl=this.#d[t];let a=this.#h.now()-this.#E[t];o.start=Math.floor(Date.now()-a)}this.#S&&(o.size=this.#S[t]),e.unshift([n,o])}return e}load(e){this.clear();for(let[t,n]of e){if(n.start){let r=Date.now()-n.start;n.start=this.#h.now()-r}this.#M(t,n.value,n)}}set(e,t,n={}){let{status:r=me.hasSubscribers?{}:void 0}=n;n.status=r,r&&(r.op="set",r.key=e,t!==void 0&&(r.value=t),r.cache=this);let s=this.#M(e,t,n);return r&&me.hasSubscribers&&me.publish(r),s}#M(e,t,n,r){let{ttl:s=this.ttl,start:o,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:l=this.sizeCalculation,status:c}=n,f=this.#l(t);if(t===void 0)return c&&(c.set="deleted"),this.delete(e),this;let{noUpdateTTL:h=this.noUpdateTTL}=n;c&&!f&&(c.value=t);let p=this.#H(e,t,n.size||0,l,c);if(this.maxEntrySize&&p>this.maxEntrySize)return this.#B(e,"set"),c&&(c.set="miss",c.maxEntrySizeExceeded=!0),this;let m=this.#a===0?void 0:this.#u.get(e);if(m===void 0)m=this.#a===0?this.#m:this.#k.length!==0?this.#k.pop():this.#a===this.#e?this.#V(!1):this.#a,this.#c[m]=e,this.#s[m]=t,this.#u.set(e,m),this.#b[this.#m]=m,this.#v[m]=this.#m,this.#m=m,this.#a++,this.#T(m,p,c),c&&(c.set="add"),h=!1,this.#I&&!f&&this.#t?.(t,e,"add");else{this.#Y(m);let _=this.#s[m];if(t!==_){if(!a)if(this.#l(_)){_!==r&&_.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:g}=_;g!==void 0&&g!==t&&(this.#w&&this.#r?.(g,e,"set"),this.#n&&this.#g?.push([g,e,"set"]))}else this.#w&&this.#r?.(_,e,"set"),this.#n&&this.#g?.push([_,e,"set"]);if(this.#N(m),this.#T(m,p,c),this.#s[m]=t,!f){let g=_&&this.#l(_)?_.__staleWhileFetching:_,C=g===void 0?"add":t!==g?"replace":"update";c&&(c.set=C,g!==void 0&&(c.oldValue=g)),this.#I&&this.onInsert?.(t,e,C)}}else f||(c&&(c.set="update"),this.#I&&this.onInsert?.(t,e,"update"))}if(s!==0&&!this.#d&&this.#L(),this.#d&&(h||this.#q(m,s,o),c&&this.#D(c,m)),!a&&this.#n&&this.#g){let _=this.#g,g;for(;g=_?.shift();)this.#o?.(...g)}return this}pop(){try{for(;this.#a;){let e=this.#s[this.#p];if(this.#V(!0),this.#l(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#n&&this.#g){let e=this.#g,t;for(;t=e?.shift();)this.#o?.(...t)}}}#V(e){let t=this.#p,n=this.#c[t],r=this.#s[t],s=this.#l(r);s&&r.__abortController.abort(new Error("evicted"));let o=s?r.__staleWhileFetching:r;return(this.#w||this.#n)&&o!==void 0&&(this.#w&&this.#r?.(o,n,"evict"),this.#n&&this.#g?.push([o,n,"evict"])),this.#N(t),this.#_?.[t]&&(clearTimeout(this.#_[t]),this.#_[t]=void 0),e&&(this.#c[t]=void 0,this.#s[t]=void 0,this.#k.push(t)),this.#a===1?(this.#p=this.#m=0,this.#k.length=0):this.#p=this.#b[t],this.#u.delete(n),this.#a--,t}has(e,t={}){let{status:n=me.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op="has",n.key=e,n.cache=this);let r=this.#J(e,t);return me.hasSubscribers&&me.publish(n),r}#J(e,t={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:r}=t,s=this.#u.get(e);if(s!==void 0){let o=this.#s[s];if(this.#l(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#C(s))r&&(r.has="stale",this.#D(r,s));else return n&&this.#A(s),r&&(r.has="hit",this.#D(r,s)),!0}else r&&(r.has="miss");return!1}peek(e,t={}){let{status:n=to()?{}:void 0}=t;n&&(n.op="peek",n.key=e,n.cache=this),t.status=n;let r=this.#z(e,t);return me.hasSubscribers&&me.publish(n),r}#z(e,t){let{status:n,allowStale:r=this.allowStale}=t,s=this.#u.get(e);if(s===void 0||!r&&this.#C(s)){n&&(n.peek=s===void 0?"miss":"stale");return}let o=this.#s[s],a=this.#l(o)?o.__staleWhileFetching:o;return n&&(a!==void 0?(n.peek="hit",n.value=a):n.peek="miss"),a}#F(e,t,n,r){let s=t===void 0?void 0:this.#s[t];if(this.#l(s))return s;let o=new AbortController,{signal:a}=n;a?.addEventListener("abort",()=>o.abort(a.reason),{signal:o.signal});let l={signal:o.signal,options:n,context:r},c=(g,C=!1)=>{let{aborted:b}=o.signal,x=n.ignoreFetchAbort&&g!==void 0,P=n.ignoreFetchAbort||!!(n.allowStaleOnFetchAbort&&g!==void 0);if(n.status&&(b&&!C?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,x&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),b&&!x&&!C)return h(o.signal.reason,P);let D=m,F=this.#s[t];return(F===m||F===void 0&&x&&C)&&(g===void 0?D.__staleWhileFetching!==void 0?this.#s[t]=D.__staleWhileFetching:this.#B(e,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.#M(e,g,l.options,D))),g},f=g=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=g),h(g,!1)),h=(g,C)=>{let{aborted:b}=o.signal,x=b&&n.allowStaleOnFetchAbort,P=x||n.allowStaleOnFetchRejection,D=P||n.noDeleteOnFetchRejection,F=m;if(this.#s[t]===m&&(!D||!C&&F.__staleWhileFetching===void 0?this.#B(e,"fetch"):x||(this.#s[t]=F.__staleWhileFetching)),P)return n.status&&F.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),F.__staleWhileFetching;if(F.__returned===F)throw g},p=(g,C)=>{let b=this.#x?.(e,s,l);o.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(g(void 0),n.allowStaleOnFetchAbort&&(g=x=>c(x,!0)))}),b&&b instanceof Promise?b.then(x=>g(x===void 0?void 0:x),C):b!==void 0&&g(b)};n.status&&(n.status.fetchDispatched=!0);let m=new Promise(p).then(c,f),_=Object.assign(m,{__abortController:o,__staleWhileFetching:s,__returned:void 0});return t===void 0?(this.#M(e,_,{...l.options,status:void 0}),t=this.#u.get(e)):this.#s[t]=_,_}#l(e){if(!this.#O)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof AbortController}fetch(e,t={}){let n=xn.hasSubscribers,{status:r=to()?{}:void 0}=t;t.status=r,r&&t.context&&(r.context=t.context);let s=this.#G(e,t);return r&&n&&(r.trace=!0,xn.tracePromise(()=>s,r).catch(()=>{})),s}async#G(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:l=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:h=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:p=this.allowStaleOnFetchRejection,ignoreFetchAbort:m=this.ignoreFetchAbort,allowStaleOnFetchAbort:_=this.allowStaleOnFetchAbort,context:g,forceRefresh:C=!1,status:b,signal:x}=t;if(b&&(b.op="fetch",b.key=e,C&&(b.forceRefresh=!0),b.cache=this),!this.#O)return b&&(b.fetch="get"),this.#$(e,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:s,status:b});let P={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:s,ttl:o,noDisposeOnSet:a,size:l,sizeCalculation:c,noUpdateTTL:f,noDeleteOnFetchRejection:h,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:_,ignoreFetchAbort:m,status:b,signal:x},D=this.#u.get(e);if(D===void 0){b&&(b.fetch="miss");let F=this.#F(e,D,P,g);return F.__returned=F}else{let F=this.#s[D];if(this.#l(F)){let oe=n&&F.__staleWhileFetching!==void 0;return b&&(b.fetch="inflight",oe&&(b.returnedStale=!0)),oe?F.__staleWhileFetching:F.__returned=F}let B=this.#C(D);if(!C&&!B)return b&&(b.fetch="hit"),this.#Y(D),r&&this.#A(D),b&&this.#D(b,D),F;let Y=this.#F(e,D,P,g),_e=Y.__staleWhileFetching!==void 0&&n;return b&&(b.fetch=B?"stale":"refresh",_e&&B&&(b.returnedStale=!0)),_e?Y.__staleWhileFetching:Y.__returned=Y}}forceFetch(e,t={}){let n=xn.hasSubscribers,{status:r=to()?{}:void 0}=t;t.status=r,r&&t.context&&(r.context=t.context);let s=this.#j(e,t);return r&&n&&(r.trace=!0,xn.tracePromise(()=>s,r).catch(()=>{})),s}async#j(e,t={}){let n=await this.#G(e,t);if(n===void 0)throw new Error("fetch() returned undefined");return n}memo(e,t={}){let{status:n=me.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op="memo",n.key=e,t.context&&(n.context=t.context),n.cache=this);let r=this.#X(e,t);return n&&(n.value=r),me.hasSubscribers&&me.publish(n),r}#X(e,t={}){let n=this.#y;if(!n)throw new Error("no memoMethod provided to constructor");let{context:r,status:s,forceRefresh:o,...a}=t;s&&o&&(s.forceRefresh=!0);let l=this.#$(e,a),c=o||l===void 0;if(s&&(s.memo=c?"miss":"hit",c||(s.value=l)),!c)return l;let f=n(e,l,{options:a,context:r});return s&&(s.value=f),this.#M(e,f,a),f}get(e,t={}){let{status:n=me.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op="get",n.key=e,n.cache=this);let r=this.#$(e,t);return n&&(r!==void 0&&(n.value=r),me.hasSubscribers&&me.publish(n)),r}#$(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:o}=t,a=this.#u.get(e);if(a===void 0){o&&(o.get="miss");return}let l=this.#s[a],c=this.#l(l);return o&&this.#D(o,a),this.#C(a)?c?(o&&(o.get="stale-fetching"),n&&l.__staleWhileFetching!==void 0?(o&&(o.returnedStale=!0),l.__staleWhileFetching):void 0):(s||this.#B(e,"expire"),o&&(o.get="stale"),n?(o&&(o.returnedStale=!0),l):void 0):(o&&(o.get=c?"fetching":"hit"),this.#Y(a),r&&this.#A(a),c?l.__staleWhileFetching:l)}#K(e,t){this.#v[t]=e,this.#b[e]=t}#Y(e){e!==this.#m&&(e===this.#p?this.#p=this.#b[e]:this.#K(this.#v[e],this.#b[e]),this.#K(this.#m,e),this.#m=e)}delete(e){return this.#B(e,"delete")}#B(e,t){me.hasSubscribers&&me.publish({op:"delete",delete:t,key:e,cache:this});let n=!1;if(this.#a!==0){let r=this.#u.get(e);if(r!==void 0)if(this.#_?.[r]&&(clearTimeout(this.#_?.[r]),this.#_[r]=void 0),n=!0,this.#a===1)this.#Q(t);else{this.#N(r);let s=this.#s[r];if(this.#l(s)?s.__abortController.abort(new Error("deleted")):(this.#w||this.#n)&&(this.#w&&this.#r?.(s,e,t),this.#n&&this.#g?.push([s,e,t])),this.#u.delete(e),this.#c[r]=void 0,this.#s[r]=void 0,r===this.#m)this.#m=this.#v[r];else if(r===this.#p)this.#p=this.#b[r];else{let o=this.#v[r];this.#b[o]=this.#b[r];let a=this.#b[r];this.#v[a]=this.#v[r]}this.#a--,this.#k.push(r)}}if(this.#n&&this.#g?.length){let r=this.#g,s;for(;s=r?.shift();)this.#o?.(...s)}return n}clear(){return this.#Q("delete")}#Q(e){for(let t of this.#R({allowStale:!0})){let n=this.#s[t];if(this.#l(n))n.__abortController.abort(new Error("deleted"));else{let r=this.#c[t];this.#w&&this.#r?.(n,r,e),this.#n&&this.#g?.push([n,r,e])}}if(this.#u.clear(),this.#s.fill(void 0),this.#c.fill(void 0),this.#d&&this.#E){this.#d.fill(0),this.#E.fill(0);for(let t of this.#_??[])t!==void 0&&clearTimeout(t);this.#_?.fill(void 0)}if(this.#S&&this.#S.fill(0),this.#p=0,this.#m=0,this.#k.length=0,this.#f=0,this.#a=0,this.#n&&this.#g){let t=this.#g,n;for(;n=t?.shift();)this.#o?.(...n)}}}});import{EventEmitter as lo}from"node:events";import qc from"node:stream";import{StringDecoder as om}from"node:string_decoder";var Nc,am,lm,cm,ut,ht,Et,Ti,kn,Ni,Mc,Mi,Fc,Ke,Ut,he,An,zt,fe,ke,de,no,Fi,we,se,io,ro,Bc,so,tt,oo,Bi,On,It,Te,Pn,um,hm,fm,dm,qi,ao,pm,mm,Ct,co=ue(()=>{Nc=typeof process=="object"&&process?process:{stdout:null,stderr:null},am=i=>!!i&&typeof i=="object"&&(i instanceof Ct||i instanceof qc||lm(i)||cm(i)),lm=i=>!!i&&typeof i=="object"&&i instanceof lo&&typeof i.pipe=="function"&&i.pipe!==qc.Writable.prototype.pipe,cm=i=>!!i&&typeof i=="object"&&i instanceof lo&&typeof i.write=="function"&&typeof i.end=="function",ut=Symbol("EOF"),ht=Symbol("maybeEmitEnd"),Et=Symbol("emittedEnd"),Ti=Symbol("emittingEnd"),kn=Symbol("emittedError"),Ni=Symbol("closed"),Mc=Symbol("read"),Mi=Symbol("flush"),Fc=Symbol("flushChunk"),Ke=Symbol("encoding"),Ut=Symbol("decoder"),he=Symbol("flowing"),An=Symbol("paused"),zt=Symbol("resume"),fe=Symbol("buffer"),ke=Symbol("pipes"),de=Symbol("bufferLength"),no=Symbol("bufferPush"),Fi=Symbol("bufferShift"),we=Symbol("objectMode"),se=Symbol("destroyed"),io=Symbol("error"),ro=Symbol("emitData"),Bc=Symbol("emitEnd"),so=Symbol("emitEnd2"),tt=Symbol("async"),oo=Symbol("abort"),Bi=Symbol("aborted"),On=Symbol("signal"),It=Symbol("dataListeners"),Te=Symbol("discarded"),Pn=i=>Promise.resolve().then(i),um=i=>i(),hm=i=>i==="end"||i==="finish"||i==="prefinish",fm=i=>i instanceof ArrayBuffer||!!i&&typeof i=="object"&&i.constructor&&i.constructor.name==="ArrayBuffer"&&i.byteLength>=0,dm=i=>!Buffer.isBuffer(i)&&ArrayBuffer.isView(i),qi=class{src;dest;opts;ondrain;constructor(e,t,n){this.src=e,this.dest=t,this.opts=n,this.ondrain=()=>e[zt](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},ao=class extends qi{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,n){super(e,t,n),this.proxyErrors=r=>this.dest.emit("error",r),e.on("error",this.proxyErrors)}},pm=i=>!!i.objectMode,mm=i=>!i.objectMode&&!!i.encoding&&i.encoding!=="buffer",Ct=class extends lo{[he]=!1;[An]=!1;[ke]=[];[fe]=[];[we];[Ke];[tt];[Ut];[ut]=!1;[Et]=!1;[Ti]=!1;[Ni]=!1;[kn]=null;[de]=0;[se]=!1;[On];[Bi]=!1;[It]=0;[Te]=!1;writable=!0;readable=!0;constructor(...e){let t=e[0]||{};if(super(),t.objectMode&&typeof t.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");pm(t)?(this[we]=!0,this[Ke]=null):mm(t)?(this[Ke]=t.encoding,this[we]=!1):(this[we]=!1,this[Ke]=null),this[tt]=!!t.async,this[Ut]=this[Ke]?new om(this[Ke]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[fe]}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[ke]});let{signal:n}=t;n&&(this[On]=n,n.aborted?this[oo]():n.addEventListener("abort",()=>this[oo]()))}get bufferLength(){return this[de]}get encoding(){return this[Ke]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[we]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[tt]}set async(e){this[tt]=this[tt]||!!e}[oo](){this[Bi]=!0,this.emit("abort",this[On]?.reason),this.destroy(this[On]?.reason)}get aborted(){return this[Bi]}set aborted(e){}write(e,t,n){if(this[Bi])return!1;if(this[ut])throw new Error("write after end");if(this[se])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof t=="function"&&(n=t,t="utf8"),t||(t="utf8");let r=this[tt]?Pn:um;if(!this[we]&&!Buffer.isBuffer(e)){if(dm(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(fm(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[we]?(this[he]&&this[de]!==0&&this[Mi](!0),this[he]?this.emit("data",e):this[no](e),this[de]!==0&&this.emit("readable"),n&&r(n),this[he]):e.length?(typeof e=="string"&&!(t===this[Ke]&&!this[Ut]?.lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[Ke]&&(e=this[Ut].write(e)),this[he]&&this[de]!==0&&this[Mi](!0),this[he]?this.emit("data",e):this[no](e),this[de]!==0&&this.emit("readable"),n&&r(n),this[he]):(this[de]!==0&&this.emit("readable"),n&&r(n),this[he])}read(e){if(this[se])return null;if(this[Te]=!1,this[de]===0||e===0||e&&e>this[de])return this[ht](),null;this[we]&&(e=null),this[fe].length>1&&!this[we]&&(this[fe]=[this[Ke]?this[fe].join(""):Buffer.concat(this[fe],this[de])]);let t=this[Mc](e||null,this[fe][0]);return this[ht](),t}[Mc](e,t){if(this[we])this[Fi]();else{let n=t;e===n.length||e===null?this[Fi]():typeof n=="string"?(this[fe][0]=n.slice(e),t=n.slice(0,e),this[de]-=e):(this[fe][0]=n.subarray(e),t=n.subarray(0,e),this[de]-=e)}return this.emit("data",t),!this[fe].length&&!this[ut]&&this.emit("drain"),t}end(e,t,n){return typeof e=="function"&&(n=e,e=void 0),typeof t=="function"&&(n=t,t="utf8"),e!==void 0&&this.write(e,t),n&&this.once("end",n),this[ut]=!0,this.writable=!1,(this[he]||!this[An])&&this[ht](),this}[zt](){this[se]||(!this[It]&&!this[ke].length&&(this[Te]=!0),this[An]=!1,this[he]=!0,this.emit("resume"),this[fe].length?this[Mi]():this[ut]?this[ht]():this.emit("drain"))}resume(){return this[zt]()}pause(){this[he]=!1,this[An]=!0,this[Te]=!1}get destroyed(){return this[se]}get flowing(){return this[he]}get paused(){return this[An]}[no](e){this[we]?this[de]+=1:this[de]+=e.length,this[fe].push(e)}[Fi](){return this[we]?this[de]-=1:this[de]-=this[fe][0].length,this[fe].shift()}[Mi](e=!1){do;while(this[Fc](this[Fi]())&&this[fe].length);!e&&!this[fe].length&&!this[ut]&&this.emit("drain")}[Fc](e){return this.emit("data",e),this[he]}pipe(e,t){if(this[se])return e;this[Te]=!1;let n=this[Et];return t=t||{},e===Nc.stdout||e===Nc.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,n?t.end&&e.end():(this[ke].push(t.proxyErrors?new ao(this,e,t):new qi(this,e,t)),this[tt]?Pn(()=>this[zt]()):this[zt]()),e}unpipe(e){let t=this[ke].find(n=>n.dest===e);t&&(this[ke].length===1?(this[he]&&this[It]===0&&(this[he]=!1),this[ke]=[]):this[ke].splice(this[ke].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let n=super.on(e,t);if(e==="data")this[Te]=!1,this[It]++,!this[ke].length&&!this[he]&&this[zt]();else if(e==="readable"&&this[de]!==0)super.emit("readable");else if(hm(e)&&this[Et])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[kn]){let r=t;this[tt]?Pn(()=>r.call(this,this[kn])):r.call(this,this[kn])}return n}removeListener(e,t){return this.off(e,t)}off(e,t){let n=super.off(e,t);return e==="data"&&(this[It]=this.listeners("data").length,this[It]===0&&!this[Te]&&!this[ke].length&&(this[he]=!1)),n}removeAllListeners(e){let t=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[It]=0,!this[Te]&&!this[ke].length&&(this[he]=!1)),t}get emittedEnd(){return this[Et]}[ht](){!this[Ti]&&!this[Et]&&!this[se]&&this[fe].length===0&&this[ut]&&(this[Ti]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Ni]&&this.emit("close"),this[Ti]=!1)}emit(e,...t){let n=t[0];if(e!=="error"&&e!=="close"&&e!==se&&this[se])return!1;if(e==="data")return!this[we]&&!n?!1:this[tt]?(Pn(()=>this[ro](n)),!0):this[ro](n);if(e==="end")return this[Bc]();if(e==="close"){if(this[Ni]=!0,!this[Et]&&!this[se])return!1;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[kn]=n,super.emit(io,n);let s=!this[On]||this.listeners("error").length?super.emit("error",n):!1;return this[ht](),s}else if(e==="resume"){let s=super.emit("resume");return this[ht](),s}else if(e==="finish"||e==="prefinish"){let s=super.emit(e);return this.removeAllListeners(e),s}let r=super.emit(e,...t);return this[ht](),r}[ro](e){for(let n of this[ke])n.dest.write(e)===!1&&this.pause();let t=this[Te]?!1:super.emit("data",e);return this[ht](),t}[Bc](){return this[Et]?!1:(this[Et]=!0,this.readable=!1,this[tt]?(Pn(()=>this[so]()),!0):this[so]())}[so](){if(this[Ut]){let t=this[Ut].end();if(t){for(let n of this[ke])n.dest.write(t);this[Te]||super.emit("data",t)}}for(let t of this[ke])t.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[we]||(e.dataLength=0);let t=this.promise();return this.on("data",n=>{e.push(n),this[we]||(e.dataLength+=n.length)}),await t,e}async concat(){if(this[we])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Ke]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(se,()=>t(new Error("stream destroyed"))),this.on("error",n=>t(n)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[Te]=!1;let e=!1,t=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return t();let r=this.read();if(r!==null)return Promise.resolve({done:!1,value:r});if(this[ut])return t();let s,o,a=h=>{this.off("data",l),this.off("end",c),this.off(se,f),t(),o(h)},l=h=>{this.off("error",a),this.off("end",c),this.off(se,f),this.pause(),s({value:h,done:!!this[ut]})},c=()=>{this.off("error",a),this.off("data",l),this.off(se,f),t(),s({done:!0,value:void 0})},f=()=>a(new Error("stream destroyed"));return new Promise((h,p)=>{o=p,s=h,this.once(se,f),this.once("error",a),this.once("end",c),this.once("data",l)})},throw:t,return:t,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[Te]=!1;let e=!1,t=()=>(this.pause(),this.off(io,t),this.off(se,t),this.off("end",t),e=!0,{done:!0,value:void 0}),n=()=>{if(e)return t();let r=this.read();return r===null?t():{done:!1,value:r}};return this.once("end",t),this.once(io,t),this.once(se,t),{next:n,throw:t,return:t,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(e){if(this[se])return e?this.emit("error",e):this.emit(se),this;this[se]=!0,this[Te]=!0,this[fe].length=0,this[de]=0;let t=this;return typeof t.close=="function"&&!this[Ni]&&t.close(),e?this.emit("error",e):this.emit(se),this}static get isStream(){return am}}});import{posix as gm,win32 as fo}from"node:path";import{fileURLToPath as _m}from"node:url";import{lstatSync as ym,readdir as bm,readdirSync as wm,readlinkSync as vm,realpathSync as Sm}from"fs";import*as xm from"node:fs";import{lstat as Cm,readdir as km,readlink as Am,realpath as Om}from"node:fs/promises";var Em,In,Uc,zc,Pm,Rm,Ve,Gc,$c,nt,Yc,Jc,Lt,Kc,je,Rn,uo,Hc,Ln,Qe,Hi,ji,Wc,Im,ho,jc,Dn,Vc,Wi,Vi,po,Qc,ve,Ui,zi,Gi,Gt,$t,Tn,S2,Xc,Zc=ue(()=>{Tc();co();Em=Sm.native,In={lstatSync:ym,readdir:bm,readdirSync:wm,readlinkSync:vm,realpathSync:Em,promises:{lstat:Cm,readdir:km,readlink:Am,realpath:Om}},Uc=i=>!i||i===In||i===xm?In:{...In,...i,promises:{...In.promises,...i.promises||{}}},zc=/^\\\\\?\\([a-z]:)\\?$/i,Pm=i=>i.replace(/\//g,"\\").replace(zc,"$1\\"),Rm=/[\\\/]/,Ve=0,Gc=1,$c=2,nt=4,Yc=6,Jc=8,Lt=10,Kc=12,je=15,Rn=~je,uo=16,Hc=32,Ln=64,Qe=128,Hi=256,ji=512,Wc=Ln|Qe|ji,Im=1023,ho=i=>i.isFile()?Jc:i.isDirectory()?nt:i.isSymbolicLink()?Lt:i.isCharacterDevice()?$c:i.isBlockDevice()?Yc:i.isSocket()?Kc:i.isFIFO()?Gc:Ve,jc=new Cn({max:2**12}),Dn=i=>{let e=jc.get(i);if(e)return e;let t=i.normalize("NFKD");return jc.set(i,t),t},Vc=new Cn({max:2**12}),Wi=i=>{let e=Vc.get(i);if(e)return e;let t=Dn(i.toLowerCase());return Vc.set(i,t),t},Vi=class extends Cn{constructor(){super({max:256})}},po=class extends Cn{constructor(e=16*1024){super({maxSize:e,sizeCalculation:t=>t.length+1})}},Qc=Symbol("PathScurry setAsCwd"),ve=class{name;root;roots;parent;nocase;isCWD=!1;#e;#i;get dev(){return this.#i}#r;get mode(){return this.#r}#t;get nlink(){return this.#t}#o;get uid(){return this.#o}#x;get gid(){return this.#x}#y;get rdev(){return this.#y}#h;get blksize(){return this.#h}#a;get ino(){return this.#a}#f;get size(){return this.#f}#u;get blocks(){return this.#u}#c;get atimeMs(){return this.#c}#s;get mtimeMs(){return this.#s}#b;get ctimeMs(){return this.#b}#v;get birthtimeMs(){return this.#v}#p;get atime(){return this.#p}#m;get mtime(){return this.#m}#k;get ctime(){return this.#k}#g;get birthtime(){return this.#g}#S;#E;#d;#_;#w;#O;#n;#I;#L;#A;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=Ve,n,r,s,o,a){this.name=e,this.#S=s?Wi(e):Dn(e),this.#n=t&Im,this.nocase=s,this.roots=r,this.root=n||this,this.#I=o,this.#d=a.fullpath,this.#w=a.relative,this.#O=a.relativePosix,this.parent=a.parent,this.parent?this.#e=this.parent.#e:this.#e=Uc(a.fs)}depth(){return this.#E!==void 0?this.#E:this.parent?this.#E=this.parent.depth()+1:this.#E=0}childrenCache(){return this.#I}resolve(e){if(!e)return this;let t=this.getRootString(e),r=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#D(r):this.#D(r)}#D(e){let t=this;for(let n of e)t=t.child(n);return t}children(){let e=this.#I.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#I.set(this,t),this.#n&=~uo,t}child(e,t){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let n=this.children(),r=this.nocase?Wi(e):Dn(e);for(let l of n)if(l.#S===r)return l;let s=this.parent?this.sep:"",o=this.#d?this.#d+s+e:void 0,a=this.newChild(e,Ve,{...t,parent:this,fullpath:o});return this.canReaddir()||(a.#n|=Qe),n.push(a),a}relative(){if(this.isCWD)return"";if(this.#w!==void 0)return this.#w;let e=this.name,t=this.parent;if(!t)return this.#w=this.name;let n=t.relative();return n+(!n||!t.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#O!==void 0)return this.#O;let e=this.name,t=this.parent;if(!t)return this.#O=this.fullpathPosix();let n=t.relativePosix();return n+(!n||!t.parent?"":"/")+e}fullpath(){if(this.#d!==void 0)return this.#d;let e=this.name,t=this.parent;if(!t)return this.#d=this.name;let r=t.fullpath()+(t.parent?this.sep:"")+e;return this.#d=r}fullpathPosix(){if(this.#_!==void 0)return this.#_;if(this.sep==="/")return this.#_=this.fullpath();if(!this.parent){let r=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(r)?this.#_=`//?/${r}`:this.#_=r}let e=this.parent,t=e.fullpathPosix(),n=t+(!t||!e.parent?"":"/")+this.name;return this.#_=n}isUnknown(){return(this.#n&je)===Ve}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#n&je)===Jc}isDirectory(){return(this.#n&je)===nt}isCharacterDevice(){return(this.#n&je)===$c}isBlockDevice(){return(this.#n&je)===Yc}isFIFO(){return(this.#n&je)===Gc}isSocket(){return(this.#n&je)===Kc}isSymbolicLink(){return(this.#n&Lt)===Lt}lstatCached(){return this.#n&Hc?this:void 0}readlinkCached(){return this.#L}realpathCached(){return this.#A}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#L)return!0;if(!this.parent)return!1;let e=this.#n&je;return!(e!==Ve&&e!==Lt||this.#n&Hi||this.#n&Qe)}calledReaddir(){return!!(this.#n&uo)}isENOENT(){return!!(this.#n&Qe)}isNamed(e){return this.nocase?this.#S===Wi(e):this.#S===Dn(e)}async readlink(){let e=this.#L;if(e)return e;if(this.canReadlink()&&this.parent)try{let t=await this.#e.promises.readlink(this.fullpath()),n=(await this.parent.realpath())?.resolve(t);if(n)return this.#L=n}catch(t){this.#R(t.code);return}}readlinkSync(){let e=this.#L;if(e)return e;if(this.canReadlink()&&this.parent)try{let t=this.#e.readlinkSync(this.fullpath()),n=this.parent.realpathSync()?.resolve(t);if(n)return this.#L=n}catch(t){this.#R(t.code);return}}#q(e){this.#n|=uo;for(let t=e.provisional;t<e.length;t++){let n=e[t];n&&n.#C()}}#C(){this.#n&Qe||(this.#n=(this.#n|Qe)&Rn,this.#U())}#U(){let e=this.children();e.provisional=0;for(let t of e)t.#C()}#N(){this.#n|=ji,this.#T()}#T(){if(this.#n&Ln)return;let e=this.#n;(e&je)===nt&&(e&=Rn),this.#n=e|Ln,this.#U()}#H(e=""){e==="ENOTDIR"||e==="EPERM"?this.#T():e==="ENOENT"?this.#C():this.children().provisional=0}#P(e=""){e==="ENOTDIR"?this.parent.#T():e==="ENOENT"&&this.#C()}#R(e=""){let t=this.#n;t|=Hi,e==="ENOENT"&&(t|=Qe),(e==="EINVAL"||e==="UNKNOWN")&&(t&=Rn),this.#n=t,e==="ENOTDIR"&&this.parent&&this.parent.#T()}#W(e,t){return this.#V(e,t)||this.#M(e,t)}#M(e,t){let n=ho(e),r=this.newChild(e.name,n,{parent:this}),s=r.#n&je;return s!==nt&&s!==Lt&&s!==Ve&&(r.#n|=Ln),t.unshift(r),t.provisional++,r}#V(e,t){for(let n=t.provisional;n<t.length;n++){let r=t[n];if((this.nocase?Wi(e.name):Dn(e.name))===r.#S)return this.#J(e,r,n,t)}}#J(e,t,n,r){let s=t.name;return t.#n=t.#n&Rn|ho(e),s!==e.name&&(t.name=e.name),n!==r.provisional&&(n===r.length-1?r.pop():r.splice(n,1),r.unshift(t)),r.provisional++,t}async lstat(){if((this.#n&Qe)===0)try{return this.#z(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#P(e.code)}}lstatSync(){if((this.#n&Qe)===0)try{return this.#z(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#P(e.code)}}#z(e){let{atime:t,atimeMs:n,birthtime:r,birthtimeMs:s,blksize:o,blocks:a,ctime:l,ctimeMs:c,dev:f,gid:h,ino:p,mode:m,mtime:_,mtimeMs:g,nlink:C,rdev:b,size:x,uid:P}=e;this.#p=t,this.#c=n,this.#g=r,this.#v=s,this.#h=o,this.#u=a,this.#k=l,this.#b=c,this.#i=f,this.#x=h,this.#a=p,this.#r=m,this.#m=_,this.#s=g,this.#t=C,this.#y=b,this.#f=x,this.#o=P;let D=ho(e);this.#n=this.#n&Rn|D|Hc,D!==Ve&&D!==nt&&D!==Lt&&(this.#n|=Ln)}#F=[];#l=!1;#G(e){this.#l=!1;let t=this.#F.slice();this.#F.length=0,t.forEach(n=>n(null,e))}readdirCB(e,t=!1){if(!this.canReaddir()){t?e(null,[]):queueMicrotask(()=>e(null,[]));return}let n=this.children();if(this.calledReaddir()){let s=n.slice(0,n.provisional);t?e(null,s):queueMicrotask(()=>e(null,s));return}if(this.#F.push(e),this.#l)return;this.#l=!0;let r=this.fullpath();this.#e.readdir(r,{withFileTypes:!0},(s,o)=>{if(s)this.#H(s.code),n.provisional=0;else{for(let a of o)this.#W(a,n);this.#q(n)}this.#G(n.slice(0,n.provisional))})}#j;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();if(this.#j)await this.#j;else{let n=()=>{};this.#j=new Promise(r=>n=r);try{for(let r of await this.#e.promises.readdir(t,{withFileTypes:!0}))this.#W(r,e);this.#q(e)}catch(r){this.#H(r.code),e.provisional=0}this.#j=void 0,n()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();try{for(let n of this.#e.readdirSync(t,{withFileTypes:!0}))this.#W(n,e);this.#q(e)}catch(n){this.#H(n.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#n&Wc)return!1;let e=je&this.#n;return e===Ve||e===nt||e===Lt}shouldWalk(e,t){return(this.#n&nt)===nt&&!(this.#n&Wc)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#A)return this.#A;if(!((ji|Hi|Qe)&this.#n))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#A=this.resolve(e)}catch{this.#N()}}realpathSync(){if(this.#A)return this.#A;if(!((ji|Hi|Qe)&this.#n))try{let e=this.#e.realpathSync(this.fullpath());return this.#A=this.resolve(e)}catch{this.#N()}}[Qc](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=new Set([]),n=[],r=this;for(;r&&r.parent;)t.add(r),r.#w=n.join(this.sep),r.#O=n.join("/"),r=r.parent,n.push("..");for(r=e;r&&r.parent&&!t.has(r);)r.#w=void 0,r.#O=void 0,r=r.parent}},Ui=class i extends ve{sep="\\";splitSep=Rm;constructor(e,t=Ve,n,r,s,o,a){super(e,t,n,r,s,o,a)}newChild(e,t=Ve,n={}){return new i(e,t,this.root,this.roots,this.nocase,this.childrenCache(),n)}getRootString(e){return fo.parse(e).root}getRoot(e){if(e=Pm(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,n]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=n;return this.roots[e]=new Gt(e,this).root}sameRoot(e,t=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(zc,"$1\\"),e===t}},zi=class i extends ve{splitSep="/";sep="/";constructor(e,t=Ve,n,r,s,o,a){super(e,t,n,r,s,o,a)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,t=Ve,n={}){return new i(e,t,this.root,this.roots,this.nocase,this.childrenCache(),n)}},Gi=class{root;rootPath;roots;cwd;#e;#i;#r;nocase;#t;constructor(e=process.cwd(),t,n,{nocase:r,childrenCacheSize:s=16*1024,fs:o=In}={}){this.#t=Uc(o),(e instanceof URL||e.startsWith("file://"))&&(e=_m(e));let a=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(a),this.#e=new Vi,this.#i=new Vi,this.#r=new po(s);let l=a.substring(this.rootPath.length).split(n);if(l.length===1&&!l[0]&&l.pop(),r===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=r,this.root=this.newRoot(this.#t),this.roots[this.rootPath]=this.root;let c=this.root,f=l.length-1,h=t.sep,p=this.rootPath,m=!1;for(let _ of l){let g=f--;c=c.child(_,{relative:new Array(g).fill("..").join(h),relativePosix:new Array(g).fill("..").join("/"),fullpath:p+=(m?"":h)+_}),m=!0}this.cwd=c}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#r}resolve(...e){let t="";for(let s=e.length-1;s>=0;s--){let o=e[s];if(!(!o||o===".")&&(t=t?`${o}/${t}`:o,this.isAbsolute(o)))break}let n=this.#e.get(t);if(n!==void 0)return n;let r=this.cwd.resolve(t).fullpath();return this.#e.set(t,r),r}resolvePosix(...e){let t="";for(let s=e.length-1;s>=0;s--){let o=e[s];if(!(!o||o===".")&&(t=t?`${o}/${t}`:o,this.isAbsolute(o)))break}let n=this.#i.get(t);if(n!==void 0)return n;let r=this.cwd.resolve(t).fullpathPosix();return this.#i.set(t,r),r}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(t=e,e=this.cwd);let{withFileTypes:n}=t;if(e.canReaddir()){let r=await e.readdir();return n?r:r.map(s=>s.name)}else return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(t=e,e=this.cwd);let{withFileTypes:n=!0}=t;return e.canReaddir()?n?e.readdirSync():e.readdirSync().map(r=>r.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(t=e.withFileTypes,e=this.cwd);let n=await e.readlink();return t?n:n?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(t=e.withFileTypes,e=this.cwd);let n=e.readlinkSync();return t?n:n?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(t=e.withFileTypes,e=this.cwd);let n=await e.realpath();return t?n:n?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(t=e.withFileTypes,e=this.cwd);let n=e.realpathSync();return t?n:n?.fullpath()}async walk(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:s,walkFilter:o}=t,a=[];(!s||s(e))&&a.push(n?e:e.fullpath());let l=new Set,c=(h,p)=>{l.add(h),h.readdirCB((m,_)=>{if(m)return p(m);let g=_.length;if(!g)return p();let C=()=>{--g===0&&p()};for(let b of _)(!s||s(b))&&a.push(n?b:b.fullpath()),r&&b.isSymbolicLink()?b.realpath().then(x=>x?.isUnknown()?x.lstat():x).then(x=>x?.shouldWalk(l,o)?c(x,C):C()):b.shouldWalk(l,o)?c(b,C):C()},!0)},f=e;return new Promise((h,p)=>{c(f,m=>{if(m)return p(m);h(a)})})}walkSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:s,walkFilter:o}=t,a=[];(!s||s(e))&&a.push(n?e:e.fullpath());let l=new Set([e]);for(let c of l){let f=c.readdirSync();for(let h of f){(!s||s(h))&&a.push(n?h:h.fullpath());let p=h;if(h.isSymbolicLink()){if(!(r&&(p=h.realpathSync())))continue;p.isUnknown()&&p.lstatSync()}p.shouldWalk(l,o)&&l.add(p)}}return a}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:s,walkFilter:o}=t;(!s||s(e))&&(yield n?e:e.fullpath());let a=new Set([e]);for(let l of a){let c=l.readdirSync();for(let f of c){(!s||s(f))&&(yield n?f:f.fullpath());let h=f;if(f.isSymbolicLink()){if(!(r&&(h=f.realpathSync())))continue;h.isUnknown()&&h.lstatSync()}h.shouldWalk(a,o)&&a.add(h)}}}stream(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:s,walkFilter:o}=t,a=new Ct({objectMode:!0});(!s||s(e))&&a.write(n?e:e.fullpath());let l=new Set,c=[e],f=0,h=()=>{let p=!1;for(;!p;){let m=c.shift();if(!m){f===0&&a.end();return}f++,l.add(m);let _=(C,b,x=!1)=>{if(C)return a.emit("error",C);if(r&&!x){let P=[];for(let D of b)D.isSymbolicLink()&&P.push(D.realpath().then(F=>F?.isUnknown()?F.lstat():F));if(P.length){Promise.all(P).then(()=>_(null,b,!0));return}}for(let P of b)P&&(!s||s(P))&&(a.write(n?P:P.fullpath())||(p=!0));f--;for(let P of b){let D=P.realpathCached()||P;D.shouldWalk(l,o)&&c.push(D)}p&&!a.flowing?a.once("drain",h):g||h()},g=!0;m.readdirCB(_,!0),g=!1}};return h(),a}streamSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:s,walkFilter:o}=t,a=new Ct({objectMode:!0}),l=new Set;(!s||s(e))&&a.write(n?e:e.fullpath());let c=[e],f=0,h=()=>{let p=!1;for(;!p;){let m=c.shift();if(!m){f===0&&a.end();return}f++,l.add(m);let _=m.readdirSync();for(let g of _)(!s||s(g))&&(a.write(n?g:g.fullpath())||(p=!0));f--;for(let g of _){let C=g;if(g.isSymbolicLink()){if(!(r&&(C=g.realpathSync())))continue;C.isUnknown()&&C.lstatSync()}C.shouldWalk(l,o)&&c.push(C)}}p&&!a.flowing&&a.once("drain",h)};return h(),a}chdir(e=this.cwd){let t=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[Qc](t)}},Gt=class extends Gi{sep="\\";constructor(e=process.cwd(),t={}){let{nocase:n=!0}=t;super(e,fo,"\\",{...t,nocase:n}),this.nocase=n;for(let r=this.cwd;r;r=r.parent)r.nocase=this.nocase}parseRootPath(e){return fo.parse(e).root.toUpperCase()}newRoot(e){return new Ui(this.rootPath,nt,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},$t=class extends Gi{sep="/";constructor(e=process.cwd(),t={}){let{nocase:n=!1}=t;super(e,gm,"/",{...t,nocase:n}),this.nocase=n}parseRootPath(e){return"/"}newRoot(e){return new zi(this.rootPath,nt,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},Tn=class extends $t{constructor(e=process.cwd(),t={}){let{nocase:n=!0}=t;super(e,{...t,nocase:n})}},S2=process.platform==="win32"?Ui:zi,Xc=process.platform==="win32"?Gt:process.platform==="darwin"?Tn:$t});var Lm,Dm,Yt,mo=ue(()=>{St();Lm=i=>i.length>=1,Dm=i=>i.length>=1,Yt=class i{#e;#i;#r;length;#t;#o;#x;#y;#h;#a;#f=!0;constructor(e,t,n,r){if(!Lm(e))throw new TypeError("empty pattern list");if(!Dm(t))throw new TypeError("empty glob list");if(t.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,n<0||n>=this.length)throw new TypeError("index out of range");if(this.#e=e,this.#i=t,this.#r=n,this.#t=r,this.#r===0){if(this.isUNC()){let[s,o,a,l,...c]=this.#e,[f,h,p,m,..._]=this.#i;c[0]===""&&(c.shift(),_.shift());let g=[s,o,a,l,""].join("/"),C=[f,h,p,m,""].join("/");this.#e=[g,...c],this.#i=[C,..._],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[s,...o]=this.#e,[a,...l]=this.#i;o[0]===""&&(o.shift(),l.shift());let c=s+"/",f=a+"/";this.#e=[c,...o],this.#i=[f,...l],this.length=this.#e.length}}}pattern(){return this.#e[this.#r]}isString(){return typeof this.#e[this.#r]=="string"}isGlobstar(){return this.#e[this.#r]===re}isRegExp(){return this.#e[this.#r]instanceof RegExp}globString(){return this.#x=this.#x||(this.#r===0?this.isAbsolute()?this.#i[0]+this.#i.slice(1).join("/"):this.#i.join("/"):this.#i.slice(this.#r).join("/"))}hasMore(){return this.length>this.#r+1}rest(){return this.#o!==void 0?this.#o:this.hasMore()?(this.#o=new i(this.#e,this.#i,this.#r+1,this.#t),this.#o.#a=this.#a,this.#o.#h=this.#h,this.#o.#y=this.#y,this.#o):this.#o=null}isUNC(){let e=this.#e;return this.#h!==void 0?this.#h:this.#h=this.#t==="win32"&&this.#r===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#e;return this.#y!==void 0?this.#y:this.#y=this.#t==="win32"&&this.#r===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#e;return this.#a!==void 0?this.#a:this.#a=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#e[0];return typeof e=="string"&&this.isAbsolute()&&this.#r===0?e:""}checkFollowGlobstar(){return!(this.#r===0||!this.isGlobstar()||!this.#f)}markFollowGlobstar(){return this.#r===0||!this.isGlobstar()||!this.#f?!1:(this.#f=!1,!0)}}});var Tm,Dt,go=ue(()=>{St();mo();Tm=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Dt=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:n,noext:r,noglobstar:s,platform:o=Tm}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:t,nocase:n,noext:r,noglobstar:s,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let a of e)this.add(a)}add(e){let t=new De(e,this.mmopts);for(let n=0;n<t.set.length;n++){let r=t.set[n],s=t.globParts[n];if(!r||!s)throw new Error("invalid pattern object");for(;r[0]==="."&&s[0]===".";)r.shift(),s.shift();let o=new Yt(r,s,0,this.platform),a=new De(o.globString(),this.mmopts),l=s[s.length-1]==="**",c=o.isAbsolute();c?this.absolute.push(a):this.relative.push(a),l&&(c?this.absoluteChildren.push(a):this.relativeChildren.push(a))}}ignored(e){let t=e.fullpath(),n=`${t}/`,r=e.relative()||".",s=`${r}/`;for(let o of this.relative)if(o.match(r)||o.match(s))return!0;for(let o of this.absolute)if(o.match(t)||o.match(n))return!0;return!1}childrenIgnored(e){let t=e.fullpath()+"/",n=(e.relative()||".")+"/";for(let r of this.relativeChildren)if(r.match(n))return!0;for(let r of this.absoluteChildren)if(r.match(t))return!0;return!1}}});var _o,yo,bo,Nn,eu=ue(()=>{St();_o=class i{store;constructor(e=new Map){this.store=e}copy(){return new i(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){let n=e.fullpath(),r=this.store.get(n);r?r.add(t.globString()):this.store.set(n,new Set([t.globString()]))}},yo=class{store=new Map;add(e,t,n){let r=(t?2:0)|(n?1:0),s=this.store.get(e);this.store.set(e,s===void 0?r:r&s)}entries(){return[...this.store.entries()].map(([e,t])=>[e,!!(t&2),!!(t&1)])}},bo=class{store=new Map;add(e,t){if(!e.canReaddir())return;let n=this.store.get(e);n?n.find(r=>r.globString()===t.globString())||n.push(t):this.store.set(e,[t])}get(e){let t=this.store.get(e);if(!t)throw new Error("attempting to walk unknown path");return t}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},Nn=class i{hasWalkedCache;matches=new yo;subwalks=new bo;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new _o}processPatterns(e,t){this.patterns=t;let n=t.map(r=>[e,r]);for(let[r,s]of n){this.hasWalkedCache.storeWalked(r,s);let o=s.root(),a=s.isAbsolute()&&this.opts.absolute!==!1;if(o){r=r.resolve(o==="/"&&this.opts.root!==void 0?this.opts.root:o);let h=s.rest();if(h)s=h;else{this.matches.add(r,!0,!1);continue}}if(r.isENOENT())continue;let l,c,f=!1;for(;typeof(l=s.pattern())=="string"&&(c=s.rest());)r=r.resolve(l),s=c,f=!0;if(l=s.pattern(),c=s.rest(),f){if(this.hasWalkedCache.hasWalked(r,s))continue;this.hasWalkedCache.storeWalked(r,s)}if(typeof l=="string"){let h=l===".."||l===""||l===".";this.matches.add(r.resolve(l),a,h);continue}else if(l===re){(!r.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(r,s);let h=c?.pattern(),p=c?.rest();if(!c||(h===""||h===".")&&!p)this.matches.add(r,a,h===""||h===".");else if(h===".."){let m=r.parent||r;p?this.hasWalkedCache.hasWalked(m,p)||this.subwalks.add(m,p):this.matches.add(m,a,!0)}}else l instanceof RegExp&&this.subwalks.add(r,s)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new i(this.opts,this.hasWalkedCache)}filterEntries(e,t){let n=this.subwalks.get(e),r=this.child();for(let s of t)for(let o of n){let a=o.isAbsolute(),l=o.pattern(),c=o.rest();l===re?r.testGlobstar(s,o,c,a):l instanceof RegExp?r.testRegExp(s,l,c,a):r.testString(s,l,c,a)}return r}testGlobstar(e,t,n,r){if((this.dot||!e.name.startsWith("."))&&(t.hasMore()||this.matches.add(e,r,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(n&&t.checkFollowGlobstar()?this.subwalks.add(e,n):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),n){let s=n.pattern();if(typeof s=="string"&&s!==".."&&s!==""&&s!==".")this.testString(e,s,n.rest(),r);else if(s===".."){let o=e.parent||e;this.subwalks.add(o,n)}else s instanceof RegExp&&this.testRegExp(e,s,n.rest(),r)}}testRegExp(e,t,n,r){t.test(e.name)&&(n?this.subwalks.add(e,n):this.matches.add(e,r,!1))}testString(e,t,n,r){e.isNamed(t)&&(n?this.subwalks.add(e,n):this.matches.add(e,r,!1))}}});var Nm,$i,Mn,Fn,tu=ue(()=>{co();go();eu();Nm=(i,e)=>typeof i=="string"?new Dt([i],e):Array.isArray(i)?new Dt(i,e):i,$i=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#i;#r;signal;maxDepth;includeChildMatches;constructor(e,t,n){if(this.patterns=e,this.path=t,this.opts=n,this.#r=!n.posix&&n.platform==="win32"?"\\":"/",this.includeChildMatches=n.includeChildMatches!==!1,(n.ignore||!this.includeChildMatches)&&(this.#i=Nm(n.ignore??[],n),!this.includeChildMatches&&typeof this.#i.add!="function")){let r="cannot ignore child matches, ignore lacks add() method.";throw new Error(r)}this.maxDepth=n.maxDepth||1/0,n.signal&&(this.signal=n.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#t(e){return this.seen.has(e)||!!this.#i?.ignored?.(e)}#o(e){return!!this.#i?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||await e.realpath(),!n)return;e=n}let s=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let o=await s.realpath();o&&(o.isUnknown()||this.opts.stat)&&await o.lstat()}return this.matchCheckTest(s,t)}matchCheckTest(e,t){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#t(e)?e:void 0}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||e.realpathSync(),!n)return;e=n}let s=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let o=s.realpathSync();o&&(o?.isUnknown()||this.opts.stat)&&o.lstatSync()}return this.matchCheckTest(s,t)}matchFinish(e,t){if(this.#t(e))return;if(!this.includeChildMatches&&this.#i?.add){let s=`${e.relativePosix()}/**`;this.#i.add(s)}let n=this.opts.absolute===void 0?t:this.opts.absolute;this.seen.add(e);let r=this.opts.mark&&e.isDirectory()?this.#r:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(n){let s=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(s+r)}else{let s=this.opts.posix?e.relativePosix():e.relative(),o=this.opts.dotRelative&&!s.startsWith(".."+this.#r)?"."+this.#r:"";this.matchEmit(s?o+s+r:"."+r)}}async match(e,t,n){let r=await this.matchCheck(e,n);r&&this.matchFinish(r,t)}matchSync(e,t,n){let r=this.matchCheckSync(e,n);r&&this.matchFinish(r,t)}walkCB(e,t,n){this.signal?.aborted&&n(),this.walkCB2(e,t,new Nn(this.opts),n)}walkCB2(e,t,n,r){if(this.#o(e))return r();if(this.signal?.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2(e,t,n,r));return}n.processPatterns(e,t);let s=1,o=()=>{--s===0&&r()};for(let[a,l,c]of n.matches.entries())this.#t(a)||(s++,this.match(a,l,c).then(()=>o()));for(let a of n.subwalkTargets()){if(this.maxDepth!==1/0&&a.depth()>=this.maxDepth)continue;s++;let l=a.readdirCached();a.calledReaddir()?this.walkCB3(a,l,n,o):a.readdirCB((c,f)=>this.walkCB3(a,f,n,o),!0)}o()}walkCB3(e,t,n,r){n=n.filterEntries(e,t);let s=1,o=()=>{--s===0&&r()};for(let[a,l,c]of n.matches.entries())this.#t(a)||(s++,this.match(a,l,c).then(()=>o()));for(let[a,l]of n.subwalks.entries())s++,this.walkCB2(a,l,n.child(),o);o()}walkCBSync(e,t,n){this.signal?.aborted&&n(),this.walkCB2Sync(e,t,new Nn(this.opts),n)}walkCB2Sync(e,t,n,r){if(this.#o(e))return r();if(this.signal?.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2Sync(e,t,n,r));return}n.processPatterns(e,t);let s=1,o=()=>{--s===0&&r()};for(let[a,l,c]of n.matches.entries())this.#t(a)||this.matchSync(a,l,c);for(let a of n.subwalkTargets()){if(this.maxDepth!==1/0&&a.depth()>=this.maxDepth)continue;s++;let l=a.readdirSync();this.walkCB3Sync(a,l,n,o)}o()}walkCB3Sync(e,t,n,r){n=n.filterEntries(e,t);let s=1,o=()=>{--s===0&&r()};for(let[a,l,c]of n.matches.entries())this.#t(a)||this.matchSync(a,l,c);for(let[a,l]of n.subwalks.entries())s++,this.walkCB2Sync(a,l,n.child(),o);o()}},Mn=class extends $i{matches=new Set;constructor(e,t,n){super(e,t,n)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,t)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?t(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},Fn=class extends $i{results;constructor(e,t,n){super(e,t,n),this.results=new Ct({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}}});import{fileURLToPath as Mm}from"node:url";var Fm,Ue,wo=ue(()=>{St();Zc();mo();tu();Fm=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Ue=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,t){if(!t)throw new TypeError("glob options required");if(this.withFileTypes=!!t.withFileTypes,this.signal=t.signal,this.follow=!!t.follow,this.dot=!!t.dot,this.dotRelative=!!t.dotRelative,this.nodir=!!t.nodir,this.mark=!!t.mark,t.cwd?(t.cwd instanceof URL||t.cwd.startsWith("file://"))&&(t.cwd=Mm(t.cwd)):this.cwd="",this.cwd=t.cwd||"",this.root=t.root,this.magicalBraces=!!t.magicalBraces,this.nobrace=!!t.nobrace,this.noext=!!t.noext,this.realpath=!!t.realpath,this.absolute=t.absolute,this.includeChildMatches=t.includeChildMatches!==!1,this.noglobstar=!!t.noglobstar,this.matchBase=!!t.matchBase,this.maxDepth=typeof t.maxDepth=="number"?t.maxDepth:1/0,this.stat=!!t.stat,this.ignore=t.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(l=>l.replace(/\\/g,"/"))),this.matchBase){if(t.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(l=>l.includes("/")?l:`./**/${l}`)}if(this.pattern=e,this.platform=t.platform||Fm,this.opts={...t,platform:this.platform},t.scurry){if(this.scurry=t.scurry,t.nocase!==void 0&&t.nocase!==t.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let l=t.platform==="win32"?Gt:t.platform==="darwin"?Tn:t.platform?$t:Xc;this.scurry=new l(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;let n=this.platform==="darwin"||this.platform==="win32",r={...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:n,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},s=this.pattern.map(l=>new De(l,r)),[o,a]=s.reduce((l,c)=>(l[0].push(...c.set),l[1].push(...c.globParts),l),[[],[]]);this.patterns=o.map((l,c)=>{let f=a[c];if(!f)throw new Error("invalid pattern object");return new Yt(l,f,0,this.platform)})}async walk(){return[...await new Mn(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new Mn(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new Fn(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new Fn(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}});var Yi,vo=ue(()=>{St();Yi=(i,e={})=>{Array.isArray(i)||(i=[i]);for(let t of i)if(new De(t,e).hasMagic())return!0;return!1}});var lu={};Sf(lu,{Glob:()=>Ue,Ignore:()=>Dt,escape:()=>Rt,glob:()=>ft,globIterate:()=>Eo,globIterateSync:()=>qn,globStream:()=>So,globStreamSync:()=>Bn,globSync:()=>xo,hasMagic:()=>Yi,iterate:()=>ou,iterateSync:()=>su,stream:()=>ru,streamSync:()=>iu,sync:()=>au,unescape:()=>He});function Bn(i,e={}){return new Ue(i,e).streamSync()}function So(i,e={}){return new Ue(i,e).stream()}function xo(i,e={}){return new Ue(i,e).walkSync()}async function nu(i,e={}){return new Ue(i,e).walk()}function qn(i,e={}){return new Ue(i,e).iterateSync()}function Eo(i,e={}){return new Ue(i,e).iterate()}var iu,ru,su,ou,au,ft,Hn=ue(()=>{St();wo();vo();St();wo();vo();go();iu=Bn,ru=Object.assign(So,{sync:Bn}),su=qn,ou=Object.assign(Eo,{sync:qn}),au=Object.assign(xo,{stream:Bn,iterate:qn}),ft=Object.assign(nu,{glob:nu,globSync:xo,sync:au,globStream:So,stream:ru,globStreamSync:Bn,streamSync:iu,globIterate:Eo,iterate:ou,globIterateSync:qn,iterateSync:su,Glob:Ue,hasMagic:Yi,escape:Rt,unescape:He});ft.glob=ft});var Ae=W(Ne=>{"use strict";Ne.__esModule=!0;Ne.extend=wu;Ne.indexOf=ig;Ne.escapeExpression=rg;Ne.isEmpty=sg;Ne.createFrame=og;Ne.blockParams=ag;Ne.appendContextPath=lg;var Zm={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},eg=/[&<>"'`=]/g,tg=/[&<>"'`=]/;function ng(i){return Zm[i]}function wu(i){for(var e=1;e<arguments.length;e++)for(var t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],t)&&(i[t]=arguments[e][t]);return i}var Io=Object.prototype.toString;Ne.toString=Io;var Ro=function(e){return typeof e=="function"};Ro(/x/)&&(Ne.isFunction=Ro=function(i){return typeof i=="function"&&Io.call(i)==="[object Function]"});Ne.isFunction=Ro;var vu=Array.isArray||function(i){return i&&typeof i=="object"?Io.call(i)==="[object Array]":!1};Ne.isArray=vu;function ig(i,e){for(var t=0,n=i.length;t<n;t++)if(i[t]===e)return t;return-1}function rg(i){if(typeof i!="string"){if(i&&i.toHTML)return i.toHTML();if(i==null)return"";if(!i)return i+"";i=""+i}return tg.test(i)?i.replace(eg,ng):i}function sg(i){return!i&&i!==0?!0:!!(vu(i)&&i.length===0)}function og(i){var e=wu({},i);return e._parent=i,e}function ag(i,e){return i.path=e,i}function lg(i,e){return(i?i+".":"")+e}});var Me=W((er,Su)=>{"use strict";er.__esModule=!0;var Lo=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function Do(i,e){var t=e&&e.loc,n=void 0,r=void 0,s=void 0,o=void 0;t&&(n=t.start.line,r=t.end.line,s=t.start.column,o=t.end.column,i+=" - "+n+":"+s);for(var a=Error.prototype.constructor.call(this,i),l=0;l<Lo.length;l++)this[Lo[l]]=a[Lo[l]];Error.captureStackTrace&&Error.captureStackTrace(this,Do);try{t&&(this.lineNumber=n,this.endLineNumber=r,Object.defineProperty?(Object.defineProperty(this,"column",{value:s,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:o,enumerable:!0})):(this.column=s,this.endColumn=o))}catch{}}Do.prototype=new Error;er.default=Do;Su.exports=er.default});var Eu=W((tr,xu)=>{"use strict";tr.__esModule=!0;var To=Ae();tr.default=function(i){i.registerHelper("blockHelperMissing",function(e,t){var n=t.inverse,r=t.fn;if(e===!0)return r(this);if(e===!1||e==null)return n(this);if(To.isArray(e))return e.length>0?(t.ids&&(t.ids=[t.name]),i.helpers.each(e,t)):n(this);if(t.data&&t.ids){var s=To.createFrame(t.data);s.contextPath=To.appendContextPath(t.data.contextPath,t.name),t={data:s}}return r(e,t)})};xu.exports=tr.default});var ku=W((nr,Cu)=>{"use strict";nr.__esModule=!0;function cg(i){return i&&i.__esModule?i:{default:i}}var Vn=Ae(),ug=Me(),hg=cg(ug);nr.default=function(i){i.registerHelper("each",function(e,t){if(!t)throw new hg.default("Must pass iterator to #each");var n=t.fn,r=t.inverse,s=0,o="",a=void 0,l=void 0;t.data&&t.ids&&(l=Vn.appendContextPath(t.data.contextPath,t.ids[0])+"."),Vn.isFunction(e)&&(e=e.call(this)),t.data&&(a=Vn.createFrame(t.data));function c(_,g,C){a&&(a.key=_,a.index=g,a.first=g===0,a.last=!!C,l&&(a.contextPath=l+_)),o=o+n(e[_],{data:a,blockParams:Vn.blockParams([e[_],_],[l+_,null])})}if(e&&typeof e=="object")if(Vn.isArray(e))for(var f=e.length;s<f;s++)s in e&&c(s,s,s===e.length-1);else if(typeof Symbol=="function"&&e[Symbol.iterator]){for(var h=[],p=e[Symbol.iterator](),m=p.next();!m.done;m=p.next())h.push(m.value);e=h;for(var f=e.length;s<f;s++)c(s,s,s===e.length-1)}else(function(){var _=void 0;Object.keys(e).forEach(function(g){_!==void 0&&c(_,s-1),_=g,s++}),_!==void 0&&c(_,s-1,!0)})();return s===0&&(o=r(this)),o})};Cu.exports=nr.default});var Ou=W((ir,Au)=>{"use strict";ir.__esModule=!0;function fg(i){return i&&i.__esModule?i:{default:i}}var dg=Me(),pg=fg(dg);ir.default=function(i){i.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new pg.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};Au.exports=ir.default});var Lu=W((rr,Iu)=>{"use strict";rr.__esModule=!0;function mg(i){return i&&i.__esModule?i:{default:i}}var Pu=Ae(),gg=Me(),Ru=mg(gg);rr.default=function(i){i.registerHelper("if",function(e,t){if(arguments.length!=2)throw new Ru.default("#if requires exactly one argument");return Pu.isFunction(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||Pu.isEmpty(e)?t.inverse(this):t.fn(this)}),i.registerHelper("unless",function(e,t){if(arguments.length!=2)throw new Ru.default("#unless requires exactly one argument");return i.helpers.if.call(this,e,{fn:t.inverse,inverse:t.fn,hash:t.hash})})};Iu.exports=rr.default});var Tu=W((sr,Du)=>{"use strict";sr.__esModule=!0;sr.default=function(i){i.registerHelper("log",function(){for(var e=[void 0],t=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)e.push(arguments[n]);var r=1;t.hash.level!=null?r=t.hash.level:t.data&&t.data.level!=null&&(r=t.data.level),e[0]=r,i.log.apply(i,e)})};Du.exports=sr.default});var Mu=W((or,Nu)=>{"use strict";or.__esModule=!0;or.default=function(i){i.registerHelper("lookup",function(e,t,n){return e&&n.lookupProperty(e,t)})};Nu.exports=or.default});var Bu=W((ar,Fu)=>{"use strict";ar.__esModule=!0;function _g(i){return i&&i.__esModule?i:{default:i}}var Un=Ae(),yg=Me(),bg=_g(yg);ar.default=function(i){i.registerHelper("with",function(e,t){if(arguments.length!=2)throw new bg.default("#with requires exactly one argument");Un.isFunction(e)&&(e=e.call(this));var n=t.fn;if(Un.isEmpty(e))return t.inverse(this);var r=t.data;return t.data&&t.ids&&(r=Un.createFrame(t.data),r.contextPath=Un.appendContextPath(t.data.contextPath,t.ids[0])),n(e,{data:r,blockParams:Un.blockParams([e],[r&&r.contextPath])})})};Fu.exports=ar.default});var No=W(lr=>{"use strict";lr.__esModule=!0;lr.registerDefaultHelpers=Tg;lr.moveHelperToHooks=Ng;function Tt(i){return i&&i.__esModule?i:{default:i}}var wg=Eu(),vg=Tt(wg),Sg=ku(),xg=Tt(Sg),Eg=Ou(),Cg=Tt(Eg),kg=Lu(),Ag=Tt(kg),Og=Tu(),Pg=Tt(Og),Rg=Mu(),Ig=Tt(Rg),Lg=Bu(),Dg=Tt(Lg);function Tg(i){vg.default(i),xg.default(i),Cg.default(i),Ag.default(i),Pg.default(i),Ig.default(i),Dg.default(i)}function Ng(i,e,t){i.helpers[e]&&(i.hooks[e]=i.helpers[e],t||(i.helpers[e]=void 0))}});var Hu=W((cr,qu)=>{"use strict";cr.__esModule=!0;var Mg=Ae();cr.default=function(i){i.registerDecorator("inline",function(e,t,n,r){var s=e;return t.partials||(t.partials={},s=function(o,a){var l=n.partials;n.partials=Mg.extend({},l,t.partials);var c=e(o,a);return n.partials=l,c}),t.partials[r.args[0]]=r.fn,s})};qu.exports=cr.default});var Wu=W(Mo=>{"use strict";Mo.__esModule=!0;Mo.registerDefaultDecorators=Hg;function Fg(i){return i&&i.__esModule?i:{default:i}}var Bg=Hu(),qg=Fg(Bg);function Hg(i){qg.default(i)}});var Fo=W((ur,ju)=>{"use strict";ur.__esModule=!0;var Wg=Ae(),Jt={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if(typeof e=="string"){var t=Wg.indexOf(Jt.methodMap,e.toLowerCase());t>=0?e=t:e=parseInt(e,10)}return e},log:function(e){if(e=Jt.lookupLevel(e),typeof console<"u"&&Jt.lookupLevel(Jt.level)<=e){var t=Jt.methodMap[e];console[t]||(t="log");for(var n=arguments.length,r=Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];console[t].apply(console,r)}}};ur.default=Jt;ju.exports=ur.default});var Bo=W(zn=>{"use strict";zn.__esModule=!0;zn.createProtoAccessControl=zg;zn.resultIsAllowed=Gg;zn.resetLoggedProperties=Yg;function jg(i){return i&&i.__esModule?i:{default:i}}var Vu=Ae(),Vg=Fo(),Ug=jg(Vg),hr=Object.create(null);function zg(i){var e=Object.create(null);e.__proto__=!1,Vu.extend(e,i.allowedProtoProperties);var t=Object.create(null);return t.constructor=!1,t.__defineGetter__=!1,t.__defineSetter__=!1,t.__lookupGetter__=!1,t.__lookupSetter__=!1,Vu.extend(t,i.allowedProtoMethods),{properties:{whitelist:e,defaultValue:i.allowProtoPropertiesByDefault},methods:{whitelist:t,defaultValue:i.allowProtoMethodsByDefault}}}function Gg(i,e,t){return Uu(typeof i=="function"?e.methods:e.properties,t)}function Uu(i,e){return i.whitelist[e]!==void 0?i.whitelist[e]===!0:i.defaultValue!==void 0?i.defaultValue:($g(e),!1)}function $g(i){hr[i]!==!0&&(hr[i]=!0,Ug.default.log("error",'Handlebars: Access has been denied to resolve the property "'+i+`" because it is not an "own property" of its parent.
|
|
29
|
+
`)}),this}_outputHelpIfRequested(e){let t=this._getHelpOption();t&&e.find(r=>t.is(r))&&(this.outputHelp(),this._exit(0,"commander.helpDisplayed","(outputHelp)"))}};function zl(i){return i.map(e=>{if(!e.startsWith("--inspect"))return e;let t,n="127.0.0.1",r="9229",s;return(s=e.match(/^(--inspect(-brk)?)$/))!==null?t=s[1]:(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+)$/))!==null?(t=s[1],/^\d+$/.test(s[3])?r=s[3]:n=s[3]):(s=e.match(/^(--inspect(-brk|-port)?)=([^:]+):(\d+)$/))!==null&&(t=s[1],n=s[3],r=s[4]),t&&r!=="0"?`${t}=${n}:${parseInt(r)+1}`:e})}function Bs(){if(K.env.NO_COLOR||K.env.FORCE_COLOR==="0"||K.env.FORCE_COLOR==="false")return!1;if(K.env.FORCE_COLOR||K.env.CLICOLOR_FORCE!==void 0)return!0}qs.Command=Fs;qs.useColor=Bs});var Kl=W(qe=>{var{Argument:$l}=xi(),{Command:Hs}=Gl(),{CommanderError:qd,InvalidArgumentError:Yl}=yn(),{Help:Hd}=Rs(),{Option:Jl}=Ts();qe.program=new Hs;qe.createCommand=i=>new Hs(i);qe.createOption=(i,e)=>new Jl(i,e);qe.createArgument=(i,e)=>new $l(i,e);qe.Command=Hs;qe.Option=Jl;qe.Argument=$l;qe.Help=Hd;qe.CommanderError=qd;qe.InvalidArgumentError=Yl;qe.InvalidOptionArgumentError=Yl});var $s,ac,Yd,lc=ue(()=>{$s=(i,e,t)=>{let n=i instanceof RegExp?ac(i,t):i,r=e instanceof RegExp?ac(e,t):e,s=n!==null&&r!=null&&Yd(n,r,t);return s&&{start:s[0],end:s[1],pre:t.slice(0,s[0]),body:t.slice(s[0]+n.length,s[1]),post:t.slice(s[1]+r.length)}},ac=(i,e)=>{let t=e.match(i);return t?t[0]:null},Yd=(i,e,t)=>{let n,r,s,o,a,l=t.indexOf(i),c=t.indexOf(e,l+1),f=l;if(l>=0&&c>0){if(i===e)return[l,c];for(n=[],s=t.length;f>=0&&!a;){if(f===l)n.push(f),l=t.indexOf(i,f+1);else if(n.length===1){let h=n.pop();h!==void 0&&(a=[h,c])}else r=n.pop(),r!==void 0&&r<s&&(s=r,o=c),c=t.indexOf(e,f+1);f=l<c&&l>=0?l:c}n.length&&o!==void 0&&(a=[s,o])}return a}});function Ys(i){return isNaN(i)?i.charCodeAt(0):parseInt(i,10)}function ap(i){return i.replace(ep,cc).replace(tp,uc).replace(np,Ks).replace(ip,hc).replace(rp,fc)}function lp(i){return i.replace(Jd,"\\").replace(Kd,"{").replace(Qd,"}").replace(Xd,",").replace(Zd,".")}function dc(i){if(!i)return[""];let e=[],t=$s("{","}",i);if(!t)return i.split(",");let{pre:n,body:r,post:s}=t,o=n.split(",");o[o.length-1]+="{"+r+"}";let a=dc(s);return s.length&&(o[o.length-1]+=a.shift(),o.push.apply(o,a)),e.push.apply(e,o),e}function pc(i,e={}){if(!i)return[];let{max:t=sp,maxLength:n=op}=e;return i.slice(0,2)==="{}"&&(i="\\{\\}"+i.slice(2)),Js(ap(i),t,n,!0).map(lp)}function cp(i){return"{"+i+"}"}function up(i){return/^-?0\d/.test(i)}function hp(i,e){return i<=e}function fp(i,e){return i>=e}function wn(i,e,t,n,r,s){let o=[],a=0;for(let l=0;l<i.length;l++)for(let c=0;c<t.length;c++){if(o.length>=n)return o;let f=i[l]+e+t[c];if(!(s&&!f)){if(a+f.length>r)return o;o.push(f),a+=f.length}}return o}function dp(i,e,t,n){let r=i.split(/\.\./),s=[];if(r[0]===void 0||r[1]===void 0)return s;let o=Ys(r[0]),a=Ys(r[1]),l=Math.max(r[0].length,r[1].length),c=r.length===3&&r[2]!==void 0?Math.max(Math.abs(Ys(r[2])),1):1,f=hp;a<o&&(c*=-1,f=fp);let p=r.some(up),m=0;for(let _=o;f(_,a)&&s.length<t;_+=c){let g;if(e)g=String.fromCharCode(_),g==="\\"&&(g="");else if(g=String(_),p){let C=l-g.length;if(C>0){let b=new Array(C+1).join("0");_<0?g="-"+b+g.slice(1):g=b+g}}if(m+g.length>n)break;s.push(g),m+=g.length}return s}function Js(i,e,t,n){let r=[""],s=!1,o=!0;for(;;){let a=$s("{","}",i);if(!a)return wn(r,i,[""],e,t,s);let l=a.pre;if(/\$$/.test(l)){if(r=wn(r,l+"{"+a.body+"}",[""],e,t,s&&!a.post.length),o=!1,!a.post.length)break;i=a.post;continue}let c=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(a.body),f=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(a.body),h=c||f,p=a.body.indexOf(",")>=0;if(!h&&!p){if(a.post.match(/,(?!,).*\}/)){i=a.pre+"{"+a.body+Ks+a.post,n=!0;continue}return wn(r,l+"{"+a.body+"}"+a.post,[""],e,t,s)}o&&(s=n&&!h,o=!1);let m;if(h)m=dp(a.body,f,e,t);else{let _=dc(a.body);if(_.length===1&&_[0]!==void 0&&(_=Js(_[0],e,t,!1).map(cp),_.length===1)){if(r=wn(r,l+_[0],[""],e,t,s&&!a.post.length),!a.post.length)break;i=a.post;continue}let g=s&&!a.post.length&&!l;for(let b=0;g&&b<r.length;b++)r[b]&&(g=!1);m=[];let C=0;e:for(let b=0;b<_.length;b++){let x=Js(_[b],e,t,!1);for(let P=0;P<x.length;P++){let D=x[P];if(!(g&&!D)){if(m.length>=e||C+D.length>t)break e;m.push(D),C+=D.length}}}}if(r=wn(r,l,m,e,t,s&&!a.post.length),!a.post.length)break;i=a.post}return r}var cc,uc,Ks,hc,fc,Jd,Kd,Qd,Xd,Zd,ep,tp,np,ip,rp,sp,op,mc=ue(()=>{lc();cc="\0SLASH"+Math.random()+"\0",uc="\0OPEN"+Math.random()+"\0",Ks="\0CLOSE"+Math.random()+"\0",hc="\0COMMA"+Math.random()+"\0",fc="\0PERIOD"+Math.random()+"\0",Jd=new RegExp(cc,"g"),Kd=new RegExp(uc,"g"),Qd=new RegExp(Ks,"g"),Xd=new RegExp(hc,"g"),Zd=new RegExp(fc,"g"),ep=/\\\\/g,tp=/\\{/g,np=/\\}/g,ip=/\\,/g,rp=/\\\./g,sp=1e5,op=4e6});var vn,gc=ue(()=>{vn=i=>{if(typeof i!="string")throw new TypeError("invalid pattern");if(i.length>65536)throw new TypeError("pattern is too long")}});var pp,Sn,mp,_c,yc,bc=ue(()=>{pp={"[:alnum:]":["\\p{L}\\p{Nl}\\p{Nd}",!0],"[:alpha:]":["\\p{L}\\p{Nl}",!0],"[:ascii:]":["\\x00-\\x7f",!1],"[:blank:]":["\\p{Zs}\\t",!0],"[:cntrl:]":["\\p{Cc}",!0],"[:digit:]":["\\p{Nd}",!0],"[:graph:]":["\\p{Z}\\p{C}",!0,!0],"[:lower:]":["\\p{Ll}",!0],"[:print:]":["\\p{C}",!0],"[:punct:]":["\\p{P}",!0],"[:space:]":["\\p{Z}\\t\\r\\n\\v\\f",!0],"[:upper:]":["\\p{Lu}",!0],"[:word:]":["\\p{L}\\p{Nl}\\p{Nd}\\p{Pc}",!0],"[:xdigit:]":["A-Fa-f0-9",!1]},Sn=i=>i.replace(/[[\]\\-]/g,"\\$&"),mp=i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),_c=i=>i.join(""),yc=(i,e)=>{let t=e;if(i.charAt(t)!=="[")throw new Error("not in a brace expression");let n=[],r=[],s=t+1,o=!1,a=!1,l=!1,c=!1,f=t,h="";e:for(;s<i.length;){let g=i.charAt(s);if((g==="!"||g==="^")&&s===t+1){c=!0,s++;continue}if(g==="]"&&o&&!l){f=s+1;break}if(o=!0,g==="\\"&&!l){l=!0,s++;continue}if(g==="["&&!l){for(let[C,[b,x,P]]of Object.entries(pp))if(i.startsWith(C,s)){if(h)return["$.",!1,i.length-t,!0];s+=C.length,P?r.push(b):n.push(b),a=a||x;continue e}}if(l=!1,h){g>h?n.push(Sn(h)+"-"+Sn(g)):g===h&&n.push(Sn(g)),h="",s++;continue}if(i.startsWith("-]",s+1)){n.push(Sn(g+"-")),s+=2;continue}if(i.startsWith("-",s+1)){h=g,s+=2;continue}n.push(Sn(g)),s++}if(f<s)return["",!1,0,!1];if(!n.length&&!r.length)return["$.",!1,i.length-t,!0];if(r.length===0&&n.length===1&&/^\\?.$/.test(n[0])&&!c){let g=n[0].length===2?n[0].slice(-1):n[0];return[mp(g),!1,f-t,!1]}let p="["+(c?"^":"")+_c(n)+"]",m="["+(c?"":"^")+_c(r)+"]";return[n.length&&r.length?"("+p+"|"+m+")":n.length?p:m,a,f-t,!0]}});var He,Ii=ue(()=>{He=(i,{windowsPathsNoEscape:e=!1,magicalBraces:t=!0}={})=>t?e?i.replace(/\[([^/\\])\]/g,"$1"):i.replace(/((?!\\).|^)\[([^/\\])\]/g,"$1$2").replace(/\\([^/])/g,"$1"):e?i.replace(/\[([^/\\{}])\]/g,"$1"):i.replace(/((?!\\).|^)\[([^/\\{}])\]/g,"$1$2").replace(/\\([^/{}])/g,"$1")});var Re,gp,Qs,wc,_p,yp,bp,vc,wp,Li,vp,Sp,xp,Ep,Xs,Sc,xc,Cp,Pt,Zs=ue(()=>{bc();Ii();gp=new Set(["!","?","+","*","@"]),Qs=i=>gp.has(i),wc=i=>Qs(i.type),_p=new Map([["!",["@"]],["?",["?","@"]],["@",["@"]],["*",["*","+","?","@"]],["+",["+","@"]]]),yp=new Map([["!",["?"]],["@",["?"]],["+",["?","*"]]]),bp=new Map([["!",["?","@"]],["?",["?","@"]],["@",["?","@"]],["*",["*","+","?","@"]],["+",["+","@","?","*"]]]),vc=new Map([["!",new Map([["!","@"]])],["?",new Map([["*","*"],["+","*"]])],["@",new Map([["!","!"],["?","?"],["@","@"],["*","*"],["+","+"]])],["+",new Map([["?","*"],["*","*"]])]]),wp="(?!(?:^|/)\\.\\.?(?:$|/))",Li="(?!\\.)",vp=new Set(["[","."]),Sp=new Set(["..","."]),xp=new Set("().*{}+?[]^$\\!"),Ep=i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Xs="[^/]",Sc=Xs+"*?",xc=Xs+"+?",Cp=0,Pt=class{type;#e;#i;#r=!1;#t=[];#o;#x;#y;#h=!1;#a;#f;#u=!1;id=++Cp;get depth(){return(this.#o?.depth??-1)+1}[Symbol.for("nodejs.util.inspect.custom")](){return{"@@type":"AST",id:this.id,type:this.type,root:this.#e.id,parent:this.#o?.id,depth:this.depth,partsLength:this.#t.length,parts:this.#t}}constructor(e,t,n={}){this.type=e,e&&(this.#i=!0),this.#o=t,this.#e=this.#o?this.#o.#e:this,this.#a=this.#e===this?n:this.#e.#a,this.#y=this.#e===this?[]:this.#e.#y,e==="!"&&!this.#e.#h&&this.#y.push(this),this.#x=this.#o?this.#o.#t.length:0}get hasMagic(){if(this.#i!==void 0)return this.#i;for(let e of this.#t)if(typeof e!="string"&&(e.type||e.hasMagic))return this.#i=!0;return this.#i}toString(){return this.#f!==void 0?this.#f:this.type?this.#f=this.type+"("+this.#t.map(e=>String(e)).join("|")+")":this.#f=this.#t.map(e=>String(e)).join("")}#c(){if(this!==this.#e)throw new Error("should only call on root");if(this.#h)return this;this.toString(),this.#h=!0;let e;for(;e=this.#y.pop();){if(e.type!=="!")continue;let t=e,n=t.#o;for(;n;){for(let r=t.#x+1;!n.type&&r<n.#t.length;r++)for(let s of e.#t){if(typeof s=="string")throw new Error("string part in extglob AST??");s.copyIn(n.#t[r])}t=n,n=t.#o}}return this}push(...e){for(let t of e)if(t!==""){if(typeof t!="string"&&!(t instanceof Re&&t.#o===this))throw new Error("invalid part: "+t);this.#t.push(t)}}toJSON(){let e=this.type===null?this.#t.slice().map(t=>typeof t=="string"?t:t.toJSON()):[this.type,...this.#t.map(t=>t.toJSON())];return this.isStart()&&!this.type&&e.unshift([]),this.isEnd()&&(this===this.#e||this.#e.#h&&this.#o?.type==="!")&&e.push({}),e}isStart(){if(this.#e===this)return!0;if(!this.#o?.isStart())return!1;if(this.#x===0)return!0;let e=this.#o;for(let t=0;t<this.#x;t++){let n=e.#t[t];if(!(n instanceof Re&&n.type==="!"))return!1}return!0}isEnd(){if(this.#e===this||this.#o?.type==="!")return!0;if(!this.#o?.isEnd())return!1;if(!this.type)return this.#o?.isEnd();let e=this.#o?this.#o.#t.length:0;return this.#x===e-1}copyIn(e){typeof e=="string"?this.push(e):this.push(e.clone(this))}clone(e){let t=new Re(this.type,e);for(let n of this.#t)t.copyIn(n);return t}static#s(e,t,n,r,s){let o=r.maxExtglobRecursion??2,a=!1,l=!1,c=-1,f=!1;if(t.type===null){let g=n,C="";for(;g<e.length;){let b=e.charAt(g++);if(a||b==="\\"){a=!a,C+=b;continue}if(l){g===c+1?(b==="^"||b==="!")&&(f=!0):b==="]"&&!(g===c+2&&f)&&(l=!1),C+=b;continue}else if(b==="["){l=!0,c=g,f=!1,C+=b;continue}if(!r.noext&&Qs(b)&&e.charAt(g)==="("&&s<=o){t.push(C),C="";let P=new Re(b,t);g=Re.#s(e,P,g,r,s+1),t.push(P);continue}C+=b}return t.push(C),g}let h=n+1,p=new Re(null,t),m=[],_="";for(;h<e.length;){let g=e.charAt(h++);if(a||g==="\\"){a=!a,_+=g;continue}if(l){h===c+1?(g==="^"||g==="!")&&(f=!0):g==="]"&&!(h===c+2&&f)&&(l=!1),_+=g;continue}else if(g==="["){l=!0,c=h,f=!1,_+=g;continue}if(!r.noext&&Qs(g)&&e.charAt(h)==="("&&(s<=o||t&&t.#p(g))){let b=t&&t.#p(g)?0:1;p.push(_),_="";let x=new Re(g,p);p.push(x),h=Re.#s(e,x,h,r,s+b);continue}if(g==="|"){p.push(_),_="",m.push(p),p=new Re(null,t);continue}if(g===")")return _===""&&t.#t.length===0&&(t.#u=!0),p.push(_),_="",t.push(...m,p),h;_+=g}return t.type=null,t.#i=void 0,t.#t=[e.substring(n-1)],h}#b(e){return this.#v(e,yp)}#v(e,t=_p){if(!e||typeof e!="object"||e.type!==null||e.#t.length!==1||this.type===null)return!1;let n=e.#t[0];return!n||typeof n!="object"||n.type===null?!1:this.#p(n.type,t)}#p(e,t=bp){return!!t.get(this.type)?.includes(e)}#m(e,t){let n=e.#t[0],r=new Re(null,n,this.options);r.#t.push(""),n.push(r),this.#k(e,t)}#k(e,t){let n=e.#t[0];this.#t.splice(t,1,...n.#t);for(let r of n.#t)typeof r=="object"&&(r.#o=this);this.#f=void 0}#g(e){return!!vc.get(this.type)?.has(e)}#S(e){if(!e||typeof e!="object"||e.type!==null||e.#t.length!==1||this.type===null||this.#t.length!==1)return!1;let t=e.#t[0];return!t||typeof t!="object"||t.type===null?!1:this.#g(t.type)}#E(e){let t=vc.get(this.type),n=e.#t[0],r=t?.get(n.type);if(!r)return!1;this.#t=n.#t;for(let s of this.#t)typeof s=="object"&&(s.#o=this);this.type=r,this.#f=void 0,this.#u=!1}static fromGlob(e,t={}){let n=new Re(null,void 0,t);return Re.#s(e,n,0,t,0),n}toMMPattern(){if(this!==this.#e)return this.#e.toMMPattern();let e=this.toString(),[t,n,r,s]=this.toRegExpSource();if(!(r||this.#i||this.#a.nocase&&!this.#a.nocaseMagicOnly&&e.toUpperCase()!==e.toLowerCase()))return n;let a=(this.#a.nocase?"i":"")+(s?"u":"");return Object.assign(new RegExp(`^${t}$`,a),{_src:t,_glob:e})}get options(){return this.#a}toRegExpSource(e){let t=e??!!this.#a.dot;if(this.#e===this&&(this.#d(),this.#c()),!wc(this)){let l=this.isStart()&&this.isEnd()&&!this.#t.some(m=>typeof m!="string"),c=this.#t.map(m=>{let[_,g,C,b]=typeof m=="string"?Re.#w(m,this.#i,l):m.toRegExpSource(e);return this.#i=this.#i||C,this.#r=this.#r||b,_}).join(""),f="";if(this.isStart()&&typeof this.#t[0]=="string"&&!(this.#t.length===1&&Sp.has(this.#t[0]))){let _=vp,g=t&&_.has(c.charAt(0))||c.startsWith("\\.")&&_.has(c.charAt(2))||c.startsWith("\\.\\.")&&_.has(c.charAt(4)),C=!t&&!e&&_.has(c.charAt(0));f=g?wp:C?Li:""}let h="";return this.isEnd()&&this.#e.#h&&this.#o?.type==="!"&&(h="(?:$|\\/)"),[f+c+h,He(c),this.#i=!!this.#i,this.#r]}let n=this.type==="*"||this.type==="+",r=this.type==="!"?"(?:(?!(?:":"(?:",s=this.#_(t);if(this.isStart()&&this.isEnd()&&!s&&this.type!=="!"){let l=this.toString(),c=this;return c.#t=[l],c.type=null,c.#i=void 0,[l,He(this.toString()),!1,!1]}let o=!n||e||t||!Li?"":this.#_(!0);o===s&&(o=""),o&&(s=`(?:${s})(?:${o})*?`);let a="";if(this.type==="!"&&this.#u)a=(this.isStart()&&!t?Li:"")+xc;else{let l=this.type==="!"?"))"+(this.isStart()&&!t&&!e?Li:"")+Sc+")":this.type==="@"?")":this.type==="?"?")?":this.type==="+"&&o?")":this.type==="*"&&o?")?":`)${this.type}`;a=r+s+l}return[a,He(s),this.#i=!!this.#i,this.#r]}#d(){if(wc(this)){let e=0,t=!1;do{t=!0;for(let n=0;n<this.#t.length;n++){let r=this.#t[n];typeof r=="object"&&(r.#d(),this.#v(r)?(t=!1,this.#k(r,n)):this.#b(r)?(t=!1,this.#m(r,n)):this.#S(r)&&(t=!1,this.#E(r)))}}while(!t&&++e<10)}else for(let e of this.#t)typeof e=="object"&&e.#d();this.#f=void 0}#_(e){return this.#t.map(t=>{if(typeof t=="string")throw new Error("string type in extglob ast??");let[n,r,s,o]=t.toRegExpSource(e);return this.#r=this.#r||o,n}).filter(t=>!(this.isStart()&&this.isEnd())||!!t).join("|")}static#w(e,t,n=!1){let r=!1,s="",o=!1,a=!1;for(let l=0;l<e.length;l++){let c=e.charAt(l);if(r){r=!1,s+=(xp.has(c)?"\\":"")+c;continue}if(c==="*"){if(a)continue;a=!0,s+=n&&/^[*]+$/.test(e)?xc:Sc,t=!0;continue}else a=!1;if(c==="\\"){l===e.length-1?s+="\\\\":r=!0;continue}if(c==="["){let[f,h,p,m]=yc(e,l);if(p){s+=f,o=o||h,l+=p-1,t=t||m;continue}}if(c==="?"){s+=Xs,t=!0;continue}s+=Ep(c)}return[s,He(e),!!t,o]}};Re=Pt});var Rt,eo=ue(()=>{Rt=(i,{windowsPathsNoEscape:e=!1,magicalBraces:t=!1}={})=>t?e?i.replace(/[?*()[\]{}]/g,"[$&]"):i.replace(/[?*()[\]\\{}]/g,"\\$&"):e?i.replace(/[?*()[\]]/g,"[$&]"):i.replace(/[?*()[\]\\]/g,"\\$&")});var Ce,kp,Ap,Op,Pp,Rp,Ip,Lp,Dp,Tp,Np,Mp,Fp,Bp,qp,Hp,Wp,jp,Vp,kc,Ac,Oc,Ec,Up,re,zp,Gp,$p,Yp,Jp,We,Kp,Pc,Qp,Xp,Cc,Zp,De,St=ue(()=>{mc();gc();Zs();eo();Ii();Zs();eo();Ii();Ce=(i,e,t={})=>(vn(e),!t.nocomment&&e.charAt(0)==="#"?!1:new De(e,t).match(i)),kp=/^\*+([^+@!?*[(]*)$/,Ap=i=>e=>!e.startsWith(".")&&e.endsWith(i),Op=i=>e=>e.endsWith(i),Pp=i=>(i=i.toLowerCase(),e=>!e.startsWith(".")&&e.toLowerCase().endsWith(i)),Rp=i=>(i=i.toLowerCase(),e=>e.toLowerCase().endsWith(i)),Ip=/^\*+\.\*+$/,Lp=i=>!i.startsWith(".")&&i.includes("."),Dp=i=>i!=="."&&i!==".."&&i.includes("."),Tp=/^\.\*+$/,Np=i=>i!=="."&&i!==".."&&i.startsWith("."),Mp=/^\*+$/,Fp=i=>i.length!==0&&!i.startsWith("."),Bp=i=>i.length!==0&&i!=="."&&i!=="..",qp=/^\?+([^+@!?*[(]*)?$/,Hp=([i,e=""])=>{let t=kc([i]);return e?(e=e.toLowerCase(),n=>t(n)&&n.toLowerCase().endsWith(e)):t},Wp=([i,e=""])=>{let t=Ac([i]);return e?(e=e.toLowerCase(),n=>t(n)&&n.toLowerCase().endsWith(e)):t},jp=([i,e=""])=>{let t=Ac([i]);return e?n=>t(n)&&n.endsWith(e):t},Vp=([i,e=""])=>{let t=kc([i]);return e?n=>t(n)&&n.endsWith(e):t},kc=([i])=>{let e=i.length;return t=>t.length===e&&!t.startsWith(".")},Ac=([i])=>{let e=i.length;return t=>t.length===e&&t!=="."&&t!==".."},Oc=typeof process=="object"&&process?typeof process.env=="object"&&process.env&&process.env.__MINIMATCH_TESTING_PLATFORM__||process.platform:"posix",Ec={win32:{sep:"\\"},posix:{sep:"/"}},Up=Oc==="win32"?Ec.win32.sep:Ec.posix.sep;Ce.sep=Up;re=Symbol("globstar **");Ce.GLOBSTAR=re;zp="[^/]",Gp=zp+"*?",$p="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",Yp="(?:(?!(?:\\/|^)\\.).)*?",Jp=(i,e={})=>t=>Ce(t,i,e);Ce.filter=Jp;We=(i,e={})=>Object.assign({},i,e),Kp=i=>{if(!i||typeof i!="object"||!Object.keys(i).length)return Ce;let e=Ce;return Object.assign((n,r,s={})=>e(n,r,We(i,s)),{Minimatch:class extends e.Minimatch{constructor(r,s={}){super(r,We(i,s))}static defaults(r){return e.defaults(We(i,r)).Minimatch}},AST:class extends e.AST{constructor(r,s,o={}){super(r,s,We(i,o))}static fromGlob(r,s={}){return e.AST.fromGlob(r,We(i,s))}},unescape:(n,r={})=>e.unescape(n,We(i,r)),escape:(n,r={})=>e.escape(n,We(i,r)),filter:(n,r={})=>e.filter(n,We(i,r)),defaults:n=>e.defaults(We(i,n)),makeRe:(n,r={})=>e.makeRe(n,We(i,r)),braceExpand:(n,r={})=>e.braceExpand(n,We(i,r)),match:(n,r,s={})=>e.match(n,r,We(i,s)),sep:e.sep,GLOBSTAR:re})};Ce.defaults=Kp;Pc=(i,e={})=>(vn(i),e.nobrace||!/\{(?:(?!\{).)*\}/.test(i)?[i]:pc(i,{max:e.braceExpandMax}));Ce.braceExpand=Pc;Qp=(i,e={})=>new De(i,e).makeRe();Ce.makeRe=Qp;Xp=(i,e,t={})=>{let n=new De(e,t);return i=i.filter(r=>n.match(r)),n.options.nonull&&!i.length&&i.push(e),i};Ce.match=Xp;Cc=/[?*]|[+@!]\(.*?\)|\[|\]/,Zp=i=>i.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),De=class{options;set;pattern;windowsPathsNoEscape;nonegate;negate;comment;empty;preserveMultipleSlashes;partial;globSet;globParts;nocase;isWindows;platform;windowsNoMagicRoot;maxGlobstarRecursion;regexp;constructor(e,t={}){vn(e),t=t||{},this.options=t,this.maxGlobstarRecursion=t.maxGlobstarRecursion??200,this.pattern=e,this.platform=t.platform||Oc,this.isWindows=this.platform==="win32";let n="allowWindowsEscape";this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t[n]===!1,this.windowsPathsNoEscape&&(this.pattern=this.pattern.replace(/\\/g,"/")),this.preserveMultipleSlashes=!!t.preserveMultipleSlashes,this.regexp=null,this.negate=!1,this.nonegate=!!t.nonegate,this.comment=!1,this.empty=!1,this.partial=!!t.partial,this.nocase=!!this.options.nocase,this.windowsNoMagicRoot=t.windowsNoMagicRoot!==void 0?t.windowsNoMagicRoot:!!(this.isWindows&&this.nocase),this.globSet=[],this.globParts=[],this.set=[],this.make()}hasMagic(){if(this.options.magicalBraces&&this.set.length>1)return!0;for(let e of this.set)for(let t of e)if(typeof t!="string")return!0;return!1}debug(...e){}make(){let e=this.pattern,t=this.options;if(!t.nocomment&&e.charAt(0)==="#"){this.comment=!0;return}if(!e){this.empty=!0;return}this.parseNegate(),this.globSet=[...new Set(this.braceExpand())],t.debug&&(this.debug=(...s)=>console.error(...s)),this.debug(this.pattern,this.globSet);let n=this.globSet.map(s=>this.slashSplit(s));this.globParts=this.preprocess(n),this.debug(this.pattern,this.globParts);let r=this.globParts.map((s,o,a)=>{if(this.isWindows&&this.windowsNoMagicRoot){let l=s[0]===""&&s[1]===""&&(s[2]==="?"||!Cc.test(s[2]))&&!Cc.test(s[3]),c=/^[a-z]:/i.test(s[0]);if(l)return[...s.slice(0,4),...s.slice(4).map(f=>this.parse(f))];if(c)return[s[0],...s.slice(1).map(f=>this.parse(f))]}return s.map(l=>this.parse(l))});if(this.debug(this.pattern,r),this.set=r.filter(s=>s.indexOf(!1)===-1),this.isWindows)for(let s=0;s<this.set.length;s++){let o=this.set[s];o[0]===""&&o[1]===""&&this.globParts[s][2]==="?"&&typeof o[3]=="string"&&/^[a-z]:$/i.test(o[3])&&(o[2]="?")}this.debug(this.pattern,this.set)}preprocess(e){if(this.options.noglobstar)for(let n of e)for(let r=0;r<n.length;r++)n[r]==="**"&&(n[r]="*");let{optimizationLevel:t=1}=this.options;return t>=2?(e=this.firstPhasePreProcess(e),e=this.secondPhasePreProcess(e)):t>=1?e=this.levelOneOptimize(e):e=this.adjascentGlobstarOptimize(e),e}adjascentGlobstarOptimize(e){return e.map(t=>{let n=-1;for(;(n=t.indexOf("**",n+1))!==-1;){let r=n;for(;t[r+1]==="**";)r++;r!==n&&t.splice(n,r-n)}return t})}levelOneOptimize(e){return e.map(t=>(t=t.reduce((n,r)=>{let s=n[n.length-1];return r==="**"&&s==="**"?n:r===".."&&s&&s!==".."&&s!=="."&&s!=="**"?(n.pop(),n):(n.push(r),n)},[]),t.length===0?[""]:t))}levelTwoFileOptimize(e){Array.isArray(e)||(e=this.slashSplit(e));let t=!1;do{if(t=!1,!this.preserveMultipleSlashes){for(let r=1;r<e.length-1;r++){let s=e[r];r===1&&s===""&&e[0]===""||(s==="."||s==="")&&(t=!0,e.splice(r,1),r--)}e[0]==="."&&e.length===2&&(e[1]==="."||e[1]==="")&&(t=!0,e.pop())}let n=0;for(;(n=e.indexOf("..",n+1))!==-1;){let r=e[n-1];r&&r!=="."&&r!==".."&&r!=="**"&&!(this.isWindows&&/^[a-z]:$/i.test(r))&&(t=!0,e.splice(n-1,2),n-=2)}}while(t);return e.length===0?[""]:e}firstPhasePreProcess(e){let t=!1;do{t=!1;for(let n of e){let r=-1;for(;(r=n.indexOf("**",r+1))!==-1;){let o=r;for(;n[o+1]==="**";)o++;o>r&&n.splice(r+1,o-r);let a=n[r+1],l=n[r+2],c=n[r+3];if(a!==".."||!l||l==="."||l===".."||!c||c==="."||c==="..")continue;t=!0,n.splice(r,1);let f=n.slice(0);f[r]="**",e.push(f),r--}if(!this.preserveMultipleSlashes){for(let o=1;o<n.length-1;o++){let a=n[o];o===1&&a===""&&n[0]===""||(a==="."||a==="")&&(t=!0,n.splice(o,1),o--)}n[0]==="."&&n.length===2&&(n[1]==="."||n[1]==="")&&(t=!0,n.pop())}let s=0;for(;(s=n.indexOf("..",s+1))!==-1;){let o=n[s-1];if(o&&o!=="."&&o!==".."&&o!=="**"){t=!0;let l=s===1&&n[s+1]==="**"?["."]:[];n.splice(s-1,2,...l),n.length===0&&n.push(""),s-=2}}}}while(t);return e}secondPhasePreProcess(e){for(let t=0;t<e.length-1;t++)for(let n=t+1;n<e.length;n++){let r=this.partsMatch(e[t],e[n],!this.preserveMultipleSlashes);if(r){e[t]=[],e[n]=r;break}}return e.filter(t=>t.length)}partsMatch(e,t,n=!1){let r=0,s=0,o=[],a="";for(;r<e.length&&s<t.length;)if(e[r]===t[s])o.push(a==="b"?t[s]:e[r]),r++,s++;else if(n&&e[r]==="**"&&t[s]===e[r+1])o.push(e[r]),r++;else if(n&&t[s]==="**"&&e[r]===t[s+1])o.push(t[s]),s++;else if(e[r]==="*"&&t[s]&&(this.options.dot||!t[s].startsWith("."))&&t[s]!=="**"){if(a==="b")return!1;a="a",o.push(e[r]),r++,s++}else if(t[s]==="*"&&e[r]&&(this.options.dot||!e[r].startsWith("."))&&e[r]!=="**"){if(a==="a")return!1;a="b",o.push(t[s]),r++,s++}else return!1;return e.length===t.length&&o}parseNegate(){if(this.nonegate)return;let e=this.pattern,t=!1,n=0;for(let r=0;r<e.length&&e.charAt(r)==="!";r++)t=!t,n++;n&&(this.pattern=e.slice(n)),this.negate=t}matchOne(e,t,n=!1){let r=0,s=0;if(this.isWindows){let a=typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0]),l=!a&&e[0]===""&&e[1]===""&&e[2]==="?"&&/^[a-z]:$/i.test(e[3]),c=typeof t[0]=="string"&&/^[a-z]:$/i.test(t[0]),f=!c&&t[0]===""&&t[1]===""&&t[2]==="?"&&typeof t[3]=="string"&&/^[a-z]:$/i.test(t[3]),h=l?3:a?0:void 0,p=f?3:c?0:void 0;if(typeof h=="number"&&typeof p=="number"){let[m,_]=[e[h],t[p]];m.toLowerCase()===_.toLowerCase()&&(t[p]=m,s=p,r=h)}}let{optimizationLevel:o=1}=this.options;return o>=2&&(e=this.levelTwoFileOptimize(e)),t.includes(re)?this.#e(e,t,n,r,s):this.#r(e,t,n,r,s)}#e(e,t,n,r,s){let o=t.indexOf(re,s),a=t.lastIndexOf(re),[l,c,f]=n?[t.slice(s,o),t.slice(o+1),[]]:[t.slice(s,o),t.slice(o+1,a),t.slice(a+1)];if(l.length){let x=e.slice(r,r+l.length);if(!this.#r(x,l,n,0,0))return!1;r+=l.length,s+=l.length}let h=0;if(f.length){if(f.length+r>e.length)return!1;let x=e.length-f.length;if(this.#r(e,f,n,x,0))h=f.length;else{if(e[e.length-1]!==""||r+f.length===e.length||(x--,!this.#r(e,f,n,x,0)))return!1;h=f.length+1}}if(!c.length){let x=!!h;for(let P=r;P<e.length-h;P++){let D=String(e[P]);if(x=!0,D==="."||D===".."||!this.options.dot&&D.startsWith("."))return!1}return n||x}let p=[[[],0]],m=p[0],_=0,g=[0];for(let x of c)x===re?(g.push(_),m=[[],0],p.push(m)):(m[0].push(x),_++);let C=p.length-1,b=e.length-h;for(let x of p)x[1]=b-(g[C--]+x[0].length);return!!this.#i(e,p,r,0,n,0,!!h)}#i(e,t,n,r,s,o,a){let l=t[r];if(!l){for(let h=n;h<e.length;h++){a=!0;let p=e[h];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1}return a}let[c,f]=l;for(;n<=f;){if(this.#r(e.slice(0,n+c.length),c,s,n,0)&&o<this.maxGlobstarRecursion){let m=this.#i(e,t,n+c.length,r+1,s,o+1,a);if(m!==!1)return m}let p=e[n];if(p==="."||p===".."||!this.options.dot&&p.startsWith("."))return!1;n++}return s||null}#r(e,t,n,r,s){let o,a,l,c;for(o=r,a=s,c=e.length,l=t.length;o<c&&a<l;o++,a++){this.debug("matchOne loop");let f=t[a],h=e[o];if(this.debug(t,f,h),f===!1||f===re)return!1;let p;if(typeof f=="string"?(p=h===f,this.debug("string match",f,h,p)):(p=f.test(h),this.debug("pattern match",f,h,p)),!p)return!1}if(o===c&&a===l)return!0;if(o===c)return n;if(a===l)return o===c-1&&e[o]==="";throw new Error("wtf?")}braceExpand(){return Pc(this.pattern,this.options)}parse(e){vn(e);let t=this.options;if(e==="**")return re;if(e==="")return"";let n,r=null;(n=e.match(Mp))?r=t.dot?Bp:Fp:(n=e.match(kp))?r=(t.nocase?t.dot?Rp:Pp:t.dot?Op:Ap)(n[1]):(n=e.match(qp))?r=(t.nocase?t.dot?Wp:Hp:t.dot?jp:Vp)(n):(n=e.match(Ip))?r=t.dot?Dp:Lp:(n=e.match(Tp))&&(r=Np);let s=Pt.fromGlob(e,this.options).toMMPattern();return r&&typeof s=="object"&&Reflect.defineProperty(s,"test",{value:r}),s}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let e=this.set;if(!e.length)return this.regexp=!1,this.regexp;let t=this.options,n=t.noglobstar?Gp:t.dot?$p:Yp,r=new Set(t.nocase?["i"]:[]),s=e.map(l=>{let c=l.map(h=>{if(h instanceof RegExp)for(let p of h.flags.split(""))r.add(p);return typeof h=="string"?Zp(h):h===re?re:h._src});c.forEach((h,p)=>{let m=c[p+1],_=c[p-1];h!==re||_===re||(_===void 0?m!==void 0&&m!==re?c[p+1]="(?:\\/|"+n+"\\/)?"+m:c[p]=n:m===void 0?c[p-1]=_+"(?:\\/|\\/"+n+")?":m!==re&&(c[p-1]=_+"(?:\\/|\\/"+n+"\\/)"+m,c[p+1]=re))});let f=c.filter(h=>h!==re);if(this.partial&&f.length>=1){let h=[];for(let p=1;p<=f.length;p++)h.push(f.slice(0,p).join("/"));return"(?:"+h.join("|")+")"}return f.join("/")}).join("|"),[o,a]=e.length>1?["(?:",")"]:["",""];s="^"+o+s+a+"$",this.partial&&(s="^(?:\\/|"+o+s.slice(1,-1)+a+")$"),this.negate&&(s="^(?!"+s+").+$");try{this.regexp=new RegExp(s,[...r].join(""))}catch{this.regexp=!1}return this.regexp}slashSplit(e){return this.preserveMultipleSlashes?e.split("/"):this.isWindows&&/^\/\/[^/]+/.test(e)?["",...e.split(/\/+/)]:e.split(/\/+/)}match(e,t=this.partial){if(this.debug("match",e,this.pattern),this.comment)return!1;if(this.empty)return e==="";if(e==="/"&&t)return!0;let n=this.options;this.isWindows&&(e=e.split("\\").join("/"));let r=this.slashSplit(e);this.debug(this.pattern,"split",r);let s=this.set;this.debug(this.pattern,"set",s);let o=r[r.length-1];if(!o)for(let a=r.length-2;!o&&a>=0;a--)o=r[a];for(let a of s){let l=r;if(n.matchBase&&a.length===1&&(l=[o]),this.matchOne(l,a,t))return n.flipNegate?!0:!this.negate}return n.flipNegate?!1:this.negate}static defaults(e){return Ce.defaults(e).Minimatch}};Ce.AST=Pt;Ce.Minimatch=De;Ce.escape=Rt;Ce.unescape=He});import{tracingChannel as em,channel as tm}from"node:diagnostics_channel";var me,xn,nm,to,Ic,Rc,im,rm,xt,Lc,Di,sm,Cn,Tc=ue(()=>{me=tm("lru-cache:metrics"),xn=em("lru-cache"),nm=typeof performance=="object"&&performance&&typeof performance.now=="function"?performance:Date,to=()=>me.hasSubscribers||xn.hasSubscribers,Ic=new Set,Rc=typeof process=="object"&&process?process:{},im=(i,e,t,n)=>{typeof Rc.emitWarning=="function"?Rc.emitWarning(i,e,t,n):console.error(`[${t}] ${e}: ${i}`)},rm=i=>!Ic.has(i),xt=i=>!!i&&i===Math.floor(i)&&i>0&&isFinite(i),Lc=i=>xt(i)?i<=Math.pow(2,8)?Uint8Array:i<=Math.pow(2,16)?Uint16Array:i<=Math.pow(2,32)?Uint32Array:i<=Number.MAX_SAFE_INTEGER?Di:null:null,Di=class extends Array{constructor(i){super(i),this.fill(0)}},sm=class En{heap;length;static#e=!1;static create(e){let t=Lc(e);if(!t)return[];En.#e=!0;let n=new En(e,t);return En.#e=!1,n}constructor(e,t){if(!En.#e)throw new TypeError("instantiate Stack using Stack.create(n)");this.heap=new t(e),this.length=0}push(e){this.heap[this.length++]=e}pop(){return this.heap[--this.length]}},Cn=class Dc{#e;#i;#r;#t;#o;#x;#y;#h;get perf(){return this.#h}ttl;ttlResolution;ttlAutopurge;updateAgeOnGet;updateAgeOnHas;allowStale;noDisposeOnSet;noUpdateTTL;maxEntrySize;sizeCalculation;noDeleteOnFetchRejection;noDeleteOnStaleGet;allowStaleOnFetchAbort;allowStaleOnFetchRejection;ignoreFetchAbort;backgroundFetchSize;#a;#f;#u;#c;#s;#b;#v;#p;#m;#k;#g;#S;#E;#d;#_;#w;#O;#n;#I;static unsafeExposeInternals(e){return{starts:e.#E,ttls:e.#d,autopurgeTimers:e.#_,sizes:e.#S,keyMap:e.#u,keyList:e.#c,valList:e.#s,next:e.#b,prev:e.#v,get head(){return e.#p},get tail(){return e.#m},free:e.#k,isBackgroundFetch:t=>e.#l(t),backgroundFetch:(t,n,r,s)=>e.#F(t,n,r,s),moveToTail:t=>e.#Y(t),indexes:t=>e.#P(t),rindexes:t=>e.#R(t),isStale:t=>e.#C(t)}}get max(){return this.#e}get maxSize(){return this.#i}get calculatedSize(){return this.#f}get size(){return this.#a}get fetchMethod(){return this.#x}get memoMethod(){return this.#y}get dispose(){return this.#r}get onInsert(){return this.#t}get disposeAfter(){return this.#o}constructor(e){let{max:t=0,ttl:n,ttlResolution:r=1,ttlAutopurge:s,updateAgeOnGet:o,updateAgeOnHas:a,allowStale:l,dispose:c,onInsert:f,disposeAfter:h,noDisposeOnSet:p,noUpdateTTL:m,maxSize:_=0,maxEntrySize:g=0,sizeCalculation:C,fetchMethod:b,memoMethod:x,noDeleteOnFetchRejection:P,noDeleteOnStaleGet:D,allowStaleOnFetchRejection:F,allowStaleOnFetchAbort:B,ignoreFetchAbort:Y,backgroundFetchSize:_e=1,perf:oe}=e;if(this.backgroundFetchSize=_e,oe!==void 0&&typeof oe?.now!="function")throw new TypeError("perf option must have a now() method if specified");if(this.#h=oe??nm,t!==0&&!xt(t))throw new TypeError("max option must be a nonnegative integer");let Z=t?Lc(t):Array;if(!Z)throw new Error("invalid max value: "+t);if(this.#e=t,this.#i=_,this.maxEntrySize=g||this.#i,this.sizeCalculation=C,this.sizeCalculation){if(!this.#i&&!this.maxEntrySize)throw new TypeError("cannot set sizeCalculation without setting maxSize or maxEntrySize");if(typeof this.sizeCalculation!="function")throw new TypeError("sizeCalculation set to non-function")}if(x!==void 0&&typeof x!="function")throw new TypeError("memoMethod must be a function if defined");if(this.#y=x,b!==void 0&&typeof b!="function")throw new TypeError("fetchMethod must be a function if specified");if(this.#x=b,this.#O=!!b,this.#u=new Map,this.#c=Array.from({length:t}).fill(void 0),this.#s=Array.from({length:t}).fill(void 0),this.#b=new Z(t),this.#v=new Z(t),this.#p=0,this.#m=0,this.#k=sm.create(t),this.#a=0,this.#f=0,typeof c=="function"&&(this.#r=c),typeof f=="function"&&(this.#t=f),typeof h=="function"?(this.#o=h,this.#g=[]):(this.#o=void 0,this.#g=void 0),this.#w=!!this.#r,this.#I=!!this.#t,this.#n=!!this.#o,this.noDisposeOnSet=!!p,this.noUpdateTTL=!!m,this.noDeleteOnFetchRejection=!!P,this.allowStaleOnFetchRejection=!!F,this.allowStaleOnFetchAbort=!!B,this.ignoreFetchAbort=!!Y,this.maxEntrySize!==0){if(this.#i!==0&&!xt(this.#i))throw new TypeError("maxSize must be a positive integer if specified");if(!xt(this.maxEntrySize))throw new TypeError("maxEntrySize must be a positive integer if specified");this.#U()}if(this.allowStale=!!l,this.noDeleteOnStaleGet=!!D,this.updateAgeOnGet=!!o,this.updateAgeOnHas=!!a,this.ttlResolution=xt(r)||r===0?r:1,this.ttlAutopurge=!!s,this.ttl=n||0,this.ttl){if(!xt(this.ttl))throw new TypeError("ttl must be a positive integer if specified");this.#L()}if(this.#e===0&&this.ttl===0&&this.#i===0)throw new TypeError("At least one of max, maxSize, or ttl is required");if(!this.ttlAutopurge&&!this.#e&&!this.#i){let pe="LRU_CACHE_UNBOUNDED";rm(pe)&&(Ic.add(pe),im("TTL caching without ttlAutopurge, max, or maxSize can result in unbounded memory consumption.","UnboundedCacheWarning",pe,Dc))}}getRemainingTTL(e){return this.#u.has(e)?1/0:0}#L(){let e=new Di(this.#e),t=new Di(this.#e);this.#d=e,this.#E=t;let n=this.ttlAutopurge?Array.from({length:this.#e}):void 0;this.#_=n,this.#q=(l,c,f=this.#h.now())=>{t[l]=c!==0?f:0,e[l]=c,r(l,c)},this.#A=l=>{t[l]=e[l]!==0?this.#h.now():0,r(l,e[l])};let r=this.ttlAutopurge?(l,c)=>{if(n?.[l]&&(clearTimeout(n[l]),n[l]=void 0),c&&c!==0&&n){let f=setTimeout(()=>{this.#C(l)?(this.#B(this.#c[l],"expire"),n[l]=void 0):r(l,a(l))},c+1);f.unref&&f.unref(),n[l]=f}}:()=>{};this.#D=(l,c)=>{if(e[c]){let f=e[c],h=t[c];if(!f||!h)return;l.ttl=f,l.start=h,l.now=s||o();let p=l.now-h;l.remainingTTL=f-p}};let s=0,o=()=>{let l=this.#h.now();if(this.ttlResolution>0){s=l;let c=setTimeout(()=>s=0,this.ttlResolution);c.unref&&c.unref()}return l};this.getRemainingTTL=l=>{let c=this.#u.get(l);return c===void 0?0:a(c)};let a=l=>{let c=e[l],f=t[l];if(!c||!f)return 1/0;let h=(s||o())-f;return c-h};this.#C=l=>{let c=t[l],f=e[l];return!!f&&!!c&&(s||o())-c>f}}#A=()=>{};#D=()=>{};#q=()=>{};#C=()=>!1;#U(){let e=new Di(this.#e);this.#f=0,this.#S=e,this.#N=t=>{this.#f-=e[t],e[t]=0},this.#H=(t,n,r,s)=>{if(!xt(r)){if(this.#l(n))return this.backgroundFetchSize;if(s){if(typeof s!="function")throw new TypeError("sizeCalculation must be a function");if(r=s(n,t),!xt(r))throw new TypeError("sizeCalculation return invalid (expect positive integer)")}else throw new TypeError("invalid size value (must be positive integer). When maxSize or maxEntrySize is used, sizeCalculation or size must be set.")}return r},this.#T=(t,n,r)=>{if(e[t]=n,this.#i){let s=this.#i-e[t];for(;this.#f>s;)this.#V(!0)}this.#f+=e[t],r&&(r.entrySize=n,r.totalCalculatedSize=this.#f)}}#N=e=>{};#T=(e,t,n)=>{};#H=(e,t,n,r)=>{if(n||r)throw new TypeError("cannot set size without setting maxSize or maxEntrySize on cache");return 0};*#P({allowStale:e=this.allowStale}={}){if(this.#a)for(let t=this.#m;this.#W(t)&&((e||!this.#C(t))&&(yield t),t!==this.#p);)t=this.#v[t]}*#R({allowStale:e=this.allowStale}={}){if(this.#a)for(let t=this.#p;this.#W(t)&&((e||!this.#C(t))&&(yield t),t!==this.#m);)t=this.#b[t]}#W(e){return e!==void 0&&this.#u.get(this.#c[e])===e}*entries(){for(let e of this.#P())this.#s[e]!==void 0&&this.#c[e]!==void 0&&!this.#l(this.#s[e])&&(yield[this.#c[e],this.#s[e]])}*rentries(){for(let e of this.#R())this.#s[e]!==void 0&&this.#c[e]!==void 0&&!this.#l(this.#s[e])&&(yield[this.#c[e],this.#s[e]])}*keys(){for(let e of this.#P()){let t=this.#c[e];t!==void 0&&!this.#l(this.#s[e])&&(yield t)}}*rkeys(){for(let e of this.#R()){let t=this.#c[e];t!==void 0&&!this.#l(this.#s[e])&&(yield t)}}*values(){for(let e of this.#P())this.#s[e]!==void 0&&!this.#l(this.#s[e])&&(yield this.#s[e])}*rvalues(){for(let e of this.#R())this.#s[e]!==void 0&&!this.#l(this.#s[e])&&(yield this.#s[e])}[Symbol.iterator](){return this.entries()}[Symbol.toStringTag]="LRUCache";find(e,t={}){for(let n of this.#P()){let r=this.#s[n],s=this.#l(r)?r.__staleWhileFetching:r;if(s!==void 0&&e(s,this.#c[n],this))return this.#$(this.#c[n],t)}}forEach(e,t=this){for(let n of this.#P()){let r=this.#s[n],s=this.#l(r)?r.__staleWhileFetching:r;s!==void 0&&e.call(t,s,this.#c[n],this)}}rforEach(e,t=this){for(let n of this.#R()){let r=this.#s[n],s=this.#l(r)?r.__staleWhileFetching:r;s!==void 0&&e.call(t,s,this.#c[n],this)}}purgeStale(){let e=!1;for(let t of this.#R({allowStale:!0}))this.#C(t)&&(this.#B(this.#c[t],"expire"),e=!0);return e}info(e){let t=this.#u.get(e);if(t===void 0)return;let n=this.#s[t],r=this.#l(n)?n.__staleWhileFetching:n;if(r===void 0)return;let s={value:r};if(this.#d&&this.#E){let o=this.#d[t],a=this.#E[t];if(o&&a){let l=o-(this.#h.now()-a);s.ttl=l,s.start=Date.now()}}return this.#S&&(s.size=this.#S[t]),s}dump(){let e=[];for(let t of this.#P({allowStale:!0})){let n=this.#c[t],r=this.#s[t],s=this.#l(r)?r.__staleWhileFetching:r;if(s===void 0||n===void 0)continue;let o={value:s};if(this.#d&&this.#E){o.ttl=this.#d[t];let a=this.#h.now()-this.#E[t];o.start=Math.floor(Date.now()-a)}this.#S&&(o.size=this.#S[t]),e.unshift([n,o])}return e}load(e){this.clear();for(let[t,n]of e){if(n.start){let r=Date.now()-n.start;n.start=this.#h.now()-r}this.#M(t,n.value,n)}}set(e,t,n={}){let{status:r=me.hasSubscribers?{}:void 0}=n;n.status=r,r&&(r.op="set",r.key=e,t!==void 0&&(r.value=t),r.cache=this);let s=this.#M(e,t,n);return r&&me.hasSubscribers&&me.publish(r),s}#M(e,t,n,r){let{ttl:s=this.ttl,start:o,noDisposeOnSet:a=this.noDisposeOnSet,sizeCalculation:l=this.sizeCalculation,status:c}=n,f=this.#l(t);if(t===void 0)return c&&(c.set="deleted"),this.delete(e),this;let{noUpdateTTL:h=this.noUpdateTTL}=n;c&&!f&&(c.value=t);let p=this.#H(e,t,n.size||0,l,c);if(this.maxEntrySize&&p>this.maxEntrySize)return this.#B(e,"set"),c&&(c.set="miss",c.maxEntrySizeExceeded=!0),this;let m=this.#a===0?void 0:this.#u.get(e);if(m===void 0)m=this.#a===0?this.#m:this.#k.length!==0?this.#k.pop():this.#a===this.#e?this.#V(!1):this.#a,this.#c[m]=e,this.#s[m]=t,this.#u.set(e,m),this.#b[this.#m]=m,this.#v[m]=this.#m,this.#m=m,this.#a++,this.#T(m,p,c),c&&(c.set="add"),h=!1,this.#I&&!f&&this.#t?.(t,e,"add");else{this.#Y(m);let _=this.#s[m];if(t!==_){if(!a)if(this.#l(_)){_!==r&&_.__abortController.abort(new Error("replaced"));let{__staleWhileFetching:g}=_;g!==void 0&&g!==t&&(this.#w&&this.#r?.(g,e,"set"),this.#n&&this.#g?.push([g,e,"set"]))}else this.#w&&this.#r?.(_,e,"set"),this.#n&&this.#g?.push([_,e,"set"]);if(this.#N(m),this.#T(m,p,c),this.#s[m]=t,!f){let g=_&&this.#l(_)?_.__staleWhileFetching:_,C=g===void 0?"add":t!==g?"replace":"update";c&&(c.set=C,g!==void 0&&(c.oldValue=g)),this.#I&&this.onInsert?.(t,e,C)}}else f||(c&&(c.set="update"),this.#I&&this.onInsert?.(t,e,"update"))}if(s!==0&&!this.#d&&this.#L(),this.#d&&(h||this.#q(m,s,o),c&&this.#D(c,m)),!a&&this.#n&&this.#g){let _=this.#g,g;for(;g=_?.shift();)this.#o?.(...g)}return this}pop(){try{for(;this.#a;){let e=this.#s[this.#p];if(this.#V(!0),this.#l(e)){if(e.__staleWhileFetching)return e.__staleWhileFetching}else if(e!==void 0)return e}}finally{if(this.#n&&this.#g){let e=this.#g,t;for(;t=e?.shift();)this.#o?.(...t)}}}#V(e){let t=this.#p,n=this.#c[t],r=this.#s[t],s=this.#l(r);s&&r.__abortController.abort(new Error("evicted"));let o=s?r.__staleWhileFetching:r;return(this.#w||this.#n)&&o!==void 0&&(this.#w&&this.#r?.(o,n,"evict"),this.#n&&this.#g?.push([o,n,"evict"])),this.#N(t),this.#_?.[t]&&(clearTimeout(this.#_[t]),this.#_[t]=void 0),e&&(this.#c[t]=void 0,this.#s[t]=void 0,this.#k.push(t)),this.#a===1?(this.#p=this.#m=0,this.#k.length=0):this.#p=this.#b[t],this.#u.delete(n),this.#a--,t}has(e,t={}){let{status:n=me.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op="has",n.key=e,n.cache=this);let r=this.#J(e,t);return me.hasSubscribers&&me.publish(n),r}#J(e,t={}){let{updateAgeOnHas:n=this.updateAgeOnHas,status:r}=t,s=this.#u.get(e);if(s!==void 0){let o=this.#s[s];if(this.#l(o)&&o.__staleWhileFetching===void 0)return!1;if(this.#C(s))r&&(r.has="stale",this.#D(r,s));else return n&&this.#A(s),r&&(r.has="hit",this.#D(r,s)),!0}else r&&(r.has="miss");return!1}peek(e,t={}){let{status:n=to()?{}:void 0}=t;n&&(n.op="peek",n.key=e,n.cache=this),t.status=n;let r=this.#z(e,t);return me.hasSubscribers&&me.publish(n),r}#z(e,t){let{status:n,allowStale:r=this.allowStale}=t,s=this.#u.get(e);if(s===void 0||!r&&this.#C(s)){n&&(n.peek=s===void 0?"miss":"stale");return}let o=this.#s[s],a=this.#l(o)?o.__staleWhileFetching:o;return n&&(a!==void 0?(n.peek="hit",n.value=a):n.peek="miss"),a}#F(e,t,n,r){let s=t===void 0?void 0:this.#s[t];if(this.#l(s))return s;let o=new AbortController,{signal:a}=n;a?.addEventListener("abort",()=>o.abort(a.reason),{signal:o.signal});let l={signal:o.signal,options:n,context:r},c=(g,C=!1)=>{let{aborted:b}=o.signal,x=n.ignoreFetchAbort&&g!==void 0,P=n.ignoreFetchAbort||!!(n.allowStaleOnFetchAbort&&g!==void 0);if(n.status&&(b&&!C?(n.status.fetchAborted=!0,n.status.fetchError=o.signal.reason,x&&(n.status.fetchAbortIgnored=!0)):n.status.fetchResolved=!0),b&&!x&&!C)return h(o.signal.reason,P);let D=m,F=this.#s[t];return(F===m||F===void 0&&x&&C)&&(g===void 0?D.__staleWhileFetching!==void 0?this.#s[t]=D.__staleWhileFetching:this.#B(e,"fetch"):(n.status&&(n.status.fetchUpdated=!0),this.#M(e,g,l.options,D))),g},f=g=>(n.status&&(n.status.fetchRejected=!0,n.status.fetchError=g),h(g,!1)),h=(g,C)=>{let{aborted:b}=o.signal,x=b&&n.allowStaleOnFetchAbort,P=x||n.allowStaleOnFetchRejection,D=P||n.noDeleteOnFetchRejection,F=m;if(this.#s[t]===m&&(!D||!C&&F.__staleWhileFetching===void 0?this.#B(e,"fetch"):x||(this.#s[t]=F.__staleWhileFetching)),P)return n.status&&F.__staleWhileFetching!==void 0&&(n.status.returnedStale=!0),F.__staleWhileFetching;if(F.__returned===F)throw g},p=(g,C)=>{let b=this.#x?.(e,s,l);o.signal.addEventListener("abort",()=>{(!n.ignoreFetchAbort||n.allowStaleOnFetchAbort)&&(g(void 0),n.allowStaleOnFetchAbort&&(g=x=>c(x,!0)))}),b&&b instanceof Promise?b.then(x=>g(x===void 0?void 0:x),C):b!==void 0&&g(b)};n.status&&(n.status.fetchDispatched=!0);let m=new Promise(p).then(c,f),_=Object.assign(m,{__abortController:o,__staleWhileFetching:s,__returned:void 0});return t===void 0?(this.#M(e,_,{...l.options,status:void 0}),t=this.#u.get(e)):this.#s[t]=_,_}#l(e){if(!this.#O)return!1;let t=e;return!!t&&t instanceof Promise&&t.hasOwnProperty("__staleWhileFetching")&&t.__abortController instanceof AbortController}fetch(e,t={}){let n=xn.hasSubscribers,{status:r=to()?{}:void 0}=t;t.status=r,r&&t.context&&(r.context=t.context);let s=this.#G(e,t);return r&&n&&(r.trace=!0,xn.tracePromise(()=>s,r).catch(()=>{})),s}async#G(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,ttl:o=this.ttl,noDisposeOnSet:a=this.noDisposeOnSet,size:l=0,sizeCalculation:c=this.sizeCalculation,noUpdateTTL:f=this.noUpdateTTL,noDeleteOnFetchRejection:h=this.noDeleteOnFetchRejection,allowStaleOnFetchRejection:p=this.allowStaleOnFetchRejection,ignoreFetchAbort:m=this.ignoreFetchAbort,allowStaleOnFetchAbort:_=this.allowStaleOnFetchAbort,context:g,forceRefresh:C=!1,status:b,signal:x}=t;if(b&&(b.op="fetch",b.key=e,C&&(b.forceRefresh=!0),b.cache=this),!this.#O)return b&&(b.fetch="get"),this.#$(e,{allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:s,status:b});let P={allowStale:n,updateAgeOnGet:r,noDeleteOnStaleGet:s,ttl:o,noDisposeOnSet:a,size:l,sizeCalculation:c,noUpdateTTL:f,noDeleteOnFetchRejection:h,allowStaleOnFetchRejection:p,allowStaleOnFetchAbort:_,ignoreFetchAbort:m,status:b,signal:x},D=this.#u.get(e);if(D===void 0){b&&(b.fetch="miss");let F=this.#F(e,D,P,g);return F.__returned=F}else{let F=this.#s[D];if(this.#l(F)){let oe=n&&F.__staleWhileFetching!==void 0;return b&&(b.fetch="inflight",oe&&(b.returnedStale=!0)),oe?F.__staleWhileFetching:F.__returned=F}let B=this.#C(D);if(!C&&!B)return b&&(b.fetch="hit"),this.#Y(D),r&&this.#A(D),b&&this.#D(b,D),F;let Y=this.#F(e,D,P,g),_e=Y.__staleWhileFetching!==void 0&&n;return b&&(b.fetch=B?"stale":"refresh",_e&&B&&(b.returnedStale=!0)),_e?Y.__staleWhileFetching:Y.__returned=Y}}forceFetch(e,t={}){let n=xn.hasSubscribers,{status:r=to()?{}:void 0}=t;t.status=r,r&&t.context&&(r.context=t.context);let s=this.#j(e,t);return r&&n&&(r.trace=!0,xn.tracePromise(()=>s,r).catch(()=>{})),s}async#j(e,t={}){let n=await this.#G(e,t);if(n===void 0)throw new Error("fetch() returned undefined");return n}memo(e,t={}){let{status:n=me.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op="memo",n.key=e,t.context&&(n.context=t.context),n.cache=this);let r=this.#X(e,t);return n&&(n.value=r),me.hasSubscribers&&me.publish(n),r}#X(e,t={}){let n=this.#y;if(!n)throw new Error("no memoMethod provided to constructor");let{context:r,status:s,forceRefresh:o,...a}=t;s&&o&&(s.forceRefresh=!0);let l=this.#$(e,a),c=o||l===void 0;if(s&&(s.memo=c?"miss":"hit",c||(s.value=l)),!c)return l;let f=n(e,l,{options:a,context:r});return s&&(s.value=f),this.#M(e,f,a),f}get(e,t={}){let{status:n=me.hasSubscribers?{}:void 0}=t;t.status=n,n&&(n.op="get",n.key=e,n.cache=this);let r=this.#$(e,t);return n&&(r!==void 0&&(n.value=r),me.hasSubscribers&&me.publish(n)),r}#$(e,t={}){let{allowStale:n=this.allowStale,updateAgeOnGet:r=this.updateAgeOnGet,noDeleteOnStaleGet:s=this.noDeleteOnStaleGet,status:o}=t,a=this.#u.get(e);if(a===void 0){o&&(o.get="miss");return}let l=this.#s[a],c=this.#l(l);return o&&this.#D(o,a),this.#C(a)?c?(o&&(o.get="stale-fetching"),n&&l.__staleWhileFetching!==void 0?(o&&(o.returnedStale=!0),l.__staleWhileFetching):void 0):(s||this.#B(e,"expire"),o&&(o.get="stale"),n?(o&&(o.returnedStale=!0),l):void 0):(o&&(o.get=c?"fetching":"hit"),this.#Y(a),r&&this.#A(a),c?l.__staleWhileFetching:l)}#K(e,t){this.#v[t]=e,this.#b[e]=t}#Y(e){e!==this.#m&&(e===this.#p?this.#p=this.#b[e]:this.#K(this.#v[e],this.#b[e]),this.#K(this.#m,e),this.#m=e)}delete(e){return this.#B(e,"delete")}#B(e,t){me.hasSubscribers&&me.publish({op:"delete",delete:t,key:e,cache:this});let n=!1;if(this.#a!==0){let r=this.#u.get(e);if(r!==void 0)if(this.#_?.[r]&&(clearTimeout(this.#_[r]),this.#_[r]=void 0),n=!0,this.#a===1)this.#Q(t);else{this.#N(r);let s=this.#s[r];if(this.#l(s)?s.__abortController.abort(new Error("deleted")):(this.#w||this.#n)&&(this.#w&&this.#r?.(s,e,t),this.#n&&this.#g?.push([s,e,t])),this.#u.delete(e),this.#c[r]=void 0,this.#s[r]=void 0,r===this.#m)this.#m=this.#v[r];else if(r===this.#p)this.#p=this.#b[r];else{let o=this.#v[r];this.#b[o]=this.#b[r];let a=this.#b[r];this.#v[a]=this.#v[r]}this.#a--,this.#k.push(r)}}if(this.#n&&this.#g?.length){let r=this.#g,s;for(;s=r?.shift();)this.#o?.(...s)}return n}clear(){return this.#Q("delete")}#Q(e){for(let t of this.#R({allowStale:!0})){let n=this.#s[t];if(this.#l(n))n.__abortController.abort(new Error("deleted"));else{let r=this.#c[t];this.#w&&this.#r?.(n,r,e),this.#n&&this.#g?.push([n,r,e])}}if(this.#u.clear(),this.#s.fill(void 0),this.#c.fill(void 0),this.#d&&this.#E){this.#d.fill(0),this.#E.fill(0);for(let t of this.#_??[])t!==void 0&&clearTimeout(t);this.#_?.fill(void 0)}if(this.#S&&this.#S.fill(0),this.#p=0,this.#m=0,this.#k.length=0,this.#f=0,this.#a=0,this.#n&&this.#g){let t=this.#g,n;for(;n=t?.shift();)this.#o?.(...n)}}}});import{EventEmitter as lo}from"node:events";import qc from"node:stream";import{StringDecoder as om}from"node:string_decoder";var Nc,am,lm,cm,ut,ht,Et,Ti,kn,Ni,Mc,Mi,Fc,Ke,Ut,he,An,zt,fe,ke,de,no,Fi,we,se,io,ro,Bc,so,tt,oo,Bi,On,It,Te,Pn,um,hm,fm,dm,qi,ao,pm,mm,Ct,co=ue(()=>{Nc=typeof process=="object"&&process?process:{stdout:null,stderr:null},am=i=>!!i&&typeof i=="object"&&(i instanceof Ct||i instanceof qc||lm(i)||cm(i)),lm=i=>!!i&&typeof i=="object"&&i instanceof lo&&typeof i.pipe=="function"&&i.pipe!==qc.Writable.prototype.pipe,cm=i=>!!i&&typeof i=="object"&&i instanceof lo&&typeof i.write=="function"&&typeof i.end=="function",ut=Symbol("EOF"),ht=Symbol("maybeEmitEnd"),Et=Symbol("emittedEnd"),Ti=Symbol("emittingEnd"),kn=Symbol("emittedError"),Ni=Symbol("closed"),Mc=Symbol("read"),Mi=Symbol("flush"),Fc=Symbol("flushChunk"),Ke=Symbol("encoding"),Ut=Symbol("decoder"),he=Symbol("flowing"),An=Symbol("paused"),zt=Symbol("resume"),fe=Symbol("buffer"),ke=Symbol("pipes"),de=Symbol("bufferLength"),no=Symbol("bufferPush"),Fi=Symbol("bufferShift"),we=Symbol("objectMode"),se=Symbol("destroyed"),io=Symbol("error"),ro=Symbol("emitData"),Bc=Symbol("emitEnd"),so=Symbol("emitEnd2"),tt=Symbol("async"),oo=Symbol("abort"),Bi=Symbol("aborted"),On=Symbol("signal"),It=Symbol("dataListeners"),Te=Symbol("discarded"),Pn=i=>Promise.resolve().then(i),um=i=>i(),hm=i=>i==="end"||i==="finish"||i==="prefinish",fm=i=>i instanceof ArrayBuffer||!!i&&typeof i=="object"&&i.constructor&&i.constructor.name==="ArrayBuffer"&&i.byteLength>=0,dm=i=>!Buffer.isBuffer(i)&&ArrayBuffer.isView(i),qi=class{src;dest;opts;ondrain;constructor(e,t,n){this.src=e,this.dest=t,this.opts=n,this.ondrain=()=>e[zt](),this.dest.on("drain",this.ondrain)}unpipe(){this.dest.removeListener("drain",this.ondrain)}proxyErrors(e){}end(){this.unpipe(),this.opts.end&&this.dest.end()}},ao=class extends qi{unpipe(){this.src.removeListener("error",this.proxyErrors),super.unpipe()}constructor(e,t,n){super(e,t,n),this.proxyErrors=r=>this.dest.emit("error",r),e.on("error",this.proxyErrors)}},pm=i=>!!i.objectMode,mm=i=>!i.objectMode&&!!i.encoding&&i.encoding!=="buffer",Ct=class extends lo{[he]=!1;[An]=!1;[ke]=[];[fe]=[];[we];[Ke];[tt];[Ut];[ut]=!1;[Et]=!1;[Ti]=!1;[Ni]=!1;[kn]=null;[de]=0;[se]=!1;[On];[Bi]=!1;[It]=0;[Te]=!1;writable=!0;readable=!0;constructor(...e){let t=e[0]||{};if(super(),t.objectMode&&typeof t.encoding=="string")throw new TypeError("Encoding and objectMode may not be used together");pm(t)?(this[we]=!0,this[Ke]=null):mm(t)?(this[Ke]=t.encoding,this[we]=!1):(this[we]=!1,this[Ke]=null),this[tt]=!!t.async,this[Ut]=this[Ke]?new om(this[Ke]):null,t&&t.debugExposeBuffer===!0&&Object.defineProperty(this,"buffer",{get:()=>this[fe]}),t&&t.debugExposePipes===!0&&Object.defineProperty(this,"pipes",{get:()=>this[ke]});let{signal:n}=t;n&&(this[On]=n,n.aborted?this[oo]():n.addEventListener("abort",()=>this[oo]()))}get bufferLength(){return this[de]}get encoding(){return this[Ke]}set encoding(e){throw new Error("Encoding must be set at instantiation time")}setEncoding(e){throw new Error("Encoding must be set at instantiation time")}get objectMode(){return this[we]}set objectMode(e){throw new Error("objectMode must be set at instantiation time")}get async(){return this[tt]}set async(e){this[tt]=this[tt]||!!e}[oo](){this[Bi]=!0,this.emit("abort",this[On]?.reason),this.destroy(this[On]?.reason)}get aborted(){return this[Bi]}set aborted(e){}write(e,t,n){if(this[Bi])return!1;if(this[ut])throw new Error("write after end");if(this[se])return this.emit("error",Object.assign(new Error("Cannot call write after a stream was destroyed"),{code:"ERR_STREAM_DESTROYED"})),!0;typeof t=="function"&&(n=t,t="utf8"),t||(t="utf8");let r=this[tt]?Pn:um;if(!this[we]&&!Buffer.isBuffer(e)){if(dm(e))e=Buffer.from(e.buffer,e.byteOffset,e.byteLength);else if(fm(e))e=Buffer.from(e);else if(typeof e!="string")throw new Error("Non-contiguous data written to non-objectMode stream")}return this[we]?(this[he]&&this[de]!==0&&this[Mi](!0),this[he]?this.emit("data",e):this[no](e),this[de]!==0&&this.emit("readable"),n&&r(n),this[he]):e.length?(typeof e=="string"&&!(t===this[Ke]&&!this[Ut]?.lastNeed)&&(e=Buffer.from(e,t)),Buffer.isBuffer(e)&&this[Ke]&&(e=this[Ut].write(e)),this[he]&&this[de]!==0&&this[Mi](!0),this[he]?this.emit("data",e):this[no](e),this[de]!==0&&this.emit("readable"),n&&r(n),this[he]):(this[de]!==0&&this.emit("readable"),n&&r(n),this[he])}read(e){if(this[se])return null;if(this[Te]=!1,this[de]===0||e===0||e&&e>this[de])return this[ht](),null;this[we]&&(e=null),this[fe].length>1&&!this[we]&&(this[fe]=[this[Ke]?this[fe].join(""):Buffer.concat(this[fe],this[de])]);let t=this[Mc](e||null,this[fe][0]);return this[ht](),t}[Mc](e,t){if(this[we])this[Fi]();else{let n=t;e===n.length||e===null?this[Fi]():typeof n=="string"?(this[fe][0]=n.slice(e),t=n.slice(0,e),this[de]-=e):(this[fe][0]=n.subarray(e),t=n.subarray(0,e),this[de]-=e)}return this.emit("data",t),!this[fe].length&&!this[ut]&&this.emit("drain"),t}end(e,t,n){return typeof e=="function"&&(n=e,e=void 0),typeof t=="function"&&(n=t,t="utf8"),e!==void 0&&this.write(e,t),n&&this.once("end",n),this[ut]=!0,this.writable=!1,(this[he]||!this[An])&&this[ht](),this}[zt](){this[se]||(!this[It]&&!this[ke].length&&(this[Te]=!0),this[An]=!1,this[he]=!0,this.emit("resume"),this[fe].length?this[Mi]():this[ut]?this[ht]():this.emit("drain"))}resume(){return this[zt]()}pause(){this[he]=!1,this[An]=!0,this[Te]=!1}get destroyed(){return this[se]}get flowing(){return this[he]}get paused(){return this[An]}[no](e){this[we]?this[de]+=1:this[de]+=e.length,this[fe].push(e)}[Fi](){return this[we]?this[de]-=1:this[de]-=this[fe][0].length,this[fe].shift()}[Mi](e=!1){do;while(this[Fc](this[Fi]())&&this[fe].length);!e&&!this[fe].length&&!this[ut]&&this.emit("drain")}[Fc](e){return this.emit("data",e),this[he]}pipe(e,t){if(this[se])return e;this[Te]=!1;let n=this[Et];return t=t||{},e===Nc.stdout||e===Nc.stderr?t.end=!1:t.end=t.end!==!1,t.proxyErrors=!!t.proxyErrors,n?t.end&&e.end():(this[ke].push(t.proxyErrors?new ao(this,e,t):new qi(this,e,t)),this[tt]?Pn(()=>this[zt]()):this[zt]()),e}unpipe(e){let t=this[ke].find(n=>n.dest===e);t&&(this[ke].length===1?(this[he]&&this[It]===0&&(this[he]=!1),this[ke]=[]):this[ke].splice(this[ke].indexOf(t),1),t.unpipe())}addListener(e,t){return this.on(e,t)}on(e,t){let n=super.on(e,t);if(e==="data")this[Te]=!1,this[It]++,!this[ke].length&&!this[he]&&this[zt]();else if(e==="readable"&&this[de]!==0)super.emit("readable");else if(hm(e)&&this[Et])super.emit(e),this.removeAllListeners(e);else if(e==="error"&&this[kn]){let r=t;this[tt]?Pn(()=>r.call(this,this[kn])):r.call(this,this[kn])}return n}removeListener(e,t){return this.off(e,t)}off(e,t){let n=super.off(e,t);return e==="data"&&(this[It]=this.listeners("data").length,this[It]===0&&!this[Te]&&!this[ke].length&&(this[he]=!1)),n}removeAllListeners(e){let t=super.removeAllListeners(e);return(e==="data"||e===void 0)&&(this[It]=0,!this[Te]&&!this[ke].length&&(this[he]=!1)),t}get emittedEnd(){return this[Et]}[ht](){!this[Ti]&&!this[Et]&&!this[se]&&this[fe].length===0&&this[ut]&&(this[Ti]=!0,this.emit("end"),this.emit("prefinish"),this.emit("finish"),this[Ni]&&this.emit("close"),this[Ti]=!1)}emit(e,...t){let n=t[0];if(e!=="error"&&e!=="close"&&e!==se&&this[se])return!1;if(e==="data")return!this[we]&&!n?!1:this[tt]?(Pn(()=>this[ro](n)),!0):this[ro](n);if(e==="end")return this[Bc]();if(e==="close"){if(this[Ni]=!0,!this[Et]&&!this[se])return!1;let s=super.emit("close");return this.removeAllListeners("close"),s}else if(e==="error"){this[kn]=n,super.emit(io,n);let s=!this[On]||this.listeners("error").length?super.emit("error",n):!1;return this[ht](),s}else if(e==="resume"){let s=super.emit("resume");return this[ht](),s}else if(e==="finish"||e==="prefinish"){let s=super.emit(e);return this.removeAllListeners(e),s}let r=super.emit(e,...t);return this[ht](),r}[ro](e){for(let n of this[ke])n.dest.write(e)===!1&&this.pause();let t=this[Te]?!1:super.emit("data",e);return this[ht](),t}[Bc](){return this[Et]?!1:(this[Et]=!0,this.readable=!1,this[tt]?(Pn(()=>this[so]()),!0):this[so]())}[so](){if(this[Ut]){let t=this[Ut].end();if(t){for(let n of this[ke])n.dest.write(t);this[Te]||super.emit("data",t)}}for(let t of this[ke])t.end();let e=super.emit("end");return this.removeAllListeners("end"),e}async collect(){let e=Object.assign([],{dataLength:0});this[we]||(e.dataLength=0);let t=this.promise();return this.on("data",n=>{e.push(n),this[we]||(e.dataLength+=n.length)}),await t,e}async concat(){if(this[we])throw new Error("cannot concat in objectMode");let e=await this.collect();return this[Ke]?e.join(""):Buffer.concat(e,e.dataLength)}async promise(){return new Promise((e,t)=>{this.on(se,()=>t(new Error("stream destroyed"))),this.on("error",n=>t(n)),this.on("end",()=>e())})}[Symbol.asyncIterator](){this[Te]=!1;let e=!1,t=async()=>(this.pause(),e=!0,{value:void 0,done:!0});return{next:()=>{if(e)return t();let r=this.read();if(r!==null)return Promise.resolve({done:!1,value:r});if(this[ut])return t();let s,o,a=h=>{this.off("data",l),this.off("end",c),this.off(se,f),t(),o(h)},l=h=>{this.off("error",a),this.off("end",c),this.off(se,f),this.pause(),s({value:h,done:!!this[ut]})},c=()=>{this.off("error",a),this.off("data",l),this.off(se,f),t(),s({done:!0,value:void 0})},f=()=>a(new Error("stream destroyed"));return new Promise((h,p)=>{o=p,s=h,this.once(se,f),this.once("error",a),this.once("end",c),this.once("data",l)})},throw:t,return:t,[Symbol.asyncIterator](){return this},[Symbol.asyncDispose]:async()=>{}}}[Symbol.iterator](){this[Te]=!1;let e=!1,t=()=>(this.pause(),this.off(io,t),this.off(se,t),this.off("end",t),e=!0,{done:!0,value:void 0}),n=()=>{if(e)return t();let r=this.read();return r===null?t():{done:!1,value:r}};return this.once("end",t),this.once(io,t),this.once(se,t),{next:n,throw:t,return:t,[Symbol.iterator](){return this},[Symbol.dispose]:()=>{}}}destroy(e){if(this[se])return e?this.emit("error",e):this.emit(se),this;this[se]=!0,this[Te]=!0,this[fe].length=0,this[de]=0;let t=this;return typeof t.close=="function"&&!this[Ni]&&t.close(),e?this.emit("error",e):this.emit(se),this}static get isStream(){return am}}});import{posix as gm,win32 as fo}from"node:path";import{fileURLToPath as _m}from"node:url";import{lstatSync as ym,readdir as bm,readdirSync as wm,readlinkSync as vm,realpathSync as Sm}from"fs";import*as xm from"node:fs";import{lstat as Cm,readdir as km,readlink as Am,realpath as Om}from"node:fs/promises";var Em,In,Uc,zc,Pm,Rm,Ve,Gc,$c,nt,Yc,Jc,Lt,Kc,je,Rn,uo,Hc,Ln,Qe,Hi,ji,Wc,Im,ho,jc,Dn,Vc,Wi,Vi,po,Qc,ve,Ui,zi,Gi,Gt,$t,Tn,S2,Xc,Zc=ue(()=>{Tc();co();Em=Sm.native,In={lstatSync:ym,readdir:bm,readdirSync:wm,readlinkSync:vm,realpathSync:Em,promises:{lstat:Cm,readdir:km,readlink:Am,realpath:Om}},Uc=i=>!i||i===In||i===xm?In:{...In,...i,promises:{...In.promises,...i.promises||{}}},zc=/^\\\\\?\\([a-z]:)\\?$/i,Pm=i=>i.replace(/\//g,"\\").replace(zc,"$1\\"),Rm=/[\\\/]/,Ve=0,Gc=1,$c=2,nt=4,Yc=6,Jc=8,Lt=10,Kc=12,je=15,Rn=~je,uo=16,Hc=32,Ln=64,Qe=128,Hi=256,ji=512,Wc=Ln|Qe|ji,Im=1023,ho=i=>i.isFile()?Jc:i.isDirectory()?nt:i.isSymbolicLink()?Lt:i.isCharacterDevice()?$c:i.isBlockDevice()?Yc:i.isSocket()?Kc:i.isFIFO()?Gc:Ve,jc=new Cn({max:2**12}),Dn=i=>{let e=jc.get(i);if(e)return e;let t=i.normalize("NFKD");return jc.set(i,t),t},Vc=new Cn({max:2**12}),Wi=i=>{let e=Vc.get(i);if(e)return e;let t=Dn(i.toLowerCase());return Vc.set(i,t),t},Vi=class extends Cn{constructor(){super({max:256})}},po=class extends Cn{constructor(e=16*1024){super({maxSize:e,sizeCalculation:t=>t.length+1})}},Qc=Symbol("PathScurry setAsCwd"),ve=class{name;root;roots;parent;nocase;isCWD=!1;#e;#i;get dev(){return this.#i}#r;get mode(){return this.#r}#t;get nlink(){return this.#t}#o;get uid(){return this.#o}#x;get gid(){return this.#x}#y;get rdev(){return this.#y}#h;get blksize(){return this.#h}#a;get ino(){return this.#a}#f;get size(){return this.#f}#u;get blocks(){return this.#u}#c;get atimeMs(){return this.#c}#s;get mtimeMs(){return this.#s}#b;get ctimeMs(){return this.#b}#v;get birthtimeMs(){return this.#v}#p;get atime(){return this.#p}#m;get mtime(){return this.#m}#k;get ctime(){return this.#k}#g;get birthtime(){return this.#g}#S;#E;#d;#_;#w;#O;#n;#I;#L;#A;get parentPath(){return(this.parent||this).fullpath()}get path(){return this.parentPath}constructor(e,t=Ve,n,r,s,o,a){this.name=e,this.#S=s?Wi(e):Dn(e),this.#n=t&Im,this.nocase=s,this.roots=r,this.root=n||this,this.#I=o,this.#d=a.fullpath,this.#w=a.relative,this.#O=a.relativePosix,this.parent=a.parent,this.parent?this.#e=this.parent.#e:this.#e=Uc(a.fs)}depth(){return this.#E!==void 0?this.#E:this.parent?this.#E=this.parent.depth()+1:this.#E=0}childrenCache(){return this.#I}resolve(e){if(!e)return this;let t=this.getRootString(e),r=e.substring(t.length).split(this.splitSep);return t?this.getRoot(t).#D(r):this.#D(r)}#D(e){let t=this;for(let n of e)t=t.child(n);return t}children(){let e=this.#I.get(this);if(e)return e;let t=Object.assign([],{provisional:0});return this.#I.set(this,t),this.#n&=~uo,t}child(e,t){if(e===""||e===".")return this;if(e==="..")return this.parent||this;let n=this.children(),r=this.nocase?Wi(e):Dn(e);for(let l of n)if(l.#S===r)return l;let s=this.parent?this.sep:"",o=this.#d?this.#d+s+e:void 0,a=this.newChild(e,Ve,{...t,parent:this,fullpath:o});return this.canReaddir()||(a.#n|=Qe),n.push(a),a}relative(){if(this.isCWD)return"";if(this.#w!==void 0)return this.#w;let e=this.name,t=this.parent;if(!t)return this.#w=this.name;let n=t.relative();return n+(!n||!t.parent?"":this.sep)+e}relativePosix(){if(this.sep==="/")return this.relative();if(this.isCWD)return"";if(this.#O!==void 0)return this.#O;let e=this.name,t=this.parent;if(!t)return this.#O=this.fullpathPosix();let n=t.relativePosix();return n+(!n||!t.parent?"":"/")+e}fullpath(){if(this.#d!==void 0)return this.#d;let e=this.name,t=this.parent;if(!t)return this.#d=this.name;let r=t.fullpath()+(t.parent?this.sep:"")+e;return this.#d=r}fullpathPosix(){if(this.#_!==void 0)return this.#_;if(this.sep==="/")return this.#_=this.fullpath();if(!this.parent){let r=this.fullpath().replace(/\\/g,"/");return/^[a-z]:\//i.test(r)?this.#_=`//?/${r}`:this.#_=r}let e=this.parent,t=e.fullpathPosix(),n=t+(!t||!e.parent?"":"/")+this.name;return this.#_=n}isUnknown(){return(this.#n&je)===Ve}isType(e){return this[`is${e}`]()}getType(){return this.isUnknown()?"Unknown":this.isDirectory()?"Directory":this.isFile()?"File":this.isSymbolicLink()?"SymbolicLink":this.isFIFO()?"FIFO":this.isCharacterDevice()?"CharacterDevice":this.isBlockDevice()?"BlockDevice":this.isSocket()?"Socket":"Unknown"}isFile(){return(this.#n&je)===Jc}isDirectory(){return(this.#n&je)===nt}isCharacterDevice(){return(this.#n&je)===$c}isBlockDevice(){return(this.#n&je)===Yc}isFIFO(){return(this.#n&je)===Gc}isSocket(){return(this.#n&je)===Kc}isSymbolicLink(){return(this.#n&Lt)===Lt}lstatCached(){return this.#n&Hc?this:void 0}readlinkCached(){return this.#L}realpathCached(){return this.#A}readdirCached(){let e=this.children();return e.slice(0,e.provisional)}canReadlink(){if(this.#L)return!0;if(!this.parent)return!1;let e=this.#n&je;return!(e!==Ve&&e!==Lt||this.#n&Hi||this.#n&Qe)}calledReaddir(){return!!(this.#n&uo)}isENOENT(){return!!(this.#n&Qe)}isNamed(e){return this.nocase?this.#S===Wi(e):this.#S===Dn(e)}async readlink(){let e=this.#L;if(e)return e;if(this.canReadlink()&&this.parent)try{let t=await this.#e.promises.readlink(this.fullpath()),n=(await this.parent.realpath())?.resolve(t);if(n)return this.#L=n}catch(t){this.#R(t.code);return}}readlinkSync(){let e=this.#L;if(e)return e;if(this.canReadlink()&&this.parent)try{let t=this.#e.readlinkSync(this.fullpath()),n=this.parent.realpathSync()?.resolve(t);if(n)return this.#L=n}catch(t){this.#R(t.code);return}}#q(e){this.#n|=uo;for(let t=e.provisional;t<e.length;t++){let n=e[t];n&&n.#C()}}#C(){this.#n&Qe||(this.#n=(this.#n|Qe)&Rn,this.#U())}#U(){let e=this.children();e.provisional=0;for(let t of e)t.#C()}#N(){this.#n|=ji,this.#T()}#T(){if(this.#n&Ln)return;let e=this.#n;(e&je)===nt&&(e&=Rn),this.#n=e|Ln,this.#U()}#H(e=""){e==="ENOTDIR"||e==="EPERM"?this.#T():e==="ENOENT"?this.#C():this.children().provisional=0}#P(e=""){e==="ENOTDIR"?this.parent.#T():e==="ENOENT"&&this.#C()}#R(e=""){let t=this.#n;t|=Hi,e==="ENOENT"&&(t|=Qe),(e==="EINVAL"||e==="UNKNOWN")&&(t&=Rn),this.#n=t,e==="ENOTDIR"&&this.parent&&this.parent.#T()}#W(e,t){return this.#V(e,t)||this.#M(e,t)}#M(e,t){let n=ho(e),r=this.newChild(e.name,n,{parent:this}),s=r.#n&je;return s!==nt&&s!==Lt&&s!==Ve&&(r.#n|=Ln),t.unshift(r),t.provisional++,r}#V(e,t){for(let n=t.provisional;n<t.length;n++){let r=t[n];if((this.nocase?Wi(e.name):Dn(e.name))===r.#S)return this.#J(e,r,n,t)}}#J(e,t,n,r){let s=t.name;return t.#n=t.#n&Rn|ho(e),s!==e.name&&(t.name=e.name),n!==r.provisional&&(n===r.length-1?r.pop():r.splice(n,1),r.unshift(t)),r.provisional++,t}async lstat(){if((this.#n&Qe)===0)try{return this.#z(await this.#e.promises.lstat(this.fullpath())),this}catch(e){this.#P(e.code)}}lstatSync(){if((this.#n&Qe)===0)try{return this.#z(this.#e.lstatSync(this.fullpath())),this}catch(e){this.#P(e.code)}}#z(e){let{atime:t,atimeMs:n,birthtime:r,birthtimeMs:s,blksize:o,blocks:a,ctime:l,ctimeMs:c,dev:f,gid:h,ino:p,mode:m,mtime:_,mtimeMs:g,nlink:C,rdev:b,size:x,uid:P}=e;this.#p=t,this.#c=n,this.#g=r,this.#v=s,this.#h=o,this.#u=a,this.#k=l,this.#b=c,this.#i=f,this.#x=h,this.#a=p,this.#r=m,this.#m=_,this.#s=g,this.#t=C,this.#y=b,this.#f=x,this.#o=P;let D=ho(e);this.#n=this.#n&Rn|D|Hc,D!==Ve&&D!==nt&&D!==Lt&&(this.#n|=Ln)}#F=[];#l=!1;#G(e){this.#l=!1;let t=this.#F.slice();this.#F.length=0,t.forEach(n=>n(null,e))}readdirCB(e,t=!1){if(!this.canReaddir()){t?e(null,[]):queueMicrotask(()=>e(null,[]));return}let n=this.children();if(this.calledReaddir()){let s=n.slice(0,n.provisional);t?e(null,s):queueMicrotask(()=>e(null,s));return}if(this.#F.push(e),this.#l)return;this.#l=!0;let r=this.fullpath();this.#e.readdir(r,{withFileTypes:!0},(s,o)=>{if(s)this.#H(s.code),n.provisional=0;else{for(let a of o)this.#W(a,n);this.#q(n)}this.#G(n.slice(0,n.provisional))})}#j;async readdir(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();if(this.#j)await this.#j;else{let n=()=>{};this.#j=new Promise(r=>n=r);try{for(let r of await this.#e.promises.readdir(t,{withFileTypes:!0}))this.#W(r,e);this.#q(e)}catch(r){this.#H(r.code),e.provisional=0}this.#j=void 0,n()}return e.slice(0,e.provisional)}readdirSync(){if(!this.canReaddir())return[];let e=this.children();if(this.calledReaddir())return e.slice(0,e.provisional);let t=this.fullpath();try{for(let n of this.#e.readdirSync(t,{withFileTypes:!0}))this.#W(n,e);this.#q(e)}catch(n){this.#H(n.code),e.provisional=0}return e.slice(0,e.provisional)}canReaddir(){if(this.#n&Wc)return!1;let e=je&this.#n;return e===Ve||e===nt||e===Lt}shouldWalk(e,t){return(this.#n&nt)===nt&&!(this.#n&Wc)&&!e.has(this)&&(!t||t(this))}async realpath(){if(this.#A)return this.#A;if(!((ji|Hi|Qe)&this.#n))try{let e=await this.#e.promises.realpath(this.fullpath());return this.#A=this.resolve(e)}catch{this.#N()}}realpathSync(){if(this.#A)return this.#A;if(!((ji|Hi|Qe)&this.#n))try{let e=this.#e.realpathSync(this.fullpath());return this.#A=this.resolve(e)}catch{this.#N()}}[Qc](e){if(e===this)return;e.isCWD=!1,this.isCWD=!0;let t=new Set([]),n=[],r=this;for(;r&&r.parent;)t.add(r),r.#w=n.join(this.sep),r.#O=n.join("/"),r=r.parent,n.push("..");for(r=e;r&&r.parent&&!t.has(r);)r.#w=void 0,r.#O=void 0,r=r.parent}},Ui=class i extends ve{sep="\\";splitSep=Rm;constructor(e,t=Ve,n,r,s,o,a){super(e,t,n,r,s,o,a)}newChild(e,t=Ve,n={}){return new i(e,t,this.root,this.roots,this.nocase,this.childrenCache(),n)}getRootString(e){return fo.parse(e).root}getRoot(e){if(e=Pm(e.toUpperCase()),e===this.root.name)return this.root;for(let[t,n]of Object.entries(this.roots))if(this.sameRoot(e,t))return this.roots[e]=n;return this.roots[e]=new Gt(e,this).root}sameRoot(e,t=this.root.name){return e=e.toUpperCase().replace(/\//g,"\\").replace(zc,"$1\\"),e===t}},zi=class i extends ve{splitSep="/";sep="/";constructor(e,t=Ve,n,r,s,o,a){super(e,t,n,r,s,o,a)}getRootString(e){return e.startsWith("/")?"/":""}getRoot(e){return this.root}newChild(e,t=Ve,n={}){return new i(e,t,this.root,this.roots,this.nocase,this.childrenCache(),n)}},Gi=class{root;rootPath;roots;cwd;#e;#i;#r;nocase;#t;constructor(e=process.cwd(),t,n,{nocase:r,childrenCacheSize:s=16*1024,fs:o=In}={}){this.#t=Uc(o),(e instanceof URL||e.startsWith("file://"))&&(e=_m(e));let a=t.resolve(e);this.roots=Object.create(null),this.rootPath=this.parseRootPath(a),this.#e=new Vi,this.#i=new Vi,this.#r=new po(s);let l=a.substring(this.rootPath.length).split(n);if(l.length===1&&!l[0]&&l.pop(),r===void 0)throw new TypeError("must provide nocase setting to PathScurryBase ctor");this.nocase=r,this.root=this.newRoot(this.#t),this.roots[this.rootPath]=this.root;let c=this.root,f=l.length-1,h=t.sep,p=this.rootPath,m=!1;for(let _ of l){let g=f--;c=c.child(_,{relative:new Array(g).fill("..").join(h),relativePosix:new Array(g).fill("..").join("/"),fullpath:p+=(m?"":h)+_}),m=!0}this.cwd=c}depth(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.depth()}childrenCache(){return this.#r}resolve(...e){let t="";for(let s=e.length-1;s>=0;s--){let o=e[s];if(!(!o||o===".")&&(t=t?`${o}/${t}`:o,this.isAbsolute(o)))break}let n=this.#e.get(t);if(n!==void 0)return n;let r=this.cwd.resolve(t).fullpath();return this.#e.set(t,r),r}resolvePosix(...e){let t="";for(let s=e.length-1;s>=0;s--){let o=e[s];if(!(!o||o===".")&&(t=t?`${o}/${t}`:o,this.isAbsolute(o)))break}let n=this.#i.get(t);if(n!==void 0)return n;let r=this.cwd.resolve(t).fullpathPosix();return this.#i.set(t,r),r}relative(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relative()}relativePosix(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.relativePosix()}basename(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.name}dirname(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),(e.parent||e).fullpath()}async readdir(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(t=e,e=this.cwd);let{withFileTypes:n}=t;if(e.canReaddir()){let r=await e.readdir();return n?r:r.map(s=>s.name)}else return[]}readdirSync(e=this.cwd,t={withFileTypes:!0}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(t=e,e=this.cwd);let{withFileTypes:n=!0}=t;return e.canReaddir()?n?e.readdirSync():e.readdirSync().map(r=>r.name):[]}async lstat(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstat()}lstatSync(e=this.cwd){return typeof e=="string"&&(e=this.cwd.resolve(e)),e.lstatSync()}async readlink(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(t=e.withFileTypes,e=this.cwd);let n=await e.readlink();return t?n:n?.fullpath()}readlinkSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(t=e.withFileTypes,e=this.cwd);let n=e.readlinkSync();return t?n:n?.fullpath()}async realpath(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(t=e.withFileTypes,e=this.cwd);let n=await e.realpath();return t?n:n?.fullpath()}realpathSync(e=this.cwd,{withFileTypes:t}={withFileTypes:!1}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(t=e.withFileTypes,e=this.cwd);let n=e.realpathSync();return t?n:n?.fullpath()}async walk(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:s,walkFilter:o}=t,a=[];(!s||s(e))&&a.push(n?e:e.fullpath());let l=new Set,c=(h,p)=>{l.add(h),h.readdirCB((m,_)=>{if(m)return p(m);let g=_.length;if(!g)return p();let C=()=>{--g===0&&p()};for(let b of _)(!s||s(b))&&a.push(n?b:b.fullpath()),r&&b.isSymbolicLink()?b.realpath().then(x=>x?.isUnknown()?x.lstat():x).then(x=>x?.shouldWalk(l,o)?c(x,C):C()):b.shouldWalk(l,o)?c(b,C):C()},!0)},f=e;return new Promise((h,p)=>{c(f,m=>{if(m)return p(m);h(a)})})}walkSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:s,walkFilter:o}=t,a=[];(!s||s(e))&&a.push(n?e:e.fullpath());let l=new Set([e]);for(let c of l){let f=c.readdirSync();for(let h of f){(!s||s(h))&&a.push(n?h:h.fullpath());let p=h;if(h.isSymbolicLink()){if(!(r&&(p=h.realpathSync())))continue;p.isUnknown()&&p.lstatSync()}p.shouldWalk(l,o)&&l.add(p)}}return a}[Symbol.asyncIterator](){return this.iterate()}iterate(e=this.cwd,t={}){return typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(t=e,e=this.cwd),this.stream(e,t)[Symbol.asyncIterator]()}[Symbol.iterator](){return this.iterateSync()}*iterateSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:s,walkFilter:o}=t;(!s||s(e))&&(yield n?e:e.fullpath());let a=new Set([e]);for(let l of a){let c=l.readdirSync();for(let f of c){(!s||s(f))&&(yield n?f:f.fullpath());let h=f;if(f.isSymbolicLink()){if(!(r&&(h=f.realpathSync())))continue;h.isUnknown()&&h.lstatSync()}h.shouldWalk(a,o)&&a.add(h)}}}stream(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:s,walkFilter:o}=t,a=new Ct({objectMode:!0});(!s||s(e))&&a.write(n?e:e.fullpath());let l=new Set,c=[e],f=0,h=()=>{let p=!1;for(;!p;){let m=c.shift();if(!m){f===0&&a.end();return}f++,l.add(m);let _=(C,b,x=!1)=>{if(C)return a.emit("error",C);if(r&&!x){let P=[];for(let D of b)D.isSymbolicLink()&&P.push(D.realpath().then(F=>F?.isUnknown()?F.lstat():F));if(P.length){Promise.all(P).then(()=>_(null,b,!0));return}}for(let P of b)P&&(!s||s(P))&&(a.write(n?P:P.fullpath())||(p=!0));f--;for(let P of b){let D=P.realpathCached()||P;D.shouldWalk(l,o)&&c.push(D)}p&&!a.flowing?a.once("drain",h):g||h()},g=!0;m.readdirCB(_,!0),g=!1}};return h(),a}streamSync(e=this.cwd,t={}){typeof e=="string"?e=this.cwd.resolve(e):e instanceof ve||(t=e,e=this.cwd);let{withFileTypes:n=!0,follow:r=!1,filter:s,walkFilter:o}=t,a=new Ct({objectMode:!0}),l=new Set;(!s||s(e))&&a.write(n?e:e.fullpath());let c=[e],f=0,h=()=>{let p=!1;for(;!p;){let m=c.shift();if(!m){f===0&&a.end();return}f++,l.add(m);let _=m.readdirSync();for(let g of _)(!s||s(g))&&(a.write(n?g:g.fullpath())||(p=!0));f--;for(let g of _){let C=g;if(g.isSymbolicLink()){if(!(r&&(C=g.realpathSync())))continue;C.isUnknown()&&C.lstatSync()}C.shouldWalk(l,o)&&c.push(C)}}p&&!a.flowing&&a.once("drain",h)};return h(),a}chdir(e=this.cwd){let t=this.cwd;this.cwd=typeof e=="string"?this.cwd.resolve(e):e,this.cwd[Qc](t)}},Gt=class extends Gi{sep="\\";constructor(e=process.cwd(),t={}){let{nocase:n=!0}=t;super(e,fo,"\\",{...t,nocase:n}),this.nocase=n;for(let r=this.cwd;r;r=r.parent)r.nocase=this.nocase}parseRootPath(e){return fo.parse(e).root.toUpperCase()}newRoot(e){return new Ui(this.rootPath,nt,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")||e.startsWith("\\")||/^[a-z]:(\/|\\)/i.test(e)}},$t=class extends Gi{sep="/";constructor(e=process.cwd(),t={}){let{nocase:n=!1}=t;super(e,gm,"/",{...t,nocase:n}),this.nocase=n}parseRootPath(e){return"/"}newRoot(e){return new zi(this.rootPath,nt,void 0,this.roots,this.nocase,this.childrenCache(),{fs:e})}isAbsolute(e){return e.startsWith("/")}},Tn=class extends $t{constructor(e=process.cwd(),t={}){let{nocase:n=!0}=t;super(e,{...t,nocase:n})}},S2=process.platform==="win32"?Ui:zi,Xc=process.platform==="win32"?Gt:process.platform==="darwin"?Tn:$t});var Lm,Dm,Yt,mo=ue(()=>{St();Lm=i=>i.length>=1,Dm=i=>i.length>=1,Yt=class i{#e;#i;#r;length;#t;#o;#x;#y;#h;#a;#f=!0;constructor(e,t,n,r){if(!Lm(e))throw new TypeError("empty pattern list");if(!Dm(t))throw new TypeError("empty glob list");if(t.length!==e.length)throw new TypeError("mismatched pattern list and glob list lengths");if(this.length=e.length,n<0||n>=this.length)throw new TypeError("index out of range");if(this.#e=e,this.#i=t,this.#r=n,this.#t=r,this.#r===0){if(this.isUNC()){let[s,o,a,l,...c]=this.#e,[f,h,p,m,..._]=this.#i;c[0]===""&&(c.shift(),_.shift());let g=[s,o,a,l,""].join("/"),C=[f,h,p,m,""].join("/");this.#e=[g,...c],this.#i=[C,..._],this.length=this.#e.length}else if(this.isDrive()||this.isAbsolute()){let[s,...o]=this.#e,[a,...l]=this.#i;o[0]===""&&(o.shift(),l.shift());let c=s+"/",f=a+"/";this.#e=[c,...o],this.#i=[f,...l],this.length=this.#e.length}}}pattern(){return this.#e[this.#r]}isString(){return typeof this.#e[this.#r]=="string"}isGlobstar(){return this.#e[this.#r]===re}isRegExp(){return this.#e[this.#r]instanceof RegExp}globString(){return this.#x=this.#x||(this.#r===0?this.isAbsolute()?this.#i[0]+this.#i.slice(1).join("/"):this.#i.join("/"):this.#i.slice(this.#r).join("/"))}hasMore(){return this.length>this.#r+1}rest(){return this.#o!==void 0?this.#o:this.hasMore()?(this.#o=new i(this.#e,this.#i,this.#r+1,this.#t),this.#o.#a=this.#a,this.#o.#h=this.#h,this.#o.#y=this.#y,this.#o):this.#o=null}isUNC(){let e=this.#e;return this.#h!==void 0?this.#h:this.#h=this.#t==="win32"&&this.#r===0&&e[0]===""&&e[1]===""&&typeof e[2]=="string"&&!!e[2]&&typeof e[3]=="string"&&!!e[3]}isDrive(){let e=this.#e;return this.#y!==void 0?this.#y:this.#y=this.#t==="win32"&&this.#r===0&&this.length>1&&typeof e[0]=="string"&&/^[a-z]:$/i.test(e[0])}isAbsolute(){let e=this.#e;return this.#a!==void 0?this.#a:this.#a=e[0]===""&&e.length>1||this.isDrive()||this.isUNC()}root(){let e=this.#e[0];return typeof e=="string"&&this.isAbsolute()&&this.#r===0?e:""}checkFollowGlobstar(){return!(this.#r===0||!this.isGlobstar()||!this.#f)}markFollowGlobstar(){return this.#r===0||!this.isGlobstar()||!this.#f?!1:(this.#f=!1,!0)}}});var Tm,Dt,go=ue(()=>{St();mo();Tm=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Dt=class{relative;relativeChildren;absolute;absoluteChildren;platform;mmopts;constructor(e,{nobrace:t,nocase:n,noext:r,noglobstar:s,platform:o=Tm}){this.relative=[],this.absolute=[],this.relativeChildren=[],this.absoluteChildren=[],this.platform=o,this.mmopts={dot:!0,nobrace:t,nocase:n,noext:r,noglobstar:s,optimizationLevel:2,platform:o,nocomment:!0,nonegate:!0};for(let a of e)this.add(a)}add(e){let t=new De(e,this.mmopts);for(let n=0;n<t.set.length;n++){let r=t.set[n],s=t.globParts[n];if(!r||!s)throw new Error("invalid pattern object");for(;r[0]==="."&&s[0]===".";)r.shift(),s.shift();let o=new Yt(r,s,0,this.platform),a=new De(o.globString(),this.mmopts),l=s[s.length-1]==="**",c=o.isAbsolute();c?this.absolute.push(a):this.relative.push(a),l&&(c?this.absoluteChildren.push(a):this.relativeChildren.push(a))}}ignored(e){let t=e.fullpath(),n=`${t}/`,r=e.relative()||".",s=`${r}/`;for(let o of this.relative)if(o.match(r)||o.match(s))return!0;for(let o of this.absolute)if(o.match(t)||o.match(n))return!0;return!1}childrenIgnored(e){let t=e.fullpath()+"/",n=(e.relative()||".")+"/";for(let r of this.relativeChildren)if(r.match(n))return!0;for(let r of this.absoluteChildren)if(r.match(t))return!0;return!1}}});var _o,yo,bo,Nn,eu=ue(()=>{St();_o=class i{store;constructor(e=new Map){this.store=e}copy(){return new i(new Map(this.store))}hasWalked(e,t){return this.store.get(e.fullpath())?.has(t.globString())}storeWalked(e,t){let n=e.fullpath(),r=this.store.get(n);r?r.add(t.globString()):this.store.set(n,new Set([t.globString()]))}},yo=class{store=new Map;add(e,t,n){let r=(t?2:0)|(n?1:0),s=this.store.get(e);this.store.set(e,s===void 0?r:r&s)}entries(){return[...this.store.entries()].map(([e,t])=>[e,!!(t&2),!!(t&1)])}},bo=class{store=new Map;add(e,t){if(!e.canReaddir())return;let n=this.store.get(e);n?n.find(r=>r.globString()===t.globString())||n.push(t):this.store.set(e,[t])}get(e){let t=this.store.get(e);if(!t)throw new Error("attempting to walk unknown path");return t}entries(){return this.keys().map(e=>[e,this.store.get(e)])}keys(){return[...this.store.keys()].filter(e=>e.canReaddir())}},Nn=class i{hasWalkedCache;matches=new yo;subwalks=new bo;patterns;follow;dot;opts;constructor(e,t){this.opts=e,this.follow=!!e.follow,this.dot=!!e.dot,this.hasWalkedCache=t?t.copy():new _o}processPatterns(e,t){this.patterns=t;let n=t.map(r=>[e,r]);for(let[r,s]of n){this.hasWalkedCache.storeWalked(r,s);let o=s.root(),a=s.isAbsolute()&&this.opts.absolute!==!1;if(o){r=r.resolve(o==="/"&&this.opts.root!==void 0?this.opts.root:o);let h=s.rest();if(h)s=h;else{this.matches.add(r,!0,!1);continue}}if(r.isENOENT())continue;let l,c,f=!1;for(;typeof(l=s.pattern())=="string"&&(c=s.rest());)r=r.resolve(l),s=c,f=!0;if(l=s.pattern(),c=s.rest(),f){if(this.hasWalkedCache.hasWalked(r,s))continue;this.hasWalkedCache.storeWalked(r,s)}if(typeof l=="string"){let h=l===".."||l===""||l===".";this.matches.add(r.resolve(l),a,h);continue}else if(l===re){(!r.isSymbolicLink()||this.follow||s.checkFollowGlobstar())&&this.subwalks.add(r,s);let h=c?.pattern(),p=c?.rest();if(!c||(h===""||h===".")&&!p)this.matches.add(r,a,h===""||h===".");else if(h===".."){let m=r.parent||r;p?this.hasWalkedCache.hasWalked(m,p)||this.subwalks.add(m,p):this.matches.add(m,a,!0)}}else l instanceof RegExp&&this.subwalks.add(r,s)}return this}subwalkTargets(){return this.subwalks.keys()}child(){return new i(this.opts,this.hasWalkedCache)}filterEntries(e,t){let n=this.subwalks.get(e),r=this.child();for(let s of t)for(let o of n){let a=o.isAbsolute(),l=o.pattern(),c=o.rest();l===re?r.testGlobstar(s,o,c,a):l instanceof RegExp?r.testRegExp(s,l,c,a):r.testString(s,l,c,a)}return r}testGlobstar(e,t,n,r){if((this.dot||!e.name.startsWith("."))&&(t.hasMore()||this.matches.add(e,r,!1),e.canReaddir()&&(this.follow||!e.isSymbolicLink()?this.subwalks.add(e,t):e.isSymbolicLink()&&(n&&t.checkFollowGlobstar()?this.subwalks.add(e,n):t.markFollowGlobstar()&&this.subwalks.add(e,t)))),n){let s=n.pattern();if(typeof s=="string"&&s!==".."&&s!==""&&s!==".")this.testString(e,s,n.rest(),r);else if(s===".."){let o=e.parent||e;this.subwalks.add(o,n)}else s instanceof RegExp&&this.testRegExp(e,s,n.rest(),r)}}testRegExp(e,t,n,r){t.test(e.name)&&(n?this.subwalks.add(e,n):this.matches.add(e,r,!1))}testString(e,t,n,r){e.isNamed(t)&&(n?this.subwalks.add(e,n):this.matches.add(e,r,!1))}}});var Nm,$i,Mn,Fn,tu=ue(()=>{co();go();eu();Nm=(i,e)=>typeof i=="string"?new Dt([i],e):Array.isArray(i)?new Dt(i,e):i,$i=class{path;patterns;opts;seen=new Set;paused=!1;aborted=!1;#e=[];#i;#r;signal;maxDepth;includeChildMatches;constructor(e,t,n){if(this.patterns=e,this.path=t,this.opts=n,this.#r=!n.posix&&n.platform==="win32"?"\\":"/",this.includeChildMatches=n.includeChildMatches!==!1,(n.ignore||!this.includeChildMatches)&&(this.#i=Nm(n.ignore??[],n),!this.includeChildMatches&&typeof this.#i.add!="function")){let r="cannot ignore child matches, ignore lacks add() method.";throw new Error(r)}this.maxDepth=n.maxDepth||1/0,n.signal&&(this.signal=n.signal,this.signal.addEventListener("abort",()=>{this.#e.length=0}))}#t(e){return this.seen.has(e)||!!this.#i?.ignored?.(e)}#o(e){return!!this.#i?.childrenIgnored?.(e)}pause(){this.paused=!0}resume(){if(this.signal?.aborted)return;this.paused=!1;let e;for(;!this.paused&&(e=this.#e.shift());)e()}onResume(e){this.signal?.aborted||(this.paused?this.#e.push(e):e())}async matchCheck(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||await e.realpath(),!n)return;e=n}let s=e.isUnknown()||this.opts.stat?await e.lstat():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let o=await s.realpath();o&&(o.isUnknown()||this.opts.stat)&&await o.lstat()}return this.matchCheckTest(s,t)}matchCheckTest(e,t){return e&&(this.maxDepth===1/0||e.depth()<=this.maxDepth)&&(!t||e.canReaddir())&&(!this.opts.nodir||!e.isDirectory())&&(!this.opts.nodir||!this.opts.follow||!e.isSymbolicLink()||!e.realpathCached()?.isDirectory())&&!this.#t(e)?e:void 0}matchCheckSync(e,t){if(t&&this.opts.nodir)return;let n;if(this.opts.realpath){if(n=e.realpathCached()||e.realpathSync(),!n)return;e=n}let s=e.isUnknown()||this.opts.stat?e.lstatSync():e;if(this.opts.follow&&this.opts.nodir&&s?.isSymbolicLink()){let o=s.realpathSync();o&&(o?.isUnknown()||this.opts.stat)&&o.lstatSync()}return this.matchCheckTest(s,t)}matchFinish(e,t){if(this.#t(e))return;if(!this.includeChildMatches&&this.#i?.add){let s=`${e.relativePosix()}/**`;this.#i.add(s)}let n=this.opts.absolute===void 0?t:this.opts.absolute;this.seen.add(e);let r=this.opts.mark&&e.isDirectory()?this.#r:"";if(this.opts.withFileTypes)this.matchEmit(e);else if(n){let s=this.opts.posix?e.fullpathPosix():e.fullpath();this.matchEmit(s+r)}else{let s=this.opts.posix?e.relativePosix():e.relative(),o=this.opts.dotRelative&&!s.startsWith(".."+this.#r)?"."+this.#r:"";this.matchEmit(s?o+s+r:"."+r)}}async match(e,t,n){let r=await this.matchCheck(e,n);r&&this.matchFinish(r,t)}matchSync(e,t,n){let r=this.matchCheckSync(e,n);r&&this.matchFinish(r,t)}walkCB(e,t,n){this.signal?.aborted&&n(),this.walkCB2(e,t,new Nn(this.opts),n)}walkCB2(e,t,n,r){if(this.#o(e))return r();if(this.signal?.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2(e,t,n,r));return}n.processPatterns(e,t);let s=1,o=()=>{--s===0&&r()};for(let[a,l,c]of n.matches.entries())this.#t(a)||(s++,this.match(a,l,c).then(()=>o()));for(let a of n.subwalkTargets()){if(this.maxDepth!==1/0&&a.depth()>=this.maxDepth)continue;s++;let l=a.readdirCached();a.calledReaddir()?this.walkCB3(a,l,n,o):a.readdirCB((c,f)=>this.walkCB3(a,f,n,o),!0)}o()}walkCB3(e,t,n,r){n=n.filterEntries(e,t);let s=1,o=()=>{--s===0&&r()};for(let[a,l,c]of n.matches.entries())this.#t(a)||(s++,this.match(a,l,c).then(()=>o()));for(let[a,l]of n.subwalks.entries())s++,this.walkCB2(a,l,n.child(),o);o()}walkCBSync(e,t,n){this.signal?.aborted&&n(),this.walkCB2Sync(e,t,new Nn(this.opts),n)}walkCB2Sync(e,t,n,r){if(this.#o(e))return r();if(this.signal?.aborted&&r(),this.paused){this.onResume(()=>this.walkCB2Sync(e,t,n,r));return}n.processPatterns(e,t);let s=1,o=()=>{--s===0&&r()};for(let[a,l,c]of n.matches.entries())this.#t(a)||this.matchSync(a,l,c);for(let a of n.subwalkTargets()){if(this.maxDepth!==1/0&&a.depth()>=this.maxDepth)continue;s++;let l=a.readdirSync();this.walkCB3Sync(a,l,n,o)}o()}walkCB3Sync(e,t,n,r){n=n.filterEntries(e,t);let s=1,o=()=>{--s===0&&r()};for(let[a,l,c]of n.matches.entries())this.#t(a)||this.matchSync(a,l,c);for(let[a,l]of n.subwalks.entries())s++,this.walkCB2Sync(a,l,n.child(),o);o()}},Mn=class extends $i{matches=new Set;constructor(e,t,n){super(e,t,n)}matchEmit(e){this.matches.add(e)}async walk(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&await this.path.lstat(),await new Promise((e,t)=>{this.walkCB(this.path,this.patterns,()=>{this.signal?.aborted?t(this.signal.reason):e(this.matches)})}),this.matches}walkSync(){if(this.signal?.aborted)throw this.signal.reason;return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>{if(this.signal?.aborted)throw this.signal.reason}),this.matches}},Fn=class extends $i{results;constructor(e,t,n){super(e,t,n),this.results=new Ct({signal:this.signal,objectMode:!0}),this.results.on("drain",()=>this.resume()),this.results.on("resume",()=>this.resume())}matchEmit(e){this.results.write(e),this.results.flowing||this.pause()}stream(){let e=this.path;return e.isUnknown()?e.lstat().then(()=>{this.walkCB(e,this.patterns,()=>this.results.end())}):this.walkCB(e,this.patterns,()=>this.results.end()),this.results}streamSync(){return this.path.isUnknown()&&this.path.lstatSync(),this.walkCBSync(this.path,this.patterns,()=>this.results.end()),this.results}}});import{fileURLToPath as Mm}from"node:url";var Fm,Ue,wo=ue(()=>{St();Zc();mo();tu();Fm=typeof process=="object"&&process&&typeof process.platform=="string"?process.platform:"linux",Ue=class{absolute;cwd;root;dot;dotRelative;follow;ignore;magicalBraces;mark;matchBase;maxDepth;nobrace;nocase;nodir;noext;noglobstar;pattern;platform;realpath;scurry;stat;signal;windowsPathsNoEscape;withFileTypes;includeChildMatches;opts;patterns;constructor(e,t){if(!t)throw new TypeError("glob options required");if(this.withFileTypes=!!t.withFileTypes,this.signal=t.signal,this.follow=!!t.follow,this.dot=!!t.dot,this.dotRelative=!!t.dotRelative,this.nodir=!!t.nodir,this.mark=!!t.mark,t.cwd?(t.cwd instanceof URL||t.cwd.startsWith("file://"))&&(t.cwd=Mm(t.cwd)):this.cwd="",this.cwd=t.cwd||"",this.root=t.root,this.magicalBraces=!!t.magicalBraces,this.nobrace=!!t.nobrace,this.noext=!!t.noext,this.realpath=!!t.realpath,this.absolute=t.absolute,this.includeChildMatches=t.includeChildMatches!==!1,this.noglobstar=!!t.noglobstar,this.matchBase=!!t.matchBase,this.maxDepth=typeof t.maxDepth=="number"?t.maxDepth:1/0,this.stat=!!t.stat,this.ignore=t.ignore,this.withFileTypes&&this.absolute!==void 0)throw new Error("cannot set absolute and withFileTypes:true");if(typeof e=="string"&&(e=[e]),this.windowsPathsNoEscape=!!t.windowsPathsNoEscape||t.allowWindowsEscape===!1,this.windowsPathsNoEscape&&(e=e.map(l=>l.replace(/\\/g,"/"))),this.matchBase){if(t.noglobstar)throw new TypeError("base matching requires globstar");e=e.map(l=>l.includes("/")?l:`./**/${l}`)}if(this.pattern=e,this.platform=t.platform||Fm,this.opts={...t,platform:this.platform},t.scurry){if(this.scurry=t.scurry,t.nocase!==void 0&&t.nocase!==t.scurry.nocase)throw new Error("nocase option contradicts provided scurry option")}else{let l=t.platform==="win32"?Gt:t.platform==="darwin"?Tn:t.platform?$t:Xc;this.scurry=new l(this.cwd,{nocase:t.nocase,fs:t.fs})}this.nocase=this.scurry.nocase;let n=this.platform==="darwin"||this.platform==="win32",r={...t,dot:this.dot,matchBase:this.matchBase,nobrace:this.nobrace,nocase:this.nocase,nocaseMagicOnly:n,nocomment:!0,noext:this.noext,nonegate:!0,optimizationLevel:2,platform:this.platform,windowsPathsNoEscape:this.windowsPathsNoEscape,debug:!!this.opts.debug},s=this.pattern.map(l=>new De(l,r)),[o,a]=s.reduce((l,c)=>(l[0].push(...c.set),l[1].push(...c.globParts),l),[[],[]]);this.patterns=o.map((l,c)=>{let f=a[c];if(!f)throw new Error("invalid pattern object");return new Yt(l,f,0,this.platform)})}async walk(){return[...await new Mn(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walk()]}walkSync(){return[...new Mn(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).walkSync()]}stream(){return new Fn(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).stream()}streamSync(){return new Fn(this.patterns,this.scurry.cwd,{...this.opts,maxDepth:this.maxDepth!==1/0?this.maxDepth+this.scurry.cwd.depth():1/0,platform:this.platform,nocase:this.nocase,includeChildMatches:this.includeChildMatches}).streamSync()}iterateSync(){return this.streamSync()[Symbol.iterator]()}[Symbol.iterator](){return this.iterateSync()}iterate(){return this.stream()[Symbol.asyncIterator]()}[Symbol.asyncIterator](){return this.iterate()}}});var Yi,vo=ue(()=>{St();Yi=(i,e={})=>{Array.isArray(i)||(i=[i]);for(let t of i)if(new De(t,e).hasMagic())return!0;return!1}});var lu={};Sf(lu,{Glob:()=>Ue,Ignore:()=>Dt,escape:()=>Rt,glob:()=>ft,globIterate:()=>Eo,globIterateSync:()=>qn,globStream:()=>So,globStreamSync:()=>Bn,globSync:()=>xo,hasMagic:()=>Yi,iterate:()=>ou,iterateSync:()=>su,stream:()=>ru,streamSync:()=>iu,sync:()=>au,unescape:()=>He});function Bn(i,e={}){return new Ue(i,e).streamSync()}function So(i,e={}){return new Ue(i,e).stream()}function xo(i,e={}){return new Ue(i,e).walkSync()}async function nu(i,e={}){return new Ue(i,e).walk()}function qn(i,e={}){return new Ue(i,e).iterateSync()}function Eo(i,e={}){return new Ue(i,e).iterate()}var iu,ru,su,ou,au,ft,Hn=ue(()=>{St();wo();vo();St();wo();vo();go();iu=Bn,ru=Object.assign(So,{sync:Bn}),su=qn,ou=Object.assign(Eo,{sync:qn}),au=Object.assign(xo,{stream:Bn,iterate:qn}),ft=Object.assign(nu,{glob:nu,globSync:xo,sync:au,globStream:So,stream:ru,globStreamSync:Bn,streamSync:iu,globIterate:Eo,iterate:ou,globIterateSync:qn,iterateSync:su,Glob:Ue,hasMagic:Yi,escape:Rt,unescape:He});ft.glob=ft});var Ae=W(Ne=>{"use strict";Ne.__esModule=!0;Ne.extend=wu;Ne.indexOf=ig;Ne.escapeExpression=rg;Ne.isEmpty=sg;Ne.createFrame=og;Ne.blockParams=ag;Ne.appendContextPath=lg;var Zm={"&":"&","<":"<",">":">",'"':""","'":"'","`":"`","=":"="},eg=/[&<>"'`=]/g,tg=/[&<>"'`=]/;function ng(i){return Zm[i]}function wu(i){for(var e=1;e<arguments.length;e++)for(var t in arguments[e])Object.prototype.hasOwnProperty.call(arguments[e],t)&&(i[t]=arguments[e][t]);return i}var Io=Object.prototype.toString;Ne.toString=Io;var Ro=function(e){return typeof e=="function"};Ro(/x/)&&(Ne.isFunction=Ro=function(i){return typeof i=="function"&&Io.call(i)==="[object Function]"});Ne.isFunction=Ro;var vu=Array.isArray||function(i){return i&&typeof i=="object"?Io.call(i)==="[object Array]":!1};Ne.isArray=vu;function ig(i,e){for(var t=0,n=i.length;t<n;t++)if(i[t]===e)return t;return-1}function rg(i){if(typeof i!="string"){if(i&&i.toHTML)return i.toHTML();if(i==null)return"";if(!i)return i+"";i=""+i}return tg.test(i)?i.replace(eg,ng):i}function sg(i){return!i&&i!==0?!0:!!(vu(i)&&i.length===0)}function og(i){var e=wu({},i);return e._parent=i,e}function ag(i,e){return i.path=e,i}function lg(i,e){return(i?i+".":"")+e}});var Me=W((er,Su)=>{"use strict";er.__esModule=!0;var Lo=["description","fileName","lineNumber","endLineNumber","message","name","number","stack"];function Do(i,e){var t=e&&e.loc,n=void 0,r=void 0,s=void 0,o=void 0;t&&(n=t.start.line,r=t.end.line,s=t.start.column,o=t.end.column,i+=" - "+n+":"+s);for(var a=Error.prototype.constructor.call(this,i),l=0;l<Lo.length;l++)this[Lo[l]]=a[Lo[l]];Error.captureStackTrace&&Error.captureStackTrace(this,Do);try{t&&(this.lineNumber=n,this.endLineNumber=r,Object.defineProperty?(Object.defineProperty(this,"column",{value:s,enumerable:!0}),Object.defineProperty(this,"endColumn",{value:o,enumerable:!0})):(this.column=s,this.endColumn=o))}catch{}}Do.prototype=new Error;er.default=Do;Su.exports=er.default});var Eu=W((tr,xu)=>{"use strict";tr.__esModule=!0;var To=Ae();tr.default=function(i){i.registerHelper("blockHelperMissing",function(e,t){var n=t.inverse,r=t.fn;if(e===!0)return r(this);if(e===!1||e==null)return n(this);if(To.isArray(e))return e.length>0?(t.ids&&(t.ids=[t.name]),i.helpers.each(e,t)):n(this);if(t.data&&t.ids){var s=To.createFrame(t.data);s.contextPath=To.appendContextPath(t.data.contextPath,t.name),t={data:s}}return r(e,t)})};xu.exports=tr.default});var ku=W((nr,Cu)=>{"use strict";nr.__esModule=!0;function cg(i){return i&&i.__esModule?i:{default:i}}var Vn=Ae(),ug=Me(),hg=cg(ug);nr.default=function(i){i.registerHelper("each",function(e,t){if(!t)throw new hg.default("Must pass iterator to #each");var n=t.fn,r=t.inverse,s=0,o="",a=void 0,l=void 0;t.data&&t.ids&&(l=Vn.appendContextPath(t.data.contextPath,t.ids[0])+"."),Vn.isFunction(e)&&(e=e.call(this)),t.data&&(a=Vn.createFrame(t.data));function c(_,g,C){a&&(a.key=_,a.index=g,a.first=g===0,a.last=!!C,l&&(a.contextPath=l+_)),o=o+n(e[_],{data:a,blockParams:Vn.blockParams([e[_],_],[l+_,null])})}if(e&&typeof e=="object")if(Vn.isArray(e))for(var f=e.length;s<f;s++)s in e&&c(s,s,s===e.length-1);else if(typeof Symbol=="function"&&e[Symbol.iterator]){for(var h=[],p=e[Symbol.iterator](),m=p.next();!m.done;m=p.next())h.push(m.value);e=h;for(var f=e.length;s<f;s++)c(s,s,s===e.length-1)}else(function(){var _=void 0;Object.keys(e).forEach(function(g){_!==void 0&&c(_,s-1),_=g,s++}),_!==void 0&&c(_,s-1,!0)})();return s===0&&(o=r(this)),o})};Cu.exports=nr.default});var Ou=W((ir,Au)=>{"use strict";ir.__esModule=!0;function fg(i){return i&&i.__esModule?i:{default:i}}var dg=Me(),pg=fg(dg);ir.default=function(i){i.registerHelper("helperMissing",function(){if(arguments.length!==1)throw new pg.default('Missing helper: "'+arguments[arguments.length-1].name+'"')})};Au.exports=ir.default});var Lu=W((rr,Iu)=>{"use strict";rr.__esModule=!0;function mg(i){return i&&i.__esModule?i:{default:i}}var Pu=Ae(),gg=Me(),Ru=mg(gg);rr.default=function(i){i.registerHelper("if",function(e,t){if(arguments.length!=2)throw new Ru.default("#if requires exactly one argument");return Pu.isFunction(e)&&(e=e.call(this)),!t.hash.includeZero&&!e||Pu.isEmpty(e)?t.inverse(this):t.fn(this)}),i.registerHelper("unless",function(e,t){if(arguments.length!=2)throw new Ru.default("#unless requires exactly one argument");return i.helpers.if.call(this,e,{fn:t.inverse,inverse:t.fn,hash:t.hash})})};Iu.exports=rr.default});var Tu=W((sr,Du)=>{"use strict";sr.__esModule=!0;sr.default=function(i){i.registerHelper("log",function(){for(var e=[void 0],t=arguments[arguments.length-1],n=0;n<arguments.length-1;n++)e.push(arguments[n]);var r=1;t.hash.level!=null?r=t.hash.level:t.data&&t.data.level!=null&&(r=t.data.level),e[0]=r,i.log.apply(i,e)})};Du.exports=sr.default});var Mu=W((or,Nu)=>{"use strict";or.__esModule=!0;or.default=function(i){i.registerHelper("lookup",function(e,t,n){return e&&n.lookupProperty(e,t)})};Nu.exports=or.default});var Bu=W((ar,Fu)=>{"use strict";ar.__esModule=!0;function _g(i){return i&&i.__esModule?i:{default:i}}var Un=Ae(),yg=Me(),bg=_g(yg);ar.default=function(i){i.registerHelper("with",function(e,t){if(arguments.length!=2)throw new bg.default("#with requires exactly one argument");Un.isFunction(e)&&(e=e.call(this));var n=t.fn;if(Un.isEmpty(e))return t.inverse(this);var r=t.data;return t.data&&t.ids&&(r=Un.createFrame(t.data),r.contextPath=Un.appendContextPath(t.data.contextPath,t.ids[0])),n(e,{data:r,blockParams:Un.blockParams([e],[r&&r.contextPath])})})};Fu.exports=ar.default});var No=W(lr=>{"use strict";lr.__esModule=!0;lr.registerDefaultHelpers=Tg;lr.moveHelperToHooks=Ng;function Tt(i){return i&&i.__esModule?i:{default:i}}var wg=Eu(),vg=Tt(wg),Sg=ku(),xg=Tt(Sg),Eg=Ou(),Cg=Tt(Eg),kg=Lu(),Ag=Tt(kg),Og=Tu(),Pg=Tt(Og),Rg=Mu(),Ig=Tt(Rg),Lg=Bu(),Dg=Tt(Lg);function Tg(i){vg.default(i),xg.default(i),Cg.default(i),Ag.default(i),Pg.default(i),Ig.default(i),Dg.default(i)}function Ng(i,e,t){i.helpers[e]&&(i.hooks[e]=i.helpers[e],t||(i.helpers[e]=void 0))}});var Hu=W((cr,qu)=>{"use strict";cr.__esModule=!0;var Mg=Ae();cr.default=function(i){i.registerDecorator("inline",function(e,t,n,r){var s=e;return t.partials||(t.partials={},s=function(o,a){var l=n.partials;n.partials=Mg.extend({},l,t.partials);var c=e(o,a);return n.partials=l,c}),t.partials[r.args[0]]=r.fn,s})};qu.exports=cr.default});var Wu=W(Mo=>{"use strict";Mo.__esModule=!0;Mo.registerDefaultDecorators=Hg;function Fg(i){return i&&i.__esModule?i:{default:i}}var Bg=Hu(),qg=Fg(Bg);function Hg(i){qg.default(i)}});var Fo=W((ur,ju)=>{"use strict";ur.__esModule=!0;var Wg=Ae(),Jt={methodMap:["debug","info","warn","error"],level:"info",lookupLevel:function(e){if(typeof e=="string"){var t=Wg.indexOf(Jt.methodMap,e.toLowerCase());t>=0?e=t:e=parseInt(e,10)}return e},log:function(e){if(e=Jt.lookupLevel(e),typeof console<"u"&&Jt.lookupLevel(Jt.level)<=e){var t=Jt.methodMap[e];console[t]||(t="log");for(var n=arguments.length,r=Array(n>1?n-1:0),s=1;s<n;s++)r[s-1]=arguments[s];console[t].apply(console,r)}}};ur.default=Jt;ju.exports=ur.default});var Bo=W(zn=>{"use strict";zn.__esModule=!0;zn.createProtoAccessControl=zg;zn.resultIsAllowed=Gg;zn.resetLoggedProperties=Yg;function jg(i){return i&&i.__esModule?i:{default:i}}var Vu=Ae(),Vg=Fo(),Ug=jg(Vg),hr=Object.create(null);function zg(i){var e=Object.create(null);e.__proto__=!1,Vu.extend(e,i.allowedProtoProperties);var t=Object.create(null);return t.constructor=!1,t.__defineGetter__=!1,t.__defineSetter__=!1,t.__lookupGetter__=!1,t.__lookupSetter__=!1,Vu.extend(t,i.allowedProtoMethods),{properties:{whitelist:e,defaultValue:i.allowProtoPropertiesByDefault},methods:{whitelist:t,defaultValue:i.allowProtoMethodsByDefault}}}function Gg(i,e,t){return Uu(typeof i=="function"?e.methods:e.properties,t)}function Uu(i,e){return i.whitelist[e]!==void 0?i.whitelist[e]===!0:i.defaultValue!==void 0?i.defaultValue:($g(e),!1)}function $g(i){hr[i]!==!0&&(hr[i]=!0,Ug.default.log("error",'Handlebars: Access has been denied to resolve the property "'+i+`" because it is not an "own property" of its parent.
|
|
30
30
|
You can add a runtime option to disable the check or this warning:
|
|
31
31
|
See https://handlebarsjs.com/api-reference/runtime-options.html#options-to-control-prototype-access for details`))}function Yg(){Object.keys(hr).forEach(function(i){delete hr[i]})}});var dr=W(it=>{"use strict";it.__esModule=!0;it.HandlebarsEnvironment=Wo;function zu(i){return i&&i.__esModule?i:{default:i}}var Nt=Ae(),Jg=Me(),qo=zu(Jg),Kg=No(),Qg=Wu(),Xg=Fo(),fr=zu(Xg),Zg=Bo(),e_="4.7.9";it.VERSION=e_;var t_=8;it.COMPILER_REVISION=t_;var n_=7;it.LAST_COMPATIBLE_COMPILER_REVISION=n_;var i_={1:"<= 1.0.rc.2",2:"== 1.0.0-rc.3",3:"== 1.0.0-rc.4",4:"== 1.x.x",5:"== 2.0.0-alpha.x",6:">= 2.0.0-beta.1",7:">= 4.0.0 <4.3.0",8:">= 4.3.0"};it.REVISION_CHANGES=i_;var Ho="[object Object]";function Wo(i,e,t){this.helpers=i||{},this.partials=e||{},this.decorators=t||{},Kg.registerDefaultHelpers(this),Qg.registerDefaultDecorators(this)}Wo.prototype={constructor:Wo,logger:fr.default,log:fr.default.log,registerHelper:function(e,t){if(Nt.toString.call(e)===Ho){if(t)throw new qo.default("Arg not supported with multiple helpers");Nt.extend(this.helpers,e)}else this.helpers[e]=t},unregisterHelper:function(e){delete this.helpers[e]},registerPartial:function(e,t){if(Nt.toString.call(e)===Ho)Nt.extend(this.partials,e);else{if(typeof t>"u")throw new qo.default('Attempting to register a partial called "'+e+'" as undefined');this.partials[e]=t}},unregisterPartial:function(e){delete this.partials[e]},registerDecorator:function(e,t){if(Nt.toString.call(e)===Ho){if(t)throw new qo.default("Arg not supported with multiple decorators");Nt.extend(this.decorators,e)}else this.decorators[e]=t},unregisterDecorator:function(e){delete this.decorators[e]},resetLoggedPropertyAccesses:function(){Zg.resetLoggedProperties()}};var r_=fr.default.log;it.log=r_;it.createFrame=Nt.createFrame;it.logger=fr.default});var $u=W((pr,Gu)=>{"use strict";pr.__esModule=!0;function jo(i){this.string=i}jo.prototype.toString=jo.prototype.toHTML=function(){return""+this.string};pr.default=jo;Gu.exports=pr.default});var Yu=W(Vo=>{"use strict";Vo.__esModule=!0;Vo.wrapHelper=s_;function s_(i,e){if(typeof i!="function")return i;var t=function(){var r=arguments[arguments.length-1];return arguments[arguments.length-1]=e(r),i.apply(this,arguments)};return t}});var eh=W(kt=>{"use strict";kt.__esModule=!0;kt.checkRevision=h_;kt.template=f_;kt.wrapProgram=mr;kt.resolvePartial=d_;kt.invokePartial=p_;kt.noop=Xu;function o_(i){return i&&i.__esModule?i:{default:i}}function a_(i){if(i&&i.__esModule)return i;var e={};if(i!=null)for(var t in i)Object.prototype.hasOwnProperty.call(i,t)&&(e[t]=i[t]);return e.default=i,e}var l_=Ae(),Kt=a_(l_),c_=Me(),dt=o_(c_),pt=dr(),Ju=No(),u_=Yu(),Ku=Bo();function h_(i){var e=i&&i[0]||1,t=pt.COMPILER_REVISION;if(!(e>=pt.LAST_COMPATIBLE_COMPILER_REVISION&&e<=pt.COMPILER_REVISION))if(e<pt.LAST_COMPATIBLE_COMPILER_REVISION){var n=pt.REVISION_CHANGES[t],r=pt.REVISION_CHANGES[e];throw new dt.default("Template was precompiled with an older version of Handlebars than the current runtime. Please update your precompiler to a newer version ("+n+") or downgrade your runtime to an older version ("+r+").")}else throw new dt.default("Template was precompiled with a newer version of Handlebars than the current runtime. Please update your runtime to a newer version ("+i[1]+").")}function f_(i,e){if(!e)throw new dt.default("No environment passed to template");if(!i||!i.main)throw new dt.default("Unknown template object: "+typeof i);i.main.decorator=i.main_d,e.VM.checkRevision(i.compiler);var t=i.compiler&&i.compiler[0]===7;function n(o,a,l){l.hash&&(a=Kt.extend({},a,l.hash),l.ids&&(l.ids[0]=!0)),o=e.VM.resolvePartial.call(this,o,a,l),l.hooks=this.hooks,l.protoAccessControl=this.protoAccessControl;var c=e.VM.invokePartial.call(this,o,a,l);if(c==null&&e.compile&&(l.partials[l.name]=e.compile(o,i.compilerOptions,e),c=l.partials[l.name](a,l)),c!=null){if(l.indent){for(var f=c.split(`
|
|
32
32
|
`),h=0,p=f.length;h<p&&!(!f[h]&&h+1===p);h++)f[h]=l.indent+f[h];c=f.join(`
|
|
@@ -875,7 +875,7 @@ ${t.trim()}
|
|
|
875
875
|
`):c;await zy(s,h,{encoding:n.output?.encoding??"utf-8"})}}catch(a){o.success=!1,o.error=a instanceof Error?a:new Error(String(a))}return o}async function tb(i,e,t,n,r={}){let s=[];if(!e.generators||e.generators.length===0)return r.verbose&&console.log(`No generators defined for datasource: ${i}`),s;let o=n.templates_dir??".embedoc/templates",a=await t.getAll();r.verbose&&console.log(`Found ${a.length} records in datasource: ${i}`);for(let l of e.generators)if(!(r.generatorName&&l.template!==r.generatorName)){r.verbose&&console.log(` Generator: ${l.template}`);for(let c of a){let f=await eb(c,l,o,n,r.dryRun);s.push(f),r.verbose&&(f.skipped?console.log(` Skipped (exists): ${f.filePath}`):f.success?console.log(` Generated: ${f.filePath}`):console.log(` Failed: ${f.filePath} - ${f.error?.message}`))}}return s}async function hf(i,e,t={}){let n=[];if(!i.datasources)return n;for(let[r,s]of Object.entries(i.datasources)){if(t.datasourceName&&r!==t.datasourceName||!s.generators||s.generators.length===0)continue;let o=e[r];if(!o){t.verbose&&console.warn(`Datasource not initialized: ${r}`);continue}t.verbose&&console.log(`
|
|
876
876
|
Processing datasource: ${r}`);let a=await tb(r,s,o,i,t);n.push(...a)}return n}Hn();import{readFile as nb}from"node:fs/promises";import{resolve as st,relative as Sa}from"node:path";var on=class{nodes=new Map;config;renderersDir;embeds;constructor(e,t){this.config=e,this.embeds=t,this.renderersDir=st(e.renderers_dir??e.embeds_dir??".embedoc/renderers")}getOrCreateNode(e,t){let n=st(t),r=this.nodes.get(n);return r||(r={type:e,path:n,dependsOn:new Set,dependedBy:new Set},this.nodes.set(n,r)),r}addDependency(e,t){let n=this.nodes.get(st(e)),r=this.nodes.get(st(t));n&&r&&(n.dependsOn.add(r.path),r.dependedBy.add(n.path))}async analyzeDocument(e,t){let n=st(e),r=this.getOrCreateNode("document",n);try{let s=await nb(n,{encoding:"utf-8"}),o=Zi(t.comment_style,this.config.comment_styles),{content:a}=Qi(s),l=Xi(a,o),c=new Set(l.map(f=>f.templateName));for(let f of c){let h=this.embeds[f];if(h){let p=`embed:${f}`,m=this.getOrCreateNode("embed",p);if(r.dependsOn.add(m.path),m.dependedBy.add(r.path),h.dependsOn)for(let _ of h.dependsOn){let g=this.config.datasources?.[_];if(g?.path){let C=st(g.path),b=this.getOrCreateNode("datasource",C);m.dependsOn.add(b.path),b.dependedBy.add(m.path)}}}}}catch{}}async build(){this.nodes.clear();for(let e of this.config.targets){let t=await ft(e.pattern,{ignore:e.exclude??[],nodir:!0});for(let n of t)await this.analyzeDocument(n,e)}}getAffectedDocuments(e){let t=st(e),n=new Set,r=this.nodes.get(t);if(!r){for(let a of this.nodes.values())if(a.type==="datasource"&&a.path===t){r=a;break}}if(!r&&e.endsWith(".ts")){let a=e.split("/").pop()?.replace(".ts","");if(a&&a!=="index"){let l=`embed:${a}`;if(r=this.nodes.get(st(l)),!r){let c=a.replace(/([A-Z])/g,"_$1").toLowerCase().replace(/^_/,"");r=this.nodes.get(st(`embed:${c}`))}}}if(!r)return this.nodes.get(t)?.type==="document"?[t]:[];let s=new Set,o=[r];for(;o.length>0;){let a=o.shift();if(!s.has(a.path)){s.add(a.path),a.type==="document"&&n.add(a.path);for(let l of a.dependedBy){let c=this.nodes.get(l);c&&!s.has(l)&&o.push(c)}}}return Array.from(n)}getWatchPaths(){let e=[];if(this.config.datasources)for(let t of Object.values(this.config.datasources))t.path&&e.push(st(t.path));return e.push(this.renderersDir),e}dump(){console.log(`
|
|
877
877
|
=== Dependency Graph ===`);for(let[e,t]of this.nodes){if(console.log(`
|
|
878
|
-
[${t.type}] ${Sa(process.cwd(),e)}`),t.dependsOn.size>0){console.log(" depends on:");for(let n of t.dependsOn)console.log(` - ${Sa(process.cwd(),n)}`)}if(t.dependedBy.size>0){console.log(" depended by:");for(let n of t.dependedBy)console.log(` - ${Sa(process.cwd(),n)}`)}}}};var sb={version:"0.14.
|
|
878
|
+
[${t.type}] ${Sa(process.cwd(),e)}`),t.dependsOn.size>0){console.log(" depends on:");for(let n of t.dependsOn)console.log(` - ${Sa(process.cwd(),n)}`)}if(t.dependedBy.size>0){console.log(" depended by:");for(let n of t.dependedBy)console.log(` - ${Sa(process.cwd(),n)}`)}}}};var sb={version:"0.14.9"};async function Ea(i){let e=ot(i),t=await pf(e,{encoding:"utf-8"});return i.endsWith(".json")?JSON.parse(t):et.load(t)}async function an(i){try{return await ib(i),!0}catch{return!1}}function df(i){return i.renderers_dir?i.renderers_dir:i.embeds_dir?(console.warn(j.default.yellow('Warning: "embeds_dir" is deprecated. Use "renderers_dir" instead.')),i.embeds_dir):".embedoc/renderers"}async function Ca(i){let e=ot(i,"index.ts"),t=ot(i,"index.js");try{if(await an(e)){let n=await gf(e,import.meta.url);return n.embeds??n.default?.embeds??{}}return await an(t)?(await import(mf(t).href)).embeds??{}:{}}catch(n){let r=n instanceof Error?n.message:String(n);return console.warn(j.default.yellow(`Warning: Could not load renderers from ${i}: ${r}`)),{}}}async function ka(i){let e=ot(i,"index.ts"),t=ot(i,"index.js"),n={datasourceTypes:{},inlineFormats:{}};try{let r;return await an(e)?r=await gf(e,import.meta.url):await an(t)&&(r=await import(mf(t).href)),r?{datasourceTypes:r.datasourceTypes??r.default?.datasourceTypes??{},inlineFormats:r.inlineFormats??r.default?.inlineFormats??{}}:n}catch(r){let s=r instanceof Error?r.message:String(r);return console.warn(j.default.yellow(`Warning: Could not load custom datasources from ${i}: ${s}`)),n}}var ob={init:async i=>{try{console.log(j.default.cyan(`\u{1F4C1} Initializing embedoc...
|
|
879
879
|
`));let e=[],t=[],n=async(l,c)=>{let f=ot(l);if(!i.force&&await an(f)){t.push(l);return}let h=f.substring(0,f.lastIndexOf("/"));await rb(h,{recursive:!0}),await ff(f,c,{encoding:"utf-8"}),e.push(l)};await n("embedoc.config.yaml",`version: "1.0"
|
|
880
880
|
|
|
881
881
|
targets:
|